home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: dfs@doe.carleton.ca (David F. Skoll)
- Subject: v25i044: remind - A replacement for calendar, Patch04
- Message-ID: <1991Nov10.214035.25123@sparky.imd.sterling.com>
- X-Md4-Signature: e7a741b7d16b90fa769d6069d8e92873
- Date: Sun, 10 Nov 1991 21:40:35 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: dfs@doe.carleton.ca (David F. Skoll)
- Posting-number: Volume 25, Issue 44
- Archive-name: remind/patch04
- Environment: UNIX, MS-DOS
- Patch-To: remind: Volume 17, Issue 3-6
-
- This is Patch 4 for Remind version 2.3, a replacement for calendar(1).
-
- Before applying this patch, make sure you have Remind 2.3.3 source code.
- Check the file patchlevel.h to ensure this
-
- Change to the Remind source directory, unshar the patch file, and type:
-
- patch < patch.04.
-
- Re-make and re-install Remind. To make sure that everything worked, type:
-
- make test
-
- This patch does not add any features to Remind. If you don't feel
- like it, there's no need to apply this patch. It simply adds a few
- useful targets to the Makefile, tidies up the code somewhat, and
- corrects a compile-time warning issued by a particular finicky
- compiler. It also makes the Makefile easier to configure.
-
- You probably want to keep this patch around even if you don't apply it
- now, since subsequent patches will depend on it.
-
- You can FTP a copy of remind 2.3.3 from alfred.ccs.carleton.ca
- (134.117.1.1) in the directory /pub. I'll try to get 2.3.4 uploaded
- there ASAP.
-
- David F. Skoll
-
- -------------- Cut Here ---------- Cut Here ---------- Cut Here -------------
- #!/bin/sh
- # This is Remind 2.3 Official Patch #4, a shell archive (shar 3.32)
- # made 11/05/1991 21:03 UTC by dfs@riker
- # Source directory /enterprise/transporter/dfs/work/.rem/patch4-work
- #
- # existing files will NOT be overwritten
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 13305 -rw------- patch.04
- #
- if touch 2>&1 | fgrep 'amc' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= patch.04 ==============
- if test X"$1" != X"-c" -a -f 'patch.04'; then
- echo "File already exists: skipping 'patch.04'"
- else
- echo "x - extracting patch.04 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > patch.04 &&
- XPatch the Makefile to include many new and useful targets, like make tar,
- Xmake shar, make test, etc.
- X*** ../patch3-work/Makefile Wed Jul 17 12:48:49 1991
- X--- ./Makefile Tue Nov 5 15:41:46 1991
- X***************
- X*** 2,10 ****
- X
- X #--------------- BEGINNING OF THINGS YOU CAN CHANGE --------------
- X
- X- #If you need more than one of the following definitions for CDEFS,
- X- #concatenate the necessary definitions.
- X-
- X #If you have a BSD system:
- X CDEFS= -DUNIX
- X
- X--- 2,7 ----
- X***************
- X*** 12,30 ****
- X #CDEFS= -DUNIX -DSYSV
- X
- X #If your system does not include <malloc.h>, uncomment next line:
- X! #CDEFS= -DNO_MALLOC_H
- X
- X #If you have a SYSV system which does not implement the pid_t type,
- X #uncomment the next line:
- X! #CDEFS= -Dpid_t=int
- X
- X #If your system doesn't print return w/ newline for background processes:
- X! #CDEFS= -DNL=\"\\r\\n\"
- X
- X #If you want to use gcc:
- X #CC= gcc
- X
- X! CFLAGS = -O $(CDEFS)
- X
- X #Where do you want it installed?
- X BINDIR= /usr/local/bin
- X--- 9,28 ----
- X #CDEFS= -DUNIX -DSYSV
- X
- X #If your system does not include <malloc.h>, uncomment next line:
- X! #MDEFS= -DNO_MALLOC_H
- X
- X #If you have a SYSV system which does not implement the pid_t type,
- X #uncomment the next line:
- X! #PDEFS= -Dpid_t=int
- X
- X #If your system doesn't print return w/ newline for background processes:
- X! #NDEFS= -DNL=\"\\r\\n\"
- X
- X #If you want to use gcc:
- X #CC= gcc
- X
- X! #Any extra compiler flags, etc go here.
- X! EXTRAFLAGS= -O
- X
- X #Where do you want it installed?
- X BINDIR= /usr/local/bin
- X***************
- X*** 44,82 ****
- X
- X #--------------- SHOULDN'T CHANGE STUFF BELOW HERE ---------------
- X
- X! all: dorem.o files.o main.o nextdate.o init.o dosubst.o timed.o calendar.o cache.o omits.o
- X! $(CC) -o remind dorem.o files.o main.o nextdate.o init.o dosubst.o timed.o calendar.o cache.o omits.o
- X
- X! dorem.o: dorem.c
- X
- X! files.o: files.c
- X
- X! main.o: main.c
- X
- X! omits.o: omits.c
- X
- X! nextdate.o: nextdate.c
- X
- X! init.o: init.c
- X
- X! dosubst.o: dosubst.c
- X
- X! timed.o: timed.c
- X
- X! calendar.o: calendar.c
- X
- X! cache.o: cache.c
- X
- X! clean:
- X rm -f *.o core *~ remind
- X
- X! install:
- X $(INSTALL) remind $(BINDIR)
- X $(INSTALL) kall $(SCRIPTDIR)
- X $(INSTALL) rem $(SCRIPTDIR)
- X
- X! install.man:
- X $(INSTALL) remind.1 $(MANDIR)/man$(MANSECTION)/remind.$(MANSECTION)
- X $(INSTALL) rem.1 $(MANDIR)/man$(MANSECTION)/rem.$(MANSECTION)
- X $(INSTALL) kall.1 $(MANDIR)/man$(MANSECTION)/kall.$(MANSECTION)
- X
- X--- 42,125 ----
- X
- X #--------------- SHOULDN'T CHANGE STUFF BELOW HERE ---------------
- X
- X! CFLAGS= $(EXTRAFLAGS) $(CDEFS) $(MDEFS) $(PDEFS) $(NDEFS)
- X
- X! HEADERS= cache.h defines.h globals.h patchlevel.h protos.h
- X
- X! MANIFEST= COPYRIGHT Makefile README.DOS README.UNIX WHATSNEW.23 cache.c \
- X! cache.h calendar.c defines.h dorem.c dosubst.c files.c globals.h init.c \
- X! kall kall.1 main.c makefile.tc nextdate.c omits.c patchlevel.h protos.h \
- X! rem rem.1 remind-all.csh remind-all.sh remind.1 remind.mak remind.rsp \
- X! test.out test.rem timed.c turboc.c turboc.h
- X
- X! all: manifest_check remind
- X
- X! remind: dorem.o files.o main.o nextdate.o init.o dosubst.o timed.o calendar.o \
- X! cache.o omits.o
- X! $(CC) -o remind dorem.o files.o main.o nextdate.o init.o dosubst.o \
- X! timed.o calendar.o cache.o omits.o
- X
- X! dorem.o: dorem.c $(HEADERS)
- X
- X! files.o: files.c $(HEADERS)
- X
- X! main.o: main.c $(HEADERS)
- X
- X! omits.o: omits.c $(HEADERS)
- X
- X! nextdate.o: nextdate.c $(HEADERS)
- X
- X! init.o: init.c $(HEADERS)
- X
- X! dosubst.o: dosubst.c $(HEADERS)
- X!
- X! timed.o: timed.c $(HEADERS)
- X!
- X! calendar.o: calendar.c $(HEADERS)
- X!
- X! cache.o: cache.c $(HEADERS)
- X!
- X! clean: FORCE
- X rm -f *.o core *~ remind
- X
- X! emacs_clean: FORCE
- X! rm -f *~
- X!
- X! install: FORCE
- X $(INSTALL) remind $(BINDIR)
- X $(INSTALL) kall $(SCRIPTDIR)
- X $(INSTALL) rem $(SCRIPTDIR)
- X
- X! install.man: FORCE
- X $(INSTALL) remind.1 $(MANDIR)/man$(MANSECTION)/remind.$(MANSECTION)
- X $(INSTALL) rem.1 $(MANDIR)/man$(MANSECTION)/rem.$(MANSECTION)
- X $(INSTALL) kall.1 $(MANDIR)/man$(MANSECTION)/kall.$(MANSECTION)
- X
- X+ tar: manifest_check
- X+ tar cvf ./remind-2.3.4.tar $(MANIFEST)
- X+
- X+ tarZ: tar
- X+ compress -v ./remind-2.3.4.tar
- X+
- X+ shar: manifest_check
- X+ shar -x -n"Remind 2.3.4" -l45 -o./Shar $(MANIFEST)
- X+
- X+ test: manifest_check remind
- X+ @./remind -dv test.rem 16 FEB 1991 > ./test.out.2 2>&1
- X+ @tail +3 ./test.out > ./test.out.3
- X+ @tail +3 ./test.out > ./test.out.4
- X+ @if cmp -s ./test.out.3 ./test.out.4 ; then echo "Passed test" ; \
- X+ rm -f ./test.out.2 ./test.out.3 ./test.out.4; \
- X+ else echo "Failed test" ; rm -f ./test.out.3 ./test.out.4 ; fi
- X+
- X+ manifest_check: FORCE
- X+ @miss=0 ; \
- X+ for i in $(MANIFEST);\
- X+ do if test ! -r $$i ; then\
- X+ echo Distribution is missing file $$i ; miss=1;\
- X+ fi;\
- X+ done;\
- X+ if test $$miss = 1 ; then exit 1 ; \
- X+ else echo "Good... all required files seem to be present..."; fi
- X+
- X+ FORCE:
- X*** ../patch3-work/WHATSNEW.23 Tue Sep 10 10:49:33 1991
- X--- ./WHATSNEW.23 Thu Oct 3 12:16:38 1991
- X***************
- X*** 68,70 ****
- X--- 68,73 ----
- X * Version 2.3 Patch 3 - Added a command-line option for Remind to process
- X queued reminders in the foreground. This makes automatic termination
- X of Remind processes from within X-Windows and Sunview easier.
- X+
- X+ * Version 2.3 Patch 4 - Made the init.c file nicer. Made the Makefile
- X+ prettier. Added "make test", "make tar" and "make shar" Makefile targets.
- X*** ../patch3-work/init.c Tue Sep 10 10:25:35 1991
- X--- ./init.c Mon Sep 30 16:40:04 1991
- X***************
- X*** 12,17 ****
- X--- 12,22 ----
- X static char DPMsg[] = "Debug and Purge options conflict - Purge chosen.\n";
- X static char DPCMsg[] = "Calendar overrides Debug and Purge options.\n";
- X static char NMsg[] = "Next overrides Calendar, Debug and Purge options.\n";
- X+ #ifdef __STDC__
- X+ void ShowUsage(void);
- X+ #else
- X+ void ShowUsage();
- X+ #endif
- X
- X /***************************************************************/
- X /* */
- X***************
- X*** 51,79 ****
- X Foreground = 0;
- X
- X if(argc == 1) {
- X! fprintf(stderr,
- X! "\nREMIND %d.%d Patch Level %d (C) 1990, 1991 by David Skoll.\n\n",
- X! VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
- X! #ifdef UNIX
- X! fprintf(stderr, "Usage: remind [-n | -d | -p | -c# [-w# | -s]] [-voraqthf] filename [date]\n\n");
- X! #else
- X! fprintf(stderr, "Usage: remind [-n | -d | -p | -c# [-w# | -s]] [-vorth] filename [date]\n\n");
- X! #endif
- X! fprintf(stderr, "-n Output next occurrence of reminders in simple format\n");
- X! fprintf(stderr, "-d Debug reminder file\n-p Purge reminder file\n");
- X! fprintf(stderr, "-c# Produce calendar for # months\n");
- X! fprintf(stderr, "-w# Make calendar # columns wide\n");
- X! fprintf(stderr, "-s Produce simple calendar listing (used with -c)\n");
- X! fprintf(stderr, "-v Verbose messages\n-o Ignore ONCE directives\n");
- X! fprintf(stderr, "-r Ignore RUN directives\n");
- X! #ifdef UNIX
- X! fprintf(stderr, "-a Do not trigger current AT reminders until specified time\n");
- X! fprintf(stderr, "-q Do not queue current AT reminders\n");
- X! fprintf(stderr, "-f Process queued reminders in the foreground.\n");
- X! #endif
- X! fprintf(stderr, "-t Trigger all non-expired reminders regardless of delta\n");
- X! fprintf(stderr, "-h 'Hush' mode - don't display anything if no reminders triggered\n\n");
- X! exit(1);
- X }
- X
- X i = 1;
- X--- 56,63 ----
- X Foreground = 0;
- X
- X if(argc == 1) {
- X! ShowUsage();
- X! /* NOTREACHED */
- X }
- X
- X i = 1;
- X***************
- X*** 167,174 ****
- X }
- X i++;
- X if (i >= argc) {
- X! fprintf(stderr, "Missing filename - type 'remind' for usage information.\n");
- X! exit(1);
- X }
- X s = argv[i];
- X }
- X--- 151,158 ----
- X }
- X i++;
- X if (i >= argc) {
- X! ShowUsage();
- X! /* NOTREACHED */
- X }
- X s = argv[i];
- X }
- X***************
- X*** 249,251 ****
- X--- 233,275 ----
- X }
- X return;
- X }
- X+
- X+ /***************************************************************/
- X+ /* */
- X+ /* ShowUsage */
- X+ /* */
- X+ /* Print usage information for REMIND. */
- X+ /* */
- X+ /***************************************************************/
- X+ #ifdef __STDC__
- X+ static void ShowUsage(void)
- X+ #else
- X+ static void ShowUsage()
- X+ #endif
- X+ {
- X+ fprintf(stderr,
- X+ "\nREMIND %d.%d Patch Level %d Copyright 1990, 1991 by David Skoll.\n\n",
- X+ VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);
- X+ #ifdef UNIX
- X+ fprintf(stderr, "Usage: remind [-n | -d | -p | -c# [-w# | -s]] [-voraqthf] filename [date]\n\n");
- X+ #else
- X+ fprintf(stderr, "Usage: remind [-n | -d | -p | -c# [-w# | -s]] [-vorth] filename [date]\n\n");
- X+ #endif
- X+ fprintf(stderr, "-n Output next occurrence of reminders in simple format\n");
- X+ fprintf(stderr, "-d Debug reminder file\n-p Purge reminder file\n");
- X+ fprintf(stderr, "-c# Produce calendar for # months\n");
- X+ fprintf(stderr, "-w# Make calendar # columns wide\n");
- X+ fprintf(stderr, "-s Produce simple calendar listing (used with -c)\n");
- X+ fprintf(stderr, "-v Verbose messages\n-o Ignore ONCE directives\n");
- X+ fprintf(stderr, "-r Ignore RUN directives\n");
- X+ #ifdef UNIX
- X+ fprintf(stderr, "-a Do not trigger current AT reminders until specified time\n");
- X+ fprintf(stderr, "-q Do not queue current AT reminders\n");
- X+ fprintf(stderr, "-f Process queued reminders in the foreground.\n");
- X+ #endif
- X+ fprintf(stderr, "-t Trigger all non-expired reminders regardless of delta\n");
- X+ fprintf(stderr, "-h 'Hush' mode - don't display anything if no reminders triggered\n\n");
- X+ exit(1);
- X+ /* NOTREACHED */
- X+ }
- X+
- X*** ../patch3-work/patchlevel.h Tue Sep 10 11:01:34 1991
- X--- ./patchlevel.h Fri Sep 13 15:25:40 1991
- X***************
- X*** 3,6 ****
- X #define VERSION_MAJOR 2
- X #define VERSION_MINOR 3
- X
- X! #define PATCHLEVEL 3
- X--- 3,6 ----
- X #define VERSION_MAJOR 2
- X #define VERSION_MINOR 3
- X
- X! #define PATCHLEVEL 4
- X*** ../patch3-work/remind.1 Tue Sep 10 10:47:40 1991
- X--- ./remind.1 Fri Sep 13 15:25:35 1991
- X***************
- X*** 146,153 ****
- X The
- X .B \-f
- X flag causes \fBremind\fR to remain in the foreground when handling queued
- X! AT reminders, rather than forking into the background. This is useful in
- X! .xinitrc or .suntools scripts, because you can start \fBremind\fR and have
- X it automatically killed when you exit X-Windows or Sunview. For example,
- X in your .xinitrc script, you could have:
- X .PP
- X--- 146,153 ----
- X The
- X .B \-f
- X flag causes \fBremind\fR to remain in the foreground when handling queued
- X! AT reminders, rather than forking into the background. This is useful
- X! in .xinitrc or .suntools scripts, because you can start \fBremind\fR and have
- X it automatically killed when you exit X-Windows or Sunview. For example,
- X in your .xinitrc script, you could have:
- X .PP
- X*** ../patch3-work/test.out Tue Feb 19 10:04:10 1991
- X--- ./test.out Mon Sep 30 17:22:44 1991
- X***************
- X*** 1,5 ****
- X
- X! File test.rem last accessed on Tuesday, 19 February, 1991
- X
- X --- REM MSG Every Day
- X --- test.rem(19): *Trigger date: Saturday, 16 February, 1991.
- X--- 1,5 ----
- X
- X! File test.rem last accessed on Monday, 30 September, 1991
- X
- X --- REM MSG Every Day
- X --- test.rem(19): *Trigger date: Saturday, 16 February, 1991.
- X*** ../patch3-work/test.rem Mon Feb 18 13:05:20 1991
- X--- ./test.rem Mon Sep 30 17:22:16 1991
- X***************
- X*** 4,18 ****
- X # of the REMIND program by typing:
- X #
- X # (UNIX version):
- X! # remind -dv test.rem 16 FEB 1991 >& temp
- X #
- X # (DOS version):
- X # e2o remind -dv test.rem 16 FEB 1991 > temp
- X #
- X! # and comparing the results with test.out.
- X #
- X! # The only differences should be the date of last
- X! # modification/access
- X
- X # Test each possible case of the basic reminders.
- X
- X--- 4,18 ----
- X # of the REMIND program by typing:
- X #
- X # (UNIX version):
- X! # make test
- X #
- X # (DOS version):
- X # e2o remind -dv test.rem 16 FEB 1991 > temp
- X #
- X! # and compare the results with test.out.
- X #
- X! # The only differences should be the date of last
- X! # modification/access
- X
- X # Test each possible case of the basic reminders.
- X
- XMake timed.c compile without complaints on sysv5.3
- X*** ../patch3-work/timed.c Tue Sep 10 10:22:44 1991
- X--- ./timed.c Tue Nov 5 15:43:46 1991
- X***************
- X*** 167,173 ****
- X unsigned NotSlept;
- X #endif
- X
- X! if (!Foreground) signal(SIGINT, SigIntHandler);
- X
- X /* If we are not connected to a tty, then we must close the
- X * standard file descriptors. This is to prevent someone
- X--- 167,173 ----
- X unsigned NotSlept;
- X #endif
- X
- X! if (!Foreground) signal(SIGINT, (void *) SigIntHandler);
- X
- X /* If we are not connected to a tty, then we must close the
- X * standard file descriptors. This is to prevent someone
- X***************
- X*** 237,243 ****
- X AtEntry *e;
- X
- X #ifdef SYSV
- X! signal(SIGINT, SigIntHandler);
- X #endif
- X
- X printf("Contents of AT queue:%s", NL);
- X--- 237,243 ----
- X AtEntry *e;
- X
- X #ifdef SYSV
- X! signal(SIGINT, (void *) SigIntHandler);
- X #endif
- X
- X printf("Contents of AT queue:%s", NL);
- SHAR_EOF
- $TOUCH -am 1105155791 patch.04 &&
- chmod 0600 patch.04 ||
- echo "restore of patch.04 failed"
- set `wc -c patch.04`;Wc_c=$1
- if test "$Wc_c" != "13305"; then
- echo original size 13305, current size $Wc_c
- fi
- fi
- exit 0
-
-
-
- exit 0 # Just in case...
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-