home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / xalarm30 / patch1 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  27.0 KB

  1. Path: uunet!dtix!darwin.sura.net!mips!msi!dcmartin
  2. From: S.Marshall@sequent.cc.hull.ac.uk (Simon Marshall)
  3. Newsgroups: comp.sources.x
  4. Subject: v18i097: xalarm-3.04, Patch1, Part01/01
  5. Message-ID: <1992Aug27.154522.24791@msi.com>
  6. Date: 27 Aug 92 15:45:22 GMT
  7. References: <csx-18i097-xalarm-3.04@uunet.UU.NET>
  8. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  9. Organization: Molecular Simulations, Inc.
  10. Lines: 881
  11. Approved: dcmartin@msi.com
  12. Originator: dcmartin@fascet
  13.  
  14. Submitted-by: Simon Marshall <S.Marshall@sequent.cc.hull.ac.uk>
  15. Posting-number: Volume 18, Issue 97
  16. Archive-name: xalarm-3.04/patch1
  17. Patch-To: xalarm-3.04: Volume 18, Issue 7
  18.  
  19.      This is the patch file to make xalarm-3.05 from xalarm-3.04
  20.  
  21. You can see which version you already have by looking at patchlevel.h in the
  22. xalarm source directory, or, if you have xalarm, by:
  23.  
  24. % xalarm -version
  25. ------------------------------------------------------------------------------
  26. Changes from xalarm-3.04:
  27.  
  28. BUGFIXES
  29.   o Confirmation resource not ignored when resetting.
  30.   o Imakefile does not follow macro `,'s with a space.
  31.  
  32. CHANGES
  33.   o xmemo expects a message.
  34.  
  35. ADDITIONS
  36.   o Automatically gets colours with X11R5 customisation method.
  37.  
  38. OTHERS
  39.   o Can use other ways to find commands when configing.
  40.   o Easier to put colours in.
  41.   o Ported to more machines.
  42. ------------------------------------------------------------------------------
  43. To apply the patch, go into the xalarm source directory.  If you have a dumb
  44. patcher, you may first need to do:
  45.  
  46. % touch XAlarm-color.ad
  47.  
  48. To apply the patch:
  49.  
  50. % patch < thisfile
  51.  
  52. Then follow the "MAKING" section in the INSTALL file for making xalarm-3.05.
  53. ------------------------------------------------------------------------------
  54. Enjoy.
  55.  
  56.     Simon Marshall, Dept. Computer Science, University of Hull, HU6 7RX, UK
  57. ---------------------------- S.Marshall@Hull.ac.UK ---------------------------
  58.  
  59. Prereq: "3.04"
  60. diff -cr xalarm-3.04/patchlevel.h xalarm/patchlevel.h
  61. *** xalarm-3.04/patchlevel.h    Mon Jun 15 13:37:06 1992
  62. --- xalarm/patchlevel.h    Mon Jun 15 13:37:47 1992
  63. ***************
  64. *** 1 ****
  65. ! #define        XALARMVERSION    "3.04"
  66. --- 1 ----
  67. ! #define        XALARMVERSION    "3.05"
  68. diff -cr xalarm-3.04/ChangeLog xalarm/ChangeLog
  69. *** xalarm-3.04/ChangeLog    Mon Jun 15 13:37:05 1992
  70. --- xalarm/ChangeLog    Tue Aug 11 13:00:33 1992
  71. ***************
  72. *** 1,3 ****
  73. --- 1,36 ----
  74. + Tue Aug 11 12:59:51 1992  Simon Marshall  (sm at olympus)
  75. +     * Released xalarm-3.05.
  76. + Fri Jul 31 14:04:03 1992  Simon Marshall  (sm at olympus)
  77. +     * xalarm ignored the confirmation resource when the alarm is reset.
  78. +     From a bug report of sorts by Kirk Morgan.
  79. + Wed Jul 22 20:51:43 1992  Simon Marshall  (sm at dahlia)
  80. +     * More colours, easier to set.  Due to pester from Diab Jerius.
  81. + Sat Jul 18 14:02:58 1992  Simon Marshall  (sm at olympus)
  82. +     * More chance of config.1st working for SYSV machines.  With the help
  83. +     of Kirk Morgan.
  84. + Tue Jul 14 11:12:12 1992  Simon Marshall  (sm at olympus)
  85. +     * Added resource file for X11R5 colour customisation.
  86. +     * xmemo expects a message.
  87. + Fri Jul 10 14:31:28 1992  Simon Marshall  (sm at olympus)
  88. +     * Can use find (plus GNU find's locate) to get the location of
  89. +     commands, once again.
  90. + Thu Jun 25 14:28:25 1992  Simon Marshall  (sm at olympus)
  91. +     * Removed spaces after `,'s in Imakefile.  Post by Andreas Stolcke.
  92.   Mon Jun 15 12:57:31 1992  Simon Marshall  (sm at olympus)
  93.   
  94.       * Released xalarm-3.04.
  95. diff -cr xalarm-3.04/INSTALL xalarm/INSTALL
  96. *** xalarm-3.04/INSTALL    Mon Jun 15 13:37:05 1992
  97. --- xalarm/INSTALL    Fri Jul 17 13:10:03 1992
  98. ***************
  99. *** 12,21 ****
  100.   
  101.     If you have problems with compilation or use, look at the PROBLEMS file.
  102.   
  103. !     1.  If you don't want to use the Imakefile or the Makefile generated from
  104. !     it, try using Makefile.alt.
  105.   
  106. !     Check the flag settings in the Makefile of your choice.  If you are
  107.       using the Imakefile, generate a Makefile by "xmkmf".
  108.   
  109.       If you want to use a different notation or language for dates etc., see
  110. --- 12,22 ----
  111.   
  112.     If you have problems with compilation or use, look at the PROBLEMS file.
  113.   
  114. !     1.  If you don't want to use the Imakefile, try using Makefile.alt.  Do not
  115. !     use the Makefile supplied, unless you are in the Department of Computer
  116. !     Science, University of Hull, UK, and using a Sun called olympus...
  117.   
  118. !     Check the flag settings in the makefile of your choice.  If you are
  119.       using the Imakefile, generate a Makefile by "xmkmf".
  120.   
  121.       If you want to use a different notation or language for dates etc., see
  122. ***************
  123. *** 23,30 ****
  124.   
  125.       2.  Try making with "make".  Answer the questions.  Have a play.
  126.   
  127. !     3.  If you aren't installing (you selfish get), put the XAlarm.ad and
  128. !     XAlarm.ad+ in your ~/.xresources file.
  129.   
  130.       Otherwise, try "make install install.man".
  131.   
  132. --- 24,31 ----
  133.   
  134.       2.  Try making with "make".  Answer the questions.  Have a play.
  135.   
  136. !     3.  If you aren't installing (you selfish get), put the contents of
  137. !     XAlarm.ad and XAlarm.ad+ in your ~/.Xdefaults file.
  138.   
  139.       Otherwise, try "make install install.man".
  140.   
  141. diff -cr xalarm-3.04/Imakefile xalarm/Imakefile
  142. *** xalarm-3.04/Imakefile    Mon Jun 15 13:37:05 1992
  143. --- xalarm/Imakefile    Thu Jul 16 12:11:17 1992
  144. ***************
  145. *** 29,34 ****
  146. --- 29,36 ----
  147.   OBJS = alarm.o when.o warnings.o times.o dates.o file.o fns.o xalarm.o
  148.   SRCS = alarm.c when.c warnings.c times.c dates.c file.c fns.c xalarm.c
  149.   
  150. + # How we find commands.  Use WHICH, LOCATE or FIND.
  151. + WHICH= WHICH
  152.   MADE = test -f
  153.   
  154.   LOCAL_LIBRARIES = XawClientLibs
  155. ***************
  156. *** 37,51 ****
  157.   ComplexProgramTarget (xalarm)
  158.   
  159.   InstallAppDefaults (XAlarm)
  160. ! InstallMultipleFlags (xmemo xfortune xyow, $(BINDIR), $(INSTBINFLAGS))
  161. ! InstallManPage (xmemo, $(MANDIR))
  162. ! InstallManPage (xfortune, $(MANDIR))
  163. ! InstallManPage (xyow, $(MANDIR))
  164.   
  165.   includes:: fns.h
  166.   
  167.   fns.h:
  168. !     @./config.1st -quick fortune yow
  169.   
  170.   xmemo.man xyow.man xfortune.man:
  171.       echo ".so man"`echo ManSuffix`"/xalarm."`echo ManSuffix` > $@
  172. --- 39,54 ----
  173.   ComplexProgramTarget (xalarm)
  174.   
  175.   InstallAppDefaults (XAlarm)
  176. ! InstallAppDefaults (XAlarm-color)
  177. ! InstallMultipleFlags (xmemo xfortune xyow,$(BINDIR),$(INSTBINFLAGS))
  178. ! InstallManPage (xmemo,$(MANDIR))
  179. ! InstallManPage (xfortune,$(MANDIR))
  180. ! InstallManPage (xyow,$(MANDIR))
  181.   
  182.   includes:: fns.h
  183.   
  184.   fns.h:
  185. !     @./config.1st -quick $(WHICH) fortune yow
  186.   
  187.   xmemo.man xyow.man xfortune.man:
  188.       echo ".so man"`echo ManSuffix`"/xalarm."`echo ManSuffix` > $@
  189. ***************
  190. *** 58,64 ****
  191.       $(RM) xfortune xyow xmemo.man xyow.man xfortune.man fns.h .config
  192.   
  193.   config::
  194. !     @./config.1st -quick fortune yow
  195.       @xrdb -merge XAlarm.ad
  196.       @xrdb -merge XAlarm.ad+
  197.   
  198. --- 61,67 ----
  199.       $(RM) xfortune xyow xmemo.man xyow.man xfortune.man fns.h .config
  200.   
  201.   config::
  202. !     @./config.1st -quick $(WHICH) fortune yow
  203.       @xrdb -merge XAlarm.ad
  204.       @xrdb -merge XAlarm.ad+
  205.   
  206. diff -cr xalarm-3.04/Makefile.alt xalarm/Makefile.alt
  207. *** xalarm-3.04/Makefile.alt    Mon Jun 15 13:37:05 1992
  208. --- xalarm/Makefile.alt    Thu Jul 16 12:11:16 1992
  209. ***************
  210. *** 36,41 ****
  211. --- 36,43 ----
  212.   
  213.   
  214.   # Bits and bobs.
  215. + # How we find commands.  Use WHICH, LOCATE or FIND.
  216. + WHICH    = WHICH
  217.   MADE    = test -f
  218.   STRIP    = /bin/strip
  219.   CP    = /bin/cp
  220. ***************
  221. *** 73,78 ****
  222. --- 75,81 ----
  223.       $(MADE) xfortune && $(CP) xfortune $(X11BIN)
  224.       $(MADE) xyow && $(CP) xyow $(X11BIN)
  225.       $(CP) XAlarm.ad $(X11AD)/XAlarm
  226. +     $(CP) XAlarm-color.ad $(X11AD)/XAlarm-color
  227.   
  228.   install.man:
  229.       $(CP) xalarm.man $(X11MAN)/xalarm.$(MANSUFX)
  230. ***************
  231. *** 86,92 ****
  232.       
  233.   
  234.   fns.h:
  235. !     @./config.1st -quick fortune yow
  236.   
  237.   tags:
  238.       $(TAGS) $(SRCS)
  239. --- 89,95 ----
  240.       
  241.   
  242.   fns.h:
  243. !     @./config.1st -quick $(WHICH) fortune yow
  244.   
  245.   tags:
  246.       $(TAGS) $(SRCS)
  247. ***************
  248. *** 99,105 ****
  249.   
  250.   # Make sure the resources are loaded so xalarm can be used before installed etc.
  251.   config:
  252. !     @./config.1st -quick fortune yow
  253.       @xrdb -merge XAlarm.ad
  254.       @xrdb -merge XAlarm.ad+
  255.   
  256. --- 102,108 ----
  257.   
  258.   # Make sure the resources are loaded so xalarm can be used before installed etc.
  259.   config:
  260. !     @./config.1st -quick $(WHICH) fortune yow
  261.       @xrdb -merge XAlarm.ad
  262.       @xrdb -merge XAlarm.ad+
  263.   
  264. diff -cr xalarm-3.04/PROBLEMS xalarm/PROBLEMS
  265. *** xalarm-3.04/PROBLEMS    Mon Jun 15 13:37:05 1992
  266. --- xalarm/PROBLEMS    Tue Aug 11 12:51:28 1992
  267. ***************
  268. *** 66,72 ****
  269.       Imakefile or Makefile.alt on how to control how it is defined, using
  270.       compiler symbol defines.
  271.   
  272. !    11.    If you don't have "fortune" or "yow", you can't have "xfortune" or
  273.       "xyow".
  274.   
  275.       What about other programs, along with xyow and xfortune, can I make
  276. --- 66,82 ----
  277.       Imakefile or Makefile.alt on how to control how it is defined, using
  278.       compiler symbol defines.
  279.   
  280. !    11.    Make, config.1st or fullpath complain about "which" not being found.
  281. !     You can either answer the questions anyway, or change the definition of
  282. !     WHICH in the Imakefile or Makefile.alt to LOCATE or FIND.  Using FIND
  283. !     to find the location of commands is slow.
  284. !    12.    Other problems may be the result of you not building from a Bourne
  285. !     Shell (sh).  You might not even be able to run "xmkmf" without first
  286. !     invoking sh.  You may also need to run make with the `-C' option.  Your
  287. !     system is rubbish.
  288. !    13.    If you don't have "fortune" or "yow", you can't have "xfortune" or
  289.       "xyow".
  290.   
  291.       What about other programs, along with xyow and xfortune, can I make
  292. ***************
  293. *** 73,80 ****
  294.       these too?  To make the executable shell script "xyourprogram" in the
  295.       current directory, do:
  296.   
  297. !         % config.1st [-quick] yourprogram
  298.   
  299.       You will be asked about "ps" etc. again, but persevere.  You will have
  300.       to install both the executable and manual page yourself.  The manual
  301.       page would be an exact copy of xmemo.man.  If xmemo.man is not made:
  302. --- 83,92 ----
  303.       these too?  To make the executable shell script "xyourprogram" in the
  304.       current directory, do:
  305.   
  306. !         % config.1st [-quick] WHICH yourprogram
  307.   
  308. +     (See 11 under COMPILATION if you get complaints about "which".)
  309.       You will be asked about "ps" etc. again, but persevere.  You will have
  310.       to install both the executable and manual page yourself.  The manual
  311.       page would be an exact copy of xmemo.man.  If xmemo.man is not made:
  312. ***************
  313. *** 88,95 ****
  314.       1.    The alarm comes up with buttons overlayed etc., it's a mess.  The
  315.       resources aren't around and xalarm is almost completely controlled by
  316.       them.  Either install the resources (so others can also use xalarm), or
  317. !     include them in your ~/.xresources file.  When xalarm is first made,
  318. !     the resources are merged automatically so that you need not do this, at
  319.       least for that current session.
  320.   
  321.       2.    Xalarm does not use your user name as the alarm popup name, and
  322. --- 100,107 ----
  323.       1.    The alarm comes up with buttons overlayed etc., it's a mess.  The
  324.       resources aren't around and xalarm is almost completely controlled by
  325.       them.  Either install the resources (so others can also use xalarm), or
  326. !     include them in your ~/.Xdefaults file.  When xalarm is first made, the
  327. !     resources are merged automatically so that you need not do this, at
  328.       least for that current session.
  329.   
  330.       2.    Xalarm does not use your user name as the alarm popup name, and
  331. diff -cr xalarm-3.04/README xalarm/README
  332. *** xalarm-3.04/README    Mon Jun 15 13:37:06 1992
  333. --- xalarm/README    Sat Jul 18 14:16:17 1992
  334. ***************
  335. *** 82,88 ****
  336.     create xfortune and xyow (front ends to xmemo).  Note that they require the
  337.     fortune and yow programs respectively, they don't come with this.
  338.   
  339. !   See the file INSTALL and PROBLEMS for help with installation and problems.
  340.   
  341.   
  342.   THE END
  343. --- 82,96 ----
  344.     create xfortune and xyow (front ends to xmemo).  Note that they require the
  345.     fortune and yow programs respectively, they don't come with this.
  346.   
  347. !   xalarm can use X11R5's app-defaults file colour extension.  To get the
  348. !   benefit, put:
  349. ! *customization: -color
  350. !   in your ~/.Xdefaults file.
  351. !   See the file INSTALL for instructions on how to build xalarm, and PROBLEMS
  352. !   for help with installation and running.
  353.   
  354.   
  355.   THE END
  356. diff -cr xalarm-3.04/XAlarm-color.ad xalarm/XAlarm-color.ad
  357. *** xalarm-3.04/XAlarm-color.ad    Tue Jul 14 11:28:44 1992
  358. --- xalarm/XAlarm-color.ad    Wed Jul 22 20:39:52 1992
  359. ***************
  360. *** 0 ****
  361. --- 1,9 ----
  362. + #include "XAlarm"
  363. + XAlarm*background:            LightYellow
  364. + XAlarm*foreground:            IndianRed
  365. + XAlarm*Command.background:        IndianRed
  366. + XAlarm*Command.foreground:        LightYellow
  367. + XAlarm.When?.when.Dialog.background:    MidnightBlue
  368. + XAlarm.Warning!.warning.background:    HotPink
  369. + XAlarm.Alarm!.alarm.background:        DarkGreen
  370. diff -cr xalarm-3.04/XAlarm.ad xalarm/XAlarm.ad
  371. *** xalarm-3.04/XAlarm.ad    Mon Jun 15 13:37:06 1992
  372. --- xalarm/XAlarm.ad    Wed Jul 22 20:46:30 1992
  373. ***************
  374. *** 1,13 ****
  375. ! ! We can't surround this by "#ifdef COLOR ... #endif" and have it in
  376. ! ! .../lib/X11/app-defaults/XAlarm because stuff in there is not pre-processed
  377. ! ! with cpp like wot xrdb does.  Now why is that...?
  378. ! ! If you want colour, you have to stick this in your ~/.xresources file (where
  379. ! ! you can surround it with #ifdefs).
  380.   ! #ifdef COLOR
  381.   ! XAlarm*background:            LightYellow
  382.   ! XAlarm*foreground:            IndianRed
  383.   ! XAlarm*Command.background:        IndianRed
  384.   ! XAlarm*Command.foreground:        LightYellow
  385.   ! #endif
  386.   
  387.   XAlarm.confirm:                True
  388. --- 1,17 ----
  389. ! ! If you have X11R5, put this in your ~/.Xdefaults file:
  390. ! !
  391. ! ! *customization: -color
  392. ! !
  393. ! ! Otherwise put this in your ~/.Xdefaults file:
  394. ! !
  395.   ! #ifdef COLOR
  396.   ! XAlarm*background:            LightYellow
  397.   ! XAlarm*foreground:            IndianRed
  398.   ! XAlarm*Command.background:        IndianRed
  399.   ! XAlarm*Command.foreground:        LightYellow
  400. + ! XAlarm.When?.when.Dialog.background:    MidnightBlue
  401. + ! XAlarm.Warning!.warning.background:    HotPink
  402. + ! XAlarm.Alarm!.alarm.background:    DarkGreen
  403.   ! #endif
  404.   
  405.   XAlarm.confirm:                True
  406. ***************
  407. *** 19,24 ****
  408. --- 23,32 ----
  409.   XAlarm.alarmaudio:            bell
  410.   XAlarm.warningaudio:            bell
  411.   
  412. + XAlarm.When?.when.Dialog.background:    Black
  413. + XAlarm.Alarm!.alarm.background:        Black
  414. + XAlarm.Warning!.warning.background:    Black
  415.   XAlarm*background:            White
  416.   XAlarm*foreground:            Black
  417.   XAlarm*font:                -*-times-bold-r-*-*-14-*-*-*-p-*-iso8859-1
  418. ***************
  419. *** 41,47 ****
  420.   XAlarm*quit.label:            Quit
  421.   XAlarm*reset.label:            Reset
  422.   
  423. - XAlarm.Alarm!.alarm.background:                Black
  424.   XAlarm.Alarm!.alarm.message.cursor:            gumby
  425.   XAlarm.Alarm!.alarm.message.label:            Alarm Call!!!
  426.   XAlarm.Alarm!.alarm.message.font:            -*-times-bold-i-*-*-34-*-*-*-p-*-iso8859-1
  427. --- 49,54 ----
  428. ***************
  429. *** 63,81 ****
  430.   XAlarm.When?.when.background:            Black
  431.   XAlarm.When?.when.defaultDistance:        0
  432.   
  433. - XAlarm.When?.when.time.background:        Black
  434.   XAlarm.When?.when.time.ok.label:        Enter time
  435.   XAlarm.When?.when.time.value.translations:    #override <Key>Return: EnteredTime()
  436.   
  437. - XAlarm.When?.when.date.background:        Black
  438.   XAlarm.When?.when.date.ok.label:        Enter date
  439.   XAlarm.When?.when.date.value.translations:    #override <Key>Return: EnteredDate()
  440.   
  441. - XAlarm.When?.when.warnings.background:        Black
  442.   XAlarm.When?.when.warnings.ok.label:        Enter warnings
  443.   XAlarm.When?.when.warnings.value.translations:    #override <Key>Return: EnteredWarnings()
  444.   
  445. - XAlarm.When?.when.confirm.background:        Black
  446.   XAlarm.When?.when.confirm.value*font:        -*-times-bold-i-*-*-14-*-*-*-p-*-iso8859-1
  447.   XAlarm.When?.when.confirm.ok.label:        Confirm time
  448.   XAlarm.When?.when.confirm.cancel.label:        Re-edit
  449. --- 70,84 ----
  450. ***************
  451. *** 92,98 ****
  452.   XAlarm.When?*Command.top:        ChainBottom
  453.   XAlarm.When?*Command.bottom:        ChainBottom
  454.   
  455. - XAlarm.Warning!.warning.background:        Black
  456.   XAlarm.Warning!.warning.dismiss.label:        Dismiss
  457.   XAlarm.Warning!.warning.message.fromHoriz:    dismiss
  458.   XAlarm.Warning!.warning.message.cursor:        clock
  459. --- 95,100 ----
  460. diff -cr xalarm-3.04/XAlarm.ad+ xalarm/XAlarm.ad+
  461. *** xalarm-3.04/XAlarm.ad+    Mon Jun 15 13:37:06 1992
  462. --- xalarm/XAlarm.ad+    Wed Jul 22 21:00:31 1992
  463. ***************
  464. *** 1,19 ****
  465. ! ! We can't surround this by "#ifdef COLOR ... #endif" and have it in
  466. ! ! .../lib/X11/app-defaults/XAlarm because stuff in there is not pre-processed
  467. ! ! with cpp like wot xrdb does.  Now why is that...?
  468.   
  469. ! ! If you want colour, you have to stick this in your ~/.xresources file (where
  470. ! ! you can surround it with #ifdefs).
  471.   
  472. ! #ifdef COLOR
  473. ! XAlarm*background:            LightYellow
  474. ! XAlarm*foreground:            IndianRed
  475. ! XAlarm*Command.background:        IndianRed
  476. ! XAlarm*Command.foreground:        LightYellow
  477. ! #endif
  478.   
  479.   ! If you want a smaller button box in the alarm window, uncomment & try these
  480. ! ! for size in your ~/.xresources file:
  481.   
  482.   !XAlarm.Alarm!.alarm.buttons.snooze1.fromVert:        quit
  483.   ! This will vary depending on the button labels & font...
  484. --- 1,21 ----
  485. ! ! If you have X11R5, put this in your ~/.Xdefaults file:
  486.   
  487. ! *customization: -color
  488.   
  489. ! ! Otherwise put this in your ~/.Xdefaults file:
  490. ! !
  491. ! ! #ifdef COLOR
  492. ! ! XAlarm*background:            LightYellow
  493. ! ! XAlarm*foreground:            IndianRed
  494. ! ! XAlarm*Command.background:        IndianRed
  495. ! ! XAlarm*Command.foreground:        LightYellow
  496. ! ! XAlarm.When?.when.Dialog.background:    MidnightBlue
  497. ! ! XAlarm.Warning!.warning.background:    HotPink
  498. ! ! XAlarm.Alarm!.alarm.background:    DarkGreen
  499. ! ! #endif
  500.   
  501.   ! If you want a smaller button box in the alarm window, uncomment & try these
  502. ! ! for size in your ~/.Xdefaults file:
  503.   
  504.   !XAlarm.Alarm!.alarm.buttons.snooze1.fromVert:        quit
  505.   ! This will vary depending on the button labels & font...
  506. diff -cr xalarm-3.04/alarm.c xalarm/alarm.c
  507. *** xalarm-3.04/alarm.c    Mon Jun 15 13:37:06 1992
  508. --- xalarm/alarm.c    Thu Jul 30 22:11:05 1992
  509. ***************
  510. *** 29,35 ****
  511.   
  512.   
  513.   #define        NAMEFORMAT    "%s: %s@%s"
  514. ! #define        REALNAMEFORMAT    " (%s)"
  515.   #define        TIMEFORMAT    " (%d:%02d)"
  516.   
  517.   
  518. --- 29,35 ----
  519.   
  520.   
  521.   #define        NAMEFORMAT    "%s: %s@%s"
  522. ! #define        REALNAMEFORMAT    " <%s>"
  523.   #define        TIMEFORMAT    " (%d:%02d)"
  524.   
  525.   
  526. ***************
  527. *** 261,267 ****
  528.       }
  529.   
  530.       xalarm.dateout = DateToMilliSeconds (xalarm.datestr);
  531. !     xalarm.timeout = TimeToMilliSeconds (xalarm.timestr);
  532.   
  533.       PopupAndAsk ();
  534.   }
  535. --- 261,267 ----
  536.       }
  537.   
  538.       xalarm.dateout = DateToMilliSeconds (xalarm.datestr);
  539. !     xalarm.timeout = INVALID;
  540.   
  541.       PopupAndAsk ();
  542.   }
  543. diff -cr xalarm-3.04/config.1st xalarm/config.1st
  544. *** xalarm-3.04/config.1st    Mon Jun 15 13:37:06 1992
  545. --- xalarm/config.1st    Sat Jul 18 12:00:44 1992
  546. ***************
  547. *** 35,45 ****
  548.       mode=
  549.   fi
  550.   
  551. ! kill=`./fullpath $mode kill`
  552. ! ps=`./fullpath $mode ps`
  553. ! grep=`./fullpath $mode grep`
  554. ! colrm=`./fullpath $mode colrm`
  555.   
  556.   echo '/*
  557.    * Get xalarm pids:
  558.    *     list user processes | filter for xalarm | pid #s only | filter us out
  559. --- 35,65 ----
  560.       mode=
  561.   fi
  562.   
  563. ! which=$1
  564. ! shift
  565.   
  566. + kill=`./fullpath $mode $which kill`
  567. + ps=`./fullpath $mode $which ps`
  568. + grep=`./fullpath $mode $which grep`
  569. + colrm=`./fullpath $mode $which colrm`
  570. + # Try to guess the flags...
  571. + if ($grep -w guess $0 > /dev/null 2>&1); then
  572. +     grep="$grep -w"
  573. + fi
  574. + if ($ps -cx > /dev/null 2>&1); then
  575. +     ps="$ps -cx"
  576. + else
  577. +     ps="$ps -u"'$USER'
  578. + fi
  579. + if test -f "$colrm"; then
  580. +     colrm="$colrm 7"
  581. + else
  582. +     echo "Alternatively:"
  583. +     sed=`./fullpath $mode $which sed`
  584. +     colrm="$sed 's/[^ 0-9].*$//'"
  585. + fi
  586.   echo '/*
  587.    * Get xalarm pids:
  588.    *     list user processes | filter for xalarm | pid #s only | filter us out
  589. ***************
  590. *** 47,58 ****
  591.    * Where "us" is where the xalarm pid# running this will go.
  592.    *
  593.    * Normally we use ps(1), grep(1), colrm(1) and grep(1) again, respectively.
  594. !  * Typically:
  595.    *    "/bin/ps -cx | /bin/grep -w xalarm | /usr/ucb/colrm 7 | /bin/grep -v %d"
  596.    */
  597.   
  598.   #define    GETXALARMPIDS    \
  599. !     "'$ps' -cx | '$grep' -w xalarm | '$colrm' 7 | '$grep' -v %d"
  600.   
  601.   /*
  602.    * Full path of kill(1), typically "/bin/kill".
  603. --- 67,78 ----
  604.    * Where "us" is where the xalarm pid# running this will go.
  605.    *
  606.    * Normally we use ps(1), grep(1), colrm(1) and grep(1) again, respectively.
  607. !  * Typically for BSD:
  608.    *    "/bin/ps -cx | /bin/grep -w xalarm | /usr/ucb/colrm 7 | /bin/grep -v %d"
  609.    */
  610.   
  611.   #define    GETXALARMPIDS    \
  612. !     "'$ps' | '$grep' xalarm | '$colrm' | '$grep' -v %d"
  613.   
  614.   /*
  615.    * Full path of kill(1), typically "/bin/kill".
  616. ***************
  617. *** 65,71 ****
  618.   echo " "
  619.   
  620.   for program in $*; do
  621. !     progpath=`./fullpath $mode $program`
  622.       if test -f "$progpath"; then
  623.           echo '#!/bin/sh
  624.   exec xmemo -name x'$program' ${1+"$@"} "`'$progpath'`"' > x$program
  625. --- 85,91 ----
  626.   echo " "
  627.   
  628.   for program in $*; do
  629. !     progpath=`./fullpath $mode $which $program`
  630.       if test -f "$progpath"; then
  631.           echo '#!/bin/sh
  632.   exec xmemo -name x'$program' ${1+"$@"} "`'$progpath'`"' > x$program
  633. ***************
  634. *** 86,90 ****
  635.               echo "
  636.   Thank you.
  637.   ";;
  638. !     *)        ./config.1st $*;;
  639.   esac
  640. --- 106,110 ----
  641.               echo "
  642.   Thank you.
  643.   ";;
  644. !     *)        ./config.1st $which $*;;
  645.   esac
  646. diff -cr xalarm-3.04/fullpath xalarm/fullpath
  647. *** xalarm-3.04/fullpath    Mon Jun 15 13:37:06 1992
  648. --- xalarm/fullpath    Thu Jul 16 19:46:44 1992
  649. ***************
  650. *** 3,15 ****
  651.   PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/games:/usr/local/lib/emacs/etc:/usr/local/emacs/etc."
  652.   export PATH
  653.   
  654. ! case $1 in
  655.       -quick)    mode=-quick
  656.           shift;;
  657.       *)    mode=;;
  658.   esac
  659. ! loc=`which $1 2>/dev/null`
  660.   case "$loc" in
  661.       # For a Tek:
  662.       "command is /"*)
  663. --- 3,29 ----
  664.   PATH="$PATH:/bin:/usr/bin:/usr/local/bin:/usr/ucb:/usr/local:/usr/lbin:/etc:/usr/new:/usr/new/bin:/usr/nbin:/usr/games:/usr/local/lib/emacs/etc:/usr/local/emacs/etc."
  665.   export PATH
  666.   
  667. ! case "$1" in
  668.       -quick)    mode=-quick
  669.           shift;;
  670.       *)    mode=;;
  671.   esac
  672. ! which=$1
  673. ! shift
  674. ! case "$which" in
  675. !     WHICH)    loc=`which $1 2>/dev/null`;;
  676. !     LOCATE)    loc=`locate "*/$1" 2>/dev/null`;;
  677. !     FIND)    path=`echo $PATH | sed 's/:/ /g'`
  678. !         for i in $path; do
  679. !             loc=`find $i/ -name $1 -type f -print 2>/dev/null \
  680. !                 | head -1`
  681. !             if test "$loc"; then
  682. !                 break
  683. !             fi
  684. !         done;;
  685. !     *)    echo "fullpath: Cannot find command location with \"$which\"."
  686. !         exit;;
  687. ! esac
  688.   case "$loc" in
  689.       # For a Tek:
  690.       "command is /"*)
  691. diff -cr xalarm-3.04/when.c xalarm/when.c
  692. *** xalarm-3.04/when.c    Mon Jun 15 13:37:06 1992
  693. --- xalarm/when.c    Thu Jul 30 22:11:04 1992
  694. ***************
  695. *** 197,204 ****
  696.       else if (ISINVALID (xalarm.numwarnings) or
  697.            EDITED (xalarm.warningsstr, xalarm.getwtimewidget))
  698.       Popup (xalarm.getwtimewidget, WARNINGINSTRUCTIONS);
  699. !     else
  700.       PopupAndConfirm ();
  701.   }
  702.   
  703.   
  704. --- 197,206 ----
  705.       else if (ISINVALID (xalarm.numwarnings) or
  706.            EDITED (xalarm.warningsstr, xalarm.getwtimewidget))
  707.       Popup (xalarm.getwtimewidget, WARNINGINSTRUCTIONS);
  708. !     else if (xalarm.confirm)
  709.       PopupAndConfirm ();
  710. +     else
  711. +     Confirmed ((Widget) NULL, (XtPointer) NULL, (XtPointer) NULL);
  712.   }
  713.   
  714.   
  715. diff -cr xalarm-3.04/xalarm.c xalarm/xalarm.c
  716. *** xalarm-3.04/xalarm.c    Mon Jun 15 13:37:07 1992
  717. --- xalarm/xalarm.c    Tue Jun 30 10:59:05 1992
  718. ***************
  719. *** 196,204 ****
  720.   {
  721.       ApplData   data;
  722.   
  723. !     xalarm.toplevel = XtAppInitialize (&xalarm.appcon, "XAlarm",
  724. !                        options, XtNumber (options), &argc, argv,
  725. !                        (String *) NULL, (ArgList) NULL, 0);
  726.   
  727.       XtGetApplicationResources (xalarm.toplevel, &data, resources, XtNumber (resources),
  728.                      (ArgList) NULL, 0);
  729. --- 196,204 ----
  730.   {
  731.       ApplData   data;
  732.   
  733. !     xalarm.toplevel = XtVaAppInitialize (&xalarm.appcon, "XAlarm",
  734. !                      options, XtNumber (options), &argc, argv,
  735. !                      (String *) NULL, NULL);
  736.   
  737.       XtGetApplicationResources (xalarm.toplevel, &data, resources, XtNumber (resources),
  738.                      (ArgList) NULL, 0);
  739. diff -cr xalarm-3.04/xalarm.h xalarm/xalarm.h
  740. *** xalarm-3.04/xalarm.h    Mon Jun 15 13:37:07 1992
  741. --- xalarm/xalarm.h    Fri Jul 10 18:20:38 1992
  742. ***************
  743. *** 209,216 ****
  744. --- 209,220 ----
  745.   #define        SUMTIMEOUTS(a, b) \
  746.       (unsigned long) (((b) < 0) ? (a) - (unsigned long) (-b) : (a) + (unsigned long) (b))
  747.   
  748. + #if not defined (MAX)
  749.   #define        MAX(x, y)    ((x) > (y) ? (x) : (y))
  750. + #endif
  751. + #if not defined (MIN)
  752.   #define        MIN(x, y)    ((x) < (y) ? (x) : (y))
  753. + #endif
  754.   
  755.   #define        STREQUAL(a, b)    (strncmp ((a), (b), strlen (b)) == 0)
  756.   #define        ERRORIS(error)    (STREQUAL (xalarm.errormessage, error))
  757. diff -cr xalarm-3.04/xalarm.man xalarm/xalarm.man
  758. *** xalarm-3.04/xalarm.man    Mon Jun 15 13:37:07 1992
  759. --- xalarm/xalarm.man    Wed Jul 22 21:03:58 1992
  760. ***************
  761. *** 16,22 ****
  762.   [-\fItoolkitoption\fP ...] [-option ...] [message_text]
  763.   .LP
  764.   .B xmemo
  765. ! [-\fItoolkitoption\fP ...] [-option ...] [message_text]
  766.   .LP
  767.   .B xfortune
  768.   [-\fItoolkitoption\fP ...] [-option ...]
  769. --- 16,22 ----
  770.   [-\fItoolkitoption\fP ...] [-option ...] [message_text]
  771.   .LP
  772.   .B xmemo
  773. ! [-\fItoolkitoption\fP ...] [-option ...] message_text
  774.   .LP
  775.   .B xfortune
  776.   [-\fItoolkitoption\fP ...] [-option ...]
  777. ***************
  778. *** 812,823 ****
  779.   .I xalarm:
  780.   .PP
  781.   .nf
  782. !     ! For some nice colours...
  783.       XAlarm*background:            LightYellow
  784.       XAlarm*foreground:            IndianRed
  785.       XAlarm*Command.background:        IndianRed
  786.       XAlarm*Command.foreground:        LightYellow
  787. !     ! But this is what you normally get...
  788.       XAlarm*background:            White
  789.       XAlarm*foreground:            Black
  790.       XAlarm*Command.background:        Black
  791. --- 812,828 ----
  792.   .I xalarm:
  793.   .PP
  794.   .nf
  795. !     ! For some nice colours...  If you have X11R5:
  796. !     *customization:                -color
  797. !     ! Otherwise:
  798.       XAlarm*background:            LightYellow
  799.       XAlarm*foreground:            IndianRed
  800.       XAlarm*Command.background:        IndianRed
  801.       XAlarm*Command.foreground:        LightYellow
  802. !     XAlarm.When?.when.Dialog.background:    MidnightBlue
  803. !     XAlarm.Warning!.warning.background:    HotPink
  804. !     XAlarm.Alarm!.alarm.background:        DarkGreen
  805. !     ! This is what you normally get...
  806.       XAlarm*background:            White
  807.       XAlarm*foreground:            Black
  808.       XAlarm*Command.background:        Black
  809. ***************
  810. *** 896,901 ****
  811. --- 901,913 ----
  812.   .I xalarm
  813.   to look for alarms to set.
  814.   .TP 8
  815. + .B USER
  816. + The user's login name.  This may be used by
  817. + .I xalarm
  818. + when looking for the user's name for the alarm title, or the user's
  819. + .I xalarm
  820. + processes.
  821. + .TP 8
  822.   .B HOME
  823.   The user's home directory.  This may be used by
  824.   .I xalarm
  825. ***************
  826. *** 1097,1105 ****
  827.   Stefan Haenssgen, Informatik Rechnerabteilung, University of Karlsruhe, for
  828.   their help with ideas, comments and code, in the making of
  829.   .I xalarm
  830. ! version 3.03.  Thanks also to Paul Moore for his help in porting
  831.   .I xalarm
  832. ! for version 3.04.
  833.   
  834.   For getting version 3 from version 2 in the first place, thanks have to go to
  835.   Bill Leonard, Harris Computer Systems Division, Florida, for harassing me with
  836. --- 1109,1118 ----
  837.   Stefan Haenssgen, Informatik Rechnerabteilung, University of Karlsruhe, for
  838.   their help with ideas, comments and code, in the making of
  839.   .I xalarm
  840. ! version 3.03.  Thanks also to Paul Moore and Kirk Morgan for their help in
  841. ! porting
  842.   .I xalarm
  843. ! for versions 3.04 and 3.05.
  844.   
  845.   For getting version 3 from version 2 in the first place, thanks have to go to
  846.   Bill Leonard, Harris Computer Systems Division, Florida, for harassing me with
  847. diff -cr xalarm-3.04/xmemo xalarm/xmemo
  848. *** xalarm-3.04/xmemo    Mon Jun 15 13:37:07 1992
  849. --- xalarm/xmemo    Tue Jul 14 15:26:18 1992
  850. ***************
  851. *** 1,3 ****
  852.   #!/bin/sh
  853. ! exec xalarm -time now -date today -noconfirm -nowarn -nopester \
  854. !     -name xmemo ${1+"$@"}
  855. --- 1,7 ----
  856.   #!/bin/sh
  857. ! if test $# -eq 0; then
  858. !     echo "What's the message?"
  859. ! else
  860. !     exec xalarm -time now -date today -noconfirm -nowarn -nopester \
  861. !         -name xmemo ${1+"$@"}
  862. ! fi
  863.  
  864. -- 
  865. Senior Systems Scientist        mail: dcmartin@msi.com
  866. Molecular Simulations, Inc.        uucp: uunet!dcmartin
  867. 796 North Pastoria Avenue        at&t: 408/522-9236
  868. Sunnyvale, California 94086        fax: 408/732-0831
  869.