home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume18 / xalarm30 / part01 < prev    next >
Encoding:
Text File  |  1992-07-08  |  50.6 KB  |  1,502 lines

  1. Newsgroups: comp.sources.x
  2. Path: uunet!darwin.sura.net!mips!msi!dcmartin
  3. From: Simon Marshall <S.Marshall@sequent.cc.hull.ac.uk>
  4. Subject: v18i007: Xalarm-3.04 (REPOST), Part01/04
  5. Message-ID: <csx-18i007-xalarm-3.04@uunet.UU.NET>
  6. Originator: dcmartin@fascet
  7. Sender: dcmartin@msi.com (David C. Martin - Moderator)
  8. Organization: Molecular Simulations, Inc.
  9. Date: Thu, 9 Jul 1992 13:05:29 GMT
  10. Approved: dcmartin@msi.com
  11. Lines: 1489
  12.  
  13. Submitted-by: Simon Marshall <S.Marshall@sequent.cc.hull.ac.uk>
  14. Posting-number: Volume 18, Issue 7
  15. Archive-name: xalarm-3.04/part01
  16.  
  17.   xalarm is an interactive alarm clock analogous to a combination of leave(1)
  18.   and calendar(1), only much more powerful.
  19.  
  20.   You can set the alarm either by command line options, or by entering the time
  21.   using the popup window.  The time and date formats are quite flexible and
  22.   natural.  At the appropriate time, xalarm pops up a window to tell you that
  23.   your time is up.  You can tell xalarm to pop up warning windows at specified
  24.   times before the alarm is to trigger in order to warn you of the impending
  25.   alarm.
  26.  
  27. #!/bin/sh
  28. # This is a shell archive (produced by shar 3.50)
  29. # To extract the files from this archive, save it to a file, remove
  30. # everything above the "!/bin/sh" line above, and type "sh file_name".
  31. #
  32. # made 07/09/1992 12:22 UTC by dcmartin@fascet
  33. # Source directory /home/fascet/dcmartin/csx/src/xalarm/xalarm
  34. #
  35. # existing files will NOT be overwritten unless -c is specified
  36. #
  37. # This is part 1 of a multipart archive                                    
  38. # do not concatenate these parts, unpack them in order with /bin/sh        
  39. #
  40. # This shar contains:
  41. # length  mode       name
  42. # ------ ---------- ------------------------------------------
  43. #    827 -rw-r--r-- COPYRIGHT
  44. #  15067 -rw-r--r-- ChangeLog
  45. #   1452 -rw-r--r-- INSTALL
  46. #   2472 -rw-r--r-- Imakefile
  47. #  10730 -rw-r--r-- Makefile
  48. #   3717 -rw-r--r-- Makefile.alt
  49. #   6606 -rw-r--r-- PROBLEMS
  50. #   4281 -rw-r--r-- README
  51. #   3684 -rw-r--r-- XAlarm.ad
  52. #   1165 -rw-r--r-- XAlarm.ad+
  53. #   7396 -rw-r--r-- alarm.c
  54. #   2498 -rwxr-xr-x config.1st
  55. #  10134 -rw-r--r-- dates.c
  56. #   2064 -rw-r--r-- dates.h
  57. #   8441 -rw-r--r-- file.c
  58. #  18097 -rw-r--r-- fns.c
  59. #    850 -rwxr-xr-x fullpath
  60. #     30 -rw-r--r-- patchlevel.h
  61. #   5094 -rw-r--r-- times.c
  62. #   5720 -rw-r--r-- warnings.c
  63. #  12351 -rw-r--r-- when.c
  64. #  10665 -rw-r--r-- xalarm.c
  65. #   6981 -rw-r--r-- xalarm.h
  66. #  33900 -rw-r--r-- xalarm.man
  67. #     98 -rwxr-xr-x xmemo
  68. #
  69. if test -r _shar_seq_.tmp; then
  70.     echo 'Must unpack archives in sequence!'
  71.     echo Please unpack part `cat _shar_seq_.tmp` next
  72.     exit 1
  73. fi
  74. # ============= COPYRIGHT ==============
  75. if test -f 'COPYRIGHT' -a X"$1" != X"-c"; then
  76.     echo 'x - skipping COPYRIGHT (File already exists)'
  77.     rm -f _shar_wnt_.tmp
  78. else
  79. > _shar_wnt_.tmp
  80. echo 'x - extracting COPYRIGHT (Text)'
  81. sed 's/^X//' << 'SHAR_EOF' > 'COPYRIGHT' &&
  82. X      Copyright (c) 1991, 1992 by Simon Marshall, University of Hull, UK
  83. X
  84. X           If you still end up late, don't blame me!
  85. X                       
  86. X  Permission to use, copy, modify, distribute, and sell this software and its
  87. X       documentation for any purpose and without fee is hereby granted,
  88. X    provided that the above copyright notice appear in all copies and that
  89. X    both that copyright notice and this permission notice appear in
  90. X               supporting documentation.
  91. X                       
  92. X  This software is provided AS IS with no warranties of any kind.  The author
  93. X    shall have no liability with respect to the infringement of copyrights,
  94. X     trade secrets or any patents by this file or any part thereof.  In no
  95. X      event will the author be liable for any lost revenue or profits or
  96. X          other special, indirect and consequential damages.
  97. SHAR_EOF
  98. chmod 0644 COPYRIGHT ||
  99. echo 'restore of COPYRIGHT failed'
  100. Wc_c="`wc -c < 'COPYRIGHT'`"
  101. test 827 -eq "$Wc_c" ||
  102.     echo 'COPYRIGHT: original size 827, current size' "$Wc_c"
  103. rm -f _shar_wnt_.tmp
  104. fi
  105. # ============= ChangeLog ==============
  106. if test -f 'ChangeLog' -a X"$1" != X"-c"; then
  107.     echo 'x - skipping ChangeLog (File already exists)'
  108.     rm -f _shar_wnt_.tmp
  109. else
  110. > _shar_wnt_.tmp
  111. echo 'x - extracting ChangeLog (Text)'
  112. sed 's/^X//' << 'SHAR_EOF' > 'ChangeLog' &&
  113. Mon Jun 15 12:57:31 1992  Simon Marshall  (sm at olympus)
  114. X
  115. X    * Released xalarm-3.04.
  116. X
  117. Tue May 26 20:49:31 1992  Simon Marshall  (sm at olympus)
  118. X
  119. X    * Daemon extracts display info from command line args.  From a bug
  120. X    report of sorts by Jay Hersh.  Ditto for restarting.
  121. X
  122. Fri May 22 20:07:53 1992  Simon Marshall  (sm at olympus)
  123. X
  124. X    * Warnings not updated as the alarm triggers.
  125. X
  126. X    * Fullpath accepts path directory as well as full path.  Idea from Ned
  127. X    Danieley.
  128. X
  129. Fri May 15 19:59:20 1992  Simon Marshall  (sm at olympus)
  130. X
  131. X    * Explicitly moves to the end of the file before saving; solves the
  132. X    occasional losing of information when many xalarms write to the same
  133. X    file.
  134. X
  135. Tue May 12 13:41:19 1992  Simon Marshall  (sm at olympus)
  136. X
  137. X    * Uses fcntl() rather than flock(), and can use lockf() too.
  138. X
  139. X    * Can use un/link() method as an alternative to rename().
  140. X
  141. Wed May  6 09:52:43 1992  Simon Marshall  (sm at olympus)
  142. X
  143. X    * Certain servers seem to require all parts of the XLFD explicitly, and
  144. X    the iso number specified in case PostScript fonts are around.  From
  145. X    Andreas Stolcke.
  146. X
  147. Sat May  2 15:24:10 1992  Simon Marshall  (sm at olympus)
  148. X
  149. X    * Does not remove "saved" information from confirmation popup on minute
  150. X    change.
  151. X
  152. Wed Apr 29 18:53:28 1992  Simon Marshall  (sm at olympus)
  153. X
  154. X    * Correctly detects absolute alarm time passing in confirmation on
  155. X    minute change, only switches dialog to time entry if the dialog is the
  156. X    confirm.
  157. X
  158. X    * Only complains about no display when restarting alarms if there are
  159. X    alarms to restart.
  160. X
  161. Tue Apr 28 10:13:10 1992  Simon Marshall  (sm at olympus)
  162. X
  163. X    * Released xalarm-3.03.
  164. X
  165. Wed Apr 22 12:06:14 1992  Simon Marshall  (sm at olympus)
  166. X
  167. X    * Properly solved the hanging <defunct> children; wait() only waits for
  168. X    one child.
  169. X
  170. Fri Apr 17 12:11:24 1992  Simon Marshall  (sm at olympus)
  171. X
  172. X    * Correctly adds, not replaces, callbacks on AsciiText widget.  From
  173. X    Donna Converse.
  174. X
  175. Mon Apr 13 22:16:07 1992  Simon Marshall  (sm at olympus)
  176. X
  177. X    * Save button has sensitivity.
  178. X
  179. Wed Apr  8 19:46:43 1992  Simon Marshall  (sm at olympus)
  180. X
  181. X    * Correctly saves multi-line messages when xalarm dies.
  182. X
  183. Tue Apr  7 10:41:46 1992  Simon Marshall  (sm at olympus)
  184. X
  185. X    * Added all as an option to -reset; -kill is the same as -reset, except
  186. X    deadly.
  187. X
  188. X    * Added getlogin() as a way of getting the login name, from Bob
  189. X    Primmer, and also cuserid().
  190. X
  191. Mon Apr  6 18:21:53 1992  Simon Marshall  (sm at olympus)
  192. X
  193. X    * Does not attempt to restart alarms if it cannot open a connection to
  194. X    the display.
  195. X
  196. Fri Mar 27 19:11:22 1992  Simon Marshall  (sm at olympus)
  197. X
  198. X    * Solved the intermittent resize problem - the behaviour of the Shell
  199. X    is undefined for multiple children, even if only one is managed.  Added
  200. X    an intermediate (Form) widget to solve this.
  201. X
  202. Fri Mar 20 20:07:01 1992  Simon Marshall  (sm at olympus)
  203. X
  204. X    * Corrected bug whereby a 2 or 4 digit absolute time with leading
  205. X    zero was not treated as in 24 hour format.
  206. X
  207. Mon Mar 16 20:38:17 1992  Simon Marshall  (sm at olympus)
  208. X
  209. X    * Added -restart, along with the ability for xalarm to save alarms when
  210. X    the session closes.
  211. X
  212. X    * Solved the hanging <defunct> children, thanks to comp.unix.programmer
  213. X    and a cast of thousands.
  214. X
  215. Tue Mar 10 11:55:13 1992  Simon Marshall  (sm at olympus)
  216. X
  217. X    * Added -daemon option, like -file but never returns, and -kill.
  218. X
  219. Sat Mar  7 18:46:38 1992  Simon Marshall  (sm at olympus)
  220. X
  221. X    * Added XALARMFILEPATH so you can have a list of alarm files to check.
  222. X
  223. X    * Can save alarm settings in ~/.xalarms.
  224. X
  225. X    * Put a clock up on each popup.  Also keeps track of any other time
  226. X    dependent information.  From an idea by Gisle Hannemyr.
  227. X
  228. Fri Mar  6 18:19:10 1992  Simon Marshall  (sm at olympus)
  229. X
  230. X    * Changed the way the alarm and warnings make a noise.  Can now specify
  231. X    a shell script to run instead.  Volume control.
  232. X
  233. Tue Mar  3 10:54:02 1992  Simon Marshall  (sm at olympus)
  234. X
  235. X    * Added -pester (or should that be -persecute?), kind of auto-snooze,
  236. X    and time information in popups.  Idea from Gisle Hannemyr.
  237. X
  238. X    * Made a temporary hack-fix for a R5 manifestation of the Shell's
  239. X    ChangeManaged bug: added field padding for confirmation widget label.
  240. X    Yes, I could give a XXXX.  Unfortunately, the bug then shows up under
  241. X    R4.  Can't win them all.
  242. X
  243. X    * Fixed "-file" without-following-arg bug, and Makefiles for brain-dead
  244. X    makes.  From Stefan Haenssgen and Braham Levy.
  245. X
  246. Sun Mar  1 13:19:08 1992  Simon Marshall  (sm at olympus)
  247. X
  248. X    * Made it get the user's home directory via the passwd file too.
  249. X
  250. Fri Feb 28 10:25:31 1992  Simon Marshall  (sm at olympus)
  251. X
  252. X    * Corrected declaration of XtResources defaults which caused a silent
  253. X    crash if application defaults were not properly installed.  From Gisle
  254. X    Hannemyr.
  255. X
  256. Thu Feb 27 17:52:59 1992  Simon Marshall  (sm at olympus)
  257. X
  258. X    * Can combine time symbols & dates.  Added noon.
  259. X
  260. Wed Feb 26 19:49:54 1992  Simon Marshall  (sm at olympus)
  261. X
  262. X    * Made the config guess all & only query at the end.
  263. X
  264. Mon Feb 24 13:03:39 1992  Simon Marshall  (sm at olympus)
  265. X
  266. X    * "make config" is now included when necessary by make & corrected
  267. X    CentreWidgetUnderPointer() to include widget's width.  Thanks to Braham
  268. X    Levy.  Added EnsureAllOnScreen() for resizing popups; only shifts left.
  269. X
  270. Sun Feb 23 15:27:08 1992  Simon Marshall  (sm at olympus)
  271. X
  272. X    * Changed the alarm file to ~/.xalarms always and removed environment
  273. X    variable XALARM.
  274. X
  275. X    * Added uname() as a way of getting the machine name.  From Rich $alz's
  276. X    shar program.
  277. X
  278. Sun Feb 16 13:46:26 1992  Simon Marshall  (sm at olympus)
  279. X
  280. X    * Added date parsing to appointments too.  Added -file option, moved 
  281. X    into file.c.
  282. X
  283. Fri Feb 14 19:55:24 1992  Simon Marshall  (sm at olympus)
  284. X
  285. X    * Added date parsing to popup, with some error parsing.  Moved dates
  286. X    into dates.c.
  287. X
  288. Mon Feb 10 12:53:47 1992  Simon Marshall  (sm at olympus)
  289. X
  290. X    * Made it get the user name from the passwd file rather than $USER.
  291. X    From Paul Vixie's cron program.
  292. X
  293. Thu Feb  6 18:52:25 1992  Simon Marshall  (sm at olympus)
  294. X
  295. X    * Time parsing now gives more informative error messages.
  296. X
  297. Tue Feb  4 10:00:36 1992  Simon Marshall  (sm at olympus)
  298. X
  299. X    * Added reset button to warning popup.  Don't think it's appropriate
  300. X    for alarm itself.  Corrected timeout casting.
  301. X
  302. X    * Change to Imakefile to make sure dependencies are made, and
  303. X    config.1st invoked, properly.  George Lindholm & Jonathan I. Kamens.
  304. X
  305. Sat Feb  1 15:40:29 1992  Simon Marshall  (sm at olympus)
  306. X
  307. X    * Released patch 2.
  308. X
  309. Thu Jan 30 11:11:01 1992  Simon Marshall  (sm at olympus)
  310. X
  311. X    * Behaves properly during leap years.
  312. X
  313. X    * Fixed bug whereby dates are parsed wrongly if the number of days in
  314. X    the current month is more than the number of days in the month given.
  315. X
  316. X    * Better error messages with unrecognised dates.
  317. X
  318. Tue Jan 21 11:10:34 1992  Simon Marshall  (sm at olympus)
  319. X
  320. X    * Made config.1st try to find locations, instead of assuming a Sun.
  321. X    Forgot to include times.o as dependent on xalarm.h.  Non-existent
  322. X    function was declared.
  323. X
  324. X    * Fixed bug whereby changes in the dialog was silently accepted while
  325. X    changing other values.
  326. X
  327. X    * Resources properly label all quit buttons.
  328. X
  329. Mon Jan 20 10:08:55 1992  Simon Marshall  (sm at olympus)
  330. X
  331. X    * Released patch 1.
  332. X
  333. Wed Jan 15 14:58:08 1992  Simon Marshall  (sm at olympus)
  334. X
  335. X    * Input in the dialog popup properly is directed to the visible widget.
  336. X
  337. X    * Cleaned resources, man page & xmemo doesn't ask for confirmation.
  338. X
  339. Fri Jan  3 13:51:52 1992  Simon Marshall  (sm at olympus)
  340. X
  341. X    * Fixed Imakefile where blanks after ManSuffix were not stripped, from
  342. X    Jonathan I. Kamens.
  343. X
  344. Thu Dec 19 15:23:46 1991  Simon Marshall  (sm at olympus)
  345. X
  346. X    * Solved the auto-resize; just took the width resource out.
  347. X
  348. X    * Casted everything properly to shut up picky compilers.
  349. X
  350. Wed Dec 18 19:29:08 1991  Simon Marshall  (sm at olympus)
  351. X
  352. X    * Made all the windows proper transient shells as they should be.  If
  353. X    no geometry is given, the windows popup under the mouse pointer.
  354. X
  355. X    * Can no longer kill xalarm via the WM_DELETE_WINDOW protocol.  It has
  356. X    no effect with shells widgets.
  357. X
  358. Fri Dec  6 13:36:08 1991  Simon Marshall  (sm at olympus)
  359. X
  360. X    * Fixed bug in AppointmentIsToday() which under certain circumstances
  361. X    would parse times in files wrong or core dump.  Forgot to XtMalloc() in
  362. X    a couple of places.
  363. X
  364. Thu Dec  5 18:29:45 1991  Simon Marshall  (sm at olympus)
  365. X
  366. X    * Words from the alarm message can be incorporated in the warning
  367. X    popup.  From an idea by Evan Bigall.
  368. X
  369. Sun Dec  1 14:20:46 1991  Simon Marshall  (sm at olympus)
  370. X
  371. X    * Made resources control the cursor shapes; took gumby out of alarm.c.
  372. X
  373. Thu Oct 17 14:46:01 1991  Simon Marshall  (sm at olympus)
  374. X
  375. X    * Added justification for the Dialog widget label.  Still makes a
  376. X    widget bigger than need be though.
  377. X
  378. Sun Oct 13 17:40:00 1991  Simon Marshall  (sm at olympus)
  379. X
  380. X    * For the confirmation window, sorts the warning times into descending
  381. X    order, and takes the day of the week from WEEKDAYS rather than ctime(),
  382. X    in case a different language is being used.
  383. X
  384. Sat Oct  5 15:37:59 1991  Simon Marshall  (sm at olympus)
  385. X
  386. X    * Released xalarm-3.
  387. X
  388. Wed Oct  2 14:35:15 1991  Simon Marshall  (sm at olympus)
  389. X
  390. X    * Taken out the makeX and put that stuff in with config.1st, let the
  391. X    user sort it out.
  392. X
  393. Mon Sep 30 19:12:40 1991  Simon Marshall  (sm at olympus)
  394. X
  395. X    * Added -list so xalarm shows what ps thinks are the user's xalarm pids
  396. X    are.  Had to alter the makefiles so that you could set where ps & the
  397. X    rest where; added a config.1st to do this.
  398. X
  399. Sun Sep 29 22:16:09 1991  Simon Marshall  (sm at olympus)
  400. X
  401. X    * Made xalarm capable of parsing a file for alarms, so for regular
  402. X    times, it will set alarms automatically.
  403. X
  404. Fri Sep 27 10:43:41 1991  Simon Marshall  (sm at olympus)
  405. X
  406. X    * Fed up with ``Is it only BSD that uses bzero, or only SYSV that uses
  407. X    memset?  Or is it a bit of both?''  Wrote my own.
  408. X
  409. Wed Sep 25 22:17:05 1991  Simon Marshall  (sm at olympus)
  410. X
  411. X    * Split README into README and INSTALL.  Made it all a touch more
  412. X    portable?  Thanks to Andreas Stolcke.  Made the manual more readable,
  413. X    thanks to suggestions by Bill Leonard.
  414. X
  415. Tue Sep 24 21:54:30 1991  Simon Marshall  (sm at olympus)
  416. X
  417. X    * Added a -snooze & resource on suggestion by Bill Leonard, so you can
  418. X    have a default snoozetime already set for you.  Corrected bits & bobs
  419. X    in man page too.
  420. X
  421. Sun Sep 15 21:41:52 1991  Simon Marshall  (sm at olympus)
  422. X
  423. X    * Cleaned up for release in contrib for R5; re-named xalarm-3 for good
  424. X    measure.
  425. X
  426. X    * Added a -reset kill & signal trapper code so that you can wake up an
  427. X    alarm and change the times.
  428. X
  429. Thu Sep  5 12:24:56 1991  Simon Marshall  (sm at olympus)
  430. X
  431. X    * Added a make flag & fix for the X crash-on-zero-timeout (bug report
  432. X    from Jamie Zawinsk).  Cleaned up Makefile & README.
  433. X
  434. Mon Sep  2 11:54:20 1991  Simon Marshall  (sm at olympus)
  435. X
  436. X    * Fixed the little problem with the clear button, although the resource
  437. X    still isn't changeable by the user.
  438. X
  439. Tue Aug 27 17:08:47 1991  Simon Marshall  (sm at olympus)
  440. X
  441. X    * The timeout is now recalculated on confirmation so that if the time
  442. X    is absolute, messing around during confirmation won't result in a late
  443. X    alarm.
  444. X
  445. Wed Aug 21 18:00:00 1991  Simon Marshall  (sm at olympus)
  446. X
  447. X    * Released xalarm-2.00.
  448. X
  449. Tue Aug 20 10:25:58 1991  Simon Marshall  (sm at olympus)
  450. X
  451. X    * Fixed a little bug as a result of yesterday; if an invalid time is
  452. X    given with the noconfirm option, the alarm message text is "".
  453. X
  454. X    * Finally made the popups get their geometry from the alarm, by
  455. X    intercepting it from the command line...
  456. X
  457. Mon Aug 19 13:56:53 1991  Simon Marshall  (sm at olympus)
  458. X
  459. X    * Added xmemo (thanks to an unconnected posting by Dan Jacobson, I
  460. X    think) & found a bug in the manual - used -beep instead of -bell!!!
  461. X    Added -beep & -nobeep to options...
  462. X
  463. Sun Aug 18 11:17:45 1991  Simon Marshall  (sm at olympus)
  464. X
  465. X    * Put the toggling back (!) so you can fiddle with warning times too.
  466. X
  467. X    * Changed -at and -in to -time, -in times preceded by a `+' (but
  468. X    warning times aren't).  None of that silly toggling etc.  Also made
  469. X    some options have shorter aliases.
  470. X
  471. X    * Made xalarm overwrite any given message, so ps etc can't show what it
  472. X    is.  From a comment by Reiner Hammer.
  473. X
  474. Fri Aug 16 12:25:08 1991  Simon Marshall  (sm at olympus)
  475. X
  476. X    * Cleaned up here & there.
  477. X
  478. X    * Incorporated a hacked version of the time parser from xcal-3.2, Peter
  479. X    Collinson et al.
  480. X
  481. X    * Changed the way warnings are given.  No longer within quotes, they
  482. X    must be separated by commas (only).
  483. X
  484. Wed Aug 14 12:58:29 1991  Simon Marshall  (sm at olympus)
  485. X
  486. X    * Corrected bug whereby time wasn't always correctly calculated when
  487. X    given as 12 hour clock but >12 hours ahead.
  488. X
  489. Tue Aug 13 12:41:32 1991  Simon Marshall  (sm at olympus)
  490. X
  491. X    * Added forking - so must easier than I had assumed.  No closing to do
  492. X    after all.  Thanks to Gordon Freedman & Janet Anstett.
  493. X
  494. Fri Aug  9 13:38:35 1991  Simon Marshall  (sm at olympus)
  495. X
  496. X    * Added -h[elp].
  497. X
  498. Thu Aug  8 15:04:56 1991  Simon Marshall  (sm at olympus)
  499. X
  500. X    * Added -v[ersion]; I'm fed up with getting bug reports without it.
  501. X
  502. X    * Added a config to Makefile so as to make sure stuff is ready for
  503. X    making & running/playing with.
  504. X
  505. Mon Aug  5 15:46:00 1991  Simon Marshall  (sm at olympus)
  506. X
  507. X    * It appears that stuff in .../lib/X11/app-defaults is not
  508. X    pre-processed with cpp, so we can't have "#ifdef" etc in there.  Moved
  509. X    colour stuff to separate file.  From Scott Blachovicz & a multitude of
  510. X    others.
  511. X
  512. Sun Aug  4 15:12:06 1991  Simon Marshall  (sm at olympus)
  513. X
  514. X    * Corrected bug whereby When?.when.label was for "at" time when it
  515. X    should be "in", when user gave invalid "in" time on the command line.
  516. X
  517. X    * If enabled, confirmation is now always sort, unless alarm is to
  518. X    trigger immediately.
  519. X
  520. X    * Made warnings only accept times in the [[[h]h]m]m format a` la -in.
  521. X    Invalid times result in an error message on stderr only.  Also added
  522. X    -nowarn.  (Implemented as "-warn 0" :-)
  523. X
  524. Fri Aug  2 09:46:42 1991  Simon Marshall  (sm at olympus)
  525. X
  526. X    * Added confirmation stuff to xalarm.  Does not confirm if using
  527. X    relative time given on the command line.  Also added -confirm,
  528. X    -noconfirm and -nobell.
  529. X
  530. X    * Split up xalarm into more meaningful pieces.  Preparation for
  531. X    xalarm-2.00?
  532. X
  533. Wed Jul 31 13:20:29 1991  Simon Marshall  (sm at olympus)
  534. X
  535. X    * Released xalarm-1.01.
  536. X
  537. X    * Made MakeX which looks for the absolute path of an executable.  Need
  538. X    it for yow, as it is often not is a person's path.
  539. X
  540. X    * Fixed bug/mistake.  I had sometimes declared warg as an Arg, but
  541. X    XtSetValues expects an ArgList.  Changed to declare as warg[1].  From
  542. X    comments made by Dave Brooks, Bill Leonard & Braham Levy (plus more
  543. X    once our mailer came up).
  544. X
  545. X    * Added 2 options; -bell and -warn "...".  By default the bell no
  546. X    longer sounds, and the warning times can be specified.  Both have
  547. X    resources of course.  From comments by Bill Leonard.
  548. X
  549. X    * Updated the manual & made it clearer.
  550. X
  551. Tue Jul 30 10:29:22 1991  Simon Marshall  (sm at olympus)
  552. X
  553. X    * Changed the way the time is calculated.  No more fiddling with
  554. X    strings & it's much more compact.
  555. X
  556. X    * Added Imakefile, sent by Andreas Stolcke (stolcke@edu.Berkeley.ICSI).
  557. X    I don't know how useful it is, our imake isn't installed.
  558. X
  559. X    * Changed default font for value entry to 9x15bold in XAlarm.ad; it is
  560. X    a little more readable.
  561. SHAR_EOF
  562. chmod 0644 ChangeLog ||
  563. echo 'restore of ChangeLog failed'
  564. Wc_c="`wc -c < 'ChangeLog'`"
  565. test 15067 -eq "$Wc_c" ||
  566.     echo 'ChangeLog: original size 15067, current size' "$Wc_c"
  567. rm -f _shar_wnt_.tmp
  568. fi
  569. # ============= INSTALL ==============
  570. if test -f 'INSTALL' -a X"$1" != X"-c"; then
  571.     echo 'x - skipping INSTALL (File already exists)'
  572.     rm -f _shar_wnt_.tmp
  573. else
  574. > _shar_wnt_.tmp
  575. echo 'x - extracting INSTALL (Text)'
  576. sed 's/^X//' << 'SHAR_EOF' > 'INSTALL' &&
  577. MAKING
  578. ~~~~~~
  579. X
  580. X  First get any relevant patch files so as to make the latest patch version.
  581. X  You can find out which patch level your xalarm is at by looking at the file
  582. X  patchlevel.h in the source directory, or, if you have xalarm built, by:
  583. X
  584. % xalarm -version
  585. X
  586. X  See the man page for more.  Apply any patches, see the patch files themselves
  587. X  for more information.
  588. X
  589. X  If you have problems with compilation or use, look at the PROBLEMS file.
  590. X
  591. X    1.  If you don't want to use the Imakefile or the Makefile generated from
  592. X    it, try using Makefile.alt.
  593. X
  594. X    Check the flag settings in the Makefile of your choice.  If you are
  595. X    using the Imakefile, generate a Makefile by "xmkmf".
  596. X
  597. X    If you want to use a different notation or language for dates etc., see
  598. X    WEEKDAYS and related definitions in dates.h.
  599. X
  600. X    2.  Try making with "make".  Answer the questions.  Have a play.
  601. X
  602. X    3.  If you aren't installing (you selfish get), put the XAlarm.ad and
  603. X    XAlarm.ad+ in your ~/.xresources file.
  604. X
  605. X    Otherwise, try "make install install.man".
  606. X
  607. X  Look at the manual for anything else & enjoy.
  608. X
  609. X
  610. BUGS
  611. ~~~~
  612. X
  613. X  See the PROBLEMS file first.
  614. X
  615. X  If you have any bugs, comments, suggestions, code, fixes, please let me know
  616. X  and I will make an attempt to include them.  A few ``things'' are mentioned
  617. X  in the bugs section of the manual.  Don't forget to include the xalarm
  618. X  version number ("xalarm -version" gives it you), machine/OS,     X11 release &
  619. X  patch, WM used, etc.
  620. X
  621. SHAR_EOF
  622. chmod 0644 INSTALL ||
  623. echo 'restore of INSTALL failed'
  624. Wc_c="`wc -c < 'INSTALL'`"
  625. test 1452 -eq "$Wc_c" ||
  626.     echo 'INSTALL: original size 1452, current size' "$Wc_c"
  627. rm -f _shar_wnt_.tmp
  628. fi
  629. # ============= Imakefile ==============
  630. if test -f 'Imakefile' -a X"$1" != X"-c"; then
  631.     echo 'x - skipping Imakefile (File already exists)'
  632.     rm -f _shar_wnt_.tmp
  633. else
  634. > _shar_wnt_.tmp
  635. echo 'x - extracting Imakefile (Text)'
  636. sed 's/^X//' << 'SHAR_EOF' > 'Imakefile' &&
  637. /**/# Based on an Imakefile from:
  638. /**/# Andreas Stolcke
  639. /**/# International Computer Science Institute, Berkeley.
  640. /**/# With help from:
  641. /**/# George Lindholm, Jonathan I. Kamens, Braham Levy.
  642. X
  643. X
  644. /**/# o Define FORKRETURNSSHORT/FORKRETURNSLONG/FORKRETURNSPID_T if your
  645. /**/#   fork(2) returns short/long/pid_t not int.
  646. /**/# o Define USEFLOCK or USELOCKF to use flock(2) or lockf(3) to lock files,
  647. /**/#   rather than fcntl(2).
  648. /**/# o Define USELSEEK to use lseek(2) to move to the end of the file, rather
  649. /**/#   than fseek(3).
  650. /**/# o Define USERENAME to use rename(2) to rename file names (otherwise
  651. /**/#   un/link(2)).
  652. /**/# o Define USEGETHOSTNAME or USEUNAME (or neither if you don't have
  653. /**/#   gethostname(2) or uname(2)) to get the name of your system.
  654. /**/# o Define USEGETPWUID to use getpwuid(3) and getuid(2) to get the user
  655. /**/#   name and home directory on your system.  Note that if you want to use
  656. /**/#   this method to get the user's home directory, but another method to get
  657. /**/#   the user name, this symbol must still be defined.
  658. /**/# o Define USEGETLOGIN to use getlogin(3) to get the user name (note that
  659. /**/#   this may not work if xalarm is invoked from a pseudo terminal).
  660. /**/# o Define USECUSERID to use cuserid(3) to get the user name.
  661. X
  662. DEFINES = $(SIGNAL_DEFINES) -DUSERENAME -DUSEGETHOSTNAME -DUSEGETPWUID
  663. X
  664. X
  665. OBJS = alarm.o when.o warnings.o times.o dates.o file.o fns.o xalarm.o
  666. SRCS = alarm.c when.c warnings.c times.c dates.c file.c fns.c xalarm.c
  667. X
  668. MADE = test -f
  669. X
  670. LOCAL_LIBRARIES = XawClientLibs
  671. X
  672. AllTarget (.config)
  673. ComplexProgramTarget (xalarm)
  674. X
  675. InstallAppDefaults (XAlarm)
  676. InstallMultipleFlags (xmemo xfortune xyow, $(BINDIR), $(INSTBINFLAGS))
  677. InstallManPage (xmemo, $(MANDIR))
  678. InstallManPage (xfortune, $(MANDIR))
  679. InstallManPage (xyow, $(MANDIR))
  680. X
  681. includes:: fns.h
  682. X
  683. fns.h:
  684. X    @./config.1st -quick fortune yow
  685. X
  686. xmemo.man xyow.man xfortune.man:
  687. X    echo ".so man"`echo ManSuffix`"/xalarm."`echo ManSuffix` > $@
  688. X
  689. xfortune::
  690. X
  691. xyow::
  692. X
  693. clean::
  694. X    $(RM) xfortune xyow xmemo.man xyow.man xfortune.man fns.h .config
  695. X
  696. config::
  697. X    @./config.1st -quick fortune yow
  698. X    @xrdb -merge XAlarm.ad
  699. X    @xrdb -merge XAlarm.ad+
  700. X
  701. .config::
  702. X    @-$(MADE) .config || make config
  703. X
  704. alarm.o:    xalarm.h patchlevel.h
  705. when.o:        xalarm.h patchlevel.h dates.h
  706. warnings.o:    xalarm.h patchlevel.h
  707. times.o:    xalarm.h patchlevel.h dates.h
  708. dates.o:    xalarm.h patchlevel.h dates.h
  709. file.o:        xalarm.h patchlevel.h dates.h
  710. fns.o:        xalarm.h patchlevel.h fns.h
  711. xalarm.o:    xalarm.h patchlevel.h
  712. SHAR_EOF
  713. chmod 0644 Imakefile ||
  714. echo 'restore of Imakefile failed'
  715. Wc_c="`wc -c < 'Imakefile'`"
  716. test 2472 -eq "$Wc_c" ||
  717.     echo 'Imakefile: original size 2472, current size' "$Wc_c"
  718. rm -f _shar_wnt_.tmp
  719. fi
  720. # ============= Makefile ==============
  721. if test -f 'Makefile' -a X"$1" != X"-c"; then
  722.     echo 'x - skipping Makefile (File already exists)'
  723.     rm -f _shar_wnt_.tmp
  724. else
  725. > _shar_wnt_.tmp
  726. echo 'x - extracting Makefile (Text)'
  727. sed 's/^X//' << 'SHAR_EOF' > 'Makefile' &&
  728. # Makefile generated by imake - do not edit!
  729. # $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
  730. #
  731. # The cpp used on this machine replaces all newlines and multiple tabs and
  732. # spaces in a macro expansion with a single space.  Imake tries to compensate
  733. # for this, but is not always successful.
  734. #
  735. X
  736. ###########################################################################
  737. # Makefile generated from "Imake.tmpl" and <Imakefile>
  738. # $XConsortium: Imake.tmpl,v 1.77 89/12/18 17:01:37 jim Exp $
  739. #
  740. # Platform-specific parameters may be set in the appropriate .cf
  741. # configuration files.  Site-wide parameters may be set in the file
  742. # site.def.  Full rebuilds are recommended if any parameters are changed.
  743. #
  744. # If your C preprocessor doesn't define any unique symbols, you'll need
  745. # to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  746. # "make Makefile", "make Makefiles", or "make World").
  747. #
  748. # If you absolutely can't get imake to work, you'll need to set the
  749. # variables at the top of each Makefile as well as the dependencies at the
  750. # bottom (makedepend will do this automatically).
  751. #
  752. X
  753. ###########################################################################
  754. # platform-specific configuration parameters - edit sun.cf to change
  755. X
  756. # platform:  $XConsortium: sun.cf,v 1.38 89/12/23 16:10:10 jim Exp $
  757. # operating system:  SunOS 4.0.3
  758. X
  759. ###########################################################################
  760. # site-specific configuration parameters - edit site.def to change
  761. X
  762. # site:  $XConsortium: site.def,v 1.21 89/12/06 11:46:50 jim Exp $
  763. X
  764. X            SHELL = /bin/sh
  765. X
  766. X              TOP = .
  767. X      CURRENT_DIR = .
  768. X
  769. X               AR = ar cq
  770. X  BOOTSTRAPCFLAGS =
  771. X               CC = cc
  772. X
  773. X         COMPRESS = compress
  774. X              CPP = /lib/cpp $(STD_CPP_DEFINES)
  775. X    PREPROCESSCMD = cc -E $(STD_CPP_DEFINES)
  776. X          INSTALL = install
  777. X               LD = ld
  778. X             LINT = lint
  779. X      LINTLIBFLAG = -C
  780. X         LINTOPTS = -axz
  781. X               LN = ln -s
  782. X             MAKE = make
  783. X               MV = mv
  784. X               CP = cp
  785. X           RANLIB = ranlib
  786. X  RANLIBINSTFLAGS =
  787. X               RM = rm -f
  788. X     STD_INCLUDES =
  789. X  STD_CPP_DEFINES =
  790. X      STD_DEFINES =
  791. X EXTRA_LOAD_FLAGS =
  792. X  EXTRA_LIBRARIES =
  793. X             TAGS = ctags
  794. X
  795. X    SHAREDCODEDEF = -DSHAREDCODE
  796. X         SHLIBDEF = -DSUNSHLIB
  797. X
  798. X    PROTO_DEFINES =
  799. X
  800. X     INSTPGMFLAGS =
  801. X
  802. X     INSTBINFLAGS = -m 0755
  803. X     INSTUIDFLAGS = -m 4755
  804. X     INSTLIBFLAGS = -m 0664
  805. X     INSTINCFLAGS = -m 0444
  806. X     INSTMANFLAGS = -m 0444
  807. X     INSTDATFLAGS = -m 0444
  808. X    INSTKMEMFLAGS = -m 4755
  809. X
  810. X          DESTDIR =
  811. X
  812. X     TOP_INCLUDES = -I$(INCROOT)
  813. X
  814. X      CDEBUGFLAGS = -O
  815. X        CCOPTIONS =
  816. X      COMPATFLAGS =
  817. X
  818. X      ALLINCLUDES = $(STD_INCLUDES) $(TOP_INCLUDES) $(INCLUDES) $(EXTRA_INCLUDES)
  819. X       ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(DEFINES) $(COMPATFLAGS)
  820. X           CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES)
  821. X        LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES)
  822. X           LDLIBS = $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  823. X        LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)
  824. X   LDCOMBINEFLAGS = -X -r
  825. X
  826. X        MACROFILE = sun.cf
  827. X           RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
  828. X
  829. X    IMAKE_DEFINES =
  830. X
  831. X         IRULESRC = $(CONFIGDIR)
  832. X        IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  833. X
  834. X     ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Imake.rules \
  835. X            $(IRULESRC)/Project.tmpl $(IRULESRC)/site.def \
  836. X            $(IRULESRC)/$(MACROFILE) $(EXTRA_ICONFIGFILES)
  837. X
  838. ###########################################################################
  839. # X Window System Build Parameters
  840. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  841. X
  842. ###########################################################################
  843. # X Window System make variables; this need to be coordinated with rules
  844. # $XConsortium: Project.tmpl,v 1.63 89/12/18 16:46:44 jim Exp $
  845. X
  846. X          PATHSEP = /
  847. X        USRLIBDIR = $(DESTDIR)/usr/lib
  848. X           BINDIR = $(DESTDIR)/usr/bin/X11
  849. X          INCROOT = $(DESTDIR)/usr/include
  850. X     BUILDINCROOT = $(TOP)
  851. X      BUILDINCDIR = $(BUILDINCROOT)/X11
  852. X      BUILDINCTOP = ..
  853. X           INCDIR = $(INCROOT)/X11
  854. X           ADMDIR = $(DESTDIR)/usr/adm
  855. X           LIBDIR = $(USRLIBDIR)/X11
  856. X        CONFIGDIR = $(LIBDIR)/config
  857. X       LINTLIBDIR = $(USRLIBDIR)/lint
  858. X
  859. X          FONTDIR = $(LIBDIR)/fonts
  860. X         XINITDIR = $(LIBDIR)/xinit
  861. X           XDMDIR = $(LIBDIR)/xdm
  862. X           AWMDIR = $(LIBDIR)/awm
  863. X           TWMDIR = $(LIBDIR)/twm
  864. X           GWMDIR = $(LIBDIR)/gwm
  865. X          MANPATH = $(DESTDIR)/usr/man
  866. X    MANSOURCEPATH = $(MANPATH)/man
  867. X           MANDIR = $(MANSOURCEPATH)n
  868. X        LIBMANDIR = $(MANSOURCEPATH)3
  869. X      XAPPLOADDIR = $(LIBDIR)/app-defaults
  870. X
  871. X        SOXLIBREV = 4.2
  872. X          SOXTREV = 4.0
  873. X         SOXAWREV = 4.0
  874. X        SOOLDXREV = 4.0
  875. X         SOXMUREV = 4.0
  876. X        SOXEXTREV = 4.0
  877. X
  878. X       FONTCFLAGS = -t
  879. X
  880. X     INSTAPPFLAGS = $(INSTDATFLAGS)
  881. X
  882. X            IMAKE = imake
  883. X           DEPEND = makedepend
  884. X              RGB = rgb
  885. X            FONTC = bdftosnf
  886. X        MKFONTDIR = mkfontdir
  887. X        MKDIRHIER = /bin/sh $(BINDIR)/mkdirhier.sh
  888. X
  889. X        CONFIGSRC = $(TOP)/config
  890. X        CLIENTSRC = $(TOP)/clients
  891. X          DEMOSRC = $(TOP)/demos
  892. X           LIBSRC = $(TOP)/lib
  893. X          FONTSRC = $(TOP)/fonts
  894. X       INCLUDESRC = $(TOP)/X11
  895. X        SERVERSRC = $(TOP)/server
  896. X          UTILSRC = $(TOP)/util
  897. X        SCRIPTSRC = $(UTILSRC)/scripts
  898. X       EXAMPLESRC = $(TOP)/examples
  899. X       CONTRIBSRC = $(TOP)/../contrib
  900. X           DOCSRC = $(TOP)/doc
  901. X           RGBSRC = $(TOP)/rgb
  902. X        DEPENDSRC = $(UTILSRC)/makedepend
  903. X         IMAKESRC = $(CONFIGSRC)
  904. X         XAUTHSRC = $(LIBSRC)/Xau
  905. X          XLIBSRC = $(LIBSRC)/X
  906. X           XMUSRC = $(LIBSRC)/Xmu
  907. X       TOOLKITSRC = $(LIBSRC)/Xt
  908. X       AWIDGETSRC = $(LIBSRC)/Xaw
  909. X       OLDXLIBSRC = $(LIBSRC)/oldX
  910. X      XDMCPLIBSRC = $(LIBSRC)/Xdmcp
  911. X      BDFTOSNFSRC = $(FONTSRC)/bdftosnf
  912. X     MKFONTDIRSRC = $(FONTSRC)/mkfontdir
  913. X     EXTENSIONSRC = $(TOP)/extensions
  914. X
  915. X  DEPEXTENSIONLIB = $(USRLIBDIR)/libXext.a
  916. X     EXTENSIONLIB =  -lXext
  917. X
  918. X          DEPXLIB = $(DEPEXTENSIONLIB)
  919. X             XLIB = $(EXTENSIONLIB) -lX11
  920. X
  921. X      DEPXAUTHLIB = $(USRLIBDIR)/libXau.a
  922. X         XAUTHLIB =  -lXau
  923. X
  924. X        DEPXMULIB =
  925. X           XMULIB = -lXmu
  926. X
  927. X       DEPOLDXLIB =
  928. X          OLDXLIB = -loldX
  929. X
  930. X      DEPXTOOLLIB =
  931. X         XTOOLLIB = -lXt
  932. X
  933. X        DEPXAWLIB =
  934. X           XAWLIB = -lXaw
  935. X
  936. X LINTEXTENSIONLIB = $(USRLIBDIR)/llib-lXext.ln
  937. X         LINTXLIB = $(USRLIBDIR)/llib-lX11.ln
  938. X          LINTXMU = $(USRLIBDIR)/llib-lXmu.ln
  939. X        LINTXTOOL = $(USRLIBDIR)/llib-lXt.ln
  940. X          LINTXAW = $(USRLIBDIR)/llib-lXaw.ln
  941. X
  942. X          DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
  943. X
  944. X         DEPLIBS1 = $(DEPLIBS)
  945. X         DEPLIBS2 = $(DEPLIBS)
  946. X         DEPLIBS3 = $(DEPLIBS)
  947. X
  948. ###########################################################################
  949. # Imake rules for building libraries, programs, scripts, and data files
  950. # rules:  $XConsortium: Imake.rules,v 1.67 89/12/18 17:14:15 jim Exp $
  951. X
  952. ###########################################################################
  953. # start of Imakefile
  954. X
  955. # Based on an Imakefile from:
  956. # Andreas Stolcke
  957. # International Computer Science Institute, Berkeley.
  958. # With help from:
  959. # George Lindholm, Jonathan I. Kamens, Braham Levy.
  960. X
  961. # Define USEGETHOSTNAME, USEUNAME (or neither if you don't have gethostname()
  962. #    or uname()) to get the name of your system:
  963. # Define USEGETPWUID to use getpwuid() and getuid() to get the user name and
  964. #    home directory on your system.  If you want to use this method to get the
  965. #    user's home directory, but another method to get the user name, this
  966. #    symbol must still be defined:
  967. # Define USEGETLOGIN to use getlogin() to get the user name (note that this
  968. #    may not work if xalarm is invoked from a pseudo terminal):
  969. # Define USECUSERID to use cuserid() to get the user name:
  970. DEFINES = $(SIGNAL_DEFINES) -DUSEGETHOSTNAME -DUSEGETPWUID
  971. X
  972. OBJS = alarm.o when.o warnings.o times.o dates.o file.o fns.o xalarm.o
  973. SRCS = alarm.c when.c warnings.c times.c dates.c file.c fns.c xalarm.c
  974. X
  975. MADE = test -f
  976. X
  977. LOCAL_LIBRARIES = $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
  978. X
  979. all:: .config
  980. X
  981. X PROGRAM = xalarm
  982. X
  983. all:: xalarm
  984. X
  985. xalarm: $(OBJS) $(DEPLIBS)
  986. X    $(RM) $@
  987. X    $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)
  988. X
  989. install:: xalarm
  990. X    $(INSTALL) -c $(INSTPGMFLAGS)   xalarm $(BINDIR)
  991. X
  992. install.man:: xalarm.man
  993. X    $(INSTALL) -c $(INSTMANFLAGS) xalarm.man $(MANDIR)/xalarm.n
  994. X
  995. depend::
  996. X    $(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(SRCS)
  997. X
  998. lint:
  999. X    $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS)
  1000. lint1:
  1001. X    $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
  1002. X
  1003. clean::
  1004. X    $(RM) $(PROGRAM)
  1005. X
  1006. install:: XAlarm.ad
  1007. X    $(INSTALL) -c $(INSTAPPFLAGS) XAlarm.ad $(XAPPLOADDIR)/XAlarm
  1008. X
  1009. install:: xmemo xfortune xyow
  1010. X    @case '${MFLAGS}' in *[i]*) set +e;; esac; \
  1011. X    for i in xmemo xfortune xyow; do \
  1012. X    (set -x; $(INSTALL) -c  $(INSTBINFLAGS) $$i  $(BINDIR)); \
  1013. X    done
  1014. X
  1015. install.man:: xmemo.man
  1016. X    $(INSTALL) -c $(INSTMANFLAGS) xmemo.man  $(MANDIR)/xmemo.n
  1017. X
  1018. install.man:: xfortune.man
  1019. X    $(INSTALL) -c $(INSTMANFLAGS) xfortune.man  $(MANDIR)/xfortune.n
  1020. X
  1021. install.man:: xyow.man
  1022. X    $(INSTALL) -c $(INSTMANFLAGS) xyow.man  $(MANDIR)/xyow.n
  1023. X
  1024. includes:: fns.h
  1025. X
  1026. fns.h:
  1027. X    @./config.1st -quick fortune yow
  1028. X
  1029. xmemo.man xyow.man xfortune.man:
  1030. X    echo ".so man"`echo n`"/xalarm."`echo n` > $@
  1031. X
  1032. xfortune::
  1033. X
  1034. xyow::
  1035. X
  1036. clean::
  1037. X    $(RM) xfortune xyow xmemo.man xyow.man xfortune.man fns.h .config
  1038. X
  1039. config::
  1040. X    @./config.1st -quick fortune yow
  1041. X    @xrdb -merge XAlarm.ad
  1042. X    @xrdb -merge XAlarm.ad+
  1043. X
  1044. .config::
  1045. X    @-$(MADE) .config || make config
  1046. X
  1047. alarm.o:    xalarm.h patchlevel.h
  1048. when.o:        xalarm.h patchlevel.h dates.h
  1049. warnings.o:    xalarm.h patchlevel.h
  1050. times.o:    xalarm.h patchlevel.h dates.h
  1051. dates.o:    xalarm.h patchlevel.h dates.h
  1052. file.o:        xalarm.h patchlevel.h dates.h
  1053. fns.o:        xalarm.h patchlevel.h fns.h
  1054. xalarm.o:    xalarm.h patchlevel.h
  1055. X
  1056. ###########################################################################
  1057. # common rules for all Makefiles - do not edit
  1058. X
  1059. emptyrule::
  1060. X
  1061. clean::
  1062. X    $(RM_CMD) \#*
  1063. X
  1064. Makefile::
  1065. X    -@if [ -f Makefile ]; then \
  1066. X    echo "    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
  1067. X    $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
  1068. X    else exit 0; fi
  1069. X    $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR)
  1070. X
  1071. tags::
  1072. X    $(TAGS) -w *.[ch]
  1073. X    $(TAGS) -xw *.[ch] > TAGS
  1074. X
  1075. ###########################################################################
  1076. # empty rules for directories that do not have SUBDIRS - do not edit
  1077. X
  1078. install::
  1079. X    @echo "install in $(CURRENT_DIR) done"
  1080. X
  1081. install.man::
  1082. X    @echo "install.man in $(CURRENT_DIR) done"
  1083. X
  1084. Makefiles::
  1085. X
  1086. includes::
  1087. X
  1088. ###########################################################################
  1089. # dependencies generated by makedepend
  1090. X
  1091. SHAR_EOF
  1092. chmod 0644 Makefile ||
  1093. echo 'restore of Makefile failed'
  1094. Wc_c="`wc -c < 'Makefile'`"
  1095. test 10730 -eq "$Wc_c" ||
  1096.     echo 'Makefile: original size 10730, current size' "$Wc_c"
  1097. rm -f _shar_wnt_.tmp
  1098. fi
  1099. # ============= Makefile.alt ==============
  1100. if test -f 'Makefile.alt' -a X"$1" != X"-c"; then
  1101.     echo 'x - skipping Makefile.alt (File already exists)'
  1102.     rm -f _shar_wnt_.tmp
  1103. else
  1104. > _shar_wnt_.tmp
  1105. echo 'x - extracting Makefile.alt (Text)'
  1106. sed 's/^X//' << 'SHAR_EOF' > 'Makefile.alt' &&
  1107. # Remove -lXext if you don't have it; it's only used for button shapes which
  1108. # default to rectangle anyway.
  1109. CC    = cc
  1110. CFLAGS    = -O
  1111. LDFLAGS    = -lXaw -lXmu -lXt -lX11 -lXext
  1112. X
  1113. X
  1114. # o Define SIGNALRETURNSINT if your signal(3) returns int not void.
  1115. # o Define FORKRETURNSSHORT/FORKRETURNSLONG/FORKRETURNSPID_T if your fork(2)
  1116. #   returns short/long/pid_t not int.
  1117. # o Define USEFLOCK or USELOCKF to use flock(2) or lockf(3) to lock files,
  1118. #   rather than fcntl(2).
  1119. # o Define USELSEEK to use lseek(2) to move to the end of the file, rather than
  1120. #   fseek(3).
  1121. # o Define USERENAME to use rename(2) to rename file names (otherwise
  1122. #   un/link(2)).
  1123. # o Define USEGETHOSTNAME or USEUNAME (or neither if you don't have
  1124. #   gethostname(2) or uname(2)) to get the name of your system.
  1125. # o Define USEGETPWUID to use getpwuid(2) and getuid(2) to get the user name
  1126. #   and home directory on your system.  Note that if you want to use this
  1127. #   method to get the user's home directory, but another method to get the user
  1128. #   name, this symbol must still be defined.
  1129. # o Define USEGETLOGIN to use getlogin(3) to get the user name (note that this
  1130. #   may not work if xalarm is invoked from a pseudo terminal).
  1131. # o Define USECUSERID to use cuserid(3) to get the user name.
  1132. X
  1133. DEFINES = -DUSERENAME -DUSEGETHOSTNAME -DUSEGETPWUID
  1134. X
  1135. X
  1136. # My, is this complex!  These are the usual places for installation.
  1137. PREFIX    = 
  1138. MANSUFX    = n
  1139. XX11BIN    = $(PREFIX)/usr/bin/X11
  1140. XX11MAN    = $(PREFIX)/usr/man/man$(MANSUFX)
  1141. XX11AD    = $(PREFIX)/usr/lib/X11/app-defaults
  1142. X
  1143. X
  1144. # Bits and bobs.
  1145. MADE    = test -f
  1146. STRIP    = /bin/strip
  1147. CP    = /bin/cp
  1148. RM    = /bin/rm -f
  1149. TAGS    = etags -t
  1150. LINT    = lint -hbxca
  1151. X
  1152. X
  1153. OBJS    = alarm.o when.o warnings.o times.o dates.o file.o fns.o xalarm.o
  1154. SRCS    = alarm.c when.c warnings.c times.c dates.c file.c fns.c xalarm.c
  1155. X
  1156. # If your make complains about the && conditional sequences, you may have to do
  1157. # them by hand or go hacking below...  The executables and man pages go in the
  1158. # same directories as xalarm do.
  1159. X
  1160. # The & variable tells a Sequent to do a parallel make, forking compilation
  1161. # processes.  Set this variable to whatever value you need for your parallel
  1162. # machine.  Or you could just use GNU make with "-j".
  1163. X
  1164. # If your make will not except this (ie. it is brain dead), try "make
  1165. # MADE=test" or "make config" (or both), then "make xalarm" if necessary.  The
  1166. # other solution is to use GNU make.
  1167. X
  1168. all: .config xalarm
  1169. X
  1170. xalarm: $& $(OBJS)
  1171. X    $(CC) $(CFLAGS) -o xalarm $(OBJS) $(LDFLAGS)
  1172. X
  1173. .c.o:
  1174. X    $(CC) -c $(CFLAGS) $(DEFINES) $<
  1175. X
  1176. install: all
  1177. X    $(STRIP) xalarm
  1178. X    $(CP) xalarm xmemo $(X11BIN)
  1179. X    $(MADE) xfortune && $(CP) xfortune $(X11BIN)
  1180. X    $(MADE) xyow && $(CP) xyow $(X11BIN)
  1181. X    $(CP) XAlarm.ad $(X11AD)/XAlarm
  1182. X
  1183. install.man:
  1184. X    $(CP) xalarm.man $(X11MAN)/xalarm.$(MANSUFX)
  1185. X    $(MAKE) xmemo.man && $(CP) xmemo.man $(X11MAN)/xmemo.$(MANSUFX)
  1186. X    $(MADE) xfortune && $(MAKE) xfortune.man && \
  1187. X        $(CP) xfortune.man $(X11MAN)/xfortune.$(MANSUFX)
  1188. X    $(MADE) xyow && $(MAKE) xyow.man && $(CP) xyow.man $(X11MAN)/xyow.$(MANSUFX)
  1189. X
  1190. xmemo.man xyow.man xfortune.man:
  1191. X    echo ".so man$(MANSUFX)/xalarm.$(MANSUFX)" > $@
  1192. X    
  1193. X
  1194. fns.h:
  1195. X    @./config.1st -quick fortune yow
  1196. X
  1197. tags:
  1198. X    $(TAGS) $(SRCS)
  1199. X
  1200. clean:
  1201. X    $(RM) $(OBJS) xalarm xfortune xyow fns.h .config core *~ #*
  1202. X
  1203. lint:
  1204. X    $(LINT) $(SRCS)
  1205. X
  1206. # Make sure the resources are loaded so xalarm can be used before installed etc.
  1207. config:
  1208. X    @./config.1st -quick fortune yow
  1209. X    @xrdb -merge XAlarm.ad
  1210. X    @xrdb -merge XAlarm.ad+
  1211. X
  1212. .config::
  1213. X    @-$(MADE) .config || make config
  1214. X
  1215. alarm.o:    xalarm.h patchlevel.h
  1216. when.o:        xalarm.h patchlevel.h dates.h
  1217. warnings.o:    xalarm.h patchlevel.h
  1218. times.o:    xalarm.h patchlevel.h dates.h
  1219. dates.o:    xalarm.h patchlevel.h dates.h
  1220. file.o:        xalarm.h patchlevel.h dates.h
  1221. fns.o:        xalarm.h patchlevel.h fns.h
  1222. xalarm.o:    xalarm.h patchlevel.h
  1223. SHAR_EOF
  1224. chmod 0644 Makefile.alt ||
  1225. echo 'restore of Makefile.alt failed'
  1226. Wc_c="`wc -c < 'Makefile.alt'`"
  1227. test 3717 -eq "$Wc_c" ||
  1228.     echo 'Makefile.alt: original size 3717, current size' "$Wc_c"
  1229. rm -f _shar_wnt_.tmp
  1230. fi
  1231. # ============= PROBLEMS ==============
  1232. if test -f 'PROBLEMS' -a X"$1" != X"-c"; then
  1233.     echo 'x - skipping PROBLEMS (File already exists)'
  1234.     rm -f _shar_wnt_.tmp
  1235. else
  1236. > _shar_wnt_.tmp
  1237. echo 'x - extracting PROBLEMS (Text)'
  1238. sed 's/^X//' << 'SHAR_EOF' > 'PROBLEMS' &&
  1239. COMPILATION
  1240. ~~~~~~~~~~~
  1241. X
  1242. X    1.  Make dies a death.  Some vendor's "make" are brain dead.  One solution
  1243. X    is to use GNU make, the other is to do some of it by hand.  Try "make
  1244. X    MADE=test" or "make config" (or both), then "make xalarm" if necessary.
  1245. X    Then shout at your vendor.
  1246. X
  1247. X    2.    Make says something like "xrdb: Can't open display" or "Command failed
  1248. X    for target `config'".  When you first make, make attempts to merge the
  1249. X    resources necessary to use xalarm for the current session, without the
  1250. X    resources properly installed.  What has happened is that the DISPLAY
  1251. X    variable is not set to be your display, so xrdb cannot know which
  1252. X    display the resources are for.
  1253. X
  1254. X    To fix, set the DISPLAY variable.  It should be set to the name of the
  1255. X    host that the display is running on.  If you are compiling on the same
  1256. X    machine as the display is on, it should probably be something like
  1257. X    "`hostname`:0.0", where hostname returns the name of the host.
  1258. X
  1259. X    3.    Both 3 and 4 may be caused by you using the supplied Makefile, rather
  1260. X    than generating your own by "xmkmf".
  1261. X
  1262. X    When using the Makefile generated from the Imakefile, compiler says
  1263. X    things like, "Don't know how to make target `lib/Xaw/libXaw.a'".  You
  1264. X    are not building in the contrib directory, so try removing $(DEPLIBS)
  1265. X    from the xalarm target in the Makefile.
  1266. X
  1267. X    4.    When using the Makefile generated from the Imakefile, the loader says
  1268. X    things like, "ld: ./lib/Xaw/libXaw.a: No such file or directory".  You
  1269. X    are not building in the contrib directory, so try re-defining
  1270. X    LOCAL_LIBRARIES to be "-lXaw -lXmu -lXt -lXext -lX11" in the Makefile.
  1271. X
  1272. X    5.    Compiler complains about non-existent fns.h.  Try "make config" first.
  1273. X    If this does not work, hack config.1st to put the correct definitions
  1274. X    for GETXALARMPIDS and KILLPATH in fns.h, and create the xfortune & xyow
  1275. X    shell scripts (if you can be bothered).  None of this is essential for
  1276. X    xalarm, but something has to be defined in fns.h.
  1277. X
  1278. X    If you don't have "kill", "ps", "grep" or "colrm", you can compile
  1279. X    xalarm, but you won't be able to use -kill, -reset or -list options.
  1280. X
  1281. X    The command ps(1) lists processes.  The command grep(1) is a pattern
  1282. X    matcher.  The command colrm(1) removes everything from its input after
  1283. X    the sixth column.  Look at the file config.1st.
  1284. X
  1285. X    6.    Compiler complains about gethostname(2), uname(2), getpwuid(3),
  1286. X    getuid(2), pwd.h, getlogin(3) or cuserid(3).  These are the different
  1287. X    ways in which xalarm gets the host name, and the user's name and home
  1288. X    directory.  See the Imakefile or Makefile.alt on how to control which
  1289. X    of these calls are used using compiler symbol defines.
  1290. X
  1291. X    7.    Compiler complains about flock(2), lockf(3) or fcntl(2).  This is how
  1292. X    xalarm locks an alarm file before writing to it.  See the Imakefile or
  1293. X    Makefile.alt on how to control which of these calls are used using
  1294. X    compiler symbol defines.
  1295. X
  1296. X    8.    Compiler complains about fseek(3).  See the Imakefile or Makefile.alt
  1297. X    on how to xalarm use lseek(2) instead, using compiler symbol defines.
  1298. X
  1299. X    9.    Compiler complains about rename(2).  See the Imakefile or Makefile.alt
  1300. X    on how to make xalarm use link(2)/unlink(2) instead, using compiler
  1301. X    symbol defines.
  1302. X
  1303. X   10.    Compiler complains about the type declaration of fork(2).  See the
  1304. X    Imakefile or Makefile.alt on how to control how it is defined, using
  1305. X    compiler symbol defines.
  1306. X
  1307. X   11.    If you don't have "fortune" or "yow", you can't have "xfortune" or
  1308. X    "xyow".
  1309. X
  1310. X    What about other programs, along with xyow and xfortune, can I make
  1311. X    these too?  To make the executable shell script "xyourprogram" in the
  1312. X    current directory, do:
  1313. X
  1314. X        % config.1st [-quick] yourprogram
  1315. X
  1316. X    You will be asked about "ps" etc. again, but persevere.  You will have
  1317. X    to install both the executable and manual page yourself.  The manual
  1318. X    page would be an exact copy of xmemo.man.  If xmemo.man is not made:
  1319. X
  1320. X        % make xmemo.man
  1321. X
  1322. X
  1323. RUNNING
  1324. ~~~~~~~
  1325. X
  1326. X    1.    The alarm comes up with buttons overlayed etc., it's a mess.  The
  1327. X    resources aren't around and xalarm is almost completely controlled by
  1328. X    them.  Either install the resources (so others can also use xalarm), or
  1329. X    include them in your ~/.xresources file.  When xalarm is first made,
  1330. X    the resources are merged automatically so that you need not do this, at
  1331. X    least for that current session.
  1332. X
  1333. X    2.    Xalarm does not use your user name as the alarm popup name, and
  1334. X    complains about not being able to open your alarm file, on some
  1335. X    systems.  This may be because xalarm is using getpwuid() et al to get
  1336. X    the user name and home directory, but no /etc/passwd file exists on the
  1337. X    local host.  You could compile xalarm so that it uses a different
  1338. X    method; see 6 under COMPILATION.
  1339. X
  1340. X    3.    You want to layout the alarm buttons differently, don't you?  Mine not
  1341. X    good enough?  The buttons are within a Form widget, so have a look at
  1342. X    the Xaw man page for this.  Each button has the placement resources
  1343. X    fromHoriz, fromVert, horizDistance & vertDistance.  There are some
  1344. X    suggestions in the xalarm man page too.
  1345. X
  1346. X    The button box and message label are also in a (higher level) Form
  1347. X    widget, so you can also change the relationship of button box to
  1348. X    message text.  See the man page too.
  1349. X
  1350. X    Note that the ordering of resources are important; you can't refer to a
  1351. X    widget in a resource before it's created by xalarm.  The order of
  1352. X    creation is:
  1353. X
  1354. X        Parent    Widget(s)
  1355. X        ---------------------
  1356. X        alarm    buttons
  1357. X        buttons    quit snooze snooze1 snooze5 snooze15 snoozetime
  1358. X        alarm    message
  1359. X
  1360. X    4.    A good font alternative to the "-times-" family (for something slightly
  1361. X    more readable) is "-new century schoolbook-".  See the EXAMPLE RESOURCE
  1362. X    section of the man page.
  1363. X
  1364. X    5.  When using the -kill, -reset or -list options, weird text appears and
  1365. X    the command fails.  This may be due to your ~/.cshrc file, or
  1366. X    equivalent, doing some output.  It shouldn't be.
  1367. X
  1368. X    6.    Occasionally, an xalarm process appears not to save its alarm when the
  1369. X    X session is terminated.  This may actually be due to the fact that
  1370. X    other xalarm processes over-wrote the information.  You may need to
  1371. X    specify that xalarm use a different method of locking files (see 7
  1372. X    under COMPILATION) and/or moving to the end of the file (see 8 under
  1373. X    COMPILATION), using compiler symbol defines.  You must then rebuild
  1374. X    xalarm.
  1375. X
  1376. X
  1377. BUGS
  1378. ~~~~
  1379. X
  1380. X    If you have any bugs, comments, suggestions, code, fixes, please let me
  1381. X    know and I will make an attempt to include them.  A few ``things'' are
  1382. X    mentioned in the bugs section of the manual.  Don't forget to include
  1383. X    the xalarm version number ("xalarm -version" gives it you), machine/OS,
  1384. X    X11 release & patch, WM used, etc.
  1385. SHAR_EOF
  1386. chmod 0644 PROBLEMS ||
  1387. echo 'restore of PROBLEMS failed'
  1388. Wc_c="`wc -c < 'PROBLEMS'`"
  1389. test 6606 -eq "$Wc_c" ||
  1390.     echo 'PROBLEMS: original size 6606, current size' "$Wc_c"
  1391. rm -f _shar_wnt_.tmp
  1392. fi
  1393. # ============= README ==============
  1394. if test -f 'README' -a X"$1" != X"-c"; then
  1395.     echo 'x - skipping README (File already exists)'
  1396.     rm -f _shar_wnt_.tmp
  1397. else
  1398. > _shar_wnt_.tmp
  1399. echo 'x - extracting README (Text)'
  1400. sed 's/^X//' << 'SHAR_EOF' > 'README' &&
  1401. X            Welcome to xalarm-3 for X11R4/5
  1402. X           Ideal for the permanently late, like me.
  1403. X
  1404. X          Copyright (c) 1991, 1992 by Simon Marshall
  1405. X
  1406. X
  1407. WOULD XALARM BE USEFUL TO ME?
  1408. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1409. X
  1410. X  For those who need to be reminded that they have to be somewhere, or have to
  1411. X  do something, on a one-off basis.  "Gotta finish work on time, can't be late,
  1412. X  going out!", "Meeting in half an hour!" etc.
  1413. X
  1414. X  For those who have to be reminded that they have to be somewhere, or have to
  1415. X  do something, on a regular basis.  "Project discussion at 2.30pm Wednesday!",
  1416. X  "Lunch at 1pm!" etc.
  1417. X
  1418. X
  1419. DESCRIPTION
  1420. ~~~~~~~~~~~
  1421. X
  1422. X  xalarm is an interactive alarm clock analogous to a combination of leave(1)
  1423. X  and calendar(1), only much more powerful.
  1424. X
  1425. X  You can set the alarm either by command line options, or by entering the time
  1426. X  using the popup window.  The time and date formats are quite flexible and
  1427. X  natural.  At the appropriate time, xalarm pops up a window to tell you that
  1428. X  your time is up.  You can tell xalarm to pop up warning windows at specified
  1429. X  times before the alarm is to trigger in order to warn you of the impending
  1430. X  alarm.
  1431. X
  1432. X  If a time is not given or recognised, or a date or warning time is not
  1433. X  recognised, or confirmation is required, xalarm prompts for one by popping up
  1434. X  a window.  This gives you an opportunity to change the alarm setting,
  1435. X  warnings times, and the message xalarm will display when the alarm is
  1436. X  triggered.
  1437. X
  1438. X  This form is suitable for inclusion as a menu option under a window manager.
  1439. X
  1440. X  You can make xalarm read alarm times, dates, and the messages to display from
  1441. X  a file, either as a one-off or periodically using an xalarm daemon.  The
  1442. X  alarms will only be set on the dates specified in the file.  This way you can
  1443. X  have an appointments file.
  1444. X
  1445. X  This form is suitable for inclusion in an X start up or initialisation
  1446. X  script.
  1447. X
  1448. X  To help you, xalarm shows the current time, and the alarm also displays the
  1449. X  time since the alarm triggered.  Even if you end an X session before xalarm
  1450. X  has finished, xalarm will save its alarm.  It will then be re-started (if the
  1451. X  time has not passed) next time you invoke xalarm.
  1452. X
  1453. X  xalarm allows you to snooze the alarm after it is triggered, to give you an
  1454. X  opportunity to carry on and be late anyway.  It can also pester you after it
  1455. X  has triggered.  Even after you have set the alarm and confirmed it, you can
  1456. X  reset the alarm as long as you know the xalarm process number; xalarm can
  1457. X  list other xalarm pids.
  1458. X
  1459. X  xalarm makes maximum use of resources, as well as having a number of command
  1460. X  line options, and these can be used to control most of the appearance of
  1461. X  xalarm and (just about) all of its behaviour.
  1462. X
  1463. X  The current xalarm options include:
  1464. X    -daemon +days|daily|weekly
  1465. X    -file +days|date|today|tomorrow|weekly
  1466. X    -date +days|date|today|tomorrow|week
  1467. X    -time +time|time|now|noon
  1468. X    -warn time[,time...]                -nowarn
  1469. X    -confirm                    -noconfirm
  1470. X    -warnwords number                -nowarnwords
  1471. X    -list
  1472. X    -reset pid|all
  1473. X    -kill pid|all
  1474. X    -pester time                    -nopester
  1475. X    -snooze time
  1476. X    -alarmaudio bell|beep|quiet|shell_script
  1477. X    -warningaudio bell|beep|quiet|shell_script
  1478. X    -quiet                        -volume    percent
  1479. X    -help                        -version
  1480. X
  1481. X  Also supplied is xmemo, a front end to xalarm.  By default, make tries to
  1482. X  create xfortune and xyow (front ends to xmemo).  Note that they require the
  1483. X  fortune and yow programs respectively, they don't come with this.
  1484. X
  1485. X  See the file INSTALL and PROBLEMS for help with installation and problems.
  1486. X
  1487. X
  1488. THE END
  1489. ~~~~~~~
  1490. SHAR_EOF
  1491. true || echo 'restore of README failed'
  1492. fi
  1493. echo 'End of  part 1'
  1494. echo 'File README is continued in part 2'
  1495. echo 2 > _shar_seq_.tmp
  1496. exit 0
  1497. -- 
  1498. --
  1499. Molecular Simulations, Inc.            mail: dcmartin@msi.com
  1500. 796 N. Pastoria Avenue                uucp: uunet!dcmartin
  1501. Sunnyvale, California 94086            at&t: 408/522-9236
  1502.