home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-12-22 | 60.5 KB | 2,112 lines |
- Newsgroups: comp.sources.x
- From: pc@hillside.co.uk (Peter Collinson)
- Subject: v21i076: xcal - A calendar program for X, Part01/08
- Message-ID: <csx-v21i076=xcal.101638@sparky.Sterling.COM>
- X-Md4-Signature: 33bedd12679b9fbeb9fd19603a4624b3
- Sender: chris@sparky.sterling.com (Chris Olson)
- Organization: Hillside Systems, 61 Hillside Avenue, Canterbury, Kent CT2 8HA
- Date: Tue, 21 Dec 1993 16:17:02 GMT
- Approved: chris@sterling.com
-
- Submitted-by: pc@hillside.co.uk (Peter Collinson)
- Posting-number: Volume 21, Issue 76
- Archive-name: xcal/part01
- Environment: X11
- Supersedes: xcal: Volume 12, Issue 101
-
- Xcal is a calendar program. It generally sits on your screen
- displaying todays date - the format of this can be tailored to your
- taste.
-
- Hitting the left button in the date window gives you a `strip' showing
- the current month with one line per day. Daily details can be stored
- in files (like xcalendar - from where I stole some code). The daily
- details will be displayed in the strip - so you can see what you have
- to do. The X11 multi-line widget makes this rather nice.
-
- Daily details can be edited by poking at the appropriate day and
- getting an edit window. Daily details can contain times and can
- be used to trigger screen alarms.
-
- Each strip has `next' and `previous' button, so you can do the common
- actions quickly - alternatively you can hit the middle button in the
- date window to get a dialogue box which you can use to enter the date
- of the month which you want to display.
-
- A top level button on the date strip gives you access to a memo pad
- where you can store things that you should be doing. This panel also
- shows todays information so a single button click can be used to see
- todays appointments.
-
- Xcal supports alarms that can be fired to diplay a message or run
- a command at a particular time.
-
- I have also stolen pscal from the net and modified it to work with the
- program. So you can generate pretty printed calendars whenever you
- like - assuming that you have a PostScript printer.There are also some
- other support programs, xcal_cal, xcalpr and xcalev. See README.contents
- for more details on these. See README.install for some installation hints
- and pitfalls.
-
- Xcal is also available by anonymous FTP from:
- eros.britain.eu.net: file: xcal/xcal41.tar.Z
- unix.hensa.ac.uk: file: /pub/misc/unix/xcal/xcal41.tar.Z
-
- Peter Collinson - pc@hillside.co.uk.
-
- Part 1 of 8
- --shar starts here--
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then unpack
- # it by saving it into a file and typing "sh file". To overwrite existing
- # files, type "sh file -c". You can also feed this as standard input via
- # unshar, or by typing "sh <file", e.g.. If this archive is complete, you
- # will see the following message at the end:
- # "End of archive 1 (of 8)."
- # Contents: C_from_ad.sh C_from_help.sh Imakefile MANIFEST README
- # README.contents README.install README.sunos TODO XCal.ad
- # calendar.bm help.bm help_press.bm mouse.bm mouseaway.bm
- # patchlevel.h pscal pscal/Imakefile pscal/README pscal/pscal.man
- # run_xmkmf sample.regular strfdate.c strftime strftime/README
- # strftime/ptime.c version.c xcal_buts.c xcal_cal xcal_cal/Imakefile
- # xcal_cal/README xcal_cal/xcal_cal.man xcal_mmap.h xcalev
- # xcalev/Imakefile xcalev/version.h xcalev/xcalev.man xcalpr
- # xcalpr/Imakefile xcalpr/README xcalpr/version.h xcalpr/xcalpr.man
- # Wrapped by pc@hillside on Wed Nov 17 11:24:34 1993
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- if test -f 'C_from_ad.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'C_from_ad.sh'\"
- else
- echo shar: Extracting \"'C_from_ad.sh'\" \(215 characters\)
- sed "s/^X//" >'C_from_ad.sh' <<'END_OF_FILE'
- X#!/bin/sh
- X# Turn the help text file into something that C can deal with
- XSRC=XCal.ad
- XDST=xcal_ad.h
- X( echo 'static String fallbackResources[] = {'
- X sed -e '
- X /^!/d
- X s/^/"/
- X s/$/",/' $SRC
- X echo 'NULL,
- X};'
- X) > $DST
- END_OF_FILE
- if test 215 -ne `wc -c <'C_from_ad.sh'`; then
- echo shar: \"'C_from_ad.sh'\" unpacked with wrong size!
- fi
- # end of 'C_from_ad.sh'
- fi
- if test -f 'C_from_help.sh' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'C_from_help.sh'\"
- else
- echo shar: Extracting \"'C_from_help.sh'\" \(182 characters\)
- sed "s/^X//" >'C_from_help.sh' <<'END_OF_FILE'
- X#!/bin/sh
- X# Turn the help text file into something that C can deal with
- XSRC=XCal.help
- XDST=xcal_help.h
- X( echo 'char helpdata[] = "\'
- X sed -e 's/$/\\n\\/' $SRC
- X echo '";'
- X) > $DST
- END_OF_FILE
- if test 182 -ne `wc -c <'C_from_help.sh'`; then
- echo shar: \"'C_from_help.sh'\" unpacked with wrong size!
- fi
- # end of 'C_from_help.sh'
- fi
- if test -f 'Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'Imakefile'\"
- else
- echo shar: Extracting \"'Imakefile'\" \(1115 characters\)
- sed "s/^X//" >'Imakefile' <<'END_OF_FILE'
- X/*
- X * Define InstallPsCal if you want to have pscal compiled and installed as
- X * part of the xcal compilation and installation.
- X */
- X#define InstallPsCal
- X
- X DEFINES = -DLONG_IS_32_BITS -DVER_VEC
- X
- X SRCS1 = xcal.c xcal_alarm.c xcal_buts.c xcal_days.c xcal_edit.c \
- X xcal_help.c xcal_popup.c xcal_strip.c xcal_memo.c strfdate.c version.c
- X OBJS1 = xcal.o xcal_alarm.o xcal_buts.o xcal_days.o xcal_edit.o \
- X xcal_help.o xcal_popup.o xcal_strip.o xcal_memo.o strfdate.o version.o
- X
- X PROGRAMS = derived xcal
- X INSTPGMFLAGS = $(INSTBINFLAGS)
- X BINDIR = /usr/local/bin
- X
- XComplexProgramTarget_1(xcal, XawClientLibs, -lm)
- X
- XInstallAppDefaults(XCal)
- XInstallNonExec(XCal.help, $(XAPPLOADDIR)/XCal.help)
- X
- Xderived: xcal_help.h xcal_ad.h
- X
- Xclean::
- X $(RM) xcal_help.h xcal_ad.h
- X
- Xxcal_help.h: XCal.help
- X sh C_from_help.sh
- X
- Xxcal_ad.h: XCal.ad
- X sh C_from_ad.sh
- X
- X#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
- X
- X#define IHaveSubdirs
- X
- X#ifdef InstallPsCal
- XSUBDIRS = xcalpr xcalev xcal_cal pscal
- X#else
- XSUBDIRS = xcalpr xcalev xcal_cal
- X#endif
- X
- XMakeSubdirs($(SUBDIRS))
- XDependSubdirs($(SUBDIRS))
- END_OF_FILE
- if test 1115 -ne `wc -c <'Imakefile'`; then
- echo shar: \"'Imakefile'\" unpacked with wrong size!
- fi
- # end of 'Imakefile'
- fi
- if test -f 'MANIFEST' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'MANIFEST'\"
- else
- echo shar: Extracting \"'MANIFEST'\" \(3201 characters\)
- sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
- X File Name Archive # Description
- X-----------------------------------------------------------
- X CHANGES 4 A large list of changes made to xcal
- X C_from_ad.sh 1 A script to generate xcal_ad.h
- X C_from_help.sh 1 A script to generate xcal_help.h
- X Imakefile 1 The Imakefile
- X MANIFEST 1 This shipping list
- X Makefile.bsdi 6 A makefile generated on BSD/386
- X Makefile.sunos 5 A makefile generated on SunOS 4.1.3 Openwindow
- X README 1 General README
- X README.contents 1 Brief note on the contents
- X README.install 1 How to install the whole system
- X README.sunos 1 A caution about SunOS
- X TODO 1 What should happen next
- X XCal.ad 1 Default resources
- X XCal.help 2 Default help
- X calendar.bm 1 Bitmap
- X help.bm 1 Bitmap
- X help_press.bm 1 Bitmap
- X mouse.bm 1 Bitmap
- X mouseaway.bm 1 Bitmap
- X patchlevel.h 1 usual patchlevel file
- X pscal 1 PostScript directory
- X pscal/Imakefile 1
- X pscal/README 1
- X pscal/pscal.man 1
- X pscal/pscal.script 5
- X run_xmkmf 1 script to run mkmf on all subdirs
- X sample.regular 1 Sample regular file
- X strfdate.c 1 Convert internal dates from a format
- X strftime 1 BSD source of strftime just in case
- X strftime/README 1
- X strftime/ptime.c 1 Small program used to test the strftime routine
- X strftime/strftime.c 2
- X strftime/tzfile.h 2
- X version.c 1 My versioning control file
- X xcal.c 7 Main part of program
- X xcal.h 2 Header
- X xcal.man 8 Manual page
- X xcal_alarm.c 7 Source handling alarms
- X xcal_buts.c 1 Makes buttons insensitive when pressed
- X xcal_cal 1 xcal_cal directory
- X xcal_cal/Imakefile 1
- X xcal_cal/Makefile.bsdi 4
- X xcal_cal/Makefile.sunos 3
- X xcal_cal/README 1
- X xcal_cal/xcal_cal.c 2
- X xcal_cal/xcal_cal.man 1
- X xcal_days.c 2 Code derived from BSD NetII tape
- X xcal_edit.c 8 Handle edit boxes
- X xcal_help.c 2 Handle help
- X xcal_memo.c 6 Handle the memo box
- X xcal_mmap.h 1 mmap control file. Edit if you don't have mmap
- X xcal_popup.c 4 Handle all popups
- X xcal_strip.c 6 Handle the main strip
- X xcalev 1 xcalev directory
- X xcalev/Imakefile 1
- X xcalev/Makefile.bsdi 3
- X xcalev/Makefile.sunos 3
- X xcalev/version.h 1
- X xcalev/xcalev.c 5
- X xcalev/xcalev.man 1
- X xcalpr 1 xcalpr directory
- X xcalpr/Imakefile 1
- X xcalpr/Makefile.bsdi 3
- X xcalpr/Makefile.sunos 3
- X xcalpr/README 1 A short note
- X xcalpr/version.h 1
- X xcalpr/xcal_days.c 2 Symlink to ../xcal_days.c
- X xcalpr/xcalpr.c 4
- X xcalpr/xcalpr.man 1
- END_OF_FILE
- if test 3201 -ne `wc -c <'MANIFEST'`; then
- echo shar: \"'MANIFEST'\" unpacked with wrong size!
- fi
- # end of 'MANIFEST'
- fi
- if test -f 'README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README'\"
- else
- echo shar: Extracting \"'README'\" \(2266 characters\)
- sed "s/^X//" >'README' <<'END_OF_FILE'
- XXcal is a calendar program. It generally sits on your screen
- Xdisplaying todays date - the format of this can be tailored to your
- Xtaste.
- X
- XHitting the left button in the date window gives you a `strip' showing
- Xthe current month with one line per day. Daily details can be stored
- Xin files (like xcalendar - from where I stole some code). The daily
- Xdetails will be displayed in the strip - so you can see what you have
- Xto do. The X11 multi-line widget makes this rather nice.
- X
- XDaily details can be edited by poking at the appropriate day and
- Xgetting an edit window. Daily details can contain times and can
- Xbe used to trigger screen alarms.
- X
- XEach strip has `next' and `previous' button, so you can do the common
- Xactions quickly - alternatively you can hit the middle button in the
- Xdate window to get a dialogue box which you can use to enter the date
- Xof the month which you want to display.
- X
- XA top level button on the date strip gives you access to a memo pad
- Xwhere you can store things that you should be doing. This panel also
- Xshows todays information so a single button click can be used to see
- Xtodays appointments.
- X
- XI have also stolen pscal from the net and modified it to work with the
- Xprogram. So you can generate pretty printed calendars whenever you
- Xlike - assuming that you have a PostScript printer.There are also some
- Xother support programs, xcal_cal, xcalpr and xcalev. See README.contents
- Xfor more details on these. See README.install for some installation hints
- Xand pitfalls.
- X
- XThis is release 4.1
- XThe history is:
- X Release 1.1 posted to comp.sources.x
- X + two patches
- X Release 2.1 circulated privately
- X Release 3.1 posted unintentionally to comp.sources.x
- X Release 3.2 posted to comp.sources.x
- X Release 3.3 posted to comp.sources.x in 1990
- X
- XCaveats
- X
- XYes this IS another - `I need something real to find out about X exercise'.
- XSo, it demonstrates all those faults.
- X
- XPeter Collinson
- XHillside Systems
- X61 Hillside Avenue
- XCanterbury
- XKent, CT2 8HA
- X
- XPhone: +44 227 761824
- XFax: +44 227 762554
- XEmail: pc@hillside.co.uk
- X
- X7/November/1993
- X
- XFixes/enhancements welcomed....
- X
- XThis is free... however, if you are going to make some profit from
- Xthis, then perhaps you should consider passing something back to me
- Xsince I am freelance and mostly don't get paid everyday.
- END_OF_FILE
- if test 2266 -ne `wc -c <'README'`; then
- echo shar: \"'README'\" unpacked with wrong size!
- fi
- # end of 'README'
- fi
- if test -f 'README.contents' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README.contents'\"
- else
- echo shar: Extracting \"'README.contents'\" \(808 characters\)
- sed "s/^X//" >'README.contents' <<'END_OF_FILE'
- XHere's what you get..
- X
- X
- XOn this level is the source for the xcal program. If you install it by hand
- Xmake sure you put XCal.ad in app_defaults.
- X
- XThere is also in sub-directories:
- X
- Xa) pscal
- X An `old' program that generates calendars in PostScript. Make you
- X calendar look nice on the wall. There's a README file in this
- X directory that you should look at before installing.
- Xb) xcal_cal
- X A program written by Ed Gould. It takes you calendar entries and
- X makes a file for the standard UNIX calendar program to send you mail.
- Xc) xcalev
- X A program that is used to pre-load your calendar with all those
- X birthdays that you are prone to forget.
- Xd) xcalpr
- X A program that prints calendar files out to a terminal. Nice if
- X you have no X screen. This also can be used to generate a file
- X for the UNIX calendar program.
- END_OF_FILE
- if test 808 -ne `wc -c <'README.contents'`; then
- echo shar: \"'README.contents'\" unpacked with wrong size!
- fi
- # end of 'README.contents'
- fi
- if test -f 'README.install' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README.install'\"
- else
- echo shar: Extracting \"'README.install'\" \(1973 characters\)
- sed "s/^X//" >'README.install' <<'END_OF_FILE'
- XWell - theoretically...
- X
- XFirst identify if your system supports the mmap() system call.
- XIf not then edit the file xal_mmap.h to add
- X #define NO_MMAP
- XWe have found that it's best to do this for Ultrix, whose mmap() call
- Xis somewhat old and limited. This only affects help file loading
- Xin xcal itself.
- X
- XThen make the makefiles
- X
- X xmkmf
- X make Makefiles
- X
- Xthen type
- X
- X make derived - this makes xcal_help.h and xcal_ad.h
- X from XCal.help and XCal.ad. You
- X may not need to do this step
- X if the Makefile evaluates things in
- X the correct order
- X type make depend
- X
- X type make
- X
- XIf that appears to compile (and if you are on a Sun see README.sunos), then
- X
- X make install
- X make install.man
- X
- Xand type
- X xcal
- X
- XOf course, it's won't be as easy as that - because it never is.
- X
- XNote on bitmaps:
- X
- XSome systems emit a warning when they compile the bitmaps. They object
- Xto having 8-bit values in a char array. You can ignore this, or change the
- Xdefine in xcal.c to permit the bitmaps to be unsigned char.
- X
- XNote on date formats:
- X
- XThe code uses your system's strftime(3) routine to generate some dates.
- XI have found that the arguments to this routine are not standard and have
- Xpicked a set that seems portable. This prints dates like:
- X Saturday 06 November 1993
- Xand I prefer
- X Saturday 6 November 1993
- XOn SunOS and Solaris, you can make the routine suppress the leading zero
- Xby using `%e' is place of `%d'. If your system supports this, uncomment
- Xthe relevant lines in XCal.ad before installing. This file also acts as
- Xa default fallback set of resources, so if you uncomment the lines, it's
- Xa good idea to rebuild xcal.
- X
- XIf you are unsure what your system supports, compile the program
- Xstrftime/ptime and see what is generated by different formats.
- X
- XNote on help installation:
- X
- XTo regenerate the help that is loaded into the program, run
- X sh C_from_help.sh
- Xthis makes xcal_help.h from XCal.help.
- X
- XTo have NO help strings built in, change xcal_help.h to read
- X
- Xchar helpdata[1];
- X
- END_OF_FILE
- if test 1973 -ne `wc -c <'README.install'`; then
- echo shar: \"'README.install'\" unpacked with wrong size!
- fi
- # end of 'README.install'
- fi
- if test -f 'README.sunos' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'README.sunos'\"
- else
- echo shar: Extracting \"'README.sunos'\" \(900 characters\)
- sed "s/^X//" >'README.sunos' <<'END_OF_FILE'
- XOn my 4.1.3 system running OpenWindows III. I get an apparent problem
- Xwhen xcal is loaded, it says:
- X
- Xcc -o xcal -O xcal.o xcal_alarm.o xcal_buts.o xcal_edit.o xcal_help.o
- X xcal_popup.o xcal_strip.o xcal_memo.o strfdate.o version.o -lXaw -lXmu
- X -lXt -lXext -lX11 -lm
- X
- Xld: Undefined symbol
- X _get_wmShellWidgetClass
- X _get_applicationShellWidgetClass
- Xcollect: /usr/bin/ld returned 2 exit status
- X*** Error code 1
- Xmake: Fatal error: Command failed for target `xcal'
- X
- XThis is something to do with shared libraries and -lXmu.
- X
- XEVEN with this message, xcal runs happily.
- X
- XSo - ignore the message above - OR change the Makefile from
- X
- X $(CC) -o $@ $(LDOPTIONS) $(OBJS1) $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) $(LDLIBS) -lm $(EXTRA_LOAD_FLAGS)
- Xto
- X
- X $(CC) -o $@ $(LDOPTIONS) $(OBJS1) $(XAWLIB) -Bstatic $(XMULIB) -Bdynamic $(XTOOLLIB) $(XLIB) $(LDLIBS) -lm $(EXTRA_LOAD_FLAGS)
- X
- Xand things will be OK.
- END_OF_FILE
- if test 900 -ne `wc -c <'README.sunos'`; then
- echo shar: \"'README.sunos'\" unpacked with wrong size!
- fi
- # end of 'README.sunos'
- fi
- if test -f 'TODO' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'TODO'\"
- else
- echo shar: Extracting \"'TODO'\" \(396 characters\)
- sed "s/^X//" >'TODO' <<'END_OF_FILE'
- X1) Some people would like a way to deal with annual/monthly events
- X and to integrate that with the current strip. Not sure that this
- X will happen.
- X
- X2) There should be better support for group Calendar files.
- X
- X3) It should be in ANSI C
- X
- XThanks to the many people who have mailed to say thanks and added
- Xideas to xcal. Sorry to the people who I refused to listen to or whose
- Xideas I haven't used.
- X
- END_OF_FILE
- if test 396 -ne `wc -c <'TODO'`; then
- echo shar: \"'TODO'\" unpacked with wrong size!
- fi
- # end of 'TODO'
- fi
- if test -f 'XCal.ad' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'XCal.ad'\"
- else
- echo shar: Extracting \"'XCal.ad'\" \(3562 characters\)
- sed "s/^X//" >'XCal.ad' <<'END_OF_FILE'
- X! XCal.ad 1.21 11/6/93
- X!
- X! Help filename if not using internal text
- X!XCal.helpFile: /usr/X11/lib/X11/app-defaults/XCal.help
- X!
- X! Data format strings
- X! I use these on my Sun - uncomment if your system supports
- X! %e in strftime formats
- X!XCal.format: %A %e %B %Y
- X!XCal.editFmt: %A %e %B %Y
- X!XCal.already: Already editing %e %B %Y
- X!
- X! Geometry
- XXCal.edit.geometry: 325x150
- XXCal.memo.geometry: 325x300
- XXCal.alarm.geometry: 325x100+0+150
- XXCal*help.geometry: 600x300
- X!
- X! Fonts
- XXCal.fontToday: lucidasanstypewriter-12
- XXCal*Font: lucidasanstypewriter-12
- XXCal*info.Font: lucidasans-10
- XXCal*alarmText*Font: 12x24
- X!
- X! Top level dialogs
- XXCal*newdate.Label: Enter mmm yyyy?
- XXCal*newdate.ok.Label: OK
- XXCal*newdate.cancel.Label: Cancel
- XXCal*exit.Label: Really exit?
- XXCal*exit.yes.Label: Yes
- XXCal*exit.no.Label: No
- XXCal*noedit.ok.Label: OK
- X!
- X! Strips & edit windows
- XXCal*back.Label: <
- XXCal*quit.Label: Quit
- XXCal*next.Label: >
- XXCal*help.Label: Help
- XXCal*save.Label: Save
- XXCal*edit.quit.Label: Quit
- XXCal*edit.help.Label: Help
- XXCal*text.scrollVertical: WhenNeeded
- XXCal*text.scrollHorizontal: WhenNeeded
- XXCal*text.autoFill: True
- X! Popups from the edit windows
- XXCal*check.Label: Save file?
- XXCal*check.yes.Label: Yes
- XXCal*check.no.Label: No
- X! Alarms
- XXCal*alarmText*scrollVertical: WhenNeeded
- XXCal*alarmText*wrap: word
- XXCal*alarmQuit.Label: Unpin
- XXCal*alarmHold.Label: Stick
- X! Memo box
- XXCal*display.scrollVertical: WhenNeeded
- XXCal*display.scrollHorizontal: WhenNeeded
- XXCal*display.cursor: dot
- XXCal*memoTitle.Label: Edit the memo file
- XXCal*weeklyEdit.Label: Edit
- XXCal*weeklyTitle.Label: Today's regular events
- XXCal*edit.Label: Edit
- XXCal*memocheck.Label: Save memo file?
- XXCal*memocheck.yes.Label: Yes
- XXCal*memocheck.no.Label: No
- XXCal*memoText.scrollVertical: WhenNeeded
- XXCal*memoText.scrollHorizontal: WhenNeeded
- X! Help
- XXCal*helpText.scrollVertical: Always
- XXCal*helpText.scrollHorizontal: WhenNeeded
- XXCal*helpText.autoFill: True
- XXCal*help*helpQuit.Label: Quit
- X!
- X! Colours from pc - not convinced about this, I need to live with a
- X! colour screen for a bit to see what should be done
- X!
- X!XCal.MarkBackground: wheat1
- X!XCal*background: wheat1
- X!XCal*foreground: black
- X!XCal*quit.foreground: black
- X!XCal*quit.background: wheat2
- X!XCal*edit.foreground: black
- X!XCal*edit.background: wheat2
- X!XCal*weeklyEdit.foreground: black
- X!XCal*weeklyEdit.background: wheat2
- X!XCal*next.foreground: black
- X!XCal*next.background: wheat2
- X!XCal*back.foreground: black
- X!XCal*back.background: wheat2
- X!XCal*help.foreground: black
- X!XCal*help.background: wheat2
- X!XCal*save.foreground: black
- X!XCal*save.background: wheat2
- X!XCal*yes.foreground: black
- X!XCal*yes.background: wheat2
- X!XCal*no.foreground: black
- X!XCal*no.background: wheat2
- X!XCal*helpQuit.foreground: black
- X!XCal*helpQuit.background: wheat2
- X!XCal*header.foreground: black
- X!XCal*header.background: wheat2
- X!XCal*Sun*Label*background: wheat2
- X!XCal*Sat*Label*background: wheat2
- X!
- X! Colours from reed wade@cs.utk.edu
- X!
- X!XCal*background: LightSteelBlue
- X!XCal*foreground: SaddleBrown
- X!XCal.MarkForeground: Black
- X!XCal.MarkBackground: CornflowerBlue
- X!XCal.edit.background: CornflowerBlue
- X!XCal.edit.foreground: OliveGreen
- X!XCal*exit.background: MediumTurquoise
- X!XCal*exit.foreground: SlateGrey
- X!XCal*check.background: lavender
- X!XCal*help*background: wheat
- X!XCal*help*foreground: blue
- X!XCal*newdate*background: plum
- X!XCal*newdate*foreground: red
- X!XCal*quit.background: SteelBlue
- X!XCal*quit.background: green
- X!XCal*back.background: yellow
- X!XCal*next.background: yellow
- X!XCal*no.background: DarkKhaki
- X!XCal*yes.background: PapayaWhip
- END_OF_FILE
- if test 3562 -ne `wc -c <'XCal.ad'`; then
- echo shar: \"'XCal.ad'\" unpacked with wrong size!
- fi
- # end of 'XCal.ad'
- fi
- if test -f 'calendar.bm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'calendar.bm'\"
- else
- echo shar: Extracting \"'calendar.bm'\" \(1880 characters\)
- sed "s/^X//" >'calendar.bm' <<'END_OF_FILE'
- X#define cal_width 48
- X#define cal_height 48
- Xstatic UNSIGNED char cal_bits[] = {
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x07, 0xf8, 0x07, 0xfc, 0x01,
- X 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x15, 0xaa, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0xa8, 0x2a, 0x54, 0x01, 0xaa, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- X 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- END_OF_FILE
- if test 1880 -ne `wc -c <'calendar.bm'`; then
- echo shar: \"'calendar.bm'\" unpacked with wrong size!
- fi
- # end of 'calendar.bm'
- fi
- if test -f 'help.bm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help.bm'\"
- else
- echo shar: Extracting \"'help.bm'\" \(248 characters\)
- sed "s/^X//" >'help.bm' <<'END_OF_FILE'
- X#define help_width 16
- X#define help_height 13
- Xstatic UNSIGNED char help_bits[] = {
- X 0x00, 0x00, 0xc0, 0x03, 0xe0, 0x07, 0x60, 0x06, 0x00, 0x06, 0x00, 0x06,
- X 0x80, 0x03, 0x80, 0x01, 0x80, 0x01, 0x00, 0x00, 0x80, 0x01, 0x80, 0x01,
- X 0x00, 0x00};
- END_OF_FILE
- if test 248 -ne `wc -c <'help.bm'`; then
- echo shar: \"'help.bm'\" unpacked with wrong size!
- fi
- # end of 'help.bm'
- fi
- if test -f 'help_press.bm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'help_press.bm'\"
- else
- echo shar: Extracting \"'help_press.bm'\" \(266 characters\)
- sed "s/^X//" >'help_press.bm' <<'END_OF_FILE'
- X#define help_press_width 16
- X#define help_press_height 13
- Xstatic UNSIGNED char help_press_bits[] = {
- X 0x00, 0x00, 0xb0, 0x06, 0xa4, 0x12, 0x08, 0x08, 0xc2, 0x21, 0x24, 0x12,
- X 0x10, 0x04, 0xd6, 0x35, 0x90, 0x04, 0xa4, 0x12, 0xca, 0x29, 0xc8, 0x09,
- X 0xc0, 0x01};
- END_OF_FILE
- if test 266 -ne `wc -c <'help_press.bm'`; then
- echo shar: \"'help_press.bm'\" unpacked with wrong size!
- fi
- # end of 'help_press.bm'
- fi
- if test -f 'mouse.bm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mouse.bm'\"
- else
- echo shar: Extracting \"'mouse.bm'\" \(251 characters\)
- sed "s/^X//" >'mouse.bm' <<'END_OF_FILE'
- X#define mouse_width 16
- X#define mouse_height 13
- Xstatic UNSIGNED char mouse_bits[] = {
- X 0xfe, 0x7f, 0xff, 0xff, 0x21, 0x84, 0xa1, 0xb5, 0xa1, 0xb5, 0xa1, 0xb5,
- X 0xa1, 0xb5, 0xa1, 0xb5, 0xa1, 0xb5, 0x21, 0x84, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff};
- END_OF_FILE
- if test 251 -ne `wc -c <'mouse.bm'`; then
- echo shar: \"'mouse.bm'\" unpacked with wrong size!
- fi
- # end of 'mouse.bm'
- fi
- if test -f 'mouseaway.bm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mouseaway.bm'\"
- else
- echo shar: Extracting \"'mouseaway.bm'\" \(263 characters\)
- sed "s/^X//" >'mouseaway.bm' <<'END_OF_FILE'
- X#define mouseaway_width 16
- X#define mouseaway_height 13
- Xstatic UNSIGNED char mouseaway_bits[] = {
- X 0xfe, 0x7f, 0xff, 0xff, 0x21, 0x84, 0xad, 0xb5, 0xad, 0xb5, 0xad, 0xb5,
- X 0xad, 0xb5, 0xad, 0xb5, 0xad, 0xb5, 0x21, 0x84, 0xff, 0xff, 0xff, 0xff,
- X 0xff, 0xff};
- END_OF_FILE
- if test 263 -ne `wc -c <'mouseaway.bm'`; then
- echo shar: \"'mouseaway.bm'\" unpacked with wrong size!
- fi
- # end of 'mouseaway.bm'
- fi
- if test -f 'patchlevel.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'patchlevel.h'\"
- else
- echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
- sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
- X#define PATCHLEVEL 0
- END_OF_FILE
- if test 21 -ne `wc -c <'patchlevel.h'`; then
- echo shar: \"'patchlevel.h'\" unpacked with wrong size!
- fi
- # end of 'patchlevel.h'
- fi
- if test ! -d 'pscal' ; then
- echo shar: Creating directory \"'pscal'\"
- mkdir 'pscal'
- fi
- if test -f 'pscal/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'pscal/Imakefile'\"
- else
- echo shar: Extracting \"'pscal/Imakefile'\" \(141 characters\)
- sed "s/^X//" >'pscal/Imakefile' <<'END_OF_FILE'
- XBINDIR=/usr/local/bin
- XAllTarget(pscal.script)
- XInstallScript(pscal,$(BINDIR))
- XInstallManPage(pscal,$(MANDIR))
- X
- Xdepend::
- X
- Xlint::
- X
- Xinstall.ln::
- END_OF_FILE
- if test 141 -ne `wc -c <'pscal/Imakefile'`; then
- echo shar: \"'pscal/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'pscal/Imakefile'
- fi
- if test -f 'pscal/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'pscal/README'\"
- else
- echo shar: Extracting \"'pscal/README'\" \(493 characters\)
- sed "s/^X//" >'pscal/README' <<'END_OF_FILE'
- XThis is a version of the pscal program that pretty prints calendars.
- XI have modified it to work from xcal data files stored in ~/Calendar.
- X
- XIf you are in the USA - you might like to edit pscal.script to revert
- Xpage translation back to your paper size:
- X
- XChange:
- X
- XTRANSLATE="71 -120"
- X
- Xto
- X
- XTRANSLATE="50 -120"
- X
- XThis has also been worked on by David Kotz who added the -d <directory>
- Xfeature and made it work on an old version of the Bourne shell that
- Xdoesn't grok shell statements like: shift 5
- X
- END_OF_FILE
- if test 493 -ne `wc -c <'pscal/README'`; then
- echo shar: \"'pscal/README'\" unpacked with wrong size!
- fi
- # end of 'pscal/README'
- fi
- if test -f 'pscal/pscal.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'pscal/pscal.man'\"
- else
- echo shar: Extracting \"'pscal/pscal.man'\" \(3558 characters\)
- sed "s/^X//" >'pscal/pscal.man' <<'END_OF_FILE'
- X.TH PSCAL 1 "8/January/1990"
- X.SH NAME
- Xpscal
- X.SH SYNOPSIS:
- X.B pscal
- X[
- X.B \-Pprinter
- X] [
- X.B \-R
- X] [
- X.B \-r
- X] [
- X.B \-t
- X] [
- X.B \-d directory
- X] [
- X.B other printer flags
- X] [ month [ year ] ]
- X.SH DESCRIPTION:
- X.I Pscal
- Xgenerates the Postscript showing a calendar for the specified month and year.
- XThe year, if omitted, defaults
- Xto the current year.
- XIf both month and year are omitted, the current month is printed.
- X.I Year
- Xcan be between 1753
- Xand 9999.
- XThe
- X.I month
- Xis a number between 1 and 12.
- XI can also be a three letter month abbreviation.
- X.LP
- XThe calendar can be loaded with information from the user.
- XThe information either comes in an `Event' file or can be
- Xderived from files under the user's Calendar directory should this exist.
- XThe search for this data is as follows, if any of these succeeds the data
- Xfor the calendar is taken from that source.
- X.IP 1)
- XThe shell variable EFILE may be set to the name of an Event file.
- X.IP 2)
- XAn event file called `Event' may exist in the current directory.
- X.IP 3)
- XThe file $HOME/.holiday may exist and contain a list of events.
- X.IP 4)
- XThe directory $HOME/Calendar (or a different directory specified
- Xwith the \-d option) may exist containing XCal files.
- X.LP
- XAn event file should consist of lines of the form
- X.IP
- Xmonth:day:message string
- X.LP
- XMessages should be 20 characters or less, with no more than 6
- Xmessages per day.
- XNo spaces should appear from the beginning
- Xof a line until after the second colon.
- XMonth and day should be numbers in the obvious ranges.
- X.SH OPTIONS
- X.IP "\-P\fIprinter\fR" 1i
- XThe printer may be specified with the usual \-P\fIprinter\fR syntax.
- X.IP "\-r" 1i
- XThe calendar page is printed in ``landscape'' orientation (the default).
- X.IP "\-R" 1i
- XThe calendar page is printed in ``portrait'' orientation; this
- Xyields a slightly smaller image and may be more suitable for
- Xembedding into other documents.
- X.IP "\-d \fIdirectory\fR" 1i
- XUse the given directory instead of $HOME/Calendar.
- X.IP "\-t" 1i
- XCauses the PostScript to be sent to the standard output, rather
- Xthan to the printer. This is useful if you wish to save the
- Xoutput in a file, or if you want to use options with the
- X.IR lpr (1)
- Xcommand.
- X.IP "\-F\fIfont\fR" 1i
- XSets the font family for the title text (the month and year).
- X.IP "\-f\fIfont\fR" 1i
- XSets the font family for the day-of-month numbers.
- X.PP
- XOther arguments starting with `\-' are passed through to
- X.IR lpr (1).
- X.PP
- XAny argument whose first character is '-' is passed on to lpr.
- XThe shell variables BANNER, LFOOT, CFOOT, and RFOOT become a
- Xtop centered banner, and left, centered, or right justified
- Xfooters respectively. As in:
- X.IP
- XBANNER="Schedule 1" CFOOT=Preliminary pscal 4 90
- X.SH AUTHOR
- XPatrick Wood
- X.br
- XCopyright (C) 1987 by Pipeline Associates, Inc.
- X.br
- XPermission is granted to modify and distribute this free of charge.
- X.SH HISTORY
- XOriginal From: patwood@unirot.UUCP (Patrick Wood)
- X.br
- XShell stuff added 3/9/87 by King Ables
- X.br
- XMade pretty by tjt 1988
- X.br
- XHoliday and printer flag passing hacks added Dec 1988
- Xby smann@june.cs.washington.edu
- X.br
- XUsed the better looking version with 5 rows of days rather than 6
- Xhacked together with holiday and banner/footnotes added
- Xby Joe (No Relation) Wood, 12/89, jlw@lzga.ATT.COM
- X.SH BUGS
- X`Pscal' doesn't work for months before 1753 (weird stuff happened
- Xin September, 1752).
- X.PP
- XA better format for the dates of holidays would be nice.
- XAn escape to allow holiday messages to be raw PostScript would
- Xalso be nice.
- X.PP
- XThe holiday messages should be handled more intelligently (ie,
- Xthe messages should be clipped to the day).
- X
- END_OF_FILE
- if test 3558 -ne `wc -c <'pscal/pscal.man'`; then
- echo shar: \"'pscal/pscal.man'\" unpacked with wrong size!
- fi
- # end of 'pscal/pscal.man'
- fi
- if test -f 'run_xmkmf' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'run_xmkmf'\"
- else
- echo shar: Extracting \"'run_xmkmf'\" \(79 characters\)
- sed "s/^X//" >'run_xmkmf' <<'END_OF_FILE'
- Xxmkmf
- X(cd xcalev;xmkmf)
- X(cd xcalpr;xmkmf)
- X(cd xcal_cal;xmkmf)
- X(cd pscal;xmkmf)
- END_OF_FILE
- if test 79 -ne `wc -c <'run_xmkmf'`; then
- echo shar: \"'run_xmkmf'\" unpacked with wrong size!
- fi
- chmod +x 'run_xmkmf'
- # end of 'run_xmkmf'
- fi
- if test -f 'sample.regular' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'sample.regular'\"
- else
- echo shar: Extracting \"'sample.regular'\" \(100 characters\)
- sed "s/^X//" >'sample.regular' <<'END_OF_FILE'
- XNovember 5 Fireworks night
- XDecember 25 Christmas
- XDecember 26 Boxing Day
- XDecember 31 New Year's Eve
- END_OF_FILE
- if test 100 -ne `wc -c <'sample.regular'`; then
- echo shar: \"'sample.regular'\" unpacked with wrong size!
- fi
- # end of 'sample.regular'
- fi
- if test -f 'strfdate.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'strfdate.c'\"
- else
- echo shar: Extracting \"'strfdate.c'\" \(4960 characters\)
- sed "s/^X//" >'strfdate.c' <<'END_OF_FILE'
- X/*
- X * This file is extracted from the BSD/386 sources.
- X * It is distributable subject to the Copyright notice below
- X * The code has been change for xcal.c purposes
- X * The original code is also distributed with xcal in case your
- X * system does not have the strftime() function
- X * strfdate.c 1.3 11/4/93
- X */
- X
- X
- X/*
- X * Copyright (c) 1989 The Regents of the University of California.
- X * All rights reserved.
- X *
- X * Redistribution and use in source and binary forms, with or without
- X * modification, are permitted provided that the following conditions
- X * are met:
- X * 1. Redistributions of source code must retain the above copyright
- X * notice, this list of conditions and the following disclaimer.
- X * 2. Redistributions in binary form must reproduce the above copyright
- X * notice, this list of conditions and the following disclaimer in the
- X * documentation and/or other materials provided with the distribution.
- X * 3. All advertising materials mentioning features or use of this software
- X * must display the following acknowledgement:
- X * This product includes software developed by the University of
- X * California, Berkeley and its contributors.
- X * 4. Neither the name of the University nor the names of its contributors
- X * may be used to endorse or promote products derived from this software
- X * without specific prior written permission.
- X *
- X * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- X * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- X * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- X * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- X * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- X * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- X * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- X * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- X * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- X * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- X * SUCH DAMAGE.
- X */
- X
- X#if defined(LIBC_SCCS) && !defined(lint)
- Xstatic char sccsid[] = "@(#)strftime.c 5.11 (Berkeley) 2/24/91";
- X#endif /* LIBC_SCCS and not lint */
- X
- X#include <sys/types.h>
- X#include <sys/time.h>
- X#include <string.h>
- X#include <X11/Intrinsic.h>
- X#include <X11/Xos.h>
- X#include <X11/StringDefs.h>
- X#include "xcal.h"
- X
- Xstatic char **afmt = appResources.sday;
- X
- Xstatic char **Afmt = appResources.day;
- X
- Xstatic char **bfmt = appResources.smon;
- Xstatic char **Bfmt = appResources.mon;
- X
- Xstatic size_t gsize;
- Xstatic char *pt;
- Xstatic int _add(), _conv();
- Xstatic size_t _fmt();
- X
- X
- X
- Xsize_t
- Xstrfdate(s, maxsize, format, d)
- X char *s;
- X size_t maxsize;
- X char *format;
- X Date *d;
- X{
- X pt = s;
- X if ((gsize = maxsize) < 1)
- X return(0);
- X if (_fmt(format, d)) {
- X *pt = '\0';
- X return(maxsize - gsize);
- X }
- X return(0);
- X}
- X
- Xstatic size_t
- X_fmt(format, d)
- X register char *format;
- X Date *d;
- X{
- X for (; *format; ++format) {
- X if (*format == '%')
- X switch(*++format) {
- X case '\0':
- X --format;
- X break;
- X case 'A':
- X if (d->wday < 0 || d->wday > 6)
- X return(0);
- X if (!_add(Afmt[d->wday]))
- X return(0);
- X continue;
- X case 'a':
- X if (d->wday < 0 || d->wday > 6)
- X return(0);
- X if (!_add(afmt[d->wday]))
- X return(0);
- X continue;
- X case 'B':
- X if (d->month < 0 || d->month > 11)
- X return(0);
- X if (!_add(Bfmt[d->month]))
- X return(0);
- X continue;
- X case 'b':
- X case 'h':
- X if (d->month < 0 || d->month > 11)
- X return(0);
- X if (!_add(bfmt[d->month]))
- X return(0);
- X continue;
- X case 'D':
- X if (!_fmt("%m/%d/%y", d))
- X return(0);
- X continue;
- X case 'd':
- X if (!_conv(d->day, 2, '0'))
- X return(0);
- X continue;
- X case 'e':
- X if (!_conv(d->day, 2, ' '))
- X return(0);
- X continue;
- X case 'm':
- X if (!_conv(d->month + 1, 2, '0'))
- X return(0);
- X continue;
- X case 'n':
- X if (!_add("\n"))
- X return(0);
- X continue;
- X case 't':
- X if (!_add("\t"))
- X return(0);
- X continue;
- X case 'x':
- X if (!_fmt("%m/%d/%y", d))
- X return(0);
- X continue;
- X case 'y':
- X if (!_conv((d->year)
- X % 100, 2, '0'))
- X return(0);
- X continue;
- X case 'Y':
- X if (!_conv(d->year, 4, '0'))
- X return(0);
- X continue;
- X case '%':
- X /*
- X * X311J/88-090 (4.12.3.5): if conversion char is
- X * undefined, behavior is undefined. Print out the
- X * character itself as printf(3) does.
- X */
- X default:
- X break;
- X }
- X if (!gsize--)
- X return(0);
- X *pt++ = *format;
- X }
- X return(gsize);
- X}
- X
- Xstatic
- X_conv(n, digits, pad)
- X int n, digits;
- X char pad;
- X{
- X static char buf[10];
- X register char *p;
- X
- X for (p = buf + sizeof(buf) - 2; n > 0 && p > buf; n /= 10, --digits)
- X *p-- = n % 10 + '0';
- X while (p > buf && digits-- > 0)
- X *p-- = pad;
- X return(_add(++p));
- X}
- X
- Xstatic
- X_add(str)
- X register char *str;
- X{
- X for (;; ++pt, --gsize) {
- X if (!gsize)
- X return(0);
- X if (!(*pt = *str++))
- X return(1);
- X }
- X}
- END_OF_FILE
- if test 4960 -ne `wc -c <'strfdate.c'`; then
- echo shar: \"'strfdate.c'\" unpacked with wrong size!
- fi
- # end of 'strfdate.c'
- fi
- if test ! -d 'strftime' ; then
- echo shar: Creating directory \"'strftime'\"
- mkdir 'strftime'
- fi
- if test -f 'strftime/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'strftime/README'\"
- else
- echo shar: Extracting \"'strftime/README'\" \(350 characters\)
- sed "s/^X//" >'strftime/README' <<'END_OF_FILE'
- XThe xcal program now uses strftime to create dates and time strings.
- X
- XI include the Net II version here, just in case you don't have it on
- Xyour system.
- X
- XI would guess that it will need some work to make it compile in a
- Xnon BSD environment.
- X
- XThe program `ptime' here is a test bed for the strftime routine.
- XSee ../README.install for more information.
- END_OF_FILE
- if test 350 -ne `wc -c <'strftime/README'`; then
- echo shar: \"'strftime/README'\" unpacked with wrong size!
- fi
- # end of 'strftime/README'
- fi
- if test -f 'strftime/ptime.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'strftime/ptime.c'\"
- else
- echo shar: Extracting \"'strftime/ptime.c'\" \(876 characters\)
- sed "s/^X//" >'strftime/ptime.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *sccsid = "%W% (Hillside Systems) %G%";
- Xstatic char *copyright = "@(#)Copyright 1989,1990,1993 Peter Collinson, Hillside Systems";
- X#endif /* lint */
- X/***
- X
- X* program name:
- X ptime.c
- X* function:
- X diagnostic program for strftime.
- X When given a number of strings, eg
- X ptime "%x X"
- X will invoke the strftime routine to print the result.
- X* libraries used:
- X standard
- X* compile time parameters:
- X cc -o ptime -O ptime.c
- X* history:
- X Written November 1993
- X Peter Collinson
- X Hillside Systems
- X* (C) Copyright: 1993 Hillside Systems/Peter Collinson
- X
- X***/
- X#include <stdio.h>
- X#include <unistd.h>
- X#include <time.h>
- X
- Xchar buf[512];
- X
- Xmain(argc, argv)
- X int argc;
- X char **argv;
- X{
- X time_t ti;
- X struct tm *tm;
- X time(&ti);
- X tm = localtime(&ti);
- X
- X while (--argc) {
- X argv++;
- X strftime(buf, sizeof buf, *argv, tm);
- X printf("%s - %s\n", *argv, buf);
- X }
- X exit(0);
- X}
- END_OF_FILE
- if test 876 -ne `wc -c <'strftime/ptime.c'`; then
- echo shar: \"'strftime/ptime.c'\" unpacked with wrong size!
- fi
- # end of 'strftime/ptime.c'
- fi
- if test -f 'version.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'version.c'\"
- else
- echo shar: Extracting \"'version.c'\" \(933 characters\)
- sed "s/^X//" >'version.c' <<'END_OF_FILE'
- X/*
- X * Version control file
- X * version.c 4.1 11/17/93
- X * Automatically created on Wed Nov 17 11:23:44 GMT 1993
- X *
- X * Hand edit none of this if you want freeze to continue to work
- X */
- X#ifdef VER_PROG
- X#define PROGNAME XCal
- X#endif
- X#ifdef VER_VEC
- Xchar version[] = "XCal Version 4.1, released Wed Nov 17 11:23:44 GMT 1993";
- X#endif
- X#ifdef VER_DEF
- X#define VERSION "XCal Version 4.1, released Wed Nov 17 11:23:44 GMT 1993"
- X#endif
- X
- X/* SCCS files
- X *
- X+1.26 Imakefile
- X+3.19 xcal_help.c
- X+1.3 calendar.bm
- X+1.26 xcal.man
- X+1.22 xcal_memo.c
- X+1.21 XCal.ad
- X+1.24 xcal_alarm.c
- X+3.37 xcal_edit.c
- X+1.8 README
- X+2.3 patchlevel.h
- X+3.27 xcal_strip.c
- X+1.3 help_press.bm
- X+3.13 xcal_popup.c
- X+3.50 xcal.c
- X+3.32 xcal.h
- X+2.38 CHANGES
- X+1.3 mouse.bm
- X+1.3 mouseaway.bm
- X+1.2 XCal.help
- X+1.3 help.bm
- X+1.2 README.sunos
- X+1.2 xcal_days.c
- X+1.3 xcal_buts.c
- X+1.2 C_from_help.sh
- X+1.3 strfdate.c
- X+1.1 C_from_ad.sh
- X+1.2 README.install
- X+1.1 README.contents
- X+1.1 xcal_mmap.h
- X *
- X */
- END_OF_FILE
- if test 933 -ne `wc -c <'version.c'`; then
- echo shar: \"'version.c'\" unpacked with wrong size!
- fi
- # end of 'version.c'
- fi
- if test -f 'xcal_buts.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcal_buts.c'\"
- else
- echo shar: Extracting \"'xcal_buts.c'\" \(3679 characters\)
- sed "s/^X//" >'xcal_buts.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *sccsid = "@(#)xcal_buts.c 1.3 (Hillside Systems) 10/25/93";
- Xstatic char *copyright = "@(#)Copyright 1989,1990,1993 Peter Collinson, Hillside Systems";
- X#endif /* lint */
- X/***
- X
- X* module name:
- X xcal_buts.c
- X* function:
- X Deal with callback management for sensitive buttons
- X When a button is pressed we make it insensitive.
- X In general a button starts a popup - when the popup
- X dies we reset the button.
- X Problem is when the button dies before the popup.
- X
- X* history:
- X Written October 1993
- X Peter Collinson
- X Hillside Systems
- X* (C) Copyright: 1989 Hillside Systems/Peter Collinson
- X
- X For full permissions and copyright notice - see xcal.c
- X***/
- X#include <stdio.h>
- X#include <ctype.h>
- X#include <pwd.h>
- X#include <X11/Intrinsic.h>
- X#include <X11/Xos.h>
- X#include <X11/StringDefs.h>
- X#include <X11/Xaw/Command.h>
- X#include "xcal.h"
- X
- Xtypedef struct active {
- X struct active *next;
- X Widget button;
- X Widget popup;
- X} Active;
- X
- Xstatic Active *act;
- X
- X/*
- X * Local routines
- X */
- Xstatic void AddToActive();
- Xstatic Active *LookActive();
- Xstatic Active *LookPopup();
- Xstatic void DeleteFromActive();
- Xstatic void PopupIsDead();
- Xstatic void ButtonIsDead();
- X
- X/*
- X * Here's the global entry point
- X * given a button and a popup
- X * make the button insensitive
- X * add a destroy callback to the popup to turn the button on again when
- X * the popup dies - assuming the button is in the list
- X * add a destroy callback to the button to remove the button from the list
- X */
- Xvoid
- XButtonOff(but, popup)
- X Widget but;
- X Widget popup;
- X{
- X
- X XtSetSensitive(but, False);
- X
- X XtAddCallback(popup, XtNdestroyCallback, PopupIsDead, but);
- X
- X XtAddCallback(but, XtNdestroyCallback, ButtonIsDead, but);
- X
- X AddToActive(but, popup);
- X}
- X
- X/*
- X * Turn a button on
- X */
- Xvoid
- XButtonOn(but)
- X Widget but;
- X{
- X Active *ap;
- X
- X if (ap = LookActive(but)) {
- X XtRemoveCallback(but, XtNdestroyCallback, ButtonIsDead, but);
- X XtSetSensitive(but, True);
- X DeleteFromActive(but);
- X }
- X}
- X
- X/*
- X * Turn a help button on
- X */
- Xvoid
- XHelpButtonOn(popup)
- X Widget popup;
- X{
- X Active *ap;
- X
- X while (ap = LookPopup(popup))
- X ButtonOn(ap->button);
- X}
- X
- X/*
- X * Callbacks
- X * 1) called from popup when it dies
- X */
- X/* ARGSUSED */
- Xstatic void
- XPopupIsDead(w, closure, call_data)
- X Widget w;
- X caddr_t closure;
- X caddr_t call_data;
- X
- X{
- X ButtonOn((Widget) closure);
- X}
- X
- X/*
- X * Callbacks
- X * 2) called when button is dead
- X */
- X/* ARGSUSED */
- Xstatic void
- XButtonIsDead(w, closure, call_data)
- X Widget w;
- X caddr_t closure;
- X caddr_t call_data;
- X
- X{
- X Active *ap;
- X Widget but = (Widget)closure;
- X
- X if (ap = LookActive(but)) {
- X XtRemoveCallback(ap->popup, XtNdestroyCallback, PopupIsDead, but);
- X DeleteFromActive(but);
- X }
- X}
- X
- X/*
- X * Add a button to the active list
- X */
- Xstatic void
- XAddToActive(but, popup)
- X Widget but;
- X Widget popup;
- X{
- X Active *ap;
- X
- X if (LookActive(but) == NULL) {
- X ap = (Active *) XtMalloc(sizeof (Active));
- X ap->button = but;
- X ap->popup = popup;
- X ap->next = act;
- X act = ap;
- X } /* not convinced that the else arm here is a never happen */
- X}
- X
- Xstatic Active *
- XLookActive(but)
- X Widget but;
- X{
- X Active *ap;
- X
- X for (ap = act; ap; ap = ap->next) {
- X if (ap->button == but)
- X return ap;
- X }
- X return NULL;
- X}
- X
- Xstatic Active *
- XLookPopup(popup)
- X Widget popup;
- X{
- X Active *ap;
- X
- X for (ap = act; ap; ap = ap->next) {
- X if (ap->popup == popup)
- X return ap;
- X }
- X return NULL;
- X}
- X
- X/*
- X * remove an active entry
- X */
- Xstatic void
- XDeleteFromActive(but)
- X Widget but;
- X{
- X Active *ap;
- X Active *lp = NULL;
- X
- X for (ap = act; ap; ap = ap->next) {
- X if (ap->button == but) {
- X if (lp == NULL)
- X act = ap->next;
- X else
- X lp->next = ap->next;
- X XtFree((char *)ap);
- X return;
- X }
- X lp = ap;
- X }
- X}
- X
- END_OF_FILE
- if test 3679 -ne `wc -c <'xcal_buts.c'`; then
- echo shar: \"'xcal_buts.c'\" unpacked with wrong size!
- fi
- # end of 'xcal_buts.c'
- fi
- if test ! -d 'xcal_cal' ; then
- echo shar: Creating directory \"'xcal_cal'\"
- mkdir 'xcal_cal'
- fi
- if test -f 'xcal_cal/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcal_cal/Imakefile'\"
- else
- echo shar: Extracting \"'xcal_cal/Imakefile'\" \(119 characters\)
- sed "s/^X//" >'xcal_cal/Imakefile' <<'END_OF_FILE'
- XBINDIR=/usr/local/bin
- X
- XINSTPGMFLAGS=$(INSTBINFLAGS)
- X
- XAllTarget(xcal_cal)
- XSimpleProgramTarget(xcal_cal)
- X
- XDependTarget()
- END_OF_FILE
- if test 119 -ne `wc -c <'xcal_cal/Imakefile'`; then
- echo shar: \"'xcal_cal/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'xcal_cal/Imakefile'
- fi
- if test -f 'xcal_cal/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcal_cal/README'\"
- else
- echo shar: Extracting \"'xcal_cal/README'\" \(115 characters\)
- sed "s/^X//" >'xcal_cal/README' <<'END_OF_FILE'
- XThis program was contributed by Ed Gould, then of Mt Xinu, now of DEC.
- X
- XI suspect that it is superseded by xcalpr.
- END_OF_FILE
- if test 115 -ne `wc -c <'xcal_cal/README'`; then
- echo shar: \"'xcal_cal/README'\" unpacked with wrong size!
- fi
- # end of 'xcal_cal/README'
- fi
- if test -f 'xcal_cal/xcal_cal.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcal_cal/xcal_cal.man'\"
- else
- echo shar: Extracting \"'xcal_cal/xcal_cal.man'\" \(1141 characters\)
- sed "s/^X//" >'xcal_cal/xcal_cal.man' <<'END_OF_FILE'
- X.TH XCAL_CAL (1)
- X.SH NAME
- Xxcal_cal \- interface to calendar(1) for xcal
- X.SH SYNOPSIS
- X.B xcal_cal
- X[
- X.B \-d
- Xdirectory
- X] [
- X.B \-f
- Xfile
- X] [
- X.B \-m
- X] [
- X.B \-#
- X]
- X.SH DESCRIPTION
- X.I Xcal_cal
- Xreads through the files created by
- X.IR xcal (1)
- Xand creates a file suitable for use by
- X.IR calendar (1).
- XBy default, the files are found in a directory named
- X``Calendar'' in the user's home directory;
- Xan alternate directory may be specified with the
- X.B \-d
- Xflag.
- X.LP
- XOutput goes by default into a file named ``.xcal''
- Xin the user's home directory;
- Xit may be overridden with the
- X.B \-f
- Xflag.
- XIn both cases, if the argument given begins with a slash (`/'),
- Xthen it will be taken as a full path name, not as a path relative to the
- Xuser's home directory.
- XIf the argument begins with the two character sequence `./' then
- Xit will be taken relative to the current directory.
- XThis last form is primarily intended for use while debugging.
- X.LP
- XThe
- X.B \-m
- Xflag directs that multi-line entries in
- X.I xcal
- Xfiles be collected in their
- Xentirety.
- XBy default, only the first line is copied.
- X.SH "SEE ALSO
- Xxcal(1),xcalev(1),xcalpr(1)
- X.SH AUTHOR
- XEd Gould, Mt.Xinu. Thanks Ed.
- END_OF_FILE
- if test 1141 -ne `wc -c <'xcal_cal/xcal_cal.man'`; then
- echo shar: \"'xcal_cal/xcal_cal.man'\" unpacked with wrong size!
- fi
- # end of 'xcal_cal/xcal_cal.man'
- fi
- if test -f 'xcal_mmap.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcal_mmap.h'\"
- else
- echo shar: Extracting \"'xcal_mmap.h'\" \(238 characters\)
- sed "s/^X//" >'xcal_mmap.h' <<'END_OF_FILE'
- X/*
- X * xcal_mmap.h 1.1 11/6/93
- X *
- X * mmap control file
- X * All programs that use mmap include this file
- X * if your system does not have mmap or it gives errors,
- X * #define NO_MMAP in this file.
- X */
- X
- X/* #define NO_MMAP */
- END_OF_FILE
- if test 238 -ne `wc -c <'xcal_mmap.h'`; then
- echo shar: \"'xcal_mmap.h'\" unpacked with wrong size!
- fi
- # end of 'xcal_mmap.h'
- fi
- if test ! -d 'xcalev' ; then
- echo shar: Creating directory \"'xcalev'\"
- mkdir 'xcalev'
- fi
- if test -f 'xcalev/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalev/Imakefile'\"
- else
- echo shar: Extracting \"'xcalev/Imakefile'\" \(134 characters\)
- sed "s/^X//" >'xcalev/Imakefile' <<'END_OF_FILE'
- XDEFINES=-DVER_VEC
- X
- XBINDIR=/usr/local/bin
- XINSTPGMFLAGS=$(INSTBINFLAGS)
- X
- XAllTarget(xcalev)
- X
- XSimpleProgramTarget(xcalev)
- X
- XDependTarget()
- END_OF_FILE
- if test 134 -ne `wc -c <'xcalev/Imakefile'`; then
- echo shar: \"'xcalev/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'xcalev/Imakefile'
- fi
- if test -f 'xcalev/version.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalev/version.h'\"
- else
- echo shar: Extracting \"'xcalev/version.h'\" \(499 characters\)
- sed "s/^X//" >'xcalev/version.h' <<'END_OF_FILE'
- X/*
- X * Version control file
- X * version.h 1.5 11/15/93
- X * Automatically created on Mon Nov 15 23:57:53 GMT 1993
- X *
- X * Hand edit none of this if you want freeze to continue to work
- X */
- X#ifdef VER_PROG
- X#define PROGNAME xcalev
- X#endif
- X#ifdef VER_VEC
- Xchar version[] = "xcalev Version 1.5, released Mon Nov 15 23:57:53 GMT 1993";
- X#endif
- X#ifdef VER_DEF
- X#define VERSION "xcalev Version 1.5, released Mon Nov 15 23:57:53 GMT 1993"
- X#endif
- X
- X/* SCCS files
- X *
- X+1.15 xcalev.c
- X+1.2 xcalev.man
- X+1.6 Imakefile
- X *
- X */
- END_OF_FILE
- if test 499 -ne `wc -c <'xcalev/version.h'`; then
- echo shar: \"'xcalev/version.h'\" unpacked with wrong size!
- fi
- # end of 'xcalev/version.h'
- fi
- if test -f 'xcalev/xcalev.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalev/xcalev.man'\"
- else
- echo shar: Extracting \"'xcalev/xcalev.man'\" \(2821 characters\)
- sed "s/^X//" >'xcalev/xcalev.man' <<'END_OF_FILE'
- X.TH XCALEV 1 "October 1993" "X Version 11 R5"
- X.SH NAME
- Xxcalev \- load xcal calendar files with regular dates
- X.SH SYNTAX
- X.B xcalev
- X[
- X.B \-r
- X][
- X.B \-x
- X][
- X.B \-f
- Xfile
- X][
- X.B \-d
- X.I dir
- X][
- X.I year
- X]
- X.SH DESCRIPTION
- X.I Xcalev
- Xis used to preload the calendar files for the
- X.I xcal
- Xprogram with regular events in your life.
- XIt reads lines from a file (usually called
- X.B regular
- Xstored in your
- X.B Calendar
- Xdirectory.
- XEach line in the file contains three fields separated by
- Xspaces or tabs, these are:
- Xa month name, a day in the month and some text.
- XFor example:
- X.br
- X.nf
- X
- X December 25 Christmas
- X Dec 31 New Year's Eve
- X.fi
- X.LP
- XThe order of the month and the day are optional, the program deduces the day
- Xby looking whether the string contains an initial numeric character or not.
- XThe year defaults to the current year unless the program is given a year
- Xnumber as an argument.
- XThis year cannot be abbreviated to two digits because
- X.I xcal
- X deals with years from year zero.
- XThere's a rough validity check on this.
- X.LP
- XThe string from the data line
- Xis inserted in the appropriate file and will appear in your
- X.I xcal
- Xdate strip.
- XNothing will happen if the string already exists in the file for that day.
- XThis means that it's safe to run
- X.I xcalev
- Xat any time, only the strings that have altered in the
- X.B regular
- Xfile
- Xwill be updated.
- X.LP
- XTo help with entering the same event for a number of days in one month, you
- Xcan give a day range with a hyphen
- X.br
- X.nf
- X Jan 16-21 Usenix SF
- X.fi
- X.LP
- XIf you supply the
- X.I \-r
- Xoption,
- X.I xcalev
- Xwill delete all the matching strings that it finds in the appropriate daily file.
- XSo, if you want to make radical changes to the
- X.B regular
- Xfile, you
- Xshould run
- X.I xcalev
- Xwith the
- X.I \-r
- Xoption to remove all the current
- Xentries from one year, edit the
- X.B regular
- Xfile and run
- X.I xcalev
- Xto reload things.
- X.SH OPTIONS
- X.LP
- XThe
- X.I \-r
- Xoption makes
- X.I xcalev
- Xdelete rather than append entries.
- X.LP
- XThe
- X.I \-x
- Xoption makes
- X.I xcalev
- Xoperate with Calendar files that are compatible
- Xwith the
- X.I xcalendar
- Xprogram.
- X.LP
- XThe
- X.I \-f
- Xswitch is followed by a filename gives an alternative name for the
- X.B regular
- Xfile.
- XIf the filename does not start with a slash or a dot, then the name of
- Xyour Calendar directory will be prepended to it.
- X.LP
- XThe
- X.I \-d
- Xswitch is followed by a directory name and specifies an alterative
- Xlocation for your Calendar directory.
- XYour home directory is prepended if the name doesn't start with a slash
- Xor a dot.
- X.SH FILES
- X.PP
- X$HOME/Calendar/\(**
- X.LP
- X.TP "\w'xc<dd><Mon><Year> 'u"
- Xxc<dd><Mon><Year>
- XA data file is day, Month in three letter format and the year.
- X.TP
- Xxy<Year>
- XA year directory.
- X.TP
- Xxw<Day>
- XA data file for the weekly code, one per day.
- X.SH SEE ALSO
- Xxcal(1), xcalpr(1), xcal_cal(1)
- X.SH AUTHOR
- X.LP
- XCopyright 1993 by Peter Collinson, Hillside Systems
- XAll rights reserved.
- X
- END_OF_FILE
- if test 2821 -ne `wc -c <'xcalev/xcalev.man'`; then
- echo shar: \"'xcalev/xcalev.man'\" unpacked with wrong size!
- fi
- # end of 'xcalev/xcalev.man'
- fi
- if test ! -d 'xcalpr' ; then
- echo shar: Creating directory \"'xcalpr'\"
- mkdir 'xcalpr'
- fi
- if test -f 'xcalpr/Imakefile' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalpr/Imakefile'\"
- else
- echo shar: Extracting \"'xcalpr/Imakefile'\" \(236 characters\)
- sed "s/^X//" >'xcalpr/Imakefile' <<'END_OF_FILE'
- XDEFINES=-DVER_VEC
- XBINDIR=/usr/local/bin
- XINSTPGMFLAGS=$(INSTBINFLAGS)
- X
- XAllTarget(xcalpr)
- XNormalProgramTarget(xcalpr, xcalpr.o xcal_days.o,/**/,/**/,/**/)
- X
- XInstallProgram(xcalpr,$(BINDIR))
- XInstallManPage(xcalpr,$(MANDIR))
- X
- XDependTarget()
- END_OF_FILE
- if test 236 -ne `wc -c <'xcalpr/Imakefile'`; then
- echo shar: \"'xcalpr/Imakefile'\" unpacked with wrong size!
- fi
- # end of 'xcalpr/Imakefile'
- fi
- if test -f 'xcalpr/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalpr/README'\"
- else
- echo shar: Extracting \"'xcalpr/README'\" \(158 characters\)
- sed "s/^X//" >'xcalpr/README' <<'END_OF_FILE'
- XThis is xcalpr - a program to print calendars out in text forms
- X
- XThe program needs access to ../xcal_days.c. I have a symlink to that
- Xfile in this directory.
- END_OF_FILE
- if test 158 -ne `wc -c <'xcalpr/README'`; then
- echo shar: \"'xcalpr/README'\" unpacked with wrong size!
- fi
- # end of 'xcalpr/README'
- fi
- if test -f 'xcalpr/version.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalpr/version.h'\"
- else
- echo shar: Extracting \"'xcalpr/version.h'\" \(499 characters\)
- sed "s/^X//" >'xcalpr/version.h' <<'END_OF_FILE'
- X/*
- X * Version control file
- X * version.h 1.6 11/15/93
- X * Automatically created on Mon Nov 15 23:58:03 GMT 1993
- X *
- X * Hand edit none of this if you want freeze to continue to work
- X */
- X#ifdef VER_PROG
- X#define PROGNAME xcalpr
- X#endif
- X#ifdef VER_VEC
- Xchar version[] = "xcalpr Version 1.6, released Mon Nov 15 23:58:03 GMT 1993";
- X#endif
- X#ifdef VER_DEF
- X#define VERSION "xcalpr Version 1.6, released Mon Nov 15 23:58:03 GMT 1993"
- X#endif
- X
- X/* SCCS files
- X *
- X+1.11 xcalpr.c
- X+1.2 xcalpr.man
- X+1.5 Imakefile
- X *
- X */
- END_OF_FILE
- if test 499 -ne `wc -c <'xcalpr/version.h'`; then
- echo shar: \"'xcalpr/version.h'\" unpacked with wrong size!
- fi
- # end of 'xcalpr/version.h'
- fi
- if test -f 'xcalpr/xcalpr.man' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'xcalpr/xcalpr.man'\"
- else
- echo shar: Extracting \"'xcalpr/xcalpr.man'\" \(3036 characters\)
- sed "s/^X//" >'xcalpr/xcalpr.man' <<'END_OF_FILE'
- X.TH XCALPR 1 "October 1993" "X Version 11 R5"
- X.SH NAME
- Xxcalpr \- print xcal calendar entries
- X.SH SYNTAX
- X.B xcalpr
- X[
- X.B \-c
- X][
- X.B \-x
- X][
- X.B \-f
- Xfile
- X][
- X.B \-d
- X.I dir
- X][
- X.B \-u
- X.I user
- X][
- X.I date-spec
- X]
- X.SH DESCRIPTION
- X.I Xcalpr
- Xprints the contents of the
- X.I xcal
- Xfiles.
- XIt is intended to be used in situations when you have no access to an
- XX screen.
- XIt can also be used to generate entries for the standard UNIX
- X.I calendar
- Xprogram.
- X.LP
- XWith no arguments, it prints any entries that exist for the next seven days.
- XThe program also reads the contents of the seven daily files and prints them
- Xat the appropriate point in the output stream.
- XEach line in the output is preceded by the day of the week, the day of the
- Xmonth, the month and the year.
- X.LP
- X.I Xcalpr
- Xcan be given a date specification to select months and years.
- XIf the date spec consists of just a year number, then
- Xall the data for that year is printed.
- XFor example:
- X.br
- X xcalpr 1994
- X.br
- Xwill print all the data for 1994.
- XSeveral years can be specified.
- X.LP
- XIf you give the name of a month, then the data for that month in the current
- Xyear will be printed.
- XIf the month is in the past, then the data for that month next year will be
- Xprinted.
- XFor example, if
- X.br
- X xcalpr oct jan
- X.br
- Xis typed in August,
- X.I xcalpr
- Xwill print October in the current year and January next year.
- X.LP
- XYou can select a particular year by adding the number after any months that
- Xyou need printing:
- X.br
- X xcalpr oct nov 1994
- X.br
- Xwill print October and November in 1994.
- X.LP
- XThere are a couple of special `month' names.
- XThe name
- X.B rest
- Xwill print the data for the rest of the month, starting tomorrow.
- XThe \fBrest\fP argument is not recognised if you give a year as a parameter.
- XIf tomorrow happens to be the first day of the next month, then all the
- Xdata for next month will be printed.
- XThe name
- X.B next
- Xprints all the data for next month.
- X.SH OPTIONS
- X.LP
- XThe
- X.I \-c
- Xoption causes
- X.I xcalpr
- Xto output lines suitable for input to the standard UNIX
- X.I calendar
- Xprogram.
- X.LP
- XThe
- X.I \-d
- Xswitch is followed by a directory name and specifies an alterative
- Xlocation for your Calendar directory.
- XYour home directory is prepended if the name doesn't start with a slash
- Xor a dot.
- X.LP
- XThe
- X.I \-f
- Xoption is followed by a file name and
- X.I xcalpr
- Xwill write it's output to that file, rather than standard output.
- X.LP
- XThe
- X.I \-u
- Xoption is followed by a user name and dumps their calendar files rather
- Xthan yours.
- X.LP
- XThe
- X.I \-x
- Xoption makes \fIxcalev\fP operate with Calendar files that are compatible
- Xwith the \fIxcalendar\fP program.
- X.SH FILES
- X.PP
- X$HOME/Calendar/\(**
- X.LP
- X.TP "\w'xc<dd><Mon><Year> 'u"
- Xxc<dd><Mon><Year>
- XA data file is day, Month in three letter format and the year.
- X.TP
- Xxy<Year>
- XA year directory.
- X.TP
- Xxw<Day>
- XA data file for the weekly code, one per day.
- X.SH SEE ALSO
- Xxcal(1), xcalev(1), xcal_cal(1)
- X.SH AUTHOR
- X.LP
- XCopyright 1993 by Peter Collinson, Hillside Systems
- XAll rights reserved.
- X.LP
- XThis product includes software developed by the University of
- XCalifornia, Berkeley and its contributors.
- X
- END_OF_FILE
- if test 3036 -ne `wc -c <'xcalpr/xcalpr.man'`; then
- echo shar: \"'xcalpr/xcalpr.man'\" unpacked with wrong size!
- fi
- # end of 'xcalpr/xcalpr.man'
- fi
- echo shar: End of archive 1 \(of 8\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 2 3 4 5 6 7 8 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 8 archives.
- rm -f ark[1-9]isdone
- else
- echo You still need to unpack the following archives:
- echo " " ${MISSING}
- fi
- ## End of shell archive.
- exit 0
-
- exit 0 # Just in case...
- --
- // chris@Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga: The only way to fly! | sources-x@sterling.com
- "It's intuitively obvious to the most casual observer..."
- GCS d++(--) -p+ c++ !l u++ e+ m+(-) s++/++ n h--- f+ g+++ w+ t++ r+ y+
-