home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-29 | 80.4 KB | 2,823 lines |
- Newsgroups: comp.sources.misc
- From: woo@playfair.stanford.edu ("Alexander Woo")
- Subject: v40i042: gnuplot - interactive function plotting utility, Part30/33
- Message-ID: <1993Oct25.030511.2834@sparky.sterling.com>
- X-Md4-Signature: 9bac482dfa4e0632875b28ab3eff57fd
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Mon, 25 Oct 1993 03:05:11 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
- Posting-number: Volume 40, Issue 42
- Archive-name: gnuplot/part30
- Environment: UNIX, MS-DOS, VMS
- Supersedes: gnuplot3: Volume 24, Issue 23-48
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: gnuplot/README.os2 gnuplot/README.pic gnuplot/README.pro
- # gnuplot/README.xli gnuplot/bf_test.c gnuplot/demo/bivariat.dem
- # gnuplot/demo/err.dat gnuplot/demo/surface1.dem
- # gnuplot/demo/world.cor gnuplot/docs/Makefile.in
- # gnuplot/docs/README gnuplot/docs/doc2info.pl gnuplot/makefile.msc
- # gnuplot/makefile.st gnuplot/os2/gnuicon.uue gnuplot/pcgraph.asm
- # gnuplot/term/bigfig.trm gnuplot/term/qms.trm
- # gnuplot/term/regis.trm gnuplot/term/tgif.h
- # Wrapped by kent@sparky on Wed Oct 20 17:15:06 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 30 (of 33)."'
- if test -f 'gnuplot/README.os2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.os2'\"
- else
- echo shar: Extracting \"'gnuplot/README.os2'\" \(3851 characters\)
- sed "s/^X//" >'gnuplot/README.os2' <<'END_OF_FILE'
- XGNUPLOT 3.3 for OS/2 v 2.0
- X==========================
- X
- X1) Introduction
- X===============
- X
- XThis file discusses the version of GNUPLOT 3.3 implemented for OS/2 2.0.
- X
- XThe command line interface of GNUPLOT is retained, while graphics output is
- Xplotted in a Presentation Manager Window. The GNUPLOT command line
- Xappears in another text-mode window on the screen.
- X
- XThe PM window has facilities for printing the plot on the default printer,
- Xfor changing the fonts used on the plot, and for switching between different
- Xways of plotting the lines (with colour, as dot/dashed lines, or both).
- X
- XThe command line window offers the usual GNUPLOT interface. Both Unix-style
- Xand DOS-style editing keys are supported.
- X
- XThe GNUPLOT program was compiled with the emx version of the GNU compiler.
- XIt supports the shell command (type 'exit' to return to GNUPLOT), can pipe
- Xdatafiles through external commands using '<', and supports command-line
- Xsubstitution. It runs the full set of demonstration programs supplied in
- Xthe GNUPLOT source code distribution without problems.
- X
- XThe GNUPLOT 3.3 port to OS/2 differs slightly from the 3.2 port, in that
- Xthe PM driver is started from GNUPLOT, rather than the other way round.
- XThis means that the program name will have to be changed in the program
- Xobject that runs GNUPLOT, if you install 3.3 over 3.2.
- XThis change does however make the GNUPLOT command line accessible to programs
- Xthat pipe commands to GNUPLOT.
- X
- X
- X2) Running GNUPLOT
- X==================
- X
- XGNUPLOT can be run from the command line of an OS/2 session (preferrably
- Xa windowed command session, so that the command line and the displayed
- Xgraph can be viewed at the same time), or can be set up as a program object
- Xin the WPS.
- X
- XGNUPLOT starts up as a command line session which accepts the usual
- XGNUPLOT input. The Presentation Manager window for graphics display
- Xis only opened when the first 'plot' or 'splot' command is entered.
- X
- XIf GNUPLOT is set up as a program object, it can be configured for
- X'drag and drop' in the usual way, by specifying '%*' as the program
- Xparameter.
- X
- XThe PM window has facilities for printing the plot, for changing
- Xthe fonts used in the plot, and so on. These of course are handled
- Xthrough the usual PM interface.
- XIn addition, you can 'drop' a font onto the window to change the font.
- X
- XThe usual GNUPLOT commands can also be used to produce output on
- Xsupported devices.
- X
- XSettings and the positions and sizes of the windows can be saved in
- Xthe file gnushell.ini. This file is saved in the program's working
- Xdirectory; several different directories can be set up (as program
- Xobjects) with different options, if you wish.
- X
- XGNUPLOT can be run with the PM display window maximised: clicking on
- Xthe 'GNUPLOT' menu item (or pressing 'ESC') will bring the GNUPLOT
- Xwindow to the foreground; it will disappear again when plotting begins.
- X
- XGNUPLOT itself communicates with the PM display window (which is a
- Xseparate program) through a named pipe. Plotting commands are sent to
- Xthe PM window which produces the plot when all commands have been received.
- X
- X3) The port of GNUPLOT to OS/2
- X==============================
- X
- XChanges to the code have been kept minimal. Besides the obvious addition
- Xof the PM driver code, the following are the major changes:
- X
- X1) Addition of code in readline.c to map keypad keys to editing functions,
- X to duplicate the MS-DOS mode of editing the command line. (See GNUPLOT manual,
- X page 2.)
- X
- XThe rest of the changes are associated with defining the use of the OS2
- Xconditional value, and setting system-dependent stuff like names, signal
- Xhandling, and end-of-line handling (LF vs CR+LF).
- X
- XSee the file patches.os2 for changes to the GNUPLOT source.
- X
- X4) gnupmdrv.exe
- X===============
- X
- XGnupmdrv.exe is the 'outboard' driver for GNUPLOT. It is a multithreaded
- XPM program.
- X
- XRoger Fearick
- Xfearick@physci.uct.ac.za
- X5 November 1992
- END_OF_FILE
- if test 3851 -ne `wc -c <'gnuplot/README.os2'`; then
- echo shar: \"'gnuplot/README.os2'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.os2'
- fi
- if test -f 'gnuplot/README.pic' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.pic'\"
- else
- echo shar: Extracting \"'gnuplot/README.pic'\" \(3459 characters\)
- sed "s/^X//" >'gnuplot/README.pic' <<'END_OF_FILE'
- X
- XHOW TO USE PIC driver:
- X
- X
- XI have tested driver under gnuplot3.2, and I am currently using it
- Xwith the reengineered troff, groff, which is distributed by Free
- XSoftware Foundation, but it should work for AT&T's DWB as well. As
- Xgpic can produce TeX output, it could possibly be an alternative to
- Xthe LaTeX driver for TeX-users having the tpic macros (see the gpic
- Xman page - I don't know much about TeX so please don't ask me about
- Xthis).
- X
- XA simple graph can be formatted using
- X
- Xgroff -p -mpic -Tps file.pic > file.ps.
- X
- XThe output from pic can be pipe-lined into eqn, so it is possible to put
- Xcomplex functions in a graph with the set label and set {x/y}label commands.
- XFor instance,
- X
- Xset ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
- X
- XWill lable the y-axis with a nice integral if formatted with the
- Xcommand:
- X
- Xgpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps > filename.ps
- X
- XFigures made this way can be scaled to fit into a document. The pic
- Xlanguage is easy to understand, so the graphs can be edited by hand if
- Xneed be. All coordinates in the pic-file produced by gnuplot are given
- Xas x+gnuplotx and y+gnuploty. By default x and y are given the value 0
- XIf this line is removed with an editor in a number of files one can
- Xput several graphs i one figure like this (default size is 5.0x3.0 inches)
- X
- X.PS 8.0
- Xx=0;y=3
- Xcopy "figa.pic"
- Xx=5;y=3
- Xcopy "figb.pic"
- Xx=0;y=0
- Xcopy "figc.pic"
- Xx=5;y=0
- Xcopy "figd.pic"
- X.PE
- X
- XThis will produce an 8 inches wide figure with four graphs in two rows
- Xon top of each other
- X
- XOne can also achieve the same thing by the command
- X
- Xset term pic x y
- X
- XFor example, using
- X
- X.PS 6.0
- Xcopy "trig.pic"
- X.PE
- X
- Xthe following session generated a two by two figure with
- Xfour graphs:
- X
- X
- X G N U P L O T
- X unix version 3.2
- X patchlevel 2, Mar 24 92
- X last modified Sat Mar 24 21:08:47 PST 1992
- X
- XCopyright(C) 1986, 1987, 1990, 1991, 1992 Thomas Williams, Colin Kelley
- X
- X Send bugs and comments to bug-gnuplot@ames.arc.nasa.gov
- X
- XTerminal type set to 'x11'
- Xgnuplot> set out 'trig.pic'
- Xgnuplot> set ter pic 0 5
- XTerminal type set to 'pic'
- XOptions are 'Pic's origin is at (0.000000,5.000000)'
- Xgnuplot> plot sin(x)
- Xgnuplot> set ter pic 5 5
- XTerminal type set to 'pic'
- XOptions are 'Pic's origin is at (5.000000,5.000000)'
- Xgnuplot> plot cos(x)
- Xgnuplot> set ter pic 0 0
- Xset ter pic 0 0
- XTerminal type set to 'pic'
- XOptions are 'Pic's origin is at (0.000000,0.000000)'
- Xgnuplot> plot tan(x)
- Xgnuplot> set ter pic 5 0
- XTerminal type set to 'pic'
- XOptions are 'Pic's origin is at (5.000000,0.000000)'
- Xgnuplot> plot cos(x)/sin(x)
- Xplot cos(x)/sin(x)
- Xgnuplot> quit
- X
- X
- X
- XScaling can be done using set size.
- X
- X
- XI prefer this way of including graphs to using encapsulated in troff
- Xdocuments, because of the possiblity to preprocess with eqn, and
- Xbecause pic is much easier to understand than postscript - at least for me.
- X
- X
- XWHAT HAS TO BE DONE TO IMPROVE THIS DRIVER
- X
- X1.) Nice markers
- X
- X2.) Dot-dashed line styles
- X
- X3.) Possibly make line thickness an option when set term pic
- X
- X4.) Making it possible to select fonts for both pic and eqn from
- X gnuplot's command line.
- X
- X
- XI am happy to share this piece of software with anyone, in the hope
- Xthat it will be useful for at least someone. But taking into account
- Xthat it is the very first version of the driver, I would be happy if I
- Xcould get into contact with people able to help me improve it.
- X
- XMind you: Anything thats free comes with no guarantee!
- X
- XGood Luck
- X
- XSigfrid Lundberg (siglun@volterra.teorekol.lu.se)
- END_OF_FILE
- if test 3459 -ne `wc -c <'gnuplot/README.pic'`; then
- echo shar: \"'gnuplot/README.pic'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.pic'
- fi
- if test -f 'gnuplot/README.pro' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.pro'\"
- else
- echo shar: Extracting \"'gnuplot/README.pro'\" \(3142 characters\)
- sed "s/^X//" >'gnuplot/README.pro' <<'END_OF_FILE'
- XThe modifications to gnuplot 3.2 in this directory add the
- Xcapability of plotting probability distributions.
- X
- XThis mod adds the following extra standard gnuplot functions:
- X
- Xibeta - incomplete beta function
- Xigamma - incomplete gamma function
- Xlgamma - natural log of gamma
- Xgamma - gamma function
- Xerf - error function (= trivial variation of infamous bell curve)
- Xerfc - 1.0 - error function (more accurate than 1.0 - erf yourself)
- Xrand - pseudo random number generator (in compliance with Knuth)
- X
- Xusing these things as building blocks, a gnuplot command file 'stat.inc'
- Xis provided with definitions of almost all statistical distributions.
- X
- XAuthor: Jos van der Woude, jvdwoude@hut.nl
- X
- X==========================================================
- XDirections to install gnuplot 3.3:
- X(diffs are relative to gnuplot 3.0, patchlevel 2.0)
- X
- XIf you have a BSD machine, add the following to
- Xthe makefile.unx:
- X
- XOPTIONS = -DERF -DGAMMA
- X
- Xand specfun.c to the SOURCES and specfun.o to the OBJECTS.
- X
- XFor MSDOS machines (and non-BSD machines) do the following:
- X
- XASSUMPTIONS:
- XThe diffs provided work for msdos based pc's, using turbo C, version 2.0,
- Xand Borland C++, version 2.0 or 3.0.
- XIf you use a different setup, you might have to make (some) changes.
- X
- XGOAL:
- XTo extend the standard function library of gnuplot 3.2 with the following
- Xfunctions:
- X
- Xibeta - incomplete beta function
- Xigamma - incomplete gamma function
- Xerf() - error function (= trivial variation of normal distribution function)
- Xerfc() - 1.0 - erf() (more accurate than computing 1.0 - erf() yourself)
- Xgamma() - gamma function (for entire domain!)
- Xlgamma() - natural logarithm of gamma function
- Xrand() - a statistical acceptable version of standard C rand() function
- X
- XThese additions to the repertoire of standard functions turn gnuplot into
- Xan excellent tool for plotting statistical density and distribution functions.
- X
- XDETAILED INSTRUCTIONS:
- X0. Split the bottom part of this file into the appropriate files:
- X readme.p3, patch3.dif, stat.inc, nomo95.dem, random.dem, prob.dem,
- X prob2.dem, and specfun.c using an editor or a PD PC shar utility.
- X
- X1. Use the patch program to generate new versions of:
- X gnuplot.doc, command.c, internal.c, misc.c, parse.c, plot.c, plot.h,
- X standard.c, util.c and version.c
- X
- X2. Make sure that file specfun.c is in the gnuplot directory.
- X
- X3. Use the make program to create new version of gnuplot.
- X
- X4. Test the new functions with commmand files prob.dem, prob2.dem,
- X random.dem and nomo95.dem.
- X
- XKNOWN BUG:
- XOn MSDOS machines this modification can result in a DGROUP segment overflow
- Xerror at link time. The reason is that gnuplot uses the resources of the
- Xlarge memory model right up to the limit.
- XThere are two things you can do about this:
- X
- X1. Compile gnuplot using the huge memory model.
- X This was tested using Borland C++, version 2.0: Works fine, even with
- X -DREADLINE enabled.
- X
- X2. If you dont want to compile under the huge memory model you can try to
- X disable unused terminal drivers in term.h. See instructions at top
- X of file term.h.
- X
- X
- XHappy plotting,
- X
- XJos van der Woude
- XAmsterdam, The Netherlands
- Xjvdwoude@hut.nl
- END_OF_FILE
- if test 3142 -ne `wc -c <'gnuplot/README.pro'`; then
- echo shar: \"'gnuplot/README.pro'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.pro'
- fi
- if test -f 'gnuplot/README.xli' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.xli'\"
- else
- echo shar: Extracting \"'gnuplot/README.xli'\" \(3252 characters\)
- sed "s/^X//" >'gnuplot/README.xli' <<'END_OF_FILE'
- XFrom gregor@kafka.saic.com Tue Apr 7 21:24:49 1992
- XReturn-Path: <gregor@kafka.saic.com>
- XReceived: from kafka.saic.com by ra-next.arc.nasa.gov (NeXT-1.0 (From Sendmail 5.52)/NeXT-1.0)
- X id AA01805; Tue, 7 Apr 92 21:24:46 PDT
- XReceived: by kafka.saic.com (4.1/SMI-4.1)
- X id AA28518; Tue, 7 Apr 92 21:34:46 PDT
- XDate: Tue, 7 Apr 92 21:34:46 PDT
- XFrom: gregor@kafka.saic.com (gregg hanna)
- XMessage-Id: <9204080434.AA28518@kafka.saic.com>
- XTo: woo@ra-next.arc.nasa.gov
- XSubject: New terminal mode for gnuplot.
- XCc: gregor@kafka.saic.com
- XStatus: R
- X
- XIncluded in this shar is a patch and new files which provide a
- Xnew terminal type called 'xlib' (for x11-library mode). The xlib
- Xis like the x11 mode modified so that the commands previously
- Xsent to the gnuplot_x11 driver are instead put into the output
- Xfile. In addition, the gnuplot_x11.c file has been rewritten to
- Xbe a callable function, which will read a xlib file and draw the
- Xdescribed graph in a drawable.
- X
- XThe following files are included:
- X
- X xlib.trm - A copy of x11.trm, modified to use the
- X normal output file instead of a pipe.
- X
- X gnulib_x11.c - A rather severe rewrite of gnuplot_x11.c,
- X as well as a few functions used to interface
- X into the user code.
- X
- X gnulib_x11.h - Specs for user callable routines.
- X
- X xlibtest.c - a test program written in Motif, it will
- X run gnuplot and build a xlib output file, then
- X plot that on the screen. Resizing the window
- X will redraw the plot, scaled appropriately,
- X without re-running gnuplot.
- X
- X xlibtest.demo - the gnuplot command to draw the test plot.
- X
- X makefile.xlib - minimal make file for the xlibtest program
- X
- XThe following patch is included:
- X
- X term.patch - Patch to 'term.c' which adds the specification
- X for 'xlib' and includes the 'xlib.trm' file.
- X
- XThese changes were made relative to gnuplot3p2b6, and the patch
- Xis in unified diff format. Please drop me a line if you would like
- Xit in a different format or relative to a different revision level.
- X
- XTo get full use out of the xlib mode, the file gnulib_x11.c needs
- Xto be covered by the alternate GPL for libraries, since the gnulib.o
- Xfile must be linked into the user's executable. Until that is
- Xthe case, I will (of course) treat the file as covered by the GPL,
- Xmeaning that I cannot include the gnulib_x11 drawing routines in my
- Xsoftware.
- X
- XThe 'xlib' mode provides functionality similar to the 'xpm' terminal
- Xmode I sent earlier. The 'xlib' mode is *much* faster, the disk
- Xfiles are smaller, and plots are re-sizable. The only advantage
- Xof the 'xpm' mode is that XPM format files are more transportable.
- XThis would seems to be less important since there is a ppm terminal
- Xmode.
- X
- XI'm quite excited about this mode, since it allows executing software
- Xthe ability to generate gnuplot plots quickly while integrating the
- Xoutput into it's own display. I hope you will consider it for
- Xa future gnuplot release and, at that time, consider the LGPL
- Xoption. I would appreciate knowing your views on the subject, since
- XI would like to use the 'xlib' mode in my company's software.
- X
- XThanks for a great program!
- X
- X gregg hanna
- X gregor@kafka.saic.com
- X
- X--------cut-here---------------cut-here----------------cut-here----------
- END_OF_FILE
- if test 3252 -ne `wc -c <'gnuplot/README.xli'`; then
- echo shar: \"'gnuplot/README.xli'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.xli'
- fi
- if test -f 'gnuplot/bf_test.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/bf_test.c'\"
- else
- echo shar: Extracting \"'gnuplot/bf_test.c'\" \(3781 characters\)
- sed "s/^X//" >'gnuplot/bf_test.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *RCSid = "$Id: bf_test.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
- X#endif
- X
- X
- X/*
- X * Test routines for binary files
- X * cc bf_test.c -o bf_test binary_files.o -lm
- X *
- X * Copyright (c) 1992 Robert K. Cunningham, MIT Lincoln Laboratory
- X *
- X */
- X#include <stdio.h>
- X#if !defined(apollo) && !defined(sequent) && !defined(u3b2) && !defined(alliant) && !defined(sun386)
- X#include <stdlib.h>
- X#else
- Xextern char *malloc();
- X#endif
- X#include <math.h>
- Xfloat *vector();
- Xfloat *extend_vector();
- Xfloat *retract_vector();
- Xfloat **matrix();
- Xfloat **extend_matrix();
- Xfloat **retract_matrix();
- Xvoid free_matrix();
- Xvoid free_vector();
- X
- Xtypedef struct {
- X float xmin, xmax;
- X float ymin, ymax;
- X} range;
- X
- X#define NUM_PLOTS 2
- Xrange TheRange[] = {{-3,3,-2,2},
- X {-3,3,-3,3},
- X {-3,3,-3,3}};/* Sampling rate causes this to go from -3:6*/
- X
- X/*---- Stubs to make this work without including huge libraries ----*/
- Xvoid int_error(error_text,dummy)
- X char *error_text;
- X int dummy;
- X{
- X fprintf(stderr,"Fatal error..\n");
- X fprintf(stderr,"%s\n",error_text);
- X fprintf(stderr,"...now exiting to system ...\n");
- X exit(1);
- X}
- X
- Xchar *alloc(i)
- Xunsigned long i;
- X{
- X return(malloc(i));
- X}
- X/*---- End of stubs ----*/
- X
- Xfloat function(p,x,y)
- Xint p;
- Xdouble x,y;
- X{
- X float t;
- X switch (p){
- X case 0:
- X t = 1.0/(x*x+y*y+1.0);
- X break;
- X case 1:
- X t = sin(x*x + y*y)/(x*x + y*y);
- X if (t> 1.0) t = 1.0;
- X break;
- X case 2:
- X t = sin(x*x + y*y)/(x*x + y*y);
- X t *= sin(4.*(x*x + y*y))/(4.*(x*x + y*y)); /* sinc modulated sinc */
- X if (t> 1.0) t = 1.0;
- X break;
- X default:
- X fprintf(stderr, "Unknown function\n");
- X break;
- X }
- X return t;
- X}
- X
- X#define ISOSAMPLES (double)5
- Xint
- Xmain()
- X{
- X int plot;
- X int i,j;
- X float x,y;
- X float *rt,*ct;
- X float **m;
- X int xsize,ysize;
- X char buf[256];
- X FILE *fout;
- X/* Create a few standard test interfaces */
- X
- X for(plot = 0; plot < NUM_PLOTS; plot++){
- X xsize = (TheRange[plot].xmax - TheRange[plot].xmin)*ISOSAMPLES +1;
- X ysize = (TheRange[plot].ymax - TheRange[plot].ymin)*ISOSAMPLES +1;
- X
- X rt = vector(0,xsize-1);
- X ct = vector(0,ysize-1);
- X m = matrix(0,xsize-1,0,ysize-1);
- X
- X for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
- X ct[j] = y;
- X }
- X
- X for(x=TheRange[plot].xmin,i=0;i<xsize;i++,x+=1.0/(double)ISOSAMPLES){
- X rt[i] = x;
- X for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
- X m[i][j] = function(plot,x,y);
- X }
- X }
- X
- X sprintf(buf,"binary%d",plot+1);
- X#ifdef UNIX
- X if(!(fout = fopen(buf,"w")))
- X#else
- X if(!(fout = fopen(buf,"wb")))
- X#endif
- X int_error("Could not open file",0);
- X else{
- X fwrite_matrix(fout,m,0,xsize-1,0,ysize-1,rt,ct);
- X }
- X free_vector(rt,0,ysize-1);
- X free_vector(ct,0,xsize-1);
- X free_matrix(m,0,xsize-1,0,ysize-1);
- X }
- X
- X /* Show that it's ok to vary sampling rate, as long as x1<x2, y1<y2... */
- X xsize = (TheRange[plot].xmax - TheRange[plot].xmin)*ISOSAMPLES +1;
- X ysize = (TheRange[plot].ymax - TheRange[plot].ymin)*ISOSAMPLES +1;
- X
- X rt = vector(0,xsize-1);
- X ct = vector(0,ysize-1);
- X m = matrix(0,xsize-1,0,ysize-1);
- X
- X for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
- X ct[j] = y>0?2*y:y;
- X }
- X for(x=TheRange[plot].xmin,i=0;i<xsize;i++,x+=1.0/(double)ISOSAMPLES){
- X rt[i] = x>0?2*x:x;
- X for(y=TheRange[plot].ymin,j=0;j<ysize;j++,y+=1.0/(double)ISOSAMPLES){
- X m[i][j] = function(plot,x,y);
- X }
- X }
- X
- X sprintf(buf,"binary%d",plot+1);
- X#ifdef UNIX
- X if(!(fout = fopen(buf,"w")))
- X#else
- X if(!(fout = fopen(buf,"wb")))
- X#endif
- X int_error("Could not open file",0);
- X else{
- X fwrite_matrix(fout,m,0,xsize-1,0,ysize-1,rt,ct);
- X }
- X free_vector(rt,0,ysize-1);
- X free_vector(ct,0,xsize-1);
- X free_matrix(m,0,xsize-1,0,ysize-1);
- X
- X return(0);
- X}
- END_OF_FILE
- if test 3781 -ne `wc -c <'gnuplot/bf_test.c'`; then
- echo shar: \"'gnuplot/bf_test.c'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/bf_test.c'
- fi
- if test -f 'gnuplot/demo/bivariat.dem' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/bivariat.dem'\"
- else
- echo shar: Extracting \"'gnuplot/demo/bivariat.dem'\" \(3047 characters\)
- sed "s/^X//" >'gnuplot/demo/bivariat.dem' <<'END_OF_FILE'
- X#
- X# $Id: bivariat.dem%v 3.38.2.56 1993/01/22 02:44:12 woo Exp woo $
- X#
- X# This demo is very slow and requires unusually large stack size.
- X# Do not attempt to run this demo under MSDOS.
- X#
- X
- X# the function integral_f(x) approximates the integral of f(x) from 0 to x.
- X# integral2_f(x,y) approximates the integral from x to y.
- X# define f(x) to be any single variable function
- X#
- X# the integral is calculated as the sum of f(x_n)*delta
- X# do this x/delta times (from x down to 0)
- X#
- Xf(x) = exp(-x**2)
- Xdelta = 0.2
- X# delta can be set to 0.025 for non-MSDOS machines
- X#
- X# integral_f(x) takes one variable, the upper limit. 0 is the lower limit.
- X# calculate the integral of function f(t) from 0 to x
- Xintegral_f(x) = (x>0)?integral1a(x):-integral1b(x)
- Xintegral1a(x) = (x<=0)?0:(integral1a(x-delta)+delta*f(x))
- Xintegral1b(x) = (x>=0)?0:(integral1b(x+delta)+delta*f(x))
- X#
- X# integral2_f(x,y) takes two variables; x is the lower limit, and y the upper.
- X# claculate the integral of function f(t) from x to y
- Xintegral2_f(x,y) = (x<y)?integral2(x,y):-integral2(y,x)
- Xintegral2(x,y) = (x>y)?0:(integral2(x+delta,y)+delta*f(x))
- X
- Xset autoscale
- Xset title "approximate the integral of functions"
- Xset samples 50
- X
- 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)"
- X
- Xpause -1 "Hit return to continue"
- X
- Xf(x)=sin(x)
- X
- Xplot [-5:5] f(x) title "f(x)=sin(x)", integral_f(x)
- X
- Xpause -1 "Hit return to continue"
- X
- Xset title "approximate the integral of functions (upper and lower limits)"
- X
- Xf(x)=(x-2)**2-20
- X
- Xplot [-10:10] f(x) title "f(x)=(x-2)**2-20", integral2_f(-5,x)
- X
- Xpause -1 "Hit return to continue"
- X
- Xf(x)=sin(x-1)-.75*sin(2*x-1)+(x**2)/8-5
- X
- 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)
- X
- Xpause -1 "Hit return to continue"
- X
- X#
- X# This definition computes the ackermann. Do not attempt to compute its
- X# values for non integral values. In addition, do not attempt to compute
- X# its beyond m = 3, unless you want to wait really long time.
- X
- Xack(m,n) = (m == 0) ? n + 1 : (n == 0) ? ack(m-1,1) : ack(m-1,ack(m,n-1))
- X
- Xset xrange [0:3]
- Xset yrange [0:3]
- X
- Xset isosamples 4
- Xset samples 4
- X
- Xset title "Plot of the ackermann function"
- X
- Xsplot ack(x, y)
- X
- Xpause -1 "Hit return to continue"
- X
- Xset xrange [-5:5]
- Xset yrange [-10:10]
- Xset isosamples 10
- Xset samples 100
- Xset key 4,-3
- Xset title "Min(x,y) and Max(x,y)"
- X
- X#
- Xmin(x,y) = (x < y) ? x : y
- Xmax(x,y) = (x > y) ? x : y
- X
- Xplot sin(x), x**2, x**3, max(sin(x), min(x**2, x**3))+0.5
- X
- Xpause -1 "Hit return to continue"
- X
- X#
- X# gcd(x,y) finds the greatest common divisor of x and y,
- X# using Euclid's algorithm
- X# as this is defined only for integers, first round to the nearest integer
- Xgcd(x,y) = gcd1(rnd(max(x,y)),rnd(min(x,y)))
- Xgcd1(x,y) = (y == 0) ? x : gcd1(y, x - x/y * y)
- Xrnd(x) = int(x+0.5)
- X
- Xset samples 59
- Xset xrange [1:59]
- Xset auto
- Xset key
- X
- Xset title "Greatest Common Divisor (for integers only)"
- X
- Xplot gcd(x, 60)
- Xpause -1 "Hit return to continue"
- X
- Xset xrange [-10:10]
- Xset yrange [-10:10]
- Xset auto
- Xset isosamples 10
- Xset samples 100
- Xset title ""
- X
- END_OF_FILE
- if test 3047 -ne `wc -c <'gnuplot/demo/bivariat.dem'`; then
- echo shar: \"'gnuplot/demo/bivariat.dem'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/bivariat.dem'
- fi
- if test -f 'gnuplot/demo/err.dat' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/err.dat'\"
- else
- echo shar: Extracting \"'gnuplot/demo/err.dat'\" \(478 characters\)
- sed "s/^X//" >'gnuplot/demo/err.dat' <<'END_OF_FILE'
- X#
- X# $Id: err.dat 3.38.2.6 1992/11/14 02:25:21 woo Exp $
- X#
- X#
- X0 11.062 9.757 12.667 2.345
- X2 9.212 8.0908 10.932 1.725
- X5 8.55 7.6612 9.0388 2.846
- X10 8.122 7.327 8.617 0.957
- X15 8.156 7.6101 8.9019 1.577
- X20 8.122 7.5431 8.8009 3.141
- X25 7.988 6.3007 9.2753 1.57
- X27 8.096 6.665 10.555 2.172
- X29 7.936 6.9395 8.325 0.582
- X30 7.854 6.4909 9.8171 0.603
- X35 8.01 7.1556 8.644 1.063
- X40 8.02 7.0301 9.7099 2.152
- X45 8.092 6.9164 9.7676 1.44
- X50 8.072 7.2993 8.4447 1.96
- X60 8.286 7.7265 8.755 1.0
- END_OF_FILE
- if test 478 -ne `wc -c <'gnuplot/demo/err.dat'`; then
- echo shar: \"'gnuplot/demo/err.dat'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/err.dat'
- fi
- if test -f 'gnuplot/demo/surface1.dem' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/surface1.dem'\"
- else
- echo shar: Extracting \"'gnuplot/demo/surface1.dem'\" \(3667 characters\)
- sed "s/^X//" >'gnuplot/demo/surface1.dem' <<'END_OF_FILE'
- X#
- X# $Id: surface1.demo 3.38.2.6 1992/11/14 02:25:21 woo Exp $
- X#
- Xset samples 21
- Xset isosample 11
- Xset xlabel "X axis" -3,-2
- Xset ylabel "Y axis" 3,-2
- Xset zlabel "Z axis" -5
- Xset title "3D gnu plot demo"
- Xset label 1 "This is the surface boundary" at -10,-5,150 center
- Xset arrow 1 from -10,-5,120 to -10,0,0 nohead
- Xset arrow 2 from -10,-5,120 to 10,0,0 nohead
- Xset arrow 3 from -10,-5,120 to 0,10,0 nohead
- Xset arrow 4 from -10,-5,120 to 0,-10,0 nohead
- Xset xrange [-10:10]
- Xset yrange [-10:10]
- Xsplot x*y
- Xpause -1 "Hit return to continue (1)"
- Xset noarrow
- Xset nolabel
- Xset grid
- Xsplot x**2+y**2, x**2-y**2
- Xpause -1 "Hit return to continue (2)"
- Xrep x*y
- Xpause -1 "Hit return to continue (3)"
- Xrep (x**3+y**3)/10
- Xpause -1 "Hit return to continue (4)"
- Xset ticslevel 0.0
- Xset title "3D gnu plot demo ( ticslevel = 0.0 )"
- Xrep
- Xpause -1 "Hit return to continue (5)"
- Xset ticslevel 2.0
- Xset title "3D gnu plot demo ( ticslevel = 2.0 )"
- Xrep
- Xpause -1 "Hit return to continue (6)"
- Xset ticslevel 0.5
- Xset title "3D gnu plot demo ( ticslevel = 0.5 )"
- Xrep
- Xpause -1 "Hit return to continue (7)"
- Xset title "3D gnu plot demo"
- Xset nogrid
- Xsplot x*y with points
- Xpause -1 "Hit return to continue (8)"
- Xset noxtics
- Xset noytics
- Xset xrange [-1:1]
- Xset yrange [-1:1]
- Xset title "Surfaces with no grid or tics"
- Xsplot x*y with lines, x**2*y**3 with dots, x**3*y*2 with points
- Xpause -1 "Hit return to continue (9)"
- Xset xtics ("low" -3, "mid" 0, "high" 3)
- Xset ytics -2,0.5,2
- Xset xrange [-3:3]
- Xset yrange [-3:3]
- Xset log z
- Xset title "Surfaces with z log scale"
- Xsplot x**2*y**2 + 2, x**2*y**4 + 2, x**4*y**2 + 2
- Xpause -1 "Hit return to continue (10)"
- Xset nolog z
- Xset xtics
- Xset ytics
- Xset xrange [-1:1]
- Xset yrange [-1:1]
- Xset samples 51
- Xset isosample 21
- Xset dummy u,v
- Xset title "3D gnu plot demo"
- Xsplot u*v / (u**2 + v**2 + 0.1)
- Xpause -1 "Hit return to continue (11)"
- Xsplot [x=-3:3] [y=-3:3] sin(x) * cos(y)
- Xpause -1 "Hit return to continue (12)"
- Xset zrange [-0.35:0.35]
- Xreplot
- Xpause -1 "Hit return to continue (13)"
- Xset title "Sinc function"
- Xset zrange [-1:1]
- Xset label 1 "This is equal to 1" at -5,-2,0.75 right
- Xset arrow 1 from -5,-2.1,0.75 to 0,0,1
- Xsinc(u,v) = sin(sqrt(u**2+v**2)) / sqrt(u**2+v**2)
- Xsplot [-5:5.01] [-5:5.01] sinc(u,v)
- Xpause -1 "Hit return to continue (14)"
- Xset view 70,20,1
- Xset zrange [-0.5:1.0]
- Xset ztics -1,0.25,1
- Xset label 1 "This is equal to 1" at -5,-2,1.5 centre
- Xset arrow 1 from -5,-2.1,1.4 to 0,0,1
- Xsplot [-12:12.01] [-12:12.01] sinc(u,v)
- Xpause -1 "Hit return to continue (15)"
- Xset noarrow
- Xset ztics
- Xset nolabel
- Xset log
- Xset auto
- Xset title "This has logarithmic scale"
- Xsplot [x=1:15] [y=1:15] x**2+y**2
- Xpause -1 "Hit return to continue (16)"
- Xset nolog
- Xset xrange [0:15]
- Xset yrange [0:15]
- Xset auto
- Xset zrange [-0.6:0.7]
- Xset data style lines
- Xset title "Data grid plotting"
- Xset parametric
- Xsplot "glass.dat"
- Xpause -1 "Hit return to continue (17)"
- Xsplot "glass.dat" using 3:2:1
- Xpause -1 "Hit return to continue (18)"
- Xset zrange [-1.2:1.2]
- Xset noparametric
- Xsplot "glass.dat" using 1, "glass.dat" using 2, "glass.dat" using 3
- Xpause -1 "Hit return to continue (19)"
- Xset param
- Xset title "Test of spherical transform"
- Xset mapp sphe
- Xsplot "glass.dat"
- Xpause -1 "Hit return to continue (20)"
- X#
- X# Clean up:
- X#
- Xset nopar
- Xset mapp cart
- Xset samples 100
- Xset isosamples 10
- Xset view 60,30,1,1
- Xset xrange [-10:10]
- Xset yrange [-10:10]
- Xset zrange [-10:10]
- Xset auto
- Xset title "" 0,0
- Xset xlabel "" 0,0
- Xset ylabel "" 0,0
- Xset zlabel "" 0,0
- X# mandelbrot demo
- Xset isosamples 100
- Xset hidden3d
- Xcompl(a,b)=a*{1,0}+b*{0,1}
- Xmand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1
- Xsplot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),50)
- X# TANAKA Masaki (Tokyo Institute of technology)
- X# masaki@isea.is.titech.ac.jp
- END_OF_FILE
- if test 3667 -ne `wc -c <'gnuplot/demo/surface1.dem'`; then
- echo shar: \"'gnuplot/demo/surface1.dem'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/surface1.dem'
- fi
- if test -f 'gnuplot/demo/world.cor' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/world.cor'\"
- else
- echo shar: Extracting \"'gnuplot/demo/world.cor'\" \(3485 characters\)
- sed "s/^X//" >'gnuplot/demo/world.cor' <<'END_OF_FILE'
- X#
- X# $Id: world.cor%v 3.38.2.70 1993/02/08 02:17:40 woo Exp woo $
- X#
- X# Gnuplot world correspondences. Feel free to check for and update
- X# your site; especially if it represents a new location or you
- X# know more precise coordinates for a site. A (?) indicates
- X# the site may not be correct. Currently coordinates are generally
- X# rounded to the nearest latitude and longitude. It's fine, however,
- X# to give as many decimal places with each as you like.
- X
- X# USA
- X# Carnegie Mellon University
- X# Univ. of Calif. at Irvine
- X# University of Maryland
- X-110 35 # Northern Arizona University, Flagstaff, Arizona
- X-111 32 # Univ. of Arizona, Tucson, Arizona
- X-110 43 # University of Utah, Salt Lake City, Utah
- X-118 34 # California Institute of Technology (CALTECH), L.A., Calif.
- X-118 34 # Claremont, California
- X-118 34 # Univ. of Calif. at Los Angeles (UCLA), California
- X-120 34.5 # Univ. of Calif. at Santa Barbara, California
- X-122 37.5 # Stanford, California
- X-122 38 # Berkeley, California
- X-122 38 # Richmond, California
- X-122 47.5 # University of Washington, Washington
- X-71 42.5 # MIT, Cambridge, Massachusetts
- X-74.5 40.5 # New Brunswick, New Jersey
- X-75 41 # Bethlehem, Pennsylvania
- X-76 42 # Cornell College, Ithica, New York
- X-78.5 38 # Univ of Virginia, Charlottesville, Virginia
- X-79 36 # N.C. State University, Chapel Hill, North Carolina
- X-80 35 # Duke University, Durham, North Carolina
- X-81 28 # Melbourne, Florida
- X-83 40 # Ohio State, Columbus, Ohio
- X-83 42 # Detroit, Michigan
- X-84 34 # Alpharetta, Georgia
- X-84 34 # Atlanta, Georgia
- X-84 42 # Univ. of Michigan, Ann Arbor, Michigan
- X-86 39 # UCS Indiana (?)
- X-88 40 # University of Illinois, Urbana-Champaign, Illinois
- X-88 42 # Arlington Heights, Illinois
- X-88 42 # Northwestern University, Evanston, Illinois
- X-92 30 # Lafayette, Louisiana
- X-93 45 # Eagan, Minnesota
- X-95 30 # Houston, Texas
- X-95 39 # Kansas State University
- X-96 31 # Texas A&M, College Station, Texas
- X-98 30 # Univ of Texas, Austin, Texas
- X# Canada
- X-123 49 # BC Hydro, Vancover, British Columbia (?)
- X-63 45 # Dartmouth, Nova Scotia, Canada
- X-75 45 # Ecole Polytechnique de Montreal, Canada
- X# United Kingdom
- X-8 54.5 # Bangor, United Kingdom
- X-80.5 43.5 # Waterloo, Ontario, Canada
- X0 52 # Cambridge, U. K.
- X# Italy
- X14 46 # Trieste, Italy
- X# Australia
- X138.5666 -35.01666 # Flinders University, Adelaide, South Australia
- X138.6333 -34.8 # South Australian Institute, Adelaide, South AUS
- X145.1333 -37.9167 # Monash University, Melbourne, Victoria
- X144.9833 -37.8167 # Melbourne University, Melbourne, Victoria
- X# Namibia
- X17 -23 # Windhoek, Namibia
- X# Sweden
- X18 60 # Stockholm, Sweden
- X# France
- X2 49 # Valbonne, CEDEX, France (?)
- X# Finland
- X24 60 # Espoo, Finland
- X24 62 # Wassau, Finland (?)
- X# Belgium
- X4.5 51 # Brussels, Belgium
- X# The Netherlands
- X4.5 52 # Delft, The Netherlands
- X# Germany
- X7 51 # University of Cologne, Federal Republic of Germany
- X7 51.5 # Fraunhofer Institut, Duisburg, Germany
- X8 48 # Freiburg im Br. (Federal Republic of Germany)
- X8 52 # Univesity of Dortmund, Federal Republic of Germany
- X11.5 48 # Technische Universitaet Muenchen, Munich, Germany
- END_OF_FILE
- if test 3485 -ne `wc -c <'gnuplot/demo/world.cor'`; then
- echo shar: \"'gnuplot/demo/world.cor'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/world.cor'
- fi
- if test -f 'gnuplot/docs/Makefile.in' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/docs/Makefile.in'\"
- else
- echo shar: Extracting \"'gnuplot/docs/Makefile.in'\" \(3441 characters\)
- sed "s/^X//" >'gnuplot/docs/Makefile.in' <<'END_OF_FILE'
- X# Makefile for GNUPLOT documentation
- X#
- X# Note that the top-level file for documentation is gnuplot.doc.
- X# See README.
- X#
- X# To print manual:
- X# make gnuplot.dvi (for latex)
- X# (print or view gnuplot.dvi)
- X# OR
- X# make gnuplot.nroff (for nroff)
- X# (print or view gnuplot.nroff)
- X# or
- X# make "TROFF=itroff" troff (for troff; use your troff here)
- X#
- X
- X.NOEXPORT:
- XSHELL = /bin/sh
- X
- Xsrcdir = @srcdir@
- XVPATH = @srcdir@
- X
- Xprefix = /usr/local
- Xexec_prefix = $(prefix)
- Xbindir = $(exec_prefix)/bin
- Xdatadir = $(prefix)/lib
- Xmandir = $(prefix)/man
- X
- XINSTALL = @INSTALL@
- XINSTALL_PROGRAM = @INSTALL_PROGRAM@
- XINSTALL_DATA = @INSTALL_DATA@
- X
- XCC = @CC@
- XDEFS = @DEFS@
- XCFLAGS = -O2
- XLDFLAGS = -s
- XLIBS =
- X
- XMAKEINFO = makeinfo
- X
- X# substitute your troff command (and any flags) for this one
- XTROFF=troff
- X
- X# substitute your DVI to PostScript conversion program here
- XDVIPS=dvips
- X
- X# default is what is needed for interactive gnuplot
- Xdefault: gnuplot.hlp gnuplot.gih
- X
- X### [tn]roff documentation
- Xtroff: gnuplot.ms titlepag.ms
- X tbl $(srcdir)/gnuplot.ms | eqn | $(TROFF) -ms
- X
- Xnroff: gnuplot.nroff
- X
- Xgnuplot.nroff: gnuplot.ms titlepag.ms
- X tbl $(srcdir)/gnuplot.ms | neqn | nroff -ms | col > gnuplot.nroff
- X
- Xms: gnuplot.ms
- X
- Xgnuplot.ms: doc2ms gnuplot.doc
- X ./doc2ms $(srcdir)/gnuplot.doc gnuplot.ms
- X
- Xdoc2ms: doc2ms.o
- X $(CC) -o $@ doc2ms.o $(LDFLAGS) $(LIBS)
- X
- X### LaTeX documentation
- Xtex: gnuplot.tex
- X
- Xgnuplot.tex: doc2tex gnuplot.doc
- X ./doc2tex $(srcdir)/gnuplot.doc gnuplot.tex
- X
- X# this is how to make DVI files
- Xdvi: gnuplot.dvi gpcard.dvi
- X
- Xgnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty
- X latex gnuplot
- X latex gnuplot
- X
- Xgpcard.dvi: gpcard.tex
- X tex gpcard
- X
- X# this is how to make PostScript files
- X# if pslatex has been installed, add "times" to titlepage.tex
- Xps: gnuplot.ps gpcard.ps
- X
- Xgnuplot.ps: gnuplot.dvi
- X $(DVIPS) gnuplot
- X
- Xgpcard.ps: gpcard.dvi
- X $(DVIPS) gpcard
- X
- Xdoc2tex: doc2tex.o
- X $(CC) -o $@ doc2tex.o $(LDFLAGS) $(LIBS)
- X
- X# this is how to make gnuplot.hlp
- Xhlp: gnuplot.hlp
- X
- Xgnuplot.hlp: doc2hlp gnuplot.doc
- X ./doc2hlp $(srcdir)/gnuplot.doc gnuplot.hlp
- X
- X# this is how to make gnuplot.gih
- Xgih: gnuplot.gih
- X
- Xgnuplot.gih: doc2gih gnuplot.doc
- X ./doc2gih $(srcdir)/gnuplot.doc gnuplot.gih
- X
- Xdoc2gih: doc2gih.o
- X $(CC) -o $@ doc2gih.o $(LDFLAGS) $(LIBS)
- X
- X# this is how to make Info documentation
- Xinfo: gnuplot.info
- X
- Xgnuplot.info: gnuplot.doc
- X perl $(srcdir)/doc2info.pl $(srcdir)/gnuplot.doc > gpltinfo.tex
- X $(MAKEINFO) --fill-column=80 gpltinfo.tex
- X rm -f gpltinfo.tex
- X
- Xtutorial: latextut/tutorial.tex
- X ( cd latextut; $(MAKE) )
- X
- X# this is how to check the gnuplot.doc file
- Xcheck: checkdoc gnuplot.doc
- X ./checkdoc < $(srcdir)/gnuplot.doc
- X
- Xcheckdoc: checkdoc.o
- X $(CC) -o $@ checkdoc.o $(LDFLAGS) $(LIBS)
- X
- X# For Unix and MSDOS only
- Xinstall: gnuplot.gih
- X $(INSTALL_DATA) gnuplot.gih $(datadir)/gnuplot.gih
- X
- Xuninstall:
- X rm -f $(datadir)/gnuplot.gih
- X
- X# for VMS only
- Xinstall-vms: gnuplot.hlp
- X $(INSTALL_DATA) gnuplot.hlp $(datadir)/gnuplot.hlp
- X
- X# remove all derived files
- Xclean:
- X rm -f doc2ms gnuplot.nroff gnuplot.ms \
- X doc2tex gnuplot.tex gnuplot.dvi \
- X gnuplot.aux gnuplot.log gnuplot.toc \
- X gnuplot.ps gpcard.dvi gpcard.log gpcard.ps \
- X doc2hlp gnuplot.hlp \
- X doc2gih gnuplot.gih \
- X checkdoc *.o core a.out \
- X gnuplot.info* gpltinfo.tex
- X ( cd latextut; $(MAKE) clean )
- X
- Xmostlyclean: clean
- X
- Xdistclean: clean
- X rm -f Makefile
- X
- Xrealclean: distclean
- X rm -f TAGS
- END_OF_FILE
- if test 3441 -ne `wc -c <'gnuplot/docs/Makefile.in'`; then
- echo shar: \"'gnuplot/docs/Makefile.in'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/docs/Makefile.in'
- fi
- if test -f 'gnuplot/docs/README' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/docs/README'\"
- else
- echo shar: Extracting \"'gnuplot/docs/README'\" \(3883 characters\)
- sed "s/^X//" >'gnuplot/docs/README' <<'END_OF_FILE'
- XNotes on the gnuplot help files and documentation.
- X
- XGnuplot documentation is available in three ways:
- X
- X1 - interactively, within gnuplot
- X2 - as a printed document.
- X3 - as a manual page, through the Unix man(1) facility
- X
- XThe first two forms describe the inner workings, and contain
- Xequivalent information, while the third form tells how to run gnuplot.
- X
- XThe two first forms above derive their information from the file
- Xgnuplot.doc, which is the MASTER copy of gnuplot help information. All
- Xother forms, except for gnuplot.1, the man page, are derived from it.
- X
- Xgnuplot.doc -> gnuplot.hlp
- X -> gnuplot.gih
- X -> gnuplot.tex
- X -> gnuplot.ms
- X -> gnuplot.rtf
- X
- XOn VMS the interactive help is supplied by the system help facility,
- Xusing the gnuplot.hlp file. This is made with ('make hlp'). On Unix,
- XAmigaDOS, and MSDOS the interactive help is built in to the program,
- Xand uses the gnuplot.gih file ('make gih'). On MS-Windows, the
- XMicrosoft help compiler converts an 'rtf' file to an 'hlp' file
- Xwhich is used by the standard Windows help program.
- X
- XThe printed document is available in either latex or troff/nroff (ms)
- Xformat, using gnuplot.tex or gnuplot.ms, derived from gnuplot.doc with
- Xeither doc2tex or doc2ms. Type 'make dvi' or 'make nroff'. For troff,
- Xtype 'make ms' and then troff -ms gnuplot.ms in whatever way you use
- Xtroff.
- X
- XIf VMS users prefer the gnuplot interactive help facility to the
- Xsystem facility, this can be easily changed in command.c.
- X
- X
- XDescription of the gnuplot.doc format:
- X--------------------------------------
- X
- XHere is an example of the DOC master help format:
- X
- X?
- X1 gnuplot
- X GNUPLOT is a command-driven interactive function plotting program. It
- X ...
- X?exit
- X2 exit
- X 'exit', 'quit' and ...
- X?expressions
- X2 expressions
- X In general, any mathematical expression accepted by C, ...
- X
- X Topics:
- X functions operators
- X?expressions functions
- X?functions
- X3 functions
- X The functions in GNUPLOT are ...
- X
- X Topics:
- X abs acos arg ...
- X?expressions functions abs
- X?functions abs
- X?abs
- X4 abs
- X This function returns the absolute value of its argument. The
- X returned value is of the same type as the argument.
- X?expressions functions acos
- X?functions acos
- X?acos
- X4 acos
- X This function returns the arc cosine (inverse cosine) of its
- X argument. 'acos' returns its argument in radians.
- X
- X
- XSome notes about the format:
- X----------------------------
- XRemember that all text must be able to be processed by gnuplot, VMS,
- X nroff, troff, and latex, and always do something reasonable.
- XThe first column is reserved for control characters.
- XText does not start in the first column.
- XLines that start in column 2 may be typeset by LaTeX.
- XLines that have a space in column 2 are to be printed in a verbatim
- X environment by LaTeX.
- XTables must have a space in column 2.
- XDo NOT use tabs in the help file.
- XConversion from this format to vax .hlp file involves removal of
- X lines starting with [?@#$%] (see doc2hlp). VMS uses the numbers
- X to represent a tree.
- XConversion from this format to gnuplot .gih file involves removal of
- X lines starting with [0-9@#$%] (see doc2gih). Gnuplot matches your
- X help query against the ? lines to find the help information.
- X Multiple ? lines for one text block constitute synonyms. The most
- X specific should be first, eg 'expressions functions' before 'functions'.
- X Spaces are allowed here, but should be single.
- XBackquote pairs are converted by the doc2tex program into boldface;
- X that is, `some text` is converted to {\bf some text}. Be sure to pair
- X the backquotes, or the whole document will be boldface!
- X
- XControl characters in first column:
- X? used by .gih format, for builtin interactive help - keyword
- X0-9 used by VMS help and by doc2{tex,ms} formatters to define level,keyword
- X@ used by doc2{tex,ms} to define table start/end
- X# used by doc2tex: table entry
- X% used by doc2ms: table entry
- END_OF_FILE
- if test 3883 -ne `wc -c <'gnuplot/docs/README'`; then
- echo shar: \"'gnuplot/docs/README'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/docs/README'
- fi
- if test -f 'gnuplot/docs/doc2info.pl' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/docs/doc2info.pl'\"
- else
- echo shar: Extracting \"'gnuplot/docs/doc2info.pl'\" \(3020 characters\)
- sed "s/^X//" >'gnuplot/docs/doc2info.pl' <<'END_OF_FILE'
- X#!/usr/local/bin/perl
- X#
- X# doc2texinfo : Converts Gnuplot .doc files to Texinfo format.
- X#
- X# George Ferguson, ferguson@cs.rochester.edu, 11 Feb 1991.
- X#
- X# Usage:
- X# % doc2texinfo gnuplot.doc >gnuplot.texinfo
- X# % makeinfo +fill-column 80 gnuplot.texinfo
- X# Creates files "gnuplot.info" and "gnuplot.info-[123]".
- X#
- X
- X$currentBook = $currentChapter = $currentSection = $currentSubsection = 0;
- X$verbatim = $table = 0;
- X
- Xwhile (<>) {
- X if (/^([1-4]) (.*)$/) { # section heading
- X $table = 0;
- X &endVerbatim;
- X $numNodes += 1;
- X $nodeLevel[$numNodes] = $1;
- X $nodeTitle[$numNodes] = $2;
- X $nodeText[$numNodes] = "";
- X if ($1 == 1) {
- X $currentBook = $numNodes;
- X } elsif ($1 == 2) {
- X $currentChapter = $numNodes;
- X $nodeMenu[$currentBook] .= "* $2::\n";
- X } elsif ($1 == 3) {
- X $currentSection = $numNodes;
- X if ($nodeTitle[$currentChapter] eq "set-show") {
- X $nodeTitle[$numNodes] = "set $2"; # override
- X $nodeMenu[$currentChapter] .= "* set $2::\n";
- X } else {
- X $nodeMenu[$currentChapter] .= "* $2::\n";
- X }
- X } elsif ($1 == 4) {
- X $currentSubsection = $numNodes;
- X $nodeMenu[$currentSection] .= "* $2::\n";
- X }
- X } elsif (/^\?(.*)$/) { # index entry
- X if ($1 ne "") {
- X $nodeText[$numNodes] .= "\@cindex $1\n";
- X }
- X } elsif (/^@start table/) { # start table
- X &startVerbatim;
- X $table = 1;
- X } elsif (/^@end table/) { # end table
- X $table = 0;
- X &endVerbatim;
- X } elsif (/^#/ || /^%/) { # table entry
- X next;
- X } elsif (/^ ( ?)(.*)$/) { # text
- X if ($1 eq " ") {
- X &startVerbatim;
- X } else {
- X &endVerbatim;
- X }
- X $text = $2;
- X $text =~ s/@/@@/g;
- X $text =~ s/{/\@{/g;
- X $text =~ s/}/\@}/g;
- X $text =~ s/\`([^`]*)\`/@code{$1}/g;
- X $nodeText[$numNodes] .= "$text\n";
- X } elsif (/^$/) { # blank line
- X &endVerbatim;
- X $nodeText[$numNodes] .= "\n";
- X }
- X}
- X
- X# Print texinfo header
- Xprint "\\input texinfo\n";
- Xprint "@setfilename gnuplot.info\n";
- Xprint "@settitle Gnuplot: An Interactive Plotting Program\n";
- Xprint "\n";
- Xprint "@node Top\n";
- Xprint "@top Gnuplot";
- Xprint "\n";
- Xprint "$nodeText[1]";
- Xprint "\@menu\n";
- Xprint "$nodeMenu[1]";
- Xprint "* General Index::\n";
- Xprint "\@end menu\n";
- Xprint "\n";
- X
- X# Now output all the nodes
- Xfor ($i=2; $i <= $numNodes; $i++) {
- X print "\@node $nodeTitle[$i]\n";
- X if ($nodeLevel[$i] == 2) {
- X print "\@chapter $nodeTitle[$i]\n";
- X } elsif ($nodeLevel[$i] == 3) {
- X print "\@section $nodeTitle[$i]\n";
- X } elsif ($nodeLevel[$i] == 4) {
- X print "\@subsection $nodeTitle[$i]\n";
- X }
- X print "$nodeText[$i]";
- X if ($nodeMenu[$i] ne "") {
- X print "\@menu\n";
- X print $nodeMenu[$i];
- X print "\@end menu\n";
- X }
- X print "\n";
- X}
- X# Print texinfo trailer
- Xprint "\n";
- Xprint "@node General Index\n";
- Xprint "@appendix General Index\n";
- Xprint "\n";
- Xprint "@printindex cp\n";
- Xprint "\n";
- Xprint "@bye\n";
- X
- X#######################
- X
- Xsub startVerbatim {
- X if (!$verbatim) {
- X $nodeText[$numNodes] .= "\@example\n";
- X $verbatim = 1;
- X }
- X}
- X
- Xsub endVerbatim {
- X if ($verbatim && !$table) {
- X $nodeText[$numNodes] .= "\@end example\n";
- X $verbatim = 0;
- X }
- X}
- END_OF_FILE
- if test 3020 -ne `wc -c <'gnuplot/docs/doc2info.pl'`; then
- echo shar: \"'gnuplot/docs/doc2info.pl'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/docs/doc2info.pl'
- fi
- if test -f 'gnuplot/makefile.msc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.msc'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.msc'\" \(3888 characters\)
- sed "s/^X//" >'gnuplot/makefile.msc' <<'END_OF_FILE'
- X#
- X# $Id: makefile.msc%v 3.50 1993/07/09 05:50:28 woo Exp $
- X#
- X# Make file for use with Microsoft C Version 5.10
- X# and Microsoft Program Maintenance Utility Version 4.07
- X#
- X
- X# where to place gnuplot.gih helpfile
- XHELPFILE = gnuplot.gih
- X
- X# /c means don't link
- X# /AL means large memory model (large code, large data)
- X# /DPC means define symbol PC
- X# /DLITE means no hiddenline removal
- X# /Gt means no 64k segment problem
- XCFLAGS = /c /AL /DPC /DREADLINE /DLITE /Gt /D__MSC__ #/Zi #/Od
- X
- X# see other terminal defines in term.h
- XTERMFLAGS =
- X
- X# /NOE means NO EXTernal Dictionary
- X# /EX means pack EXE file
- X# /ST:10000 means stack size 10000 bytes
- XLINKFLAGS = /NOE /EX /ST:10000 /ONERROR:NOEXE #/codeview
- X
- XOBJS = bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj \
- X help.obj internal.obj misc.obj parse.obj plot.obj readline.obj \
- X scanner.obj setshow.obj standard.obj term.obj util.obj version.obj \
- X pcgraph.obj hrcgraph.obj corgraph.obj specfun.obj gnubin.obj \
- X binary.obj
- X
- XCSOURCE5 = term\aed.trm term\cgi.trm term/dumb.trm term/dxf.trm term\dxy.trm \
- X term\eepic.trm term\epson.trm term\fig.trm term\hp26.trm \
- X term\hp2648.trm term\hpgl.trm term\hpljii.trm
- XCSOURCE6 = term\impcodes.h term\imagen.trm term\object.h \
- X term\iris4d.trm term\kyo.trm term\latex.trm term/pbm.trm term\pc.trm
- XCSOURCE7 = term\post.trm term\qms.trm term\regis.trm term\sun.trm \
- X term\t410x.trm term\tek.trm term\unixpc.trm term\unixplot.trm \
- X term\v384.trm term\x11.trm
- XCSOURCE8 = contour.c gnubin.c binary.c
- X
- X# default rules
- X.c.obj:
- X cl $(CFLAGS) $*.c
- X
- X.asm.obj:
- X masm $*;
- X
- Xdefault: gnuplot.exe $(HELPFILE) demo\bf_test.exe
- X
- Xlinkopt.msc: makefile.msc
- X echo pcgraph+hrcgraph+corgraph+bitmap+ >linkopt.msc
- X echo term+graphics+graph3d+contour+ >>linkopt.msc
- X echo plot+setshow+command+help+internal+ >>linkopt.msc
- X echo misc+specfun+gnubin+binary+readline+ >>linkopt.msc
- X echo parse+eval+scanner+standard+util+version >>linkopt.msc
- X echo gnuplot >>linkopt.msc
- X echo nul; >>linkopt.msc
- X
- Xpcgraph.obj: pcgraph.asm header.mac lineproc.mac
- X
- Xcorgraph.obj: corgraph.asm header.mac lineproc.mac
- X
- Xhrcgraph.obj: hrcgraph.asm header.mac lineproc.mac
- X
- Xbinary.obj: binary.c
- X
- Xbitmap.obj: bitmap.c bitmap.h plot.h
- X
- Xcommand.obj: command.c plot.h setshow.h help.h
- X cl $(CFLAGS) /DHELPFILE=\"$(HELPFILE)\" command.c
- X
- Xcontour.obj: contour.c plot.h
- X
- Xeval.obj: eval.c plot.h
- X
- Xgnubin.obj: gnubin.c
- X
- Xgraphics.obj: graphics.c plot.h setshow.h
- X
- Xgraph3d.obj: graphics.c plot.h setshow.h
- X
- Xhelp.obj: help.c plot.h help.h
- X
- Xinternal.obj: internal.c plot.h
- X
- Xmisc.obj: misc.c plot.h setshow.h
- X
- Xparse.obj: parse.c plot.h
- X
- Xplot.obj: plot.c plot.h setshow.h
- X
- Xreadline.obj: readline.c
- X
- Xscanner.obj: scanner.c plot.h
- X
- Xsetshow.obj: setshow.c plot.h setshow.h
- X
- Xstandard.obj: standard.c plot.h
- X
- Xspecfun.obj: specfun.c plot.h
- X
- Xterm.obj: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X cl $(CFLAGS) $(TERMFLAGS) /Iterm term.c
- X
- Xutil.obj: util.c plot.h
- X
- Xversion.obj: version.c
- X
- X# convert gnuplot.doc to gnuplot.gih
- Xdoc2gih.exe: docs\doc2gih.c
- X cl docs\doc2gih.c
- X
- X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
- X doc2gih docs\gnuplot.doc $(HELPFILE)
- X
- X# Object files in link command line are ordered to avoid far jumps.
- X# use linkopt.msc to avoid command-line overflow
- X
- Xgnuplot.exe: $(OBJS) linkopt.msc
- X link $(LINKFLAGS) @linkopt.msc
- X
- X#make binary demo files
- Xdemo\bf_test.exe: bf_test.c dbinary.obj
- X cl /AL /DPC /D__MSC__ /F 5000 /Gt /W1 /Fedemo\bf_test.exe bf_test.c dbinary.obj
- X cd demo
- X bf_test
- X cd ..
- X
- Xdbinary.obj: binary.c
- X cl /c /AL /DPC /D__MSC__ /F 5000 /Gt /W1 /Fodbinary.obj binary.c
- X
- X# clean up temporary files
- Xclean:
- X del *.obj
- X del gnuplot.map
- X del demo\bf_test.exe
- X del linkopt.msc
- X
- Xveryclean: clean
- X del gnuplot.exe
- X del $(HELPFILE)
- X del demo\binary1
- X del demo\binary2
- X del demo\binary3
- X
- END_OF_FILE
- if test 3888 -ne `wc -c <'gnuplot/makefile.msc'`; then
- echo shar: \"'gnuplot/makefile.msc'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.msc'
- fi
- if test -f 'gnuplot/makefile.st' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.st'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.st'\" \(3731 characters\)
- sed "s/^X//" >'gnuplot/makefile.st' <<'END_OF_FILE'
- X#
- X# $Id: makefile.atari 3.38.2.21 1992/11/24 16:22:20 woo Exp $
- X#
- X
- X#
- X# GNUPLOT makefile for GCC-ST 1.x and 2.x
- X# in a cross development environment (unix) or a native TOS environment
- X# (see configuration section)
- X#
- X# Modified from the BorlandC makefile by Alexander Lehmann
- X#
- X
- X# -------------------- begin of configuration section -----------------------
- X
- X# CC is name of compiler producing TOS executables
- X# HOSTCC is the name of the native compiler
- X# SL is the path separator (/ for unix or UNIXMODE, \ for standard TOS)
- X
- X# settings for crosscompiling:
- XCC = cgcc
- X#HOSTCC = gcc
- XHOSTCC = cc
- XSL=/
- X
- X# settings for native compiling:
- X#CC = gcc
- X#HOSTCC = $(CC)
- X#SL=\
- X
- X# -O means optimisation in general
- X# o-f-p avoids link-unlink instructions
- X# s-r optimisation of loops and elimination of iterations variables
- X# c-r improve register movement
- X# if you have GCC 2.x (and time), you can choose the -O2 option
- X
- X# first line for GCC 1.x, second and third for GCC 2.x
- X
- X#OPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce -fcombine-regs
- XOPTFLAGS = -O -fomit-frame-pointer -fstrength-reduce
- X#OPTFLAGS = -O2 -fomit-frame-pointer
- X
- X# -c means don't link
- X# -DREADLINE to use the history/line editing capability. If you want this
- X# capability add -DREADLINE to CFLAGS (currently on)
- X
- XCFLAGS = -c $(OPTFLAGS) -DATARI -DREADLINE -DPIPES
- XTERMFLAGS =
- X
- X# where to place gnuplot.gih helpfile
- X# if this is an absolute pathname, shel_find will not be used.
- XHELPFILE=gnuplot.gih
- X
- X# -------------------- end of configuration section -------------------------
- X
- XOBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o gnubin.o\
- X help.o internal.o misc.o parse.o plot.o readline.o scanner.o\
- X setshow.o specfun.o standard.o term.o util.o version.o binary.o
- X
- X# path prefix for the term subdirectory
- XTERM=term$(SL)
- X
- XTERMS = $(TERM)atari.trm $(TERM)dumb.trm $(TERM)eepic.trm $(TERM)epson.trm \
- X $(TERM)hpgl.trm $(TERM)hpljii.trm $(TERM)hppj.trm $(TERM)latex.trm \
- X $(TERM)pbm.trm $(TERM)post.trm $(TERM)texdraw.trm
- X
- Xall: gnuplot.ttp $(HELPFILE) demo$(SL)bf_test.tos
- X
- Xgnuplot.ttp: $(OBJS)
- X $(CC) -o $@ $(OBJS) -lpml -lgem
- X fixstk 80k $@
- X# strip -k $@ # you might want to add strip here
- X
- X# to run the bivariat demo ca. 75k stack is needed, all others work with ca. 32k
- X
- X# default rules
- X
- X%.o: %.c
- X $(CC) -o $@ $(CFLAGS) $<
- X
- X# dependencies
- X
- Xbitmap.o: bitmap.c bitmap.h plot.h
- X
- Xbinary.o: binary.c plot.h
- X
- Xcommand.o: command.c plot.h setshow.h help.h
- X $(CC) -o $@ $(CFLAGS) -DHELPFILE=\"$(HELPFILE)\" $<
- X
- Xcontour.o: contour.c plot.h
- X
- Xeval.o: eval.c plot.h
- X
- Xgraphics.o: graphics.c plot.h setshow.h
- X
- Xgraph3d.o: graph3d.c plot.h setshow.h
- X
- Xgnubin.o: gnubin.c plot.h setshow.h
- X
- Xhelp.o: help.c help.h
- X
- Xinternal.o: internal.c plot.h
- X
- Xmisc.o: misc.c plot.h setshow.h help.h
- X
- Xparse.o: parse.c plot.h
- X
- Xplot.o: plot.c plot.h setshow.h
- X
- Xreadline.o: readline.c
- X
- Xscanner.o: scanner.c plot.h
- X
- Xsetshow.o: setshow.c plot.h setshow.h
- X
- Xspecfun.o: plot.h specfun.c
- X
- Xstandard.o: standard.c plot.h
- X
- Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(TERMS)
- X $(CC) -o $@ $(CFLAGS) $(TERMFLAGS) -Iterm term.c
- X
- Xutil.o: util.c plot.h
- X
- Xversion.o: version.c
- X
- X# convert gnuplot.doc to gnuplot.gih
- X$(HELPFILE): doc2gih docs$(SL)gnuplot.doc
- X doc2gih docs$(SL)gnuplot.doc $(HELPFILE)
- X
- Xdoc2gih: docs$(SL)doc2gih.c
- X $(HOSTCC) -o doc2gih docs$(SL)doc2gih.c
- X
- Xdemo$(SL)bf_test.tos: bf_test.o binary.o
- X $(CC) -s -o $@ bf_test.o binary.o -lpml
- X
- Xclean: # remove temporary files, but leave executable intact
- X rm -f $(OBJS) bf_test.o doc2gih
- X
- Xrealclean: clean # remove all files generated by make
- X rm -f gnuplot.ttp gnuplot.gih demo$(SL)binary1 demo$(SL)binary2
- X rm -f demo$(SL)binary3 demo$(SL)bf_test.tos
- X
- X# empty rules for file extensions (some makes might need this)
- X%.trm:
- X
- X%.doc:
- X
- END_OF_FILE
- if test 3731 -ne `wc -c <'gnuplot/makefile.st'`; then
- echo shar: \"'gnuplot/makefile.st'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.st'
- fi
- if test -f 'gnuplot/os2/gnuicon.uue' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/os2/gnuicon.uue'\"
- else
- echo shar: Extracting \"'gnuplot/os2/gnuicon.uue'\" \(3557 characters\)
- sed "s/^X//" >'gnuplot/os2/gnuicon.uue' <<'END_OF_FILE'
- Xsection 1 of uuencode 5.13 of file gnuplot.ico by R.E.M.
- X
- Xbegin 644 gnuplot.ico
- XM0D$H````>`````````!#21H````0`!``\`````P````@`$```0`!`````/__
- XM_T-)&@```!``$`#P`0``#````"``(``!``0`````@````(``@(````"`@`"`
- XM`("`@("`S,S,_P```/\`__\```#__P#_`/______0D$H```````````$``-#
- XM21H````4`!0`\`,```P````H`%```0`!`````/___T-)&@```!0`%`!P!@``
- XM#````"@`*``!``0`````@````(``@(````"`@`"``("`@("`S,S,_P```/\`
- XM__\```#__P#_`/______````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM``````````#_____X```!^````?G___GY___A^?__X?A_9\GX'F.)^83P.?G
- XM@`#GY^`#Y^?X`^?G_`_GY_P/Y^?\#^?G_`_GY_P/Y^````?@```'__P?___\
- XM/___\`____`/__^/\?__`\#__G&.?_SQCS_^^!]__WY^__^__?__________
- XM_P```````````````````````S,S,S,S,S,S,S,S,S````,S,S,S,S,S,S,S
- XM,S,P```#,``````````````#,````S`````````````"(S````,P````````
- XM`````B,P```#,B```````(```"(#,````S(B(``````(``(B`S````,P`B(@
- XM`````(@B``,P```#,``"(B````B((@`#,````S````(@```(@@```S````,P
- XM`````@``B((```,P```#,````````(@````#,````S````````"(`````S``
- XM``,P````````B`````,P```#,````````(@````#,````S````````"(````
- XM`S````,S,S,S,P``B#,S,S,P```#,S,S,S,``(@S,S,S,`````````````"`
- XM`````````````````````````````````````,P``,P```````````````#,
- XM``#,``````````````1```````1```````````!$0``````$1``````````$
- XM0`````````1`````````1```````````1`````````0``````````$``````
- XM````0`````````0```````````0```````!`````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM````````````````````````````````````````````````````````````
- XM``````````````````````````````#______P```/`````/````]____^\`
- XM``#W____[P```/?____/````]____P\```#W___^+P```/'_F/QO````\/^8
- XM_.\```#T/QAX[P```/8^?@/O````]RD``^\```#WS0`'[P```/?@``_O````
- XM]_@`#^\```#W_P!_[P```/?_@'_O````]_^`?^\```#W_X!_[P```/?_@'_O
- XM````]_^`?^\```#W_X!_[P```/?_@'_O````\`````\```#__X#__P```/__
- XM@?__````__X`?_\```#__``__P```/_^`'__````_^'_A_\```#_P'X#_P``
- XM`/^>&'G_````_QX8>/\```#^/P#\?P```/\_@?S_````_Y_G^?\```#_S__S
- XM_P```/_O__?_````_^__]_\```#______P``````````````````````````
- XM```````S,S,S,S,S,S,S,S,S,S,S`````#````````````````````,`````
- XM,````````````````````P`````P```````````````````C`````#``````
- XM````````````(B,`````,`````````````````(B`P`````R(``````````(
- XM````(B`#`````#(B``````````@````B``,`````,"(B`````````(```B(`
- XM`P`````P`B(`````````"(@B```#`````#``(@("(`````"(B"(```,`````
- XM,```(@`@`````(@B(````P`````P```"(B(`````B"(````#`````#`````"
- XM(B````B((@````,`````,```````(```"(```````P`````P```````````(
- XM@``````#`````#````````````B```````,`````,```````````"(``````
- XM`P`````P```````````(@``````#`````#````````````B```````,`````
- XM,```````````"(```````P`````P```````````(@``````#`````#,S,S,S
- XM,S````@S,S,S,S,`````````````````"```````````````````````````
- XM````````````````````#,````S```````````````````#,P```#,P`````
- XM``````````````S````,P`````````````````1$````````1$``````````
- XM````1$0```````!$1`````````````1````````````$0```````````1$``
- XM``````````1$``````````1$`````````````$1``````````$0`````````
- XM````1```````````!$````````````1`````````````1```````````1```
- XM```````````$``````````!```````````````0``````````$``````````
- X2````````````````````````
- X`
- Xend
- Xsum -r/size 548/3402 section (from "begin" to "end")
- Xsum -r/size 18850/2448 entire input file
- END_OF_FILE
- if test 3557 -ne `wc -c <'gnuplot/os2/gnuicon.uue'`; then
- echo shar: \"'gnuplot/os2/gnuicon.uue'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/os2/gnuicon.uue'
- fi
- if test -f 'gnuplot/pcgraph.asm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/pcgraph.asm'\"
- else
- echo shar: Extracting \"'gnuplot/pcgraph.asm'\" \(3925 characters\)
- sed "s/^X//" >'gnuplot/pcgraph.asm' <<'END_OF_FILE'
- XTITLE PC graphics module
- X; uses LINEPROC.MAC
- X
- X; Michael Gordon - 8-Dec-86
- X;
- X; Certain routines were taken from the Hercules BIOS of Dave Tutelman - 8/86
- X; Others came from pcgraph.asm included in GNUPLOT by Colin Kelley
- X;
- X; modified slightly by Colin Kelley - 22-Dec-86
- X; added header.mac, parameterized declarations
- X; added dgroup: in HVmodem to reach HCh_Parms and HGr_Parms - 30-Jan-87
- X;
- X; modified and added to for use in plot(3) routines back end.
- X; Gil Webster.
- X;
- X; Assemble with masm ver. 4.
- X
- Xinclude header.mac
- X
- Xif1
- Xinclude lineproc.mac
- Xendif
- X
- XGPg1_Base equ 0B800h ; Graphics page 1 base address
- X
- X extrn _inter:far
- X
- X_text segment
- X
- X public _PC_line, _PC_color, _PC_mask, _PC_curloc, _PC_puts, _Vmode
- X public _erase, _save_stack, _ss_interrupt
- X
- Xpcpixel proc near
- X ror word ptr linemask,1
- X jc cont
- X ret
- Xcont:
- X push ax
- X push bx
- X push cx
- X push dx
- X push bp
- X mov cx,ax ; x
- X mov dx,bx ; y
- X mov ah,0ch ; ah = write pixel
- X mov al,byte ptr color
- X
- X mov bh, 0 ; page 0
- X int 10h
- X pop bp
- X pop dx
- X pop cx
- X pop bx
- X pop ax
- X ret
- Xpcpixel endp
- X
- Xlineproc _PC_line, pcpixel
- X
- X;
- X; erase - clear page 1 of the screen buffer to zero (effectively, blank
- X; the screen)
- X;
- Xbeginproc _erase
- X push es
- X push ax
- X push cx
- X push di
- X mov ax, GPg1_Base
- X mov es, ax
- X xor di, di
- X mov cx, 4000h
- X xor ax, ax
- X cld
- X rep stosw ; zero out screen page
- X pop di
- X pop cx
- X pop ax
- X pop es
- X ret
- X_erase endp
- X
- Xbeginproc _PC_color
- X push bp
- X mov bp,sp
- X mov al,[bp+X] ; color
- X mov byte ptr color,al
- X pop bp
- X ret
- X_PC_color endp
- X
- Xbeginproc _PC_mask
- X push bp
- X mov bp,sp
- X mov ax,[bp+X] ; mask
- X mov word ptr linemask,ax
- X pop bp
- X ret
- X_PC_mask endp
- X
- Xbeginproc _Vmode
- X push bp
- X mov bp,sp
- X push si
- X push di
- X mov ax,[bp+X]
- X int 10h
- X pop di
- X pop si
- X pop bp
- X ret
- X_Vmode endp
- X
- Xbeginproc _PC_curloc
- X push bp
- X mov bp,sp
- X mov dh, byte ptr [bp+X] ; row number
- X mov dl, byte ptr [bp+X+2] ; col number
- X mov bh, 0
- X mov ah, 2
- X int 10h
- X pop bp
- X ret
- X_PC_curloc endp
- X
- X;
- X; thanks to watale!broehl for finding a bug here--I wasn't pushing BP
- X; and reloading AH before INT 10H, which is necessary on genuine IBM
- X; boards...
- X;
- Xbeginproc _PC_puts
- X push bp
- X mov bp,sp
- X push si
- X mov bl,byte ptr color
- X mov si,[bp+X] ; offset
- X
- Xifdef LARGE_DATA
- X mov es,[bp+X+2] ; segment if large or compact data model
- Xendif
- X
- Xputs2:
- X
- Xifdef LARGE_DATA
- X mov al,es:[si]
- Xelse
- X mov al,[si]
- Xendif
- X or al,al
- X jz puts3
- X mov ah,0eh ; write TTY char
- X int 10h
- X inc si
- X jmp short puts2
- Xputs3: pop si
- X pop bp
- X ret
- X_PC_puts endp
- X
- X
- X; int kbhit();
- X; for those without MSC 4.0
- X; Use BIOS interrupt 16h to determine if a key is waiting in the buffer.
- X; Return nonzero if so.
- X;
- X
- Xbeginproc _kbhit
- X mov ah, 1 ; function code 1 is keyboard test
- X int 16h ; keyboard functions
- X jnz kbfin ; Exit if char available
- X xor ax, ax ; No char: return zero.
- Xkbfin: ret
- X_kbhit endp
- X
- X
- X; _save_stack and _ss_interrupt are needed due to a bug in the MSC 4.0
- X; code when run under MS-DOS 3.x. Starting with 3.0, MS-DOS automatically
- X; switches to an internal stack during system calls. This leaves SS:SP
- X; pointing at MS-DOS's stack when the ^C interrupt (INT 23H) is triggered.
- X; MSC should restore its own stack before calling the user signal() routine,
- X; but it doesn't.
- X;
- X; Presumably this code will be unnecessary in later releases of the compiler.
- X;
- X
- X; _save_stack saves the current SS:SP to be loaded later by _ss_interrupt.
- X;
- X
- Xbeginproc _save_stack
- X mov ax,ss
- X mov cs:save_ss,ax
- X mov ax,sp
- X mov cs:save_sp,ax
- X ret
- X_save_stack endp
- X
- X
- X; _ss_interrupt is called on ^C (INT 23H). It restores SS:SP as saved in
- X; _save_stack and then jumps to the C routine interrupt().
- X;
- Xbeginproc _ss_interrupt
- X cli ; no interrupts while the stack is changed!
- X mov ax,-1 ; self-modifying code again
- Xsave_ss equ this word - 2
- X mov ss,ax
- X mov sp,-1 ; here too
- Xsave_sp equ this word - 2
- X sti
- X jmp far ptr _inter; now it's safe to call the real routine
- X_ss_interrupt endp
- X
- X
- X_text ends
- X
- X
- Xconst segment
- Xlinemask dw -1
- Xcolor db 1
- Xconst ends
- X
- X end
- END_OF_FILE
- if test 3925 -ne `wc -c <'gnuplot/pcgraph.asm'`; then
- echo shar: \"'gnuplot/pcgraph.asm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/pcgraph.asm'
- fi
- if test -f 'gnuplot/term/bigfig.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/bigfig.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/bigfig.trm'\" \(3680 characters\)
- sed "s/^X//" >'gnuplot/term/bigfig.trm' <<'END_OF_FILE'
- X/*
- X * $Id: bigfig.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X */
- X
- X/* GNUPLOT - fig.trm */
- X/*
- X * Copyright (C) 1990, 1991, 1992
- X *
- X * Permission to use, copy, and distribute this software and its
- X * documentation for any purpose with or without fee is hereby granted,
- X * provided that the above copyright notice appear in all copies and
- X * that both that copyright notice and this permission notice appear
- X * in supporting documentation.
- X *
- X * Permission to modify the software is granted, but not the right to
- X * distribute the modified code. Modifications are to be distributed
- X * as patches to released version.
- X *
- X * This software is provided "as is" without express or implied warranty.
- X *
- X * This file is included by ../term.c.
- X *
- X * This terminal driver supports:
- X * Fig graphics language
- X *
- X * AUTHORS
- X * Micah Beck, David Kotz
- X *
- X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
- X *
- X */
- X
- X/*
- X * Original for Fig code output by Micah Beck, 1989
- X * Department of Computer Science, Cornell University
- X * Updated by David Kotz for gnuplot 2.0
- X * More efficient output by Ian Dall
- X * Increased size of plot by Ian Dall
- X * Updated to FIG 2.1 (with color) by Vivek Khera
- X */
- X
- X#define BFIG_HTIC (7*FIG_RES/80)
- X#define BFIG_VTIC (7*FIG_RES/80)
- X#define BFIG_FONT_S (16) /* size in points */
- X#define BFIG_VCHAR (BFIG_FONT_S*72/FIG_RES) /* height in pixels of font */
- X#define BFIG_HCHAR (BFIG_VCHAR*6/10) /* this is a guess at the width */
- X
- X#define BFIG_ARROW_WIDTH (BFIG_HTIC/2 + 1)
- X#define BFIG_ARROW_HEIGHT BFIG_HTIC
- X
- X
- X
- X/* 8 inches wide by 5 inches high */
- X#define BFIG_XMAX (8 * FIG_RES)
- X#define BFIG_YMAX (5 * FIG_RES)
- X
- X#define BFIG_XOFF (FIG_RES/2)
- X#define BFIG_YOFF (FIG_RES/2)
- X
- X
- XBFIG_vector(ux,uy)
- X unsigned int ux,uy;
- X{
- X int x=ux, y=uy;
- X
- X if (FIG_polyvec_stat != FIG_poly_part)
- X {
- X fprintf(outfile, "%d %d %d %d %d %d %d %d %6.3f %d %d %d\n",
- X O_POLYLINE, T_POLYLINE,
- X FIG_type, 1, FIG_color, 0, FIG_DEFAULT, 0, FIG_spacing, 0,0,0);
- X fprintf(outfile, "%d %d",
- X BFIG_XOFF + FIG_posx, BFIG_YMAX + BFIG_YOFF - FIG_posy);
- X FIG_poly_vec_cnt = 1;
- X FIG_polyvec_stat = FIG_poly_part;
- X }
- X fprintf(outfile, " %d %d",
- X BFIG_XOFF + x, BFIG_YMAX + BFIG_YOFF-y);
- X FIG_poly_vec_cnt++;
- X if (FIG_poly_vec_cnt > 50)
- X FIG_poly_clean(FIG_polyvec_stat);
- X
- X FIG_posx = x;
- X FIG_posy = y;
- X}
- X
- X
- XBFIG_arrow(sx, sy, ex, ey, head)
- X int sx, sy; /* start coord */
- X int ex, ey; /* end coord */
- X TBOOLEAN head;
- X{
- X FIG_poly_clean(FIG_polyvec_stat);
- X fprintf(outfile, "%d %d %d %d %d %d %d %d %6.3f %d %d %d\n",
- X O_POLYLINE, T_POLYLINE,
- X FIG_type, 1, FIG_color, 0, FIG_DEFAULT, 0, FIG_spacing,
- X 0, head ? 1 : 0, 0);
- X /* arrow line */
- X if ( head )
- X fprintf(outfile, "%d %d %.3f %.3f %.3f\n",
- X 0, 0, 1.0,
- X (double)BFIG_ARROW_WIDTH, (double)BFIG_ARROW_HEIGHT);
- X fprintf(outfile, "%d %d %d %d 9999 9999\n",
- X BFIG_XOFF + sx, BFIG_YOFF + BFIG_YMAX - sy,
- X BFIG_XOFF + ex, BFIG_YOFF + BFIG_YMAX - ey);
- X
- X FIG_posx = ex;
- X FIG_posy = ey;
- X}
- X
- XBFIG_put_text(x, y, str)
- X int x, y;
- X char *str;
- X{
- X if (strlen(str) == 0) return;
- X FIG_poly_clean(FIG_polyvec_stat);
- X y -= FIG_VCHAR/2; /* assuming vertical center justified */
- X
- X fprintf(outfile, "%d %d %d %d %d %d %d %6.3f %d %d %d %d %d %s\01\n",
- X O_TEXT, FIG_justify,
- X FIG_ROMAN_FONT, BFIG_FONT_S, FIG_DEFAULT, FIG_DEFAULT, 0,
- X FIG_angle, SPECIAL_TEXT, BFIG_VCHAR, BFIG_HCHAR*strlen(str),
- X BFIG_XOFF + x, BFIG_YMAX + BFIG_YOFF-y, str);
- X}
- END_OF_FILE
- if test 3680 -ne `wc -c <'gnuplot/term/bigfig.trm'`; then
- echo shar: \"'gnuplot/term/bigfig.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/bigfig.trm'
- fi
- if test -f 'gnuplot/term/qms.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/qms.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/qms.trm'\" \(3856 characters\)
- sed "s/^X//" >'gnuplot/term/qms.trm' <<'END_OF_FILE'
- X/*
- X * $Id: qms.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X *
- X */
- X
- X/* GNUPLOT - qms.trm */
- X/*
- X * Copyright (C) 1990 - 1993
- X *
- X * Permission to use, copy, and distribute this software and its
- X * documentation for any purpose with or without fee is hereby granted,
- X * provided that the above copyright notice appear in all copies and
- X * that both that copyright notice and this permission notice appear
- X * in supporting documentation.
- X *
- X * Permission to modify the software is granted, but not the right to
- X * distribute the modified code. Modifications are to be distributed
- X * as patches to released version.
- X *
- X * This software is provided "as is" without express or implied warranty.
- X *
- X * This file is included by ../term.c.
- X *
- X * This terminal driver supports:
- X * QMS laser printers
- X *
- X * AUTHORS
- X * Colin Kelley, Thomas Williams, Russell Lang
- X *
- X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
- X *
- X */
- X
- X#define QMS_XMAX 9000
- X#define QMS_YMAX 6000
- X
- X#define QMS_XLAST (QMS_XMAX - 1)
- X#define QMS_YLAST (QMS_YMAX - 1)
- X
- X#define QMS_VCHAR 120
- X#define QMS_HCHAR 70
- X#define QMS_VTIC 70
- X#define QMS_HTIC 70
- X
- Xint qms_line = 0; /* to remember current line type */
- X
- XQMS_init()
- X{
- X/* This was just ^IOL, but at Rutgers at least we need some more stuff */
- X fprintf(outfile,"^PY^-\n^IOL\n^ISYNTAX00000^F^IB11000^IJ00000^IT00000\n");
- X/* ^ QUIC on ^set defaults ^ set botttom,top,left margins
- X ^landscape ^free format */
- X/* set defaults are: implicit decimal point, units in inches,
- X numbers left justified, units in 1/1000 inch, do not ignore spaces */
- X/* margins are in 1/1000 inch units */
- X}
- X
- X
- XQMS_graphics()
- X{
- X fprintf(outfile,"^IGV\n");
- X/* ^enter graphics vector mode */
- X}
- X
- X
- X
- XQMS_text()
- X{
- X/* added ^-, because ^, after an ^I command doesn't actually print a page */
- X/* Did anybody try this code out? [uhh...-cdk] */
- X fprintf(outfile,"^IGE\n^-^,");
- X/* ^exit graphics vector mode
- X ^pass terminator
- X ^print page */
- X}
- X
- X
- XQMS_linetype(linetype)
- Xint linetype;
- X{
- Xstatic int width[2+9] = {7, 3, 3, 3, 3, 5, 5, 5, 7, 7, 7};
- Xstatic int type[2+9] = {0, 1, 0, 2, 3, 0, 2, 3, 0, 2, 3};
- X/*
- X * I don't know about Villanova, but on our printer, using ^V without
- X * previously setting up a pattern crashes the microcode.
- X * [nope, doesn't crash here. -cdk]
- X * [it generates a controller error here on dotted lines. - rjl]
- X */
- X/* Code to define patterns added by rjl
- X * According to the manual it should work - but it doesn't
- X */
- X qms_line = linetype;
- X if (linetype >= 9)
- X linetype %= 9;
- X fprintf(outfile,"^PW%02d\n",width[linetype+2]);
- X/* ^width in dots */
- X switch (type[linetype+2]) {
- X case 1 : /* short dash */
- X fprintf(outfile,"^PV102025^G\n^V1\n");
- X/* ^PV = define pattern vector, 1 = pattern number,
- X 02 = number of pen downs and ups, 025 = .025" length of ups/downs */
- X break;
- X case 2 : /* medium dash */
- X fprintf(outfile,"^PV202050^G\n^V2\n");
- X break;
- X case 3 : /* long dash */
- X fprintf(outfile,"^PV302100^G\n^V3\n");
- X break;
- X default:
- X case 0 :
- X fprintf(outfile,"^V0\n");
- X break;
- X }
- X}
- X
- X
- XQMS_move(x,y)
- Xint x,y;
- X{
- X fprintf(outfile,"^U%05d:%05d\n", 1000 + x, QMS_YLAST + 1000 - y);
- X/* ^pen up vector*/
- X}
- X
- X
- XQMS_vector(x2,y2)
- Xint x2,y2;
- X{
- X fprintf(outfile,"^D%05d:%05d\n", 1000 + x2, QMS_YLAST + 1000 - y2);
- X/* ^pen down vector*/
- X}
- X
- X
- XQMS_put_text(x,y,str)
- Xunsigned int x,y;
- Xchar str[];
- X{
- Xchar ch;
- X QMS_move(x,y + QMS_VCHAR/3);
- X fputs("^IGE\n",outfile);
- X ch = *str++;
- X while(ch!='\0') {
- X if (ch=='^')
- X putc('^',outfile);
- X putc(ch,outfile);
- X ch = *str++;
- X }
- X fputs("\n^IGV\n",outfile);
- X QMS_linetype(qms_line); /* restore line type */
- X}
- X
- X
- XQMS_reset()
- X{
- X fprintf(outfile,"^PN^-\n");
- X/* ^QUIC off*/
- X}
- X
- END_OF_FILE
- if test 3856 -ne `wc -c <'gnuplot/term/qms.trm'`; then
- echo shar: \"'gnuplot/term/qms.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/qms.trm'
- fi
- if test -f 'gnuplot/term/regis.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/regis.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/regis.trm'\" \(4185 characters\)
- sed "s/^X//" >'gnuplot/term/regis.trm' <<'END_OF_FILE'
- X/*
- X * $Id: regis.trm%v 3.38.2.122 1993/04/30 00:31:45 woo Exp woo $
- X *
- X */
- X
- X/* GNUPLOT - regis.trm */
- X/*
- X * Copyright (C) 1990 - 1993
- X *
- X * Permission to use, copy, and distribute this software and its
- X * documentation for any purpose with or without fee is hereby granted,
- X * provided that the above copyright notice appear in all copies and
- X * that both that copyright notice and this permission notice appear
- X * in supporting documentation.
- X *
- X * Permission to modify the software is granted, but not the right to
- X * distribute the modified code. Modifications are to be distributed
- X * as patches to released version.
- X *
- X * This software is provided "as is" without express or implied warranty.
- X *
- X * This file is included by ../term.c.
- X *
- X * This terminal driver supports:
- X * REGIS devices
- X *
- X * AUTHORS
- X * Colin Kelley, Thomas Williams
- X *
- X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
- X *
- X */
- X
- X#define REGISXMAX 800
- X#define REGISYMAX 440
- X
- X#define REGISXLAST (REGISXMAX - 1)
- X#define REGISYLAST (REGISYMAX - 1)
- X
- X#define REGISVCHAR 20
- X#define REGISHCHAR 9
- X#define REGISVTIC 8
- X#define REGISHTIC 6
- X
- X#define TRUE 1
- X#define FALSE 0
- Xstatic int REGIS16color=FALSE;
- X
- Xint REGISang = 0;
- X
- XREGISinit()
- X{
- X fprintf(outfile,"\033[r\033[24;1H");
- X/* 1 2
- X 1. reset scrolling region
- X 2. locate cursor on bottom line
- X*/
- X}
- X
- X
- X/* thanks to calmasd!dko (Dan O'Neill) for adding S(E) for vt125s */
- XREGISgraphics()
- X{
- X fprintf(outfile,"\033[2J\033P1pS(C0)S(E)");
- X/* 1 2 3 4 5
- X 1. clear screen
- X 2. enter ReGIS graphics
- X 3. turn off graphics diamond cursor
- X 4. clear graphics screen
- X*/
- X (void) REGIStext_angle(0); /* select text size and angle */
- X}
- X
- X
- XREGIStext()
- X{
- X fprintf(outfile,"\033\\\033[24;1H");
- X/* 1 2
- X 1. Leave ReGIS graphics mode
- X 2. locate cursor on last line of screen
- X*/
- X}
- X
- X
- XREGISlinetype(linetype)
- Xint linetype;
- X{
- X /* This will change color in order G,R,B,G-dot,R-dot,B-dot */
- X
- Xstatic int in_16_map[15+2] = {7,7,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
- Xstatic int lt_16_map[15+2] = {1,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
- Xstatic int in_map[9 + 2] = {2, 2, 3, 2, 1, 3, 2, 1, 3, 2, 1};
- Xstatic int lt_map[9 + 2] = {1, 4, 1, 1, 1, 4, 4, 4, 6, 6, 6};
- X
- X if(!REGIS16color)
- X { if (linetype >= 9)
- X linetype %= 9;
- X fprintf(outfile, "W(I%d)\n", in_map[linetype + 2]);
- X fprintf(outfile, "W(P%d)\n", lt_map[linetype + 2]);
- X }
- X else
- X { if(linetype >=15)
- X linetype %= 15;
- X fprintf(outfile, "W(I%d)\n", in_16_map[linetype + 2]);
- X fprintf(outfile, "W(P%d)\n", lt_16_map[linetype + 2]);
- X }
- X}
- X
- X
- X
- X/*
- X** The \n was added in the functions below (and above) in order to not cause
- X** a buffer overflow in devices that can't deal with long line lengths.
- X** The DEC vt-340 doesn't need this, but Reflection 4, a vt-340 emulator
- X** for PC's under MS-DOS and Microsoft Windows does need it.
- X** Also needed for DECterm, a vt-340 emulator for use with Motif 1.0
- X** on Open/VMS.
- X** NGB 9/13/93
- X*/
- X
- XREGISmove(x,y)
- Xint x,y;
- X{
- X fprintf(outfile,"P[%d,%d]\n",x,REGISYLAST-y,x,REGISYLAST-y);
- X}
- X
- X
- XREGISvector(x,y)
- Xint x,y;
- X{
- X fprintf(outfile,"v[]v[%d,%d]\n",x,REGISYLAST - y);
- X/* the initial v[] is needed to get the first pixel plotted */
- X}
- X
- X
- X/* put_text and text_angle by rjl */
- XREGISput_text(x,y,str)
- Xint x, y;
- Xchar *str;
- X{
- X if (REGISang==1)
- X REGISmove(x-REGISVCHAR/2-1,y);
- X else
- X REGISmove(x,y+REGISVCHAR/2-1);
- X (void) putc('T',outfile); (void) putc('\'',outfile);
- X while (*str) {
- X (void) putc(*str,outfile);
- X if (*str == '\'')
- X (void) putc('\'',outfile); /* send out another one */
- X str++;
- X }
- X (void) putc('\'',outfile);
- X (void) putc('\n',outfile);
- X}
- X
- X
- Xint REGIStext_angle(ang)
- Xint ang;
- X{
- X REGISang = ang;
- X if (ang == 1)
- X fputs("T(D90,S1)\n",outfile);
- X else
- X fputs("T(D0,S1)\n",outfile);
- X return TRUE;
- X}
- X
- X
- XREGISreset()
- X{
- X fprintf(outfile,"\033[2J\033[24;1H");
- X}
- X
- XREGISoptions()
- X{ int i=0;
- X struct value a;
- X extern struct value *const_express();
- X extern double real();
- X
- X if(!END_OF_COMMAND)
- X { i=(int)real(const_express(&a));
- X }
- X REGIS16color= (i==16);
- X sprintf(term_options,"%s",REGIS16color?"16":"4");
- X}
- X
- END_OF_FILE
- if test 4185 -ne `wc -c <'gnuplot/term/regis.trm'`; then
- echo shar: \"'gnuplot/term/regis.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/regis.trm'
- fi
- if test -f 'gnuplot/term/tgif.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/tgif.h'\"
- else
- echo shar: Extracting \"'gnuplot/term/tgif.h'\" \(3514 characters\)
- sed "s/^X//" >'gnuplot/term/tgif.h' <<'END_OF_FILE'
- X/*
- X * $Id: tgif.h%v 3.50 1993/07/09 05:35:24 woo Exp $
- X */
- X
- X/*
- X * Author: William Chia-Wei Cheng (william@cs.ucla.edu)
- X *
- X * Copyright (C) 1990, 1991, William Cheng.
- X *
- X */
- X
- X#define TOOL_NAME "Tgif"
- X
- X#ifndef NULL
- X#define NULL 0
- X#endif /* ~NULL */
- X
- X#ifndef TRUE
- X#define FALSE 0
- X#define TRUE 1
- X#endif /* ~TRUE */
- X
- X#define INVALID -1
- X#define BAD -2
- X
- X#define SINGLECOLOR (FALSE)
- X#define MULTICOLOR (TRUE)
- X
- X#define BUTTONSMASK ((Button1Mask)|(Button2Mask)|(Button3Mask))
- X
- X#ifndef max
- X#define max(A,B) ((A) > (B) ? (A) : (B))
- X#define min(A,B) ((A) > (B) ? (B) : (A))
- X#endif /* ~max */
- X
- X#ifndef round
- X#define round(X) (((X) >= 0) ? (int)((X)+0.5) : (int)((X)-0.5))
- X#endif /* ~round */
- X
- X#define OFFSET_X(AbsX) (((AbsX) - drawOrigX) >> zoomScale)
- X#define OFFSET_Y(AbsY) (((AbsY) - drawOrigY) >> zoomScale)
- X
- X#define ABS_X(OffsetX) (((OffsetX)<<zoomScale) + drawOrigX)
- X#define ABS_Y(OffsetY) (((OffsetY)<<zoomScale) + drawOrigY)
- X
- X#define SetRecVals(R,X,Y,W,H) ((R).x=(X),(R).y=(Y),(R).width=(W),(R).height=(H))
- X
- X#define MAXSTRING 256
- X#define MAXPATHLENGTH 256
- X
- X/* object types */
- X
- X#define OBJ_POLY 0
- X#define OBJ_BOX 1
- X#define OBJ_OVAL 2
- X#define OBJ_TEXT 3
- X#define OBJ_POLYGON 4
- X#define OBJ_GROUP 5
- X#define OBJ_SYM 6
- X#define OBJ_ICON 7
- X#define OBJ_ARC 8
- X#define OBJ_RCBOX 9
- X#define OBJ_XBM 10
- X
- X/* drawing modes */
- X
- X#define NOTHING 0
- X#define DRAWTEXT 1
- X#define DRAWBOX 2
- X#define DRAWCIRCLE 3
- X#define DRAWPOLY 4
- X#define DRAWPOLYGON 5
- X#define DRAWARC 6
- X#define DRAWRCBOX 7
- X
- X#define MAXCHOICES 8
- X
- X/* stipple patterns */
- X
- X#define NONEPAT 0
- X#define SOLIDPAT 1
- X#define BACKPAT 2
- X#define SCROLLPAT 7
- X#define MAXPATTERNS 20
- X
- X/* line stuff */
- X
- X#define LINE_THIN 0
- X#define LINE_MEDIUM 1
- X#define LINE_THICK 2
- X#define LINE_CURVED 3 /* compatibility hack for fileVersion <= 3 */
- X
- X#define MAXLINEWIDTHS 7
- X
- X#define LT_STRAIGHT 0
- X#define LT_SPLINE 1
- X
- X#define MAXLINETYPES 2
- X
- X#define LS_PLAIN 0
- X#define LS_RIGHT 1
- X#define LS_LEFT 2
- X#define LS_DOUBLE 3
- X
- X#define MAXLINESTYLES 4
- X
- X#define MAXDASHES 5
- X
- X#define NOCONT (FALSE)
- X#define CONT (TRUE)
- X
- X#define NORB (FALSE)
- X#define RB (TRUE)
- X
- X/* font stuff */
- X
- X#define FONT_TIM 0
- X#define FONT_COU 1
- X#define FONT_HEL 2
- X#define FONT_CEN 3
- X#define FONT_SYM 4
- X
- X#define MAXFONTS 5
- X
- X#define STYLE_NR 0
- X#define STYLE_BR 1
- X#define STYLE_NI 2
- X#define STYLE_BI 3
- X
- X#define MAXFONTSTYLES 4
- X
- X#define FONT_DPI_75 0
- X#define FONT_DPI_100 1
- X
- X#define MAXFONTDPIS 2
- X
- X#define MAXFONTSIZES 6
- X
- X#define JUST_L 0
- X#define JUST_C 1
- X#define JUST_R 2
- X
- X#define MAXJUSTS 3
- X
- X/* alignment */
- X
- X#define ALIGN_N 0
- X
- X#define ALIGN_L 1
- X#define ALIGN_C 2
- X#define ALIGN_R 3
- X
- X#define ALIGN_T 1
- X#define ALIGN_M 2
- X#define ALIGN_B 3
- X
- X#define MAXALIGNS 4
- X
- X/* color */
- X
- X#define MAXCOLORS 10
- X
- X/* button stuff */
- X
- X#define CONFIRM_YES 0
- X#define CONFIRM_NO 1
- X#define CONFIRM_CANCEL 2
- X#define MAX_CONFIRMS 3
- X
- X#define BUTTON_INVERT 0
- X#define BUTTON_NORMAL 1
- X
- X/* page layout */
- X
- X#define PORTRAIT 0
- X#define LANDSCAPE 1
- X#define HIGHPORT 2
- X#define HIGHLAND 3
- X#define SLIDEPORT 4
- X#define SLIDELAND 5
- X
- X#define MAXPAGESTYLES 6
- X
- X/* where to print */
- X
- X#define PRINTER 0
- X#define LATEX_FIG 1
- X#define PS_FILE 2
- X#define XBM_FILE 3
- X
- X#define MAXWHERETOPRINT 4
- X
- X/* measurement */
- X
- X#define PIX_PER_INCH 128
- X#define ONE_INCH (PIX_PER_INCH)
- X#define HALF_INCH (PIX_PER_INCH/2)
- X#define QUARTER_INCH (PIX_PER_INCH/4)
- X#define EIGHTH_INCH (PIX_PER_INCH/8)
- X
- X#define DEFAULT_GRID (EIGHTH_INCH)
- X
- X/* text rotation */
- X
- X#define ROTATE0 0
- X#define ROTATE90 1
- X#define ROTATE180 2
- X#define ROTATE270 3
- X
- X/* arc */
- X
- X#define ARC_CCW 0 /* counter-clock-wise */
- X#define ARC_CW 1 /* clock-wise */
- END_OF_FILE
- if test 3514 -ne `wc -c <'gnuplot/term/tgif.h'`; then
- echo shar: \"'gnuplot/term/tgif.h'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/tgif.h'
- fi
- echo shar: End of archive 30 \(of 33\).
- cp /dev/null ark30isdone
- MISSING=""
- 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
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have unpacked all 33 archives.
- rm -f ark[1-9]isdone ark[1-9][0-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
-