home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume40 / gnuplot / part01 < prev    next >
Encoding:
Text File  |  1993-10-21  |  79.1 KB  |  2,501 lines

  1. Newsgroups: comp.sources.misc
  2. From: woo@playfair.stanford.edu ("Alexander Woo")
  3. Subject: v40i013:  gnuplot - interactive function plotting utility, Part01/33
  4. Message-ID: <csm-v40i013=gnuplot.093446@sparky.Sterling.COM>
  5. X-Md4-Signature: 810dd7590222cbae3037d4be4f366287
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Stanford University
  8. Date: Thu, 21 Oct 1993 14:41:37 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
  12. Posting-number: Volume 40, Issue 13
  13. Archive-name: gnuplot/part01
  14. Environment: UNIX, MS-DOS, VMS
  15. Supersedes: gnuplot3: Volume 24, Issue 23-48
  16.  
  17. This is version 3.5 of gnuplot.
  18.  
  19. Gnuplot is a command-line driven interactive function plotting utility
  20. for UNIX, MSDOS, and VMS platforms.  The software is copyrighted but
  21. freely distributed (i.e., you don't have to pay for it).  It was
  22. originally intended as graphical program which would allow scientists
  23. and students to visualize mathematical functions and data.  Additions
  24. to this version of the software allow plots of three-dimensional
  25. functions and data files.  Gnuplot supports many different types of
  26. terminals, plotters, and printers and is easily extensible to include
  27. new devices.  [ The "GNU" in Gnuplot is NOT related to the Free
  28. Software Foundation, the naming is just a coincidence (and a long
  29. story). Thus gnuplot is not covered by the Gnu copyleft, but rather
  30. by its own copyright statement, included in all source code files.]
  31.  
  32. Gnuplot handles both curves (2 dimensions) and surfaces (3
  33. dimensions). Surfaces can be plotted as a mesh fitting the specified
  34. function, floating in the 3-d coordinate space, or as a contour plot
  35. on the x-y plane. For 2-d plots, there are also many plot styles,
  36. including lines, points, lines with points, error bars, and impulses
  37. (crude bar graphs). Graphs may be labeled with arbitrary labels and
  38. arrows, axes labels, a title, date and time, and a key.  The interface
  39. includes command-line editing and history on most platforms.
  40.  
  41. This release marks the end of my tenure as the coordinator of the
  42. gnuplot effort.  I have learned a great deal with this effort and
  43. you and I should both appreciate the contributions for all the
  44. volunteers who have worked on gnuplot and tried to make it better.
  45.  
  46. Alexander Lehmann has graciously volunteered to coordinate the
  47. next release with contributions from Lars Henke, Nick Stroebel 
  48. and many others.  New contributions should be sent
  49. to bug-gnuplot@dartmouth.edu.   
  50.  
  51.  ========================================================================
  52.  Alex Woo                         woo@playfair.stanford.edu
  53.  Disclaimer: These comments are not official statements of any organization.
  54.  ========================================================================
  55. #! /bin/sh
  56. # This is a shell archive.  Remove anything before this line, then feed it
  57. # into a shell via "sh file" or similar.  To overwrite existing files,
  58. # type "sh file -c".
  59. # Contents:  gnuplot gnuplot/README.3p5 gnuplot/demo gnuplot/docs
  60. #   gnuplot/docs/latextut gnuplot/os2 gnuplot/term gnuplot/term.c
  61. #   gnuplot/win
  62. # Wrapped by kent@sparky on Wed Oct 20 17:14:37 1993
  63. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  64. echo If this archive is complete, you will see the following message:
  65. echo '          "shar: End of archive 1 (of 33)."'
  66. if test ! -d 'gnuplot' ; then
  67.     echo shar: Creating directory \"'gnuplot'\"
  68.     mkdir 'gnuplot'
  69. fi
  70. if test -f 'gnuplot/README.3p5' -a "${1}" != "-c" ; then 
  71.   echo shar: Will not clobber existing file \"'gnuplot/README.3p5'\"
  72. else
  73.   echo shar: Extracting \"'gnuplot/README.3p5'\" \(3356 characters\)
  74.   sed "s/^X//" >'gnuplot/README.3p5' <<'END_OF_FILE'
  75. XThis is a bugfix to version 3.4.
  76. X
  77. X
  78. X# $Id: makefile.r%v 3.50.1.17 1993/08/27 05:21:33 woo Exp woo $
  79. X#
  80. X# $Log: makefile.r%v $
  81. X# Revision 3.50.1.17  1993/08/27  05:21:33  woo
  82. X# V. Khera's fig patch
  83. X#
  84. X# Revision 3.50.1.16  1993/08/27  05:04:42  woo
  85. X# Added <errno.h> to help.c and added support routines to binary.c
  86. X#
  87. X# Revision 3.50.1.15  1993/08/21  15:23:42  woo
  88. X# Rewrote print_3dtable
  89. X#
  90. X# Revision 3.50.1.14  1993/08/19  04:10:23  woo
  91. X# V. Broman sun_mgr driver
  92. X#
  93. X# Revision 3.50.1.13  1993/08/19  03:21:26  woo
  94. X# R. Lang fix to MS-Windows print driver
  95. X#
  96. X# Revision 3.50.1.11  1993/08/10  03:55:03  woo
  97. X# R. Lang mod to change location of plot in hppj.trm
  98. X#
  99. X# Revision 3.50.1.10  1993/08/07  16:06:34  woo
  100. X# Fix using n bug, configure 1.3
  101. X#
  102. X# Revision 3.50.1.9  1993/08/05  05:38:59  woo
  103. X# Fix timedate location for splot and plot + CONFIGURE ROUTINE
  104. X#
  105. X# Revision 3.50.1.8  1993/07/27  05:37:15  woo
  106. X# More mods for SOLARIS 2.2 using gcc
  107. X#
  108. X# Revision 3.50.1.7  1993/07/27  04:57:58  woo
  109. X# Fix impulse plot style if logscale y
  110. X#
  111. X# Revision 3.50.1.6  1993/07/27  03:35:12  woo
  112. X# Fix epsviewe.m 
  113. X#
  114. X# Revision 3.50.1.4  1993/07/26  06:17:24  woo
  115. X# Solaris mods to sun_x11 and gplt_x11.c
  116. X#
  117. X# Revision 3.50.1.3  1993/07/26  05:38:19  woo
  118. X# DEC ALPHA OSF1 mods
  119. X#
  120. X# Revision 3.50.1.2  1993/07/26  05:12:42  woo
  121. X# fix of replot of replot bug
  122. X#
  123. X# Revision 3.50.1.1  1993/07/26  04:59:54  woo
  124. X# fix of splot notitle bug
  125. X#
  126. X# Revision 3.50  1993/07/09  05:35:24  woo
  127. X# Baseline version 3.5 version
  128. X#
  129. X# Revision 3.38.2.153  1993/07/08  03:43:32  woo
  130. X# Added dgrid3d save to misc.c and updated titlepages
  131. X#
  132. X# Revision 3.38.2.153  1993/07/08  03:43:32  woo
  133. X# Added dgrid3d save to misc.c and updated titlepages
  134. X#
  135. X# Revision 3.38.2.152  1993/07/06  15:03:56  woo
  136. X# A. Lehmann cleanup of 3_5b1
  137. X#
  138. X# Revision 3.38.2.151  1993/07/06  14:33:51  woo
  139. X# New 0FAQ and AXPVMS fix to gplt_x11.c
  140. X#
  141. X# Revision 3.38.2.150  1993/07/02  16:42:43  woo
  142. X# A. Reeh fix for monochrome X11 under VMS
  143. X#
  144. X# Revision 3.38.2.149  1993/07/01  20:31:55  woo
  145. X# New version of GRASS makefile
  146. X#
  147. X# Revision 3.38.2.148  1993/07/01  13:54:25  woo
  148. X# T. Collins changes to Latex line types
  149. X#
  150. X# Revision 3.38.2.147  1993/07/01  13:41:44  woo
  151. X# A. Lehmann fix for hpux internal.c
  152. X#
  153. X# Revision 3.38.2.146  1993/06/30  21:24:08  woo
  154. X# Fix to flash graphics, rosenbrock function in contours.dem
  155. X#
  156. X# Revision 3.38.2.145  1993/06/30  20:16:22  woo
  157. X# Yehavi fixes for AXPVMS
  158. X#
  159. X# Revision 3.38.2.144  1993/06/23  00:34:39  woo
  160. X# Reordered latex line types -- lighter default line
  161. X#
  162. X# Revision 3.38.2.143  1993/06/23  00:10:28  woo
  163. X# R. Shouman fix of blank title induced linetype bug
  164. X#
  165. X# Revision 3.38.2.142  1993/06/21  14:43:21  woo
  166. X# P. Egghart check on PLOSS for matherr and pass MY_FLAGS to subdirectories
  167. X#
  168. X# Revision 3.38.2.141  1993/06/19  13:00:21  woo
  169. X# Okidata driver and time_t for sun386 mod
  170. X#
  171. X# Revision 3.38.2.140  1993/06/19  12:29:34  woo
  172. X# J. Abbey fixes for Alliant
  173. X#
  174. X# Revision 3.38.2.139  1993/06/19  01:03:49  woo
  175. X# Fix for 3d clipping bug
  176. X#
  177. X# Revision 3.38.2.138  1993/06/16  00:38:14  woo
  178. X# O. Franksson MIF mod for vertical text and better char size
  179. X#
  180. X# Revision 3.38.2.137  1993/06/15  23:57:02  woo
  181. X# Linux fixes
  182. X#
  183. X# Revision 3.38.2.136  1993/06/15  23:33:29  woo
  184. X# V. Khera non-interactive stderr fix
  185. X#
  186. X# Revision 3.38.2.135  1993/06/15  22:02:26  woo
  187. X# splot fix for x & y tics and labels
  188. END_OF_FILE
  189.   if test 3356 -ne `wc -c <'gnuplot/README.3p5'`; then
  190.     echo shar: \"'gnuplot/README.3p5'\" unpacked with wrong size!
  191.   fi
  192.   # end of 'gnuplot/README.3p5'
  193. fi
  194. if test ! -d 'gnuplot/demo' ; then
  195.     echo shar: Creating directory \"'gnuplot/demo'\"
  196.     mkdir 'gnuplot/demo'
  197. fi
  198. if test ! -d 'gnuplot/docs' ; then
  199.     echo shar: Creating directory \"'gnuplot/docs'\"
  200.     mkdir 'gnuplot/docs'
  201. fi
  202. if test ! -d 'gnuplot/docs/latextut' ; then
  203.     echo shar: Creating directory \"'gnuplot/docs/latextut'\"
  204.     mkdir 'gnuplot/docs/latextut'
  205. fi
  206. if test ! -d 'gnuplot/os2' ; then
  207.     echo shar: Creating directory \"'gnuplot/os2'\"
  208.     mkdir 'gnuplot/os2'
  209. fi
  210. if test ! -d 'gnuplot/term' ; then
  211.     echo shar: Creating directory \"'gnuplot/term'\"
  212.     mkdir 'gnuplot/term'
  213. fi
  214. if test -f 'gnuplot/term.c' -a "${1}" != "-c" ; then 
  215.   echo shar: Will not clobber existing file \"'gnuplot/term.c'\"
  216. else
  217.   echo shar: Extracting \"'gnuplot/term.c'\" \(69784 characters\)
  218.   sed "s/^X//" >'gnuplot/term.c' <<'END_OF_FILE'
  219. X#ifndef lint
  220. Xstatic char *RCSid = "$Id: term.c%v 3.50.1.17 1993/08/27 05:21:33 woo Exp woo $";
  221. X#endif
  222. X
  223. X
  224. X/* GNUPLOT - term.c */
  225. X/*
  226. X * Copyright (C) 1986 - 1993   Thomas Williams, Colin Kelley
  227. X *
  228. X * Permission to use, copy, and distribute this software and its
  229. X * documentation for any purpose with or without fee is hereby granted, 
  230. X * provided that the above copyright notice appear in all copies and 
  231. X * that both that copyright notice and this permission notice appear 
  232. X * in supporting documentation.
  233. X *
  234. X * Permission to modify the software is granted, but not the right to
  235. X * distribute the modified code.  Modifications are to be distributed 
  236. X * as patches to released version.
  237. X *  
  238. X * This software is provided "as is" without express or implied warranty.
  239. X * 
  240. X *
  241. X * AUTHORS
  242. X * 
  243. X *   Original Software:
  244. X *     Thomas Williams,  Colin Kelley.
  245. X * 
  246. X *   Gnuplot 2.0 additions:
  247. X *       Russell Lang, Dave Kotz, John Campbell.
  248. X *
  249. X *   Gnuplot 3.0 additions:
  250. X *       Gershon Elber and many others.
  251. X * 
  252. X * There is a mailing list for gnuplot users. Note, however, that the
  253. X * newsgroup 
  254. X *    comp.graphics.gnuplot 
  255. X * is identical to the mailing list (they
  256. X * both carry the same set of messages). We prefer that you read the
  257. X * messages through that newsgroup, to subscribing to the mailing list.
  258. X * (If you can read that newsgroup, and are already on the mailing list,
  259. X * please send a message info-gnuplot-request@dartmouth.edu, asking to be
  260. X * removed from the mailing list.)
  261. X *
  262. X * The address for mailing to list members is
  263. X *       info-gnuplot@dartmouth.edu
  264. X * and for mailing administrative requests is 
  265. X *       info-gnuplot-request@dartmouth.edu
  266. X * The mailing list for bug reports is 
  267. X *       bug-gnuplot@dartmouth.edu
  268. X * The list of those interested in beta-test versions is
  269. X *       info-gnuplot-beta@dartmouth.edu
  270. X */
  271. X
  272. X#include <stdio.h>
  273. X#include <ctype.h>
  274. X#include "plot.h"
  275. X#include "setshow.h"
  276. X#include "term.h"
  277. X#include "bitmap.h"
  278. X#ifdef NEXT
  279. X#include <stdlib.h>
  280. X#include "epsviewe.h"
  281. X#endif /* NEXT */
  282. X
  283. X#ifdef _Windows
  284. X#ifdef __MSC__
  285. X#include <malloc.h>
  286. X#else
  287. X#include <alloc.h>
  288. X#endif
  289. X#endif
  290. X
  291. X#if defined(__TURBOC__) && defined(MSDOS)
  292. X#ifndef _Windows
  293. X#include <dos.h>
  294. X#endif
  295. X#endif
  296. X
  297. X/* for use by all drivers */
  298. X#define sign(x) ((x) >= 0 ? 1 : -1)
  299. X#define abs(x) ((x) >= 0 ? (x) : -(x))
  300. X
  301. X#ifndef max    /* GCC uses inline functions */
  302. X#define max(a,b) ((a) > (b) ? (a) : (b))
  303. X#endif
  304. X#ifndef min
  305. X#define min(a,b) ((a) < (b) ? (a) : (b))
  306. X#endif
  307. X
  308. XTBOOLEAN term_init;            /* true if terminal has been initialized */
  309. X
  310. Xextern FILE *outfile;
  311. Xextern char outstr[];
  312. Xextern TBOOLEAN term_init;
  313. Xextern int term;
  314. Xextern float xsize, ysize;
  315. X
  316. Xextern char input_line[];
  317. Xextern struct lexical_unit token[];
  318. Xextern int num_tokens, c_token;
  319. Xextern struct value *const_express();
  320. X
  321. Xextern TBOOLEAN interactive;
  322. X
  323. X/*
  324. X * instead of <strings.h>
  325. X */
  326. X
  327. X#if defined(_Windows) || ( defined(__TURBOC__) && defined(MSDOS) )
  328. X# include <string.h>
  329. X#else
  330. X#ifdef ATARI
  331. X#include <string.h>
  332. X#include <math.h>
  333. X#else
  334. X#ifndef AMIGA_SC_6_1
  335. Xextern char *strcpy();
  336. X#ifdef ANSI
  337. Xextern size_t   strlen();
  338. X#else
  339. Xextern int      strlen();
  340. X#endif
  341. Xextern int  strcmp(), strncmp();
  342. X#endif /* !AMIGA_SC_6_1 */
  343. X#endif
  344. X#endif
  345. X
  346. X#ifndef AMIGA_AC_5
  347. Xextern double sqrt();
  348. X#endif
  349. X
  350. Xchar *getenv();
  351. X
  352. X#if defined(__TURBOC__) && defined(MSDOS) && !defined(_Windows)
  353. Xchar *turboc_init();
  354. X#endif
  355. X
  356. X#ifdef __ZTC__
  357. Xchar *ztc_init();
  358. X/* #undef TGIF */
  359. X#endif
  360. X
  361. X
  362. X#if defined(MSDOS)||defined(ATARI)||defined(OS2)||defined(_Windows)||defined(DOS386)
  363. Xvoid reopen_binary();
  364. X#define REOPEN_BINARY
  365. X#endif
  366. X#ifdef vms
  367. Xchar *vms_init();
  368. Xvoid vms_reset();
  369. Xvoid term_mode_tek();
  370. Xvoid term_mode_native();
  371. Xvoid term_pasthru();
  372. Xvoid term_nopasthru();
  373. Xvoid reopen_binary();
  374. Xvoid fflush_binary();
  375. X#define REOPEN_BINARY
  376. X#endif
  377. X
  378. X/* This is needed because the unixplot library only writes to stdout. */
  379. X#ifdef UNIXPLOT
  380. XFILE save_stdout;
  381. X#endif
  382. Xint unixplot=0;
  383. X
  384. X#define NICE_LINE        0
  385. X#define POINT_TYPES        6
  386. X
  387. X
  388. Xdo_point(x,y,number)
  389. Xint x,y;
  390. Xint number;
  391. X{
  392. Xregister int htic,vtic;
  393. Xregister struct termentry *t = &term_tbl[term];
  394. X
  395. X     if (number < 0) {        /* do dot */
  396. X        (*t->move)(x,y);
  397. X        (*t->vector)(x,y);
  398. X        return(0);
  399. X    }
  400. X
  401. X    number %= POINT_TYPES;
  402. X    htic = (t->h_tic/2);    /* should be in term_tbl[] in later version */
  403. X    vtic = (t->v_tic/2);    
  404. X
  405. X    switch(number) {
  406. X        case 0: /* do diamond */ 
  407. X                (*t->move)(x-htic,y);
  408. X                (*t->vector)(x,y-vtic);
  409. X                (*t->vector)(x+htic,y);
  410. X                (*t->vector)(x,y+vtic);
  411. X                (*t->vector)(x-htic,y);
  412. X                (*t->move)(x,y);
  413. X                (*t->vector)(x,y);
  414. X                break;
  415. X        case 1: /* do plus */ 
  416. X                (*t->move)(x-htic,y);
  417. X                (*t->vector)(x-htic,y);
  418. X                (*t->vector)(x+htic,y);
  419. X                (*t->move)(x,y-vtic);
  420. X                (*t->vector)(x,y-vtic);
  421. X                (*t->vector)(x,y+vtic);
  422. X                break;
  423. X        case 2: /* do box */ 
  424. X                (*t->move)(x-htic,y-vtic);
  425. X                (*t->vector)(x-htic,y-vtic);
  426. X                (*t->vector)(x+htic,y-vtic);
  427. X                (*t->vector)(x+htic,y+vtic);
  428. X                (*t->vector)(x-htic,y+vtic);
  429. X                (*t->vector)(x-htic,y-vtic);
  430. X                (*t->move)(x,y);
  431. X                (*t->vector)(x,y);
  432. X                break;
  433. X        case 3: /* do X */ 
  434. X                (*t->move)(x-htic,y-vtic);
  435. X                (*t->vector)(x-htic,y-vtic);
  436. X                (*t->vector)(x+htic,y+vtic);
  437. X                (*t->move)(x-htic,y+vtic);
  438. X                (*t->vector)(x-htic,y+vtic);
  439. X                (*t->vector)(x+htic,y-vtic);
  440. X                break;
  441. X        case 4: /* do triangle */ 
  442. X                (*t->move)(x,y+(4*vtic/3));
  443. X                (*t->vector)(x-(4*htic/3),y-(2*vtic/3));
  444. X                (*t->vector)(x+(4*htic/3),y-(2*vtic/3));
  445. X                (*t->vector)(x,y+(4*vtic/3));
  446. X                (*t->move)(x,y);
  447. X                (*t->vector)(x,y);
  448. X                break;
  449. X        case 5: /* do star */ 
  450. X                (*t->move)(x-htic,y);
  451. X                (*t->vector)(x-htic,y);
  452. X                (*t->vector)(x+htic,y);
  453. X                (*t->move)(x,y-vtic);
  454. X                (*t->vector)(x,y-vtic);
  455. X                (*t->vector)(x,y+vtic);
  456. X                (*t->move)(x-htic,y-vtic);
  457. X                (*t->vector)(x-htic,y-vtic);
  458. X                (*t->vector)(x+htic,y+vtic);
  459. X                (*t->move)(x-htic,y+vtic);
  460. X                (*t->vector)(x-htic,y+vtic);
  461. X                (*t->vector)(x+htic,y-vtic);
  462. X                break;
  463. X    }
  464. X}
  465. X
  466. X
  467. X/*
  468. X * general point routine
  469. X */
  470. Xline_and_point(x,y,number)
  471. Xint x,y,number;
  472. X{
  473. X    /* temporary(?) kludge to allow terminals with bad linetypes 
  474. X        to make nice marks */
  475. X
  476. X    (*term_tbl[term].linetype)(NICE_LINE);
  477. X    do_point(x,y,number);
  478. X}
  479. X
  480. X/* 
  481. X * general arrow routine
  482. X */
  483. X#define ROOT2 (1.41421)        /* sqrt of 2 */
  484. X
  485. Xdo_arrow(sx, sy, ex, ey, head)
  486. X    int sx,sy;            /* start point */
  487. X    int ex, ey;            /* end point (point of arrowhead) */
  488. X    TBOOLEAN head;
  489. X{
  490. X    register struct termentry *t = &term_tbl[term];
  491. X    int len = (t->h_tic + t->v_tic)/2; /* arrowhead size = avg of tic sizes */
  492. X
  493. X    /* draw the line for the arrow. That's easy. */
  494. X    (*t->move)(sx, sy);
  495. X    (*t->vector)(ex, ey);
  496. X
  497. X    if (head) {
  498. X    /* now draw the arrow head. */
  499. X    /* we put the arrowhead marks at 45 degrees to line */
  500. X       if (sx == ex) {
  501. X       /* vertical line, special case */
  502. X          int delta = ((float)len / ROOT2 + 0.5);
  503. X          if (sy < ey)
  504. X              delta = -delta;    /* up arrow goes the other way */
  505. X          (*t->move)(ex - delta, ey + delta);
  506. X          (*t->vector)(ex,ey);
  507. X          (*t->vector)(ex + delta, ey + delta);
  508. X       } else {
  509. X          int dx = sx - ex;
  510. X          int dy = sy - ey;
  511. X          double coeff = len / sqrt(2.0*((double)dx*(double)dx 
  512. X                   + (double)dy*(double)dy));
  513. X          int x,y;            /* one endpoint */
  514. X
  515. X          x = (int)( ex + (dx + dy) * coeff );
  516. X          y = (int)( ey + (dy - dx) * coeff );
  517. X          (*t->move)(x,y);
  518. X          (*t->vector)(ex,ey);
  519. X
  520. X          x = (int)( ex + (dx - dy) * coeff );
  521. X          y = (int)( ey + (dy + dx) * coeff );
  522. X          (*t->vector)(x,y);
  523. X       }
  524. X    }
  525. X}
  526. X
  527. X#ifdef DUMB                    /* paper or glass dumb terminal */
  528. X#include "term/dumb.trm"
  529. X#endif
  530. X
  531. X
  532. X#ifndef _Windows
  533. X# ifdef PC            /* all PC types except MS WINDOWS*/
  534. X#  include "term/pc.trm"
  535. X# endif
  536. X#else
  537. X#  include "term/win.trm"
  538. X#endif
  539. X
  540. X#ifdef __ZTC__
  541. X#include "term/fg.trm"
  542. X#endif
  543. X
  544. X#ifdef DJSVGA
  545. X#include "term/djsvga.trm"    /* DJGPP SVGA */
  546. X#endif
  547. X
  548. X#ifdef EMXVGA
  549. X#include "term/emxvga.trm"    /* EMX VGA */
  550. X#endif
  551. X
  552. X#ifdef OS2PM                    /* os/2 presentation manager */
  553. X#include "term/pm.trm"
  554. X#endif
  555. X
  556. X#ifdef ATARI            /* ATARI-ST */
  557. X#include "term/atari.trm"
  558. X#endif
  559. X
  560. X/*
  561. X   all TEK types (TEK,BITGRAPH,KERMIT,VTTEK,SELANAR) are ifdef'd in tek.trm,
  562. X   but most require various TEK routines.  Hence TEK must be defined for
  563. X   the others to compile.
  564. X*/
  565. X#ifdef BITGRAPH
  566. X# ifndef TEK
  567. X#  define TEK
  568. X# endif
  569. X#endif
  570. X
  571. X#ifdef SELENAR
  572. X# ifndef TEK
  573. X#  define TEK
  574. X# endif
  575. X#endif
  576. X
  577. X#ifdef KERMIT
  578. X# ifndef TEK
  579. X#  define TEK
  580. X# endif
  581. X#endif
  582. X
  583. X#ifdef LN03P
  584. X# ifndef TEK
  585. X#  define TEK
  586. X# endif
  587. X#endif
  588. X
  589. X#ifdef VTTEK
  590. X# ifndef TEK
  591. X#  define TEK
  592. X# endif
  593. X#endif
  594. X
  595. X#ifdef T410X        /* Tektronix 4106, 4107, 4109 and 420x terminals */
  596. X#include "term/t410x.trm"
  597. X#endif
  598. X
  599. X#ifdef TEK            /* all TEK types, TEK, BBN, SELANAR, KERMIT, VTTEK */
  600. X#include "term/tek.trm"
  601. X#endif
  602. X
  603. X#ifdef OKIDATA
  604. X#define EPSONP
  605. X#endif
  606. X
  607. X#ifdef EPSONP    /* bit map types, EPSON, NEC, PROPRINTER, STAR Color */
  608. X#include "term/epson.trm"
  609. X#endif
  610. X
  611. X#ifdef HP500C  /* HP 500 deskjet Colour */
  612. X#include "term/hp500c.trm"
  613. X#endif
  614. X
  615. X#ifdef HPLJII        /* HP LaserJet II */
  616. X#include "term/hpljii.trm"
  617. X#endif
  618. X
  619. X#ifdef PCL /* HP LaserJet III in HPGL mode */
  620. X#  ifndef HPGL
  621. X#    define HPGL
  622. X#  endif
  623. X#endif
  624. X
  625. X#ifdef HPPJ        /* HP PaintJet */
  626. X#include "term/hppj.trm"
  627. X#endif
  628. X
  629. X#ifdef FIG            /* Fig 2.1 Interactive graphics program */
  630. X#include "term/fig.trm"
  631. X#include "term/bigfig.trm"
  632. X#endif
  633. X  
  634. X#ifdef GPR              /* Apollo Graphics Primitive Resource (fixed-size window) */
  635. X#include "term/gpr.trm"
  636. X#endif /* GPR */
  637. X
  638. X#ifdef GRASS              /* GRASS (geographic info system) monitor */
  639. X#include "term/grass.trm"
  640. X#endif /* GRASS */
  641. X
  642. X#ifdef APOLLO           /* Apollo Graphics Primitive Resource (resizable window) */
  643. X#include "term/apollo.trm"
  644. X#endif /* APOLLO */
  645. X
  646. X#ifdef IMAGEN        /* IMAGEN printer */
  647. X#include "term/imagen.trm"
  648. X#endif
  649. X
  650. X#ifdef MIF            /* Framemaker MIF  driver */
  651. X#include "term/mif.trm"
  652. X#endif
  653. X
  654. X#ifdef MF            /* METAFONT driver */
  655. X#include "term/metafont.trm"
  656. X#endif
  657. X
  658. X#ifdef TEXDRAW
  659. X#include "term/texdraw.trm"
  660. X#endif
  661. X
  662. X#ifdef EEPIC        /* EEPIC (LATEX) type */
  663. X#include "term/eepic.trm"
  664. X# ifndef LATEX
  665. X#  define LATEX
  666. X# endif
  667. X#endif
  668. X
  669. X#ifdef EMTEX        /* EMTEX (LATEX for PC) type */
  670. X# ifndef LATEX
  671. X#  define LATEX
  672. X# endif
  673. X#endif
  674. X
  675. X#ifdef LATEX        /* LATEX type */
  676. X#include "term/latex.trm"
  677. X#endif
  678. X
  679. X#ifdef GPIC        /* GPIC (groff) type */ 
  680. X#include "term/gpic.trm"
  681. X#endif
  682. X
  683. X#ifdef PBM        /* PBMPLUS portable bitmap */
  684. X#include "term/pbm.trm"
  685. X#endif
  686. X
  687. X#ifdef POSTSCRIPT    /* POSTSCRIPT type */
  688. X#include "term/post.trm"
  689. X#endif
  690. X
  691. X#ifdef PRESCRIBE    /* PRESCRIBE type */
  692. X#include "term/kyo.trm"
  693. X#endif
  694. X
  695. X/* note: this must come after term/post.trm */
  696. X#ifdef PSLATEX        /* LaTeX with embedded PostScript */
  697. X#include "term/pslatex.trm"
  698. X#endif
  699. X
  700. X#ifdef PSTRICKS
  701. X#include "term/pstricks.trm"
  702. X#endif
  703. X
  704. X#ifdef TPIC        /* TPIC (LATEX) type */
  705. X#include "term/tpic.trm"
  706. X# ifndef LATEX
  707. X#  define LATEX
  708. X# endif
  709. X#endif
  710. X
  711. X#ifdef UNIXPC     /* unix-PC  ATT 7300 or 3b1 machine */
  712. X#include "term/unixpc.trm"
  713. X#endif /* UNIXPC */
  714. X
  715. X#ifdef AED
  716. X#include "term/aed.trm"
  717. X#endif /* AED */
  718. X
  719. X#ifdef AIFM
  720. X#include "term/ai.trm"
  721. X#endif /* AIFM */
  722. X
  723. X#ifdef COREL
  724. X#include "term/corel.trm"
  725. X#endif /* COREL */
  726. X
  727. X#ifdef CGI
  728. X#include "term/cgi.trm"
  729. X#endif /* CGI */
  730. X
  731. X#ifdef DEBUG
  732. X#include "term/debug.trm"
  733. X#endif /* DEBUG */
  734. X
  735. X#ifdef EXCL
  736. X#include "term/excl.trm"
  737. X#endif /* EXCL */
  738. X
  739. X#ifdef HP2648
  740. X/* also works for HP2647 */
  741. X#include "term/hp2648.trm"
  742. X#endif /* HP2648 */
  743. X
  744. X#ifdef HP26
  745. X#include "term/hp26.trm"
  746. X#endif /* HP26 */
  747. X
  748. X#ifdef HP75
  749. X#ifndef HPGL
  750. X#define HPGL
  751. X#endif
  752. X#endif
  753. X
  754. X/* HPGL - includes HP75 and HPLJIII in HPGL mode */
  755. X#ifdef HPGL
  756. X#include "term/hpgl.trm"
  757. X#endif /* HPGL */
  758. X
  759. X/* Roland DXY800A plotter driver by Martin Yii, eln557h@monu3.OZ 
  760. X    and Russell Lang, rjl@monu1.cc.monash.oz */
  761. X#ifdef DXY800A
  762. X#include "term/dxy.trm"
  763. X#endif /* DXY800A */
  764. X
  765. X#ifdef IRIS4D
  766. X#include "term/iris4d.trm"
  767. X#endif /* IRIS4D */
  768. X
  769. X#ifdef NEXT
  770. X#include "term/next.trm"
  771. X#endif /* NEXT */
  772. X
  773. X#ifdef QMS
  774. X#include "term/qms.trm"
  775. X#endif /* QMS */
  776. X
  777. X#ifdef REGIS
  778. X#include "term/regis.trm"
  779. X#endif /* REGIS */
  780. X
  781. X#ifdef RGIP
  782. X#include "term/rgip.trm"
  783. X#endif /* RGIP UNIPLEX */
  784. X
  785. X#ifdef MGR
  786. X#include "term/mgr.trm"
  787. X#endif /* MGR */
  788. X
  789. X#ifdef SUN
  790. X#include "term/sun.trm"
  791. X#endif /* SUN */
  792. X
  793. X#ifdef VWS
  794. X#include "term/vws.trm"
  795. X#endif /* VWS */
  796. X
  797. X#ifdef V384
  798. X#include "term/v384.trm"
  799. X#endif /* V384 */
  800. X
  801. X#ifdef TGIF
  802. X#include "term/tgif.trm"
  803. X#endif /* TGIF */
  804. X
  805. X#ifdef UNIXPLOT
  806. X#ifdef GNUGRAPH
  807. X#include "term/gnugraph.trm"
  808. X#else
  809. X#include "term/unixplot.trm"
  810. X#endif /* GNUGRAPH */
  811. X#endif /* UNIXPLOT */
  812. X
  813. X#ifdef X11
  814. X#include "term/x11.trm"
  815. X#include "term/xlib.trm"
  816. X#endif /* X11 */
  817. X
  818. X#ifdef DXF
  819. X#include "term/dxf.trm"
  820. X#endif /* DXF */
  821. X  
  822. X#ifdef AMIGASCREEN
  823. X#include "term/amiga.trm"
  824. X#endif /* AMIGASCREEN */
  825. X
  826. X/* Dummy functions for unavailable features */
  827. X
  828. X/* change angle of text.  0 is horizontal left to right.
  829. X* 1 is vertical bottom to top (90 deg rotate)  
  830. X*/
  831. Xstatic int null_text_angle()
  832. X{
  833. Xreturn FALSE ;    /* can't be done */
  834. X}
  835. X
  836. X/* change justification of text.  
  837. X * modes are LEFT (flush left), CENTRE (centred), RIGHT (flush right)
  838. X */
  839. Xstatic int null_justify_text()
  840. X{
  841. Xreturn FALSE ;    /* can't be done */
  842. X}
  843. X
  844. X
  845. X/* Change scale of plot.
  846. X * Parameters are x,y scaling factors for this plot.
  847. X * Some terminals (eg latex) need to do scaling themselves.
  848. X */
  849. Xstatic int null_scale()
  850. X{
  851. Xreturn FALSE ;    /* can't be done */
  852. X}
  853. X
  854. Xstatic int do_scale()
  855. X{
  856. Xreturn TRUE ;    /* can be done */
  857. X}
  858. X
  859. Xoptions_null()
  860. X{
  861. X    term_options[0] = '\0';    /* we have no options */
  862. X}
  863. X
  864. Xstatic UNKNOWN_null()
  865. X{
  866. X}
  867. X
  868. X/*
  869. X * term_tbl[] contains an entry for each terminal.  "unknown" must be the
  870. X *   first, since term is initialized to 0.
  871. X */
  872. Xstruct termentry term_tbl[] = {
  873. X    {"unknown", "Unknown terminal type - not a plotting device",
  874. X      100, 100, 1, 1,
  875. X      1, 1, options_null, UNKNOWN_null, UNKNOWN_null, 
  876. X      UNKNOWN_null, null_scale, UNKNOWN_null, UNKNOWN_null, UNKNOWN_null, 
  877. X      UNKNOWN_null, UNKNOWN_null, null_text_angle, 
  878. X      null_justify_text, UNKNOWN_null, UNKNOWN_null}
  879. X
  880. X    ,{"table", "Dump ASCII table of X Y [Z] values to output",
  881. X      100, 100, 1, 1,
  882. X      1, 1, options_null, UNKNOWN_null, UNKNOWN_null, 
  883. X      UNKNOWN_null, null_scale, UNKNOWN_null, UNKNOWN_null, UNKNOWN_null, 
  884. X      UNKNOWN_null, UNKNOWN_null, null_text_angle, 
  885. X      null_justify_text, UNKNOWN_null, UNKNOWN_null}
  886. X
  887. X#ifdef AMIGASCREEN
  888. X    ,{"amiga", "Amiga Custom Screen",
  889. X       AMIGA_XMAX, AMIGA_YMAX, AMIGA_VCHAR, AMIGA_HCHAR, 
  890. X       AMIGA_VTIC, AMIGA_HTIC, options_null, AMIGA_init, AMIGA_reset, 
  891. X       AMIGA_text, null_scale, AMIGA_graphics, AMIGA_move, AMIGA_vector,
  892. X       AMIGA_linetype, AMIGA_put_text, null_text_angle, 
  893. X       AMIGA_justify_text, do_point, do_arrow}
  894. X#endif
  895. X
  896. X#ifdef ATARI
  897. X    ,{"atari", "Atari ST/TT",
  898. X       ATARI_XMAX, ATARI_YMAX, ATARI_VCHAR, ATARI_HCHAR, 
  899. X       ATARI_VTIC, ATARI_HTIC, ATARI_options, ATARI_init, ATARI_reset, 
  900. X       ATARI_text, null_scale, ATARI_graphics, ATARI_move, ATARI_vector, 
  901. X       ATARI_linetype, ATARI_put_text, ATARI_text_angle, 
  902. X       null_justify_text, ATARI_point, do_arrow}
  903. X#endif
  904. X
  905. X#ifdef DUMB
  906. X    ,{"dumb", "printer or glass dumb terminal",
  907. X         DUMB_XMAX, DUMB_YMAX, 1, 1,
  908. X         1, 1, DUMB_options, DUMB_init, DUMB_reset,
  909. X         DUMB_text, null_scale, DUMB_graphics, DUMB_move, DUMB_vector,
  910. X         DUMB_linetype, DUMB_put_text, null_text_angle,
  911. X         null_justify_text, DUMB_point, DUMB_arrow}
  912. X#endif
  913. X
  914. X#ifdef PC
  915. X#ifndef _Windows
  916. X# ifdef __TURBOC__
  917. X#ifdef ATT6300
  918. X    ,{"att", "IBM PC/Clone with AT&T 6300 graphics board",
  919. X       ATT_XMAX, ATT_YMAX, ATT_VCHAR, ATT_HCHAR,
  920. X       ATT_VTIC, ATT_HTIC, options_null, ATT_init, ATT_reset,
  921. X       ATT_text, null_scale, ATT_graphics, ATT_move, ATT_vector,
  922. X       ATT_linetype, ATT_put_text, ATT_text_angle, 
  923. X       ATT_justify_text, line_and_point, do_arrow}
  924. X#endif
  925. X
  926. X    ,{"cga", "IBM PC/Clone with CGA graphics board",
  927. X       CGA_XMAX, CGA_YMAX, CGA_VCHAR, CGA_HCHAR,
  928. X       CGA_VTIC, CGA_HTIC, options_null, CGA_init, CGA_reset,
  929. X       CGA_text, null_scale, CGA_graphics, CGA_move, CGA_vector,
  930. X       CGA_linetype, CGA_put_text, MCGA_text_angle, 
  931. X       CGA_justify_text, line_and_point, do_arrow}
  932. X
  933. X    ,{"egalib", "IBM PC/Clone with EGA graphics board",
  934. X       EGALIB_XMAX, EGALIB_YMAX, EGALIB_VCHAR, EGALIB_HCHAR,
  935. X       EGALIB_VTIC, EGALIB_HTIC, options_null, EGALIB_init, EGALIB_reset,
  936. X       EGALIB_text, null_scale, EGALIB_graphics, EGALIB_move, EGALIB_vector,
  937. X       EGALIB_linetype, EGALIB_put_text, EGALIB_text_angle, 
  938. X       EGALIB_justify_text, do_point, do_arrow}
  939. X
  940. X    ,{"hercules", "IBM PC/Clone with Hercules graphics board",
  941. X       HERC_XMAX, HERC_YMAX, HERC_VCHAR, HERC_HCHAR,
  942. X       HERC_VTIC, HERC_HTIC, options_null, HERC_init, HERC_reset,
  943. X       HERC_text, null_scale, HERC_graphics, HERC_move, HERC_vector,
  944. X       HERC_linetype, HERC_put_text, MCGA_text_angle, 
  945. X       HERC_justify_text, line_and_point, do_arrow}
  946. X
  947. X    ,{"mcga", "IBM PC/Clone with MCGA graphics board",
  948. X       MCGA_XMAX, MCGA_YMAX, MCGA_VCHAR, MCGA_HCHAR,
  949. X       MCGA_VTIC, MCGA_HTIC, options_null, MCGA_init, MCGA_reset,
  950. X       MCGA_text, null_scale, MCGA_graphics, MCGA_move, MCGA_vector,
  951. X       MCGA_linetype, MCGA_put_text, MCGA_text_angle, 
  952. X       MCGA_justify_text, line_and_point, do_arrow}
  953. X
  954. X    ,{"svga", "IBM PC/Clone with Super VGA graphics board",
  955. X       SVGA_XMAX, SVGA_YMAX, SVGA_VCHAR, SVGA_HCHAR,
  956. X       SVGA_VTIC, SVGA_HTIC, options_null, SVGA_init, SVGA_reset,
  957. X       SVGA_text, null_scale, SVGA_graphics, SVGA_move, SVGA_vector,
  958. X       SVGA_linetype, SVGA_put_text, SVGA_text_angle, 
  959. X       SVGA_justify_text, do_point, do_arrow}
  960. X
  961. X    ,{"vgalib", "IBM PC/Clone with VGA graphics board",
  962. X       VGA_XMAX, VGA_YMAX, VGA_VCHAR, VGA_HCHAR,
  963. X       VGA_VTIC, VGA_HTIC, options_null, VGA_init, VGA_reset,
  964. X       VGA_text, null_scale, VGA_graphics, VGA_move, VGA_vector,
  965. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  966. X       VGA_justify_text, do_point, do_arrow}
  967. X
  968. X    ,{"vgamono", "IBM PC/Clone with VGA Monochrome graphics board",
  969. X       VGA_XMAX, VGA_YMAX, VGA_VCHAR, VGA_HCHAR,
  970. X       VGA_VTIC, VGA_HTIC, options_null, VGA_init, VGA_reset,
  971. X       VGA_text, null_scale, VGA_graphics, VGA_move, VGA_vector,
  972. X       VGAMONO_linetype, VGA_put_text, VGA_text_angle, 
  973. X       VGA_justify_text, line_and_point, do_arrow}
  974. X#else                    /* TURBO */
  975. X
  976. X#ifdef ATT6300
  977. X    ,{"att", "AT&T PC/6300 graphics",
  978. X       ATT_XMAX, ATT_YMAX, ATT_VCHAR, ATT_HCHAR,
  979. X       ATT_VTIC, ATT_HTIC, options_null, ATT_init, ATT_reset,
  980. X       ATT_text, null_scale, ATT_graphics, ATT_move, ATT_vector,
  981. X       ATT_linetype, ATT_put_text, ATT_text_angle, 
  982. X       null_justify_text, line_and_point, do_arrow}
  983. X#endif
  984. X
  985. X    ,{"cga", "IBM PC/Clone with CGA graphics board",
  986. X       CGA_XMAX, CGA_YMAX, CGA_VCHAR, CGA_HCHAR,
  987. X       CGA_VTIC, CGA_HTIC, options_null, CGA_init, CGA_reset,
  988. X       CGA_text, null_scale, CGA_graphics, CGA_move, CGA_vector,
  989. X       CGA_linetype, CGA_put_text, CGA_text_angle, 
  990. X       null_justify_text, line_and_point, do_arrow}
  991. X
  992. X#ifdef CORONA
  993. X    ,{"corona325", "Corona graphics ???",
  994. X       COR_XMAX, COR_YMAX, COR_VCHAR, COR_HCHAR,
  995. X       COR_VTIC, COR_HTIC, options_null, COR_init, COR_reset,
  996. X       COR_text, null_scale, COR_graphics, COR_move, COR_vector,
  997. X       COR_linetype, COR_put_text, COR_text_angle, 
  998. X       null_justify_text, line_and_point, do_arrow}
  999. X#endif                    /* CORONA */
  1000. X
  1001. X    ,{"egabios", "IBM PC/Clone with EGA graphics board (BIOS)",
  1002. X       EGA_XMAX, EGA_YMAX, EGA_VCHAR, EGA_HCHAR,
  1003. X       EGA_VTIC, EGA_HTIC, options_null, EGA_init, EGA_reset,
  1004. X       EGA_text, null_scale, EGA_graphics, EGA_move, EGA_vector,
  1005. X       EGA_linetype, EGA_put_text, EGA_text_angle, 
  1006. X       null_justify_text, do_point, do_arrow}
  1007. X
  1008. X#ifdef EGALIB
  1009. X    ,{"egalib", "IBM PC/Clone with EGA graphics board (LIB)",
  1010. X       EGALIB_XMAX, EGALIB_YMAX, EGALIB_VCHAR, EGALIB_HCHAR,
  1011. X       EGALIB_VTIC, EGALIB_HTIC, options_null, EGALIB_init, EGALIB_reset,
  1012. X       EGALIB_text, null_scale, EGALIB_graphics, EGALIB_move, EGALIB_vector,
  1013. X       EGALIB_linetype, EGALIB_put_text, null_text_angle, 
  1014. X       null_justify_text, do_point, do_arrow}
  1015. X#endif
  1016. X
  1017. X#ifdef HERCULES
  1018. X    ,{"hercules", "IBM PC/Clone with Hercules graphics board",
  1019. X       HERC_XMAX, HERC_YMAX, HERC_VCHAR, HERC_HCHAR,
  1020. X       HERC_VTIC, HERC_HTIC, options_null, HERC_init, HERC_reset,
  1021. X       HERC_text, null_scale, HERC_graphics, HERC_move, HERC_vector,
  1022. X       HERC_linetype, HERC_put_text, HERC_text_angle, 
  1023. X       null_justify_text, line_and_point, do_arrow}
  1024. X#endif                    /* HERCULES */
  1025. X
  1026. X    ,{"vgabios", "IBM PC/Clone with VGA graphics board (BIOS)",
  1027. X       VGA_XMAX, VGA_YMAX, VGA_VCHAR, VGA_HCHAR,
  1028. X       VGA_VTIC, VGA_HTIC, options_null, VGA_init, VGA_reset,
  1029. X       VGA_text, null_scale, VGA_graphics, VGA_move, VGA_vector,
  1030. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1031. X       null_justify_text, do_point, do_arrow}
  1032. X
  1033. X#endif                    /* TURBO */
  1034. X#endif                    /* _Windows */
  1035. X#endif                    /* PC */
  1036. X
  1037. X#ifdef __ZTC__         /* zortech C flashgraphics for 386 */
  1038. X    ,{"hercules", "IBM PC/Clone with Hercules graphics board",
  1039. X       HERC_XMAX, HERC_YMAX, HERC_VCHAR, HERC_HCHAR,
  1040. X       HERC_VTIC, HERC_HTIC, options_null, VGA_init, VGA_reset,
  1041. X       VGA_text, null_scale, HERC_graphics, VGA_move, VGA_vector,
  1042. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1043. X       VGA_justify_text, do_point, do_arrow}
  1044. X
  1045. X    ,{"egamono", "IBM PC/Clone with monochrome EGA graphics board",
  1046. X       EGA_XMAX, EGA_YMAX, EGA_VCHAR, EGA_HCHAR,
  1047. X       EGA_VTIC, EGA_HTIC, options_null, VGA_init, VGA_reset,
  1048. X       VGA_text, null_scale, EGAMONO_graphics, VGA_move, VGA_vector,
  1049. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1050. X       VGA_justify_text, do_point, do_arrow}
  1051. X
  1052. X    ,{"egalib", "IBM PC/Clone with color EGA graphics board",
  1053. X       EGA_XMAX, EGA_YMAX, EGA_VCHAR, EGA_HCHAR,
  1054. X       EGA_VTIC, EGA_HTIC, options_null, VGA_init, VGA_reset,
  1055. X       VGA_text, null_scale, EGA_graphics, VGA_move, VGA_vector,
  1056. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1057. X       VGA_justify_text, do_point, do_arrow}
  1058. X
  1059. X    ,{"vgalib", "IBM PC/Clone with VGA graphics board",
  1060. X       VGA_XMAX, VGA_YMAX, VGA_VCHAR, VGA_HCHAR,
  1061. X       VGA_VTIC, VGA_HTIC, options_null, VGA_init, VGA_reset,
  1062. X       VGA_text, null_scale, VGA_graphics, VGA_move, VGA_vector,
  1063. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1064. X       VGA_justify_text, do_point, do_arrow}
  1065. X
  1066. X    ,{"vgamono", "IBM PC/Clone with monochrome VGA graphics board",
  1067. X       VGA_XMAX, VGA_YMAX, VGA_VCHAR, VGA_HCHAR,
  1068. X       VGA_VTIC, VGA_HTIC, options_null, VGA_init, VGA_reset,
  1069. X       VGA_text, null_scale, VGAMONO_graphics, VGA_move, VGA_vector,
  1070. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1071. X       VGA_justify_text, do_point, do_arrow}
  1072. X
  1073. X    ,{"svgalib", "IBM PC/Clone with VESA Super VGA graphics board",
  1074. X       SVGA_XMAX, SVGA_YMAX, SVGA_VCHAR, SVGA_HCHAR,
  1075. X       SVGA_VTIC, SVGA_HTIC, options_null, VGA_init, VGA_reset,
  1076. X       VGA_text, null_scale, SVGA_graphics, VGA_move, VGA_vector,
  1077. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1078. X       VGA_justify_text, do_point, do_arrow}
  1079. X
  1080. X    ,{"ssvgalib", "IBM PC/Clone with VESA 256 color 1024 by 768 super VGA",
  1081. X       SSVGA_XMAX, SSVGA_YMAX, SSVGA_VCHAR, SSVGA_HCHAR,
  1082. X       SSVGA_VTIC, SSVGA_HTIC, options_null, VGA_init, VGA_reset,
  1083. X       VGA_text, null_scale, SSVGA_graphics, VGA_move, VGA_vector,
  1084. X       VGA_linetype, VGA_put_text, VGA_text_angle, 
  1085. X       VGA_justify_text, do_point, do_arrow}
  1086. X#endif    /* __ZTC__ */
  1087. X
  1088. X#ifdef AED
  1089. X    ,{"aed512", "AED 512 Terminal",
  1090. X       AED5_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
  1091. X       AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset, 
  1092. X       AED_text, null_scale, AED_graphics, AED_move, AED_vector, 
  1093. X       AED_linetype, AED_put_text, null_text_angle, 
  1094. X       null_justify_text, do_point, do_arrow}
  1095. X    ,{"aed767", "AED 767 Terminal",
  1096. X       AED_XMAX, AED_YMAX, AED_VCHAR, AED_HCHAR,
  1097. X       AED_VTIC, AED_HTIC, options_null, AED_init, AED_reset, 
  1098. X       AED_text, null_scale, AED_graphics, AED_move, AED_vector, 
  1099. X       AED_linetype, AED_put_text, null_text_angle, 
  1100. X       null_justify_text, do_point, do_arrow}
  1101. X#endif
  1102. X
  1103. X#ifdef AIFM
  1104. X    ,{"aifm", "Adobe Illustrator 3.0 Format",
  1105. X       AI_XMAX, AI_YMAX, AI_VCHAR, AI_HCHAR, 
  1106. X       AI_VTIC, AI_HTIC, AI_options, AI_init, AI_reset, 
  1107. X       AI_text, null_scale, AI_graphics, AI_move, AI_vector, 
  1108. X       AI_linetype, AI_put_text, AI_text_angle, 
  1109. X       AI_justify_text, do_point, do_arrow}
  1110. X#endif
  1111. X
  1112. X#ifdef APOLLO
  1113. X       ,{"apollo", "Apollo Graphics Primitive Resource, rescaling of subsequent plots after window resizing",
  1114. X       0, 0, 0, 0, /* APOLLO_XMAX, APOLLO_YMAX, APOLLO_VCHAR, APOLLO_HCHAR, are filled in at run-time */
  1115. X       APOLLO_VTIC, APOLLO_HTIC, options_null, APOLLO_init, APOLLO_reset,
  1116. X       APOLLO_text, null_scale, APOLLO_graphics, APOLLO_move, APOLLO_vector,
  1117. X       APOLLO_linetype, APOLLO_put_text, APOLLO_text_angle,
  1118. X       APOLLO_justify_text, line_and_point, do_arrow}
  1119. X#endif
  1120. X
  1121. X#ifdef GPR
  1122. X       ,{"gpr", "Apollo Graphics Primitive Resource, fixed-size window",
  1123. X       GPR_XMAX, GPR_YMAX, GPR_VCHAR, GPR_HCHAR,
  1124. X       GPR_VTIC, GPR_HTIC, options_null, GPR_init, GPR_reset,
  1125. X       GPR_text, null_scale, GPR_graphics, GPR_move, GPR_vector,
  1126. X       GPR_linetype, GPR_put_text, GPR_text_angle,
  1127. X       GPR_justify_text, line_and_point, do_arrow}
  1128. X#endif
  1129. X
  1130. X#ifdef BITGRAPH
  1131. X    ,{"bitgraph", "BBN Bitgraph Terminal",
  1132. X       BG_XMAX,BG_YMAX,BG_VCHAR, BG_HCHAR, 
  1133. X       BG_VTIC, BG_HTIC, options_null, BG_init, BG_reset, 
  1134. X       BG_text, null_scale, BG_graphics, BG_move, BG_vector,
  1135. X       BG_linetype, BG_put_text, null_text_angle, 
  1136. X       null_justify_text, line_and_point, do_arrow}
  1137. X#endif
  1138. X
  1139. X#ifdef COREL
  1140. X    ,{"corel","EPS format for CorelDRAW",
  1141. X     CORELD_XMAX, CORELD_YMAX, CORELD_VCHAR, CORELD_HCHAR,
  1142. X     CORELD_VTIC, CORELD_HTIC, COREL_options, COREL_init, COREL_reset,
  1143. X     COREL_text, null_scale, COREL_graphics, COREL_move, COREL_vector,
  1144. X     COREL_linetype, COREL_put_text, COREL_text_angle,
  1145. X     COREL_justify_text, do_point, do_arrow}
  1146. X#endif
  1147. X
  1148. X#ifdef CGI
  1149. X    ,{"cgi", "SCO CGI drivers (requires CGIDISP or CGIPRNT env variable)",
  1150. X       CGI_XMAX, CGI_YMAX, 0, 0, 
  1151. X       CGI_VTIC, 0, options_null, CGI_init, CGI_reset, 
  1152. X       CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector, 
  1153. X       CGI_linetype, CGI_put_text, CGI_text_angle, 
  1154. X       CGI_justify_text, CGI_point, do_arrow}
  1155. X
  1156. X    ,{"hcgi", "SCO CGI drivers (hardcopy, requires CGIPRNT env variable)",
  1157. X       CGI_XMAX, CGI_YMAX, 0, 0, 
  1158. X       CGI_VTIC, 0, options_null, HCGI_init, CGI_reset, 
  1159. X       CGI_text, null_scale, CGI_graphics, CGI_move, CGI_vector, 
  1160. X       CGI_linetype, CGI_put_text, CGI_text_angle, 
  1161. X       CGI_justify_text, CGI_point, do_arrow}
  1162. X#endif
  1163. X
  1164. X#ifdef DEBUG
  1165. X    ,{"debug", "debugging driver",
  1166. X       DEBUG_XMAX, DEBUG_YMAX, DEBUG_VCHAR, DEBUG_HCHAR,
  1167. X       DEBUG_VTIC, DEBUG_HTIC, options_null, DEBUG_init, DEBUG_reset,
  1168. X       DEBUG_text, null_scale, DEBUG_graphics, DEBUG_move, DEBUG_vector,
  1169. X       DEBUG_linetype, DEBUG_put_text, null_text_angle, 
  1170. X       DEBUG_justify_text, line_and_point, do_arrow}
  1171. X#endif
  1172. X
  1173. X#ifdef DJSVGA
  1174. X    ,{"svga", "IBM PC/Clone with Super VGA graphics board",
  1175. X       DJSVGA_XMAX, DJSVGA_YMAX, DJSVGA_VCHAR, DJSVGA_HCHAR,
  1176. X       DJSVGA_VTIC, DJSVGA_HTIC, options_null, DJSVGA_init, DJSVGA_reset,
  1177. X       DJSVGA_text, null_scale, DJSVGA_graphics, DJSVGA_move, DJSVGA_vector,
  1178. X       DJSVGA_linetype, DJSVGA_put_text, null_text_angle, 
  1179. X       null_justify_text, do_point, do_arrow}
  1180. X#endif
  1181. X
  1182. X#ifdef DXF
  1183. X    ,{"dxf", "dxf-file for AutoCad (default size 120x80)",
  1184. X       DXF_XMAX,DXF_YMAX,DXF_VCHAR, DXF_HCHAR,
  1185. X       DXF_VTIC, DXF_HTIC, options_null,DXF_init, DXF_reset,
  1186. X       DXF_text, null_scale, DXF_graphics, DXF_move, DXF_vector,
  1187. X       DXF_linetype, DXF_put_text, DXF_text_angle,
  1188. X       DXF_justify_text, do_point, do_arrow}
  1189. X#endif
  1190. X
  1191. X#ifdef DXY800A
  1192. X    ,{"dxy800a", "Roland DXY800A plotter",
  1193. X       DXY_XMAX, DXY_YMAX, DXY_VCHAR, DXY_HCHAR,
  1194. X       DXY_VTIC, DXY_HTIC, options_null, DXY_init, DXY_reset,
  1195. X       DXY_text, null_scale, DXY_graphics, DXY_move, DXY_vector,
  1196. X       DXY_linetype, DXY_put_text, DXY_text_angle, 
  1197. X       null_justify_text, do_point, do_arrow}
  1198. X#endif
  1199. X
  1200. X#ifdef EEPIC
  1201. X    ,{"eepic", "EEPIC -- extended LaTeX picture environment",
  1202. X       EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR, 
  1203. X       EEPIC_VTIC, EEPIC_HTIC, options_null, EEPIC_init, EEPIC_reset, 
  1204. X       EEPIC_text, EEPIC_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector, 
  1205. X       EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle, 
  1206. X       EEPIC_justify_text, EEPIC_point, EEPIC_arrow}
  1207. X#endif
  1208. X
  1209. X#ifdef EMTEX
  1210. X    ,{"emtex", "LaTeX picture environment with emTeX specials",
  1211. X       LATEX_XMAX, LATEX_YMAX, LATEX_VCHAR, LATEX_HCHAR, 
  1212. X       LATEX_VTIC, LATEX_HTIC, LATEX_options, EMTEX_init, EMTEX_reset, 
  1213. X       EMTEX_text, LATEX_scale, LATEX_graphics, LATEX_move, LATEX_vector, 
  1214. X       LATEX_linetype, LATEX_put_text, LATEX_text_angle, 
  1215. X       LATEX_justify_text, LATEX_point, LATEX_arrow}
  1216. X#endif
  1217. X
  1218. X#ifdef EPS180
  1219. X    ,{"epson_180dpi", "Epson LQ-style 180-dot per inch (24 pin) printers",
  1220. X       EPS180XMAX, EPS180YMAX, EPSON180VCHAR, EPSON180HCHAR,
  1221. X       EPSON180VTIC, EPSON180HTIC, options_null, EPSONinit, EPSONreset,
  1222. X       EPS180text, null_scale, EPS180graphics, EPSONmove, EPSONvector,
  1223. X       EPSONlinetype, EPSONput_text, EPSON_text_angle,
  1224. X       null_justify_text, do_point, do_arrow}
  1225. X#endif
  1226. X
  1227. X#ifdef EPS60
  1228. X    ,{"epson_60dpi", "Epson-style 60-dot per inch printers",
  1229. X       EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
  1230. X       EPSONVTIC, EPSONHTIC, options_null, EPSONinit, EPSONreset,
  1231. X       EPS60text, null_scale, EPS60graphics, EPSONmove, EPSONvector,
  1232. X       EPSONlinetype, EPSONput_text, EPSON_text_angle,
  1233. X       null_justify_text, do_point, do_arrow}
  1234. X#endif
  1235. X
  1236. X#ifdef EPSONP
  1237. X    ,{"epson_lx800", "Epson LX-800, Star NL-10, NX-1000, PROPRINTER ...",
  1238. X       EPSONXMAX, EPSONYMAX, EPSONVCHAR, EPSONHCHAR, 
  1239. X       EPSONVTIC, EPSONHTIC, options_null, EPSONinit, EPSONreset, 
  1240. X       EPSONtext, null_scale, EPSONgraphics, EPSONmove, EPSONvector, 
  1241. X       EPSONlinetype, EPSONput_text, EPSON_text_angle, 
  1242. X       null_justify_text, line_and_point, do_arrow}
  1243. X#endif
  1244. X
  1245. X#ifdef EXCL
  1246. X    ,{"excl", "Talaris EXCL Laser printer (also Talaris 1590 and others)",
  1247. X       EXCL_XMAX,EXCL_YMAX, EXCL_VCHAR, EXCL_HCHAR, 
  1248. X       EXCL_VTIC, EXCL_HTIC, options_null, EXCL_init,EXCL_reset, 
  1249. X       EXCL_text, null_scale, EXCL_graphics, EXCL_move, EXCL_vector,
  1250. X       EXCL_linetype,EXCL_put_text, null_text_angle, 
  1251. X       null_justify_text, line_and_point, do_arrow}
  1252. X#endif
  1253. X
  1254. X
  1255. X#ifdef FIG
  1256. X    ,{"fig", "FIG 2.1 graphics language: SunView or X graphics editor",
  1257. X       FIG_XMAX, FIG_YMAX, FIG_VCHAR, FIG_HCHAR, 
  1258. X       FIG_VTIC, FIG_HTIC, FIG_options, FIG_init, FIG_reset, 
  1259. X       FIG_text, null_scale, FIG_graphics, FIG_move, FIG_vector, 
  1260. X       FIG_linetype, FIG_put_text, FIG_text_angle, 
  1261. X       FIG_justify_text, line_and_point, FIG_arrow}
  1262. X    ,{"bfig", "FIG 2.1 graphics lang: SunView or X graphics editor. Large Graph",
  1263. X       BFIG_XMAX, BFIG_YMAX, BFIG_VCHAR, BFIG_HCHAR, 
  1264. X       BFIG_VTIC, BFIG_HTIC, FIG_options, FIG_init, FIG_reset, 
  1265. X       FIG_text, null_scale, FIG_graphics, FIG_move, BFIG_vector, 
  1266. X       FIG_linetype, BFIG_put_text, FIG_text_angle, 
  1267. X       FIG_justify_text, line_and_point, BFIG_arrow}
  1268. X#endif
  1269. X
  1270. X#ifdef GPIC
  1271. X    ,{"gpic", "GPIC -- Produce graphs in groff using the gpic preprocessor",
  1272. X       GPIC_XMAX, GPIC_YMAX, GPIC_VCHAR, GPIC_HCHAR, 
  1273. X       GPIC_VTIC, GPIC_HTIC, GPIC_options, GPIC_init, GPIC_reset, 
  1274. X       GPIC_text, GPIC_scale, GPIC_graphics, GPIC_move, GPIC_vector, 
  1275. X       GPIC_linetype, GPIC_put_text, GPIC_text_angle, 
  1276. X       GPIC_justify_text, line_and_point, GPIC_arrow}
  1277. X#endif
  1278. X
  1279. X#ifdef GRASS
  1280. X    ,{"grass", "GRASS Graphics Monitor",
  1281. X           GRASS_XMAX, GRASS_YMAX, GRASS_VCHAR, GRASS_HCHAR,
  1282. X           GRASS_VTIC, GRASS_HTIC, GRASS_options, GRASS_init, GRASS_reset,
  1283. X           GRASS_text, null_scale, GRASS_graphics, GRASS_move, GRASS_vector,
  1284. X           GRASS_linetype, GRASS_put_text, GRASS_text_angle,
  1285. X           GRASS_justify_text, GRASS_point, GRASS_arrow}
  1286. X#endif
  1287. X
  1288. X#ifdef HP26
  1289. X    ,{"hp2623A", "HP2623A and maybe others",
  1290. X       HP26_XMAX, HP26_YMAX, HP26_VCHAR, HP26_HCHAR,
  1291. X       HP26_VTIC, HP26_HTIC, options_null, HP26_init, HP26_reset,
  1292. X       HP26_text, null_scale, HP26_graphics, HP26_move, HP26_vector,
  1293. X       HP26_linetype, HP26_put_text, HP26_text_angle, 
  1294. X       null_justify_text, HP26_line_and_point, do_arrow}
  1295. X#endif
  1296. X
  1297. X#ifdef HP2648
  1298. X    ,{"hp2648", "HP2648 and HP2647",
  1299. X       HP2648XMAX, HP2648YMAX, HP2648VCHAR, HP2648HCHAR, 
  1300. X       HP2648VTIC, HP2648HTIC, options_null, HP2648init, HP2648reset, 
  1301. X       HP2648text, null_scale, HP2648graphics, HP2648move, HP2648vector, 
  1302. X       HP2648linetype, HP2648put_text, HP2648_text_angle, 
  1303. X       null_justify_text, line_and_point, do_arrow}
  1304. X#endif
  1305. X
  1306. X#ifdef HP75
  1307. X    ,{"hp7580B", "HP7580, and probably other HPs (4 pens)",
  1308. X       HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR,
  1309. X       HPGL_VTIC, HPGL_HTIC, options_null, HPGL_init, HPGL_reset,
  1310. X       HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector,
  1311. X       HP75_linetype, HPGL_put_text, HPGL_text_angle, 
  1312. X       null_justify_text, do_point, do_arrow}
  1313. X#endif
  1314. X
  1315. X#ifdef HP500C
  1316. X      ,{"hp500c", "HP DeskJet 500c, [75 100 150 300] [rle tiff]",
  1317. X       HP500C_75PPI_XMAX, HP500C_75PPI_YMAX, HP500C_75PPI_VCHAR,
  1318. X       HP500C_75PPI_HCHAR, HP500C_75PPI_VTIC, HP500C_75PPI_HTIC, HP500Coptions,
  1319. X       HP500Cinit, HP500Creset, HP500Ctext, null_scale,
  1320. X       HP500Cgraphics, HP500Cmove, HP500Cvector, HP500Clinetype,
  1321. X       HP500Cput_text, HP500Ctext_angle, null_justify_text, do_point,
  1322. X       do_arrow}
  1323. X#endif
  1324. X
  1325. X#ifdef HPGL
  1326. X    ,{"hpgl", "HP7475 and (hopefully) lots of others (6 pens)",
  1327. X       HPGL_XMAX, HPGL_YMAX, HPGL_VCHAR, HPGL_HCHAR,
  1328. X       HPGL_VTIC, HPGL_HTIC, options_null, HPGL_init, HPGL_reset,
  1329. X       HPGL_text, null_scale, HPGL_graphics, HPGL_move, HPGL_vector,
  1330. X       HPGL_linetype, HPGL_put_text, HPGL_text_angle, 
  1331. X       null_justify_text, do_point, do_arrow}
  1332. X#endif
  1333. X
  1334. X#ifdef HPLJII
  1335. X    ,{"hpljii", "HP Laserjet series II, [75 100 150 300]",
  1336. X       HPLJII_75PPI_XMAX, HPLJII_75PPI_YMAX, HPLJII_75PPI_VCHAR,
  1337. X       HPLJII_75PPI_HCHAR, HPLJII_75PPI_VTIC, HPLJII_75PPI_HTIC, HPLJIIoptions,
  1338. X       HPLJIIinit, HPLJIIreset, HPLJIItext, null_scale,
  1339. X       HPLJIIgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
  1340. X       HPLJIIput_text, HPLJIItext_angle, null_justify_text, line_and_point,
  1341. X       do_arrow}
  1342. X    ,{"hpdj", "HP DeskJet 500, [75 100 150 300]",
  1343. X       HPLJII_75PPI_XMAX, HPLJII_75PPI_YMAX, HPLJII_75PPI_VCHAR,
  1344. X       HPLJII_75PPI_HCHAR, HPLJII_75PPI_VTIC, HPLJII_75PPI_HTIC, HPLJIIoptions,
  1345. X       HPLJIIinit, HPLJIIreset, HPDJtext, null_scale,
  1346. X       HPDJgraphics, HPLJIImove, HPLJIIvector, HPLJIIlinetype,
  1347. X       HPDJput_text, HPDJtext_angle, null_justify_text, line_and_point,
  1348. X       do_arrow}
  1349. X#endif
  1350. X
  1351. X#ifdef HPPJ
  1352. X    ,{"hppj", "HP PaintJet and HP3630 [FNT5X9 FNT9X17 FNT13X25]",
  1353. X       HPPJ_XMAX, HPPJ_YMAX,
  1354. X       HPPJ_9x17_VCHAR, HPPJ_9x17_HCHAR, HPPJ_9x17_VTIC, HPPJ_9x17_HTIC,
  1355. X       HPPJoptions, HPPJinit, HPPJreset, HPPJtext, null_scale, HPPJgraphics,
  1356. X       HPPJmove, HPPJvector, HPPJlinetype, HPPJput_text, HPPJtext_angle,
  1357. X       null_justify_text, do_point, do_arrow}
  1358. X#endif
  1359. X
  1360. X#ifdef IMAGEN
  1361. X    ,{"imagen", "Imagen laser printer",
  1362. X       IMAGEN_XMAX, IMAGEN_YMAX, IMAGEN_VCHAR, IMAGEN_HCHAR, 
  1363. X       IMAGEN_VTIC, IMAGEN_HTIC, options_null, IMAGEN_init, IMAGEN_reset, 
  1364. X       IMAGEN_text, null_scale, IMAGEN_graphics, IMAGEN_move, 
  1365. X       IMAGEN_vector, IMAGEN_linetype, IMAGEN_put_text, IMAGEN_text_angle,
  1366. X       IMAGEN_justify_text, line_and_point, do_arrow}
  1367. X#endif
  1368. X
  1369. X#ifdef IRIS4D
  1370. X    ,{"iris4d", "Silicon Graphics IRIS 4D Series Computer",
  1371. X       IRIS4D_XMAX, IRIS4D_YMAX, IRIS4D_VCHAR, IRIS4D_HCHAR, 
  1372. X       IRIS4D_VTIC, IRIS4D_HTIC, IRIS4D_options, IRIS4D_init, IRIS4D_reset, 
  1373. X       IRIS4D_text, null_scale, IRIS4D_graphics, IRIS4D_move, IRIS4D_vector,
  1374. X       IRIS4D_linetype, IRIS4D_put_text, null_text_angle, 
  1375. X       null_justify_text, do_point, do_arrow}
  1376. X#endif
  1377. X
  1378. X#ifdef KERMIT
  1379. X    ,{"kc_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - color",
  1380. X       TEK40XMAX,TEK40YMAX,TEK40VCHAR, KTEK40HCHAR, 
  1381. X       TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset, 
  1382. X       KTEK40Ctext, null_scale, KTEK40graphics, TEK40move, TEK40vector, 
  1383. X       KTEK40Clinetype, TEK40put_text, null_text_angle, 
  1384. X       null_justify_text, do_point, do_arrow}
  1385. X    ,{"km_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - monochrome",
  1386. X       TEK40XMAX,TEK40YMAX,TEK40VCHAR, KTEK40HCHAR, 
  1387. X       TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset, 
  1388. X       TEK40text, null_scale, KTEK40graphics, TEK40move, TEK40vector, 
  1389. X       KTEK40Mlinetype, TEK40put_text, null_text_angle, 
  1390. X       null_justify_text, line_and_point, do_arrow}
  1391. X#endif
  1392. X
  1393. X#ifdef LATEX
  1394. X    ,{"latex", "LaTeX picture environment",
  1395. X       LATEX_XMAX, LATEX_YMAX, LATEX_VCHAR, LATEX_HCHAR, 
  1396. X       LATEX_VTIC, LATEX_HTIC, LATEX_options, LATEX_init, LATEX_reset, 
  1397. X       LATEX_text, LATEX_scale, LATEX_graphics, LATEX_move, LATEX_vector, 
  1398. X       LATEX_linetype, LATEX_put_text, LATEX_text_angle, 
  1399. X       LATEX_justify_text, LATEX_point, LATEX_arrow}
  1400. X#endif
  1401. X
  1402. X#ifdef LN03P
  1403. X     ,{"ln03", "LN03-plus laser printer in tektronix (EGM) mode",
  1404. X    LN03PXMAX, LN03PYMAX, LN03PVCHAR, LN03PHCHAR,
  1405. X    LN03PVTIC, LN03PHTIC, options_null, LN03Pinit, LN03Preset,
  1406. X    LN03Ptext, null_scale, TEK40graphics, LN03Pmove, LN03Pvector,
  1407. X    LN03Plinetype, LN03Pput_text, null_text_angle,
  1408. X    null_justify_text, line_and_point, do_arrow}
  1409. X#endif
  1410. X
  1411. X#ifdef MF
  1412. X    ,{"mf", "Metafont plotting standard",
  1413. X       MF_XMAX, MF_YMAX, MF_VCHAR, MF_HCHAR, 
  1414. X       MF_VTIC, MF_HTIC, options_null, MF_init, MF_reset, 
  1415. X       MF_text, MF_scale, MF_graphics, MF_move, MF_vector, 
  1416. X       MF_linetype, MF_put_text, MF_text_angle, 
  1417. X       MF_justify_text, line_and_point, MF_arrow}
  1418. X#endif
  1419. X
  1420. X#ifdef MGR
  1421. X    ,{"mgr", "Mgr window system",
  1422. X    /* dimensions nominal, replaced during MGR_graphics call */
  1423. X       MGR_XMAX, MGR_YMAX, MGR_VCHAR, MGR_HCHAR, 
  1424. X       MGR_VTIC, MGR_HTIC, options_null, MGR_init, MGR_reset, 
  1425. X       MGR_text, null_scale, MGR_graphics, MGR_move, MGR_vector,
  1426. X       MGR_linetype, MGR_put_text, null_text_angle, 
  1427. X       null_justify_text, do_point, do_arrow}
  1428. X#endif
  1429. X
  1430. X#ifdef MIF
  1431. X    ,{"mif", "Frame maker MIF 3.00 format",
  1432. X          MIF_XMAX, MIF_YMAX, MIF_VCHAR, MIF_HCHAR, 
  1433. X         MIF_VTIC, MIF_HTIC, MIF_options, MIF_init, MIF_reset, 
  1434. X        MIF_text, null_scale, MIF_graphics, MIF_move, MIF_vector, 
  1435. X        MIF_linetype, MIF_put_text, MIF_text_angle, 
  1436. X        MIF_justify_text, line_and_point, do_arrow}
  1437. X#endif
  1438. X
  1439. X#ifdef NEC
  1440. X    ,{"nec_cp6", "NEC printer CP6, Epson LQ-800 [monocrome color draft]",
  1441. X       NECXMAX, NECYMAX, NECVCHAR, NECHCHAR, 
  1442. X       NECVTIC, NECHTIC, NECoptions, NECinit, NECreset, 
  1443. X       NECtext, null_scale, NECgraphics, NECmove, NECvector, 
  1444. X       NEClinetype, NECput_text, NEC_text_angle, 
  1445. X       null_justify_text, line_and_point, do_arrow}
  1446. X#endif
  1447. X
  1448. X#ifdef NEXT
  1449. X    ,{"next", "NeXTstep window system",
  1450. X       NEXT_XMAX, NEXT_YMAX, NEXT_VCHAR, NEXT_HCHAR, 
  1451. X       NEXT_VTIC, NEXT_HTIC, NEXT_options, NEXT_init, NEXT_reset, 
  1452. X       NEXT_text, do_scale, NEXT_graphics, NEXT_move, NEXT_vector, 
  1453. X       NEXT_linetype, NEXT_put_text, NEXT_text_angle, 
  1454. X       NEXT_justify_text, NEXT_point, do_arrow}
  1455. X#endif /* The PostScript driver with NXImage displaying the PostScript on screen */
  1456. X
  1457. X#ifdef OKIDATA
  1458. X    ,{"okidata", "OKIDATA 320/321 Standard",
  1459. X       EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
  1460. X       EPSONVTIC, EPSONHTIC, options_null, EPSONinit, EPSONreset,
  1461. X       OKIDATAtext, null_scale, EPS60graphics, EPSONmove, EPSONvector,
  1462. X       EPSONlinetype, EPSONput_text, EPSON_text_angle,
  1463. X       null_justify_text, do_point, do_arrow}
  1464. X#endif
  1465. X
  1466. X#ifdef OS2PM
  1467. X    ,{"pm", "OS/2 Presentation Manager",
  1468. X       PM_XMAX, PM_YMAX, PM_VCHAR, PM_HCHAR, 
  1469. X       PM_VTIC, PM_HTIC, PM_args, PM_init, PM_reset, 
  1470. X       PM_text, null_scale, PM_graphics, PM_move, PM_vector,
  1471. X       PM_linetype, PM_put_text, PM_text_angle, 
  1472. X       PM_justify_text, PM_point, do_arrow}
  1473. X#endif
  1474. X
  1475. X#ifdef PBM
  1476. X    ,{"pbm", "Portable bitmap [small medium large] [monochrome gray color]",
  1477. X       PBM_XMAX, PBM_YMAX, PBM_VCHAR,
  1478. X       PBM_HCHAR, PBM_VTIC, PBM_HTIC, PBMoptions,
  1479. X       PBMinit, PBMreset, PBMtext, null_scale,
  1480. X       PBMgraphics, PBMmove, PBMvector, PBMlinetype,
  1481. X       PBMput_text, PBMtext_angle, null_justify_text, PBMpoint,
  1482. X       do_arrow}
  1483. X#endif
  1484. X
  1485. X#ifdef PCL
  1486. X ,{"pcl5", "HP LaserJet III [mode] [font] [point]",
  1487. X   PCL_XMAX, PCL_YMAX, HPGL2_VCHAR, HPGL2_HCHAR,
  1488. X   PCL_VTIC, PCL_HTIC, PCL_options, PCL_init, PCL_reset,
  1489. X   PCL_text, null_scale, PCL_graphics, HPGL2_move, HPGL2_vector,
  1490. X   HPGL2_linetype, HPGL2_put_text, HPGL2_text_angle,
  1491. X   HPGL2_justify_text, do_point, do_arrow}
  1492. X#endif
  1493. X
  1494. X#ifdef POSTSCRIPT
  1495. X    ,{"postscript", "PostScript graphics language [mode \042fontname\042 font_size]",
  1496. X       PS_XMAX, PS_YMAX, PS_VCHAR, PS_HCHAR, 
  1497. X       PS_VTIC, PS_HTIC, PS_options, PS_init, PS_reset, 
  1498. X       PS_text, null_scale, PS_graphics, PS_move, PS_vector, 
  1499. X       PS_linetype, PS_put_text, PS_text_angle, 
  1500. X       PS_justify_text, PS_point, do_arrow}
  1501. X#endif
  1502. X
  1503. X#ifdef PRESCRIBE
  1504. X    ,{"prescribe", "Prescribe - for the Kyocera Laser Printer",
  1505. X    PRE_XMAX, PRE_YMAX, PRE_VCHAR, PRE_HCHAR, 
  1506. X    PRE_VTIC, PRE_HTIC, options_null, PRE_init, PRE_reset, 
  1507. X    PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector, 
  1508. X    PRE_linetype, PRE_put_text, null_text_angle, 
  1509. X    PRE_justify_text, line_and_point, do_arrow}
  1510. X    ,{"kyo", "Kyocera Laser Printer with Courier font",
  1511. X    PRE_XMAX, PRE_YMAX, KYO_VCHAR, KYO_HCHAR, 
  1512. X    PRE_VTIC, PRE_HTIC, options_null, KYO_init, PRE_reset, 
  1513. X    PRE_text, null_scale, PRE_graphics, PRE_move, PRE_vector, 
  1514. X    PRE_linetype, PRE_put_text, null_text_angle, 
  1515. X    PRE_justify_text, line_and_point, do_arrow}
  1516. X#endif /* PRESCRIBE */
  1517. X
  1518. X#ifdef PSLATEX
  1519. X    ,{"pslatex", "LaTeX picture environment with PostScript \\specials",
  1520. X    PS_XMAX, PS_YMAX, PSLATEX_VCHAR, PSLATEX_HCHAR,
  1521. X    PS_VTIC, PS_HTIC, PSLATEX_options, PSLATEX_init, PSLATEX_reset,
  1522. X    PSLATEX_text, PSLATEX_scale, PSLATEX_graphics, PS_move, PS_vector,
  1523. X    PS_linetype, PSLATEX_put_text, PSLATEX_text_angle,
  1524. X    PSLATEX_justify_text, PS_point, do_arrow}
  1525. X#endif
  1526. X
  1527. X#ifdef    PSTRICKS
  1528. X    ,{"pstricks", "LaTeX picture environment with PSTricks macros",
  1529. X       PSTRICKS_XMAX, PSTRICKS_YMAX, PSTRICKS_VCHAR, PSTRICKS_HCHAR, 
  1530. X       PSTRICKS_VTIC, PSTRICKS_HTIC, options_null, PSTRICKS_init, PSTRICKS_reset, 
  1531. X       PSTRICKS_text, PSTRICKS_scale, PSTRICKS_graphics, PSTRICKS_move, PSTRICKS_vector, 
  1532. X       PSTRICKS_linetype, PSTRICKS_put_text, PSTRICKS_text_angle, 
  1533. X       PSTRICKS_justify_text, PSTRICKS_point, PSTRICKS_arrow}
  1534. X#endif
  1535. X    
  1536. X#ifdef QMS
  1537. X    ,{"qms", "QMS/QUIC Laser printer (also Talaris 1200 and others)",
  1538. X       QMS_XMAX,QMS_YMAX, QMS_VCHAR, QMS_HCHAR, 
  1539. X       QMS_VTIC, QMS_HTIC, options_null, QMS_init,QMS_reset, 
  1540. X       QMS_text, null_scale, QMS_graphics, QMS_move, QMS_vector,
  1541. X       QMS_linetype,QMS_put_text, null_text_angle, 
  1542. X       null_justify_text, line_and_point, do_arrow}
  1543. X#endif
  1544. X
  1545. X#ifdef REGIS
  1546. X    ,{"regis", "REGIS graphics language",
  1547. X       REGISXMAX, REGISYMAX, REGISVCHAR, REGISHCHAR, 
  1548. X       REGISVTIC, REGISHTIC, REGISoptions, REGISinit, REGISreset, 
  1549. X       REGIStext, null_scale, REGISgraphics, REGISmove, REGISvector,
  1550. X       REGISlinetype, REGISput_text, REGIStext_angle, 
  1551. X       null_justify_text, line_and_point, do_arrow}
  1552. X#endif
  1553. X
  1554. X#ifdef RGIP
  1555. X    ,{"rgip", "RGIP metafile (Uniplex). Option: fontsize (1-8)",
  1556. X       RGIP_XMAX, RGIP_YMAX, RGIP_VCHAR, RGIP_HCHAR,
  1557. X       RGIP_VTIC, RGIP_HTIC, RGIP_options, RGIP_init, RGIP_reset,
  1558. X       RGIP_text, null_scale, RGIP_graphics, RGIP_move,
  1559. X       RGIP_vector, RGIP_linetype, RGIP_put_text, RGIP_text_angle,
  1560. X       RGIP_justify_text, RGIP_do_point, do_arrow}
  1561. X    ,{"uniplex", "RGIP metafile (Uniplex). Option: fontsize (1-8)",
  1562. X       RGIP_XMAX, RGIP_YMAX, RGIP_VCHAR, RGIP_HCHAR,
  1563. X       RGIP_VTIC, RGIP_HTIC, RGIP_options, RGIP_init, RGIP_reset,
  1564. X       RGIP_text, null_scale, RGIP_graphics, RGIP_move,
  1565. X       RGIP_vector, RGIP_linetype, RGIP_put_text, RGIP_text_angle,
  1566. X       RGIP_justify_text, RGIP_do_point, do_arrow}
  1567. X#endif
  1568. X
  1569. X#ifdef SELANAR
  1570. X    ,{"selanar", "Selanar",
  1571. X       TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, 
  1572. X       TEK40VTIC, TEK40HTIC, options_null, SEL_init, SEL_reset, 
  1573. X       SEL_text, null_scale, SEL_graphics, TEK40move, TEK40vector, 
  1574. X       TEK40linetype, TEK40put_text, null_text_angle, 
  1575. X       null_justify_text, line_and_point, do_arrow}
  1576. X#endif
  1577. X
  1578. X#ifdef STARC
  1579. X    ,{"starc", "Star Color Printer",
  1580. X       STARCXMAX, STARCYMAX, STARCVCHAR, STARCHCHAR, 
  1581. X       STARCVTIC, STARCHTIC, options_null, STARCinit, STARCreset, 
  1582. X       STARCtext, null_scale, STARCgraphics, STARCmove, STARCvector, 
  1583. X       STARClinetype, STARCput_text, STARC_text_angle, 
  1584. X       null_justify_text, line_and_point, do_arrow}
  1585. X#endif
  1586. X
  1587. X#ifdef SUN
  1588. X    ,{"sun", "SunView window system",
  1589. X       SUN_XMAX, SUN_YMAX, SUN_VCHAR, SUN_HCHAR, 
  1590. X       SUN_VTIC, SUN_HTIC, options_null, SUN_init, SUN_reset, 
  1591. X       SUN_text, null_scale, SUN_graphics, SUN_move, SUN_vector,
  1592. X       SUN_linetype, SUN_put_text, null_text_angle, 
  1593. X       SUN_justify_text, line_and_point, do_arrow}
  1594. X#endif
  1595. X
  1596. X#ifdef VWS
  1597. X    ,{"VWS", "VAX Windowing System (UIS)",
  1598. X           VWS_XMAX, VWS_YMAX, VWS_VCHAR, VWS_HCHAR,
  1599. X           VWS_VTIC, VWS_HTIC, options_null, VWS_init, VWS_reset,
  1600. X           VWS_text, null_scale, VWS_graphics, VWS_move, VWS_vector,
  1601. X           VWS_linetype, VWS_put_text, VWS_text_angle,
  1602. X           VWS_justify_text, do_point, do_arrow}
  1603. X#endif
  1604. X
  1605. X#ifdef TANDY60
  1606. X    ,{"tandy_60dpi", "Tandy DMP-130 series 60-dot per inch graphics",
  1607. X       EPS60XMAX, EPS60YMAX, EPSONVCHAR, EPSONHCHAR,
  1608. X       EPSONVTIC, EPSONHTIC, options_null, EPSONinit, EPSONreset,
  1609. X       TANDY60text, null_scale, EPS60graphics, EPSONmove, EPSONvector,
  1610. X       EPSONlinetype, EPSONput_text, EPSON_text_angle,
  1611. X       null_justify_text, do_point, do_arrow}
  1612. X#endif
  1613. X
  1614. X#ifdef T410X
  1615. X    ,{"tek410x", "Tektronix 4106, 4107, 4109 and 420X terminals",
  1616. X       T410XXMAX, T410XYMAX, T410XVCHAR, T410XHCHAR, 
  1617. X       T410XVTIC, T410XHTIC, options_null, T410X_init, T410X_reset, 
  1618. X       T410X_text, null_scale, T410X_graphics, T410X_move, T410X_vector, 
  1619. X       T410X_linetype, T410X_put_text, T410X_text_angle, 
  1620. X       null_justify_text, T410X_point, do_arrow}
  1621. X#endif
  1622. X
  1623. X#ifdef TEK
  1624. X    ,{"tek40xx", "Tektronix 4010 and others; most TEK emulators",
  1625. X       TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR, 
  1626. X       TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset, 
  1627. X       TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector, 
  1628. X       TEK40linetype, TEK40put_text, null_text_angle, 
  1629. X       null_justify_text, line_and_point, do_arrow}
  1630. X#endif
  1631. X
  1632. X#ifdef TEXDRAW
  1633. X    ,{"texdraw", "LaTeX texdraw environment",
  1634. X       TEXDRAW_XMAX, TEXDRAW_YMAX, TEXDRAW_VCHAR, TEXDRAW_HCHAR,
  1635. X    TEXDRAW_VTIC, TEXDRAW_HTIC, options_null, TEXDRAW_init, TEXDRAW_reset,
  1636. X    TEXDRAW_text, TEXDRAW_scale, TEXDRAW_graphics, TEXDRAW_move, TEXDRAW_vector,
  1637. X    TEXDRAW_linetype, TEXDRAW_put_text, TEXDRAW_text_angle,
  1638. X    TEXDRAW_justify_text, TEXDRAW_point, TEXDRAW_arrow}
  1639. X#endif
  1640. X  
  1641. X#ifdef TGIF
  1642. X    ,{"tgif", "TGIF X-Window draw tool (file version 10)",
  1643. X       TGIF_XMAX, TGIF_YMAX, TGIF_VCHAR1, TGIF_HCHAR1, 
  1644. X       TGIF_VTIC, TGIF_HTIC, options_null, TGIF_init, TGIF_reset, 
  1645. X       TGIF_text, null_scale, TGIF_graphics, TGIF_move, TGIF_vector, 
  1646. X       TGIF_linetype, TGIF_put_text, TGIF_text_angle, 
  1647. X       TGIF_justify_text, line_and_point, TGIF_arrow}
  1648. X#endif
  1649. X
  1650. X#ifdef TPIC
  1651. X    ,{"tpic", "TPIC -- LaTeX picture environment with tpic \\specials",
  1652. X       TPIC_XMAX, TPIC_YMAX, TPIC_VCHAR, TPIC_HCHAR, 
  1653. X       TPIC_VTIC, TPIC_HTIC, TPIC_options, TPIC_init, TPIC_reset, 
  1654. X       TPIC_text, TPIC_scale, TPIC_graphics, TPIC_move, TPIC_vector, 
  1655. X       TPIC_linetype, TPIC_put_text, TPIC_text_angle, 
  1656. X       TPIC_justify_text, TPIC_point, TPIC_arrow}
  1657. X#endif
  1658. X
  1659. X#ifdef UNIXPLOT
  1660. X#ifdef GNUGRAPH
  1661. X    ,{"unixplot", "GNU plot(1) format [\042fontname\042 font_size]",
  1662. X       UP_XMAX, UP_YMAX, UP_VCHAR, UP_HCHAR,
  1663. X       UP_VTIC, UP_HTIC, UP_options, UP_init, UP_reset,
  1664. X       UP_text, null_scale, UP_graphics, UP_move, UP_vector,
  1665. X       UP_linetype, UP_put_text, UP_text_angle,
  1666. X       UP_justify_text, line_and_point, do_arrow}
  1667. X#else
  1668. X    ,{"unixplot", "Unix plotting standard (see plot(1))",
  1669. X       UP_XMAX, UP_YMAX, UP_VCHAR, UP_HCHAR, 
  1670. X       UP_VTIC, UP_HTIC, options_null, UP_init, UP_reset, 
  1671. X       UP_text, null_scale, UP_graphics, UP_move, UP_vector, 
  1672. X       UP_linetype, UP_put_text, null_text_angle, 
  1673. X       null_justify_text, line_and_point, do_arrow}
  1674. X#endif /* GNUGRAPH */
  1675. X#endif
  1676. X    
  1677. X#ifdef UNIXPC
  1678. X    ,{"unixpc", "AT&T 3b1 or AT&T 7300 Unix PC",
  1679. X       uPC_XMAX, uPC_YMAX, uPC_VCHAR, uPC_HCHAR, 
  1680. X       uPC_VTIC, uPC_HTIC, options_null, uPC_init, uPC_reset, 
  1681. X       uPC_text, null_scale, uPC_graphics, uPC_move, uPC_vector,
  1682. X       uPC_linetype, uPC_put_text, uPC_text_angle, 
  1683. X       null_justify_text, line_and_point, do_arrow}
  1684. X#endif
  1685. X
  1686. X#ifdef EMXVGA
  1687. X#ifdef EMXVESA
  1688. X    ,{"vesa", "IBM PC/Clone with VESA SVGA graphics board [vesa mode]",
  1689. X       EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR,
  1690. X       EMXVGA_VTIC, EMXVGA_HTIC, EMXVESA_options, EMXVESA_init, EMXVESA_reset,
  1691. X       EMXVESA_text, null_scale, EMXVESA_graphics, EMXVGA_move, EMXVGA_vector,
  1692. X       EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle, 
  1693. X       null_justify_text, do_point, do_arrow}
  1694. X#endif
  1695. X    ,{"vgal", "IBM PC/Clone with VGA graphics board",
  1696. X       EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR,
  1697. X       EMXVGA_VTIC, EMXVGA_HTIC, options_null, EMXVGA_init, EMXVGA_reset,
  1698. X       EMXVGA_text, null_scale, EMXVGA_graphics, EMXVGA_move, EMXVGA_vector,
  1699. X       EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle, 
  1700. X       null_justify_text, do_point, do_arrow}
  1701. X#endif
  1702. X
  1703. X#ifdef V384
  1704. X    ,{"vx384", "Vectrix 384 and Tandy color printer",
  1705. X       V384_XMAX, V384_YMAX, V384_VCHAR, V384_HCHAR, 
  1706. X       V384_VTIC, V384_HTIC, options_null, V384_init, V384_reset, 
  1707. X       V384_text, null_scale, V384_graphics, V384_move, V384_vector, 
  1708. X       V384_linetype, V384_put_text, null_text_angle, 
  1709. X       null_justify_text, do_point, do_arrow}
  1710. X#endif
  1711. X
  1712. X#ifdef VTTEK
  1713. X    ,{"vttek", "VT-like tek40xx terminal emulator",
  1714. X       TEK40XMAX,TEK40YMAX,TEK40VCHAR, TEK40HCHAR,
  1715. X       TEK40VTIC, TEK40HTIC, options_null, VTTEK40init, VTTEK40reset,
  1716. X       TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector,
  1717. X       VTTEK40linetype, VTTEK40put_text, null_text_angle,
  1718. X       null_justify_text, line_and_point, do_arrow}
  1719. X#endif
  1720. X
  1721. X#ifdef _Windows
  1722. X    ,{"windows", "Microsoft Windows",
  1723. X       WIN_XMAX, WIN_YMAX, WIN_VCHAR, WIN_HCHAR, 
  1724. X       WIN_VTIC, WIN_HTIC, WIN_options, WIN_init, WIN_reset, 
  1725. X       WIN_text, WIN_scale, WIN_graphics, WIN_move, WIN_vector,
  1726. X       WIN_linetype, WIN_put_text, WIN_text_angle, 
  1727. X       WIN_justify_text, WIN_point, do_arrow}
  1728. X#endif
  1729. X
  1730. X#ifdef X11
  1731. X    ,{"x11", "X11 Window System",
  1732. X       X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR, 
  1733. X       X11_VTIC, X11_HTIC, options_null, X11_init, X11_reset, 
  1734. X       X11_text, null_scale, X11_graphics, X11_move, X11_vector, 
  1735. X       X11_linetype, X11_put_text, null_text_angle, 
  1736. X       X11_justify_text, X11_point, do_arrow}
  1737. X    ,{"X11", "X11 Window System (identical to x11)",
  1738. X       X11_XMAX, X11_YMAX, X11_VCHAR, X11_HCHAR, 
  1739. X       X11_VTIC, X11_HTIC, options_null, X11_init, X11_reset, 
  1740. X       X11_text, null_scale, X11_graphics, X11_move, X11_vector, 
  1741. X       X11_linetype, X11_put_text, null_text_angle, 
  1742. X       X11_justify_text, X11_point, do_arrow}
  1743. X   ,{"xlib", "X11 Window System (gnulib_x11 dump)",
  1744. X       Xlib_XMAX, Xlib_YMAX, Xlib_VCHAR, Xlib_HCHAR, 
  1745. X       Xlib_VTIC, Xlib_HTIC, options_null, Xlib_init, Xlib_reset, 
  1746. X       Xlib_text, null_scale, Xlib_graphics, Xlib_move, Xlib_vector, 
  1747. X       Xlib_linetype, Xlib_put_text, null_text_angle, 
  1748. X       Xlib_justify_text, line_and_point, do_arrow}
  1749. X#endif
  1750. X};
  1751. X
  1752. X#define TERMCOUNT (sizeof(term_tbl)/sizeof(struct termentry))
  1753. X
  1754. X
  1755. Xlist_terms()
  1756. X{
  1757. Xregister int i;
  1758. X
  1759. X    fprintf(stderr,"\nAvailable terminal types:\n");
  1760. X    for (i = 0; i < TERMCOUNT; i++)
  1761. X        fprintf(stderr,"  %15s  %s\n",
  1762. X               term_tbl[i].name, term_tbl[i].description);
  1763. X    (void) putc('\n',stderr);
  1764. X}
  1765. X
  1766. X
  1767. X/* set_term: get terminal number from name on command line */
  1768. X/* will change 'term' variable if successful */
  1769. Xint                        /* term number */
  1770. Xset_term(c_token)
  1771. Xint c_token;
  1772. X{
  1773. X    register int t;
  1774. X    char *input_name;
  1775. X
  1776. X    if (!token[c_token].is_token)
  1777. X     int_error("terminal name expected",c_token);
  1778. X    t = -1;
  1779. X    input_name = input_line + token[c_token].start_index;
  1780. X    t = change_term(input_name, token[c_token].length);
  1781. X    if (t == -1)
  1782. X     int_error("unknown terminal type; type just 'set terminal' for a list",
  1783. X             c_token);
  1784. X    if (t == -2)
  1785. X     int_error("ambiguous terminal name; type just 'set terminal' for a list",
  1786. X             c_token);
  1787. X
  1788. X    /* otherwise the type was changed */
  1789. X
  1790. X    return(t);
  1791. X}
  1792. X
  1793. X/* change_term: get terminal number from name and set terminal type */
  1794. X/* returns -1 if unknown, -2 if ambiguous, >=0 is terminal number */
  1795. Xint
  1796. Xchange_term(name, length)
  1797. X    char *name;
  1798. X    int length;
  1799. X{
  1800. X    int i, t = -1;
  1801. X
  1802. X    for (i = 0; i < TERMCOUNT; i++) {
  1803. X       if (!strncmp(name,term_tbl[i].name,length)) {
  1804. X          if (t != -1)
  1805. X            return(-2);    /* ambiguous */
  1806. X          t = i;
  1807. X       }
  1808. X    }
  1809. X
  1810. X    if (t == -1)            /* unknown */
  1811. X     return(t);
  1812. X
  1813. X    /* Success: set terminal type now */
  1814. X
  1815. X    term = t;
  1816. X    term_init = FALSE;
  1817. X    name = term_tbl[term].name;
  1818. X
  1819. X    /* Special handling for unixplot term type */
  1820. X    if (!strncmp("unixplot",name,8)) {
  1821. X       UP_redirect (2);  /* Redirect actual stdout for unixplots */
  1822. X    } else if (unixplot) {
  1823. X       UP_redirect (3);  /* Put stdout back together again. */
  1824. X    }
  1825. X
  1826. X    if (interactive)
  1827. X     fprintf(stderr, "Terminal type set to '%s'\n", name);
  1828. X
  1829. X    return(t);
  1830. X}
  1831. X
  1832. X/*
  1833. X   Routine to detect what terminal is being used (or do anything else
  1834. X   that would be nice).  One anticipated (or allowed for) side effect
  1835. X   is that the global ``term'' may be set. 
  1836. X   The environment variable GNUTERM is checked first; if that does
  1837. X   not exist, then the terminal hardware is checked, if possible, 
  1838. X   and finally, we can check $TERM for some kinds of terminals.
  1839. X   A default can be set with -DDEFAULTTERM=myterm in the Makefile
  1840. X   or #define DEFAULTTERM myterm in term.h
  1841. X*/
  1842. X/* thanks to osupyr!alden (Dave Alden) for the original GNUTERM code */
  1843. Xinit_terminal()
  1844. X{
  1845. X    int t;
  1846. X#ifdef DEFAULTTERM
  1847. X    char *term_name = DEFAULTTERM;
  1848. X#else
  1849. X    char *term_name = NULL;
  1850. X#endif /* DEFAULTTERM */
  1851. X#if (defined(__TURBOC__) && defined(MSDOS) && !defined(_Windows)) || defined(NEXT) || defined(SUN) || defined(X11)
  1852. X    char *term = NULL;        /* from TERM environment var */
  1853. X#endif
  1854. X#ifdef X11
  1855. X    char *display = NULL;
  1856. X#endif
  1857. X    char *gnuterm = NULL;
  1858. X
  1859. X    /* GNUTERM environment variable is primary */
  1860. X    gnuterm = getenv("GNUTERM");
  1861. X    if (gnuterm != (char *)NULL) {
  1862. X     term_name = gnuterm;
  1863. X#ifndef _Windows
  1864. X#if defined(__TURBOC__) && defined(MSDOS)
  1865. X         get_path();   /* So *_init() can find the BGI driver */
  1866. X# endif
  1867. X#endif
  1868. X    }
  1869. X    else {
  1870. X#if defined(__TURBOC__) && defined(MSDOS) && !defined(_Windows)
  1871. X       term_name = turboc_init();
  1872. X       term = (char *)NULL; /* shut up turbo C */
  1873. X#endif
  1874. X       
  1875. X#ifdef __ZTC__
  1876. X      term_name = ztc_init();
  1877. X#endif
  1878. X
  1879. X#ifdef vms
  1880. X       term_name = vms_init();
  1881. X#endif
  1882. X
  1883. X#ifdef NEXT
  1884. X    term = getenv("TERM");
  1885. X    if (term_name == (char *)NULL
  1886. X        && term != (char *)NULL && strcmp(term,"next") == 0)
  1887. X          term_name = "next";
  1888. X#endif /* NeXT */
  1889. X       
  1890. X#ifdef SUN
  1891. X       term = getenv("TERM");    /* try $TERM */
  1892. X       if (term_name == (char *)NULL
  1893. X          && term != (char *)NULL && strcmp(term, "sun") == 0)
  1894. X        term_name = "sun";
  1895. X#endif /* sun */
  1896. X
  1897. X#ifdef _Windows
  1898. X        term_name = "win";
  1899. X#endif /* _Windows */
  1900. X
  1901. X#ifdef GPR
  1902. X   if (gpr_isa_pad()) term_name = "gpr";       /* find out whether stdout is a DM pad. See term/gpr.trm */
  1903. X#else
  1904. X#ifdef APOLLO
  1905. X   if (apollo_isa_pad()) term_name = "apollo"; /* find out whether stdout is a DM pad. See term/apollo.trm */
  1906. X#endif /* APOLLO */
  1907. X#endif /* GPR    */
  1908. X
  1909. X#ifdef X11
  1910. X       term = getenv("TERM");    /* try $TERM */
  1911. X       if (term_name == (char *)NULL
  1912. X          && term != (char *)NULL && strcmp(term, "xterm") == 0)
  1913. X        term_name = "x11";
  1914. X       display = getenv("DISPLAY");
  1915. X       if (term_name == (char *)NULL && display != (char *)NULL)
  1916. X        term_name = "x11";
  1917. X       if (X11_Display)
  1918. X        term_name = "x11";
  1919. X#endif /* x11 */
  1920. X
  1921. X#ifdef AMIGASCREEN
  1922. X       term_name = "amiga";
  1923. X#endif
  1924. X
  1925. X#ifdef ATARI
  1926. X       term_name = "atari";
  1927. X#endif
  1928. X
  1929. X#ifdef UNIXPC
  1930. X           if (iswind() == 0) {
  1931. X              term_name = "unixpc";
  1932. X           }
  1933. X#endif /* unixpc */
  1934. X
  1935. X#ifdef CGI
  1936. X       if (getenv("CGIDISP") || getenv("CGIPRNT"))
  1937. X         term_name = "cgi";
  1938. X#endif /*CGI */
  1939. X
  1940. X#if defined(MSDOS) && defined(__EMX__)
  1941. X#ifdef EMXVESA
  1942. X       term_name = "vesa";
  1943. X#else
  1944. X       term_name = "vgal";
  1945. X#endif
  1946. X#endif
  1947. X
  1948. X#ifdef DJGPP
  1949. X        term_name = "svga";
  1950. X#endif
  1951. X
  1952. X#ifdef GRASS
  1953. X        term_name = "grass";
  1954. X#endif
  1955. X
  1956. X#ifdef OS2
  1957. X           term_name = "pm" ;
  1958. X            /* EMX compiler has getcwd that can return drive */
  1959. X           if( PM_path[0]=='\0' ) _getcwd2( PM_path, 256 ) ;
  1960. X#endif /*OS2 */           
  1961. X    }
  1962. X
  1963. X    /* We have a name, try to set term type */
  1964. X    if (term_name != NULL && *term_name != '\0') {
  1965. X       t = change_term(term_name, (int)strlen(term_name));
  1966. X       if (t == -1)
  1967. X        fprintf(stderr, "Unknown terminal name '%s'\n", term_name);
  1968. X       else if (t == -2)
  1969. X        fprintf(stderr, "Ambiguous terminal name '%s'\n", term_name);
  1970. X       else                /* successful */
  1971. X        ;
  1972. X    }
  1973. X}
  1974. X
  1975. X
  1976. X#ifndef _Windows
  1977. X#if defined (__TURBOC__) && defined (MSDOS)
  1978. Xchar *
  1979. Xturboc_init()
  1980. X{
  1981. X  int g_driver,g_mode;
  1982. X  char far *c1,*c2;
  1983. X  char *term_name = NULL;
  1984. X  struct text_info tinfo;       /* So we can restore starting text mode. */
  1985. X
  1986. X/* Some of this code including BGI drivers is copyright Borland Intl. */
  1987. X    g_driver=DETECT;
  1988. X          get_path();
  1989. X    gettextinfo(&tinfo);
  1990. X        initgraph(&g_driver,&g_mode,path);
  1991. X        c1=getdrivername();
  1992. X        c2=getmodename(g_mode);
  1993. X          switch (g_driver){
  1994. X            case -2: fprintf(stderr,"Graphics card not detected.\n");
  1995. X                     break;
  1996. X            case -3: fprintf(stderr,"BGI driver file cannot be found.\n");
  1997. X                     break;
  1998. X            case -4: fprintf(stderr,"Invalid BGI driver file.\n");
  1999. X                     break;
  2000. X            case -5: fprintf(stderr,"Insufficient memory to load ",
  2001. X                             "graphics driver.");
  2002. X                     break;
  2003. X            case 1 : term_name = "cga";
  2004. X                     break;
  2005. X            case 2 : term_name = "mcga";
  2006. X                     break;
  2007. X            case 3 : 
  2008. X            case 4 : term_name = "egalib";
  2009. X                     break;
  2010. X            case 7 : term_name = "hercules";
  2011. X                     break;
  2012. X            case 8 : term_name = "att";
  2013. X                     break;
  2014. X            case 9 : term_name = "vgalib";
  2015. X                     break;
  2016. X            }
  2017. X        closegraph();
  2018. X        textmode(tinfo.currmode);
  2019. X    clrscr();
  2020. X    fprintf(stderr,"\tTC Graphics, driver %s  mode %s\n",c1,c2);
  2021. X  return(term_name);
  2022. X}
  2023. X# endif /* __TURBOC__ */
  2024. X#endif
  2025. X
  2026. X#if defined(__ZTC__)
  2027. Xchar *
  2028. Xztc_init()
  2029. X{
  2030. X  int g_mode;
  2031. X  char *term_name = NULL;
  2032. X
  2033. X    g_mode = fg_init();
  2034. X
  2035. X          switch (g_mode){
  2036. X            case FG_NULL      :  fprintf(stderr,"Graphics card not detected or not supported.\n");
  2037. X                                 exit(1);
  2038. X            case FG_HERCFULL  :  term_name = "hercules";
  2039. X                                 break;
  2040. X            case FG_EGAMONO   :  term_name = "egamono";
  2041. X                                 break;
  2042. X            case FG_EGAECD      :  term_name = "egalib";
  2043. X                                 break;
  2044. X            case FG_VGA11      :  term_name = "vgamono";
  2045. X                                 break;
  2046. X            case FG_VGA12      :  term_name = "vgalib";
  2047. X                                 break;
  2048. X            case FG_VESA6A      :  term_name = "svgalib";
  2049. X                                 break;
  2050. X            case FG_VESA5      :  term_name = "ssvgalib";
  2051. X                                 break;
  2052. X            }
  2053. X        fg_term();
  2054. X  return(term_name);
  2055. X}
  2056. X#endif /* __ZTC__ */
  2057. X
  2058. X
  2059. X/*
  2060. X    This is always defined so we don't have to have command.c know if it
  2061. X    is there or not.
  2062. X*/
  2063. X#ifndef UNIXPLOT
  2064. XUP_redirect(caller) int caller; 
  2065. X{
  2066. X    caller = caller;    /* to stop Turbo C complaining 
  2067. X                         * about caller not being used */
  2068. X}
  2069. X#else
  2070. XUP_redirect (caller)
  2071. Xint caller;
  2072. X/*
  2073. X    Unixplot can't really write to outfile--it wants to write to stdout.
  2074. X    This is normally ok, but the original design of gnuplot gives us
  2075. X    little choice.  Originally users of unixplot had to anticipate
  2076. X    their needs and redirect all I/O to a file...  Not very gnuplot-like.
  2077. X
  2078. X    caller:  1 - called from SET OUTPUT "FOO.OUT"
  2079. X             2 - called from SET TERM UNIXPLOT
  2080. X             3 - called from SET TERM other
  2081. X             4 - called from SET OUTPUT
  2082. X*/
  2083. X{
  2084. X    switch (caller) {
  2085. X    case 1:
  2086. X    /* Don't save, just replace stdout w/outfile (save was already done). */
  2087. X        if (unixplot)
  2088. X            *(stdout) = *(outfile);  /* Copy FILE structure */
  2089. X    break;
  2090. X    case 2:
  2091. X        if (!unixplot) {
  2092. X            fflush(stdout);
  2093. X            save_stdout = *(stdout);
  2094. X            *(stdout) = *(outfile);  /* Copy FILE structure */
  2095. X            unixplot = 1;
  2096. X        }
  2097. X    break;
  2098. X    case 3:
  2099. X    /* New terminal in use--put stdout back to original. */
  2100. X        /* closepl(); */  /* This is called by the term. */
  2101. X        fflush(stdout);
  2102. X        *(stdout) = save_stdout;  /* Copy FILE structure */
  2103. X        unixplot = 0;
  2104. X    break;
  2105. X    case 4:
  2106. X    /*  User really wants to go to normal output... */
  2107. X        if (unixplot) {
  2108. X            fflush(stdout);
  2109. X            *(stdout) = save_stdout;  /* Copy FILE structure */
  2110. X        }
  2111. X    break;
  2112. X    }
  2113. X}
  2114. X#endif
  2115. X
  2116. X
  2117. X/* test terminal by drawing border and text */
  2118. X/* called from command test */
  2119. Xtest_term()
  2120. X{
  2121. X    register struct termentry *t = &term_tbl[term];
  2122. X    char *str;
  2123. X    int x,y, xl,yl, i;
  2124. X    unsigned int xmax, ymax;
  2125. X    char label[MAX_ID_LEN];
  2126. X    int scaling;
  2127. X
  2128. X    if (!term_init) {
  2129. X       (*t->init)();
  2130. X       term_init = TRUE;
  2131. X    }
  2132. X    screen_ok = FALSE;
  2133. X    scaling = (*t->scale)(xsize, ysize);
  2134. X    xmax = (unsigned int)(t->xmax * (scaling ? 1 : xsize));
  2135. X    ymax = (unsigned int)(t->ymax * (scaling ? 1 : ysize));
  2136. X    (*t->graphics)();
  2137. X    /* border linetype */
  2138. X    (*t->linetype)(-2);
  2139. X    (*t->move)(0,0);
  2140. X    (*t->vector)(xmax-1,0);
  2141. X    (*t->vector)(xmax-1,ymax-1);
  2142. X    (*t->vector)(0,ymax-1);
  2143. X    (*t->vector)(0,0);
  2144. X    (void) (*t->justify_text)(LEFT);
  2145. X    (*t->put_text)(t->h_char*5,ymax-t->v_char*3,"Terminal Test");
  2146. X    /* axis linetype */
  2147. X    (*t->linetype)(-1);
  2148. X    (*t->move)(xmax/2,0);
  2149. X    (*t->vector)(xmax/2,ymax-1);
  2150. X    (*t->move)(0,ymax/2);
  2151. X    (*t->vector)(xmax-1,ymax/2);
  2152. X    /* test width and height of characters */
  2153. X    (*t->linetype)(-2);
  2154. X    (*t->move)(  xmax/2-t->h_char*10,ymax/2+t->v_char/2);
  2155. X    (*t->vector)(xmax/2+t->h_char*10,ymax/2+t->v_char/2);
  2156. X    (*t->vector)(xmax/2+t->h_char*10,ymax/2-t->v_char/2);
  2157. X    (*t->vector)(xmax/2-t->h_char*10,ymax/2-t->v_char/2);
  2158. X    (*t->vector)(xmax/2-t->h_char*10,ymax/2+t->v_char/2);
  2159. X    (*t->put_text)(xmax/2-t->h_char*10,ymax/2,
  2160. X        "12345678901234567890");
  2161. X    /* test justification */
  2162. X    (void) (*t->justify_text)(LEFT);
  2163. X    (*t->put_text)(xmax/2,ymax/2+t->v_char*6,"left justified");
  2164. X    str = "centre+d text";
  2165. X    if ((*t->justify_text)(CENTRE))
  2166. X        (*t->put_text)(xmax/2,
  2167. X                ymax/2+t->v_char*5,str);
  2168. X    else
  2169. X        (*t->put_text)(xmax/2-strlen(str)*t->h_char/2,
  2170. X                ymax/2+t->v_char*5,str);
  2171. X    str = "right justified";
  2172. X    if ((*t->justify_text)(RIGHT))
  2173. X        (*t->put_text)(xmax/2,
  2174. X                ymax/2+t->v_char*4,str);
  2175. X    else
  2176. X        (*t->put_text)(xmax/2-strlen(str)*t->h_char,
  2177. X                ymax/2+t->v_char*4,str);
  2178. X    /* test text angle */
  2179. X    str = "rotated ce+ntred text";
  2180. X    if ((*t->text_angle)(1)) {
  2181. X        if ((*t->justify_text)(CENTRE))
  2182. X            (*t->put_text)(t->v_char,
  2183. X                ymax/2,str);
  2184. X        else
  2185. X            (*t->put_text)(t->v_char,
  2186. X                ymax/2-strlen(str)*t->h_char/2,str);
  2187. X    }
  2188. X    else {
  2189. X        (void) (*t->justify_text)(LEFT);
  2190. X        (*t->put_text)(t->h_char*2,ymax/2-t->v_char*2,"Can't rotate text");
  2191. X    }
  2192. X    (void) (*t->justify_text)(LEFT);
  2193. X    (void) (*t->text_angle)(0);
  2194. X    /* test tic size */
  2195. X    (*t->move)(xmax/2+t->h_tic*2,0);
  2196. X    (*t->vector)(xmax/2+t->h_tic*2,t->v_tic);
  2197. X    (*t->move)(xmax/2,t->v_tic*2);
  2198. X    (*t->vector)(xmax/2+t->h_tic,t->v_tic*2);
  2199. X    (*t->put_text)(xmax/2+t->h_tic*2,t->v_tic*2+t->v_char/2,"test tics");
  2200. X    /* test line and point types */
  2201. X    x = xmax - t->h_char*4 - t->h_tic*4;
  2202. X    y = ymax - t->v_char;
  2203. X    for ( i = -2; y > t->v_char; i++ ) {
  2204. X        (*t->linetype)(i);
  2205. X        /*    (void) sprintf(label,"%d",i);  Jorgen Lippert
  2206. X        lippert@risoe.dk */
  2207. X        (void) sprintf(label,"%d",i+1);
  2208. X        if ((*t->justify_text)(RIGHT))
  2209. X            (*t->put_text)(x,y,label);
  2210. X        else
  2211. X            (*t->put_text)(x-strlen(label)*t->h_char,y,label);
  2212. X        (*t->move)(x+t->h_char,y);
  2213. X        (*t->vector)(x+t->h_char*4,y);
  2214. X        if ( i >= -1 )
  2215. X            (*t->point)(x+t->h_char*4+t->h_tic*2,y,i);
  2216. X        y -= t->v_char;
  2217. X    }
  2218. X    /* test some arrows */
  2219. X    (*t->linetype)(0);
  2220. X    x = xmax/4;
  2221. X    y = ymax/4;
  2222. X    xl = t->h_tic*5;
  2223. X    yl = t->v_tic*5;
  2224. X    (*t->arrow)(x,y,x+xl,y,TRUE);
  2225. X    (*t->arrow)(x,y,x+xl/2,y+yl,TRUE);
  2226. X    (*t->arrow)(x,y,x,y+yl,TRUE);
  2227. X    (*t->arrow)(x,y,x-xl/2,y+yl,FALSE);
  2228. X    (*t->arrow)(x,y,x-xl,y,TRUE);
  2229. X    (*t->arrow)(x,y,x-xl,y-yl,TRUE);
  2230. X    (*t->arrow)(x,y,x,y-yl,TRUE);
  2231. X    (*t->arrow)(x,y,x+xl,y-yl,TRUE);
  2232. X    /* and back into text mode */
  2233. X    (*t->text)();
  2234. X}
  2235. X
  2236. X
  2237. X#if defined(MSDOS)||defined(ATARI)||defined(OS2)||defined(_Windows)||defined(DOS386)
  2238. X/* output for some terminal types must be binary to stop non Unix computers
  2239. X   changing \n to \r\n. 
  2240. X   If the output is not STDOUT, the following code reopens outfile 
  2241. X   with binary mode. */
  2242. Xvoid
  2243. Xreopen_binary()
  2244. X{
  2245. Xchar filename[MAX_ID_LEN+1];
  2246. X
  2247. X    if (outfile!=stdout) {
  2248. X        (void) fclose(outfile);
  2249. X        (void) strcpy(filename,outstr+1);    /* remove quotes */
  2250. X        filename[strlen(filename)-1] = '\0';
  2251. X#ifdef _Windows
  2252. X        if ( !stricmp(outstr,"'PRN'") )
  2253. X            (void) strcpy(filename,win_prntmp);    /* use temp file for windows */
  2254. X#endif
  2255. X        if ( (outfile = fopen(filename,"wb")) == (FILE *)NULL ) {
  2256. X            if ( (outfile = fopen(filename,"w")) == (FILE *)NULL ) {
  2257. X                os_error("cannot reopen file with binary type; output unknown",
  2258. X                    NO_CARET);
  2259. X            } 
  2260. X            else {
  2261. X    os_error("cannot reopen file with binary type; output reset to ascii", 
  2262. X                    NO_CARET);
  2263. X            }
  2264. X        }
  2265. X#if defined(__TURBOC__) && defined(MSDOS)
  2266. X#ifndef _Windows
  2267. X        if ( !stricmp(outstr,"'PRN'") )
  2268. X        {
  2269. X        /* Put the printer into binary mode. */
  2270. X        union REGS regs;
  2271. X            regs.h.ah = 0x44;    /* ioctl */
  2272. X            regs.h.al = 0;        /* get device info */
  2273. X            regs.x.bx = fileno(outfile);
  2274. X            intdos(®s, ®s);
  2275. X            regs.h.dl |= 0x20;    /* binary (no ^Z intervention) */
  2276. X            regs.h.dh = 0;
  2277. X            regs.h.ah = 0x44;    /* ioctl */
  2278. X            regs.h.al = 1;        /* set device info */
  2279. X            intdos(®s, ®s);
  2280. X        }
  2281. X#endif
  2282. X#endif
  2283. X    }
  2284. X}
  2285. X#endif
  2286. X
  2287. X#ifdef vms
  2288. X/* these are needed to modify terminal characteristics */
  2289. X#include <descrip.h>
  2290. X#include <iodef.h>
  2291. X#include <ttdef.h>
  2292. X#include <tt2def.h>
  2293. X#include <dcdef.h>
  2294. X#include <ssdef.h>
  2295. X#include <stat.h>
  2296. X#include <fab.h>
  2297. Xstatic unsigned short   chan;
  2298. Xstatic int  old_char_buf[3], cur_char_buf[3];
  2299. X$DESCRIPTOR(sysoutput_desc,"SYS$OUTPUT");
  2300. X
  2301. Xchar *vms_init()
  2302. X/*
  2303. X * Determine if we have a regis terminal
  2304. X * and save terminal characteristics
  2305. X*/
  2306. X{
  2307. X   /* Save terminal characteristics in old_char_buf and
  2308. X   initialise cur_char_buf to current settings. */
  2309. X   int i;
  2310. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2311. X   sys$qiow(0,chan,IO$_SENSEMODE,0,0,0,old_char_buf,12,0,0,0,0);
  2312. X   for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
  2313. X   sys$dassgn(chan);
  2314. X
  2315. X   /* Test if terminal is regis */
  2316. X   if ((cur_char_buf[2] & TT2$M_REGIS) == TT2$M_REGIS) return("regis");
  2317. X   return(NULL);
  2318. X}
  2319. X
  2320. Xvoid
  2321. Xvms_reset()
  2322. X/* set terminal to original state */
  2323. X{
  2324. X   int i;
  2325. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2326. X   sys$qiow(0,chan,IO$_SETMODE,0,0,0,old_char_buf,12,0,0,0,0);
  2327. X   for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
  2328. X   sys$dassgn(chan);
  2329. X}
  2330. X
  2331. Xvoid
  2332. Xterm_mode_tek()
  2333. X/* set terminal mode to tektronix */
  2334. X{
  2335. X   long status;
  2336. X   if (outfile != stdout) return; /* don't modify if not stdout */
  2337. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2338. X   cur_char_buf[0] = 0x004A0000 | DC$_TERM | (TT$_TEK401X<<8);
  2339. X   cur_char_buf[1] = (cur_char_buf[1] & 0x00FFFFFF) | 0x18000000;
  2340. X
  2341. X   cur_char_buf[1] &= ~TT$M_CRFILL;
  2342. X   cur_char_buf[1] &= ~TT$M_ESCAPE;
  2343. X   cur_char_buf[1] &= ~TT$M_HALFDUP;
  2344. X   cur_char_buf[1] &= ~TT$M_LFFILL;
  2345. X   cur_char_buf[1] &= ~TT$M_MECHFORM;
  2346. X   cur_char_buf[1] &= ~TT$M_NOBRDCST;
  2347. X   cur_char_buf[1] &= ~TT$M_NOECHO;
  2348. X   cur_char_buf[1] &= ~TT$M_READSYNC;
  2349. X   cur_char_buf[1] &= ~TT$M_REMOTE;
  2350. X   cur_char_buf[1] |= TT$M_LOWER;
  2351. X   cur_char_buf[1] |= TT$M_TTSYNC;
  2352. X   cur_char_buf[1] |= TT$M_WRAP;
  2353. X   cur_char_buf[1] &= ~TT$M_EIGHTBIT;
  2354. X   cur_char_buf[1] &= ~TT$M_MECHTAB;
  2355. X   cur_char_buf[1] &= ~TT$M_SCOPE;
  2356. X   cur_char_buf[1] |= TT$M_HOSTSYNC;
  2357. X
  2358. X   cur_char_buf[2] &= ~TT2$M_APP_KEYPAD;
  2359. X   cur_char_buf[2] &= ~TT2$M_BLOCK;
  2360. X   cur_char_buf[2] &= ~TT2$M_DECCRT3;
  2361. X   cur_char_buf[2] &= ~TT2$M_LOCALECHO;
  2362. X   cur_char_buf[2] &= ~TT2$M_PASTHRU;
  2363. X   cur_char_buf[2] &= ~TT2$M_REGIS;
  2364. X   cur_char_buf[2] &= ~TT2$M_SIXEL;
  2365. X   cur_char_buf[2] |= TT2$M_BRDCSTMBX;
  2366. X   cur_char_buf[2] |= TT2$M_EDITING;
  2367. X   cur_char_buf[2] |= TT2$M_INSERT;
  2368. X   cur_char_buf[2] |= TT2$M_PRINTER;
  2369. X   cur_char_buf[2] &= ~TT2$M_ANSICRT;
  2370. X   cur_char_buf[2] &= ~TT2$M_AVO;
  2371. X   cur_char_buf[2] &= ~TT2$M_DECCRT;
  2372. X   cur_char_buf[2] &= ~TT2$M_DECCRT2;
  2373. X   cur_char_buf[2] &= ~TT2$M_DRCS;
  2374. X   cur_char_buf[2] &= ~TT2$M_EDIT;
  2375. X   cur_char_buf[2] |= TT2$M_FALLBACK;
  2376. X
  2377. X   status = sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
  2378. X   if (status == SS$_BADPARAM) {
  2379. X      /* terminal fallback utility not installed on system */
  2380. X      cur_char_buf[2] &= ~TT2$M_FALLBACK;
  2381. X      sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
  2382. X   }
  2383. X   else {
  2384. X      if (status != SS$_NORMAL)
  2385. X         lib$signal(status,0,0);
  2386. X   }
  2387. X   sys$dassgn(chan);
  2388. X}
  2389. X
  2390. Xvoid
  2391. Xterm_mode_native()
  2392. X/* set terminal mode back to native */
  2393. X{
  2394. X   int i;
  2395. X   if (outfile != stdout) return; /* don't modify if not stdout */
  2396. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2397. X   sys$qiow(0,chan,IO$_SETMODE,0,0,0,old_char_buf,12,0,0,0,0);
  2398. X   for (i = 0 ; i < 3 ; ++i) cur_char_buf[i] = old_char_buf[i];
  2399. X   sys$dassgn(chan);
  2400. X}
  2401. X
  2402. Xvoid
  2403. Xterm_pasthru()
  2404. X/* set terminal mode pasthru */
  2405. X{
  2406. X   if (outfile != stdout) return; /* don't modify if not stdout */
  2407. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2408. X   cur_char_buf[2] |= TT2$M_PASTHRU;
  2409. X   sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
  2410. X   sys$dassgn(chan);
  2411. X}
  2412. X
  2413. Xvoid
  2414. Xterm_nopasthru()
  2415. X/* set terminal mode nopasthru */
  2416. X{
  2417. X   if (outfile != stdout) return; /* don't modify if not stdout */
  2418. X   sys$assign(&sysoutput_desc,&chan,0,0);
  2419. X   cur_char_buf[2] &= ~TT2$M_PASTHRU;
  2420. X   sys$qiow(0,chan,IO$_SETMODE,0,0,0,cur_char_buf,12,0,0,0,0);
  2421. X   sys$dassgn(chan);
  2422. X}
  2423. X
  2424. Xvoid
  2425. Xreopen_binary()
  2426. X/* close the file outfile outfile and reopen it with binary type
  2427. X   if not already done or outfile == stdout */
  2428. X{
  2429. X   stat_t stat_buf;
  2430. X   char filename[MAX_ID_LEN+1];
  2431. X   if (outfile != stdout) { /* don't modify if not stdout */
  2432. X      if (!fstat(fileno(outfile),&stat_buf)) {
  2433. X         if (stat_buf.st_fab_rfm != FAB$C_FIX) {
  2434. X            /* modify only if not already done */
  2435. X            (void) fclose(outfile);
  2436. X            (void) strcpy(filename,outstr+1);   /* remove quotes */
  2437. X            filename[strlen(filename)-1] = '\0';
  2438. X            (void) delete(filename);
  2439. X            if ((outfile = fopen(filename,"wb","rfm=fix","bls=512","mrs=512"))
  2440. X                == (FILE *)NULL ) {
  2441. X               if ( (outfile = fopen(filename,"w")) == (FILE *)NULL ) {
  2442. X                 os_error("cannot reopen file with binary type; output unknown",
  2443. X                           NO_CARET);
  2444. X               }
  2445. X               else {
  2446. X          os_error("cannot reopen file with binary type; output reset to ascii",
  2447. X                           NO_CARET);
  2448. X               }
  2449. X            }
  2450. X         }
  2451. X      }
  2452. X      else{
  2453. X         os_error("cannot reopen file with binary type; output remains ascii",
  2454. X                  NO_CARET);
  2455. X      }
  2456. X   }
  2457. X}
  2458. X
  2459. Xvoid
  2460. Xfflush_binary()
  2461. X{
  2462. X   typedef short int INT16;     /* signed 16-bit integers */
  2463. X   register INT16 k;            /* loop index */
  2464. X   if (outfile != stdout) {
  2465. X       /* Stupid VMS fflush() raises error and loses last data block
  2466. X          unless it is full for a fixed-length record binary file.
  2467. X          Pad it here with NULL characters. */
  2468. X       for (k = (INT16)((*outfile)->_cnt); k > 0; --k)
  2469. X          putc('\0',outfile);
  2470. X       fflush(outfile);
  2471. X   }
  2472. X}
  2473. X#endif
  2474. END_OF_FILE
  2475.   if test 69784 -ne `wc -c <'gnuplot/term.c'`; then
  2476.     echo shar: \"'gnuplot/term.c'\" unpacked with wrong size!
  2477.   fi
  2478.   # end of 'gnuplot/term.c'
  2479. fi
  2480. if test ! -d 'gnuplot/win' ; then
  2481.     echo shar: Creating directory \"'gnuplot/win'\"
  2482.     mkdir 'gnuplot/win'
  2483. fi
  2484. echo shar: End of archive 1 \(of 33\).
  2485. cp /dev/null ark1isdone
  2486. MISSING=""
  2487. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  2488.     if test ! -f ark${I}isdone ; then
  2489.     MISSING="${MISSING} ${I}"
  2490.     fi
  2491. done
  2492. if test "${MISSING}" = "" ; then
  2493.     echo You have unpacked all 33 archives.
  2494.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2495. else
  2496.     echo You still must unpack the following archives:
  2497.     echo "        " ${MISSING}
  2498. fi
  2499. exit 0
  2500. exit 0 # Just in case...
  2501.