home *** CD-ROM | disk | FTP | other *** search
- From: hot@integow.uucp (Roland van Hout)
- Newsgroups: alt.sources
- Subject: PD plot(4) librarys (and hercules driver for interactive 386) part 5 of 9
- Message-ID: <1394@integow.uucp>
- Date: 28 Oct 90 03:57:12 GMT
-
-
-
- #!/bin/sh
- # This is part 05 of a multipart archive
- if touch 2>&1 | fgrep '[-amc]' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= libplot/lp/move.c ==============
- echo "x - extracting libplot/lp/move.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/move.c &&
- X/*
- X * do_px.c
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X */
- X
- X#include <stdio.h>
- X#include "plotlp.h"
- X#ifdef TESTVER
- X#include "dbgvars.h"
- X#endif
- X
- Xmove(x,y)
- Xint x,y;
- X{
- X int xo,yo;
- X float x_coor,
- X y_coor;
- X POINT icoor,
- X t;
- X pen_up = TRUE;
- X plot_abs = TRUE;
- X x_coor=x*gxscrunch;y_coor=y*gyscrunch;
- X x_coor += offx; y_coor += offy;
- X if (scaling) {
- X icoor.x = (int) (x_coor * x_scaler);
- X icoor.y = (int) (y_coor * y_scaler);
- X if (icoor.x < 0)
- X icoor.x -= 1;
- X if (icoor.y < 0)
- X icoor.y -= 1;
- X } else {
- X icoor.x = (int) x_coor;
- X icoor.y = (int) y_coor;
- X }
- X
- X current = icoor;
- X
- X if (symbol_mode) put_symbol(current);
- X
- X}
- X
- Xcont(x,y)
- Xint x,y;
- X{
- X int xo,yo;
- X float x_coor,
- X y_coor;
- X POINT icoor,
- X t;
- X x_coor=x*gxscrunch;y_coor=y*gyscrunch;
- X plot_abs = TRUE;
- X pen_up = FALSE;
- X x_coor += offx; y_coor += offy;
- X
- X if (scaling) {
- X icoor.x = (int) (x_coor * x_scaler);
- X icoor.y = (int) (y_coor * y_scaler);
- X if (icoor.x < 0)
- X icoor.x -= 1;
- X if (icoor.y < 0)
- X icoor.y -= 1;
- X } else {
- X icoor.x = (int) x_coor;
- X icoor.y = (int) y_coor;
- X }
- X
- X put_seg(current, icoor);
- X
- X if (plot_abs) current = icoor;
- X
- X if (symbol_mode) put_symbol(current);
- X
- X}
- X
- X/*
- Xdo_Px(selector)
- X int selector;
- X{
- X float x_coor,
- X y_coor;
- X POINT icoor,
- X t;
- X
- X#ifdef TESTVER
- X int xwas_on; /* for debugging
- X
- X /* turn debug2x off, if necessary, for the duration of do_Px()
- X if (debug2x) {
- X xwas_on = TRUE;
- X debug2x = FALSE;
- X } else {
- X xwas_on = FALSE;
- X }
- X#endif
- X
- X/* plot_abs = TRUE; /* [hot@mh.nl]
- X
- X switch (selector) {
- X case PA:
- X plot_abs = TRUE;
- X break;
- X case PR:
- X plot_abs = FALSE;
- X break;
- X case PU:
- X pen_up = TRUE;
- X break;
- X case PD:
- X pen_up = FALSE;
- X break;
- X default:
- X fprintf(stderr, "Bad selector for Px %d\n", selector);
- X exit(4);
- X }
- X
- X if ((c = getchar()) == ';') {
- X#ifdef TESTVER /* reset debug2x if necessary
- X if (xwas_on) {
- X debug2x = TRUE;
- X }
- X#endif
- X return;
- X } else {
- X ungetc(c, stdin);
- X }
- X#ifdef TESTVER
- X fprintf(errfp,"do_Px(coordinates):%f,%f\n", x_coor, y_coor);
- X fflush(errfp);
- X#endif
- X
- X for (;;) {
- X if (scanf("%f,%f", &x_coor, &y_coor) != 2) {
- X fprintf(stderr, "Odd number of coordinate\n");
- X exit(4);
- X }
- X if (scaling) {
- X icoor.x = (int) (x_coor * x_scaler);
- X icoor.y = (int) (y_coor * y_scaler);
- X if (icoor.x < 0)
- X icoor.x -= 1;
- X if (icoor.y < 0)
- X icoor.y -= 1;
- X } else {
- X icoor.x = (int) x_coor;
- X icoor.y = (int) y_coor;
- X }
- X
- X if (!pen_up) {
- X if (plot_abs) {
- X put_seg(current, icoor);
- X } else {
- X t.x = current.x + icoor.x;
- X t.y = current.y + icoor.y;
- X put_seg(current, t);
- X*/
- SHAR_EOF
- $TOUCH -am 1011090488 libplot/lp/move.c &&
- chmod 0644 libplot/lp/move.c ||
- echo "restore of libplot/lp/move.c failed"
- set `wc -c libplot/lp/move.c`;Wc_c=$1
- if test "$Wc_c" != "2718"; then
- echo original size 2718, current size $Wc_c
- fi
- # ============= libplot/lp/openpl.c ==============
- echo "x - extracting libplot/lp/openpl.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/openpl.c &&
- X/*
- X * do_df.c
- X *
- X * copyright (c) 1988 environmental defense fund, inc.
- X */
- X
- X#include <stdio.h>
- X#include "plotlp.h"
- X
- X/* global variables */
- Xshort int
- X plot_abs,
- X line_type,
- X symbol_mode,
- X stand_char_set,
- X alt_char_set,
- X stand_set_sel,
- X set_standard[NUM_CHAR][CHAR_ELEM],
- X set_alternate[NUM_CHAR][CHAR_ELEM],
- X char_slant,
- X scaling,
- X label_terminator,
- X chord_angle,
- X fill_type,
- X fill_spacing,
- X fill_angle,
- X pen_up;
- Xint printer; /* printer model */
- Xchar symbol_char;
- Xshort int first_fill;
- XPOINT current;
- XPOINT P1,
- X P2;
- XPOINT LL,
- X UR;
- Xfloat x_scaler,
- X y_scaler;
- Xfloat line_pattern_length;
- Xfloat char_width,
- X char_height;
- Xfloat pen_thickness;
- Xchar c;
- X
- Xopenpl()
- X{
- X FILE *charset;
- X int i,
- X j;
- X
- X to_printer = TRUE;
- X if (printer == 0 || printer == EPSON) printer = EPSON;
- X else if (printer == 0 || printer == IBM_PRO) printer = IBM_PRO;
- X else if (printer == 0 || printer == LASERLOW) printer = LASERLOW;
- X else if (printer == 0 || printer == LASERMED) printer = LASERMED;
- X else if (printer == 0 || printer == LASERHIGH) printer = LASERHIGH;
- X
- X
- X plot_abs = TRUE;
- X line_type = SOLID;
- X scaling = FALSE;
- X label_terminator = 3;
- X chord_angle = 5;
- X symbol_mode = FALSE;
- X stand_char_set = 0;
- X alt_char_set = 0;
- X stand_set_sel = TRUE;
- X if ((charset = fopen(CHARSET, "r")) == NULL) {
- X perror(CHARSET);
- X exit(2);
- X }
- X for (i = 0; i < NUM_CHAR; i++) {
- X for (j = 0; j < CHAR_ELEM; j++) {
- X fscanf(charset, "%hd,", &set_standard[i][j]);
- X set_alternate[i][j] = set_standard[i][j];
- X }
- X fscanf(charset, " /* %c */\n", &c);
- X }
- X
- X if (fclose(charset) < 0) {
- X perror(CHARSET);
- X exit(1);
- X }
- X char_width = 0.187;
- X char_height = 0.269;
- X char_slant = 0;
- X fill_type = 1;
- X fill_spacing = 10;
- X fill_angle = 0;
- X pen_thickness = 0.3; /* In millimeters */
- X pen_up = TRUE;
- X LL.y = LL.x = 0;
- X UR.x = 10365;
- X UR.y = 7962;
- X init_map();
- X}
- X
- SHAR_EOF
- $TOUCH -am 0213135389 libplot/lp/openpl.c &&
- chmod 0644 libplot/lp/openpl.c ||
- echo "restore of libplot/lp/openpl.c failed"
- set `wc -c libplot/lp/openpl.c`;Wc_c=$1
- if test "$Wc_c" != "2082"; then
- echo original size 2082, current size $Wc_c
- fi
- # ============= libplot/lp/plot_cha.c ==============
- echo "x - extracting libplot/lp/plot_cha.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plot_cha.c &&
- X/*
- X * plot_cha.c
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X */
- X
- X#include <stdio.h>
- X#include "const.h"
- X#include "vars.h"
- X
- X#ifdef TESTVER
- X#include "dbgvars.h"
- X#include <ctype.h> /* for isprint() -- test version */
- X#endif
- X
- X/* 1020.4081 plotter units/in * .25 char/grid * .3937 in/cm */
- X#define SCALE_W 100.43366
- X
- X/* 1020.4081 plotter units/in * .0625 char/grid * .3937 in/cm */
- X#define SCALE_H 50.2116832
- X
- Xfloat scale_w,
- X scale_h;
- X
- XPOINT
- Xplot_char(left_corner, charac, set)
- X POINT left_corner;
- X char charac;
- X short int set[NUM_CHAR][CHAR_ELEM];
- X{
- X int i;
- X short int it;
- X int index;
- X POINT here,
- X there;
- X float offset;
- X
- X#ifdef TESTVER
- X int was_on;
- X
- X /* turn debug2 off, if necessary, for the duration of plot_char() */
- X if (debug2) {
- X was_on = TRUE;
- X debug2 = FALSE;
- X } else {
- X was_on = FALSE;
- X }
- X
- X if (debug6) {
- X if (isprint(charac)) {
- X fprintf(errfp, "plot_char: %c\n", charac);
- X } else {
- X fprintf(errfp, "plot_char unprintable: %d\n", charac);
- X }
- X }
- X#endif
- X
- X i = 0;
- X here = left_corner;
- X pen_up = TRUE;
- X scale_w = char_width * SCALE_W;
- X scale_h = char_height * SCALE_H;
- X if (charac < '!') {
- X if (charac != ' ') {
- X fprintf(stderr, "Non printing char %x\n", charac);
- X }
- X here.x = left_corner.x + (int) (6 * scale_w + 0.5);
- X#ifdef TESTVER
- X /* turn debug2 back on if necessary */
- X if (was_on) {
- X debug2 = TRUE;
- X }
- X#endif
- X return (here);
- X } else
- X index = charac - '!';
- X while ((it = set[index][i++]) != -200) {
- X if (it > 99 || it < -99) {
- X if (it > 0)
- X pen_up = FALSE;
- X else
- X pen_up = TRUE;
- X } else {
- X offset = it * scale_w;
- X if (offset < 0.0)
- X offset -= 0.5;
- X else
- X offset += 0.5;
- X there.x = here.x + (int) offset;
- X offset = set[index][i++] * scale_h;
- X if (offset < 0.0)
- X offset -= 0.5;
- X else
- X offset += 0.5;
- X there.y = here.y + (int) offset;
- X if (!pen_up) {
- X put_seg(here, there);
- X }
- X here = there;
- X }
- X }
- X
- X#ifdef TESTVER
- X /* turn debug2 back on if necessary */
- X if (was_on) {
- X debug2 = TRUE;
- X }
- X#endif
- X there.x = left_corner.x + (int) (6 * scale_w + 0.5);
- X there.y = left_corner.y;
- X return (there);
- X}
- X
- X
- Xput_symbol(center)
- X POINT center;
- X{
- X POINT ll;
- X float horz_offset = 2.0;
- X float vert_offset;
- X
- X switch (symbol_char) {
- X case 'o':
- X case 'x':
- X vert_offset = 2.5;
- X break;
- X case '.':
- X vert_offset = 0.5;
- X horz_offset = 1.5;
- X break;
- X default:
- X vert_offset = 4.0;
- X break;
- X }
- X ll.x = center.x - char_width * horz_offset * SCALE_W;
- X ll.y = center.y - char_height * vert_offset * SCALE_H;
- X if (stand_set_sel) {
- X ll = plot_char(ll, symbol_char, set_standard);
- X } else {
- X ll = plot_char(ll, symbol_char, set_alternate);
- X }
- X}
- SHAR_EOF
- $TOUCH -am 1007125888 libplot/lp/plot_cha.c &&
- chmod 0644 libplot/lp/plot_cha.c ||
- echo "restore of libplot/lp/plot_cha.c failed"
- set `wc -c libplot/lp/plot_cha.c`;Wc_c=$1
- if test "$Wc_c" != "2788"; then
- echo original size 2788, current size $Wc_c
- fi
- # ============= libplot/lp/plotlp.h ==============
- echo "x - extracting libplot/lp/plotlp.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plotlp.h &&
- X/*
- X include file to use the epson,ibm-proprinter and the laserjet
- X with the plot(4) graphic library
- X the switch is done via a variable printer this one must be defined
- X in your main program
- X these variables must be defined in the main-part of your programm
- X extern int no_fill;
- X int to_printer; EPSON || IBM_PRO || LASERLOW || LASERMED || LASERHIGH
- X
- X*/
- X extern int to_printer;
- X/*
- X * const.h
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X */
- X
- Xtypedef struct {
- X int x,
- X y;
- X} POINT;
- X
- X#define ESC 27
- X
- X#define TRUE 1
- X#define FALSE 0
- X
- X/* LINE TYPES */
- X#define DOTS 0
- X#define SHORT_DASH 1
- X#define BROKN_1 2
- X#define BROKN_2 3
- X#define BROKN_DOT 4
- X#define BROKN_DASH 5
- X#define BROKN_2DASH 6
- X#define SOLID 7
- X
- X/* FILL TYPES: values assigned to var fill_type */
- X#define BI_SOLID 1
- X#define UNI_SOLID 2
- X#define PARALLEL 3
- X#define CROSS_HATCH 4
- X
- X/* Charater set defines */
- X#define CHAR_ELEM 28
- X#define NUM_CHAR 94
- X
- X/* Printer model: values of global var 'printer' */
- X#define EPSON 1 /* Epson LQ 1500 */
- X#define LASERLOW 2 /* HP LaserJet Plus low sized 5" x 6" */
- X#define IBM_PRO 3 /* IBM Proprinter */
- X#define LASERMED 4 /* HP LaserJet Plus med sized 8" x 6" */
- X#define LASERHIGH 5 /* HP LaserJet Plus extra large 8" x 11"*/
- X
- X#define BITMAPSIZE 935000
- X/*
- X * vars.h
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X *
- X * global variables
- X */
- X
- Xextern short int
- X plot_abs,
- X line_type,
- X symbol_mode,
- X stand_char_set,
- X alt_char_set,
- X stand_set_sel,
- X set_standard[][CHAR_ELEM],
- X set_alternate[][CHAR_ELEM],
- X char_slant,
- X scaling,
- X label_terminator,
- X chord_angle,
- X fill_type,
- X fill_spacing,
- X fill_angle,
- X pen_up;
- Xextern int printer; /* printer model: EPSON or LASER */
- Xextern char symbol_char;
- Xextern short int first_fill;
- Xextern POINT current;
- Xextern POINT P1,
- X P2;
- Xextern POINT LL,
- X UR;
- Xextern float x_scaler,
- X y_scaler;
- Xextern float gxscrunch,gyscrunch;
- Xextern float char_width,
- X char_height;
- Xextern float line_pattern_length;
- Xextern float pen_thickness;
- Xextern char c;
- Xextern int offx,offy;
- SHAR_EOF
- $TOUCH -am 0213125889 libplot/lp/plotlp.h &&
- chmod 0644 libplot/lp/plotlp.h ||
- echo "restore of libplot/lp/plotlp.h failed"
- set `wc -c libplot/lp/plotlp.h`;Wc_c=$1
- if test "$Wc_c" != "2173"; then
- echo original size 2173, current size $Wc_c
- fi
- # ============= libplot/lp/plotlpus.h ==============
- echo "x - extracting libplot/lp/plotlpus.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plotlpus.h &&
- X/*
- X include file to use the epson,ibm-proprinter and the laserjet
- X with the plot(4) graphic library
- X the switch is done via a variable printer this one must be defined
- X in your main program
- X these variables must be defined in the main-part of your programm
- X extern int no_fill;
- X int to_printer; EPSON || IBM_PRO || LASERLOW || LASERMED || LASERHIGH
- X
- X*/
- X/*
- X * const.h
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X */
- X
- X#define TRUE 1
- X#define FALSE 0
- X
- X/* Printer model: values of global var 'printer' */
- X#define EPSON 1 /* Epson LQ 1500 */
- X#define LASERLOW 2 /* HP LaserJet Plus low sized 5" x 6" */
- X#define IBM_PRO 3 /* IBM Proprinter */
- X#define LASERMED 4 /* HP LaserJet Plus med sized 8" x 6" */
- X#define LASERHIGH 5 /* HP LaserJet Plus extra large 8" x 11"*/
- X
- X int offx,offy;
- X int to_printer=TRUE;
- X int printer=LASERLOW;
- X float gxscrunch,gyscrunch;
- X
- X
- SHAR_EOF
- $TOUCH -am 1010213588 libplot/lp/plotlpus.h &&
- chmod 0644 libplot/lp/plotlpus.h ||
- echo "restore of libplot/lp/plotlpus.h failed"
- set `wc -c libplot/lp/plotlpus.h`;Wc_c=$1
- if test "$Wc_c" != "885"; then
- echo original size 885, current size $Wc_c
- fi
- # ============= libplot/lp/set_dbgs.c ==============
- echo "x - extracting libplot/lp/set_dbgs.c (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/set_dbgs.c &&
- X/*
- X * set_dbgs.c
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X */
- X
- X#include <stdio.h>
- X
- XFILE *errfp;
- Xint debug1c,
- X debug1f,
- X debug2,
- X debug2x,
- X debug3,
- X debug4,
- X debug5,
- X debug6,
- X debug7,
- X debug8,
- X debug9;
- X
- Xset_debugs()
- X{
- X#if 0
- X errfp = fopen(TTY, "w");
- X#else
- X errfp = fopen("plot.err", "w");
- X#endif
- X
- X fprintf(errfp, "- - - plot.err: plot program error file - - -\n\n");
- X
- X /* to console: transfer control to fns */
- X debug1c = 1;
- X
- X /* to plot.err: transfer control to fns */
- X debug1f = 1;
- X
- X /*
- X * to plot.err: scaled endpts of segment in put_seg() does NOT include
- X * endpoints plotted during fill routines
- X */
- X debug2 = 1;
- X
- X /*
- X * to plot.err: scaled endpts of segment in put_seg(), EXTENSION --
- X * endpoints plotted during fill routines
- X */
- X debug2x = 1;
- X
- X /* to plot.err: the points sent to hatch() by do_WG, do_Rx */
- X debug3 = 0;
- X
- X /* to plot.err: info from fill routines */
- X debug4 = 0;
- X
- X /* to plot.err: bytes sent to printer from dump_map() */
- X debug5 = 0;
- X
- X /* to plot.err: character being processed by plot_char() */
- X debug6 = 0;
- X
- X /* to plot.err: detailed info from get_chgs() */
- X debug7 = 0;
- X
- X /* to plot.err: NOT USED */
- X debug8 = 0;
- X
- X /* to plot.err: info from fix_fill */
- X debug9 = 0;
- X}
- SHAR_EOF
- $TOUCH -am 1007125888 libplot/lp/set_dbgs.c &&
- chmod 0644 libplot/lp/set_dbgs.c ||
- echo "restore of libplot/lp/set_dbgs.c failed"
- set `wc -c libplot/lp/set_dbgs.c`;Wc_c=$1
- if test "$Wc_c" != "1389"; then
- echo original size 1389, current size $Wc_c
- fi
- # ============= libplot/lp/vars.h ==============
- echo "x - extracting libplot/lp/vars.h (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/vars.h &&
- X/*
- X * vars.h
- X *
- X * Copyright (c) 1988 Environmental Defense Fund, Inc.
- X *
- X * global variables
- X */
- X
- Xextern short int
- X plot_abs,
- X line_type,
- X symbol_mode,
- X stand_char_set,
- X alt_char_set,
- X stand_set_sel,
- X set_standard[][CHAR_ELEM],
- X set_alternate[][CHAR_ELEM],
- X char_slant,
- X scaling,
- X label_terminator,
- X chord_angle,
- X fill_type,
- X fill_spacing,
- X fill_angle,
- X pen_up;
- Xextern int printer; /* printer model: EPSON or LASER */
- Xextern char symbol_char;
- Xextern short int first_fill;
- Xextern POINT current;
- Xextern POINT P1,
- X P2;
- Xextern POINT LL,
- X UR;
- Xextern float x_scaler,
- X y_scaler;
- Xextern float char_width,
- X char_height;
- Xextern float line_pattern_length;
- Xextern float pen_thickness;
- Xextern char c;
- SHAR_EOF
- $TOUCH -am 0213140589 libplot/lp/vars.h &&
- chmod 0644 libplot/lp/vars.h ||
- echo "restore of libplot/lp/vars.h failed"
- set `wc -c libplot/lp/vars.h`;Wc_c=$1
- if test "$Wc_c" != "830"; then
- echo original size 830, current size $Wc_c
- fi
- # ============= libplot/lp/README ==============
- echo "x - extracting libplot/lp/README (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/README &&
- XHPGLPLOT and HPGLFIX
- X
- XVersion 3.0
- X
- XHpglplot is a filter that translates from Hewlett-Packard Graphics
- XLanguage (used in HP plotters) to one of three popular printers.
- XHpglfix is a filter that corrects some problems in the HPGL codes
- Xoutput by the 20/20 spreadsheet program.
- X
- XCopyright (c) 1988 Environmental Defense Fund, Inc.
- X
- XPermission is granted to copy and distribute these programs freely,
- Xprovided that you do not deprive others of the right to do the same,
- Xand that the copyright notices and this notice are not removed. We
- Xrequest a donation to help cover the costs of development. Suggested
- Xdonations are $35 for a single user, and $100 for multi-user
- Xenvironments; however, donations of any size are welcome.
- X
- XSend donations to:
- X
- X Dan Kirshner
- X Environmental Defense Fund
- X 5655 College Ave, Suite 304
- X Oakland, CA 94618
- X (415) 658-8008
- X
- XEmail about the programs should be addressed to David MacKenzie at
- Xedf@rocky2.rockefeller.edu (...rutgers!cmcl2!rocky2!edf).
- X
- XThe Environmental Defense Fund (EDF) is a private, non-profit
- Xenvironmental education and advocacy organization, incorporated in
- X1967, with over 60,000 members and six offices nationwide. EDF's staff
- Xincludes attorneys, scientists, and economists who seek solutions to a
- Xbroad range of environmental and public health problems.
- X
- XIf you would like more information about EDF, or information on
- Xbecoming a member, write or call our national headquarters at:
- X
- XEnvironmental Defense Fund
- X257 Park Avenue South
- XNew York, NY 01110
- X(212) 505-2100
- SHAR_EOF
- $TOUCH -am 1014205990 libplot/lp/README &&
- chmod 0644 libplot/lp/README ||
- echo "restore of libplot/lp/README failed"
- set `wc -c libplot/lp/README`;Wc_c=$1
- if test "$Wc_c" != "1519"; then
- echo original size 1519, current size $Wc_c
- fi
- # ============= libplot/lp/README2 ==============
- echo "x - extracting libplot/lp/README2 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/lp/README2 &&
- XThanx to EDF for letting me post this since it's derived from
- Xa package they posted in 1988, Copyright Environmental Defense
- XFund.
- XYour HP Laser must have enough memory for the graphic image if
- Xyou want every plot to come out right.
- XThe output is optimized so your output files are as small as
- Xpossible. But if there is a graph with very many vectors in it
- Xthe standard memory in the HP is not sufficient!
- X
- Xregards
- XRoland van Hout,
- XI changed and added some pieces here but I claim no rights on
- Xthem.
- XIf you have comments or notes or ideas you can mail me at:
- Xhot@integow.uucp (uunet!mcsun!hp4nl!integow!hot) or
- Xhout@hot.mug ..!plains!minixug!hot!hout
- SHAR_EOF
- $TOUCH -am 1026183190 libplot/lp/README2 &&
- chmod 0644 libplot/lp/README2 ||
- echo "restore of libplot/lp/README2 failed"
- set `wc -c libplot/lp/README2`;Wc_c=$1
- if test "$Wc_c" != "652"; then
- echo original size 652, current size $Wc_c
- fi
- # ============= libplot/sun/Makefile ==============
- if test ! -d 'libplot/sun'; then
- echo "x - creating directory libplot/sun"
- mkdir 'libplot/sun'
- fi
- echo "x - extracting libplot/sun/Makefile (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/sun/Makefile &&
- X# The names of the installed binary and manual page.
- X# Feel free to change.
- XBINARY = /usr/local/sunplot
- XMANUAL = /usr/man/manl/sunplot.l
- X
- XCFLAGS = -O
- X
- Xsunplot: sunplot.o
- X $(CC) -o sunplot sunplot.o -lsuntool -lsunwindow -lpixrect
- X
- Xinstall: sunplot
- X cp sunplot $(BINARY)
- X cp sunplot.1 $(MANUAL)
- X
- Xclean:
- X rm -f sunplot *.o core make.out
- X
- Xsunplot.o: sunplot.icon
- SHAR_EOF
- $TOUCH -am 1225041788 libplot/sun/Makefile &&
- chmod 0644 libplot/sun/Makefile ||
- echo "restore of libplot/sun/Makefile failed"
- set `wc -c libplot/sun/Makefile`;Wc_c=$1
- if test "$Wc_c" != "364"; then
- echo original size 364, current size $Wc_c
- fi
- # ============= libplot/sun/README ==============
- echo "x - extracting libplot/sun/README (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/sun/README &&
- XThis program was written on a Sun 3/50 running SunOS 3.2.
- XIt also compiles and runs on a Sun 3/50 running SunOS 3.4.
- X
- XTo make simply type ``make''.
- XTo install, check the Makefile to see if all the names are correct. Then
- Xtype ``make install''.
- X
- XIf you find any bugs or if you have any suggestions or improvements, please
- Xdrop me a note at the address below.
- X
- XYou might try the command
- X echo 0 0 1 1 2 4 3 9 4 16 | spline | graph | sunplot
- Xafter which a window pops up. Then click the ``Next Page'' button.
- X
- XSjoerd Mullender
- XDept. of Mathematics and Computer Science
- XFree University
- XAmsterdam
- XNetherlands
- X
- XEmail: sjoerd@cs.vu.nl
- XIf this doesn't work, try ...!seismo!mcvax!cs.vu.nl!sjoerd or
- X...!seismo!mcvax!vu44!sjoerd or sjoerd%cs.vu.nl@seismo.css.gov.
- SHAR_EOF
- $TOUCH -am 1225041788 libplot/sun/README &&
- chmod 0644 libplot/sun/README ||
- echo "restore of libplot/sun/README failed"
- set `wc -c libplot/sun/README`;Wc_c=$1
- if test "$Wc_c" != "756"; then
- echo original size 756, current size $Wc_c
- fi
- # ============= libplot/sun/sunplot.1 ==============
- echo "x - extracting libplot/sun/sunplot.1 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > libplot/sun/sunplot.1 &&
- X.TH SUNPLOT 1
- X.SH NAME
- Xsunplot \- plotter backend for Sun workstation
- X.SH SYNOPSIS
- X.B sunplot
- X[
- X.B \-c
- X.I canvas_size
- X] [
- X.B \-h
- X.I horizontal_size
- X] [
- X.B \-v
- X.I vertical_size
- X] [
- X.B \-f
- X.I font_name
- X] [
- X.B \-r
- X] [
- X.B \-x
- X] [
- X.B \-y
- X] [
- X.B \-l
- X] [
- X.B \-s
- X]
- X.SH DESCRIPTION
- X.I Sunplot
- Xreads UNIX plotter code (see
- X.IR plot (5))
- Xfrom standard input and displays it in a Sun window.
- XThe window consists of two subwindows.
- XAt the top is a control panel with a number of buttons and below it is
- Xa window with a canvas on which
- X.I sunplot
- Xdraws and a horizontal and a vertical scrollbar with which you can select
- Xwhich part of the canvas you want to see in the window.
- XThe buttons in the control panel have the following functions:
- X.TP
- X.B "Next Page"
- XDraw the next page.
- XPages are separated by an
- X.B e
- X(the
- X.I erase
- Xfunction in the
- X.IR plot (3X)
- Xlibrary).
- XWhile
- X.I sunplot
- Xis still reading a page this button is not displayed.
- X.TP
- X.B Redraw
- XRedraw the current page.
- X.TP
- X.B Zoom
- XZoom the current page.
- X.I Sunplot
- Xfinds the most extreme x- and y-coordinates in the current page and uses
- Xthose values in stead of the values given by the
- X.B s
- Xcommand (the
- X.I space
- Xfunction) for scaling.
- X.TP
- X.B Options
- X.I Sunplot
- Xdisplays a window where you can set certain options.
- XSee the description below.
- X.TP
- X.B Dump
- X.I Sunplot
- Xdisplays a window with three items.
- XYou should type a file name after the string
- X.B Dump to file:
- Xand then press the
- X.B Done
- Xbutton.
- X.I Sunplot
- Xwill then dump the plot into the named file in the format chosen with the
- X.B Dump format
- Xitem.
- XThe dump can be in either
- X.IR rasterfile (5)
- Xor
- X.I icon
- Xformat.
- XIf the file name is empty,
- X.I sunplot
- Xwill do nothing.
- X.TP
- X.B "Fit Screen"
- XResize the window so that the canvas fits.
- X.TP
- X.B Quit
- XExit
- X.IR sunplot .
- X.SH OPTIONS
- XWhen the
- X.B Options
- Xbutton is pressed
- X.I sunplot
- Xwill display a window with the following items.
- X.TP
- X.B Done
- XDone setting options.
- X.I Sunplot
- Xwill automatically do a redraw of the page with the new settings.
- X.TP
- X.B Rotate
- XRotate the plot by 90 degrees counter-clockwise.
- X.TP
- X.B "X Mirror"
- XMirror the plot in the x-axis.
- X.TP
- X.B "Y Mirror"
- XMirror the plot in the y-axis.
- X.TP
- X.B Label
- XIf on, display labels.
- X.TP
- X.B Square
- XIf on, the canvas is square, otherwise you can set the horizontal and vertical
- Xsizes of the canvas separately.
- X.TP
- X.B Reverse
- XDisplay the canvas in reverse video.
- X.TP
- X.B "Font name"
- XThe name of the font to be used for the labels.
- XIf the name is not absolute it is taken to be relative to the system's fonts
- Xdirectory /usr/lib/fonts/fixedwidthfonts.
- XIf no name is given or the named file does not contain a font, the default
- Xfont is used.
- X.TP
- X.B "Canvas size"
- XThe size of the canvas.
- XThe size of the canvas is measured in pixels.
- XThis is only displayed when the
- X.B Square
- Xtoggle is on.
- X.TP
- X.B "Horizontal size"
- XThe horizontal size of the canvas.
- XThis is only displayed when the
- X.B Square
- Xtoggle is off.
- X.TP
- X.B "Vertical size"
- XThe vertical size of the canvas.
- XThis is only displayed when the
- X.B Square
- Xtoggle is off.
- X.PP
- XThe following command line options are recognized.
- X.IP "\f3\-c\fP \f2canvas_size\fP"
- XSet the canvas size.
- X.I Canvas_size
- Xmust be between 64 and 2048.
- XThis also switches on the
- X.B Square
- Xtoggle.
- X.IP "\f3\-h\fP \f2horizontal_size\fP"
- XSet the horizontal size.
- X.I Horizontal_size
- Xmust be between 64 and 2048.
- XThis also switches off the
- X.B Square
- Xtoggle.
- X.IP "\f3\-v\fP \f2vertical_size\fP"
- XSet the vertical size.
- X.I Vertical_size
- Xmust be between 64 and 2048.
- XThis also switches off the
- X.B Square
- Xtoggle.
- X.IP "\f3\-f\fP \f2font_name\fP"
- XSet the font to be used for labels.
- XThis is independent from the font that is used for the text in the control
- Xpanel and the options and dump windows.
- XA name not starting with ``/'' is taken to be relative to the system's font
- Xdirectory /usr/lib/fonts/fixedwidthfonts.
- X.IP \f3\-r\fP
- XRotate the plot by 90 degrees counter-clockwise.
- X.IP \f3\-x\fP
- XMirror the plot in the x-axis.
- X.IP \f3\-y\fP
- XMirror the plot in the y-axis.
- X.IP \f3\-l\fP
- XToggle labeling.
- X.IP \f3\-s\fP
- XToggle square mode.
- X.PP
- XThe
- X.BR \-r ,
- X.B \-x
- Xand
- X.B \-y
- Xoptions are evaluated left to right and can be repeated to get cumulative
- Xeffect.
- X.I Sunplot
- Xalso recognizes the generic tool arguments; see
- X.IR suntools (1)
- Xfor a list of these arguments.
- X.PP
- XThe defaults are: batching on, labels printed, square canvas, canvas is 512
- Xby 512 pixels, the point
- X.I "(0,\ 0)"
- Xis in the lower left-hand corner.
- X.SH BUGS
- XThe
- X.I linemod
- Xfunction is not implemented.
- X.PP
- XThe
- X.B zoom
- Xcommand doesn't take the height of labels into account.
- X.SH "SEE ALSO"
- X.IR plot (3X),
- X.IR plot (5),
- Xand
- X.IR rasterfile (5).
- X.SH AUTHOR
- XSjoerd Mullender, Free University, Amsterdam <sjoerd@cs.vu.nl>
- SHAR_EOF
- $TOUCH -am 1225041788 libplot/sun/sunplot.1 &&
- chmod 0644 libplot/sun/sunplot.1 ||
- echo "restore of libplot/sun/sunplot.1 failed"
- set `wc -c libplot/sun/sunplot.1`;Wc_c=$1
- if test "$Wc_c" != "4672"; then
- echo original size 4672, current size $Wc_c
- fi
- echo "End of part 5, continue with part 6"
- exit 0
-
-
- --
- UUCP: ..!uunet!mcsun!hp4nl!integow!hot or hot@integow.UUCP or hot@hot.mug
- Roland van Hout, Sr. software engineer, Integrity software consultants,
- Pelmolenlaan 16, 3447 GW Woerden, Netherlands,
- tel +31 3480-30131, fax +31 3480-30182
-