home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume21 / xcal / part01 < prev    next >
Encoding:
Text File  |  1993-12-22  |  60.5 KB  |  2,112 lines

  1. Newsgroups: comp.sources.x
  2. From: pc@hillside.co.uk (Peter Collinson)
  3. Subject: v21i076:  xcal - A calendar program for X, Part01/08
  4. Message-ID: <csx-v21i076=xcal.101638@sparky.Sterling.COM>
  5. X-Md4-Signature: 33bedd12679b9fbeb9fd19603a4624b3
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Hillside Systems, 61 Hillside Avenue, Canterbury, Kent CT2 8HA
  8. Date: Tue, 21 Dec 1993 16:17:02 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: pc@hillside.co.uk (Peter Collinson)
  12. Posting-number: Volume 21, Issue 76
  13. Archive-name: xcal/part01
  14. Environment: X11
  15. Supersedes: xcal: Volume 12, Issue 101
  16.  
  17. Xcal is a calendar program. It generally sits on your screen
  18. displaying todays date - the format of this can be tailored to your
  19. taste.
  20.  
  21. Hitting the left button in the date window gives you a `strip' showing
  22. the current month with one line per day. Daily details can be stored
  23. in files (like xcalendar - from where I stole some code). The daily
  24. details will be displayed in the strip - so you can see what you have
  25. to do. The X11 multi-line widget makes this rather nice.
  26.  
  27. Daily details can be edited by poking at the appropriate day and
  28. getting an edit window. Daily details can contain times and can
  29. be used to trigger screen alarms.
  30.  
  31. Each strip has `next' and `previous' button, so you can do the common
  32. actions quickly - alternatively you can hit the middle button in the
  33. date window to get a dialogue box which you can use to enter the date
  34. of the month which you want to display.
  35.  
  36. A top level button on the date strip gives you access to a memo pad
  37. where you can store things that you should be doing. This panel also
  38. shows todays information so a single button click can be used to see
  39. todays appointments.
  40.  
  41. Xcal supports alarms that can be fired to diplay a message or run
  42. a command at a particular time.
  43.  
  44. I have also stolen pscal from the net and modified it to work with the
  45. program. So you can generate pretty printed calendars whenever you
  46. like - assuming that you have a PostScript printer.There are also some
  47. other support programs, xcal_cal, xcalpr and xcalev. See README.contents
  48. for more details on these. See README.install for some installation hints
  49. and pitfalls.
  50.  
  51. Xcal is also available by anonymous FTP from:
  52.     eros.britain.eu.net:    file: xcal/xcal41.tar.Z
  53.     unix.hensa.ac.uk:    file: /pub/misc/unix/xcal/xcal41.tar.Z
  54.  
  55. Peter Collinson    - pc@hillside.co.uk.
  56.  
  57. Part 1 of 8
  58. --shar starts here--
  59. #! /bin/sh
  60. # This is a shell archive.  Remove anything before this line, then unpack
  61. # it by saving it into a file and typing "sh file".  To overwrite existing
  62. # files, type "sh file -c".  You can also feed this as standard input via
  63. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  64. # will see the following message at the end:
  65. #        "End of archive 1 (of 8)."
  66. # Contents:  C_from_ad.sh C_from_help.sh Imakefile MANIFEST README
  67. #   README.contents README.install README.sunos TODO XCal.ad
  68. #   calendar.bm help.bm help_press.bm mouse.bm mouseaway.bm
  69. #   patchlevel.h pscal pscal/Imakefile pscal/README pscal/pscal.man
  70. #   run_xmkmf sample.regular strfdate.c strftime strftime/README
  71. #   strftime/ptime.c version.c xcal_buts.c xcal_cal xcal_cal/Imakefile
  72. #   xcal_cal/README xcal_cal/xcal_cal.man xcal_mmap.h xcalev
  73. #   xcalev/Imakefile xcalev/version.h xcalev/xcalev.man xcalpr
  74. #   xcalpr/Imakefile xcalpr/README xcalpr/version.h xcalpr/xcalpr.man
  75. # Wrapped by pc@hillside on Wed Nov 17 11:24:34 1993
  76. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  77. if test -f 'C_from_ad.sh' -a "${1}" != "-c" ; then 
  78.   echo shar: Will not clobber existing file \"'C_from_ad.sh'\"
  79. else
  80. echo shar: Extracting \"'C_from_ad.sh'\" \(215 characters\)
  81. sed "s/^X//" >'C_from_ad.sh' <<'END_OF_FILE'
  82. X#!/bin/sh
  83. X#    Turn the help text file into something that C can deal with
  84. XSRC=XCal.ad
  85. XDST=xcal_ad.h
  86. X(     echo 'static String fallbackResources[] = {'
  87. X       sed -e '
  88. X    /^!/d
  89. X    s/^/"/
  90. X    s/$/",/' $SRC
  91. X    echo 'NULL,
  92. X};'
  93. X) > $DST
  94. END_OF_FILE
  95. if test 215 -ne `wc -c <'C_from_ad.sh'`; then
  96.     echo shar: \"'C_from_ad.sh'\" unpacked with wrong size!
  97. fi
  98. # end of 'C_from_ad.sh'
  99. fi
  100. if test -f 'C_from_help.sh' -a "${1}" != "-c" ; then 
  101.   echo shar: Will not clobber existing file \"'C_from_help.sh'\"
  102. else
  103. echo shar: Extracting \"'C_from_help.sh'\" \(182 characters\)
  104. sed "s/^X//" >'C_from_help.sh' <<'END_OF_FILE'
  105. X#!/bin/sh
  106. X#    Turn the help text file into something that C can deal with
  107. XSRC=XCal.help
  108. XDST=xcal_help.h
  109. X(     echo 'char helpdata[] = "\'
  110. X       sed -e 's/$/\\n\\/' $SRC
  111. X    echo '";'
  112. X) > $DST
  113. END_OF_FILE
  114. if test 182 -ne `wc -c <'C_from_help.sh'`; then
  115.     echo shar: \"'C_from_help.sh'\" unpacked with wrong size!
  116. fi
  117. # end of 'C_from_help.sh'
  118. fi
  119. if test -f 'Imakefile' -a "${1}" != "-c" ; then 
  120.   echo shar: Will not clobber existing file \"'Imakefile'\"
  121. else
  122. echo shar: Extracting \"'Imakefile'\" \(1115 characters\)
  123. sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
  124. X/*
  125. X * Define InstallPsCal if you want to have pscal compiled and installed as
  126. X * part of the xcal compilation and installation.
  127. X */
  128. X#define InstallPsCal
  129. X
  130. X        DEFINES = -DLONG_IS_32_BITS -DVER_VEC
  131. X        
  132. X          SRCS1 = xcal.c xcal_alarm.c xcal_buts.c xcal_days.c xcal_edit.c \
  133. X          xcal_help.c xcal_popup.c xcal_strip.c xcal_memo.c strfdate.c version.c
  134. X          OBJS1 = xcal.o xcal_alarm.o xcal_buts.o xcal_days.o xcal_edit.o \
  135. X          xcal_help.o xcal_popup.o xcal_strip.o xcal_memo.o strfdate.o version.o
  136. X
  137. X       PROGRAMS = derived xcal
  138. X   INSTPGMFLAGS = $(INSTBINFLAGS)
  139. X         BINDIR = /usr/local/bin
  140. X
  141. XComplexProgramTarget_1(xcal, XawClientLibs, -lm)
  142. X
  143. XInstallAppDefaults(XCal)
  144. XInstallNonExec(XCal.help, $(XAPPLOADDIR)/XCal.help)
  145. X
  146. Xderived:    xcal_help.h xcal_ad.h
  147. X
  148. Xclean::
  149. X    $(RM) xcal_help.h xcal_ad.h
  150. X
  151. Xxcal_help.h:    XCal.help
  152. X    sh C_from_help.sh
  153. X
  154. Xxcal_ad.h:    XCal.ad
  155. X    sh C_from_ad.sh
  156. X
  157. X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  158. X
  159. X#define IHaveSubdirs
  160. X
  161. X#ifdef InstallPsCal
  162. XSUBDIRS = xcalpr xcalev xcal_cal pscal
  163. X#else
  164. XSUBDIRS = xcalpr xcalev xcal_cal
  165. X#endif
  166. X
  167. XMakeSubdirs($(SUBDIRS))
  168. XDependSubdirs($(SUBDIRS))
  169. END_OF_FILE
  170. if test 1115 -ne `wc -c <'Imakefile'`; then
  171.     echo shar: \"'Imakefile'\" unpacked with wrong size!
  172. fi
  173. # end of 'Imakefile'
  174. fi
  175. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  176.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  177. else
  178. echo shar: Extracting \"'MANIFEST'\" \(3201 characters\)
  179. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  180. X   File Name        Archive #    Description
  181. X-----------------------------------------------------------
  182. X CHANGES                    4    A large list of changes made to xcal    
  183. X C_from_ad.sh               1    A script to generate xcal_ad.h
  184. X C_from_help.sh             1    A script to generate xcal_help.h
  185. X Imakefile                  1    The Imakefile
  186. X MANIFEST                   1    This shipping list
  187. X Makefile.bsdi              6    A makefile generated on BSD/386
  188. X Makefile.sunos             5    A makefile generated on SunOS 4.1.3 Openwindow
  189. X README                     1    General README
  190. X README.contents            1    Brief note on the contents
  191. X README.install             1    How to install the whole system
  192. X README.sunos               1    A caution about SunOS
  193. X TODO                       1    What should happen next
  194. X XCal.ad                    1    Default resources
  195. X XCal.help                  2    Default help
  196. X calendar.bm                1    Bitmap
  197. X help.bm                    1    Bitmap
  198. X help_press.bm              1    Bitmap
  199. X mouse.bm                   1    Bitmap
  200. X mouseaway.bm               1    Bitmap
  201. X patchlevel.h               1    usual patchlevel file
  202. X pscal                      1    PostScript directory
  203. X pscal/Imakefile            1    
  204. X pscal/README               1    
  205. X pscal/pscal.man            1    
  206. X pscal/pscal.script         5    
  207. X run_xmkmf                  1    script to run mkmf on all subdirs
  208. X sample.regular             1    Sample regular file
  209. X strfdate.c                 1    Convert internal dates from a format
  210. X strftime                   1    BSD source of strftime just in case
  211. X strftime/README            1    
  212. X strftime/ptime.c           1    Small program used to test the strftime routine    
  213. X strftime/strftime.c        2    
  214. X strftime/tzfile.h          2    
  215. X version.c                  1    My versioning control file
  216. X xcal.c                     7    Main part of program
  217. X xcal.h                     2    Header
  218. X xcal.man                   8    Manual page
  219. X xcal_alarm.c               7    Source handling alarms
  220. X xcal_buts.c                1    Makes buttons insensitive when pressed
  221. X xcal_cal                   1    xcal_cal directory
  222. X xcal_cal/Imakefile         1    
  223. X xcal_cal/Makefile.bsdi     4    
  224. X xcal_cal/Makefile.sunos    3    
  225. X xcal_cal/README            1    
  226. X xcal_cal/xcal_cal.c        2    
  227. X xcal_cal/xcal_cal.man      1    
  228. X xcal_days.c                2    Code derived from BSD NetII tape
  229. X xcal_edit.c                8    Handle edit boxes
  230. X xcal_help.c                2    Handle help
  231. X xcal_memo.c                6    Handle the memo box
  232. X xcal_mmap.h                1    mmap control file. Edit if you don't have mmap
  233. X xcal_popup.c               4    Handle all popups
  234. X xcal_strip.c               6    Handle the main strip
  235. X xcalev                     1    xcalev directory
  236. X xcalev/Imakefile           1    
  237. X xcalev/Makefile.bsdi       3    
  238. X xcalev/Makefile.sunos      3    
  239. X xcalev/version.h           1    
  240. X xcalev/xcalev.c            5    
  241. X xcalev/xcalev.man          1    
  242. X xcalpr                     1    xcalpr directory
  243. X xcalpr/Imakefile           1    
  244. X xcalpr/Makefile.bsdi       3    
  245. X xcalpr/Makefile.sunos      3    
  246. X xcalpr/README              1    A short note
  247. X xcalpr/version.h           1    
  248. X xcalpr/xcal_days.c         2    Symlink to ../xcal_days.c
  249. X xcalpr/xcalpr.c            4    
  250. X xcalpr/xcalpr.man          1    
  251. END_OF_FILE
  252. if test 3201 -ne `wc -c <'MANIFEST'`; then
  253.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  254. fi
  255. # end of 'MANIFEST'
  256. fi
  257. if test -f 'README' -a "${1}" != "-c" ; then 
  258.   echo shar: Will not clobber existing file \"'README'\"
  259. else
  260. echo shar: Extracting \"'README'\" \(2266 characters\)
  261. sed "s/^X//" >'README' <<'END_OF_FILE'
  262. XXcal is a calendar program. It generally sits on your screen
  263. Xdisplaying todays date - the format of this can be tailored to your
  264. Xtaste.
  265. X
  266. XHitting the left button in the date window gives you a `strip' showing
  267. Xthe current month with one line per day. Daily details can be stored
  268. Xin files (like xcalendar - from where I stole some code). The daily
  269. Xdetails will be displayed in the strip - so you can see what you have
  270. Xto do. The X11 multi-line widget makes this rather nice.
  271. X
  272. XDaily details can be edited by poking at the appropriate day and
  273. Xgetting an edit window. Daily details can contain times and can
  274. Xbe used to trigger screen alarms.
  275. X
  276. XEach strip has `next' and `previous' button, so you can do the common
  277. Xactions quickly - alternatively you can hit the middle button in the
  278. Xdate window to get a dialogue box which you can use to enter the date
  279. Xof the month which you want to display.
  280. X
  281. XA top level button on the date strip gives you access to a memo pad
  282. Xwhere you can store things that you should be doing. This panel also
  283. Xshows todays information so a single button click can be used to see
  284. Xtodays appointments.
  285. X
  286. XI have also stolen pscal from the net and modified it to work with the
  287. Xprogram. So you can generate pretty printed calendars whenever you
  288. Xlike - assuming that you have a PostScript printer.There are also some
  289. Xother support programs, xcal_cal, xcalpr and xcalev. See README.contents
  290. Xfor more details on these. See README.install for some installation hints
  291. Xand pitfalls.
  292. X
  293. XThis is release 4.1
  294. XThe history is:
  295. X    Release 1.1  posted to comp.sources.x
  296. X        + two patches
  297. X    Release 2.1  circulated privately
  298. X    Release 3.1  posted unintentionally to comp.sources.x
  299. X    Release 3.2  posted to comp.sources.x
  300. X    Release 3.3  posted to comp.sources.x in 1990
  301. X
  302. XCaveats
  303. X
  304. XYes this IS another - `I need something real to find out about X exercise'.
  305. XSo, it demonstrates all those faults.
  306. X
  307. XPeter Collinson
  308. XHillside Systems
  309. X61 Hillside Avenue
  310. XCanterbury
  311. XKent, CT2 8HA
  312. X
  313. XPhone: +44 227 761824
  314. XFax: +44 227 762554
  315. XEmail: pc@hillside.co.uk
  316. X
  317. X7/November/1993
  318. X
  319. XFixes/enhancements welcomed....
  320. X
  321. XThis is free... however, if you are going to make some profit from
  322. Xthis, then perhaps you should consider passing something back to me
  323. Xsince I am freelance and mostly don't get paid everyday.
  324. END_OF_FILE
  325. if test 2266 -ne `wc -c <'README'`; then
  326.     echo shar: \"'README'\" unpacked with wrong size!
  327. fi
  328. # end of 'README'
  329. fi
  330. if test -f 'README.contents' -a "${1}" != "-c" ; then 
  331.   echo shar: Will not clobber existing file \"'README.contents'\"
  332. else
  333. echo shar: Extracting \"'README.contents'\" \(808 characters\)
  334. sed "s/^X//" >'README.contents' <<'END_OF_FILE'
  335. XHere's what you get..
  336. X
  337. X
  338. XOn this level is the source for the xcal program. If you install it by hand
  339. Xmake sure you put XCal.ad in app_defaults.
  340. X
  341. XThere is also in sub-directories:
  342. X
  343. Xa)    pscal
  344. X    An `old' program that generates calendars in PostScript. Make you
  345. X    calendar look nice on the wall. There's a README file in this
  346. X    directory that you should look at before installing.
  347. Xb)    xcal_cal
  348. X    A program written by Ed Gould. It takes you calendar entries and
  349. X    makes a file for the standard UNIX calendar program to send you mail.
  350. Xc)    xcalev
  351. X    A program that is used to pre-load your calendar with all those
  352. X    birthdays that you are prone to forget.
  353. Xd)    xcalpr
  354. X    A program that prints calendar files out to a terminal. Nice if
  355. X    you have no X screen. This also can be used to generate a file
  356. X    for the UNIX calendar program.
  357. END_OF_FILE
  358. if test 808 -ne `wc -c <'README.contents'`; then
  359.     echo shar: \"'README.contents'\" unpacked with wrong size!
  360. fi
  361. # end of 'README.contents'
  362. fi
  363. if test -f 'README.install' -a "${1}" != "-c" ; then 
  364.   echo shar: Will not clobber existing file \"'README.install'\"
  365. else
  366. echo shar: Extracting \"'README.install'\" \(1973 characters\)
  367. sed "s/^X//" >'README.install' <<'END_OF_FILE'
  368. XWell - theoretically...
  369. X
  370. XFirst identify if your system supports the mmap() system call.
  371. XIf not then edit the file xal_mmap.h to add 
  372. X    #define NO_MMAP
  373. XWe have found that it's best to do this for Ultrix, whose mmap() call
  374. Xis somewhat old and limited. This only affects help file loading
  375. Xin xcal itself.
  376. X
  377. XThen make the makefiles
  378. X
  379. X    xmkmf
  380. X    make Makefiles
  381. X
  382. Xthen type
  383. X
  384. X    make derived        - this makes xcal_help.h and xcal_ad.h
  385. X                  from XCal.help and XCal.ad. You
  386. X                  may not need to do this step
  387. X                  if the Makefile evaluates things in
  388. X                  the correct order
  389. X    type    make depend
  390. X
  391. X    type    make
  392. X
  393. XIf that appears to compile (and if you are on a Sun see README.sunos), then
  394. X
  395. X    make install
  396. X    make install.man
  397. X
  398. Xand type
  399. X    xcal
  400. X
  401. XOf course, it's won't be as easy as that - because it never is.
  402. X
  403. XNote on bitmaps:
  404. X
  405. XSome systems emit a warning when they compile the bitmaps. They object
  406. Xto having 8-bit values in a char array. You can ignore this, or change the
  407. Xdefine in xcal.c to permit the bitmaps to be unsigned char.
  408. X
  409. XNote on date formats:
  410. X
  411. XThe code uses your system's strftime(3) routine to generate some dates.
  412. XI have found that the arguments to this routine are not standard and have
  413. Xpicked a set that seems portable. This prints dates like:
  414. X    Saturday 06 November 1993
  415. Xand I prefer
  416. X    Saturday  6 November 1993
  417. XOn SunOS and Solaris, you can make the routine suppress the leading zero
  418. Xby using `%e' is place of `%d'. If your system supports this, uncomment
  419. Xthe relevant lines in XCal.ad before installing. This file also acts as
  420. Xa default fallback set of resources, so if you uncomment the lines, it's
  421. Xa good idea to rebuild xcal.
  422. X
  423. XIf you are unsure what your system supports, compile the program
  424. Xstrftime/ptime and see what is generated by different formats.
  425. X
  426. XNote on help installation:
  427. X
  428. XTo regenerate the help that is loaded into the program, run
  429. X    sh C_from_help.sh
  430. Xthis makes xcal_help.h from XCal.help.
  431. X
  432. XTo have NO help strings built in, change xcal_help.h to read
  433. X
  434. Xchar helpdata[1];
  435. X
  436. END_OF_FILE
  437. if test 1973 -ne `wc -c <'README.install'`; then
  438.     echo shar: \"'README.install'\" unpacked with wrong size!
  439. fi
  440. # end of 'README.install'
  441. fi
  442. if test -f 'README.sunos' -a "${1}" != "-c" ; then 
  443.   echo shar: Will not clobber existing file \"'README.sunos'\"
  444. else
  445. echo shar: Extracting \"'README.sunos'\" \(900 characters\)
  446. sed "s/^X//" >'README.sunos' <<'END_OF_FILE'
  447. XOn my 4.1.3 system running OpenWindows III.  I get an apparent problem
  448. Xwhen xcal is loaded, it says:
  449. X
  450. Xcc -o xcal -O xcal.o xcal_alarm.o xcal_buts.o xcal_edit.o xcal_help.o
  451. X    xcal_popup.o xcal_strip.o xcal_memo.o strfdate.o version.o -lXaw -lXmu
  452. X    -lXt -lXext -lX11 -lm 
  453. X
  454. Xld: Undefined symbol
  455. X   _get_wmShellWidgetClass
  456. X   _get_applicationShellWidgetClass
  457. Xcollect: /usr/bin/ld returned 2 exit status
  458. X*** Error code 1
  459. Xmake: Fatal error: Command failed for target `xcal'
  460. X
  461. XThis is something to do with shared libraries and -lXmu.
  462. X
  463. XEVEN with this message, xcal runs happily. 
  464. X
  465. XSo - ignore the message above - OR change the Makefile from
  466. X
  467. X    $(CC) -o $@ $(LDOPTIONS) $(OBJS1)  $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(LDLIBS)  -lm $(EXTRA_LOAD_FLAGS)
  468. Xto
  469. X
  470. X    $(CC) -o $@ $(LDOPTIONS) $(OBJS1)  $(XAWLIB) -Bstatic $(XMULIB) -Bdynamic $(XTOOLLIB) $(XLIB) $(LDLIBS)  -lm $(EXTRA_LOAD_FLAGS)
  471. X
  472. Xand things will be OK.
  473. END_OF_FILE
  474. if test 900 -ne `wc -c <'README.sunos'`; then
  475.     echo shar: \"'README.sunos'\" unpacked with wrong size!
  476. fi
  477. # end of 'README.sunos'
  478. fi
  479. if test -f 'TODO' -a "${1}" != "-c" ; then 
  480.   echo shar: Will not clobber existing file \"'TODO'\"
  481. else
  482. echo shar: Extracting \"'TODO'\" \(396 characters\)
  483. sed "s/^X//" >'TODO' <<'END_OF_FILE'
  484. X1)    Some people would like a way to deal with annual/monthly events
  485. X    and to integrate that with the current strip. Not sure that this
  486. X    will happen.
  487. X
  488. X2)    There should be better support for group Calendar files.
  489. X
  490. X3)    It should be in ANSI C
  491. X
  492. XThanks to the many people who have mailed to say thanks and added
  493. Xideas to xcal. Sorry to the people who I refused to listen to or whose
  494. Xideas I haven't used.
  495. X
  496. END_OF_FILE
  497. if test 396 -ne `wc -c <'TODO'`; then
  498.     echo shar: \"'TODO'\" unpacked with wrong size!
  499. fi
  500. # end of 'TODO'
  501. fi
  502. if test -f 'XCal.ad' -a "${1}" != "-c" ; then 
  503.   echo shar: Will not clobber existing file \"'XCal.ad'\"
  504. else
  505. echo shar: Extracting \"'XCal.ad'\" \(3562 characters\)
  506. sed "s/^X//" >'XCal.ad' <<'END_OF_FILE'
  507. X!    XCal.ad    1.21    11/6/93
  508. X!
  509. X!    Help filename if not using internal text
  510. X!XCal.helpFile: /usr/X11/lib/X11/app-defaults/XCal.help
  511. X!
  512. X!    Data format strings
  513. X!    I use these on my Sun - uncomment if your system supports
  514. X!    %e in strftime formats
  515. X!XCal.format: %A %e %B %Y
  516. X!XCal.editFmt: %A %e %B %Y
  517. X!XCal.already: Already editing %e %B %Y
  518. X!
  519. X!    Geometry
  520. XXCal.edit.geometry: 325x150
  521. XXCal.memo.geometry: 325x300
  522. XXCal.alarm.geometry: 325x100+0+150
  523. XXCal*help.geometry: 600x300
  524. X!
  525. X!    Fonts
  526. XXCal.fontToday: lucidasanstypewriter-12
  527. XXCal*Font: lucidasanstypewriter-12
  528. XXCal*info.Font: lucidasans-10
  529. XXCal*alarmText*Font: 12x24
  530. X!
  531. X! Top level dialogs
  532. XXCal*newdate.Label: Enter mmm yyyy?
  533. XXCal*newdate.ok.Label: OK
  534. XXCal*newdate.cancel.Label: Cancel
  535. XXCal*exit.Label: Really exit?
  536. XXCal*exit.yes.Label: Yes
  537. XXCal*exit.no.Label: No
  538. XXCal*noedit.ok.Label: OK
  539. X!
  540. X! Strips & edit windows
  541. XXCal*back.Label: <
  542. XXCal*quit.Label: Quit
  543. XXCal*next.Label: >
  544. XXCal*help.Label: Help
  545. XXCal*save.Label: Save
  546. XXCal*edit.quit.Label: Quit
  547. XXCal*edit.help.Label: Help
  548. XXCal*text.scrollVertical: WhenNeeded
  549. XXCal*text.scrollHorizontal: WhenNeeded
  550. XXCal*text.autoFill: True
  551. X! Popups from the edit windows
  552. XXCal*check.Label: Save file?
  553. XXCal*check.yes.Label: Yes
  554. XXCal*check.no.Label: No
  555. X! Alarms
  556. XXCal*alarmText*scrollVertical: WhenNeeded
  557. XXCal*alarmText*wrap: word
  558. XXCal*alarmQuit.Label: Unpin
  559. XXCal*alarmHold.Label: Stick
  560. X! Memo box
  561. XXCal*display.scrollVertical: WhenNeeded
  562. XXCal*display.scrollHorizontal: WhenNeeded
  563. XXCal*display.cursor: dot
  564. XXCal*memoTitle.Label: Edit the memo file
  565. XXCal*weeklyEdit.Label: Edit
  566. XXCal*weeklyTitle.Label: Today's regular events
  567. XXCal*edit.Label: Edit
  568. XXCal*memocheck.Label: Save memo file?
  569. XXCal*memocheck.yes.Label: Yes
  570. XXCal*memocheck.no.Label: No
  571. XXCal*memoText.scrollVertical: WhenNeeded
  572. XXCal*memoText.scrollHorizontal: WhenNeeded
  573. X! Help
  574. XXCal*helpText.scrollVertical: Always
  575. XXCal*helpText.scrollHorizontal: WhenNeeded
  576. XXCal*helpText.autoFill: True
  577. XXCal*help*helpQuit.Label: Quit
  578. X!
  579. X! Colours from pc - not convinced about this, I need to live with a 
  580. X! colour screen for a bit to see what should be done
  581. X!
  582. X!XCal.MarkBackground:        wheat1
  583. X!XCal*background:        wheat1
  584. X!XCal*foreground:        black
  585. X!XCal*quit.foreground:        black
  586. X!XCal*quit.background:        wheat2
  587. X!XCal*edit.foreground:        black
  588. X!XCal*edit.background:        wheat2
  589. X!XCal*weeklyEdit.foreground:    black
  590. X!XCal*weeklyEdit.background:    wheat2
  591. X!XCal*next.foreground:        black
  592. X!XCal*next.background:        wheat2
  593. X!XCal*back.foreground:        black
  594. X!XCal*back.background:        wheat2
  595. X!XCal*help.foreground:        black
  596. X!XCal*help.background:        wheat2
  597. X!XCal*save.foreground:        black
  598. X!XCal*save.background:        wheat2
  599. X!XCal*yes.foreground:        black
  600. X!XCal*yes.background:        wheat2
  601. X!XCal*no.foreground:        black
  602. X!XCal*no.background:        wheat2
  603. X!XCal*helpQuit.foreground:    black
  604. X!XCal*helpQuit.background:    wheat2
  605. X!XCal*header.foreground:        black
  606. X!XCal*header.background:        wheat2
  607. X!XCal*Sun*Label*background:    wheat2
  608. X!XCal*Sat*Label*background:    wheat2
  609. X!
  610. X! Colours from reed wade@cs.utk.edu
  611. X!
  612. X!XCal*background:        LightSteelBlue
  613. X!XCal*foreground:        SaddleBrown
  614. X!XCal.MarkForeground: Black
  615. X!XCal.MarkBackground: CornflowerBlue
  616. X!XCal.edit.background: CornflowerBlue
  617. X!XCal.edit.foreground: OliveGreen
  618. X!XCal*exit.background: MediumTurquoise
  619. X!XCal*exit.foreground: SlateGrey
  620. X!XCal*check.background:  lavender
  621. X!XCal*help*background: wheat
  622. X!XCal*help*foreground: blue
  623. X!XCal*newdate*background: plum
  624. X!XCal*newdate*foreground: red
  625. X!XCal*quit.background:   SteelBlue
  626. X!XCal*quit.background:   green
  627. X!XCal*back.background: yellow
  628. X!XCal*next.background: yellow
  629. X!XCal*no.background: DarkKhaki
  630. X!XCal*yes.background: PapayaWhip
  631. END_OF_FILE
  632. if test 3562 -ne `wc -c <'XCal.ad'`; then
  633.     echo shar: \"'XCal.ad'\" unpacked with wrong size!
  634. fi
  635. # end of 'XCal.ad'
  636. fi
  637. if test -f 'calendar.bm' -a "${1}" != "-c" ; then 
  638.   echo shar: Will not clobber existing file \"'calendar.bm'\"
  639. else
  640. echo shar: Extracting \"'calendar.bm'\" \(1880 characters\)
  641. sed "s/^X//" >'calendar.bm' <<'END_OF_FILE'
  642. X#define cal_width 48
  643. X#define cal_height 48
  644. Xstatic UNSIGNED char cal_bits[] = {
  645. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
  646. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  647. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  648. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  649. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  650. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  651. X   0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  652. X   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  653. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
  654. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  655. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  656. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  657. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  658. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  659. X   0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  660. X   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  661. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
  662. X   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  663. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  664. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  665. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  666. X   0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  667. X   0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  668. X   0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  669. END_OF_FILE
  670. if test 1880 -ne `wc -c <'calendar.bm'`; then
  671.     echo shar: \"'calendar.bm'\" unpacked with wrong size!
  672. fi
  673. # end of 'calendar.bm'
  674. fi
  675. if test -f 'help.bm' -a "${1}" != "-c" ; then 
  676.   echo shar: Will not clobber existing file \"'help.bm'\"
  677. else
  678. echo shar: Extracting \"'help.bm'\" \(248 characters\)
  679. sed "s/^X//" >'help.bm' <<'END_OF_FILE'
  680. X#define help_width 16
  681. X#define help_height 13
  682. Xstatic UNSIGNED char help_bits[] = {
  683. X   0x00, 0x00, 0xc0, 0x03, 0xe0, 0x07, 0x60, 0x06, 0x00, 0x06, 0x00, 0x06,
  684. X   0x80, 0x03, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x80, 0x01,
  685. X   0x00, 0x00};
  686. END_OF_FILE
  687. if test 248 -ne `wc -c <'help.bm'`; then
  688.     echo shar: \"'help.bm'\" unpacked with wrong size!
  689. fi
  690. # end of 'help.bm'
  691. fi
  692. if test -f 'help_press.bm' -a "${1}" != "-c" ; then 
  693.   echo shar: Will not clobber existing file \"'help_press.bm'\"
  694. else
  695. echo shar: Extracting \"'help_press.bm'\" \(266 characters\)
  696. sed "s/^X//" >'help_press.bm' <<'END_OF_FILE'
  697. X#define help_press_width 16
  698. X#define help_press_height 13
  699. Xstatic UNSIGNED char help_press_bits[] = {
  700. X   0x00, 0x00, 0xb0, 0x06, 0xa4, 0x12, 0x08, 0x08, 0xc2, 0x21, 0x24, 0x12,
  701. X   0x10, 0x04, 0xd6, 0x35, 0x90, 0x04, 0xa4, 0x12, 0xca, 0x29, 0xc8, 0x09,
  702. X   0xc0, 0x01};
  703. END_OF_FILE
  704. if test 266 -ne `wc -c <'help_press.bm'`; then
  705.     echo shar: \"'help_press.bm'\" unpacked with wrong size!
  706. fi
  707. # end of 'help_press.bm'
  708. fi
  709. if test -f 'mouse.bm' -a "${1}" != "-c" ; then 
  710.   echo shar: Will not clobber existing file \"'mouse.bm'\"
  711. else
  712. echo shar: Extracting \"'mouse.bm'\" \(251 characters\)
  713. sed "s/^X//" >'mouse.bm' <<'END_OF_FILE'
  714. X#define mouse_width 16
  715. X#define mouse_height 13
  716. Xstatic UNSIGNED char mouse_bits[] = {
  717. X   0xfe, 0x7f, 0xff, 0xff, 0x21, 0x84, 0xa1, 0xb5, 0xa1, 0xb5, 0xa1, 0xb5,
  718. X   0xa1, 0xb5, 0xa1, 0xb5, 0xa1, 0xb5, 0x21, 0x84, 0xff, 0xff, 0xff, 0xff,
  719. X   0xff, 0xff};
  720. END_OF_FILE
  721. if test 251 -ne `wc -c <'mouse.bm'`; then
  722.     echo shar: \"'mouse.bm'\" unpacked with wrong size!
  723. fi
  724. # end of 'mouse.bm'
  725. fi
  726. if test -f 'mouseaway.bm' -a "${1}" != "-c" ; then 
  727.   echo shar: Will not clobber existing file \"'mouseaway.bm'\"
  728. else
  729. echo shar: Extracting \"'mouseaway.bm'\" \(263 characters\)
  730. sed "s/^X//" >'mouseaway.bm' <<'END_OF_FILE'
  731. X#define mouseaway_width 16
  732. X#define mouseaway_height 13
  733. Xstatic UNSIGNED char mouseaway_bits[] = {
  734. X   0xfe, 0x7f, 0xff, 0xff, 0x21, 0x84, 0xad, 0xb5, 0xad, 0xb5, 0xad, 0xb5,
  735. X   0xad, 0xb5, 0xad, 0xb5, 0xad, 0xb5, 0x21, 0x84, 0xff, 0xff, 0xff, 0xff,
  736. X   0xff, 0xff};
  737. END_OF_FILE
  738. if test 263 -ne `wc -c <'mouseaway.bm'`; then
  739.     echo shar: \"'mouseaway.bm'\" unpacked with wrong size!
  740. fi
  741. # end of 'mouseaway.bm'
  742. fi
  743. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  744.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  745. else
  746. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  747. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  748. X#define PATCHLEVEL 0
  749. END_OF_FILE
  750. if test 21 -ne `wc -c <'patchlevel.h'`; then
  751.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  752. fi
  753. # end of 'patchlevel.h'
  754. fi
  755. if test ! -d 'pscal' ; then
  756.     echo shar: Creating directory \"'pscal'\"
  757.     mkdir 'pscal'
  758. fi
  759. if test -f 'pscal/Imakefile' -a "${1}" != "-c" ; then 
  760.   echo shar: Will not clobber existing file \"'pscal/Imakefile'\"
  761. else
  762. echo shar: Extracting \"'pscal/Imakefile'\" \(141 characters\)
  763. sed "s/^X//" >'pscal/Imakefile' <<'END_OF_FILE'
  764. XBINDIR=/usr/local/bin
  765. XAllTarget(pscal.script)
  766. XInstallScript(pscal,$(BINDIR))
  767. XInstallManPage(pscal,$(MANDIR))
  768. X
  769. Xdepend::
  770. X
  771. Xlint::
  772. X
  773. Xinstall.ln::
  774. END_OF_FILE
  775. if test 141 -ne `wc -c <'pscal/Imakefile'`; then
  776.     echo shar: \"'pscal/Imakefile'\" unpacked with wrong size!
  777. fi
  778. # end of 'pscal/Imakefile'
  779. fi
  780. if test -f 'pscal/README' -a "${1}" != "-c" ; then 
  781.   echo shar: Will not clobber existing file \"'pscal/README'\"
  782. else
  783. echo shar: Extracting \"'pscal/README'\" \(493 characters\)
  784. sed "s/^X//" >'pscal/README' <<'END_OF_FILE'
  785. XThis is a version of the pscal program that pretty prints calendars.
  786. XI have modified it to work from xcal data files stored in ~/Calendar.
  787. X
  788. XIf you are in the USA - you might like to edit pscal.script to revert
  789. Xpage translation back to your paper size:
  790. X
  791. XChange:
  792. X
  793. XTRANSLATE="71 -120"
  794. X
  795. Xto
  796. X
  797. XTRANSLATE="50 -120"
  798. X
  799. XThis has also been worked on by David Kotz who added the -d <directory>
  800. Xfeature and made it work on an old version of the Bourne shell that
  801. Xdoesn't grok shell statements like: shift 5
  802. X
  803. END_OF_FILE
  804. if test 493 -ne `wc -c <'pscal/README'`; then
  805.     echo shar: \"'pscal/README'\" unpacked with wrong size!
  806. fi
  807. # end of 'pscal/README'
  808. fi
  809. if test -f 'pscal/pscal.man' -a "${1}" != "-c" ; then 
  810.   echo shar: Will not clobber existing file \"'pscal/pscal.man'\"
  811. else
  812. echo shar: Extracting \"'pscal/pscal.man'\" \(3558 characters\)
  813. sed "s/^X//" >'pscal/pscal.man' <<'END_OF_FILE'
  814. X.TH PSCAL 1 "8/January/1990"
  815. X.SH NAME
  816. Xpscal
  817. X.SH SYNOPSIS:
  818. X.B pscal
  819. X[
  820. X.B \-Pprinter
  821. X] [
  822. X.B \-R
  823. X] [
  824. X.B \-r
  825. X] [
  826. X.B \-t
  827. X] [
  828. X.B \-d directory
  829. X] [
  830. X.B other printer flags
  831. X] [ month [ year ] ]
  832. X.SH DESCRIPTION:
  833. X.I Pscal
  834. Xgenerates the Postscript showing a calendar for the specified month and year. 
  835. XThe year, if omitted, defaults
  836. Xto the current year. 
  837. XIf both month and year are omitted, the current month is printed.
  838. X.I Year
  839. Xcan be between 1753
  840. Xand 9999.
  841. XThe
  842. X.I month
  843. Xis a number between 1 and 12.
  844. XI can also be a three letter month abbreviation.
  845. X.LP
  846. XThe calendar can be loaded with information from the user.
  847. XThe information either comes in an `Event' file or can be
  848. Xderived from files under the user's Calendar directory should this exist.
  849. XThe search for this data is as follows, if any of these succeeds the data
  850. Xfor the calendar is taken from that source.
  851. X.IP 1)
  852. XThe shell variable EFILE may be set to the name of an Event file.
  853. X.IP 2)
  854. XAn event file called `Event' may exist in the current directory.
  855. X.IP 3)
  856. XThe file $HOME/.holiday may exist and contain a list of events.
  857. X.IP 4)
  858. XThe directory $HOME/Calendar  (or a different directory specified
  859. Xwith the \-d option) may exist containing XCal files.
  860. X.LP
  861. XAn event file should consist of lines of the form
  862. X.IP
  863. Xmonth:day:message string
  864. X.LP
  865. XMessages should be 20 characters or less, with no more than 6
  866. Xmessages per day.
  867. XNo spaces should appear from the beginning
  868. Xof a line until after the second colon.
  869. XMonth and day should be numbers in the obvious ranges.
  870. X.SH OPTIONS
  871. X.IP "\-P\fIprinter\fR" 1i
  872. XThe printer may be specified with the usual \-P\fIprinter\fR syntax.
  873. X.IP "\-r" 1i
  874. XThe calendar page is printed in ``landscape'' orientation (the default).
  875. X.IP "\-R" 1i
  876. XThe calendar page is printed in ``portrait'' orientation; this
  877. Xyields a slightly smaller image and may be more suitable for
  878. Xembedding into other documents.
  879. X.IP "\-d \fIdirectory\fR" 1i
  880. XUse the given directory instead of $HOME/Calendar.
  881. X.IP "\-t" 1i
  882. XCauses the PostScript to be sent to the standard output, rather
  883. Xthan to the printer.  This is useful if you wish to save the
  884. Xoutput in a file, or if you want to use options with the
  885. X.IR lpr (1)
  886. Xcommand.
  887. X.IP "\-F\fIfont\fR" 1i
  888. XSets the font family for the title text (the month and year).
  889. X.IP "\-f\fIfont\fR" 1i
  890. XSets the font family for the day-of-month numbers.
  891. X.PP
  892. XOther arguments starting with `\-' are passed through to
  893. X.IR lpr (1).
  894. X.PP
  895. XAny argument whose first character is '-' is passed on to lpr.
  896. XThe shell variables BANNER, LFOOT, CFOOT, and RFOOT become a
  897. Xtop centered banner, and left, centered, or right justified
  898. Xfooters respectively.  As in:
  899. X.IP
  900. XBANNER="Schedule 1" CFOOT=Preliminary pscal 4 90
  901. X.SH AUTHOR
  902. XPatrick Wood
  903. X.br
  904. XCopyright (C) 1987 by Pipeline Associates, Inc.
  905. X.br
  906. XPermission is granted to modify and distribute this free of charge.
  907. X.SH HISTORY
  908. XOriginal From: patwood@unirot.UUCP (Patrick Wood)
  909. X.br
  910. XShell stuff added 3/9/87 by King Ables
  911. X.br
  912. XMade pretty by tjt 1988
  913. X.br
  914. XHoliday and printer flag passing hacks added Dec 1988 
  915. Xby smann@june.cs.washington.edu 
  916. X.br
  917. XUsed the better looking version with 5 rows of days rather than 6
  918. Xhacked together with holiday and banner/footnotes added
  919. Xby Joe (No Relation) Wood, 12/89, jlw@lzga.ATT.COM
  920. X.SH BUGS
  921. X`Pscal' doesn't work for months before 1753 (weird stuff happened
  922. Xin September, 1752).
  923. X.PP
  924. XA better format for the dates of holidays would be nice.
  925. XAn escape to allow holiday messages to be raw PostScript would
  926. Xalso be nice.
  927. X.PP
  928. XThe holiday messages should be handled more intelligently (ie,
  929. Xthe messages should be clipped to the day).
  930. X
  931. END_OF_FILE
  932. if test 3558 -ne `wc -c <'pscal/pscal.man'`; then
  933.     echo shar: \"'pscal/pscal.man'\" unpacked with wrong size!
  934. fi
  935. # end of 'pscal/pscal.man'
  936. fi
  937. if test -f 'run_xmkmf' -a "${1}" != "-c" ; then 
  938.   echo shar: Will not clobber existing file \"'run_xmkmf'\"
  939. else
  940. echo shar: Extracting \"'run_xmkmf'\" \(79 characters\)
  941. sed "s/^X//" >'run_xmkmf' <<'END_OF_FILE'
  942. Xxmkmf
  943. X(cd xcalev;xmkmf)
  944. X(cd xcalpr;xmkmf)
  945. X(cd xcal_cal;xmkmf)
  946. X(cd pscal;xmkmf)
  947. END_OF_FILE
  948. if test 79 -ne `wc -c <'run_xmkmf'`; then
  949.     echo shar: \"'run_xmkmf'\" unpacked with wrong size!
  950. fi
  951. chmod +x 'run_xmkmf'
  952. # end of 'run_xmkmf'
  953. fi
  954. if test -f 'sample.regular' -a "${1}" != "-c" ; then 
  955.   echo shar: Will not clobber existing file \"'sample.regular'\"
  956. else
  957. echo shar: Extracting \"'sample.regular'\" \(100 characters\)
  958. sed "s/^X//" >'sample.regular' <<'END_OF_FILE'
  959. XNovember 5    Fireworks night
  960. XDecember 25     Christmas
  961. XDecember 26    Boxing Day
  962. XDecember 31    New Year's Eve
  963. END_OF_FILE
  964. if test 100 -ne `wc -c <'sample.regular'`; then
  965.     echo shar: \"'sample.regular'\" unpacked with wrong size!
  966. fi
  967. # end of 'sample.regular'
  968. fi
  969. if test -f 'strfdate.c' -a "${1}" != "-c" ; then 
  970.   echo shar: Will not clobber existing file \"'strfdate.c'\"
  971. else
  972. echo shar: Extracting \"'strfdate.c'\" \(4960 characters\)
  973. sed "s/^X//" >'strfdate.c' <<'END_OF_FILE'
  974. X/*
  975. X *    This file is extracted from the BSD/386 sources.
  976. X *    It is distributable subject to the Copyright notice below
  977. X *    The code has been change for xcal.c purposes
  978. X *    The original code is also distributed with xcal in case your
  979. X *    system does not have the strftime() function
  980. X *    strfdate.c    1.3    11/4/93
  981. X */
  982. X
  983. X
  984. X/*
  985. X * Copyright (c) 1989 The Regents of the University of California.
  986. X * All rights reserved.
  987. X *
  988. X * Redistribution and use in source and binary forms, with or without
  989. X * modification, are permitted provided that the following conditions
  990. X * are met:
  991. X * 1. Redistributions of source code must retain the above copyright
  992. X *    notice, this list of conditions and the following disclaimer.
  993. X * 2. Redistributions in binary form must reproduce the above copyright
  994. X *    notice, this list of conditions and the following disclaimer in the
  995. X *    documentation and/or other materials provided with the distribution.
  996. X * 3. All advertising materials mentioning features or use of this software
  997. X *    must display the following acknowledgement:
  998. X *    This product includes software developed by the University of
  999. X *    California, Berkeley and its contributors.
  1000. X * 4. Neither the name of the University nor the names of its contributors
  1001. X *    may be used to endorse or promote products derived from this software
  1002. X *    without specific prior written permission.
  1003. X *
  1004. X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  1005. X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  1006. X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  1007. X * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  1008. X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  1009. X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  1010. X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  1011. X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  1012. X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  1013. X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  1014. X * SUCH DAMAGE.
  1015. X */
  1016. X
  1017. X#if defined(LIBC_SCCS) && !defined(lint)
  1018. Xstatic char sccsid[] = "@(#)strftime.c    5.11 (Berkeley) 2/24/91";
  1019. X#endif /* LIBC_SCCS and not lint */
  1020. X
  1021. X#include <sys/types.h>
  1022. X#include <sys/time.h>
  1023. X#include <string.h>
  1024. X#include <X11/Intrinsic.h>
  1025. X#include <X11/Xos.h>
  1026. X#include <X11/StringDefs.h>
  1027. X#include "xcal.h"
  1028. X
  1029. Xstatic char **afmt = appResources.sday;
  1030. X
  1031. Xstatic char **Afmt = appResources.day;
  1032. X
  1033. Xstatic char **bfmt = appResources.smon;
  1034. Xstatic char **Bfmt = appResources.mon;
  1035. X
  1036. Xstatic size_t gsize;
  1037. Xstatic char *pt;
  1038. Xstatic int _add(), _conv();
  1039. Xstatic size_t _fmt();
  1040. X
  1041. X
  1042. X
  1043. Xsize_t
  1044. Xstrfdate(s, maxsize, format, d)
  1045. X    char *s;
  1046. X    size_t maxsize;
  1047. X    char *format;
  1048. X    Date *d;
  1049. X{
  1050. X    pt = s;
  1051. X    if ((gsize = maxsize) < 1)
  1052. X        return(0);
  1053. X    if (_fmt(format, d)) {
  1054. X        *pt = '\0';
  1055. X        return(maxsize - gsize);
  1056. X    }
  1057. X    return(0);
  1058. X}
  1059. X
  1060. Xstatic size_t
  1061. X_fmt(format, d)
  1062. X    register char *format;
  1063. X    Date *d;
  1064. X{
  1065. X    for (; *format; ++format) {
  1066. X        if (*format == '%')
  1067. X            switch(*++format) {
  1068. X            case '\0':
  1069. X                --format;
  1070. X                break;
  1071. X            case 'A':
  1072. X                if (d->wday < 0 || d->wday > 6)
  1073. X                    return(0);
  1074. X                if (!_add(Afmt[d->wday]))
  1075. X                    return(0);
  1076. X                continue;
  1077. X            case 'a':
  1078. X                if (d->wday < 0 || d->wday > 6)
  1079. X                    return(0);
  1080. X                if (!_add(afmt[d->wday]))
  1081. X                    return(0);
  1082. X                continue;
  1083. X            case 'B':
  1084. X                if (d->month < 0 || d->month > 11)
  1085. X                    return(0);
  1086. X                if (!_add(Bfmt[d->month]))
  1087. X                    return(0);
  1088. X                continue;
  1089. X            case 'b':
  1090. X            case 'h':
  1091. X                if (d->month < 0 || d->month > 11)
  1092. X                    return(0);
  1093. X                if (!_add(bfmt[d->month]))
  1094. X                    return(0);
  1095. X                continue;
  1096. X            case 'D':
  1097. X                if (!_fmt("%m/%d/%y", d))
  1098. X                    return(0);
  1099. X                continue;
  1100. X            case 'd':
  1101. X                if (!_conv(d->day, 2, '0'))
  1102. X                    return(0);
  1103. X                continue;
  1104. X            case 'e':
  1105. X                if (!_conv(d->day, 2, ' '))
  1106. X                    return(0);
  1107. X                continue;
  1108. X            case 'm':
  1109. X                if (!_conv(d->month + 1, 2, '0'))
  1110. X                    return(0);
  1111. X                continue;
  1112. X            case 'n':
  1113. X                if (!_add("\n"))
  1114. X                    return(0);
  1115. X                continue;
  1116. X            case 't':
  1117. X                if (!_add("\t"))
  1118. X                    return(0);
  1119. X                continue;
  1120. X            case 'x':
  1121. X                if (!_fmt("%m/%d/%y", d))
  1122. X                    return(0);
  1123. X                continue;
  1124. X            case 'y':
  1125. X                if (!_conv((d->year)
  1126. X                    % 100, 2, '0'))
  1127. X                    return(0);
  1128. X                continue;
  1129. X            case 'Y':
  1130. X                if (!_conv(d->year, 4, '0'))
  1131. X                    return(0);
  1132. X                continue;
  1133. X            case '%':
  1134. X            /*
  1135. X             * X311J/88-090 (4.12.3.5): if conversion char is
  1136. X             * undefined, behavior is undefined.  Print out the
  1137. X             * character itself as printf(3) does.
  1138. X             */
  1139. X            default:
  1140. X                break;
  1141. X        }
  1142. X        if (!gsize--)
  1143. X            return(0);
  1144. X        *pt++ = *format;
  1145. X    }
  1146. X    return(gsize);
  1147. X}
  1148. X
  1149. Xstatic
  1150. X_conv(n, digits, pad)
  1151. X    int n, digits;
  1152. X    char pad;
  1153. X{
  1154. X    static char buf[10];
  1155. X    register char *p;
  1156. X
  1157. X    for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits)
  1158. X        *p-- = n % 10 + '0';
  1159. X    while (p > buf && digits-- > 0)
  1160. X        *p-- = pad;
  1161. X    return(_add(++p));
  1162. X}
  1163. X
  1164. Xstatic
  1165. X_add(str)
  1166. X    register char *str;
  1167. X{
  1168. X    for (;; ++pt, --gsize) {
  1169. X        if (!gsize)
  1170. X            return(0);
  1171. X        if (!(*pt = *str++))
  1172. X            return(1);
  1173. X    }
  1174. X}
  1175. END_OF_FILE
  1176. if test 4960 -ne `wc -c <'strfdate.c'`; then
  1177.     echo shar: \"'strfdate.c'\" unpacked with wrong size!
  1178. fi
  1179. # end of 'strfdate.c'
  1180. fi
  1181. if test ! -d 'strftime' ; then
  1182.     echo shar: Creating directory \"'strftime'\"
  1183.     mkdir 'strftime'
  1184. fi
  1185. if test -f 'strftime/README' -a "${1}" != "-c" ; then 
  1186.   echo shar: Will not clobber existing file \"'strftime/README'\"
  1187. else
  1188. echo shar: Extracting \"'strftime/README'\" \(350 characters\)
  1189. sed "s/^X//" >'strftime/README' <<'END_OF_FILE'
  1190. XThe xcal program now uses strftime to create dates and time strings.
  1191. X
  1192. XI include the Net II version here, just in case you don't have it on
  1193. Xyour system.
  1194. X
  1195. XI would guess that it will need some work to make it compile in a
  1196. Xnon BSD environment.
  1197. X
  1198. XThe program `ptime' here is a test bed for the strftime routine.
  1199. XSee ../README.install for more information.
  1200. END_OF_FILE
  1201. if test 350 -ne `wc -c <'strftime/README'`; then
  1202.     echo shar: \"'strftime/README'\" unpacked with wrong size!
  1203. fi
  1204. # end of 'strftime/README'
  1205. fi
  1206. if test -f 'strftime/ptime.c' -a "${1}" != "-c" ; then 
  1207.   echo shar: Will not clobber existing file \"'strftime/ptime.c'\"
  1208. else
  1209. echo shar: Extracting \"'strftime/ptime.c'\" \(876 characters\)
  1210. sed "s/^X//" >'strftime/ptime.c' <<'END_OF_FILE'
  1211. X#ifndef lint
  1212. Xstatic char    *sccsid = "%W% (Hillside Systems) %G%";
  1213. Xstatic char    *copyright = "@(#)Copyright 1989,1990,1993 Peter Collinson, Hillside Systems";
  1214. X#endif                /* lint */
  1215. X/***
  1216. X
  1217. X* program name:
  1218. X    ptime.c
  1219. X* function:
  1220. X    diagnostic program for strftime.
  1221. X    When given a number of strings, eg
  1222. X        ptime "%x X"
  1223. X    will invoke the strftime routine to print the result.
  1224. X* libraries used:
  1225. X    standard
  1226. X* compile time parameters:
  1227. X    cc -o ptime -O ptime.c
  1228. X* history:
  1229. X    Written November 1993
  1230. X    Peter Collinson
  1231. X    Hillside Systems
  1232. X* (C) Copyright: 1993 Hillside Systems/Peter Collinson
  1233. X    
  1234. X***/
  1235. X#include <stdio.h>
  1236. X#include <unistd.h>
  1237. X#include <time.h>
  1238. X
  1239. Xchar    buf[512];
  1240. X
  1241. Xmain(argc, argv)
  1242. X    int    argc;
  1243. X    char    **argv;
  1244. X{
  1245. X    time_t        ti;
  1246. X    struct tm    *tm;
  1247. X    time(&ti);
  1248. X    tm = localtime(&ti);
  1249. X
  1250. X    while (--argc) {
  1251. X        argv++;
  1252. X        strftime(buf, sizeof buf, *argv, tm);
  1253. X        printf("%s - %s\n", *argv, buf);
  1254. X    }
  1255. X    exit(0);
  1256. X}
  1257. END_OF_FILE
  1258. if test 876 -ne `wc -c <'strftime/ptime.c'`; then
  1259.     echo shar: \"'strftime/ptime.c'\" unpacked with wrong size!
  1260. fi
  1261. # end of 'strftime/ptime.c'
  1262. fi
  1263. if test -f 'version.c' -a "${1}" != "-c" ; then 
  1264.   echo shar: Will not clobber existing file \"'version.c'\"
  1265. else
  1266. echo shar: Extracting \"'version.c'\" \(933 characters\)
  1267. sed "s/^X//" >'version.c' <<'END_OF_FILE'
  1268. X/*
  1269. X *    Version control file
  1270. X *    version.c    4.1    11/17/93
  1271. X *    Automatically created on Wed Nov 17 11:23:44 GMT 1993
  1272. X *    
  1273. X *    Hand edit none of this if you want freeze to continue to work
  1274. X */
  1275. X#ifdef    VER_PROG
  1276. X#define    PROGNAME    XCal
  1277. X#endif
  1278. X#ifdef    VER_VEC
  1279. Xchar    version[] = "XCal Version 4.1, released Wed Nov 17 11:23:44 GMT 1993";
  1280. X#endif
  1281. X#ifdef    VER_DEF
  1282. X#define    VERSION    "XCal Version 4.1, released Wed Nov 17 11:23:44 GMT 1993"
  1283. X#endif
  1284. X
  1285. X/*    SCCS files
  1286. X *
  1287. X+1.26    Imakefile
  1288. X+3.19    xcal_help.c
  1289. X+1.3    calendar.bm
  1290. X+1.26    xcal.man
  1291. X+1.22    xcal_memo.c
  1292. X+1.21    XCal.ad
  1293. X+1.24    xcal_alarm.c
  1294. X+3.37    xcal_edit.c
  1295. X+1.8    README
  1296. X+2.3    patchlevel.h
  1297. X+3.27    xcal_strip.c
  1298. X+1.3    help_press.bm
  1299. X+3.13    xcal_popup.c
  1300. X+3.50    xcal.c
  1301. X+3.32    xcal.h
  1302. X+2.38    CHANGES
  1303. X+1.3    mouse.bm
  1304. X+1.3    mouseaway.bm
  1305. X+1.2    XCal.help
  1306. X+1.3    help.bm
  1307. X+1.2    README.sunos
  1308. X+1.2    xcal_days.c
  1309. X+1.3    xcal_buts.c
  1310. X+1.2    C_from_help.sh
  1311. X+1.3    strfdate.c
  1312. X+1.1    C_from_ad.sh
  1313. X+1.2    README.install
  1314. X+1.1    README.contents
  1315. X+1.1    xcal_mmap.h
  1316. X *
  1317. X */
  1318. END_OF_FILE
  1319. if test 933 -ne `wc -c <'version.c'`; then
  1320.     echo shar: \"'version.c'\" unpacked with wrong size!
  1321. fi
  1322. # end of 'version.c'
  1323. fi
  1324. if test -f 'xcal_buts.c' -a "${1}" != "-c" ; then 
  1325.   echo shar: Will not clobber existing file \"'xcal_buts.c'\"
  1326. else
  1327. echo shar: Extracting \"'xcal_buts.c'\" \(3679 characters\)
  1328. sed "s/^X//" >'xcal_buts.c' <<'END_OF_FILE'
  1329. X#ifndef lint
  1330. Xstatic char    *sccsid = "@(#)xcal_buts.c    1.3 (Hillside Systems) 10/25/93";
  1331. Xstatic char    *copyright = "@(#)Copyright 1989,1990,1993 Peter Collinson, Hillside Systems";
  1332. X#endif                /* lint */
  1333. X/***
  1334. X
  1335. X* module name:
  1336. X    xcal_buts.c
  1337. X* function:
  1338. X    Deal with callback management for sensitive buttons
  1339. X    When a button is pressed we make it insensitive.
  1340. X    In general a button starts a popup - when the popup
  1341. X    dies we reset the button.
  1342. X    Problem is when the button dies before the popup.
  1343. X
  1344. X* history:
  1345. X    Written October 1993
  1346. X    Peter Collinson
  1347. X    Hillside Systems
  1348. X* (C) Copyright: 1989 Hillside Systems/Peter Collinson
  1349. X
  1350. X    For full permissions and copyright notice - see xcal.c
  1351. X***/
  1352. X#include <stdio.h>
  1353. X#include <ctype.h>
  1354. X#include <pwd.h>
  1355. X#include <X11/Intrinsic.h>
  1356. X#include <X11/Xos.h>
  1357. X#include <X11/StringDefs.h>
  1358. X#include <X11/Xaw/Command.h>
  1359. X#include "xcal.h"
  1360. X
  1361. Xtypedef struct active {
  1362. X    struct active   *next;
  1363. X    Widget        button;
  1364. X    Widget        popup;
  1365. X} Active;
  1366. X
  1367. Xstatic Active *act;
  1368. X
  1369. X/*
  1370. X * Local routines
  1371. X */
  1372. Xstatic void AddToActive();
  1373. Xstatic Active *LookActive();
  1374. Xstatic Active *LookPopup();
  1375. Xstatic void DeleteFromActive();
  1376. Xstatic void PopupIsDead();
  1377. Xstatic void ButtonIsDead();
  1378. X
  1379. X/*
  1380. X * Here's the global entry point
  1381. X * given a button and a popup
  1382. X * make the button insensitive
  1383. X * add a destroy callback to the popup to turn the button on again when
  1384. X * the popup dies - assuming the button is in the list
  1385. X * add a destroy callback to the button to remove the button from the list
  1386. X */
  1387. Xvoid
  1388. XButtonOff(but, popup)
  1389. X    Widget        but;
  1390. X    Widget        popup;
  1391. X{
  1392. X    
  1393. X    XtSetSensitive(but, False);
  1394. X    
  1395. X    XtAddCallback(popup, XtNdestroyCallback, PopupIsDead, but);
  1396. X
  1397. X    XtAddCallback(but, XtNdestroyCallback, ButtonIsDead, but);
  1398. X
  1399. X    AddToActive(but, popup);
  1400. X}
  1401. X
  1402. X/*
  1403. X * Turn a button on
  1404. X */
  1405. Xvoid
  1406. XButtonOn(but)
  1407. X    Widget        but;
  1408. X{
  1409. X    Active        *ap;
  1410. X
  1411. X    if (ap = LookActive(but)) {
  1412. X        XtRemoveCallback(but, XtNdestroyCallback, ButtonIsDead, but);
  1413. X        XtSetSensitive(but, True);
  1414. X        DeleteFromActive(but);
  1415. X    }
  1416. X}
  1417. X
  1418. X/*
  1419. X * Turn a help button on
  1420. X */
  1421. Xvoid
  1422. XHelpButtonOn(popup)
  1423. X    Widget        popup;
  1424. X{
  1425. X    Active        *ap;
  1426. X
  1427. X    while (ap = LookPopup(popup))
  1428. X        ButtonOn(ap->button);
  1429. X}
  1430. X
  1431. X/*
  1432. X * Callbacks
  1433. X * 1) called from popup when it dies
  1434. X */
  1435. X/* ARGSUSED */
  1436. Xstatic void
  1437. XPopupIsDead(w, closure, call_data)
  1438. X    Widget        w;
  1439. X    caddr_t         closure;
  1440. X    caddr_t         call_data;
  1441. X    
  1442. X{
  1443. X    ButtonOn((Widget) closure);
  1444. X}
  1445. X
  1446. X/*
  1447. X * Callbacks
  1448. X * 2) called when button is dead
  1449. X */
  1450. X/* ARGSUSED */
  1451. Xstatic void
  1452. XButtonIsDead(w, closure, call_data)
  1453. X    Widget        w;
  1454. X    caddr_t         closure;
  1455. X    caddr_t         call_data;
  1456. X    
  1457. X{
  1458. X    Active           *ap;
  1459. X    Widget        but = (Widget)closure;
  1460. X
  1461. X    if (ap = LookActive(but)) {
  1462. X        XtRemoveCallback(ap->popup, XtNdestroyCallback, PopupIsDead, but);
  1463. X        DeleteFromActive(but);
  1464. X    }
  1465. X}
  1466. X
  1467. X/*
  1468. X * Add a button to the active list
  1469. X */
  1470. Xstatic void
  1471. XAddToActive(but, popup)
  1472. X    Widget        but;
  1473. X    Widget        popup;
  1474. X{
  1475. X    Active            *ap;
  1476. X
  1477. X    if (LookActive(but) == NULL) {
  1478. X        ap = (Active *) XtMalloc(sizeof (Active));
  1479. X        ap->button = but;
  1480. X        ap->popup = popup;
  1481. X        ap->next = act;
  1482. X        act = ap;
  1483. X    } /* not convinced that the else arm here is a never happen */
  1484. X}
  1485. X
  1486. Xstatic Active *
  1487. XLookActive(but)
  1488. X    Widget        but;
  1489. X{
  1490. X    Active           *ap;
  1491. X    
  1492. X    for (ap = act; ap; ap = ap->next) {
  1493. X        if (ap->button == but)
  1494. X            return ap;
  1495. X    }
  1496. X    return NULL;
  1497. X}
  1498. X
  1499. Xstatic Active *
  1500. XLookPopup(popup)
  1501. X    Widget        popup;
  1502. X{
  1503. X    Active           *ap;
  1504. X    
  1505. X    for (ap = act; ap; ap = ap->next) {
  1506. X        if (ap->popup == popup)
  1507. X            return ap;
  1508. X    }
  1509. X    return NULL;
  1510. X}
  1511. X
  1512. X/*
  1513. X * remove an active entry
  1514. X */
  1515. Xstatic void
  1516. XDeleteFromActive(but)
  1517. X    Widget        but;
  1518. X{
  1519. X    Active           *ap;
  1520. X    Active           *lp = NULL;
  1521. X
  1522. X    for (ap = act; ap; ap = ap->next) {
  1523. X        if (ap->button == but) {
  1524. X            if (lp == NULL) 
  1525. X                act = ap->next;
  1526. X            else
  1527. X                lp->next = ap->next;
  1528. X            XtFree((char *)ap);
  1529. X            return;
  1530. X        }
  1531. X        lp = ap;
  1532. X    }
  1533. X}
  1534. X
  1535. END_OF_FILE
  1536. if test 3679 -ne `wc -c <'xcal_buts.c'`; then
  1537.     echo shar: \"'xcal_buts.c'\" unpacked with wrong size!
  1538. fi
  1539. # end of 'xcal_buts.c'
  1540. fi
  1541. if test ! -d 'xcal_cal' ; then
  1542.     echo shar: Creating directory \"'xcal_cal'\"
  1543.     mkdir 'xcal_cal'
  1544. fi
  1545. if test -f 'xcal_cal/Imakefile' -a "${1}" != "-c" ; then 
  1546.   echo shar: Will not clobber existing file \"'xcal_cal/Imakefile'\"
  1547. else
  1548. echo shar: Extracting \"'xcal_cal/Imakefile'\" \(119 characters\)
  1549. sed "s/^X//" >'xcal_cal/Imakefile' <<'END_OF_FILE'
  1550. XBINDIR=/usr/local/bin
  1551. X
  1552. XINSTPGMFLAGS=$(INSTBINFLAGS)
  1553. X
  1554. XAllTarget(xcal_cal)
  1555. XSimpleProgramTarget(xcal_cal)
  1556. X
  1557. XDependTarget()
  1558. END_OF_FILE
  1559. if test 119 -ne `wc -c <'xcal_cal/Imakefile'`; then
  1560.     echo shar: \"'xcal_cal/Imakefile'\" unpacked with wrong size!
  1561. fi
  1562. # end of 'xcal_cal/Imakefile'
  1563. fi
  1564. if test -f 'xcal_cal/README' -a "${1}" != "-c" ; then 
  1565.   echo shar: Will not clobber existing file \"'xcal_cal/README'\"
  1566. else
  1567. echo shar: Extracting \"'xcal_cal/README'\" \(115 characters\)
  1568. sed "s/^X//" >'xcal_cal/README' <<'END_OF_FILE'
  1569. XThis program was contributed by Ed Gould, then of Mt Xinu, now of DEC.
  1570. X
  1571. XI suspect that it is superseded by xcalpr.
  1572. END_OF_FILE
  1573. if test 115 -ne `wc -c <'xcal_cal/README'`; then
  1574.     echo shar: \"'xcal_cal/README'\" unpacked with wrong size!
  1575. fi
  1576. # end of 'xcal_cal/README'
  1577. fi
  1578. if test -f 'xcal_cal/xcal_cal.man' -a "${1}" != "-c" ; then 
  1579.   echo shar: Will not clobber existing file \"'xcal_cal/xcal_cal.man'\"
  1580. else
  1581. echo shar: Extracting \"'xcal_cal/xcal_cal.man'\" \(1141 characters\)
  1582. sed "s/^X//" >'xcal_cal/xcal_cal.man' <<'END_OF_FILE'
  1583. X.TH XCAL_CAL (1)
  1584. X.SH NAME
  1585. Xxcal_cal \- interface to calendar(1) for xcal
  1586. X.SH SYNOPSIS
  1587. X.B xcal_cal
  1588. X[
  1589. X.B \-d
  1590. Xdirectory
  1591. X] [
  1592. X.B \-f
  1593. Xfile
  1594. X] [
  1595. X.B \-m
  1596. X] [
  1597. X.B \-#
  1598. X]
  1599. X.SH DESCRIPTION
  1600. X.I Xcal_cal
  1601. Xreads through the files created by
  1602. X.IR xcal (1)
  1603. Xand creates a file suitable for use by
  1604. X.IR calendar (1).
  1605. XBy default, the files are found in a directory named
  1606. X``Calendar'' in the user's home directory;
  1607. Xan alternate directory may be specified with the
  1608. X.B \-d
  1609. Xflag.
  1610. X.LP
  1611. XOutput goes by default into a file named ``.xcal''
  1612. Xin the user's home directory;
  1613. Xit may be overridden with the
  1614. X.B \-f
  1615. Xflag.
  1616. XIn both cases, if the argument given begins with a slash (`/'),
  1617. Xthen it will be taken as a full path name, not as a path relative to the
  1618. Xuser's home directory.
  1619. XIf the argument begins with the two character sequence `./' then
  1620. Xit will be taken relative to the current directory.
  1621. XThis last form is primarily intended for use while debugging.
  1622. X.LP
  1623. XThe
  1624. X.B \-m
  1625. Xflag directs that multi-line entries in
  1626. X.I xcal
  1627. Xfiles be collected in their
  1628. Xentirety.
  1629. XBy default, only the first line is copied.
  1630. X.SH "SEE ALSO
  1631. Xxcal(1),xcalev(1),xcalpr(1)
  1632. X.SH AUTHOR
  1633. XEd Gould, Mt.Xinu. Thanks Ed.
  1634. END_OF_FILE
  1635. if test 1141 -ne `wc -c <'xcal_cal/xcal_cal.man'`; then
  1636.     echo shar: \"'xcal_cal/xcal_cal.man'\" unpacked with wrong size!
  1637. fi
  1638. # end of 'xcal_cal/xcal_cal.man'
  1639. fi
  1640. if test -f 'xcal_mmap.h' -a "${1}" != "-c" ; then 
  1641.   echo shar: Will not clobber existing file \"'xcal_mmap.h'\"
  1642. else
  1643. echo shar: Extracting \"'xcal_mmap.h'\" \(238 characters\)
  1644. sed "s/^X//" >'xcal_mmap.h' <<'END_OF_FILE'
  1645. X/*
  1646. X *      xcal_mmap.h     1.1     11/6/93
  1647. X *
  1648. X *      mmap control file
  1649. X *    All programs that use mmap include this file
  1650. X *    if your system does not have mmap or it gives errors,
  1651. X *    #define NO_MMAP in this file.
  1652. X */
  1653. X/* #define NO_MMAP */
  1654. END_OF_FILE
  1655. if test 238 -ne `wc -c <'xcal_mmap.h'`; then
  1656.     echo shar: \"'xcal_mmap.h'\" unpacked with wrong size!
  1657. fi
  1658. # end of 'xcal_mmap.h'
  1659. fi
  1660. if test ! -d 'xcalev' ; then
  1661.     echo shar: Creating directory \"'xcalev'\"
  1662.     mkdir 'xcalev'
  1663. fi
  1664. if test -f 'xcalev/Imakefile' -a "${1}" != "-c" ; then 
  1665.   echo shar: Will not clobber existing file \"'xcalev/Imakefile'\"
  1666. else
  1667. echo shar: Extracting \"'xcalev/Imakefile'\" \(134 characters\)
  1668. sed "s/^X//" >'xcalev/Imakefile' <<'END_OF_FILE'
  1669. XDEFINES=-DVER_VEC
  1670. X
  1671. XBINDIR=/usr/local/bin
  1672. XINSTPGMFLAGS=$(INSTBINFLAGS)
  1673. X
  1674. XAllTarget(xcalev)
  1675. X
  1676. XSimpleProgramTarget(xcalev)
  1677. X
  1678. XDependTarget()
  1679. END_OF_FILE
  1680. if test 134 -ne `wc -c <'xcalev/Imakefile'`; then
  1681.     echo shar: \"'xcalev/Imakefile'\" unpacked with wrong size!
  1682. fi
  1683. # end of 'xcalev/Imakefile'
  1684. fi
  1685. if test -f 'xcalev/version.h' -a "${1}" != "-c" ; then 
  1686.   echo shar: Will not clobber existing file \"'xcalev/version.h'\"
  1687. else
  1688. echo shar: Extracting \"'xcalev/version.h'\" \(499 characters\)
  1689. sed "s/^X//" >'xcalev/version.h' <<'END_OF_FILE'
  1690. X/*
  1691. X *    Version control file
  1692. X *    version.h    1.5    11/15/93
  1693. X *    Automatically created on Mon Nov 15 23:57:53 GMT 1993
  1694. X *    
  1695. X *    Hand edit none of this if you want freeze to continue to work
  1696. X */
  1697. X#ifdef    VER_PROG
  1698. X#define    PROGNAME    xcalev
  1699. X#endif
  1700. X#ifdef    VER_VEC
  1701. Xchar    version[] = "xcalev Version 1.5, released Mon Nov 15 23:57:53 GMT 1993";
  1702. X#endif
  1703. X#ifdef    VER_DEF
  1704. X#define    VERSION    "xcalev Version 1.5, released Mon Nov 15 23:57:53 GMT 1993"
  1705. X#endif
  1706. X
  1707. X/*    SCCS files
  1708. X *
  1709. X+1.15    xcalev.c
  1710. X+1.2    xcalev.man
  1711. X+1.6    Imakefile
  1712. X *
  1713. X */
  1714. END_OF_FILE
  1715. if test 499 -ne `wc -c <'xcalev/version.h'`; then
  1716.     echo shar: \"'xcalev/version.h'\" unpacked with wrong size!
  1717. fi
  1718. # end of 'xcalev/version.h'
  1719. fi
  1720. if test -f 'xcalev/xcalev.man' -a "${1}" != "-c" ; then 
  1721.   echo shar: Will not clobber existing file \"'xcalev/xcalev.man'\"
  1722. else
  1723. echo shar: Extracting \"'xcalev/xcalev.man'\" \(2821 characters\)
  1724. sed "s/^X//" >'xcalev/xcalev.man' <<'END_OF_FILE'
  1725. X.TH XCALEV 1 "October 1993" "X Version 11 R5"
  1726. X.SH NAME
  1727. Xxcalev \- load xcal calendar files with regular dates
  1728. X.SH SYNTAX
  1729. X.B xcalev
  1730. X[
  1731. X.B \-r
  1732. X][
  1733. X.B \-x
  1734. X][
  1735. X.B \-f
  1736. Xfile
  1737. X][
  1738. X.B \-d
  1739. X.I dir
  1740. X][
  1741. X.I year
  1742. X]
  1743. X.SH DESCRIPTION
  1744. X.I Xcalev
  1745. Xis used to preload the calendar files for the
  1746. X.I xcal
  1747. Xprogram with regular events in your life.
  1748. XIt reads lines from a file (usually called 
  1749. X.B regular
  1750. Xstored in your
  1751. X.B Calendar
  1752. Xdirectory.
  1753. XEach line in the file contains three fields separated by
  1754. Xspaces or tabs, these are:
  1755. Xa month name, a day in the month and some text.
  1756. XFor example:
  1757. X.br
  1758. X.nf
  1759. X
  1760. X    December 25    Christmas
  1761. X    Dec 31        New Year's Eve
  1762. X.fi
  1763. X.LP
  1764. XThe order of the month and the day are optional, the program deduces the day
  1765. Xby looking whether the string contains an initial numeric character or not.
  1766. XThe year defaults to the current year unless the program is given a year
  1767. Xnumber as an argument.
  1768. XThis year cannot be abbreviated to two digits because
  1769. X.I xcal
  1770. X deals with years from year zero.
  1771. XThere's a rough validity check on this.
  1772. X.LP
  1773. XThe string from the data line
  1774. Xis inserted in the appropriate file and will appear in your
  1775. X.I xcal
  1776. Xdate strip.
  1777. XNothing will happen if the string already exists in the file for that day.
  1778. XThis means that it's safe to run 
  1779. X.I xcalev
  1780. Xat any time, only the strings that have altered in the 
  1781. X.B regular
  1782. Xfile
  1783. Xwill be updated.
  1784. X.LP
  1785. XTo help with entering the same event for a number of days in one month, you
  1786. Xcan give a day range with a hyphen
  1787. X.br
  1788. X.nf
  1789. X    Jan 16-21    Usenix SF
  1790. X.fi
  1791. X.LP
  1792. XIf you supply the
  1793. X.I \-r
  1794. Xoption,
  1795. X.I xcalev
  1796. Xwill delete all the matching strings that it finds in the appropriate daily file.
  1797. XSo, if you want to make radical changes to the
  1798. X.B regular
  1799. Xfile, you
  1800. Xshould run
  1801. X.I xcalev
  1802. Xwith the
  1803. X.I \-r
  1804. Xoption to remove all the current
  1805. Xentries from one year, edit the
  1806. X.B regular
  1807. Xfile and run
  1808. X.I xcalev
  1809. Xto reload things.
  1810. X.SH OPTIONS
  1811. X.LP
  1812. XThe
  1813. X.I \-r
  1814. Xoption makes 
  1815. X.I xcalev
  1816. Xdelete rather than append entries.
  1817. X.LP
  1818. XThe
  1819. X.I \-x
  1820. Xoption makes
  1821. X.I xcalev
  1822. Xoperate with Calendar files that are compatible
  1823. Xwith the
  1824. X.I xcalendar
  1825. Xprogram.
  1826. X.LP
  1827. XThe
  1828. X.I \-f
  1829. Xswitch is followed by a filename gives an alternative name for the
  1830. X.B regular
  1831. Xfile.
  1832. XIf the filename does not start with a slash or a dot, then the name of
  1833. Xyour Calendar directory will be prepended to it.
  1834. X.LP
  1835. XThe
  1836. X.I \-d
  1837. Xswitch is followed by a directory name and specifies an alterative
  1838. Xlocation for your Calendar directory.
  1839. XYour home directory is prepended if the name doesn't start with a slash
  1840. Xor a dot.
  1841. X.SH FILES
  1842. X.PP
  1843. X$HOME/Calendar/\(**
  1844. X.LP
  1845. X.TP "\w'xc<dd><Mon><Year>  'u"
  1846. Xxc<dd><Mon><Year>
  1847. XA data file is day, Month in three letter format and the year.
  1848. X.TP
  1849. Xxy<Year>
  1850. XA year directory.
  1851. X.TP
  1852. Xxw<Day>
  1853. XA data file for the weekly code, one per day.
  1854. X.SH SEE ALSO
  1855. Xxcal(1), xcalpr(1), xcal_cal(1)
  1856. X.SH AUTHOR
  1857. X.LP
  1858. XCopyright 1993 by Peter Collinson, Hillside Systems
  1859. XAll rights reserved.
  1860. X
  1861. END_OF_FILE
  1862. if test 2821 -ne `wc -c <'xcalev/xcalev.man'`; then
  1863.     echo shar: \"'xcalev/xcalev.man'\" unpacked with wrong size!
  1864. fi
  1865. # end of 'xcalev/xcalev.man'
  1866. fi
  1867. if test ! -d 'xcalpr' ; then
  1868.     echo shar: Creating directory \"'xcalpr'\"
  1869.     mkdir 'xcalpr'
  1870. fi
  1871. if test -f 'xcalpr/Imakefile' -a "${1}" != "-c" ; then 
  1872.   echo shar: Will not clobber existing file \"'xcalpr/Imakefile'\"
  1873. else
  1874. echo shar: Extracting \"'xcalpr/Imakefile'\" \(236 characters\)
  1875. sed "s/^X//" >'xcalpr/Imakefile' <<'END_OF_FILE'
  1876. XDEFINES=-DVER_VEC
  1877. XBINDIR=/usr/local/bin
  1878. XINSTPGMFLAGS=$(INSTBINFLAGS)
  1879. X
  1880. XAllTarget(xcalpr)
  1881. XNormalProgramTarget(xcalpr, xcalpr.o xcal_days.o,/**/,/**/,/**/)
  1882. X
  1883. XInstallProgram(xcalpr,$(BINDIR))
  1884. XInstallManPage(xcalpr,$(MANDIR))
  1885. X
  1886. XDependTarget()
  1887. END_OF_FILE
  1888. if test 236 -ne `wc -c <'xcalpr/Imakefile'`; then
  1889.     echo shar: \"'xcalpr/Imakefile'\" unpacked with wrong size!
  1890. fi
  1891. # end of 'xcalpr/Imakefile'
  1892. fi
  1893. if test -f 'xcalpr/README' -a "${1}" != "-c" ; then 
  1894.   echo shar: Will not clobber existing file \"'xcalpr/README'\"
  1895. else
  1896. echo shar: Extracting \"'xcalpr/README'\" \(158 characters\)
  1897. sed "s/^X//" >'xcalpr/README' <<'END_OF_FILE'
  1898. XThis is xcalpr - a program to print calendars out in text forms
  1899. X
  1900. XThe program needs access to ../xcal_days.c. I have a symlink to that
  1901. Xfile in this directory.
  1902. END_OF_FILE
  1903. if test 158 -ne `wc -c <'xcalpr/README'`; then
  1904.     echo shar: \"'xcalpr/README'\" unpacked with wrong size!
  1905. fi
  1906. # end of 'xcalpr/README'
  1907. fi
  1908. if test -f 'xcalpr/version.h' -a "${1}" != "-c" ; then 
  1909.   echo shar: Will not clobber existing file \"'xcalpr/version.h'\"
  1910. else
  1911. echo shar: Extracting \"'xcalpr/version.h'\" \(499 characters\)
  1912. sed "s/^X//" >'xcalpr/version.h' <<'END_OF_FILE'
  1913. X/*
  1914. X *    Version control file
  1915. X *    version.h    1.6    11/15/93
  1916. X *    Automatically created on Mon Nov 15 23:58:03 GMT 1993
  1917. X *    
  1918. X *    Hand edit none of this if you want freeze to continue to work
  1919. X */
  1920. X#ifdef    VER_PROG
  1921. X#define    PROGNAME    xcalpr
  1922. X#endif
  1923. X#ifdef    VER_VEC
  1924. Xchar    version[] = "xcalpr Version 1.6, released Mon Nov 15 23:58:03 GMT 1993";
  1925. X#endif
  1926. X#ifdef    VER_DEF
  1927. X#define    VERSION    "xcalpr Version 1.6, released Mon Nov 15 23:58:03 GMT 1993"
  1928. X#endif
  1929. X
  1930. X/*    SCCS files
  1931. X *
  1932. X+1.11    xcalpr.c
  1933. X+1.2    xcalpr.man
  1934. X+1.5    Imakefile
  1935. X *
  1936. X */
  1937. END_OF_FILE
  1938. if test 499 -ne `wc -c <'xcalpr/version.h'`; then
  1939.     echo shar: \"'xcalpr/version.h'\" unpacked with wrong size!
  1940. fi
  1941. # end of 'xcalpr/version.h'
  1942. fi
  1943. if test -f 'xcalpr/xcalpr.man' -a "${1}" != "-c" ; then 
  1944.   echo shar: Will not clobber existing file \"'xcalpr/xcalpr.man'\"
  1945. else
  1946. echo shar: Extracting \"'xcalpr/xcalpr.man'\" \(3036 characters\)
  1947. sed "s/^X//" >'xcalpr/xcalpr.man' <<'END_OF_FILE'
  1948. X.TH XCALPR 1 "October 1993" "X Version 11 R5"
  1949. X.SH NAME
  1950. Xxcalpr \- print xcal calendar entries
  1951. X.SH SYNTAX
  1952. X.B xcalpr
  1953. X[
  1954. X.B \-c
  1955. X][
  1956. X.B \-x
  1957. X][
  1958. X.B \-f
  1959. Xfile
  1960. X][
  1961. X.B \-d
  1962. X.I dir
  1963. X][
  1964. X.B \-u
  1965. X.I user
  1966. X][
  1967. X.I date-spec
  1968. X]
  1969. X.SH DESCRIPTION
  1970. X.I Xcalpr
  1971. Xprints the contents of the
  1972. X.I xcal
  1973. Xfiles.
  1974. XIt is intended to be used in situations when you have no access to an
  1975. XX screen.
  1976. XIt can also be used to generate entries for the standard UNIX
  1977. X.I calendar
  1978. Xprogram.
  1979. X.LP
  1980. XWith no arguments, it prints any entries that exist for the next seven days.
  1981. XThe program also reads the contents of the seven daily files and prints them
  1982. Xat the appropriate point in the output stream.
  1983. XEach line in the output is preceded by the day of the week, the day of the
  1984. Xmonth, the month and the year.
  1985. X.LP
  1986. X.I Xcalpr
  1987. Xcan be given a date specification to select months and years.
  1988. XIf the date spec consists of just a year number, then
  1989. Xall the data for that year is printed.
  1990. XFor example:
  1991. X.br
  1992. X    xcalpr 1994
  1993. X.br
  1994. Xwill print all the data for 1994.
  1995. XSeveral years can be specified.
  1996. X.LP
  1997. XIf you give the name of a month, then the data for that month in the current
  1998. Xyear will be printed.
  1999. XIf the month is in the past, then the data for that month next year will be
  2000. Xprinted.
  2001. XFor example, if
  2002. X.br
  2003. X    xcalpr oct jan
  2004. X.br
  2005. Xis typed in August,
  2006. X.I xcalpr
  2007. Xwill print October in the current year and January next year.
  2008. X.LP
  2009. XYou can select a particular year by adding the number after any months that
  2010. Xyou need printing:
  2011. X.br
  2012. X    xcalpr oct nov 1994
  2013. X.br
  2014. Xwill print October and November in 1994.
  2015. X.LP
  2016. XThere are a couple of special `month' names.
  2017. XThe name
  2018. X.B rest
  2019. Xwill print the data for the rest of the month, starting tomorrow.
  2020. XThe \fBrest\fP argument is not recognised if you give a year as a parameter.
  2021. XIf tomorrow happens to be the first day of the next month, then all the
  2022. Xdata for next month will be printed.
  2023. XThe name
  2024. X.B next
  2025. Xprints all the data for next month.
  2026. X.SH OPTIONS
  2027. X.LP
  2028. XThe
  2029. X.I \-c
  2030. Xoption causes 
  2031. X.I xcalpr
  2032. Xto output lines suitable for input to the standard UNIX
  2033. X.I calendar
  2034. Xprogram.
  2035. X.LP
  2036. XThe
  2037. X.I \-d
  2038. Xswitch is followed by a directory name and specifies an alterative
  2039. Xlocation for your Calendar directory.
  2040. XYour home directory is prepended if the name doesn't start with a slash
  2041. Xor a dot.
  2042. X.LP
  2043. XThe
  2044. X.I \-f
  2045. Xoption is followed by a file name and
  2046. X.I xcalpr
  2047. Xwill write it's output to that file, rather than standard output.
  2048. X.LP
  2049. XThe
  2050. X.I \-u
  2051. Xoption is followed by a user name and dumps their calendar files rather
  2052. Xthan yours.
  2053. X.LP
  2054. XThe
  2055. X.I \-x
  2056. Xoption makes \fIxcalev\fP operate with Calendar files that are compatible
  2057. Xwith the \fIxcalendar\fP program.
  2058. X.SH FILES
  2059. X.PP
  2060. X$HOME/Calendar/\(**
  2061. X.LP
  2062. X.TP "\w'xc<dd><Mon><Year>  'u"
  2063. Xxc<dd><Mon><Year>
  2064. XA data file is day, Month in three letter format and the year.
  2065. X.TP
  2066. Xxy<Year>
  2067. XA year directory.
  2068. X.TP
  2069. Xxw<Day>
  2070. XA data file for the weekly code, one per day.
  2071. X.SH SEE ALSO
  2072. Xxcal(1), xcalev(1), xcal_cal(1)
  2073. X.SH AUTHOR
  2074. X.LP
  2075. XCopyright 1993 by Peter Collinson, Hillside Systems
  2076. XAll rights reserved.
  2077. X.LP
  2078. XThis product includes software developed by the University of
  2079. XCalifornia, Berkeley and its contributors.
  2080. X
  2081. END_OF_FILE
  2082. if test 3036 -ne `wc -c <'xcalpr/xcalpr.man'`; then
  2083.     echo shar: \"'xcalpr/xcalpr.man'\" unpacked with wrong size!
  2084. fi
  2085. # end of 'xcalpr/xcalpr.man'
  2086. fi
  2087. echo shar: End of archive 1 \(of 8\).
  2088. cp /dev/null ark1isdone
  2089. MISSING=""
  2090. for I in 1 2 3 4 5 6 7 8 ; do
  2091.     if test ! -f ark${I}isdone ; then
  2092.     MISSING="${MISSING} ${I}"
  2093.     fi
  2094. done
  2095. if test "${MISSING}" = "" ; then
  2096.     echo You have unpacked all 8 archives.
  2097.     rm -f ark[1-9]isdone
  2098. else
  2099.     echo You still need to unpack the following archives:
  2100.     echo "        " ${MISSING}
  2101. fi
  2102. ##  End of shell archive.
  2103. exit 0
  2104.  
  2105. exit 0 # Just in case...
  2106. -- 
  2107.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  2108. \X/  Amiga: The only way to fly!  |    sources-x@sterling.com
  2109.        "It's intuitively obvious to the most casual observer..."
  2110.  GCS d++(--) -p+ c++ !l u++ e+ m+(-) s++/++ n h--- f+ g+++ w+ t++ r+ y+
  2111.