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

  1. Newsgroups: comp.sources.misc
  2. From: woo@playfair.stanford.edu ("Alexander Woo")
  3. Subject: v40i042:  gnuplot - interactive function plotting utility, Part30/33
  4. Message-ID: <1993Oct25.030511.2834@sparky.sterling.com>
  5. X-Md4-Signature: 9bac482dfa4e0632875b28ab3eff57fd
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Mon, 25 Oct 1993 03:05:11 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
  12. Posting-number: Volume 40, Issue 42
  13. Archive-name: gnuplot/part30
  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.os2 gnuplot/README.pic gnuplot/README.pro
  22. #   gnuplot/README.xli gnuplot/bf_test.c gnuplot/demo/bivariat.dem
  23. #   gnuplot/demo/err.dat gnuplot/demo/surface1.dem
  24. #   gnuplot/demo/world.cor gnuplot/docs/Makefile.in
  25. #   gnuplot/docs/README gnuplot/docs/doc2info.pl gnuplot/makefile.msc
  26. #   gnuplot/makefile.st gnuplot/os2/gnuicon.uue gnuplot/pcgraph.asm
  27. #   gnuplot/term/bigfig.trm gnuplot/term/qms.trm
  28. #   gnuplot/term/regis.trm gnuplot/term/tgif.h
  29. # Wrapped by kent@sparky on Wed Oct 20 17:15:06 1993
  30. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  31. echo If this archive is complete, you will see the following message:
  32. echo '          "shar: End of archive 30 (of 33)."'
  33. if test -f 'gnuplot/README.os2' -a "${1}" != "-c" ; then 
  34.   echo shar: Will not clobber existing file \"'gnuplot/README.os2'\"
  35. else
  36.   echo shar: Extracting \"'gnuplot/README.os2'\" \(3851 characters\)
  37.   sed "s/^X//" >'gnuplot/README.os2' <<'END_OF_FILE'
  38. XGNUPLOT 3.3 for OS/2 v 2.0
  39. X==========================
  40. X
  41. X1) Introduction
  42. X===============
  43. X
  44. XThis file discusses the version of GNUPLOT 3.3 implemented for OS/2 2.0.
  45. X
  46. XThe command line interface of GNUPLOT is retained, while graphics output is
  47. Xplotted in a Presentation Manager Window. The GNUPLOT command line
  48. Xappears in another text-mode window on the screen.
  49. X
  50. XThe PM window has facilities for printing the plot on the default printer,
  51. Xfor changing the fonts used on the plot, and for switching between different
  52. Xways of plotting the lines (with colour, as dot/dashed lines, or both).
  53. X
  54. XThe command line window offers the usual GNUPLOT interface. Both Unix-style
  55. Xand DOS-style editing keys are supported.
  56. X
  57. XThe GNUPLOT program was compiled with the emx version of the GNU compiler.
  58. XIt supports the shell command (type 'exit' to return to GNUPLOT), can pipe
  59. Xdatafiles through external commands using '<', and supports command-line
  60. Xsubstitution. It runs the full set of demonstration programs supplied in
  61. Xthe GNUPLOT source code distribution without problems.
  62. X
  63. XThe GNUPLOT 3.3 port to OS/2 differs slightly from the 3.2 port, in that
  64. Xthe PM driver is started from GNUPLOT, rather than the other way round.
  65. XThis means that the program name will have to be changed in the program
  66. Xobject that runs GNUPLOT, if you install 3.3 over 3.2.
  67. XThis change does however make the GNUPLOT command line accessible to programs
  68. Xthat pipe commands to GNUPLOT.
  69. X
  70. X
  71. X2) Running GNUPLOT
  72. X==================
  73. X
  74. XGNUPLOT can be run from the command line of an OS/2 session (preferrably
  75. Xa windowed command session, so that the command line and the displayed
  76. Xgraph can be viewed at the same time), or can be set up as a program object
  77. Xin the WPS.
  78. X
  79. XGNUPLOT starts up as a command line session which accepts the usual
  80. XGNUPLOT input. The Presentation Manager window for graphics display
  81. Xis only opened when the first 'plot' or 'splot' command is entered.
  82. X
  83. XIf GNUPLOT is set up as a program object, it can be configured for
  84. X'drag and drop' in the usual way, by specifying '%*' as the program
  85. Xparameter.
  86. X
  87. XThe PM window has facilities for printing the plot, for changing
  88. Xthe fonts used in the plot, and so on. These of course are handled
  89. Xthrough the usual PM interface.
  90. XIn addition, you can 'drop' a font onto the window to change the font.
  91. X
  92. XThe usual GNUPLOT commands can also be used to produce output on
  93. Xsupported devices.
  94. X
  95. XSettings and the positions and sizes of the windows can be saved in
  96. Xthe file gnushell.ini. This file is saved in the program's working
  97. Xdirectory; several different directories can be set up (as program
  98. Xobjects) with different options, if you wish.
  99. X
  100. XGNUPLOT can be run with the PM display window maximised: clicking on
  101. Xthe 'GNUPLOT' menu item (or pressing 'ESC') will bring the GNUPLOT
  102. Xwindow to the foreground; it will disappear again when plotting begins.
  103. X
  104. XGNUPLOT itself communicates with the PM display window (which is a
  105. Xseparate program) through a named pipe. Plotting commands are sent to
  106. Xthe PM window which produces the plot when all commands have been received.
  107. X
  108. X3) The port of GNUPLOT to OS/2
  109. X==============================
  110. X
  111. XChanges to the code have been kept minimal. Besides the obvious addition
  112. Xof the PM driver code, the following are the major changes:
  113. X
  114. X1) Addition of code in readline.c to map keypad keys to editing functions,
  115. X   to duplicate the MS-DOS mode of editing the command line. (See GNUPLOT manual,
  116. X   page 2.)
  117. X
  118. XThe rest of the changes are associated with defining the use of the OS2
  119. Xconditional value, and setting system-dependent stuff like names, signal
  120. Xhandling, and end-of-line handling (LF vs CR+LF).
  121. X
  122. XSee the file patches.os2 for changes to the GNUPLOT source.
  123. X
  124. X4) gnupmdrv.exe
  125. X===============
  126. X
  127. XGnupmdrv.exe is the 'outboard' driver for GNUPLOT. It is a multithreaded
  128. XPM program.
  129. X
  130. XRoger Fearick
  131. Xfearick@physci.uct.ac.za
  132. X5 November 1992
  133. END_OF_FILE
  134.   if test 3851 -ne `wc -c <'gnuplot/README.os2'`; then
  135.     echo shar: \"'gnuplot/README.os2'\" unpacked with wrong size!
  136.   fi
  137.   # end of 'gnuplot/README.os2'
  138. fi
  139. if test -f 'gnuplot/README.pic' -a "${1}" != "-c" ; then 
  140.   echo shar: Will not clobber existing file \"'gnuplot/README.pic'\"
  141. else
  142.   echo shar: Extracting \"'gnuplot/README.pic'\" \(3459 characters\)
  143.   sed "s/^X//" >'gnuplot/README.pic' <<'END_OF_FILE'
  144. X
  145. XHOW TO USE PIC driver: 
  146. X
  147. X
  148. XI have tested driver under gnuplot3.2, and I am currently using it
  149. Xwith the reengineered troff, groff, which is distributed by Free
  150. XSoftware Foundation, but it should work for AT&T's DWB as well. As
  151. Xgpic can produce TeX output, it could possibly be an alternative to
  152. Xthe LaTeX driver for TeX-users having the tpic macros (see the gpic
  153. Xman page - I don't know much about TeX so please don't ask me about
  154. Xthis).
  155. X
  156. XA simple graph can be formatted using
  157. X
  158. Xgroff -p -mpic -Tps file.pic > file.ps.
  159. X
  160. XThe output from pic can be pipe-lined into eqn, so it is possible to put
  161. Xcomplex functions in a graph with the set label and set {x/y}label commands.
  162. XFor instance,
  163. X
  164. Xset ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
  165. X
  166. XWill lable the y-axis with a nice integral if formatted with the
  167. Xcommand:
  168. X
  169. Xgpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps > filename.ps
  170. X
  171. XFigures made this way can be scaled to fit into a document. The pic
  172. Xlanguage is easy to understand, so the graphs can be edited by hand if
  173. Xneed be. All coordinates in the pic-file produced by gnuplot are given
  174. Xas x+gnuplotx and y+gnuploty. By default x and y are given the value 0
  175. XIf this line is removed with an editor in a number of files one can
  176. Xput several graphs i one figure like this (default size is 5.0x3.0 inches)
  177. X
  178. X.PS 8.0
  179. Xx=0;y=3
  180. Xcopy "figa.pic"
  181. Xx=5;y=3
  182. Xcopy "figb.pic"
  183. Xx=0;y=0
  184. Xcopy "figc.pic"
  185. Xx=5;y=0
  186. Xcopy "figd.pic"
  187. X.PE
  188. X
  189. XThis will produce an 8 inches wide figure with four graphs in two rows
  190. Xon top of each other
  191. X
  192. XOne can also achieve the same thing by the command
  193. Xset term pic x y
  194. X
  195. XFor example, using
  196. X
  197. X.PS 6.0
  198. Xcopy "trig.pic"
  199. X.PE
  200. X
  201. Xthe following session generated a two by two figure with
  202. Xfour graphs:
  203. X
  204. X
  205. X    G N U P L O T
  206. X    unix version 3.2 
  207. X    patchlevel 2, Mar 24 92
  208. X    last modified Sat Mar 24 21:08:47 PST 1992
  209. X
  210. XCopyright(C) 1986, 1987, 1990, 1991, 1992  Thomas Williams, Colin Kelley
  211. X
  212. X    Send bugs and comments to bug-gnuplot@ames.arc.nasa.gov
  213. X
  214. XTerminal type set to 'x11'
  215. Xgnuplot> set out 'trig.pic'
  216. Xgnuplot> set ter pic 0 5
  217. XTerminal type set to 'pic'
  218. XOptions are 'Pic's origin is at (0.000000,5.000000)'
  219. Xgnuplot> plot sin(x)
  220. Xgnuplot> set ter pic 5 5
  221. XTerminal type set to 'pic'
  222. XOptions are 'Pic's origin is at (5.000000,5.000000)'
  223. Xgnuplot> plot cos(x)
  224. Xgnuplot> set ter pic 0 0
  225. Xset ter pic 0 0
  226. XTerminal type set to 'pic'
  227. XOptions are 'Pic's origin is at (0.000000,0.000000)'
  228. Xgnuplot> plot tan(x)
  229. Xgnuplot> set ter pic 5 0
  230. XTerminal type set to 'pic'
  231. XOptions are 'Pic's origin is at (5.000000,0.000000)'
  232. Xgnuplot> plot cos(x)/sin(x)
  233. Xplot cos(x)/sin(x)
  234. Xgnuplot> quit
  235. X
  236. X
  237. X
  238. XScaling can be done using set size.
  239. X
  240. X
  241. XI prefer this way of including graphs to using encapsulated in troff
  242. Xdocuments, because of the possiblity to preprocess with eqn, and
  243. Xbecause pic is much easier to understand than postscript  - at least for me.
  244. X
  245. X
  246. XWHAT HAS TO BE DONE TO IMPROVE THIS DRIVER
  247. X
  248. X1.) Nice markers
  249. X
  250. X2.) Dot-dashed line styles
  251. X
  252. X3.) Possibly make line thickness an option when set term pic
  253. X
  254. X4.) Making it possible to select fonts for both pic and eqn from
  255. X    gnuplot's command line.
  256. X
  257. X
  258. XI am happy to share this piece of software with anyone, in the hope
  259. Xthat it will be useful for at least someone. But taking into account
  260. Xthat it is the very first version of the driver, I would be happy if I
  261. Xcould get into contact with people able to help me improve it.
  262. X
  263. XMind you: Anything thats free comes with no guarantee!
  264. X
  265. XGood Luck
  266. X
  267. XSigfrid Lundberg (siglun@volterra.teorekol.lu.se)
  268. END_OF_FILE
  269.   if test 3459 -ne `wc -c <'gnuplot/README.pic'`; then
  270.     echo shar: \"'gnuplot/README.pic'\" unpacked with wrong size!
  271.   fi
  272.   # end of 'gnuplot/README.pic'
  273. fi
  274. if test -f 'gnuplot/README.pro' -a "${1}" != "-c" ; then 
  275.   echo shar: Will not clobber existing file \"'gnuplot/README.pro'\"
  276. else
  277.   echo shar: Extracting \"'gnuplot/README.pro'\" \(3142 characters\)
  278.   sed "s/^X//" >'gnuplot/README.pro' <<'END_OF_FILE'
  279. XThe modifications to gnuplot 3.2 in this directory add the
  280. Xcapability of plotting probability distributions.
  281. X
  282. XThis mod adds the following extra standard gnuplot functions:
  283. X
  284. Xibeta   - incomplete beta function
  285. Xigamma  - incomplete gamma function
  286. Xlgamma  - natural log of gamma
  287. Xgamma   - gamma function
  288. Xerf     - error function (= trivial variation of infamous bell curve)
  289. Xerfc    - 1.0 - error function (more accurate than 1.0 - erf yourself)
  290. Xrand    - pseudo random number generator (in compliance with Knuth)
  291. X
  292. Xusing these things as building blocks, a gnuplot command file 'stat.inc'
  293. Xis provided with definitions of almost all statistical distributions.
  294. X
  295. XAuthor: Jos van der Woude, jvdwoude@hut.nl
  296. X
  297. X==========================================================
  298. XDirections to install gnuplot 3.3:
  299. X(diffs are relative to gnuplot 3.0, patchlevel 2.0)
  300. X
  301. XIf you have a BSD machine, add the following to
  302. Xthe makefile.unx:
  303. X
  304. XOPTIONS = -DERF -DGAMMA
  305. X
  306. Xand specfun.c to the SOURCES and specfun.o to the OBJECTS.
  307. X
  308. XFor MSDOS machines (and non-BSD machines) do the following:
  309. X
  310. XASSUMPTIONS:
  311. XThe diffs provided work for msdos based pc's, using turbo C, version 2.0,
  312. Xand Borland C++, version 2.0 or 3.0.
  313. XIf you use a different setup, you might have to make (some) changes.
  314. X
  315. XGOAL:
  316. XTo extend the standard function library of gnuplot 3.2 with the following
  317. Xfunctions:
  318. X
  319. Xibeta    - incomplete beta function
  320. Xigamma   - incomplete gamma function
  321. Xerf()    - error function (= trivial variation of normal distribution function)
  322. Xerfc()   - 1.0 - erf() (more accurate than computing 1.0 - erf() yourself)
  323. Xgamma()  - gamma function (for entire domain!)
  324. Xlgamma() - natural logarithm of gamma function
  325. Xrand()   - a statistical acceptable version of standard C rand() function
  326. X
  327. XThese additions to the repertoire of standard functions turn gnuplot into
  328. Xan excellent tool for plotting statistical density and distribution functions.
  329. X
  330. XDETAILED INSTRUCTIONS:
  331. X0. Split the bottom part of this file into the appropriate files:
  332. X   readme.p3, patch3.dif, stat.inc, nomo95.dem, random.dem, prob.dem,
  333. X   prob2.dem, and specfun.c using an editor or a PD PC shar utility.
  334. X
  335. X1. Use the patch program to generate new versions of:
  336. X   gnuplot.doc, command.c, internal.c, misc.c, parse.c, plot.c, plot.h,
  337. X   standard.c, util.c and version.c
  338. X
  339. X2. Make sure that file specfun.c is in the gnuplot directory.
  340. X
  341. X3. Use the make program to create new version of gnuplot.
  342. X
  343. X4. Test the new functions with commmand files prob.dem, prob2.dem,
  344. X   random.dem and nomo95.dem.
  345. X
  346. XKNOWN BUG:
  347. XOn MSDOS machines this modification can result in a DGROUP segment overflow
  348. Xerror at link time. The reason is that gnuplot uses the resources of the
  349. Xlarge memory model right up to the limit.
  350. XThere are two things you can do about this:
  351. X
  352. X1. Compile gnuplot using the huge memory model.
  353. X   This was tested using Borland C++, version 2.0: Works fine, even with
  354. X   -DREADLINE enabled.
  355. X
  356. X2. If you dont want to compile under the huge memory model you can try to
  357. X   disable unused terminal drivers in term.h. See instructions at top
  358. X   of file term.h.
  359. X
  360. X
  361. XHappy plotting,
  362. X
  363. XJos van der Woude
  364. XAmsterdam, The Netherlands
  365. Xjvdwoude@hut.nl
  366. END_OF_FILE
  367.   if test 3142 -ne `wc -c <'gnuplot/README.pro'`; then
  368.     echo shar: \"'gnuplot/README.pro'\" unpacked with wrong size!
  369.   fi
  370.   # end of 'gnuplot/README.pro'
  371. fi
  372. if test -f 'gnuplot/README.xli' -a "${1}" != "-c" ; then 
  373.   echo shar: Will not clobber existing file \"'gnuplot/README.xli'\"
  374. else
  375.   echo shar: Extracting \"'gnuplot/README.xli'\" \(3252 characters\)
  376.   sed "s/^X//" >'gnuplot/README.xli' <<'END_OF_FILE'
  377. XFrom gregor@kafka.saic.com Tue Apr  7 21:24:49 1992
  378. XReturn-Path: <gregor@kafka.saic.com>
  379. XReceived: from kafka.saic.com by ra-next.arc.nasa.gov (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
  380. X    id AA01805; Tue, 7 Apr 92 21:24:46 PDT
  381. XReceived: by kafka.saic.com (4.1/SMI-4.1)
  382. X    id AA28518; Tue, 7 Apr 92 21:34:46 PDT
  383. XDate: Tue, 7 Apr 92 21:34:46 PDT
  384. XFrom: gregor@kafka.saic.com (gregg hanna)
  385. XMessage-Id: <9204080434.AA28518@kafka.saic.com>
  386. XTo: woo@ra-next.arc.nasa.gov
  387. XSubject: New terminal mode for gnuplot.
  388. XCc: gregor@kafka.saic.com
  389. XStatus: R
  390. X
  391. XIncluded in this shar is a patch and new files which provide a
  392. Xnew terminal type called 'xlib' (for x11-library mode).  The xlib
  393. Xis like the x11 mode modified so that the commands previously
  394. Xsent to the gnuplot_x11 driver are instead put into the output
  395. Xfile.  In addition, the gnuplot_x11.c file has been rewritten to
  396. Xbe a callable function, which will read a xlib file and draw the
  397. Xdescribed graph in a drawable.
  398. X
  399. XThe following files are included:
  400. X
  401. X    xlib.trm - A copy of x11.trm, modified to use the
  402. X        normal output file instead of a pipe.
  403. X
  404. X    gnulib_x11.c - A rather severe rewrite of gnuplot_x11.c,
  405. X        as well as a few functions used to interface
  406. X        into the user code.
  407. X
  408. X    gnulib_x11.h - Specs for user callable routines.
  409. X
  410. X    xlibtest.c - a test program written in Motif, it will
  411. X        run gnuplot and build a xlib output file, then
  412. X        plot that on the screen.  Resizing the window
  413. X        will redraw the plot, scaled appropriately,
  414. X        without re-running gnuplot.
  415. X
  416. X    xlibtest.demo - the gnuplot command to draw the test plot.
  417. X
  418. X    makefile.xlib - minimal make file for the xlibtest program
  419. X
  420. XThe following patch is included:
  421. X
  422. X    term.patch - Patch to 'term.c' which adds the specification
  423. X        for 'xlib' and includes the 'xlib.trm' file.
  424. X
  425. XThese changes were made relative to gnuplot3p2b6, and the patch
  426. Xis in unified diff format.  Please drop me a line if you would like
  427. Xit in a different format or relative to a different revision level.
  428. X
  429. XTo get full use out of the xlib mode, the file gnulib_x11.c needs
  430. Xto be covered by the alternate GPL for libraries, since the gnulib.o
  431. Xfile must be linked into the user's executable.  Until that is
  432. Xthe case, I will (of course) treat the file as covered by the GPL,
  433. Xmeaning that I cannot include the gnulib_x11 drawing routines in my
  434. Xsoftware.
  435. X
  436. XThe 'xlib' mode provides functionality similar to the 'xpm' terminal
  437. Xmode I sent earlier.  The 'xlib' mode is *much* faster, the disk
  438. Xfiles are smaller, and plots are re-sizable.  The only advantage
  439. Xof the 'xpm' mode is that XPM format files are more transportable.
  440. XThis would seems to be less important since there is a ppm terminal
  441. Xmode.
  442. X
  443. XI'm quite excited about this mode, since it allows executing software
  444. Xthe ability to generate gnuplot plots quickly while integrating the
  445. Xoutput into it's own display.  I hope you will consider it for
  446. Xa future gnuplot release and, at that time, consider the LGPL
  447. Xoption.  I would appreciate knowing your views on the subject, since
  448. XI would like to use the 'xlib' mode in my company's software.
  449. X
  450. XThanks for a great program!
  451. X
  452. X                                         gregg hanna
  453. X                                         gregor@kafka.saic.com
  454. X
  455. X--------cut-here---------------cut-here----------------cut-here----------
  456. END_OF_FILE
  457.   if test 3252 -ne `wc -c <'gnuplot/README.xli'`; then
  458.     echo shar: \"'gnuplot/README.xli'\" unpacked with wrong size!
  459.   fi
  460.   # end of 'gnuplot/README.xli'
  461. fi
  462. if test -f 'gnuplot/bf_test.c' -a "${1}" != "-c" ; then 
  463.   echo shar: Will not clobber existing file \"'gnuplot/bf_test.c'\"
  464. else
  465.   echo shar: Extracting \"'gnuplot/bf_test.c'\" \(3781 characters\)
  466.   sed "s/^X//" >'gnuplot/bf_test.c' <<'END_OF_FILE'
  467. X#ifndef lint
  468. Xstatic char *RCSid = "$Id: bf_test.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
  469. X#endif
  470. X
  471. X
  472. X/*
  473. X * Test routines for binary files
  474. X * cc bf_test.c -o bf_test binary_files.o -lm
  475. X *
  476. X * Copyright (c) 1992 Robert K. Cunningham, MIT Lincoln Laboratory
  477. X *
  478. X */
  479. X#include <stdio.h>
  480. X#if !defined(apollo) && !defined(sequent) && !defined(u3b2) && !defined(alliant) && !defined(sun386)
  481. X#include <stdlib.h>
  482. X#else
  483. Xextern char *malloc();
  484. X#endif
  485. X#include <math.h>
  486. Xfloat *vector();
  487. Xfloat *extend_vector();
  488. Xfloat *retract_vector();
  489. Xfloat **matrix();
  490. Xfloat **extend_matrix();
  491. Xfloat **retract_matrix();
  492. Xvoid free_matrix();
  493. Xvoid free_vector();
  494. X
  495. Xtypedef struct {
  496. X  float xmin, xmax;
  497. X  float ymin, ymax;
  498. X} range;
  499. X
  500. X#define NUM_PLOTS 2
  501. Xrange TheRange[] = {{-3,3,-2,2},
  502. X                    {-3,3,-3,3},
  503. X                    {-3,3,-3,3}};/* Sampling rate causes this to go from -3:6*/
  504. X
  505. X/*---- Stubs to make this work without including huge libraries ----*/
  506. Xvoid int_error(error_text,dummy)
  507. X     char *error_text;
  508. X     int dummy;
  509. X{
  510. X  fprintf(stderr,"Fatal error..\n");
  511. X  fprintf(stderr,"%s\n",error_text);
  512. X  fprintf(stderr,"...now exiting to system ...\n");
  513. X  exit(1);
  514. X}
  515. X
  516. Xchar *alloc(i)
  517. Xunsigned long i;
  518. X{
  519. X  return(malloc(i));
  520. X}
  521. X/*---- End of stubs ----*/
  522. X
  523. Xfloat function(p,x,y)
  524. Xint p;
  525. Xdouble x,y;
  526. X{
  527. X  float t;
  528. X  switch (p){
  529. X  case 0:
  530. X    t = 1.0/(x*x+y*y+1.0);
  531. X    break;
  532. X  case 1:
  533. X    t = sin(x*x + y*y)/(x*x + y*y);
  534. X    if (t> 1.0)  t = 1.0;
  535. X    break;
  536. X  case 2:
  537. X    t = sin(x*x + y*y)/(x*x + y*y);
  538. X    t *= sin(4.*(x*x + y*y))/(4.*(x*x + y*y));  /* sinc modulated sinc */
  539. X    if (t> 1.0)  t = 1.0;
  540. X    break;
  541. X  default:
  542. X    fprintf(stderr, "Unknown function\n");
  543. X    break;
  544. X  }
  545. X  return t;
  546. X}
  547. X
  548. X#define ISOSAMPLES (double)5
  549. Xint
  550. Xmain()
  551. X{
  552. X  int plot;
  553. X  int i,j;
  554. X  float x,y;
  555. X  float *rt,*ct;
  556. X  float **m;
  557. X  int xsize,ysize;
  558. X  char buf[256];
  559. X  FILE *fout;
  560. X/*  Create a few standard test interfaces */
  561. X
  562. X  for(plot = 0; plot < NUM_PLOTS; plot++){
  563. X    xsize = (TheRange[plot].xmax - TheRange[plot].xmin)*ISOSAMPLES +1;
  564. X    ysize = (TheRange[plot].ymax - TheRange[plot].ymin)*ISOSAMPLES +1;
  565. X
  566. X    rt = vector(0,xsize-1);
  567. X    ct = vector(0,ysize-1);
  568. X    m =  matrix(0,xsize-1,0,ysize-1);
  569. X
  570. X    for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
  571. X      ct[j] = y;
  572. X    }
  573. X
  574. X    for(x=TheRange[plot].xmin,i=0;i<xsize;i++,x+=1.0/(double)ISOSAMPLES){
  575. X      rt[i] = x;
  576. X      for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
  577. X        m[i][j] = function(plot,x,y);
  578. X      }
  579. X    }
  580. X
  581. X    sprintf(buf,"binary%d",plot+1);
  582. X#ifdef UNIX
  583. X    if(!(fout = fopen(buf,"w")))
  584. X#else
  585. X    if(!(fout = fopen(buf,"wb")))
  586. X#endif
  587. X      int_error("Could not open file",0);
  588. X    else{
  589. X      fwrite_matrix(fout,m,0,xsize-1,0,ysize-1,rt,ct);
  590. X    }
  591. X    free_vector(rt,0,ysize-1);
  592. X    free_vector(ct,0,xsize-1);
  593. X    free_matrix(m,0,xsize-1,0,ysize-1);
  594. X  }
  595. X
  596. X  /* Show that it's ok to vary sampling rate, as long as x1<x2, y1<y2... */
  597. X  xsize = (TheRange[plot].xmax - TheRange[plot].xmin)*ISOSAMPLES +1;
  598. X  ysize = (TheRange[plot].ymax - TheRange[plot].ymin)*ISOSAMPLES +1;
  599. X
  600. X  rt = vector(0,xsize-1);
  601. X  ct = vector(0,ysize-1);
  602. X  m =  matrix(0,xsize-1,0,ysize-1);
  603. X
  604. X  for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
  605. X    ct[j] = y>0?2*y:y;
  606. X  }
  607. X  for(x=TheRange[plot].xmin,i=0;i<xsize;i++,x+=1.0/(double)ISOSAMPLES){
  608. X    rt[i] = x>0?2*x:x;
  609. X    for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
  610. X      m[i][j] = function(plot,x,y);
  611. X    }
  612. X  }
  613. X
  614. X  sprintf(buf,"binary%d",plot+1);
  615. X#ifdef UNIX
  616. X  if(!(fout = fopen(buf,"w")))
  617. X#else
  618. X  if(!(fout = fopen(buf,"wb")))
  619. X#endif
  620. X    int_error("Could not open file",0);
  621. X  else{
  622. X    fwrite_matrix(fout,m,0,xsize-1,0,ysize-1,rt,ct);
  623. X  }
  624. X  free_vector(rt,0,ysize-1);
  625. X  free_vector(ct,0,xsize-1);
  626. X  free_matrix(m,0,xsize-1,0,ysize-1);
  627. X
  628. X  return(0);
  629. X}
  630. END_OF_FILE
  631.   if test 3781 -ne `wc -c <'gnuplot/bf_test.c'`; then
  632.     echo shar: \"'gnuplot/bf_test.c'\" unpacked with wrong size!
  633.   fi
  634.   # end of 'gnuplot/bf_test.c'
  635. fi
  636. if test -f 'gnuplot/demo/bivariat.dem' -a "${1}" != "-c" ; then 
  637.   echo shar: Will not clobber existing file \"'gnuplot/demo/bivariat.dem'\"
  638. else
  639.   echo shar: Extracting \"'gnuplot/demo/bivariat.dem'\" \(3047 characters\)
  640.   sed "s/^X//" >'gnuplot/demo/bivariat.dem' <<'END_OF_FILE'
  641. X#
  642. X# $Id: bivariat.dem%v 3.38.2.56 1993/01/22 02:44:12 woo Exp woo $
  643. X#
  644. X# This demo is very slow and requires unusually large stack size.
  645. X# Do not attempt to run this demo under MSDOS.
  646. X#
  647. X
  648. X# the function integral_f(x) approximates the integral of f(x) from 0 to x.
  649. X# integral2_f(x,y) approximates the integral from x to y.
  650. X# define f(x) to be any single variable function
  651. X#
  652. X# the integral is calculated as the sum of f(x_n)*delta 
  653. X#   do this x/delta times (from x down to 0)
  654. X#
  655. Xf(x) = exp(-x**2)
  656. Xdelta = 0.2
  657. X#  delta can be set to 0.025 for non-MSDOS machines
  658. X#
  659. X# integral_f(x) takes one variable, the upper limit.  0 is the lower limit.
  660. X# calculate the integral of function f(t) from 0 to x
  661. Xintegral_f(x) = (x>0)?integral1a(x):-integral1b(x)
  662. Xintegral1a(x) = (x<=0)?0:(integral1a(x-delta)+delta*f(x))
  663. Xintegral1b(x) = (x>=0)?0:(integral1b(x+delta)+delta*f(x))
  664. X#
  665. X# integral2_f(x,y) takes two variables; x is the lower limit, and y the upper.
  666. X# claculate the integral of function f(t) from x to y
  667. Xintegral2_f(x,y) = (x<y)?integral2(x,y):-integral2(y,x)
  668. Xintegral2(x,y) = (x>y)?0:(integral2(x+delta,y)+delta*f(x))
  669. X
  670. Xset autoscale
  671. Xset title "approximate the integral of functions"
  672. Xset samples 50
  673. X
  674. Xplot [-5:5] f(x) title "f(x)=exp(-x**2)", 2/sqrt(pi)*integral_f(x) title "erf(x)=2/sqrt(pi)*integral_f(x)"
  675. X
  676. Xpause -1 "Hit return to continue"
  677. X
  678. Xf(x)=sin(x)
  679. X
  680. Xplot [-5:5] f(x) title "f(x)=sin(x)", integral_f(x)
  681. X
  682. Xpause -1 "Hit return to continue"
  683. X
  684. Xset title "approximate the integral of functions (upper and lower limits)"
  685. X
  686. Xf(x)=(x-2)**2-20
  687. X
  688. Xplot [-10:10] f(x) title "f(x)=(x-2)**2-20", integral2_f(-5,x)
  689. X
  690. Xpause -1 "Hit return to continue"
  691. X
  692. Xf(x)=sin(x-1)-.75*sin(2*x-1)+(x**2)/8-5
  693. X
  694. Xplot  [-10:10] f(x) title "f(x)=sin(x-1)-0.75*sin(2*x-1)+(x**2)/8-5", integral2_f(x,1)
  695. X
  696. Xpause -1 "Hit return to continue"
  697. X
  698. X#
  699. X# This definition computes the ackermann. Do not attempt to compute its
  700. X# values for non integral values. In addition, do not attempt to compute
  701. X# its beyond m = 3, unless you want to wait really long time.
  702. X
  703. Xack(m,n) = (m == 0) ? n + 1 : (n == 0) ? ack(m-1,1) : ack(m-1,ack(m,n-1))
  704. X
  705. Xset xrange [0:3]
  706. Xset yrange [0:3]
  707. X
  708. Xset isosamples 4
  709. Xset samples 4
  710. X
  711. Xset title "Plot of the ackermann function"
  712. X
  713. Xsplot ack(x, y)
  714. X
  715. Xpause -1 "Hit return to continue"
  716. X
  717. Xset xrange [-5:5]
  718. Xset yrange [-10:10]
  719. Xset isosamples 10
  720. Xset samples 100
  721. Xset key 4,-3
  722. Xset title "Min(x,y) and Max(x,y)"
  723. X
  724. X#
  725. Xmin(x,y) = (x < y) ? x : y
  726. Xmax(x,y) = (x > y) ? x : y
  727. X
  728. Xplot sin(x), x**2, x**3, max(sin(x), min(x**2, x**3))+0.5
  729. X
  730. Xpause -1 "Hit return to continue"
  731. X
  732. X#
  733. X# gcd(x,y) finds the greatest common divisor of x and y,
  734. X#          using Euclid's algorithm
  735. X# as this is defined only for integers, first round to the nearest integer
  736. Xgcd(x,y) = gcd1(rnd(max(x,y)),rnd(min(x,y)))
  737. Xgcd1(x,y) = (y == 0) ? x : gcd1(y, x - x/y * y)
  738. Xrnd(x) = int(x+0.5)
  739. X
  740. Xset samples 59
  741. Xset xrange [1:59]
  742. Xset auto
  743. Xset key
  744. X
  745. Xset title "Greatest Common Divisor (for integers only)"
  746. X
  747. Xplot gcd(x, 60)
  748. Xpause -1 "Hit return to continue"
  749. X
  750. Xset xrange [-10:10]
  751. Xset yrange [-10:10]
  752. Xset auto
  753. Xset isosamples 10
  754. Xset samples 100
  755. Xset title ""
  756. X
  757. END_OF_FILE
  758.   if test 3047 -ne `wc -c <'gnuplot/demo/bivariat.dem'`; then
  759.     echo shar: \"'gnuplot/demo/bivariat.dem'\" unpacked with wrong size!
  760.   fi
  761.   # end of 'gnuplot/demo/bivariat.dem'
  762. fi
  763. if test -f 'gnuplot/demo/err.dat' -a "${1}" != "-c" ; then 
  764.   echo shar: Will not clobber existing file \"'gnuplot/demo/err.dat'\"
  765. else
  766.   echo shar: Extracting \"'gnuplot/demo/err.dat'\" \(478 characters\)
  767.   sed "s/^X//" >'gnuplot/demo/err.dat' <<'END_OF_FILE'
  768. X#
  769. X# $Id: err.dat 3.38.2.6 1992/11/14 02:25:21 woo Exp $
  770. X#
  771. X#
  772. X0    11.062    9.757    12.667    2.345
  773. X2    9.212    8.0908    10.932    1.725
  774. X5    8.55    7.6612    9.0388    2.846
  775. X10    8.122    7.327    8.617    0.957
  776. X15    8.156    7.6101    8.9019    1.577
  777. X20    8.122    7.5431    8.8009    3.141
  778. X25    7.988    6.3007    9.2753    1.57
  779. X27    8.096    6.665    10.555    2.172
  780. X29    7.936    6.9395    8.325    0.582
  781. X30    7.854    6.4909    9.8171    0.603
  782. X35    8.01    7.1556    8.644    1.063
  783. X40    8.02    7.0301    9.7099    2.152
  784. X45    8.092    6.9164    9.7676    1.44
  785. X50    8.072    7.2993    8.4447    1.96
  786. X60    8.286    7.7265    8.755    1.0
  787. END_OF_FILE
  788.   if test 478 -ne `wc -c <'gnuplot/demo/err.dat'`; then
  789.     echo shar: \"'gnuplot/demo/err.dat'\" unpacked with wrong size!
  790.   fi
  791.   # end of 'gnuplot/demo/err.dat'
  792. fi
  793. if test -f 'gnuplot/demo/surface1.dem' -a "${1}" != "-c" ; then 
  794.   echo shar: Will not clobber existing file \"'gnuplot/demo/surface1.dem'\"
  795. else
  796.   echo shar: Extracting \"'gnuplot/demo/surface1.dem'\" \(3667 characters\)
  797.   sed "s/^X//" >'gnuplot/demo/surface1.dem' <<'END_OF_FILE'
  798. X#
  799. X# $Id: surface1.demo 3.38.2.6 1992/11/14 02:25:21 woo Exp $
  800. X#
  801. Xset samples 21
  802. Xset isosample 11
  803. Xset xlabel "X axis" -3,-2
  804. Xset ylabel "Y axis" 3,-2
  805. Xset zlabel "Z axis" -5
  806. Xset title "3D gnu plot demo"
  807. Xset label 1 "This is the surface boundary" at -10,-5,150 center
  808. Xset arrow 1 from -10,-5,120 to -10,0,0 nohead
  809. Xset arrow 2 from -10,-5,120 to 10,0,0 nohead
  810. Xset arrow 3 from -10,-5,120 to 0,10,0 nohead
  811. Xset arrow 4 from -10,-5,120 to 0,-10,0 nohead
  812. Xset xrange [-10:10]
  813. Xset yrange [-10:10]
  814. Xsplot x*y
  815. Xpause -1 "Hit return to continue (1)"
  816. Xset noarrow
  817. Xset nolabel
  818. Xset grid
  819. Xsplot x**2+y**2, x**2-y**2
  820. Xpause -1 "Hit return to continue (2)"
  821. Xrep x*y
  822. Xpause -1 "Hit return to continue (3)"
  823. Xrep (x**3+y**3)/10
  824. Xpause -1 "Hit return to continue (4)"
  825. Xset ticslevel 0.0
  826. Xset title "3D gnu plot demo ( ticslevel = 0.0 )"
  827. Xrep
  828. Xpause -1 "Hit return to continue (5)"
  829. Xset ticslevel 2.0
  830. Xset title "3D gnu plot demo ( ticslevel = 2.0 )"
  831. Xrep
  832. Xpause -1 "Hit return to continue (6)"
  833. Xset ticslevel 0.5
  834. Xset title "3D gnu plot demo ( ticslevel = 0.5 )"
  835. Xrep
  836. Xpause -1 "Hit return to continue (7)"
  837. Xset title "3D gnu plot demo"
  838. Xset nogrid
  839. Xsplot x*y with points
  840. Xpause -1 "Hit return to continue (8)"
  841. Xset noxtics
  842. Xset noytics
  843. Xset xrange [-1:1]
  844. Xset yrange [-1:1]
  845. Xset title "Surfaces with no grid or tics"
  846. Xsplot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points
  847. Xpause -1 "Hit return to continue (9)"
  848. Xset xtics ("low" -3, "mid" 0, "high" 3)
  849. Xset ytics -2,0.5,2
  850. Xset xrange [-3:3]
  851. Xset yrange [-3:3]
  852. Xset log z
  853. Xset title "Surfaces with z log scale"
  854. Xsplot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2
  855. Xpause -1 "Hit return to continue (10)"
  856. Xset nolog z
  857. Xset xtics
  858. Xset ytics
  859. Xset xrange [-1:1]
  860. Xset yrange [-1:1]
  861. Xset samples 51
  862. Xset isosample 21
  863. Xset dummy u,v
  864. Xset title "3D gnu plot demo"
  865. Xsplot u*v / (u**2 + v**2 + 0.1)
  866. Xpause -1 "Hit return to continue (11)"
  867. Xsplot [x=-3:3] [y=-3:3] sin(x) * cos(y)
  868. Xpause -1 "Hit return to continue (12)"
  869. Xset zrange [-0.35:0.35]
  870. Xreplot
  871. Xpause -1 "Hit return to continue (13)"
  872. Xset title "Sinc function"
  873. Xset zrange [-1:1]
  874. Xset label 1 "This is equal to 1" at -5,-2,0.75 right
  875. Xset arrow 1 from -5,-2.1,0.75 to 0,0,1
  876. Xsinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)
  877. Xsplot [-5:5.01] [-5:5.01] sinc(u,v)
  878. Xpause -1 "Hit return to continue (14)"
  879. Xset view 70,20,1
  880. Xset zrange [-0.5:1.0]
  881. Xset ztics -1,0.25,1
  882. Xset label 1 "This is equal to 1" at -5,-2,1.5 centre
  883. Xset arrow 1 from -5,-2.1,1.4 to 0,0,1
  884. Xsplot [-12:12.01] [-12:12.01] sinc(u,v)
  885. Xpause -1 "Hit return to continue (15)"
  886. Xset noarrow
  887. Xset ztics
  888. Xset nolabel
  889. Xset log
  890. Xset auto
  891. Xset title "This has logarithmic scale"
  892. Xsplot [x=1:15] [y=1:15] x**2+y**2
  893. Xpause -1 "Hit return to continue (16)"
  894. Xset nolog
  895. Xset xrange [0:15]
  896. Xset yrange [0:15]
  897. Xset auto
  898. Xset zrange [-0.6:0.7]
  899. Xset data style lines
  900. Xset title "Data grid plotting"
  901. Xset parametric
  902. Xsplot "glass.dat"
  903. Xpause -1 "Hit return to continue (17)"
  904. Xsplot "glass.dat" using 3:2:1
  905. Xpause -1 "Hit return to continue (18)"
  906. Xset zrange [-1.2:1.2]
  907. Xset noparametric
  908. Xsplot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3
  909. Xpause -1 "Hit return to continue (19)"
  910. Xset param
  911. Xset title "Test of spherical transform"
  912. Xset mapp sphe
  913. Xsplot "glass.dat"
  914. Xpause -1 "Hit return to continue (20)"
  915. X#
  916. X# Clean up:
  917. X#
  918. Xset nopar
  919. Xset mapp cart
  920. Xset samples 100
  921. Xset isosamples 10
  922. Xset view 60,30,1,1
  923. Xset xrange [-10:10]
  924. Xset yrange [-10:10]
  925. Xset zrange [-10:10]
  926. Xset auto
  927. Xset title "" 0,0
  928. Xset xlabel "" 0,0
  929. Xset ylabel "" 0,0
  930. Xset zlabel "" 0,0
  931. X# mandelbrot demo
  932. Xset isosamples 100
  933. Xset hidden3d
  934. Xcompl(a,b)=a*{1,0}+b*{0,1}
  935. Xmand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1
  936. Xsplot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),50)     
  937. X# TANAKA Masaki  (Tokyo Institute of technology)
  938. X#                 masaki@isea.is.titech.ac.jp
  939. END_OF_FILE
  940.   if test 3667 -ne `wc -c <'gnuplot/demo/surface1.dem'`; then
  941.     echo shar: \"'gnuplot/demo/surface1.dem'\" unpacked with wrong size!
  942.   fi
  943.   # end of 'gnuplot/demo/surface1.dem'
  944. fi
  945. if test -f 'gnuplot/demo/world.cor' -a "${1}" != "-c" ; then 
  946.   echo shar: Will not clobber existing file \"'gnuplot/demo/world.cor'\"
  947. else
  948.   echo shar: Extracting \"'gnuplot/demo/world.cor'\" \(3485 characters\)
  949.   sed "s/^X//" >'gnuplot/demo/world.cor' <<'END_OF_FILE'
  950. X#
  951. X# $Id: world.cor%v 3.38.2.70 1993/02/08 02:17:40 woo Exp woo $
  952. X#
  953. X# Gnuplot world correspondences.  Feel free to check for and update
  954. X# your site; especially if it represents a new location or you
  955. X# know more precise coordinates for a site.  A (?) indicates
  956. X# the site may not be correct.  Currently coordinates are generally
  957. X# rounded to the nearest latitude and longitude.  It's fine, however,
  958. X# to give as many decimal places with each as you like.
  959. X
  960. X# USA
  961. X# Carnegie Mellon University
  962. X# Univ. of Calif. at Irvine
  963. X# University of Maryland
  964. X-110 35        # Northern Arizona University, Flagstaff, Arizona
  965. X-111 32        # Univ. of Arizona, Tucson, Arizona
  966. X-110 43        # University of Utah, Salt Lake City, Utah
  967. X-118 34        # California Institute of Technology (CALTECH), L.A., Calif.
  968. X-118 34        # Claremont, California
  969. X-118 34        # Univ. of Calif. at Los Angeles (UCLA), California
  970. X-120 34.5      # Univ. of Calif. at Santa Barbara, California
  971. X-122 37.5      # Stanford, California
  972. X-122 38        # Berkeley, California
  973. X-122 38        # Richmond, California
  974. X-122 47.5      # University of Washington, Washington
  975. X-71 42.5       # MIT, Cambridge, Massachusetts
  976. X-74.5 40.5     # New Brunswick, New Jersey
  977. X-75 41         # Bethlehem, Pennsylvania
  978. X-76 42         # Cornell College, Ithica, New York
  979. X-78.5 38       # Univ of Virginia, Charlottesville, Virginia
  980. X-79 36         # N.C. State University, Chapel Hill, North Carolina
  981. X-80 35         # Duke University, Durham, North Carolina
  982. X-81 28         # Melbourne, Florida
  983. X-83 40         # Ohio State, Columbus, Ohio
  984. X-83 42         # Detroit, Michigan
  985. X-84 34         # Alpharetta, Georgia
  986. X-84 34         # Atlanta, Georgia
  987. X-84 42         # Univ. of Michigan, Ann Arbor, Michigan
  988. X-86 39         # UCS Indiana (?)
  989. X-88 40         # University of Illinois, Urbana-Champaign, Illinois
  990. X-88 42         # Arlington Heights, Illinois
  991. X-88 42         # Northwestern University, Evanston, Illinois
  992. X-92 30         # Lafayette, Louisiana
  993. X-93 45         # Eagan, Minnesota
  994. X-95 30         # Houston, Texas
  995. X-95 39         # Kansas State University
  996. X-96 31         # Texas A&M, College Station, Texas
  997. X-98 30         # Univ of Texas, Austin, Texas
  998. X# Canada
  999. X-123 49        # BC Hydro, Vancover, British Columbia  (?)
  1000. X-63 45         # Dartmouth, Nova Scotia, Canada
  1001. X-75 45         # Ecole Polytechnique de Montreal, Canada
  1002. X# United Kingdom
  1003. X-8 54.5        # Bangor, United Kingdom
  1004. X-80.5 43.5     # Waterloo, Ontario, Canada
  1005. X0 52           # Cambridge, U. K.
  1006. X# Italy
  1007. X14 46          # Trieste, Italy
  1008. X# Australia
  1009. X138.5666 -35.01666      # Flinders University, Adelaide, South Australia
  1010. X138.6333 -34.8          # South Australian Institute, Adelaide, South AUS
  1011. X145.1333 -37.9167       # Monash University, Melbourne, Victoria
  1012. X144.9833 -37.8167       # Melbourne University, Melbourne, Victoria
  1013. X# Namibia
  1014. X17 -23         # Windhoek, Namibia
  1015. X# Sweden
  1016. X18 60          # Stockholm, Sweden
  1017. X# France
  1018. X2 49           # Valbonne, CEDEX, France  (?)
  1019. X# Finland
  1020. X24 60          # Espoo, Finland
  1021. X24 62          # Wassau, Finland (?)
  1022. X# Belgium
  1023. X4.5 51         # Brussels, Belgium
  1024. X# The Netherlands
  1025. X4.5 52         # Delft, The Netherlands
  1026. X# Germany
  1027. X7 51           # University of Cologne, Federal Republic of Germany
  1028. X7 51.5         # Fraunhofer Institut, Duisburg, Germany
  1029. X8 48           # Freiburg im Br.  (Federal Republic of Germany)
  1030. X8 52           # Univesity of Dortmund, Federal Republic of Germany
  1031. X11.5 48        # Technische Universitaet Muenchen, Munich, Germany
  1032. END_OF_FILE
  1033.   if test 3485 -ne `wc -c <'gnuplot/demo/world.cor'`; then
  1034.     echo shar: \"'gnuplot/demo/world.cor'\" unpacked with wrong size!
  1035.   fi
  1036.   # end of 'gnuplot/demo/world.cor'
  1037. fi
  1038. if test -f 'gnuplot/docs/Makefile.in' -a "${1}" != "-c" ; then 
  1039.   echo shar: Will not clobber existing file \"'gnuplot/docs/Makefile.in'\"
  1040. else
  1041.   echo shar: Extracting \"'gnuplot/docs/Makefile.in'\" \(3441 characters\)
  1042.   sed "s/^X//" >'gnuplot/docs/Makefile.in' <<'END_OF_FILE'
  1043. X# Makefile for GNUPLOT documentation
  1044. X#
  1045. X# Note that the top-level file for documentation is gnuplot.doc.
  1046. X# See README.
  1047. X#
  1048. X# To print manual:
  1049. X#    make gnuplot.dvi             (for latex)
  1050. X#    (print or view gnuplot.dvi)
  1051. X# OR
  1052. X#    make gnuplot.nroff           (for nroff)
  1053. X#    (print or view gnuplot.nroff)
  1054. X#   or
  1055. X#    make "TROFF=itroff" troff    (for troff; use your troff here)
  1056. X#
  1057. X
  1058. X.NOEXPORT:
  1059. XSHELL = /bin/sh
  1060. X
  1061. Xsrcdir = @srcdir@
  1062. XVPATH = @srcdir@
  1063. X
  1064. Xprefix = /usr/local
  1065. Xexec_prefix = $(prefix)
  1066. Xbindir = $(exec_prefix)/bin
  1067. Xdatadir = $(prefix)/lib
  1068. Xmandir = $(prefix)/man
  1069. X
  1070. XINSTALL = @INSTALL@
  1071. XINSTALL_PROGRAM = @INSTALL_PROGRAM@
  1072. XINSTALL_DATA = @INSTALL_DATA@
  1073. X
  1074. XCC     = @CC@
  1075. XDEFS   = @DEFS@
  1076. XCFLAGS = -O2
  1077. XLDFLAGS = -s
  1078. XLIBS = 
  1079. X
  1080. XMAKEINFO = makeinfo
  1081. X
  1082. X# substitute your troff command (and any flags) for this one
  1083. XTROFF=troff
  1084. X
  1085. X# substitute your DVI to PostScript conversion program here
  1086. XDVIPS=dvips
  1087. X
  1088. X# default is what is needed for interactive gnuplot
  1089. Xdefault: gnuplot.hlp gnuplot.gih
  1090. X
  1091. X### [tn]roff documentation
  1092. Xtroff: gnuplot.ms titlepag.ms
  1093. X    tbl $(srcdir)/gnuplot.ms | eqn | $(TROFF) -ms
  1094. X
  1095. Xnroff: gnuplot.nroff
  1096. X
  1097. Xgnuplot.nroff: gnuplot.ms titlepag.ms
  1098. X    tbl $(srcdir)/gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff
  1099. X
  1100. Xms: gnuplot.ms
  1101. X
  1102. Xgnuplot.ms: doc2ms gnuplot.doc
  1103. X    ./doc2ms $(srcdir)/gnuplot.doc gnuplot.ms
  1104. X
  1105. Xdoc2ms: doc2ms.o
  1106. X    $(CC) -o $@ doc2ms.o $(LDFLAGS) $(LIBS)
  1107. X
  1108. X### LaTeX documentation
  1109. Xtex: gnuplot.tex
  1110. X
  1111. Xgnuplot.tex: doc2tex gnuplot.doc
  1112. X    ./doc2tex $(srcdir)/gnuplot.doc gnuplot.tex
  1113. X
  1114. X# this is how to make DVI files
  1115. Xdvi: gnuplot.dvi gpcard.dvi
  1116. X
  1117. Xgnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty
  1118. X    latex gnuplot
  1119. X    latex gnuplot
  1120. X
  1121. Xgpcard.dvi: gpcard.tex
  1122. X    tex gpcard
  1123. X
  1124. X# this is how to make PostScript files
  1125. X# if pslatex has been installed, add "times" to titlepage.tex
  1126. Xps: gnuplot.ps gpcard.ps
  1127. X
  1128. Xgnuplot.ps: gnuplot.dvi
  1129. X    $(DVIPS) gnuplot
  1130. X
  1131. Xgpcard.ps: gpcard.dvi
  1132. X    $(DVIPS) gpcard
  1133. X
  1134. Xdoc2tex: doc2tex.o
  1135. X    $(CC) -o $@ doc2tex.o $(LDFLAGS) $(LIBS)
  1136. X
  1137. X# this is how to make gnuplot.hlp
  1138. Xhlp: gnuplot.hlp
  1139. X
  1140. Xgnuplot.hlp: doc2hlp gnuplot.doc
  1141. X    ./doc2hlp $(srcdir)/gnuplot.doc gnuplot.hlp
  1142. X
  1143. X# this is how to make gnuplot.gih
  1144. Xgih: gnuplot.gih
  1145. X
  1146. Xgnuplot.gih: doc2gih gnuplot.doc
  1147. X    ./doc2gih $(srcdir)/gnuplot.doc gnuplot.gih
  1148. X
  1149. Xdoc2gih: doc2gih.o
  1150. X    $(CC) -o $@ doc2gih.o $(LDFLAGS) $(LIBS)
  1151. X
  1152. X# this is how to make Info documentation
  1153. Xinfo: gnuplot.info
  1154. X
  1155. Xgnuplot.info: gnuplot.doc
  1156. X    perl $(srcdir)/doc2info.pl $(srcdir)/gnuplot.doc > gpltinfo.tex
  1157. X    $(MAKEINFO) --fill-column=80 gpltinfo.tex
  1158. X    rm -f gpltinfo.tex
  1159. X
  1160. Xtutorial: latextut/tutorial.tex
  1161. X    ( cd latextut; $(MAKE) )
  1162. X
  1163. X# this is how to check the gnuplot.doc file
  1164. Xcheck: checkdoc gnuplot.doc
  1165. X    ./checkdoc < $(srcdir)/gnuplot.doc
  1166. X
  1167. Xcheckdoc: checkdoc.o
  1168. X    $(CC) -o $@ checkdoc.o $(LDFLAGS) $(LIBS)
  1169. X
  1170. X# For Unix and MSDOS only
  1171. Xinstall: gnuplot.gih
  1172. X    $(INSTALL_DATA) gnuplot.gih $(datadir)/gnuplot.gih
  1173. X
  1174. Xuninstall:
  1175. X    rm -f $(datadir)/gnuplot.gih
  1176. X
  1177. X# for VMS only
  1178. Xinstall-vms: gnuplot.hlp
  1179. X    $(INSTALL_DATA) gnuplot.hlp $(datadir)/gnuplot.hlp
  1180. X
  1181. X# remove all derived files
  1182. Xclean:
  1183. X    rm -f doc2ms gnuplot.nroff gnuplot.ms \
  1184. X              doc2tex gnuplot.tex gnuplot.dvi \
  1185. X              gnuplot.aux gnuplot.log gnuplot.toc \
  1186. X              gnuplot.ps gpcard.dvi gpcard.log gpcard.ps \
  1187. X              doc2hlp gnuplot.hlp \
  1188. X              doc2gih gnuplot.gih \
  1189. X              checkdoc *.o core a.out \
  1190. X              gnuplot.info* gpltinfo.tex
  1191. X    ( cd latextut; $(MAKE) clean )
  1192. X
  1193. Xmostlyclean: clean
  1194. X
  1195. Xdistclean: clean
  1196. X    rm -f Makefile
  1197. X
  1198. Xrealclean: distclean
  1199. X    rm -f TAGS
  1200. END_OF_FILE
  1201.   if test 3441 -ne `wc -c <'gnuplot/docs/Makefile.in'`; then
  1202.     echo shar: \"'gnuplot/docs/Makefile.in'\" unpacked with wrong size!
  1203.   fi
  1204.   # end of 'gnuplot/docs/Makefile.in'
  1205. fi
  1206. if test -f 'gnuplot/docs/README' -a "${1}" != "-c" ; then 
  1207.   echo shar: Will not clobber existing file \"'gnuplot/docs/README'\"
  1208. else
  1209.   echo shar: Extracting \"'gnuplot/docs/README'\" \(3883 characters\)
  1210.   sed "s/^X//" >'gnuplot/docs/README' <<'END_OF_FILE'
  1211. XNotes on the gnuplot help files and documentation.
  1212. X
  1213. XGnuplot documentation is available in three ways:
  1214. X
  1215. X1 - interactively, within gnuplot
  1216. X2 - as a printed document. 
  1217. X3 - as a manual page, through the Unix man(1) facility
  1218. X
  1219. XThe first two forms describe the inner workings, and contain
  1220. Xequivalent information, while the third form tells how to run gnuplot.
  1221. X
  1222. XThe two first forms above derive their information from the file
  1223. Xgnuplot.doc, which is the MASTER copy of gnuplot help information. All
  1224. Xother forms, except for gnuplot.1, the man page, are derived from it. 
  1225. X
  1226. Xgnuplot.doc -> gnuplot.hlp 
  1227. X            -> gnuplot.gih
  1228. X            -> gnuplot.tex
  1229. X            -> gnuplot.ms
  1230. X            -> gnuplot.rtf
  1231. X                                      
  1232. XOn VMS the interactive help is supplied by the system help facility,
  1233. Xusing the gnuplot.hlp file. This is made with ('make hlp').  On Unix,
  1234. XAmigaDOS, and MSDOS the interactive help is built in to the program,
  1235. Xand uses the gnuplot.gih file ('make gih').  On MS-Windows, the
  1236. XMicrosoft help compiler converts an 'rtf' file to an 'hlp' file 
  1237. Xwhich is used by the standard Windows help program.
  1238. X
  1239. XThe printed document is available in either latex or troff/nroff (ms)
  1240. Xformat, using gnuplot.tex or gnuplot.ms, derived from gnuplot.doc with
  1241. Xeither doc2tex or doc2ms. Type 'make dvi' or 'make nroff'. For troff,
  1242. Xtype 'make ms' and then troff -ms gnuplot.ms in whatever way you use
  1243. Xtroff.
  1244. X
  1245. XIf VMS users prefer the gnuplot interactive help facility to the
  1246. Xsystem facility, this can be easily changed in command.c.
  1247. X
  1248. X
  1249. XDescription of the gnuplot.doc format:
  1250. X--------------------------------------
  1251. X
  1252. XHere is an example of the DOC master help format:
  1253. X
  1254. X?
  1255. X1 gnuplot
  1256. X GNUPLOT is a command-driven interactive function plotting program.  It
  1257. X ...
  1258. X?exit
  1259. X2 exit
  1260. X 'exit', 'quit' and ...
  1261. X?expressions
  1262. X2 expressions
  1263. X In general, any mathematical expression accepted by C, ...
  1264. X
  1265. X Topics:
  1266. X functions operators
  1267. X?expressions functions
  1268. X?functions
  1269. X3 functions
  1270. X The functions in GNUPLOT are ...
  1271. X
  1272. X Topics:
  1273. X abs acos arg ...
  1274. X?expressions functions abs
  1275. X?functions abs
  1276. X?abs
  1277. X4 abs
  1278. X This function returns the absolute value of its argument.  The
  1279. X returned value is of the same type as the argument. 
  1280. X?expressions functions acos
  1281. X?functions acos
  1282. X?acos
  1283. X4 acos
  1284. X This function returns the arc cosine (inverse cosine) of its
  1285. X argument.  'acos' returns its argument in radians. 
  1286. X
  1287. X
  1288. XSome notes about the format:
  1289. X----------------------------
  1290. XRemember that all text must be able to be processed by gnuplot, VMS,
  1291. X nroff, troff, and latex, and always do something reasonable. 
  1292. XThe first column is reserved for control characters.
  1293. XText does not start in the first column.
  1294. XLines that start in column 2 may be typeset by LaTeX.
  1295. XLines that have a space in column 2 are to be printed in a verbatim
  1296. X environment by LaTeX.
  1297. XTables must have a space in column 2.
  1298. XDo NOT use tabs in the help file.
  1299. XConversion from this format to vax .hlp file involves removal of
  1300. X lines starting with [?@#$%] (see doc2hlp). VMS uses the numbers
  1301. X to represent a tree. 
  1302. XConversion from this format to gnuplot .gih file involves removal of
  1303. X lines starting with [0-9@#$%] (see doc2gih). Gnuplot matches your
  1304. X help query against the ? lines to find the help information.
  1305. X Multiple ? lines for one text block constitute synonyms. The most
  1306. X specific should be first, eg 'expressions functions' before 'functions'.
  1307. X Spaces are allowed here, but should be single.
  1308. XBackquote pairs are converted by the doc2tex program into boldface;
  1309. X that is, `some text` is converted to {\bf some text}. Be sure to pair
  1310. X the backquotes, or the whole document will be boldface!
  1311. X
  1312. XControl characters in first column:
  1313. X?    used by .gih format, for builtin interactive help - keyword
  1314. X0-9  used by VMS help and by doc2{tex,ms} formatters to define level,keyword
  1315. X@    used by doc2{tex,ms} to define table start/end
  1316. X#    used by doc2tex: table entry
  1317. X%    used by doc2ms: table entry
  1318. END_OF_FILE
  1319.   if test 3883 -ne `wc -c <'gnuplot/docs/README'`; then
  1320.     echo shar: \"'gnuplot/docs/README'\" unpacked with wrong size!
  1321.   fi
  1322.   # end of 'gnuplot/docs/README'
  1323. fi
  1324. if test -f 'gnuplot/docs/doc2info.pl' -a "${1}" != "-c" ; then 
  1325.   echo shar: Will not clobber existing file \"'gnuplot/docs/doc2info.pl'\"
  1326. else
  1327.   echo shar: Extracting \"'gnuplot/docs/doc2info.pl'\" \(3020 characters\)
  1328.   sed "s/^X//" >'gnuplot/docs/doc2info.pl' <<'END_OF_FILE'
  1329. X#!/usr/local/bin/perl
  1330. X#
  1331. X# doc2texinfo : Converts Gnuplot .doc files to Texinfo format.
  1332. X#
  1333. X# George Ferguson, ferguson@cs.rochester.edu, 11 Feb 1991.
  1334. X#
  1335. X# Usage:
  1336. X#    % doc2texinfo gnuplot.doc >gnuplot.texinfo
  1337. X#    % makeinfo +fill-column 80 gnuplot.texinfo
  1338. X# Creates files "gnuplot.info" and "gnuplot.info-[123]".
  1339. X#
  1340. X
  1341. X$currentBook = $currentChapter = $currentSection = $currentSubsection = 0;
  1342. X$verbatim = $table = 0;
  1343. X
  1344. Xwhile (<>) {
  1345. X    if (/^([1-4]) (.*)$/) {    # section heading
  1346. X    $table = 0;
  1347. X    &endVerbatim;
  1348. X    $numNodes += 1;
  1349. X    $nodeLevel[$numNodes] = $1;
  1350. X    $nodeTitle[$numNodes] = $2;
  1351. X    $nodeText[$numNodes] = "";
  1352. X    if ($1 == 1) {
  1353. X        $currentBook = $numNodes;
  1354. X    } elsif ($1 == 2) {
  1355. X        $currentChapter = $numNodes;
  1356. X        $nodeMenu[$currentBook] .= "* $2::\n";
  1357. X    } elsif ($1 == 3) {
  1358. X        $currentSection = $numNodes;
  1359. X        if ($nodeTitle[$currentChapter] eq "set-show") {
  1360. X        $nodeTitle[$numNodes] = "set $2";    # override
  1361. X        $nodeMenu[$currentChapter] .= "* set $2::\n";
  1362. X        } else {
  1363. X        $nodeMenu[$currentChapter] .= "* $2::\n";
  1364. X        }
  1365. X    } elsif ($1 == 4) {
  1366. X        $currentSubsection = $numNodes;
  1367. X        $nodeMenu[$currentSection] .= "* $2::\n";
  1368. X    }
  1369. X    } elsif (/^\?(.*)$/) {                # index entry
  1370. X    if ($1 ne "") {
  1371. X        $nodeText[$numNodes] .= "\@cindex $1\n";
  1372. X    }
  1373. X    } elsif (/^@start table/) {                # start table
  1374. X    &startVerbatim;
  1375. X    $table = 1;
  1376. X    } elsif (/^@end table/) {                # end table
  1377. X    $table = 0;
  1378. X    &endVerbatim;
  1379. X    } elsif (/^#/ || /^%/) {                # table entry
  1380. X    next;
  1381. X    } elsif (/^ ( ?)(.*)$/) {                # text
  1382. X    if ($1 eq " ") {
  1383. X        &startVerbatim;
  1384. X    } else {
  1385. X        &endVerbatim;
  1386. X    }
  1387. X    $text = $2;
  1388. X    $text =~ s/@/@@/g;
  1389. X    $text =~ s/{/\@{/g;
  1390. X    $text =~ s/}/\@}/g;
  1391. X     $text =~ s/\`([^`]*)\`/@code{$1}/g;
  1392. X    $nodeText[$numNodes] .= "$text\n";
  1393. X    } elsif (/^$/) {                    # blank line
  1394. X    &endVerbatim;
  1395. X    $nodeText[$numNodes] .= "\n";
  1396. X    }
  1397. X}
  1398. X
  1399. X# Print texinfo header
  1400. Xprint "\\input texinfo\n";
  1401. Xprint "@setfilename gnuplot.info\n";
  1402. Xprint "@settitle Gnuplot: An Interactive Plotting Program\n";
  1403. Xprint "\n";
  1404. Xprint "@node Top\n";
  1405. Xprint "@top Gnuplot";
  1406. Xprint "\n";
  1407. Xprint "$nodeText[1]";
  1408. Xprint "\@menu\n";
  1409. Xprint "$nodeMenu[1]";
  1410. Xprint "* General Index::\n";
  1411. Xprint "\@end menu\n";
  1412. Xprint "\n";
  1413. X
  1414. X# Now output all the nodes
  1415. Xfor ($i=2; $i <= $numNodes; $i++) {
  1416. X    print "\@node $nodeTitle[$i]\n";
  1417. X    if ($nodeLevel[$i] == 2) {
  1418. X    print "\@chapter $nodeTitle[$i]\n";
  1419. X    } elsif ($nodeLevel[$i] == 3) {
  1420. X    print "\@section $nodeTitle[$i]\n";
  1421. X    } elsif ($nodeLevel[$i] == 4) {
  1422. X    print "\@subsection $nodeTitle[$i]\n";
  1423. X    }
  1424. X    print "$nodeText[$i]";
  1425. X    if ($nodeMenu[$i] ne "") {
  1426. X    print "\@menu\n";
  1427. X    print $nodeMenu[$i];
  1428. X    print "\@end menu\n";
  1429. X    }
  1430. X    print "\n";
  1431. X}
  1432. X# Print texinfo trailer
  1433. Xprint "\n";
  1434. Xprint "@node General Index\n";
  1435. Xprint "@appendix General Index\n";
  1436. Xprint "\n";
  1437. Xprint "@printindex cp\n";
  1438. Xprint "\n";
  1439. Xprint "@bye\n";
  1440. X
  1441. X#######################
  1442. X
  1443. Xsub startVerbatim {
  1444. X    if (!$verbatim) {
  1445. X    $nodeText[$numNodes] .= "\@example\n";
  1446. X    $verbatim = 1;
  1447. X    }
  1448. X}
  1449. X
  1450. Xsub endVerbatim {
  1451. X    if ($verbatim && !$table) {
  1452. X    $nodeText[$numNodes] .= "\@end example\n";
  1453. X    $verbatim = 0;
  1454. X    }
  1455. X}
  1456. END_OF_FILE
  1457.   if test 3020 -ne `wc -c <'gnuplot/docs/doc2info.pl'`; then
  1458.     echo shar: \"'gnuplot/docs/doc2info.pl'\" unpacked with wrong size!
  1459.   fi
  1460.   # end of 'gnuplot/docs/doc2info.pl'
  1461. fi
  1462. if test -f 'gnuplot/makefile.msc' -a "${1}" != "-c" ; then 
  1463.   echo shar: Will not clobber existing file \"'gnuplot/makefile.msc'\"
  1464. else
  1465.   echo shar: Extracting \"'gnuplot/makefile.msc'\" \(3888 characters\)
  1466.   sed "s/^X//" >'gnuplot/makefile.msc' <<'END_OF_FILE'
  1467. X#
  1468. X# $Id: makefile.msc%v 3.50 1993/07/09 05:50:28 woo Exp $
  1469. X#
  1470. X# Make file for use with Microsoft C  Version 5.10
  1471. X# and Microsoft Program Maintenance Utility  Version 4.07
  1472. X# 
  1473. X
  1474. X# where to place gnuplot.gih helpfile
  1475. XHELPFILE = gnuplot.gih
  1476. X
  1477. X# /c  means don't link
  1478. X# /AL means large memory model (large code, large data)
  1479. X# /DPC means define symbol PC
  1480. X# /DLITE means no hiddenline removal
  1481. X# /Gt means no 64k segment problem
  1482. XCFLAGS = /c /AL /DPC /DREADLINE /DLITE /Gt /D__MSC__ #/Zi #/Od
  1483. X
  1484. X# see other terminal defines in term.h
  1485. XTERMFLAGS = 
  1486. X
  1487. X# /NOE means NO EXTernal Dictionary
  1488. X# /EX  means pack EXE file
  1489. X# /ST:10000 means stack size 10000 bytes
  1490. XLINKFLAGS = /NOE /EX /ST:10000 /ONERROR:NOEXE #/codeview 
  1491. X
  1492. XOBJS =     bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj \
  1493. X    help.obj internal.obj misc.obj parse.obj plot.obj readline.obj \
  1494. X    scanner.obj setshow.obj standard.obj term.obj util.obj version.obj \
  1495. X    pcgraph.obj hrcgraph.obj corgraph.obj specfun.obj gnubin.obj \
  1496. X    binary.obj
  1497. X
  1498. XCSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \
  1499. X    term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
  1500. X    term\hp2648.trm term\hpgl.trm term\hpljii.trm 
  1501. XCSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
  1502. X    term\iris4d.trm term\kyo.trm term\latex.trm term/pbm.trm term\pc.trm 
  1503. XCSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
  1504. X    term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
  1505. X    term\v384.trm term\x11.trm
  1506. XCSOURCE8 = contour.c gnubin.c binary.c
  1507. X
  1508. X# default rules
  1509. X.c.obj:
  1510. X    cl $(CFLAGS) $*.c
  1511. X
  1512. X.asm.obj:
  1513. X    masm $*;
  1514. X
  1515. Xdefault: gnuplot.exe $(HELPFILE) demo\bf_test.exe
  1516. X
  1517. Xlinkopt.msc: makefile.msc
  1518. X      echo pcgraph+hrcgraph+corgraph+bitmap+ >linkopt.msc
  1519. X      echo term+graphics+graph3d+contour+ >>linkopt.msc
  1520. X      echo plot+setshow+command+help+internal+ >>linkopt.msc
  1521. X      echo misc+specfun+gnubin+binary+readline+ >>linkopt.msc
  1522. X      echo parse+eval+scanner+standard+util+version >>linkopt.msc
  1523. X      echo gnuplot >>linkopt.msc
  1524. X      echo nul; >>linkopt.msc
  1525. X
  1526. Xpcgraph.obj: pcgraph.asm header.mac lineproc.mac
  1527. X
  1528. Xcorgraph.obj: corgraph.asm header.mac lineproc.mac
  1529. X
  1530. Xhrcgraph.obj: hrcgraph.asm header.mac lineproc.mac
  1531. X
  1532. Xbinary.obj: binary.c 
  1533. X
  1534. Xbitmap.obj: bitmap.c bitmap.h plot.h
  1535. X
  1536. Xcommand.obj: command.c plot.h setshow.h help.h
  1537. X    cl $(CFLAGS) /DHELPFILE=\"$(HELPFILE)\" command.c
  1538. X
  1539. Xcontour.obj: contour.c plot.h
  1540. X
  1541. Xeval.obj: eval.c plot.h
  1542. X
  1543. Xgnubin.obj: gnubin.c
  1544. X
  1545. Xgraphics.obj: graphics.c plot.h setshow.h
  1546. X
  1547. Xgraph3d.obj: graphics.c plot.h setshow.h
  1548. X
  1549. Xhelp.obj: help.c plot.h help.h
  1550. X
  1551. Xinternal.obj: internal.c plot.h
  1552. X
  1553. Xmisc.obj: misc.c plot.h setshow.h
  1554. X
  1555. Xparse.obj: parse.c plot.h
  1556. X
  1557. Xplot.obj: plot.c plot.h setshow.h
  1558. X
  1559. Xreadline.obj: readline.c
  1560. X
  1561. Xscanner.obj: scanner.c plot.h
  1562. X
  1563. Xsetshow.obj: setshow.c plot.h setshow.h
  1564. X
  1565. Xstandard.obj: standard.c plot.h
  1566. X
  1567. Xspecfun.obj: specfun.c plot.h
  1568. X
  1569. Xterm.obj: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
  1570. X    cl $(CFLAGS) $(TERMFLAGS) /Iterm term.c
  1571. X
  1572. Xutil.obj: util.c plot.h
  1573. X
  1574. Xversion.obj: version.c
  1575. X
  1576. X# convert gnuplot.doc to gnuplot.gih
  1577. Xdoc2gih.exe: docs\doc2gih.c
  1578. X    cl docs\doc2gih.c
  1579. X
  1580. X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
  1581. X    doc2gih docs\gnuplot.doc $(HELPFILE)
  1582. X
  1583. X# Object files in link command line are ordered to avoid far jumps.
  1584. X# use linkopt.msc to avoid command-line overflow
  1585. X
  1586. Xgnuplot.exe: $(OBJS) linkopt.msc
  1587. X link $(LINKFLAGS) @linkopt.msc
  1588. X
  1589. X#make binary demo files
  1590. Xdemo\bf_test.exe: bf_test.c dbinary.obj
  1591. X      cl /AL /DPC /D__MSC__ /F 5000 /Gt /W1 /Fedemo\bf_test.exe bf_test.c dbinary.obj
  1592. X      cd demo
  1593. X      bf_test
  1594. X      cd ..
  1595. X
  1596. Xdbinary.obj: binary.c
  1597. X      cl /c /AL /DPC /D__MSC__ /F 5000 /Gt /W1 /Fodbinary.obj binary.c
  1598. X
  1599. X# clean up temporary files
  1600. Xclean:
  1601. X      del *.obj
  1602. X      del gnuplot.map
  1603. X      del demo\bf_test.exe
  1604. X      del linkopt.msc
  1605. X      
  1606. Xveryclean: clean
  1607. X      del gnuplot.exe
  1608. X      del $(HELPFILE)
  1609. X      del demo\binary1
  1610. X      del demo\binary2
  1611. X      del demo\binary3
  1612. X
  1613. END_OF_FILE
  1614.   if test 3888 -ne `wc -c <'gnuplot/makefile.msc'`; then
  1615.     echo shar: \"'gnuplot/makefile.msc'\" unpacked with wrong size!
  1616.   fi
  1617.   # end of 'gnuplot/makefile.msc'
  1618. fi
  1619. if test -f 'gnuplot/makefile.st' -a "${1}" != "-c" ; then 
  1620.   echo shar: Will not clobber existing file \"'gnuplot/makefile.st'\"
  1621. else
  1622.   echo shar: Extracting \"'gnuplot/makefile.st'\" \(3731 characters\)
  1623.   sed "s/^X//" >'gnuplot/makefile.st' <<'END_OF_FILE'
  1624. X#
  1625. X# $Id: makefile.atari 3.38.2.21 1992/11/24 16:22:20 woo Exp $
  1626. X#
  1627. X
  1628. X#
  1629. X# GNUPLOT makefile for GCC-ST 1.x and 2.x
  1630. X# in a cross development environment (unix) or a native TOS environment
  1631. X# (see configuration section)
  1632. X#
  1633. X# Modified from the BorlandC makefile by Alexander Lehmann
  1634. X#
  1635. X
  1636. X# -------------------- begin of configuration section -----------------------
  1637. X
  1638. X# CC is name of compiler producing TOS executables
  1639. X# HOSTCC is the name of the native compiler
  1640. X# SL is the path separator (/ for unix or UNIXMODE, \ for standard TOS)
  1641. X
  1642. X# settings for crosscompiling:
  1643. XCC = cgcc
  1644. X#HOSTCC = gcc
  1645. XHOSTCC = cc
  1646. XSL=/
  1647. X
  1648. X# settings for native compiling:
  1649. X#CC = gcc
  1650. X#HOSTCC = $(CC)
  1651. X#SL=\ 
  1652. X
  1653. X# -O means optimisation in general
  1654. X#  o-f-p avoids link-unlink instructions
  1655. X#  s-r     optimisation of loops and elimination of iterations variables
  1656. X#  c-r     improve register movement
  1657. X# if you have GCC 2.x (and time), you can choose the -O2 option
  1658. X
  1659. X# first line for GCC 1.x, second and third for GCC 2.x
  1660. X
  1661. X#OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce -fcombine-regs
  1662. XOPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce
  1663. X#OPTFLAGS = -O2 -fomit-frame-pointer
  1664. X
  1665. X# -c means don't link
  1666. X# -DREADLINE to use the history/line editing capability. If you want this 
  1667. X#    capability add -DREADLINE to CFLAGS (currently on)
  1668. X
  1669. XCFLAGS = -c $(OPTFLAGS) -DATARI -DREADLINE -DPIPES
  1670. XTERMFLAGS =
  1671. X
  1672. X# where to place gnuplot.gih helpfile
  1673. X# if this is an absolute pathname, shel_find will not be used.
  1674. XHELPFILE=gnuplot.gih
  1675. X
  1676. X# -------------------- end of configuration section -------------------------
  1677. X
  1678. XOBJS =     bitmap.o command.o contour.o eval.o graphics.o graph3d.o gnubin.o\
  1679. X    help.o internal.o misc.o parse.o plot.o readline.o scanner.o\
  1680. X    setshow.o specfun.o standard.o term.o util.o version.o binary.o
  1681. X
  1682. X# path prefix for the term subdirectory
  1683. XTERM=term$(SL)
  1684. X
  1685. XTERMS = $(TERM)atari.trm $(TERM)dumb.trm $(TERM)eepic.trm $(TERM)epson.trm \
  1686. X    $(TERM)hpgl.trm $(TERM)hpljii.trm $(TERM)hppj.trm $(TERM)latex.trm \
  1687. X    $(TERM)pbm.trm $(TERM)post.trm $(TERM)texdraw.trm
  1688. X
  1689. Xall: gnuplot.ttp $(HELPFILE) demo$(SL)bf_test.tos
  1690. X
  1691. Xgnuplot.ttp: $(OBJS)
  1692. X    $(CC) -o $@ $(OBJS) -lpml -lgem
  1693. X    fixstk 80k $@
  1694. X#    strip -k $@        # you might want to add strip here
  1695. X
  1696. X# to run the bivariat demo ca. 75k stack is needed, all others work with ca. 32k
  1697. X
  1698. X# default rules
  1699. X
  1700. X%.o: %.c
  1701. X    $(CC) -o $@ $(CFLAGS) $<
  1702. X
  1703. X# dependencies
  1704. X
  1705. Xbitmap.o: bitmap.c bitmap.h plot.h
  1706. X
  1707. Xbinary.o: binary.c plot.h
  1708. X
  1709. Xcommand.o: command.c plot.h setshow.h help.h
  1710. X    $(CC) -o $@ $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $<
  1711. X
  1712. Xcontour.o: contour.c plot.h
  1713. X
  1714. Xeval.o: eval.c plot.h
  1715. X
  1716. Xgraphics.o: graphics.c plot.h setshow.h
  1717. X
  1718. Xgraph3d.o: graph3d.c plot.h setshow.h
  1719. X
  1720. Xgnubin.o: gnubin.c plot.h setshow.h
  1721. X
  1722. Xhelp.o: help.c help.h
  1723. X
  1724. Xinternal.o: internal.c plot.h
  1725. X
  1726. Xmisc.o: misc.c plot.h setshow.h help.h
  1727. X
  1728. Xparse.o: parse.c plot.h
  1729. X
  1730. Xplot.o: plot.c plot.h setshow.h
  1731. Xreadline.o: readline.c
  1732. X
  1733. Xscanner.o: scanner.c plot.h
  1734. X
  1735. Xsetshow.o: setshow.c plot.h setshow.h
  1736. X
  1737. Xspecfun.o: plot.h specfun.c
  1738. X
  1739. Xstandard.o: standard.c plot.h
  1740. X
  1741. Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(TERMS)
  1742. X    $(CC) -o $@ $(CFLAGS) $(TERMFLAGS) -Iterm term.c
  1743. X
  1744. Xutil.o: util.c plot.h
  1745. X
  1746. Xversion.o: version.c
  1747. X
  1748. X# convert gnuplot.doc to gnuplot.gih
  1749. X$(HELPFILE): doc2gih docs$(SL)gnuplot.doc
  1750. X    doc2gih docs$(SL)gnuplot.doc $(HELPFILE)
  1751. X
  1752. Xdoc2gih: docs$(SL)doc2gih.c
  1753. X    $(HOSTCC) -o doc2gih docs$(SL)doc2gih.c
  1754. X
  1755. Xdemo$(SL)bf_test.tos: bf_test.o binary.o
  1756. X    $(CC) -s -o $@ bf_test.o binary.o -lpml
  1757. X
  1758. Xclean:            # remove temporary files, but leave executable intact
  1759. X    rm -f $(OBJS) bf_test.o doc2gih
  1760. X
  1761. Xrealclean: clean    # remove all files generated by make
  1762. X    rm -f gnuplot.ttp gnuplot.gih demo$(SL)binary1 demo$(SL)binary2
  1763. X    rm -f demo$(SL)binary3 demo$(SL)bf_test.tos
  1764. X
  1765. X# empty rules for file extensions (some makes might need this)
  1766. X%.trm:
  1767. X
  1768. X%.doc:
  1769. X
  1770. END_OF_FILE
  1771.   if test 3731 -ne `wc -c <'gnuplot/makefile.st'`; then
  1772.     echo shar: \"'gnuplot/makefile.st'\" unpacked with wrong size!
  1773.   fi
  1774.   # end of 'gnuplot/makefile.st'
  1775. fi
  1776. if test -f 'gnuplot/os2/gnuicon.uue' -a "${1}" != "-c" ; then 
  1777.   echo shar: Will not clobber existing file \"'gnuplot/os2/gnuicon.uue'\"
  1778. else
  1779.   echo shar: Extracting \"'gnuplot/os2/gnuicon.uue'\" \(3557 characters\)
  1780.   sed "s/^X//" >'gnuplot/os2/gnuicon.uue' <<'END_OF_FILE'
  1781. Xsection 1 of uuencode 5.13 of file gnuplot.ico    by R.E.M.
  1782. X
  1783. Xbegin 644 gnuplot.ico
  1784. XM0D$H````>`````````!#21H````0`!``\`````P````@`$```0`!`````/__
  1785. XM_T-)&@```!``$`#P`0``#````"``(``!``0`````@````(``@(````"`@`"`
  1786. XM`("`@("`S,S,_P```/\`__\```#__P#_`/______0D$H```````````$``-#
  1787. XM21H````4`!0`\`,```P````H`%```0`!`````/___T-)&@```!0`%`!P!@``
  1788. XM#````"@`*``!``0`````@````(``@(````"`@`"``("`@("`S,S,_P```/\`
  1789. XM__\```#__P#_`/______````````````````````````````````````````
  1790. XM````````````````````````````````````````````````````````````
  1791. XM````````````````````````````````````````````````````````````
  1792. XM``````````#_____X```!^````?G___GY___A^?__X?A_9\GX'F.)^83P.?G
  1793. XM@`#GY^`#Y^?X`^?G_`_GY_P/Y^?\#^?G_`_GY_P/Y^````?@```'__P?___\
  1794. XM/___\`____`/__^/\?__`\#__G&.?_SQCS_^^!]__WY^__^__?__________
  1795. XM_P```````````````````````S,S,S,S,S,S,S,S,S````,S,S,S,S,S,S,S
  1796. XM,S,P```#,``````````````#,````S`````````````"(S````,P````````
  1797. XM`````B,P```#,B```````(```"(#,````S(B(``````(``(B`S````,P`B(@
  1798. XM`````(@B``,P```#,``"(B````B((@`#,````S````(@```(@@```S````,P
  1799. XM`````@``B((```,P```#,````````(@````#,````S````````"(`````S``
  1800. XM``,P````````B`````,P```#,````````(@````#,````S````````"(````
  1801. XM`S````,S,S,S,P``B#,S,S,P```#,S,S,S,``(@S,S,S,`````````````"`
  1802. XM`````````````````````````````````````,P``,P```````````````#,
  1803. XM``#,``````````````1```````1```````````!$0``````$1``````````$
  1804. XM0`````````1`````````1```````````1`````````0``````````$``````
  1805. XM````0`````````0```````````0```````!`````````````````````````
  1806. XM````````````````````````````````````````````````````````````
  1807. XM````````````````````````````````````````````````````````````
  1808. XM````````````````````````````````````````````````````````````
  1809. XM````````````````````````````````````````````````````````````
  1810. XM````````````````````````````````````````````````````````````
  1811. XM````````````````````````````````````````````````````````````
  1812. XM````````````````````````````````````````````````````````````
  1813. XM``````````````````````````````#______P```/`````/````]____^\`
  1814. XM``#W____[P```/?____/````]____P\```#W___^+P```/'_F/QO````\/^8
  1815. XM_.\```#T/QAX[P```/8^?@/O````]RD``^\```#WS0`'[P```/?@``_O````
  1816. XM]_@`#^\```#W_P!_[P```/?_@'_O````]_^`?^\```#W_X!_[P```/?_@'_O
  1817. XM````]_^`?^\```#W_X!_[P```/?_@'_O````\`````\```#__X#__P```/__
  1818. XM@?__````__X`?_\```#__``__P```/_^`'__````_^'_A_\```#_P'X#_P``
  1819. XM`/^>&'G_````_QX8>/\```#^/P#\?P```/\_@?S_````_Y_G^?\```#_S__S
  1820. XM_P```/_O__?_````_^__]_\```#______P``````````````````````````
  1821. XM```````S,S,S,S,S,S,S,S,S,S,S`````#````````````````````,`````
  1822. XM,````````````````````P`````P```````````````````C`````#``````
  1823. XM````````````(B,`````,`````````````````(B`P`````R(``````````(
  1824. XM````(B`#`````#(B``````````@````B``,`````,"(B`````````(```B(`
  1825. XM`P`````P`B(`````````"(@B```#`````#``(@("(`````"(B"(```,`````
  1826. XM,```(@`@`````(@B(````P`````P```"(B(`````B"(````#`````#`````"
  1827. XM(B````B((@````,`````,```````(```"(```````P`````P```````````(
  1828. XM@``````#`````#````````````B```````,`````,```````````"(``````
  1829. XM`P`````P```````````(@``````#`````#````````````B```````,`````
  1830. XM,```````````"(```````P`````P```````````(@``````#`````#,S,S,S
  1831. XM,S````@S,S,S,S,`````````````````"```````````````````````````
  1832. XM````````````````````#,````S```````````````````#,P```#,P`````
  1833. XM``````````````S````,P`````````````````1$````````1$``````````
  1834. XM````1$0```````!$1`````````````1````````````$0```````````1$``
  1835. XM``````````1$``````````1$`````````````$1``````````$0`````````
  1836. XM````1```````````!$````````````1`````````````1```````````1```
  1837. XM```````````$``````````!```````````````0``````````$``````````
  1838. X2````````````````````````
  1839. X`
  1840. Xend
  1841. Xsum -r/size 548/3402 section (from "begin" to "end")
  1842. Xsum -r/size 18850/2448 entire input file
  1843. END_OF_FILE
  1844.   if test 3557 -ne `wc -c <'gnuplot/os2/gnuicon.uue'`; then
  1845.     echo shar: \"'gnuplot/os2/gnuicon.uue'\" unpacked with wrong size!
  1846.   fi
  1847.   # end of 'gnuplot/os2/gnuicon.uue'
  1848. fi
  1849. if test -f 'gnuplot/pcgraph.asm' -a "${1}" != "-c" ; then 
  1850.   echo shar: Will not clobber existing file \"'gnuplot/pcgraph.asm'\"
  1851. else
  1852.   echo shar: Extracting \"'gnuplot/pcgraph.asm'\" \(3925 characters\)
  1853.   sed "s/^X//" >'gnuplot/pcgraph.asm' <<'END_OF_FILE'
  1854. XTITLE    PC graphics module
  1855. X;    uses LINEPROC.MAC
  1856. X
  1857. X;    Michael Gordon - 8-Dec-86
  1858. X;
  1859. X; Certain routines were taken from the Hercules BIOS of    Dave Tutelman - 8/86
  1860. X; Others came from pcgraph.asm included in GNUPLOT by Colin Kelley
  1861. X;
  1862. X; modified slightly by Colin Kelley - 22-Dec-86
  1863. X;    added header.mac, parameterized declarations
  1864. X; added dgroup: in HVmodem to reach HCh_Parms and HGr_Parms - 30-Jan-87
  1865. X;
  1866. X; modified and added to for use in plot(3) routines back end.
  1867. X; Gil Webster.
  1868. X;
  1869. X; Assemble with masm ver. 4.  
  1870. X
  1871. Xinclude header.mac
  1872. X
  1873. Xif1
  1874. Xinclude lineproc.mac
  1875. Xendif
  1876. X
  1877. XGPg1_Base equ 0B800h    ; Graphics page 1 base address
  1878. X
  1879. X    extrn _inter:far
  1880. X
  1881. X_text    segment
  1882. X
  1883. X    public _PC_line, _PC_color, _PC_mask, _PC_curloc, _PC_puts, _Vmode
  1884. X    public _erase, _save_stack, _ss_interrupt
  1885. X
  1886. Xpcpixel proc near
  1887. X    ror word ptr linemask,1
  1888. X    jc cont
  1889. X    ret
  1890. Xcont:
  1891. X    push ax
  1892. X    push bx
  1893. X    push cx
  1894. X    push dx
  1895. X    push bp
  1896. X    mov cx,ax        ; x
  1897. X    mov dx,bx        ; y
  1898. X    mov ah,0ch        ; ah = write pixel
  1899. X    mov al,byte ptr color
  1900. X
  1901. X    mov bh, 0        ; page 0
  1902. X    int 10h
  1903. X    pop bp
  1904. X    pop dx
  1905. X    pop cx
  1906. X    pop bx
  1907. X    pop ax
  1908. X    ret
  1909. Xpcpixel endp
  1910. X
  1911. Xlineproc _PC_line, pcpixel
  1912. X
  1913. X;
  1914. X; erase - clear page 1 of the screen buffer to zero (effectively, blank
  1915. X;    the screen)
  1916. X;
  1917. Xbeginproc _erase
  1918. X    push es
  1919. X    push ax
  1920. X    push cx
  1921. X    push di
  1922. X    mov ax, GPg1_Base
  1923. X    mov es, ax
  1924. X    xor di, di
  1925. X    mov cx, 4000h
  1926. X    xor ax, ax
  1927. X    cld
  1928. X    rep stosw            ; zero out screen page
  1929. X    pop di
  1930. X    pop cx
  1931. X    pop ax
  1932. X    pop es
  1933. X    ret
  1934. X_erase endp
  1935. X
  1936. Xbeginproc _PC_color
  1937. X    push bp
  1938. X    mov bp,sp
  1939. X    mov al,[bp+X]            ; color
  1940. X    mov byte ptr color,al
  1941. X    pop bp
  1942. X    ret
  1943. X_PC_color endp
  1944. X
  1945. Xbeginproc _PC_mask
  1946. X    push bp
  1947. X    mov bp,sp
  1948. X    mov ax,[bp+X]            ; mask
  1949. X    mov word ptr linemask,ax
  1950. X    pop bp
  1951. X    ret
  1952. X_PC_mask endp
  1953. X
  1954. Xbeginproc _Vmode
  1955. X    push bp
  1956. X    mov bp,sp
  1957. X    push si
  1958. X    push di
  1959. X    mov ax,[bp+X]
  1960. X    int 10h
  1961. X    pop di
  1962. X    pop si
  1963. X    pop bp
  1964. X    ret
  1965. X_Vmode    endp
  1966. X
  1967. Xbeginproc _PC_curloc
  1968. X    push bp
  1969. X    mov bp,sp
  1970. X    mov dh, byte ptr [bp+X] ; row number
  1971. X    mov dl, byte ptr [bp+X+2] ; col number
  1972. X    mov bh, 0
  1973. X    mov ah, 2
  1974. X    int 10h
  1975. X    pop bp
  1976. X    ret
  1977. X_PC_curloc endp
  1978. X
  1979. X;
  1980. X; thanks to watale!broehl for finding a bug here--I wasn't pushing BP
  1981. X;   and reloading AH before INT 10H, which is necessary on genuine IBM
  1982. X;   boards...
  1983. X;
  1984. Xbeginproc _PC_puts
  1985. X    push bp
  1986. X    mov bp,sp
  1987. X    push si
  1988. X    mov bl,byte ptr color
  1989. X    mov si,[bp+X]        ; offset
  1990. X
  1991. Xifdef LARGE_DATA
  1992. X    mov es,[bp+X+2]        ; segment if large or compact data model
  1993. Xendif
  1994. X
  1995. Xputs2:
  1996. X
  1997. Xifdef LARGE_DATA
  1998. X    mov al,es:[si]
  1999. Xelse
  2000. X    mov al,[si]
  2001. Xendif
  2002. X    or al,al
  2003. X    jz puts3
  2004. X    mov ah,0eh        ; write TTY char
  2005. X    int 10h
  2006. X    inc si
  2007. X    jmp short puts2
  2008. Xputs3:    pop si
  2009. X    pop bp
  2010. X    ret
  2011. X_PC_puts endp
  2012. X
  2013. X
  2014. X; int kbhit();
  2015. X;   for those without MSC 4.0
  2016. X; Use BIOS interrupt 16h to determine if a key is waiting in the buffer.
  2017. X; Return nonzero if so.
  2018. X;
  2019. X
  2020. Xbeginproc _kbhit
  2021. X    mov ah, 1        ; function code 1 is keyboard test
  2022. X    int 16h            ; keyboard functions
  2023. X    jnz kbfin        ; Exit if char available
  2024. X    xor ax, ax        ; No char:  return zero.
  2025. Xkbfin:    ret
  2026. X_kbhit    endp
  2027. X
  2028. X
  2029. X; _save_stack and _ss_interrupt are needed due to a bug in the MSC 4.0
  2030. X; code when run under MS-DOS 3.x.  Starting with 3.0, MS-DOS automatically
  2031. X; switches to an internal stack during system calls.  This leaves SS:SP
  2032. X; pointing at MS-DOS's stack when the ^C interrupt (INT 23H) is triggered.
  2033. X; MSC should restore its own stack before calling the user signal() routine,
  2034. X; but it doesn't.
  2035. X;
  2036. X; Presumably this code will be unnecessary in later releases of the compiler.
  2037. X;
  2038. X
  2039. X; _save_stack saves the current SS:SP to be loaded later by _ss_interrupt.
  2040. X;
  2041. X
  2042. Xbeginproc _save_stack
  2043. X    mov ax,ss
  2044. X    mov cs:save_ss,ax
  2045. X    mov ax,sp
  2046. X    mov cs:save_sp,ax
  2047. X    ret
  2048. X_save_stack endp
  2049. X
  2050. X
  2051. X; _ss_interrupt is called on ^C (INT 23H).  It restores SS:SP as saved in
  2052. X; _save_stack and then jumps to the C routine interrupt().
  2053. X;
  2054. Xbeginproc _ss_interrupt
  2055. X    cli            ; no interrupts while the stack is changed!
  2056. X    mov ax,-1        ; self-modifying code again
  2057. Xsave_ss    equ this word - 2
  2058. X    mov ss,ax
  2059. X    mov sp,-1        ; here too
  2060. Xsave_sp equ this word - 2
  2061. X    sti
  2062. X    jmp far ptr _inter; now it's safe to call the real routine
  2063. X_ss_interrupt endp
  2064. X
  2065. X
  2066. X_text    ends
  2067. X
  2068. X
  2069. Xconst    segment
  2070. Xlinemask dw -1
  2071. Xcolor     db 1
  2072. Xconst    ends
  2073. X
  2074. X    end
  2075. END_OF_FILE
  2076.   if test 3925 -ne `wc -c <'gnuplot/pcgraph.asm'`; then
  2077.     echo shar: \"'gnuplot/pcgraph.asm'\" unpacked with wrong size!
  2078.   fi
  2079.   # end of 'gnuplot/pcgraph.asm'
  2080. fi
  2081. if test -f 'gnuplot/term/bigfig.trm' -a "${1}" != "-c" ; then 
  2082.   echo shar: Will not clobber existing file \"'gnuplot/term/bigfig.trm'\"
  2083. else
  2084.   echo shar: Extracting \"'gnuplot/term/bigfig.trm'\" \(3680 characters\)
  2085.   sed "s/^X//" >'gnuplot/term/bigfig.trm' <<'END_OF_FILE'
  2086. X/*
  2087. X * $Id: bigfig.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  2088. X */
  2089. X
  2090. X/* GNUPLOT - fig.trm */
  2091. X/*
  2092. X * Copyright (C) 1990, 1991, 1992
  2093. X *
  2094. X * Permission to use, copy, and distribute this software and its
  2095. X * documentation for any purpose with or without fee is hereby granted,
  2096. X * provided that the above copyright notice appear in all copies and
  2097. X * that both that copyright notice and this permission notice appear
  2098. X * in supporting documentation.
  2099. X *
  2100. X * Permission to modify the software is granted, but not the right to
  2101. X * distribute the modified code.  Modifications are to be distributed
  2102. X * as patches to released version.
  2103. X *
  2104. X * This software  is provided "as is" without express or implied warranty.
  2105. X *
  2106. X * This file is included by ../term.c.
  2107. X *
  2108. X * This terminal driver supports:
  2109. X *  Fig graphics language
  2110. X *
  2111. X * AUTHORS
  2112. X *  Micah Beck, David Kotz
  2113. X *
  2114. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  2115. X *
  2116. X */
  2117. X/*
  2118. X * Original for Fig code output by Micah Beck, 1989
  2119. X * Department of Computer Science, Cornell University
  2120. X * Updated by David Kotz for gnuplot 2.0
  2121. X * More efficient output by Ian Dall
  2122. X * Increased size of plot by Ian Dall
  2123. X * Updated to FIG 2.1 (with color) by Vivek Khera
  2124. X */
  2125. X#define BFIG_HTIC       (7*FIG_RES/80)
  2126. X#define BFIG_VTIC       (7*FIG_RES/80)
  2127. X#define BFIG_FONT_S     (16)    /* size in points */
  2128. X#define BFIG_VCHAR      (BFIG_FONT_S*72/FIG_RES) /* height in pixels of font */
  2129. X#define BFIG_HCHAR      (BFIG_VCHAR*6/10) /* this is a guess at the width */
  2130. X#define BFIG_ARROW_WIDTH (BFIG_HTIC/2 + 1)
  2131. X#define BFIG_ARROW_HEIGHT BFIG_HTIC
  2132. X/* 8 inches wide by 5 inches high */
  2133. X#define BFIG_XMAX (8 * FIG_RES)
  2134. X#define BFIG_YMAX (5 * FIG_RES)
  2135. X#define BFIG_XOFF (FIG_RES/2)
  2136. X#define BFIG_YOFF (FIG_RES/2)
  2137. XBFIG_vector(ux,uy)
  2138. X     unsigned int ux,uy;
  2139. X{
  2140. X  int x=ux, y=uy;
  2141. X  if (FIG_polyvec_stat != FIG_poly_part)
  2142. X    {
  2143. X      fprintf(outfile, "%d %d %d %d %d %d %d %d %6.3f %d %d %d\n",
  2144. X              O_POLYLINE, T_POLYLINE,
  2145. X              FIG_type, 1, FIG_color, 0, FIG_DEFAULT, 0, FIG_spacing, 0,0,0);
  2146. X      fprintf(outfile, "%d %d",
  2147. X              BFIG_XOFF + FIG_posx, BFIG_YMAX + BFIG_YOFF - FIG_posy);
  2148. X      FIG_poly_vec_cnt = 1;
  2149. X      FIG_polyvec_stat = FIG_poly_part;
  2150. X    }
  2151. X  fprintf(outfile, " %d %d",
  2152. X          BFIG_XOFF +  x, BFIG_YMAX + BFIG_YOFF-y);
  2153. X  FIG_poly_vec_cnt++;
  2154. X  if (FIG_poly_vec_cnt > 50)
  2155. X    FIG_poly_clean(FIG_polyvec_stat);
  2156. X  FIG_posx = x;
  2157. X  FIG_posy = y;
  2158. X}
  2159. X
  2160. XBFIG_arrow(sx, sy, ex, ey, head)
  2161. X        int sx, sy;     /* start coord */
  2162. X        int ex, ey;     /* end coord */
  2163. X    TBOOLEAN head;
  2164. X{
  2165. X    FIG_poly_clean(FIG_polyvec_stat);
  2166. X        fprintf(outfile, "%d %d %d %d %d %d %d %d %6.3f %d  %d %d\n",
  2167. X                O_POLYLINE, T_POLYLINE,
  2168. X                FIG_type, 1, FIG_color, 0, FIG_DEFAULT, 0, FIG_spacing,
  2169. X        0, head ? 1 : 0, 0);
  2170. X        /* arrow line */
  2171. X    if ( head )
  2172. X            fprintf(outfile, "%d %d %.3f %.3f %.3f\n",
  2173. X                    0, 0, 1.0,
  2174. X            (double)BFIG_ARROW_WIDTH, (double)BFIG_ARROW_HEIGHT);
  2175. X        fprintf(outfile, "%d %d %d %d 9999 9999\n",
  2176. X                BFIG_XOFF + sx, BFIG_YOFF + BFIG_YMAX - sy,
  2177. X        BFIG_XOFF + ex, BFIG_YOFF + BFIG_YMAX - ey);
  2178. X        FIG_posx = ex;
  2179. X        FIG_posy = ey;
  2180. X}
  2181. X
  2182. XBFIG_put_text(x, y, str)
  2183. X        int x, y;
  2184. X        char *str;
  2185. X{
  2186. X  if (strlen(str) == 0) return;
  2187. X  FIG_poly_clean(FIG_polyvec_stat);
  2188. X  y -= FIG_VCHAR/2;    /* assuming vertical center justified */
  2189. X    fprintf(outfile, "%d %d %d %d %d %d %d %6.3f %d %d %d %d %d %s\01\n",
  2190. X                  O_TEXT, FIG_justify,
  2191. X                  FIG_ROMAN_FONT, BFIG_FONT_S, FIG_DEFAULT, FIG_DEFAULT, 0,
  2192. X          FIG_angle, SPECIAL_TEXT, BFIG_VCHAR, BFIG_HCHAR*strlen(str),
  2193. X          BFIG_XOFF + x, BFIG_YMAX + BFIG_YOFF-y, str);
  2194. X}
  2195. END_OF_FILE
  2196.   if test 3680 -ne `wc -c <'gnuplot/term/bigfig.trm'`; then
  2197.     echo shar: \"'gnuplot/term/bigfig.trm'\" unpacked with wrong size!
  2198.   fi
  2199.   # end of 'gnuplot/term/bigfig.trm'
  2200. fi
  2201. if test -f 'gnuplot/term/qms.trm' -a "${1}" != "-c" ; then 
  2202.   echo shar: Will not clobber existing file \"'gnuplot/term/qms.trm'\"
  2203. else
  2204.   echo shar: Extracting \"'gnuplot/term/qms.trm'\" \(3856 characters\)
  2205.   sed "s/^X//" >'gnuplot/term/qms.trm' <<'END_OF_FILE'
  2206. X/*
  2207. X * $Id: qms.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  2208. X *
  2209. X */
  2210. X
  2211. X/* GNUPLOT - qms.trm */
  2212. X/*
  2213. X * Copyright (C) 1990 - 1993   
  2214. X *
  2215. X * Permission to use, copy, and distribute this software and its
  2216. X * documentation for any purpose with or without fee is hereby granted, 
  2217. X * provided that the above copyright notice appear in all copies and 
  2218. X * that both that copyright notice and this permission notice appear 
  2219. X * in supporting documentation.
  2220. X *
  2221. X * Permission to modify the software is granted, but not the right to
  2222. X * distribute the modified code.  Modifications are to be distributed 
  2223. X * as patches to released version.
  2224. X *  
  2225. X * This software  is provided "as is" without express or implied warranty.
  2226. X * 
  2227. X * This file is included by ../term.c.
  2228. X *
  2229. X * This terminal driver supports:
  2230. X *  QMS laser printers
  2231. X *
  2232. X * AUTHORS
  2233. X *  Colin Kelley, Thomas Williams, Russell Lang
  2234. X * 
  2235. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  2236. X * 
  2237. X */
  2238. X
  2239. X#define QMS_XMAX 9000
  2240. X#define QMS_YMAX 6000
  2241. X
  2242. X#define QMS_XLAST (QMS_XMAX - 1)
  2243. X#define QMS_YLAST (QMS_YMAX - 1)
  2244. X
  2245. X#define QMS_VCHAR        120
  2246. X#define QMS_HCHAR        70
  2247. X#define QMS_VTIC        70
  2248. X#define QMS_HTIC        70
  2249. X
  2250. Xint qms_line = 0;    /* to remember current line type */
  2251. X
  2252. XQMS_init()
  2253. X{
  2254. X/* This was just ^IOL, but at Rutgers at least we need some more stuff */
  2255. X  fprintf(outfile,"^PY^-\n^IOL\n^ISYNTAX00000^F^IB11000^IJ00000^IT00000\n");
  2256. X/*                 ^ QUIC on    ^set defaults  ^ set botttom,top,left margins
  2257. X                          ^landscape         ^free format   */
  2258. X/* set defaults are: implicit decimal point, units in inches, 
  2259. X   numbers left justified, units in 1/1000 inch, do not ignore spaces */
  2260. X/* margins are in 1/1000 inch units */
  2261. X}
  2262. X
  2263. X
  2264. XQMS_graphics()
  2265. X{
  2266. X    fprintf(outfile,"^IGV\n");
  2267. X/*                     ^enter graphics vector mode */
  2268. X}
  2269. X
  2270. X
  2271. X
  2272. XQMS_text()
  2273. X{
  2274. X/* added ^-, because ^, after an ^I command doesn't actually print a page */
  2275. X/* Did anybody try this code out?  [uhh...-cdk] */
  2276. X    fprintf(outfile,"^IGE\n^-^,");
  2277. X/*                     ^exit graphics vector mode
  2278. X                           ^pass terminator
  2279. X                             ^print page  */
  2280. X}
  2281. X
  2282. X
  2283. XQMS_linetype(linetype)
  2284. Xint linetype;
  2285. X{
  2286. Xstatic int width[2+9] = {7, 3, 3, 3, 3, 5, 5, 5, 7, 7, 7};
  2287. Xstatic int type[2+9] =  {0, 1, 0, 2, 3, 0, 2, 3, 0, 2, 3};
  2288. X/*
  2289. X * I don't know about Villanova, but on our printer, using ^V without
  2290. X * previously setting up a pattern crashes the microcode.
  2291. X * [nope, doesn't crash here. -cdk]
  2292. X * [it generates a controller error here on dotted lines. - rjl]
  2293. X */
  2294. X/* Code to define patterns added by rjl
  2295. X * According to the manual it should work - but it doesn't
  2296. X */
  2297. X    qms_line = linetype;
  2298. X    if (linetype >= 9)
  2299. X        linetype %= 9;
  2300. X    fprintf(outfile,"^PW%02d\n",width[linetype+2]); 
  2301. X/*                     ^width in dots */
  2302. X    switch (type[linetype+2]) {
  2303. X        case 1 :    /* short dash */
  2304. X            fprintf(outfile,"^PV102025^G\n^V1\n");
  2305. X/* ^PV = define pattern vector, 1 = pattern number,
  2306. X   02 = number of pen downs and ups, 025 = .025" length of ups/downs */
  2307. X            break;
  2308. X        case 2 :    /* medium dash */
  2309. X            fprintf(outfile,"^PV202050^G\n^V2\n");
  2310. X            break;
  2311. X        case 3 :    /* long dash */
  2312. X            fprintf(outfile,"^PV302100^G\n^V3\n");
  2313. X            break;
  2314. X        default:
  2315. X        case 0 :
  2316. X            fprintf(outfile,"^V0\n");
  2317. X            break;
  2318. X    }
  2319. X}
  2320. X
  2321. X
  2322. XQMS_move(x,y)
  2323. Xint x,y;
  2324. X{
  2325. X    fprintf(outfile,"^U%05d:%05d\n", 1000 + x, QMS_YLAST + 1000 - y);
  2326. X/*                     ^pen up vector*/
  2327. X}
  2328. X
  2329. X
  2330. XQMS_vector(x2,y2)
  2331. Xint x2,y2;
  2332. X{
  2333. X    fprintf(outfile,"^D%05d:%05d\n", 1000 + x2, QMS_YLAST + 1000 - y2);
  2334. X/*                     ^pen down vector*/
  2335. X}
  2336. X
  2337. X
  2338. XQMS_put_text(x,y,str)
  2339. Xunsigned int x,y;
  2340. Xchar str[];
  2341. X{
  2342. Xchar ch;
  2343. X    QMS_move(x,y + QMS_VCHAR/3);
  2344. X    fputs("^IGE\n",outfile);
  2345. X    ch = *str++;
  2346. X    while(ch!='\0') {
  2347. X        if (ch=='^')
  2348. X            putc('^',outfile);
  2349. X        putc(ch,outfile);
  2350. X        ch = *str++;
  2351. X    }
  2352. X    fputs("\n^IGV\n",outfile);
  2353. X    QMS_linetype(qms_line); /* restore line type */
  2354. X}
  2355. X
  2356. X
  2357. XQMS_reset()
  2358. X{
  2359. X    fprintf(outfile,"^PN^-\n");
  2360. X/*                     ^QUIC off*/
  2361. X}
  2362. X
  2363. END_OF_FILE
  2364.   if test 3856 -ne `wc -c <'gnuplot/term/qms.trm'`; then
  2365.     echo shar: \"'gnuplot/term/qms.trm'\" unpacked with wrong size!
  2366.   fi
  2367.   # end of 'gnuplot/term/qms.trm'
  2368. fi
  2369. if test -f 'gnuplot/term/regis.trm' -a "${1}" != "-c" ; then 
  2370.   echo shar: Will not clobber existing file \"'gnuplot/term/regis.trm'\"
  2371. else
  2372.   echo shar: Extracting \"'gnuplot/term/regis.trm'\" \(4185 characters\)
  2373.   sed "s/^X//" >'gnuplot/term/regis.trm' <<'END_OF_FILE'
  2374. X/*
  2375. X * $Id: regis.trm%v 3.38.2.122 1993/04/30 00:31:45 woo Exp woo $
  2376. X *
  2377. X */
  2378. X
  2379. X/* GNUPLOT - regis.trm */
  2380. X/*
  2381. X * Copyright (C) 1990 - 1993   
  2382. X *
  2383. X * Permission to use, copy, and distribute this software and its
  2384. X * documentation for any purpose with or without fee is hereby granted, 
  2385. X * provided that the above copyright notice appear in all copies and 
  2386. X * that both that copyright notice and this permission notice appear 
  2387. X * in supporting documentation.
  2388. X *
  2389. X * Permission to modify the software is granted, but not the right to
  2390. X * distribute the modified code.  Modifications are to be distributed 
  2391. X * as patches to released version.
  2392. X *  
  2393. X * This software  is provided "as is" without express or implied warranty.
  2394. X * 
  2395. X * This file is included by ../term.c.
  2396. X *
  2397. X * This terminal driver supports:
  2398. X *  REGIS devices
  2399. X *
  2400. X * AUTHORS
  2401. X *  Colin Kelley, Thomas Williams
  2402. X * 
  2403. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  2404. X * 
  2405. X */
  2406. X
  2407. X#define REGISXMAX 800             
  2408. X#define REGISYMAX 440
  2409. X
  2410. X#define REGISXLAST (REGISXMAX - 1)
  2411. X#define REGISYLAST (REGISYMAX - 1)
  2412. X
  2413. X#define REGISVCHAR        20      
  2414. X#define REGISHCHAR        9
  2415. X#define REGISVTIC        8
  2416. X#define REGISHTIC        6
  2417. X
  2418. X#define TRUE 1
  2419. X#define FALSE 0
  2420. Xstatic int REGIS16color=FALSE;
  2421. X
  2422. Xint REGISang = 0;
  2423. X
  2424. XREGISinit()
  2425. X{
  2426. X    fprintf(outfile,"\033[r\033[24;1H");
  2427. X/*                   1     2
  2428. X    1. reset scrolling region
  2429. X    2. locate cursor on bottom line
  2430. X*/
  2431. X}
  2432. X
  2433. X
  2434. X/* thanks to calmasd!dko (Dan O'Neill) for adding S(E) for vt125s */
  2435. XREGISgraphics()
  2436. X{
  2437. X    fprintf(outfile,"\033[2J\033P1pS(C0)S(E)");
  2438. X/*                   1      2      3    4   5
  2439. X    1. clear screen
  2440. X    2. enter ReGIS graphics
  2441. X    3. turn off graphics diamond cursor
  2442. X    4. clear graphics screen
  2443. X*/
  2444. X    (void) REGIStext_angle(0); /* select text size and angle */ 
  2445. X}
  2446. X
  2447. X
  2448. XREGIStext()
  2449. X{
  2450. X    fprintf(outfile,"\033\\\033[24;1H");
  2451. X/*                       1    2
  2452. X    1. Leave ReGIS graphics mode
  2453. X     2. locate cursor on last line of screen
  2454. X*/
  2455. X}
  2456. X
  2457. X
  2458. XREGISlinetype(linetype)
  2459. Xint     linetype;
  2460. X{
  2461. X      /* This will change color in order G,R,B,G-dot,R-dot,B-dot */
  2462. X
  2463. Xstatic int in_16_map[15+2] = {7,7,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
  2464. Xstatic int lt_16_map[15+2] = {1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
  2465. Xstatic int in_map[9 + 2] = {2, 2, 3, 2, 1, 3, 2, 1, 3, 2, 1};
  2466. Xstatic int lt_map[9 + 2] = {1, 4, 1, 1, 1, 4, 4, 4, 6, 6, 6};
  2467. X   
  2468. X       if(!REGIS16color)
  2469. X       {    if (linetype >= 9)
  2470. X               linetype %= 9;
  2471. X           fprintf(outfile, "W(I%d)\n", in_map[linetype + 2]);
  2472. X           fprintf(outfile, "W(P%d)\n", lt_map[linetype + 2]);
  2473. X       }
  2474. X       else
  2475. X       {    if(linetype >=15)
  2476. X               linetype %= 15;
  2477. X           fprintf(outfile, "W(I%d)\n", in_16_map[linetype + 2]);
  2478. X           fprintf(outfile, "W(P%d)\n", lt_16_map[linetype + 2]);
  2479. X       }
  2480. X}
  2481. X
  2482. X
  2483. X
  2484. X/*
  2485. X** The \n was added in the functions below (and above) in order to not cause
  2486. X** a buffer overflow in devices that can't deal with long line lengths.
  2487. X** The DEC vt-340 doesn't need this, but Reflection 4, a vt-340 emulator
  2488. X** for PC's under MS-DOS and Microsoft Windows does need it.
  2489. X** Also needed for DECterm, a vt-340 emulator for use with Motif 1.0
  2490. X** on Open/VMS.
  2491. X** NGB 9/13/93
  2492. X*/
  2493. X
  2494. XREGISmove(x,y)
  2495. Xint x,y;
  2496. X{
  2497. X    fprintf(outfile,"P[%d,%d]\n",x,REGISYLAST-y,x,REGISYLAST-y);
  2498. X}
  2499. X
  2500. X
  2501. XREGISvector(x,y)
  2502. Xint x,y;
  2503. X{
  2504. X    fprintf(outfile,"v[]v[%d,%d]\n",x,REGISYLAST - y);
  2505. X/* the initial v[] is needed to get the first pixel plotted */
  2506. X}
  2507. X
  2508. X
  2509. X/* put_text and text_angle by rjl */
  2510. XREGISput_text(x,y,str)
  2511. Xint x, y;
  2512. Xchar *str;
  2513. X{
  2514. X    if (REGISang==1)
  2515. X        REGISmove(x-REGISVCHAR/2-1,y);
  2516. X    else
  2517. X        REGISmove(x,y+REGISVCHAR/2-1);
  2518. X    (void) putc('T',outfile); (void) putc('\'',outfile);
  2519. X    while (*str) {
  2520. X        (void) putc(*str,outfile);
  2521. X        if (*str == '\'')
  2522. X            (void) putc('\'',outfile);    /* send out another one */
  2523. X        str++;
  2524. X    }
  2525. X    (void) putc('\'',outfile);
  2526. X    (void) putc('\n',outfile);
  2527. X}
  2528. X
  2529. X
  2530. Xint REGIStext_angle(ang)
  2531. Xint ang;
  2532. X{
  2533. X    REGISang = ang;
  2534. X    if (ang == 1)
  2535. X        fputs("T(D90,S1)\n",outfile);
  2536. X    else
  2537. X        fputs("T(D0,S1)\n",outfile);
  2538. X    return TRUE;
  2539. X}
  2540. X
  2541. X
  2542. XREGISreset()
  2543. X{
  2544. X    fprintf(outfile,"\033[2J\033[24;1H");
  2545. X}
  2546. X
  2547. XREGISoptions()
  2548. X{    int i=0;
  2549. X       struct value a;
  2550. X       extern struct value *const_express();
  2551. X       extern double real();
  2552. X   
  2553. X       if(!END_OF_COMMAND)
  2554. X       {    i=(int)real(const_express(&a));
  2555. X       }
  2556. X       REGIS16color= (i==16);
  2557. X       sprintf(term_options,"%s",REGIS16color?"16":"4");
  2558. X}
  2559. X
  2560. END_OF_FILE
  2561.   if test 4185 -ne `wc -c <'gnuplot/term/regis.trm'`; then
  2562.     echo shar: \"'gnuplot/term/regis.trm'\" unpacked with wrong size!
  2563.   fi
  2564.   # end of 'gnuplot/term/regis.trm'
  2565. fi
  2566. if test -f 'gnuplot/term/tgif.h' -a "${1}" != "-c" ; then 
  2567.   echo shar: Will not clobber existing file \"'gnuplot/term/tgif.h'\"
  2568. else
  2569.   echo shar: Extracting \"'gnuplot/term/tgif.h'\" \(3514 characters\)
  2570.   sed "s/^X//" >'gnuplot/term/tgif.h' <<'END_OF_FILE'
  2571. X/*
  2572. X * $Id: tgif.h%v 3.50 1993/07/09 05:35:24 woo Exp $
  2573. X */
  2574. X
  2575. X/*
  2576. X * Author:    William Chia-Wei Cheng (william@cs.ucla.edu)
  2577. X *
  2578. X * Copyright (C) 1990, 1991, William Cheng.
  2579. X *
  2580. X */
  2581. X
  2582. X#define TOOL_NAME "Tgif"
  2583. X
  2584. X#ifndef NULL
  2585. X#define NULL 0
  2586. X#endif /* ~NULL */
  2587. X
  2588. X#ifndef TRUE
  2589. X#define FALSE 0
  2590. X#define TRUE 1
  2591. X#endif /* ~TRUE */
  2592. X
  2593. X#define INVALID -1
  2594. X#define BAD -2
  2595. X
  2596. X#define SINGLECOLOR (FALSE)
  2597. X#define MULTICOLOR (TRUE)
  2598. X
  2599. X#define BUTTONSMASK ((Button1Mask)|(Button2Mask)|(Button3Mask))
  2600. X
  2601. X#ifndef max
  2602. X#define max(A,B) ((A) > (B) ? (A) : (B))
  2603. X#define min(A,B) ((A) > (B) ? (B) : (A))
  2604. X#endif /* ~max */
  2605. X
  2606. X#ifndef round
  2607. X#define round(X) (((X) >= 0) ? (int)((X)+0.5) : (int)((X)-0.5))
  2608. X#endif /* ~round */
  2609. X
  2610. X#define OFFSET_X(AbsX) (((AbsX) - drawOrigX) >> zoomScale)
  2611. X#define OFFSET_Y(AbsY) (((AbsY) - drawOrigY) >> zoomScale)
  2612. X
  2613. X#define ABS_X(OffsetX) (((OffsetX)<<zoomScale) + drawOrigX)
  2614. X#define ABS_Y(OffsetY) (((OffsetY)<<zoomScale) + drawOrigY)
  2615. X
  2616. X#define SetRecVals(R,X,Y,W,H) ((R).x=(X),(R).y=(Y),(R).width=(W),(R).height=(H))
  2617. X
  2618. X#define MAXSTRING 256
  2619. X#define MAXPATHLENGTH 256
  2620. X
  2621. X/* object types */
  2622. X
  2623. X#define OBJ_POLY 0
  2624. X#define OBJ_BOX 1
  2625. X#define OBJ_OVAL 2
  2626. X#define OBJ_TEXT 3
  2627. X#define OBJ_POLYGON 4
  2628. X#define OBJ_GROUP 5
  2629. X#define OBJ_SYM 6
  2630. X#define OBJ_ICON 7
  2631. X#define OBJ_ARC 8
  2632. X#define OBJ_RCBOX 9
  2633. X#define OBJ_XBM 10
  2634. X
  2635. X/* drawing modes */
  2636. X
  2637. X#define NOTHING 0
  2638. X#define DRAWTEXT 1
  2639. X#define DRAWBOX 2
  2640. X#define DRAWCIRCLE 3
  2641. X#define DRAWPOLY 4
  2642. X#define DRAWPOLYGON 5
  2643. X#define DRAWARC 6
  2644. X#define DRAWRCBOX 7
  2645. X
  2646. X#define MAXCHOICES 8
  2647. X
  2648. X/* stipple patterns */
  2649. X
  2650. X#define NONEPAT 0
  2651. X#define SOLIDPAT 1
  2652. X#define BACKPAT 2
  2653. X#define SCROLLPAT 7
  2654. X#define MAXPATTERNS 20
  2655. X
  2656. X/* line stuff */
  2657. X
  2658. X#define LINE_THIN 0
  2659. X#define LINE_MEDIUM 1
  2660. X#define LINE_THICK 2
  2661. X#define LINE_CURVED 3 /* compatibility hack for fileVersion <= 3 */
  2662. X
  2663. X#define MAXLINEWIDTHS 7
  2664. X
  2665. X#define LT_STRAIGHT 0
  2666. X#define LT_SPLINE 1
  2667. X
  2668. X#define MAXLINETYPES 2
  2669. X
  2670. X#define LS_PLAIN 0
  2671. X#define LS_RIGHT 1
  2672. X#define LS_LEFT 2
  2673. X#define LS_DOUBLE 3
  2674. X
  2675. X#define MAXLINESTYLES 4
  2676. X
  2677. X#define MAXDASHES 5
  2678. X
  2679. X#define NOCONT (FALSE)
  2680. X#define CONT (TRUE)
  2681. X
  2682. X#define NORB (FALSE)
  2683. X#define RB (TRUE)
  2684. X
  2685. X/* font stuff */
  2686. X
  2687. X#define FONT_TIM 0
  2688. X#define FONT_COU 1
  2689. X#define FONT_HEL 2
  2690. X#define FONT_CEN 3
  2691. X#define FONT_SYM 4
  2692. X
  2693. X#define MAXFONTS 5
  2694. X
  2695. X#define STYLE_NR 0
  2696. X#define STYLE_BR 1
  2697. X#define STYLE_NI 2
  2698. X#define STYLE_BI 3
  2699. X
  2700. X#define MAXFONTSTYLES 4
  2701. X
  2702. X#define FONT_DPI_75 0
  2703. X#define FONT_DPI_100 1
  2704. X
  2705. X#define MAXFONTDPIS 2
  2706. X
  2707. X#define MAXFONTSIZES 6
  2708. X
  2709. X#define JUST_L 0
  2710. X#define JUST_C 1
  2711. X#define JUST_R 2
  2712. X
  2713. X#define MAXJUSTS 3
  2714. X
  2715. X/* alignment */
  2716. X
  2717. X#define ALIGN_N 0
  2718. X
  2719. X#define ALIGN_L 1
  2720. X#define ALIGN_C 2
  2721. X#define ALIGN_R 3
  2722. X
  2723. X#define ALIGN_T 1
  2724. X#define ALIGN_M 2
  2725. X#define ALIGN_B 3
  2726. X
  2727. X#define MAXALIGNS 4
  2728. X
  2729. X/* color */
  2730. X
  2731. X#define MAXCOLORS 10
  2732. X
  2733. X/* button stuff */
  2734. X
  2735. X#define CONFIRM_YES 0
  2736. X#define CONFIRM_NO 1
  2737. X#define CONFIRM_CANCEL 2
  2738. X#define MAX_CONFIRMS 3
  2739. X
  2740. X#define BUTTON_INVERT 0
  2741. X#define BUTTON_NORMAL 1
  2742. X
  2743. X/* page layout */
  2744. X
  2745. X#define PORTRAIT 0
  2746. X#define LANDSCAPE 1
  2747. X#define HIGHPORT 2
  2748. X#define HIGHLAND 3
  2749. X#define SLIDEPORT 4
  2750. X#define SLIDELAND 5
  2751. X
  2752. X#define MAXPAGESTYLES 6
  2753. X
  2754. X/* where to print */
  2755. X
  2756. X#define PRINTER 0
  2757. X#define LATEX_FIG 1
  2758. X#define PS_FILE 2
  2759. X#define XBM_FILE 3
  2760. X
  2761. X#define MAXWHERETOPRINT 4
  2762. X
  2763. X/* measurement */
  2764. X
  2765. X#define PIX_PER_INCH 128
  2766. X#define ONE_INCH (PIX_PER_INCH)
  2767. X#define HALF_INCH (PIX_PER_INCH/2)
  2768. X#define QUARTER_INCH (PIX_PER_INCH/4)
  2769. X#define EIGHTH_INCH (PIX_PER_INCH/8)
  2770. X
  2771. X#define DEFAULT_GRID (EIGHTH_INCH)
  2772. X
  2773. X/* text rotation */
  2774. X
  2775. X#define ROTATE0 0
  2776. X#define ROTATE90 1
  2777. X#define ROTATE180 2
  2778. X#define ROTATE270 3
  2779. X
  2780. X/* arc */
  2781. X
  2782. X#define ARC_CCW 0 /* counter-clock-wise */
  2783. X#define ARC_CW 1 /* clock-wise */
  2784. END_OF_FILE
  2785.   if test 3514 -ne `wc -c <'gnuplot/term/tgif.h'`; then
  2786.     echo shar: \"'gnuplot/term/tgif.h'\" unpacked with wrong size!
  2787.   fi
  2788.   # end of 'gnuplot/term/tgif.h'
  2789. fi
  2790. echo shar: End of archive 30 \(of 33\).
  2791. cp /dev/null ark30isdone
  2792. MISSING=""
  2793. 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
  2794.     if test ! -f ark${I}isdone ; then
  2795.     MISSING="${MISSING} ${I}"
  2796.     fi
  2797. done
  2798. if test "${MISSING}" = "" ; then
  2799.     echo You have unpacked all 33 archives.
  2800.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2801. else
  2802.     echo You still must unpack the following archives:
  2803.     echo "        " ${MISSING}
  2804. fi
  2805. exit 0
  2806. exit 0 # Just in case...
  2807.