home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume40 / gnuplot / part31 < prev    next >
Encoding:
Text File  |  1993-10-29  |  80.0 KB  |  2,925 lines

  1. Newsgroups: comp.sources.misc
  2. From: woo@playfair.stanford.edu ("Alexander Woo")
  3. Subject: v40i043:  gnuplot - interactive function plotting utility, Part31/33
  4. Message-ID: <1993Oct25.030525.2908@sparky.sterling.com>
  5. X-Md4-Signature: 080660d6389446e2d277c4b998172999
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Mon, 25 Oct 1993 03:05:25 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
  12. Posting-number: Volume 40, Issue 43
  13. Archive-name: gnuplot/part31
  14. Environment: UNIX, MS-DOS, VMS
  15. Supersedes: gnuplot3: Volume 24, Issue 23-48
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  gnuplot/README.3p2 gnuplot/README.iso gnuplot/README.x11
  22. #   gnuplot/bitmap.h gnuplot/corplot.c gnuplot/demo/all.dem
  23. #   gnuplot/demo/spline.dem gnuplot/docs/makefile.ami
  24. #   gnuplot/docs/titlepag.tex gnuplot/epsviewe.m gnuplot/makefile.amg
  25. #   gnuplot/makefile.ami gnuplot/makefile.djg gnuplot/makefile.g
  26. #   gnuplot/makefile.os2 gnuplot/makefile.ztc gnuplot/term/compact.c
  27. #   gnuplot/term/debug.trm gnuplot/term/djsvga.trm
  28. #   gnuplot/term/kyo.trm gnuplot/term/mgr.trm gnuplot/term/v384.trm
  29. #   gnuplot/win/geticon.c gnuplot/win/wgnuplib.c gnuplot/win/wtext.h
  30. # Wrapped by kent@sparky on Wed Oct 20 17:15:08 1993
  31. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  32. echo If this archive is complete, you will see the following message:
  33. echo '          "shar: End of archive 31 (of 33)."'
  34. if test -f 'gnuplot/README.3p2' -a "${1}" != "-c" ; then 
  35.   echo shar: Will not clobber existing file \"'gnuplot/README.3p2'\"
  36. else
  37.   echo shar: Extracting \"'gnuplot/README.3p2'\" \(2838 characters\)
  38.   sed "s/^X//" >'gnuplot/README.3p2' <<'END_OF_FILE'
  39. XThis is the official release of GNUPLOT.3.2.  It is available in either
  40. Xa patch or tar archive.  Sites for the retrieval are listed in the
  41. XREADME.   Below are the modifications and contributors to this release.
  42. XThe patch file 3_1to3_2.patch needs to be applied with the p1 flag
  43. X
  44. X>cd gnuplot
  45. X>patch -p1 < 3_1to3_2.patch
  46. X
  47. XThanks  ---  Alex Woo
  48. X
  49. X* Subject: New generic gnuplot_x11.c
  50. X  Name: Ed Kubaitis
  51. X  Email: ejk@ux2.ncsa.uiuc.edu
  52. X
  53. X* Subject: Hidden Line Removal for Explicit Surfaces and IRIX 4.0 fixes.
  54. X  Name: Gershon Elber
  55. X  Email: gershon@gr.utah.edu
  56. X
  57. X* Subject: Table Terminal Driver.
  58. X  Name: Kevin Russo
  59. X  Email: russo@rudedog.nrl.navy.mil
  60. X
  61. X* Subject: PCL5 driver fixes (HPGL page eject),datafile pipe and README.
  62. X  Name: Alex Woo
  63. X  Email: woo@ames.arc.nasa.gov
  64. X
  65. X* Subject: Pbmplus driver and fix to y log tics.
  66. X  Name: Russell Lang
  67. X  Email: rjl@monu1.cc.monash.edu.au
  68. X
  69. X* Subject: NeXT Console Driver.
  70. X  Name: Nick Strobel
  71. X  Email: strobel@phast.phys.washington.edu
  72. X
  73. X* Subject: Fix GNUTERM environment with disk resident BGI drivers
  74. X  Name: Craig Johnston
  75. X  Email: johnston@maxwell.ee.washington.edu
  76. X
  77. X* Subject: Fix tables for troff in doc2ms
  78. X  Name: Michael Schuh
  79. X  Email: schuh@ames.arc.nasa.gov
  80. X
  81. X* Subject: Fix dump when GNUPLOT$HELP undefined
  82. X  Name: Wolfgang J. Moeller
  83. X  Email: moeller@gwdgv1.dnet.gwdg.de
  84. X
  85. X* Subject: Fix AMIGA segment limits
  86. X  Name: Carsten Steger
  87. X  Email: stegerc@informatik.tu-muenchen.de
  88. X
  89. X* Subject: Put FAR pointers in bitmap.c and bitmap.h
  90. X  Name: Russell Lang
  91. X  Email: rjl@monu1.cc.monash.edu.au
  92. X
  93. X* Subject: Bug fix to latex.trm
  94. X  Name: Rob Cunningham
  95. X  Email: rkc@xn.ll.mit.edu
  96. X----------------------------------------------------------------------------
  97. X
  98. X                   GNUPLOT 3.1 Patch
  99. X
  100. XThis package provides the upgrade of gnuplot 3.0 to patch level 1.
  101. XBelow are the contributers to this upgrade and the modifications made.
  102. X
  103. XThank you all
  104. X
  105. XGershon
  106. X
  107. X----------------------------------------------------------------------------
  108. X
  109. X* Subject: Y log / postscript eps fix
  110. X  Name: Russell Lang
  111. X  Email: rjl@monu1.cc.monash.edu.au
  112. X
  113. X* Subject: HP26 driver to lift text.
  114. X  Name: Bruce Lueckenhoff
  115. X  Email: luechen@cis.udel.edu
  116. X
  117. X* Subject: CRAY prt, UIUC coordinates.
  118. X  Name: Daniel S. Lewart
  119. X  Email: d-lewart@uiuc.edu
  120. X
  121. X* Subject: AI device
  122. X  Name: Ray Ghanbari
  123. X  Email: ray@mtl.mit.edu
  124. X
  125. X* Subject: HP_MOTIF on a Snake, X11 for Next
  126. X  Name: Alex Woo
  127. X  Email: woo@ra-next.arc.nasa.gov
  128. X
  129. X* Subject: Mod. to LaTeX for multiple curves/plots, complex atan function fix.
  130. X  Name: Ray Toy???
  131. X  Email: toy@soho.crd.ge.com
  132. X
  133. X* Subject: Fix the "splot 'file.dat'" with only z values.
  134. X  Name: Gershon Elber
  135. X  Email: gershon@gr.utah.edu
  136. X
  137. X* Subject: Underscore prefixed names.
  138. X  Name: Tom Tkacik
  139. X  Email: tkacik@hobbes.cs.gmr.com
  140. X
  141. X* Subject: Amiga port
  142. X  Name: Carsten Steger
  143. X  Email: stegerc@informatik.tu-muenchen.de
  144. END_OF_FILE
  145.   if test 2838 -ne `wc -c <'gnuplot/README.3p2'`; then
  146.     echo shar: \"'gnuplot/README.3p2'\" unpacked with wrong size!
  147.   fi
  148.   # end of 'gnuplot/README.3p2'
  149. fi
  150. if test -f 'gnuplot/README.iso' -a "${1}" != "-c" ; then 
  151.   echo shar: Will not clobber existing file \"'gnuplot/README.iso'\"
  152. else
  153.   echo shar: Extracting \"'gnuplot/README.iso'\" \(2751 characters\)
  154.   sed "s/^X//" >'gnuplot/README.iso' <<'END_OF_FILE'
  155. X
  156. XYou can say "set isosamples 30,40" now to get different isosampling
  157. Xrates for the first and second dummy variables (x,u resp. y,v). This
  158. Xwill affect surface-plots in hidden3d- and nohidden3d-mode. It gets
  159. Xrid of the necessity of having to change samples in hidden3d-mode when
  160. Xyou actually want to change the isosamples for the first dummy
  161. Xvariable. For people that are lazy and for compatibility you can also
  162. Xtype "set isosamples 30". This will set the value to 30 in both
  163. Xdirections. For completeness I did the same with "samples". Thus you
  164. Xcan say "set samples 50,100" to get different sampling rates for each
  165. Xdummy variable. This only affects surface-plots in nohidden3d-mode.
  166. XAgain, you still can say "set samples 50". This will set both sampling
  167. Xrates to 50. For 2d-plots the first value of samples is used.
  168. X
  169. XSummary:
  170. X
  171. XSuppose isosamples is set to 4,5 in hidden3d-mode. The grid evaluated
  172. Xfor hidden3d-plots will look like this (* denotes points that get
  173. Xevaluated):
  174. X
  175. X      |------ isosamples #1 -----|
  176. X
  177. X  -   *--------*--------*--------*
  178. X  |   |        |        |        |
  179. X      |        |        |        |
  180. X  i   |        |        |        |
  181. X  s   *--------*--------*--------*
  182. X  o   |        |        |        |
  183. X  s   |        |        |        |
  184. X  a   |        |        |        |
  185. X  m   *--------*--------*--------*
  186. X  p   |        |        |        |
  187. X  .   |        |        |        |
  188. X      |        |        |        |
  189. X  #   *--------*--------*--------*
  190. X  2   |        |        |        |
  191. X      |        |        |        |
  192. X  |   |        |        |        |
  193. X  -   *--------*--------*--------*
  194. X
  195. XSuppose isosamples is set to 4,5 and samples to 10, 9 in
  196. Xnohidden3d-mode. The grid evaluated for hidden3d-plots will look like
  197. Xthis:
  198. X
  199. X      |------ isosamples #1 -----|
  200. X
  201. X  -   *--*--*--*--*--*--*--*--*--*   -
  202. X  |   |        |        |        |   |
  203. X      *        *        *        *   |
  204. X  i   |        |        |        |    
  205. X  s   *--*--*--*--*--*--*--*--*--*   s
  206. X  o   |        |        |        |   a
  207. X  s   *        *        *        *   m
  208. X  a   |        |        |        |   p
  209. X  m   *--*--*--*--*--*--*--*--*--*   l
  210. X  p   |        |        |        |   e
  211. X  .   *        *        *        *   s
  212. X      |        |        |        |    
  213. X  #   *--*--*--*--*--*--*--*--*--*   #
  214. X  2   |        |        |        |   2
  215. X      *        *        *        *    
  216. X  |   |        |        |        |   |
  217. X  -   *--*--*--*--*--*--*--*--*--*   -
  218. X
  219. X      |------- samples #1 -------|
  220. X
  221. X
  222. XBTW: The examples above also show how the bottom grids will look like
  223. Xboth in noparametric- and in parametric-mode. Thus you can get a rough
  224. Xidea of how the mapping from (u,v)-space to (x,y,z)-space works by
  225. Xdrawing a bottom grid in parametric-mode.
  226. X
  227. XBest regards,
  228. X
  229. XCarsten
  230. END_OF_FILE
  231.   if test 2751 -ne `wc -c <'gnuplot/README.iso'`; then
  232.     echo shar: \"'gnuplot/README.iso'\" unpacked with wrong size!
  233.   fi
  234.   # end of 'gnuplot/README.iso'
  235. fi
  236. if test -f 'gnuplot/README.x11' -a "${1}" != "-c" ; then 
  237.   echo shar: Will not clobber existing file \"'gnuplot/README.x11'\"
  238. else
  239.   echo shar: Extracting \"'gnuplot/README.x11'\" \(2541 characters\)
  240.   sed "s/^X//" >'gnuplot/README.x11' <<'END_OF_FILE'
  241. XX11 changes for gnuplot 3.3
  242. X---------------------------
  243. X
  244. XEnhancements
  245. X------------
  246. X
  247. X   o VMS X11 support (Jehavi Bourvine)
  248. X
  249. X   o New X11 rendering for 'points' plotting style improves point
  250. X     quality and eliminates the 'X11' terminal type whose only
  251. X     function was to request multi-colored points. (Russell Lang)
  252. X
  253. X   o tailorable linewidths, dash styles, and point sizes (see
  254. X     the man page)
  255. X
  256. X   o Color handling:
  257. X
  258. X       - "colorname,intensity" where 0 < intensity < 1
  259. X         For example, 'blue,.5' means a half intensity blue
  260. X
  261. X       - hexadecimal RGB colors accepted (needed for HP VUE)
  262. X
  263. X       - Failure to parse/allocate a color defaults to black
  264. X         for that color rather than monochrome for whole plot
  265. X
  266. X   o 'set term x11' assumed if '-display' option on command line.
  267. X
  268. XBug Fixes
  269. X---------
  270. X
  271. X   o On monochrome servers, any lines plotted before the first label
  272. X     was printed were lost. This lost zero axes and garbled some
  273. X     other plots. (Kenneth H. Carpenter)
  274. X
  275. X   o User specified geometry position ignored with some window managers.
  276. X     Negative positions miscalculated. (Mike Coleman)
  277. X
  278. X
  279. XVendor Botch Circumventions
  280. X---------------------------
  281. X
  282. X   o New X11FLAGS options:
  283. X
  284. X      - OW_BOTCH circumvents "ld.so: Undefined symbol: __XtInherit"
  285. X        loader errors on Sun Open Windows platforms. (Vivek Khera)
  286. X
  287. X      - ISC22 circumvents select() problem with ISC2.2 (Robert Eckardt)
  288. X
  289. X      - BSD_TYPES pulls select FD_SET definitions from <sys/bsdtypes.h>
  290. X        (Michael Herrmann)
  291. X
  292. X      - ULTRIX_KLUDGE expanded to circumvent missing demo plots at
  293. X        Ultrix 4.1 (chan@holo.iitsg.nrc.ca)
  294. X
  295. X   o Random window geometry with Esix X11R3 (Al Bolduc)
  296. X
  297. X
  298. XMiscellaneous
  299. X-------------
  300. X
  301. X   o The man page has been updated to document that background and
  302. X     foreground are not honored for monochrome displays, only -rv
  303. X     and 'gnuplot*reverseVideo:on'.
  304. X
  305. X   o '-tvtwm' command line option and gnuplot*tvtwm resource
  306. X
  307. X     Mike Coleman's fix for user-specified geometry position for
  308. X     other window managers causes tvtwm to use absolute rather
  309. X     then virtual-relative coordinates when the user specifies
  310. X     geometry. This command line option and resource tells
  311. X     gnuplot_x11 to use PPosition (virtual-relative) when a
  312. X     geometry position is requested.
  313. X
  314. X     Unfortunately, negative y positions are off by the size of the
  315. X     window manager title bar. Thus, for example, -0-20 rather than
  316. X     -0-0 is needed to place the lower right corner of the window
  317. X     at the lower right corner of the screen.
  318. X
  319. END_OF_FILE
  320.   if test 2541 -ne `wc -c <'gnuplot/README.x11'`; then
  321.     echo shar: \"'gnuplot/README.x11'\" unpacked with wrong size!
  322.   fi
  323.   # end of 'gnuplot/README.x11'
  324. fi
  325. if test -f 'gnuplot/bitmap.h' -a "${1}" != "-c" ; then 
  326.   echo shar: Will not clobber existing file \"'gnuplot/bitmap.h'\"
  327. else
  328.   echo shar: Extracting \"'gnuplot/bitmap.h'\" \(2820 characters\)
  329.   sed "s/^X//" >'gnuplot/bitmap.h' <<'END_OF_FILE'
  330. X/*
  331. X * $Id: bitmap.h%v 3.50 1993/07/09 05:35:24 woo Exp $
  332. X *
  333. X */
  334. X
  335. X/* bitmap.h */
  336. X
  337. X/* allow up to 16 bit width for character array */
  338. Xtypedef unsigned int char_row;
  339. Xtypedef char_row GPFAR * GPFAR char_box;
  340. X
  341. X#define FNT_CHARS   96      /* Number of characters in the font set */
  342. X
  343. X#define FNT5X9 0
  344. X#define FNT5X9_VCHAR 11 /* vertical spacing between characters */
  345. X#define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
  346. X#define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
  347. X#define FNT5X9_HBITS 5 /* actual number of bits per row per char */
  348. Xextern char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS];
  349. X
  350. X#define FNT9X17 1
  351. X#define FNT9X17_VCHAR 21 /* vertical spacing between characters */
  352. X#define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
  353. X#define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
  354. X#define FNT9X17_HBITS 9 /* actual number of bits per row per char */
  355. Xextern char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS];
  356. X
  357. X#define FNT13X25 2
  358. X#define FNT13X25_VCHAR 31 /* vertical spacing between characters */
  359. X#define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
  360. X#define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
  361. X#define FNT13X25_HBITS 13 /* actual number of bits per row per char */
  362. Xextern char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS];
  363. X
  364. X
  365. Xtypedef unsigned char pixels;  /* the type of one set of 8 pixels in bitmap */
  366. Xtypedef pixels *bitmap[];  /* the bitmap */
  367. X
  368. Xextern bitmap *b_p;                        /* global pointer to bitmap */
  369. Xextern unsigned int b_currx, b_curry;    /* the current coordinates */
  370. Xextern unsigned int b_xsize, b_ysize;    /* the size of the bitmap */
  371. Xextern unsigned int b_planes;            /* number of color planes */
  372. Xextern unsigned int b_psize;            /* size of each plane */
  373. Xextern unsigned int b_rastermode;        /* raster mode rotates -90deg */
  374. Xextern unsigned int b_linemask;            /* 16 bit mask for dotted lines */
  375. Xextern unsigned int b_value;            /* colour of lines */
  376. Xextern unsigned int b_hchar;            /* width of characters */
  377. Xextern unsigned int b_hbits;            /* actual bits in char horizontally */
  378. Xextern unsigned int b_vchar;            /* height of characters */
  379. Xextern unsigned int b_vbits;            /* actual bits in char vertically */
  380. Xextern unsigned int b_angle;            /* rotation of text */
  381. Xextern char_box b_font[FNT_CHARS];        /* the current font */
  382. Xextern unsigned int b_pattern[];
  383. Xextern int b_maskcount;
  384. Xextern unsigned int b_lastx, b_lasty;    /* last pixel set - used by b_line */
  385. X
  386. X
  387. Xextern void b_makebitmap();
  388. Xextern void b_freebitmap();
  389. Xextern void b_setpixel();
  390. Xextern unsigned int b_getpixel();
  391. Xextern void b_line();
  392. Xextern void b_setmaskpixel();
  393. Xextern void b_putc();
  394. Xextern void b_charsize();
  395. Xextern void b_setvalue();
  396. X
  397. Xextern int b_setlinetype();
  398. Xextern int b_move();
  399. Xextern int b_vector();
  400. Xextern int b_put_text();
  401. Xextern int b_text_angle();
  402. END_OF_FILE
  403.   if test 2820 -ne `wc -c <'gnuplot/bitmap.h'`; then
  404.     echo shar: \"'gnuplot/bitmap.h'\" unpacked with wrong size!
  405.   fi
  406.   # end of 'gnuplot/bitmap.h'
  407. fi
  408. if test -f 'gnuplot/corplot.c' -a "${1}" != "-c" ; then 
  409.   echo shar: Will not clobber existing file \"'gnuplot/corplot.c'\"
  410. else
  411.   echo shar: Extracting \"'gnuplot/corplot.c'\" \(2721 characters\)
  412.   sed "s/^X//" >'gnuplot/corplot.c' <<'END_OF_FILE'
  413. X#ifndef lint
  414. Xstatic char *RCSid = "$Id: corplot.c,v 3.37 1992/05/28 03:31:19 woo Exp $";
  415. X#endif
  416. X
  417. X
  418. X/* GNUPLOT - corplot.c */
  419. X/*
  420. X * Copyright (C) 1986 - 1993   Thomas Williams, Colin Kelley
  421. X *
  422. X * Permission to use, copy, and distribute this software and its
  423. X * documentation for any purpose with or without fee is hereby granted, 
  424. X * provided that the above copyright notice appear in all copies and 
  425. X * that both that copyright notice and this permission notice appear 
  426. X * in supporting documentation.
  427. X *
  428. X * Permission to modify the software is granted, but not the right to
  429. X * distribute the modified code.  Modifications are to be distributed 
  430. X * as patches to released version.
  431. X *  
  432. X * This software is provided "as is" without express or implied warranty.
  433. X * 
  434. X *
  435. X * AUTHORS
  436. X * 
  437. X *   Original Software:
  438. X *     Thomas Williams,  Colin Kelley.
  439. X * 
  440. X *   Gnuplot 2.0 additions:
  441. X *       Russell Lang, Dave Kotz, John Campbell.
  442. X *
  443. X *   Gnuplot 3.0 additions:
  444. X *       Gershon Elber and many others.
  445. X * 
  446. X * There is a mailing list for gnuplot users. Note, however, that the
  447. X * newsgroup 
  448. X *    comp.graphics.gnuplot 
  449. X * is identical to the mailing list (they
  450. X * both carry the same set of messages). We prefer that you read the
  451. X * messages through that newsgroup, to subscribing to the mailing list.
  452. X * (If you can read that newsgroup, and are already on the mailing list,
  453. X * please send a message info-gnuplot-request@dartmouth.edu, asking to be
  454. X * removed from the mailing list.)
  455. X *
  456. X * The address for mailing to list members is
  457. X *       info-gnuplot@dartmouth.edu
  458. X * and for mailing administrative requests is 
  459. X *       info-gnuplot-request@dartmouth.edu
  460. X * The mailing list for bug reports is 
  461. X *       bug-gnuplot@dartmouth.edu
  462. X * The list of those interested in beta-test versions is
  463. X *       info-gnuplot-beta@dartmouth.edu
  464. X */
  465. X#include <stdio.h>
  466. X#include <process.h>
  467. X#include <dos.h>
  468. X#if defined(ATARI) && defined(__PUREC__)
  469. X#include <plot.h>
  470. X#endif
  471. X
  472. X#define BOUNDARY 32768
  473. X#define segment(addr) (FP_SEG(m) + ((FP_OFF(m)+15) >> 4));
  474. X#define round(value,boundary) (((value) + (boundary) - 1) & ~((boundary) - 1))
  475. X
  476. Xchar *malloc(),*realloc();
  477. X
  478. Xchar prog[] = "gnuplot";
  479. Xchar corscreen[] = "CORSCREEN=0";
  480. X
  481. Xmain()
  482. X{
  483. Xregister unsigned int segm,start;
  484. Xchar *m;
  485. X    if (!(m = malloc(BOUNDARY))) {
  486. X        printf("malloc() failed\n");
  487. X        exit(1);
  488. X    }
  489. X    segm = segment(m);
  490. X    start = round(segm,BOUNDARY/16);
  491. X
  492. X    if (realloc(m,BOUNDARY+(start-segm)*16) != m) {
  493. X        printf("can't realloc() memory\n");
  494. X        exit(2);
  495. X    }
  496. X
  497. X    if ((segm = start >> 11) >= 8) {
  498. X        printf("not enough room in first 256K\n");
  499. X        exit(3);
  500. X    }
  501. X
  502. X    corscreen[sizeof(corscreen)-2] = '0' + segm;
  503. X    if (putenv(corscreen))
  504. X        perror("putenv");
  505. X
  506. X    if (spawnlp(P_WAIT,prog,prog,NULL))
  507. X        perror("spawnlp");
  508. X}
  509. END_OF_FILE
  510.   if test 2721 -ne `wc -c <'gnuplot/corplot.c'`; then
  511.     echo shar: \"'gnuplot/corplot.c'\" unpacked with wrong size!
  512.   fi
  513.   # end of 'gnuplot/corplot.c'
  514. fi
  515. if test -f 'gnuplot/demo/all.dem' -a "${1}" != "-c" ; then 
  516.   echo shar: Will not clobber existing file \"'gnuplot/demo/all.dem'\"
  517. else
  518.   echo shar: Extracting \"'gnuplot/demo/all.dem'\" \(2597 characters\)
  519.   sed "s/^X//" >'gnuplot/demo/all.dem' <<'END_OF_FILE'
  520. X#
  521. X# $Id: all.dem%v 3.38.2.80 1993/02/20 18:34:10 woo Exp woo $
  522. X#
  523. X# Executes ALL demos in this directory, in functionality order.
  524. X#
  525. X
  526. Xpause 0 "******************** file simple.dem ********************"
  527. Xload "simple.dem"
  528. X
  529. Xpause 0 "******************** file controls.dem ********************"
  530. Xload "controls.dem"
  531. X
  532. Xpause 0 "******************** file electron.dem ********************"
  533. Xload "electron.dem"
  534. X
  535. Xpause 0 "******************** file using.dem ********************"
  536. Xload "using.dem"
  537. X
  538. Xpause 0 "******************** file errorbar.dem ********************"
  539. Xload "errorbar.dem"
  540. X
  541. Xpause 0 "******************** file param.dem ********************"
  542. Xload "param.dem"
  543. X
  544. X#save settings
  545. Xsave set 'temp.set'
  546. Xpause -1 "settings saved to temp.set, hit return"
  547. X
  548. Xpause 0 "******************** file polar.dem ********************"
  549. Xload "polar.dem"
  550. X
  551. Xpause 0 "******************** file poldat.dem ********************"
  552. Xload "poldat.dem"
  553. X
  554. X#bring back save settings
  555. Xload 'temp.set'
  556. Xpause -1 "saved setting restored, hit return"
  557. X
  558. Xpause 0 "******************** file surface1.dem ********************"
  559. Xload "surface1.dem"
  560. X
  561. Xpause 0 "******************** file surface2.dem ********************"
  562. Xload "surface2.dem"
  563. X
  564. Xpause 0 "******************** file contours.dem ********************"
  565. Xload "contours.dem"
  566. X
  567. Xpause 0 "******************** file discrete.dem ********************"
  568. Xload "discrete.dem"
  569. X
  570. Xpause 0 "******************** file hidden.dem ********************"
  571. Xload "hidden.dem"
  572. X
  573. Xpause 0 "******************** file world.dem ********************"
  574. Xload "world.dem"
  575. X
  576. Xpause 0 "******************** file prob.dem ********************"
  577. Xload "prob.dem"
  578. X
  579. Xpause 0 "******************** file prob2.dem ********************"
  580. Xload "prob2.dem"
  581. X
  582. Xpause 0 "******************** file random.dem ********************"
  583. Xload "random.dem"
  584. X
  585. Xpause 0 "******************** file spline.dem ********************"
  586. Xload "spline.dem"
  587. X
  588. Xpause 0 "******************** file binary.dem ********************"
  589. Xload "binary.dem"
  590. X
  591. Xpause 0 "******************** file steps.dem ********************"
  592. Xload "steps.dem"
  593. X
  594. Xpause 0 "******************** file scatter.dem ********************"
  595. Xload "scatter.dem"
  596. X
  597. Xpause 0 "******************** file singulr.dem ********************"
  598. Xload "singulr.dem"
  599. X
  600. Xpause 0 "******************** file airfoil.dem ********************"
  601. Xload "airfoil.dem"
  602. X
  603. Xpause 0 "******************** file multimsh.dem ********************"
  604. Xload "multimsh.dem"
  605. X
  606. Xpause 0 "******************** file bivariat.dem ********************"
  607. Xload "bivariat.dem"
  608. X
  609. Xpause 0 "******************** file animate.dem ********************"
  610. Xload "animate.dem"
  611. X
  612. END_OF_FILE
  613.   if test 2597 -ne `wc -c <'gnuplot/demo/all.dem'`; then
  614.     echo shar: \"'gnuplot/demo/all.dem'\" unpacked with wrong size!
  615.   fi
  616.   # end of 'gnuplot/demo/all.dem'
  617. fi
  618. if test -f 'gnuplot/demo/spline.dem' -a "${1}" != "-c" ; then 
  619.   echo shar: Will not clobber existing file \"'gnuplot/demo/spline.dem'\"
  620. else
  621.   echo shar: Extracting \"'gnuplot/demo/spline.dem'\" \(2708 characters\)
  622.   sed "s/^X//" >'gnuplot/demo/spline.dem' <<'END_OF_FILE'
  623. X#
  624. X# $Id: spline.dem%v 3.38.2.53 1993/01/21 01:20:04 woo Exp woo $
  625. X#
  626. X# Some curve plotting using common cubic polynomial basis function for cagd.
  627. X#
  628. X#                Gershon Elber, Aug. 1992
  629. X#
  630. Xset xrang [0:1]
  631. Xset grid
  632. X
  633. Xset yrange[-0.2:1.4]
  634. Xm0(x) = 1
  635. Xm1(x) = x
  636. Xm2(x) = x**2
  637. Xm3(x) = x**3
  638. Xset title "The cubic Monomial basis functions"
  639. Xplot m0(x), m1(x), m2(x), m3(x)
  640. Xpause -1 "Press return to continue"
  641. X
  642. Xh00(x) = x**2 * ( 2 * x - 3) + 1
  643. Xh01(x) = -x**2 * (2 * x - 3)
  644. Xh10(x) = x * (x - 1)**2
  645. Xh11(x) = x**2 * (x - 1)
  646. X
  647. Xset title "The cubic Hermite basis functions"
  648. Xplot h00(x), h01(x), h10(x), h11(x)
  649. Xpause -1 "Press return to continue"
  650. X
  651. Xbez0(x) = (1 - x)**3
  652. Xbez1(x) = 3 * (1 - x)**2 * x
  653. Xbez2(x) = 3 * (1 - x) * x**2
  654. Xbez3(x) = x**3
  655. Xset title "The cubic Bezier basis functions"
  656. Xplot bez0(x), bez1(x), bez2(x), bez3(x)
  657. Xpause -1 "Press return to continue"
  658. X
  659. Xbsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6;
  660. Xbsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6;
  661. Xbsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6
  662. Xbsp3(x) = x**3 / 6
  663. Xset title "The cubic uniform Bspline basis functions"
  664. Xplot bsp0(x), bsp1(x), bsp2(x), bsp3(x)
  665. Xpause -1 "Press return to continue"
  666. X
  667. Xy0 = 1
  668. Xy1 = 0.2
  669. Xy2 = 0.8
  670. Xy3 = 0
  671. X
  672. Xx0 = 0
  673. Xx1 = 0.33
  674. Xx2 = 0.66
  675. Xx3 = 1
  676. X
  677. Xxv0 = -0.3
  678. Xyv0 = 0.5
  679. Xxv1 = -0.4
  680. Xyv1 = 0.2
  681. X
  682. Xset arrow from x0,y0 to x1,y1 nohead
  683. Xset arrow from x1,y1 to x2,y2 nohead
  684. Xset arrow from x2,y2 to x3,y3 nohead
  685. X
  686. Xcub_bezier_x(t) = bez0(t) * x0 + bez1(t) * x1 + bez2(t) * x2 + bez3(t) * x3
  687. Xcub_bezier_y(t) = bez0(t) * y0 + bez1(t) * y1 + bez2(t) * y2 + bez3(t) * y3
  688. Xcub_bsplin_x(t) = bsp0(t) * x0 + bsp1(t) * x1 + bsp2(t) * x2 + bsp3(t) * x3
  689. Xcub_bsplin_y(t) = bsp0(t) * y0 + bsp1(t) * y1 + bsp2(t) * y2 + bsp3(t) * y3
  690. X
  691. Xset parametric
  692. Xset trange [0:1]
  693. Xset title "The cubic Bezier/Bspline basis functions in use"
  694. Xplot cub_bezier_x(t), cub_bezier_y(t) with lines 2,\
  695. X     cub_bsplin_x(t), cub_bsplin_y(t) with lines 3
  696. Xpause -1 "Press return to continue"
  697. X
  698. Xset noarrow
  699. X#
  700. X# Note the arrows here here scaled by 1/3 so they will fit into plotting area
  701. X#
  702. Xset arrow from x1,y1 to x1+xv0/3,y1+yv0/3
  703. Xset arrow from x2,y2 to x2+xv1/3,y2+yv1/3
  704. Xset arrow from x1,y1 to x1+xv0,y1+yv0
  705. Xset arrow from x2,y2 to x2+xv1,y2+yv1
  706. X
  707. Xcub_hermit_x1(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0 + h11(t) * xv1
  708. Xcub_hermit_y1(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0 + h11(t) * yv1
  709. Xcub_hermit_x2(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0*3 + h11(t) * xv1*3
  710. Xcub_hermit_y2(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0*3 + h11(t) * yv1*3
  711. Xset title "The cubic Hermite basis functions in use"
  712. Xplot cub_hermit_x1(t), cub_hermit_y1(t) with lines 2,\
  713. X     cub_hermit_x2(t), cub_hermit_y2(t) with lines 3
  714. Xpause -1 "Press return to continue"
  715. X
  716. Xset noparametric
  717. Xset noarrow
  718. Xset auto
  719. Xset nogrid
  720. Xset title ""
  721. END_OF_FILE
  722.   if test 2708 -ne `wc -c <'gnuplot/demo/spline.dem'`; then
  723.     echo shar: \"'gnuplot/demo/spline.dem'\" unpacked with wrong size!
  724.   fi
  725.   # end of 'gnuplot/demo/spline.dem'
  726. fi
  727. if test -f 'gnuplot/docs/makefile.ami' -a "${1}" != "-c" ; then 
  728.   echo shar: Will not clobber existing file \"'gnuplot/docs/makefile.ami'\"
  729. else
  730.   echo shar: Extracting \"'gnuplot/docs/makefile.ami'\" \(2760 characters\)
  731.   sed "s/^X//" >'gnuplot/docs/makefile.ami' <<'END_OF_FILE'
  732. X#
  733. X# $Id: makefile.ami%v 3.38.2.70 1993/02/08 02:19:29 woo Exp woo $
  734. X#
  735. X# Makefile for GNUPLOT documentation (Aztec C v5.xx Version)
  736. X#
  737. X# Note that the top-level file for documentation is gnuplot.doc.
  738. X# See README.
  739. X#
  740. X# To print manual:
  741. X#    make gnuplot.dvi             (for latex)
  742. X#    (print or view gnuplot.dvi)
  743. X# OR
  744. X#    make gnuplot.nroff           (for nroff)
  745. X#    (print or view gnuplot.nroff)
  746. X#   or
  747. X#    make "TROFF=itroff" troff    (for troff; use your troff for itroff here)
  748. X#
  749. X# $Id: makefile.ami%v 3.38.2.70 1993/02/08 02:19:29 woo Exp woo $
  750. X
  751. X# usually overridden by ../Makefile
  752. XHELPDEST = /usr/local/lib/
  753. X
  754. X# substitute your troff command (and any flags) for this one
  755. XTROFF=itroff
  756. X  
  757. X# substitute cp if you do not have the install program
  758. XINSTALL=install
  759. X
  760. X# Compiler flags
  761. X# -DSYSV if att sys V
  762. X# -DMSDOS if MSDOS PS
  763. X# -traditional -g -O if gcc (set 'CC = gcc')
  764. X# no extra flags for BSD
  765. XCFLAGS = 
  766. XCC = cc
  767. XLN =ln
  768. XLFLAGS = -lm -lc
  769. X
  770. X# default is what is needed for interactive gnuplot
  771. Xdefault: gnuplot.hlp gnuplot.gih
  772. X
  773. X### [tn]roff documentation
  774. Xtroff: gnuplot.ms titlepage.ms
  775. X    tbl gnuplot.ms | eqn | $(TROFF) -ms
  776. X
  777. X# for screen viewing, or printers with backspace/overstrike, remove the -Tlpr
  778. Xnroff gnuplot.nroff: gnuplot.ms titlepage.ms
  779. X    tbl gnuplot.ms | neqn | nroff -ms -Tlpr > gnuplot.nroff
  780. X
  781. Xms gnuplot.ms: doc2ms gnuplot.doc
  782. X    doc2ms < gnuplot.doc > gnuplot.ms
  783. X
  784. Xdoc2ms: doc2ms.c
  785. X    $(CC) $(CFLAGS) -o doc2ms.o doc2ms.c
  786. X    $(LN) -o doc2ms doc2ms.o $(LFLAGS)
  787. X
  788. X### LaTeX documentation
  789. Xtex gnuplot.tex: doc2tex gnuplot.doc
  790. X    doc2tex < gnuplot.doc > gnuplot.tex
  791. X
  792. Xdvi gnuplot.dvi: gnuplot.tex titlepage.tex
  793. X    latex gnuplot.tex
  794. X    latex gnuplot.tex
  795. X
  796. Xdoc2tex: doc2tex.c
  797. X    $(CC) $(CFLAGS) -o doc2tex.o doc2tex.c
  798. X    $(LN) -o doc2tex doc2tex.o $(LFLAGS)
  799. X
  800. X# this is how to make gnuplot.hlp
  801. Xhlp gnuplot.hlp: doc2hlp gnuplot.doc
  802. X    doc2hlp < gnuplot.doc > gnuplot.hlp
  803. X
  804. Xdoc2hlp: doc2hlp.c
  805. X    $(CC) $(CFLAGS) -o doc2hlp.o doc2hlp.c
  806. X    $(LN) -o doc2hlp doc2hlp.o $(LFLAGS)
  807. X
  808. X# this is how to make gnuplot.gih
  809. Xgih gnuplot.gih: doc2gih gnuplot.doc
  810. X    doc2gih < gnuplot.doc > gnuplot.gih
  811. X
  812. Xdoc2gih: doc2gih.c
  813. X    $(CC) $(CFLAGS) -o doc2gih.o doc2gih.c
  814. X    $(LN) -o doc2gih doc2gih.o $(LFLAGS)
  815. X
  816. X# this is how to check the gnuplot.doc file
  817. Xcheck: checkdoc gnuplot.doc
  818. X    checkdoc < gnuplot.doc
  819. X
  820. Xcheckdoc: checkdoc.c
  821. X    $(CC) $(CFLAGS) -o checkdoc.o checkdoc.c
  822. X    $(LN) -o checkdoc checkdoc.o $(LFLAGS)
  823. X
  824. X# For Unix and MSDOS only
  825. Xinstall-unix: gnuplot.gih
  826. X    $(INSTALL) gnuplot.gih $(HELPDEST)
  827. X
  828. X# for VMS only
  829. Xinstall-vms: gnuplot.hlp
  830. X    $(INSTALL) gnuplot.hlp $(HELPDEST)
  831. X
  832. X# remove all derived files
  833. Xclean:
  834. X    rm -f doc2ms gnuplot.nroff gnuplot.ms
  835. X    rm -f doc2tex gnuplot.tex gnuplot.dvi gnuplot.aux gnuplot.log gnuplot.toc
  836. X    rm -f doc2hlp gnuplot.hlp
  837. X    rm -f doc2gih gnuplot.gih
  838. X    rm -f checkdoc *~ *.o core a.out
  839. END_OF_FILE
  840.   if test 2760 -ne `wc -c <'gnuplot/docs/makefile.ami'`; then
  841.     echo shar: \"'gnuplot/docs/makefile.ami'\" unpacked with wrong size!
  842.   fi
  843.   # end of 'gnuplot/docs/makefile.ami'
  844. fi
  845. if test -f 'gnuplot/docs/titlepag.tex' -a "${1}" != "-c" ; then 
  846.   echo shar: Will not clobber existing file \"'gnuplot/docs/titlepag.tex'\"
  847. else
  848.   echo shar: Extracting \"'gnuplot/docs/titlepag.tex'\" \(1493 characters\)
  849.   sed "s/^X//" >'gnuplot/docs/titlepag.tex' <<'END_OF_FILE'
  850. X%
  851. X% $Id: titlepag.tex%v 3.38.2.153 1993/07/08 03:43:32 woo Exp woo $
  852. X%
  853. X\ifx\undefined\selectfont % DSL 26 May 93
  854. X\documentstyle[toc_entr]{article}
  855. X\else
  856. X\documentstyle[toc_entr,helv]{article}
  857. X\fi
  858. X\setlength{\textwidth}{6.25in}
  859. X\setlength{\oddsidemargin}{0.5cm}
  860. X\setlength{\topmargin}{-0.5in}
  861. X\setlength{\textheight}{9in}
  862. X\setlength{\parskip}{1ex}
  863. X\setlength{\parindent}{0pt}
  864. X\adjustarticle
  865. X\setlength{\threenum}{4.0em} % DSL 26 May 93
  866. X\begin{document}
  867. X
  868. X\pagestyle{empty}
  869. X   \rule{0in}{3in}
  870. X   \begin{center}
  871. X   {\huge\bf GNUPLOT}\\
  872. X   \vspace{3ex}
  873. X   {\Large An Interactive Plotting Program}\\
  874. X   \vspace{2ex}
  875. X   \large
  876. X   Thomas Williams \& Colin Kelley\\
  877. X   \vspace{2ex}
  878. X   Version 3.5 organized by: Alex Woo \\
  879. X   Major contributors (alphabetic order):\\
  880. X  John Campbell\\
  881. X  Robert Cunningham\\
  882. X  Gershon Elber\\
  883. X  Roger Fearick\\
  884. X  David Kotz\\
  885. X  Ed Kubaitis\\
  886. X  Russell Lang\\
  887. X  Alexander Lehmann\\
  888. X  Carsten Steger\\
  889. X  Tom Tkacik\\
  890. X  Jos Van der Woude \\
  891. X  Alex Woo\\
  892. X  Copyright (C) 1986 - 1993   Thomas Williams, Colin Kelley\\
  893. X   \vspace{3ex}
  894. X   Mailing list for comments: \verb+info-gnuplot@dartmouth.edu+\\
  895. X   Mailing list for bug reports: \verb+bug-gnuplot@dartmouth.edu+
  896. X
  897. X   \vfill
  898. X   {\small This manual is for GNUPLOT version 3.5\\
  899. X%   \begin{verbatim}
  900. X% $Id: titlepag.tex%v 3.38.2.153 1993/07/08 03:43:32 woo Exp woo $
  901. X%   \end{verbatim}
  902. X   }
  903. X
  904. X   \end{center}
  905. X\newpage
  906. X
  907. X\tableofcontents
  908. X\newpage
  909. X
  910. X\setcounter{page}{1}
  911. X\pagestyle{myheadings}
  912. X\markboth{GNUPLOT 3.5}{GNUPLOT 3.5}
  913. END_OF_FILE
  914.   if test 1493 -ne `wc -c <'gnuplot/docs/titlepag.tex'`; then
  915.     echo shar: \"'gnuplot/docs/titlepag.tex'\" unpacked with wrong size!
  916.   fi
  917.   # end of 'gnuplot/docs/titlepag.tex'
  918. fi
  919. if test -f 'gnuplot/epsviewe.m' -a "${1}" != "-c" ; then 
  920.   echo shar: Will not clobber existing file \"'gnuplot/epsviewe.m'\"
  921. else
  922.   echo shar: Extracting \"'gnuplot/epsviewe.m'\" \(2643 characters\)
  923.   sed "s/^X//" >'gnuplot/epsviewe.m' <<'END_OF_FILE'
  924. X#ifndef lint
  925. Xstatic char *RCSid = "$Id: epsviewe.m%v 3.50.1.6 1993/07/27 03:35:12 woo Exp $";
  926. X#endif
  927. X
  928. X
  929. X#import "epsviewe.h"
  930. X#import <appkit/OpenPanel.h>
  931. X#import <appkit/View.h>
  932. X
  933. X@implementation EpsViewer
  934. X
  935. X- windowCreate:(NXCoord) width Height:(NXCoord) height
  936. X{
  937. X    
  938. X    /* create the new window, in a good place */
  939. X    theNewWin = [Window
  940. X        newContent:[self nextRectForWidth:width Height:height]
  941. X        style:NX_TITLEDSTYLE
  942. X        backing:NX_RETAINED
  943. X        buttonMask:(NX_CLOSEBUTTONMASK | NX_MINIATURIZEBUTTONMASK)
  944. X        defer:NO];
  945. X    /* we need to receive windowDidBecomeMain: and windowDidResignMain: */
  946. X    [theNewWin setDelegate:self];
  947. X    /*
  948. X         * create a new View, make it the contentView of our new window,
  949. X     * and destroy the window's old contentView 
  950. X     */
  951. X        [[theNewWin setContentView:[[View alloc] init]] free];
  952. X        /* display the window, and bring it forth */
  953. X    [theNewWin display];
  954. X    [theNewWin makeKeyAndOrderFront:self];    
  955. X/*    [theNewWin orderBack:self];            */
  956. X    /* show the frame */
  957. X    return self;
  958. X}
  959. X/***************************************************************************/
  960. X/* nextRectForWidth:Height: - return the next good content rectangle       */
  961. X/*  from Carl F. Sutter's wonderful ViewGif2 'Controller' method...        */
  962. X/***************************************************************************/
  963. X/* nextTopLeft - return the next good top left window position           */
  964. X/***************************************************************************/
  965. X
  966. X- (NXRect *)nextRectForWidth:(NXCoord)width Height:(NXCoord)height
  967. X{
  968. X#define OFFSET 10.0
  969. X#define MAX_STEPS 20
  970. X#define INITIAL_X 356.0
  971. X#define INITIAL_Y 241.0
  972. X    NXPoint         nxpTopLeft;
  973. X    NXRect          nxrTemp;    /* used to find window height     */
  974. X    NXRect          nxrWinHeight;    /* bounds of enclosing window     */
  975. X    NXSize          nxsScreen;    /* size of screen         */
  976. X    static NXRect   nxrResult;    /* the Answer!             */
  977. X    static int      nCurStep = 0;
  978. X
  979. X    /* find a good top-left coord */
  980. X    nxpTopLeft.x = INITIAL_X + nCurStep * OFFSET;
  981. X    nxpTopLeft.y = INITIAL_Y + nCurStep * OFFSET;
  982. X    if (++nCurStep > MAX_STEPS)
  983. X        nCurStep = 0;
  984. X    /* find window height using nxrTemp */
  985. X    nxrTemp.size.width = width;
  986. X    nxrTemp.size.height = height;
  987. X    nxrTemp.origin.x = nxrTemp.origin.y = 0;
  988. X    [Window getFrameRect:&nxrWinHeight forContentRect:&nxrTemp
  989. X     style:NX_TITLEDSTYLE];
  990. X    [NXApp getScreenSize:&nxsScreen];
  991. X    /* find the lower-left coord */
  992. X    nxrResult.origin.x = nxpTopLeft.x;
  993. X    nxrResult.origin.y = nxsScreen.height - nxrWinHeight.size.height - nxpTopLeft.y;
  994. X    nxrResult.size.width = width;
  995. X    nxrResult.size.height = height;
  996. X    return (&nxrResult);
  997. X}
  998. X
  999. X
  1000. X// Keep compiler quiet
  1001. X- (const char *) rcsid
  1002. X{
  1003. X    return RCSid;
  1004. X}
  1005. X
  1006. X@end
  1007. X
  1008. END_OF_FILE
  1009.   if test 2643 -ne `wc -c <'gnuplot/epsviewe.m'`; then
  1010.     echo shar: \"'gnuplot/epsviewe.m'\" unpacked with wrong size!
  1011.   fi
  1012.   # end of 'gnuplot/epsviewe.m'
  1013. fi
  1014. if test -f 'gnuplot/makefile.amg' -a "${1}" != "-c" ; then 
  1015.   echo shar: Will not clobber existing file \"'gnuplot/makefile.amg'\"
  1016. else
  1017.   echo shar: Extracting \"'gnuplot/makefile.amg'\" \(2879 characters\)
  1018.   sed "s/^X//" >'gnuplot/makefile.amg' <<'END_OF_FILE'
  1019. X# Makefile for SAS/C 6.1 on the Amiga
  1020. X#
  1021. X# $Id: makefile.amg%v 3.50 1993/07/09 05:35:24 woo Exp $
  1022. X#
  1023. X#
  1024. X
  1025. XCC = sc
  1026. X
  1027. X# Remove 'MATH=IEEE' if you don't want to use the better Commodore
  1028. X# math-routines. If you do so, you'll have to change 'scmieee.lib'
  1029. X# to 'scm.lib' in "linkopt.amg" and likewise on the bf_test target
  1030. X# line below.
  1031. X
  1032. XOFLAGS = OPT OPTGO OPTPEEP NOOPTINL NOOPTINLOCAL
  1033. XDEFS   = DEF=AMIGA_SC_6_1 DEF=MEMCPY
  1034. XCOPTS  = DATA=FAR MATH=IEEE IGN=84+85+88+94+100+154+161+217+304
  1035. XCFLAGS = $(COPTS) $(DEFS) $(OFLAGS)
  1036. X
  1037. X.c.o:
  1038. X    $(CC) $(CFLAGS) $<
  1039. X
  1040. XOBJS = binary.o bitmap.o command.o contour.o eval.o gnubin.o graph3d.o \
  1041. X    graphics.o help.o internal.o misc.o parse.o plot.o scanner.o \
  1042. X    setshow.o specfun.o standard.o term.o util.o version.o 
  1043. X
  1044. XCSOURCE1 = bf_test.c binary.c command.c setshow.c 
  1045. XCSOURCE2 = help.c gnubin.c graphics.c graph3d.o internal.c 
  1046. XCSOURCE3 = misc.c eval.c parse.c plot.c scanner.c standard.c 
  1047. XCSOURCE4 = bitmap.c term.c util.c version.c
  1048. XCSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
  1049. X    term/bigfig.trm term/cgi.trm term/corel.trm \
  1050. X    term/djsvga.trm term/dumb.trm \
  1051. X    term/dxf.trm term/dxy.trm \
  1052. X    term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \
  1053. X    term/fig.trm term/hp26.trm term/hp2648.trm term/hpgl.trm  \
  1054. X    term/hpljii.trm term/metafont.trm\
  1055. X    term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c 
  1056. XCSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
  1057. X    term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
  1058. X    term/pbm.trm term/pc.trm 
  1059. XCSOURCE7 = term/post.trm term/pstricks.trm term/qms.trm term/regis.trm \
  1060. X    term/rgip.trm term/sun.trm\
  1061. X    term/t410x.trm term/tek.trm term/texdraw.trm term/tgif.h\
  1062. X    term/tgif.trm term/tpic.trm \
  1063. X    term/unixpc.trm term/unixplot.trm \
  1064. X    term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
  1065. XCSOURCE8 = contour.c specfun.c
  1066. X
  1067. X
  1068. Xall: gnuplot demo/bf_test
  1069. X
  1070. Xgnuplot: $(OBJS)
  1071. X    slink with linkopt.amg
  1072. X
  1073. Xdemo/bf_test: bf_test.o binary.o
  1074. X    slink from lib:c.o bf_test.o binary.o to demo/bf_test\
  1075. X    lib lib:scmieee.lib lib:scnb.lib
  1076. X    @echo "*N*NRun bf_test in demo subdirectory to make binary demo files*N"
  1077. X
  1078. Xbf_test.o: bf_test.c
  1079. Xbinary.o: binary.c plot.h
  1080. Xbitmap.o: bitmap.c bitmap.h plot.h
  1081. Xcommand.o: command.c plot.h setshow.h help.h
  1082. Xcontour.o: contour.c plot.h
  1083. Xeval.o: eval.c plot.h
  1084. Xgnubin.o: gnubin.c plot.h setshow.h
  1085. Xhelp.o: help.c plot.h help.h
  1086. Xinternal.o: internal.c plot.h
  1087. Xmisc.o: misc.c plot.h setshow.h help.h
  1088. Xparse.o: parse.c plot.h
  1089. Xplot.o: plot.c plot.h setshow.h
  1090. Xscanner.o: scanner.c plot.h
  1091. Xsetshow.o: setshow.c plot.h setshow.h
  1092. Xspecfun.o: specfun.c plot.h
  1093. Xstandard.o: standard.c plot.h
  1094. Xutil.o: util.c plot.h
  1095. Xversion.o: version.c
  1096. X
  1097. Xgraph3d.o: graph3d.c plot.h setshow.h
  1098. X    $(CC) CODE=FAR $(CFLAGS) $<
  1099. X
  1100. Xgraphics.o: graphics.c plot.h setshow.h
  1101. X    $(CC) CODE=FAR $(CFLAGS) $<
  1102. X
  1103. Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1104. X    $(CC) CODE=FAR $(CFLAGS) $<
  1105. END_OF_FILE
  1106.   if test 2879 -ne `wc -c <'gnuplot/makefile.amg'`; then
  1107.     echo shar: \"'gnuplot/makefile.amg'\" unpacked with wrong size!
  1108.   fi
  1109.   # end of 'gnuplot/makefile.amg'
  1110. fi
  1111. if test -f 'gnuplot/makefile.ami' -a "${1}" != "-c" ; then 
  1112.   echo shar: Will not clobber existing file \"'gnuplot/makefile.ami'\"
  1113. else
  1114.   echo shar: Extracting \"'gnuplot/makefile.ami'\" \(3050 characters\)
  1115.   sed "s/^X//" >'gnuplot/makefile.ami' <<'END_OF_FILE'
  1116. X#
  1117. X# $Id: makefile.ami%v 3.50 1993/07/09 05:35:24 woo Exp $
  1118. X#
  1119. X#
  1120. X#
  1121. X#   Makefile for the Amiga             Pat R. Empleo
  1122. X#                                      Sept 1991
  1123. X#      Manx Aztec C 5.2 beta version
  1124. X#
  1125. X#   Usage:
  1126. X#
  1127. X#      make -f makefile.ami
  1128. X#
  1129. X#
  1130. X
  1131. X# where to install help file gnuplot.gih
  1132. XHELPDEST=GNUPLOT:docs/gnuplot.gih
  1133. X# Where to send email about bugs and comments (locally)
  1134. XEMAIL="bug-gnuplot@dartmouth.edu"
  1135. X
  1136. X#
  1137. X# Manx Aztec C v5.2 compiler options
  1138. X#
  1139. X# -DVFORK  We use this switch to invoke fexecv()
  1140. X#
  1141. XCC     = cc
  1142. XCFLAGS = -mcd -DVFORK -DNOGAMMA -DMEMSET -DMEMCPY -DAMIGA_AC_5 -fa -sab -wosw -MR
  1143. X
  1144. X#
  1145. X# Manx Aztec C v5.2 linker options
  1146. X#
  1147. XLD   = ln
  1148. XLIBS = -lmal -lc
  1149. X
  1150. X#
  1151. X# Terminal (device) support --- see term.h
  1152. X#
  1153. XTERMFLAGS = -Iterm
  1154. X
  1155. X#
  1156. X# List of object files except term.o, version.o
  1157. X#
  1158. XOBJS = binary.o bitmap.o command.o contour.o eval.o gnubin.o graphics.o \
  1159. X       graph3d.o help.o internal.o misc.o parse.o plot.o scanner.o \
  1160. X       setshow.o specfun.o standard.o util.o  
  1161. X
  1162. X#
  1163. X# List of sources
  1164. X#
  1165. XCSOURCE1 = binary.c command.c setshow.c 
  1166. XCSOURCE2 = help.c gnubin.c graphics.c graph3d.c internal.c 
  1167. XCSOURCE3 = misc.c eval.c parse.c plot.c readline.c scanner.c standard.c 
  1168. XCSOURCE4 = bitmap.c term.c util.c version.c
  1169. XCSOURCE5 = term/amiga.trm term/aed.trm term/cgi.trm term/dumb.trm term/dxf.trm \
  1170. X    term/dxy.trm term/eepic.trm term/epson.trm term/fig.trm \
  1171. X    term/hp26.trm term/hp2648.trm term/hpgl.trm term/hpljii.trm \
  1172. X    term/apollo.trm term/gpr.trm
  1173. XCSOURCE6 = term/impcodes.h term/imagen.trm term/object.h \
  1174. X    term/iris4d.trm term/kyo.trm term/latex.trm term/pbm.trm term/pc.trm 
  1175. XCSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
  1176. X    term/t410x.trm term/tek.trm term/unixpc.trm term/unixplot.trm \
  1177. X    term/v384.trm term/x11.trm term/bigfig.trm term/vws.trm gplt_x11.c
  1178. XCSOURCE8 = contour.c specfun.c
  1179. X
  1180. X#
  1181. X# Docs
  1182. X#
  1183. XDOCS1 = docs/Makefile docs/README docs/checkdoc.c docs/doc2gih.c \
  1184. X    docs/doc2hlp.c docs/doc2hlp.com docs/doc2ms.c docs/doc2tex.c \
  1185. X    docs/gnuplot.1 docs/lasergnu.1 docs/toc_entry.sty \
  1186. X    docs/titlepage.ms docs/titlepage.tex
  1187. XDOCS2 = docs/gnuplot.doc
  1188. XDOCS3 = docs/latextut/Makefile docs/latextut/eg1.plt \
  1189. X    docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
  1190. X    docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
  1191. X    docs/latextut/header.tex docs/latextut/tutorial.tex \
  1192. X    docs/latextut/linepoint.plt
  1193. X
  1194. X#
  1195. X# Targets
  1196. X#
  1197. X
  1198. Xdefault: gnuplot doc
  1199. X
  1200. Xgnuplot: $(OBJS) term.o version.o
  1201. X    $(LD) $(OBJS) term.o version.o $(LIBS) -o gnuplot
  1202. X
  1203. Xdoc:
  1204. X    cd docs
  1205. X    make -f makefile.ami gih
  1206. X
  1207. X#
  1208. X# Dependencies
  1209. X#
  1210. Xplot.o: plot.c
  1211. X    $(CC) $(CFLAGS) plot.c
  1212. X
  1213. Xterm.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1214. X    $(CC) $(CFLAGS) $(TERMFLAGS) term.c
  1215. X
  1216. Xversion.o:
  1217. X    $(CC) $(CFLAGS) -DCONTACT=$(EMAIL) version.c
  1218. X
  1219. X$(OBJS): plot.h
  1220. X    $(CC) $(CFLAGS) $*.c
  1221. X
  1222. Xcommand.o:
  1223. X    $(CC) $(CFLAGS) -c command.c -DHELPFILE="$(HELPDEST)"
  1224. X
  1225. Xcommand.o help.o misc.o: help.h
  1226. X
  1227. Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
  1228. X
  1229. Xbitmap.o term.o: bitmap.h
  1230. X
  1231. X#
  1232. X# misc
  1233. X#
  1234. Xclean:
  1235. X    delete #?.o
  1236. X
  1237. Xveryclean: spotless
  1238. X
  1239. Xspotless:
  1240. X    delete #?.o gnuplot
  1241. X
  1242. END_OF_FILE
  1243.   if test 3050 -ne `wc -c <'gnuplot/makefile.ami'`; then
  1244.     echo shar: \"'gnuplot/makefile.ami'\" unpacked with wrong size!
  1245.   fi
  1246.   # end of 'gnuplot/makefile.ami'
  1247. fi
  1248. if test -f 'gnuplot/makefile.djg' -a "${1}" != "-c" ; then 
  1249.   echo shar: Will not clobber existing file \"'gnuplot/makefile.djg'\"
  1250. else
  1251.   echo shar: Extracting \"'gnuplot/makefile.djg'\" \(2746 characters\)
  1252.   sed "s/^X//" >'gnuplot/makefile.djg' <<'END_OF_FILE'
  1253. X# make file for DJGPP and ndmake 4.5
  1254. X
  1255. X# problems using DJGPP 1.08 as at 6 Oct 1992
  1256. X#   1. signal(SIGFPE,...)  not working.   
  1257. X#      floating point exceptions TERMINATE gnuplot.
  1258. X#      This is because signal is defined as signal(){} !!!
  1259. X#   2. graphics sometimes draws the x axis in the wrong place
  1260. X
  1261. X# The above problems make gnuplot UNUSABLE under DJGPP at present.
  1262. X
  1263. X# where to place gnuplot.gih helpfile
  1264. XHELPFILE = gnuplot.gih
  1265. X
  1266. X# compiler
  1267. XCCDIR = c:\gcc\bin
  1268. XCC = $(CCDIR)\gcc
  1269. X# include directory
  1270. XINCLUDE =-Ic:/gcc/include
  1271. X
  1272. XCFLAGS = -DMSDOS -DDJGPP -DREADLINE
  1273. XTERMFLAGS = -DDJSVGA
  1274. XLINKOPT = -lm -lpc -lgr
  1275. X
  1276. XCSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
  1277. X    term/bigfig.trm term/cgi.trm term/djsvga.trm term/dumb.trm \
  1278. X    term/dxf.trm term/dxy.trm \
  1279. X    term/debug.trm term/eepic.trm term/epson.trm term/fig.trm  \
  1280. X    term/hp26.trm term/hp2648.trm term/hpgl.trm  \
  1281. X    term/hpljii.trm term/metafont.trm\
  1282. X    term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c 
  1283. XCSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
  1284. X    term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
  1285. X    term/pbm.trm term/pc.trm 
  1286. XCSOURCE7 = term/post.trm term/qms.trm term/regis.trm term/sun.trm \
  1287. X    term/t410x.trm term/tek.trm term/texdraw.trm term/unixpc.trm \
  1288. X    term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
  1289. XOBJ1 =  bitmap.o command.o contour.o eval.o graphics.o graph3d.o
  1290. XOBJ2 =    help.o internal.o misc.o parse.o plot.o readline.o
  1291. XOBJ3 =    scanner.o setshow.o specfun.o standard.o term.o util.o
  1292. XOBJ4 =    version.o gnubin.o binary.o
  1293. X
  1294. XOBJS =    $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
  1295. X
  1296. X.c.o:  
  1297. X    $(CC) -c $(CFLAGS) $(INCLUDE) $<
  1298. X
  1299. Xall: gp32.exe $(HELPFILE)
  1300. X
  1301. Xgp32.exe : $(OBJS)
  1302. X    @>gcclink.rsp $(OBJS)
  1303. X    $(CC) -o gp32 @gcclink.rsp $(LINKOPT)
  1304. X    copy /b $(CCDIR)\go32.exe+gp32 gp32.exe
  1305. X
  1306. X
  1307. Xcommand.o: command.c plot.h setshow.h help.h
  1308. X    $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
  1309. X
  1310. Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1311. X    $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
  1312. X
  1313. X$(OBJS): plot.h
  1314. X
  1315. Xcommand.o help.o misc.o: help.h
  1316. X
  1317. Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
  1318. X
  1319. Xbitmap.o term.o: bitmap.h
  1320. X
  1321. X# convert gnuplot.doc to gnuplot.gih
  1322. X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
  1323. X    doc2gih docs\gnuplot.doc $(HELPFILE)
  1324. X
  1325. Xdoc2gih.exe: docs\doc2gih.c
  1326. X    $(CC) $(CFLAGS) $(INCLUDE) -o doc2gih docs/doc2gih.c
  1327. X    copy /b $(CCDIR)\go32.exe+doc2gih doc2gih.exe
  1328. X
  1329. X
  1330. X# clean target - remove all temp files, but leave executable intact
  1331. X# needed when changing configuration (model or overlaying)
  1332. X
  1333. Xclean:
  1334. X    del *.o
  1335. X    del gp32
  1336. X    del doc2gih
  1337. X
  1338. X# realclean target - remove all files created by the makefile
  1339. X
  1340. Xrealclean: clean
  1341. X    del gp32.exe
  1342. X    del doc2gih.exe
  1343. X    del gnuplot.gih
  1344. X
  1345. END_OF_FILE
  1346.   if test 2746 -ne `wc -c <'gnuplot/makefile.djg'`; then
  1347.     echo shar: \"'gnuplot/makefile.djg'\" unpacked with wrong size!
  1348.   fi
  1349.   # end of 'gnuplot/makefile.djg'
  1350. fi
  1351. if test -f 'gnuplot/makefile.g' -a "${1}" != "-c" ; then 
  1352.   echo shar: Will not clobber existing file \"'gnuplot/makefile.g'\"
  1353. else
  1354.   echo shar: Extracting \"'gnuplot/makefile.g'\" \(2646 characters\)
  1355.   sed "s/^X//" >'gnuplot/makefile.g' <<'END_OF_FILE'
  1356. X# This file is for GRASS, a geographic information system. 
  1357. X# To compile, make modifications below (if necessary) then
  1358. X# % ln -s makefile.g Gmakefile
  1359. X# % gmake4.1
  1360. X#
  1361. X# NOTE: this creates a binary called 'g.gnuplot' and is located in
  1362. X#       $GISBASE/bin.  
  1363. X#       A help file is installed in $(GISBASE)/man/help/g.gnuplot
  1364. X#
  1365. X# GRASS driver written by:
  1366. X# James Darrell McCauley          Department of Ag Engr, Purdue Univ
  1367. X# mccauley@ecn.purdue.edu         West Lafayette, Indiana 47907-1146
  1368. X#
  1369. X# Last modified: 26 Jun 1993
  1370. X#
  1371. X# Known Bugs:  There may be a problem with fifo's. Then again, there may not.
  1372. X#              Drawing non-filled point types is slow.
  1373. X#
  1374. X# Things to do: modify text function to change fonts? will make g.gnuplot
  1375. X#               input files incompatible with gnuplot
  1376. X#
  1377. X# Modification History:
  1378. X# <15 Jun 1992>    First version created with GNUPLOT 3.2
  1379. X# <15 Feb 1993> Modified to work with frames
  1380. X# <16 Feb 1993> Added point types triangle (filled and unfilled), 
  1381. X#               inverted-triangle (filled and unfilled), 
  1382. X#               circle (filled and unfilled), and filled box.
  1383. X#               Graph is no longer erased after g.gnuplot is finished.
  1384. X# <01 Mar 1993> Modified to work with 3.3b9
  1385. X# <26 Jun 1993> Fixed up this file to automatically install the 
  1386. X#               binary and help.
  1387. X#
  1388. X#############################################################################
  1389. X# Where to send email about bugs and comments 
  1390. XEMAIL=grassp-list@moon.cecer.army.mil
  1391. X
  1392. XHELPDEST=$(GISBASE)/man/help/g.gnuplot
  1393. X################### Don't touch anything below this line ###################
  1394. XGTERMFLAGS = -DGRASS 
  1395. X
  1396. XEXTRA_CFLAGS=-DREADLINE -DNOCWDRC $(GTERMFLAGS) \
  1397. X    -DCONTACT=\"$(EMAIL)\" -DHELPFILE=\"$(HELPDEST)\"
  1398. X
  1399. XOFILES = \
  1400. X    binary.o \
  1401. X    bitmap.o \
  1402. X    command.o \
  1403. X    contour.o \
  1404. X    eval.o \
  1405. X    gnubin.o \
  1406. X    graph3d.o \
  1407. X    graphics.o \
  1408. X    help.o \
  1409. X    internal.o \
  1410. X    misc.o \
  1411. X    parse.o \
  1412. X    plot.o \
  1413. X    readline.o \
  1414. X    scanner.o \
  1415. X    setshow.o \
  1416. X    specfun.o \
  1417. X    standard.o \
  1418. X    term.o \
  1419. X    util.o \
  1420. X    version.o 
  1421. X
  1422. Xall: $(BIN_MAIN_CMD)/g.gnuplot $(GISBASE)/man/help/g.gnuplot
  1423. X
  1424. X$(BIN_MAIN_CMD)/g.gnuplot: $(OFILES) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) 
  1425. X    $(CC) $(LDFLAGS) -o $@ $(OFILES) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(TERMLIB) $(MATHLIB)
  1426. X
  1427. X$(GISBASE)/man/help/g.gnuplot:
  1428. X    ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) install-unix HELPDEST=$(HELPDEST) )
  1429. X
  1430. X# Dependencies
  1431. X
  1432. Xterm.o: term.h term.c term/grass.trm
  1433. X
  1434. X$(OFILES): plot.h
  1435. X
  1436. Xcommand.o help.o misc.o: help.h
  1437. X
  1438. Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
  1439. X
  1440. Xbitmap.o term.o: bitmap.h
  1441. X
  1442. X################################################################
  1443. X$(RASTERLIB): #
  1444. X$(DISPLAYLIB): #
  1445. X$(GISLIB): #
  1446. X
  1447. X
  1448. X
  1449. X
  1450. END_OF_FILE
  1451.   if test 2646 -ne `wc -c <'gnuplot/makefile.g'`; then
  1452.     echo shar: \"'gnuplot/makefile.g'\" unpacked with wrong size!
  1453.   fi
  1454.   # end of 'gnuplot/makefile.g'
  1455. fi
  1456. if test -f 'gnuplot/makefile.os2' -a "${1}" != "-c" ; then 
  1457.   echo shar: Will not clobber existing file \"'gnuplot/makefile.os2'\"
  1458. else
  1459.   echo shar: Extracting \"'gnuplot/makefile.os2'\" \(2360 characters\)
  1460.   sed "s/^X//" >'gnuplot/makefile.os2' <<'END_OF_FILE'
  1461. X#
  1462. X# $Id: makefile.os2%v 3.50 1993/07/09 05:35:24 woo Exp $
  1463. X#
  1464. X# Make file for use with emx 0.8e (gcc2.2.2) and nmake
  1465. X# for compiling for OS/2 2.0
  1466. X# usage: nmake  OR dmake -r  -B
  1467. X# (file has blanks instead of real tabs, doesn't use dmake.ini)
  1468. X# 
  1469. X
  1470. X# where to place gnuplot.gih helpfile
  1471. XHELPFILE = gnuplot.gih
  1472. X
  1473. XCFLAGS = -c -O2 -DOS2 -DGETCWD -DREADLINE -DPIPES
  1474. X
  1475. X# see other terminal defines in term.h
  1476. XTERMFLAGS = 
  1477. X
  1478. X
  1479. XOBJS =     bitmap.o command.o contour.o eval.o graphics.o graph3d.o \
  1480. X    help.o internal.o misc.o parse.o plot.o readline.o specfun.o \
  1481. X    scanner.o setshow.o standard.o term.o util.o version.o \
  1482. X        binary.o gnubin.o
  1483. X
  1484. XCSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \
  1485. X    term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  1486. X    term\hp2648.trm term\hpgl.trm term\hpljii.trm 
  1487. XCSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
  1488. X    term\iris4d.trm term\kyo.trm term\latex.trm term/pbm.trm term\pm.trm 
  1489. XCSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
  1490. X    term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
  1491. X    term\v384.trm term\x11.trm
  1492. XCSOURCE8 = contour.c
  1493. X
  1494. X# default rules
  1495. X.c.o:
  1496. X    gcc $(CFLAGS) -o $*.o $*.c
  1497. X
  1498. Xgnuplot.exe: $(OBJS)
  1499. X        gcc -o gnuplot.exe $(OBJS) -los2
  1500. X
  1501. X
  1502. Xbitmap.o: bitmap.c bitmap.h plot.h
  1503. X
  1504. Xbinary.o: binary.c plot.h
  1505. X
  1506. Xgnubin.o: gnubin.c plot.h
  1507. X
  1508. Xcommand.o: command.c plot.h setshow.h help.h
  1509. X
  1510. Xcontour.o: contour.c plot.h
  1511. X
  1512. Xeval.o: eval.c plot.h
  1513. X
  1514. Xgraphics.o: graphics.c plot.h setshow.h
  1515. X
  1516. Xgraph3d.o: graph3d.c plot.h setshow.h
  1517. X
  1518. Xhelp.o: help.c plot.h help.h
  1519. X
  1520. Xinternal.o: internal.c plot.h
  1521. X
  1522. Xmisc.o: misc.c plot.h setshow.h
  1523. X
  1524. Xparse.o: parse.c plot.h
  1525. X
  1526. Xplot.o: plot.c plot.h setshow.h
  1527. X
  1528. Xreadline.o: readline.c
  1529. X
  1530. Xscanner.o: scanner.c plot.h
  1531. X
  1532. Xsetshow.o: setshow.c plot.h setshow.h
  1533. X
  1534. Xspecfun.o: specfun.c plot.h
  1535. X
  1536. Xstandard.o: standard.c plot.h
  1537. X
  1538. Xterm.o: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1539. X    gcc $(CFLAGS) $(TERMFLAGS) -Iterm -o term.o term.c
  1540. X
  1541. Xutil.o: util.c plot.h
  1542. X
  1543. Xversion.o: version.c
  1544. X
  1545. Xall: gnuplot.exe $(HELPFILE)
  1546. X
  1547. X# convert gnuplot.doc to gnuplot.gih
  1548. Xdoc2gih.exe: docs\doc2gih.c
  1549. X    gcc -o doc2gih.exe  docs/doc2gih.c
  1550. X
  1551. X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
  1552. X    doc2gih docs\gnuplot.doc $(HELPFILE)
  1553. X
  1554. Xclean:
  1555. X    del *.o
  1556. X
  1557. X# realclean target - remove all files created by the makefile
  1558. X
  1559. Xrealclean: clean
  1560. X    del gnuplot.exe
  1561. X    del doc2gih.exe
  1562. X    del gnuplot.gih
  1563. X
  1564. X
  1565. END_OF_FILE
  1566.   if test 2360 -ne `wc -c <'gnuplot/makefile.os2'`; then
  1567.     echo shar: \"'gnuplot/makefile.os2'\" unpacked with wrong size!
  1568.   fi
  1569.   # end of 'gnuplot/makefile.os2'
  1570. fi
  1571. if test -f 'gnuplot/makefile.ztc' -a "${1}" != "-c" ; then 
  1572.   echo shar: Will not clobber existing file \"'gnuplot/makefile.ztc'\"
  1573. else
  1574.   echo shar: Extracting \"'gnuplot/makefile.ztc'\" \(2937 characters\)
  1575.   sed "s/^X//" >'gnuplot/makefile.ztc' <<'END_OF_FILE'
  1576. X# make file for Zortech C++ 3.x
  1577. X
  1578. X# where to place gnuplot.gih helpfile
  1579. XHELPFILE = gnuplot.gih
  1580. X
  1581. X# -c  means don't link
  1582. X# -f  means in-line 8087
  1583. X# -mx means X memory model 
  1584. X# -o+space means optimize for space, -o means optimize for speed
  1585. X# -p means turn off autoprototyping (pre-ANSI codes)
  1586. X# Jm means relax type checking
  1587. X# one can disable command-line history by comment out -DREADLINE
  1588. X
  1589. XCFLAGS=-c -mx -o+space    -Jm -DREADLINE
  1590. XLINK=blinkx
  1591. X#LINK=386link
  1592. XCC=ztc
  1593. X
  1594. X
  1595. XOBJ1 =  bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj
  1596. XOBJ2 =    help.obj internal.obj misc.obj parse.obj plot.obj readline.obj
  1597. XOBJ3 =    scanner.obj setshow.obj specfun.obj standard.obj term.obj util.obj
  1598. XOBJ4 =    version.obj gnubin.obj binary.obj
  1599. X
  1600. XOBJS =    $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
  1601. X
  1602. XCSOURCE5 = term\aed.trm term\cgi.trm term\dumb.trm term\dxy.trm \
  1603. X    term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  1604. X    term\hp2648.trm term\hpgl.trm term\hpljii.trm 
  1605. XCSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
  1606. X    term\iris4d.trm term\kyo.trm term\latex.trm term\fg.trm
  1607. XCSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
  1608. X    term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
  1609. X    term\v384.trm term\x11.trm
  1610. XCSOURCE8 = contour.c specfun.c gnubin.c binary.c
  1611. X
  1612. Xall: gnuplot.exe $(HELPFILE) demo\bf_test.exe
  1613. X
  1614. Xgnuplot.exe: $(OBJS)
  1615. X             $(LINK) @linkopt.ztc
  1616. X#@linkopt.pha
  1617. X
  1618. X# default rules
  1619. X
  1620. X.c.obj:
  1621. X    $(CC) $(CFLAGS) $<
  1622. X
  1623. Xbitmap.obj: bitmap.c bitmap.h plot.h
  1624. X
  1625. Xcommand.obj: command.c plot.h setshow.h help.h
  1626. X    $(CC) $(CFLAGS) command.c
  1627. X
  1628. Xcontour.obj: contour.c plot.h
  1629. X
  1630. Xeval.obj: eval.c plot.h
  1631. X
  1632. Xgraphics.obj: graphics.c plot.h setshow.h
  1633. X
  1634. Xgraph3d.obj: graphics.c plot.h setshow.h
  1635. X
  1636. Xhelp.obj: help.c plot.h help.h
  1637. X
  1638. Xinternal.obj: internal.c plot.h
  1639. X
  1640. Xmisc.obj: misc.c plot.h setshow.h help.h
  1641. X
  1642. Xparse.obj: parse.c plot.h
  1643. X    $(CC) $(CFLAGS) parse.c
  1644. X
  1645. Xplot.obj: plot.c plot.h setshow.h
  1646. X    $(CC) $(CFLAGS) plot.c
  1647. X
  1648. Xreadline.obj: readline.c
  1649. X
  1650. Xscanner.obj: scanner.c plot.h
  1651. X
  1652. Xsetshow.obj: setshow.c plot.h setshow.h
  1653. X
  1654. Xspecfun.obj: specfun.c
  1655. X
  1656. Xstandard.obj: standard.c plot.h
  1657. X
  1658. X# the CSOURCE? dependencies are not up to date (but who cares)
  1659. Xterm.obj: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1660. X    $(CC) $(CFLAGS) $(TERMFLAGS) -Iterm term.c
  1661. X
  1662. Xutil.obj: util.c plot.h
  1663. X
  1664. Xversion.obj: version.c
  1665. X
  1666. X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
  1667. X    doc2gih docs\gnuplot.doc $(HELPFILE)
  1668. X
  1669. X# convert gnuplot.doc to gnuplot.gih
  1670. Xdoc2gih.exe: docs\doc2gih.c
  1671. X    $(CC) -c -ml docs\doc2gih.c
  1672. X    $(LINK) $*
  1673. X
  1674. Xdemo\bf_test.exe: bf_test.c binary.obj
  1675. X    $(CC) -mx -odemo\bf_test.exe bf_test.c binary.obj
  1676. X
  1677. X# clean target - remove all temp files, but leave executable intact
  1678. X# needed when changing configuration (model or overlaying)
  1679. X
  1680. Xclean:
  1681. X    del *.obj
  1682. X    del gnuplot.map
  1683. X    del doc2gih.exe
  1684. X
  1685. X# realclean target - remove all files created by the makefile
  1686. X
  1687. Xrealclean: clean
  1688. X    del gnuplot.exe
  1689. X    del gnuplot.gih
  1690. X    del demo\bf_test.exe
  1691. X    del demo\binary1
  1692. X    del demo\binary2
  1693. X    del demo\binary3
  1694. END_OF_FILE
  1695.   if test 2937 -ne `wc -c <'gnuplot/makefile.ztc'`; then
  1696.     echo shar: \"'gnuplot/makefile.ztc'\" unpacked with wrong size!
  1697.   fi
  1698.   # end of 'gnuplot/makefile.ztc'
  1699. fi
  1700. if test -f 'gnuplot/term/compact.c' -a "${1}" != "-c" ; then 
  1701.   echo shar: Will not clobber existing file \"'gnuplot/term/compact.c'\"
  1702. else
  1703.   echo shar: Extracting \"'gnuplot/term/compact.c'\" \(2493 characters\)
  1704.   sed "s/^X//" >'gnuplot/term/compact.c' <<'END_OF_FILE'
  1705. X/* compact.c -- contains routines to compress a vector stream without
  1706. Xmodifying it */
  1707. X
  1708. X#ifndef COMPACT
  1709. X
  1710. X/* replaces runs of constant slope in the buffer with single vectors 
  1711. X   returns the number of points eliminated */
  1712. Xint compact_slope (xp,yp,isa_move,sz,delta)
  1713. Xint xp[], yp[], isa_move[];
  1714. Xint *sz;
  1715. Xfloat delta;
  1716. X{
  1717. X    int dx,dy,old_size,new_index,i,start;
  1718. X    float slope,old_slope;
  1719. X
  1720. X    old_size = *sz;
  1721. X    new_index = 0;
  1722. X    start = 0;
  1723. X    if (xp[1]!=xp[0])
  1724. X        old_slope = (float)(yp[1]-yp[0])/(float)(xp[1]-xp[0]);
  1725. X    else
  1726. X        old_slope = (float)(yp[1]-yp[0])/(float)(0.00001+xp[1]-xp[0]);
  1727. X    for (i=2;i<old_size;i++){
  1728. X        dx = xp[i] - xp[i-1];
  1729. X        dy = yp[i] - yp[i-1];
  1730. X        if (dx!=0)
  1731. X            slope = (float) dy / (float) dx;
  1732. X        else
  1733. X            slope = (float) dy / ((float) dx + 0.00001);
  1734. X        if ((abs(slope-old_slope) > delta)||(isa_move[i])){    
  1735. X            xp[new_index] = xp[start];
  1736. X            yp[new_index] = yp[start];
  1737. X            isa_move[new_index] = isa_move[start];
  1738. X            new_index++;
  1739. X            if (start != i-1){
  1740. X                xp[new_index] = xp[i-1];
  1741. X                yp[new_index] = yp[i-1];
  1742. X                isa_move[new_index] = isa_move[i-1];
  1743. X                new_index++;
  1744. X            }
  1745. X            start = i;
  1746. X            /* this is the slope for the new run */
  1747. X            old_slope = slope;
  1748. X        }
  1749. X    }
  1750. X    /* copy the last point into the new array */
  1751. X    xp[new_index] = xp[old_size-1];
  1752. X    yp[new_index] = yp[old_size-1];
  1753. X    isa_move[new_index] = isa_move[old_size-1];
  1754. X    new_index++;
  1755. X    *sz = new_index;
  1756. X    return (old_size - *sz);
  1757. X}
  1758. X
  1759. X/* compacts the vector list by compressing runs of constant 
  1760. X   dx&dy into one vector
  1761. X   use this if floating point is too expensive!
  1762. X   more naive than compact_slope; doesn't compact as much as possible
  1763. X   returns the number of points eliminated */
  1764. Xint compact_int(xp,yp,isa_move,size)
  1765. Xint xp[],yp[], isa_move[], *size;
  1766. X{
  1767. X    int dx,dy,old_dx,old_dy,start,index,i,old_size;
  1768. X
  1769. X    start = index = 0;
  1770. X    old_dx = xp[1]-xp[0];
  1771. X    old_dy = yp[1]-yp[0];
  1772. X    for (i=2;i<*size;i++){
  1773. X        dx = xp[i]-xp[i-1];
  1774. X        dy = yp[i]-yp[i-1];
  1775. X        if ((abs(dx-old_dx)+abs(dy-old_dy)!=0)||(isa_move[i])){
  1776. X            /*  we've reached the end of a run */
  1777. X            xp[index] = xp[start];
  1778. X            yp[index] = yp[start];
  1779. X            isa_move[index] = isa_move[start];
  1780. X            index++;
  1781. X            if (start != i-1){
  1782. X                xp[index] = xp[i-1];
  1783. X                yp[index] = yp[i-1];
  1784. X                isa_move[index] = isa_move[i-1];
  1785. X                index++;
  1786. X            }
  1787. X            start = i;
  1788. X            old_dx = dx;
  1789. X            old_dy = dy;
  1790. X        }
  1791. X    }  /* end for */
  1792. X    /* include the last point */
  1793. X    xp[index] = xp[*size-1];
  1794. X    yp[index] = yp[*size-1];
  1795. X    isa_move[index] = isa_move[*size-1];
  1796. X    index++;
  1797. X    old_size = *size;
  1798. X    *size = index;
  1799. X    return(old_size - *size);
  1800. X}
  1801. X#endif
  1802. X
  1803. X#define COMPACT
  1804. X
  1805. END_OF_FILE
  1806.   if test 2493 -ne `wc -c <'gnuplot/term/compact.c'`; then
  1807.     echo shar: \"'gnuplot/term/compact.c'\" unpacked with wrong size!
  1808.   fi
  1809.   # end of 'gnuplot/term/compact.c'
  1810. fi
  1811. if test -f 'gnuplot/term/debug.trm' -a "${1}" != "-c" ; then 
  1812.   echo shar: Will not clobber existing file \"'gnuplot/term/debug.trm'\"
  1813. else
  1814.   echo shar: Extracting \"'gnuplot/term/debug.trm'\" \(2740 characters\)
  1815.   sed "s/^X//" >'gnuplot/term/debug.trm' <<'END_OF_FILE'
  1816. X/*
  1817. X * $Id: debug.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  1818. X *
  1819. X */
  1820. X
  1821. X/* GNUPLOT - debug.trm */
  1822. X/*
  1823. X * Copyright (C) 1990   
  1824. X *
  1825. X * Permission to use, copy, and distribute this software and its
  1826. X * documentation for any purpose with or without fee is hereby granted, 
  1827. X * provided that the above copyright notice appear in all copies and 
  1828. X * that both that copyright notice and this permission notice appear 
  1829. X * in supporting documentation.
  1830. X *
  1831. X * Permission to modify the software is granted, but not the right to
  1832. X * distribute the modified code.  Modifications are to be distributed 
  1833. X * as patches to released version.
  1834. X *  
  1835. X * This software  is provided "as is" without express or implied warranty.
  1836. X * 
  1837. X * This file is included by ../term.c.
  1838. X *
  1839. X * This terminal driver supports:
  1840. X *  DEBUG
  1841. X *
  1842. X * AUTHORS
  1843. X *    luecken@udel.edu
  1844. X * 
  1845. X * send your comments or suggestions to (luecken@udel.edu).
  1846. X * 
  1847. X */
  1848. X
  1849. X
  1850. X#define DEBUG_XMAX 512 
  1851. X#define DEBUG_YMAX 390
  1852. X
  1853. X#define DEBUG_XLAST (DEBUG_XMAX - 1)
  1854. X#define DEBUG_YLAST (DEBUG_XMAX - 1)
  1855. X
  1856. X/* Assume a character size of 1, or a 7 x 10 grid. */
  1857. X#define DEBUG_VCHAR    10
  1858. X#define DEBUG_HCHAR    7
  1859. X#define DEBUG_VTIC    (DEBUG_YMAX/70)        
  1860. X#define DEBUG_HTIC    (DEBUG_XMAX/75)        
  1861. Xint DEBUG_linetype_last;
  1862. Xint DEBUG_xlast;
  1863. Xint DEBUG_ylast;
  1864. X
  1865. XDEBUG_init()
  1866. X{
  1867. X    fprintf(outfile,"init\n");
  1868. X    DEBUG_linetype_last = -3;
  1869. X}
  1870. X
  1871. X
  1872. XDEBUG_graphics()
  1873. X{
  1874. X    DEBUG_xlast = DEBUG_ylast=0;
  1875. X    fprintf(outfile,"graphics\n");
  1876. X}
  1877. X
  1878. X
  1879. XDEBUG_text()
  1880. X{
  1881. X    fprintf(outfile,"text\n");
  1882. X}
  1883. X
  1884. X
  1885. XDEBUG_linetype(linetype)
  1886. Xint linetype;
  1887. X{
  1888. X    /*
  1889. X    if (linetype != DEBUG_linetype_last){
  1890. X        fprintf(outfile,"l%d",linetype);
  1891. X        DEBUG_linetype_last = linetype;
  1892. X    }
  1893. X    */
  1894. X    fprintf(outfile,"line %d\n",linetype);
  1895. X}
  1896. X
  1897. X
  1898. XDEBUG_move(x,y)
  1899. Xint x,y;
  1900. X{
  1901. X    /*
  1902. X    if (x != DEBUG_xlast || y != DEBUG_ylast){
  1903. X        fprintf(outfile,"mm");
  1904. X        DEBUG_xlast = x;
  1905. X        DEBUG_ylast = y;
  1906. X    }
  1907. X    */
  1908. X    fprintf(outfile,"move %d, %d\t(%d, %d)\n",x,y,x-DEBUG_xlast,y-DEBUG_ylast);
  1909. X    DEBUG_xlast = x;
  1910. X    DEBUG_ylast = y;
  1911. X}
  1912. X
  1913. X
  1914. XDEBUG_vector(x,y)
  1915. Xint x,y;
  1916. X{
  1917. X    /*
  1918. X    if (x != DEBUG_xlast || y != DEBUG_ylast){
  1919. X        fprintf(outfile,"vv");
  1920. X        DEBUG_xlast = x;
  1921. X        DEBUG_ylast = y;
  1922. X    }
  1923. X    */
  1924. X    fprintf(outfile,"vect %d, %d\t(%d, %d)\n",x,y,x-DEBUG_xlast,y-DEBUG_ylast);
  1925. X    DEBUG_xlast = x;
  1926. X    DEBUG_ylast = y;
  1927. X}
  1928. X
  1929. X
  1930. XDEBUG_put_text(x,y,str)
  1931. Xint x, y;
  1932. Xchar *str;
  1933. X{
  1934. X    /*
  1935. X    DEBUG_move(x,y);
  1936. X    fprintf(outfile,"tx%s\r",str);
  1937. X    */
  1938. X    fprintf(outfile,"put_text calls:");
  1939. X    DEBUG_move(x,y);
  1940. X    fprintf(outfile,"put_text '%s'\n",str);
  1941. X}
  1942. X
  1943. X
  1944. X
  1945. XDEBUG_reset()
  1946. X{
  1947. X    fprintf(outfile,"reset");
  1948. X}
  1949. X
  1950. XDEBUG_justify_text(mode)
  1951. Xint mode;
  1952. X{
  1953. X    fprintf(outfile,"justify ");
  1954. X    switch(mode){
  1955. X        case (CENTRE):
  1956. X            fprintf(outfile,"centre");
  1957. X            break;
  1958. X        case (RIGHT):
  1959. X            fprintf(outfile,"right");
  1960. X            break;
  1961. X        default:
  1962. X        case (LEFT):
  1963. X            fprintf(outfile,"left");
  1964. X            break;
  1965. X    }
  1966. X    fprintf(outfile,"\n");
  1967. X    return(TRUE);
  1968. X}
  1969. X
  1970. END_OF_FILE
  1971.   if test 2740 -ne `wc -c <'gnuplot/term/debug.trm'`; then
  1972.     echo shar: \"'gnuplot/term/debug.trm'\" unpacked with wrong size!
  1973.   fi
  1974.   # end of 'gnuplot/term/debug.trm'
  1975. fi
  1976. if test -f 'gnuplot/term/djsvga.trm' -a "${1}" != "-c" ; then 
  1977.   echo shar: Will not clobber existing file \"'gnuplot/term/djsvga.trm'\"
  1978. else
  1979.   echo shar: Extracting \"'gnuplot/term/djsvga.trm'\" \(2625 characters\)
  1980.   sed "s/^X//" >'gnuplot/term/djsvga.trm' <<'END_OF_FILE'
  1981. X/*
  1982. X * $Id: djsvga.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  1983. X */
  1984. X
  1985. X/* GNUPLOT - djsvga.trm */
  1986. X/*
  1987. X * Copyright (C) 1992
  1988. X *
  1989. X * Permission to use, copy, and distribute this software and its
  1990. X * documentation for any purpose with or without fee is hereby granted, 
  1991. X * provided that the above copyright notice appear in all copies and 
  1992. X * that both that copyright notice and this permission notice appear 
  1993. X * in supporting documentation.
  1994. X *
  1995. X * Permission to modify the software is granted, but not the right to
  1996. X * distribute the modified code.  Modifications are to be distributed 
  1997. X * as patches to released version.
  1998. X *
  1999. X * This software  is provided "as is" without express or implied warranty.
  2000. X *
  2001. X * This file is included by ../term.c.
  2002. X *
  2003. X * This terminal driver supports:
  2004. X *  svga
  2005. X *
  2006. X * AUTHORS
  2007. X *  Russell Lang
  2008. X *
  2009. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  2010. X *
  2011. X */
  2012. X
  2013. X/* SVGA driver using DJGPP */
  2014. X#include <graphics.h>
  2015. X#include <pc.h>
  2016. X
  2017. Xint dj_startx, dj_starty;
  2018. Xint dj_xlast, dj_ylast;
  2019. Xint dj_color;
  2020. X
  2021. X#define DJSVGA_XMAX 640
  2022. X#define DJSVGA_YMAX 480
  2023. X
  2024. X#define DJSVGA_XLAST (DJSVGA_XMAX - 1)
  2025. X#define DJSVGA_YLAST (DJSVGA_YMAX - 1)
  2026. X
  2027. X#define DJSVGA_VCHAR 16
  2028. X#define DJSVGA_HCHAR 8
  2029. X#define DJSVGA_VTIC 4
  2030. X#define DJSVGA_HTIC 4
  2031. X
  2032. X#define DJNUMCOLOR 15
  2033. Xstatic int svga256color[DJNUMCOLOR] = {7,8,2,3,4,5,9,14,12,15,13,10,11,1,6};
  2034. Xstatic int dj_colors[DJNUMCOLOR];
  2035. X
  2036. X
  2037. XDJSVGA_init()
  2038. X{
  2039. Xint i, on, r, g, b;
  2040. X    /* Allocate colors */
  2041. X    for (i=0; i<DJNUMCOLOR; i++) {
  2042. X        on = svga256color[i] & 8 ? 255 : 170;
  2043. X        r  = svga256color[i] & 4 ? on : 0;
  2044. X        g  = svga256color[i] & 2 ? on : 0;
  2045. X        b  = svga256color[i] & 1 ? on : 0;
  2046. X        if (svga256color[i] == 8) r=g=b=85;
  2047. X        dj_colors[i] = GrAllocColor(r,g,b);
  2048. X    }
  2049. X    /* Get the screen size: */
  2050. X    GrSetMode(GR_default_graphics,0,0); /* */
  2051. X    dj_xlast = GrMaxX();
  2052. X        term_tbl[term].xmax = dj_xlast + 1;
  2053. X    dj_ylast = GrMaxY();
  2054. X        term_tbl[term].ymax = dj_ylast + 1;
  2055. X    GrSetMode(GR_default_text,0,0); /* */
  2056. X}
  2057. X
  2058. XDJSVGA_graphics()
  2059. X{
  2060. X    GrSetMode(GR_default_graphics,0,0);
  2061. X}
  2062. X
  2063. XDJSVGA_text()
  2064. X{
  2065. X    (void)getkey();
  2066. X    GrSetMode(GR_default_text,0,0);
  2067. X}
  2068. X
  2069. XDJSVGA_reset()
  2070. X{
  2071. Xint i;
  2072. X    /* Free colors */
  2073. X    for (i=0; i<DJNUMCOLOR; i++) {
  2074. X        GrFreeColor(dj_colors[i]);
  2075. X    }
  2076. X}
  2077. X
  2078. XDJSVGA_linetype(linetype)
  2079. Xint linetype;
  2080. X{
  2081. X    if (linetype >= 13)
  2082. X        linetype %= 13;
  2083. X    dj_color = dj_colors[linetype+2];
  2084. X}
  2085. X
  2086. XDJSVGA_move(x,y)
  2087. Xunsigned int x,y;
  2088. X{
  2089. X    dj_startx = x;
  2090. X    dj_starty = y;
  2091. X}
  2092. X
  2093. X
  2094. XDJSVGA_vector(x,y)
  2095. Xunsigned int x,y;
  2096. X{
  2097. X    GrLine(dj_startx,dj_ylast-dj_starty,x,dj_ylast-y,dj_color);
  2098. X    dj_startx = x;
  2099. X    dj_starty = y;
  2100. X}
  2101. X
  2102. X
  2103. XDJSVGA_put_text(x,y,str)
  2104. Xunsigned int x, y;
  2105. Xchar *str;
  2106. X{
  2107. X    GrTextXY(x,dj_ylast-y-DJSVGA_VCHAR/2,str,dj_color,GrNOCOLOR);
  2108. X}
  2109. X
  2110. END_OF_FILE
  2111.   if test 2625 -ne `wc -c <'gnuplot/term/djsvga.trm'`; then
  2112.     echo shar: \"'gnuplot/term/djsvga.trm'\" unpacked with wrong size!
  2113.   fi
  2114.   # end of 'gnuplot/term/djsvga.trm'
  2115. fi
  2116. if test -f 'gnuplot/term/kyo.trm' -a "${1}" != "-c" ; then 
  2117.   echo shar: Will not clobber existing file \"'gnuplot/term/kyo.trm'\"
  2118. else
  2119.   echo shar: Extracting \"'gnuplot/term/kyo.trm'\" \(2377 characters\)
  2120.   sed "s/^X//" >'gnuplot/term/kyo.trm' <<'END_OF_FILE'
  2121. X/*
  2122. X * $Id: kyo.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  2123. X *
  2124. X */
  2125. X
  2126. X/* Prescribe (KYOCERA) driver - Michael Waldor */
  2127. X/* Modified for gnuplot 2.0 sk@sun4 24-Apr-1990 13:23 */
  2128. X#ifdef PRESCRIBE
  2129. X
  2130. X#define PRE_XMAX 2567
  2131. X#define PRE_YMAX 1815    /* X:Y = sqrt(2) */
  2132. X
  2133. X#define PRE_XLAST (PRE_XMAX - 1)
  2134. X#define PRE_YLAST (PRE_YMAX - 1)
  2135. X
  2136. X#define PRE_VCHAR (PRE_YMAX/30)
  2137. X#define PRE_HCHAR 33    /* about 9 chars per inch */
  2138. X#define PRE_HTIC (PRE_XMAX/80)
  2139. X#define PRE_VTIC PRE_HTIC
  2140. X
  2141. X/* for Courier font: */
  2142. X#define KYO_VCHAR (14*(300/72))    /* 12 pt + 2 pt baselineskip */
  2143. X#define KYO_HCHAR (300/10)    /*  10 chars per inch */
  2144. X
  2145. Xenum JUSTIFY pre_justify=LEFT;    /* text is flush left */
  2146. X
  2147. XPRE_init()
  2148. X{
  2149. X  (void) fprintf(outfile,"!R! RES;\n") ;
  2150. X  /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
  2151. X  /* SPO: landscape format */
  2152. X  /* STM, SLM set top, left margin*/
  2153. X  /* Font: bold Helvetica (proportional font) */
  2154. X  (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
  2155. X  (void) fprintf(outfile,"FTMD 15; FONT 29; SCPI 9;\n") ;
  2156. X}
  2157. X
  2158. XKYO_init()
  2159. X{
  2160. X  (void) fprintf(outfile,"!R! RES;\n") ;
  2161. X  /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
  2162. X  /* SPO: landscape format */
  2163. X  /* STM, SLM set top, left margin */
  2164. X  /* Font: Courier (fixed width font) */
  2165. X  (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
  2166. X  (void) fprintf(outfile,"FTMD 15; FONT 17; SCPI 10;\n") ;
  2167. X}
  2168. X
  2169. XPRE_graphics()
  2170. X{
  2171. X}
  2172. X
  2173. XPRE_text()            /* eject page after each plot */
  2174. X{
  2175. X  (void) fprintf(outfile,"PAGE;\n") ; 
  2176. X}
  2177. X
  2178. XPRE_linetype(linetype)
  2179. Xint linetype ;
  2180. X{
  2181. X  /* actually choose pendiameter */
  2182. X  if (linetype < 0) linetype = -linetype;
  2183. X  else linetype = 3;
  2184. X  (void) fprintf(outfile,"SPD %d;\n", linetype) ;
  2185. X}
  2186. XPRE_move(x,y)
  2187. Xunsigned int x,y ;
  2188. X{
  2189. X  (void) fprintf(outfile,"MAP %1d,%1d;\n",x,PRE_YMAX-y) ;
  2190. X}
  2191. XPRE_vector(x,y)
  2192. Xunsigned int x,y ;
  2193. X{
  2194. X  (void) fprintf(outfile,"DAP %1d, %1d;\n",x,PRE_YMAX-y) ;
  2195. X}
  2196. XPRE_put_text(x, y, str)
  2197. Xunsigned int x,y ;
  2198. Xchar *str;
  2199. X{
  2200. X  PRE_move(x,y);
  2201. X  switch(pre_justify){
  2202. X  case RIGHT:
  2203. X    (void) fprintf(outfile,"RTXT \"%s\", B;\n",str) ;
  2204. X    break;
  2205. X  default:
  2206. X    (void) fprintf(outfile,"TEXT \"%s\", B;\n",str) ;
  2207. X  }
  2208. X}
  2209. Xint PRE_justify_text(mode)
  2210. Xenum JUSTIFY mode;
  2211. X{
  2212. X  pre_justify=mode;
  2213. X  switch(pre_justify){
  2214. X  case LEFT:
  2215. X  case RIGHT:
  2216. X    return(TRUE);
  2217. X  default:
  2218. X    return(FALSE);
  2219. X  }
  2220. X  
  2221. X}
  2222. X
  2223. XPRE_reset()
  2224. X{
  2225. X  (void) fprintf(outfile,"PAGE; RES; EXIT;\n");
  2226. X}
  2227. X
  2228. X#endif /* PRESCRIBE */
  2229. END_OF_FILE
  2230.   if test 2377 -ne `wc -c <'gnuplot/term/kyo.trm'`; then
  2231.     echo shar: \"'gnuplot/term/kyo.trm'\" unpacked with wrong size!
  2232.   fi
  2233.   # end of 'gnuplot/term/kyo.trm'
  2234. fi
  2235. if test -f 'gnuplot/term/mgr.trm' -a "${1}" != "-c" ; then 
  2236.   echo shar: Will not clobber existing file \"'gnuplot/term/mgr.trm'\"
  2237. else
  2238.   echo shar: Extracting \"'gnuplot/term/mgr.trm'\" \(2724 characters\)
  2239.   sed "s/^X//" >'gnuplot/term/mgr.trm' <<'END_OF_FILE'
  2240. X/* GNUPLOT - mgr.trm */
  2241. X/*
  2242. X * This file is included by ../term.c.
  2243. X *
  2244. X * This terminal driver supports:
  2245. X *  Mgr window system, color display
  2246. X *
  2247. X * AUTHOR
  2248. X *  Vincent Broman, broman@nosc.mil
  2249. X */
  2250. X
  2251. X#undef ESC
  2252. X#include <term.h>    /* from Mgr, not gnuplot */
  2253. X
  2254. X
  2255. X#define MGR_XMAX 640
  2256. X#define MGR_YMAX 400
  2257. X#define MGR_VCHAR 16
  2258. X#define MGR_HCHAR 8
  2259. X#define MGR_VTIC 4
  2260. X#define MGR_HTIC 4
  2261. X
  2262. Xstatic int MGR_border = 5;
  2263. Xstatic int MGR_winnbr = 0;
  2264. X
  2265. Xstatic int MGR_rowcount = 24;
  2266. Xstatic int MGR_winwidth = MGR_XMAX;
  2267. Xstatic int MGR_winheight = MGR_YMAX;
  2268. Xstatic int MGR_vchar = MGR_VCHAR;
  2269. Xstatic int MGR_hchar = MGR_HCHAR;
  2270. X
  2271. X
  2272. XMGR_init()
  2273. X{
  2274. Xchar res[300];
  2275. Xint winnbr;
  2276. Xint w, h, bor;
  2277. X
  2278. X    m_setup( 0);
  2279. X    m_ttyset();
  2280. X
  2281. X    m_getinfo( G_SYSTEM);
  2282. X    if( m_gets( res) && sscanf( res, "%*s%d%d%d", &w, &h, &bor) == 3)
  2283. X        MGR_border = bor;
  2284. X
  2285. X    m_newwin( 0, 0, MGR_winwidth+2*MGR_border, MGR_winheight+2*MGR_border);
  2286. X    if( m_gets( res) && sscanf( res, "%d", &winnbr) == 1)
  2287. X        MGR_winnbr = winnbr;
  2288. X        /* if no alt window is created, then the main window is used */
  2289. X        /* and if size is different, term_tbl updated later */
  2290. X    m_selectwin( MGR_winnbr);
  2291. X    m_setmode( M_ABS);
  2292. X
  2293. X    m_getinfo( G_FONT);
  2294. X    if( m_gets( res) && sscanf( res, "%d %d", &w, &h) == 2) {
  2295. X        MGR_vchar = h;
  2296. X        MGR_hchar = w;
  2297. X    }
  2298. X    m_ttyreset();
  2299. X
  2300. X    term_tbl[term].v_char = MGR_vchar;
  2301. X    term_tbl[term].h_char = MGR_hchar;
  2302. X    term_tbl[term].v_tic = MGR_vchar / 4;
  2303. X    term_tbl[term].h_tic = MGR_hchar / 2;
  2304. X
  2305. X    m_selectwin( 0);
  2306. X    m_flush();
  2307. X}
  2308. X
  2309. X
  2310. XMGR_graphics()
  2311. X{
  2312. Xchar res[32];
  2313. Xint c, r, w, h;
  2314. X
  2315. X    m_selectwin( MGR_winnbr);
  2316. X    m_setmode( M_ACTIVATE);
  2317. X    m_clear();
  2318. X
  2319. X    /* we permit the user to reshape the window arbitrarily.
  2320. X       do_plot calls boundary to recheck the term_tbl for each plot */
  2321. X    m_ttyset();
  2322. X    m_getinfo( G_WINSIZE);
  2323. X    if( m_gets( res) && sscanf( res, "%d %d", &c, &r) == 2)
  2324. X        MGR_rowcount = r;
  2325. X    m_getinfo( G_COORDS);
  2326. X    if( m_gets( res) && sscanf( res, "%d %d %d %d", &c, &r, &w, &h) == 4) {
  2327. X        term_tbl[term].xmax = MGR_winwidth = w;
  2328. X        term_tbl[term].ymax = MGR_winheight = h;
  2329. X    }
  2330. X    m_ttyreset();
  2331. X    m_flush();
  2332. X}
  2333. X
  2334. X
  2335. XMGR_text()
  2336. X{
  2337. X    m_go( 0, 0);
  2338. X    m_aligntext();
  2339. X    if( MGR_winnbr == 0)
  2340. X        m_move( 0, MGR_rowcount - 1);
  2341. X    m_selectwin( 0);
  2342. X    m_flush();
  2343. X}
  2344. X
  2345. X
  2346. XMGR_linetype( linetype)
  2347. Xint     linetype;
  2348. X{
  2349. X/*
  2350. X * this mapping of colors is intended for a color sun on which
  2351. X * colors 0-23 are defined, 0 is white, 1 is black.
  2352. X */
  2353. X    m_linecolor( B_SRC, (linetype < 0)? 1: (2 + (linetype % 22)));
  2354. X}
  2355. X
  2356. X
  2357. XMGR_move( x, y)
  2358. Xint x, y;
  2359. X{
  2360. X    m_go( x, MGR_winheight - 1 - y);
  2361. X}
  2362. X
  2363. X
  2364. XMGR_vector( x, y)
  2365. Xint x, y;
  2366. X{
  2367. X    m_draw( x, MGR_winheight - 1 - y);
  2368. X}
  2369. X
  2370. X
  2371. XMGR_put_text( x, y, str)
  2372. Xint x, y;
  2373. Xchar *str;
  2374. X{
  2375. X    MGR_move( x, y - MGR_vchar/2);
  2376. X    m_aligntext();
  2377. X    m_printstr( str);
  2378. X}
  2379. X
  2380. X
  2381. XMGR_reset()
  2382. X{
  2383. X    m_destroywin( MGR_winnbr);
  2384. X    MGR_winnbr = 0;
  2385. X    m_setmode( M_ACTIVATE);
  2386. X    m_flush();
  2387. X}
  2388. END_OF_FILE
  2389.   if test 2724 -ne `wc -c <'gnuplot/term/mgr.trm'`; then
  2390.     echo shar: \"'gnuplot/term/mgr.trm'\" unpacked with wrong size!
  2391.   fi
  2392.   # end of 'gnuplot/term/mgr.trm'
  2393. fi
  2394. if test -f 'gnuplot/term/v384.trm' -a "${1}" != "-c" ; then 
  2395.   echo shar: Will not clobber existing file \"'gnuplot/term/v384.trm'\"
  2396. else
  2397.   echo shar: Extracting \"'gnuplot/term/v384.trm'\" \(2651 characters\)
  2398.   sed "s/^X//" >'gnuplot/term/v384.trm' <<'END_OF_FILE'
  2399. X/*
  2400. X * $Id: v384.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  2401. X *
  2402. X */
  2403. X
  2404. X/* GNUPLOT - v384.trm */
  2405. X/*
  2406. X * Copyright (C) 1990 - 1993   
  2407. X *
  2408. X * Permission to use, copy, and distribute this software and its
  2409. X * documentation for any purpose with or without fee is hereby granted, 
  2410. X * provided that the above copyright notice appear in all copies and 
  2411. X * that both that copyright notice and this permission notice appear 
  2412. X * in supporting documentation.
  2413. X *
  2414. X * Permission to modify the software is granted, but not the right to
  2415. X * distribute the modified code.  Modifications are to be distributed 
  2416. X * as patches to released version.
  2417. X *  
  2418. X * This software  is provided "as is" without express or implied warranty.
  2419. X * 
  2420. X * This file is included by ../term.c.
  2421. X *
  2422. X * This terminal driver supports:
  2423. X *  Vectrix 384 - works with tandy color printer as well
  2424. X *
  2425. X * AUTHORS
  2426. X *   roland@moncskermit.OZ (Roland Yap) 
  2427. X * 
  2428. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  2429. X * 
  2430. X */
  2431. X
  2432. X/*
  2433. X *    Vectrix 384 driver - works with tandy color printer as well
  2434. X *  in reverse printing 8 color mode.
  2435. X *  This doesn't work on Vectrix 128 because it redefines the
  2436. X *  color table. It can be hacked to work on the 128 by changing
  2437. X *  the colours but then it will probably not print best. The color
  2438. X *  table is purposely designed so that it will print well
  2439. X *
  2440. X */
  2441. X
  2442. X#define V384_XMAX 630
  2443. X#define V384_YMAX 480
  2444. X
  2445. X#define V384_XLAST (V384_XMAX - 1)
  2446. X#define V384_YLAST (V384_YMAX - 1)
  2447. X
  2448. X#define V384_VCHAR    12
  2449. X#define V384_HCHAR    7
  2450. X#define V384_VTIC    8
  2451. X#define V384_HTIC    7
  2452. X
  2453. X
  2454. XV384_init()
  2455. X{
  2456. X    fprintf(outfile,"%c%c  G0   \n",27,18);
  2457. X    fprintf(outfile,"Q 0 8\n");
  2458. X    fprintf(outfile,"0 0 0\n");
  2459. X    fprintf(outfile,"255 0 0\n");
  2460. X    fprintf(outfile,"0 255 0\n");
  2461. X    fprintf(outfile,"0 0 255\n");
  2462. X    fprintf(outfile,"0 255 255\n");
  2463. X    fprintf(outfile,"255 0 255\n");
  2464. X    fprintf(outfile,"255 255 0\n");
  2465. X    fprintf(outfile,"255 255 255\n");
  2466. X}
  2467. X
  2468. X
  2469. XV384_graphics()
  2470. X{
  2471. X    fprintf(outfile,"%c%c E0 RE N 65535\n",27,18);
  2472. X}
  2473. X
  2474. X
  2475. XV384_text()
  2476. X{
  2477. X    fprintf(outfile,"%c%c\n",27,17);
  2478. X}
  2479. X
  2480. X
  2481. XV384_linetype(linetype)
  2482. Xint linetype;
  2483. X{
  2484. Xstatic int color[]= {
  2485. X        1 /* red */,
  2486. X        2 /* green */,
  2487. X        3 /* blue */,
  2488. X        4 /* cyan */,
  2489. X        5 /* magenta */,
  2490. X        6 /* yellow */, /* not a good color so not in use at the moment */
  2491. X        7 /* white */
  2492. X    };
  2493. X        
  2494. X    if (linetype < 0)
  2495. X        linetype=6;
  2496. X    else
  2497. X        linetype %= 5;
  2498. X    fprintf(outfile,"C %d\n",color[linetype]);
  2499. X}
  2500. X
  2501. X
  2502. XV384_move(x,y)
  2503. Xunsigned int x,y;
  2504. X{
  2505. X    fprintf(outfile,"M %d %d\n",x+20,y);
  2506. X}
  2507. X
  2508. X
  2509. XV384_vector(x,y)
  2510. Xunsigned int x,y;
  2511. X{
  2512. X    fprintf(outfile,"L %d %d\n",x+20,y);
  2513. X}
  2514. X
  2515. X
  2516. XV384_put_text (x, y, str)
  2517. Xunsigned int x, y;
  2518. Xchar str[];
  2519. X{
  2520. X    V384_move (x, y + V384_VCHAR/2);
  2521. X    fprintf (outfile, "$%s\n", str);
  2522. X}
  2523. X
  2524. X
  2525. XV384_reset()
  2526. X{
  2527. X}
  2528. X
  2529. END_OF_FILE
  2530.   if test 2651 -ne `wc -c <'gnuplot/term/v384.trm'`; then
  2531.     echo shar: \"'gnuplot/term/v384.trm'\" unpacked with wrong size!
  2532.   fi
  2533.   # end of 'gnuplot/term/v384.trm'
  2534. fi
  2535. if test -f 'gnuplot/win/geticon.c' -a "${1}" != "-c" ; then 
  2536.   echo shar: Will not clobber existing file \"'gnuplot/win/geticon.c'\"
  2537. else
  2538.   echo shar: Extracting \"'gnuplot/win/geticon.c'\" \(2306 characters\)
  2539.   sed "s/^X//" >'gnuplot/win/geticon.c' <<'END_OF_FILE'
  2540. X#ifndef lint
  2541. Xstatic char *RCSid = "$Id: geticon.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
  2542. X#endif
  2543. X
  2544. X/* geticon.c */
  2545. X/* extract Borland ascii format icons from resource script */
  2546. X/* and write as Microsoft binary format .ICO files */
  2547. X/* Russell Lang 1992-12-20 */
  2548. X
  2549. X#include <stdio.h>
  2550. X#include <stdlib.h>
  2551. X#include <string.h>
  2552. X#include <ctype.h>
  2553. X
  2554. X#define MAXLINE 255
  2555. XFILE *rcfile;
  2556. Xchar inline[MAXLINE+1];
  2557. Xchar *tok1, *tok2, *tok3;
  2558. Xchar *p;
  2559. Xchar iconname[MAXLINE+1];
  2560. XFILE *iconfile;
  2561. Xint line;
  2562. X
  2563. Xint htoi(char ch)
  2564. X{
  2565. X    ch = toupper(ch);
  2566. X    if (ch < '0')
  2567. X        return(0);
  2568. X    else if (ch <= '9')
  2569. X        return((int)(ch - '0'));
  2570. X    else if (ch < 'A')
  2571. X        return(0);
  2572. X    else if (ch <= 'F')
  2573. X        return((int)(ch - 'A' + 10));
  2574. X    return(0);
  2575. X}
  2576. X
  2577. Xvoid
  2578. Xgeticon(void)
  2579. X{
  2580. Xchar ch;
  2581. X    fgets(inline,MAXLINE,rcfile);
  2582. X    line++;
  2583. X    if (strncmp(inline,"BEGIN",5)) {
  2584. X        fprintf(stderr,"Expecting BEGIN at line %d\n",line);
  2585. X        exit(3);
  2586. X    }
  2587. X    if ( (iconfile = fopen(iconname,"wb")) == (FILE *)NULL) {
  2588. X        fprintf(stderr,"Can't open ICON file %s\n",iconname);
  2589. X        exit(4);
  2590. X    }
  2591. X    fgets(inline,MAXLINE,rcfile);
  2592. X    line++;
  2593. X    while (strncmp(inline,"END",3) && !feof(rcfile)) {
  2594. X        for (p = inline; *p && (*p==' ' || *p == '\t' || *p=='\''); p++);
  2595. X        while (isxdigit(*p)) {
  2596. X            ch = htoi(*p++)<<4;
  2597. X            ch += htoi(*p++);
  2598. X            fputc(ch, iconfile);
  2599. X            p++;
  2600. X        }
  2601. X        fgets(inline,MAXLINE,rcfile);
  2602. X        line++;
  2603. X    }
  2604. X    fclose(iconfile);
  2605. X}
  2606. X
  2607. Xint
  2608. Xmain(int argc, char *argv[])
  2609. X{
  2610. X    if ((argc < 2) || (argc > 3)) {
  2611. X    fprintf(stderr,"Usage:  geticon  resource_file [icon_directory]\n");
  2612. X    return(1);
  2613. X    }
  2614. X    if ( (rcfile = fopen(argv[1],"r")) == (FILE *)NULL) {
  2615. X    fprintf(stderr,"Can't open RC file\n");
  2616. X    return(2);
  2617. X    }
  2618. X    line = 0;
  2619. X    while (fgets(inline,MAXLINE,rcfile)) {
  2620. X        line++;
  2621. X    tok1 = strtok(inline," \t\r\n");
  2622. X    tok2 = strtok(NULL," \t\r\n");
  2623. X    tok3 = strtok(NULL," \t\r\n");
  2624. X    if (tok2 && !strcmp(tok2,"ICON") && (tok3 == (char *)NULL)) {
  2625. X            iconname[0] = '\0';
  2626. X        if (argc == 3) {
  2627. X                strcpy(iconname,argv[2]);
  2628. X                strcat(iconname,"\\");
  2629. X            }
  2630. X            strcat(iconname,tok1);
  2631. X            strcat(iconname,".ico");
  2632. X        fprintf(stdout,"%s\n",iconname);
  2633. X        geticon();
  2634. X    }
  2635. X    }
  2636. X    return (0);
  2637. X}
  2638. END_OF_FILE
  2639.   if test 2306 -ne `wc -c <'gnuplot/win/geticon.c'`; then
  2640.     echo shar: \"'gnuplot/win/geticon.c'\" unpacked with wrong size!
  2641.   fi
  2642.   # end of 'gnuplot/win/geticon.c'
  2643. fi
  2644. if test -f 'gnuplot/win/wgnuplib.c' -a "${1}" != "-c" ; then 
  2645.   echo shar: Will not clobber existing file \"'gnuplot/win/wgnuplib.c'\"
  2646. else
  2647.   echo shar: Extracting \"'gnuplot/win/wgnuplib.c'\" \(2927 characters\)
  2648.   sed "s/^X//" >'gnuplot/win/wgnuplib.c' <<'END_OF_FILE'
  2649. X#ifndef lint
  2650. Xstatic char *RCSid = "$Id: wgnuplib.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
  2651. X#endif
  2652. X
  2653. X/* GNUPLOT - win/wgnuplib.c */
  2654. X/*
  2655. X * Copyright (C) 1992   Russell Lang
  2656. X *
  2657. X * Permission to use, copy, and distribute this software and its
  2658. X * documentation for any purpose with or without fee is hereby granted, 
  2659. X * provided that the above copyright notice appear in all copies and 
  2660. X * that both that copyright notice and this permission notice appear 
  2661. X * in supporting documentation.
  2662. X *
  2663. X * Permission to modify the software is granted, but not the right to
  2664. X * distribute the modified code.  Modifications are to be distributed 
  2665. X * as patches to released version.
  2666. X *  
  2667. X * This software is provided "as is" without express or implied warranty.
  2668. X * 
  2669. X *
  2670. X * AUTHORS
  2671. X * 
  2672. X *   Russell Lang
  2673. X * 
  2674. X * Send your comments or suggestions to 
  2675. X *  info-gnuplot@dartmouth.edu.
  2676. X * This is a mailing list; to join it send a note to 
  2677. X *  info-gnuplot-request@dartmouth.edu.  
  2678. X * Send bug reports to
  2679. X *  bug-gnuplot@dartmouth.edu.
  2680. X */
  2681. X
  2682. X#define STRICT
  2683. X#include <windows.h>
  2684. X#include <windowsx.h>
  2685. X#include <ctype.h>
  2686. X#include "wgnuplib.h"
  2687. X#include "wresourc.h"
  2688. X#include "wcommon.h"
  2689. X
  2690. XHINSTANCE hdllInstance;
  2691. XLPSTR szParentClass = "wgnuplot_parent";
  2692. XLPSTR szTextClass = "wgnuplot_text";
  2693. XLPSTR szPauseClass = "wgnuplot_pause";
  2694. XLPSTR szGraphClass = "wgnuplot_graph";
  2695. X
  2696. X/* Window ID */
  2697. Xstruct WID {
  2698. X    BOOL       used;
  2699. X    HWND       hwnd;
  2700. X    void FAR * ptr;
  2701. X};
  2702. Xstruct WID *widptr = NULL;
  2703. Xunsigned int nwid = 0;
  2704. XHLOCAL hwid = 0;
  2705. X
  2706. X#ifdef __DLL__
  2707. Xint WDPROC
  2708. XLibMain(HINSTANCE hInstance, WORD wDataSeg, WORD wHeapSize, LPSTR lpszCmdLine)
  2709. X{
  2710. X    hdllInstance = hInstance;
  2711. X    return 1;
  2712. X}
  2713. X
  2714. Xint WDPROC
  2715. XWEP(int nParam)
  2716. X{
  2717. X    return 1;
  2718. X}
  2719. X
  2720. XBOOL WDPROC
  2721. XCheckWGNUPLOTVersion(LPSTR str)
  2722. X{
  2723. Xchar mess[256];
  2724. XLPSTR version;
  2725. X    version = WGNUPLOTVERSION;
  2726. X    if (lstrcmp(str,version)) {
  2727. X        wsprintf(mess,"Incorrect DLL version\nExpected version   %s\nThis is version   %s",str,version);
  2728. X        MessageBox(NULL, mess , "WGNUPLOT.DLL", MB_OK | MB_ICONSTOP | MB_TASKMODAL);
  2729. X        return TRUE;
  2730. X    }
  2731. X    return FALSE;    /* Correct version */
  2732. X}
  2733. X#endif /* __DLL__ */
  2734. X
  2735. Xvoid NEAR *
  2736. XLocalAllocPtr(UINT flags, UINT size)
  2737. X{
  2738. XHLOCAL hlocal;
  2739. X    hlocal = LocalAlloc(flags, size+1);
  2740. X    return (char *)LocalLock(hlocal);
  2741. X}
  2742. X
  2743. Xvoid
  2744. XLocalFreePtr(void NEAR *ptr)
  2745. X{
  2746. XHLOCAL hlocal;
  2747. X    hlocal = LocalHandle(ptr);
  2748. X    LocalUnlock(hlocal);
  2749. X    LocalFree(hlocal);
  2750. X    return;
  2751. X}
  2752. X
  2753. X
  2754. X/* ascii to int */
  2755. X/* returns:
  2756. X *  A pointer to character past int if successful,
  2757. X *  otherwise NULL on failure.
  2758. X *  convert int is stored at pval.
  2759. X */
  2760. XLPSTR
  2761. XGetInt(LPSTR str, LPINT pval)
  2762. X{
  2763. Xint val = 0;
  2764. XBOOL negative = FALSE;
  2765. XBOOL success = FALSE;
  2766. Xint ch;
  2767. X    if (!str)
  2768. X        return NULL;
  2769. X    while ( (ch = *str)!=0 && isspace(ch) )
  2770. X        str++;
  2771. X    if (ch == '-') {
  2772. X        negative = TRUE;
  2773. X        str++;
  2774. X    }
  2775. X    while ( (ch = *str)!=0 && isdigit(ch) ) {
  2776. X        success = TRUE;
  2777. X        val = val * 10 + (ch - '0');
  2778. X        str++;
  2779. X    }
  2780. X    if (success) {
  2781. X        if (negative)
  2782. X            val = -val;
  2783. X        *pval = val;
  2784. X        return str;
  2785. X    }
  2786. X    return NULL;
  2787. X}
  2788. X
  2789. END_OF_FILE
  2790.   if test 2927 -ne `wc -c <'gnuplot/win/wgnuplib.c'`; then
  2791.     echo shar: \"'gnuplot/win/wgnuplib.c'\" unpacked with wrong size!
  2792.   fi
  2793.   # end of 'gnuplot/win/wgnuplib.c'
  2794. fi
  2795. if test -f 'gnuplot/win/wtext.h' -a "${1}" != "-c" ; then 
  2796.   echo shar: Will not clobber existing file \"'gnuplot/win/wtext.h'\"
  2797. else
  2798.   echo shar: Extracting \"'gnuplot/win/wtext.h'\" \(2831 characters\)
  2799.   sed "s/^X//" >'gnuplot/win/wtext.h' <<'END_OF_FILE'
  2800. X/*
  2801. X * $Id: wtext.h%v 3.50 1993/07/09 05:35:24 woo Exp $
  2802. X */
  2803. X
  2804. X/* GNUPLOT - win/wtext.h */
  2805. X/*
  2806. X * Copyright (C) 1992   Russell Lang
  2807. X *
  2808. X * Permission to use, copy, and distribute this software and its
  2809. X * documentation for any purpose with or without fee is hereby granted, 
  2810. X * provided that the above copyright notice appear in all copies and 
  2811. X * that both that copyright notice and this permission notice appear 
  2812. X * in supporting documentation.
  2813. X *
  2814. X * Permission to modify the software is granted, but not the right to
  2815. X * distribute the modified code.  Modifications are to be distributed 
  2816. X * as patches to released version.
  2817. X *  
  2818. X * This software is provided "as is" without express or implied warranty.
  2819. X * 
  2820. X *
  2821. X * AUTHORS
  2822. X * 
  2823. X *   Russell Lang
  2824. X * 
  2825. X * Send your comments or suggestions to 
  2826. X *  info-gnuplot@dartmouth.edu.
  2827. X * This is a mailing list; to join it send a note to 
  2828. X *  info-gnuplot-request@dartmouth.edu.  
  2829. X * Send bug reports to
  2830. X *  bug-gnuplot@dartmouth.edu.
  2831. X */
  2832. X
  2833. X/* redefine functions that can talk to tty devices, to use 
  2834. X * implementation in winmain.c/wgnuplot.dll */
  2835. X
  2836. X#define kbhit()  MyKBHit()
  2837. X#define getche() MyGetChE()
  2838. X#define getch()  MyGetCh()
  2839. X#define putch(ch)  MyPutCh(ch)
  2840. X
  2841. X#define fgetc(file) MyFGetC(file)
  2842. X#undef  getchar
  2843. X#define getchar()   MyFGetC(stdin)
  2844. X#undef  getc
  2845. X#define getc(file)  MyFGetC(file)
  2846. X#define fgets(str,sz,file)  MyFGetS(str,sz,file)
  2847. X#define gets(str)          MyGetS(str)
  2848. X
  2849. X#define fputc(ch,file) MyFPutC(ch,file)
  2850. X#undef  putchar
  2851. X#define putchar(ch)    MyFPutC(ch,stdout)
  2852. X#undef  putc
  2853. X#define putc(ch,file)  MyFPutC(ch,file)
  2854. X#define fputs(str,file)  MyFPutS(str,file)
  2855. X#define puts(str)        MyPutS(str)
  2856. X
  2857. X#define fprintf MyFPrintF
  2858. X#define printf MyPrintF
  2859. X
  2860. X#define fwrite(ptr, size, n, stream) MyFWrite(ptr, size, n, stream)
  2861. X#define fread(ptr, size, n, stream) MyFRead(ptr, size, n, stream)
  2862. X
  2863. X/* now cause errors for some unimplemented functions */
  2864. X
  2865. X#define vprintf dontuse_vprintf
  2866. X#define vfprintf dontuse_vfprintf
  2867. X#define fscanf dontuse_fscanf
  2868. X#define scanf dontuse_scanf
  2869. X#define clreol dontuse_clreol
  2870. X#define clrscr dontuse_clrscr
  2871. X#define gotoxy dontuse_gotoxy
  2872. X#define wherex dontuse_wherex
  2873. X#define wherey dontuse_wherey
  2874. X#define cgets dontuse_cgets
  2875. X#define cprintf dontuse_cprintf
  2876. X#define cputs dontuse_cputs
  2877. X#define cscanf dontuse_cscanf
  2878. X#define ungetch dontuse_ungetch
  2879. X
  2880. X/* now for the prototypes */
  2881. X
  2882. Xint MyPutCh(int ch);
  2883. Xint MyKBHit(void);
  2884. Xint MyGetCh(void);
  2885. Xint MyGetChE(void);
  2886. Xint MyFGetC(FILE *file);
  2887. Xchar * MyGetS(char *str);
  2888. Xchar * MyFGetS(char *str, unsigned int size, FILE *file);
  2889. Xint MyFPutC(int ch, FILE *file);
  2890. Xint MyFPutS(char *str, FILE *file);
  2891. Xint MyPutS(char *str);
  2892. Xint MyFPrintF(FILE *file, char *fmt, ...);
  2893. Xint MyPrintF(char *fmt, ...);
  2894. Xsize_t MyFWrite(const void *ptr, size_t size, size_t n, FILE *stream);
  2895. Xsize_t MyFRead(void *ptr, size_t size, size_t n, FILE *stream);
  2896. X
  2897. END_OF_FILE
  2898.   if test 2831 -ne `wc -c <'gnuplot/win/wtext.h'`; then
  2899.     echo shar: \"'gnuplot/win/wtext.h'\" unpacked with wrong size!
  2900.   fi
  2901.   # end of 'gnuplot/win/wtext.h'
  2902. fi
  2903. echo shar: End of archive 31 \(of 33\).
  2904. cp /dev/null ark31isdone
  2905. MISSING=""
  2906. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  2907.     if test ! -f ark${I}isdone ; then
  2908.     MISSING="${MISSING} ${I}"
  2909.     fi
  2910. done
  2911. if test "${MISSING}" = "" ; then
  2912.     echo You have unpacked all 33 archives.
  2913.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2914. else
  2915.     echo You still must unpack the following archives:
  2916.     echo "        " ${MISSING}
  2917. fi
  2918. exit 0
  2919. exit 0 # Just in case...
  2920.