home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume30 / gnuplot3 / patch02d < prev    next >
Encoding:
Text File  |  1992-06-18  |  50.6 KB  |  1,667 lines

  1. Newsgroups: comp.sources.misc
  2. From: woo@ra-next.arc.nasa.gov (Alex Woo)
  3. Subject:  v30i057:  gnuplot3 - interactive function plotting utility, Patch02d/7
  4. Message-ID: <1992Jun14.214040.8487@sparky.imd.sterling.com>
  5. X-Md4-Signature: 6bbae47c8d48b6e83cbb7d97086a72f1
  6. Date: Sun, 14 Jun 1992 21:40:40 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: woo@ra-next.arc.nasa.gov (Alex Woo)
  10. Posting-number: Volume 30, Issue 57
  11. Archive-name: gnuplot3/patch02d
  12. Environment: UNIX, MS-DOS, VMS
  13. Patch-To: gnuplot3: Volume 24, Issue 23-48
  14.  
  15. #! /bin/sh
  16. # This is a shell archive.  Remove anything before this line, then feed it
  17. # into a shell via "sh file" or similar.  To overwrite existing files,
  18. # type "sh file -c".
  19. # The tool that generated this appeared in the comp.sources.unix newsgroup;
  20. # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
  21. # Contents:  patch.5 term/next.trm
  22. # Wrapped by woo@ra-iris. on Thu May 28 22:44:40 1992
  23. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 4 (of 7)."'
  26. if test -f 'patch.5' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'patch.5'\"
  28. else
  29.   echo shar: Extracting \"'patch.5'\" \(36642 characters\)
  30.   sed "s/^X//" >'patch.5' <<'END_OF_FILE'
  31. Xdiff -rc gnuplot/makefile.vms gnuplot3.2/makefile.vms
  32. X*** gnuplot/makefile.vms    Tue Sep 17 08:20:52 1991
  33. X--- gnuplot3.2/makefile.vms    Wed Mar 25 07:59:51 1992
  34. X***************
  35. X*** 1,4 ****
  36. X--- 1,8 ----
  37. X  #
  38. X+ # $Id: makefile.vms,v 3.26 92/03/24 22:36:49 woo Exp Locker: woo $
  39. X+ #
  40. X+ #
  41. X+ #
  42. X  # GNUPLOT Makefile
  43. X  # for VMS
  44. X  # 
  45. X***************
  46. X*** 26,32 ****
  47. X      [.term]eepic.trm [.term]epson.trm [.term]fig.trm [.term]hp26.trm \
  48. X      [.term]hp2648.trm [.term]hpgl.trm [.term]hpljii.trm 
  49. X  CSOURCE6 = [.term]impcodes.h [.term]imagen.trm [.term]object.h \
  50. X!     [.term]iris4d.trm [.term]kyo.trm [.term]latex.trm [.term]pc.trm 
  51. X  CSOURCE7 = [.term]post.trm [.term]qms.trm [.term]regis.trm [.term]sun.trm \
  52. X      [.term]t410x.trm [.term]tek.trm [.term]unixpc.trm [.term]unixplot.trm \
  53. X      [.term]v384.trm [.term]x11.trm gnuplot_x11.c
  54. X--- 30,37 ----
  55. X      [.term]eepic.trm [.term]epson.trm [.term]fig.trm [.term]hp26.trm \
  56. X      [.term]hp2648.trm [.term]hpgl.trm [.term]hpljii.trm 
  57. X  CSOURCE6 = [.term]impcodes.h [.term]imagen.trm [.term]object.h \
  58. X!     [.term]iris4d.trm [.term]kyo.trm [.term]latex.trm [.term]pbm.trm  \
  59. X!     [.term]pc.trm 
  60. X  CSOURCE7 = [.term]post.trm [.term]qms.trm [.term]regis.trm [.term]sun.trm \
  61. X      [.term]t410x.trm [.term]tek.trm [.term]unixpc.trm [.term]unixplot.trm \
  62. X      [.term]v384.trm [.term]x11.trm gnuplot_x11.c
  63. Xdiff -rc gnuplot/misc.c gnuplot3.2/misc.c
  64. X*** gnuplot/misc.c    Thu Aug 22 10:20:15 1991
  65. X--- gnuplot3.2/misc.c    Wed Mar 25 07:59:52 1992
  66. X***************
  67. X*** 1,6 ****
  68. X  /* GNUPLOT - misc.c */
  69. X  /*
  70. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  71. X   *
  72. X   * Permission to use, copy, and distribute this software and its
  73. X   * documentation for any purpose with or without fee is hereby granted, 
  74. X--- 1,10 ----
  75. X+ #ifndef lint
  76. X+ static char *RCSid = "$Id: misc.c,v 3.26 92/03/24 22:34:30 woo Exp Locker: woo $";
  77. X+ #endif
  78. X+ 
  79. X  /* GNUPLOT - misc.c */
  80. X  /*
  81. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  82. X   *
  83. X   * Permission to use, copy, and distribute this software and its
  84. X   * documentation for any purpose with or without fee is hereby granted, 
  85. X***************
  86. X*** 27,37 ****
  87. X   *       Gershon Elber and many others.
  88. X   * 
  89. X   * Send your comments or suggestions to 
  90. X!  *  pixar!info-gnuplot@sun.com.
  91. X   * This is a mailing list; to join it send a note to 
  92. X!  *  pixar!info-gnuplot-request@sun.com.  
  93. X   * Send bug reports to
  94. X!  *  pixar!bug-gnuplot@sun.com.
  95. X   */
  96. X  
  97. X  #include <stdio.h>
  98. X--- 31,41 ----
  99. X   *       Gershon Elber and many others.
  100. X   * 
  101. X   * Send your comments or suggestions to 
  102. X!  *  info-gnuplot@ames.arc.nasa.gov.
  103. X   * This is a mailing list; to join it send a note to 
  104. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  105. X   * Send bug reports to
  106. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  107. X   */
  108. X  
  109. X  #include <stdio.h>
  110. X***************
  111. X*** 514,519 ****
  112. X--- 518,524 ----
  113. X          case CONTOUR_SRF:  fprintf(fp, " surface\n"); break;
  114. X          case CONTOUR_BOTH: fprintf(fp, " both\n"); break;
  115. X      }
  116. X+     fprintf(fp,"set %shidden3d\n",(hidden3d) ? "" : "no");
  117. X      fprintf(fp,"set cntrparam order %d\n", contour_order);
  118. X      fprintf(fp,"set cntrparam ");
  119. X      switch (contour_kind) {
  120. Xdiff -rc gnuplot/parse.c gnuplot3.2/parse.c
  121. X*** gnuplot/parse.c    Sun Jan  5 21:33:20 1992
  122. X--- gnuplot3.2/parse.c    Wed Mar 25 07:59:53 1992
  123. X***************
  124. X*** 1,6 ****
  125. X  /* GNUPLOT - parse.c */
  126. X  /*
  127. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  128. X   *
  129. X   * Permission to use, copy, and distribute this software and its
  130. X   * documentation for any purpose with or without fee is hereby granted, 
  131. X--- 1,10 ----
  132. X+ #ifndef lint
  133. X+ static char *RCSid = "$Id: parse.c,v 3.26 92/03/24 22:34:33 woo Exp Locker: woo $";
  134. X+ #endif
  135. X+ 
  136. X  /* GNUPLOT - parse.c */
  137. X  /*
  138. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  139. X   *
  140. X   * Permission to use, copy, and distribute this software and its
  141. X   * documentation for any purpose with or without fee is hereby granted, 
  142. X***************
  143. X*** 27,37 ****
  144. X   *       Gershon Elber and many others.
  145. X   * 
  146. X   * Send your comments or suggestions to 
  147. X!  *  pixar!info-gnuplot@sun.com.
  148. X   * This is a mailing list; to join it send a note to 
  149. X!  *  pixar!info-gnuplot-request@sun.com.  
  150. X   * Send bug reports to
  151. X!  *  pixar!bug-gnuplot@sun.com.
  152. X   */
  153. X  
  154. X  #include <stdio.h>
  155. X--- 31,41 ----
  156. X   *       Gershon Elber and many others.
  157. X   * 
  158. X   * Send your comments or suggestions to 
  159. X!  *  info-gnuplot@ames.arc.nasa.gov.
  160. X   * This is a mailing list; to join it send a note to 
  161. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  162. X   * Send bug reports to
  163. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  164. X   */
  165. X  
  166. X  #include <stdio.h>
  167. X***************
  168. X*** 66,72 ****
  169. X  #ifdef __TURBOC__
  170. X  void fpe()
  171. X  #else
  172. X! #if defined( __ZTC__ ) || defined( _CRAY )
  173. X  void fpe(an_int)
  174. X  int an_int;
  175. X  #else
  176. X--- 70,76 ----
  177. X  #ifdef __TURBOC__
  178. X  void fpe()
  179. X  #else
  180. X! #if defined( __ZTC__ ) || defined( _CRAY ) || defined( sgi )
  181. X  void fpe(an_int)
  182. X  int an_int;
  183. X  #else
  184. X***************
  185. X*** 73,80 ****
  186. X--- 77,90 ----
  187. X  #ifdef NEXT
  188. X  void fpe(int an_int)
  189. X  #else
  190. X+ #ifdef sgi
  191. X+ void fpe(int sig, int code, struct sigcontext *sc)
  192. X+ /*void fpe(an_int)
  193. X+ int an_int;*/
  194. X+ #else
  195. X  fpe()
  196. X  #endif
  197. X+ #endif
  198. X  #endif /* __ZTC__ || _CRAY */
  199. X  #endif
  200. X  {
  201. X***************
  202. X*** 385,391 ****
  203. X  #if defined(AMIGA_LC_5_1) || defined(AMIGA_AC_5)
  204. X          (void) add_action(ABOOL);
  205. X  #else
  206. X!         (void) add_action(BOOL);
  207. X  #endif
  208. X      }
  209. X  }
  210. X--- 395,401 ----
  211. X  #if defined(AMIGA_LC_5_1) || defined(AMIGA_AC_5)
  212. X          (void) add_action(ABOOL);
  213. X  #else
  214. X!         (void) add_action(BOOLE);
  215. X  #endif
  216. X      }
  217. X  }
  218. X***************
  219. X*** 405,411 ****
  220. X  #if defined(AMIGA_LC_5_1) || defined(AMIGA_AC_5)
  221. X          (void) add_action(ABOOL);
  222. X  #else
  223. X!         (void) add_action(BOOL);
  224. X  #endif
  225. X      }
  226. X  }
  227. X--- 415,421 ----
  228. X  #if defined(AMIGA_LC_5_1) || defined(AMIGA_AC_5)
  229. X          (void) add_action(ABOOL);
  230. X  #else
  231. X!         (void) add_action(BOOLE);
  232. X  #endif
  233. X      }
  234. X  }
  235. Xdiff -rc gnuplot/plot.c gnuplot3.2/plot.c
  236. X*** gnuplot/plot.c    Sun Jan  5 21:33:21 1992
  237. X--- gnuplot3.2/plot.c    Wed Mar 25 07:59:54 1992
  238. X***************
  239. X*** 1,6 ****
  240. X  /* GNUPLOT - plot.c */
  241. X  /*
  242. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  243. X   *
  244. X   * Permission to use, copy, and distribute this software and its
  245. X   * documentation for any purpose with or without fee is hereby granted, 
  246. X--- 1,10 ----
  247. X+ #ifndef lint
  248. X+ static char *RCSid = "$Id: plot.c,v 3.26 92/03/24 22:34:34 woo Exp Locker: woo $";
  249. X+ #endif
  250. X+ 
  251. X  /* GNUPLOT - plot.c */
  252. X  /*
  253. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  254. X   *
  255. X   * Permission to use, copy, and distribute this software and its
  256. X   * documentation for any purpose with or without fee is hereby granted, 
  257. X***************
  258. X*** 27,37 ****
  259. X   *       Gershon Elber and many others.
  260. X   * 
  261. X   * Send your comments or suggestions to 
  262. X!  *  pixar!info-gnuplot@sun.com.
  263. X   * This is a mailing list; to join it send a note to 
  264. X!  *  pixar!info-gnuplot-request@sun.com.  
  265. X   * Send bug reports to
  266. X!  *  pixar!bug-gnuplot@sun.com.
  267. X   */
  268. X  
  269. X  #include <stdio.h>
  270. X--- 31,41 ----
  271. X   *       Gershon Elber and many others.
  272. X   * 
  273. X   * Send your comments or suggestions to 
  274. X!  *  info-gnuplot@ames.arc.nasa.gov.
  275. X   * This is a mailing list; to join it send a note to 
  276. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  277. X   * Send bug reports to
  278. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  279. X   */
  280. X  
  281. X  #include <stdio.h>
  282. X***************
  283. X*** 65,70 ****
  284. X--- 69,75 ----
  285. X  extern int term;
  286. X  
  287. X  BOOLEAN interactive = TRUE;    /* FALSE if stdin not a terminal */
  288. X+ BOOLEAN noinputfiles = TRUE;    /* FALSE if there are script files */
  289. X  char *infile_name = NULL;    /* name of command file; NULL if terminal */
  290. X  
  291. X  #ifndef STDOUT
  292. X***************
  293. X*** 164,170 ****
  294. X  #ifdef __TURBOC__
  295. X  void tc_interrupt()
  296. X  #else
  297. X! #ifdef _CRAY
  298. X  void inter(an_int)
  299. X  int an_int;
  300. X  #else
  301. X--- 169,175 ----
  302. X  #ifdef __TURBOC__
  303. X  void tc_interrupt()
  304. X  #else
  305. X! #if defined( _CRAY ) || defined( sgi )
  306. X  void inter(an_int)
  307. X  int an_int;
  308. X  #else
  309. X***************
  310. X*** 171,180 ****
  311. X--- 176,189 ----
  312. X  #ifdef NEXT
  313. X  void inter(int an_int)
  314. X  #else
  315. X+ #ifdef sgi
  316. X+ void inter(int sig, int code, struct sigcontext *sc)
  317. X+ #else
  318. X  inter()
  319. X  #endif
  320. X  #endif
  321. X  #endif
  322. X+ #endif
  323. X  {
  324. X  #ifdef MSDOS
  325. X  #ifdef __TURBOC__
  326. X***************
  327. X*** 217,222 ****
  328. X--- 226,234 ----
  329. X  #endif
  330. X  
  331. X      setbuf(stderr,(char *)NULL);
  332. X+ #ifdef UNIX
  333. X+     setlinebuf(stdout);
  334. X+ #endif
  335. X      outfile = stdout;
  336. X      (void) complex(&udv_pi.udv_value, Pi, 0.0);
  337. X  
  338. X***************
  339. X*** 230,236 ****
  340. X       interactive = isatty(fileno(stdin));
  341. X  #endif
  342. X       if (argc > 1)
  343. X!       interactive = FALSE;
  344. X  
  345. X       if (interactive)
  346. X        show_version();
  347. X--- 242,250 ----
  348. X       interactive = isatty(fileno(stdin));
  349. X  #endif
  350. X       if (argc > 1)
  351. X!       interactive = noinputfiles = FALSE;
  352. X!      else
  353. X!       noinputfiles = TRUE;
  354. X  
  355. X       if (interactive)
  356. X        show_version();
  357. X***************
  358. X*** 265,271 ****
  359. X             outfile = stdout;
  360. X          }
  361. X  #endif                    /* VMS */
  362. X!         if (!interactive)
  363. X           done(IO_ERROR);            /* exit on non-interactive error */
  364. X      }
  365. X  
  366. X--- 279,285 ----
  367. X             outfile = stdout;
  368. X          }
  369. X  #endif                    /* VMS */
  370. X!         if (!interactive && !noinputfiles)
  371. X           done(IO_ERROR);            /* exit on non-interactive error */
  372. X      }
  373. X  
  374. Xdiff -rc gnuplot/plot.h gnuplot3.2/plot.h
  375. X*** gnuplot/plot.h    Sun Jan  5 21:33:22 1992
  376. X--- gnuplot3.2/plot.h    Wed Mar 25 07:59:55 1992
  377. X***************
  378. X*** 1,6 ****
  379. X  /* GNUPLOT - plot.h */
  380. X  /*
  381. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  382. X   *
  383. X   * Permission to use, copy, and distribute this software and its
  384. X   * documentation for any purpose with or without fee is hereby granted, 
  385. X--- 1,11 ----
  386. X+ /*
  387. X+  * $Id: plot.h,v 3.26 92/03/24 22:34:13 woo Exp Locker: woo $
  388. X+  *
  389. X+  */
  390. X+ 
  391. X  /* GNUPLOT - plot.h */
  392. X  /*
  393. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  394. X   *
  395. X   * Permission to use, copy, and distribute this software and its
  396. X   * documentation for any purpose with or without fee is hereby granted, 
  397. X***************
  398. X*** 27,37 ****
  399. X   *       Gershon Elber and many others.
  400. X   * 
  401. X   * Send your comments or suggestions to 
  402. X!  *  pixar!info-gnuplot@sun.com.
  403. X   * This is a mailing list; to join it send a note to 
  404. X!  *  pixar!info-gnuplot-request@sun.com.  
  405. X   * Send bug reports to
  406. X!  *  pixar!bug-gnuplot@sun.com.
  407. X   */
  408. X  
  409. X  #define PROGRAM "G N U P L O T"
  410. X--- 32,42 ----
  411. X   *       Gershon Elber and many others.
  412. X   * 
  413. X   * Send your comments or suggestions to 
  414. X!  *  info-gnuplot@ames.arc.nasa.gov.
  415. X   * This is a mailing list; to join it send a note to 
  416. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  417. X   * Send bug reports to
  418. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  419. X   */
  420. X  
  421. X  #define PROGRAM "G N U P L O T"
  422. X***************
  423. X*** 234,240 ****
  424. X  enum operators {
  425. X      PUSH, PUSHC, PUSHD1, PUSHD2, CALL, CALL2, LNOT, BNOT, UMINUS, LOR, LAND,
  426. X      BOR, XOR, BAND, EQ, NE, GT, LT, GE, LE, PLUS, MINUS, MULT, DIV,
  427. X!     MOD, POWER, FACTORIAL, BOOL, JUMP, JUMPZ, JUMPNZ, JTERN, SF_START
  428. X  };
  429. X  #endif
  430. X  
  431. X--- 239,245 ----
  432. X  enum operators {
  433. X      PUSH, PUSHC, PUSHD1, PUSHD2, CALL, CALL2, LNOT, BNOT, UMINUS, LOR, LAND,
  434. X      BOR, XOR, BAND, EQ, NE, GT, LT, GE, LE, PLUS, MINUS, MULT, DIV,
  435. X!     MOD, POWER, FACTORIAL, BOOLE, JUMP, JUMPZ, JUMPNZ, JTERN, SF_START
  436. X  };
  437. X  #endif
  438. X  
  439. Xdiff -rc gnuplot/readline.c gnuplot3.2/readline.c
  440. X*** gnuplot/readline.c    Sun Jan  5 21:33:22 1992
  441. X--- gnuplot3.2/readline.c    Wed Mar 25 07:59:56 1992
  442. X***************
  443. X*** 1,6 ****
  444. X  /* GNUPLOT - readline.c */
  445. X  /*
  446. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  447. X   *
  448. X   * Permission to use, copy, and distribute this software and its
  449. X   * documentation for any purpose with or without fee is hereby granted, 
  450. X--- 1,10 ----
  451. X+ #ifndef lint
  452. X+ static char *RCSid = "$Id: readline.c,v 3.26 92/03/24 22:34:35 woo Exp Locker: woo $";
  453. X+ #endif
  454. X+ 
  455. X  /* GNUPLOT - readline.c */
  456. X  /*
  457. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  458. X   *
  459. X   * Permission to use, copy, and distribute this software and its
  460. X   * documentation for any purpose with or without fee is hereby granted, 
  461. X***************
  462. X*** 24,34 ****
  463. X   *     Gershon Elber and many others.
  464. X   * 
  465. X   * Send your comments or suggestions to 
  466. X!  *  pixar!info-gnuplot@sun.com.
  467. X   * This is a mailing list; to join it send a note to 
  468. X!  *  pixar!info-gnuplot-request@sun.com.  
  469. X   * Send bug reports to
  470. X!  *  pixar!bug-gnuplot@sun.com.
  471. X   */
  472. X  
  473. X  #ifdef READLINE
  474. X--- 28,38 ----
  475. X   *     Gershon Elber and many others.
  476. X   * 
  477. X   * Send your comments or suggestions to 
  478. X!  *  info-gnuplot@ames.arc.nasa.gov.
  479. X   * This is a mailing list; to join it send a note to 
  480. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  481. X   * Send bug reports to
  482. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  483. X   */
  484. X  
  485. X  #ifdef READLINE
  486. Xdiff -rc gnuplot/scanner.c gnuplot3.2/scanner.c
  487. X*** gnuplot/scanner.c    Sun Jan  5 21:33:23 1992
  488. X--- gnuplot3.2/scanner.c    Wed Mar 25 07:59:57 1992
  489. X***************
  490. X*** 1,6 ****
  491. X  /* GNUPLOT - scanner.c */
  492. X  /*
  493. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  494. X   *
  495. X   * Permission to use, copy, and distribute this software and its
  496. X   * documentation for any purpose with or without fee is hereby granted, 
  497. X--- 1,10 ----
  498. X+ #ifndef lint
  499. X+ static char *RCSid = "$Id: scanner.c,v 3.26 92/03/24 22:34:36 woo Exp Locker: woo $";
  500. X+ #endif
  501. X+ 
  502. X  /* GNUPLOT - scanner.c */
  503. X  /*
  504. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  505. X   *
  506. X   * Permission to use, copy, and distribute this software and its
  507. X   * documentation for any purpose with or without fee is hereby granted, 
  508. X***************
  509. X*** 27,37 ****
  510. X   *       Gershon Elber and many others.
  511. X   * 
  512. X   * Send your comments or suggestions to 
  513. X!  *  pixar!info-gnuplot@sun.com.
  514. X   * This is a mailing list; to join it send a note to 
  515. X!  *  pixar!info-gnuplot-request@sun.com.  
  516. X   * Send bug reports to
  517. X!  *  pixar!bug-gnuplot@sun.com.
  518. X   */
  519. X  
  520. X  #include <stdio.h>
  521. X--- 31,41 ----
  522. X   *       Gershon Elber and many others.
  523. X   * 
  524. X   * Send your comments or suggestions to 
  525. X!  *  info-gnuplot@ames.arc.nasa.gov.
  526. X   * This is a mailing list; to join it send a note to 
  527. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  528. X   * Send bug reports to
  529. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  530. X   */
  531. X  
  532. X  #include <stdio.h>
  533. Xdiff -rc gnuplot/setshow.c gnuplot3.2/setshow.c
  534. X*** gnuplot/setshow.c    Tue Sep  3 16:22:55 1991
  535. X--- gnuplot3.2/setshow.c    Wed Mar 25 07:59:59 1992
  536. X***************
  537. X*** 1,6 ****
  538. X  /* GNUPLOT - setshow.c */
  539. X  /*
  540. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  541. X   *
  542. X   * Permission to use, copy, and distribute this software and its
  543. X   * documentation for any purpose with or without fee is hereby granted, 
  544. X--- 1,10 ----
  545. X+ #ifndef lint
  546. X+ static char *RCSid = "$Id: setshow.c,v 3.26 92/03/24 22:34:20 woo Exp Locker: woo $";
  547. X+ #endif
  548. X+ 
  549. X  /* GNUPLOT - setshow.c */
  550. X  /*
  551. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  552. X   *
  553. X   * Permission to use, copy, and distribute this software and its
  554. X   * documentation for any purpose with or without fee is hereby granted, 
  555. X***************
  556. X*** 27,37 ****
  557. X   *       Gershon Elber and many others.
  558. X   * 
  559. X   * Send your comments or suggestions to 
  560. X!  *  pixar!info-gnuplot@sun.com.
  561. X   * This is a mailing list; to join it send a note to 
  562. X!  *  pixar!info-gnuplot-request@sun.com.  
  563. X   * Send bug reports to
  564. X!  *  pixar!bug-gnuplot@sun.com.
  565. X   */
  566. X  
  567. X  #include <stdio.h>
  568. X--- 31,41 ----
  569. X   *       Gershon Elber and many others.
  570. X   * 
  571. X   * Send your comments or suggestions to 
  572. X!  *  info-gnuplot@ames.arc.nasa.gov.
  573. X   * This is a mailing list; to join it send a note to 
  574. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  575. X   * Send bug reports to
  576. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  577. X   */
  578. X  
  579. X  #include <stdio.h>
  580. X***************
  581. X*** 81,86 ****
  582. X--- 85,91 ----
  583. X  char            outstr[MAX_ID_LEN+1] = "STDOUT";
  584. X  BOOLEAN            parametric    = FALSE;
  585. X  BOOLEAN            polar        = FALSE;
  586. X+ BOOLEAN            hidden3d    = FALSE;
  587. X  int            angles_format    = ANGLES_RADIANS;
  588. X  int            mapping3d    = MAP3D_CARTESIAN;
  589. X  int            samples        = SAMPLES;
  590. X***************
  591. X*** 190,196 ****
  592. X  static void show_polar(), show_parametric(), show_tics(), show_ticdef();
  593. X  static void show_time(), show_term(), show_plot(), show_autoscale(), show_clip();
  594. X  static void show_contour(), show_mapping(), show_format(), show_logscale();
  595. X! static void show_variables(), show_surface();
  596. X  static void delete_label();
  597. X  static int assign_label_tag();
  598. X  static void delete_arrow();
  599. X--- 195,201 ----
  600. X  static void show_polar(), show_parametric(), show_tics(), show_ticdef();
  601. X  static void show_time(), show_term(), show_plot(), show_autoscale(), show_clip();
  602. X  static void show_contour(), show_mapping(), show_format(), show_logscale();
  603. X! static void show_variables(), show_surface(), show_hidden3d();
  604. X  static void delete_label();
  605. X  static int assign_label_tag();
  606. X  static void delete_arrow();
  607. X***************
  608. X*** 208,221 ****
  609. X      int_error(
  610. X      "valid set options:  'angles' '{no}arrow', {no}autoscale', \n\
  611. X      '{no}border', '{no}clip', 'cntrparam', '{no}contour', 'data style', \n\
  612. X!     'dummy', 'format', 'function style', '{no}grid', 'isosamples', \n\
  613. X!     '{no}key', '{no}label', '{no}logscale', 'mapping', 'offsets', \n\
  614. X!     'output', '{no}parametric', '{no}polar', 'rrange', 'samples', \n\
  615. X!     'size', '{no}surface', 'terminal', 'tics', 'ticslevel', '{no}time', \n\
  616. X!     'title', 'trange', 'urange', 'view', 'vrange', 'xlabel', 'xrange', \n\
  617. X!     '{no}xtics', '{no}xzeroaxis', 'ylabel', 'yrange', '{no}ytics', \n\
  618. X!     '{no}yzeroaxis', 'zero', '{no}zeroaxis', 'zlabel', 'zrange', \n\
  619. X!     '{no}ztics'", c_token);
  620. X  }
  621. X  
  622. X  /* return TRUE if a command match, FALSE if not */
  623. X--- 213,226 ----
  624. X      int_error(
  625. X      "valid set options:  'angles' '{no}arrow', {no}autoscale', \n\
  626. X      '{no}border', '{no}clip', 'cntrparam', '{no}contour', 'data style', \n\
  627. X!     'dummy', 'format', 'function style', '{no}grid', '{no}hidden3d', \n\
  628. X!     'isosamples', '{no}key', '{no}label', '{no}logscale', 'mapping', \n\
  629. X!     'offsets', 'output', '{no}parametric', '{no}polar', 'rrange', \n\
  630. X!     'samples', 'size', '{no}surface', 'terminal', 'tics', 'ticslevel', \n\
  631. X!     '{no}time', 'title', 'trange', 'urange', 'view', 'vrange', 'xlabel', \n\
  632. X!     'xrange', '{no}xtics', '{no}xzeroaxis', 'ylabel', 'yrange', \n\
  633. X!     '{no}ytics', '{no}yzeroaxis', 'zero', '{no}zeroaxis', 'zlabel', \n\
  634. X!     'zrange', '{no}ztics'", c_token);
  635. X  }
  636. X  
  637. X  /* return TRUE if a command match, FALSE if not */
  638. X***************
  639. X*** 318,323 ****
  640. X--- 323,336 ----
  641. X           int_error("expecting 'points', 'one', or 'two'", c_token);
  642. X          c_token++;
  643. X      }
  644. X+     else if (almost_equals(c_token,"hi$dden3d")) {
  645. X+         hidden3d = TRUE;
  646. X+         c_token++;
  647. X+     }
  648. X+     else if (almost_equals(c_token,"nohi$dden3d")) {
  649. X+         hidden3d = FALSE;
  650. X+         c_token++;
  651. X+     }
  652. X      else if (almost_equals(c_token,"ma$pping3d")) {
  653. X          c_token++;
  654. X          if (END_OF_COMMAND)
  655. X***************
  656. X*** 1757,1769 ****
  657. X      int_error(
  658. X      "valid show options:  'action_table', 'all', 'angles', 'arrow', \n\
  659. X      'autoscale', 'border', 'clip', 'contour', 'data', 'dummy', 'format', \n\
  660. X!     'function', 'grid', 'key', 'label', 'logscale', 'mapping', 'offsets', \n\
  661. X!     'output', 'plot', 'parametric', 'polar', 'rrange', 'samples', \n\
  662. X!     'isosamples', 'view', 'size', 'terminal', 'tics', 'ticslevel', \n\
  663. X!     'time', 'title', 'trange', 'urange', 'vrange', 'variables', \n\
  664. X!     'version', 'xlabel', 'xrange', 'xtics', 'xzeroaxis', 'ylabel', \n\
  665. X!     'yrange', 'ytics', 'yzeroaxis', 'zlabel', 'zrange', 'ztics', 'zero', \n\
  666. X!     'zeroaxis'", c_token);
  667. X      screen_ok = FALSE;
  668. X      (void) putc('\n',stderr);
  669. X  }
  670. X--- 1770,1782 ----
  671. X      int_error(
  672. X      "valid show options:  'action_table', 'all', 'angles', 'arrow', \n\
  673. X      'autoscale', 'border', 'clip', 'contour', 'data', 'dummy', 'format', \n\
  674. X!     'function', 'grid', 'hidden', 'key', 'label', 'logscale', 'mapping', \n\
  675. X!     'offsets', 'output', 'plot', 'parametric', 'polar', 'rrange', \n\
  676. X!     'samples', 'isosamples', 'view', 'size', 'terminal', 'tics', \n\
  677. X!     'ticslevel', 'time', 'title', 'trange', 'urange', 'vrange', \n\
  678. X!     'variables', 'version', 'xlabel', 'xrange', 'xtics', 'xzeroaxis', \n\
  679. X!     'ylabel', 'yrange', 'ytics', 'yzeroaxis', 'zlabel', 'zrange', \n\
  680. X!     'ztics', 'zero', 'zeroaxis'", c_token);
  681. X      screen_ok = FALSE;
  682. X      (void) putc('\n',stderr);
  683. X  }
  684. X***************
  685. X*** 1963,1968 ****
  686. X--- 1976,1986 ----
  687. X          show_surface();
  688. X          c_token++;
  689. X      }
  690. X+     else if (almost_equals(c_token,"hi$dden3d")) {
  691. X+         (void) putc('\n',stderr);
  692. X+         show_hidden3d();
  693. X+         c_token++;
  694. X+     }
  695. X      else if (almost_equals(c_token,"xti$cs")) {
  696. X          show_tics(TRUE,FALSE,FALSE);
  697. X          c_token++;
  698. X***************
  699. X*** 2075,2080 ****
  700. X--- 2093,2099 ----
  701. X          show_isosamples();
  702. X          show_view();
  703. X          show_surface();
  704. X+         show_hidden3d();
  705. X          show_size();
  706. X          show_term();
  707. X          show_tics(TRUE,TRUE,TRUE);
  708. X***************
  709. X*** 2175,2180 ****
  710. X--- 2194,2205 ----
  711. X  }
  712. X  
  713. X  static void
  714. X+ show_hidden3d()
  715. X+ {
  716. X+     fprintf(stderr,"\thidden surface is %s\n", hidden3d ? "removed" : "drawn");
  717. X+ }
  718. X+ 
  719. X+ static void
  720. X  show_view()
  721. X  {
  722. X      fprintf(stderr,"\tview is %g rot_x, %g rot_z, %g scale, %g scale_z\n",
  723. X***************
  724. X*** 2587,2601 ****
  725. X          PROGRAM, OS, version); 
  726. X      fprintf(stderr,"\tpatchlevel %s\n",patchlevel);
  727. X       fprintf(stderr, "\tlast modified %s\n", date);
  728. X!     fprintf(stderr,"\tCopyright (C) 1986, 1987, 1990, 1991  %s, %s\n",
  729. X          authors[x],authors[1-x]);
  730. X      fprintf(stderr, "\n\tSend bugs and comments to %s\n", bug_email);
  731. X  }
  732. X- 
  733. X- 
  734. X- 
  735. X- 
  736. X- 
  737. X- 
  738. X- 
  739. X- 
  740. X--- 2612,2618 ----
  741. X          PROGRAM, OS, version); 
  742. X      fprintf(stderr,"\tpatchlevel %s\n",patchlevel);
  743. X       fprintf(stderr, "\tlast modified %s\n", date);
  744. X!     fprintf(stderr,"\nCopyright(C) 1986, 1987, 1990, 1991, 1992  %s, %s\n",
  745. X          authors[x],authors[1-x]);
  746. X      fprintf(stderr, "\n\tSend bugs and comments to %s\n", bug_email);
  747. X  }
  748. Xdiff -rc gnuplot/setshow.h gnuplot3.2/setshow.h
  749. X*** gnuplot/setshow.h    Thu Jul 18 12:01:58 1991
  750. X--- gnuplot3.2/setshow.h    Wed Mar 25 07:59:59 1992
  751. X***************
  752. X*** 1,6 ****
  753. X  /* GNUPLOT - setshow.h */
  754. X  /*
  755. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  756. X   *
  757. X   * Permission to use, copy, and distribute this software and its
  758. X   * documentation for any purpose with or without fee is hereby granted, 
  759. X--- 1,11 ----
  760. X+ /*
  761. X+  * $Id: setshow.h,v 3.26 92/03/24 22:34:15 woo Exp Locker: woo $
  762. X+  *
  763. X+  */
  764. X+ 
  765. X  /* GNUPLOT - setshow.h */
  766. X  /*
  767. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  768. X   *
  769. X   * Permission to use, copy, and distribute this software and its
  770. X   * documentation for any purpose with or without fee is hereby granted, 
  771. X***************
  772. X*** 27,37 ****
  773. X   *       Gershon Elber and many others.
  774. X   * 
  775. X   * Send your comments or suggestions to 
  776. X!  *  pixar!info-gnuplot@sun.com.
  777. X   * This is a mailing list; to join it send a note to 
  778. X!  *  pixar!info-gnuplot-request@sun.com.  
  779. X   * Send bug reports to
  780. X!  *  pixar!bug-gnuplot@sun.com.
  781. X   */
  782. X  
  783. X  /*
  784. X--- 32,42 ----
  785. X   *       Gershon Elber and many others.
  786. X   * 
  787. X   * Send your comments or suggestions to 
  788. X!  *  info-gnuplot@ames.arc.nasa.gov.
  789. X   * This is a mailing list; to join it send a note to 
  790. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  791. X   * Send bug reports to
  792. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  793. X   */
  794. X  
  795. X  /*
  796. X***************
  797. X*** 70,75 ****
  798. X--- 75,81 ----
  799. X  extern char            outstr[];
  800. X  extern BOOLEAN            parametric;
  801. X  extern BOOLEAN            polar;
  802. X+ extern BOOLEAN            hidden3d;
  803. X  extern int            angles_format;
  804. X  extern int            mapping3d;
  805. X  extern int            samples;
  806. Xdiff -rc gnuplot/standard.c gnuplot3.2/standard.c
  807. X*** gnuplot/standard.c    Sun Jan  5 21:33:24 1992
  808. X--- gnuplot3.2/standard.c    Wed Mar 25 08:00:00 1992
  809. X***************
  810. X*** 1,6 ****
  811. X  /* GNUPLOT - standard.c */
  812. X  /*
  813. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  814. X   *
  815. X   * Permission to use, copy, and distribute this software and its
  816. X   * documentation for any purpose with or without fee is hereby granted, 
  817. X--- 1,10 ----
  818. X+ #ifndef lint
  819. X+ static char *RCSid = "$Id: standard.c,v 3.26 92/03/24 22:34:37 woo Exp Locker: woo $";
  820. X+ #endif
  821. X+ 
  822. X  /* GNUPLOT - standard.c */
  823. X  /*
  824. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  825. X   *
  826. X   * Permission to use, copy, and distribute this software and its
  827. X   * documentation for any purpose with or without fee is hereby granted, 
  828. X***************
  829. X*** 27,37 ****
  830. X   *       Gershon Elber and many others.
  831. X   * 
  832. X   * Send your comments or suggestions to 
  833. X!  *  pixar!info-gnuplot@sun.com.
  834. X   * This is a mailing list; to join it send a note to 
  835. X!  *  pixar!info-gnuplot-request@sun.com.  
  836. X   * Send bug reports to
  837. X!  *  pixar!bug-gnuplot@sun.com.
  838. X   */
  839. X  
  840. X  #include <math.h>
  841. X--- 31,41 ----
  842. X   *       Gershon Elber and many others.
  843. X   * 
  844. X   * Send your comments or suggestions to 
  845. X!  *  info-gnuplot@ames.arc.nasa.gov.
  846. X   * This is a mailing list; to join it send a note to 
  847. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  848. X   * Send bug reports to
  849. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  850. X   */
  851. X  
  852. X  #include <math.h>
  853. XCommon subdirectories: gnuplot/term and gnuplot3.2/term
  854. Xdiff -rc gnuplot/term.c gnuplot3.2/term.c
  855. X*** gnuplot/term.c    Sun Jan  5 21:33:25 1992
  856. X--- gnuplot3.2/term.c    Wed Mar 25 08:00:02 1992
  857. X***************
  858. X*** 1,6 ****
  859. X  /* GNUPLOT - term.c */
  860. X  /*
  861. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  862. X   *
  863. X   * Permission to use, copy, and distribute this software and its
  864. X   * documentation for any purpose with or without fee is hereby granted, 
  865. X--- 1,10 ----
  866. X+ #ifndef lint
  867. X+ static char *RCSid = "$Id: term.c,v 3.26 92/03/24 22:34:41 woo Exp Locker: woo $";
  868. X+ #endif
  869. X+ 
  870. X  /* GNUPLOT - term.c */
  871. X  /*
  872. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  873. X   *
  874. X   * Permission to use, copy, and distribute this software and its
  875. X   * documentation for any purpose with or without fee is hereby granted, 
  876. X***************
  877. X*** 27,37 ****
  878. X   *       Gershon Elber and many others.
  879. X   * 
  880. X   * Send your comments or suggestions to 
  881. X!  *  pixar!info-gnuplot@sun.com.
  882. X   * This is a mailing list; to join it send a note to 
  883. X!  *  pixar!info-gnuplot-request@sun.com.  
  884. X   * Send bug reports to
  885. X!  *  pixar!bug-gnuplot@sun.com.
  886. X   */
  887. X  
  888. X  #include <stdio.h>
  889. X--- 31,41 ----
  890. X   *       Gershon Elber and many others.
  891. X   * 
  892. X   * Send your comments or suggestions to 
  893. X!  *  info-gnuplot@ames.arc.nasa.gov.
  894. X   * This is a mailing list; to join it send a note to 
  895. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  896. X   * Send bug reports to
  897. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  898. X   */
  899. X  
  900. X  #include <stdio.h>
  901. X***************
  902. X*** 39,44 ****
  903. X--- 43,52 ----
  904. X  #include "setshow.h"
  905. X  #include "term.h"
  906. X  #include "bitmap.h"
  907. X+ #ifdef NEXT
  908. X+ #include <stdlib.h>
  909. X+ #include "EpsViewer.h"
  910. X+ #endif /* NEXT */
  911. X  
  912. X  /* for use by all drivers */
  913. X  #define sign(x) ((x) >= 0 ? 1 : -1)
  914. X***************
  915. X*** 338,343 ****
  916. X--- 346,355 ----
  917. X  #include "term/latex.trm"
  918. X  #endif
  919. X  
  920. X+ #ifdef PBM        /* PBMPLUS portable bitmap */
  921. X+ #include "term/pbm.trm"
  922. X+ #endif
  923. X+ 
  924. X  #ifdef POSTSCRIPT    /* POSTSCRIPT type */
  925. X  #include "term/post.trm"
  926. X  #endif
  927. X***************
  928. X*** 392,397 ****
  929. X--- 404,413 ----
  930. X  #include "term/iris4d.trm"
  931. X  #endif /* IRIS4D */
  932. X  
  933. X+ #ifdef NEXT
  934. X+ #include "term/next.trm"
  935. X+ #endif /* NEXT */
  936. X+ 
  937. X  #ifdef QMS
  938. X  #include "term/qms.trm"
  939. X  #endif /* QMS */
  940. X***************
  941. X*** 426,432 ****
  942. X    
  943. X  #ifdef AMIGASCREEN
  944. X  #include "term/amiga.trm"
  945. X! #endif
  946. X  
  947. X  
  948. X  /* Dummy functions for unavailable features */
  949. X--- 442,448 ----
  950. X    
  951. X  #ifdef AMIGASCREEN
  952. X  #include "term/amiga.trm"
  953. X! #endif /* AMIGASCREEN */
  954. X  
  955. X  
  956. X  /* Dummy functions for unavailable features */
  957. X***************
  958. X*** 483,488 ****
  959. X--- 499,511 ----
  960. X        UNKNOWN_null, UNKNOWN_null, null_text_angle, 
  961. X        null_justify_text, UNKNOWN_null, UNKNOWN_null}
  962. X  
  963. X+     ,{"table", "Dump ASCII table of X Y [Z] values to output",
  964. X+       100, 100, 1, 1,
  965. X+       1, 1, options_null, UNKNOWN_null, UNKNOWN_null, 
  966. X+       UNKNOWN_null, null_scale, UNKNOWN_null, UNKNOWN_null, UNKNOWN_null, 
  967. X+       UNKNOWN_null, UNKNOWN_null, null_text_angle, 
  968. X+       null_justify_text, UNKNOWN_null, UNKNOWN_null}
  969. X+ 
  970. X  #ifdef AMIGASCREEN
  971. X      ,{"amiga", "Amiga Custom Screen",
  972. X         AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, 
  973. X***************
  974. X*** 813,828 ****
  975. X  
  976. X  #ifdef HPLJIII
  977. X      ,{"pcl5_port", "HP laserjet iii (using HPGL plot vectors), portrait mode",
  978. X!     HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR,
  979. X!     HPGL_VTIC, HPGL_HTIC, options_null, HPLJIII_PORT_init, HPLJIII_reset,
  980. X!     HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector,
  981. X!     HPGL_linetype, HPGL_put_text, HPGL_text_angle,
  982. X      null_justify_text, do_point, do_arrow}
  983. X       ,{"pcl5_land", "HP laserjet iii (using HPGL plot vectors), landscape mode",
  984. X!     HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR,
  985. X!     HPGL_VTIC, HPGL_HTIC, options_null, HPLJIII_LAND_init, HPLJIII_reset,
  986. X!     HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector,
  987. X!     HPGL_linetype, HPGL_put_text, HPGL_text_angle,
  988. X      null_justify_text, do_point, do_arrow}
  989. X  #endif
  990. X  
  991. X--- 836,851 ----
  992. X  
  993. X  #ifdef HPLJIII
  994. X      ,{"pcl5_port", "HP laserjet iii (using HPGL plot vectors), portrait mode",
  995. X!     PCL_YMAX, PCL_XMAX, PCL_VCHAR, PCL_HCHAR,
  996. X!     PCL_VTIC, PCL_HTIC, options_null, PCL_PORT_init, PCL_reset,
  997. X!     PCL_text, null_scale, PCL_graphics, HPGL_move, HPGL_vector,
  998. X!     HPGL_linetype, PCL_put_text, HPGL_text_angle,
  999. X      null_justify_text, do_point, do_arrow}
  1000. X       ,{"pcl5_land", "HP laserjet iii (using HPGL plot vectors), landscape mode",
  1001. X!     PCL_XMAX, PCL_YMAX, PCL_VCHAR, PCL_HCHAR,
  1002. X!     PCL_VTIC, PCL_HTIC, options_null, PCL_LAND_init, PCL_reset,
  1003. X!     PCL_text, null_scale, PCL_graphics, HPGL_move, HPGL_vector,
  1004. X!     HPGL_linetype, PCL_put_text, HPGL_text_angle,
  1005. X      null_justify_text, do_point, do_arrow}
  1006. X  #endif
  1007. X  
  1008. X***************
  1009. X*** 898,903 ****
  1010. X--- 921,959 ----
  1011. X         null_justify_text, line_and_point, do_arrow}
  1012. X  #endif
  1013. X  
  1014. X+ #ifdef NEXT
  1015. X+     ,{"next", "NeXTstep window system",
  1016. X+        NEXT_XMAX, NEXT_YMAX, NEXT_VCHAR, NEXT_HCHAR, 
  1017. X+        NEXT_VTIC, NEXT_HTIC, NEXT_options, NEXT_init, NEXT_reset, 
  1018. X+        NEXT_text, do_scale, NEXT_graphics, NEXT_move, NEXT_vector, 
  1019. X+        NEXT_linetype, NEXT_put_text, NEXT_text_angle, 
  1020. X+        NEXT_justify_text, NEXT_point, do_arrow}
  1021. X+ #endif /* The postscript driver with NXImage displaying the postscript on screen */
  1022. X+ 
  1023. X+ #ifdef PBM
  1024. X+     ,{"pbm", "Portable bitmap",
  1025. X+        PBM_XMAX, PBM_YMAX, PBM_VCHAR,
  1026. X+        PBM_HCHAR, PBM_VTIC, PBM_HTIC, PBMoptions,
  1027. X+        PBMinit, PBMreset, PBMtext, null_scale,
  1028. X+        PBMgraphics, PBMmove, PBMvector, PBMlinetype,
  1029. X+        PBMput_text, PBMtext_angle, null_justify_text, line_and_point,
  1030. X+        do_arrow}
  1031. X+     ,{"pgm", "Portable graymap",
  1032. X+        PBM_XMAX, PBM_YMAX, PBM_VCHAR,
  1033. X+        PBM_HCHAR, PBM_VTIC, PBM_HTIC, PBMoptions,
  1034. X+        PBMinit, PBMreset, PGMtext, null_scale,
  1035. X+        PGMgraphics, PBMmove, PBMvector, PGMlinetype,
  1036. X+        PBMput_text, PBMtext_angle, null_justify_text, do_point,
  1037. X+        do_arrow}
  1038. X+     ,{"ppm", "Portable pixmap (color)",
  1039. X+        PBM_XMAX, PBM_YMAX, PBM_VCHAR,
  1040. X+        PBM_HCHAR, PBM_VTIC, PBM_HTIC, PBMoptions,
  1041. X+        PBMinit, PBMreset, PPMtext, null_scale,
  1042. X+        PPMgraphics, PBMmove, PBMvector, PPMlinetype,
  1043. X+        PBMput_text, PBMtext_angle, null_justify_text, do_point,
  1044. X+        do_arrow}
  1045. X+ #endif
  1046. X+ 
  1047. X  #ifdef POSTSCRIPT
  1048. X      ,{"postscript", "PostScript graphics language [mode \042fontname\042 font_size]",
  1049. X         PS_XMAX, PS_YMAX, PS_VCHAR, PS_HCHAR, 
  1050. X***************
  1051. X*** 1157,1164 ****
  1052. X  
  1053. X      /* GNUTERM environment variable is primary */
  1054. X      gnuterm = getenv("GNUTERM");
  1055. X!     if (gnuterm != (char *)NULL)
  1056. X       term_name = gnuterm;
  1057. X      else {
  1058. X  #ifdef __TURBOC__
  1059. X         term_name = turboc_init();
  1060. X--- 1213,1224 ----
  1061. X  
  1062. X      /* GNUTERM environment variable is primary */
  1063. X      gnuterm = getenv("GNUTERM");
  1064. X!     if (gnuterm != (char *)NULL) {
  1065. X       term_name = gnuterm;
  1066. X+ #ifdef __TURBOC__
  1067. X+          get_path();   /* So *_init() can find the BGI driver */
  1068. X+ #endif
  1069. X+     }
  1070. X      else {
  1071. X  #ifdef __TURBOC__
  1072. X         term_name = turboc_init();
  1073. X***************
  1074. X*** 1168,1173 ****
  1075. X--- 1228,1240 ----
  1076. X  #ifdef vms
  1077. X         term_name = vms_init();
  1078. X  #endif
  1079. X+ 
  1080. X+ #ifdef NEXT
  1081. X+     term = getenv("TERM");
  1082. X+     if (term_name == (char *)NULL
  1083. X+         && term != (char *)NULL && strcmp(term,"next") == 0)
  1084. X+           term_name = "next";
  1085. X+ #endif /* NeXT */
  1086. X         
  1087. X  #ifdef SUN
  1088. X         term = getenv("TERM");    /* try $TERM */
  1089. Xdiff -rc gnuplot/term.h gnuplot3.2/term.h
  1090. X*** gnuplot/term.h    Sun Jan  5 21:33:26 1992
  1091. X--- gnuplot3.2/term.h    Wed Mar 25 08:00:03 1992
  1092. X***************
  1093. X*** 1,6 ****
  1094. X  /* GNUPLOT - term.h */
  1095. X  /*
  1096. X!  * Copyright (C) 1986, 1987, 1990, 1991   Thomas Williams, Colin Kelley
  1097. X   *
  1098. X   * Permission to use, copy, and distribute this software and its
  1099. X   * documentation for any purpose with or without fee is hereby granted, 
  1100. X--- 1,11 ----
  1101. X+ /*
  1102. X+  * $Id: term.h,v 3.26 92/03/24 22:34:17 woo Exp Locker: woo $
  1103. X+  *
  1104. X+  */
  1105. X+ 
  1106. X  /* GNUPLOT - term.h */
  1107. X  /*
  1108. X!  * Copyright (C) 1986, 1987, 1990, 1991, 1992   Thomas Williams, Colin Kelley
  1109. X   *
  1110. X   * Permission to use, copy, and distribute this software and its
  1111. X   * documentation for any purpose with or without fee is hereby granted, 
  1112. X***************
  1113. X*** 27,37 ****
  1114. X   *       Gershon Elber and many others.
  1115. X   * 
  1116. X   * Send your comments or suggestions to 
  1117. X!  *  pixar!info-gnuplot@sun.com.
  1118. X   * This is a mailing list; to join it send a note to 
  1119. X!  *  pixar!info-gnuplot-request@sun.com.  
  1120. X   * Send bug reports to
  1121. X!  *  pixar!bug-gnuplot@sun.com.
  1122. X   */
  1123. X  
  1124. X  /*
  1125. X--- 32,42 ----
  1126. X   *       Gershon Elber and many others.
  1127. X   * 
  1128. X   * Send your comments or suggestions to 
  1129. X!  *  info-gnuplot@ames.arc.nasa.gov.
  1130. X   * This is a mailing list; to join it send a note to 
  1131. X!  *  info-gnuplot-request@ames.arc.nasa.gov.  
  1132. X   * Send bug reports to
  1133. X!  *  bug-gnuplot@ames.arc.nasa.gov.
  1134. X   */
  1135. X  
  1136. X  /*
  1137. X***************
  1138. X*** 55,68 ****
  1139. X  #define AMIGASCREEN    /* Amiga custom screen */
  1140. X  #endif
  1141. X  #define AED        /* AED 512 and AED 767 */
  1142. X  #define BITGRAPH    /* BBN BitGraph */
  1143. X  /* #define CGI        /* SCO CGI */
  1144. X  /* #define IRIS4D    /* IRIS4D series computer */
  1145. X  #define KERMIT        /* MS-Kermit Tektronix 4010 emulator */
  1146. X  #define FIG           /* Fig graphics language */
  1147. X  #define REGIS        /* ReGis graphics (vt125, vt220, vt240, Gigis...) */
  1148. X  #define SELANAR        /* Selanar */
  1149. X- /* #define SUN        /* Sun Microsystems Workstation */
  1150. X  #define T410X        /* Tektronix 4106, 4107, 4109 and 420x terminals */
  1151. X  #define TEK        /* Tektronix 4010, and probably others */
  1152. X  /* #define UNIXPC    /* unixpc (ATT 3b1 or ATT 7300) */
  1153. X--- 60,75 ----
  1154. X  #define AMIGASCREEN    /* Amiga custom screen */
  1155. X  #endif
  1156. X  #define AED        /* AED 512 and AED 767 */
  1157. X+ #define AIFM        /* Adobe Illustrator Format */
  1158. X  #define BITGRAPH    /* BBN BitGraph */
  1159. X  /* #define CGI        /* SCO CGI */
  1160. X  /* #define IRIS4D    /* IRIS4D series computer */
  1161. X  #define KERMIT        /* MS-Kermit Tektronix 4010 emulator */
  1162. X  #define FIG           /* Fig graphics language */
  1163. X+ /* #define NEXT        /* NeXT workstation console */
  1164. X+ /* #define SUN        /* Sun Microsystems Workstation */
  1165. X  #define REGIS        /* ReGis graphics (vt125, vt220, vt240, Gigis...) */
  1166. X  #define SELANAR        /* Selanar */
  1167. X  #define T410X        /* Tektronix 4106, 4107, 4109 and 420x terminals */
  1168. X  #define TEK        /* Tektronix 4010, and probably others */
  1169. X  /* #define UNIXPC    /* unixpc (ATT 3b1 or ATT 7300) */
  1170. X***************
  1171. X*** 72,77 ****
  1172. X--- 79,86 ----
  1173. X  
  1174. X  #endif /* AMIGA_LC_5_1 */
  1175. X  
  1176. X+ #ifndef AMIGA_LC_5_1
  1177. X+ 
  1178. X  #define DXY800A        /* Roland DXY800A plotter */
  1179. X  
  1180. X  #define HP2648        /* HP2648, HP2647 */
  1181. X***************
  1182. X*** 79,87 ****
  1183. X  #define HP75        /* HP7580, and probably other HPs */
  1184. X  #define IMAGEN      /* Imagen laser printers (300dpi) (requires -Iterm also) */
  1185. X  
  1186. X- #define NEC        /* NEC CP6 pinwriter printer */
  1187. X  #define PRESCRIBE    /* Kyocera Laser printer */
  1188. X  #define QMS        /* QMS/QUIC laserprinter (Talaris 1200 and others) */
  1189. X  #define STARC        /* Star Color Printer */
  1190. X  #define TANDY60        /* Tandy DMP-130 series 60-dot per inch graphics */
  1191. X  #define V384        /* Vectrix 384 and tandy color printer */
  1192. X--- 88,102 ----
  1193. X  #define HP75        /* HP7580, and probably other HPs */
  1194. X  #define IMAGEN      /* Imagen laser printers (300dpi) (requires -Iterm also) */
  1195. X  
  1196. X  #define PRESCRIBE    /* Kyocera Laser printer */
  1197. X  #define QMS        /* QMS/QUIC laserprinter (Talaris 1200 and others) */
  1198. X+ 
  1199. X+ #else /* AMIGA_LC_5_1 */
  1200. X+ #define FIG           /* Fig graphics language */
  1201. X+ 
  1202. X+ #endif /* AMIGA_LC_5_1 */
  1203. X+ 
  1204. X+ #define NEC        /* NEC CP6 pinwriter printer */
  1205. X  #define STARC        /* Star Color Printer */
  1206. X  #define TANDY60        /* Tandy DMP-130 series 60-dot per inch graphics */
  1207. X  #define V384        /* Vectrix 384 and tandy color printer */
  1208. X***************
  1209. X*** 93,98 ****
  1210. X--- 108,114 ----
  1211. X  
  1212. X  #define HPGL        /* HP7475, HP7220 plotters, and (hopefully) lots of others */
  1213. X  
  1214. X+ #define PBM        /* PBMPLUS portable bitmap */
  1215. X  #define POSTSCRIPT    /* Postscript */
  1216. X  
  1217. X  /* #define DXF        /* DXF format for use with AutoCad (Release 10.x) */
  1218. END_OF_FILE
  1219.   if test 36642 -ne `wc -c <'patch.5'`; then
  1220.     echo shar: \"'patch.5'\" unpacked with wrong size!
  1221.   fi
  1222.   # end of 'patch.5'
  1223. fi
  1224. if test -f 'term/next.trm' -a "${1}" != "-c" ; then 
  1225.   echo shar: Will not clobber existing file \"'term/next.trm'\"
  1226. else
  1227.   echo shar: Extracting \"'term/next.trm'\" \(11343 characters\)
  1228.   sed "s/^X//" >'term/next.trm' <<'END_OF_FILE'
  1229. X/*
  1230. X * $Id$
  1231. X *
  1232. X * $Log$
  1233. X */
  1234. X
  1235. X/* GNUPLOT - next.trm */
  1236. X/*
  1237. X * Copyright (C) 1991, 1992   
  1238. X *
  1239. X * Permission to use, copy, and distribute this software and its
  1240. X * documentation for any purpose with or without fee is hereby granted, 
  1241. X * provided that the above copyright notice appear in all copies and 
  1242. X * that both that copyright notice and this permission notice appear 
  1243. X * in supporting documentation.
  1244. X *
  1245. X * Permission to modify the software is granted, but not the right to
  1246. X * distribute the modified code.  Modifications are to be distributed 
  1247. X * as patches to released version.
  1248. X *  
  1249. X * This software  is provided "as is" without express or implied warranty.
  1250. X * 
  1251. X * This file is included by ../term.c.
  1252. X *
  1253. X * This terminal driver supports:
  1254. X *     next
  1255. X *
  1256. X * AUTHORS
  1257. X *  Nick Strobel from Russell Lang's post.trm
  1258. X * 
  1259. X * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  1260. X *
  1261. X * The 'postscript' driver produces landscape output 10" wide and 7" high.  
  1262. X * To get a smaller epsf output use 'set size 0.5,0.5', 
  1263. X * 'set term postscript portrait', make only one plot per file
  1264. X * and change the first line of the postscript file from
  1265. X * '%!PS-Adobe-2.0' to '%!PS-Adobe-2.0 EPSF-2.0'
  1266. X * To change font to Times-Roman and font size to 20pts use 
  1267. X * 'set term postscript "Times-Roman" 20'.
  1268. X */
  1269. X
  1270. X
  1271. X/* NeXT driver by Nick Strobel, strobel@phast.phys.washington.edu */
  1272. X#import <math.h>
  1273. X#import <dpsclient/dpsclient.h>
  1274. X#import <dpsclient/dpsNeXT.h>
  1275. X#import <stdlib.h>
  1276. X#import "../EpsViewer.h"
  1277. X
  1278. XDPSContext d;
  1279. Xstatic void window_create(float width, float height);
  1280. Xfloat width,height;    
  1281. Xfloat xsize_orig,ysize_orig;  
  1282. X
  1283. Xchar next_font[MAX_ID_LEN+1] = "Courier" ; /* name of font */
  1284. Xint next_fontsize = 14;                     /* size of font in pts */
  1285. XBOOLEAN next_portrait = FALSE;                 /* vertical page */
  1286. XBOOLEAN next_color = FALSE;
  1287. XBOOLEAN init_called = FALSE;
  1288. XBOOLEAN initframe_called = FALSE;
  1289. X
  1290. Xint next_page=0;            /* page count */
  1291. Xint next_path_count=0;     /* count of lines in path */
  1292. Xint next_ang=0;            /* text angle */
  1293. Xenum JUSTIFY next_justify=LEFT;    /* text is flush left */
  1294. X
  1295. Xchar *NEXT_header[] = {
  1296. X"/vpt2 vpt 2 mul def\n",
  1297. X"/hpt2 hpt 2 mul def\n",
  1298. X/* flush left show */
  1299. X"/Lshow { currentpoint stroke moveto\n",
  1300. X"  0 vshift rmoveto show } def\n", 
  1301. X/* flush right show */
  1302. X"/Rshow { currentpoint stroke moveto\n",
  1303. X"  dup stringwidth pop neg vshift rmoveto show } def\n", 
  1304. X/* centred show */
  1305. X"/Cshow { currentpoint stroke moveto\n",
  1306. X"  dup stringwidth pop -2 div vshift rmoveto show } def\n", 
  1307. X/* Dash or Color Line */
  1308. X"/DL { Color {setrgbcolor [] 0 setdash pop}\n",
  1309. X" {pop pop pop 0 setdash} ifelse } def\n",
  1310. X/* Border Lines */
  1311. X"/BL { stroke gnulinewidth 2 mul setlinewidth } def\n",
  1312. X/* Axes Lines */
  1313. X"/AL { stroke gnulinewidth 2 div setlinewidth } def\n",
  1314. X/* Plot Lines */
  1315. X"/PL { stroke gnulinewidth setlinewidth } def\n",
  1316. X/* Line Types */
  1317. X"/LTb { BL [] 0 0 0 DL } def\n", /* border */
  1318. X"/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def\n", /* axes */
  1319. X"/LT0 { PL [] 0 1 0 DL } def\n",
  1320. X"/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def\n",
  1321. X"/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def\n",
  1322. X"/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n",
  1323. X"/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n",
  1324. X"/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n",
  1325. X"/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n",
  1326. X"/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n",
  1327. X"/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def\n",
  1328. X"/M {moveto} def\n",
  1329. X"/L {lineto} def\n",
  1330. X"/P { stroke [] 0 setdash\n", /* Point */
  1331. X"  currentlinewidth 2 div sub moveto\n",
  1332. X"  0 currentlinewidth rlineto  stroke } def\n",
  1333. X"/D { stroke [] 0 setdash  2 copy  vpt add moveto\n", /* Diamond */
  1334. X"  hpt neg vpt neg rlineto  hpt vpt neg rlineto\n",
  1335. X"  hpt vpt rlineto  hpt neg vpt rlineto  closepath  stroke\n",
  1336. X"  P  } def\n",
  1337. X"/A { stroke [] 0 setdash  vpt sub moveto  0 vpt2 rlineto\n", /* Plus (Add) */
  1338. X"  currentpoint stroke moveto\n",
  1339. X"  hpt neg vpt neg rmoveto  hpt2 0 rlineto stroke\n",
  1340. X"  } def\n",
  1341. X"/B { stroke [] 0 setdash  2 copy  exch hpt sub exch vpt add moveto\n", /* Box */
  1342. X"  0 vpt2 neg rlineto  hpt2 0 rlineto  0 vpt2 rlineto\n",
  1343. X"  hpt2 neg 0 rlineto  closepath  stroke\n",
  1344. X"  P  } def\n",
  1345. X"/C { stroke [] 0 setdash  exch hpt sub exch vpt add moveto\n", /* Cross */
  1346. X"  hpt2 vpt2 neg rlineto  currentpoint  stroke  moveto\n",
  1347. X"  hpt2 neg 0 rmoveto  hpt2 vpt2 rlineto stroke  } def\n",
  1348. X"/T { stroke [] 0 setdash  2 copy  vpt 1.12 mul add moveto\n", /* Triangle */
  1349. X"  hpt neg vpt -1.62 mul rlineto\n",
  1350. X"  hpt 2 mul 0 rlineto\n",
  1351. X"  hpt neg vpt 1.62 mul rlineto  closepath  stroke\n",
  1352. X"  P  } def\n",
  1353. X"/S { 2 copy A C} def\n", /* Star */
  1354. XNULL
  1355. X};
  1356. X
  1357. X#define NEXT_XOFF    50    /* page offset in pts */
  1358. X#define NEXT_YOFF    50
  1359. X
  1360. X#define NEXT_XMAX 7200
  1361. X#define NEXT_YMAX 5040
  1362. X
  1363. X#define NEXT_XLAST (NEXT_XMAX - 1)
  1364. X#define NEXT_YLAST (NEXT_YMAX - 1)
  1365. X
  1366. X#define NEXT_VTIC (NEXT_YMAX/80)
  1367. X#define NEXT_HTIC (NEXT_YMAX/80)
  1368. X
  1369. X#define NEXT_SC (10)                /* scale is 1pt = 10 units */
  1370. X#define    NEXT_LW (0.5*NEXT_SC)        /* linewidth = 0.5 pts */
  1371. X
  1372. X#define NEXT_VCHAR (14*NEXT_SC)        /* default is 14 point characters */
  1373. X#define NEXT_HCHAR (14*NEXT_SC*6/10)
  1374. X
  1375. XNEXT_options()
  1376. X{
  1377. X    extern struct value *const_express();
  1378. X    extern double real();
  1379. X
  1380. X    if (!END_OF_COMMAND) {
  1381. X        if (almost_equals(c_token,"p$ortrait")) {
  1382. X            next_portrait=TRUE;
  1383. X            c_token++;
  1384. X        }
  1385. X        else if (almost_equals(c_token,"l$andscape")) {
  1386. X            next_portrait=FALSE;
  1387. X            c_token++;
  1388. X        }
  1389. X        else if (almost_equals(c_token,"d$efault")) {
  1390. X            next_portrait=FALSE;
  1391. X            next_color=FALSE;
  1392. X            strcpy(next_font,"Courier");
  1393. X            next_fontsize = 14;
  1394. X            c_token++;
  1395. X        }
  1396. X    }
  1397. X
  1398. X    if (!END_OF_COMMAND) {
  1399. X        if (almost_equals(c_token,"m$onochrome")) {
  1400. X            next_color=FALSE;
  1401. X            c_token++;
  1402. X        }
  1403. X        else if (almost_equals(c_token,"c$olor")) {
  1404. X            next_color=TRUE;
  1405. X            c_token++;
  1406. X        }
  1407. X    }
  1408. X
  1409. X    if (!END_OF_COMMAND && isstring(c_token)) {
  1410. X        quote_str(next_font,c_token);
  1411. X        c_token++;
  1412. X    }
  1413. X
  1414. X    if (!END_OF_COMMAND) {
  1415. X        /* We have font size specified */
  1416. X        struct value a;
  1417. X        next_fontsize = (int)real(const_express(&a));
  1418. X        c_token++;
  1419. X        term_tbl[term].v_char = (unsigned int)(next_fontsize*NEXT_SC);
  1420. X        term_tbl[term].h_char = (unsigned int)(next_fontsize*NEXT_SC*6/10);
  1421. X    }
  1422. X
  1423. X    sprintf(term_options,"%s %s \"%s\" %d",
  1424. X        next_portrait ? "portrait" : "landscape",
  1425. X        next_color ? "color" : "monochrome",next_font,next_fontsize);
  1426. X}
  1427. X
  1428. X
  1429. XNEXT_init()
  1430. X{
  1431. Xstruct termentry *t = &term_tbl[term];
  1432. Xint i;
  1433. Xfloat llx,lly,urx,ury;
  1434. X/* I commented out the postscript comment fields because they are not really 
  1435. X*  needed (even the bounding box). However, if you'd like to send all the
  1436. X*  postscript to the context d, they're still there for you
  1437. X*/
  1438. X
  1439. X        llx=NEXT_XOFF;
  1440. X        lly=NEXT_YOFF;
  1441. X
  1442. X    if(!initframe_called) {
  1443. X        if(!next_portrait){
  1444. X            urx=(xsize*(NEXT_XMAX)/NEXT_SC+0.5+NEXT_XOFF);
  1445. X            ury=(ysize*(NEXT_YMAX)/NEXT_SC+0.5+NEXT_YOFF);
  1446. X        } else {
  1447. X            urx=(ysize*(NEXT_YMAX)/NEXT_SC+0.5+NEXT_XOFF);
  1448. X            ury=(xsize*(NEXT_XMAX)/NEXT_SC+0.5+NEXT_YOFF);
  1449. X        }
  1450. X          width=urx-llx;    
  1451. X          height=ury-lly;
  1452. X          xsize_orig=xsize;
  1453. X          ysize_orig=ysize;    
  1454. X          window_create(width,height);
  1455. X             d=DPSGetCurrentContext();
  1456. X       DPSPrintf(d,"/showpage {initgraphics} bind def\n");
  1457. X      }
  1458. X        DPSPrintf(d,"1 setgray\n");
  1459. X        DPSPrintf(d,"0 1 %g %g rectfill\n",rint(width),rint(height));
  1460. X        DPSPrintf(d,"0 setgray\n");
  1461. X        DPSPrintf(d,"0 1 %g %g rectstroke\n",rint(width),rint(height));
  1462. X//           DPSPrintf(d,"/_the_saved_vm_ save def\n");
  1463. X        DPSPrintf(d,"%g %g translate\n",-llx,-lly); /* KEEP this IN! */
  1464. X
  1465. X//        DPSPrintf(d,"%%!PS-ADOBE-2.0 EPSF-2.0\n");
  1466. X//        DPSPrintf(d,"%%%%Creator: gnuplot\n");
  1467. X//        DPSPrintf(d,"%%%%DocumentFonts: %s\n", next_font);
  1468. X//        DPSPrintf(d,"%%%%BoundingBox: %d %d ", NEXT_XOFF,NEXT_YOFF);
  1469. X//        if (!next_portrait)
  1470. X//            DPSPrintf(d,"%d %d\n",(int)width, (int)height);
  1471. X//        else 
  1472. X//            DPSPrintf(d,"%d %d\n",(int)width, (int)height);
  1473. X//        DPSPrintf(d,"%%%%Pages: (atend)\n");
  1474. X//        DPSPrintf(d,"%%%%EndComments\n");
  1475. X        DPSPrintf(d,"/gnudict 40 dict def\ngnudict begin\n");
  1476. X        DPSPrintf(d,"/Color %s def\n",next_color ? "true" : "false");
  1477. X        DPSPrintf(d,"/gnulinewidth %.3f def\n",NEXT_LW);
  1478. X        DPSPrintf(d,"/vshift %d def\n", (int)(t->v_char)/(-3));
  1479. X        DPSPrintf(d,"/dl {%d mul} def\n",NEXT_SC); /* dash length */
  1480. X        DPSPrintf(d,"/hpt %.1f def\n",NEXT_HTIC/2.0);
  1481. X        DPSPrintf(d,"/vpt %.1f def\n",NEXT_VTIC/2.0);
  1482. X        for ( i=0; NEXT_header[i] != NULL; i++)
  1483. X            DPSPrintf(d,"%s",NEXT_header[i]);
  1484. X        DPSPrintf(d,"end\n");
  1485. X//        DPSPrintf(d,"%%%%EndProlog\n");
  1486. X        init_called=TRUE;
  1487. X}
  1488. X
  1489. Xstatic void window_create(float width, float height)
  1490. X{
  1491. X    initframe_called=TRUE;
  1492. X    
  1493. X    NXApp=[EpsViewer new];
  1494. X    [NXApp windowCreate:width Height:height];
  1495. X}
  1496. X
  1497. XNEXT_graphics()
  1498. X{
  1499. Xstruct termentry *t = &term_tbl[term];
  1500. X    next_page++;
  1501. X    if(!init_called)
  1502. X        NEXT_init();    /* set up the frame properly */
  1503. X    init_called=FALSE;
  1504. X//    DPSPrintf(d,"%%%%Page: %d %d\n",next_page,next_page);
  1505. X    DPSPrintf(d,"gnudict begin\n");
  1506. X    DPSPrintf(d,"gsave\n");
  1507. X    DPSPrintf(d,"%d %d translate\n",NEXT_XOFF,NEXT_YOFF);
  1508. X    if (!next_portrait) {
  1509. X/* keep plot entirely in the window */
  1510. X        if(xsize>xsize_orig)
  1511. X            xsize=xsize_orig;
  1512. X        if(ysize>ysize_orig)
  1513. X            ysize=ysize_orig;
  1514. X        DPSPrintf(d,"%.3f %.3f scale\n", xsize/NEXT_SC, ysize/NEXT_SC);
  1515. X    }
  1516. X    else {
  1517. X        if(xsize>xsize_orig)
  1518. X            xsize=xsize_orig;
  1519. X        if(ysize>ysize_orig)
  1520. X            ysize=ysize_orig;
  1521. X        DPSPrintf(d,"%.3f %.3f scale\n", ysize/NEXT_SC, xsize/NEXT_SC);
  1522. X        DPSPrintf(d,"90 rotate\n0 %d translate\n", -NEXT_YMAX);
  1523. X    }
  1524. X    DPSPrintf(d,"0 setgray\n");
  1525. X    DPSPrintf(d,"/%s findfont %d ", next_font, (t->v_char) );
  1526. X    DPSPrintf(d,"scalefont setfont\n");
  1527. X    DPSPrintf(d,"newpath\n");
  1528. X    next_path_count = 0;    
  1529. X}
  1530. X
  1531. X
  1532. XNEXT_text()
  1533. X{
  1534. X    next_path_count = 0;
  1535. X    DPSPrintf(d,"stroke\ngrestore\nend\nshowpage\n");
  1536. X//    DPSPrintf(d,"\ngrestoreall _the_saved_vm_ restore\n");
  1537. X        
  1538. X    DPSFlushContext(d);
  1539. X    
  1540. X    
  1541. X}
  1542. X
  1543. X
  1544. XNEXT_reset()
  1545. X{    
  1546. X    DPSPrintf(d,"currentwindow termwindow\n");
  1547. X    DPSPrintf(d,"nulldevice\n");
  1548. X
  1549. X    DPSFlushContext(d);
  1550. X    initframe_called=FALSE;
  1551. X}
  1552. X
  1553. X
  1554. XNEXT_linetype(linetype)
  1555. Xint linetype;
  1556. X{
  1557. Xchar *line = "ba012345678"; 
  1558. X    DPSPrintf(d,"LT%c\n", line[(linetype%9)+2]);
  1559. X    next_path_count = 0;
  1560. X}
  1561. X
  1562. X
  1563. XNEXT_move(x,y)
  1564. Xunsigned int x,y;
  1565. X{
  1566. X    DPSPrintf(d,"%d %d M\n", x, y);
  1567. X    next_path_count += 1;
  1568. X}
  1569. X
  1570. X
  1571. XNEXT_vector(x,y)
  1572. Xunsigned int x,y;
  1573. X{
  1574. X    DPSPrintf(d,"%d %d L\n", x, y);
  1575. X    next_path_count += 1;
  1576. X    if (next_path_count >= 400) {
  1577. X        DPSPrintf(d,"currentpoint stroke moveto\n");
  1578. X        next_path_count = 0;
  1579. X    }
  1580. X}
  1581. X
  1582. X
  1583. XNEXT_put_text(x,y,str)
  1584. Xunsigned int x, y;
  1585. Xchar *str;
  1586. X{
  1587. Xchar ch;
  1588. X    NEXT_move(x,y);
  1589. X    if (next_ang != 0)
  1590. X        DPSPrintf(d,"currentpoint gsave translate %d rotate 0 0 moveto\n"
  1591. X            ,next_ang*90);
  1592. X/*    NXPutc(psStream,'(');            */
  1593. X    DPSPrintf(d,"%c",'(');
  1594. X    ch = *str++;
  1595. X    while(ch!='\0') {
  1596. X        if ( (ch=='(') || (ch==')') || (ch=='\\') )
  1597. X/*            NXPutc(psStream,'\\');
  1598. X        NXPutc(psStream,ch);            */
  1599. X            DPSPrintf(d,"%c",'\\');
  1600. X        DPSPrintf(d,"%c",ch);
  1601. X        ch = *str++;
  1602. X    }
  1603. X    switch(next_justify) {
  1604. X        case LEFT : DPSPrintf(d,") Lshow\n");
  1605. X            break;
  1606. X        case CENTRE : DPSPrintf(d,") Cshow\n");
  1607. X            break;
  1608. X        case RIGHT : DPSPrintf(d,") Rshow\n");
  1609. X            break;
  1610. X    }
  1611. X    if (next_ang != 0)
  1612. X        DPSPrintf(d,"grestore\n");
  1613. X    next_path_count = 0;
  1614. X}
  1615. X
  1616. Xint NEXT_text_angle(ang)
  1617. Xint ang;
  1618. X{
  1619. X    next_ang=ang;
  1620. X    return TRUE;
  1621. X}
  1622. X
  1623. Xint NEXT_justify_text(mode)
  1624. Xenum JUSTIFY mode;
  1625. X{
  1626. X    next_justify=mode;
  1627. X    return TRUE;
  1628. X}
  1629. X
  1630. X/* postscript point routines */
  1631. XNEXT_point(x,y,number)
  1632. Xint x,y;
  1633. Xint number;
  1634. X{
  1635. Xchar *point = "PDABCTS";
  1636. X    number %= POINT_TYPES;
  1637. X     if (number < -1)
  1638. X        number = -1;        /* negative types are all 'dot' */
  1639. X    DPSPrintf(d,"%d %d %c\n", x, y, point[number+1]);
  1640. X    next_path_count = 0;
  1641. X}
  1642. X
  1643. END_OF_FILE
  1644.   if test 11343 -ne `wc -c <'term/next.trm'`; then
  1645.     echo shar: \"'term/next.trm'\" unpacked with wrong size!
  1646.   fi
  1647.   # end of 'term/next.trm'
  1648. fi
  1649. echo shar: End of archive 4 \(of 7\).
  1650. cp /dev/null ark4isdone
  1651. MISSING=""
  1652. for I in 1 2 3 4 5 6 7 ; do
  1653.     if test ! -f ark${I}isdone ; then
  1654.     MISSING="${MISSING} ${I}"
  1655.     fi
  1656. done
  1657. if test "${MISSING}" = "" ; then
  1658.     echo You have unpacked all 7 archives.
  1659.     rm -f ark[1-9]isdone
  1660. else
  1661.     echo You still must unpack the following archives:
  1662.     echo "        " ${MISSING}
  1663. fi
  1664. exit 0
  1665.  
  1666. exit 0 # Just in case...
  1667.