home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume14 / vplot / part06 < prev    next >
Text File  |  1988-03-28  |  61KB  |  2,296 lines

  1. Subject:  v14i011:  Device-independant graphics system, with drivers, Part06/24
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: Joe Dellinger <joe@hanauma.STANFORD.EDU>
  7. Posting-number: Volume 14, Issue 11
  8. Archive-name: vplot/part06
  9.  
  10. #! /bin/sh
  11. # This is a shell archive.  Remove anything before this line, then unpack
  12. # it by saving it into a file and typing "sh file".  To overwrite existing
  13. # files, type "sh file -c".  You can also feed this as standard input via
  14. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  15. # will see the following message at the end:
  16. #        "End of archive 6 (of 24)."
  17. # Wrapped by rsalz@fig.bbn.com on Fri Mar 25 11:46:51 1988
  18. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  19. if test -f 'Envision_device/envilib/envipoly.c' -a "${1}" != "-c" ; then 
  20.   echo shar: Will not clobber existing file \"'Envision_device/envilib/envipoly.c'\"
  21. else
  22. echo shar: Extracting \"'Envision_device/envilib/envipoly.c'\" \(1428 characters\)
  23. sed "s/^X//" >'Envision_device/envilib/envipoly.c' <<'END_OF_FILE'
  24. X/*
  25. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  26. X * University. Official permission to use this software is included in
  27. X * the documentation. It authorizes you to use this file for any
  28. X * non-commercial purpose, provided that this copyright notice is not
  29. X * removed and that any modifications made to this file are commented
  30. X * and dated in the style of my example below.
  31. X */
  32. X
  33. X/*
  34. X *
  35. X *  source file:   ./filters/envilib/envipoly.c
  36. X *
  37. X * Joe Dellinger (SEP), June 11 1987
  38. X *    Inserted this sample edit history entry.
  39. X *    Please log any further modifications made to this file:
  40. X */
  41. X
  42. X#include <stdio.h>
  43. X#include "envi.h"
  44. X
  45. extern FILE    *pltout;
  46. X
  47. static int      firstpoint;
  48. static int      x_first, y_first;
  49. X
  50. envistartpoly (npts)
  51. X    int             npts;
  52. X{
  53. X    envisetmode (REG);
  54. X    fprintf (pltout, "%cOM%d,", ESC, npts + 1);
  55. X    firstpoint = 1;
  56. X}
  57. X
  58. X
  59. envimidpoly (x, y)
  60. X    int             x, y;
  61. X{
  62. X    fprintf (pltout, "%d,%d,", x * 4, y * 4);
  63. X    if (firstpoint == 1)
  64. X    {
  65. X    firstpoint = 0;
  66. X    x_first = x;
  67. X    y_first = y;
  68. X    }
  69. X    /*
  70. X     * Multiply by 4 to undo the window weirdness. That is, when in tek mode
  71. X     * the window acts differently from when not in tek mode. 
  72. X     */
  73. X}
  74. X
  75. enviendpoly (last)
  76. X    int             last;    /* 1 means this is the last polygon */
  77. X{
  78. X    fprintf (pltout, "%d,%d,", x_first * 4, y_first * 4);
  79. X/*
  80. X * repeat the first point as the last to get around an envision bug!
  81. X */
  82. X}
  83. END_OF_FILE
  84. if test 1428 -ne `wc -c <'Envision_device/envilib/envipoly.c'`; then
  85.     echo shar: \"'Envision_device/envilib/envipoly.c'\" unpacked with wrong size!
  86. fi
  87. # end of 'Envision_device/envilib/envipoly.c'
  88. fi
  89. if test -f 'Imagen_device/imaglib/imagdoc.h' -a "${1}" != "-c" ; then 
  90.   echo shar: Will not clobber existing file \"'Imagen_device/imaglib/imagdoc.h'\"
  91. else
  92. echo shar: Extracting \"'Imagen_device/imaglib/imagdoc.h'\" \(1547 characters\)
  93. sed "s/^X//" >'Imagen_device/imaglib/imagdoc.h' <<'END_OF_FILE'
  94. char *documentation[] = {
  95. X" ",
  96. X"NAME",
  97. X#ifdef SEP
  98. X"    Imagpen - SEPlib vplot filter for Imagen 8/300 laser printer",
  99. X#else
  100. X"    imagpen - vplot filter for Imagen 8/300 laser printer",
  101. X#endif
  102. X" ",
  103. X"    output is in IMPRESS language, if not redirected, it is sent to ipr",
  104. X" ",
  105. X"SYNOPSIS",
  106. X#ifdef SEP
  107. X"    I[mag]pen [options] in=vplot-inputfile OR headerfile on standard in",
  108. X#else 
  109. X"    i[mag]pen [options] [inputfiles]",
  110. X#endif
  111. X" ",
  112. X"OPTIONS",
  113. X#ifdef SEP
  114. X"    Options unique to Imagpen:",
  115. X#else
  116. X"    Options unique to imagpen:",
  117. X#endif
  118. X"    paper=letter    If paper=legal, 8.5x14 inch paper in use",
  119. X"    label=string    Label pages with string.  If string=no, no label",
  120. X"                      default label is user name and date",
  121. X"    strip=no        If strip=y, then makes an IMPRESS output file",
  122. X"                      without document control language",
  123. X"    tex=no          If tex=y, then strip=y and rotate plot to correct",
  124. X"                      orientation for use with TEX",
  125. X"    brute=yes       If the imagen chops your plot up, make this yes",
  126. X"                      and pray to the gods of imagen (a little slower)",
  127. X"    hold=reason     Tells the imagen to not print the job until you",
  128. X"                      release it from the imagen console with \"rj\"",
  129. X"    ncopies=n       Requests multiple copies (works only if strip=no)",
  130. X#include "../include/gendoc.h"
  131. X"FILES",
  132. X"    scratch file /scr/tmp/Impress_XXXXXX, which it deletes",
  133. X"SEE ALSO",
  134. X"    man pen"
  135. X};
  136. int    doclength = { sizeof documentation/sizeof documentation[0] };
  137. END_OF_FILE
  138. if test 1547 -ne `wc -c <'Imagen_device/imaglib/imagdoc.h'`; then
  139.     echo shar: \"'Imagen_device/imaglib/imagdoc.h'\" unpacked with wrong size!
  140. fi
  141. # end of 'Imagen_device/imaglib/imagdoc.h'
  142. fi
  143. if test -f 'Imagen_device/imaglib/imagvector.c' -a "${1}" != "-c" ; then 
  144.   echo shar: Will not clobber existing file \"'Imagen_device/imaglib/imagvector.c'\"
  145. else
  146. echo shar: Extracting \"'Imagen_device/imaglib/imagvector.c'\" \(1510 characters\)
  147. sed "s/^X//" >'Imagen_device/imaglib/imagvector.c' <<'END_OF_FILE'
  148. X/*
  149. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  150. X * University. Official permission to use this software is included in
  151. X * the documentation. It authorizes you to use this file for any
  152. X * non-commercial purpose, provided that this copyright notice is not
  153. X * removed and that any modifications made to this file are commented
  154. X * and dated in the style of my example below.
  155. X */
  156. X
  157. X/*
  158. X *
  159. X *  source file:   ./filters/imaglib/imagvector.c
  160. X *
  161. X * Joe Dellinger (SEP), June 11 1987
  162. X *    Inserted this sample edit history entry.
  163. X *    Please log any further modifications made to this file:
  164. X */
  165. X
  166. X#define MAX_PEN 12
  167. X#include <stdio.h>
  168. X#include "../include/extern.h"
  169. X#include "imagen.h"
  170. int             current_fat = 1;
  171. X
  172. X
  173. imagvector (x1, y1, x2, y2, nfat, dashon)
  174. X    int             x1, y1, x2, y2;
  175. X    int             nfat, dashon;
  176. X{
  177. static int      xlst, ylst;
  178. X
  179. X    if (nfat < 0)
  180. X    return;
  181. X
  182. X    if (dashon)
  183. X    {
  184. X    dashvec (x1, y1, x2, y2, nfat, dashon);
  185. X    return;
  186. X    }
  187. X
  188. X    if (nfat + 1 > MAX_PEN)    /* Fatter than imagen can handle itself */
  189. X    {
  190. X    fatvec (x1, y1, x2, y2, nfat, dashon);
  191. X    return;
  192. X    }
  193. X
  194. X    if (clip (&x1, &y1, &x2, &y2))
  195. X    return;
  196. X
  197. X    if (current_fat != (nfat + 1))
  198. X    {
  199. X    endpath (DRAW_PATH, imag_curcolor);
  200. X    current_fat = (nfat + 1);
  201. X    fprintf (pltout, "%c%c", SET_PEN, lob (current_fat));
  202. X    }
  203. X
  204. X    if ((x1 != xlst) || (y1 != ylst) || lost == 1)
  205. X    {
  206. X    /* Make sure it is a move, not a draw */
  207. X    imagplot (x1, y1, 0);
  208. X    }
  209. X    imagplot (x2, y2, 1);
  210. X    xlst = x2;
  211. X    ylst = y2;
  212. X}
  213. END_OF_FILE
  214. if test 1510 -ne `wc -c <'Imagen_device/imaglib/imagvector.c'`; then
  215.     echo shar: \"'Imagen_device/imaglib/imagvector.c'\" unpacked with wrong size!
  216. fi
  217. # end of 'Imagen_device/imaglib/imagvector.c'
  218. fi
  219. if test -f 'Masscomp_device/gpslib/gpsattr.c' -a "${1}" != "-c" ; then 
  220.   echo shar: Will not clobber existing file \"'Masscomp_device/gpslib/gpsattr.c'\"
  221. else
  222. echo shar: Extracting \"'Masscomp_device/gpslib/gpsattr.c'\" \(1394 characters\)
  223. sed "s/^X//" >'Masscomp_device/gpslib/gpsattr.c' <<'END_OF_FILE'
  224. X/*
  225. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  226. X * University. Official permission to use this software is included in
  227. X * the documentation. It authorizes you to use this file for any
  228. X * non-commercial purpose, provided that this copyright notice is not
  229. X * removed and that any modifications made to this file are commented
  230. X * and dated in the style of my example below.
  231. X */
  232. X
  233. X/*
  234. X *
  235. X *  source file:   ./filters/gpslib/gpsattr.c
  236. X *
  237. X * Stewart A. Levin (SEP), July 3 1987
  238. X *    Cribbed rasattr.c for gps filter
  239. X */
  240. X
  241. X/*
  242. X * control graphics attributes
  243. X */
  244. X#include <stdio.h>
  245. X#include "../include/attrcom.h"
  246. X#include "gpspen.h"
  247. extern int      color_mult;
  248. static int      regismap[8] = {0, 24, 26, 22, 25, 21, 23, 20};
  249. X
  250. gpsattr (command, value, v1, v2, v3)
  251. X    register int    command, value;
  252. X    int             v1, v2, v3;
  253. X{
  254. int             bundle;
  255. X    switch (command)
  256. X    {
  257. X    case SET_COLOR:
  258. X    if (value < 8)
  259. X        bundle = regismap[value];
  260. X    else
  261. X        bundle = color_mult * value;
  262. X    line_style (bundle);
  263. X    /* text_style(bundle); /* unused; we don't do native text */
  264. X    break;
  265. X    case SET_COLOR_TABLE:
  266. X    /* Creare's crpf uses a fancy external table ... we'll do this later */
  267. X    break;
  268. X    case SET_WINDOW:
  269. X    /* use dumb clipping, I don't think gps windows and viewports */
  270. X    /* are of use for vplot's windowing                           */
  271. X    default:
  272. X    break;
  273. X    }
  274. X
  275. return 0;
  276. X}
  277. END_OF_FILE
  278. if test 1394 -ne `wc -c <'Masscomp_device/gpslib/gpsattr.c'`; then
  279.     echo shar: \"'Masscomp_device/gpslib/gpsattr.c'\" unpacked with wrong size!
  280. fi
  281. # end of 'Masscomp_device/gpslib/gpsattr.c'
  282. fi
  283. if test -f 'Printronix_device/lprlib/lprclose.c' -a "${1}" != "-c" ; then 
  284.   echo shar: Will not clobber existing file \"'Printronix_device/lprlib/lprclose.c'\"
  285. else
  286. echo shar: Extracting \"'Printronix_device/lprlib/lprclose.c'\" \(1381 characters\)
  287. sed "s/^X//" >'Printronix_device/lprlib/lprclose.c' <<'END_OF_FILE'
  288. X/*
  289. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  290. X * University. Official permission to use this software is included in
  291. X * the documentation. It authorizes you to use this file for any
  292. X * non-commercial purpose, provided that this copyright notice is not
  293. X * removed and that any modifications made to this file are commented
  294. X * and dated in the style of my example below.
  295. X */
  296. X
  297. X/*
  298. X *
  299. X *  source file:   ./filters/lprlib/lprclose.c
  300. X *
  301. X * Joe Dellinger (SEP), June 11 1987
  302. X *    Inserted this sample edit history entry.
  303. X *    Please log any further modifications made to this file:
  304. X */
  305. X
  306. X/* Routine to finish up */
  307. X#include <stdio.h>
  308. X#include "../include/closestat.h"
  309. X#include "../include/enum.h"
  310. X#include "../include/extern.h"
  311. X#include "lprpen.h"
  312. X
  313. lprclose (status)
  314. X    int             status;
  315. X{
  316. char            system_call[120];
  317. X
  318. X    switch (status)
  319. X    {
  320. X    case CLOSE_NORMAL:
  321. X    if (file_created)
  322. X    {
  323. X        fclose (pltout);
  324. X        sprintf (system_call, "lpr -l  %s\n", spoolfile);
  325. X        system (system_call);
  326. X    }
  327. X    break;
  328. X    case CLOSE_FLUSH:
  329. X    fflush (pltout);
  330. X    break;
  331. X    case CLOSE_ERROR:
  332. X    case CLOSE_NOTHING:
  333. X    case CLOSE_INTERRUPT:
  334. X    break;
  335. X    case CLOSE_DONE:
  336. X    /*
  337. X     * If we created a temporary file, remove it 
  338. X     */
  339. X    if (file_created)
  340. X        unlink (spoolfile);
  341. X    break;
  342. X    case CLOSE_PAUSE:
  343. X    break;
  344. X    default:            /* not meant for us, ignore */
  345. X    break;
  346. X    }
  347. X}
  348. END_OF_FILE
  349. if test 1381 -ne `wc -c <'Printronix_device/lprlib/lprclose.c'`; then
  350.     echo shar: \"'Printronix_device/lprlib/lprclose.c'\" unpacked with wrong size!
  351. fi
  352. # end of 'Printronix_device/lprlib/lprclose.c'
  353. fi
  354. if test -f 'RasterTek_device/rteklib/rtekutil.c' -a "${1}" != "-c" ; then 
  355.   echo shar: Will not clobber existing file \"'RasterTek_device/rteklib/rtekutil.c'\"
  356. else
  357. echo shar: Extracting \"'RasterTek_device/rteklib/rtekutil.c'\" \(1457 characters\)
  358. sed "s/^X//" >'RasterTek_device/rteklib/rtekutil.c' <<'END_OF_FILE'
  359. X/*
  360. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  361. X * University. Official permission to use this software is included in
  362. X * the documentation. It authorizes you to use this file for any
  363. X * non-commercial purpose, provided that this copyright notice is not
  364. X * removed and that any modifications made to this file are commented
  365. X * and dated in the style of my example below.
  366. X */
  367. X
  368. X/*
  369. X *
  370. X *  source file:   ./filters/rteklib/rtekutil.c
  371. X *
  372. X * Joe Dellinger (SEP), June 11 1987
  373. X *    Inserted this sample edit history entry.
  374. X *    Please log any further modifications made to this file:
  375. X */
  376. X
  377. X/* utilities for sending Raster Tech commands */
  378. X#include "rtekpen.h"
  379. X
  380. X/* be sure that a command string has an even byte count; add a NOP */
  381. byte (arg)
  382. X    char            arg;
  383. X{
  384. X    fputc (arg & 0xFF, rtekfd);
  385. X}
  386. X
  387. word (arg)
  388. X    short           arg;
  389. X{
  390. X    fputc ((arg & 0xFF00) >> 8, rtekfd);
  391. X    fputc (arg & 0xFF, rtekfd);
  392. X}
  393. X
  394. rtek_flsbuf (len)
  395. X    int             len;
  396. X{
  397. int             newlen;
  398. extern char    *malloc ();
  399. X
  400. X    if (rtekfd->_cnt & 1)    /* odd byte count left in stdio buffer */
  401. X    byte (NOP);        /* pad to even length */
  402. X    fflush (rtekfd);
  403. X
  404. X    /* now check if there's enough buffer space after flushing */
  405. X    if (len > rtekfd->_bufsiz)
  406. X    {                /* expand buffer */
  407. X    free (rtekfd->_base);
  408. X    newlen = len + (len & 1);
  409. X    rtekfd->_base = malloc (newlen);
  410. X    rtekfd->_ptr = rtekfd->_base;
  411. X    rtekfd->_bufsiz = newlen;
  412. X    rtekfd->_cnt = newlen;
  413. X    }
  414. X}
  415. END_OF_FILE
  416. if test 1457 -ne `wc -c <'RasterTek_device/rteklib/rtekutil.c'`; then
  417.     echo shar: \"'RasterTek_device/rteklib/rtekutil.c'\" unpacked with wrong size!
  418. fi
  419. # end of 'RasterTek_device/rteklib/rtekutil.c'
  420. fi
  421. if test -f 'Tek_device/cteklib/ctekcolor.c' -a "${1}" != "-c" ; then 
  422.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekcolor.c'\"
  423. else
  424. echo shar: Extracting \"'Tek_device/cteklib/ctekcolor.c'\" \(1366 characters\)
  425. sed "s/^X//" >'Tek_device/cteklib/ctekcolor.c' <<'END_OF_FILE'
  426. X/*
  427. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  428. X * University. Official permission to use this software is included in
  429. X * the documentation. It authorizes you to use this file for any
  430. X * non-commercial purpose, provided that this copyright notice is not
  431. X * removed and that any modifications made to this file are commented
  432. X * and dated in the style of my example below.
  433. X */
  434. X
  435. X/*
  436. X *
  437. X *  source file:   ./filters/cteklib/ctekcolor.c
  438. X *
  439. X * Joe Dellinger (SEP), June 11 1987
  440. X *    Inserted this sample edit history entry.
  441. X *    Please log any further modifications made to this file:
  442. X */
  443. X
  444. X#include    <stdio.h>
  445. X#include    "ctek.h"
  446. X
  447. X/*
  448. X * Uses the REGIS (ugh) color mapping for the solid colors,
  449. X * which will probably cause no end of confusion if you start
  450. X * changing the primary colors for nicer plots.
  451. X */
  452. X
  453. int             draw_border = 0;    /* If nonzero, draw a border on a
  454. X                     * polygon */
  455. X
  456. ctekcolor (color)
  457. X{
  458. extern FILE    *pltout;
  459. int             c;
  460. X/*
  461. X * Sometimes it is hard for vplot to realize that it doesn't need to
  462. X * change the color. It has to be safe. Here we KNOW, so we can check.
  463. X */
  464. static int      real_color = -1;
  465. X
  466. X/*
  467. X * Colors will always be less than num_col
  468. X */
  469. X
  470. X    c = ctekcolmap (color);
  471. X
  472. X    if (c != real_color)
  473. X    {
  474. X    real_color = c;
  475. X    cteksetmode (TEK);
  476. X    fprintf (pltout, "%cML", ESC);
  477. X    tekipack (c);
  478. X    }
  479. X    return;
  480. X}
  481. END_OF_FILE
  482. if test 1366 -ne `wc -c <'Tek_device/cteklib/ctekcolor.c'`; then
  483.     echo shar: \"'Tek_device/cteklib/ctekcolor.c'\" unpacked with wrong size!
  484. fi
  485. # end of 'Tek_device/cteklib/ctekcolor.c'
  486. fi
  487. if test -f 'Tek_device/cteklib/ctekgetpoint.c' -a "${1}" != "-c" ; then 
  488.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekgetpoint.c'\"
  489. else
  490. echo shar: Extracting \"'Tek_device/cteklib/ctekgetpoint.c'\" \(1341 characters\)
  491. sed "s/^X//" >'Tek_device/cteklib/ctekgetpoint.c' <<'END_OF_FILE'
  492. X/*
  493. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  494. X * University. Official permission to use this software is included in
  495. X * the documentation. It authorizes you to use this file for any
  496. X * non-commercial purpose, provided that this copyright notice is not
  497. X * removed and that any modifications made to this file are commented
  498. X * and dated in the style of my example below.
  499. X */
  500. X
  501. X/*
  502. X *
  503. X *  source file:   ./filters/cteklib/ctekgetpoint.c
  504. X *
  505. X * Joe Dellinger (SEP), June 11 1987
  506. X *    Inserted this sample edit history entry.
  507. X *    Please log any further modifications made to this file:
  508. X */
  509. X
  510. X#include <stdio.h>
  511. X#include "ctek.h"
  512. X
  513. extern FILE    *pltout;
  514. extern int      allowecho;
  515. X
  516. ctekgetpoint (termout, x, y)
  517. X    FILE           *termout;
  518. X    int            *x, *y;
  519. X{
  520. char            string[80];
  521. X
  522. X    fflush (pltout);
  523. X    cteksetmode (VECTOR);
  524. X    system ("stty echo");
  525. X    fprintf (pltout, "%c%c", ESC, SB);    /* Ask for position of cursor */
  526. X    fflush (pltout);
  527. X    fflush (termout);
  528. X    fread (string, 1, 6, termout);    /* Get answer */
  529. X    fflush (termout);
  530. X    if (string[0] == ESC)
  531. X    return (1);
  532. X
  533. X    *x = (((string[1] & 037) << 5) | (string[2] & 037));
  534. X    *y = (((string[3] & 037) << 5) | (string[4] & 037));
  535. X    *x = *x * 4;
  536. X    *y = *y * 4;
  537. X
  538. X    if (!allowecho)
  539. X    system ("stty -echo");
  540. X
  541. X    lost = 1;
  542. X    return (0);
  543. X}
  544. END_OF_FILE
  545. if test 1341 -ne `wc -c <'Tek_device/cteklib/ctekgetpoint.c'`; then
  546.     echo shar: \"'Tek_device/cteklib/ctekgetpoint.c'\" unpacked with wrong size!
  547. fi
  548. # end of 'Tek_device/cteklib/ctekgetpoint.c'
  549. fi
  550. if test -f 'Tek_device/cteklib/ctekpoly.c' -a "${1}" != "-c" ; then 
  551.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekpoly.c'\"
  552. else
  553. echo shar: Extracting \"'Tek_device/cteklib/ctekpoly.c'\" \(1494 characters\)
  554. sed "s/^X//" >'Tek_device/cteklib/ctekpoly.c' <<'END_OF_FILE'
  555. X/*
  556. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  557. X * University. Official permission to use this software is included in
  558. X * the documentation. It authorizes you to use this file for any
  559. X * non-commercial purpose, provided that this copyright notice is not
  560. X * removed and that any modifications made to this file are commented
  561. X * and dated in the style of my example below.
  562. X */
  563. X
  564. X/*
  565. X *
  566. X *  source file:   ./filters/cteklib/ctekpoly.c
  567. X *
  568. X * Joe Dellinger (SEP), June 11 1987
  569. X *    Inserted this sample edit history entry.
  570. X *    Please log any further modifications made to this file:
  571. X */
  572. X
  573. X/*
  574. X * Polygon routines.
  575. X * Shading option is handled at higher level, since these routines produce
  576. X * filled polygons.
  577. X * Uses draw_border set by termcolor().
  578. X */
  579. X/*
  580. X * JAD ----
  581. X * Since VPLOT will always draw the border, always have it set to NO!
  582. X */
  583. X#include    <stdio.h>
  584. X#include    "ctek.h"
  585. X#include    "../include/enum.h"
  586. extern FILE    *pltout;
  587. X
  588. extern int      draw_border;
  589. int             poly_started;
  590. X
  591. ctekstartpoly (npts)
  592. X    int             npts;
  593. X{
  594. X    poly_started = NO;
  595. X}
  596. X
  597. ctekmidpoly (x, y)
  598. X    int             x, y;
  599. X{
  600. X
  601. X    if (!poly_started)
  602. X    {
  603. X    cteksetmode (TEK);
  604. X    fprintf (pltout, "%cLP", ESC);
  605. X    ctekxypack (x, y);
  606. X    tekipack (draw_border);
  607. X    cteksetmode (VECTOR);
  608. X    poly_started = YES;
  609. X    }
  610. X    else
  611. X    ctekxypack (x, y);
  612. X}
  613. X
  614. ctekendpoly (last)
  615. X    int             last;
  616. X{
  617. X    if (!last)
  618. X    poly_started = NO;
  619. X    else
  620. X    {
  621. X    cteksetmode (TEK);
  622. X    fprintf (pltout, "%cLE", ESC);
  623. X    }
  624. X}
  625. END_OF_FILE
  626. if test 1494 -ne `wc -c <'Tek_device/cteklib/ctekpoly.c'`; then
  627.     echo shar: \"'Tek_device/cteklib/ctekpoly.c'\" unpacked with wrong size!
  628. fi
  629. # end of 'Tek_device/cteklib/ctekpoly.c'
  630. fi
  631. if test -f 'Tek_device/teklib/tekmessage.c' -a "${1}" != "-c" ; then 
  632.   echo shar: Will not clobber existing file \"'Tek_device/teklib/tekmessage.c'\"
  633. else
  634. echo shar: Extracting \"'Tek_device/teklib/tekmessage.c'\" \(1441 characters\)
  635. sed "s/^X//" >'Tek_device/teklib/tekmessage.c' <<'END_OF_FILE'
  636. X/*
  637. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  638. X * University. Official permission to use this software is included in
  639. X * the documentation. It authorizes you to use this file for any
  640. X * non-commercial purpose, provided that this copyright notice is not
  641. X * removed and that any modifications made to this file are commented
  642. X * and dated in the style of my example below.
  643. X */
  644. X
  645. X/*
  646. X *
  647. X *  source file:   ./filters/teklib/tekmessage.c
  648. X *
  649. X * Joe Dellinger (SEP), June 11 1987
  650. X *    Inserted this sample edit history entry.
  651. X *    Please log any further modifications made to this file:
  652. X */
  653. X
  654. X/*
  655. X * Device dependent subroutine to handle message operations
  656. X */
  657. X#include    <stdio.h>
  658. X#include    "tek.h"
  659. X#include    "../include/mesgcom.h"
  660. X#include    "../include/enum.h"
  661. extern FILE    *pltout;
  662. X
  663. int             messagecount = 0;
  664. X
  665. tekmessage (command, string)
  666. X    int             command;
  667. X    char            string[];
  668. X{
  669. register int    i;
  670. X
  671. X    switch (command)
  672. X    {
  673. X    case MESG_HOME:
  674. X    case MESG_READY:
  675. X    setmode (VECTOR);
  676. X    tekxypack (0, 773);
  677. X    setmode (ALPHA);
  678. X    for (i = messagecount; i > 0; i--)
  679. X        fprintf (pltout, "\n");
  680. X    lost = YES;
  681. X    fflush (pltout);
  682. X    break;
  683. X    case MESG_TEXT:
  684. X    fprintf (pltout, "%s", string);
  685. X    messagecount++;
  686. X    lost = YES;
  687. X    break;
  688. X    case MESG_ON:
  689. X    case MESG_OFF:
  690. X    case MESG_ERASE:
  691. X    case MESG_HIGHLIGHT_ON:
  692. X    case MESG_HIGHLIGHT_OFF:
  693. X    case MESG_DONE:
  694. X    default:
  695. X    fflush (pltout);
  696. X    break;
  697. X    }
  698. X}
  699. END_OF_FILE
  700. if test 1441 -ne `wc -c <'Tek_device/teklib/tekmessage.c'`; then
  701.     echo shar: \"'Tek_device/teklib/tekmessage.c'\" unpacked with wrong size!
  702. fi
  703. # end of 'Tek_device/teklib/tekmessage.c'
  704. fi
  705. if test -f 'Virtual_device/raslib/known_bugs' -a "${1}" != "-c" ; then 
  706.   echo shar: Will not clobber existing file \"'Virtual_device/raslib/known_bugs'\"
  707. else
  708. echo shar: Extracting \"'Virtual_device/raslib/known_bugs'\" \(1354 characters\)
  709. sed "s/^X//" >'Virtual_device/raslib/known_bugs' <<'END_OF_FILE'
  710. This pen filter is for a generic color raster device.
  711. Raster on it is horribly inefficient, as all I did was
  712. grab a routine to rasterize a line and then pile up all
  713. the generic routines possible on top of that.
  714. Hence Raster gets turned into vectors by genraster,
  715. and then the vectors get rasterized again by rasvector.
  716. Ug! Absurd!
  717. Obviously "rasraster" should be written, but what I've
  718. got here works and I'm too lazy to make it more efficient.
  719. X
  720. The non-SEPlib version, "raspen", is not used at SEP. The non-SEP
  721. version does work, however. If you don't have "Movie" and SEPlib
  722. available, you will probably want to remove the obnoxious message
  723. in rasclose.c telling you to only use the SEPlib version of the
  724. program.
  725. X
  726. The SEP version of the program bypasses the normal SEPlib handling
  727. of output. This is necessary because Raspen needs to putch n3 onto
  728. the output header and can't know what it is going to be until after
  729. it has processed all of the incoming vplot. The bad effect of this is
  730. that if you use pipes you are likely to be left with undeleted
  731. temporary files. It does use the standard SEPlib conventions for
  732. finding the datapath and file name prefix when making a data file, though.
  733. The incoming history is lost, however. This is often not a bad thing
  734. as usually all of the getpar parameters to be found in it are junk at best.
  735. X
  736. X- Joe Dellinger
  737. END_OF_FILE
  738. if test 1354 -ne `wc -c <'Virtual_device/raslib/known_bugs'`; then
  739.     echo shar: \"'Virtual_device/raslib/known_bugs'\" unpacked with wrong size!
  740. fi
  741. # end of 'Virtual_device/raslib/known_bugs'
  742. fi
  743. if test -f 'Virtual_device/raslib/raserase.c' -a "${1}" != "-c" ; then 
  744.   echo shar: Will not clobber existing file \"'Virtual_device/raslib/raserase.c'\"
  745. else
  746. echo shar: Extracting \"'Virtual_device/raslib/raserase.c'\" \(1456 characters\)
  747. sed "s/^X//" >'Virtual_device/raslib/raserase.c' <<'END_OF_FILE'
  748. X/*
  749. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  750. X * University. Official permission to use this software is included in
  751. X * the documentation. It authorizes you to use this file for any
  752. X * non-commercial purpose, provided that this copyright notice is not
  753. X * removed and that any modifications made to this file are commented
  754. X * and dated in the style of my example below.
  755. X */
  756. X
  757. X/*
  758. X *
  759. X *  source file:   ./filters/raslib/raserase.c
  760. X *
  761. X * Joe Dellinger (SEP), June 11 1987
  762. X *    Inserted this sample edit history entry.
  763. X *    Please log any further modifications made to this file:
  764. X */
  765. X
  766. X/*
  767. X * Erase the graphics area
  768. X */
  769. X#include    <stdio.h>
  770. X#include    "../include/erasecom.h"
  771. X#include    "../include/enum.h"
  772. X#include    "../include/err.h"
  773. X#include    "../include/extern.h"
  774. X#include "raspen.h"
  775. extern FILE    *pltout;
  776. extern int      zap ();
  777. X
  778. raserase (command)
  779. X    int             command;
  780. X{
  781. X
  782. X    switch (command)
  783. X    {
  784. X    case ERASE_START:
  785. X    default:
  786. X    break;
  787. X    case ERASE_MIDDLE:
  788. X    case ERASE_END:
  789. X/*
  790. X * Output raster file, and then CLEAR it out (erase)
  791. X */
  792. X    if (write (fileno (pltout), image, dev_xmax * dev_ymax) != dev_xmax * dev_ymax)
  793. X    {
  794. X        ERR (FATAL, name, "Can't write raster image\n");
  795. X    }
  796. X    zap ();
  797. X    break;
  798. X    case ERASE_BREAK:
  799. X/*
  800. X * Output raster file, but don't CLEAR it!
  801. X */
  802. X    if (write (fileno (pltout), image, dev_xmax * dev_ymax) != dev_xmax * dev_ymax)
  803. X    {
  804. X        ERR (FATAL, name, "Can't write raster image\n");
  805. X    }
  806. X    break;
  807. X    }
  808. X}
  809. END_OF_FILE
  810. if test 1456 -ne `wc -c <'Virtual_device/raslib/raserase.c'`; then
  811.     echo shar: \"'Virtual_device/raslib/raserase.c'\" unpacked with wrong size!
  812. fi
  813. # end of 'Virtual_device/raslib/raserase.c'
  814. fi
  815. if test -f 'Virtual_device/vplib/vppoly.c' -a "${1}" != "-c" ; then 
  816.   echo shar: Will not clobber existing file \"'Virtual_device/vplib/vppoly.c'\"
  817. else
  818. echo shar: Extracting \"'Virtual_device/vplib/vppoly.c'\" \(1525 characters\)
  819. sed "s/^X//" >'Virtual_device/vplib/vppoly.c' <<'END_OF_FILE'
  820. X/*
  821. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  822. X * University. Official permission to use this software is included in
  823. X * the documentation. It authorizes you to use this file for any
  824. X * non-commercial purpose, provided that this copyright notice is not
  825. X * removed and that any modifications made to this file are commented
  826. X * and dated in the style of my example below.
  827. X */
  828. X
  829. X/*
  830. X *
  831. X *  source file:   ./filters/vplib/vppoly.c
  832. X *
  833. X * Joe Dellinger (SEP), Dec 19 1987
  834. X *    Inserted this sample edit history entry.
  835. X *    Please log any further modifications made to this file:
  836. X */
  837. X
  838. X#include <stdio.h>
  839. X#include <vplot.h>
  840. X#include "../include/extern.h"
  841. X#include "../include/pat.h"
  842. X#include "../include/enum.h"
  843. X#include "vp.h"
  844. X
  845. static float   *xp;
  846. static float   *yp;
  847. static int      vnpts;
  848. X
  849. vpstartpoly (npts)
  850. X    int             npts;
  851. X{
  852. X    vpsetflag = NO;
  853. X    lost = YES;
  854. X    vnpts = 0;
  855. X
  856. X    xp = (float *) malloc ((unsigned) (npts * sizeof (float)));
  857. X    yp = (float *) malloc ((unsigned) (npts * sizeof (float)));
  858. X}
  859. X
  860. vpmidpoly (x, y)
  861. X    int             x, y;
  862. X{
  863. X    xp[vnpts] = (float) (x) / RPERIN;
  864. X    yp[vnpts] = (float) (y) / RPERIN;
  865. X    vnpts++;
  866. X}
  867. X
  868. vpendpoly (last)
  869. X    int             last;
  870. X{
  871. X    if (ipat == 0)
  872. X    {
  873. X    vp_area (xp, yp, vnpts, -1, pat[ipat].xdim_orig, pat[ipat].ydim_orig);
  874. X    }
  875. X    else
  876. X    {
  877. X
  878. X    if (ipat - 1 != vpcolor)
  879. X        vp_color (ipat - 1);
  880. X
  881. X    vp_fill (xp, yp, vnpts);
  882. X
  883. X    if (ipat - 1 != vpcolor)
  884. X        vp_color (vpcolor);
  885. X
  886. X    }
  887. X
  888. X    free ((char *) xp);
  889. X    free ((char *) yp);
  890. X}
  891. END_OF_FILE
  892. if test 1525 -ne `wc -c <'Virtual_device/vplib/vppoly.c'`; then
  893.     echo shar: \"'Virtual_device/vplib/vppoly.c'\" unpacked with wrong size!
  894. fi
  895. # end of 'Virtual_device/vplib/vppoly.c'
  896. fi
  897. if test -f 'Vplot_Kernel/filters/Tests/TEST_greycol' -a "${1}" != "-c" ; then 
  898.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/Tests/TEST_greycol'\"
  899. else
  900. echo shar: Extracting \"'Vplot_Kernel/filters/Tests/TEST_greycol'\" \(1488 characters\)
  901. sed "s/^X//" >'Vplot_Kernel/filters/Tests/TEST_greycol' <<'END_OF_FILE'
  902. X#plas: Vplot units used in this file
  903. e
  904. S s
  905. w -32760 -32760 32760 32760
  906. c 7
  907. f 0
  908. s 0
  909. F 0 0 0
  910. J 0 0
  911. w -32760 -32760 8190 32760
  912. z
  913. Test mapping of colors to grey levels for raster
  914. z
  915. X
  916. C 0 0 0 0
  917. C 1 0 0 255
  918. C 2 255 0 0
  919. C 3 255 0 255
  920. C 4 0 255 0
  921. C 5 0 255 255
  922. C 6 255 255 0
  923. C 7 255 255 255
  924. C 8 0 0 0
  925. C 9 37 37 37
  926. C 10 73 73 73
  927. C 11 110 110 110
  928. C 12 146 146 146
  929. C 13 183 183 183
  930. C 14 219 219 219
  931. C 15 255 255 255
  932. R 0 0
  933. X0 0
  934. X5999 5999
  935. X2 8
  936. X     1  ------ lines 0 to 0
  937. X1 2  -- start byte 0 in y_line 0
  938. X0
  939. X8
  940. X     1  ------ lines 1 to 1
  941. X1 2  -- start byte 0 in y_line 1
  942. X1
  943. X9
  944. X     1  ------ lines 2 to 2
  945. X1 2  -- start byte 0 in y_line 2
  946. X2
  947. X10
  948. X     1  ------ lines 3 to 3
  949. X1 2  -- start byte 0 in y_line 3
  950. X3
  951. X11
  952. X     1  ------ lines 4 to 4
  953. X1 2  -- start byte 0 in y_line 4
  954. X4
  955. X12
  956. X     1  ------ lines 5 to 5
  957. X1 2  -- start byte 0 in y_line 5
  958. X5
  959. X13
  960. X     1  ------ lines 6 to 6
  961. X1 2  -- start byte 0 in y_line 6
  962. X6
  963. X14
  964. X     1  ------ lines 7 to 7
  965. X1 2  -- start byte 0 in y_line 7
  966. X7
  967. X15
  968. f 6
  969. m 0 0
  970. d 0 6000
  971. d 6000 6000
  972. d 6000 0
  973. d 0 0
  974. z
  975. X
  976. z
  977. Different colors map onto different levels of Grey.
  978. z
  979. The bars should be horizontal, subdivided into left and right halves,
  980. z
  981. color on the left, grey on the right.
  982. z
  983. On a black-and-white device, both halves of each bar
  984. z
  985. should be the same shade of grey.
  986. z
  987. The colors should be ordered from top to bottom
  988. z
  989. Black, Blue, Red, Magenta, Green, Cyan, Yellow, White.
  990. z
  991. Blue is the darkest primary, Red is intermediate, and Green is brightest.
  992. z
  993. This is how Black and White TV's do it.
  994. z
  995. X
  996. END_OF_FILE
  997. if test 1488 -ne `wc -c <'Vplot_Kernel/filters/Tests/TEST_greycol'`; then
  998.     echo shar: \"'Vplot_Kernel/filters/Tests/TEST_greycol'\" unpacked with wrong size!
  999. fi
  1000. # end of 'Vplot_Kernel/filters/Tests/TEST_greycol'
  1001. fi
  1002. if test -f 'Vplot_Kernel/filters/Tests/TEST_size' -a "${1}" != "-c" ; then 
  1003.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/Tests/TEST_size'\"
  1004. else
  1005. echo shar: Extracting \"'Vplot_Kernel/filters/Tests/TEST_size'\" \(1419 characters\)
  1006. sed "s/^X//" >'Vplot_Kernel/filters/Tests/TEST_size' <<'END_OF_FILE'
  1007. e
  1008. S a
  1009. z
  1010. Test of absolute scaling.
  1011. z
  1012. X
  1013. z
  1014. The grid lines should be exactly one inch apart.
  1015. z
  1016. The two very fat white lines should each be one inch wide,
  1017. z
  1018. exactly filling the space between the adjacent grid lines.
  1019. z
  1020. The thinner vertical white line should be 1/10th of an inch wide.
  1021. z
  1022. The letter `A' in "A!g" should be exactly one inch tall in all orientations.
  1023. z
  1024. The red dashed lines should be on for half an inch, and then off for the same.
  1025. z
  1026. Each vertical red dash should start at the end of a horizontal red dash.
  1027. z
  1028. The yellow single `A' should be one inch high.
  1029. z
  1030. It should exactly span the gap between adjacent grid lines.
  1031. z
  1032. X
  1033. c 7
  1034. f 200
  1035. m 1500 600
  1036. d 1500 3000
  1037. f 0
  1038. c 0
  1039. m 1200 1200
  1040. d 1800 1800
  1041. c 7
  1042. f 20
  1043. m 2700 0
  1044. d 2700 6000
  1045. f 10
  1046. J 2 3
  1047. m 3900 3900
  1048. T 33 0
  1049. A!g
  1050. m 3300 2700
  1051. T 33 -90
  1052. A!g
  1053. m 4200 600
  1054. T 33 30
  1055. A!g
  1056. c 6
  1057. M 1 65 33
  1058. X4800 300
  1059. M 1 2 33
  1060. X300 300
  1061. M 1 3 33
  1062. X900 300
  1063. M 1 5 33
  1064. X1500 300
  1065. M 1 4 33
  1066. X2100 300
  1067. c 7
  1068. f 200
  1069. m 600 1500
  1070. d 4200 1500
  1071. f 0
  1072. c 5
  1073. m 0 0
  1074. d 0 6000
  1075. m 600 0
  1076. d 600 6000
  1077. m 1200 0
  1078. d 1200 6000
  1079. m 1800 0
  1080. d 1800 6000
  1081. m 2400 0
  1082. d 2400 6000
  1083. m 3000 0
  1084. d 3000 6000
  1085. m 3600 0
  1086. d 3600 6000
  1087. m 4200 0
  1088. d 4200 6000
  1089. m 4800 0
  1090. d 4800 6000
  1091. m 5400 0
  1092. d 5400 6000
  1093. m 6000 0
  1094. d 6000 6000
  1095. s 1
  1096. X300 300
  1097. c 2
  1098. m 0 0
  1099. d 6000 0
  1100. m 0 600
  1101. d 6000 600
  1102. m 0 1200
  1103. d 6000 1200
  1104. m 0 1800
  1105. d 6000 1800
  1106. m 0 2400
  1107. d 6000 2400
  1108. m 0 3000
  1109. d 6000 3000
  1110. m 0 3600
  1111. d 6000 3600
  1112. m 0 4200
  1113. d 6000 4200
  1114. m 0 4800
  1115. d 6000 4800
  1116. m 0 5400
  1117. d 6000 5400
  1118. m 0 6000
  1119. d 6000 6000
  1120. m 300 0
  1121. d 300 6000
  1122. END_OF_FILE
  1123. if test 1419 -ne `wc -c <'Vplot_Kernel/filters/Tests/TEST_size'`; then
  1124.     echo shar: \"'Vplot_Kernel/filters/Tests/TEST_size'\" unpacked with wrong size!
  1125. fi
  1126. # end of 'Vplot_Kernel/filters/Tests/TEST_size'
  1127. fi
  1128. if test -f 'Vplot_Kernel/filters/Tests/TEST_text' -a "${1}" != "-c" ; then 
  1129.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/Tests/TEST_text'\"
  1130. else
  1131. echo shar: Extracting \"'Vplot_Kernel/filters/Tests/TEST_text'\" \(1331 characters\)
  1132. sed "s/^X//" >'Vplot_Kernel/filters/Tests/TEST_text' <<'END_OF_FILE'
  1133. e
  1134. S s
  1135. z
  1136. Test of text
  1137. z
  1138. X
  1139. F -1 2 0
  1140. c 1
  1141. m 1700 3400
  1142. d 1700 4000
  1143. m 600 600
  1144. d 600 3000
  1145. c 7
  1146. J 0 0
  1147. m 600 600
  1148. G 1000 0 1000 1000
  1149. Tilted 45 degrees,
  1150. G 1000 0 0 2000
  1151. X Tall,
  1152. G 1000 0 0 -1000
  1153. X upside down,
  1154. G 100 0 0 100
  1155. X Ridiculously and Absurdly Small,
  1156. G 2000 0 0 1000
  1157. X and Wide.
  1158. m 600 1200
  1159. T 10 0
  1160. X\s80 This li
  1161. T 10 0
  1162. X\s80 ne should b
  1163. T 10 0
  1164. X\s80 e continuous.
  1165. c 4
  1166. m 600 1800
  1167. T 15 0
  1168. X[\\]^_`\s40 Ligatures: ffifllfli!
  1169. z
  1170. Each text command should leave the current position such that the next
  1171. z
  1172. text command will correctly continue where the last left off.
  1173. z
  1174. There should be a line saying "This line should be continuous."
  1175. z
  1176. X
  1177. m 600 2300
  1178. T 8 8
  1179. Angle u
  1180. c 5
  1181. T 8 0
  1182. p, then fl
  1183. c 6
  1184. T 8 -6
  1185. at then down a bit-
  1186. T 7 -45
  1187. X- wh
  1188. T 6 -50
  1189. oops, 
  1190. T 5 -60
  1191. off 
  1192. T 4 -70
  1193. the 
  1194. T 3 -80
  1195. edg
  1196. T 2 -90
  1197. e!
  1198. c 7
  1199. m 600 3000
  1200. J 0 3
  1201. T 25 0
  1202. X{|}~
  1203. f 15
  1204. m 4000 3000
  1205. d 4000 3000
  1206. f 0
  1207. J 0 0
  1208. T 4 0
  1209. X\F1 =Normal=
  1210. J 3 4
  1211. f 15
  1212. m 4000 3000
  1213. d 4000 3000
  1214. f 0
  1215. z
  1216. X
  1217. z
  1218. The words "Right Cap" should have an error glyph in the space between them.
  1219. T 8 0
  1220. RightCap
  1221. z
  1222. Attempting to use that glyph should have just generated an error message.
  1223. J 2 3
  1224. f 15
  1225. m 3000 3600
  1226. d 3000 3600
  1227. f 0
  1228. T 5 90
  1229. X=Center=
  1230. f 1
  1231. J 4 6
  1232. m 1700 3400
  1233. T 10 0
  1234. X6.\m0 4\s60 83\s40 3\s100 94\M0 
  1235. m 1700 3800
  1236. T 3 0
  1237. XX
  1238. m 1700 4000
  1239. T 8 0
  1240. x\^x\_x.\m0 iii\M0 
  1241. m 1700 3654
  1242. T 4 4
  1243. X\^D\_o\_t\_s\^\^ are \s200 all \s150 aligned,\m0 No matter what!\M0 
  1244. END_OF_FILE
  1245. echo shar: 1 control character may be missing from \"'Vplot_Kernel/filters/Tests/TEST_text'\"
  1246. if test 1331 -ne `wc -c <'Vplot_Kernel/filters/Tests/TEST_text'`; then
  1247.     echo shar: \"'Vplot_Kernel/filters/Tests/TEST_text'\" unpacked with wrong size!
  1248. fi
  1249. # end of 'Vplot_Kernel/filters/Tests/TEST_text'
  1250. fi
  1251. if test -f 'Vplot_Kernel/filters/Tests/makefile' -a "${1}" != "-c" ; then 
  1252.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/Tests/makefile'\"
  1253. else
  1254. echo shar: Extracting \"'Vplot_Kernel/filters/Tests/makefile'\" \(1332 characters\)
  1255. sed "s/^X//" >'Vplot_Kernel/filters/Tests/makefile' <<'END_OF_FILE'
  1256. TUBE = ../rpen size=r
  1257. LVPLOT = ../../lvplot/libvplot.a
  1258. FC = f77
  1259. X
  1260. none:
  1261. X    @echo "one of:"
  1262. X    @echo "vppen vppen2 rastest ellipse libvplot_example polytest"
  1263. X    @echo "[cf]texttest markertest ufilltest Font"
  1264. X
  1265. vppen:
  1266. X    plas < TEST_erase > out.vp
  1267. X    ../vppen out.vp gridnum=4 frame=y | $(TUBE)
  1268. X    rm out.vp
  1269. X
  1270. vppen2:
  1271. X    cat TEST_aspect_ratio DEMO_Graph TEST_colors DEMO_Tectonics DEMO_Texas TEST_align TEST_clipping DEMO_Graph TEST_aspect_ratio | plas > out.vp
  1272. X    ../vppen out.vp gridnum=3 | $(TUBE)
  1273. X    rm out.vp
  1274. X
  1275. Font:
  1276. X    cc -o Font Font.c
  1277. X
  1278. rastest:
  1279. X    cc -g rastest.c $(LVPLOT) -lm -o rastest
  1280. X    rastest | $(TUBE)
  1281. X    rm rastest
  1282. X
  1283. ctexttest:
  1284. X    cc -g texttest.c $(LVPLOT) -lm -o texttest
  1285. X    texttest | $(TUBE)
  1286. X    rm texttest
  1287. X
  1288. ftexttest:
  1289. X    $(FC) -g texttest.f $(LVPLOT) -lm -o texttest
  1290. X    texttest
  1291. X    $(TUBE) < out.vp
  1292. X    rm texttest out.vp
  1293. X
  1294. polytest:
  1295. X    cc -g polytest.c $(LVPLOT) -lm -o polytest
  1296. X    polytest | $(TUBE)
  1297. X    rm polytest
  1298. X
  1299. markertest:
  1300. X    $(FC) -g markertest.f $(LVPLOT) -lm -o markertest
  1301. X    markertest
  1302. X    $(TUBE) < out.vp
  1303. X    rm markertest out.vp
  1304. X
  1305. ufilltest:
  1306. X    cc -g ufilltest.c $(LVPLOT) -lm -o ufilltest
  1307. X    ufilltest | $(TUBE)
  1308. X    rm ufilltest
  1309. X
  1310. ellipse:
  1311. X    $(FC) -g ellips.f $(LVPLOT) -o ell
  1312. X    ell
  1313. X    $(TUBE) < f.vp frame=y
  1314. X    rm ell f.vp
  1315. X
  1316. libvplot_example:
  1317. X    cc -g libvplot_example.c $(LVPLOT) -lm -o libvplot_example
  1318. X    libvplot_example < libvplot_example.dat | $(TUBE)
  1319. X    rm libvplot_example
  1320. END_OF_FILE
  1321. if test 1332 -ne `wc -c <'Vplot_Kernel/filters/Tests/makefile'`; then
  1322.     echo shar: \"'Vplot_Kernel/filters/Tests/makefile'\" unpacked with wrong size!
  1323. fi
  1324. # end of 'Vplot_Kernel/filters/Tests/makefile'
  1325. fi
  1326. if test -f 'Vplot_Kernel/filters/loclib/alloc.c' -a "${1}" != "-c" ; then 
  1327.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/loclib/alloc.c'\"
  1328. else
  1329. echo shar: Extracting \"'Vplot_Kernel/filters/loclib/alloc.c'\" \(1344 characters\)
  1330. sed "s/^X//" >'Vplot_Kernel/filters/loclib/alloc.c' <<'END_OF_FILE'
  1331. X/*
  1332. X *    allocation with error detection
  1333. X *
  1334. X * modified 1/26/83  S. Levin : added unsigned coersion to agree with malloc(3)
  1335. X *                              changed to NULL instead of 0
  1336. X * modified 3/19/83  S. Levin : keep internal 1024 byte block for small request
  1337. X *                include source for malloc inline to block missing
  1338. X *                cfree() linkage references.
  1339. X * modified 2/7/84   S. Levin : deleted calloc() call to reduce paging -- no
  1340. X *                longer is memory necessarily zeroed out of alloc.
  1341. X *
  1342. X * In order to allocate an array of floating point numbers, use
  1343. X * the following command in the calling routine:
  1344. X *
  1345. X *    float *x;
  1346. X *    x = (float *) alloc(nx*sizeof(float));
  1347. X *
  1348. X * nx is the number of elements needed in the array. 
  1349. X */
  1350. X#include <stdio.h>
  1351. X#define SMALLBLOCK -1
  1352. char *alloc (size)
  1353. int size;
  1354. X{
  1355. X    static char *myblock = NULL; static int bytesleft = 0;
  1356. X    char *ptr; extern char *malloc();
  1357. X
  1358. X    if(size > SMALLBLOCK)
  1359. X       {
  1360. X        if ((ptr = malloc ((unsigned)size)) == NULL)
  1361. X        err ("can't allocate %d bytes\n",size);
  1362. X        return (ptr);
  1363. X       }
  1364. X    else
  1365. X      { 
  1366. X        if(bytesleft < size)
  1367. X           {
  1368. X            if ((myblock = malloc ((unsigned)SMALLBLOCK)) == NULL)
  1369. X           err ("can't allocate %d bytes\n",size);
  1370. X        bytesleft = SMALLBLOCK - size;
  1371. X           }
  1372. X       else
  1373. X           {
  1374. X        bytesleft -= size;
  1375. X           }
  1376. X       ptr = myblock;
  1377. X       myblock += size;
  1378. X       return(ptr);
  1379. X      }
  1380. X}
  1381. END_OF_FILE
  1382. if test 1344 -ne `wc -c <'Vplot_Kernel/filters/loclib/alloc.c'`; then
  1383.     echo shar: \"'Vplot_Kernel/filters/loclib/alloc.c'\" unpacked with wrong size!
  1384. fi
  1385. # end of 'Vplot_Kernel/filters/loclib/alloc.c'
  1386. fi
  1387. if test -f 'Vplot_Kernel/filters/utilities/intersect.c' -a "${1}" != "-c" ; then 
  1388.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/utilities/intersect.c'\"
  1389. else
  1390. echo shar: Extracting \"'Vplot_Kernel/filters/utilities/intersect.c'\" \(1386 characters\)
  1391. sed "s/^X//" >'Vplot_Kernel/filters/utilities/intersect.c' <<'END_OF_FILE'
  1392. X/*
  1393. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1394. X * University. Official permission to use this software is included in
  1395. X * the documentation. It authorizes you to use this file for any
  1396. X * non-commercial purpose, provided that this copyright notice is not
  1397. X * removed and that any modifications made to this file are commented
  1398. X * and dated in the style of my example below.
  1399. X */
  1400. X
  1401. X/*
  1402. X *
  1403. X *  source file:   ./filters/utilities/intersect.c
  1404. X *
  1405. X * Joe Dellinger (SEP), June 11 1987
  1406. X *    Inserted this sample edit history entry.
  1407. X *    Please log any further modifications made to this file:
  1408. X */
  1409. X
  1410. X#include    "../include/vertex.h"
  1411. X
  1412. X
  1413. intersect (x, crosses, head, scany)
  1414. X    register int    x;
  1415. X    register int   *crosses;
  1416. X    struct vertex  *head;
  1417. X    int             scany;
  1418. X{
  1419. register struct vertex *v;
  1420. int             ncross, y;
  1421. X
  1422. X    ncross = 0;
  1423. X    v = head;
  1424. X    if (scany)
  1425. X    {
  1426. X    do
  1427. X    {
  1428. X        if (v->y > x && v->last->y > x)
  1429. X        continue;
  1430. X        if (v->y < x && v->last->y < x)
  1431. X        continue;
  1432. X
  1433. X        y = solve (x, v->y, v->x, v->last->y, v->last->x);
  1434. X        crosses[ncross++] = y;
  1435. X    } while ((v = v->next) != head);
  1436. X    }
  1437. X    else
  1438. X    {
  1439. X    do
  1440. X    {
  1441. X        if (v->x > x && v->last->x > x)
  1442. X        continue;
  1443. X        if (v->x < x && v->last->x < x)
  1444. X        continue;
  1445. X
  1446. X        y = solve (x, v->x, v->y, v->last->x, v->last->y);
  1447. X        crosses[ncross++] = y;
  1448. X    } while ((v = v->next) != head);
  1449. X    }
  1450. X    return (ncross);
  1451. X}
  1452. END_OF_FILE
  1453. if test 1386 -ne `wc -c <'Vplot_Kernel/filters/utilities/intersect.c'`; then
  1454.     echo shar: \"'Vplot_Kernel/filters/utilities/intersect.c'\" unpacked with wrong size!
  1455. fi
  1456. # end of 'Vplot_Kernel/filters/utilities/intersect.c'
  1457. fi
  1458. if test -f 'Vplot_Kernel/filters/utilities/vecoutline.c' -a "${1}" != "-c" ; then 
  1459.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/utilities/vecoutline.c'\"
  1460. else
  1461. echo shar: Extracting \"'Vplot_Kernel/filters/utilities/vecoutline.c'\" \(1439 characters\)
  1462. sed "s/^X//" >'Vplot_Kernel/filters/utilities/vecoutline.c' <<'END_OF_FILE'
  1463. X/*
  1464. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1465. X * University. Official permission to use this software is included in
  1466. X * the documentation. It authorizes you to use this file for any
  1467. X * non-commercial purpose, provided that this copyright notice is not
  1468. X * removed and that any modifications made to this file are commented
  1469. X * and dated in the style of my example below.
  1470. X */
  1471. X
  1472. X/*
  1473. X *
  1474. X *  source file:   ./filters/utilities/vecoutline.c
  1475. X *
  1476. X * Joe Dellinger (SEP), June 11 1987
  1477. X *    Inserted this sample edit history entry.
  1478. X *    Please log any further modifications made to this file:
  1479. X */
  1480. X
  1481. X#include <stdio.h>
  1482. X#include "../include/params.h"
  1483. X#include "../include/pat.h"
  1484. X#include "../include/vertex.h"
  1485. X#include "../include/extern.h"
  1486. X
  1487. vecoutline (head)
  1488. X    struct vertex  *head;
  1489. X{
  1490. X    /*
  1491. X     * Draw the outline of the polygon pointed to by 'head'.  If any side of
  1492. X     * the polygon is identical to any other (that is they have identical
  1493. X     * endpoints), then neither line is drawn.  This allows among things a
  1494. X     * doughnut to be defined by a single polygon without the line that
  1495. X     * connects the inner and outer being plotted. 
  1496. X     */
  1497. register int    xlast, ylast;
  1498. register struct vertex *v;
  1499. X
  1500. X    xlast = head->last->x;
  1501. X    ylast = head->last->y;
  1502. X    v = head;
  1503. X    do
  1504. X    {
  1505. X    if (!dupside (v))
  1506. X        dev.vector (v->x, v->y, xlast, ylast, afat, 0);
  1507. X    xlast = v->x;
  1508. X    ylast = v->y;
  1509. X    } while ((v = v->next) != head);
  1510. X}
  1511. END_OF_FILE
  1512. if test 1439 -ne `wc -c <'Vplot_Kernel/filters/utilities/vecoutline.c'`; then
  1513.     echo shar: \"'Vplot_Kernel/filters/utilities/vecoutline.c'\" unpacked with wrong size!
  1514. fi
  1515. # end of 'Vplot_Kernel/filters/utilities/vecoutline.c'
  1516. fi
  1517. if test -f 'Vplot_Kernel/lvplot/vp_bgroup.c' -a "${1}" != "-c" ; then 
  1518.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_bgroup.c'\"
  1519. else
  1520. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_bgroup.c'\" \(1412 characters\)
  1521. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_bgroup.c' <<'END_OF_FILE'
  1522. X/*
  1523. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1524. X * University. Official permission to use this software is included in
  1525. X * the documentation. It authorizes you to use this file for any
  1526. X * non-commercial purpose, provided that this copyright notice is not
  1527. X * removed and that any modifications made to this file are commented
  1528. X * and dated in the style of my example below.
  1529. X */
  1530. X
  1531. X/*
  1532. X *
  1533. X *  source file:   ./lvplot/vp_bgroup.c
  1534. X *
  1535. X * Joe Dellinger (SEP), Feb 27 1988
  1536. X *    Inserted this sample edit history entry.
  1537. X *    Please log any further modifications made to this file:
  1538. X */
  1539. X
  1540. X#include <stdio.h>
  1541. X#include <vplot.h>
  1542. X#include "vp_pc.h"
  1543. X
  1544. X#ifdef FORTRAN
  1545. X
  1546. X#define BGROUP    vpwbgroup_
  1547. X
  1548. X#else
  1549. X
  1550. X#define BGROUP    vp_bgroup
  1551. X
  1552. X#endif
  1553. X
  1554. X#ifdef FORTRAN
  1555. BGROUP (string, nchars)
  1556. X#else
  1557. BGROUP (string)
  1558. X#endif
  1559. X    char           *string;
  1560. X#ifdef FORTRAN
  1561. X    int            *nchars;
  1562. X#endif
  1563. X{
  1564. X#ifdef FORTRAN
  1565. int             i, length;
  1566. X#endif
  1567. X
  1568. X    putc (VP_BEGIN_GROUP, vp_pc._pltout);
  1569. X
  1570. X#ifdef FORTRAN
  1571. X/*
  1572. X * Try to still work even if they didn't specify nchars.
  1573. X */
  1574. X    length = 80;
  1575. X    if (nchars != NULL)
  1576. X    {
  1577. X    if (*nchars >= 0)
  1578. X        length = *nchars;
  1579. X    }
  1580. X
  1581. X    for (i = 0; i < length; i++)
  1582. X    {
  1583. X    if (*(string + i) == '\0')
  1584. X        break;
  1585. X    putc (*(string + i), vp_pc._pltout);
  1586. X    }
  1587. X    putc ('\0', vp_pc._pltout);
  1588. X#else FORTRAN
  1589. X    do
  1590. X    {
  1591. X    putc (*string, vp_pc._pltout);
  1592. X    }
  1593. X    while (*string++);
  1594. X#endif FORTRAN
  1595. X}
  1596. END_OF_FILE
  1597. if test 1412 -ne `wc -c <'Vplot_Kernel/lvplot/vp_bgroup.c'`; then
  1598.     echo shar: \"'Vplot_Kernel/lvplot/vp_bgroup.c'\" unpacked with wrong size!
  1599. fi
  1600. # end of 'Vplot_Kernel/lvplot/vp_bgroup.c'
  1601. fi
  1602. if test -f 'Vplot_Kernel/lvplot/vp_coltab.c' -a "${1}" != "-c" ; then 
  1603.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_coltab.c'\"
  1604. else
  1605. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_coltab.c'\" \(1375 characters\)
  1606. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_coltab.c' <<'END_OF_FILE'
  1607. X/*
  1608. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1609. X * University. Official permission to use this software is included in
  1610. X * the documentation. It authorizes you to use this file for any
  1611. X * non-commercial purpose, provided that this copyright notice is not
  1612. X * removed and that any modifications made to this file are commented
  1613. X * and dated in the style of my example below.
  1614. X */
  1615. X
  1616. X/*
  1617. X *
  1618. X *  source file:   ./lvplot/vp_coltab.c
  1619. X *
  1620. X * Joe Dellinger (SEP), June 11 1987
  1621. X *    Inserted this sample edit history entry.
  1622. X *    Please log any further modifications made to this file:
  1623. X */
  1624. X
  1625. X#include <stdio.h>
  1626. X
  1627. X#include <vplot.h>
  1628. X#undef RED
  1629. X#undef BLUE
  1630. X#undef GREEN
  1631. X#include "params.h"
  1632. X#include "round.h"
  1633. X
  1634. X#include "vp_pc.h"
  1635. X
  1636. X#ifdef FORTRAN
  1637. X
  1638. X#define COLTAB vpcoltab_
  1639. X#define COLOR *color
  1640. X#define RED   *red
  1641. X#define GREEN *green
  1642. X#define BLUE  *blue
  1643. X
  1644. X#else
  1645. X
  1646. X#define COLTAB vp_coltab
  1647. X#define COLOR color
  1648. X#define RED   red
  1649. X#define GREEN green
  1650. X#define BLUE  blue
  1651. X
  1652. X#endif
  1653. X
  1654. COLTAB (color, red, green, blue)
  1655. X    int             COLOR;
  1656. X    float           RED, GREEN, BLUE;
  1657. X{
  1658. int             c, r, g, b;
  1659. X    c = COLOR;
  1660. X    r = ROUND (RED * MAX_GUN);
  1661. X    g = ROUND (GREEN * MAX_GUN);
  1662. X    b = ROUND (BLUE * MAX_GUN);
  1663. X
  1664. X    putc (VP_SET_COLOR_TABLE, vp_pc._pltout);
  1665. X    puth (c, vp_pc._pltout);
  1666. X    puth (r, vp_pc._pltout);
  1667. X    puth (g, vp_pc._pltout);
  1668. X    puth (b, vp_pc._pltout);
  1669. X}
  1670. END_OF_FILE
  1671. if test 1375 -ne `wc -c <'Vplot_Kernel/lvplot/vp_coltab.c'`; then
  1672.     echo shar: \"'Vplot_Kernel/lvplot/vp_coltab.c'\" unpacked with wrong size!
  1673. fi
  1674. # end of 'Vplot_Kernel/lvplot/vp_coltab.c'
  1675. fi
  1676. if test -f 'Vplot_Kernel/lvplot/vp_dash.c' -a "${1}" != "-c" ; then 
  1677.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_dash.c'\"
  1678. else
  1679. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_dash.c'\" \(1355 characters\)
  1680. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_dash.c' <<'END_OF_FILE'
  1681. X/*
  1682. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1683. X * University. Official permission to use this software is included in
  1684. X * the documentation. It authorizes you to use this file for any
  1685. X * non-commercial purpose, provided that this copyright notice is not
  1686. X * removed and that any modifications made to this file are commented
  1687. X * and dated in the style of my example below.
  1688. X */
  1689. X
  1690. X/*
  1691. X *
  1692. X *  source file:   ./lvplot/vp_dash.c
  1693. X *
  1694. X * Joe Dellinger (SEP), June 11 1987
  1695. X *    Inserted this sample edit history entry.
  1696. X *    Please log any further modifications made to this file:
  1697. X */
  1698. X
  1699. X#include <stdio.h>
  1700. X#include <vplot.h>
  1701. X#include "vp_pc.h"
  1702. X
  1703. X#ifdef FORTRAN
  1704. X
  1705. X#define DASH    vpdash_
  1706. X#define DASH1    *dash1
  1707. X#define GAP1    *gap1
  1708. X#define DASH2    *dash2
  1709. X#define GAP2    *gap2
  1710. X
  1711. X#else
  1712. X
  1713. X#define DASH    vp_dash
  1714. X#define DASH1    dash1
  1715. X#define GAP1    gap1
  1716. X#define DASH2    dash2
  1717. X#define GAP2    gap2
  1718. X
  1719. X#endif
  1720. X
  1721. DASH (dash1, gap1, dash2, gap2)
  1722. X    float           DASH1, GAP1, DASH2, GAP2;
  1723. X{
  1724. X    if (DASH1 < 0. || GAP1 < 0. || DASH2 < 0. || GAP2 < 0.)
  1725. X    {
  1726. X    vp_pc._dashon = 0;
  1727. X    return;
  1728. X    }
  1729. X    vp_pc._ddef[0] = DASH1;
  1730. X    vp_pc._ddef[1] = vp_pc._ddef[0] + GAP1;
  1731. X    vp_pc._ddef[2] = vp_pc._ddef[1] + DASH2;
  1732. X    vp_pc._ddef[3] = vp_pc._ddef[2] + GAP2;
  1733. X    if (vp_pc._ddef[3] <= 0.)
  1734. X    {
  1735. X    vp_pc._dashon = 0;
  1736. X    return;
  1737. X    }
  1738. X    vp_pc._dashon = 1;
  1739. X    vp_pc._dpos = 0.0;
  1740. X    return;
  1741. X}
  1742. END_OF_FILE
  1743. if test 1355 -ne `wc -c <'Vplot_Kernel/lvplot/vp_dash.c'`; then
  1744.     echo shar: \"'Vplot_Kernel/lvplot/vp_dash.c'\" unpacked with wrong size!
  1745. fi
  1746. # end of 'Vplot_Kernel/lvplot/vp_dash.c'
  1747. fi
  1748. if test -f 'Vplot_Kernel/lvplot/vp_hatchload.c' -a "${1}" != "-c" ; then 
  1749.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_hatchload.c'\"
  1750. else
  1751. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_hatchload.c'\" \(1440 characters\)
  1752. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_hatchload.c' <<'END_OF_FILE'
  1753. X/*
  1754. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1755. X * University. Official permission to use this software is included in
  1756. X * the documentation. It authorizes you to use this file for any
  1757. X * non-commercial purpose, provided that this copyright notice is not
  1758. X * removed and that any modifications made to this file are commented
  1759. X * and dated in the style of my example below.
  1760. X */
  1761. X
  1762. X/*
  1763. X *
  1764. X *  source file:   ./lvplot/vp_hatchload.c
  1765. X *
  1766. X * Joe Dellinger (SEP), June 11 1987
  1767. X *    Inserted this sample edit history entry.
  1768. X *    Please log any further modifications made to this file:
  1769. X */
  1770. X
  1771. X#include <stdio.h>
  1772. X#include <vplot.h>
  1773. X#include "vp_pc.h"
  1774. X
  1775. X#ifdef FORTRAN
  1776. X
  1777. X#define HATCHLOAD vphatchload_
  1778. X#define ANGLE   *angle
  1779. X#define NUMHATCH    *numhatch
  1780. X#define IHATCH  *ihatch
  1781. X
  1782. X#else
  1783. X
  1784. X#define HATCHLOAD vp_hatchload
  1785. X#define ANGLE   angle
  1786. X#define NUMHATCH    numhatch
  1787. X#define IHATCH  ihatch
  1788. X
  1789. X#endif
  1790. X
  1791. HATCHLOAD (angle, numhatch, ihatch, hatcharray)
  1792. X    int             ANGLE, NUMHATCH, IHATCH;
  1793. X    int            *hatcharray;
  1794. X{
  1795. int             c;
  1796. int             ii;
  1797. X
  1798. X    putc (VP_PATLOAD, vp_pc._pltout);
  1799. X    c = ANGLE;
  1800. X    puth (c, vp_pc._pltout);
  1801. X    c = -1;
  1802. X    puth (c, vp_pc._pltout);
  1803. X    c = NUMHATCH;
  1804. X    puth (c, vp_pc._pltout);
  1805. X    c = IHATCH;
  1806. X    puth (c, vp_pc._pltout);
  1807. X
  1808. X    for (ii = 0; ii < 2 * 4 * NUMHATCH; ii++)
  1809. X    {
  1810. X    c = hatcharray[ii];
  1811. X    if (ii % 4 > 1)
  1812. X        c *= RPERIN / HATCHPERIN;
  1813. X    puth (c, vp_pc._pltout);
  1814. X    }
  1815. X}
  1816. END_OF_FILE
  1817. if test 1440 -ne `wc -c <'Vplot_Kernel/lvplot/vp_hatchload.c'`; then
  1818.     echo shar: \"'Vplot_Kernel/lvplot/vp_hatchload.c'\" unpacked with wrong size!
  1819. fi
  1820. # end of 'Vplot_Kernel/lvplot/vp_hatchload.c'
  1821. fi
  1822. if test -f 'Vplot_Kernel/lvplot/vp_message.c' -a "${1}" != "-c" ; then 
  1823.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_message.c'\"
  1824. else
  1825. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_message.c'\" \(1402 characters\)
  1826. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_message.c' <<'END_OF_FILE'
  1827. X/*
  1828. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1829. X * University. Official permission to use this software is included in
  1830. X * the documentation. It authorizes you to use this file for any
  1831. X * non-commercial purpose, provided that this copyright notice is not
  1832. X * removed and that any modifications made to this file are commented
  1833. X * and dated in the style of my example below.
  1834. X */
  1835. X
  1836. X/*
  1837. X *
  1838. X *  source file:   ./lvplot/vp_message.c
  1839. X *
  1840. X * Joe Dellinger (SEP), Jan 8 1988
  1841. X *    Inserted this sample edit history entry.
  1842. X *    Please log any further modifications made to this file:
  1843. X */
  1844. X
  1845. X#include <stdio.h>
  1846. X#include <vplot.h>
  1847. X#include "vp_pc.h"
  1848. X
  1849. X#ifdef FORTRAN
  1850. X
  1851. X#define TEXT    vpwmessage_
  1852. X
  1853. X#else
  1854. X
  1855. X#define TEXT    vp_message
  1856. X
  1857. X#endif
  1858. X
  1859. X#ifdef FORTRAN
  1860. TEXT (string, nchars)
  1861. X#else
  1862. TEXT (string)
  1863. X#endif
  1864. X    char           *string;
  1865. X#ifdef FORTRAN
  1866. X    int            *nchars;
  1867. X#endif
  1868. X{
  1869. X#ifdef FORTRAN
  1870. int             i, length;
  1871. X#endif
  1872. X
  1873. X    putc (VP_MESSAGE, vp_pc._pltout);
  1874. X
  1875. X#ifdef FORTRAN
  1876. X/*
  1877. X * Try to still work even if they didn't specify nchars.
  1878. X */
  1879. X    length = 80;
  1880. X    if (nchars != NULL)
  1881. X    {
  1882. X    if (*nchars >= 0)
  1883. X        length = *nchars;
  1884. X    }
  1885. X
  1886. X    for (i = 0; i < length; i++)
  1887. X    {
  1888. X    if (*(string + i) == '\0')
  1889. X        break;
  1890. X    putc (*(string + i), vp_pc._pltout);
  1891. X    }
  1892. X    putc ('\0', vp_pc._pltout);
  1893. X#else FORTRAN
  1894. X    do
  1895. X    {
  1896. X    putc (*string, vp_pc._pltout);
  1897. X    }
  1898. X    while (*string++);
  1899. X#endif FORTRAN
  1900. X}
  1901. END_OF_FILE
  1902. if test 1402 -ne `wc -c <'Vplot_Kernel/lvplot/vp_message.c'`; then
  1903.     echo shar: \"'Vplot_Kernel/lvplot/vp_message.c'\" unpacked with wrong size!
  1904. fi
  1905. # end of 'Vplot_Kernel/lvplot/vp_message.c'
  1906. fi
  1907. if test -f 'Vplot_Kernel/lvplot/vp_patload.c' -a "${1}" != "-c" ; then 
  1908.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_patload.c'\"
  1909. else
  1910. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_patload.c'\" \(1338 characters\)
  1911. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_patload.c' <<'END_OF_FILE'
  1912. X/*
  1913. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1914. X * University. Official permission to use this software is included in
  1915. X * the documentation. It authorizes you to use this file for any
  1916. X * non-commercial purpose, provided that this copyright notice is not
  1917. X * removed and that any modifications made to this file are commented
  1918. X * and dated in the style of my example below.
  1919. X */
  1920. X
  1921. X/*
  1922. X *
  1923. X *  source file:   ./lvplot/vp_patload.c
  1924. X *
  1925. X * Joe Dellinger (SEP), June 11 1987
  1926. X *    Inserted this sample edit history entry.
  1927. X *    Please log any further modifications made to this file:
  1928. X */
  1929. X
  1930. X#include <stdio.h>
  1931. X#include <vplot.h>
  1932. X#include "vp_pc.h"
  1933. X
  1934. X#ifdef FORTRAN
  1935. X
  1936. X#define PATLOAD vppatload_
  1937. X#define PPI   *ppi
  1938. X#define NX    *nx
  1939. X#define NY    *ny
  1940. X#define IPAT  *ipat
  1941. X
  1942. X#else
  1943. X
  1944. X#define PATLOAD vp_patload
  1945. X#define PPI   ppi
  1946. X#define NX    nx
  1947. X#define NY    ny
  1948. X#define IPAT  ipat
  1949. X
  1950. X#endif
  1951. X
  1952. PATLOAD (ppi, nx, ny, ipat, colarray)
  1953. X    int             PPI, NX, NY, IPAT;
  1954. X    int            *colarray;
  1955. X{
  1956. int             c;
  1957. int             ii;
  1958. X
  1959. X    putc (VP_PATLOAD, vp_pc._pltout);
  1960. X    c = PPI;
  1961. X    puth (c, vp_pc._pltout);
  1962. X    c = NX;
  1963. X    puth (c, vp_pc._pltout);
  1964. X    c = NY;
  1965. X    puth (c, vp_pc._pltout);
  1966. X    c = IPAT;
  1967. X    puth (c, vp_pc._pltout);
  1968. X
  1969. X    for (ii = 0; ii < NX * NY; ii++)
  1970. X    {
  1971. X    c = colarray[ii];
  1972. X    puth (c, vp_pc._pltout);
  1973. X    }
  1974. X}
  1975. END_OF_FILE
  1976. if test 1338 -ne `wc -c <'Vplot_Kernel/lvplot/vp_patload.c'`; then
  1977.     echo shar: \"'Vplot_Kernel/lvplot/vp_patload.c'\" unpacked with wrong size!
  1978. fi
  1979. # end of 'Vplot_Kernel/lvplot/vp_patload.c'
  1980. fi
  1981. if test -f 'Vplot_Kernel/lvplot/vp_setdash.c' -a "${1}" != "-c" ; then 
  1982.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_setdash.c'\"
  1983. else
  1984. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_setdash.c'\" \(1394 characters\)
  1985. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_setdash.c' <<'END_OF_FILE'
  1986. X/*
  1987. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1988. X * University. Official permission to use this software is included in
  1989. X * the documentation. It authorizes you to use this file for any
  1990. X * non-commercial purpose, provided that this copyright notice is not
  1991. X * removed and that any modifications made to this file are commented
  1992. X * and dated in the style of my example below.
  1993. X */
  1994. X
  1995. X/*
  1996. X *
  1997. X *  source file:   ./lvplot/vp_setdash.c
  1998. X *
  1999. X * Joe Dellinger (SEP), June 11 1987
  2000. X *    Inserted this sample edit history entry.
  2001. X *    Please log any further modifications made to this file:
  2002. X * Joe Dellinger Jan 14 1988
  2003. X *    Do rounding.
  2004. X */
  2005. X
  2006. X#include <stdio.h>
  2007. X#include <vplot.h>
  2008. X#include "round.h"
  2009. X#include "vp_pc.h"
  2010. X
  2011. X#ifdef FORTRAN
  2012. X
  2013. X#define SETDASH    vpsetdash_
  2014. X#define LP        *lp
  2015. X#define DASHP dashp2
  2016. X#define GAPP gapp2
  2017. X
  2018. X#else
  2019. X
  2020. X#define SETDASH    vp_setdash
  2021. X#define LP        lp
  2022. X#define DASHP dashp
  2023. X#define GAPP gapp
  2024. X
  2025. X#endif
  2026. X
  2027. SETDASH (dashp, gapp, lp)
  2028. X    float          *dashp, *gapp;
  2029. X    int             LP;
  2030. X{
  2031. int             i;
  2032. int             ix, iy;
  2033. X
  2034. X#ifdef FORTRAN
  2035. register float *dashp2, *gapp2;
  2036. X    dashp2 = dashp;
  2037. X    gapp2 = gapp;
  2038. X#endif FORTRAN
  2039. X
  2040. X    putc (VP_SETDASH, vp_pc._pltout);
  2041. X    puth (LP, vp_pc._pltout);
  2042. X    for (i = 0; i < LP; i++)
  2043. X    {
  2044. X    ix = ROUND ((*DASHP) * RPERIN);
  2045. X    iy = ROUND ((*GAPP) * RPERIN);
  2046. X    DASHP++;
  2047. X    GAPP++;
  2048. X    puth (ix, vp_pc._pltout);
  2049. X    puth (iy, vp_pc._pltout);
  2050. X    }
  2051. X}
  2052. END_OF_FILE
  2053. if test 1394 -ne `wc -c <'Vplot_Kernel/lvplot/vp_setdash.c'`; then
  2054.     echo shar: \"'Vplot_Kernel/lvplot/vp_setdash.c'\" unpacked with wrong size!
  2055. fi
  2056. # end of 'Vplot_Kernel/lvplot/vp_setdash.c'
  2057. fi
  2058. if test -f 'Vplot_Kernel/lvplot/vp_tfont.c' -a "${1}" != "-c" ; then 
  2059.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_tfont.c'\"
  2060. else
  2061. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_tfont.c'\" \(1335 characters\)
  2062. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_tfont.c' <<'END_OF_FILE'
  2063. X/*
  2064. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  2065. X * University. Official permission to use this software is included in
  2066. X * the documentation. It authorizes you to use this file for any
  2067. X * non-commercial purpose, provided that this copyright notice is not
  2068. X * removed and that any modifications made to this file are commented
  2069. X * and dated in the style of my example below.
  2070. X */
  2071. X
  2072. X/*
  2073. X *
  2074. X *  source file:   ./lvplot/vp_tfont.c
  2075. X *
  2076. X * Joe Dellinger (SEP), June 11 1987
  2077. X *    Inserted this sample edit history entry.
  2078. X *    Please log any further modifications made to this file:
  2079. X *
  2080. X * Joe Dellinger, Dec 7 1987
  2081. X *    If they call vp_tfont, just write out the vplot command.
  2082. X *    Don't bother trying to second guess them! It's only
  2083. X *    asking for trouble.
  2084. X */
  2085. X
  2086. X#include <stdio.h>
  2087. X#include <vplot.h>
  2088. X#include "vp_pc.h"
  2089. X
  2090. X#ifdef FORTRAN
  2091. X
  2092. X#define FONT    *font
  2093. X#define PREC   *prec
  2094. X#define OVLY   *ovly
  2095. X#define TFONT   vptfont_
  2096. X
  2097. X#else
  2098. X
  2099. X#define FONT    font
  2100. X#define PREC   prec
  2101. X#define OVLY   ovly
  2102. X#define TFONT   vp_tfont
  2103. X
  2104. X#endif
  2105. X
  2106. TFONT (font, prec, ovly)
  2107. X    int             FONT, PREC, OVLY;
  2108. X{
  2109. X    vp_pc._font = FONT;
  2110. X    vp_pc._prec = PREC;
  2111. X    vp_pc._ovly = OVLY;
  2112. X
  2113. X    putc (VP_TXFONTPREC, vp_pc._pltout);
  2114. X    puth (vp_pc._font, vp_pc._pltout);
  2115. X    puth (vp_pc._prec, vp_pc._pltout);
  2116. X    puth (vp_pc._ovly, vp_pc._pltout);
  2117. X
  2118. X    return;
  2119. X}
  2120. END_OF_FILE
  2121. if test 1335 -ne `wc -c <'Vplot_Kernel/lvplot/vp_tfont.c'`; then
  2122.     echo shar: \"'Vplot_Kernel/lvplot/vp_tfont.c'\" unpacked with wrong size!
  2123. fi
  2124. # end of 'Vplot_Kernel/lvplot/vp_tfont.c'
  2125. fi
  2126. if test -f 'Vplot_Kernel/lvplot/vp_uclip.c' -a "${1}" != "-c" ; then 
  2127.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_uclip.c'\"
  2128. else
  2129. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_uclip.c'\" \(1483 characters\)
  2130. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_uclip.c' <<'END_OF_FILE'
  2131. X/*
  2132. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  2133. X * University. Official permission to use this software is included in
  2134. X * the documentation. It authorizes you to use this file for any
  2135. X * non-commercial purpose, provided that this copyright notice is not
  2136. X * removed and that any modifications made to this file are commented
  2137. X * and dated in the style of my example below.
  2138. X */
  2139. X
  2140. X/*
  2141. X *
  2142. X *  source file:   ./lvplot/vp_uclip.c
  2143. X *
  2144. X * Joe Dellinger (SEP), June 11 1987
  2145. X *    Inserted this sample edit history entry.
  2146. X *    Please log any further modifications made to this file:
  2147. X */
  2148. X
  2149. X#include <stdio.h>
  2150. X#include <vplot.h>
  2151. X#include "vp_pc.h"
  2152. X
  2153. X#ifdef FORTRAN
  2154. X
  2155. X#define UCLIP    vpuclip_
  2156. X#define CLIP    vpclip_
  2157. X#define XMIN    *xmin
  2158. X#define YMIN    *ymin
  2159. X#define XMAX    *xmax
  2160. X#define YMAX    *ymax
  2161. X#define XPMIN    &xpmin
  2162. X#define YPMIN    &ypmin
  2163. X#define XPMAX    &xpmax
  2164. X#define YPMAX    &ypmax
  2165. X
  2166. X#else
  2167. X
  2168. X#define UCLIP    vp_uclip
  2169. X#define CLIP    vp_clip
  2170. X#define XMIN    xmin
  2171. X#define YMIN    ymin
  2172. X#define XMAX    xmax
  2173. X#define YMAX    ymax
  2174. X#define XPMIN    xpmin
  2175. X#define YPMIN    ypmin
  2176. X#define XPMAX    xpmax
  2177. X#define YPMAX    ypmax
  2178. X
  2179. X#endif
  2180. X
  2181. UCLIP (xmin, ymin, xmax, ymax)
  2182. X    float           XMIN, YMIN, XMAX, YMAX;
  2183. X{
  2184. float           xpmin, ypmin, xpmax, ypmax;
  2185. X    xpmin = vp_pc._x0 + (XMIN - vp_pc._xu0) * vp_pc._xscl;
  2186. X    ypmin = vp_pc._y0 + (YMIN - vp_pc._yu0) * vp_pc._yscl;
  2187. X    xpmax = vp_pc._x0 + (XMAX - vp_pc._xu0) * vp_pc._xscl;
  2188. X    ypmax = vp_pc._y0 + (YMAX - vp_pc._yu0) * vp_pc._yscl;
  2189. X    CLIP (XPMIN, YPMIN, XPMAX, YPMAX);
  2190. X}
  2191. END_OF_FILE
  2192. if test 1483 -ne `wc -c <'Vplot_Kernel/lvplot/vp_uclip.c'`; then
  2193.     echo shar: \"'Vplot_Kernel/lvplot/vp_uclip.c'\" unpacked with wrong size!
  2194. fi
  2195. # end of 'Vplot_Kernel/lvplot/vp_uclip.c'
  2196. fi
  2197. if test -f 'Vplot_Kernel/lvplot/vp_utext.c' -a "${1}" != "-c" ; then 
  2198.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_utext.c'\"
  2199. else
  2200. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_utext.c'\" \(1554 characters\)
  2201. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_utext.c' <<'END_OF_FILE'
  2202. X/*
  2203. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  2204. X * University. Official permission to use this software is included in
  2205. X * the documentation. It authorizes you to use this file for any
  2206. X * non-commercial purpose, provided that this copyright notice is not
  2207. X * removed and that any modifications made to this file are commented
  2208. X * and dated in the style of my example below.
  2209. X */
  2210. X
  2211. X/*
  2212. X *
  2213. X *  source file:   ./lvplot/vp_utext.c
  2214. X *
  2215. X * Joe Dellinger (SEP), June 11 1987
  2216. X *    Inserted this sample edit history entry.
  2217. X *    Please log any further modifications made to this file:
  2218. X */
  2219. X/*
  2220. X * Joe Dellinger, Oct 17, 1987
  2221. X * Made Fortran and C calling arguments match.
  2222. X */
  2223. X
  2224. X#include <stdio.h>
  2225. X#include <vplot.h>
  2226. X#include "vp_pc.h"
  2227. X
  2228. X#ifdef FORTRAN
  2229. X
  2230. X#define UTEXT    vpwutext_
  2231. X#define TEXT    vpwtext_
  2232. X#define X        *x
  2233. X#define Y        *y
  2234. X#define SIZE    *size
  2235. X#define ORIENT    *orient
  2236. X#define XP        &xp
  2237. X#define YP        &yp
  2238. X
  2239. X#else
  2240. X
  2241. X#define UTEXT    vp_utext
  2242. X#define TEXT    vp_text
  2243. X#define X        x
  2244. X#define Y        y
  2245. X#define SIZE    size
  2246. X#define ORIENT    orient
  2247. X#define XP        xp
  2248. X#define YP        yp
  2249. X
  2250. X#endif
  2251. X
  2252. X#ifdef FORTRAN
  2253. UTEXT (x, y, size, orient, string, nchars)
  2254. X#else
  2255. UTEXT (x, y, size, orient, string)
  2256. X#endif
  2257. X    float           X, Y;
  2258. X    int             SIZE, ORIENT;
  2259. X    char           *string;
  2260. X#ifdef FORTRAN
  2261. X    int            *nchars;
  2262. X#endif
  2263. X{
  2264. float           xp, yp;
  2265. X    xp = vp_pc._x0 + (X - vp_pc._xu0) * vp_pc._xscl;
  2266. X    yp = vp_pc._y0 + (Y - vp_pc._yu0) * vp_pc._yscl;
  2267. X#ifdef FORTRAN
  2268. X    TEXT (XP, YP, size, orient, string, nchars);
  2269. X#else
  2270. X    TEXT (XP, YP, size, orient, string);
  2271. X#endif
  2272. X}
  2273. END_OF_FILE
  2274. if test 1554 -ne `wc -c <'Vplot_Kernel/lvplot/vp_utext.c'`; then
  2275.     echo shar: \"'Vplot_Kernel/lvplot/vp_utext.c'\" unpacked with wrong size!
  2276. fi
  2277. # end of 'Vplot_Kernel/lvplot/vp_utext.c'
  2278. fi
  2279. echo shar: End of archive 6 \(of 24\).
  2280. cp /dev/null ark6isdone
  2281. MISSING=""
  2282. 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 ; do
  2283.     if test ! -f ark${I}isdone ; then
  2284.     MISSING="${MISSING} ${I}"
  2285.     fi
  2286. done
  2287. if test "${MISSING}" = "" ; then
  2288.     echo You have unpacked all 24 archives.
  2289.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2290. else
  2291.     echo You still need to unpack the following archives:
  2292.     echo "        " ${MISSING}
  2293. fi
  2294. ##  End of shell archive.
  2295. exit 0
  2296.