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

  1. Subject:  v14i009:  Device-independant graphics system, with drivers
  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 9
  8. Archive-name: vplot/part04
  9.  
  10.  
  11.  
  12. #! /bin/sh
  13. # This is a shell archive.  Remove anything before this line, then unpack
  14. # it by saving it into a file and typing "sh file".  To overwrite existing
  15. # files, type "sh file -c".  You can also feed this as standard input via
  16. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  17. # will see the following message at the end:
  18. #        "End of archive 4 (of 24)."
  19. # Wrapped by rsalz@fig.bbn.com on Fri Mar 25 11:46:36 1988
  20. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  21. if test -f 'Envision_device/envilib/envierase.c' -a "${1}" != "-c" ; then 
  22.   echo shar: Will not clobber existing file \"'Envision_device/envilib/envierase.c'\"
  23. else
  24. echo shar: Extracting \"'Envision_device/envilib/envierase.c'\" \(976 characters\)
  25. sed "s/^X//" >'Envision_device/envilib/envierase.c' <<'END_OF_FILE'
  26. X/*
  27. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  28. X * University. Official permission to use this software is included in
  29. X * the documentation. It authorizes you to use this file for any
  30. X * non-commercial purpose, provided that this copyright notice is not
  31. X * removed and that any modifications made to this file are commented
  32. X * and dated in the style of my example below.
  33. X */
  34. X
  35. X/*
  36. X *
  37. X *  source file:   ./filters/envilib/envierase.c
  38. X *
  39. X * Joe Dellinger (SEP), June 11 1987
  40. X *    Inserted this sample edit history entry.
  41. X *    Please log any further modifications made to this file:
  42. X */
  43. X
  44. X#include <stdio.h>
  45. X#include "../include/erasecom.h"
  46. X#include "envi.h"
  47. extern FILE    *pltout;
  48. X
  49. envierase (command)
  50. X    int             command;
  51. X{
  52. X    switch (command)
  53. X    {
  54. X    case ERASE_START:
  55. X    case ERASE_MIDDLE:
  56. X    envisetmode (REG);
  57. X    putc (ESC, pltout);
  58. X    putc (ENVI_ERASE, pltout);    /* Erase Graphics Screen */
  59. X    break;
  60. X    case ERASE_END:
  61. X    default:
  62. X    break;
  63. X    }
  64. X}
  65. END_OF_FILE
  66. if test 976 -ne `wc -c <'Envision_device/envilib/envierase.c'`; then
  67.     echo shar: \"'Envision_device/envilib/envierase.c'\" unpacked with wrong size!
  68. fi
  69. # end of 'Envision_device/envilib/envierase.c'
  70. fi
  71. if test -f 'Imagen_device/imaglib/imagen.h' -a "${1}" != "-c" ; then 
  72.   echo shar: Will not clobber existing file \"'Imagen_device/imaglib/imagen.h'\"
  73. else
  74. echo shar: Extracting \"'Imagen_device/imaglib/imagen.h'\" \(1084 characters\)
  75. sed "s/^X//" >'Imagen_device/imaglib/imagen.h' <<'END_OF_FILE'
  76. X#define SET_PUSH_MASK    214
  77. X#define PUSH        211
  78. X#define POP        212
  79. X#define SET_HV_SYSTEM    205
  80. X#define CREATE_PATH    230
  81. X#define ENDPAGE        219
  82. X#define SET_PEN        232
  83. X#define BITMAP        235
  84. X#define EOPLOT        255
  85. X#define DRAW_PATH    234
  86. X#define FILL_PATH    233
  87. X#define SET_ABS_V    137
  88. X#define SET_ABS_H    135
  89. X#define CREATE_FAMILY_TABLE    221
  90. X#define SET_ADV_DIRS    206
  91. X#define SET_FAMILY    207
  92. X#define SP        128
  93. X#define SET_SP        210
  94. X#define BGLY    199
  95. X#define SET_TEXTURE  231
  96. X#define SET_REL_V    138
  97. X
  98. X#define WHITE        0
  99. X#define OPAQUE        3
  100. X#define OR        7
  101. X#define BLACK        15
  102. X
  103. X#define PATHLENGTH    175
  104. X
  105. X/*
  106. X * These two macros take the high and low bytes off the end
  107. X * of an integer to make a word that the imagen will understand
  108. X * representing an integer in the range +- 2 to the 14
  109. X */
  110. X#define lob(A)     ((char)((A) & 0xff))
  111. X#define hib(A)    ((char)(((A) >> 8) & 0xff))
  112. X
  113. X/*
  114. X * imagen externals
  115. X */
  116. extern int tex;
  117. extern int stripped;
  118. extern int brute_force;
  119. extern int file_created;
  120. extern int ncopies_document;
  121. extern char label[];
  122. extern char scratch_file[];
  123. extern char holdreason[];
  124. extern int lost;
  125. extern int imag_curcolor;
  126. END_OF_FILE
  127. if test 1084 -ne `wc -c <'Imagen_device/imaglib/imagen.h'`; then
  128.     echo shar: \"'Imagen_device/imaglib/imagen.h'\" unpacked with wrong size!
  129. fi
  130. # end of 'Imagen_device/imaglib/imagen.h'
  131. fi
  132. if test -f 'Masscomp_device/gpslib/gpsclose.c' -a "${1}" != "-c" ; then 
  133.   echo shar: Will not clobber existing file \"'Masscomp_device/gpslib/gpsclose.c'\"
  134. else
  135. echo shar: Extracting \"'Masscomp_device/gpslib/gpsclose.c'\" \(874 characters\)
  136. sed "s/^X//" >'Masscomp_device/gpslib/gpsclose.c' <<'END_OF_FILE'
  137. X/*
  138. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  139. X * University. Official permission to use this software is included in
  140. X * the documentation. It authorizes you to use this file for any
  141. X * non-commercial purpose, provided that this copyright notice is not
  142. X * removed and that any modifications made to this file are commented
  143. X * and dated in the style of my example below.
  144. X */
  145. X
  146. X/*
  147. X *
  148. X *  source file:   ./filters/gpslib/gpsclose.c
  149. X *
  150. X * Stewart A. Levin (SEP), July 3 1987
  151. X *    Cribbed rasclose.c for gps filter
  152. X */
  153. X
  154. X#include <stdio.h>
  155. X#include "../include/closestat.h"
  156. X#include "../include/err.h"
  157. X#include "../include/extern.h"
  158. X#include "../include/params.h"
  159. X#include "gpspen.h"
  160. X
  161. gpsclose (status)
  162. X    int             status;
  163. X{
  164. X    switch (status)
  165. X    {
  166. X    case CLOSE_NORMAL:
  167. X    end_plot ("");
  168. X    break;
  169. X    case CLOSE_FLUSH:
  170. X    default:
  171. X    break;
  172. X    }
  173. X}
  174. END_OF_FILE
  175. if test 874 -ne `wc -c <'Masscomp_device/gpslib/gpsclose.c'`; then
  176.     echo shar: \"'Masscomp_device/gpslib/gpsclose.c'\" unpacked with wrong size!
  177. fi
  178. # end of 'Masscomp_device/gpslib/gpsclose.c'
  179. fi
  180. if test -f 'Masscomp_device/gpslib/gpsdoc.h' -a "${1}" != "-c" ; then 
  181.   echo shar: Will not clobber existing file \"'Masscomp_device/gpslib/gpsdoc.h'\"
  182. else
  183. echo shar: Extracting \"'Masscomp_device/gpslib/gpsdoc.h'\" \(1067 characters\)
  184. sed "s/^X//" >'Masscomp_device/gpslib/gpsdoc.h' <<'END_OF_FILE'
  185. char *documentation[] = {
  186. X" ",
  187. X"NAME",
  188. X#ifdef SEP
  189. X"    Gpspen - SEPlib vplot filter for Masscomp GPS files",
  190. X#else
  191. X"    gpspen - vplot filter for Masscomp GPS files",
  192. X#endif
  193. X" ",
  194. X"SYNOPSIS",
  195. X#ifdef SEP
  196. X"    Gpspen [options] in=vplot-inputfile OR headerfile on standard in",
  197. X#else 
  198. X"    gpspen [options] [inputfiles]",
  199. X#endif
  200. X" ",
  201. X"This program transforms vplot commands into Masscomp GPS commands",
  202. X"so that the color Versatec (and other Masscomp graphics) may be used.",
  203. X"",
  204. X"OPTIONS",
  205. X"colormult=1 ppi=600 aspect=1.",
  206. X"colormult scales vplot color numbers to raster byte values. The default is",
  207. X"1, but for SEP movies 2 might be more appropriate.",
  208. X"ppi is the internal vplot resolution to use.  The default 600 is harmless",
  209. X"overkill for Versatecs which run at 200 or 300 ppi.  If a lot of area fill",
  210. X"is anticipated, drop this down to the device resolution for speed.",
  211. X"aspect, if changed, chould probably be set to 0.75.",
  212. X"",
  213. X#include "../include/gendoc.h"
  214. X" ",
  215. X"SEE ALSO",
  216. X"    man pen"
  217. X};
  218. int    doclength = { sizeof documentation/sizeof documentation[0] };
  219. END_OF_FILE
  220. if test 1067 -ne `wc -c <'Masscomp_device/gpslib/gpsdoc.h'`; then
  221.     echo shar: \"'Masscomp_device/gpslib/gpsdoc.h'\" unpacked with wrong size!
  222. fi
  223. # end of 'Masscomp_device/gpslib/gpsdoc.h'
  224. fi
  225. if test -f 'Masscomp_device/gpslib/gpsplot.c' -a "${1}" != "-c" ; then 
  226.   echo shar: Will not clobber existing file \"'Masscomp_device/gpslib/gpsplot.c'\"
  227. else
  228. echo shar: Extracting \"'Masscomp_device/gpslib/gpsplot.c'\" \(981 characters\)
  229. sed "s/^X//" >'Masscomp_device/gpslib/gpsplot.c' <<'END_OF_FILE'
  230. X/*
  231. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  232. X * University. Official permission to use this software is included in
  233. X * the documentation. It authorizes you to use this file for any
  234. X * non-commercial purpose, provided that this copyright notice is not
  235. X * removed and that any modifications made to this file are commented
  236. X * and dated in the style of my example below.
  237. X */
  238. X
  239. X/*
  240. X *
  241. X *  source file:   ./filters/gpslib/gpsplot.c
  242. X *
  243. X * Stewart A. Levin (SEP), July 3 1987
  244. X *    Cribbed enviplot.c for gps filter
  245. X */
  246. X
  247. X#include <stdio.h>
  248. X#include "../include/enum.h"
  249. X#include "gpspen.h"
  250. X
  251. int             lost = YES;    /* 1 means we are lost, zero means we aren't */
  252. X
  253. gpsplot (x, y, drw)    /* efficiently get to the point x,y. */
  254. X    int             x, y, drw;    /* draw 0 means we want to move, not to draw */
  255. X{
  256. float           flx, fly;
  257. X
  258. X    flx = x;
  259. X    fly = y;
  260. X    if (drw == 0)
  261. X    {
  262. X    move (flx, fly);
  263. X    }
  264. X    else
  265. X    {
  266. X    draw (flx, fly);
  267. X    }
  268. X    lost = NO;
  269. X}
  270. END_OF_FILE
  271. if test 981 -ne `wc -c <'Masscomp_device/gpslib/gpsplot.c'`; then
  272.     echo shar: \"'Masscomp_device/gpslib/gpsplot.c'\" unpacked with wrong size!
  273. fi
  274. # end of 'Masscomp_device/gpslib/gpsplot.c'
  275. fi
  276. if test -f 'Printronix_device/lprlib/lprattr.c' -a "${1}" != "-c" ; then 
  277.   echo shar: Will not clobber existing file \"'Printronix_device/lprlib/lprattr.c'\"
  278. else
  279. echo shar: Extracting \"'Printronix_device/lprlib/lprattr.c'\" \(1026 characters\)
  280. sed "s/^X//" >'Printronix_device/lprlib/lprattr.c' <<'END_OF_FILE'
  281. X/*
  282. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  283. X * University. Official permission to use this software is included in
  284. X * the documentation. It authorizes you to use this file for any
  285. X * non-commercial purpose, provided that this copyright notice is not
  286. X * removed and that any modifications made to this file are commented
  287. X * and dated in the style of my example below.
  288. X */
  289. X
  290. X/*
  291. X *
  292. X *  source file:   ./filters/lprlib/lprattr.c
  293. X *
  294. X * Joe Dellinger (SEP), June 11 1987
  295. X *    Inserted this sample edit history entry.
  296. X *    Please log any further modifications made to this file:
  297. X */
  298. X
  299. X#include <stdio.h>
  300. X#include <math.h>
  301. X#include "../include/attrcom.h"
  302. X#include "../include/params.h"
  303. X
  304. int             lpr_color = 1;
  305. X
  306. lprattr (command, value, v1, v2, v3)
  307. X    register int    command, value;
  308. X    int             v1, v2, v3;
  309. X{
  310. int             icol;
  311. X
  312. X    switch (command)
  313. X    {
  314. X    case SET_COLOR:
  315. X    if (value == 0)
  316. X        lpr_color = 0;
  317. X    else
  318. X        lpr_color = 1;
  319. X    break;
  320. X    default:
  321. X    break;
  322. X    }
  323. X
  324. X    return 0;
  325. X}
  326. END_OF_FILE
  327. if test 1026 -ne `wc -c <'Printronix_device/lprlib/lprattr.c'`; then
  328.     echo shar: \"'Printronix_device/lprlib/lprattr.c'\" unpacked with wrong size!
  329. fi
  330. # end of 'Printronix_device/lprlib/lprattr.c'
  331. fi
  332. if test -f 'RasterTek_device/rteklib/rtekclose.c' -a "${1}" != "-c" ; then 
  333.   echo shar: Will not clobber existing file \"'RasterTek_device/rteklib/rtekclose.c'\"
  334. else
  335. echo shar: Extracting \"'RasterTek_device/rteklib/rtekclose.c'\" \(926 characters\)
  336. sed "s/^X//" >'RasterTek_device/rteklib/rtekclose.c' <<'END_OF_FILE'
  337. X/*
  338. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  339. X * University. Official permission to use this software is included in
  340. X * the documentation. It authorizes you to use this file for any
  341. X * non-commercial purpose, provided that this copyright notice is not
  342. X * removed and that any modifications made to this file are commented
  343. X * and dated in the style of my example below.
  344. X */
  345. X
  346. X/*
  347. X *
  348. X *  source file:   ./filters/rteklib/rtekclose.c
  349. X *
  350. X * Joe Dellinger (SEP), June 11 1987
  351. X *    Inserted this sample edit history entry.
  352. X *    Please log any further modifications made to this file:
  353. X */
  354. X
  355. X#include "rtekpen.h"
  356. X#include "../include/closestat.h"
  357. X
  358. rtekclose (status)
  359. X    int             status;
  360. X{
  361. X    switch (status)
  362. X    {
  363. X    case CLOSE_DONE:        /* cmdlen = 1 */
  364. X    CHKLEN (1);
  365. X    byte (QUIT);
  366. X    rtek_flsbuf (0);
  367. X    break;
  368. X    case CLOSE_FLUSH:
  369. X    case CLOSE_PAUSE:
  370. X    rtek_flsbuf (0);
  371. X    break;
  372. X    default:
  373. X    break;
  374. X    }
  375. X}
  376. END_OF_FILE
  377. if test 926 -ne `wc -c <'RasterTek_device/rteklib/rtekclose.c'`; then
  378.     echo shar: \"'RasterTek_device/rteklib/rtekclose.c'\" unpacked with wrong size!
  379. fi
  380. # end of 'RasterTek_device/rteklib/rtekclose.c'
  381. fi
  382. if test -f 'RasterTek_device/rteklib/rtekerase.c' -a "${1}" != "-c" ; then 
  383.   echo shar: Will not clobber existing file \"'RasterTek_device/rteklib/rtekerase.c'\"
  384. else
  385. echo shar: Extracting \"'RasterTek_device/rteklib/rtekerase.c'\" \(1063 characters\)
  386. sed "s/^X//" >'RasterTek_device/rteklib/rtekerase.c' <<'END_OF_FILE'
  387. X/*
  388. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  389. X * University. Official permission to use this software is included in
  390. X * the documentation. It authorizes you to use this file for any
  391. X * non-commercial purpose, provided that this copyright notice is not
  392. X * removed and that any modifications made to this file are commented
  393. X * and dated in the style of my example below.
  394. X */
  395. X
  396. X/*
  397. X *
  398. X *  source file:   ./filters/rteklib/rtekerase.c
  399. X *
  400. X * Joe Dellinger (SEP), June 11 1987
  401. X *    Inserted this sample edit history entry.
  402. X *    Please log any further modifications made to this file:
  403. X * Joe Dellinger Feb 25 1988
  404. X *    Shouldn't erase on ERASE_BREAK;
  405. X */
  406. X
  407. X#include "rtekpen.h"
  408. X#include "../include/erasecom.h"
  409. X#include "../include/attrcom.h"
  410. X
  411. extern int      lost;
  412. X
  413. rtekerase (command)
  414. X    int             command;
  415. X{
  416. X    switch (command)
  417. X    {
  418. X    case ERASE_START:
  419. X    case ERASE_MIDDLE: /* cmdlen = 3 */
  420. X    CHKLEN (3);
  421. X    byte (VAL8);
  422. X    byte (0);
  423. X    byte (FLOOD);
  424. X    rtek_flsbuf (0);
  425. X    rtekattributes (SET_COLOR, color, 0, 0, 0);
  426. X    lost = YES;
  427. X    break;
  428. X    }
  429. X}
  430. END_OF_FILE
  431. if test 1063 -ne `wc -c <'RasterTek_device/rteklib/rtekerase.c'`; then
  432.     echo shar: \"'RasterTek_device/rteklib/rtekerase.c'\" unpacked with wrong size!
  433. fi
  434. # end of 'RasterTek_device/rteklib/rtekerase.c'
  435. fi
  436. if test -f 'RasterTek_device/rteklib/rtekgetpoint.c' -a "${1}" != "-c" ; then 
  437.   echo shar: Will not clobber existing file \"'RasterTek_device/rteklib/rtekgetpoint.c'\"
  438. else
  439. echo shar: Extracting \"'RasterTek_device/rteklib/rtekgetpoint.c'\" \(956 characters\)
  440. sed "s/^X//" >'RasterTek_device/rteklib/rtekgetpoint.c' <<'END_OF_FILE'
  441. X/*
  442. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  443. X * University. Official permission to use this software is included in
  444. X * the documentation. It authorizes you to use this file for any
  445. X * non-commercial purpose, provided that this copyright notice is not
  446. X * removed and that any modifications made to this file are commented
  447. X * and dated in the style of my example below.
  448. X */
  449. X
  450. X/*
  451. X *
  452. X *  source file:   ./filters/rteklib/rtekgetpoint.c
  453. X *
  454. X * Joe Dellinger (SEP), June 11 1987
  455. X *    Inserted this sample edit history entry.
  456. X *    Please log any further modifications made to this file:
  457. X */
  458. X
  459. X#include "rtekpen.h"
  460. X
  461. rtekgetpoint (termout, x, y)
  462. X    FILE           *termout;
  463. X    int            *x, *y;
  464. X{
  465. char            buf[4];
  466. X    CHKLEN (2);
  467. X    byte (READCR);
  468. X    byte (2);
  469. X    fflush (rtekfd);
  470. X    read (fileno (rtekfd), buf, 4);
  471. X    *x = (char) buf[1] << 8 + (unsigned char) buf[0];
  472. X    *y = (char) buf[3] << 8 + (unsigned char) buf[2];
  473. X}
  474. END_OF_FILE
  475. if test 956 -ne `wc -c <'RasterTek_device/rteklib/rtekgetpoint.c'`; then
  476.     echo shar: \"'RasterTek_device/rteklib/rtekgetpoint.c'\" unpacked with wrong size!
  477. fi
  478. # end of 'RasterTek_device/rteklib/rtekgetpoint.c'
  479. fi
  480. if test -f 'Regis_device/gigilib/gigierase.c' -a "${1}" != "-c" ; then 
  481.   echo shar: Will not clobber existing file \"'Regis_device/gigilib/gigierase.c'\"
  482. else
  483. echo shar: Extracting \"'Regis_device/gigilib/gigierase.c'\" \(975 characters\)
  484. sed "s/^X//" >'Regis_device/gigilib/gigierase.c' <<'END_OF_FILE'
  485. X/*
  486. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  487. X * University. Official permission to use this software is included in
  488. X * the documentation. It authorizes you to use this file for any
  489. X * non-commercial purpose, provided that this copyright notice is not
  490. X * removed and that any modifications made to this file are commented
  491. X * and dated in the style of my example below.
  492. X */
  493. X
  494. X/*
  495. X *
  496. X *  source file:   ./filters/gigilib/gigierase.c
  497. X *
  498. X * Joe Dellinger (SEP), June 11 1987
  499. X *    Inserted this sample edit history entry.
  500. X *    Please log any further modifications made to this file:
  501. X */
  502. X
  503. X/*
  504. X * Erase the graphics area
  505. X */
  506. X#include <stdio.h>
  507. X#include "gigi.h"
  508. X#include "../include/erasecom.h"
  509. extern FILE    *pltout;
  510. X
  511. gigierase (command)
  512. X    int             command;
  513. X{
  514. X    switch (command)
  515. X    {
  516. X    case ERASE_START:
  517. X    case ERASE_MIDDLE:
  518. X    fprintf (pltout, ";S(E)");
  519. X    lastop = 'S';
  520. X    messagecount = 0;
  521. X    break;
  522. X    case ERASE_END:
  523. X    default:
  524. X    break;
  525. X    }
  526. X}
  527. END_OF_FILE
  528. if test 975 -ne `wc -c <'Regis_device/gigilib/gigierase.c'`; then
  529.     echo shar: \"'Regis_device/gigilib/gigierase.c'\" unpacked with wrong size!
  530. fi
  531. # end of 'Regis_device/gigilib/gigierase.c'
  532. fi
  533. if test -f 'Regis_device/gigilib/gigiopen.c' -a "${1}" != "-c" ; then 
  534.   echo shar: Will not clobber existing file \"'Regis_device/gigilib/gigiopen.c'\"
  535. else
  536. echo shar: Extracting \"'Regis_device/gigilib/gigiopen.c'\" \(1079 characters\)
  537. sed "s/^X//" >'Regis_device/gigilib/gigiopen.c' <<'END_OF_FILE'
  538. X/*
  539. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  540. X * University. Official permission to use this software is included in
  541. X * the documentation. It authorizes you to use this file for any
  542. X * non-commercial purpose, provided that this copyright notice is not
  543. X * removed and that any modifications made to this file are commented
  544. X * and dated in the style of my example below.
  545. X */
  546. X
  547. X/*
  548. X *
  549. X *  source file:   ./filters/gigilib/gigiopen.c
  550. X *
  551. X * Joe Dellinger (SEP), June 11 1987
  552. X *    Inserted this sample edit history entry.
  553. X *    Please log any further modifications made to this file:
  554. X */
  555. X
  556. X#include <stdio.h>
  557. X#include "gigi.h"
  558. X#include "../include/enum.h"
  559. X#include "../include/extern.h"
  560. X
  561. int             lastop;
  562. X
  563. gigiopen ()
  564. X{
  565. X/*
  566. X * physical device size
  567. X */
  568. X    dev_xmax = 383;
  569. X    dev_ymax = 240;
  570. X    dev_xmin = 0;
  571. X    dev_ymin = 0;
  572. X    pixels_per_inch = 38;
  573. X    aspect_ratio = 1.;
  574. X
  575. X/*
  576. X * device capabilities
  577. X */
  578. X    need_end_erase = NO;
  579. X    buffer_output = YES;
  580. X    smart_clip = NO;
  581. X    num_col = 0;
  582. X    lastop = '\0';        /* Flag for "nothing has happened yet" */
  583. X}
  584. END_OF_FILE
  585. if test 1079 -ne `wc -c <'Regis_device/gigilib/gigiopen.c'`; then
  586.     echo shar: \"'Regis_device/gigilib/gigiopen.c'\" unpacked with wrong size!
  587. fi
  588. # end of 'Regis_device/gigilib/gigiopen.c'
  589. fi
  590. if test -f 'Regis_device/gigilib/gigireset.c' -a "${1}" != "-c" ; then 
  591.   echo shar: Will not clobber existing file \"'Regis_device/gigilib/gigireset.c'\"
  592. else
  593. echo shar: Extracting \"'Regis_device/gigilib/gigireset.c'\" \(1043 characters\)
  594. sed "s/^X//" >'Regis_device/gigilib/gigireset.c' <<'END_OF_FILE'
  595. X/*
  596. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  597. X * University. Official permission to use this software is included in
  598. X * the documentation. It authorizes you to use this file for any
  599. X * non-commercial purpose, provided that this copyright notice is not
  600. X * removed and that any modifications made to this file are commented
  601. X * and dated in the style of my example below.
  602. X */
  603. X
  604. X/*
  605. X *
  606. X *  source file:   ./filters/gigilib/gigireset.c
  607. X *
  608. X * Joe Dellinger (SEP), June 11 1987
  609. X *    Inserted this sample edit history entry.
  610. X *    Please log any further modifications made to this file:
  611. X */
  612. X
  613. X/* 
  614. X * Put the terminal into standard configuration.
  615. X */
  616. X#include <stdio.h>
  617. X#include "gigi.h"
  618. extern FILE    *pltout;
  619. X
  620. gigireset ()
  621. X{
  622. X    fprintf (pltout, "%c[2J%c[24;1H%cPpP[0,0];", ESC, ESC, ESC);
  623. X    fprintf (pltout, "@:W (W(VI7A0S0N0M2P1(M2)))@;");
  624. X    /* define temporary writing controls */
  625. X    fprintf (pltout, "S(EI0N0A)[0,0]T(I0A0D0S1)P[0,0]");
  626. X    fflush (pltout);
  627. X    lastop = '$';        /* flag that new plot was reinitialized */
  628. X}
  629. END_OF_FILE
  630. if test 1043 -ne `wc -c <'Regis_device/gigilib/gigireset.c'`; then
  631.     echo shar: \"'Regis_device/gigilib/gigireset.c'\" unpacked with wrong size!
  632. fi
  633. # end of 'Regis_device/gigilib/gigireset.c'
  634. fi
  635. if test -f 'Tek_device/cteklib/ctekcolmap.c' -a "${1}" != "-c" ; then 
  636.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekcolmap.c'\"
  637. else
  638. echo shar: Extracting \"'Tek_device/cteklib/ctekcolmap.c'\" \(965 characters\)
  639. sed "s/^X//" >'Tek_device/cteklib/ctekcolmap.c' <<'END_OF_FILE'
  640. X/*
  641. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  642. X * University. Official permission to use this software is included in
  643. X * the documentation. It authorizes you to use this file for any
  644. X * non-commercial purpose, provided that this copyright notice is not
  645. X * removed and that any modifications made to this file are commented
  646. X * and dated in the style of my example below.
  647. X */
  648. X
  649. X/*
  650. X *
  651. X *  source file:   ./filters/cteklib/ctekcolmap.c
  652. X *
  653. X * Joe Dellinger (SEP), June 11 1987
  654. X *    Inserted this sample edit history entry.
  655. X *    Please log any further modifications made to this file:
  656. X */
  657. X
  658. ctekcolmap (color)
  659. X    int             color;
  660. X{
  661. register int    c;
  662. X
  663. X    switch (color)
  664. X    {
  665. X    case 0:
  666. X    c = 0;
  667. X    break;
  668. X    case 1:
  669. X    c = 4;
  670. X    break;
  671. X    case 2:
  672. X    c = 2;
  673. X    break;
  674. X    case 3:
  675. X    c = 6;
  676. X    break;
  677. X    case 4:
  678. X    c = 3;
  679. X    break;
  680. X    case 5:
  681. X    c = 5;
  682. X    break;
  683. X    case 6:
  684. X    c = 7;
  685. X    break;
  686. X    case 7:
  687. X    c = 1;
  688. X    break;
  689. X    default:
  690. X    c = 1;
  691. X    }
  692. X    return c;
  693. X}
  694. END_OF_FILE
  695. if test 965 -ne `wc -c <'Tek_device/cteklib/ctekcolmap.c'`; then
  696.     echo shar: \"'Tek_device/cteklib/ctekcolmap.c'\" unpacked with wrong size!
  697. fi
  698. # end of 'Tek_device/cteklib/ctekcolmap.c'
  699. fi
  700. if test -f 'Tek_device/cteklib/ctekerase.c' -a "${1}" != "-c" ; then 
  701.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekerase.c'\"
  702. else
  703. echo shar: Extracting \"'Tek_device/cteklib/ctekerase.c'\" \(1018 characters\)
  704. sed "s/^X//" >'Tek_device/cteklib/ctekerase.c' <<'END_OF_FILE'
  705. X/*
  706. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  707. X * University. Official permission to use this software is included in
  708. X * the documentation. It authorizes you to use this file for any
  709. X * non-commercial purpose, provided that this copyright notice is not
  710. X * removed and that any modifications made to this file are commented
  711. X * and dated in the style of my example below.
  712. X */
  713. X
  714. X/*
  715. X *
  716. X *  source file:   ./filters/cteklib/ctekerase.c
  717. X *
  718. X * Joe Dellinger (SEP), June 11 1987
  719. X *    Inserted this sample edit history entry.
  720. X *    Please log any further modifications made to this file:
  721. X */
  722. X
  723. X/*
  724. X * Erase the graphics area of the Tek4105
  725. X */
  726. X#include    <stdio.h>
  727. X#include    "ctek.h"
  728. X#include    "../include/erasecom.h"
  729. X#include    "../include/enum.h"
  730. extern FILE    *pltout;
  731. X
  732. ctekerase (command)
  733. X    int             command;
  734. X{
  735. X    switch (command)
  736. X    {
  737. X    case ERASE_START:
  738. X    case ERASE_MIDDLE:
  739. X    cteksetmode (TEK);
  740. X    putc (ESC, pltout);
  741. X    putc (FF, pltout);
  742. X    break;
  743. X    case ERASE_END:
  744. X    default:
  745. X    break;
  746. X    }
  747. X}
  748. END_OF_FILE
  749. if test 1018 -ne `wc -c <'Tek_device/cteklib/ctekerase.c'`; then
  750.     echo shar: \"'Tek_device/cteklib/ctekerase.c'\" unpacked with wrong size!
  751. fi
  752. # end of 'Tek_device/cteklib/ctekerase.c'
  753. fi
  754. if test -f 'Tek_device/cteklib/cteklinestyle.c' -a "${1}" != "-c" ; then 
  755.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/cteklinestyle.c'\"
  756. else
  757. echo shar: Extracting \"'Tek_device/cteklib/cteklinestyle.c'\" \(892 characters\)
  758. sed "s/^X//" >'Tek_device/cteklib/cteklinestyle.c' <<'END_OF_FILE'
  759. X/*
  760. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  761. X * University. Official permission to use this software is included in
  762. X * the documentation. It authorizes you to use this file for any
  763. X * non-commercial purpose, provided that this copyright notice is not
  764. X * removed and that any modifications made to this file are commented
  765. X * and dated in the style of my example below.
  766. X */
  767. X
  768. X/*
  769. X *
  770. X *  source file:   ./filters/cteklib/cteklinestyle.c
  771. X *
  772. X * Joe Dellinger (SEP), June 11 1987
  773. X *    Inserted this sample edit history entry.
  774. X *    Please log any further modifications made to this file:
  775. X */
  776. X
  777. X/*
  778. X * Set line style: dash is an integer from 0 to 7.
  779. X * See Tek manual for choice of line styles.
  780. X */
  781. X#include    <stdio.h>
  782. X#include    "ctek.h"
  783. extern FILE    *pltout;
  784. X
  785. cteklinestyle (dash)
  786. X{
  787. X    cteksetmode (TEK);
  788. X    if (dash >= 0 && dash < 8)
  789. X    fprintf (pltout, "%cMV%d", ESC, dash);
  790. X}
  791. END_OF_FILE
  792. if test 892 -ne `wc -c <'Tek_device/cteklib/cteklinestyle.c'`; then
  793.     echo shar: \"'Tek_device/cteklib/cteklinestyle.c'\" unpacked with wrong size!
  794. fi
  795. # end of 'Tek_device/cteklib/cteklinestyle.c'
  796. fi
  797. if test -f 'Tek_device/cteklib/ctekopen.c' -a "${1}" != "-c" ; then 
  798.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekopen.c'\"
  799. else
  800. echo shar: Extracting \"'Tek_device/cteklib/ctekopen.c'\" \(1033 characters\)
  801. sed "s/^X//" >'Tek_device/cteklib/ctekopen.c' <<'END_OF_FILE'
  802. X/*
  803. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  804. X * University. Official permission to use this software is included in
  805. X * the documentation. It authorizes you to use this file for any
  806. X * non-commercial purpose, provided that this copyright notice is not
  807. X * removed and that any modifications made to this file are commented
  808. X * and dated in the style of my example below.
  809. X */
  810. X
  811. X/*
  812. X *
  813. X *  source file:   ./filters/cteklib/ctekopen.c
  814. X *
  815. X * Joe Dellinger (SEP), June 11 1987
  816. X *    Inserted this sample edit history entry.
  817. X *    Please log any further modifications made to this file:
  818. X */
  819. X
  820. X/*
  821. X * Device open routine
  822. X */
  823. X#include <stdio.h>
  824. X#include "../include/enum.h"
  825. X#include "../include/extern.h"
  826. X
  827. ctekopen ()
  828. X{
  829. X/*
  830. X * physical device parameters
  831. X */
  832. X    dev_xmax = 479;
  833. X    dev_ymax = 359;
  834. X    dev_xmin = 0;
  835. X    dev_ymin = 0;
  836. X    pixels_per_inch = 52.;
  837. X    aspect_ratio = 1.05;
  838. X    num_col = 8;
  839. X
  840. X/*
  841. X * device capabilities
  842. X */
  843. X    need_end_erase = NO;
  844. X    buffer_output = YES;
  845. X    smart_clip = NO;
  846. X    endpause = YES;
  847. X}
  848. END_OF_FILE
  849. if test 1033 -ne `wc -c <'Tek_device/cteklib/ctekopen.c'`; then
  850.     echo shar: \"'Tek_device/cteklib/ctekopen.c'\" unpacked with wrong size!
  851. fi
  852. # end of 'Tek_device/cteklib/ctekopen.c'
  853. fi
  854. if test -f 'Tek_device/cteklib/ctekplot.c' -a "${1}" != "-c" ; then 
  855.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/ctekplot.c'\"
  856. else
  857. echo shar: Extracting \"'Tek_device/cteklib/ctekplot.c'\" \(1038 characters\)
  858. sed "s/^X//" >'Tek_device/cteklib/ctekplot.c' <<'END_OF_FILE'
  859. X/*
  860. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  861. X * University. Official permission to use this software is included in
  862. X * the documentation. It authorizes you to use this file for any
  863. X * non-commercial purpose, provided that this copyright notice is not
  864. X * removed and that any modifications made to this file are commented
  865. X * and dated in the style of my example below.
  866. X */
  867. X
  868. X/*
  869. X *
  870. X *  source file:   ./filters/cteklib/ctekplot.c
  871. X *
  872. X * Joe Dellinger (SEP), June 11 1987
  873. X *    Inserted this sample edit history entry.
  874. X *    Please log any further modifications made to this file:
  875. X */
  876. X
  877. X/*
  878. X * Move (draw=0) or draw (draw=1) to point (x,y).
  879. X */
  880. X#include    <stdio.h>
  881. X#include    "ctek.h"
  882. X#include    "../include/enum.h"
  883. extern FILE    *pltout;
  884. X
  885. int             lost = 1;    /* used by the genvector routine */
  886. X
  887. X
  888. X/*
  889. X * Move (draw=0) or draw (draw=1) to point (x,y).
  890. X */
  891. ctekplot (x, y, draw)
  892. X    int             x, y, draw;
  893. X{
  894. X
  895. X    if (!draw)
  896. X    {
  897. X    cteksetmode (TEK);
  898. X    lost = 0;
  899. X    }
  900. X    cteksetmode (VECTOR);
  901. X    ctekxypack (x, y);
  902. X}
  903. END_OF_FILE
  904. if test 1038 -ne `wc -c <'Tek_device/cteklib/ctekplot.c'`; then
  905.     echo shar: \"'Tek_device/cteklib/ctekplot.c'\" unpacked with wrong size!
  906. fi
  907. # end of 'Tek_device/cteklib/ctekplot.c'
  908. fi
  909. if test -f 'Tek_device/cteklib/cteksetcoltab.c' -a "${1}" != "-c" ; then 
  910.   echo shar: Will not clobber existing file \"'Tek_device/cteklib/cteksetcoltab.c'\"
  911. else
  912. echo shar: Extracting \"'Tek_device/cteklib/cteksetcoltab.c'\" \(929 characters\)
  913. sed "s/^X//" >'Tek_device/cteklib/cteksetcoltab.c' <<'END_OF_FILE'
  914. X/*
  915. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  916. X * University. Official permission to use this software is included in
  917. X * the documentation. It authorizes you to use this file for any
  918. X * non-commercial purpose, provided that this copyright notice is not
  919. X * removed and that any modifications made to this file are commented
  920. X * and dated in the style of my example below.
  921. X */
  922. X
  923. X/*
  924. X *
  925. X *  source file:   ./filters/cteklib/cteksetcoltab.c
  926. X *
  927. X * Joe Dellinger (SEP), June 11 1987
  928. X *    Inserted this sample edit history entry.
  929. X *    Please log any further modifications made to this file:
  930. X */
  931. X
  932. X#include    <stdio.h>
  933. X#include    "ctek.h"
  934. X
  935. cteksetcoltab (color, v1, v2, v3)
  936. X    int             color, v1, v2, v3;
  937. X{
  938. extern FILE    *pltout;
  939. int             c;
  940. X
  941. X    c = ctekcolmap (color);
  942. X    cteksetmode (TEK);
  943. X    fprintf (pltout, "%cTG14%d", ESC, c);
  944. X    tekipack (v1);
  945. X    tekipack (v2);
  946. X    tekipack (v3);
  947. X    return;
  948. X}
  949. END_OF_FILE
  950. if test 929 -ne `wc -c <'Tek_device/cteklib/cteksetcoltab.c'`; then
  951.     echo shar: \"'Tek_device/cteklib/cteksetcoltab.c'\" unpacked with wrong size!
  952. fi
  953. # end of 'Tek_device/cteklib/cteksetcoltab.c'
  954. fi
  955. if test -f 'Tek_device/teklib/tekerase.c' -a "${1}" != "-c" ; then 
  956.   echo shar: Will not clobber existing file \"'Tek_device/teklib/tekerase.c'\"
  957. else
  958. echo shar: Extracting \"'Tek_device/teklib/tekerase.c'\" \(1029 characters\)
  959. sed "s/^X//" >'Tek_device/teklib/tekerase.c' <<'END_OF_FILE'
  960. X/*
  961. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  962. X * University. Official permission to use this software is included in
  963. X * the documentation. It authorizes you to use this file for any
  964. X * non-commercial purpose, provided that this copyright notice is not
  965. X * removed and that any modifications made to this file are commented
  966. X * and dated in the style of my example below.
  967. X */
  968. X
  969. X/*
  970. X *
  971. X *  source file:   ./filters/teklib/tekerase.c
  972. X *
  973. X * Joe Dellinger (SEP), June 11 1987
  974. X *    Inserted this sample edit history entry.
  975. X *    Please log any further modifications made to this file:
  976. X */
  977. X
  978. X/*
  979. X * Erase the graphics area
  980. X */
  981. X#include    <stdio.h>
  982. X#include    "tek.h"
  983. X#include    "../include/erasecom.h"
  984. X#include    "../include/enum.h"
  985. extern FILE    *pltout;
  986. X
  987. tekerase (command)
  988. X    int             command;
  989. X{
  990. X    switch (command)
  991. X    {
  992. X    case ERASE_START:
  993. X    case ERASE_MIDDLE:
  994. X    setmode (ALPHA);
  995. X    putc (ESC, pltout);
  996. X    putc (FF, pltout);
  997. X    messagecount = 0;
  998. X    lost = YES;
  999. X    break;
  1000. X    case ERASE_END:
  1001. X    default:
  1002. X    break;
  1003. X    }
  1004. X}
  1005. END_OF_FILE
  1006. if test 1029 -ne `wc -c <'Tek_device/teklib/tekerase.c'`; then
  1007.     echo shar: \"'Tek_device/teklib/tekerase.c'\" unpacked with wrong size!
  1008. fi
  1009. # end of 'Tek_device/teklib/tekerase.c'
  1010. fi
  1011. if test -f 'Tek_device/teklib/tekplot.c' -a "${1}" != "-c" ; then 
  1012.   echo shar: Will not clobber existing file \"'Tek_device/teklib/tekplot.c'\"
  1013. else
  1014. echo shar: Extracting \"'Tek_device/teklib/tekplot.c'\" \(900 characters\)
  1015. sed "s/^X//" >'Tek_device/teklib/tekplot.c' <<'END_OF_FILE'
  1016. X/*
  1017. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1018. X * University. Official permission to use this software is included in
  1019. X * the documentation. It authorizes you to use this file for any
  1020. X * non-commercial purpose, provided that this copyright notice is not
  1021. X * removed and that any modifications made to this file are commented
  1022. X * and dated in the style of my example below.
  1023. X */
  1024. X
  1025. X/*
  1026. X *
  1027. X *  source file:   ./filters/teklib/tekplot.c
  1028. X *
  1029. X * Joe Dellinger (SEP), June 11 1987
  1030. X *    Inserted this sample edit history entry.
  1031. X *    Please log any further modifications made to this file:
  1032. X */
  1033. X
  1034. X/*
  1035. X * Move (draw=0) or draw (draw=1) to point (x,y).
  1036. X */
  1037. X#include    <stdio.h>
  1038. X#include    "tek.h"
  1039. extern FILE    *pltout;
  1040. X
  1041. int             lost = 1;    /* used by the genvector routine */
  1042. X
  1043. tekplot (x, y, draw)
  1044. X{
  1045. X    if (!draw || (tekmode != VECTOR))
  1046. X    setmode (VECTOR);
  1047. X    tekxypack (x, y);
  1048. X    lost = 0;
  1049. X}
  1050. END_OF_FILE
  1051. if test 900 -ne `wc -c <'Tek_device/teklib/tekplot.c'`; then
  1052.     echo shar: \"'Tek_device/teklib/tekplot.c'\" unpacked with wrong size!
  1053. fi
  1054. # end of 'Tek_device/teklib/tekplot.c'
  1055. fi
  1056. if test -f 'Virtual_device/vplib/vplogmessage.c' -a "${1}" != "-c" ; then 
  1057.   echo shar: Will not clobber existing file \"'Virtual_device/vplib/vplogmessage.c'\"
  1058. else
  1059. echo shar: Extracting \"'Virtual_device/vplib/vplogmessage.c'\" \(1053 characters\)
  1060. sed "s/^X//" >'Virtual_device/vplib/vplogmessage.c' <<'END_OF_FILE'
  1061. X/*
  1062. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1063. X * University. Official permission to use this software is included in
  1064. X * the documentation. It authorizes you to use this file for any
  1065. X * non-commercial purpose, provided that this copyright notice is not
  1066. X * removed and that any modifications made to this file are commented
  1067. X * and dated in the style of my example below.
  1068. X */
  1069. X
  1070. X/*
  1071. X *
  1072. X *  source file:   ./filters/vplib/vplogmessage.c
  1073. X *
  1074. X * Joe Dellinger (SEP), Jan 10 1988
  1075. X *    Inserted this sample edit history entry.
  1076. X *    Please log any further modifications made to this file:
  1077. X */
  1078. X
  1079. X#include <stdio.h>
  1080. X#include "../include/enum.h"
  1081. X#include "../include/mesgcom.h"
  1082. X#include "vp.h"
  1083. X
  1084. static int      saveitlog;
  1085. X
  1086. vplogmessage (command, string)
  1087. X    int             command;
  1088. X    char            string[];
  1089. X{
  1090. X    switch (command)
  1091. X    {
  1092. X    case MESG_READY:
  1093. X    saveitlog = YES;
  1094. X    break;
  1095. X    case MESG_MESSAGE:
  1096. X    saveitlog = NO;
  1097. X    break;
  1098. X    case MESG_TEXT:
  1099. X    if (saveitlog)
  1100. X        fprintf (stderr, "%s", string);
  1101. X    break;
  1102. X    default:
  1103. X    break;
  1104. X    }
  1105. X}
  1106. END_OF_FILE
  1107. if test 1053 -ne `wc -c <'Virtual_device/vplib/vplogmessage.c'`; then
  1108.     echo shar: \"'Virtual_device/vplib/vplogmessage.c'\" unpacked with wrong size!
  1109. fi
  1110. # end of 'Virtual_device/vplib/vplogmessage.c'
  1111. fi
  1112. if test -f 'Virtual_device/vplib/vpplot.c' -a "${1}" != "-c" ; then 
  1113.   echo shar: Will not clobber existing file \"'Virtual_device/vplib/vpplot.c'\"
  1114. else
  1115. echo shar: Extracting \"'Virtual_device/vplib/vpplot.c'\" \(911 characters\)
  1116. sed "s/^X//" >'Virtual_device/vplib/vpplot.c' <<'END_OF_FILE'
  1117. X/*
  1118. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1119. X * University. Official permission to use this software is included in
  1120. X * the documentation. It authorizes you to use this file for any
  1121. X * non-commercial purpose, provided that this copyright notice is not
  1122. X * removed and that any modifications made to this file are commented
  1123. X * and dated in the style of my example below.
  1124. X */
  1125. X
  1126. X/*
  1127. X *
  1128. X *  source file:   ./filters/vplib/vpplot.c
  1129. X *
  1130. X * Joe Dellinger (SEP), Dec 19 1987
  1131. X *    Inserted this sample edit history entry.
  1132. X *    Please log any further modifications made to this file:
  1133. X */
  1134. X
  1135. X#include <vplot.h>
  1136. X#include "../include/enum.h"
  1137. X#include "vp.h"
  1138. X
  1139. int             lost = YES;
  1140. X
  1141. vpplot (x, y, draw)
  1142. X    int             x, y, draw;
  1143. X{
  1144. X
  1145. X    vpsetflag = NO;
  1146. X
  1147. X    if (draw)
  1148. X    vp_draw ((float) x / RPERIN, (float) y / RPERIN);
  1149. X    else
  1150. X    vp_move ((float) x / RPERIN, (float) y / RPERIN);
  1151. X
  1152. X    lost = NO;
  1153. X}
  1154. END_OF_FILE
  1155. if test 911 -ne `wc -c <'Virtual_device/vplib/vpplot.c'`; then
  1156.     echo shar: \"'Virtual_device/vplib/vpplot.c'\" unpacked with wrong size!
  1157. fi
  1158. # end of 'Virtual_device/vplib/vpplot.c'
  1159. fi
  1160. if test -f 'Virtual_device/vplib/vpsepwhere.c' -a "${1}" != "-c" ; then 
  1161.   echo shar: Will not clobber existing file \"'Virtual_device/vplib/vpsepwhere.c'\"
  1162. else
  1163. echo shar: Extracting \"'Virtual_device/vplib/vpsepwhere.c'\" \(875 characters\)
  1164. sed "s/^X//" >'Virtual_device/vplib/vpsepwhere.c' <<'END_OF_FILE'
  1165. X/*
  1166. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1167. X * University. Official permission to use this software is included in
  1168. X * the documentation. It authorizes you to use this file for any
  1169. X * non-commercial purpose, provided that this copyright notice is not
  1170. X * removed and that any modifications made to this file are commented
  1171. X * and dated in the style of my example below.
  1172. X */
  1173. X
  1174. X/*
  1175. X *
  1176. X *  source file:   ./filters/vplib/vpsepwhere.c
  1177. X *
  1178. X * Joe Dellinger (SEP), Feb 12 1988
  1179. X *    Inserted this sample edit history entry.
  1180. X *    Please log any further modifications made to this file:
  1181. X */
  1182. X
  1183. X#ifdef SEP
  1184. X/*
  1185. X * Override the default places Pen wants to send "out" and "head".
  1186. X * Change them back to the normal SEP defaults.
  1187. X */
  1188. char            sepoutwhere[] = "";
  1189. char            sepheadwhere[] = "";
  1190. X
  1191. X/* Make linker happy that it found it. */
  1192. sepwhere ()
  1193. X{
  1194. X};
  1195. X#endif
  1196. END_OF_FILE
  1197. if test 875 -ne `wc -c <'Virtual_device/vplib/vpsepwhere.c'`; then
  1198.     echo shar: \"'Virtual_device/vplib/vpsepwhere.c'\" unpacked with wrong size!
  1199. fi
  1200. # end of 'Virtual_device/vplib/vpsepwhere.c'
  1201. fi
  1202. if test -f 'Vplot_Kernel/Hershey/README' -a "${1}" != "-c" ; then 
  1203.   echo shar: Will not clobber existing file \"'Vplot_Kernel/Hershey/README'\"
  1204. else
  1205. echo shar: Extracting \"'Vplot_Kernel/Hershey/README'\" \(1036 characters\)
  1206. sed "s/^X//" >'Vplot_Kernel/Hershey/README' <<'END_OF_FILE'
  1207. This directory contains everything you need to create yourself a nice
  1208. set of Vplot fonts GIVEN the hershey font set already. Note that the .hmp
  1209. files here are somewhat different (better) from the .hmp files that come
  1210. with the Hershey fonts. (IE, keep the .oc files, since they contain
  1211. what you need, but throw away their .hmp files and use mine instead.)
  1212. X
  1213. Only "normal" sized fonts are used. If you want small characters, just scale
  1214. down the normal-sized ones!
  1215. X
  1216. Documentation is contained in the beginning lines of all .csh and .c files,
  1217. although the "make_vplot.csh" shell should do everything for you.
  1218. X
  1219. Note that the "romant" font of the Hershey fonts has an error in it. If you
  1220. have the "Hershey_Fonts" directory as part of your distribution, you will find
  1221. the "fixed" romant.vplot_font file there. Otherwise, read the comments in
  1222. make_vplot.csh and fix the error by hand (or do without).
  1223. X
  1224. The files in this directory are NOT under the Vplot copyright, as
  1225. some files contain code from the Hershey Font distribution.
  1226. X
  1227. X- Joe Dellinger
  1228. END_OF_FILE
  1229. if test 1036 -ne `wc -c <'Vplot_Kernel/Hershey/README'`; then
  1230.     echo shar: \"'Vplot_Kernel/Hershey/README'\" unpacked with wrong size!
  1231. fi
  1232. # end of 'Vplot_Kernel/Hershey/README'
  1233. fi
  1234. if test -f 'Vplot_Kernel/Makefile' -a "${1}" != "-c" ; then 
  1235.   echo shar: Will not clobber existing file \"'Vplot_Kernel/Makefile'\"
  1236. else
  1237. echo shar: Extracting \"'Vplot_Kernel/Makefile'\" \(916 characters\)
  1238. sed "s/^X//" >'Vplot_Kernel/Makefile' <<'END_OF_FILE'
  1239. all:
  1240. X    @echo "Make install to install all graphical stuff"
  1241. X
  1242. install:
  1243. X    echo "You must be superuser to do this!"
  1244. X    sleep 1
  1245. X#    System-wide include file
  1246. X    -cd filters; ln -s `pwd`/include/vplot.h /usr/include/vplot.h
  1247. X#    Vplotlib
  1248. X    cd lvplot; make install
  1249. X#    Install the fonts
  1250. X#        This will crash if you don't have the Hershey_Fonts directory.
  1251. X#        If you have the short distribution, you'll need to get the
  1252. X#        Hershey Fonts yourself, generate the .oc files, and copy
  1253. X#        them into the "Hershey" directory. Having done that, you
  1254. X#        won't need this next line.
  1255. X    cd Hershey_Fonts; csh -xf README_Vplot
  1256. X    cd Hershey; csh -xf make_vplot.csh
  1257. X    cd ./filters/include/vplotfonts; make
  1258. X#    Filters
  1259. X    cd filters; csh -f MakeMake; make install
  1260. X#    Utilities
  1261. X    cd util; make install
  1262. X#    Manual Pages
  1263. X#        Beware, we keep our manual pages in "man9". Might need to
  1264. X#        change "./Documentation/install.csh" for your site.
  1265. X    cd Documentation; csh -xf install.csh
  1266. END_OF_FILE
  1267. if test 916 -ne `wc -c <'Vplot_Kernel/Makefile'`; then
  1268.     echo shar: \"'Vplot_Kernel/Makefile'\" unpacked with wrong size!
  1269. fi
  1270. # end of 'Vplot_Kernel/Makefile'
  1271. fi
  1272. if test -f 'Vplot_Kernel/filters/Tests/ellips.f' -a "${1}" != "-c" ; then 
  1273.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/Tests/ellips.f'\"
  1274. else
  1275. echo shar: Extracting \"'Vplot_Kernel/filters/Tests/ellips.f'\" \(1014 characters\)
  1276. sed "s/^X//" >'Vplot_Kernel/filters/Tests/ellips.f' <<'END_OF_FILE'
  1277. c     draw some ellipses  
  1278. c
  1279. X    parameter ( ne = 6 )
  1280. X    parameter ( nx = 100 , ny = 100 )
  1281. c
  1282. X    real a(ne) , b(ne)
  1283. X    real xco(2*nx) , yco(2*ny)
  1284. X    integer col(ne)
  1285. X
  1286. X    data a/1.,2.,3.,1.,1.,1./
  1287. X    data b/1.,1.,1.,2.,3.,4./
  1288. X    data col/6,5,4,3,2,1/
  1289. X    
  1290. X    call vpfile('f.vp')
  1291. X    call vperase()
  1292. c      .75 = SCREEN_RATIO from vplot.h
  1293. X    call vpstretch(-10.,-10.*.75,10.,10.*.75)
  1294. X    call vpumove(-10.,-10.*.75)
  1295. X    call vpudraw(10.,-10.*.75)
  1296. X    call vpudraw(10.,10.*.75)
  1297. X    call vpudraw(-10.,10.*.75)
  1298. X    call vpudraw(-10.,-10.*.75)
  1299. X
  1300. X    do 1 ie =1,ne
  1301. X    call vpcolor( col(ie) )
  1302. X
  1303. X    xmin = -a(ie)
  1304. X    dx = 2*abs(xmin)/(nx-1)
  1305. c
  1306. X    call vpumove(xmin,0.)
  1307. X    do 10 i = 1,nx
  1308. X    x = ( xmin + (i-1)*dx )
  1309. X    y = b(ie)*sqrt ( 1. - x*x/( a(ie)**2 ) )
  1310. X    xco(i)=x
  1311. X    yco(i)=y
  1312. X    call vpudraw(x,y)
  1313. X10     continue
  1314. X
  1315. X    call vpumove(xmin,0.)
  1316. X    do 20 i = 1,nx
  1317. X    x = ( xmin + (i-1)*dx )
  1318. X    y = - b(ie)*sqrt ( 1. - x*x/( a(ie)**2 ) )
  1319. X    xco(nx+i)=x
  1320. X    yco(nx+i)=y
  1321. X    call vpudraw(x,y)
  1322. X20     continue
  1323. X
  1324. X     if ( ie .eq. 1 ) call vpuarea(xco,yco, 2*nx, 1, 4, 4)
  1325. X
  1326. X1    continue
  1327. X
  1328. X
  1329. X    call vpendplot('f.vp')
  1330. X    stop
  1331. X    end
  1332. END_OF_FILE
  1333. if test 1014 -ne `wc -c <'Vplot_Kernel/filters/Tests/ellips.f'`; then
  1334.     echo shar: \"'Vplot_Kernel/filters/Tests/ellips.f'\" unpacked with wrong size!
  1335. fi
  1336. # end of 'Vplot_Kernel/filters/Tests/ellips.f'
  1337. fi
  1338. if test -f 'Vplot_Kernel/filters/genlib/known_bugs' -a "${1}" != "-c" ; then 
  1339.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/genlib/known_bugs'\"
  1340. else
  1341. echo shar: Extracting \"'Vplot_Kernel/filters/genlib/known_bugs'\" \(1061 characters\)
  1342. sed "s/^X//" >'Vplot_Kernel/filters/genlib/known_bugs' <<'END_OF_FILE'
  1343. genhatch.c:
  1344. X    Hatch lines may go one pixel outside of polygon boundary. Need to use
  1345. X    a smarter clipping algorithm. This isn't too bad, because on
  1346. X    high-resolution output devices who cares about one pixel anyway?
  1347. X    Genhatch produces a slight (one pixel) discontinuity across
  1348. X    device coordinate zero (Since not many devices work with negative
  1349. X    coordinates, not much of a problem. But, of course, we have one, the
  1350. X    Rastertek.)
  1351. X        If you go one pixel too far, then fatten the line, you have a
  1352. X        very noticeable problem. -- crk
  1353. X
  1354. fatvec.c:
  1355. X    Very fat tilted lines may leave slight gaps here and there.
  1356. X    (If you don't understand what I mean, just try it.)
  1357. X    Tilted lines don't fatten to the same width as vertical or horizontal
  1358. X    lines.
  1359. X
  1360. genmarker.c:
  1361. X    Use a real circle-drawing algorithm to make perfect circles,
  1362. X    instead of using the ho-hum fattened Hershey-font circles.
  1363. X
  1364. genarea.c, polysubs.c, polyfix.c:
  1365. X    Should use linked lists instead of the large static arrays it
  1366. X    currently uses. Should take out the awful repeated code to do
  1367. X    the preliminary clipping to each edge.
  1368. END_OF_FILE
  1369. if test 1061 -ne `wc -c <'Vplot_Kernel/filters/genlib/known_bugs'`; then
  1370.     echo shar: \"'Vplot_Kernel/filters/genlib/known_bugs'\" unpacked with wrong size!
  1371. fi
  1372. # end of 'Vplot_Kernel/filters/genlib/known_bugs'
  1373. fi
  1374. if test -f 'Vplot_Kernel/filters/loclib/Puthead.c' -a "${1}" != "-c" ; then 
  1375.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/loclib/Puthead.c'\"
  1376. else
  1377. echo shar: Extracting \"'Vplot_Kernel/filters/loclib/Puthead.c'\" \(1105 characters\)
  1378. sed "s/^X//" >'Vplot_Kernel/filters/loclib/Puthead.c' <<'END_OF_FILE'
  1379. X/*
  1380. X *
  1381. X *  source file:   ./filters/loclib/Puthead.c
  1382. X *
  1383. X * Joe Dellinger (SEP), June 11 1987
  1384. X *    Inserted this sample edit history entry.
  1385. X *    Please log any further modifications made to this file:
  1386. X *
  1387. X * Joe Dellinger Dec 19 1987
  1388. X *    Added check for hclose_done; Don't write to header if we've
  1389. X *    closed the history part.
  1390. X */
  1391. X
  1392. X/*
  1393. X *    The standard version of puthead will barf if the header
  1394. X *    is closed or if headstream has been changed from the last call.
  1395. X *    We need it to be tolerant of these inconsistencies.
  1396. X */
  1397. X
  1398. X#include    <stdio.h>
  1399. X#define MIXED    union { char *s; int *i; float *f; double *g; }
  1400. X
  1401. extern int      hclose_done;
  1402. X
  1403. X/*
  1404. X *    put a line on the header.
  1405. X *    the arguments are identical to printf conventions, except 
  1406. X *        there is a maximum of nine
  1407. X */
  1408. X
  1409. Puthead (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
  1410. X    char           *a, *b, *c, *d, *e, *f, *g, *h, *i, *j, *k, *l, *m, *n, *o, *p;
  1411. X{
  1412. FILE           *file;
  1413. extern FILE    *headstream;
  1414. X    if (headstream == NULL || hclose_done)
  1415. X    return;
  1416. X    fprintf (headstream, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p);
  1417. X    fflush (headstream);
  1418. X}
  1419. END_OF_FILE
  1420. if test 1105 -ne `wc -c <'Vplot_Kernel/filters/loclib/Puthead.c'`; then
  1421.     echo shar: \"'Vplot_Kernel/filters/loclib/Puthead.c'\" unpacked with wrong size!
  1422. fi
  1423. # end of 'Vplot_Kernel/filters/loclib/Puthead.c'
  1424. fi
  1425. if test -f 'Vplot_Kernel/filters/loclib/file.c' -a "${1}" != "-c" ; then 
  1426.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/loclib/file.c'\"
  1427. else
  1428. echo shar: Extracting \"'Vplot_Kernel/filters/loclib/file.c'\" \(959 characters\)
  1429. sed "s/^X//" >'Vplot_Kernel/filters/loclib/file.c' <<'END_OF_FILE'
  1430. X/*
  1431. X *    opens and creates file
  1432. X *    arguments:
  1433. X *        name    character string containing filename
  1434. X *        mode    0 open only
  1435. X *            1 create only
  1436. X *            2 try open, then create
  1437. X *    returns file descriptor
  1438. X */
  1439. int 
  1440. file (name, mode)
  1441. X    char           *name;
  1442. X    int             mode;
  1443. X{
  1444. int             filedes, open (), creat ();
  1445. X    switch (mode)
  1446. X    {
  1447. X    case 0:
  1448. X    if ((filedes = open (name, 0)) == -1)
  1449. X    {
  1450. X        perror ("file()");
  1451. X        err ("file() can't open file %s\n", name);
  1452. X    }
  1453. X    break;
  1454. X    case 2:
  1455. X    if ((filedes = open (name, 2)) == -1)
  1456. X    case 1:
  1457. X        if ((filedes = creat (name, 0664)) == -1)
  1458. X        {
  1459. X        perror ("file()");
  1460. X        err ("file() can't create file %s\n", name);
  1461. X        }
  1462. X        else
  1463. X        {
  1464. X        if (-1 == close (filedes))
  1465. X        {
  1466. X            perror ("file()");
  1467. X            err ("file() unable to close file %s\n", name);
  1468. X        }
  1469. X        if (-1 == (filedes = open (name, 2)))
  1470. X        {
  1471. X            perror ("file()");
  1472. X            err ("file() unable to open file %s\n", name);
  1473. X        }
  1474. X        }
  1475. X    }
  1476. X    return (filedes);
  1477. X}
  1478. END_OF_FILE
  1479. if test 959 -ne `wc -c <'Vplot_Kernel/filters/loclib/file.c'`; then
  1480.     echo shar: \"'Vplot_Kernel/filters/loclib/file.c'\" unpacked with wrong size!
  1481. fi
  1482. # end of 'Vplot_Kernel/filters/loclib/file.c'
  1483. fi
  1484. if test -f 'Vplot_Kernel/filters/loclib/getpar_string_store.c' -a "${1}" != "-c" ; then 
  1485.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/loclib/getpar_string_store.c'\"
  1486. else
  1487. echo shar: Extracting \"'Vplot_Kernel/filters/loclib/getpar_string_store.c'\" \(968 characters\)
  1488. sed "s/^X//" >'Vplot_Kernel/filters/loclib/getpar_string_store.c' <<'END_OF_FILE'
  1489. X/*
  1490. X *
  1491. X *  source file:   ./filters/loclib/getpar_string_store.c
  1492. X *
  1493. X * Joe Dellinger (SEP), June 11 1987
  1494. X *    Inserted this sample edit history entry.
  1495. X *    Please log any further modifications made to this file:
  1496. X */
  1497. X
  1498. X/* Rewrite 3-8-86 stew  Don't invoke parser unless we see par=.  This
  1499. X *            leaves the shell's parsed output of the command
  1500. X *            line intact, fixing joe's complaint.  Also a
  1501. X *            bit faster.
  1502. X *       2-15-88 joe  Should be hash_item "**q", not "*q". Oops.
  1503. X */
  1504. X#include "fastpar.h"
  1505. X#include <stdio.h>
  1506. X#include <strings.h>
  1507. getpar_string_store(q,qsize,string)
  1508. hash_item **q;
  1509. int qsize;
  1510. register char *string;
  1511. X{
  1512. X register int tlen, vlen;
  1513. X register char *val;
  1514. X
  1515. X val = index(string,'=');
  1516. X if(val == ((char *) NULL)) return;
  1517. X tlen = val - string;
  1518. X if(tlen <= 0) return;
  1519. X val++;
  1520. X vlen=strlen(val);
  1521. X if(vlen <= 0) return;
  1522. X getpar_hash_store(q,qsize,string,val,tlen,vlen);
  1523. X if( tlen==3 && 0==bcmp(string,"par",3) ) {
  1524. X     getpar_stack_par(val);
  1525. X    getpar_scan(q,qsize);
  1526. X    }
  1527. X}
  1528. END_OF_FILE
  1529. if test 968 -ne `wc -c <'Vplot_Kernel/filters/loclib/getpar_string_store.c'`; then
  1530.     echo shar: \"'Vplot_Kernel/filters/loclib/getpar_string_store.c'\" unpacked with wrong size!
  1531. fi
  1532. # end of 'Vplot_Kernel/filters/loclib/getpar_string_store.c'
  1533. fi
  1534. if test -f 'Vplot_Kernel/filters/loclib/known_bugs' -a "${1}" != "-c" ; then 
  1535.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/loclib/known_bugs'\"
  1536. else
  1537. echo shar: Extracting \"'Vplot_Kernel/filters/loclib/known_bugs'\" \(868 characters\)
  1538. sed "s/^X//" >'Vplot_Kernel/filters/loclib/known_bugs' <<'END_OF_FILE'
  1539. err.c should use VARARGS, but doesn't unless either "SUN" or "ULTRIX" is
  1540. defined, since it uses vsprintf. There seems to be no easy portable documented
  1541. way to write this routine on systems that don't provide vsprintf! I think
  1542. it must be possible with something called "_doprnt", but it seems to be
  1543. completely undocumented.
  1544. X
  1545. I think getpar should work OK, at least as far as the non-sep parts go.
  1546. It seems to be consistent within itself, and the one interface to the
  1547. outside world, "getpar", is varargs. However I wouldn't be surprised
  1548. if this routine gave problems on some C compilers. Someone gave me
  1549. a re-write of the routine that was supposed to be kosher for Sun IV's,
  1550. but it core dumped on our Convex and Sun III's...
  1551. X
  1552. Bufpar.c isn't used in vplot, but it is used in many programs often
  1553. associated with vplot around Stanford that link to loclib, so I include it.
  1554. END_OF_FILE
  1555. if test 868 -ne `wc -c <'Vplot_Kernel/filters/loclib/known_bugs'`; then
  1556.     echo shar: \"'Vplot_Kernel/filters/loclib/known_bugs'\" unpacked with wrong size!
  1557. fi
  1558. # end of 'Vplot_Kernel/filters/loclib/known_bugs'
  1559. fi
  1560. if test -f 'Vplot_Kernel/filters/utilities/solve.c' -a "${1}" != "-c" ; then 
  1561.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/utilities/solve.c'\"
  1562. else
  1563. echo shar: Extracting \"'Vplot_Kernel/filters/utilities/solve.c'\" \(1075 characters\)
  1564. sed "s/^X//" >'Vplot_Kernel/filters/utilities/solve.c' <<'END_OF_FILE'
  1565. X/*
  1566. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1567. X * University. Official permission to use this software is included in
  1568. X * the documentation. It authorizes you to use this file for any
  1569. X * non-commercial purpose, provided that this copyright notice is not
  1570. X * removed and that any modifications made to this file are commented
  1571. X * and dated in the style of my example below.
  1572. X */
  1573. X
  1574. X/*
  1575. X *
  1576. X *  source file:   ./filters/utilities/solve.c
  1577. X *
  1578. X * Joe Dellinger (SEP), June 11 1987
  1579. X *    Inserted this sample edit history entry.
  1580. X *    Please log any further modifications made to this file:
  1581. X */
  1582. X
  1583. X/*
  1584. X * compute intersection - floating point version
  1585. X */
  1586. X
  1587. solve (pnot, p1, q1, p2, q2)
  1588. X    register int    pnot, p1, q1, p2, q2;
  1589. X{
  1590. double          invslope;
  1591. register int    qnot;
  1592. register float  tempf;
  1593. X    if (pnot == p1)
  1594. X    return (q1);
  1595. X    if (pnot == p2)
  1596. X    return (q2);
  1597. X    if (q1 == q2)
  1598. X    return (q1);
  1599. X    invslope = (q1 - q2) / ((double) (p1 - p2));
  1600. X    tempf = (pnot - p1) * invslope + (double) q1;
  1601. X    qnot = (tempf > 0) ? tempf + 0.5 : tempf - 0.5;
  1602. X    return (qnot);
  1603. X}
  1604. END_OF_FILE
  1605. if test 1075 -ne `wc -c <'Vplot_Kernel/filters/utilities/solve.c'`; then
  1606.     echo shar: \"'Vplot_Kernel/filters/utilities/solve.c'\" unpacked with wrong size!
  1607. fi
  1608. # end of 'Vplot_Kernel/filters/utilities/solve.c'
  1609. fi
  1610. if test -f 'Vplot_Kernel/filters/utilities/sort.c' -a "${1}" != "-c" ; then 
  1611.   echo shar: Will not clobber existing file \"'Vplot_Kernel/filters/utilities/sort.c'\"
  1612. else
  1613. echo shar: Extracting \"'Vplot_Kernel/filters/utilities/sort.c'\" \(1047 characters\)
  1614. sed "s/^X//" >'Vplot_Kernel/filters/utilities/sort.c' <<'END_OF_FILE'
  1615. X/*
  1616. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1617. X * University. Official permission to use this software is included in
  1618. X * the documentation. It authorizes you to use this file for any
  1619. X * non-commercial purpose, provided that this copyright notice is not
  1620. X * removed and that any modifications made to this file are commented
  1621. X * and dated in the style of my example below.
  1622. X */
  1623. X
  1624. X/*
  1625. X *
  1626. X *  source file:   ./filters/utilities/sort.c
  1627. X *
  1628. X * Joe Dellinger (SEP), June 11 1987
  1629. X *    Inserted this sample edit history entry.
  1630. X *    Please log any further modifications made to this file:
  1631. X */
  1632. X
  1633. X/*
  1634. X * VPLOT filter utility routine
  1635. X * sort the elements of vec into ascending order.
  1636. X */
  1637. sort (vec, n)
  1638. X    register int   *vec;
  1639. X    int             n;
  1640. X{
  1641. register int   *above, *below, *last;
  1642. register int    temp;
  1643. X    last = vec + (n - 1);
  1644. X    for (above = vec; above < last; above++)
  1645. X    {
  1646. X    for (below = above + 1; below <= last; below++)
  1647. X    {
  1648. X        if (*above > *below)
  1649. X        {
  1650. X        temp = *above;
  1651. X        *above = *below;
  1652. X        *below = temp;
  1653. X        }
  1654. X    }
  1655. X    }
  1656. X}
  1657. END_OF_FILE
  1658. if test 1047 -ne `wc -c <'Vplot_Kernel/filters/utilities/sort.c'`; then
  1659.     echo shar: \"'Vplot_Kernel/filters/utilities/sort.c'\" unpacked with wrong size!
  1660. fi
  1661. # end of 'Vplot_Kernel/filters/utilities/sort.c'
  1662. fi
  1663. if test -f 'Vplot_Kernel/lvplot/puth.c' -a "${1}" != "-c" ; then 
  1664.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/puth.c'\"
  1665. else
  1666. echo shar: Extracting \"'Vplot_Kernel/lvplot/puth.c'\" \(926 characters\)
  1667. sed "s/^X//" >'Vplot_Kernel/lvplot/puth.c' <<'END_OF_FILE'
  1668. X/*
  1669. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1670. X * University. Official permission to use this software is included in
  1671. X * the documentation. It authorizes you to use this file for any
  1672. X * non-commercial purpose, provided that this copyright notice is not
  1673. X * removed and that any modifications made to this file are commented
  1674. X * and dated in the style of my example below.
  1675. X */
  1676. X
  1677. X/*
  1678. X *
  1679. X *  source file:   ./lvplot/puth.c
  1680. X *
  1681. X * Joe Dellinger (SEP), June 11 1987
  1682. X *    Inserted this sample edit history entry.
  1683. X *    Please log any further modifications made to this file:
  1684. X */
  1685. X
  1686. X#ifndef FORTRAN
  1687. X#include <stdio.h>
  1688. X
  1689. puth (w, iop)
  1690. X    register int    w;
  1691. X    register FILE  *iop;
  1692. X{
  1693. register int    j;
  1694. X
  1695. X    j = w & 255;        /* low order byte of halfword value */
  1696. X    w >>= 8;
  1697. X    putc ((char) j, iop);
  1698. X    j = w & 255;        /* high order byte of halfword value */
  1699. X    putc ((char) j, iop);
  1700. X    return (ferror (iop));
  1701. X}
  1702. X#endif
  1703. END_OF_FILE
  1704. if test 926 -ne `wc -c <'Vplot_Kernel/lvplot/puth.c'`; then
  1705.     echo shar: \"'Vplot_Kernel/lvplot/puth.c'\" unpacked with wrong size!
  1706. fi
  1707. # end of 'Vplot_Kernel/lvplot/puth.c'
  1708. fi
  1709. if test -f 'Vplot_Kernel/lvplot/vp_color.c' -a "${1}" != "-c" ; then 
  1710.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_color.c'\"
  1711. else
  1712. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_color.c'\" \(906 characters\)
  1713. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_color.c' <<'END_OF_FILE'
  1714. X/*
  1715. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1716. X * University. Official permission to use this software is included in
  1717. X * the documentation. It authorizes you to use this file for any
  1718. X * non-commercial purpose, provided that this copyright notice is not
  1719. X * removed and that any modifications made to this file are commented
  1720. X * and dated in the style of my example below.
  1721. X */
  1722. X
  1723. X/*
  1724. X *
  1725. X *  source file:   ./lvplot/vp_color.c
  1726. X *
  1727. X * Joe Dellinger (SEP), June 11 1987
  1728. X *    Inserted this sample edit history entry.
  1729. X *    Please log any further modifications made to this file:
  1730. X */
  1731. X
  1732. X#include <stdio.h>
  1733. X#include <vplot.h>
  1734. X#include "vp_pc.h"
  1735. X
  1736. X#ifdef FORTRAN
  1737. X
  1738. X#define COLOR vpcolor_
  1739. X#define COL   *col
  1740. X
  1741. X#else
  1742. X
  1743. X#define COLOR vp_color
  1744. X#define COL   col
  1745. X
  1746. X#endif
  1747. X
  1748. COLOR (col)
  1749. X    int             COL;
  1750. X{
  1751. int             c;
  1752. X    c = COL;
  1753. X    putc (VP_COLOR, vp_pc._pltout);
  1754. X    puth (c, vp_pc._pltout);
  1755. X}
  1756. END_OF_FILE
  1757. if test 906 -ne `wc -c <'Vplot_Kernel/lvplot/vp_color.c'`; then
  1758.     echo shar: \"'Vplot_Kernel/lvplot/vp_color.c'\" unpacked with wrong size!
  1759. fi
  1760. # end of 'Vplot_Kernel/lvplot/vp_color.c'
  1761. fi
  1762. if test -f 'Vplot_Kernel/lvplot/vp_fat.c' -a "${1}" != "-c" ; then 
  1763.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_fat.c'\"
  1764. else
  1765. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_fat.c'\" \(922 characters\)
  1766. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_fat.c' <<'END_OF_FILE'
  1767. X/*
  1768. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1769. X * University. Official permission to use this software is included in
  1770. X * the documentation. It authorizes you to use this file for any
  1771. X * non-commercial purpose, provided that this copyright notice is not
  1772. X * removed and that any modifications made to this file are commented
  1773. X * and dated in the style of my example below.
  1774. X */
  1775. X
  1776. X/*
  1777. X *
  1778. X *  source file:   ./lvplot/vp_fat.c
  1779. X *
  1780. X * Joe Dellinger (SEP), June 11 1987
  1781. X *    Inserted this sample edit history entry.
  1782. X *    Please log any further modifications made to this file:
  1783. X */
  1784. X
  1785. X#include <stdio.h>
  1786. X#include <vplot.h>
  1787. X#include "vp_pc.h"
  1788. X
  1789. X#ifdef FORTRAN
  1790. X
  1791. X#define FAT      vpfat_
  1792. X#define FATNESS  *fatness
  1793. X
  1794. X#else
  1795. X
  1796. X#define FAT      vp_fat
  1797. X#define FATNESS  fatness
  1798. X
  1799. X#endif
  1800. X
  1801. FAT (fatness)
  1802. X    int             FATNESS;
  1803. X{
  1804. int             f;
  1805. X    f = FATNESS;
  1806. X    putc (VP_FAT, vp_pc._pltout);
  1807. X    puth (f, vp_pc._pltout);
  1808. X}
  1809. END_OF_FILE
  1810. if test 922 -ne `wc -c <'Vplot_Kernel/lvplot/vp_fat.c'`; then
  1811.     echo shar: \"'Vplot_Kernel/lvplot/vp_fat.c'\" unpacked with wrong size!
  1812. fi
  1813. # end of 'Vplot_Kernel/lvplot/vp_fat.c'
  1814. fi
  1815. if test -f 'Vplot_Kernel/lvplot/vp_filep.c' -a "${1}" != "-c" ; then 
  1816.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_filep.c'\"
  1817. else
  1818. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_filep.c'\" \(886 characters\)
  1819. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_filep.c' <<'END_OF_FILE'
  1820. X/*
  1821. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1822. X * University. Official permission to use this software is included in
  1823. X * the documentation. It authorizes you to use this file for any
  1824. X * non-commercial purpose, provided that this copyright notice is not
  1825. X * removed and that any modifications made to this file are commented
  1826. X * and dated in the style of my example below.
  1827. X */
  1828. X
  1829. X/*
  1830. X *
  1831. X *  source file:   ./lvplot/vp_filep.c
  1832. X *
  1833. X * Joe Dellinger (SEP), June 11 1987
  1834. X *    Inserted this sample edit history entry.
  1835. X *    Please log any further modifications made to this file:
  1836. X */
  1837. X
  1838. X#include <stdio.h>
  1839. X#include <vplot.h>
  1840. X#include "vp_pc.h"
  1841. X
  1842. X#ifndef FORTRAN
  1843. vp_filep (filepntr)
  1844. X    FILE           *filepntr;
  1845. X{
  1846. X    vp_pc._pltout = filepntr;
  1847. X}
  1848. X#else
  1849. vpfilep_ (filepntr)
  1850. X    int            *filepntr;
  1851. X{
  1852. extern FILE    *fdopen ();
  1853. X    vp_filep (fdopen (*filepntr, "w"));
  1854. X}
  1855. X#endif
  1856. END_OF_FILE
  1857. if test 886 -ne `wc -c <'Vplot_Kernel/lvplot/vp_filep.c'`; then
  1858.     echo shar: \"'Vplot_Kernel/lvplot/vp_filep.c'\" unpacked with wrong size!
  1859. fi
  1860. # end of 'Vplot_Kernel/lvplot/vp_filep.c'
  1861. fi
  1862. if test -f 'Vplot_Kernel/lvplot/vp_pc.h' -a "${1}" != "-c" ; then 
  1863.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_pc.h'\"
  1864. else
  1865. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_pc.h'\" \(952 characters\)
  1866. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_pc.h' <<'END_OF_FILE'
  1867. X#include <stdio.h>
  1868. X
  1869. typedef struct 
  1870. X{
  1871. X    float _x0, _y0;        /* origin in inches */
  1872. X    float _xu0, _yu0;    /* value in user units corresponding to x0,y0 */
  1873. X    float _xscl, _yscl;    /* scaling from user units to inches */
  1874. X    float _xold, _yold;    /* old pen position (in inches) */
  1875. X    float _dpos;        /* position in dash sequence (in inches) */
  1876. X    float _ddef[4];        /* definition of current dashes (in inches) */
  1877. X    int _dashon;        /* =0 if not dashed line; =1 if dashed line */
  1878. X    int _pendown;        /* is pen up or down */
  1879. X    FILE *_pltout;        /* output file */
  1880. X    int _xjust, _yjust;    /* current x and y text justification */
  1881. X    int _font, _prec, _ovly;/* current text font, precision, and overlay */
  1882. X} PC;
  1883. X
  1884. X/*
  1885. X * This structure used to be called just plain "pc", but this is disaster
  1886. X * on 4.3bsd where the same name is used in the internal FORTRAN routines.
  1887. X * You get no warnings about this from the linker, either! You just get
  1888. X * random problems all over the place.
  1889. X */
  1890. X
  1891. extern PC vp_pc;
  1892. END_OF_FILE
  1893. if test 952 -ne `wc -c <'Vplot_Kernel/lvplot/vp_pc.h'`; then
  1894.     echo shar: \"'Vplot_Kernel/lvplot/vp_pc.h'\" unpacked with wrong size!
  1895. fi
  1896. # end of 'Vplot_Kernel/lvplot/vp_pc.h'
  1897. fi
  1898. if test -f 'Vplot_Kernel/lvplot/vp_scale.c' -a "${1}" != "-c" ; then 
  1899.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_scale.c'\"
  1900. else
  1901. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_scale.c'\" \(908 characters\)
  1902. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_scale.c' <<'END_OF_FILE'
  1903. X/*
  1904. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1905. X * University. Official permission to use this software is included in
  1906. X * the documentation. It authorizes you to use this file for any
  1907. X * non-commercial purpose, provided that this copyright notice is not
  1908. X * removed and that any modifications made to this file are commented
  1909. X * and dated in the style of my example below.
  1910. X */
  1911. X
  1912. X/*
  1913. X *
  1914. X *  source file:   ./lvplot/vp_scale.c
  1915. X *
  1916. X * Joe Dellinger (SEP), June 11 1987
  1917. X *    Inserted this sample edit history entry.
  1918. X *    Please log any further modifications made to this file:
  1919. X */
  1920. X
  1921. X#include <stdio.h>
  1922. X#include <vplot.h>
  1923. X#include "vp_pc.h"
  1924. X
  1925. X#ifdef FORTRAN
  1926. X
  1927. X#define SCALE    vpscale_
  1928. X#define XSCL    *xscl
  1929. X#define YSCL    *yscl
  1930. X
  1931. X#else
  1932. X
  1933. X#define SCALE    vp_scale
  1934. X#define XSCL    xscl
  1935. X#define YSCL    yscl
  1936. X
  1937. X#endif
  1938. X
  1939. SCALE (xscl, yscl)
  1940. X    float           XSCL, YSCL;
  1941. X{
  1942. X    vp_pc._xscl = XSCL;
  1943. X    vp_pc._yscl = YSCL;
  1944. X}
  1945. END_OF_FILE
  1946. if test 908 -ne `wc -c <'Vplot_Kernel/lvplot/vp_scale.c'`; then
  1947.     echo shar: \"'Vplot_Kernel/lvplot/vp_scale.c'\" unpacked with wrong size!
  1948. fi
  1949. # end of 'Vplot_Kernel/lvplot/vp_scale.c'
  1950. fi
  1951. if test -f 'Vplot_Kernel/lvplot/vp_uplot.c' -a "${1}" != "-c" ; then 
  1952.   echo shar: Will not clobber existing file \"'Vplot_Kernel/lvplot/vp_uplot.c'\"
  1953. else
  1954. echo shar: Extracting \"'Vplot_Kernel/lvplot/vp_uplot.c'\" \(1055 characters\)
  1955. sed "s/^X//" >'Vplot_Kernel/lvplot/vp_uplot.c' <<'END_OF_FILE'
  1956. X/*
  1957. X * Copyright 1987 the Board of Trustees of the Leland Stanford Junior
  1958. X * University. Official permission to use this software is included in
  1959. X * the documentation. It authorizes you to use this file for any
  1960. X * non-commercial purpose, provided that this copyright notice is not
  1961. X * removed and that any modifications made to this file are commented
  1962. X * and dated in the style of my example below.
  1963. X */
  1964. X
  1965. X/*
  1966. X *
  1967. X *  source file:   ./lvplot/vp_uplot.c
  1968. X *
  1969. X * Joe Dellinger (SEP), June 11 1987
  1970. X *    Inserted this sample edit history entry.
  1971. X *    Please log any further modifications made to this file:
  1972. X */
  1973. X
  1974. X#include <stdio.h>
  1975. X#include <vplot.h>
  1976. X#include "vp_pc.h"
  1977. X
  1978. X#ifdef FORTRAN
  1979. X
  1980. X#define UPLOT    vpuplot_
  1981. X#define X        *x
  1982. X#define Y        *y
  1983. X#define DOWN    *down
  1984. X
  1985. X#else
  1986. X
  1987. X#define UPLOT    vp_uplot
  1988. X#define X        x
  1989. X#define Y        y
  1990. X#define DOWN    down
  1991. X
  1992. X#endif
  1993. X
  1994. UPLOT (x, y, down)
  1995. X    float           X, Y;
  1996. X    int             DOWN;
  1997. X{
  1998. float           xp, yp;
  1999. X    xp = vp_pc._x0 + (X - vp_pc._xu0) * vp_pc._xscl;
  2000. X    yp = vp_pc._y0 + (Y - vp_pc._yu0) * vp_pc._yscl;
  2001. X    vp_plot (xp, yp, DOWN);
  2002. X}
  2003. END_OF_FILE
  2004. if test 1055 -ne `wc -c <'Vplot_Kernel/lvplot/vp_uplot.c'`; then
  2005.     echo shar: \"'Vplot_Kernel/lvplot/vp_uplot.c'\" unpacked with wrong size!
  2006. fi
  2007. # end of 'Vplot_Kernel/lvplot/vp_uplot.c'
  2008. fi
  2009. echo shar: End of archive 4 \(of 24\).
  2010. cp /dev/null ark4isdone
  2011. MISSING=""
  2012. 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
  2013.     if test ! -f ark${I}isdone ; then
  2014.     MISSING="${MISSING} ${I}"
  2015.     fi
  2016. done
  2017. if test "${MISSING}" = "" ; then
  2018.     echo You have unpacked all 24 archives.
  2019.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2020. else
  2021.     echo You still need to unpack the following archives:
  2022.     echo "        " ${MISSING}
  2023. fi
  2024. ##  End of shell archive.
  2025. exit 0
  2026.