greg@cheers.Bungi.COM (Greg Onufer) (09/14/90)
These patches fix several problems found while getting PSR to run on a Sun-2/SunOS 4. These include makefile changes, NULL-pointer indirection problems, signal handler type problems, and general aesthetic changes in several prompts. One file depended on a non-ANSI preprocessor for char-izing. These patches are in no way Sun-2-specific! More things need to be fixed (like printer support) the items in psr/d.psr/bugs, so those may be forthcoming. The company that wrote PSR, ACC, doesn't have an e-mail address in any of the README files, so I'm posting the changes here. Are they out there somewhere? Cheers!greg (Use "patch -p1 < THISFILE" in the psr directory to apply these patches) diff -c psr/d.fillin/Makefile:1.1.1.1 psr/d.fillin/Makefile:1.3 *** psr/d.fillin/Makefile:1.1.1.1 Fri Sep 14 01:36:30 1990 --- psr/d.fillin/Makefile Fri Sep 14 01:36:31 1990 *************** *** 1,11 **** # This is version 1.2 of Makefile (6/29/86) for fillin all : fillin fillout ! DESTDIR= /usr/local/bin ! LIB= /usr/local/lib LINTLIB= ${LIB}/lint ! #COPT= -O # for production ! COPT= -g # for test # # Defined constants for C compiler: # CASEFOLD If defined then pattern-matching will allow --- 1,13 ---- # This is version 1.2 of Makefile (6/29/86) for fillin all : fillin fillout ! DESTDIR= /pkg/psr/bin ! LIB= /pkg/psr/lib ! MAN= /pkg/psr/man LINTLIB= ${LIB}/lint ! CC = gcc -traditional -fpcc-struct-return ! COPT= -O -g -fstrength-reduce # for production ! #COPT= -g # for test # # Defined constants for C compiler: # CASEFOLD If defined then pattern-matching will allow *************** *** 12,18 **** # case-folding. # CDEFS= -DVMUNIX -DCASEFOLD ! CFLAGS= ${COPT} ${CDEFS} DBCURS= #scroll.c id_subwins.c FF_debug.c DBCOBJ= #scroll.o id_subwins.o FF_debug.o --- 14,20 ---- # case-folding. # CDEFS= -DVMUNIX -DCASEFOLD ! CFLAGS= $(COPT) ${CDEFS} DBCURS= #scroll.c id_subwins.c FF_debug.c DBCOBJ= #scroll.o id_subwins.o FF_debug.o *************** *** 37,43 **** HFILES= fillin.h local.h sped.h ff.h SRC= ${CFILES} ${HFILES} llib-lfill - MAN= /usr/man MANPGS= fillin.1 fillout.1 fillin.3 fillin.5 # Actually fillin and fillout don't depend on everything in libfill.a --- 39,44 ---- *************** *** 44,53 **** # but this works. fillin : fillin.o libfill.a $(DBCOBJ) ! cc ${COPT} -o fillin fillin.o $(DBCOBJ) libfill.a ${SPED} ${FF} -lcurses -ltermcap fillout : fillout.o libfill.a ! cc ${COPT} -o fillout fillout.o libfill.a ${SPED} ${FF} -lcurses -ltermcap libfill.a : ${OBJ} ar r libfill.a $? --- 45,54 ---- # but this works. fillin : fillin.o libfill.a $(DBCOBJ) ! $(CC) $(COPT) -o fillin fillin.o $(DBCOBJ) libfill.a ${SPED} ${FF} -lcurses -ltermcap fillout : fillout.o libfill.a ! $(CC) $(COPT) -o fillout fillout.o libfill.a ${SPED} ${FF} -lcurses -ltermcap libfill.a : ${OBJ} ar r libfill.a $? diff -c psr/d.fillin/driver.c:1.1.1.1 psr/d.fillin/driver.c:1.2 *** psr/d.fillin/driver.c:1.1.1.1 Fri Sep 14 01:36:35 1990 --- psr/d.fillin/driver.c Fri Sep 14 01:36:37 1990 *************** *** 1,8 **** #ifndef lint ! static char rcsid[]="$Header: /mnt/src.master/psr/d.fillin/driver.c,v 1.1.1.1 90/09/13 17:02:46 greg Exp $"; #endif /* driver.c - main driver routine for fillin screen handler * $Log: driver.c,v $ * Revision 1.1.1.1 90/09/13 17:02:46 greg * PSR System * --- 1,14 ---- #ifndef lint ! static char rcsid[]="$Header: /mnt/src.master/psr/d.fillin/driver.c,v 1.2 90/09/14 01:16:11 greg Exp $"; #endif /* driver.c - main driver routine for fillin screen handler * $Log: driver.c,v $ + * Revision 1.2 90/09/14 01:16:11 greg + * ---------------------------------------------------------------------- + * * Changed the type of the result of signal() to use a #define'd constant + * * Fixed local.h so ANSI C preprocessors have a chance + * * Minor changes + * * Revision 1.1.1.1 90/09/13 17:02:46 greg * PSR System * *************** *** 92,98 **** char last_c; /* Previous input char or null */ char *cmd_line; /* ^A command line */ int x,y; /* Track cursor during ^A */ ! int (*user_sig)(); /* User's interrupt signal. */ char SpedEdit(), edit(); extern fill_signal(); --- 98,104 ---- char last_c; /* Previous input char or null */ char *cmd_line; /* ^A command line */ int x,y; /* Track cursor during ^A */ ! SIGTYPE (*user_sig)(); /* User's interrupt signal. */ char SpedEdit(), edit(); extern fill_signal(); diff -c psr/d.fillin/edit.c:1.1.1.1 psr/d.fillin/edit.c:1.2 *** psr/d.fillin/edit.c:1.1.1.1 Fri Sep 14 01:36:45 1990 --- psr/d.fillin/edit.c Fri Sep 14 01:36:47 1990 *************** *** 1,6 **** ! static char rcsid[]="$Header: /mnt/src.master/psr/d.fillin/edit.c,v 1.1.1.1 90/09/13 17:03:01 greg Exp $"; /* edit.c - SpedEdit etc for fillin screen handler * $Log: edit.c,v $ * Revision 1.1.1.1 90/09/13 17:03:01 greg * PSR System * --- 1,12 ---- ! static char rcsid[]="$Header: /mnt/src.master/psr/d.fillin/edit.c,v 1.2 90/09/14 01:16:18 greg Exp $"; /* edit.c - SpedEdit etc for fillin screen handler * $Log: edit.c,v $ + * Revision 1.2 90/09/14 01:16:18 greg + * ---------------------------------------------------------------------- + * * Changed the type of the result of signal() to use a #define'd constant + * * Fixed local.h so ANSI C preprocessors have a chance + * * Minor changes + * * Revision 1.1.1.1 90/09/13 17:03:01 greg * PSR System * *************** *** 217,224 **** int mask; { register int pid; /* Process id of forked child. */ ! register int (*CurIntProc) (); /* Current interrupt process. */ ! register int (*stop_fcn) ();/* Current stop-signal function. */ static char *default_editor = "/usr/ucb/vi"; static char *editor = NULL; char *getenv(); --- 223,232 ---- int mask; { register int pid; /* Process id of forked child. */ ! register SIGTYPE (*CurIntProc) (); /* Current interrupt process. */ ! #ifdef SIGTSTP ! register SIGTYPE (*stop_fcn) ();/* Current stop-signal function. */ ! #endif static char *default_editor = "/usr/ucb/vi"; static char *editor = NULL; char *getenv(); *************** *** 272,277 **** --- 280,288 ---- #endif { signal(SIGINT, CurIntProc); + #ifdef SIGTSTP + signal(SIGTSTP, stop_fcn); + #endif setuid(getuid()); setgid(getgid()); execlp(editor, editor, field->FF_value, 0); diff -c psr/d.fillin/fillout.c:1.1.1.1 psr/d.fillin/fillout.c:1.2 *** psr/d.fillin/fillout.c:1.1.1.1 Fri Sep 14 01:36:55 1990 --- psr/d.fillin/fillout.c Fri Sep 14 01:36:56 1990 *************** *** 123,129 **** else t = read_template(templ_file, 0, print_warnings); { /* On interrupt, cleanup. */ ! int (*oldsig)(); CurFillinTempl = t; if( (oldsig = signal(SIGINT, interrupt_handler)) != SIG_DFL) signal(SIGINT, oldsig); --- 123,130 ---- else t = read_template(templ_file, 0, print_warnings); { /* On interrupt, cleanup. */ ! SIGTYPE (*oldsig)(); ! CurFillinTempl = t; if( (oldsig = signal(SIGINT, interrupt_handler)) != SIG_DFL) signal(SIGINT, oldsig); diff -c psr/d.fillin/fo_sub.c:1.1.1.1 psr/d.fillin/fo_sub.c:1.2 *** psr/d.fillin/fo_sub.c:1.1.1.1 Fri Sep 14 01:37:08 1990 --- psr/d.fillin/fo_sub.c Fri Sep 14 01:37:09 1990 *************** *** 1,5 **** #include <ctype.h> - #include <signal.h> #include "fillin.h" #include "local.h" /* --- 1,4 ---- diff -c psr/d.fillin/local.h:1.1.1.1 psr/d.fillin/local.h:1.2 *** psr/d.fillin/local.h:1.1.1.1 Fri Sep 14 01:37:16 1990 --- psr/d.fillin/local.h Fri Sep 14 01:37:17 1990 *************** *** 5,10 **** --- 5,12 ---- * *****************************************************************************/ + #define SIGTYPE void + /* Following declarations placate lint. */ /* Tricky little definition so lint will shut up about unused sccsid's */ *************** *** 43,49 **** /* #define CTRL(c) ('c' & 037) */ ! #define bell() (putchar(CTRL(g))) /* External Unix variables */ extern int errno; --- 45,51 ---- /* #define CTRL(c) ('c' & 037) */ ! #define bell() (putchar('g' & 037)) /* External Unix variables */ extern int errno; *************** *** 50,73 **** extern char *sys_errlist[]; /* ! #define KEY_END CTRL(d) ! #define KEY_EDIT CTRL(e) ! #define KEY_NEXT CTRL(n) ! #define KEY_PROC CTRL(a) ! #define KEY_QUIT CTRL(q) ! #define KEY_APPEN CTRL(~) ! #define KEY_PREV CTRL(u) ! #define KEY_RDRAW CTRL(l) ! #define KEY_SFORWARD CTRL(f) ! #define KEY_SBACKWARD CTRL(b) */ ! #define KEY_END CTRL(w) ! #define KEY_EDIT CTRL(e) ! #define KEY_NEXT CTRL(n) ! #define KEY_PROC CTRL(a) ! #define KEY_QUIT CTRL(q) ! #define KEY_APPEN CTRL(~) ! #define KEY_PREV CTRL(b) ! #define KEY_RDRAW CTRL(l) ! #define KEY_SFORWARD CTRL(d) ! #define KEY_SBACKWARD CTRL(u) --- 52,75 ---- extern char *sys_errlist[]; /* ! #define KEY_END ('d' & 037) ! #define KEY_EDIT ('e' & 037) ! #define KEY_NEXT ('n' & 037) ! #define KEY_PROC ('a' & 037) ! #define KEY_QUIT ('q' & 037) ! #define KEY_APPEN ('~' & 037) ! #define KEY_PREV ('u' & 037) ! #define KEY_RDRAW ('l' & 037) ! #define KEY_SFORWARD ('f' & 037) ! #define KEY_SBACKWARD ('b' & 037) */ ! #define KEY_END ('w' & 037) ! #define KEY_EDIT ('e' & 037) ! #define KEY_NEXT ('n' & 037) ! #define KEY_PROC ('a' & 037) ! #define KEY_QUIT ('q' & 037) ! #define KEY_APPEN ('~' & 037) ! #define KEY_PREV ('b' & 037) ! #define KEY_RDRAW ('l' & 037) ! #define KEY_SFORWARD ('d' & 037) ! #define KEY_SBACKWARD ('u' & 037) diff -c psr/d.fillin/matchfield.c:1.1.1.1 psr/d.fillin/matchfield.c:1.2 *** psr/d.fillin/matchfield.c:1.1.1.1 Fri Sep 14 01:37:22 1990 --- psr/d.fillin/matchfield.c Fri Sep 14 01:37:24 1990 *************** *** 164,169 **** --- 164,172 ---- #define CCL 6 #define NCCL 8 #define CDOL 10 + #ifdef CEOF + #undef CEOF + #endif #define CEOF 11 #define CKET 12 #define CBACK 18 diff -c psr/d.fillin/procfld.c:1.1.1.1 psr/d.fillin/procfld.c:1.2 *** psr/d.fillin/procfld.c:1.1.1.1 Fri Sep 14 01:37:33 1990 --- psr/d.fillin/procfld.c Fri Sep 14 01:37:37 1990 *************** *** 305,311 **** char command[]; { int status, pid, w; ! register int (*istat)(), (*qstat)(); if ((pid = fork()) == 0 ) { setuid(getuid()); --- 305,311 ---- char command[]; { int status, pid, w; ! register SIGTYPE (*istat)(), (*qstat)(); if ((pid = fork()) == 0 ) { setuid(getuid()); diff -c psr/d.libljp/Makefile:1.1.1.1 psr/d.libljp/Makefile:1.2 *** psr/d.libljp/Makefile:1.1.1.1 Fri Sep 14 01:37:50 1990 --- psr/d.libljp/Makefile Fri Sep 14 01:37:52 1990 *************** *** 1,5 **** ! COPT = -c # for subroutines ! LDOPT = #-g -p # for main OBJS = \ ask_yes_no.o copyfile.o copytoheap.o dateandtime.o \ --- 1,6 ---- ! CC = gcc -traditional -fpcc-struct-return ! COPT = -g -O -fstrength-reduce -c # for subroutines ! LDOPT = -g # -p # for main OBJS = \ ask_yes_no.o copyfile.o copytoheap.o dateandtime.o \ *************** *** 17,130 **** ranlib libljp.a ask_yes_no.o: ask_yes_no.c ! cc ${COPT} ask_yes_no.c - ask_yes_no.c: RCS/ask_yes_no.c,v - co ask_yes_no.c - copyfile.o: copyfile.c ! cc ${COPT} copyfile.c - copyfile.c: RCS/copyfile.c,v - co copyfile.c - copytoheap.o: copytoheap.c ! cc ${COPT} copytoheap.c - copytoheap.c: RCS/copytoheap.c,v - co copytoheap.c - dateandtime.o: dateandtime.c ! cc ${COPT} dateandtime.c - dateandtime.c: RCS/dateandtime.c,v - co dateandtime.c - fclose_ck.o: fclose_ck.c ! cc ${COPT} fclose_ck.c - fclose_ck.c: RCS/fclose_ck.c,v - co fclose_ck.c - filename.o: filename.c ! cc ${COPT} filename.c - filename.c: RCS/filename.c,v - co filename.c - filesize.o: filename.c ! cc ${COPT} filesize.c - filesize.c: RCS/filename.c,v - co filesize.c - getnext.o: getnext.c ! cc ${COPT} getnext.c - getnext.c: RCS/getnext.c,v - co getnext.c - lastchar.o: lastchar.c ! cc ${COPT} lastchar.c - lastchar.c: RCS/lastchar.c,v - co lastchar.c - loadfile.o: loadfile.c ! cc ${COPT} loadfile.c - loadfile.c: RCS/loadfile.c,v - co loadfile.c - makepublic.o: makepublic.c ! cc ${COPT} makepublic.c - makepublic.c: RCS/makepublic.c,v - co makepublic.c - moreout.o: moreout.c ! cc ${COPT} moreout.c - moreout.c: RCS/moreout.c,v - co moreout.c - printlist.o: printlist.c ! cc ${COPT} printlist.c - printlist.c: RCS/printlist.c,v - co printlist.c - samefile.o: samefile.c ! cc ${COPT} samefile.c - samefile.c: RCS/samefile.c,v - co samefile.c - set_cbreak.o: set_cbreak.c ! cc ${COPT} set_cbreak.c - set_cbreak.c: RCS/set_cbreak.c,v - co set_cbreak.c - strpak.o: strpak.c ! cc ${COPT} strpak.c - strpak.c: RCS/strpak.c,v - co strpak.c - systemve.o: systemve.c ! cc ${COPT} systemve.c - systemve.c: RCS/systemve.c,v - co systemve.c - makewritable.o: makewritable.c ! cc ${COPT} makewritable.c - makewritable.c: RCS/makewritable.c,v - co makewritable.c - makepublic makeitmine: makewritable.o libljp.a rm -f makepublic makeitmine ! cc -o makepublic makewritable.o libljp.a ln makepublic makeitmine --- 18,77 ---- ranlib libljp.a ask_yes_no.o: ask_yes_no.c ! $(CC) $(COPT) ask_yes_no.c copyfile.o: copyfile.c ! $(CC) $(COPT) copyfile.c copytoheap.o: copytoheap.c ! $(CC) $(COPT) copytoheap.c dateandtime.o: dateandtime.c ! $(CC) $(COPT) dateandtime.c fclose_ck.o: fclose_ck.c ! $(CC) $(COPT) fclose_ck.c filename.o: filename.c ! $(CC) $(COPT) filename.c filesize.o: filename.c ! $(CC) $(COPT) filesize.c getnext.o: getnext.c ! $(CC) $(COPT) getnext.c lastchar.o: lastchar.c ! $(CC) $(COPT) lastchar.c loadfile.o: loadfile.c ! $(CC) $(COPT) loadfile.c makepublic.o: makepublic.c ! $(CC) $(COPT) makepublic.c moreout.o: moreout.c ! $(CC) $(COPT) moreout.c printlist.o: printlist.c ! $(CC) $(COPT) printlist.c samefile.o: samefile.c ! $(CC) $(COPT) samefile.c set_cbreak.o: set_cbreak.c ! $(CC) $(COPT) set_cbreak.c strpak.o: strpak.c ! $(CC) $(COPT) strpak.c systemve.o: systemve.c ! $(CC) $(COPT) systemve.c makewritable.o: makewritable.c ! $(CC) $(COPT) makewritable.c makepublic makeitmine: makewritable.o libljp.a rm -f makepublic makeitmine ! $(CC) $(COPT) -o makepublic makewritable.o libljp.a ln makepublic makeitmine diff -c psr/d.libljp/tstamp.c:1.1.1.1 psr/d.libljp/tstamp.c:1.2 *** psr/d.libljp/tstamp.c:1.1.1.1 Fri Sep 14 01:37:57 1990 --- psr/d.libljp/tstamp.c Fri Sep 14 01:37:58 1990 *************** *** 5,11 **** char *temp; time_now = time(0); ! temp = asctime(localtime(&time_now)) + 4; temp[12] = 0; return temp; } --- 5,11 ---- char *temp; time_now = time(0); ! temp = (char *)asctime(localtime(&time_now)) + 4; temp[12] = 0; return temp; } diff -c psr/d.psr/psr.h:1.1.1.1 psr/d.psr/psr.h:1.3 *** psr/d.psr/psr.h:1.1.1.1 Fri Sep 14 01:38:06 1990 --- psr/d.psr/psr.h Fri Sep 14 01:38:07 1990 *************** *** 4,12 **** * This header file extracted by the main program at the start * of the work on revision 3.0 of psrmaint.c * ! * $Header: /mnt/src.master/psr/d.psr/psr.h,v 1.1.1.1 90/09/13 17:21:24 greg Exp $ * * $Log: psr.h,v $ * Revision 1.1.1.1 90/09/13 17:21:24 greg * PSR System * --- 4,26 ---- * This header file extracted by the main program at the start * of the work on revision 3.0 of psrmaint.c * ! * $Header: /mnt/src.master/psr/d.psr/psr.h,v 1.3 90/09/14 01:35:26 greg Exp $ * * $Log: psr.h,v $ + * Revision 1.3 90/09/14 01:35:26 greg + * ---------------------------------------------------------------------- + * Fixed mispellings + * + * Revision 1.2 90/09/14 01:09:23 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:21:24 greg * PSR System * *************** *** 88,108 **** */ /*#define FILLIN "/home/amos/systeam/bin/fillin" /* */ /*#define FILLOUT "/home/amos/systeam/bin/fillout" /* */ ! #define PSR_ROOT_DIR "/home/amos/systeam/PSRSYS" #define ACTIVE_PSR_DIR "active.psrs" /* under PSR_ROOT_DIR */ #define ARCHIVED_PSR_DIR "archived.psrs" /* under PSR_ROOT_DIR */ #define NEW_PSR_DIR "new.psrs" /* under PSR_ROOT_DIR */ #define CLOSED_PSR_DIR "closed.psrs" /* under PSR_ROOT_DIR */ ! #define PSR_SUMMARY_FILE "/home/amos/systeam/PSRSYS/PSR_summary_file" ! #define SERVICE_ACCOUNT "systeam" #define PSR_PREFIX "pdr" /* filenames have this before number */ #define F_NEXT ".next.psr" /* under NEW_PSR_DIR */ #define MAXLINE 72 /* a line of terminal output (mail subject) */ #define MAXPAGE 59 /* max lines per line printer page */ ! #define COMPANY_NAME "CMC" #define MAXPATH 256 #define MAX_PFX_CNT 10 #define VOID ((char *)-1) #define SEVERITY_CRITICAL 1 #define SEVERITY_HIGH 2 --- 102,124 ---- */ /*#define FILLIN "/home/amos/systeam/bin/fillin" /* */ /*#define FILLOUT "/home/amos/systeam/bin/fillout" /* */ ! #define PSR_ROOT_DIR "/pkg/psr/PSRSYS" #define ACTIVE_PSR_DIR "active.psrs" /* under PSR_ROOT_DIR */ #define ARCHIVED_PSR_DIR "archived.psrs" /* under PSR_ROOT_DIR */ #define NEW_PSR_DIR "new.psrs" /* under PSR_ROOT_DIR */ #define CLOSED_PSR_DIR "closed.psrs" /* under PSR_ROOT_DIR */ ! #define PSR_SUMMARY_FILE "/pkg/psr/PSRSYS/PSR_summary_file" ! #define SERVICE_ACCOUNT "psr" #define PSR_PREFIX "pdr" /* filenames have this before number */ #define F_NEXT ".next.psr" /* under NEW_PSR_DIR */ #define MAXLINE 72 /* a line of terminal output (mail subject) */ #define MAXPAGE 59 /* max lines per line printer page */ ! #define COMPANY_NAME "Cheers" #define MAXPATH 256 #define MAX_PFX_CNT 10 #define VOID ((char *)-1) + #define SIGTYPE void + #define DEFAULT_PRINTER "lp" #define SEVERITY_CRITICAL 1 #define SEVERITY_HIGH 2 diff -c psr/d.psr/Makefile:1.1.1.1 psr/d.psr/Makefile:1.2 *** psr/d.psr/Makefile:1.1.1.1 Fri Sep 14 01:38:15 1990 --- psr/d.psr/Makefile Fri Sep 14 01:38:16 1990 *************** *** 1,8 **** ! # $Header: /mnt/src.master/psr/d.psr/Makefile,v 1.1.1.1 90/09/13 17:14:56 greg Exp $ # Makefile for the ACC/CMC "PSR" problem tracking system # ! CFLAGS = -g -I../d.fillin #-p # for subroutines ! LDOPT = -g #-p # for main LIBLJP = ../d.libljp/libljp.a ../d.fillin/libfill.a SRC = psr.h addnote.c archive.c canon_name.c checkpsr.c \ --- 1,9 ---- ! # $Header: /mnt/src.master/psr/d.psr/Makefile,v 1.2 90/09/14 01:08:52 greg Exp $ # Makefile for the ACC/CMC "PSR" problem tracking system # ! CC = gcc -traditional -fpcc-struct-return ! CFLAGS = -g -O -I../d.fillin #-p # for subroutines ! LDOPT = -g #-p # for main LIBLJP = ../d.libljp/libljp.a ../d.fillin/libfill.a SRC = psr.h addnote.c archive.c canon_name.c checkpsr.c \ *************** *** 67,100 **** products.o psrhandle.o psrsummary.o Q_open.o showapsr.o psr: psr.h psrmain.o ${OBJS} $(LIBLJP) ! cc $(LDOPT) -o psr psrmain.o ${OBJS} $(LIBLJP) -lcurses -ltermcap chmod 755 psr psr.dbg: psrmain.o ${PROFOBJS} $(LIBLJP) ! cc $(LDOPT) -p -g -o psr.dbg psrmain.o ${PROFOBJS} $(LIBLJP) check_options.o psr_data.o followup.o: psr.h phonebook: phonebook.o $(OBJS) $(LIBLJP) ! cc $(LDOPT) -o phonebook phonebook.o $(OBJS) $(LIBLJP) browse: $(BROWSEOBJ) $(LIBLJP) Makefile ! cc -g -o browse $(BROWSEOBJ) $(LIBLJP) browse.p: $(BROWSEOBJ) $(LIBLJP) Makefile ! cc -p -g -o browse.p $(BROWSEOBJ) $(LIBLJP) makepublic: $(MPOBJ) ! cc -o makepublic $(MPOBJ) ! lint: RCS ! lint *.c sources: ${SRC} - ${SRC}: - co $@ ! whatsnew: Makefile $(SRC) ls -l Makefile *.h *.c | grep rw vgrind: $(VGROUT) --- 68,102 ---- products.o psrhandle.o psrsummary.o Q_open.o showapsr.o psr: psr.h psrmain.o ${OBJS} $(LIBLJP) ! $(CC) $(LDOPT) -o psr psrmain.o ${OBJS} $(LIBLJP) -lcurses -ltermcap chmod 755 psr psr.dbg: psrmain.o ${PROFOBJS} $(LIBLJP) ! $(CC) $(LDOPT) -p -g -o psr.dbg psrmain.o ${PROFOBJS} $(LIBLJP) check_options.o psr_data.o followup.o: psr.h phonebook: phonebook.o $(OBJS) $(LIBLJP) ! $(CC) $(LDOPT) -o phonebook phonebook.o $(OBJS) $(LIBLJP) browse: $(BROWSEOBJ) $(LIBLJP) Makefile ! $(CC) $(LDOPT) -o browse $(BROWSEOBJ) $(LIBLJP) browse.p: $(BROWSEOBJ) $(LIBLJP) Makefile ! $(CC) $(LDOPT) -p -o browse.p $(BROWSEOBJ) $(LIBLJP) makepublic: $(MPOBJ) ! $(CC) $(LDOPT) -o makepublic $(MPOBJ) ! lint: ${SRC} ! lint ${SRC} sources: ${SRC} ! #${SRC}: ! # co $@ ! ! whatsnew: Makefile ${SRC} ls -l Makefile *.h *.c | grep rw vgrind: $(VGROUT) *************** *** 103,106 **** .c.ps: ; vgrind $*.c >$*.ps ; lpr $*.ps ! .c.op: ; cc $(CFLAGS) -p -c -o $@ $*.c --- 105,108 ---- .c.ps: ; vgrind $*.c >$*.ps ; lpr $*.ps ! .c.op: ; $(CC) $(CFLAGS) -p -c -o $@ $*.c diff -c psr/d.psr/Q_open.c:1.1.1.1 psr/d.psr/Q_open.c:1.2 *** psr/d.psr/Q_open.c:1.1.1.1 Fri Sep 14 01:38:23 1990 --- psr/d.psr/Q_open.c Fri Sep 14 01:38:24 1990 *************** *** 23,29 **** printer_name = getenv("PRINTER"); if (printer_name == NULL) { ! printer_name = "lp0"; fprintf(stderr, "%s - will print to \"%s\"\n", "Printout requested, but no default printer defined", printer_name); --- 23,29 ---- printer_name = getenv("PRINTER"); if (printer_name == NULL) { ! printer_name = DEFAULT_PRINTER; fprintf(stderr, "%s - will print to \"%s\"\n", "Printout requested, but no default printer defined", printer_name); diff -c psr/d.psr/addnote.c:1.1.1.1 psr/d.psr/addnote.c:1.2 *** psr/d.psr/addnote.c:1.1.1.1 Fri Sep 14 01:38:28 1990 --- psr/d.psr/addnote.c Fri Sep 14 01:38:29 1990 *************** *** 1,8 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/addnote.c,v 1.1.1.1 90/09/13 17:15:47 greg Exp $"; /* addnote.c - add a footnote to a psrupdate * * $Log: addnote.c,v $ * Revision 1.1.1.1 90/09/13 17:15:47 greg * PSR System * --- 1,12 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/addnote.c,v 1.2 90/09/14 01:26:02 greg Exp $"; /* addnote.c - add a footnote to a psrupdate * * $Log: addnote.c,v $ + * Revision 1.2 90/09/14 01:26:02 greg + * ---------------------------------------------------------------------- + * Changed the formatting of prompts... + * * Revision 1.1.1.1 90/09/13 17:15:47 greg * PSR System * *************** *** 57,63 **** fprintf(stderr, "addnote: You have specified %d PSRs to annotate\n"); fprintf(stderr, " They will all get the same note.\n"); if (!ask_yes_no(stderr, ! " Is that what you want [yn] ? ")) exit(0); } for (arg = 1; argv[arg] != NULL; arg++) --- 61,67 ---- fprintf(stderr, "addnote: You have specified %d PSRs to annotate\n"); fprintf(stderr, " They will all get the same note.\n"); if (!ask_yes_no(stderr, ! " Is that what you want [yn]? ")) exit(0); } for (arg = 1; argv[arg] != NULL; arg++) diff -c psr/d.psr/check_options.c:1.1.1.1 psr/d.psr/check_options.c:1.2 *** psr/d.psr/check_options.c:1.1.1.1 Fri Sep 14 01:38:34 1990 --- psr/d.psr/check_options.c Fri Sep 14 01:38:35 1990 *************** *** 1,7 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/check_options.c,v 1.1.1.1 90/09/13 17:16:46 greg Exp $"; /* check_options.c - options preprocessing for PSR program * written by Lars Poulsen <lars@acc.arpa> * $Log: check_options.c,v $ * Revision 1.1.1.1 90/09/13 17:16:46 greg * PSR System * --- 1,17 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/check_options.c,v 1.2 90/09/14 01:09:03 greg Exp $"; /* check_options.c - options preprocessing for PSR program * written by Lars Poulsen <lars@acc.arpa> * $Log: check_options.c,v $ + * Revision 1.2 90/09/14 01:09:03 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:16:46 greg * PSR System * *************** *** 117,127 **** if (strcmp(printer_name, "print.prod") == 0) printer_name = "la120.1"; if ((strcmp(printer_name, "laser") == 0) ! || (strcmp(printer_name, "lp" ) == 0) || (strncmp(printer_name, "print", 5) == 0)) { char *new_name; new_name = getenv("PRINTER"); ! if (new_name == NULL) new_name = "lp0"; fprintf(stderr,"Printer name \"%s\" changed to \"%s\"\n", printer_name, new_name); printer_name = new_name; --- 127,137 ---- if (strcmp(printer_name, "print.prod") == 0) printer_name = "la120.1"; if ((strcmp(printer_name, "laser") == 0) ! || (strcmp(printer_name, "") == 0) || (strncmp(printer_name, "print", 5) == 0)) { char *new_name; new_name = getenv("PRINTER"); ! if (new_name == NULL) new_name = DEFAULT_PRINTER; fprintf(stderr,"Printer name \"%s\" changed to \"%s\"\n", printer_name, new_name); printer_name = new_name; diff -c psr/d.psr/checkpsr.c:1.1.1.1 psr/d.psr/checkpsr.c:1.2 *** psr/d.psr/checkpsr.c:1.1.1.1 Fri Sep 14 01:38:41 1990 --- psr/d.psr/checkpsr.c Fri Sep 14 01:38:43 1990 *************** *** 3,11 **** /* checkpsr.c - do a consistency check of a psr and all of its updates * written by Lars Poulsen <lars@acc.arpa> for ACC's PSR system * ! * $Header: /mnt/src.master/psr/d.psr/checkpsr.c,v 1.1.1.1 90/09/13 17:17:16 greg Exp $ * * $Log: checkpsr.c,v $ * Revision 1.1.1.1 90/09/13 17:17:16 greg * PSR System * --- 3,15 ---- /* checkpsr.c - do a consistency check of a psr and all of its updates * written by Lars Poulsen <lars@acc.arpa> for ACC's PSR system * ! * $Header: /mnt/src.master/psr/d.psr/checkpsr.c,v 1.2 90/09/14 01:26:10 greg Exp $ * * $Log: checkpsr.c,v $ + * Revision 1.2 90/09/14 01:26:10 greg + * ---------------------------------------------------------------------- + * Changed the formatting of prompts... + * * Revision 1.1.1.1 90/09/13 17:17:16 greg * PSR System * *************** *** 167,173 **** fprintf(stderr, "I have trimmed some trailing control characters from %s\n", psrname); ! if (ask_yes_no(stderr, "Do you want to re-write it ? ")) { psraccess(psrname, &fullname); pf_write(&fullname, &psrform); --- 171,177 ---- fprintf(stderr, "I have trimmed some trailing control characters from %s\n", psrname); ! if (ask_yes_no(stderr, "Do you want to re-write it? ")) { psraccess(psrname, &fullname); pf_write(&fullname, &psrform); diff -c psr/d.psr/fillin.c:1.1.1.1 psr/d.psr/fillin.c:1.2 *** psr/d.psr/fillin.c:1.1.1.1 Fri Sep 14 01:38:55 1990 --- psr/d.psr/fillin.c Fri Sep 14 01:38:56 1990 *************** *** 4,10 **** * Author: SP Wartik * *****************************************************************************/ - #include <signal.h> #include <sys/types.h> #include <sys/dir.h> #include <sys/file.h> --- 4,9 ---- *************** *** 13,19 **** #include "psr.h" #ifndef lint ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/fillin.c,v 1.1.1.1 90/09/13 17:18:33 greg Exp $"; #endif TEMPLATE template; /* Result of call to driver. */ --- 12,18 ---- #include "psr.h" #ifndef lint ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/fillin.c,v 1.2 90/09/14 01:09:11 greg Exp $"; #endif TEMPLATE template; /* Result of call to driver. */ *************** *** 33,39 **** * CALLED ROUTINES: * Unix Library Routines: * access close creat fprintf ! * fputs malloc rindex signal * strcat strcmp strcpy strlen * Fillin Routines: * fill_cleanup fill_driver merge_datafile_into_template --- 32,38 ---- * CALLED ROUTINES: * Unix Library Routines: * access close creat fprintf ! * fputs malloc rindex * strcat strcmp strcpy strlen * Fillin Routines: * fill_cleanup fill_driver merge_datafile_into_template diff -c psr/d.psr/makepsr.c:1.1.1.1 psr/d.psr/makepsr.c:1.2 *** psr/d.psr/makepsr.c:1.1.1.1 Fri Sep 14 01:39:05 1990 --- psr/d.psr/makepsr.c Fri Sep 14 01:39:08 1990 *************** *** 1,4 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/makepsr.c,v 1.1.1.1 90/09/13 17:19:54 greg Exp $"; /* makepsr.c - for the PSR management system * written by Lars Poulsen <lars@acc.arpa> * --- 1,4 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/makepsr.c,v 1.2 90/09/14 01:09:16 greg Exp $"; /* makepsr.c - for the PSR management system * written by Lars Poulsen <lars@acc.arpa> * *************** *** 5,13 **** * This routine inserts a new PSR into the new psr or staging directory. * Input from keyboard or from a pre-formatted psr file. * ! * $Header: /mnt/src.master/psr/d.psr/makepsr.c,v 1.1.1.1 90/09/13 17:19:54 greg Exp $ * * $Log: makepsr.c,v $ * Revision 1.1.1.1 90/09/13 17:19:54 greg * PSR System * --- 5,23 ---- * This routine inserts a new PSR into the new psr or staging directory. * Input from keyboard or from a pre-formatted psr file. * ! * $Header: /mnt/src.master/psr/d.psr/makepsr.c,v 1.2 90/09/14 01:09:16 greg Exp $ * * $Log: makepsr.c,v $ + * Revision 1.2 90/09/14 01:09:16 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:19:54 greg * PSR System * *************** *** 249,255 **** { fprintf(stderr,"---------- I will give you a chance to correct this\n"); if (ask_yes_no(stderr, ! "---------- Do you want to correct it ? ")) goto edit_it; } fprintf(stderr, "Your (new) PSR is %s\n", psrname); --- 259,265 ---- { fprintf(stderr,"---------- I will give you a chance to correct this\n"); if (ask_yes_no(stderr, ! "---------- Do you want to correct it? ")) goto edit_it; } fprintf(stderr, "Your (new) PSR is %s\n", psrname); *************** *** 257,263 **** if (!psrform.pf_description || strlen(psrform.pf_description) < 2) { fprintf(stderr, "Your new PSR does not have a problem description.\n"); ! if (ask_yes_no(stderr, "Do you want to go back and edit it ?")) goto edit_it; else { --- 267,273 ---- if (!psrform.pf_description || strlen(psrform.pf_description) < 2) { fprintf(stderr, "Your new PSR does not have a problem description.\n"); ! if (ask_yes_no(stderr, "Do you want to go back and edit it? ")) goto edit_it; else { diff -c psr/d.psr/psrmain.c:1.1.1.1 psr/d.psr/psrmain.c:1.2 *** psr/d.psr/psrmain.c:1.1.1.1 Fri Sep 14 01:39:17 1990 --- psr/d.psr/psrmain.c Fri Sep 14 01:39:19 1990 *************** *** 1,9 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/psrmain.c,v 1.1.1.1 90/09/13 17:22:47 greg Exp $"; /* psrmain.c - PSR maintenance program main routine * written by Lars Poulsen <lars@acc.arpa> * * $Log: psrmain.c,v $ * Revision 1.1.1.1 90/09/13 17:22:47 greg * PSR System * --- 1,19 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/psrmain.c,v 1.2 90/09/14 01:09:37 greg Exp $"; /* psrmain.c - PSR maintenance program main routine * written by Lars Poulsen <lars@acc.arpa> * * $Log: psrmain.c,v $ + * Revision 1.2 90/09/14 01:09:37 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:22:47 greg * PSR System * *************** *** 497,503 **** fprintf(stderr, " -F - update from redirected in-file\n"); fprintf(stderr, " (only \"Addl info\" field redirected)\n"); if ((strcmp_nocase(cmdname, "options") != 0) ! && (strcmp_nocase(cmdname, "usage") != 0)) { fprintf(stderr, "%s: Unknown PSR maintenance command\n", cmdname); exit(ENOENT); --- 507,514 ---- fprintf(stderr, " -F - update from redirected in-file\n"); fprintf(stderr, " (only \"Addl info\" field redirected)\n"); if ((strcmp_nocase(cmdname, "options") != 0) ! && (strcmp_nocase(cmdname, "usage") != 0) ! && (strcmp(cmdname, "") != 0)) { fprintf(stderr, "%s: Unknown PSR maintenance command\n", cmdname); exit(ENOENT); diff -c psr/d.psr/psr_util.c:1.1.1.1 psr/d.psr/psr_util.c:1.2 *** psr/d.psr/psr_util.c:1.1.1.1 Fri Sep 14 01:39:29 1990 --- psr/d.psr/psr_util.c Fri Sep 14 01:39:30 1990 *************** *** 1,8 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/psr_util.c,v 1.1.1.1 90/09/13 17:22:08 greg Exp $"; /* psr_util.c - PSR maintenance program utility subroutines * written by Lars Poulsen <lars@acc.arpa> * * $Log: psr_util.c,v $ * Revision 1.1.1.1 90/09/13 17:22:08 greg * PSR System * --- 1,18 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/psr_util.c,v 1.2 90/09/14 01:09:30 greg Exp $"; /* psr_util.c - PSR maintenance program utility subroutines * written by Lars Poulsen <lars@acc.arpa> * * $Log: psr_util.c,v $ + * Revision 1.2 90/09/14 01:09:30 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:22:08 greg * PSR System * *************** *** 81,87 **** */ #include <ctype.h> #include <errno.h> - #include <signal.h> #include <stdio.h> #include <sys/file.h> #include <sys/time.h> --- 91,96 ---- diff -c psr/d.psr/showapsr.c:1.1.1.1 psr/d.psr/showapsr.c:1.2 *** psr/d.psr/showapsr.c:1.1.1.1 Fri Sep 14 01:39:38 1990 --- psr/d.psr/showapsr.c Fri Sep 14 01:39:40 1990 *************** *** 1,4 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/showapsr.c,v 1.1.1.1 90/09/13 17:23:52 greg Exp $"; /* showapsr.c - display a single psr or update for PSR system * written by Lars Poulsen <lars@acc.arpa> * --- 1,4 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/showapsr.c,v 1.2 90/09/14 01:09:55 greg Exp $"; /* showapsr.c - display a single psr or update for PSR system * written by Lars Poulsen <lars@acc.arpa> * *************** *** 88,94 **** t = read_template(template, 0, print_warnings); { /* On interrupt, cleanup. */ ! int (*oldsig) (); CurFillinTempl = t; if ((oldsig = signal(SIGINT, interrupt_handler)) != SIG_DFL) --- 88,94 ---- t = read_template(template, 0, print_warnings); { /* On interrupt, cleanup. */ ! SIGTYPE (*oldsig) (); CurFillinTempl = t; if ((oldsig = signal(SIGINT, interrupt_handler)) != SIG_DFL) diff -c psr/d.psr/update.c:1.1.1.1 psr/d.psr/update.c:1.2 *** psr/d.psr/update.c:1.1.1.1 Fri Sep 14 01:39:49 1990 --- psr/d.psr/update.c Fri Sep 14 01:39:52 1990 *************** *** 1,8 **** ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/update.c,v 1.1.1.1 90/09/13 17:24:16 greg Exp $"; /* update.c - the update command of the ACC PSR system * written by Lars Poulsen <lars@acc.arpa> * $Log: update.c,v $ * Revision 1.1.1.1 90/09/13 17:24:16 greg * PSR System * --- 1,18 ---- ! static char rcsid[] = "$Header: /mnt/src.master/psr/d.psr/update.c,v 1.2 90/09/14 01:10:04 greg Exp $"; /* update.c - the update command of the ACC PSR system * written by Lars Poulsen <lars@acc.arpa> * $Log: update.c,v $ + * Revision 1.2 90/09/14 01:10:04 greg + * ---------------------------------------------------------------------- + * * Fixed return value of signal() in several places (see SIGTYPE in psr.h) + * * Fixed a possible NULL indirection in update.c + * * The printer name "lp" usually is a standard printer name, so don't + * mess with it anymore + * * Changed the formatting of several ask_yes_no prompts (no spaces at end, + * etc.) + * * Several minor changes + * * Revision 1.1.1.1 90/09/13 17:24:16 greg * PSR System * *************** *** 94,100 **** fprintf(stderr, " When you do this, they basically all get the\n"); fprintf(stderr, " same \"Additional information\" and \"Current Status\"\n"); ! if (ask_yes_no(stderr, " Is that what you want ? ") != YES) { fprintf(stderr, "Try again - better luck next time\n"); exit(1); --- 104,110 ---- fprintf(stderr, " When you do this, they basically all get the\n"); fprintf(stderr, " same \"Additional information\" and \"Current Status\"\n"); ! if (ask_yes_no(stderr, " Is that what you want? ") != YES) { fprintf(stderr, "Try again - better luck next time\n"); exit(1); *************** *** 105,111 **** if (argv[argno] == VOID) continue; psrname = psrhandle_base(argv[argno]); - name_length = strlen(psrname); if (psrname == NULL) { fprintf(stderr, "update: illegal name %s - try again\n"); --- 115,120 ---- *************** *** 112,117 **** --- 121,127 ---- had_an_error += 1; continue; } + name_length = strlen(psrname); if ((psrname[name_length - 1] == 'u') || (psrname[name_length - 2] == 'u') || (psrname[name_length - 3] == 'u')) *************** *** 133,139 **** fprintf(stderr, "update: PSR %s is CLOSED - cannot update\n", psrname); fprintf(stderr, "Customer was %s/%s Product %s\n", psrform.pf_cust, psrform.pf_contact, psrform.pf_product); ! if (ask_yes_no(stderr, "Do you want to re-open it (y/n) ?") != YES) exit(EINVAL); } /* find number for new update */ --- 143,149 ---- fprintf(stderr, "update: PSR %s is CLOSED - cannot update\n", psrname); fprintf(stderr, "Customer was %s/%s Product %s\n", psrform.pf_cust, psrform.pf_contact, psrform.pf_product); ! if (ask_yes_no(stderr, "Do you want to re-open it (y/n)? ") != YES) exit(EINVAL); } /* find number for new update */