home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume19 / jgraph / patch04 next >
Encoding:
Internet Message Format  |  1991-04-27  |  9.9 KB

  1. From: jsp@Princeton.EDU (James Plank)
  2. Newsgroups: comp.sources.misc
  3. Subject: v19i002:  jgraph - A filter for plotting postscript graphs, Patch04
  4. Message-ID: <1991Apr28.024142.8335@sparky.IMD.Sterling.COM>
  5. Date: 28 Apr 91 02:41:42 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: 86901657 d5439c91 64e88811 fc27d1d4
  8.  
  9. Submitted-by: James Plank <jsp@Princeton.EDU>
  10. Posting-number: Volume 19, Issue 2
  11. Archive-name: jgraph/patch04
  12. Patch-To: jgraph: Volume 16, Issue 20
  13.  
  14. Patch #4 deals with a whole bunch of bugs:
  15.  
  16.  - It makes patch #3 dealable from VMS.
  17.  - It fixes bugs in token.c where EOF was unfindable on SGI machines
  18.  - It fixes bugs in show.c where 'newstrings' were causing core dumps
  19.  - It fixes bugs in jgraph.c where labels were getting bogus default
  20.    values.
  21.  
  22. Thanks to hdavids@mswe1.dnet.ms.philips.nl, Michel Dansereau, Jim Service,
  23. Mary Fernandez and Heather Booth for reporting and helping to fix these
  24. bugs.  Please contact me with other bug reports.
  25.  
  26. Jim Plank
  27. jsp@princeton.edu
  28. -----
  29. # To unbundle, "sed '1,/^# To unbundle/d' < thisfile | sh"
  30. # Thu Apr 25 12:05:31 EDT 1991
  31. echo PATCH.4.README 1>&2
  32. sed 's/^-//' >'PATCH.4.README' <<'End of PATCH.4.README'
  33. -Patch #4 deals with a whole bunch of bugs:
  34. -
  35. - - It makes patch #3 dealable from VMS.
  36. - - It fixes bugs in token.c where EOF was unfindable on SGI machines
  37. - - It fixes bugs in show.c where 'newstrings' were causing core dumps
  38. - - It fixes bugs in jgraph.c where labels were getting bogus default
  39. -   values.
  40. -
  41. -Thanks to hdavids@mswe1.dnet.ms.philips.nl, Michel Dansereau, Jim Service,
  42. -Mary Fernandez and Heather Booth for reporting and helping to fix these
  43. -bugs.  Please contact me with other bug reports.
  44. -
  45. -Install this patch with:
  46. -
  47. -patch < patch.4
  48. -
  49. -
  50. -Finally, if you're having problems installing patches, or if you're 
  51. -confused because you've changed the sources and patches no longer 
  52. -work, send me email, and I can send you the most recent export.
  53. -
  54. -Jim Plank
  55. -jsp@princeton.edu
  56. End of PATCH.4.README
  57. echo patch.4 1>&2
  58. sed 's/^-//' >'patch.4' <<'End of patch.4'
  59. -*** /dev/null    Thu Apr 25 11:44:19 1991
  60. ---- descrip.mms    Thu Apr 25 10:52:27 1991
  61. -***************
  62. -*** 0 ****
  63. ---- 1,44 ----
  64. -+ CC = cc
  65. -+ 
  66. -+ .ifdef DEBUG
  67. -+ CFLAGS=/noopt/debug
  68. -+ LFLAGS=/debug
  69. -+ .else
  70. -+ CFLAGS=
  71. -+ LFLAGS=
  72. -+ .endif
  73. -+ 
  74. -+ OBJS = draw.obj, \
  75. -+         edit.obj, \
  76. -+         jgraph.obj, \
  77. -+         list.obj, \
  78. -+         printline.obj, \
  79. -+         prio_list.obj, \
  80. -+         process.obj, \
  81. -+         show.obj, \
  82. -+         token.obj
  83. -+ 
  84. -+ all :    jgraph.exe
  85. -+     ! done
  86. -+ 
  87. -+ .SUFFIXES : .jgr .jps .tex .dvi
  88. -+ 
  89. -+ .jgr.jps :
  90. -+     jgraph < $*.jgr > *.jps
  91. -+ 
  92. -+ .tex.dvi :
  93. -+     latex $*.tex
  94. -+ 
  95. -+ jgraph.exe : $(OBJS)
  96. -+     link $(LFLAGS) /exe=jgraph $(OBJS)
  97. -+ 
  98. -+ ###
  99. -+ draw.obj :    draw.c jgraph.h list.h prio_list.h
  100. -+ edit.obj :    edit.c jgraph.h list.h prio_list.h
  101. -+ jgraph.obj :    jgraph.c jgraph.h list.h prio_list.h
  102. -+ list.obj :    list.c list.h
  103. -+ printline.obj :    printline.c jgraph.h list.h prio_list.h
  104. -+ prio_list.obj :    prio_list.c list.h prio_list.h
  105. -+ process.obj :    process.c jgraph.h list.h prio_list.h
  106. -+ show.obj :    show.c jgraph.h list.h prio_list.h
  107. -+ token.obj :    token.c list.h
  108. -*** ../patches/patch.3/work/jgraph.1    Thu Apr 25 11:44:25 1991
  109. ---- jgraph.1    Thu Apr 25 10:52:31 1991
  110. -***************
  111. -*** 130,139 ****
  112. -  .TP
  113. -  .B Shell\-include statements
  114. -  Shell include statements are of the form ``shell'', ``:'', and then
  115. -! a string.  The result of the statment is that the string is executed
  116. -  (using popen, which passes the string to sh), and the standard
  117. -  output is included at that point.  Shell-includes can be freely
  118. -  nested within include-files and other shell-includes.
  119. -  .TP
  120. -  .B Notation
  121. -  In the descriptions below: 
  122. ---- 130,140 ----
  123. -  .TP
  124. -  .B Shell\-include statements
  125. -  Shell include statements are of the form ``shell'', ``:'', and then
  126. -! a string.  The result of the statement is that the string is executed
  127. -  (using popen, which passes the string to sh), and the standard
  128. -  output is included at that point.  Shell-includes can be freely
  129. -  nested within include-files and other shell-includes.
  130. -+ The shell statement is not (yet) available on VMS.
  131. -  .TP
  132. -  .B Notation
  133. -  In the descriptions below: 
  134. -*** ../patches/patch.3/work/jgraph.c    Thu Apr 25 11:44:26 1991
  135. ---- jgraph.c    Thu Apr 25 10:52:28 1991
  136. -***************
  137. -*** 53,63 ****
  138. -  
  139. -    l = (Label) malloc (sizeof(struct label));
  140. -    l->label = CNULL;
  141. -!   l->hj = '!';
  142. -!   l->vj = '!';
  143. -!   l->font = CNULL;
  144. -!   l->fontsize = FSIG;
  145. -!   l->rotate = FSIG;
  146. -  
  147. -    return l;
  148. -  }
  149. ---- 53,63 ----
  150. -  
  151. -    l = (Label) malloc (sizeof(struct label));
  152. -    l->label = CNULL;
  153. -!   l->hj = 'c';
  154. -!   l->vj = 'b';
  155. -!   l->font = "Times-Roman";    /* 3 lines excluded from patch3 */
  156. -!   l->fontsize = 9.0;
  157. -!   l->rotate = 0;
  158. -  
  159. -    return l;
  160. -  }
  161. -*** ../patches/patch.3/work/list.c    Thu Apr 25 11:44:28 1991
  162. ---- list.c    Thu Apr 25 10:52:28 1991
  163. -***************
  164. -*** 45,51 ****
  165. -    item->flink = list;
  166. -  }
  167. -  
  168. -! delete(item)        /* Deletes an arbitrary iterm */
  169. -  List item;
  170. -  {
  171. -    item->flink->blink = item->blink;
  172. ---- 45,51 ----
  173. -    item->flink = list;
  174. -  }
  175. -  
  176. -! delete_item(item)        /* Deletes an arbitrary iterm */
  177. -  List item;
  178. -  {
  179. -    item->flink->blink = item->blink;
  180. -*** ../patches/patch.3/work/list.h    Thu Apr 25 11:44:29 1991
  181. ---- list.h    Thu Apr 25 10:52:29 1991
  182. -***************
  183. -*** 29,35 ****
  184. -  /* These are the routines for manipluating lists */
  185. -  
  186. -  /* void insert(node list);     Inserts a node to the end of a list */
  187. -! /* void delete(node);          Deletes an arbitrary node */
  188. -  /* List make_list(node_size);  Creates a new list */
  189. -  /* List get_node(list);        Allocates a node to be inserted into the list */
  190. -  /* void free_node(node, list); Deallocates a node from the list */
  191. ---- 29,35 ----
  192. -  /* These are the routines for manipluating lists */
  193. -  
  194. -  /* void insert(node list);     Inserts a node to the end of a list */
  195. -! /* void delete_item(node);     Deletes an arbitrary node */
  196. -  /* List make_list(node_size);  Creates a new list */
  197. -  /* List get_node(list);        Allocates a node to be inserted into the list */
  198. -  /* void free_node(node, list); Deallocates a node from the list */
  199. -*** ../patches/patch.3/work/makefile    Thu Apr 25 11:44:29 1991
  200. ---- makefile    Thu Apr 25 10:52:31 1991
  201. -***************
  202. -*** 1,4 ****
  203. -- LISTSOURCE = /u/jsp/src/list
  204. -  CC = cc
  205. -  
  206. -  OBJS = draw.o \
  207. ---- 1,3 ----
  208. -*** ../patches/patch.3/work/show.c    Thu Apr 25 11:44:32 1991
  209. ---- show.c    Thu Apr 25 10:52:30 1991
  210. -***************
  211. -*** 245,251 ****
  212. -    for (s = first(g->strings); s != nil(g->strings); s = next(s)) {
  213. -      spaces(nsp);
  214. -      printf("string %d\n", s->num);
  215. -!     show_label(s, nsp+2, g);
  216. -    }
  217. -  }
  218. -  
  219. ---- 245,251 ----
  220. -    for (s = first(g->strings); s != nil(g->strings); s = next(s)) {
  221. -      spaces(nsp);
  222. -      printf("string %d\n", s->num);
  223. -!     show_label(s->s, nsp+2, g);
  224. -    }
  225. -  }
  226. -  
  227. -*** ../patches/patch.3/work/token.c    Thu Apr 25 11:44:39 1991
  228. ---- token.c    Thu Apr 25 10:52:30 1991
  229. -***************
  230. -*** 65,71 ****
  231. -    char *filename;
  232. -    FILE *stream;
  233. -    int oldcharvalid;
  234. -!   char oldchar;
  235. -    char pipe;
  236. -    int line;
  237. -  } *Iostack;
  238. ---- 65,71 ----
  239. -    char *filename;
  240. -    FILE *stream;
  241. -    int oldcharvalid;
  242. -!   signed char oldchar;
  243. -    char pipe;
  244. -    int line;
  245. -  } *Iostack;
  246. -***************
  247. -*** 72,78 ****
  248. -  
  249. -  static char INPUT[300];
  250. -  static int getnew = 1;
  251. -! static char oldchar = '\0';
  252. -  static oldcharvalid = 0;
  253. -  static char pipe = 0;
  254. -  static int eof = 0;
  255. ---- 72,78 ----
  256. -  
  257. -  static char INPUT[300];
  258. -  static int getnew = 1;
  259. -! static signed char oldchar = '\0';
  260. -  static oldcharvalid = 0;
  261. -  static char pipe = 0;
  262. -  static int eof = 0;
  263. -***************
  264. -*** 93,98 ****
  265. ---- 93,112 ----
  266. -                            stack = (Iostack) make_list(sizeof(struct iostack)); \
  267. -                            init = 1; }}
  268. -  
  269. -+ #ifdef VMS
  270. -+ /* On VMS, there are no popen() and pclose(), so we provide dummies here. */
  271. -+ FILE *popen(command, type)
  272. -+ char *command, *type;
  273. -+ {
  274. -+     return(NULL);
  275. -+ }
  276. -+ int pclose(stream)
  277. -+ FILE *stream;
  278. -+ {
  279. -+     return(-1);
  280. -+ }
  281. -+ #endif /*VMS*/
  282. -+ 
  283. -  error_header()
  284. -  {
  285. -    iostackinit();
  286. -***************
  287. -*** 117,123 ****
  288. -  char *s;
  289. -  {
  290. -    int i;
  291. -!   char c;
  292. -  
  293. -    for (c = gettokenchar(); 
  294. -         c == ' ' || c == '\t' || c == '\n';
  295. ---- 131,137 ----
  296. -  char *s;
  297. -  {
  298. -    int i;
  299. -!   signed char c;
  300. -  
  301. -    for (c = gettokenchar(); 
  302. -         c == ' ' || c == '\t' || c == '\n';
  303. -***************
  304. -*** 205,211 ****
  305. -    line = n->line;
  306. -    oldchar = n->oldchar;
  307. -    oldcharvalid = n->oldcharvalid;
  308. -!   delete(n);
  309. -    free_node(n, stack);
  310. -  }
  311. -  
  312. ---- 219,225 ----
  313. -    line = n->line;
  314. -    oldchar = n->oldchar;
  315. -    oldcharvalid = n->oldcharvalid;
  316. -!   delete_item(n);
  317. -    free_node(n, stack);
  318. -  }
  319. -  
  320. -***************
  321. -*** 235,240 ****
  322. ---- 249,258 ----
  323. -          }
  324. -        } else if (strcmp(INPUT, "shell") == 0) {
  325. -          char *s, fn[30];
  326. -+ #ifdef VMS 
  327. -+         fprintf(stderr, "No shell option on VMS, sorry.\n");
  328. -+         exit(1);
  329. -+ #endif /*VMS*/    
  330. -          if (gettoken(INPUT) == 0 || strcmp(INPUT, ":") != 0) {
  331. -            error_header();
  332. -            fprintf(stderr, "'shell' must be followed by ':'\n");
  333. -***************
  334. -*** 343,349 ****
  335. -  
  336. -  char *getlabel()
  337. -  {
  338. -!   char c;
  339. -    int i;
  340. -  
  341. -    if (getnew == 0) return CNULL;
  342. ---- 361,367 ----
  343. -  
  344. -  char *getlabel()
  345. -  {
  346. -!   signed char c;
  347. -    int i;
  348. -  
  349. -    if (getnew == 0) return CNULL;
  350. -***************
  351. -*** 364,370 ****
  352. -  
  353. -  int getsystemstring()
  354. -  {
  355. -!   char c;
  356. -    int i;
  357. -  
  358. -    if (getnew == 0) return 0;
  359. ---- 382,388 ----
  360. -  
  361. -  int getsystemstring()
  362. -  {
  363. -!   signed char c;
  364. -    int i;
  365. -  
  366. -    if (getnew == 0) return 0;
  367. -***************
  368. -*** 387,390 ****
  369. -  {
  370. -    getnew = 0;
  371. -  }
  372. -- 
  373. ---- 405,407 ----
  374. End of patch.4
  375.  
  376. exit 0 # Just in case...
  377. -- 
  378. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  379. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  380. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  381. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  382.