home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-10-29 | 80.0 KB | 2,925 lines |
- Newsgroups: comp.sources.misc
- From: woo@playfair.stanford.edu ("Alexander Woo")
- Subject: v40i043: gnuplot - interactive function plotting utility, Part31/33
- Message-ID: <1993Oct25.030525.2908@sparky.sterling.com>
- X-Md4-Signature: 080660d6389446e2d277c4b998172999
- Sender: kent@sparky.sterling.com (Kent Landfield)
- Organization: Sterling Software
- Date: Mon, 25 Oct 1993 03:05:25 GMT
- Approved: kent@sparky.sterling.com
-
- Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
- Posting-number: Volume 40, Issue 43
- Archive-name: gnuplot/part31
- 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.3p2 gnuplot/README.iso gnuplot/README.x11
- # gnuplot/bitmap.h gnuplot/corplot.c gnuplot/demo/all.dem
- # gnuplot/demo/spline.dem gnuplot/docs/makefile.ami
- # gnuplot/docs/titlepag.tex gnuplot/epsviewe.m gnuplot/makefile.amg
- # gnuplot/makefile.ami gnuplot/makefile.djg gnuplot/makefile.g
- # gnuplot/makefile.os2 gnuplot/makefile.ztc gnuplot/term/compact.c
- # gnuplot/term/debug.trm gnuplot/term/djsvga.trm
- # gnuplot/term/kyo.trm gnuplot/term/mgr.trm gnuplot/term/v384.trm
- # gnuplot/win/geticon.c gnuplot/win/wgnuplib.c gnuplot/win/wtext.h
- # Wrapped by kent@sparky on Wed Oct 20 17:15:08 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 31 (of 33)."'
- if test -f 'gnuplot/README.3p2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.3p2'\"
- else
- echo shar: Extracting \"'gnuplot/README.3p2'\" \(2838 characters\)
- sed "s/^X//" >'gnuplot/README.3p2' <<'END_OF_FILE'
- XThis is the official release of GNUPLOT.3.2. It is available in either
- Xa patch or tar archive. Sites for the retrieval are listed in the
- XREADME. Below are the modifications and contributors to this release.
- XThe patch file 3_1to3_2.patch needs to be applied with the p1 flag
- X
- X>cd gnuplot
- X>patch -p1 < 3_1to3_2.patch
- X
- XThanks --- Alex Woo
- X
- X* Subject: New generic gnuplot_x11.c
- X Name: Ed Kubaitis
- X Email: ejk@ux2.ncsa.uiuc.edu
- X
- X* Subject: Hidden Line Removal for Explicit Surfaces and IRIX 4.0 fixes.
- X Name: Gershon Elber
- X Email: gershon@gr.utah.edu
- X
- X* Subject: Table Terminal Driver.
- X Name: Kevin Russo
- X Email: russo@rudedog.nrl.navy.mil
- X
- X* Subject: PCL5 driver fixes (HPGL page eject),datafile pipe and README.
- X Name: Alex Woo
- X Email: woo@ames.arc.nasa.gov
- X
- X* Subject: Pbmplus driver and fix to y log tics.
- X Name: Russell Lang
- X Email: rjl@monu1.cc.monash.edu.au
- X
- X* Subject: NeXT Console Driver.
- X Name: Nick Strobel
- X Email: strobel@phast.phys.washington.edu
- X
- X* Subject: Fix GNUTERM environment with disk resident BGI drivers
- X Name: Craig Johnston
- X Email: johnston@maxwell.ee.washington.edu
- X
- X* Subject: Fix tables for troff in doc2ms
- X Name: Michael Schuh
- X Email: schuh@ames.arc.nasa.gov
- X
- X* Subject: Fix dump when GNUPLOT$HELP undefined
- X Name: Wolfgang J. Moeller
- X Email: moeller@gwdgv1.dnet.gwdg.de
- X
- X* Subject: Fix AMIGA segment limits
- X Name: Carsten Steger
- X Email: stegerc@informatik.tu-muenchen.de
- X
- X* Subject: Put FAR pointers in bitmap.c and bitmap.h
- X Name: Russell Lang
- X Email: rjl@monu1.cc.monash.edu.au
- X
- X* Subject: Bug fix to latex.trm
- X Name: Rob Cunningham
- X Email: rkc@xn.ll.mit.edu
- X----------------------------------------------------------------------------
- X
- X GNUPLOT 3.1 Patch
- X
- XThis package provides the upgrade of gnuplot 3.0 to patch level 1.
- XBelow are the contributers to this upgrade and the modifications made.
- X
- XThank you all
- X
- XGershon
- X
- X----------------------------------------------------------------------------
- X
- X* Subject: Y log / postscript eps fix
- X Name: Russell Lang
- X Email: rjl@monu1.cc.monash.edu.au
- X
- X* Subject: HP26 driver to lift text.
- X Name: Bruce Lueckenhoff
- X Email: luechen@cis.udel.edu
- X
- X* Subject: CRAY prt, UIUC coordinates.
- X Name: Daniel S. Lewart
- X Email: d-lewart@uiuc.edu
- X
- X* Subject: AI device
- X Name: Ray Ghanbari
- X Email: ray@mtl.mit.edu
- X
- X* Subject: HP_MOTIF on a Snake, X11 for Next
- X Name: Alex Woo
- X Email: woo@ra-next.arc.nasa.gov
- X
- X* Subject: Mod. to LaTeX for multiple curves/plots, complex atan function fix.
- X Name: Ray Toy???
- X Email: toy@soho.crd.ge.com
- X
- X* Subject: Fix the "splot 'file.dat'" with only z values.
- X Name: Gershon Elber
- X Email: gershon@gr.utah.edu
- X
- X* Subject: Underscore prefixed names.
- X Name: Tom Tkacik
- X Email: tkacik@hobbes.cs.gmr.com
- X
- X* Subject: Amiga port
- X Name: Carsten Steger
- X Email: stegerc@informatik.tu-muenchen.de
- END_OF_FILE
- if test 2838 -ne `wc -c <'gnuplot/README.3p2'`; then
- echo shar: \"'gnuplot/README.3p2'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.3p2'
- fi
- if test -f 'gnuplot/README.iso' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.iso'\"
- else
- echo shar: Extracting \"'gnuplot/README.iso'\" \(2751 characters\)
- sed "s/^X//" >'gnuplot/README.iso' <<'END_OF_FILE'
- X
- XYou can say "set isosamples 30,40" now to get different isosampling
- Xrates for the first and second dummy variables (x,u resp. y,v). This
- Xwill affect surface-plots in hidden3d- and nohidden3d-mode. It gets
- Xrid of the necessity of having to change samples in hidden3d-mode when
- Xyou actually want to change the isosamples for the first dummy
- Xvariable. For people that are lazy and for compatibility you can also
- Xtype "set isosamples 30". This will set the value to 30 in both
- Xdirections. For completeness I did the same with "samples". Thus you
- Xcan say "set samples 50,100" to get different sampling rates for each
- Xdummy variable. This only affects surface-plots in nohidden3d-mode.
- XAgain, you still can say "set samples 50". This will set both sampling
- Xrates to 50. For 2d-plots the first value of samples is used.
- X
- XSummary:
- X
- XSuppose isosamples is set to 4,5 in hidden3d-mode. The grid evaluated
- Xfor hidden3d-plots will look like this (* denotes points that get
- Xevaluated):
- X
- X |------ isosamples #1 -----|
- X
- X - *--------*--------*--------*
- X | | | | |
- X | | | |
- X i | | | |
- X s *--------*--------*--------*
- X o | | | |
- X s | | | |
- X a | | | |
- X m *--------*--------*--------*
- X p | | | |
- X . | | | |
- X | | | |
- X # *--------*--------*--------*
- X 2 | | | |
- X | | | |
- X | | | | |
- X - *--------*--------*--------*
- X
- XSuppose isosamples is set to 4,5 and samples to 10, 9 in
- Xnohidden3d-mode. The grid evaluated for hidden3d-plots will look like
- Xthis:
- X
- X |------ isosamples #1 -----|
- X
- X - *--*--*--*--*--*--*--*--*--* -
- X | | | | | |
- X * * * * |
- X i | | | |
- X s *--*--*--*--*--*--*--*--*--* s
- X o | | | | a
- X s * * * * m
- X a | | | | p
- X m *--*--*--*--*--*--*--*--*--* l
- X p | | | | e
- X . * * * * s
- X | | | |
- X # *--*--*--*--*--*--*--*--*--* #
- X 2 | | | | 2
- X * * * *
- X | | | | | |
- X - *--*--*--*--*--*--*--*--*--* -
- X
- X |------- samples #1 -------|
- X
- X
- XBTW: The examples above also show how the bottom grids will look like
- Xboth in noparametric- and in parametric-mode. Thus you can get a rough
- Xidea of how the mapping from (u,v)-space to (x,y,z)-space works by
- Xdrawing a bottom grid in parametric-mode.
- X
- XBest regards,
- X
- XCarsten
- END_OF_FILE
- if test 2751 -ne `wc -c <'gnuplot/README.iso'`; then
- echo shar: \"'gnuplot/README.iso'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.iso'
- fi
- if test -f 'gnuplot/README.x11' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/README.x11'\"
- else
- echo shar: Extracting \"'gnuplot/README.x11'\" \(2541 characters\)
- sed "s/^X//" >'gnuplot/README.x11' <<'END_OF_FILE'
- XX11 changes for gnuplot 3.3
- X---------------------------
- X
- XEnhancements
- X------------
- X
- X o VMS X11 support (Jehavi Bourvine)
- X
- X o New X11 rendering for 'points' plotting style improves point
- X quality and eliminates the 'X11' terminal type whose only
- X function was to request multi-colored points. (Russell Lang)
- X
- X o tailorable linewidths, dash styles, and point sizes (see
- X the man page)
- X
- X o Color handling:
- X
- X - "colorname,intensity" where 0 < intensity < 1
- X For example, 'blue,.5' means a half intensity blue
- X
- X - hexadecimal RGB colors accepted (needed for HP VUE)
- X
- X - Failure to parse/allocate a color defaults to black
- X for that color rather than monochrome for whole plot
- X
- X o 'set term x11' assumed if '-display' option on command line.
- X
- XBug Fixes
- X---------
- X
- X o On monochrome servers, any lines plotted before the first label
- X was printed were lost. This lost zero axes and garbled some
- X other plots. (Kenneth H. Carpenter)
- X
- X o User specified geometry position ignored with some window managers.
- X Negative positions miscalculated. (Mike Coleman)
- X
- X
- XVendor Botch Circumventions
- X---------------------------
- X
- X o New X11FLAGS options:
- X
- X - OW_BOTCH circumvents "ld.so: Undefined symbol: __XtInherit"
- X loader errors on Sun Open Windows platforms. (Vivek Khera)
- X
- X - ISC22 circumvents select() problem with ISC2.2 (Robert Eckardt)
- X
- X - BSD_TYPES pulls select FD_SET definitions from <sys/bsdtypes.h>
- X (Michael Herrmann)
- X
- X - ULTRIX_KLUDGE expanded to circumvent missing demo plots at
- X Ultrix 4.1 (chan@holo.iitsg.nrc.ca)
- X
- X o Random window geometry with Esix X11R3 (Al Bolduc)
- X
- X
- XMiscellaneous
- X-------------
- X
- X o The man page has been updated to document that background and
- X foreground are not honored for monochrome displays, only -rv
- X and 'gnuplot*reverseVideo:on'.
- X
- X o '-tvtwm' command line option and gnuplot*tvtwm resource
- X
- X Mike Coleman's fix for user-specified geometry position for
- X other window managers causes tvtwm to use absolute rather
- X then virtual-relative coordinates when the user specifies
- X geometry. This command line option and resource tells
- X gnuplot_x11 to use PPosition (virtual-relative) when a
- X geometry position is requested.
- X
- X Unfortunately, negative y positions are off by the size of the
- X window manager title bar. Thus, for example, -0-20 rather than
- X -0-0 is needed to place the lower right corner of the window
- X at the lower right corner of the screen.
- X
- END_OF_FILE
- if test 2541 -ne `wc -c <'gnuplot/README.x11'`; then
- echo shar: \"'gnuplot/README.x11'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/README.x11'
- fi
- if test -f 'gnuplot/bitmap.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/bitmap.h'\"
- else
- echo shar: Extracting \"'gnuplot/bitmap.h'\" \(2820 characters\)
- sed "s/^X//" >'gnuplot/bitmap.h' <<'END_OF_FILE'
- X/*
- X * $Id: bitmap.h%v 3.50 1993/07/09 05:35:24 woo Exp $
- X *
- X */
- X
- X/* bitmap.h */
- X
- X/* allow up to 16 bit width for character array */
- Xtypedef unsigned int char_row;
- Xtypedef char_row GPFAR * GPFAR char_box;
- X
- X#define FNT_CHARS 96 /* Number of characters in the font set */
- X
- X#define FNT5X9 0
- X#define FNT5X9_VCHAR 11 /* vertical spacing between characters */
- X#define FNT5X9_VBITS 9 /* actual number of rows of bits per char */
- X#define FNT5X9_HCHAR 7 /* horizontal spacing between characters */
- X#define FNT5X9_HBITS 5 /* actual number of bits per row per char */
- Xextern char_row GPFAR fnt5x9[FNT_CHARS][FNT5X9_VBITS];
- X
- X#define FNT9X17 1
- X#define FNT9X17_VCHAR 21 /* vertical spacing between characters */
- X#define FNT9X17_VBITS 17 /* actual number of rows of bits per char */
- X#define FNT9X17_HCHAR 13 /* horizontal spacing between characters */
- X#define FNT9X17_HBITS 9 /* actual number of bits per row per char */
- Xextern char_row GPFAR fnt9x17[FNT_CHARS][FNT9X17_VBITS];
- X
- X#define FNT13X25 2
- X#define FNT13X25_VCHAR 31 /* vertical spacing between characters */
- X#define FNT13X25_VBITS 25 /* actual number of rows of bits per char */
- X#define FNT13X25_HCHAR 19 /* horizontal spacing between characters */
- X#define FNT13X25_HBITS 13 /* actual number of bits per row per char */
- Xextern char_row GPFAR fnt13x25[FNT_CHARS][FNT13X25_VBITS];
- X
- X
- Xtypedef unsigned char pixels; /* the type of one set of 8 pixels in bitmap */
- Xtypedef pixels *bitmap[]; /* the bitmap */
- X
- Xextern bitmap *b_p; /* global pointer to bitmap */
- Xextern unsigned int b_currx, b_curry; /* the current coordinates */
- Xextern unsigned int b_xsize, b_ysize; /* the size of the bitmap */
- Xextern unsigned int b_planes; /* number of color planes */
- Xextern unsigned int b_psize; /* size of each plane */
- Xextern unsigned int b_rastermode; /* raster mode rotates -90deg */
- Xextern unsigned int b_linemask; /* 16 bit mask for dotted lines */
- Xextern unsigned int b_value; /* colour of lines */
- Xextern unsigned int b_hchar; /* width of characters */
- Xextern unsigned int b_hbits; /* actual bits in char horizontally */
- Xextern unsigned int b_vchar; /* height of characters */
- Xextern unsigned int b_vbits; /* actual bits in char vertically */
- Xextern unsigned int b_angle; /* rotation of text */
- Xextern char_box b_font[FNT_CHARS]; /* the current font */
- Xextern unsigned int b_pattern[];
- Xextern int b_maskcount;
- Xextern unsigned int b_lastx, b_lasty; /* last pixel set - used by b_line */
- X
- X
- Xextern void b_makebitmap();
- Xextern void b_freebitmap();
- Xextern void b_setpixel();
- Xextern unsigned int b_getpixel();
- Xextern void b_line();
- Xextern void b_setmaskpixel();
- Xextern void b_putc();
- Xextern void b_charsize();
- Xextern void b_setvalue();
- X
- Xextern int b_setlinetype();
- Xextern int b_move();
- Xextern int b_vector();
- Xextern int b_put_text();
- Xextern int b_text_angle();
- END_OF_FILE
- if test 2820 -ne `wc -c <'gnuplot/bitmap.h'`; then
- echo shar: \"'gnuplot/bitmap.h'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/bitmap.h'
- fi
- if test -f 'gnuplot/corplot.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/corplot.c'\"
- else
- echo shar: Extracting \"'gnuplot/corplot.c'\" \(2721 characters\)
- sed "s/^X//" >'gnuplot/corplot.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *RCSid = "$Id: corplot.c,v 3.37 1992/05/28 03:31:19 woo Exp $";
- X#endif
- X
- X
- X/* GNUPLOT - corplot.c */
- X/*
- X * Copyright (C) 1986 - 1993 Thomas Williams, Colin Kelley
- 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 *
- X * AUTHORS
- X *
- X * Original Software:
- X * Thomas Williams, Colin Kelley.
- X *
- X * Gnuplot 2.0 additions:
- X * Russell Lang, Dave Kotz, John Campbell.
- X *
- X * Gnuplot 3.0 additions:
- X * Gershon Elber and many others.
- X *
- X * There is a mailing list for gnuplot users. Note, however, that the
- X * newsgroup
- X * comp.graphics.gnuplot
- X * is identical to the mailing list (they
- X * both carry the same set of messages). We prefer that you read the
- X * messages through that newsgroup, to subscribing to the mailing list.
- X * (If you can read that newsgroup, and are already on the mailing list,
- X * please send a message info-gnuplot-request@dartmouth.edu, asking to be
- X * removed from the mailing list.)
- X *
- X * The address for mailing to list members is
- X * info-gnuplot@dartmouth.edu
- X * and for mailing administrative requests is
- X * info-gnuplot-request@dartmouth.edu
- X * The mailing list for bug reports is
- X * bug-gnuplot@dartmouth.edu
- X * The list of those interested in beta-test versions is
- X * info-gnuplot-beta@dartmouth.edu
- X */
- X#include <stdio.h>
- X#include <process.h>
- X#include <dos.h>
- X#if defined(ATARI) && defined(__PUREC__)
- X#include <plot.h>
- X#endif
- X
- X#define BOUNDARY 32768
- X#define segment(addr) (FP_SEG(m) + ((FP_OFF(m)+15) >> 4));
- X#define round(value,boundary) (((value) + (boundary) - 1) & ~((boundary) - 1))
- X
- Xchar *malloc(),*realloc();
- X
- Xchar prog[] = "gnuplot";
- Xchar corscreen[] = "CORSCREEN=0";
- X
- Xmain()
- X{
- Xregister unsigned int segm,start;
- Xchar *m;
- X if (!(m = malloc(BOUNDARY))) {
- X printf("malloc() failed\n");
- X exit(1);
- X }
- X segm = segment(m);
- X start = round(segm,BOUNDARY/16);
- X
- X if (realloc(m,BOUNDARY+(start-segm)*16) != m) {
- X printf("can't realloc() memory\n");
- X exit(2);
- X }
- X
- X if ((segm = start >> 11) >= 8) {
- X printf("not enough room in first 256K\n");
- X exit(3);
- X }
- X
- X corscreen[sizeof(corscreen)-2] = '0' + segm;
- X if (putenv(corscreen))
- X perror("putenv");
- X
- X if (spawnlp(P_WAIT,prog,prog,NULL))
- X perror("spawnlp");
- X}
- END_OF_FILE
- if test 2721 -ne `wc -c <'gnuplot/corplot.c'`; then
- echo shar: \"'gnuplot/corplot.c'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/corplot.c'
- fi
- if test -f 'gnuplot/demo/all.dem' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/all.dem'\"
- else
- echo shar: Extracting \"'gnuplot/demo/all.dem'\" \(2597 characters\)
- sed "s/^X//" >'gnuplot/demo/all.dem' <<'END_OF_FILE'
- X#
- X# $Id: all.dem%v 3.38.2.80 1993/02/20 18:34:10 woo Exp woo $
- X#
- X# Executes ALL demos in this directory, in functionality order.
- X#
- X
- Xpause 0 "******************** file simple.dem ********************"
- Xload "simple.dem"
- X
- Xpause 0 "******************** file controls.dem ********************"
- Xload "controls.dem"
- X
- Xpause 0 "******************** file electron.dem ********************"
- Xload "electron.dem"
- X
- Xpause 0 "******************** file using.dem ********************"
- Xload "using.dem"
- X
- Xpause 0 "******************** file errorbar.dem ********************"
- Xload "errorbar.dem"
- X
- Xpause 0 "******************** file param.dem ********************"
- Xload "param.dem"
- X
- X#save settings
- Xsave set 'temp.set'
- Xpause -1 "settings saved to temp.set, hit return"
- X
- Xpause 0 "******************** file polar.dem ********************"
- Xload "polar.dem"
- X
- Xpause 0 "******************** file poldat.dem ********************"
- Xload "poldat.dem"
- X
- X#bring back save settings
- Xload 'temp.set'
- Xpause -1 "saved setting restored, hit return"
- X
- Xpause 0 "******************** file surface1.dem ********************"
- Xload "surface1.dem"
- X
- Xpause 0 "******************** file surface2.dem ********************"
- Xload "surface2.dem"
- X
- Xpause 0 "******************** file contours.dem ********************"
- Xload "contours.dem"
- X
- Xpause 0 "******************** file discrete.dem ********************"
- Xload "discrete.dem"
- X
- Xpause 0 "******************** file hidden.dem ********************"
- Xload "hidden.dem"
- X
- Xpause 0 "******************** file world.dem ********************"
- Xload "world.dem"
- X
- Xpause 0 "******************** file prob.dem ********************"
- Xload "prob.dem"
- X
- Xpause 0 "******************** file prob2.dem ********************"
- Xload "prob2.dem"
- X
- Xpause 0 "******************** file random.dem ********************"
- Xload "random.dem"
- X
- Xpause 0 "******************** file spline.dem ********************"
- Xload "spline.dem"
- X
- Xpause 0 "******************** file binary.dem ********************"
- Xload "binary.dem"
- X
- Xpause 0 "******************** file steps.dem ********************"
- Xload "steps.dem"
- X
- Xpause 0 "******************** file scatter.dem ********************"
- Xload "scatter.dem"
- X
- Xpause 0 "******************** file singulr.dem ********************"
- Xload "singulr.dem"
- X
- Xpause 0 "******************** file airfoil.dem ********************"
- Xload "airfoil.dem"
- X
- Xpause 0 "******************** file multimsh.dem ********************"
- Xload "multimsh.dem"
- X
- Xpause 0 "******************** file bivariat.dem ********************"
- Xload "bivariat.dem"
- X
- Xpause 0 "******************** file animate.dem ********************"
- Xload "animate.dem"
- X
- END_OF_FILE
- if test 2597 -ne `wc -c <'gnuplot/demo/all.dem'`; then
- echo shar: \"'gnuplot/demo/all.dem'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/all.dem'
- fi
- if test -f 'gnuplot/demo/spline.dem' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/demo/spline.dem'\"
- else
- echo shar: Extracting \"'gnuplot/demo/spline.dem'\" \(2708 characters\)
- sed "s/^X//" >'gnuplot/demo/spline.dem' <<'END_OF_FILE'
- X#
- X# $Id: spline.dem%v 3.38.2.53 1993/01/21 01:20:04 woo Exp woo $
- X#
- X# Some curve plotting using common cubic polynomial basis function for cagd.
- X#
- X# Gershon Elber, Aug. 1992
- X#
- Xset xrang [0:1]
- Xset grid
- X
- Xset yrange[-0.2:1.4]
- Xm0(x) = 1
- Xm1(x) = x
- Xm2(x) = x**2
- Xm3(x) = x**3
- Xset title "The cubic Monomial basis functions"
- Xplot m0(x), m1(x), m2(x), m3(x)
- Xpause -1 "Press return to continue"
- X
- Xh00(x) = x**2 * ( 2 * x - 3) + 1
- Xh01(x) = -x**2 * (2 * x - 3)
- Xh10(x) = x * (x - 1)**2
- Xh11(x) = x**2 * (x - 1)
- X
- Xset title "The cubic Hermite basis functions"
- Xplot h00(x), h01(x), h10(x), h11(x)
- Xpause -1 "Press return to continue"
- X
- Xbez0(x) = (1 - x)**3
- Xbez1(x) = 3 * (1 - x)**2 * x
- Xbez2(x) = 3 * (1 - x) * x**2
- Xbez3(x) = x**3
- Xset title "The cubic Bezier basis functions"
- Xplot bez0(x), bez1(x), bez2(x), bez3(x)
- Xpause -1 "Press return to continue"
- X
- Xbsp0(x) = ( 1 - 3 * x + 3 * x**2 - x**3 ) / 6;
- Xbsp1(x) = ( 4 - 6 * x**2 + 3 * x**3 ) / 6;
- Xbsp2(x) = ( 1 + 3 * x + 3 * x**2 - 3 * x**3 ) / 6
- Xbsp3(x) = x**3 / 6
- Xset title "The cubic uniform Bspline basis functions"
- Xplot bsp0(x), bsp1(x), bsp2(x), bsp3(x)
- Xpause -1 "Press return to continue"
- X
- Xy0 = 1
- Xy1 = 0.2
- Xy2 = 0.8
- Xy3 = 0
- X
- Xx0 = 0
- Xx1 = 0.33
- Xx2 = 0.66
- Xx3 = 1
- X
- Xxv0 = -0.3
- Xyv0 = 0.5
- Xxv1 = -0.4
- Xyv1 = 0.2
- X
- Xset arrow from x0,y0 to x1,y1 nohead
- Xset arrow from x1,y1 to x2,y2 nohead
- Xset arrow from x2,y2 to x3,y3 nohead
- X
- Xcub_bezier_x(t) = bez0(t) * x0 + bez1(t) * x1 + bez2(t) * x2 + bez3(t) * x3
- Xcub_bezier_y(t) = bez0(t) * y0 + bez1(t) * y1 + bez2(t) * y2 + bez3(t) * y3
- Xcub_bsplin_x(t) = bsp0(t) * x0 + bsp1(t) * x1 + bsp2(t) * x2 + bsp3(t) * x3
- Xcub_bsplin_y(t) = bsp0(t) * y0 + bsp1(t) * y1 + bsp2(t) * y2 + bsp3(t) * y3
- X
- Xset parametric
- Xset trange [0:1]
- Xset title "The cubic Bezier/Bspline basis functions in use"
- Xplot cub_bezier_x(t), cub_bezier_y(t) with lines 2,\
- X cub_bsplin_x(t), cub_bsplin_y(t) with lines 3
- Xpause -1 "Press return to continue"
- X
- Xset noarrow
- X#
- X# Note the arrows here here scaled by 1/3 so they will fit into plotting area
- X#
- Xset arrow from x1,y1 to x1+xv0/3,y1+yv0/3
- Xset arrow from x2,y2 to x2+xv1/3,y2+yv1/3
- Xset arrow from x1,y1 to x1+xv0,y1+yv0
- Xset arrow from x2,y2 to x2+xv1,y2+yv1
- X
- Xcub_hermit_x1(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0 + h11(t) * xv1
- Xcub_hermit_y1(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0 + h11(t) * yv1
- Xcub_hermit_x2(t) = h00(t) * x1 + h01(t) * x2 + h10(t) * xv0*3 + h11(t) * xv1*3
- Xcub_hermit_y2(t) = h00(t) * y1 + h01(t) * y2 + h10(t) * yv0*3 + h11(t) * yv1*3
- Xset title "The cubic Hermite basis functions in use"
- Xplot cub_hermit_x1(t), cub_hermit_y1(t) with lines 2,\
- X cub_hermit_x2(t), cub_hermit_y2(t) with lines 3
- Xpause -1 "Press return to continue"
- X
- Xset noparametric
- Xset noarrow
- Xset auto
- Xset nogrid
- Xset title ""
- END_OF_FILE
- if test 2708 -ne `wc -c <'gnuplot/demo/spline.dem'`; then
- echo shar: \"'gnuplot/demo/spline.dem'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/demo/spline.dem'
- fi
- if test -f 'gnuplot/docs/makefile.ami' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/docs/makefile.ami'\"
- else
- echo shar: Extracting \"'gnuplot/docs/makefile.ami'\" \(2760 characters\)
- sed "s/^X//" >'gnuplot/docs/makefile.ami' <<'END_OF_FILE'
- X#
- X# $Id: makefile.ami%v 3.38.2.70 1993/02/08 02:19:29 woo Exp woo $
- X#
- X# Makefile for GNUPLOT documentation (Aztec C v5.xx Version)
- 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 for itroff here)
- X#
- X# $Id: makefile.ami%v 3.38.2.70 1993/02/08 02:19:29 woo Exp woo $
- X
- X# usually overridden by ../Makefile
- XHELPDEST = /usr/local/lib/
- X
- X# substitute your troff command (and any flags) for this one
- XTROFF=itroff
- X
- X# substitute cp if you do not have the install program
- XINSTALL=install
- X
- X# Compiler flags
- X# -DSYSV if att sys V
- X# -DMSDOS if MSDOS PS
- X# -traditional -g -O if gcc (set 'CC = gcc')
- X# no extra flags for BSD
- XCFLAGS =
- XCC = cc
- XLN =ln
- XLFLAGS = -lm -lc
- X
- X# default is what is needed for interactive gnuplot
- Xdefault: gnuplot.hlp gnuplot.gih
- X
- X### [tn]roff documentation
- Xtroff: gnuplot.ms titlepage.ms
- X tbl gnuplot.ms | eqn | $(TROFF) -ms
- X
- X# for screen viewing, or printers with backspace/overstrike, remove the -Tlpr
- Xnroff gnuplot.nroff: gnuplot.ms titlepage.ms
- X tbl gnuplot.ms | neqn | nroff -ms -Tlpr > gnuplot.nroff
- X
- Xms gnuplot.ms: doc2ms gnuplot.doc
- X doc2ms < gnuplot.doc > gnuplot.ms
- X
- Xdoc2ms: doc2ms.c
- X $(CC) $(CFLAGS) -o doc2ms.o doc2ms.c
- X $(LN) -o doc2ms doc2ms.o $(LFLAGS)
- X
- X### LaTeX documentation
- Xtex gnuplot.tex: doc2tex gnuplot.doc
- X doc2tex < gnuplot.doc > gnuplot.tex
- X
- Xdvi gnuplot.dvi: gnuplot.tex titlepage.tex
- X latex gnuplot.tex
- X latex gnuplot.tex
- X
- Xdoc2tex: doc2tex.c
- X $(CC) $(CFLAGS) -o doc2tex.o doc2tex.c
- X $(LN) -o doc2tex doc2tex.o $(LFLAGS)
- X
- X# this is how to make gnuplot.hlp
- Xhlp gnuplot.hlp: doc2hlp gnuplot.doc
- X doc2hlp < gnuplot.doc > gnuplot.hlp
- X
- Xdoc2hlp: doc2hlp.c
- X $(CC) $(CFLAGS) -o doc2hlp.o doc2hlp.c
- X $(LN) -o doc2hlp doc2hlp.o $(LFLAGS)
- X
- X# this is how to make gnuplot.gih
- Xgih gnuplot.gih: doc2gih gnuplot.doc
- X doc2gih < gnuplot.doc > gnuplot.gih
- X
- Xdoc2gih: doc2gih.c
- X $(CC) $(CFLAGS) -o doc2gih.o doc2gih.c
- X $(LN) -o doc2gih doc2gih.o $(LFLAGS)
- X
- X# this is how to check the gnuplot.doc file
- Xcheck: checkdoc gnuplot.doc
- X checkdoc < gnuplot.doc
- X
- Xcheckdoc: checkdoc.c
- X $(CC) $(CFLAGS) -o checkdoc.o checkdoc.c
- X $(LN) -o checkdoc checkdoc.o $(LFLAGS)
- X
- X# For Unix and MSDOS only
- Xinstall-unix: gnuplot.gih
- X $(INSTALL) gnuplot.gih $(HELPDEST)
- X
- X# for VMS only
- Xinstall-vms: gnuplot.hlp
- X $(INSTALL) gnuplot.hlp $(HELPDEST)
- X
- X# remove all derived files
- Xclean:
- X rm -f doc2ms gnuplot.nroff gnuplot.ms
- X rm -f doc2tex gnuplot.tex gnuplot.dvi gnuplot.aux gnuplot.log gnuplot.toc
- X rm -f doc2hlp gnuplot.hlp
- X rm -f doc2gih gnuplot.gih
- X rm -f checkdoc *~ *.o core a.out
- END_OF_FILE
- if test 2760 -ne `wc -c <'gnuplot/docs/makefile.ami'`; then
- echo shar: \"'gnuplot/docs/makefile.ami'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/docs/makefile.ami'
- fi
- if test -f 'gnuplot/docs/titlepag.tex' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/docs/titlepag.tex'\"
- else
- echo shar: Extracting \"'gnuplot/docs/titlepag.tex'\" \(1493 characters\)
- sed "s/^X//" >'gnuplot/docs/titlepag.tex' <<'END_OF_FILE'
- X%
- X% $Id: titlepag.tex%v 3.38.2.153 1993/07/08 03:43:32 woo Exp woo $
- X%
- X\ifx\undefined\selectfont % DSL 26 May 93
- X\documentstyle[toc_entr]{article}
- X\else
- X\documentstyle[toc_entr,helv]{article}
- X\fi
- X\setlength{\textwidth}{6.25in}
- X\setlength{\oddsidemargin}{0.5cm}
- X\setlength{\topmargin}{-0.5in}
- X\setlength{\textheight}{9in}
- X\setlength{\parskip}{1ex}
- X\setlength{\parindent}{0pt}
- X\adjustarticle
- X\setlength{\threenum}{4.0em} % DSL 26 May 93
- X\begin{document}
- X
- X\pagestyle{empty}
- X \rule{0in}{3in}
- X \begin{center}
- X {\huge\bf GNUPLOT}\\
- X \vspace{3ex}
- X {\Large An Interactive Plotting Program}\\
- X \vspace{2ex}
- X \large
- X Thomas Williams \& Colin Kelley\\
- X \vspace{2ex}
- X Version 3.5 organized by: Alex Woo \\
- X Major contributors (alphabetic order):\\
- X John Campbell\\
- X Robert Cunningham\\
- X Gershon Elber\\
- X Roger Fearick\\
- X David Kotz\\
- X Ed Kubaitis\\
- X Russell Lang\\
- X Alexander Lehmann\\
- X Carsten Steger\\
- X Tom Tkacik\\
- X Jos Van der Woude \\
- X Alex Woo\\
- X Copyright (C) 1986 - 1993 Thomas Williams, Colin Kelley\\
- X \vspace{3ex}
- X Mailing list for comments: \verb+info-gnuplot@dartmouth.edu+\\
- X Mailing list for bug reports: \verb+bug-gnuplot@dartmouth.edu+
- X
- X \vfill
- X {\small This manual is for GNUPLOT version 3.5\\
- X% \begin{verbatim}
- X% $Id: titlepag.tex%v 3.38.2.153 1993/07/08 03:43:32 woo Exp woo $
- X% \end{verbatim}
- X }
- X
- X \end{center}
- X\newpage
- X
- X\tableofcontents
- X\newpage
- X
- X\setcounter{page}{1}
- X\pagestyle{myheadings}
- X\markboth{GNUPLOT 3.5}{GNUPLOT 3.5}
- END_OF_FILE
- if test 1493 -ne `wc -c <'gnuplot/docs/titlepag.tex'`; then
- echo shar: \"'gnuplot/docs/titlepag.tex'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/docs/titlepag.tex'
- fi
- if test -f 'gnuplot/epsviewe.m' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/epsviewe.m'\"
- else
- echo shar: Extracting \"'gnuplot/epsviewe.m'\" \(2643 characters\)
- sed "s/^X//" >'gnuplot/epsviewe.m' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *RCSid = "$Id: epsviewe.m%v 3.50.1.6 1993/07/27 03:35:12 woo Exp $";
- X#endif
- X
- X
- X#import "epsviewe.h"
- X#import <appkit/OpenPanel.h>
- X#import <appkit/View.h>
- X
- X@implementation EpsViewer
- X
- X- windowCreate:(NXCoord) width Height:(NXCoord) height
- X{
- X
- X /* create the new window, in a good place */
- X theNewWin = [Window
- X newContent:[self nextRectForWidth:width Height:height]
- X style:NX_TITLEDSTYLE
- X backing:NX_RETAINED
- X buttonMask:(NX_CLOSEBUTTONMASK | NX_MINIATURIZEBUTTONMASK)
- X defer:NO];
- X /* we need to receive windowDidBecomeMain: and windowDidResignMain: */
- X [theNewWin setDelegate:self];
- X /*
- X * create a new View, make it the contentView of our new window,
- X * and destroy the window's old contentView
- X */
- X [[theNewWin setContentView:[[View alloc] init]] free];
- X /* display the window, and bring it forth */
- X [theNewWin display];
- X [theNewWin makeKeyAndOrderFront:self];
- X/* [theNewWin orderBack:self]; */
- X /* show the frame */
- X return self;
- X}
- X
- X/***************************************************************************/
- X/* nextRectForWidth:Height: - return the next good content rectangle */
- X/* from Carl F. Sutter's wonderful ViewGif2 'Controller' method... */
- X/***************************************************************************/
- X/* nextTopLeft - return the next good top left window position */
- X/***************************************************************************/
- X
- X- (NXRect *)nextRectForWidth:(NXCoord)width Height:(NXCoord)height
- X{
- X#define OFFSET 10.0
- X#define MAX_STEPS 20
- X#define INITIAL_X 356.0
- X#define INITIAL_Y 241.0
- X NXPoint nxpTopLeft;
- X NXRect nxrTemp; /* used to find window height */
- X NXRect nxrWinHeight; /* bounds of enclosing window */
- X NXSize nxsScreen; /* size of screen */
- X static NXRect nxrResult; /* the Answer! */
- X static int nCurStep = 0;
- X
- X /* find a good top-left coord */
- X nxpTopLeft.x = INITIAL_X + nCurStep * OFFSET;
- X nxpTopLeft.y = INITIAL_Y + nCurStep * OFFSET;
- X if (++nCurStep > MAX_STEPS)
- X nCurStep = 0;
- X /* find window height using nxrTemp */
- X nxrTemp.size.width = width;
- X nxrTemp.size.height = height;
- X nxrTemp.origin.x = nxrTemp.origin.y = 0;
- X [Window getFrameRect:&nxrWinHeight forContentRect:&nxrTemp
- X style:NX_TITLEDSTYLE];
- X [NXApp getScreenSize:&nxsScreen];
- X /* find the lower-left coord */
- X nxrResult.origin.x = nxpTopLeft.x;
- X nxrResult.origin.y = nxsScreen.height - nxrWinHeight.size.height - nxpTopLeft.y;
- X nxrResult.size.width = width;
- X nxrResult.size.height = height;
- X return (&nxrResult);
- X}
- X
- X
- X// Keep compiler quiet
- X- (const char *) rcsid
- X{
- X return RCSid;
- X}
- X
- X@end
- X
- END_OF_FILE
- if test 2643 -ne `wc -c <'gnuplot/epsviewe.m'`; then
- echo shar: \"'gnuplot/epsviewe.m'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/epsviewe.m'
- fi
- if test -f 'gnuplot/makefile.amg' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.amg'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.amg'\" \(2879 characters\)
- sed "s/^X//" >'gnuplot/makefile.amg' <<'END_OF_FILE'
- X# Makefile for SAS/C 6.1 on the Amiga
- X#
- X# $Id: makefile.amg%v 3.50 1993/07/09 05:35:24 woo Exp $
- X#
- X#
- X
- XCC = sc
- X
- X# Remove 'MATH=IEEE' if you don't want to use the better Commodore
- X# math-routines. If you do so, you'll have to change 'scmieee.lib'
- X# to 'scm.lib' in "linkopt.amg" and likewise on the bf_test target
- X# line below.
- X
- XOFLAGS = OPT OPTGO OPTPEEP NOOPTINL NOOPTINLOCAL
- XDEFS = DEF=AMIGA_SC_6_1 DEF=MEMCPY
- XCOPTS = DATA=FAR MATH=IEEE IGN=84+85+88+94+100+154+161+217+304
- XCFLAGS = $(COPTS) $(DEFS) $(OFLAGS)
- X
- X.c.o:
- X $(CC) $(CFLAGS) $<
- X
- XOBJS = binary.o bitmap.o command.o contour.o eval.o gnubin.o graph3d.o \
- X graphics.o help.o internal.o misc.o parse.o plot.o scanner.o \
- X setshow.o specfun.o standard.o term.o util.o version.o
- X
- XCSOURCE1 = bf_test.c binary.c command.c setshow.c
- XCSOURCE2 = help.c gnubin.c graphics.c graph3d.o internal.c
- XCSOURCE3 = misc.c eval.c parse.c plot.c scanner.c standard.c
- XCSOURCE4 = bitmap.c term.c util.c version.c
- XCSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
- X term/bigfig.trm term/cgi.trm term/corel.trm \
- X term/djsvga.trm term/dumb.trm \
- X term/dxf.trm term/dxy.trm \
- X term/debug.trm term/eepic.trm term/epson.trm term/excl.trm \
- X term/fig.trm term/hp26.trm term/hp2648.trm term/hpgl.trm \
- X term/hpljii.trm term/metafont.trm\
- X term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
- XCSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
- X term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
- X term/pbm.trm term/pc.trm
- XCSOURCE7 = term/post.trm term/pstricks.trm term/qms.trm term/regis.trm \
- X term/rgip.trm term/sun.trm\
- X term/t410x.trm term/tek.trm term/texdraw.trm term/tgif.h\
- X term/tgif.trm term/tpic.trm \
- X term/unixpc.trm term/unixplot.trm \
- X term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
- XCSOURCE8 = contour.c specfun.c
- X
- X
- Xall: gnuplot demo/bf_test
- X
- Xgnuplot: $(OBJS)
- X slink with linkopt.amg
- X
- Xdemo/bf_test: bf_test.o binary.o
- X slink from lib:c.o bf_test.o binary.o to demo/bf_test\
- X lib lib:scmieee.lib lib:scnb.lib
- X @echo "*N*NRun bf_test in demo subdirectory to make binary demo files*N"
- X
- Xbf_test.o: bf_test.c
- Xbinary.o: binary.c plot.h
- Xbitmap.o: bitmap.c bitmap.h plot.h
- Xcommand.o: command.c plot.h setshow.h help.h
- Xcontour.o: contour.c plot.h
- Xeval.o: eval.c plot.h
- Xgnubin.o: gnubin.c plot.h setshow.h
- Xhelp.o: help.c plot.h help.h
- Xinternal.o: internal.c plot.h
- Xmisc.o: misc.c plot.h setshow.h help.h
- Xparse.o: parse.c plot.h
- Xplot.o: plot.c plot.h setshow.h
- Xscanner.o: scanner.c plot.h
- Xsetshow.o: setshow.c plot.h setshow.h
- Xspecfun.o: specfun.c plot.h
- Xstandard.o: standard.c plot.h
- Xutil.o: util.c plot.h
- Xversion.o: version.c
- X
- Xgraph3d.o: graph3d.c plot.h setshow.h
- X $(CC) CODE=FAR $(CFLAGS) $<
- X
- Xgraphics.o: graphics.c plot.h setshow.h
- X $(CC) CODE=FAR $(CFLAGS) $<
- X
- Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X $(CC) CODE=FAR $(CFLAGS) $<
- END_OF_FILE
- if test 2879 -ne `wc -c <'gnuplot/makefile.amg'`; then
- echo shar: \"'gnuplot/makefile.amg'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.amg'
- fi
- if test -f 'gnuplot/makefile.ami' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.ami'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.ami'\" \(3050 characters\)
- sed "s/^X//" >'gnuplot/makefile.ami' <<'END_OF_FILE'
- X#
- X# $Id: makefile.ami%v 3.50 1993/07/09 05:35:24 woo Exp $
- X#
- X#
- X#
- X# Makefile for the Amiga Pat R. Empleo
- X# Sept 1991
- X# Manx Aztec C 5.2 beta version
- X#
- X# Usage:
- X#
- X# make -f makefile.ami
- X#
- X#
- X
- X# where to install help file gnuplot.gih
- XHELPDEST=GNUPLOT:docs/gnuplot.gih
- X# Where to send email about bugs and comments (locally)
- XEMAIL="bug-gnuplot@dartmouth.edu"
- X
- X#
- X# Manx Aztec C v5.2 compiler options
- X#
- X# -DVFORK We use this switch to invoke fexecv()
- X#
- XCC = cc
- XCFLAGS = -mcd -DVFORK -DNOGAMMA -DMEMSET -DMEMCPY -DAMIGA_AC_5 -fa -sab -wosw -MR
- X
- X#
- X# Manx Aztec C v5.2 linker options
- X#
- XLD = ln
- XLIBS = -lmal -lc
- X
- X#
- X# Terminal (device) support --- see term.h
- X#
- XTERMFLAGS = -Iterm
- X
- X#
- X# List of object files except term.o, version.o
- X#
- XOBJS = binary.o bitmap.o command.o contour.o eval.o gnubin.o graphics.o \
- X graph3d.o help.o internal.o misc.o parse.o plot.o scanner.o \
- X setshow.o specfun.o standard.o util.o
- X
- X#
- X# List of sources
- X#
- XCSOURCE1 = binary.c command.c setshow.c
- XCSOURCE2 = help.c gnubin.c graphics.c graph3d.c internal.c
- XCSOURCE3 = misc.c eval.c parse.c plot.c readline.c scanner.c standard.c
- XCSOURCE4 = bitmap.c term.c util.c version.c
- XCSOURCE5 = term/amiga.trm term/aed.trm term/cgi.trm term/dumb.trm term/dxf.trm \
- X term/dxy.trm term/eepic.trm term/epson.trm term/fig.trm \
- X term/hp26.trm term/hp2648.trm term/hpgl.trm term/hpljii.trm \
- X term/apollo.trm term/gpr.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 term/bigfig.trm term/vws.trm gplt_x11.c
- XCSOURCE8 = contour.c specfun.c
- X
- X#
- X# Docs
- X#
- XDOCS1 = docs/Makefile docs/README docs/checkdoc.c docs/doc2gih.c \
- X docs/doc2hlp.c docs/doc2hlp.com docs/doc2ms.c docs/doc2tex.c \
- X docs/gnuplot.1 docs/lasergnu.1 docs/toc_entry.sty \
- X docs/titlepage.ms docs/titlepage.tex
- XDOCS2 = docs/gnuplot.doc
- XDOCS3 = docs/latextut/Makefile docs/latextut/eg1.plt \
- X docs/latextut/eg2.plt docs/latextut/eg3.dat docs/latextut/eg3.plt \
- X docs/latextut/eg4.plt docs/latextut/eg5.plt docs/latextut/eg6.plt \
- X docs/latextut/header.tex docs/latextut/tutorial.tex \
- X docs/latextut/linepoint.plt
- X
- X#
- X# Targets
- X#
- X
- Xdefault: gnuplot doc
- X
- Xgnuplot: $(OBJS) term.o version.o
- X $(LD) $(OBJS) term.o version.o $(LIBS) -o gnuplot
- X
- Xdoc:
- X cd docs
- X make -f makefile.ami gih
- X
- X#
- X# Dependencies
- X#
- Xplot.o: plot.c
- X $(CC) $(CFLAGS) plot.c
- X
- Xterm.o: term.h term.c $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X $(CC) $(CFLAGS) $(TERMFLAGS) term.c
- X
- Xversion.o:
- X $(CC) $(CFLAGS) -DCONTACT=$(EMAIL) version.c
- X
- X$(OBJS): plot.h
- X $(CC) $(CFLAGS) $*.c
- X
- Xcommand.o:
- X $(CC) $(CFLAGS) -c command.c -DHELPFILE="$(HELPDEST)"
- X
- Xcommand.o help.o misc.o: help.h
- X
- Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
- X
- Xbitmap.o term.o: bitmap.h
- X
- X#
- X# misc
- X#
- Xclean:
- X delete #?.o
- X
- Xveryclean: spotless
- X
- Xspotless:
- X delete #?.o gnuplot
- X
- END_OF_FILE
- if test 3050 -ne `wc -c <'gnuplot/makefile.ami'`; then
- echo shar: \"'gnuplot/makefile.ami'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.ami'
- fi
- if test -f 'gnuplot/makefile.djg' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.djg'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.djg'\" \(2746 characters\)
- sed "s/^X//" >'gnuplot/makefile.djg' <<'END_OF_FILE'
- X# make file for DJGPP and ndmake 4.5
- X
- X# problems using DJGPP 1.08 as at 6 Oct 1992
- X# 1. signal(SIGFPE,...) not working.
- X# floating point exceptions TERMINATE gnuplot.
- X# This is because signal is defined as signal(){} !!!
- X# 2. graphics sometimes draws the x axis in the wrong place
- X
- X# The above problems make gnuplot UNUSABLE under DJGPP at present.
- X
- X# where to place gnuplot.gih helpfile
- XHELPFILE = gnuplot.gih
- X
- X# compiler
- XCCDIR = c:\gcc\bin
- XCC = $(CCDIR)\gcc
- X# include directory
- XINCLUDE =-Ic:/gcc/include
- X
- XCFLAGS = -DMSDOS -DDJGPP -DREADLINE
- XTERMFLAGS = -DDJSVGA
- XLINKOPT = -lm -lpc -lgr
- X
- XCSOURCE5 = term/ai.trm term/amiga.trm term/aed.trm term/atari.trm \
- X term/bigfig.trm term/cgi.trm term/djsvga.trm term/dumb.trm \
- X term/dxf.trm term/dxy.trm \
- X term/debug.trm term/eepic.trm term/epson.trm term/fig.trm \
- X term/hp26.trm term/hp2648.trm term/hpgl.trm \
- X term/hpljii.trm term/metafont.trm\
- X term/apollo.trm term/gpr.trm term/hppj.trm term/compact.c
- XCSOURCE6 = term/impcodes.h term/imagen.trm term/next.trm term/object.h \
- X term/iris4d.trm term/kyo.trm term/latex.trm term/mif.trm \
- X 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/texdraw.trm term/unixpc.trm \
- X term/unixplot.trm term/v384.trm term/vws.trm term/x11.trm term/xlib.trm
- XOBJ1 = bitmap.o command.o contour.o eval.o graphics.o graph3d.o
- XOBJ2 = help.o internal.o misc.o parse.o plot.o readline.o
- XOBJ3 = scanner.o setshow.o specfun.o standard.o term.o util.o
- XOBJ4 = version.o gnubin.o binary.o
- X
- XOBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
- X
- X.c.o:
- X $(CC) -c $(CFLAGS) $(INCLUDE) $<
- X
- Xall: gp32.exe $(HELPFILE)
- X
- Xgp32.exe : $(OBJS)
- X @>gcclink.rsp $(OBJS)
- X $(CC) -o gp32 @gcclink.rsp $(LINKOPT)
- X copy /b $(CCDIR)\go32.exe+gp32 gp32.exe
- X
- X
- Xcommand.o: command.c plot.h setshow.h help.h
- X $(CC) -c $(CFLAGS) $(INCLUDE) -DHELPFILE=\"$(HELPFILE)\" command.c
- X
- Xterm.o: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X $(CC) -c $(CFLAGS) $(INCLUDE) $(TERMFLAGS) -Iterm term.c
- X
- X$(OBJS): plot.h
- X
- Xcommand.o help.o misc.o: help.h
- X
- Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
- X
- Xbitmap.o term.o: bitmap.h
- X
- X# convert gnuplot.doc to gnuplot.gih
- X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
- X doc2gih docs\gnuplot.doc $(HELPFILE)
- X
- Xdoc2gih.exe: docs\doc2gih.c
- X $(CC) $(CFLAGS) $(INCLUDE) -o doc2gih docs/doc2gih.c
- X copy /b $(CCDIR)\go32.exe+doc2gih doc2gih.exe
- X
- X
- X# clean target - remove all temp files, but leave executable intact
- X# needed when changing configuration (model or overlaying)
- X
- Xclean:
- X del *.o
- X del gp32
- X del doc2gih
- X
- X# realclean target - remove all files created by the makefile
- X
- Xrealclean: clean
- X del gp32.exe
- X del doc2gih.exe
- X del gnuplot.gih
- X
- END_OF_FILE
- if test 2746 -ne `wc -c <'gnuplot/makefile.djg'`; then
- echo shar: \"'gnuplot/makefile.djg'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.djg'
- fi
- if test -f 'gnuplot/makefile.g' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.g'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.g'\" \(2646 characters\)
- sed "s/^X//" >'gnuplot/makefile.g' <<'END_OF_FILE'
- X# This file is for GRASS, a geographic information system.
- X# To compile, make modifications below (if necessary) then
- X# % ln -s makefile.g Gmakefile
- X# % gmake4.1
- X#
- X# NOTE: this creates a binary called 'g.gnuplot' and is located in
- X# $GISBASE/bin.
- X# A help file is installed in $(GISBASE)/man/help/g.gnuplot
- X#
- X# GRASS driver written by:
- X# James Darrell McCauley Department of Ag Engr, Purdue Univ
- X# mccauley@ecn.purdue.edu West Lafayette, Indiana 47907-1146
- X#
- X# Last modified: 26 Jun 1993
- X#
- X# Known Bugs: There may be a problem with fifo's. Then again, there may not.
- X# Drawing non-filled point types is slow.
- X#
- X# Things to do: modify text function to change fonts? will make g.gnuplot
- X# input files incompatible with gnuplot
- X#
- X# Modification History:
- X# <15 Jun 1992> First version created with GNUPLOT 3.2
- X# <15 Feb 1993> Modified to work with frames
- X# <16 Feb 1993> Added point types triangle (filled and unfilled),
- X# inverted-triangle (filled and unfilled),
- X# circle (filled and unfilled), and filled box.
- X# Graph is no longer erased after g.gnuplot is finished.
- X# <01 Mar 1993> Modified to work with 3.3b9
- X# <26 Jun 1993> Fixed up this file to automatically install the
- X# binary and help.
- X#
- X#############################################################################
- X# Where to send email about bugs and comments
- XEMAIL=grassp-list@moon.cecer.army.mil
- X
- XHELPDEST=$(GISBASE)/man/help/g.gnuplot
- X################### Don't touch anything below this line ###################
- XGTERMFLAGS = -DGRASS
- X
- XEXTRA_CFLAGS=-DREADLINE -DNOCWDRC $(GTERMFLAGS) \
- X -DCONTACT=\"$(EMAIL)\" -DHELPFILE=\"$(HELPDEST)\"
- X
- XOFILES = \
- X binary.o \
- X bitmap.o \
- X command.o \
- X contour.o \
- X eval.o \
- X gnubin.o \
- X graph3d.o \
- X graphics.o \
- X help.o \
- X internal.o \
- X misc.o \
- X parse.o \
- X plot.o \
- X readline.o \
- X scanner.o \
- X setshow.o \
- X specfun.o \
- X standard.o \
- X term.o \
- X util.o \
- X version.o
- X
- Xall: $(BIN_MAIN_CMD)/g.gnuplot $(GISBASE)/man/help/g.gnuplot
- X
- X$(BIN_MAIN_CMD)/g.gnuplot: $(OFILES) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB)
- X $(CC) $(LDFLAGS) -o $@ $(OFILES) $(DISPLAYLIB) $(RASTERLIB) $(GISLIB) $(TERMLIB) $(MATHLIB)
- X
- X$(GISBASE)/man/help/g.gnuplot:
- X ( cd docs; $(MAKE) $(MFLAGS) $(MY_FLAGS) install-unix HELPDEST=$(HELPDEST) )
- X
- X# Dependencies
- X
- Xterm.o: term.h term.c term/grass.trm
- X
- X$(OFILES): plot.h
- X
- Xcommand.o help.o misc.o: help.h
- X
- Xcommand.o graphics.o graph3d.o misc.o plot.o setshow.o term.o: setshow.h
- X
- Xbitmap.o term.o: bitmap.h
- X
- X################################################################
- X$(RASTERLIB): #
- X$(DISPLAYLIB): #
- X$(GISLIB): #
- X
- X
- X
- X
- END_OF_FILE
- if test 2646 -ne `wc -c <'gnuplot/makefile.g'`; then
- echo shar: \"'gnuplot/makefile.g'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.g'
- fi
- if test -f 'gnuplot/makefile.os2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.os2'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.os2'\" \(2360 characters\)
- sed "s/^X//" >'gnuplot/makefile.os2' <<'END_OF_FILE'
- X#
- X# $Id: makefile.os2%v 3.50 1993/07/09 05:35:24 woo Exp $
- X#
- X# Make file for use with emx 0.8e (gcc2.2.2) and nmake
- X# for compiling for OS/2 2.0
- X# usage: nmake OR dmake -r -B
- X# (file has blanks instead of real tabs, doesn't use dmake.ini)
- X#
- X
- X# where to place gnuplot.gih helpfile
- XHELPFILE = gnuplot.gih
- X
- XCFLAGS = -c -O2 -DOS2 -DGETCWD -DREADLINE -DPIPES
- X
- X# see other terminal defines in term.h
- XTERMFLAGS =
- X
- X
- XOBJS = bitmap.o command.o contour.o eval.o graphics.o graph3d.o \
- X help.o internal.o misc.o parse.o plot.o readline.o specfun.o \
- X scanner.o setshow.o standard.o term.o util.o version.o \
- X binary.o gnubin.o
- 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\pm.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
- X
- X# default rules
- X.c.o:
- X gcc $(CFLAGS) -o $*.o $*.c
- X
- Xgnuplot.exe: $(OBJS)
- X gcc -o gnuplot.exe $(OBJS) -los2
- X
- X
- Xbitmap.o: bitmap.c bitmap.h plot.h
- X
- Xbinary.o: binary.c plot.h
- X
- Xgnubin.o: gnubin.c plot.h
- X
- Xcommand.o: command.c plot.h setshow.h help.h
- 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
- Xhelp.o: help.c plot.h help.h
- X
- Xinternal.o: internal.c plot.h
- X
- Xmisc.o: misc.c plot.h setshow.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: specfun.c plot.h
- X
- Xstandard.o: standard.c plot.h
- X
- Xterm.o: term.c term.h plot.h setshow.h bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X gcc $(CFLAGS) $(TERMFLAGS) -Iterm -o term.o term.c
- X
- Xutil.o: util.c plot.h
- X
- Xversion.o: version.c
- X
- Xall: gnuplot.exe $(HELPFILE)
- X
- X# convert gnuplot.doc to gnuplot.gih
- Xdoc2gih.exe: docs\doc2gih.c
- X gcc -o doc2gih.exe docs/doc2gih.c
- X
- X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
- X doc2gih docs\gnuplot.doc $(HELPFILE)
- X
- Xclean:
- X del *.o
- X
- X# realclean target - remove all files created by the makefile
- X
- Xrealclean: clean
- X del gnuplot.exe
- X del doc2gih.exe
- X del gnuplot.gih
- X
- X
- END_OF_FILE
- if test 2360 -ne `wc -c <'gnuplot/makefile.os2'`; then
- echo shar: \"'gnuplot/makefile.os2'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.os2'
- fi
- if test -f 'gnuplot/makefile.ztc' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/makefile.ztc'\"
- else
- echo shar: Extracting \"'gnuplot/makefile.ztc'\" \(2937 characters\)
- sed "s/^X//" >'gnuplot/makefile.ztc' <<'END_OF_FILE'
- X# make file for Zortech C++ 3.x
- X
- X# where to place gnuplot.gih helpfile
- XHELPFILE = gnuplot.gih
- X
- X# -c means don't link
- X# -f means in-line 8087
- X# -mx means X memory model
- X# -o+space means optimize for space, -o means optimize for speed
- X# -p means turn off autoprototyping (pre-ANSI codes)
- X# Jm means relax type checking
- X# one can disable command-line history by comment out -DREADLINE
- X
- XCFLAGS=-c -mx -o+space -Jm -DREADLINE
- XLINK=blinkx
- X#LINK=386link
- XCC=ztc
- X
- X
- XOBJ1 = bitmap.obj command.obj contour.obj eval.obj graphics.obj graph3d.obj
- XOBJ2 = help.obj internal.obj misc.obj parse.obj plot.obj readline.obj
- XOBJ3 = scanner.obj setshow.obj specfun.obj standard.obj term.obj util.obj
- XOBJ4 = version.obj gnubin.obj binary.obj
- X
- XOBJS = $(OBJ1) $(OBJ2) $(OBJ3) $(OBJ4)
- X
- XCSOURCE5 = term\aed.trm term\cgi.trm term\dumb.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\fg.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 specfun.c gnubin.c binary.c
- X
- Xall: gnuplot.exe $(HELPFILE) demo\bf_test.exe
- X
- Xgnuplot.exe: $(OBJS)
- X $(LINK) @linkopt.ztc
- X#@linkopt.pha
- X
- X# default rules
- X
- X.c.obj:
- X $(CC) $(CFLAGS) $<
- X
- Xbitmap.obj: bitmap.c bitmap.h plot.h
- X
- Xcommand.obj: command.c plot.h setshow.h help.h
- X $(CC) $(CFLAGS) command.c
- X
- Xcontour.obj: contour.c plot.h
- X
- Xeval.obj: eval.c plot.h
- 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 help.h
- X
- Xparse.obj: parse.c plot.h
- X $(CC) $(CFLAGS) parse.c
- X
- Xplot.obj: plot.c plot.h setshow.h
- X $(CC) $(CFLAGS) plot.c
- X
- Xreadline.obj: readline.c
- X
- Xscanner.obj: scanner.c plot.h
- X
- Xsetshow.obj: setshow.c plot.h setshow.h
- X
- Xspecfun.obj: specfun.c
- X
- Xstandard.obj: standard.c plot.h
- X
- X# the CSOURCE? dependencies are not up to date (but who cares)
- Xterm.obj: term.c term.h plot.h setshow.c bitmap.h $(CSOURCE5) $(CSOURCE6) $(CSOURCE7)
- X $(CC) $(CFLAGS) $(TERMFLAGS) -Iterm term.c
- X
- Xutil.obj: util.c plot.h
- X
- Xversion.obj: version.c
- X
- X$(HELPFILE): doc2gih.exe docs\gnuplot.doc
- X doc2gih docs\gnuplot.doc $(HELPFILE)
- X
- X# convert gnuplot.doc to gnuplot.gih
- Xdoc2gih.exe: docs\doc2gih.c
- X $(CC) -c -ml docs\doc2gih.c
- X $(LINK) $*
- X
- Xdemo\bf_test.exe: bf_test.c binary.obj
- X $(CC) -mx -odemo\bf_test.exe bf_test.c binary.obj
- X
- X# clean target - remove all temp files, but leave executable intact
- X# needed when changing configuration (model or overlaying)
- X
- Xclean:
- X del *.obj
- X del gnuplot.map
- X del doc2gih.exe
- X
- X# realclean target - remove all files created by the makefile
- X
- Xrealclean: clean
- X del gnuplot.exe
- X del gnuplot.gih
- X del demo\bf_test.exe
- X del demo\binary1
- X del demo\binary2
- X del demo\binary3
- END_OF_FILE
- if test 2937 -ne `wc -c <'gnuplot/makefile.ztc'`; then
- echo shar: \"'gnuplot/makefile.ztc'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/makefile.ztc'
- fi
- if test -f 'gnuplot/term/compact.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/compact.c'\"
- else
- echo shar: Extracting \"'gnuplot/term/compact.c'\" \(2493 characters\)
- sed "s/^X//" >'gnuplot/term/compact.c' <<'END_OF_FILE'
- X/* compact.c -- contains routines to compress a vector stream without
- Xmodifying it */
- X
- X#ifndef COMPACT
- X
- X/* replaces runs of constant slope in the buffer with single vectors
- X returns the number of points eliminated */
- Xint compact_slope (xp,yp,isa_move,sz,delta)
- Xint xp[], yp[], isa_move[];
- Xint *sz;
- Xfloat delta;
- X{
- X int dx,dy,old_size,new_index,i,start;
- X float slope,old_slope;
- X
- X old_size = *sz;
- X new_index = 0;
- X start = 0;
- X if (xp[1]!=xp[0])
- X old_slope = (float)(yp[1]-yp[0])/(float)(xp[1]-xp[0]);
- X else
- X old_slope = (float)(yp[1]-yp[0])/(float)(0.00001+xp[1]-xp[0]);
- X for (i=2;i<old_size;i++){
- X dx = xp[i] - xp[i-1];
- X dy = yp[i] - yp[i-1];
- X if (dx!=0)
- X slope = (float) dy / (float) dx;
- X else
- X slope = (float) dy / ((float) dx + 0.00001);
- X if ((abs(slope-old_slope) > delta)||(isa_move[i])){
- X xp[new_index] = xp[start];
- X yp[new_index] = yp[start];
- X isa_move[new_index] = isa_move[start];
- X new_index++;
- X if (start != i-1){
- X xp[new_index] = xp[i-1];
- X yp[new_index] = yp[i-1];
- X isa_move[new_index] = isa_move[i-1];
- X new_index++;
- X }
- X start = i;
- X /* this is the slope for the new run */
- X old_slope = slope;
- X }
- X }
- X /* copy the last point into the new array */
- X xp[new_index] = xp[old_size-1];
- X yp[new_index] = yp[old_size-1];
- X isa_move[new_index] = isa_move[old_size-1];
- X new_index++;
- X *sz = new_index;
- X return (old_size - *sz);
- X}
- X
- X/* compacts the vector list by compressing runs of constant
- X dx&dy into one vector
- X use this if floating point is too expensive!
- X more naive than compact_slope; doesn't compact as much as possible
- X returns the number of points eliminated */
- Xint compact_int(xp,yp,isa_move,size)
- Xint xp[],yp[], isa_move[], *size;
- X{
- X int dx,dy,old_dx,old_dy,start,index,i,old_size;
- X
- X start = index = 0;
- X old_dx = xp[1]-xp[0];
- X old_dy = yp[1]-yp[0];
- X for (i=2;i<*size;i++){
- X dx = xp[i]-xp[i-1];
- X dy = yp[i]-yp[i-1];
- X if ((abs(dx-old_dx)+abs(dy-old_dy)!=0)||(isa_move[i])){
- X /* we've reached the end of a run */
- X xp[index] = xp[start];
- X yp[index] = yp[start];
- X isa_move[index] = isa_move[start];
- X index++;
- X if (start != i-1){
- X xp[index] = xp[i-1];
- X yp[index] = yp[i-1];
- X isa_move[index] = isa_move[i-1];
- X index++;
- X }
- X start = i;
- X old_dx = dx;
- X old_dy = dy;
- X }
- X } /* end for */
- X /* include the last point */
- X xp[index] = xp[*size-1];
- X yp[index] = yp[*size-1];
- X isa_move[index] = isa_move[*size-1];
- X index++;
- X old_size = *size;
- X *size = index;
- X return(old_size - *size);
- X}
- X#endif
- X
- X#define COMPACT
- X
- END_OF_FILE
- if test 2493 -ne `wc -c <'gnuplot/term/compact.c'`; then
- echo shar: \"'gnuplot/term/compact.c'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/compact.c'
- fi
- if test -f 'gnuplot/term/debug.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/debug.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/debug.trm'\" \(2740 characters\)
- sed "s/^X//" >'gnuplot/term/debug.trm' <<'END_OF_FILE'
- X/*
- X * $Id: debug.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X *
- X */
- X
- X/* GNUPLOT - debug.trm */
- X/*
- X * Copyright (C) 1990
- 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 * DEBUG
- X *
- X * AUTHORS
- X * luecken@udel.edu
- X *
- X * send your comments or suggestions to (luecken@udel.edu).
- X *
- X */
- X
- X
- X#define DEBUG_XMAX 512
- X#define DEBUG_YMAX 390
- X
- X#define DEBUG_XLAST (DEBUG_XMAX - 1)
- X#define DEBUG_YLAST (DEBUG_XMAX - 1)
- X
- X/* Assume a character size of 1, or a 7 x 10 grid. */
- X#define DEBUG_VCHAR 10
- X#define DEBUG_HCHAR 7
- X#define DEBUG_VTIC (DEBUG_YMAX/70)
- X#define DEBUG_HTIC (DEBUG_XMAX/75)
- Xint DEBUG_linetype_last;
- Xint DEBUG_xlast;
- Xint DEBUG_ylast;
- X
- XDEBUG_init()
- X{
- X fprintf(outfile,"init\n");
- X DEBUG_linetype_last = -3;
- X}
- X
- X
- XDEBUG_graphics()
- X{
- X DEBUG_xlast = DEBUG_ylast=0;
- X fprintf(outfile,"graphics\n");
- X}
- X
- X
- XDEBUG_text()
- X{
- X fprintf(outfile,"text\n");
- X}
- X
- X
- XDEBUG_linetype(linetype)
- Xint linetype;
- X{
- X /*
- X if (linetype != DEBUG_linetype_last){
- X fprintf(outfile,"l%d",linetype);
- X DEBUG_linetype_last = linetype;
- X }
- X */
- X fprintf(outfile,"line %d\n",linetype);
- X}
- X
- X
- XDEBUG_move(x,y)
- Xint x,y;
- X{
- X /*
- X if (x != DEBUG_xlast || y != DEBUG_ylast){
- X fprintf(outfile,"mm");
- X DEBUG_xlast = x;
- X DEBUG_ylast = y;
- X }
- X */
- X fprintf(outfile,"move %d, %d\t(%d, %d)\n",x,y,x-DEBUG_xlast,y-DEBUG_ylast);
- X DEBUG_xlast = x;
- X DEBUG_ylast = y;
- X}
- X
- X
- XDEBUG_vector(x,y)
- Xint x,y;
- X{
- X /*
- X if (x != DEBUG_xlast || y != DEBUG_ylast){
- X fprintf(outfile,"vv");
- X DEBUG_xlast = x;
- X DEBUG_ylast = y;
- X }
- X */
- X fprintf(outfile,"vect %d, %d\t(%d, %d)\n",x,y,x-DEBUG_xlast,y-DEBUG_ylast);
- X DEBUG_xlast = x;
- X DEBUG_ylast = y;
- X}
- X
- X
- XDEBUG_put_text(x,y,str)
- Xint x, y;
- Xchar *str;
- X{
- X /*
- X DEBUG_move(x,y);
- X fprintf(outfile,"tx%s\r",str);
- X */
- X fprintf(outfile,"put_text calls:");
- X DEBUG_move(x,y);
- X fprintf(outfile,"put_text '%s'\n",str);
- X}
- X
- X
- X
- XDEBUG_reset()
- X{
- X fprintf(outfile,"reset");
- X}
- X
- XDEBUG_justify_text(mode)
- Xint mode;
- X{
- X fprintf(outfile,"justify ");
- X switch(mode){
- X case (CENTRE):
- X fprintf(outfile,"centre");
- X break;
- X case (RIGHT):
- X fprintf(outfile,"right");
- X break;
- X default:
- X case (LEFT):
- X fprintf(outfile,"left");
- X break;
- X }
- X fprintf(outfile,"\n");
- X return(TRUE);
- X}
- X
- END_OF_FILE
- if test 2740 -ne `wc -c <'gnuplot/term/debug.trm'`; then
- echo shar: \"'gnuplot/term/debug.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/debug.trm'
- fi
- if test -f 'gnuplot/term/djsvga.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/djsvga.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/djsvga.trm'\" \(2625 characters\)
- sed "s/^X//" >'gnuplot/term/djsvga.trm' <<'END_OF_FILE'
- X/*
- X * $Id: djsvga.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X */
- X
- X/* GNUPLOT - djsvga.trm */
- X/*
- X * Copyright (C) 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 * svga
- X *
- X * AUTHORS
- X * Russell Lang
- X *
- X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
- X *
- X */
- X
- X/* SVGA driver using DJGPP */
- X#include <graphics.h>
- X#include <pc.h>
- X
- Xint dj_startx, dj_starty;
- Xint dj_xlast, dj_ylast;
- Xint dj_color;
- X
- X#define DJSVGA_XMAX 640
- X#define DJSVGA_YMAX 480
- X
- X#define DJSVGA_XLAST (DJSVGA_XMAX - 1)
- X#define DJSVGA_YLAST (DJSVGA_YMAX - 1)
- X
- X#define DJSVGA_VCHAR 16
- X#define DJSVGA_HCHAR 8
- X#define DJSVGA_VTIC 4
- X#define DJSVGA_HTIC 4
- X
- X#define DJNUMCOLOR 15
- Xstatic int svga256color[DJNUMCOLOR] = {7,8,2,3,4,5,9,14,12,15,13,10,11,1,6};
- Xstatic int dj_colors[DJNUMCOLOR];
- X
- X
- XDJSVGA_init()
- X{
- Xint i, on, r, g, b;
- X /* Allocate colors */
- X for (i=0; i<DJNUMCOLOR; i++) {
- X on = svga256color[i] & 8 ? 255 : 170;
- X r = svga256color[i] & 4 ? on : 0;
- X g = svga256color[i] & 2 ? on : 0;
- X b = svga256color[i] & 1 ? on : 0;
- X if (svga256color[i] == 8) r=g=b=85;
- X dj_colors[i] = GrAllocColor(r,g,b);
- X }
- X /* Get the screen size: */
- X GrSetMode(GR_default_graphics,0,0); /* */
- X dj_xlast = GrMaxX();
- X term_tbl[term].xmax = dj_xlast + 1;
- X dj_ylast = GrMaxY();
- X term_tbl[term].ymax = dj_ylast + 1;
- X GrSetMode(GR_default_text,0,0); /* */
- X}
- X
- XDJSVGA_graphics()
- X{
- X GrSetMode(GR_default_graphics,0,0);
- X}
- X
- XDJSVGA_text()
- X{
- X (void)getkey();
- X GrSetMode(GR_default_text,0,0);
- X}
- X
- XDJSVGA_reset()
- X{
- Xint i;
- X /* Free colors */
- X for (i=0; i<DJNUMCOLOR; i++) {
- X GrFreeColor(dj_colors[i]);
- X }
- X}
- X
- XDJSVGA_linetype(linetype)
- Xint linetype;
- X{
- X if (linetype >= 13)
- X linetype %= 13;
- X dj_color = dj_colors[linetype+2];
- X}
- X
- XDJSVGA_move(x,y)
- Xunsigned int x,y;
- X{
- X dj_startx = x;
- X dj_starty = y;
- X}
- X
- X
- XDJSVGA_vector(x,y)
- Xunsigned int x,y;
- X{
- X GrLine(dj_startx,dj_ylast-dj_starty,x,dj_ylast-y,dj_color);
- X dj_startx = x;
- X dj_starty = y;
- X}
- X
- X
- XDJSVGA_put_text(x,y,str)
- Xunsigned int x, y;
- Xchar *str;
- X{
- X GrTextXY(x,dj_ylast-y-DJSVGA_VCHAR/2,str,dj_color,GrNOCOLOR);
- X}
- X
- END_OF_FILE
- if test 2625 -ne `wc -c <'gnuplot/term/djsvga.trm'`; then
- echo shar: \"'gnuplot/term/djsvga.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/djsvga.trm'
- fi
- if test -f 'gnuplot/term/kyo.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/kyo.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/kyo.trm'\" \(2377 characters\)
- sed "s/^X//" >'gnuplot/term/kyo.trm' <<'END_OF_FILE'
- X/*
- X * $Id: kyo.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X *
- X */
- X
- X/* Prescribe (KYOCERA) driver - Michael Waldor */
- X/* Modified for gnuplot 2.0 sk@sun4 24-Apr-1990 13:23 */
- X#ifdef PRESCRIBE
- X
- X#define PRE_XMAX 2567
- X#define PRE_YMAX 1815 /* X:Y = sqrt(2) */
- X
- X#define PRE_XLAST (PRE_XMAX - 1)
- X#define PRE_YLAST (PRE_YMAX - 1)
- X
- X#define PRE_VCHAR (PRE_YMAX/30)
- X#define PRE_HCHAR 33 /* about 9 chars per inch */
- X#define PRE_HTIC (PRE_XMAX/80)
- X#define PRE_VTIC PRE_HTIC
- X
- X/* for Courier font: */
- X#define KYO_VCHAR (14*(300/72)) /* 12 pt + 2 pt baselineskip */
- X#define KYO_HCHAR (300/10) /* 10 chars per inch */
- X
- Xenum JUSTIFY pre_justify=LEFT; /* text is flush left */
- X
- XPRE_init()
- X{
- X (void) fprintf(outfile,"!R! RES;\n") ;
- X /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
- X /* SPO: landscape format */
- X /* STM, SLM set top, left margin*/
- X /* Font: bold Helvetica (proportional font) */
- X (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
- X (void) fprintf(outfile,"FTMD 15; FONT 29; SCPI 9;\n") ;
- X}
- X
- XKYO_init()
- X{
- X (void) fprintf(outfile,"!R! RES;\n") ;
- X /* UNIT: units are dots, 300 dots = 1 in = 72 pt */
- X /* SPO: landscape format */
- X /* STM, SLM set top, left margin */
- X /* Font: Courier (fixed width font) */
- X (void) fprintf(outfile,"PAGE; UNIT D; SPO L; STM 280; SLM 440;\n") ;
- X (void) fprintf(outfile,"FTMD 15; FONT 17; SCPI 10;\n") ;
- X}
- X
- XPRE_graphics()
- X{
- X}
- X
- XPRE_text() /* eject page after each plot */
- X{
- X (void) fprintf(outfile,"PAGE;\n") ;
- X}
- X
- XPRE_linetype(linetype)
- Xint linetype ;
- X{
- X /* actually choose pendiameter */
- X if (linetype < 0) linetype = -linetype;
- X else linetype = 3;
- X (void) fprintf(outfile,"SPD %d;\n", linetype) ;
- X}
- X
- XPRE_move(x,y)
- Xunsigned int x,y ;
- X{
- X (void) fprintf(outfile,"MAP %1d,%1d;\n",x,PRE_YMAX-y) ;
- X}
- X
- XPRE_vector(x,y)
- Xunsigned int x,y ;
- X{
- X (void) fprintf(outfile,"DAP %1d, %1d;\n",x,PRE_YMAX-y) ;
- X}
- X
- XPRE_put_text(x, y, str)
- Xunsigned int x,y ;
- Xchar *str;
- X{
- X PRE_move(x,y);
- X switch(pre_justify){
- X case RIGHT:
- X (void) fprintf(outfile,"RTXT \"%s\", B;\n",str) ;
- X break;
- X default:
- X (void) fprintf(outfile,"TEXT \"%s\", B;\n",str) ;
- X }
- X}
- X
- Xint PRE_justify_text(mode)
- Xenum JUSTIFY mode;
- X{
- X pre_justify=mode;
- X switch(pre_justify){
- X case LEFT:
- X case RIGHT:
- X return(TRUE);
- X default:
- X return(FALSE);
- X }
- X
- X}
- X
- XPRE_reset()
- X{
- X (void) fprintf(outfile,"PAGE; RES; EXIT;\n");
- X}
- X
- X#endif /* PRESCRIBE */
- END_OF_FILE
- if test 2377 -ne `wc -c <'gnuplot/term/kyo.trm'`; then
- echo shar: \"'gnuplot/term/kyo.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/kyo.trm'
- fi
- if test -f 'gnuplot/term/mgr.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/mgr.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/mgr.trm'\" \(2724 characters\)
- sed "s/^X//" >'gnuplot/term/mgr.trm' <<'END_OF_FILE'
- X/* GNUPLOT - mgr.trm */
- X/*
- X * This file is included by ../term.c.
- X *
- X * This terminal driver supports:
- X * Mgr window system, color display
- X *
- X * AUTHOR
- X * Vincent Broman, broman@nosc.mil
- X */
- X
- X#undef ESC
- X#include <term.h> /* from Mgr, not gnuplot */
- X
- X
- X#define MGR_XMAX 640
- X#define MGR_YMAX 400
- X#define MGR_VCHAR 16
- X#define MGR_HCHAR 8
- X#define MGR_VTIC 4
- X#define MGR_HTIC 4
- X
- Xstatic int MGR_border = 5;
- Xstatic int MGR_winnbr = 0;
- X
- Xstatic int MGR_rowcount = 24;
- Xstatic int MGR_winwidth = MGR_XMAX;
- Xstatic int MGR_winheight = MGR_YMAX;
- Xstatic int MGR_vchar = MGR_VCHAR;
- Xstatic int MGR_hchar = MGR_HCHAR;
- X
- X
- XMGR_init()
- X{
- Xchar res[300];
- Xint winnbr;
- Xint w, h, bor;
- X
- X m_setup( 0);
- X m_ttyset();
- X
- X m_getinfo( G_SYSTEM);
- X if( m_gets( res) && sscanf( res, "%*s%d%d%d", &w, &h, &bor) == 3)
- X MGR_border = bor;
- X
- X m_newwin( 0, 0, MGR_winwidth+2*MGR_border, MGR_winheight+2*MGR_border);
- X if( m_gets( res) && sscanf( res, "%d", &winnbr) == 1)
- X MGR_winnbr = winnbr;
- X /* if no alt window is created, then the main window is used */
- X /* and if size is different, term_tbl updated later */
- X m_selectwin( MGR_winnbr);
- X m_setmode( M_ABS);
- X
- X m_getinfo( G_FONT);
- X if( m_gets( res) && sscanf( res, "%d %d", &w, &h) == 2) {
- X MGR_vchar = h;
- X MGR_hchar = w;
- X }
- X m_ttyreset();
- X
- X term_tbl[term].v_char = MGR_vchar;
- X term_tbl[term].h_char = MGR_hchar;
- X term_tbl[term].v_tic = MGR_vchar / 4;
- X term_tbl[term].h_tic = MGR_hchar / 2;
- X
- X m_selectwin( 0);
- X m_flush();
- X}
- X
- X
- XMGR_graphics()
- X{
- Xchar res[32];
- Xint c, r, w, h;
- X
- X m_selectwin( MGR_winnbr);
- X m_setmode( M_ACTIVATE);
- X m_clear();
- X
- X /* we permit the user to reshape the window arbitrarily.
- X do_plot calls boundary to recheck the term_tbl for each plot */
- X m_ttyset();
- X m_getinfo( G_WINSIZE);
- X if( m_gets( res) && sscanf( res, "%d %d", &c, &r) == 2)
- X MGR_rowcount = r;
- X m_getinfo( G_COORDS);
- X if( m_gets( res) && sscanf( res, "%d %d %d %d", &c, &r, &w, &h) == 4) {
- X term_tbl[term].xmax = MGR_winwidth = w;
- X term_tbl[term].ymax = MGR_winheight = h;
- X }
- X m_ttyreset();
- X m_flush();
- X}
- X
- X
- XMGR_text()
- X{
- X m_go( 0, 0);
- X m_aligntext();
- X if( MGR_winnbr == 0)
- X m_move( 0, MGR_rowcount - 1);
- X m_selectwin( 0);
- X m_flush();
- X}
- X
- X
- XMGR_linetype( linetype)
- Xint linetype;
- X{
- X/*
- X * this mapping of colors is intended for a color sun on which
- X * colors 0-23 are defined, 0 is white, 1 is black.
- X */
- X m_linecolor( B_SRC, (linetype < 0)? 1: (2 + (linetype % 22)));
- X}
- X
- X
- XMGR_move( x, y)
- Xint x, y;
- X{
- X m_go( x, MGR_winheight - 1 - y);
- X}
- X
- X
- XMGR_vector( x, y)
- Xint x, y;
- X{
- X m_draw( x, MGR_winheight - 1 - y);
- X}
- X
- X
- XMGR_put_text( x, y, str)
- Xint x, y;
- Xchar *str;
- X{
- X MGR_move( x, y - MGR_vchar/2);
- X m_aligntext();
- X m_printstr( str);
- X}
- X
- X
- XMGR_reset()
- X{
- X m_destroywin( MGR_winnbr);
- X MGR_winnbr = 0;
- X m_setmode( M_ACTIVATE);
- X m_flush();
- X}
- END_OF_FILE
- if test 2724 -ne `wc -c <'gnuplot/term/mgr.trm'`; then
- echo shar: \"'gnuplot/term/mgr.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/mgr.trm'
- fi
- if test -f 'gnuplot/term/v384.trm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/term/v384.trm'\"
- else
- echo shar: Extracting \"'gnuplot/term/v384.trm'\" \(2651 characters\)
- sed "s/^X//" >'gnuplot/term/v384.trm' <<'END_OF_FILE'
- X/*
- X * $Id: v384.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
- X *
- X */
- X
- X/* GNUPLOT - v384.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 * Vectrix 384 - works with tandy color printer as well
- X *
- X * AUTHORS
- X * roland@moncskermit.OZ (Roland Yap)
- X *
- X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
- X *
- X */
- X
- X/*
- X * Vectrix 384 driver - works with tandy color printer as well
- X * in reverse printing 8 color mode.
- X * This doesn't work on Vectrix 128 because it redefines the
- X * color table. It can be hacked to work on the 128 by changing
- X * the colours but then it will probably not print best. The color
- X * table is purposely designed so that it will print well
- X *
- X */
- X
- X#define V384_XMAX 630
- X#define V384_YMAX 480
- X
- X#define V384_XLAST (V384_XMAX - 1)
- X#define V384_YLAST (V384_YMAX - 1)
- X
- X#define V384_VCHAR 12
- X#define V384_HCHAR 7
- X#define V384_VTIC 8
- X#define V384_HTIC 7
- X
- X
- XV384_init()
- X{
- X fprintf(outfile,"%c%c G0 \n",27,18);
- X fprintf(outfile,"Q 0 8\n");
- X fprintf(outfile,"0 0 0\n");
- X fprintf(outfile,"255 0 0\n");
- X fprintf(outfile,"0 255 0\n");
- X fprintf(outfile,"0 0 255\n");
- X fprintf(outfile,"0 255 255\n");
- X fprintf(outfile,"255 0 255\n");
- X fprintf(outfile,"255 255 0\n");
- X fprintf(outfile,"255 255 255\n");
- X}
- X
- X
- XV384_graphics()
- X{
- X fprintf(outfile,"%c%c E0 RE N 65535\n",27,18);
- X}
- X
- X
- XV384_text()
- X{
- X fprintf(outfile,"%c%c\n",27,17);
- X}
- X
- X
- XV384_linetype(linetype)
- Xint linetype;
- X{
- Xstatic int color[]= {
- X 1 /* red */,
- X 2 /* green */,
- X 3 /* blue */,
- X 4 /* cyan */,
- X 5 /* magenta */,
- X 6 /* yellow */, /* not a good color so not in use at the moment */
- X 7 /* white */
- X };
- X
- X if (linetype < 0)
- X linetype=6;
- X else
- X linetype %= 5;
- X fprintf(outfile,"C %d\n",color[linetype]);
- X}
- X
- X
- XV384_move(x,y)
- Xunsigned int x,y;
- X{
- X fprintf(outfile,"M %d %d\n",x+20,y);
- X}
- X
- X
- XV384_vector(x,y)
- Xunsigned int x,y;
- X{
- X fprintf(outfile,"L %d %d\n",x+20,y);
- X}
- X
- X
- XV384_put_text (x, y, str)
- Xunsigned int x, y;
- Xchar str[];
- X{
- X V384_move (x, y + V384_VCHAR/2);
- X fprintf (outfile, "$%s\n", str);
- X}
- X
- X
- XV384_reset()
- X{
- X}
- X
- END_OF_FILE
- if test 2651 -ne `wc -c <'gnuplot/term/v384.trm'`; then
- echo shar: \"'gnuplot/term/v384.trm'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/term/v384.trm'
- fi
- if test -f 'gnuplot/win/geticon.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/win/geticon.c'\"
- else
- echo shar: Extracting \"'gnuplot/win/geticon.c'\" \(2306 characters\)
- sed "s/^X//" >'gnuplot/win/geticon.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *RCSid = "$Id: geticon.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
- X#endif
- X
- X/* geticon.c */
- X/* extract Borland ascii format icons from resource script */
- X/* and write as Microsoft binary format .ICO files */
- X/* Russell Lang 1992-12-20 */
- X
- X#include <stdio.h>
- X#include <stdlib.h>
- X#include <string.h>
- X#include <ctype.h>
- X
- X#define MAXLINE 255
- XFILE *rcfile;
- Xchar inline[MAXLINE+1];
- Xchar *tok1, *tok2, *tok3;
- Xchar *p;
- Xchar iconname[MAXLINE+1];
- XFILE *iconfile;
- Xint line;
- X
- Xint htoi(char ch)
- X{
- X ch = toupper(ch);
- X if (ch < '0')
- X return(0);
- X else if (ch <= '9')
- X return((int)(ch - '0'));
- X else if (ch < 'A')
- X return(0);
- X else if (ch <= 'F')
- X return((int)(ch - 'A' + 10));
- X return(0);
- X}
- X
- Xvoid
- Xgeticon(void)
- X{
- Xchar ch;
- X fgets(inline,MAXLINE,rcfile);
- X line++;
- X if (strncmp(inline,"BEGIN",5)) {
- X fprintf(stderr,"Expecting BEGIN at line %d\n",line);
- X exit(3);
- X }
- X if ( (iconfile = fopen(iconname,"wb")) == (FILE *)NULL) {
- X fprintf(stderr,"Can't open ICON file %s\n",iconname);
- X exit(4);
- X }
- X fgets(inline,MAXLINE,rcfile);
- X line++;
- X while (strncmp(inline,"END",3) && !feof(rcfile)) {
- X for (p = inline; *p && (*p==' ' || *p == '\t' || *p=='\''); p++);
- X while (isxdigit(*p)) {
- X ch = htoi(*p++)<<4;
- X ch += htoi(*p++);
- X fputc(ch, iconfile);
- X p++;
- X }
- X fgets(inline,MAXLINE,rcfile);
- X line++;
- X }
- X fclose(iconfile);
- X}
- X
- Xint
- Xmain(int argc, char *argv[])
- X{
- X if ((argc < 2) || (argc > 3)) {
- X fprintf(stderr,"Usage: geticon resource_file [icon_directory]\n");
- X return(1);
- X }
- X if ( (rcfile = fopen(argv[1],"r")) == (FILE *)NULL) {
- X fprintf(stderr,"Can't open RC file\n");
- X return(2);
- X }
- X line = 0;
- X while (fgets(inline,MAXLINE,rcfile)) {
- X line++;
- X tok1 = strtok(inline," \t\r\n");
- X tok2 = strtok(NULL," \t\r\n");
- X tok3 = strtok(NULL," \t\r\n");
- X if (tok2 && !strcmp(tok2,"ICON") && (tok3 == (char *)NULL)) {
- X iconname[0] = '\0';
- X if (argc == 3) {
- X strcpy(iconname,argv[2]);
- X strcat(iconname,"\\");
- X }
- X strcat(iconname,tok1);
- X strcat(iconname,".ico");
- X fprintf(stdout,"%s\n",iconname);
- X geticon();
- X }
- X }
- X return (0);
- X}
- END_OF_FILE
- if test 2306 -ne `wc -c <'gnuplot/win/geticon.c'`; then
- echo shar: \"'gnuplot/win/geticon.c'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/win/geticon.c'
- fi
- if test -f 'gnuplot/win/wgnuplib.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/win/wgnuplib.c'\"
- else
- echo shar: Extracting \"'gnuplot/win/wgnuplib.c'\" \(2927 characters\)
- sed "s/^X//" >'gnuplot/win/wgnuplib.c' <<'END_OF_FILE'
- X#ifndef lint
- Xstatic char *RCSid = "$Id: wgnuplib.c%v 3.50 1993/07/09 05:35:24 woo Exp $";
- X#endif
- X
- X/* GNUPLOT - win/wgnuplib.c */
- X/*
- X * Copyright (C) 1992 Russell Lang
- 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 *
- X * AUTHORS
- X *
- X * Russell Lang
- X *
- X * Send your comments or suggestions to
- X * info-gnuplot@dartmouth.edu.
- X * This is a mailing list; to join it send a note to
- X * info-gnuplot-request@dartmouth.edu.
- X * Send bug reports to
- X * bug-gnuplot@dartmouth.edu.
- X */
- X
- X#define STRICT
- X#include <windows.h>
- X#include <windowsx.h>
- X#include <ctype.h>
- X#include "wgnuplib.h"
- X#include "wresourc.h"
- X#include "wcommon.h"
- X
- XHINSTANCE hdllInstance;
- XLPSTR szParentClass = "wgnuplot_parent";
- XLPSTR szTextClass = "wgnuplot_text";
- XLPSTR szPauseClass = "wgnuplot_pause";
- XLPSTR szGraphClass = "wgnuplot_graph";
- X
- X/* Window ID */
- Xstruct WID {
- X BOOL used;
- X HWND hwnd;
- X void FAR * ptr;
- X};
- Xstruct WID *widptr = NULL;
- Xunsigned int nwid = 0;
- XHLOCAL hwid = 0;
- X
- X#ifdef __DLL__
- Xint WDPROC
- XLibMain(HINSTANCE hInstance, WORD wDataSeg, WORD wHeapSize, LPSTR lpszCmdLine)
- X{
- X hdllInstance = hInstance;
- X return 1;
- X}
- X
- Xint WDPROC
- XWEP(int nParam)
- X{
- X return 1;
- X}
- X
- XBOOL WDPROC
- XCheckWGNUPLOTVersion(LPSTR str)
- X{
- Xchar mess[256];
- XLPSTR version;
- X version = WGNUPLOTVERSION;
- X if (lstrcmp(str,version)) {
- X wsprintf(mess,"Incorrect DLL version\nExpected version %s\nThis is version %s",str,version);
- X MessageBox(NULL, mess , "WGNUPLOT.DLL", MB_OK | MB_ICONSTOP | MB_TASKMODAL);
- X return TRUE;
- X }
- X return FALSE; /* Correct version */
- X}
- X#endif /* __DLL__ */
- X
- Xvoid NEAR *
- XLocalAllocPtr(UINT flags, UINT size)
- X{
- XHLOCAL hlocal;
- X hlocal = LocalAlloc(flags, size+1);
- X return (char *)LocalLock(hlocal);
- X}
- X
- Xvoid
- XLocalFreePtr(void NEAR *ptr)
- X{
- XHLOCAL hlocal;
- X hlocal = LocalHandle(ptr);
- X LocalUnlock(hlocal);
- X LocalFree(hlocal);
- X return;
- X}
- X
- X
- X/* ascii to int */
- X/* returns:
- X * A pointer to character past int if successful,
- X * otherwise NULL on failure.
- X * convert int is stored at pval.
- X */
- XLPSTR
- XGetInt(LPSTR str, LPINT pval)
- X{
- Xint val = 0;
- XBOOL negative = FALSE;
- XBOOL success = FALSE;
- Xint ch;
- X if (!str)
- X return NULL;
- X while ( (ch = *str)!=0 && isspace(ch) )
- X str++;
- X if (ch == '-') {
- X negative = TRUE;
- X str++;
- X }
- X while ( (ch = *str)!=0 && isdigit(ch) ) {
- X success = TRUE;
- X val = val * 10 + (ch - '0');
- X str++;
- X }
- X if (success) {
- X if (negative)
- X val = -val;
- X *pval = val;
- X return str;
- X }
- X return NULL;
- X}
- X
- END_OF_FILE
- if test 2927 -ne `wc -c <'gnuplot/win/wgnuplib.c'`; then
- echo shar: \"'gnuplot/win/wgnuplib.c'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/win/wgnuplib.c'
- fi
- if test -f 'gnuplot/win/wtext.h' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'gnuplot/win/wtext.h'\"
- else
- echo shar: Extracting \"'gnuplot/win/wtext.h'\" \(2831 characters\)
- sed "s/^X//" >'gnuplot/win/wtext.h' <<'END_OF_FILE'
- X/*
- X * $Id: wtext.h%v 3.50 1993/07/09 05:35:24 woo Exp $
- X */
- X
- X/* GNUPLOT - win/wtext.h */
- X/*
- X * Copyright (C) 1992 Russell Lang
- 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 *
- X * AUTHORS
- X *
- X * Russell Lang
- X *
- X * Send your comments or suggestions to
- X * info-gnuplot@dartmouth.edu.
- X * This is a mailing list; to join it send a note to
- X * info-gnuplot-request@dartmouth.edu.
- X * Send bug reports to
- X * bug-gnuplot@dartmouth.edu.
- X */
- X
- X/* redefine functions that can talk to tty devices, to use
- X * implementation in winmain.c/wgnuplot.dll */
- X
- X#define kbhit() MyKBHit()
- X#define getche() MyGetChE()
- X#define getch() MyGetCh()
- X#define putch(ch) MyPutCh(ch)
- X
- X#define fgetc(file) MyFGetC(file)
- X#undef getchar
- X#define getchar() MyFGetC(stdin)
- X#undef getc
- X#define getc(file) MyFGetC(file)
- X#define fgets(str,sz,file) MyFGetS(str,sz,file)
- X#define gets(str) MyGetS(str)
- X
- X#define fputc(ch,file) MyFPutC(ch,file)
- X#undef putchar
- X#define putchar(ch) MyFPutC(ch,stdout)
- X#undef putc
- X#define putc(ch,file) MyFPutC(ch,file)
- X#define fputs(str,file) MyFPutS(str,file)
- X#define puts(str) MyPutS(str)
- X
- X#define fprintf MyFPrintF
- X#define printf MyPrintF
- X
- X#define fwrite(ptr, size, n, stream) MyFWrite(ptr, size, n, stream)
- X#define fread(ptr, size, n, stream) MyFRead(ptr, size, n, stream)
- X
- X/* now cause errors for some unimplemented functions */
- X
- X#define vprintf dontuse_vprintf
- X#define vfprintf dontuse_vfprintf
- X#define fscanf dontuse_fscanf
- X#define scanf dontuse_scanf
- X#define clreol dontuse_clreol
- X#define clrscr dontuse_clrscr
- X#define gotoxy dontuse_gotoxy
- X#define wherex dontuse_wherex
- X#define wherey dontuse_wherey
- X#define cgets dontuse_cgets
- X#define cprintf dontuse_cprintf
- X#define cputs dontuse_cputs
- X#define cscanf dontuse_cscanf
- X#define ungetch dontuse_ungetch
- X
- X/* now for the prototypes */
- X
- Xint MyPutCh(int ch);
- Xint MyKBHit(void);
- Xint MyGetCh(void);
- Xint MyGetChE(void);
- Xint MyFGetC(FILE *file);
- Xchar * MyGetS(char *str);
- Xchar * MyFGetS(char *str, unsigned int size, FILE *file);
- Xint MyFPutC(int ch, FILE *file);
- Xint MyFPutS(char *str, FILE *file);
- Xint MyPutS(char *str);
- Xint MyFPrintF(FILE *file, char *fmt, ...);
- Xint MyPrintF(char *fmt, ...);
- Xsize_t MyFWrite(const void *ptr, size_t size, size_t n, FILE *stream);
- Xsize_t MyFRead(void *ptr, size_t size, size_t n, FILE *stream);
- X
- END_OF_FILE
- if test 2831 -ne `wc -c <'gnuplot/win/wtext.h'`; then
- echo shar: \"'gnuplot/win/wtext.h'\" unpacked with wrong size!
- fi
- # end of 'gnuplot/win/wtext.h'
- fi
- echo shar: End of archive 31 \(of 33\).
- cp /dev/null ark31isdone
- 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...
-