jsp@Princeton.EDU (James Plank) (04/28/91)
Submitted-by: James Plank <jsp@Princeton.EDU> Posting-number: Volume 19, Issue 2 Archive-name: jgraph/patch04 Patch-To: jgraph: Volume 16, Issue 20 Patch #4 deals with a whole bunch of bugs: - It makes patch #3 dealable from VMS. - It fixes bugs in token.c where EOF was unfindable on SGI machines - It fixes bugs in show.c where 'newstrings' were causing core dumps - It fixes bugs in jgraph.c where labels were getting bogus default values. Thanks to hdavids@mswe1.dnet.ms.philips.nl, Michel Dansereau, Jim Service, Mary Fernandez and Heather Booth for reporting and helping to fix these bugs. Please contact me with other bug reports. Jim Plank jsp@princeton.edu ----- # To unbundle, "sed '1,/^# To unbundle/d' < thisfile | sh" # Thu Apr 25 12:05:31 EDT 1991 echo PATCH.4.README 1>&2 sed 's/^-//' >'PATCH.4.README' <<'End of PATCH.4.README' -Patch #4 deals with a whole bunch of bugs: - - - It makes patch #3 dealable from VMS. - - It fixes bugs in token.c where EOF was unfindable on SGI machines - - It fixes bugs in show.c where 'newstrings' were causing core dumps - - It fixes bugs in jgraph.c where labels were getting bogus default - values. - -Thanks to hdavids@mswe1.dnet.ms.philips.nl, Michel Dansereau, Jim Service, -Mary Fernandez and Heather Booth for reporting and helping to fix these -bugs. Please contact me with other bug reports. - -Install this patch with: - -patch < patch.4 - - -Finally, if you're having problems installing patches, or if you're -confused because you've changed the sources and patches no longer -work, send me email, and I can send you the most recent export. - -Jim Plank -jsp@princeton.edu End of PATCH.4.README echo patch.4 1>&2 sed 's/^-//' >'patch.4' <<'End of patch.4' -*** /dev/null Thu Apr 25 11:44:19 1991 ---- descrip.mms Thu Apr 25 10:52:27 1991 -*************** -*** 0 **** ---- 1,44 ---- -+ CC = cc -+ -+ .ifdef DEBUG -+ CFLAGS=/noopt/debug -+ LFLAGS=/debug -+ .else -+ CFLAGS= -+ LFLAGS= -+ .endif -+ -+ OBJS = draw.obj, \ -+ edit.obj, \ -+ jgraph.obj, \ -+ list.obj, \ -+ printline.obj, \ -+ prio_list.obj, \ -+ process.obj, \ -+ show.obj, \ -+ token.obj -+ -+ all : jgraph.exe -+ ! done -+ -+ .SUFFIXES : .jgr .jps .tex .dvi -+ -+ .jgr.jps : -+ jgraph < $*.jgr > *.jps -+ -+ .tex.dvi : -+ latex $*.tex -+ -+ jgraph.exe : $(OBJS) -+ link $(LFLAGS) /exe=jgraph $(OBJS) -+ -+ ### -+ draw.obj : draw.c jgraph.h list.h prio_list.h -+ edit.obj : edit.c jgraph.h list.h prio_list.h -+ jgraph.obj : jgraph.c jgraph.h list.h prio_list.h -+ list.obj : list.c list.h -+ printline.obj : printline.c jgraph.h list.h prio_list.h -+ prio_list.obj : prio_list.c list.h prio_list.h -+ process.obj : process.c jgraph.h list.h prio_list.h -+ show.obj : show.c jgraph.h list.h prio_list.h -+ token.obj : token.c list.h -*** ../patches/patch.3/work/jgraph.1 Thu Apr 25 11:44:25 1991 ---- jgraph.1 Thu Apr 25 10:52:31 1991 -*************** -*** 130,139 **** - .TP - .B Shell\-include statements - Shell include statements are of the form ``shell'', ``:'', and then -! a string. The result of the statment is that the string is executed - (using popen, which passes the string to sh), and the standard - output is included at that point. Shell-includes can be freely - nested within include-files and other shell-includes. - .TP - .B Notation - In the descriptions below: ---- 130,140 ---- - .TP - .B Shell\-include statements - Shell include statements are of the form ``shell'', ``:'', and then -! a string. The result of the statement is that the string is executed - (using popen, which passes the string to sh), and the standard - output is included at that point. Shell-includes can be freely - nested within include-files and other shell-includes. -+ The shell statement is not (yet) available on VMS. - .TP - .B Notation - In the descriptions below: -*** ../patches/patch.3/work/jgraph.c Thu Apr 25 11:44:26 1991 ---- jgraph.c Thu Apr 25 10:52:28 1991 -*************** -*** 53,63 **** - - l = (Label) malloc (sizeof(struct label)); - l->label = CNULL; -! l->hj = '!'; -! l->vj = '!'; -! l->font = CNULL; -! l->fontsize = FSIG; -! l->rotate = FSIG; - - return l; - } ---- 53,63 ---- - - l = (Label) malloc (sizeof(struct label)); - l->label = CNULL; -! l->hj = 'c'; -! l->vj = 'b'; -! l->font = "Times-Roman"; /* 3 lines excluded from patch3 */ -! l->fontsize = 9.0; -! l->rotate = 0; - - return l; - } -*** ../patches/patch.3/work/list.c Thu Apr 25 11:44:28 1991 ---- list.c Thu Apr 25 10:52:28 1991 -*************** -*** 45,51 **** - item->flink = list; - } - -! delete(item) /* Deletes an arbitrary iterm */ - List item; - { - item->flink->blink = item->blink; ---- 45,51 ---- - item->flink = list; - } - -! delete_item(item) /* Deletes an arbitrary iterm */ - List item; - { - item->flink->blink = item->blink; -*** ../patches/patch.3/work/list.h Thu Apr 25 11:44:29 1991 ---- list.h Thu Apr 25 10:52:29 1991 -*************** -*** 29,35 **** - /* These are the routines for manipluating lists */ - - /* void insert(node list); Inserts a node to the end of a list */ -! /* void delete(node); Deletes an arbitrary node */ - /* List make_list(node_size); Creates a new list */ - /* List get_node(list); Allocates a node to be inserted into the list */ - /* void free_node(node, list); Deallocates a node from the list */ ---- 29,35 ---- - /* These are the routines for manipluating lists */ - - /* void insert(node list); Inserts a node to the end of a list */ -! /* void delete_item(node); Deletes an arbitrary node */ - /* List make_list(node_size); Creates a new list */ - /* List get_node(list); Allocates a node to be inserted into the list */ - /* void free_node(node, list); Deallocates a node from the list */ -*** ../patches/patch.3/work/makefile Thu Apr 25 11:44:29 1991 ---- makefile Thu Apr 25 10:52:31 1991 -*************** -*** 1,4 **** -- LISTSOURCE = /u/jsp/src/list - CC = cc - - OBJS = draw.o \ ---- 1,3 ---- -*** ../patches/patch.3/work/show.c Thu Apr 25 11:44:32 1991 ---- show.c Thu Apr 25 10:52:30 1991 -*************** -*** 245,251 **** - for (s = first(g->strings); s != nil(g->strings); s = next(s)) { - spaces(nsp); - printf("string %d\n", s->num); -! show_label(s, nsp+2, g); - } - } - ---- 245,251 ---- - for (s = first(g->strings); s != nil(g->strings); s = next(s)) { - spaces(nsp); - printf("string %d\n", s->num); -! show_label(s->s, nsp+2, g); - } - } - -*** ../patches/patch.3/work/token.c Thu Apr 25 11:44:39 1991 ---- token.c Thu Apr 25 10:52:30 1991 -*************** -*** 65,71 **** - char *filename; - FILE *stream; - int oldcharvalid; -! char oldchar; - char pipe; - int line; - } *Iostack; ---- 65,71 ---- - char *filename; - FILE *stream; - int oldcharvalid; -! signed char oldchar; - char pipe; - int line; - } *Iostack; -*************** -*** 72,78 **** - - static char INPUT[300]; - static int getnew = 1; -! static char oldchar = '\0'; - static oldcharvalid = 0; - static char pipe = 0; - static int eof = 0; ---- 72,78 ---- - - static char INPUT[300]; - static int getnew = 1; -! static signed char oldchar = '\0'; - static oldcharvalid = 0; - static char pipe = 0; - static int eof = 0; -*************** -*** 93,98 **** ---- 93,112 ---- - stack = (Iostack) make_list(sizeof(struct iostack)); \ - init = 1; }} - -+ #ifdef VMS -+ /* On VMS, there are no popen() and pclose(), so we provide dummies here. */ -+ FILE *popen(command, type) -+ char *command, *type; -+ { -+ return(NULL); -+ } -+ int pclose(stream) -+ FILE *stream; -+ { -+ return(-1); -+ } -+ #endif /*VMS*/ -+ - error_header() - { - iostackinit(); -*************** -*** 117,123 **** - char *s; - { - int i; -! char c; - - for (c = gettokenchar(); - c == ' ' || c == '\t' || c == '\n'; ---- 131,137 ---- - char *s; - { - int i; -! signed char c; - - for (c = gettokenchar(); - c == ' ' || c == '\t' || c == '\n'; -*************** -*** 205,211 **** - line = n->line; - oldchar = n->oldchar; - oldcharvalid = n->oldcharvalid; -! delete(n); - free_node(n, stack); - } - ---- 219,225 ---- - line = n->line; - oldchar = n->oldchar; - oldcharvalid = n->oldcharvalid; -! delete_item(n); - free_node(n, stack); - } - -*************** -*** 235,240 **** ---- 249,258 ---- - } - } else if (strcmp(INPUT, "shell") == 0) { - char *s, fn[30]; -+ #ifdef VMS -+ fprintf(stderr, "No shell option on VMS, sorry.\n"); -+ exit(1); -+ #endif /*VMS*/ - if (gettoken(INPUT) == 0 || strcmp(INPUT, ":") != 0) { - error_header(); - fprintf(stderr, "'shell' must be followed by ':'\n"); -*************** -*** 343,349 **** - - char *getlabel() - { -! char c; - int i; - - if (getnew == 0) return CNULL; ---- 361,367 ---- - - char *getlabel() - { -! signed char c; - int i; - - if (getnew == 0) return CNULL; -*************** -*** 364,370 **** - - int getsystemstring() - { -! char c; - int i; - - if (getnew == 0) return 0; ---- 382,388 ---- - - int getsystemstring() - { -! signed char c; - int i; - - if (getnew == 0) return 0; -*************** -*** 387,390 **** - { - getnew = 0; - } -- ---- 405,407 ---- End of patch.4 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.