home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2009 < prev    next >
Encoding:
Internet Message Format  |  1990-12-28  |  26.8 KB

  1. From: hot@integow.uucp (Roland van Hout)
  2. Newsgroups: alt.sources
  3. Subject: PD plot(4) librarys (and hercules driver for interactive 386) part 5 of 9
  4. Message-ID: <1394@integow.uucp>
  5. Date: 28 Oct 90 03:57:12 GMT
  6.  
  7.  
  8.  
  9. #!/bin/sh
  10. # This is part 05 of a multipart archive
  11. if touch 2>&1 | fgrep '[-amc]' > /dev/null
  12.  then TOUCH=touch
  13.  else TOUCH=true
  14. fi
  15. # ============= libplot/lp/move.c ==============
  16. echo "x - extracting libplot/lp/move.c (Text)"
  17. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/move.c &&
  18. X/*
  19. X * do_px.c
  20. X *
  21. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  22. X */
  23. X
  24. X#include <stdio.h>
  25. X#include "plotlp.h"
  26. X#ifdef TESTVER
  27. X#include "dbgvars.h"
  28. X#endif
  29. X
  30. Xmove(x,y)
  31. Xint x,y;
  32. X{
  33. X    int xo,yo;
  34. X    float   x_coor,
  35. X            y_coor;
  36. X    POINT   icoor,
  37. X            t;
  38. X    pen_up = TRUE;
  39. X    plot_abs = TRUE;
  40. X    x_coor=x*gxscrunch;y_coor=y*gyscrunch;
  41. X    x_coor += offx; y_coor += offy;
  42. X    if (scaling) {
  43. X        icoor.x = (int) (x_coor * x_scaler);
  44. X        icoor.y = (int) (y_coor * y_scaler);
  45. X        if (icoor.x < 0)
  46. X        icoor.x -= 1;
  47. X        if (icoor.y < 0)
  48. X        icoor.y -= 1;
  49. X    } else {
  50. X        icoor.x = (int) x_coor;
  51. X        icoor.y = (int) y_coor;
  52. X    }
  53. X
  54. X    current = icoor;
  55. X
  56. X    if (symbol_mode) put_symbol(current);
  57. X
  58. X}
  59. X
  60. Xcont(x,y)
  61. Xint x,y;
  62. X{
  63. X    int xo,yo;
  64. X    float   x_coor,
  65. X            y_coor;
  66. X    POINT   icoor,
  67. X            t;
  68. X    x_coor=x*gxscrunch;y_coor=y*gyscrunch;
  69. X    plot_abs = TRUE;
  70. X    pen_up = FALSE;
  71. X    x_coor += offx; y_coor += offy;
  72. X
  73. X    if (scaling) {
  74. X        icoor.x = (int) (x_coor * x_scaler);
  75. X        icoor.y = (int) (y_coor * y_scaler);
  76. X        if (icoor.x < 0)
  77. X        icoor.x -= 1;
  78. X        if (icoor.y < 0)
  79. X        icoor.y -= 1;
  80. X    } else {
  81. X        icoor.x = (int) x_coor;
  82. X        icoor.y = (int) y_coor;
  83. X    }
  84. X
  85. X    put_seg(current, icoor);
  86. X
  87. X    if (plot_abs)    current = icoor;
  88. X
  89. X    if (symbol_mode) put_symbol(current);
  90. X
  91. X}
  92. X
  93. X/*
  94. Xdo_Px(selector)
  95. X    int     selector;
  96. X{
  97. X    float   x_coor,
  98. X            y_coor;
  99. X    POINT   icoor,
  100. X            t;
  101. X
  102. X#ifdef TESTVER
  103. X    int     xwas_on;        /* for debugging 
  104. X
  105. X    /* turn debug2x off, if necessary, for the duration of do_Px() 
  106. X    if (debug2x) {
  107. X    xwas_on = TRUE;
  108. X    debug2x = FALSE;
  109. X    } else {
  110. X    xwas_on = FALSE;
  111. X    }
  112. X#endif
  113. X
  114. X/*    plot_abs = TRUE; /* [hot@mh.nl] 
  115. X
  116. X    switch (selector) {
  117. X    case PA:
  118. X    plot_abs = TRUE;
  119. X    break;
  120. X    case PR:
  121. X    plot_abs = FALSE;
  122. X    break;
  123. X    case PU:
  124. X    pen_up = TRUE;
  125. X    break;
  126. X    case PD:
  127. X    pen_up = FALSE;
  128. X    break;
  129. X    default:
  130. X    fprintf(stderr, "Bad selector for Px %d\n", selector);
  131. X    exit(4);
  132. X    }
  133. X
  134. X    if ((c = getchar()) == ';') {
  135. X#ifdef TESTVER            /* reset debug2x if necessary 
  136. X    if (xwas_on) {
  137. X        debug2x = TRUE;
  138. X    }
  139. X#endif
  140. X    return;
  141. X    } else {
  142. X    ungetc(c, stdin);
  143. X    }
  144. X#ifdef TESTVER
  145. X  fprintf(errfp,"do_Px(coordinates):%f,%f\n", x_coor, y_coor);
  146. X  fflush(errfp);
  147. X#endif
  148. X
  149. X    for (;;) {
  150. X    if (scanf("%f,%f", &x_coor, &y_coor) != 2) {
  151. X        fprintf(stderr, "Odd number of coordinate\n");
  152. X        exit(4);
  153. X    }
  154. X    if (scaling) {
  155. X        icoor.x = (int) (x_coor * x_scaler);
  156. X        icoor.y = (int) (y_coor * y_scaler);
  157. X        if (icoor.x < 0)
  158. X        icoor.x -= 1;
  159. X        if (icoor.y < 0)
  160. X        icoor.y -= 1;
  161. X    } else {
  162. X        icoor.x = (int) x_coor;
  163. X        icoor.y = (int) y_coor;
  164. X    }
  165. X
  166. X    if (!pen_up) {
  167. X        if (plot_abs) {
  168. X        put_seg(current, icoor);
  169. X        } else {
  170. X        t.x = current.x + icoor.x;
  171. X        t.y = current.y + icoor.y;
  172. X        put_seg(current, t);
  173. X*/
  174. SHAR_EOF
  175. $TOUCH -am 1011090488 libplot/lp/move.c &&
  176. chmod 0644 libplot/lp/move.c ||
  177. echo "restore of libplot/lp/move.c failed"
  178. set `wc -c libplot/lp/move.c`;Wc_c=$1
  179. if test "$Wc_c" != "2718"; then
  180.     echo original size 2718, current size $Wc_c
  181. fi
  182. # ============= libplot/lp/openpl.c ==============
  183. echo "x - extracting libplot/lp/openpl.c (Text)"
  184. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/openpl.c &&
  185. X/*
  186. X * do_df.c
  187. X *
  188. X * copyright (c) 1988 environmental defense fund, inc.
  189. X */
  190. X
  191. X#include <stdio.h>
  192. X#include "plotlp.h"
  193. X
  194. X/* global variables */
  195. Xshort int
  196. X        plot_abs,
  197. X        line_type,
  198. X        symbol_mode,
  199. X        stand_char_set,
  200. X        alt_char_set,
  201. X        stand_set_sel,
  202. X        set_standard[NUM_CHAR][CHAR_ELEM],
  203. X        set_alternate[NUM_CHAR][CHAR_ELEM],
  204. X        char_slant,
  205. X        scaling,
  206. X        label_terminator,
  207. X        chord_angle,
  208. X        fill_type,
  209. X        fill_spacing,
  210. X        fill_angle,
  211. X        pen_up;
  212. Xint        printer;        /* printer model */
  213. Xchar    symbol_char;
  214. Xshort int first_fill;
  215. XPOINT   current;
  216. XPOINT   P1,
  217. X        P2;
  218. XPOINT   LL,
  219. X        UR;
  220. Xfloat   x_scaler,
  221. X        y_scaler;
  222. Xfloat   line_pattern_length;
  223. Xfloat   char_width,
  224. X        char_height;
  225. Xfloat   pen_thickness;
  226. Xchar    c;
  227. X
  228. Xopenpl()
  229. X{
  230. X    FILE   *charset;
  231. X    int     i,
  232. X            j;
  233. X
  234. X    to_printer = TRUE;
  235. X        if (printer == 0 || printer == EPSON) printer = EPSON;
  236. X        else if (printer == 0 || printer == IBM_PRO) printer = IBM_PRO;
  237. X        else if (printer == 0 || printer == LASERLOW) printer = LASERLOW;
  238. X        else if (printer == 0 || printer == LASERMED) printer = LASERMED;
  239. X        else if (printer == 0 || printer == LASERHIGH) printer = LASERHIGH;
  240. X
  241. X
  242. X    plot_abs = TRUE;
  243. X    line_type = SOLID;
  244. X    scaling = FALSE;
  245. X    label_terminator = 3;
  246. X    chord_angle = 5;
  247. X    symbol_mode = FALSE;
  248. X    stand_char_set = 0;
  249. X    alt_char_set = 0;
  250. X    stand_set_sel = TRUE;
  251. X    if ((charset = fopen(CHARSET, "r")) == NULL) {
  252. X    perror(CHARSET);
  253. X    exit(2);
  254. X    }
  255. X    for (i = 0; i < NUM_CHAR; i++) {
  256. X    for (j = 0; j < CHAR_ELEM; j++) {
  257. X        fscanf(charset, "%hd,", &set_standard[i][j]);
  258. X        set_alternate[i][j] = set_standard[i][j];
  259. X    }
  260. X    fscanf(charset, " /* %c */\n", &c);
  261. X    }
  262. X
  263. X    if (fclose(charset) < 0) {
  264. X    perror(CHARSET);
  265. X    exit(1);
  266. X    }
  267. X    char_width = 0.187;
  268. X    char_height = 0.269;
  269. X    char_slant = 0;
  270. X    fill_type = 1;
  271. X    fill_spacing = 10;
  272. X    fill_angle = 0;
  273. X    pen_thickness = 0.3;    /* In millimeters */
  274. X    pen_up = TRUE;
  275. X    LL.y = LL.x = 0;
  276. X    UR.x = 10365;
  277. X    UR.y = 7962;
  278. X    init_map();
  279. X}
  280. X
  281. SHAR_EOF
  282. $TOUCH -am 0213135389 libplot/lp/openpl.c &&
  283. chmod 0644 libplot/lp/openpl.c ||
  284. echo "restore of libplot/lp/openpl.c failed"
  285. set `wc -c libplot/lp/openpl.c`;Wc_c=$1
  286. if test "$Wc_c" != "2082"; then
  287.     echo original size 2082, current size $Wc_c
  288. fi
  289. # ============= libplot/lp/plot_cha.c ==============
  290. echo "x - extracting libplot/lp/plot_cha.c (Text)"
  291. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plot_cha.c &&
  292. X/*
  293. X * plot_cha.c
  294. X *
  295. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  296. X */
  297. X
  298. X#include <stdio.h>
  299. X#include "const.h"
  300. X#include "vars.h"
  301. X
  302. X#ifdef TESTVER
  303. X#include "dbgvars.h"
  304. X#include <ctype.h>        /* for isprint() -- test version */
  305. X#endif
  306. X
  307. X/* 1020.4081 plotter units/in * .25 char/grid * .3937 in/cm */
  308. X#define SCALE_W 100.43366
  309. X
  310. X/* 1020.4081 plotter units/in * .0625 char/grid * .3937 in/cm */
  311. X#define SCALE_H 50.2116832
  312. X
  313. Xfloat   scale_w,
  314. X        scale_h;
  315. X
  316. XPOINT
  317. Xplot_char(left_corner, charac, set)
  318. X    POINT   left_corner;
  319. X    char    charac;
  320. X    short int set[NUM_CHAR][CHAR_ELEM];
  321. X{
  322. X    int     i;
  323. X    short int it;
  324. X    int     index;
  325. X    POINT   here,
  326. X            there;
  327. X    float   offset;
  328. X
  329. X#ifdef TESTVER
  330. X    int     was_on;
  331. X
  332. X    /* turn debug2 off, if necessary, for the duration of plot_char() */
  333. X    if (debug2) {
  334. X    was_on = TRUE;
  335. X    debug2 = FALSE;
  336. X    } else {
  337. X    was_on = FALSE;
  338. X    }
  339. X
  340. X    if (debug6) {
  341. X    if (isprint(charac)) {
  342. X        fprintf(errfp, "plot_char: %c\n", charac);
  343. X    } else {
  344. X        fprintf(errfp, "plot_char unprintable: %d\n", charac);
  345. X    }
  346. X    }
  347. X#endif
  348. X
  349. X    i = 0;
  350. X    here = left_corner;
  351. X    pen_up = TRUE;
  352. X    scale_w = char_width * SCALE_W;
  353. X    scale_h = char_height * SCALE_H;
  354. X    if (charac < '!') {
  355. X    if (charac != ' ') {
  356. X        fprintf(stderr, "Non printing char %x\n", charac);
  357. X    }
  358. X    here.x = left_corner.x + (int) (6 * scale_w + 0.5);
  359. X#ifdef TESTVER
  360. X    /* turn debug2 back on if necessary */
  361. X    if (was_on) {
  362. X        debug2 = TRUE;
  363. X    }
  364. X#endif
  365. X    return (here);
  366. X    } else
  367. X    index = charac - '!';
  368. X    while ((it = set[index][i++]) != -200) {
  369. X    if (it > 99 || it < -99) {
  370. X        if (it > 0)
  371. X        pen_up = FALSE;
  372. X        else
  373. X        pen_up = TRUE;
  374. X    } else {
  375. X        offset = it * scale_w;
  376. X        if (offset < 0.0)
  377. X        offset -= 0.5;
  378. X        else
  379. X        offset += 0.5;
  380. X        there.x = here.x + (int) offset;
  381. X        offset = set[index][i++] * scale_h;
  382. X        if (offset < 0.0)
  383. X        offset -= 0.5;
  384. X        else
  385. X        offset += 0.5;
  386. X        there.y = here.y + (int) offset;
  387. X        if (!pen_up) {
  388. X        put_seg(here, there);
  389. X        }
  390. X        here = there;
  391. X    }
  392. X    }
  393. X
  394. X#ifdef TESTVER
  395. X    /* turn debug2 back on if necessary */
  396. X    if (was_on) {
  397. X    debug2 = TRUE;
  398. X    }
  399. X#endif
  400. X    there.x = left_corner.x + (int) (6 * scale_w + 0.5);
  401. X    there.y = left_corner.y;
  402. X    return (there);
  403. X}
  404. X
  405. X
  406. Xput_symbol(center)
  407. X    POINT   center;
  408. X{
  409. X    POINT   ll;
  410. X    float   horz_offset = 2.0;
  411. X    float   vert_offset;
  412. X
  413. X    switch (symbol_char) {
  414. X    case 'o':
  415. X    case 'x':
  416. X    vert_offset = 2.5;
  417. X    break;
  418. X    case '.':
  419. X    vert_offset = 0.5;
  420. X    horz_offset = 1.5;
  421. X    break;
  422. X    default:
  423. X    vert_offset = 4.0;
  424. X    break;
  425. X    }
  426. X    ll.x = center.x - char_width * horz_offset * SCALE_W;
  427. X    ll.y = center.y - char_height * vert_offset * SCALE_H;
  428. X    if (stand_set_sel) {
  429. X    ll = plot_char(ll, symbol_char, set_standard);
  430. X    } else {
  431. X    ll = plot_char(ll, symbol_char, set_alternate);
  432. X    }
  433. X}
  434. SHAR_EOF
  435. $TOUCH -am 1007125888 libplot/lp/plot_cha.c &&
  436. chmod 0644 libplot/lp/plot_cha.c ||
  437. echo "restore of libplot/lp/plot_cha.c failed"
  438. set `wc -c libplot/lp/plot_cha.c`;Wc_c=$1
  439. if test "$Wc_c" != "2788"; then
  440.     echo original size 2788, current size $Wc_c
  441. fi
  442. # ============= libplot/lp/plotlp.h ==============
  443. echo "x - extracting libplot/lp/plotlp.h (Text)"
  444. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plotlp.h &&
  445. X/* 
  446. X    include  file to use the epson,ibm-proprinter and the laserjet
  447. X    with the plot(4) graphic library
  448. X    the switch is done via a variable printer this one must be defined
  449. X    in your main program
  450. X    these variables must be defined in the main-part of your programm
  451. X    extern int no_fill;
  452. X    int     to_printer; EPSON || IBM_PRO || LASERLOW || LASERMED || LASERHIGH
  453. X
  454. X*/
  455. X    extern int to_printer;
  456. X/*
  457. X * const.h
  458. X *
  459. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  460. X */
  461. X
  462. Xtypedef struct {
  463. X    int     x,
  464. X            y;
  465. X} POINT;
  466. X
  467. X#define ESC 27
  468. X
  469. X#define TRUE 1
  470. X#define FALSE 0
  471. X
  472. X/* LINE TYPES */
  473. X#define DOTS 0
  474. X#define SHORT_DASH 1
  475. X#define BROKN_1 2
  476. X#define BROKN_2 3
  477. X#define BROKN_DOT 4
  478. X#define BROKN_DASH 5
  479. X#define BROKN_2DASH 6
  480. X#define SOLID 7
  481. X
  482. X/* FILL TYPES: values assigned to var fill_type */
  483. X#define BI_SOLID 1
  484. X#define UNI_SOLID 2
  485. X#define PARALLEL 3
  486. X#define CROSS_HATCH 4
  487. X
  488. X/* Charater set defines */
  489. X#define CHAR_ELEM 28
  490. X#define NUM_CHAR 94
  491. X
  492. X/* Printer model: values of global var 'printer' */
  493. X#define EPSON    1        /* Epson LQ 1500 */
  494. X#define LASERLOW 2        /* HP LaserJet Plus low sized 5" x 6" */
  495. X#define IBM_PRO  3        /* IBM Proprinter */
  496. X#define LASERMED 4        /* HP LaserJet Plus med sized 8" x 6" */
  497. X#define LASERHIGH 5        /* HP LaserJet Plus extra large 8" x 11"*/
  498. X
  499. X#define BITMAPSIZE 935000
  500. X/*
  501. X * vars.h
  502. X *
  503. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  504. X *
  505. X * global variables
  506. X */
  507. X
  508. Xextern short int
  509. X        plot_abs,
  510. X        line_type,
  511. X        symbol_mode,
  512. X        stand_char_set,
  513. X        alt_char_set,
  514. X        stand_set_sel,
  515. X        set_standard[][CHAR_ELEM],
  516. X        set_alternate[][CHAR_ELEM],
  517. X        char_slant,
  518. X        scaling,
  519. X        label_terminator,
  520. X        chord_angle,
  521. X        fill_type,
  522. X        fill_spacing,
  523. X        fill_angle,
  524. X        pen_up;
  525. Xextern int printer;        /* printer model: EPSON or LASER */
  526. Xextern char symbol_char;
  527. Xextern short int first_fill;
  528. Xextern POINT current;
  529. Xextern POINT P1,
  530. X        P2;
  531. Xextern POINT LL,
  532. X        UR;
  533. Xextern float x_scaler,
  534. X        y_scaler;
  535. Xextern float gxscrunch,gyscrunch;
  536. Xextern float char_width,
  537. X        char_height;
  538. Xextern float line_pattern_length;
  539. Xextern float pen_thickness;
  540. Xextern char c;
  541. Xextern int offx,offy;
  542. SHAR_EOF
  543. $TOUCH -am 0213125889 libplot/lp/plotlp.h &&
  544. chmod 0644 libplot/lp/plotlp.h ||
  545. echo "restore of libplot/lp/plotlp.h failed"
  546. set `wc -c libplot/lp/plotlp.h`;Wc_c=$1
  547. if test "$Wc_c" != "2173"; then
  548.     echo original size 2173, current size $Wc_c
  549. fi
  550. # ============= libplot/lp/plotlpus.h ==============
  551. echo "x - extracting libplot/lp/plotlpus.h (Text)"
  552. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/plotlpus.h &&
  553. X/* 
  554. X    include  file to use the epson,ibm-proprinter and the laserjet
  555. X    with the plot(4) graphic library
  556. X    the switch is done via a variable printer this one must be defined
  557. X    in your main program
  558. X    these variables must be defined in the main-part of your programm
  559. X    extern int no_fill;
  560. X    int     to_printer; EPSON || IBM_PRO || LASERLOW || LASERMED || LASERHIGH
  561. X
  562. X*/
  563. X/*
  564. X * const.h
  565. X *
  566. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  567. X */
  568. X
  569. X#define TRUE 1
  570. X#define FALSE 0
  571. X
  572. X/* Printer model: values of global var 'printer' */
  573. X#define EPSON    1        /* Epson LQ 1500 */
  574. X#define LASERLOW 2        /* HP LaserJet Plus low sized 5" x 6" */
  575. X#define IBM_PRO  3        /* IBM Proprinter */
  576. X#define LASERMED 4        /* HP LaserJet Plus med sized 8" x 6" */
  577. X#define LASERHIGH 5        /* HP LaserJet Plus extra large 8" x 11"*/
  578. X
  579. X    int offx,offy;
  580. X    int to_printer=TRUE;
  581. X    int printer=LASERLOW;
  582. X    float gxscrunch,gyscrunch;
  583. X
  584. X
  585. SHAR_EOF
  586. $TOUCH -am 1010213588 libplot/lp/plotlpus.h &&
  587. chmod 0644 libplot/lp/plotlpus.h ||
  588. echo "restore of libplot/lp/plotlpus.h failed"
  589. set `wc -c libplot/lp/plotlpus.h`;Wc_c=$1
  590. if test "$Wc_c" != "885"; then
  591.     echo original size 885, current size $Wc_c
  592. fi
  593. # ============= libplot/lp/set_dbgs.c ==============
  594. echo "x - extracting libplot/lp/set_dbgs.c (Text)"
  595. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/set_dbgs.c &&
  596. X/*
  597. X * set_dbgs.c
  598. X *
  599. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  600. X */
  601. X
  602. X#include <stdio.h>
  603. X
  604. XFILE   *errfp;
  605. Xint     debug1c,
  606. X        debug1f,
  607. X        debug2,
  608. X        debug2x,
  609. X        debug3,
  610. X        debug4,
  611. X        debug5,
  612. X        debug6,
  613. X        debug7,
  614. X        debug8,
  615. X        debug9;
  616. X
  617. Xset_debugs()
  618. X{
  619. X#if 0
  620. X    errfp = fopen(TTY, "w");
  621. X#else
  622. X    errfp = fopen("plot.err", "w");
  623. X#endif
  624. X
  625. X    fprintf(errfp, "- - - plot.err: plot program error file - - -\n\n");
  626. X
  627. X    /* to console: transfer control to fns */
  628. X    debug1c = 1;
  629. X
  630. X    /* to plot.err: transfer control to fns */
  631. X    debug1f = 1;
  632. X
  633. X    /*
  634. X     * to plot.err: scaled endpts of segment in put_seg() does NOT include
  635. X     * endpoints plotted during fill routines 
  636. X     */
  637. X    debug2 = 1;
  638. X
  639. X    /*
  640. X     * to plot.err: scaled endpts of segment in put_seg(), EXTENSION --
  641. X     * endpoints plotted during fill routines 
  642. X     */
  643. X    debug2x = 1;
  644. X
  645. X    /* to plot.err: the points sent to hatch() by do_WG, do_Rx */
  646. X    debug3 = 0;
  647. X
  648. X    /* to plot.err: info from fill routines */
  649. X    debug4 = 0;
  650. X
  651. X    /* to plot.err: bytes sent to printer from dump_map() */
  652. X    debug5 = 0;
  653. X
  654. X    /* to plot.err: character being processed by plot_char() */
  655. X    debug6 = 0;
  656. X
  657. X    /* to plot.err: detailed info from get_chgs() */
  658. X    debug7 = 0;
  659. X
  660. X    /* to plot.err: NOT USED */
  661. X    debug8 = 0;
  662. X
  663. X    /* to plot.err: info from fix_fill */
  664. X    debug9 = 0;
  665. X}
  666. SHAR_EOF
  667. $TOUCH -am 1007125888 libplot/lp/set_dbgs.c &&
  668. chmod 0644 libplot/lp/set_dbgs.c ||
  669. echo "restore of libplot/lp/set_dbgs.c failed"
  670. set `wc -c libplot/lp/set_dbgs.c`;Wc_c=$1
  671. if test "$Wc_c" != "1389"; then
  672.     echo original size 1389, current size $Wc_c
  673. fi
  674. # ============= libplot/lp/vars.h ==============
  675. echo "x - extracting libplot/lp/vars.h (Text)"
  676. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/vars.h &&
  677. X/*
  678. X * vars.h
  679. X *
  680. X * Copyright (c) 1988 Environmental Defense Fund, Inc.
  681. X *
  682. X * global variables
  683. X */
  684. X
  685. Xextern short int
  686. X        plot_abs,
  687. X        line_type,
  688. X        symbol_mode,
  689. X        stand_char_set,
  690. X        alt_char_set,
  691. X        stand_set_sel,
  692. X        set_standard[][CHAR_ELEM],
  693. X        set_alternate[][CHAR_ELEM],
  694. X        char_slant,
  695. X        scaling,
  696. X        label_terminator,
  697. X        chord_angle,
  698. X        fill_type,
  699. X        fill_spacing,
  700. X        fill_angle,
  701. X        pen_up;
  702. Xextern int printer;        /* printer model: EPSON or LASER */
  703. Xextern char symbol_char;
  704. Xextern short int first_fill;
  705. Xextern POINT current;
  706. Xextern POINT P1,
  707. X        P2;
  708. Xextern POINT LL,
  709. X        UR;
  710. Xextern float x_scaler,
  711. X        y_scaler;
  712. Xextern float char_width,
  713. X        char_height;
  714. Xextern float line_pattern_length;
  715. Xextern float pen_thickness;
  716. Xextern char c;
  717. SHAR_EOF
  718. $TOUCH -am 0213140589 libplot/lp/vars.h &&
  719. chmod 0644 libplot/lp/vars.h ||
  720. echo "restore of libplot/lp/vars.h failed"
  721. set `wc -c libplot/lp/vars.h`;Wc_c=$1
  722. if test "$Wc_c" != "830"; then
  723.     echo original size 830, current size $Wc_c
  724. fi
  725. # ============= libplot/lp/README ==============
  726. echo "x - extracting libplot/lp/README (Text)"
  727. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/README &&
  728. XHPGLPLOT and HPGLFIX
  729. X
  730. XVersion 3.0
  731. X
  732. XHpglplot is a filter that translates from Hewlett-Packard Graphics
  733. XLanguage (used in HP plotters) to one of three popular printers.
  734. XHpglfix is a filter that corrects some problems in the HPGL codes
  735. Xoutput by the 20/20 spreadsheet program.
  736. X
  737. XCopyright (c) 1988 Environmental Defense Fund, Inc.
  738. X
  739. XPermission is granted to copy and distribute these programs freely,
  740. Xprovided that you do not deprive others of the right to do the same,
  741. Xand that the copyright notices and this notice are not removed.  We
  742. Xrequest a donation to help cover the costs of development.  Suggested
  743. Xdonations are $35 for a single user, and $100 for multi-user
  744. Xenvironments; however, donations of any size are welcome.
  745. X
  746. XSend donations to:
  747. X
  748. X Dan Kirshner
  749. X Environmental Defense Fund
  750. X 5655 College Ave, Suite 304
  751. X Oakland, CA  94618
  752. X (415) 658-8008
  753. X
  754. XEmail about the programs should be addressed to David MacKenzie at
  755. Xedf@rocky2.rockefeller.edu (...rutgers!cmcl2!rocky2!edf).
  756. X
  757. XThe Environmental Defense Fund (EDF) is a private, non-profit
  758. Xenvironmental education and advocacy organization, incorporated in
  759. X1967, with over 60,000 members and six offices nationwide.  EDF's staff
  760. Xincludes attorneys, scientists, and economists who seek solutions to a
  761. Xbroad range of environmental and public health problems.
  762. X
  763. XIf you would like more information about EDF, or information on
  764. Xbecoming a member, write or call our national headquarters at:
  765. X
  766. XEnvironmental Defense Fund
  767. X257 Park Avenue South
  768. XNew York, NY  01110
  769. X(212) 505-2100
  770. SHAR_EOF
  771. $TOUCH -am 1014205990 libplot/lp/README &&
  772. chmod 0644 libplot/lp/README ||
  773. echo "restore of libplot/lp/README failed"
  774. set `wc -c libplot/lp/README`;Wc_c=$1
  775. if test "$Wc_c" != "1519"; then
  776.     echo original size 1519, current size $Wc_c
  777. fi
  778. # ============= libplot/lp/README2 ==============
  779. echo "x - extracting libplot/lp/README2 (Text)"
  780. sed 's/^X//' << 'SHAR_EOF' > libplot/lp/README2 &&
  781. XThanx to EDF for letting me post this since it's derived from
  782. Xa package they posted in 1988, Copyright Environmental Defense
  783. XFund.
  784. XYour HP Laser must have enough memory for the graphic image if
  785. Xyou want every plot to come out right.
  786. XThe output is optimized so your output files are as small as
  787. Xpossible. But if there is a graph with very many vectors in it
  788. Xthe standard memory in the HP is not sufficient!
  789. X
  790. Xregards
  791. XRoland van Hout,
  792. XI changed and added some pieces here but I claim no rights on
  793. Xthem.
  794. XIf you have comments or notes or ideas you can mail me at:
  795. Xhot@integow.uucp (uunet!mcsun!hp4nl!integow!hot)  or
  796. Xhout@hot.mug ..!plains!minixug!hot!hout
  797. SHAR_EOF
  798. $TOUCH -am 1026183190 libplot/lp/README2 &&
  799. chmod 0644 libplot/lp/README2 ||
  800. echo "restore of libplot/lp/README2 failed"
  801. set `wc -c libplot/lp/README2`;Wc_c=$1
  802. if test "$Wc_c" != "652"; then
  803.     echo original size 652, current size $Wc_c
  804. fi
  805. # ============= libplot/sun/Makefile ==============
  806. if test ! -d 'libplot/sun'; then
  807.     echo "x - creating directory libplot/sun"
  808.     mkdir 'libplot/sun'
  809. fi
  810. echo "x - extracting libplot/sun/Makefile (Text)"
  811. sed 's/^X//' << 'SHAR_EOF' > libplot/sun/Makefile &&
  812. X# The names of the installed binary and manual page.
  813. X# Feel free to change.
  814. XBINARY    = /usr/local/sunplot
  815. XMANUAL    = /usr/man/manl/sunplot.l
  816. X
  817. XCFLAGS    = -O
  818. X
  819. Xsunplot:    sunplot.o
  820. X        $(CC) -o sunplot sunplot.o -lsuntool -lsunwindow -lpixrect
  821. X
  822. Xinstall:    sunplot
  823. X        cp sunplot $(BINARY)
  824. X        cp sunplot.1 $(MANUAL)
  825. X
  826. Xclean:
  827. X        rm -f sunplot *.o core make.out
  828. X
  829. Xsunplot.o:    sunplot.icon
  830. SHAR_EOF
  831. $TOUCH -am 1225041788 libplot/sun/Makefile &&
  832. chmod 0644 libplot/sun/Makefile ||
  833. echo "restore of libplot/sun/Makefile failed"
  834. set `wc -c libplot/sun/Makefile`;Wc_c=$1
  835. if test "$Wc_c" != "364"; then
  836.     echo original size 364, current size $Wc_c
  837. fi
  838. # ============= libplot/sun/README ==============
  839. echo "x - extracting libplot/sun/README (Text)"
  840. sed 's/^X//' << 'SHAR_EOF' > libplot/sun/README &&
  841. XThis program was written on a Sun 3/50 running SunOS 3.2.
  842. XIt also compiles and runs on a Sun 3/50 running SunOS 3.4.
  843. X
  844. XTo make simply type ``make''.
  845. XTo install, check the Makefile to see if all the names are correct.  Then
  846. Xtype ``make install''.
  847. X
  848. XIf you find any bugs or if you have any suggestions or improvements, please
  849. Xdrop me a note at the address below.
  850. X
  851. XYou might try the command
  852. X    echo 0 0 1 1 2 4 3 9 4 16 | spline | graph | sunplot
  853. Xafter which a window pops up.  Then click the ``Next Page'' button.
  854. X
  855. XSjoerd Mullender
  856. XDept. of Mathematics and Computer Science
  857. XFree University
  858. XAmsterdam
  859. XNetherlands
  860. X
  861. XEmail: sjoerd@cs.vu.nl
  862. XIf this doesn't work, try ...!seismo!mcvax!cs.vu.nl!sjoerd or
  863. X...!seismo!mcvax!vu44!sjoerd or sjoerd%cs.vu.nl@seismo.css.gov.
  864. SHAR_EOF
  865. $TOUCH -am 1225041788 libplot/sun/README &&
  866. chmod 0644 libplot/sun/README ||
  867. echo "restore of libplot/sun/README failed"
  868. set `wc -c libplot/sun/README`;Wc_c=$1
  869. if test "$Wc_c" != "756"; then
  870.     echo original size 756, current size $Wc_c
  871. fi
  872. # ============= libplot/sun/sunplot.1 ==============
  873. echo "x - extracting libplot/sun/sunplot.1 (Text)"
  874. sed 's/^X//' << 'SHAR_EOF' > libplot/sun/sunplot.1 &&
  875. X.TH SUNPLOT 1
  876. X.SH NAME
  877. Xsunplot \- plotter backend for Sun workstation
  878. X.SH SYNOPSIS
  879. X.B sunplot
  880. X[
  881. X.B \-c
  882. X.I canvas_size
  883. X] [
  884. X.B \-h
  885. X.I horizontal_size
  886. X] [
  887. X.B \-v
  888. X.I vertical_size
  889. X] [
  890. X.B \-f
  891. X.I font_name
  892. X] [
  893. X.B \-r
  894. X] [
  895. X.B \-x
  896. X] [
  897. X.B \-y
  898. X] [
  899. X.B \-l
  900. X] [
  901. X.B \-s
  902. X]
  903. X.SH DESCRIPTION
  904. X.I Sunplot
  905. Xreads UNIX plotter code (see
  906. X.IR plot (5))
  907. Xfrom standard input and displays it in a Sun window.
  908. XThe window consists of two subwindows.
  909. XAt the top is a control panel with a number of buttons and below it is
  910. Xa window with a canvas on which
  911. X.I sunplot
  912. Xdraws and a horizontal and a vertical scrollbar with which you can select
  913. Xwhich part of the canvas you want to see in the window.
  914. XThe buttons in the control panel have the following functions:
  915. X.TP
  916. X.B "Next Page"
  917. XDraw the next page.
  918. XPages are separated by an
  919. X.B e
  920. X(the
  921. X.I erase
  922. Xfunction in the
  923. X.IR plot (3X)
  924. Xlibrary).
  925. XWhile
  926. X.I sunplot
  927. Xis still reading a page this button is not displayed.
  928. X.TP
  929. X.B Redraw
  930. XRedraw the current page.
  931. X.TP
  932. X.B Zoom
  933. XZoom the current page.
  934. X.I Sunplot
  935. Xfinds the most extreme x- and y-coordinates in the current page and uses
  936. Xthose values in stead of the values given by the
  937. X.B s
  938. Xcommand (the
  939. X.I space
  940. Xfunction) for scaling.
  941. X.TP
  942. X.B Options
  943. X.I Sunplot
  944. Xdisplays a window where you can set certain options.
  945. XSee the description below.
  946. X.TP
  947. X.B Dump
  948. X.I Sunplot
  949. Xdisplays a window with three items.
  950. XYou should type a file name after the string
  951. X.B Dump to file:
  952. Xand then press the
  953. X.B Done
  954. Xbutton.
  955. X.I Sunplot
  956. Xwill then dump the plot into the named file in the format chosen with the
  957. X.B Dump format
  958. Xitem.
  959. XThe dump can be in either
  960. X.IR rasterfile (5)
  961. Xor
  962. X.I icon
  963. Xformat.
  964. XIf the file name is empty,
  965. X.I sunplot
  966. Xwill do nothing.
  967. X.TP
  968. X.B "Fit Screen"
  969. XResize the window so that the canvas fits.
  970. X.TP
  971. X.B Quit
  972. XExit
  973. X.IR sunplot .
  974. X.SH OPTIONS
  975. XWhen the
  976. X.B Options
  977. Xbutton is pressed
  978. X.I sunplot
  979. Xwill display a window with the following items.
  980. X.TP
  981. X.B Done
  982. XDone setting options.
  983. X.I Sunplot
  984. Xwill automatically do a redraw of the page with the new settings.
  985. X.TP
  986. X.B Rotate
  987. XRotate the plot by 90 degrees counter-clockwise.
  988. X.TP
  989. X.B "X Mirror"
  990. XMirror the plot in the x-axis.
  991. X.TP
  992. X.B "Y Mirror"
  993. XMirror the plot in the y-axis.
  994. X.TP
  995. X.B Label
  996. XIf on, display labels.
  997. X.TP
  998. X.B Square
  999. XIf on, the canvas is square, otherwise you can set the horizontal and vertical
  1000. Xsizes of the canvas separately.
  1001. X.TP
  1002. X.B Reverse
  1003. XDisplay the canvas in reverse video.
  1004. X.TP
  1005. X.B "Font name"
  1006. XThe name of the font to be used for the labels.
  1007. XIf the name is not absolute it is taken to be relative to the system's fonts
  1008. Xdirectory /usr/lib/fonts/fixedwidthfonts.
  1009. XIf no name is given or the named file does not contain a font, the default
  1010. Xfont is used.
  1011. X.TP
  1012. X.B "Canvas size"
  1013. XThe size of the canvas.
  1014. XThe size of the canvas is measured in pixels.
  1015. XThis is only displayed when the
  1016. X.B Square
  1017. Xtoggle is on.
  1018. X.TP
  1019. X.B "Horizontal size"
  1020. XThe horizontal size of the canvas.
  1021. XThis is only displayed when the
  1022. X.B Square
  1023. Xtoggle is off.
  1024. X.TP
  1025. X.B "Vertical size"
  1026. XThe vertical size of the canvas.
  1027. XThis is only displayed when the
  1028. X.B Square
  1029. Xtoggle is off.
  1030. X.PP
  1031. XThe following command line options are recognized.
  1032. X.IP "\f3\-c\fP \f2canvas_size\fP"
  1033. XSet the canvas size.
  1034. X.I Canvas_size
  1035. Xmust be between 64 and 2048.
  1036. XThis also switches on the
  1037. X.B Square
  1038. Xtoggle.
  1039. X.IP "\f3\-h\fP \f2horizontal_size\fP"
  1040. XSet the horizontal size.
  1041. X.I Horizontal_size
  1042. Xmust be between 64 and 2048.
  1043. XThis also switches off the
  1044. X.B Square
  1045. Xtoggle.
  1046. X.IP "\f3\-v\fP \f2vertical_size\fP"
  1047. XSet the vertical size.
  1048. X.I Vertical_size
  1049. Xmust be between 64 and 2048.
  1050. XThis also switches off the
  1051. X.B Square
  1052. Xtoggle.
  1053. X.IP "\f3\-f\fP \f2font_name\fP"
  1054. XSet the font to be used for labels.
  1055. XThis is independent from the font that is used for the text in the control
  1056. Xpanel and the options and dump windows.
  1057. XA name not starting with ``/'' is taken to be relative to the system's font
  1058. Xdirectory /usr/lib/fonts/fixedwidthfonts.
  1059. X.IP \f3\-r\fP
  1060. XRotate the plot by 90 degrees counter-clockwise.
  1061. X.IP \f3\-x\fP
  1062. XMirror the plot in the x-axis.
  1063. X.IP \f3\-y\fP
  1064. XMirror the plot in the y-axis.
  1065. X.IP \f3\-l\fP
  1066. XToggle labeling.
  1067. X.IP \f3\-s\fP
  1068. XToggle square mode.
  1069. X.PP
  1070. XThe
  1071. X.BR \-r ,
  1072. X.B \-x
  1073. Xand
  1074. X.B \-y
  1075. Xoptions are evaluated left to right and can be repeated to get cumulative
  1076. Xeffect.
  1077. X.I Sunplot
  1078. Xalso recognizes the generic tool arguments; see
  1079. X.IR suntools (1)
  1080. Xfor a list of these arguments.
  1081. X.PP
  1082. XThe defaults are: batching on, labels printed, square canvas, canvas is 512
  1083. Xby 512 pixels, the point
  1084. X.I "(0,\ 0)"
  1085. Xis in the lower left-hand corner.
  1086. X.SH BUGS
  1087. XThe
  1088. X.I linemod
  1089. Xfunction is not implemented.
  1090. X.PP
  1091. XThe
  1092. X.B zoom
  1093. Xcommand doesn't take the height of labels into account.
  1094. X.SH "SEE ALSO"
  1095. X.IR plot (3X),
  1096. X.IR plot (5),
  1097. Xand
  1098. X.IR rasterfile (5).
  1099. X.SH AUTHOR
  1100. XSjoerd Mullender, Free University, Amsterdam <sjoerd@cs.vu.nl>
  1101. SHAR_EOF
  1102. $TOUCH -am 1225041788 libplot/sun/sunplot.1 &&
  1103. chmod 0644 libplot/sun/sunplot.1 ||
  1104. echo "restore of libplot/sun/sunplot.1 failed"
  1105. set `wc -c libplot/sun/sunplot.1`;Wc_c=$1
  1106. if test "$Wc_c" != "4672"; then
  1107.     echo original size 4672, current size $Wc_c
  1108. fi
  1109. echo "End of part 5, continue with part 6"
  1110. exit 0
  1111.  
  1112.  
  1113. -- 
  1114. UUCP: ..!uunet!mcsun!hp4nl!integow!hot    or  hot@integow.UUCP or hot@hot.mug
  1115. Roland van Hout, Sr. software engineer, Integrity software consultants, 
  1116.          Pelmolenlaan 16, 3447 GW Woerden, Netherlands,
  1117.             tel +31 3480-30131, fax +31 3480-30182
  1118.