home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume21 / notes / part01 < prev    next >
Encoding:
Text File  |  1993-10-20  |  48.7 KB  |  1,656 lines

  1. Newsgroups: comp.sources.x
  2. From: bob@snuffy.penfield.ny.us (Bob Smith)
  3. Subject: v21i014:  notes - an X11R5 note pad based on the Athena Widget set, Part01/02
  4. Message-ID: <csx-v21i014=notes.150228@sparky.Sterling.COM>
  5. X-Md4-Signature: c24fe5fc1ab804f3a2e09e0bc1eb3c54
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Fuzzball Widget Factory
  8. Date: Wed, 20 Oct 1993 20:04:57 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: bob@snuffy.penfield.ny.us (Bob Smith)
  12. Posting-number: Volume 21, Issue 14
  13. Archive-name: notes/part01
  14. Environment: X11R5
  15.  
  16. [ Also worked on a Sparc 10 with 4.1.3, X11R5 ]
  17. [                 Chris                       ]
  18.  
  19. This is a small note manager I wrote a while back.  Seems to work
  20. OK.  I've used it for nearly 10 months now without a mishap so I
  21. think it's fairly stable.  However my system is a Sun 3, SunOS 3.5, with
  22. X11R5... Somewhat of an oddball machine.
  23.  
  24. #! /bin/sh
  25. # This is a shell archive.  Remove anything before this line, then unpack
  26. # it by saving it into a file and typing "sh file".  To overwrite existing
  27. # files, type "sh file -c".  You can also feed this as standard input via
  28. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  29. # will see the following message at the end:
  30. #        "End of archive 1 (of 2)."
  31. # Contents:  .notes CHANGES INSTALL Imakefile MANIFEST Makefile README
  32. #   main.c notes.h notes.man notes.xbm patchlevel.h
  33. # Wrapped by bob@snuffy on Sun Sep 19 21:37:43 1993
  34. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  35. if test -f '.notes' -a "${1}" != "-c" ; then 
  36.   echo shar: Will not clobber existing file \"'.notes'\"
  37. else
  38. echo shar: Extracting \"'.notes'\" \(5942 characters\)
  39. sed "s/^X//" >'.notes' <<'END_OF_FILE'
  40. X 295 181 410 106 About NOTES
  41. X
  42. X    Notes v1.0.2 by Bob Smith
  43. X
  44. X    Send gripes or suggestions to ...
  45. X
  46. X    bob@snuffy.dracut.ma.us (Bob Smith)
  47. X 205 183 500 594 CHANGES
  48. XCHANGES to Notes for v1.0.2
  49. X
  50. Xo    Changed the 'chains' on the buttons that are part
  51. X    of the notes list so that they don't get mucked up
  52. X    when the window is resized.
  53. X
  54. Xo    Added a 'Select' button to the note display to allow
  55. X    selecting the entire note easily.
  56. X
  57. Xo    Changed filler_buttons to filler_boxes... Just makes
  58. X    more sense.
  59. X
  60. Xo    Made a change in the dialog message when creating a new
  61. X    note.
  62. X
  63. Xo    Put the whole mess under SCCS control ... even
  64. X    though I have no real experience at using sccs...
  65. X    as good a time as any to learn...
  66. X
  67. XCHANGES to Notes for v1.0.1
  68. X
  69. Xo    Added a Button 2 translation to the `Dismiss' button
  70. X    of the Notes list that causes everything (any displayed
  71. X    notes and the note list) to be dismissed in one action.
  72. X
  73. Xo    Added a Button 2 translation to the `Save' button
  74. X    of the Notes list that causes a save operation to be
  75. X    performed and everything dismissed.
  76. X
  77. Xo    Added a Button 2 translation to the Notes list widget
  78. X    that will dismiss the associated note.
  79. X
  80. Xo    Did away with the quitAction function in main.c
  81. X    as it was unneeded.
  82. X
  83. Xo    Corrected read_notefile so that it wouldn't core
  84. X    dump in the absence of a HOME variable in the
  85. X    environment.
  86. X
  87. Xo    Put some speedup hacks into read_notefile,
  88. X    the entire file is now read in one pass instead of
  89. X    a line at a time.  Loads up appreciably faster!
  90. X
  91. Xo    Added some error checking around malloc's and realloc's,
  92. X    doesn't do anything graceful!  Just checks and dies
  93. X    if a problem is encountered.
  94. X
  95. Xo    Added a die() function, a quick way out for error
  96. X    conditions.
  97. X
  98. Xo    Added an AddCallback definition, just an easier way
  99. X    to do XtAddCallback...
  100. X
  101. Xo    Consolidated some code with the addition of the function
  102. X    destroy_widget() in callbacks.c
  103. X
  104. Xo    added desensitize_all and resensitize_all -- an effort
  105. X    in keeping the user from getting the thing in an odd
  106. X    state...  maybe
  107. X
  108. Xo    made more things work via callbacks
  109. X
  110. Xo    added H_OFFSET and H_OFFSET definitions in Imakefile
  111. X    for use by write_notefile() in main.c -- the purpose
  112. X    is to correct out the offsets injected by my window
  113. X    manager (twm) while a note is mapped to prevent the
  114. X    windows from 'creeping' when they are saved...  if
  115. X    someone knows a way to detect these offsets at run
  116. X    time I'd appreciate a better idea...
  117. X
  118. Xo    added a Button 3 translation to the startup_button
  119. X    to bring up a `quit' dialog box
  120. X
  121. Xo    ...and otherwise damn near rewrote the whole thing
  122. X 207 181 500 551 INSTALL
  123. XINSTALL notes for Notes v1.0.2
  124. X
  125. XIn theory all you should have to do is:
  126. X
  127. X    xmkmf            to create the Makefile
  128. X    make                to build notes
  129. X    make install        to install notes in BINDIR
  130. X                and notes.xbm in BITMAPDIR
  131. X    make install.man    to install notes.man in MANDIR
  132. X
  133. XThings that may cause problems:
  134. X
  135. Xstrdup()
  136. X
  137. X    Notes uses a strdup() function that SunOS3.5 is
  138. X    missing.  A replacement is included in main.c with
  139. X    a feeble attempt made to properly 'ifdef' it in the
  140. X    Imakefile.  If you need it and the Makefile is
  141. X    generated without defining NEED_STRDUP, check and
  142. X    fix the Imakefile.
  143. X
  144. XH_OFS / V_OFS
  145. X
  146. X    Various window managers do weird things to a windows
  147. X    x and y values when they are mapped.  This prompted the
  148. X    inclusion of settable parameters V_OFS and H_OFS in
  149. X    the Imakefile, which ultimately effects the definitions
  150. X    of V_OFFSET and H_OFFSET in main.c ...  You may have to
  151. X    experiment a bit by saving your .notes files
  152. X    repeatedly with notes mapped and checking the values
  153. X    in .notes to get it exactly right on your system.
  154. X 204 185 500 300 MANIFEST
  155. X   File Name        Archive #   Description
  156. X-----------------------------------------------------------
  157. X .notes                     1   A sample notes files
  158. X CHANGES                    1   A history of changes
  159. X INSTALL                    1   Installation instructions
  160. X Imakefile                  1   an Imake makefile
  161. X MANIFEST                   1   This shipping list
  162. X Makefile                   1   an Imake generated makefile
  163. X README                     1   Miscellaneous comments
  164. X TODO                       1    Stuff that should be fixed one day
  165. X callbacks.c                1   source
  166. X main.c                     1   source
  167. X notes.h                    1   source
  168. X notes.man                  1   Manual page for notes
  169. X notes.xbm                  1   Bitmap for notes
  170. X patchlevel.h               1   source
  171. X 204 185 500 328 README
  172. XREADME for Notes v1.0.2
  173. X
  174. XNotes is an X11R5 note pad based on the Athena Widget set.
  175. XIt was developed on a Sun3 running SunOS3.5 and X11R5 using
  176. Xtwm as the window manager.  As yet it has not been tested on
  177. Xanything else.  I would appreciate reports from anyone
  178. Xrunning it elsewhere.
  179. X
  180. XThere's really nothing fancy about this program, it merely keeps
  181. Xa collection of notes in popups and saves them to a file
  182. Xcalled .notes in your home directory.  This .notes file not only
  183. Xsaves the contents of each note, but also the geometry of each
  184. Xnote.
  185. X
  186. XTheorectically there should be no limit to the number of notes
  187. Xthat you could have, but in practice - the list widget will run
  188. Xoff the bottom of your screen at some point...
  189. X
  190. Xbob@snuffy.dracut.ma.us (Bob Smith)
  191. X 205 184 500 550 TODO
  192. XTODO list for Notes
  193. X
  194. Xo    improve the man page
  195. X
  196. Xo    improve the state of comments in the source
  197. X
  198. Xo    Make Save button sensitive based on
  199. X    a.    adding a new note
  200. X    b.    deleting a note
  201. X    c.    changes in note text
  202. X    d.    change of note title
  203. X    e.    change of note geometry
  204. X    thereby allowing a form of feedback to the
  205. X    user regarding a need to save changes
  206. X
  207. Xo    along with being able to recognize and indicate
  208. X    when changes are in need of saving, allow
  209. X    specifying autosave on exit
  210. X
  211. Xo    Be able to specify an alternate notes file
  212. X
  213. Xo    Fix the list widget so that when it's about to
  214. X    hang off the screen, switch to multiple columns
  215. X    or add a scrollbar (pending a final decision here)
  216. X
  217. Xo    Find a better way to get a windows geometry while
  218. X    it's mapped and eliminate the need for H_OFS and
  219. X    V_OFS.
  220. END_OF_FILE
  221. if test 5942 -ne `wc -c <'.notes'`; then
  222.     echo shar: \"'.notes'\" unpacked with wrong size!
  223. fi
  224. # end of '.notes'
  225. fi
  226. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  227.   echo shar: Will not clobber existing file \"'CHANGES'\"
  228. else
  229. echo shar: Extracting \"'CHANGES'\" \(1819 characters\)
  230. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  231. XCHANGES to Notes for v1.0.1
  232. X
  233. Xo    Added a Button 2 translation to the `Dismiss' button
  234. X    of the Notes list that causes everything (any displayed
  235. X    notes and the note list) to be dismissed in one action.
  236. X
  237. Xo    Added a Button 2 translation to the `Save' button
  238. X    of the Notes list that causes a save operation to be
  239. X    performed and everything dismissed.
  240. X
  241. Xo    Added a Button 2 translation to the Notes list widget
  242. X    that will dismiss the associated note.
  243. X
  244. Xo    Did away with the quitAction function in main.c
  245. X    as it was unneeded.
  246. X
  247. Xo    Corrected read_notefile so that it wouldn't core
  248. X    dump in the absence of a HOME variable in the
  249. X    environment.
  250. X
  251. Xo    Put some speedup hacks into read_notefile,
  252. X    the entire file is now read in one pass instead of
  253. X    a line at a time.  Loads up appreciably faster!
  254. X
  255. Xo    Added some error checking around malloc's and realloc's,
  256. X    doesn't do anything graceful!  Just checks and dies
  257. X    if a problem is encountered.
  258. X
  259. Xo    Added a die() function, a quick way out for error
  260. X    conditions.
  261. X
  262. Xo    Added an AddCallback definition, just an easier way
  263. X    to do XtAddCallback...
  264. X
  265. Xo    Consolidated some code with the addition of the function
  266. X    destroy_widget() in callbacks.c
  267. X
  268. Xo    added desensitize_all and resensitize_all -- an effort
  269. X    in keeping the user from getting the thing in an odd
  270. X    state...  maybe
  271. X
  272. Xo    made more things work via callbacks
  273. X
  274. Xo    added H_OFFSET and H_OFFSET definitions in Imakefile
  275. X    for use by write_notefile() in main.c -- the purpose
  276. X    is to correct out the offsets injected by my window
  277. X    manager (twm) while a note is mapped to prevent the
  278. X    windows from 'creeping' when they are saved...  if
  279. X    someone knows a way to detect these offsets at run
  280. X    time I'd appreciate a better idea...
  281. X
  282. Xo    added a Button 3 translation to the startup_button
  283. X    to bring up a `quit' dialog box
  284. X
  285. Xo    ...and otherwise damn near rewrote the whole thing
  286. END_OF_FILE
  287. if test 1819 -ne `wc -c <'CHANGES'`; then
  288.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  289. fi
  290. # end of 'CHANGES'
  291. fi
  292. if test -f 'INSTALL' -a "${1}" != "-c" ; then 
  293.   echo shar: Will not clobber existing file \"'INSTALL'\"
  294. else
  295. echo shar: Extracting \"'INSTALL'\" \(997 characters\)
  296. sed "s/^X//" >'INSTALL' <<'END_OF_FILE'
  297. XINSTALL notes for Notes v1.0.1
  298. X
  299. XIn theory all you should have to do is:
  300. X
  301. X    xmkmf            to create the Makefile
  302. X    make                to build notes
  303. X    make install        to install notes in BINDIR
  304. X                and notes.xbm in BITMAPDIR
  305. X    make install.man    to install notes.man in MANDIR
  306. X
  307. XThings that may cause problems:
  308. X
  309. X    Notes uses a strdup() function that SunOS3.5 is
  310. X    missing.  A replacement is included in main.c with
  311. X    a feeble attempt made to properly 'ifdef' it in the
  312. X    Imakefile.  If you need it and the Makefile is
  313. X    generated without defining NEED_STRDUP, check and
  314. X    fix the Imakefile.
  315. X
  316. X    Various window managers do weird things to a windows
  317. X    x and y values when they are mapped.  This prompted the
  318. X    inclusion of settable parameters V_OFS and H_OFS in
  319. X    the Imakefile, which ultimately effects the definitions
  320. X    of V_OFFSET and H_OFFSET in main.c ...  You may have to
  321. X    experiment a bit by saving your .notes files
  322. X    repeatedly with notes mapped and checking the values
  323. X    in .notes to get it exactly right on your system.
  324. END_OF_FILE
  325. if test 997 -ne `wc -c <'INSTALL'`; then
  326.     echo shar: \"'INSTALL'\" unpacked with wrong size!
  327. fi
  328. # end of 'INSTALL'
  329. fi
  330. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  331.   echo shar: Will not clobber existing file \"'Imakefile'\"
  332. else
  333. echo shar: Extracting \"'Imakefile'\" \(858 characters\)
  334. sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  335. X/*
  336. X * change the definition of H_OFS and V_OFS to match what your
  337. X * window manager does to transient popups -- values given here
  338. X * are for twm with a borderWidth setting of 3 -- if you have no
  339. X * idea what I'm talking about, but you notice that saved notes seem
  340. X * to 'creep' away from their saved positions, then you should
  341. X * probably look into this...
  342. X */
  343. XH_OFS=2
  344. XV_OFS=24
  345. X
  346. X#if defined(SunArchitecture) && (OSMajorVersion == 3)
  347. X        DEFINES = -DNEED_STRDUP -DH_OFFSET=$(H_OFS) -DV_OFFSET=$(V_OFS)
  348. X#else
  349. X        DEFINES = -DH_OFFSET=$(H_OFS) -DV_OFFSET=$(V_OFS)
  350. X#endif
  351. X
  352. X /* CDEBUGFLAGS = -g */
  353. X           SRCS = main.c callbacks.c
  354. X           OBJS = main.o callbacks.o
  355. XLOCAL_LIBRARIES = XawClientLibs
  356. X        DEPLIBS = XawClientDepLibs
  357. X
  358. XComplexProgramTarget(notes)
  359. XInstallNonExec(notes.xbm, $(INCDIR)/bitmaps)
  360. X
  361. Xkit::
  362. X    makekit -iMANIFEST -oMANIFEST -h2
  363. END_OF_FILE
  364. if test 858 -ne `wc -c <'Imakefile'`; then
  365.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  366. fi
  367. # end of 'Imakefile'
  368. fi
  369. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  370.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  371. else
  372. echo shar: Extracting \"'MANIFEST'\" \(709 characters\)
  373. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  374. X   File Name        Archive #    Description
  375. X-----------------------------------------------------------
  376. X .notes                     1    A sample notes files
  377. X CHANGES                    1    A history of changes
  378. X INSTALL                    1    Installation instructions
  379. X Imakefile                  1    an Imake makefile
  380. X MANIFEST                   1    This shipping list
  381. X Makefile                   1    an Imake generated makefile
  382. X README                     1    Miscellaneous comments
  383. X callbacks.c                2    source
  384. X main.c                     1    source
  385. X notes.h                    1    source
  386. X notes.man                  1    Manual page for notes
  387. X notes.xbm                  1    Bitmap for notes
  388. X patchlevel.h               1    source
  389. END_OF_FILE
  390. if test 709 -ne `wc -c <'MANIFEST'`; then
  391.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  392. fi
  393. # end of 'MANIFEST'
  394. fi
  395. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  396.   echo shar: Will not clobber existing file \"'Makefile'\"
  397. else
  398. echo shar: Extracting \"'Makefile'\" \(12865 characters\)
  399. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  400. X# Makefile generated by imake - do not edit!
  401. X# $XConsortium: imake.c,v 1.65 91/07/25 17:50:17 rws Exp $
  402. X#
  403. X# The cpp used on this machine replaces all newlines and multiple tabs and
  404. X# spaces in a macro expansion with a single space.  Imake tries to compensate
  405. X# for this, but is not always successful.
  406. X#
  407. X
  408. X# -------------------------------------------------------------------------
  409. X# Makefile generated from "Imake.tmpl" and <Imakefile>
  410. X# $XConsortium: Imake.tmpl,v 1.139 91/09/16 08:52:48 rws Exp $
  411. X#
  412. X# Platform-specific parameters may be set in the appropriate <vendor>.cf
  413. X# configuration files.  Site-specific parameters should be set in the file
  414. X# site.def.  Full rebuilds are recommended if any parameters are changed.
  415. X#
  416. X# If your C preprocessor does not define any unique symbols, you will need
  417. X# to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  418. X# "make World" the first time).
  419. X#
  420. X
  421. X# -------------------------------------------------------------------------
  422. X# site-specific configuration parameters that need to come before
  423. X# the platform-specific parameters - edit site.def to change
  424. X
  425. X# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  426. X
  427. X# -------------------------------------------------------------------------
  428. X# platform-specific configuration parameters - edit sun.cf to change
  429. X
  430. X# platform:  $XConsortium: sun.cf,v 1.72.1.1 92/03/18 13:13:37 rws Exp $
  431. X
  432. X# operating system:         SunOS 3.5
  433. X
  434. X# -------------------------------------------------------------------------
  435. X# site-specific configuration parameters that go after
  436. X# the platform-specific parameters - edit site.def to change
  437. X
  438. X# site:  $XConsortium: site.def,v 1.2 91/07/30 20:26:44 rws Exp $
  439. X
  440. X            SHELL =  /bin/sh
  441. X
  442. X              TOP = .
  443. X      CURRENT_DIR = .
  444. X
  445. X               AR = ar clq
  446. X  BOOTSTRAPCFLAGS =  -DNOSTDHDRS
  447. X               CC = cc
  448. X               AS = as
  449. X
  450. X         COMPRESS = compress
  451. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  452. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  453. X          INSTALL = install
  454. X               LD = ld
  455. X             LINT = lint
  456. X      LINTLIBFLAG = -C
  457. X         LINTOPTS = -axz
  458. X               LN = ln -s
  459. X             MAKE = make
  460. X               MV = mv
  461. X               CP = cp
  462. X
  463. X           RANLIB = ranlib
  464. X  RANLIBINSTFLAGS =
  465. X
  466. X               RM = rm -f
  467. X            TROFF = psroff
  468. X         MSMACROS = -ms
  469. X              TBL = tbl
  470. X              EQN = eqn
  471. X     STD_INCLUDES =
  472. X  STD_CPP_DEFINES =  -DNOSTDHDRS
  473. X      STD_DEFINES =  -DNOSTDHDRS
  474. X EXTRA_LOAD_FLAGS =
  475. X  EXTRA_LIBRARIES =
  476. X             TAGS = ctags
  477. X
  478. X   SIGNAL_DEFINES = -DSIGNALRETURNSINT
  479. X
  480. X    PROTO_DEFINES =
  481. X
  482. X     INSTPGMFLAGS = -s
  483. X
  484. X     INSTBINFLAGS = -m 0755
  485. X     INSTUIDFLAGS = -m 4755
  486. X     INSTLIBFLAGS = -m 0644
  487. X     INSTINCFLAGS = -m 0444
  488. X     INSTMANFLAGS = -m 0444
  489. X     INSTDATFLAGS = -m 0444
  490. X    INSTKMEMFLAGS =  -g kmem -m 2755
  491. X
  492. X      CDEBUGFLAGS = -O
  493. X        CCOPTIONS = -f68881
  494. X
  495. X      ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  496. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(DEFINES)
  497. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  498. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  499. X
  500. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  501. X
  502. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(LOCAL_LDFLAGS)
  503. X
  504. X   LDCOMBINEFLAGS = -X -r
  505. X      DEPENDFLAGS =
  506. X
  507. X        MACROFILE = sun.cf
  508. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  509. X
  510. X    IMAKE_DEFINES =
  511. X
  512. X         IRULESRC = $(CONFIGDIR)
  513. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  514. X
  515. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  516. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  517. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  518. X
  519. X# -------------------------------------------------------------------------
  520. X# X Window System Build Parameters
  521. X# $XConsortium: Project.tmpl,v 1.138.1.1 92/11/11 09:49:19 rws Exp $
  522. X
  523. X# -------------------------------------------------------------------------
  524. X# X Window System make variables; this need to be coordinated with rules
  525. X
  526. X          PATHSEP = /
  527. X        USRLIBDIR = /usr/lib
  528. X           BINDIR = /usr/bin/X11
  529. X          INCROOT = /usr/include
  530. X     BUILDINCROOT = $(TOP)
  531. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  532. X      BUILDINCTOP = ..
  533. X           INCDIR = $(INCROOT)/X11
  534. X           ADMDIR = /usr/adm
  535. X           LIBDIR = $(USRLIBDIR)/X11
  536. X        CONFIGDIR = $(LIBDIR)/config
  537. X       LINTLIBDIR = $(USRLIBDIR)/lint
  538. X
  539. X          FONTDIR = $(LIBDIR)/fonts
  540. X         XINITDIR = $(LIBDIR)/xinit
  541. X           XDMDIR = $(LIBDIR)/xdm
  542. X           TWMDIR = $(LIBDIR)/twm
  543. X          MANPATH = /usr/man
  544. X    MANSOURCEPATH = $(MANPATH)/man
  545. X        MANSUFFIX = n
  546. X     LIBMANSUFFIX = 3
  547. X           MANDIR = $(MANSOURCEPATH)$(MANSUFFIX)
  548. X        LIBMANDIR = $(MANSOURCEPATH)$(LIBMANSUFFIX)
  549. X           NLSDIR = $(LIBDIR)/nls
  550. X        PEXAPIDIR = $(LIBDIR)/PEX
  551. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  552. X       FONTCFLAGS = -t
  553. X
  554. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  555. X
  556. X            IMAKE = imake
  557. X           DEPEND = makedepend
  558. X              RGB = rgb
  559. X
  560. X            FONTC = bdftopcf
  561. X
  562. X        MKFONTDIR = mkfontdir
  563. X        MKDIRHIER =  /bin/sh $(BINDIR)/mkdirhier
  564. X
  565. X        CONFIGSRC = $(TOP)/config
  566. X       DOCUTILSRC = $(TOP)/doc/util
  567. X        CLIENTSRC = $(TOP)/clients
  568. X          DEMOSRC = $(TOP)/demos
  569. X           LIBSRC = $(TOP)/lib
  570. X          FONTSRC = $(TOP)/fonts
  571. X       INCLUDESRC = $(TOP)/X11
  572. X        SERVERSRC = $(TOP)/server
  573. X          UTILSRC = $(TOP)/util
  574. X        SCRIPTSRC = $(UTILSRC)/scripts
  575. X       EXAMPLESRC = $(TOP)/examples
  576. X       CONTRIBSRC = $(TOP)/../contrib
  577. X           DOCSRC = $(TOP)/doc
  578. X           RGBSRC = $(TOP)/rgb
  579. X        DEPENDSRC = $(UTILSRC)/makedepend
  580. X         IMAKESRC = $(CONFIGSRC)
  581. X         XAUTHSRC = $(LIBSRC)/Xau
  582. X          XLIBSRC = $(LIBSRC)/X
  583. X           XMUSRC = $(LIBSRC)/Xmu
  584. X       TOOLKITSRC = $(LIBSRC)/Xt
  585. X       AWIDGETSRC = $(LIBSRC)/Xaw
  586. X       OLDXLIBSRC = $(LIBSRC)/oldX
  587. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  588. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  589. X      BDFTOSNFSRC = $(FONTSRC)/clients/bdftosnf
  590. X      BDFTOPCFSRC = $(FONTSRC)/clients/bdftopcf
  591. X     MKFONTDIRSRC = $(FONTSRC)/clients/mkfontdir
  592. X         FSLIBSRC = $(FONTSRC)/lib/fs
  593. X    FONTSERVERSRC = $(FONTSRC)/server
  594. X     EXTENSIONSRC = $(TOP)/extensions
  595. X         XILIBSRC = $(EXTENSIONSRC)/lib/xinput
  596. X        PEXLIBSRC = $(EXTENSIONSRC)/lib/PEXlib
  597. X      PHIGSLIBSRC = $(EXTENSIONSRC)/lib/PEX
  598. X
  599. X  DEPEXTENSIONLIB =  $(USRLIBDIR)/libXext.a
  600. X     EXTENSIONLIB =   -lXext
  601. X
  602. X          DEPXLIB = $(DEPEXTENSIONLIB)  $(USRLIBDIR)/libX11.a
  603. X             XLIB = $(EXTENSIONLIB)   -lX11
  604. X
  605. X      DEPXAUTHLIB =  $(USRLIBDIR)/libXau.a
  606. X         XAUTHLIB =   -lXau
  607. X      DEPXDMCPLIB =  $(USRLIBDIR)/libXdmcp.a
  608. X         XDMCPLIB =   -lXdmcp
  609. X
  610. X        DEPXMULIB =  $(USRLIBDIR)/libXmu.a
  611. X           XMULIB =   -lXmu
  612. X
  613. X       DEPOLDXLIB =  $(USRLIBDIR)/liboldX.a
  614. X          OLDXLIB =   -loldX
  615. X
  616. X      DEPXTOOLLIB =  $(USRLIBDIR)/libXt.a
  617. X         XTOOLLIB =   -lXt
  618. X
  619. X        DEPXAWLIB =  $(USRLIBDIR)/libXaw.a
  620. X           XAWLIB =   -lXaw
  621. X
  622. X        DEPXILIB =  $(USRLIBDIR)/libXi.a
  623. X           XILIB =   -lXi
  624. X
  625. X       DEPPEXLIB =  $(USRLIBDIR)/libPEX5.a
  626. X          PEXLIB =   -lPEX5
  627. X
  628. X        DEPPHIGSLIB =  $(USRLIBDIR)/libphigs.a
  629. X           PHIGSLIB =   -lphigs
  630. X
  631. X       DEPXBSDLIB =  $(USRLIBDIR)/libXbsd.a
  632. X          XBSDLIB =   -lXbsd
  633. X
  634. X LINTEXTENSIONLIB =  $(LINTLIBDIR)/llib-lXext.ln
  635. X         LINTXLIB =  $(LINTLIBDIR)/llib-lX11.ln
  636. X          LINTXMU =  $(LINTLIBDIR)/llib-lXmu.ln
  637. X        LINTXTOOL =  $(LINTLIBDIR)/llib-lXt.ln
  638. X          LINTXAW =  $(LINTLIBDIR)/llib-lXaw.ln
  639. X           LINTXI =  $(LINTLIBDIR)/llib-lXi.ln
  640. X          LINTPEX =  $(LINTLIBDIR)/llib-lPEX5.ln
  641. X        LINTPHIGS =  $(LINTLIBDIR)/llib-lphigs.ln
  642. X
  643. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  644. X
  645. X         DEPLIBS1 = $(DEPLIBS)
  646. X         DEPLIBS2 = $(DEPLIBS)
  647. X         DEPLIBS3 = $(DEPLIBS)
  648. X
  649. X# -------------------------------------------------------------------------
  650. X# Imake rules for building libraries, programs, scripts, and data files
  651. X# rules:  $XConsortium: Imake.rules,v 1.123 91/09/16 20:12:16 rws Exp $
  652. X
  653. X# -------------------------------------------------------------------------
  654. X# start of Imakefile
  655. X
  656. XH_OFS=2
  657. XV_OFS=24
  658. X
  659. X        DEFINES = -DNEED_STRDUP -DH_OFFSET=$(H_OFS) -DV_OFFSET=$(V_OFS)
  660. X
  661. X           SRCS = main.c callbacks.c
  662. X           OBJS = main.o callbacks.o
  663. XLOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  664. X        DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  665. X
  666. X PROGRAM = notes
  667. X
  668. Xall:: notes
  669. X
  670. Xnotes: $(OBJS) $(DEPLIBS)
  671. X     $(RM) $@
  672. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  673. X
  674. Xsaber_notes:: $(SRCS)
  675. X    # load $(ALLDEFINES) $(SRCS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  676. X
  677. Xosaber_notes:: $(OBJS)
  678. X    # load $(ALLDEFINES) $(OBJS) $(LOCAL_LIBRARIES) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  679. X
  680. Xinstall:: notes
  681. X     @if [ -d $(DESTDIR)$(BINDIR) ]; then set +x; \
  682. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); fi
  683. X    $(INSTALL) -c $(INSTPGMFLAGS)  notes $(DESTDIR)$(BINDIR)
  684. X
  685. Xinstall.man:: notes.man
  686. X     @if [ -d $(DESTDIR)$(MANDIR) ]; then set +x; \
  687. X    else (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); fi
  688. X    $(INSTALL) -c $(INSTMANFLAGS) notes.man $(DESTDIR)$(MANDIR)/notes.$(MANSUFFIX)
  689. X
  690. Xdepend::
  691. X    $(DEPEND) $(DEPENDFLAGS) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  692. X
  693. Xlint:
  694. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  695. Xlint1:
  696. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  697. X
  698. Xclean::
  699. X    $(RM) $(PROGRAM)
  700. X
  701. Xinstall:: notes.xbm
  702. X    $(INSTALL) -c $(INSTDATFLAGS) notes.xbm $(DESTDIR) $(INCDIR)/bitmaps
  703. X
  704. Xkit::
  705. X    makekit -iMANIFEST -oMANIFEST -h2
  706. X
  707. X# -------------------------------------------------------------------------
  708. X# common rules for all Makefiles - do not edit
  709. X
  710. Xemptyrule::
  711. X
  712. Xclean::
  713. X    $(RM_CMD) "#"*
  714. X
  715. XMakefile::
  716. X    -@if [ -f Makefile ]; then set -x; \
  717. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  718. X    else exit 0; fi
  719. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  720. X
  721. Xtags::
  722. X    $(TAGS) -w *.[ch]
  723. X    $(TAGS) -xw *.[ch] > TAGS
  724. X
  725. Xsaber:
  726. X    # load $(ALLDEFINES) $(SRCS)
  727. X
  728. Xosaber:
  729. X    # load $(ALLDEFINES) $(OBJS)
  730. X
  731. X# -------------------------------------------------------------------------
  732. X# empty rules for directories that do not have SUBDIRS - do not edit
  733. X
  734. Xinstall::
  735. X    @echo "install in $(CURRENT_DIR) done"
  736. X
  737. Xinstall.man::
  738. X    @echo "install.man in $(CURRENT_DIR) done"
  739. X
  740. XMakefiles::
  741. X
  742. Xincludes::
  743. X
  744. X# -------------------------------------------------------------------------
  745. X# dependencies generated by makedepend
  746. X
  747. X# DO NOT DELETE
  748. X
  749. Xmain.o: /usr/include/stdio.h /usr/include/strings.h /usr/include/malloc.h
  750. Xmain.o: /usr/include/sys/param.h /usr/include/machine/param.h
  751. Xmain.o: /usr/include/sys/signal.h /usr/include/sys/types.h
  752. Xmain.o: /usr/include/sys/sysmacros.h /usr/include/sys/stat.h
  753. Xmain.o: /usr/include/X11/Intrinsic.h /usr/include/X11/Xlib.h
  754. Xmain.o: /usr/include/X11/X.h /usr/include/X11/Xfuncproto.h
  755. Xmain.o: /usr/include/X11/Xosdefs.h /usr/include/X11/Xutil.h
  756. Xmain.o: /usr/include/X11/Xresource.h /usr/include/X11/Core.h
  757. Xmain.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h
  758. Xmain.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h
  759. Xmain.o: /usr/include/X11/StringDefs.h /usr/include/X11/Shell.h
  760. Xmain.o: /usr/include/X11/Xaw/Box.h /usr/include/X11/Xmu/Converters.h
  761. Xmain.o: /usr/include/X11/Xaw/Cardinals.h /usr/include/X11/Xaw/Command.h
  762. Xmain.o: /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h
  763. Xmain.o: /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/List.h notes.h
  764. Xmain.o: patchlevel.h
  765. Xcallbacks.o: /usr/include/stdio.h /usr/include/malloc.h
  766. Xcallbacks.o: /usr/include/X11/IntrinsicP.h /usr/include/X11/Intrinsic.h
  767. Xcallbacks.o: /usr/include/X11/Xlib.h /usr/include/sys/types.h
  768. Xcallbacks.o: /usr/include/sys/sysmacros.h /usr/include/X11/X.h
  769. Xcallbacks.o: /usr/include/X11/Xfuncproto.h /usr/include/X11/Xosdefs.h
  770. Xcallbacks.o: /usr/include/X11/Xutil.h /usr/include/X11/Xresource.h
  771. Xcallbacks.o: /usr/include/strings.h /usr/include/X11/Core.h
  772. Xcallbacks.o: /usr/include/X11/Composite.h /usr/include/X11/Constraint.h
  773. Xcallbacks.o: /usr/include/X11/Object.h /usr/include/X11/RectObj.h
  774. Xcallbacks.o: /usr/include/X11/CoreP.h /usr/include/X11/CompositeP.h
  775. Xcallbacks.o: /usr/include/X11/ConstrainP.h /usr/include/X11/ObjectP.h
  776. Xcallbacks.o: /usr/include/X11/RectObjP.h /usr/include/X11/StringDefs.h
  777. Xcallbacks.o: /usr/include/X11/Shell.h /usr/include/X11/Xaw/Box.h
  778. Xcallbacks.o: /usr/include/X11/Xmu/Converters.h
  779. Xcallbacks.o: /usr/include/X11/Xaw/Cardinals.h /usr/include/X11/Xaw/Command.h
  780. Xcallbacks.o: /usr/include/X11/Xaw/Label.h /usr/include/X11/Xaw/Simple.h
  781. Xcallbacks.o: /usr/include/X11/Xaw/Form.h /usr/include/X11/Xaw/List.h
  782. Xcallbacks.o: /usr/include/X11/Xaw/AsciiText.h /usr/include/X11/Xaw/Text.h
  783. Xcallbacks.o: /usr/include/X11/Xaw/TextSink.h /usr/include/X11/Xaw/TextSrc.h
  784. Xcallbacks.o: /usr/include/X11/Xaw/AsciiSrc.h /usr/include/X11/Xaw/AsciiSink.h
  785. Xcallbacks.o: notes.h patchlevel.h
  786. END_OF_FILE
  787. if test 12865 -ne `wc -c <'Makefile'`; then
  788.     echo shar: \"'Makefile'\" unpacked with wrong size!
  789. fi
  790. # end of 'Makefile'
  791. fi
  792. if test -f 'README' -a "${1}" != "-c" ; then 
  793.   echo shar: Will not clobber existing file \"'README'\"
  794. else
  795. echo shar: Extracting \"'README'\" \(880 characters\)
  796. sed "s/^X//" >'README' <<'END_OF_FILE'
  797. XREADME for Notes v1.0.1
  798. X
  799. XNotes is an X11R5 note pad based on the Athena Widget set.
  800. XIt was developed on a Sun3 running SunOS3.5 and X11R5 using
  801. Xtwm as the window manager.  As yet it has not been tested on
  802. Xanything else.  I would appreciate reports from anyone
  803. Xrunning it elsewhere.
  804. X
  805. XThere's really nothing fancy about this program, it merely keeps
  806. Xa collection of notes in popups and saves them to a file
  807. Xcalled .notes in your home directory.  This .notes file not only
  808. Xsaves the contents of each note, but also the geometry of each
  809. Xnote.
  810. X
  811. XTheorectically there should be no limit to the number of notes
  812. Xthat you could have, but in practice - the list widget will run
  813. Xoff the bottom of your screen at some point...  probably needs
  814. Xto be fixed...  One of these days...  A problem with slow startup
  815. Xin v1.0.0 has been cleaned up in this version.
  816. X
  817. Xbob@snuffy.dracut.ma.us (Bob Smith)
  818. END_OF_FILE
  819. if test 880 -ne `wc -c <'README'`; then
  820.     echo shar: \"'README'\" unpacked with wrong size!
  821. fi
  822. # end of 'README'
  823. fi
  824. if test -f 'main.c' -a "${1}" != "-c" ; then 
  825.   echo shar: Will not clobber existing file \"'main.c'\"
  826. else
  827. echo shar: Extracting \"'main.c'\" \(13099 characters\)
  828. sed "s/^X//" >'main.c' <<'END_OF_FILE'
  829. X/*
  830. X * main.c
  831. X *
  832. X * notes - by Bob Smith <bob@snuffy.dracut.ma.us>
  833. X */
  834. X
  835. X#include <stdio.h>
  836. X#include <strings.h>
  837. X#include <malloc.h>
  838. X#include <sys/param.h>        /* for MAXPATHLEN */
  839. X#include <sys/types.h>
  840. X#include <sys/stat.h>
  841. X
  842. X#include <X11/Intrinsic.h>
  843. X#include <X11/StringDefs.h>
  844. X#include <X11/Shell.h>
  845. X
  846. X#include <X11/Xaw/Box.h>
  847. X#include <X11/Xaw/Cardinals.h>
  848. X#include <X11/Xaw/Command.h>
  849. X#include <X11/Xaw/Label.h>
  850. X#include <X11/Xaw/Form.h>
  851. X#include <X11/Xaw/List.h>
  852. X
  853. X#include "notes.h"
  854. X
  855. X
  856. X/*
  857. X * Global Variables
  858. X */
  859. XXtAppContext app_con;
  860. XWidget toplevel;
  861. XWidget start_button;
  862. X
  863. XWidget **Notes;
  864. Xchar **Titles;
  865. X
  866. Xchar notefile[MAXPATHLEN];
  867. X
  868. X
  869. X/*
  870. X * forward declarations
  871. X */
  872. Xvoid die(), write_notefile(), sensitize_start_button();
  873. Xstatic void dismiss_all(), dismiss_note(), save_dismiss_all();
  874. Xstatic void version(), ask_quit(), desensitize_start_button();
  875. X
  876. X
  877. X/*
  878. X * external functions
  879. X */
  880. X/* in callbacks.c */
  881. Xextern void null(), show_list(), quit(), destroy_widget(), destroy_list();
  882. Xextern Widget *make_note_widget();
  883. X
  884. X
  885. X/*
  886. X * XtActionsRec actionTable
  887. X */
  888. Xstatic XtActionsRec actionTable[] = {
  889. X    { "null",                null },
  890. X    { "quit",                quit },
  891. X    { "ask_quit",            ask_quit },
  892. X    { "version",            version },
  893. X    { "dismiss_all",        dismiss_all },
  894. X    { "dismiss_note",        dismiss_note },
  895. X    { "save_dismiss_all",    save_dismiss_all },
  896. X};
  897. X
  898. X
  899. X/*
  900. X * fallback_resources
  901. X */
  902. Xstatic char *fallback_resources[] = {
  903. X    "notes.start_button.bitmap: notes.xbm",
  904. X    "*List.Columns: 1",
  905. X    "*input*translations: #override \\n\
  906. X        <Key>Return:            null() \\n\
  907. X        <Key>Tab:                null() \\n\
  908. X        Ctrl<Key>J:                null()",
  909. X    "*start_button*translations: #override \\n\
  910. X        <Key>q:                    quit() \\n\
  911. X        <Key>Q:                    quit() \\n\
  912. X        <Key>v:                    version() \\n\
  913. X        <Key>V:                    version() \\n\
  914. X        <Btn2Down>:                set() \\n\
  915. X        <Btn2Down>,<Btn2Up>:    version() reset() \\n\
  916. X        <Btn3Down>:                set() \\n\
  917. X        <Btn3Down>,<Btn3Up>:    ask_quit() reset()",
  918. X    "*Notes*dismiss_button*translations: #override \\n\
  919. X        <Btn2Down>:                set() \\n\
  920. X        <Btn2Down>,<Btn2Up>:    dismiss_all() reset()",
  921. X    "*Notes*save_button*translations: #override \\n\
  922. X        <Btn2Down>:                set() \\n\
  923. X        <Btn2Down>,<Btn2Up>:    save_dismiss_all() reset()",
  924. X    "*Notes*list*translations: #override \\n\
  925. X        <Btn2Down>:                Set() \\n\
  926. X        <Btn2Down>,<Btn2Up>:    dismiss_note() Unset()",
  927. X        NULL
  928. X};
  929. X
  930. X
  931. X#ifdef NEED_STRDUP
  932. X/*
  933. X * strdup ()
  934. X */
  935. Xchar *
  936. Xstrdup(s)
  937. X    char *s;
  938. X{
  939. X    char *t;
  940. X
  941. X    if ((t = malloc(strlen(s)+1)) == NULL)
  942. X        die("Malloc in strdup failed.");
  943. X    strcpy(t, s);
  944. X    return t;
  945. X}
  946. X#endif
  947. X
  948. X
  949. X/*
  950. X * die ()
  951. X */
  952. Xvoid
  953. Xdie(s)
  954. X    char *s;
  955. X{
  956. X    fprintf(stderr, "%s\n", s);
  957. X    fflush(stderr);
  958. X    quit();
  959. X}
  960. X
  961. X
  962. X/*
  963. X * dismiss_all ()
  964. X * dismiss all notes and the list widget
  965. X */
  966. Xstatic void
  967. Xdismiss_all(widget, client_data, call_data)
  968. X    Widget widget;
  969. X    XtPointer client_data, call_data;
  970. X{
  971. X    int i;
  972. X    XWindowAttributes atribs;
  973. X
  974. X    i = 0;
  975. X    while (Notes[i]) {
  976. X        XGetWindowAttributes(XtDisplay(*Notes[i]),
  977. X            XtWindow(*Notes[i]), &atribs);
  978. X        if (atribs.map_state != IsUnmapped) {
  979. X            XtPopdown(*Notes[i]);
  980. X            XtUnmapWidget(*Notes[i]);
  981. X        }
  982. X        i++;
  983. X    }
  984. X    destroy_list();
  985. X    sensitize_start_button();
  986. X}
  987. X
  988. X
  989. X/*
  990. X * save_dismiss_all ()
  991. X * save the notefile and dismiss all notes and the list
  992. X */
  993. Xstatic void
  994. Xsave_dismiss_all(widget, client_data, call_data)
  995. X    Widget widget;
  996. X    XtPointer client_data, call_data;
  997. X{
  998. X    write_notefile();
  999. X    dismiss_all();
  1000. X}
  1001. X
  1002. X
  1003. X/*
  1004. X * dismiss_note ()
  1005. X * dismiss a note
  1006. X */
  1007. Xstatic void
  1008. Xdismiss_note(widget, client_data, call_data)
  1009. X    Widget widget;
  1010. X    XtPointer client_data, call_data;
  1011. X{
  1012. X    XawListReturnStruct *item;
  1013. X    Widget w;
  1014. X    XWindowAttributes atribs;
  1015. X
  1016. X    item = XawListShowCurrent(widget);
  1017. X    if (item->list_index == -1)
  1018. X        return;
  1019. X
  1020. X    w = *Notes[item->list_index];
  1021. X    XGetWindowAttributes(XtDisplay(w), XtWindow(w), &atribs);
  1022. X
  1023. X    if (atribs.map_state != IsUnmapped) {
  1024. X        XtPopdown(w);
  1025. X        XtUnmapWidget(w);
  1026. X    }
  1027. X}
  1028. X
  1029. X
  1030. X/*
  1031. X * ask_quit()
  1032. X */
  1033. Xstatic void
  1034. Xask_quit(widget, client_data, call_data)
  1035. X    Widget widget;
  1036. X    XtPointer client_data, call_data;
  1037. X{
  1038. X    Widget popup, form, prompt;
  1039. X    Widget confirm_button, filler_box, cancel_button;
  1040. X    Dimension top_w, pop_w;
  1041. X    Position x, y;
  1042. X
  1043. X    desensitize_start_button();
  1044. X
  1045. X    popup = XtCreatePopupShell("Quit",
  1046. X        transientShellWidgetClass, toplevel,
  1047. X        NULL, ZERO);
  1048. X
  1049. X    form = XtCreateManagedWidget("form",
  1050. X        formWidgetClass, popup,
  1051. X        NULL, ZERO);
  1052. X
  1053. X    prompt = XtVaCreateManagedWidget("prompt",
  1054. X        labelWidgetClass, form,
  1055. X        XtNlabel, "Quit, Are you sure?",
  1056. X        XtNborderWidth, 0,
  1057. X        XtNtop, XawChainTop,
  1058. X        XtNbottom, XawChainTop,
  1059. X        XtNleft, XawChainLeft,
  1060. X        XtNright, XawChainLeft,
  1061. X        NULL);
  1062. X
  1063. X    confirm_button = XtVaCreateManagedWidget("confirm_button",
  1064. X        commandWidgetClass, form,
  1065. X        XtNlabel, "Yes",
  1066. X        XtNwidth, 64,
  1067. X        XtNfromVert, prompt,
  1068. X        XtNtop, XawChainBottom,
  1069. X        XtNbottom, XawChainBottom,
  1070. X        XtNleft, XawChainLeft,
  1071. X        XtNright, XawChainLeft,
  1072. X        NULL);
  1073. X        AddCallback(confirm_button, quit, NULL);
  1074. X
  1075. X    filler_box = XtVaCreateManagedWidget("filler_box",
  1076. X        boxWidgetClass, form,
  1077. X        XtNwidth, 64,
  1078. X        XtNborderWidth, 0,
  1079. X        XtNfromHoriz, confirm_button,
  1080. X        XtNfromVert, prompt,
  1081. X        XtNtop, XawChainBottom,
  1082. X        XtNbottom, XawChainBottom,
  1083. X        XtNleft, XawChainLeft,
  1084. X        XtNright, XawChainRight,
  1085. X        NULL);
  1086. X
  1087. X    cancel_button = XtVaCreateManagedWidget("cancel_button",
  1088. X        commandWidgetClass, form,
  1089. X        XtNlabel, "No",
  1090. X        XtNwidth, 64,
  1091. X        XtNfromHoriz, filler_box,
  1092. X        XtNfromVert, prompt,
  1093. X        XtNtop, XawChainBottom,
  1094. X        XtNbottom, XawChainBottom,
  1095. X        XtNleft, XawChainRight,
  1096. X        XtNright, XawChainRight,
  1097. X        NULL);
  1098. X        AddCallback(cancel_button, destroy_widget, NULL);
  1099. X        AddCallback(cancel_button, sensitize_start_button, NULL);
  1100. X
  1101. X    XtRealizeWidget(popup);
  1102. X
  1103. X    XtVaGetValues(toplevel, XtNwidth, &top_w, NULL);
  1104. X    XtVaGetValues(popup, XtNwidth, &pop_w, NULL);
  1105. X    XtTranslateCoords(toplevel, (top_w-pop_w)/2, 0, &x, &y);
  1106. X    XtVaSetValues(popup, XtNx, x, XtNy, y, NULL);
  1107. X
  1108. X    XtPopup(popup, XtGrabNone);
  1109. X}
  1110. X
  1111. X/*
  1112. X * sort_titles ()
  1113. X * sort the titles and return the new index of where widget
  1114. X * `j' ended up
  1115. X */
  1116. Xint
  1117. Xsort_titles(j)
  1118. X    int j;
  1119. X{
  1120. X    int i;
  1121. X    char *s;
  1122. X
  1123. X    i = 0;
  1124. X    while (Titles[i] && Titles[i+1]) {
  1125. X        if (strcmp(Titles[i], Titles[i+1]) > 0) {
  1126. X            if (j == i)
  1127. X                j++;
  1128. X            else
  1129. X                if (j == i+1)
  1130. X                    j--;
  1131. X            s = Titles[i];
  1132. X            Titles[i] = Titles[i+1];
  1133. X            Titles[i+1] = s;
  1134. X            s = (char *) Notes[i];
  1135. X            Notes[i] = Notes[i+1];
  1136. X            Notes[i+1] = (Widget *) s;
  1137. X            i = 0;
  1138. X        } else
  1139. X            i++;
  1140. X    }
  1141. X    return j;
  1142. X}
  1143. X
  1144. X
  1145. X/*
  1146. X * read_notefile ()
  1147. X * read the notefile and make a note widget for each note
  1148. X */
  1149. Xvoid
  1150. Xread_notefile()
  1151. X{
  1152. X    FILE *fp;
  1153. X    char title[80];
  1154. X    char *buffer, *s, *t;
  1155. X    int i, x, y, w, h;
  1156. X    char *getenv();
  1157. X    struct stat sbuf;
  1158. X
  1159. X    Notes = (Widget **) malloc(sizeof(char *));
  1160. X    Titles = (char **) malloc(sizeof(char *));
  1161. X    if (!Notes || !Titles)
  1162. X        die("Malloc in read_notefile failed.");
  1163. X    *Notes = NULL;
  1164. X    *Titles = NULL;
  1165. X
  1166. X    /*
  1167. X     * check the current directory, and then the HOME
  1168. X     * directory...  if there is no .notes file, free the
  1169. X     * temp buffer and get out of here leaving notefile
  1170. X     * pointing to the HOME directory
  1171. X     */
  1172. X    strcpy(notefile, NOTEFILE);
  1173. X    if ((fp = fopen(notefile, "r")) == NULL) {
  1174. X        if ((s = getenv("HOME")) == NULL)
  1175. X            return;
  1176. X        strcpy(notefile, s);
  1177. X        strcat(notefile, "/");
  1178. X        strcat(notefile, NOTEFILE);
  1179. X        if ((fp = fopen(notefile, "r")) == NULL)
  1180. X            return;
  1181. X    }
  1182. X
  1183. X    /*
  1184. X     * check the size of the notes file and allocate a buffer
  1185. X     * of appropriate size
  1186. X     */
  1187. X    if (fstat(fileno(fp), &sbuf) == 0) {
  1188. X        if ((buffer = malloc(sbuf.st_size+1)) == NULL) {
  1189. X            fclose(fp);
  1190. X            die("Malloc of buffer in read_notefile failed.");
  1191. X        }
  1192. X    } else {
  1193. X        fclose(fp);
  1194. X        die("Can't stat notes file.");
  1195. X    }
  1196. X
  1197. X    /*
  1198. X     * read the notes file into the temp buffer
  1199. X     */
  1200. X    if ((i = fread(buffer, sbuf.st_size, 1, fp)) != 1) {
  1201. X        fclose(fp);
  1202. X        die("Read error on notes file.");
  1203. X    }
  1204. X    buffer[sbuf.st_size] = '\0';
  1205. X    fclose(fp);
  1206. X
  1207. X    /*
  1208. X     * spin through the temp buffer and setup the initial
  1209. X     * state of the NoteStruct pointers...
  1210. X     */
  1211. X    s = buffer;
  1212. X    i = 0;
  1213. X    while (*s) {
  1214. X        if (*s == '\f') {
  1215. X            *s = '\0';
  1216. Xspeed_hack:;
  1217. X            i++;
  1218. X            Notes = (Widget **) realloc(Notes, (i+1)*sizeof(char *));
  1219. X            Titles = (char **) realloc(Titles, (i+1)*sizeof(char *));
  1220. X            if (!Notes || !Titles)
  1221. X                die("Realloc in read_notefile failed.");
  1222. X            s++;
  1223. X            if ((t = index(s, '\n')) == NULL)
  1224. X                die("Oop! No newline at end of title?");
  1225. X            else {
  1226. X                sscanf(s, "%d %d %d %d %[^\n]", &x, &y, &w, &h, title);
  1227. X                s = ++t;
  1228. X                if ((t = index(s, '\f')) != NULL) *t = '\0';
  1229. X                Notes[i-1] = make_note_widget(title, x, y, w, h, s);
  1230. X                Notes[i] = NULL;
  1231. X                Titles[i-1] = strdup(title);
  1232. X                Titles[i] = NULL;
  1233. X                if (t) {
  1234. X                    s = t;
  1235. X                    /* this is ugly, but it works...  */
  1236. X                    goto speed_hack;
  1237. X                }
  1238. X            }
  1239. X        } else
  1240. X            s++;
  1241. X    }
  1242. X    free(buffer);
  1243. X    (void) sort_titles(0);
  1244. X}
  1245. X
  1246. X
  1247. X/*
  1248. X * alloc_new_note ()
  1249. X * make a new note
  1250. X */
  1251. Xint
  1252. Xalloc_new_note(title)
  1253. X    char *title;
  1254. X{
  1255. X    int i;
  1256. X    Position top_w, x, y;
  1257. X
  1258. X    XtVaGetValues(toplevel, XtNwidth, &top_w, NULL);
  1259. X    XtTranslateCoords(toplevel, (top_w - 512)/2, 0, &x, &y);
  1260. X
  1261. X    i = 0;
  1262. X    while (Notes[i]) i++;
  1263. X    i++;
  1264. X    Notes = (Widget **) realloc(Notes, (i+1)*sizeof(char *));
  1265. X    Titles = (char **) realloc(Titles, (i+1)*sizeof(char *));
  1266. X    if (!Notes || !Titles)
  1267. X        die("Realloc in alloc_new_note failed.");
  1268. X    Notes[i-1] = make_note_widget(title, x, y, 500, 300, "");
  1269. X    Notes[i] = NULL;
  1270. X    Titles[i-1] = strdup(title);
  1271. X    Titles[i] = NULL;
  1272. X    return sort_titles(i-1);
  1273. X}
  1274. X
  1275. X
  1276. X/*
  1277. X * unalloc_note ()
  1278. X */
  1279. Xvoid
  1280. Xunalloc_note(widget)
  1281. X    Widget widget;
  1282. X{
  1283. X    int i;
  1284. X
  1285. X    i = 0;
  1286. X    while (Notes[i]) {
  1287. X        if (*Notes[i] == widget) {
  1288. X            while (Notes[i+1]) {
  1289. X                Notes[i] = Notes[i+1];
  1290. X                Titles[i] = Titles[i+1];
  1291. X                i++;
  1292. X            }
  1293. X            Notes[i] = NULL;
  1294. X            Titles[i] = NULL;
  1295. X            Notes = (Widget **) realloc(Notes, (i+1)*sizeof(char *));
  1296. X            Titles = (char **) realloc(Titles, (i+1)*sizeof(char *));
  1297. X            if (!Notes || !Titles)
  1298. X                die("Realloc in unalloc_note failed.");
  1299. X            return;
  1300. X        }
  1301. X        i++;
  1302. X    }
  1303. X}
  1304. X
  1305. X
  1306. X/*
  1307. X * write_notefile ()
  1308. X */
  1309. Xvoid
  1310. Xwrite_notefile()
  1311. X{
  1312. X    FILE *fp;
  1313. X    int i;
  1314. X    Dimension w, h;
  1315. X    Position x, y;
  1316. X    String title, text;
  1317. X    XWindowAttributes atribs;
  1318. X
  1319. X    if ((fp = fopen(notefile, "w")) == NULL)
  1320. X        return;
  1321. X
  1322. X    i = 0;
  1323. X    while (Notes[i]) {
  1324. X        XtVaGetValues(*Notes[i], XtNtitle, &title,
  1325. X            XtNx, &x, XtNy, &y, NULL);
  1326. X        XGetWindowAttributes(XtDisplay(*Notes[i]),
  1327. X            XtWindow(*Notes[i]), &atribs);
  1328. X        /*
  1329. X         * this hack is the only way I know for now of eliminating
  1330. X         * 'creeping' windows caused by the offset injected into
  1331. X         * the x and y values of a window when they're mapped by
  1332. X         * a window manager such as twm...  there's undoubtedly
  1333. X         * a more elegant approach, but I don't know how to
  1334. X         * do it yet! :-)
  1335. X         */
  1336. X        if (atribs.map_state != IsUnmapped) {
  1337. X            x -= H_OFFSET;
  1338. X            y -= V_OFFSET;
  1339. X        }
  1340. X        XtVaGetValues(XtNameToWidget(*Notes[i], "*note"),
  1341. X            XtNstring, &text, XtNwidth, &w, XtNheight, &h, NULL);
  1342. X        fprintf(fp, "\f%d %d %d %d %s\n%s", x, y, w, h, title, text);
  1343. X        i++;
  1344. X    }
  1345. X    fclose(fp);
  1346. X}
  1347. X
  1348. X
  1349. X/*
  1350. X * desensitize_start_button ()
  1351. X */
  1352. Xstatic void
  1353. Xdesensitize_start_button(widget, client_data, call_data)
  1354. X    Widget widget;
  1355. X    XtPointer client_data, call_data;
  1356. X{
  1357. X    Widget w;
  1358. X
  1359. X    w = XtNameToWidget(toplevel, "*start_button");
  1360. X    if (w)
  1361. X        XtVaSetValues(w, XtNsensitive, False, NULL);
  1362. X}
  1363. X
  1364. X
  1365. X/*
  1366. X * sensitize_start_button ()
  1367. X */
  1368. Xvoid
  1369. Xsensitize_start_button(widget, client_data, call_data)
  1370. X    Widget widget;
  1371. X    XtPointer client_data, call_data;
  1372. X{
  1373. X    Widget w;
  1374. X
  1375. X    w = XtNameToWidget(toplevel, "*start_button");
  1376. X    if (w)
  1377. X        XtVaSetValues(w, XtNsensitive, True, NULL);
  1378. X}
  1379. X
  1380. X/*
  1381. X * version ()
  1382. X */
  1383. Xstatic void
  1384. Xversion(widget, client_data, call_data)
  1385. X    Widget widget;
  1386. X    XtPointer client_data, call_data;
  1387. X{
  1388. X    Widget w, popup, form, prompt, dismiss_button;
  1389. X    static char tmp[BUFSIZ];
  1390. X    Position top_w, pop_w, x, y;
  1391. X
  1392. X    desensitize_start_button();
  1393. X
  1394. X    popup = XtCreatePopupShell("Version",
  1395. X        transientShellWidgetClass, toplevel,
  1396. X        NULL, ZERO);
  1397. X
  1398. X    form = XtCreateManagedWidget("form",
  1399. X        formWidgetClass, popup,
  1400. X        NULL, ZERO);
  1401. X
  1402. X    sprintf(tmp, "Notes v%d.%d.%d\nby %s",
  1403. X        VERSION, SUBVERSION, PATCHLEVEL, AUTHOR);
  1404. X    prompt = XtVaCreateManagedWidget("prompt",
  1405. X        labelWidgetClass, form,
  1406. X        XtNlabel, tmp,
  1407. X        XtNborderWidth, 0,
  1408. X        XtNtop, XawChainTop,
  1409. X        XtNbottom, XawChainTop,
  1410. X        XtNleft, XawChainLeft,
  1411. X        XtNright, XawChainLeft,
  1412. X        NULL);
  1413. X
  1414. X    dismiss_button = XtVaCreateManagedWidget("dismiss_button",
  1415. X        commandWidgetClass, form,
  1416. X        XtNlabel, "Dismiss",
  1417. X        XtNwidth, 64,
  1418. X        XtNfromVert, prompt,
  1419. X        XtNtop, XawChainBottom,
  1420. X        XtNbottom, XawChainBottom,
  1421. X        XtNleft, XawChainLeft,
  1422. X        XtNright, XawChainLeft,
  1423. X        NULL);
  1424. X        AddCallback(dismiss_button, destroy_widget, NULL);
  1425. X        AddCallback(dismiss_button, sensitize_start_button, NULL);
  1426. X
  1427. X    XtRealizeWidget(popup);
  1428. X
  1429. X    XtVaGetValues(toplevel, XtNwidth, &top_w, NULL);
  1430. X    XtVaGetValues(popup, XtNwidth, &pop_w, NULL);
  1431. X    XtTranslateCoords(toplevel, (top_w-pop_w)/2, 0, &x, &y);
  1432. X    XtVaSetValues(popup, XtNx, x, XtNy, y, NULL);
  1433. X
  1434. X    XtPopup(popup, XtGrabNone);
  1435. X}
  1436. X
  1437. X
  1438. X/*
  1439. X * main ()
  1440. X */
  1441. Xmain(argc, argv)
  1442. X    int argc;
  1443. X    char *argv[];
  1444. X{
  1445. X    Widget start_button;
  1446. X
  1447. X    toplevel = XtAppInitialize(&app_con, "notes",
  1448. X        NULL, ZERO,                /* options, option count */
  1449. X        &argc, argv,            /* command line options */
  1450. X        fallback_resources,        /* fallback resources */
  1451. X        NULL, ZERO);            /* other args */
  1452. X
  1453. X    XtAppAddActions(app_con, actionTable, XtNumber(actionTable));
  1454. X
  1455. X    start_button = XtCreateManagedWidget("start_button",
  1456. X        commandWidgetClass, toplevel,
  1457. X        NULL, ZERO);
  1458. X        AddCallback(start_button, desensitize_start_button, NULL);
  1459. X        AddCallback(start_button, show_list, NULL);
  1460. X
  1461. X    XtRealizeWidget(toplevel);
  1462. X    read_notefile();
  1463. X    XtAppMainLoop(app_con);
  1464. X}
  1465. END_OF_FILE
  1466. if test 13099 -ne `wc -c <'main.c'`; then
  1467.     echo shar: \"'main.c'\" unpacked with wrong size!
  1468. fi
  1469. # end of 'main.c'
  1470. fi
  1471. if test -f 'notes.h' -a "${1}" != "-c" ; then 
  1472.   echo shar: Will not clobber existing file \"'notes.h'\"
  1473. else
  1474. echo shar: Extracting \"'notes.h'\" \(341 characters\)
  1475. sed "s/^X//" >'notes.h' <<'END_OF_FILE'
  1476. X/*
  1477. X * notes.h
  1478. X *
  1479. X * notes - by Bob Smith <bob@snuffy.dracut.ma.us>
  1480. X */
  1481. X
  1482. X#include "patchlevel.h"
  1483. X
  1484. X#ifndef TRUE
  1485. X# define TRUE 1
  1486. X#endif
  1487. X#ifndef FALSE
  1488. X# define FALSE 0
  1489. X#endif
  1490. X
  1491. X#define NOTEFILE ".notes"
  1492. X
  1493. X#define XtGrandParent(w) XtParent(XtParent(w))
  1494. X
  1495. X#define AddCallback(w, callback, closure) \
  1496. X    XtAddCallback(w, XtNcallback, callback, closure)
  1497. END_OF_FILE
  1498. if test 341 -ne `wc -c <'notes.h'`; then
  1499.     echo shar: \"'notes.h'\" unpacked with wrong size!
  1500. fi
  1501. # end of 'notes.h'
  1502. fi
  1503. if test -f 'notes.man' -a "${1}" != "-c" ; then 
  1504.   echo shar: Will not clobber existing file \"'notes.man'\"
  1505. else
  1506. echo shar: Extracting \"'notes.man'\" \(968 characters\)
  1507. sed "s/^X//" >'notes.man' <<'END_OF_FILE'
  1508. X.TH NOTES 1 "October 1992" X11R5
  1509. X.SH NAME
  1510. Xnotes \- X window system notepad
  1511. X.SH SYNOPSIS
  1512. X.B notes
  1513. X[
  1514. X.I \-toolkitoptions ...
  1515. X]
  1516. X.SH DESCRIPTION
  1517. X.I notes
  1518. Xprovides a mechanism for manipulating on-screen notes.  Notes may be
  1519. Xdisplayed, edited, and saved.  In addition, any on-screen note may be
  1520. Xresized to any arbitrary size either when it is created or at a later time.
  1521. X.SH OPTIONS
  1522. X.PP
  1523. X.I notes
  1524. Xaccepts all of the standard X Toolkit command line options.
  1525. X.SH "FILES"
  1526. X~/.notes
  1527. X.PP
  1528. XWhen
  1529. X.I notes
  1530. Xfirst starts, it looks for a file called ``.notes'' in the current
  1531. Xdirectory.  If not found, it will then look in your HOME directory
  1532. Xfor this file.
  1533. X.SH BUGS
  1534. XThere is no indicator of unsaved changes.
  1535. XIf the system should go down while unsaved changes exist in a note
  1536. Xor notes, those changes will be lost.
  1537. X.PP
  1538. XThere is no way to specify an alternate notefile.
  1539. X.PP
  1540. XThis man page could use some help on the subject of useful
  1541. Xresources.
  1542. X.SH AUTHOR
  1543. XBob Smith, bob@snuffy.dracut.ma.us
  1544. END_OF_FILE
  1545. if test 968 -ne `wc -c <'notes.man'`; then
  1546.     echo shar: \"'notes.man'\" unpacked with wrong size!
  1547. fi
  1548. # end of 'notes.man'
  1549. fi
  1550. if test -f 'notes.xbm' -a "${1}" != "-c" ; then 
  1551.   echo shar: Will not clobber existing file \"'notes.xbm'\"
  1552. else
  1553. echo shar: Extracting \"'notes.xbm'\" \(3278 characters\)
  1554. sed "s/^X//" >'notes.xbm' <<'END_OF_FILE'
  1555. X#define notes_width 64
  1556. X#define notes_height 64
  1557. Xstatic char notes_bits[] = {
  1558. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff,
  1559. X   0xff, 0xff, 0xff, 0x3f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60,
  1560. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1561. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1562. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1563. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1564. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1565. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x40,
  1566. X   0x02, 0x00, 0xdc, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x58, 0xce,
  1567. X   0xe7, 0x78, 0x00, 0x40, 0x02, 0x00, 0x5c, 0x9b, 0xb1, 0x4d, 0x00, 0x40,
  1568. X   0x02, 0x00, 0xb4, 0xd9, 0xf8, 0x3d, 0x00, 0x40, 0x02, 0x00, 0xb6, 0xcd,
  1569. X   0x1e, 0x32, 0x00, 0x40, 0x02, 0x00, 0x36, 0x87, 0xf3, 0x1e, 0x00, 0x40,
  1570. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1571. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1572. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1573. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1574. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x7e, 0x00,
  1575. X   0x00, 0x7e, 0x00, 0x40, 0x02, 0x00, 0xc3, 0x00, 0x00, 0xc3, 0x00, 0x40,
  1576. X   0x02, 0x00, 0x99, 0x00, 0x00, 0x99, 0x00, 0x40, 0x02, 0x00, 0xdb, 0x00,
  1577. X   0x00, 0xdb, 0x00, 0x40, 0x06, 0x00, 0x5a, 0x00, 0x00, 0x5a, 0x00, 0x60,
  1578. X   0xfc, 0xff, 0xdb, 0xff, 0xff, 0xdb, 0xff, 0x3f, 0x00, 0x00, 0x18, 0x00,
  1579. X   0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00,
  1580. X   0xfc, 0xff, 0xdb, 0xff, 0xff, 0xdb, 0xff, 0x3f, 0x06, 0x00, 0x5a, 0x00,
  1581. X   0x00, 0x5a, 0x00, 0x60, 0x02, 0x00, 0xdb, 0x00, 0x00, 0xdb, 0x00, 0x40,
  1582. X   0x02, 0x00, 0x99, 0x00, 0x00, 0x99, 0x00, 0x40, 0x02, 0x00, 0xc3, 0x00,
  1583. X   0x00, 0xc7, 0x00, 0x40, 0x02, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x40,
  1584. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1585. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1586. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1587. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1588. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x36, 0x87,
  1589. X   0xf3, 0x1e, 0x00, 0x40, 0x02, 0x00, 0xb6, 0xcd, 0x1e, 0x32, 0x00, 0x40,
  1590. X   0x02, 0x00, 0xb4, 0xd9, 0xf8, 0x3d, 0x00, 0x40, 0x02, 0x00, 0x5c, 0x9b,
  1591. X   0xb1, 0x4d, 0x00, 0x40, 0x02, 0x00, 0x58, 0xce, 0xe7, 0x78, 0x00, 0x40,
  1592. X   0x02, 0x00, 0xdc, 0x80, 0x01, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1593. X   0x03, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1594. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1595. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1596. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00,
  1597. X   0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
  1598. X   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x06, 0x00, 0x00, 0x00,
  1599. X   0x00, 0x00, 0x00, 0x60, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3f,
  1600. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  1601. END_OF_FILE
  1602. if test 3278 -ne `wc -c <'notes.xbm'`; then
  1603.     echo shar: \"'notes.xbm'\" unpacked with wrong size!
  1604. fi
  1605. # end of 'notes.xbm'
  1606. fi
  1607. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  1608.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  1609. else
  1610. echo shar: Extracting \"'patchlevel.h'\" \(190 characters\)
  1611. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  1612. X/*
  1613. X * patchlevel.h
  1614. X *
  1615. X * notes - by Bob Smith <bob@snuffy.dracut.ma.us>
  1616. X */
  1617. X
  1618. X#define VERSION 1
  1619. X#define SUBVERSION 0
  1620. X#define PATCHLEVEL 2
  1621. X#define AUTHOR "Bob Smith <bob@snuffy.dracut.ma.us>"
  1622. END_OF_FILE
  1623. if test 190 -ne `wc -c <'patchlevel.h'`; then
  1624.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  1625. fi
  1626. # end of 'patchlevel.h'
  1627. fi
  1628. echo shar: End of archive 1 \(of 2\).
  1629. cp /dev/null ark1isdone
  1630. MISSING=""
  1631. for I in 1 2 ; do
  1632.     if test ! -f ark${I}isdone ; then
  1633.     MISSING="${MISSING} ${I}"
  1634.     fi
  1635. done
  1636. if test "${MISSING}" = "" ; then
  1637.     echo You have unpacked both archives.
  1638.     rm -f ark[1-9]isdone
  1639. else
  1640.     echo You still need to unpack the following archives:
  1641.     echo "        " ${MISSING}
  1642. fi
  1643. ##  End of shell archive.
  1644. exit 0
  1645. -- 
  1646. * Bob Smith          + mx: bob@snuffy.penfield.ny.us      *
  1647. * 838 Harmon Rd.     + uucp: ur-valhalla!snuffy!bob       *
  1648. * Penfield, NY 14526 + office|voice mail: +1 716 724-6186 *
  1649.  
  1650. exit 0 # Just in case...
  1651. -- 
  1652.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  1653. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  1654.  "It's intuitively obvious to the |
  1655.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1656.