home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume19 / jgraph / patch05 < prev    next >
Encoding:
Internet Message Format  |  1991-05-03  |  21.0 KB

  1. From: jsp@Princeton.EDU (James Plank)
  2. Newsgroups: comp.sources.misc
  3. Subject: REPOST: v19i016:  jgraph - A filter for plotting postscript graphs, Patch05
  4. Message-ID: <1991May3.015129.3514@sparky.IMD.Sterling.COM>
  5. Date: 3 May 91 01:51:29 GMT
  6. Approved: kent@sparky.imd.sterling.com
  7. X-Checksum-Snefru: 55cc6f2f 255ea5bb 6aba55e0 c97b4c69
  8.  
  9. Submitted-by: James Plank <jsp@Princeton.EDU>
  10. Posting-number: Volume 19, Issue 16
  11. Archive-name: jgraph/patch05
  12. Patch-To: jgraph: Volume 16, Issue 20
  13.  
  14. [ This is a repost of the jgraph Patch05 that was incorrectly labeled ]
  15. [ as Patch01. This found a bug in my posting software... :-(   -Kent+ ]
  16.  
  17. This is a small patch to jgraph.  Please read the 
  18. PATCH.5.README for the information about the patch 
  19. and a few announcements. 
  20.  
  21. Unshar the following patch and apply it with 
  22.  
  23.    "patch < patch.5".
  24.  
  25. Jim
  26. ------
  27. # To unbundle, "sed '1,/^# To unbundle/d' < thisfile | sh"
  28. # Thu May  2 15:31:12 EDT 1991
  29. echo PATCH.5.README 1>&2
  30. sed 's/^-//' >'PATCH.5.README' <<'End of PATCH.5.README'
  31. -This is a small patch, and a few announcements.
  32. -
  33. -First, the patch -- token.c was still having problems 
  34. -compiling and working all all systems.  This has 
  35. -hopefully been fixed, now.  I've personally gotten it
  36. -working on a vax, mipsel, sparc & sgi machine.  Please
  37. -send me bug reports if token.c still is having problems
  38. -either compiling or finding EOF's.
  39. -
  40. -Apply the patch with "patch < patch.5"
  41. -
  42. -Second, jgraph is now available via anonymous FTP to 
  43. -Princeton.edu.  It is in the directory pub, in the file
  44. -jgraph.Z.  I'll keep this file updated, so if you don't
  45. -feel like dealing with patches, this is the file.
  46. -
  47. -Third, I'd like to have a mailing list for those who would
  48. -like to be notified of jgraph problems/fixes without keeping
  49. -up with comp.sources.misc.  If you'd like to be on this 
  50. -mailing list, please drop me a line.
  51. -
  52. -Take it easy,
  53. -
  54. -Jim
  55. End of PATCH.5.README
  56. echo patch.5 1>&2
  57. sed 's/^-//' >'patch.5' <<'End of patch.5'
  58. -*** ../patches/patch.5/work/draw.c    Thu May  2 15:15:25 1991
  59. ---- draw.c    Thu May  2 14:47:30 1991
  60. -***************
  61. -*** 1,38 ****
  62. -! /* $Log:    draw.c,v $
  63. -!  * Revision 1.9  91/01/31  16:14:56  jsp
  64. -!  * For patch #2 -- Fixed a bug with disttop which caused it to
  65. -!  * work incorrectly with axis minima which != 0.
  66. -!  * 
  67. -!  * Revision 1.8  91/01/16  10:57:25  jsp
  68. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  69. -!  * minor bugs have been fixed
  70. -!  * 
  71. -!  * Revision 1.7  91/01/10  12:08:49  jsp
  72. -!  * Version exported to comp.sources.misc
  73. -!  * 
  74. -!  * Revision 1.6  90/12/03  16:48:24  jsp
  75. -!  * Added the -P option to print postscript suitable for direct piping to lpr.
  76. -!  * 
  77. -!  * Revision 1.5  90/10/18  12:43:35  jsp
  78. -!  * First release version.
  79. -!  * 
  80. -!  * Revision 1.4  90/10/14  19:52:38  jsp
  81. -!  * Moved processing of hash lines & labels to process.c.
  82. -!  * 
  83. -!  * Made Marktypes into a global array.
  84. -!  * 
  85. -!  * Revision 1.3  90/10/14  14:23:02  jsp
  86. -!  * Added code for bar graphs
  87. -!  * 
  88. -!  * Revision 1.2  90/10/14  13:35:57  jsp
  89. -!  * Updated to use error_header, as defined in token.c 1.2.
  90. -!  * 
  91. -!  * Revision 1.1  90/10/12  18:09:31  jsp
  92. -!  * Initial revision
  93. -!  * 
  94. -!  *
  95. -!  * Module for drawing graphs using the postscript drawing
  96. -!  * routines in printline.c
  97. -   */
  98. -  
  99. -  #include "jgraph.h"
  100. ---- 1,8 ----
  101. -! /* 
  102. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/draw.c,v $
  103. -!  * $Revision: 5.0 $
  104. -!  * $Date: 91/05/02 14:45:08 $
  105. -!  * $Author: jsp $
  106. -   */
  107. -  
  108. -  #include "jgraph.h"
  109. -*** ../patches/patch.5/work/edit.c    Thu May  2 15:15:26 1991
  110. ---- edit.c    Thu May  2 14:47:30 1991
  111. -***************
  112. -*** 1,39 ****
  113. -! /* $Log:    edit.c,v $
  114. -!  * Revision 1.9  91/01/16  10:58:24  jsp
  115. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  116. -!  * minor bugs have been fixed
  117. -!  * 
  118. -!  * Revision 1.8  91/01/10  12:09:29  jsp
  119. -!  * Version exported to comp.sources.misc
  120. -!  * 
  121. -!  * Revision 1.7  90/12/03  16:49:28  jsp
  122. -!  * Who knows why this is any different from 1.6.
  123. -!  * 
  124. -!  * Revision 1.6  90/10/18  12:44:44  jsp
  125. -!  * First release version
  126. -!  * 
  127. -!  * Changes include the addition of logrhythmic axes, better hash mark
  128. -!  * editing, etc.
  129. -!  * 
  130. -!  * Revision 1.5  90/10/14  21:26:15  jsp
  131. -!  * Allows user-inputted hash lines and hash labels
  132. -!  * 
  133. -!  * Revision 1.4  90/10/14  19:53:36  jsp
  134. -!  * Incorporated the global array MARKTYPES, etc, into the editing procedure.
  135. -!  * 
  136. -!  * Added no_hash_label option.
  137. -!  * 
  138. -!  * Revision 1.3  90/10/14  14:23:29  jsp
  139. -!  * Added code for bar graphs
  140. -!  * 
  141. -!  * Revision 1.2  90/10/14  13:36:39  jsp
  142. -!  * Updated to use error_header, as defined in token.c 1.2.
  143. -!  * 
  144. -!  * Revision 1.1  90/10/12  18:10:46  jsp
  145. -!  * Initial revision
  146. -!  * 
  147. -!  * Module for taking the tokens from token.c and using them to 
  148. -!  * edit the graph structs.
  149. -   */
  150. -  
  151. -  
  152. ---- 1,8 ----
  153. -! /* 
  154. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/edit.c,v $
  155. -!  * $Revision: 5.0 $
  156. -!  * $Date: 91/05/02 14:45:11 $
  157. -!  * $Author: jsp $
  158. -   */
  159. -  
  160. -  
  161. -*** ../patches/patch.5/work/jgraph.1    Thu May  2 15:15:31 1991
  162. ---- jgraph.1    Thu May  2 14:47:33 1991
  163. -***************
  164. -*** 349,357 ****
  165. -  .TP
  166. -  \fBlog_base \|[\fIfloat\fB\|]\fR   
  167. -  Set the base of the logarithmic axis. Default =
  168. -! 10.  What this means is that the distance from \fB\fIlog_base\fB\fR^i and
  169. -! \fB\fIlog_base\fB\fR^(i+1) will be the same as from \fB\fIlog_base\fB\fR^(i+1) to
  170. -! \fB\fIlog_base\fB\fR(i+2).  It is also the value which determines which hash
  171. -  marks and hash labels are automatically produced.
  172. -  .TP
  173. -  \fBhash \|[\fIfloat\fB\|]\fR   
  174. ---- 349,355 ----
  175. -  .TP
  176. -  \fBlog_base \|[\fIfloat\fB\|]\fR   
  177. -  Set the base of the logarithmic axis. Default =
  178. -! 10.  This is the value which determines which hash
  179. -  marks and hash labels are automatically produced.
  180. -  .TP
  181. -  \fBhash \|[\fIfloat\fB\|]\fR   
  182. -*** ../patches/patch.5/work/jgraph.c    Thu May  2 15:15:32 1991
  183. ---- jgraph.c    Thu May  2 14:47:31 1991
  184. -***************
  185. -*** 1,36 ****
  186. -! /* $Log:    jgraph.c,v $
  187. -!  * Revision 1.7  91/01/16  10:58:29  jsp
  188. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  189. -!  * minor bugs have been fixed
  190. -!  * 
  191. -!  * Revision 1.6  91/01/10  12:09:37  jsp
  192. -!  * Version exported to comp.sources.misc
  193. -!  * 
  194. -!  * Revision 1.5  90/12/03  16:49:58  jsp
  195. -!  * Added the -P option to print postscript suitable for direct piping to lpr.
  196. -!  * 
  197. -!  * Revision 1.4  90/10/18  12:45:21  jsp
  198. -!  * First release version
  199. -!  * 
  200. -!  * Changes include the addition of logrhythmic axes, better hash mark
  201. -!  * editing, etc.
  202. -!  * 
  203. -!  * Revision 1.3  90/10/14  19:54:36  jsp
  204. -!  * Made the new MARKTYPES array, and set default marktypes accordingly.
  205. -!  * 
  206. -!  * Updated to account for the new hash_lines and hash_labels fields 
  207. -!  * in struct curve.
  208. -!  * 
  209. -!  * Revision 1.2  90/10/14  14:23:42  jsp
  210. -!  * Added code for bar graphs
  211. -!  * 
  212. -!  * Revision 1.1  90/10/12  18:12:51  jsp
  213. -!  * Initial revision
  214. -!  * 
  215. -!  *
  216. -!  * Module with the main() routine, and with routines to allocate
  217. -!  * memory and initialize the structs defined in jgraph.h.
  218. -   */
  219. -  #include <stdio.h>
  220. -  
  221. -  #ifdef VMS 
  222. ---- 1,10 ----
  223. -! /* 
  224. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.c,v $
  225. -!  * $Revision: 5.0 $
  226. -!  * $Date: 91/05/02 14:45:13 $
  227. -!  * $Author: jsp $
  228. -   */
  229. -+ 
  230. -  #include <stdio.h>
  231. -  
  232. -  #ifdef VMS 
  233. -*** ../patches/patch.5/work/jgraph.h    Thu May  2 15:15:33 1991
  234. ---- jgraph.h    Thu May  2 14:47:31 1991
  235. -***************
  236. -*** 1,43 ****
  237. -! /* $Log:    jgraph.h,v $
  238. -!  * Revision 1.7  91/01/16  10:58:42  jsp
  239. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  240. -!  * minor bugs have been fixed
  241. -!  * 
  242. -!  * Revision 1.6  91/01/10  12:10:15  jsp
  243. -!  * Version exported to comp.sources.misc
  244. -!  * 
  245. -!  * Revision 1.5  90/12/03  16:50:45  jsp
  246. -!  * Added the -P option to print postscript suitable for direct piping to lpr.
  247. -!  * 
  248. -!  * Revision 1.4  90/11/26  17:14:22  jsp
  249. -!  * Fixed include parameter so that the directory must be specified by -I
  250. -!  * command line option
  251. -!  * 
  252. -!  * Revision 1.3  90/10/18  12:47:18  jsp
  253. -!  * First release version
  254. -!  * 
  255. -!  * Changes include the addition of logrhythmic axes, better hash mark
  256. -!  * editing, etc.
  257. -!  * 
  258. -!  * Revision 1.2  90/10/14  19:58:28  jsp
  259. -!  * Added the new fields hash_lines and hash_labels to struct curve so that
  260. -!  *   processing of the hash lines & labels could be done in process.c.
  261. -!  * 
  262. -!  * Added extern declarations for MARKTYPES, etc., to clean up the 
  263. -!  *   editing of marktypes.
  264. -!  * 
  265. -!  * Revision 1.1  90/10/12  18:15:00  jsp
  266. -!  * Initial revision
  267. -!  * 
  268. -!  * This is the main header file which defines all the 
  269. -!  * structs and macro definitions of the jgraph program.
  270. -!  *
  271. -!  * All of the structures which have flink and blink fields
  272. -!  * are meant to be used with the list manipulation routines
  273. -!  * in /u/jsp/src/list.
  274. -   */
  275. -- 
  276. -- 
  277. -  
  278. -  #include "list.h"
  279. -  #include "prio_list.h"
  280. ---- 1,9 ----
  281. -! /* 
  282. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/jgraph.h,v $
  283. -!  * $Revision: 5.0 $
  284. -!  * $Date: 91/05/02 14:46:24 $
  285. -!  * $Author: jsp $
  286. -   */
  287. -  
  288. -  #include "list.h"
  289. -  #include "prio_list.h"
  290. -*** ../patches/patch.5/work/list.c    Thu May  2 15:15:34 1991
  291. ---- list.c    Thu May  2 14:47:31 1991
  292. -***************
  293. -*** 1,7 ****
  294. -! /* $Log:    list.c,v $
  295. -!  * Revision 1.1  90/10/12  17:51:13  jsp
  296. -!  * Initial revision
  297. -!  * 
  298. -   */
  299. -  
  300. -  #include <stdio.h>    /* Basic includes and definitions */
  301. ---- 1,8 ----
  302. -! /* 
  303. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.c,v $
  304. -!  * $Revision: 5.0 $
  305. -!  * $Date: 91/05/02 14:45:14 $
  306. -!  * $Author: jsp $
  307. -   */
  308. -  
  309. -  #include <stdio.h>    /* Basic includes and definitions */
  310. -*** ../patches/patch.5/work/list.h    Thu May  2 15:15:35 1991
  311. ---- list.h    Thu May  2 14:47:31 1991
  312. -***************
  313. -*** 1,12 ****
  314. -! /* $Log:    list.h,v $
  315. -!  * Revision 1.1  90/10/12  17:51:31  jsp
  316. -!  * Initial revision
  317. -!  * 
  318. -   */
  319. -- 
  320. -- /* Jim Plank
  321. --  * list.h
  322. --  * List manipulation header file */
  323. -  
  324. -  /* This is the header file for the list manipulation routines in list.c.
  325. -   * Any struct can be turned into a list as long as its first two fields are
  326. ---- 1,9 ----
  327. -! /* 
  328. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/list.h,v $
  329. -!  * $Revision: 5.0 $
  330. -!  * $Date: 91/05/02 14:46:26 $
  331. -!  * $Author: jsp $
  332. -   */
  333. -  
  334. -  /* This is the header file for the list manipulation routines in list.c.
  335. -   * Any struct can be turned into a list as long as its first two fields are
  336. -*** ../patches/patch.5/work/printline.c    Thu May  2 15:15:38 1991
  337. ---- printline.c    Thu May  2 14:47:31 1991
  338. -***************
  339. -*** 1,20 ****
  340. -! /* $Log:    printline.c,v $
  341. -!  * Revision 1.4  91/01/16  10:58:31  jsp
  342. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  343. -!  * minor bugs have been fixed
  344. -!  * 
  345. -!  * Revision 1.3  91/01/10  12:09:40  jsp
  346. -!  * Version exported to comp.sources.misc
  347. -!  * 
  348. -!  * Revision 1.2  90/10/18  12:45:49  jsp
  349. -!  * First release version
  350. -!  * 
  351. -!  * 
  352. -!  * Revision 1.1  90/10/12  18:16:16  jsp
  353. -!  * Initial revision
  354. -!  * 
  355. -!  *
  356. -!  * Module to put postscript commands to the standard output
  357. -   */
  358. -  
  359. -  #include "jgraph.h"
  360. ---- 1,8 ----
  361. -! /* 
  362. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/printline.c,v $
  363. -!  * $Revision: 5.0 $
  364. -!  * $Date: 91/05/02 14:45:15 $
  365. -!  * $Author: jsp $
  366. -   */
  367. -  
  368. -  #include "jgraph.h"
  369. -*** ../patches/patch.5/work/prio_list.c    Thu May  2 15:15:38 1991
  370. ---- prio_list.c    Thu May  2 14:47:32 1991
  371. -***************
  372. -*** 1,13 ****
  373. -! /* $Log:    prio_list.c,v $
  374. -!  * Revision 1.1  90/10/12  17:52:01  jsp
  375. -!  * Initial revision
  376. -!  * 
  377. -   */
  378. -  
  379. -- /* Jim Plank
  380. --  * prio_list.c
  381. --  * Prioirity list manipulation */
  382. --  
  383. -  #include "list.h"
  384. -  #include "prio_list.h"
  385. -  #include <stdio.h>
  386. ---- 1,10 ----
  387. -! /* 
  388. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.c,v $
  389. -!  * $Revision: 5.0 $
  390. -!  * $Date: 91/05/02 14:45:17 $
  391. -!  * $Author: jsp $
  392. -   */
  393. -  
  394. -  #include "list.h"
  395. -  #include "prio_list.h"
  396. -  #include <stdio.h>
  397. -*** ../patches/patch.5/work/prio_list.h    Thu May  2 15:15:39 1991
  398. ---- prio_list.h    Thu May  2 14:47:32 1991
  399. -***************
  400. -*** 1,12 ****
  401. -! /* $Log:    prio_list.h,v $
  402. -!  * Revision 1.1  90/10/12  17:52:29  jsp
  403. -!  * Initial revision
  404. -!  * 
  405. -   */
  406. -- 
  407. -- /* Jim Plank
  408. --  * prio_list.h
  409. --  * Prioirity list manipulation header file */
  410. -  
  411. -  /* Priority lists are just like normal lists of list.h and list.c, except
  412. -   * that their third field is a (int) prioriy.  The routines of list.c should all
  413. ---- 1,9 ----
  414. -! /* 
  415. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/prio_list.h,v $
  416. -!  * $Revision: 5.0 $
  417. -!  * $Date: 91/05/02 14:46:27 $
  418. -!  * $Author: jsp $
  419. -   */
  420. -  
  421. -  /* Priority lists are just like normal lists of list.h and list.c, except
  422. -   * that their third field is a (int) prioriy.  The routines of list.c should all
  423. -*** ../patches/patch.5/work/process.c    Thu May  2 15:15:39 1991
  424. ---- process.c    Thu May  2 14:47:32 1991
  425. -***************
  426. -*** 1,44 ****
  427. -! /* $Log:    process.c,v $
  428. -!  * Revision 1.10  91/01/16  10:58:34  jsp
  429. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  430. -!  * minor bugs have been fixed
  431. -!  * 
  432. -!  * Revision 1.9  91/01/10  12:09:45  jsp
  433. -!  * Version exported to comp.sources.misc
  434. -!  * 
  435. -!  * Revision 1.8  90/12/04  13:51:14  jsp
  436. -!  * Fixed a bug in the automatic spacing of legend entries.
  437. -!  * 
  438. -!  * Revision 1.7  90/11/26  17:11:55  jsp
  439. -!  * Changed so that default legends for curves with large marksizes will
  440. -!  * look ok.  Previously, this was a problem, especially bad with bar graphs.
  441. -!  * 
  442. -!  * Revision 1.6  90/10/18  12:46:12  jsp
  443. -!  * First release version
  444. -!  * 
  445. -!  * Changes include the addition of logrhythmic axes, better hash mark
  446. -!  * editing, etc.
  447. -!  * 
  448. -!  * Revision 1.5  90/10/14  21:26:59  jsp
  449. -!  * Changed to process user-inputted hash lines and has labels
  450. -!  * 
  451. -!  * Revision 1.4  90/10/14  19:55:49  jsp
  452. -!  * Took over the processing of hash lines and labels to use the new
  453. -!  * hash_lines and hash_labels fields of struct curve.  Also, took over
  454. -!  * almost all processing that was previously done in draw.c.
  455. -!  * 
  456. -!  * Revision 1.3  90/10/14  14:23:19  jsp
  457. -!  * Added code for bar graphs
  458. -!  * 
  459. -!  * Revision 1.2  90/10/14  13:36:24  jsp
  460. -!  * Updated to use error_header, as defined in token.c 1.2.
  461. -!  * 
  462. -!  * Revision 1.1  90/10/12  18:17:55  jsp
  463. -!  * Initial revision
  464. -!  * 
  465. -!  *
  466. -!  * Module to process the data structures after they've been 
  467. -!  * editted by the routines in edit.c
  468. -   */
  469. -  
  470. -  #include <stdio.h>
  471. ---- 1,8 ----
  472. -! /* 
  473. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/process.c,v $
  474. -!  * $Revision: 5.0 $
  475. -!  * $Date: 91/05/02 14:45:18 $
  476. -!  * $Author: jsp $
  477. -   */
  478. -  
  479. -  #include <stdio.h>
  480. -*** ../patches/patch.5/work/show.c    Thu May  2 15:15:40 1991
  481. ---- show.c    Thu May  2 14:47:32 1991
  482. -***************
  483. -*** 1,36 ****
  484. -! /* $Log:    show.c,v $
  485. -!  * Revision 1.8  91/01/31  16:15:37  jsp
  486. -!  * For patch #2 -- Fixed a bug with disttop which caused it to
  487. -!  * work incorrectly with axis minima which != 0.
  488. -!  * 
  489. -!  * Revision 1.7  91/01/16  10:58:37  jsp
  490. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  491. -!  * minor bugs have been fixed
  492. -!  * 
  493. -!  * Revision 1.6  91/01/10  12:09:48  jsp
  494. -!  * Version exported to comp.sources.misc
  495. -!  * 
  496. -!  * Revision 1.5  90/11/26  17:12:53  jsp
  497. -!  * Fixed a bug (faulty comment printed out)
  498. -!  * 
  499. -!  * Revision 1.4  90/10/18  12:46:59  jsp
  500. -!  * First release version
  501. -!  * 
  502. -!  * Changes include the addition of logrhythmic axes, better hash mark
  503. -!  * editing, etc.
  504. -!  * 
  505. -!  * Revision 1.3  90/10/14  21:27:41  jsp
  506. -!  * Changed to show hash line and label defaults
  507. -!  * 
  508. -!  * Revision 1.2  90/10/14  19:57:01  jsp
  509. -!  * Updated to reflect changes in edit.c.
  510. -!  * 
  511. -!  * Revision 1.1  90/10/12  18:29:39  jsp
  512. -!  * Initial revision
  513. -!  * 
  514. -!  *
  515. -!  * Module to pretty-print / show the defaults of the input, 
  516. -!  * as flagged by the -p option.
  517. -   */ 
  518. -  
  519. -  #include <stdio.h>
  520. ---- 1,8 ----
  521. -! /* 
  522. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/show.c,v $
  523. -!  * $Revision: 5.0 $
  524. -!  * $Date: 91/05/02 14:45:21 $
  525. -!  * $Author: jsp $
  526. -   */ 
  527. -  
  528. -  #include <stdio.h>
  529. -*** ../patches/patch.5/work/token.c    Thu May  2 15:15:49 1991
  530. ---- token.c    Thu May  2 14:47:33 1991
  531. -***************
  532. -*** 1,50 ****
  533. -! /* $Log:    token.c,v $
  534. -!  * Revision 1.10  91/04/12  17:06:55  jsp
  535. -!  * Added the shell command to allow jgraph to execute stuff
  536. -!  * 
  537. -!  * Revision 1.9  91/01/16  11:04:04  jsp
  538. -!  * Fixed Rlog information
  539. -!  * 
  540. -!  * Revision 1.8  91/01/16  10:58:39  jsp
  541. -!  * After Patch #1 -- Ifdefs have been included for VMS and LCC, and
  542. -!  * minor bugs have been fixed
  543. -!  * 
  544. -!  * Revision 1.7  91/01/15  12:06:04 jsp
  545. -!  * Fixed a bug in new_printable_text -- the end of the string had
  546. -!  * not been set to null.
  547. -!  * 
  548. -!  * Revision 1.6  91/01/10  12:09:52 jsp
  549. -!  * Version exported to comp.sources.misc
  550. -!  * 
  551. -!  * Revision 1.5  90/11/26  17:13:32  jsp
  552. -!  * Fixed include parameter so that the directory must be specified by -I
  553. -!  * command line option
  554. -!  * 
  555. -!  * Revision 1.4  90/10/18  12:46:43  jsp
  556. -!  * First release version
  557. -!  * 
  558. -!  * Revision 1.3  90/10/14  13:49:47  jsp
  559. -!  * Fixed bug with revision 1.2 by pushing oldchar & oldcharvalid onto
  560. -!  * the iostack.
  561. -!  * 
  562. -!  * Revision 1.2  90/10/14  13:34:29  jsp
  563. -!  * Added better error-flagging capabilities:
  564. -!  *   The function "error_header" will print out <filename>,<line number>:
  565. -!  *     to stderr.
  566. -!  *   The Iostack struct had to be changed to accomodate this.
  567. -!  *   Also, getchar/sprintf could no longer be used, as line tracking
  568. -!  *     had to be incorporated.
  569. -!  *   Thus, new procedures gettokenchar() and ungettokenchar() were
  570. -!  *     implemented.
  571. -!  * 
  572. -!  * Revision 1.1  90/10/12  18:08:04  jsp
  573. -!  * Initial revision
  574. -!  * 
  575. -!  *
  576. -!  * Module for getting tokens from stdin and included files.
  577. -   */
  578. -  
  579. -- 
  580. -  #include <math.h>
  581. -  #ifdef LCC
  582. -  #include <stdlib.h>
  583. ---- 1,10 ----
  584. -! /* 
  585. -!  * $Source: /n/fs/vd/jsp/src/jgraph/RCS/token.c,v $
  586. -!  * $Revision: 5.0 $
  587. -!  * $Date: 91/05/02 14:45:23 $
  588. -!  * $Author: jsp $
  589. -   */
  590. -  
  591. -  #include <math.h>
  592. -  #ifdef LCC
  593. -  #include <stdlib.h>
  594. -***************
  595. -*** 65,71 ****
  596. -    char *filename;
  597. -    FILE *stream;
  598. -    int oldcharvalid;
  599. -!   signed char oldchar;
  600. -    char pipe;
  601. -    int line;
  602. -  } *Iostack;
  603. ---- 25,31 ----
  604. -    char *filename;
  605. -    FILE *stream;
  606. -    int oldcharvalid;
  607. -!   char oldchar;
  608. -    char pipe;
  609. -    int line;
  610. -  } *Iostack;
  611. -***************
  612. -*** 72,83 ****
  613. -  
  614. -  static char INPUT[300];
  615. -  static int getnew = 1;
  616. -! static signed char oldchar = '\0';
  617. -  static oldcharvalid = 0;
  618. -  static char pipe = 0;
  619. -  static int eof = 0;
  620. -  static int init = 0;
  621. -  static Iostack stack;
  622. -  
  623. -  #ifndef VMS 
  624. -  static FILE *IOSTREAM = stdin;
  625. ---- 32,44 ----
  626. -  
  627. -  static char INPUT[300];
  628. -  static int getnew = 1;
  629. -! static char oldchar = '\0';
  630. -  static oldcharvalid = 0;
  631. -  static char pipe = 0;
  632. -  static int eof = 0;
  633. -  static int init = 0;
  634. -  static Iostack stack;
  635. -+ static char real_eof = EOF;
  636. -  
  637. -  #ifndef VMS 
  638. -  static FILE *IOSTREAM = stdin;
  639. -***************
  640. -*** 131,143 ****
  641. -  char *s;
  642. -  {
  643. -    int i;
  644. -!   signed char c;
  645. -  
  646. -    for (c = gettokenchar(); 
  647. -         c == ' ' || c == '\t' || c == '\n';
  648. -         c = gettokenchar()) ;
  649. -    for (i = 0;
  650. -!        c != EOF && c != ' ' && c != '\t' && c != '\n';
  651. -         c = gettokenchar()) {
  652. -      s[i++] = c;
  653. -    }
  654. ---- 92,104 ----
  655. -  char *s;
  656. -  {
  657. -    int i;
  658. -!   char c;
  659. -  
  660. -    for (c = gettokenchar(); 
  661. -         c == ' ' || c == '\t' || c == '\n';
  662. -         c = gettokenchar()) ;
  663. -    for (i = 0;
  664. -!        c != real_eof && c != ' ' && c != '\t' && c != '\n';
  665. -         c = gettokenchar()) {
  666. -      s[i++] = c;
  667. -    }
  668. -***************
  669. -*** 361,378 ****
  670. -  
  671. -  char *getlabel()
  672. -  {
  673. -!   signed char c;
  674. -    int i;
  675. -  
  676. -    if (getnew == 0) return CNULL;
  677. -    
  678. -    c = gettokenchar();
  679. -!   if (c == EOF) {
  680. -      ungettokenchar();
  681. -      return CNULL;
  682. -    }
  683. -    i = 0;
  684. -!   for (c = gettokenchar(); c != EOF && c != '\n';  c = gettokenchar()) {
  685. -      INPUT[i++] = c;
  686. -    }
  687. -    ungettokenchar();
  688. ---- 322,339 ----
  689. -  
  690. -  char *getlabel()
  691. -  {
  692. -!   char c;
  693. -    int i;
  694. -  
  695. -    if (getnew == 0) return CNULL;
  696. -    
  697. -    c = gettokenchar();
  698. -!   if (c == real_eof) {
  699. -      ungettokenchar();
  700. -      return CNULL;
  701. -    }
  702. -    i = 0;
  703. -!   for (c = gettokenchar(); c != real_eof && c != '\n';  c = gettokenchar()) {
  704. -      INPUT[i++] = c;
  705. -    }
  706. -    ungettokenchar();
  707. -***************
  708. -*** 382,399 ****
  709. -  
  710. -  int getsystemstring()
  711. -  {
  712. -!   signed char c;
  713. -    int i;
  714. -  
  715. -    if (getnew == 0) return 0;
  716. -    
  717. -    c = gettokenchar();
  718. -!   if (c == EOF) {
  719. -      ungettokenchar();
  720. -      return 0;
  721. -    }
  722. -    i = 0;
  723. -!   for (c = gettokenchar(); c != EOF && c != '\n';  c = gettokenchar()) {
  724. -      INPUT[i++] = c;
  725. -    }
  726. -    ungettokenchar();
  727. ---- 343,360 ----
  728. -  
  729. -  int getsystemstring()
  730. -  {
  731. -!   char c;
  732. -    int i;
  733. -  
  734. -    if (getnew == 0) return 0;
  735. -    
  736. -    c = gettokenchar();
  737. -!   if (c == real_eof) {
  738. -      ungettokenchar();
  739. -      return 0;
  740. -    }
  741. -    i = 0;
  742. -!   for (c = gettokenchar(); c != real_eof && c != '\n';  c = gettokenchar()) {
  743. -      INPUT[i++] = c;
  744. -    }
  745. -    ungettokenchar();
  746. End of patch.5
  747.  
  748. exit 0 # Just in case...
  749. -- 
  750. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  751. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  752. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  753. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  754.