Icons are changed
[gnuplot] / term / tek.trm
1 /* Hello, Emacs, this is -*-C-*-
2  * $Id: tek.trm,v 1.18.2.1 2009/08/14 01:23:06 sfeam Exp $
3  *
4  */
5
6 /* GNUPLOT - tek.trm */
7
8 /*[
9  * Copyright 1990 - 1993, 1998, 2004
10  *
11  * Permission to use, copy, and distribute this software and its
12  * documentation for any purpose with or without fee is hereby granted,
13  * provided that the above copyright notice appear in all copies and
14  * that both that copyright notice and this permission notice appear
15  * in supporting documentation.
16  *
17  * Permission to modify the software is granted, but not the right to
18  * distribute the complete modified source code.  Modifications are to
19  * be distributed as patches to the released version.  Permission to
20  * distribute binaries produced by compiling modified sources is granted,
21  * provided you
22  *   1. distribute the corresponding source modifications from the
23  *    released version in the form of a patch file along with the binaries,
24  *   2. add special version identification to distinguish your version
25  *    in addition to the base release version number,
26  *   3. provide your name and address as the primary contact for the
27  *    support of your modified version, and
28  *   4. retain our contact information in regard to use of the base
29  *    software.
30  * Permission to distribute the released version of the source code along
31  * with corresponding source modifications in the form of a patch file is
32  * granted with same provisions 2 through 4 for binary distributions.
33  *
34  * This software is provided "as is" without express or implied warranty
35  * to the extent permitted by applicable law.
36 ]*/
37
38 /*
39  * This file is included by ../term.c.
40  *
41  * This terminal driver supports:
42  *  tek40xx, bitgraph, kermit_color_tek40xx, kermit_mono_tek40xx, selanar
43  *  ln03plus, xterm
44  *
45  * AUTHORS
46  *   Colin Kelley, Thomas Williams, Russell Lang
47  *
48  * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
49  *
50  */
51
52 /*
53  * Modified June 1995 Ian MacPhedran to support newterm format
54  */
55 #define TEK
56 #define CTEK
57 #define VTTEK
58 #define KERMIT
59 #define SELANAR
60 #define BITGRAPH
61 #define XTERM
62
63 #include "driver.h"
64
65 #ifdef TERM_REGISTER
66 register_term(tek40)
67 #ifdef VTTEK
68 register_term(vttek)
69 #endif
70 #ifdef KERMIT
71 register_term(kc_tek40)
72 register_term(km_tek40)
73 #endif
74 #ifdef SELANAR
75 register_term(selanar)
76 #endif
77 #ifdef BITGRAPH
78 register_term(bitgraph)
79 #endif
80 #ifdef XTERM
81 register_term(xterm)
82 #endif
83 #endif /* TERM_REGISTER */
84
85 #ifdef TERM_PROTO
86 TERM_PUBLIC void TEK40init __PROTO((void));
87 TERM_PUBLIC void TEK40graphics __PROTO((void));
88 TERM_PUBLIC void TEK40text __PROTO((void));
89 TERM_PUBLIC void TEK40linetype __PROTO((int linetype));
90 TERM_PUBLIC void TEK40move __PROTO((unsigned int x, unsigned int y));
91 TERM_PUBLIC void TEK40vector __PROTO((unsigned int x, unsigned int y));
92 TERM_PUBLIC void TEK40put_text __PROTO((unsigned int x, unsigned int y, const char str[]));
93 TERM_PUBLIC void TEK40reset __PROTO((void));
94 TERM_PUBLIC void BG_text __PROTO((void));
95 TERM_PUBLIC void BG_put_text __PROTO((unsigned int x, unsigned int y, const char str[]));
96 TERM_PUBLIC void KTEK40graphics __PROTO((void));
97 TERM_PUBLIC void KTEK40Ctext __PROTO((void));
98 TERM_PUBLIC void KTEK40Clinetype __PROTO((int linetype));
99 TERM_PUBLIC void KTEK40Mlinetype __PROTO((int linetype));
100 TERM_PUBLIC void KTEK40reset __PROTO((void));
101 TERM_PUBLIC void SEL_init __PROTO((void));
102 TERM_PUBLIC void SEL_graphics __PROTO((void));
103 TERM_PUBLIC void SEL_text __PROTO((void));
104 TERM_PUBLIC void SEL_reset __PROTO((void));
105 TERM_PUBLIC void VTTEK40init __PROTO((void));
106 TERM_PUBLIC void VTTEK40reset __PROTO((void));
107 TERM_PUBLIC void VTTEK40linetype __PROTO((int linetype));
108 TERM_PUBLIC void VTTEK40put_text __PROTO((unsigned int x, unsigned int y, const char str[]));
109 TERM_PUBLIC void CTEK_linetype __PROTO((int linetype));
110 TERM_PUBLIC void CTEK_move __PROTO((unsigned int x, unsigned int y));
111 TERM_PUBLIC void CTEK_vector __PROTO((unsigned int x, unsigned int y));
112 TERM_PUBLIC void XTERM_graphics __PROTO((void));
113 TERM_PUBLIC void XTERM_resume __PROTO((void));
114 TERM_PUBLIC void XTERM_text __PROTO((void));
115 TERM_PUBLIC int  XTERM_set_font __PROTO((const char * fontname));
116
117 #endif /* TERM_PROTO */
118
119 #ifndef TERM_PROTO_ONLY
120 #ifdef TERM_BODY
121
122 #ifdef TEK
123
124 #define TEK40XMAX 1024
125 #define TEK40YMAX 780
126
127 #define TEK40XLAST (TEK40XMAX - 1)
128 #define TEK40YLAST (TEK40YMAX - 1)
129
130 #define TEK40VCHAR              25
131 #define TEK40HCHAR              14
132 #define TEK40VTIC               11
133 #define TEK40HTIC               11
134
135 #define HX 0x20                 /* bit pattern to OR over 5-bit data */
136 #define HY 0x20
137 #define LX 0x40
138 #define LY 0x60
139
140 #define LOWER5 31
141 #define UPPER5 (31<<5)
142
143
144 TERM_PUBLIC void
145 TEK40init()
146 {
147 }
148
149
150 TERM_PUBLIC void
151 TEK40graphics()
152 {
153 #ifdef VMS
154     term_pasthru();
155 #endif /* VMS */
156     fputs("\033\014", gpoutfile);
157 /*                   1
158         1. clear screen
159 */
160     (void) fflush(gpoutfile);
161     sleep(1);
162     /* sleep 1 second to allow screen time to clear on real
163        tektronix terminals */
164 }
165
166 TERM_PUBLIC void
167 TEK40text()
168 {
169 #ifdef VMS
170     (void) fflush(gpoutfile);   /* finish the graphics */
171 #endif
172     TEK40move(0, 12);
173     fputs("\037", gpoutfile);
174 /*                   1
175         1. into alphanumerics
176 */
177 #ifdef VMS
178     term_nopasthru();
179 #endif /* VMS */
180 }
181
182
183 TERM_PUBLIC void
184 TEK40linetype(int linetype)
185 {
186     (void) linetype;
187 }
188
189 TERM_PUBLIC void
190 TEK40move(unsigned int x, unsigned int y)
191 {
192     (void) putc('\035', gpoutfile);     /* into graphics */
193     TEK40vector(x, y);
194 }
195
196
197 TERM_PUBLIC void
198 TEK40vector(unsigned int x, unsigned int y)
199 {
200     (void) putc((HY | (y & UPPER5) >> 5), gpoutfile);
201     (void) putc((LY | (y & LOWER5)), gpoutfile);
202     (void) putc((HX | (x & UPPER5) >> 5), gpoutfile);
203     (void) putc((LX | (x & LOWER5)), gpoutfile);
204 }
205
206
207 TERM_PUBLIC void
208 TEK40put_text(unsigned int x, unsigned int y, const char str[])
209 {
210     TEK40move(x, y - 11);
211     fprintf(gpoutfile, "\037%s\n", str);
212 }
213
214
215 TERM_PUBLIC void
216 TEK40reset()
217 {
218 }
219
220 #endif /* TEK */
221
222
223 /* thanks to dukecdu!evs (Ed Simpson) for the BBN BitGraph driver */
224
225 #ifdef BITGRAPH
226
227 #define BG_XMAX                         768     /* width of plot area */
228 #define BG_YMAX                         768     /* height of plot area */
229 #define BG_SCREEN_HEIGHT        1024    /* full screen height */
230
231 #define BG_XLAST         (BG_XMAX - 1)
232 #define BG_YLAST         (BG_YMAX - 1)
233
234 #define BG_VCHAR        16
235 #define BG_HCHAR         9
236 #define BG_VTIC          8
237 #define BG_HTIC          8
238
239
240 #define BG_init TEK40init
241
242 #define BG_graphics TEK40graphics
243
244
245 #define BG_linetype TEK40linetype
246
247 #define BG_move TEK40move
248
249 #define BG_vector TEK40vector
250
251
252 TERM_PUBLIC void
253 BG_text()
254 {
255 #ifdef VMS
256     (void) fflush(gpoutfile);   /* finish the graphics */
257 #endif
258     BG_move(0, BG_SCREEN_HEIGHT - 2 * BG_VCHAR);
259     fputs("\037", gpoutfile);
260 /*                   1
261         1. into alphanumerics
262 */
263 }
264
265
266 TERM_PUBLIC void
267 BG_put_text(unsigned int x, unsigned int y, const char str[])
268 {
269     BG_move(x, y - 11);
270     fprintf(gpoutfile, "\037%s\n", str);
271 }
272
273
274 #define BG_reset TEK40reset
275
276 #endif /* BITGRAPH */
277
278
279 /* Color and Monochrome specials for the MS-DOS Kermit Tektronix Emulator
280    by Russell Lang,  eln272v@monu1.cc.monash.oz  */
281
282 #ifdef KERMIT
283
284 #define KTEK40HCHAR             13
285
286 TERM_PUBLIC void
287 KTEK40graphics()
288 {
289 #ifdef VMS
290     term_mode_tek();
291     term_pasthru();
292 #endif /* VMS */
293     fputs("\033\014", gpoutfile);
294 /*                   1
295         1. clear screen
296 */
297     /* kermit tektronix emulation doesn't need to wait */
298 }
299
300 TERM_PUBLIC void
301 KTEK40Ctext()
302 {
303     TEK40text();
304     KTEK40Clinetype(0);         /* change to green */
305 #ifdef VMS
306     term_nopasthru();
307 #endif /* VMS */
308 }
309
310 /* special color linetypes for MS-DOS Kermit v2.31 tektronix emulator */
311 /*      0 = normal, 1 = bright
312         foreground color (30-37) = 30 + colors
313                 where colors are   1=red, 2=green, 4=blue */
314 static const char *kermit_color[15] =
315 {"\033[0;37m", "\033[1;30m",
316  "\033[0;32m", "\033[0;36m", "\033[0;31m", "\033[0;35m",
317  "\033[1;34m", "\033[1;33m", "\033[1;31m", "\033[1;37m",
318  "\033[1;35m", "\033[1;32m", "\033[1;36m", "\033[0;34m",
319  "\033[0;33m"};
320
321 TERM_PUBLIC void
322 KTEK40Clinetype(int linetype)
323 {
324     if (linetype < -2)
325         linetype = LT_BLACK;
326     if (linetype >= 13)
327         linetype %= 13;
328     fprintf(gpoutfile, "%s", kermit_color[linetype + 2]);
329 }
330
331
332 /* linetypes for MS-DOS Kermit v2.30 tektronix emulator */
333 /* `=solid, a=fine dots, b=short dashes, c=dash dot,
334    d=long dash dot, e=dash dot dot */
335 static const char *kerm_linetype = "`a`abcde";
336
337 TERM_PUBLIC void
338 KTEK40Mlinetype(int linetype)
339 {
340     if (linetype < -2)
341         linetype = LT_BLACK;
342     if (linetype >= 6)
343         linetype %= 6;
344     fprintf(gpoutfile, "\033%c", kerm_linetype[linetype + 2]);
345 }
346
347 TERM_PUBLIC void
348 KTEK40reset()
349 {
350     fputs("\030\n", gpoutfile); /* turn off Tek emulation */
351 #ifdef VMS
352     term_mode_native();
353 #endif /* VMS */
354 }
355
356 #endif /* KERMIT */
357
358
359 /* thanks to sask!macphed (Geoff Coleman and Ian Macphedran) for the
360    Selanar driver */
361
362 #ifdef SELANAR
363
364 TERM_PUBLIC void
365 SEL_init()
366 {
367     fputs("\033\062", gpoutfile);
368 /*                                      1
369         1. set to ansi mode
370 */
371 }
372
373
374 TERM_PUBLIC void
375 SEL_graphics()
376 {
377     fputs("\033[H\033[J\033\061\033\014", gpoutfile);
378 /*                   1           2       3
379         1. clear ANSI screen
380         2. set to TEK mode
381         3. clear screen
382 */
383 #ifdef VMS
384     term_pasthru();
385 #endif /* VMS */
386 }
387
388
389 TERM_PUBLIC void
390 SEL_text()
391 {
392 #ifdef VMS
393     (void) fflush(gpoutfile);   /* finish the graphics */
394 #endif
395     TEK40move(0, 12);
396     fputs("\033\062", gpoutfile);
397 /*                   1
398         1. into ANSI mode
399 */
400 #ifdef VMS
401     term_nopasthru();
402 #endif /* VMS */
403 }
404
405 TERM_PUBLIC void
406 SEL_reset()
407 {
408     fputs("\033\061\033\012\033\062\033[H\033[J", gpoutfile);
409 /*                   1        2       3      4
410 1       set tek mode
411 2       clear screen
412 3       set ansi mode
413 4       clear screen
414 */
415 }
416
417 #endif /* SELANAR */
418
419 #ifdef VTTEK
420
421 TERM_PUBLIC void
422 VTTEK40init()
423 {
424     fputs("\033[?38h", gpoutfile);
425     fflush(gpoutfile);
426     sleep(1);
427     /* sleep 1 second to allow screen time to clear on some terminals */
428 #ifdef VMS
429     term_mode_tek();
430 #endif /* VMS */
431 }
432
433 TERM_PUBLIC void
434 VTTEK40reset()
435 {
436     fputs("\033[?38l", gpoutfile);
437     fflush(gpoutfile);
438     sleep(1);
439     /* sleep 1 second to allow screen time to clear on some terminals */
440 #ifdef VMS
441     term_mode_native();
442 #endif /* VMS */
443 }
444
445 /* linetypes for VT-type terminals in tektronix emulator mode */
446 /* `=solid, a=fine dots, b=short dashes, c=dash dot,
447    d=long dash dot, h=bold solid, i=bold fine dots, j=bold short dashes,
448    k=bold dash dot, l=bold long dash dot */
449 static const char *vt_linetype = "`a`abcdhijkl";
450 static int last_vt_linetype = 0;
451
452 TERM_PUBLIC void
453 VTTEK40linetype(int linetype)
454 {
455     if (linetype < -2)
456         linetype = LT_BLACK;
457     if (linetype >= 10)
458         linetype %= 10;
459     fprintf(gpoutfile, "\033%c", vt_linetype[linetype + 2]);
460     last_vt_linetype = linetype;
461 }
462
463 TERM_PUBLIC void
464 VTTEK40put_text(unsigned int x, unsigned int y, const char str[])
465 {
466     int linetype;
467     linetype = last_vt_linetype;
468     VTTEK40linetype(0);
469     TEK40put_text(x, y, str);
470     VTTEK40linetype(linetype);
471 }
472
473 #endif /* VTTEK */
474
475 #ifdef LN03P
476
477 TERM_PUBLIC void
478 LN03Pinit()
479 {
480     fputs("\033[?38h", gpoutfile);
481 }
482
483 TERM_PUBLIC void
484 LN03Preset()
485 {
486     fputs("\033[?38l", gpoutfile);
487 }
488
489 #endif /* LN03P */
490
491
492
493 /* tek40xx (monochrome) with linetype support by Jay I. Choe */
494 #ifdef CTEK
495
496 /*#define ABS(A) (((A)>=0)? (A):-(A))*/
497 #define SIGN(A) (((A) >= 0)? 1:-1)
498
499 static void CT_solid_vector __PROTO((int x, int y));
500 static void CT_draw_vpoint __PROTO((int x, int y, int last));
501 static void CT_pattern_vector __PROTO((int x1, int y1));
502
503 /* CT_lines are line types defined as bit pattern */
504 static unsigned long CT_lines[] =
505 {~(unsigned long)0,                     /* solid line */
506  0x000fffff,                    /* long dash */
507  0x00ff00ff,                    /* short dash */
508  0x00f00fff,                    /* dash-dot */
509  0x00f07fff,                    /* long dash - dot */
510  0x07070707,
511  0x07ff07ff,
512  0x070707ff};
513
514 /* current line pattern */
515 static unsigned long *CT_pattern = &CT_lines[0];
516
517 /* we need to keep track of tek cursor location */
518 static int CT_last_linetype = 0, CT_last_x, CT_last_y;
519
520 TERM_PUBLIC void
521 CTEK_linetype(int linetype)
522 {
523     if (linetype < 0)
524         linetype = 0;
525     linetype %= (sizeof(CT_lines) / sizeof(unsigned long));
526     CT_pattern = &CT_lines[linetype];
527     CT_last_linetype = linetype;
528 }
529
530 TERM_PUBLIC void
531 CTEK_move(unsigned int x, unsigned int y)
532 {
533     TEK40move(x, y);
534     CT_last_x = x;
535     CT_last_y = y;
536 }
537
538 static void
539 CT_solid_vector(int x, int y)
540 {
541     TEK40vector(x, y);
542     CT_last_x = x;
543     CT_last_y = y;
544 }
545
546 /*
547    simulate pixel draw using tek vector draw.
548    delays actual line drawing until maximum line segment is determined
549    (or first/last point is defined)
550 */
551 static int CT_penon = 0;        /* is Pen on? */
552
553 static void
554 CT_draw_vpoint(int x, int y, int last)
555 {
556     static int xx0, yy0, xx1, yy1;
557
558     if ((*CT_pattern) & 1) {
559         if (CT_penon) {         /* This point is a continuation of current line */
560             xx1 = x;
561             yy1 = y;
562         } else {                /* beginning of new line */
563             xx0 = xx1 = x;
564             yy0 = yy1 = y;
565             CT_penon = 1;
566         }
567         *CT_pattern = ((*CT_pattern) >> 1) | ((unsigned long)1 << 31);  /* rotate the pattern */
568         if (last) {             /* draw the line anyway if this is the last point */
569             TEK40move(xx0, yy0);
570             TEK40vector(xx1, yy1);
571             CT_penon = 0;
572         }
573     } else {                    /* do not draw this pixel */
574         if (CT_penon) {         /* last line segment ended at the previous pixel. */
575             /* draw the line */
576             TEK40move(xx0, yy0);
577             TEK40vector(xx1, yy1);
578             CT_penon = 0;
579         }
580         *CT_pattern = (*CT_pattern) >> 1;       /* rotate the current pattern */
581     }
582 }
583
584 /*
585    draw vector line with pattern
586 */
587
588 static void
589 CT_pattern_vector(int x1, int y1)
590 {
591     int op;                     /* order parameter */
592     int x0 = CT_last_x;
593     int y0 = CT_last_y;
594     int dx = x1 - x0;
595     int dy = y1 - y0;
596     int ax = ABS(dx) << 1;
597     int ay = ABS(dy) << 1;
598     int sx = SIGN(dx);
599     int sy = SIGN(dy);
600
601     if (ax >= ay) {
602         for (op = ay - (ax >> 1); x0 != x1; x0 += sx, op += ay) {
603             CT_draw_vpoint(x0, y0, 0);
604             if (op > 0 || (op == 0 && sx == 1)) {
605                 op -= ax;
606                 y0 += sy;
607             }
608         }
609     } else {                    /* ax < ay */
610         for (op = ax - (ay >> 1); y0 != y1; y0 += sy, op += ax) {
611             CT_draw_vpoint(x0, y0, 0);
612             if (op > 0 || (op == 0 && sy == 1)) {
613                 op -= ay;
614                 x0 += sx;
615             }
616         }
617     }
618     CT_draw_vpoint(x0, y0, 1);  /* last point */
619     CT_last_x = x1;
620     CT_last_y = y1;
621 }
622
623 TERM_PUBLIC void
624 CTEK_vector(unsigned int x, unsigned int y)
625 {
626     if (CT_last_linetype <= 0)
627         CT_solid_vector(x, y);
628     else
629         CT_pattern_vector(x, y);
630 }
631
632 #endif /* CTEK */
633
634 #ifdef XTERM
635
636 #define XT_TEK_ESC "\033"
637 #define XT_TEK_GFX XT_TEK_ESC "[?38h"
638 #define XT_TEK_ANSI XT_TEK_ESC "\003"
639 #define XT_TEK_CLR XT_TEK_ESC "\014"
640 #define XT_TEK_ALPHA "\037"
641
642 static const char *xt_tek_fontsize = "89:;";
643
644 TERM_PUBLIC void
645 XTERM_graphics()
646 {
647     XTERM_resume();
648     fputs(XT_TEK_CLR, gpoutfile);
649 }
650
651
652 TERM_PUBLIC void
653 XTERM_resume()
654 {
655     fputs(XT_TEK_GFX, gpoutfile);
656 }
657
658
659 TERM_PUBLIC void
660 XTERM_text()
661 {
662     fputs(XT_TEK_ALPHA XT_TEK_ANSI, gpoutfile);
663 }
664
665
666 TERM_PUBLIC int
667 XTERM_set_font(const char *fontname)
668 {
669     char size = 0;
670     if (fontname) {
671       size_t lp = strlen(fontname);
672       if (lp>0) size = fontname[lp-1]-'1';
673     }
674     fprintf(gpoutfile, XT_TEK_ESC "%c",
675             xt_tek_fontsize[size>0&&size<4?size:0]);
676
677     return(TRUE);
678 }
679
680 #endif /* XTERM */
681 #endif /* TERM_BODY */
682
683 #ifdef TERM_TABLE
684
685 TERM_TABLE_START(tek40_driver)
686 #ifndef CTEK
687     "tek40xx", "Tektronix 4010 and others; most TEK emulators",
688     TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
689     TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset,
690     TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector,
691     TEK40linetype, TEK40put_text, null_text_angle,
692     null_justify_text, line_and_point, do_arrow, set_font_null
693 #else
694     "tek40xx", "Tektronix 4010 and others; most TEK emulators",
695     TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
696     TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset,
697     TEK40text, null_scale, TEK40graphics, CTEK_move, CTEK_vector,
698     CTEK_linetype, TEK40put_text, null_text_angle,
699     null_justify_text, line_and_point, do_arrow, set_font_null
700 #endif /* CTEK */
701 TERM_TABLE_END(tek40_driver)
702
703 #undef LAST_TERM
704 #define LAST_TERM tek40_driver
705
706 #ifdef VTTEK
707 TERM_TABLE_START(vttek_driver)
708     "vttek", "VT-like tek40xx terminal emulator",
709     TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
710     TEK40VTIC, TEK40HTIC, options_null, VTTEK40init, VTTEK40reset,
711     TEK40text, null_scale, TEK40graphics, TEK40move, TEK40vector,
712     VTTEK40linetype, VTTEK40put_text, null_text_angle,
713     null_justify_text, line_and_point, do_arrow, set_font_null
714 TERM_TABLE_END(vttek_driver)
715
716 #undef LAST_TERM
717 #define LAST_TERM vttek_driver
718
719 #endif /* VTTEK */
720
721 #ifdef KERMIT
722 TERM_TABLE_START(kc_tek40_driver)
723    "kc_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - color",
724     TEK40XMAX, TEK40YMAX, TEK40VCHAR, KTEK40HCHAR,
725     TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset,
726     KTEK40Ctext, null_scale, KTEK40graphics, TEK40move, TEK40vector,
727     KTEK40Clinetype, TEK40put_text, null_text_angle,
728     null_justify_text, do_point, do_arrow, set_font_null
729 TERM_TABLE_END(kc_tek40_driver)
730
731 #undef LAST_TERM
732 #define LAST_TERM kc_tek40_driver
733
734 TERM_TABLE_START(km_tek40_driver)
735     "km_tek40xx", "MS-DOS Kermit Tek4010 terminal emulator - monochrome",
736     TEK40XMAX, TEK40YMAX, TEK40VCHAR, KTEK40HCHAR,
737     TEK40VTIC, TEK40HTIC, options_null, TEK40init, KTEK40reset,
738     TEK40text, null_scale, KTEK40graphics, TEK40move, TEK40vector,
739     KTEK40Mlinetype, TEK40put_text, null_text_angle,
740     null_justify_text, line_and_point, do_arrow, set_font_null
741 TERM_TABLE_END(km_tek40_driver)
742
743 #undef LAST_TERM
744 #define LAST_TERM km_tek40_driver
745
746 #endif /* KERMIT */
747
748 #ifdef SELANAR
749 TERM_TABLE_START(selanar_driver)
750     "selanar", "Selanar",
751     TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
752     TEK40VTIC, TEK40HTIC, options_null, SEL_init, SEL_reset,
753     SEL_text, null_scale, SEL_graphics, TEK40move, TEK40vector,
754     TEK40linetype, TEK40put_text, null_text_angle,
755     null_justify_text, line_and_point, do_arrow, set_font_null
756 TERM_TABLE_END(selanar_driver)
757
758 #undef LAST_TERM
759 #define LAST_TERM selanar_driver
760
761 #endif /* SELANAR */
762
763 #ifdef BITGRAPH
764 TERM_TABLE_START(bitgraph_driver)
765     "bitgraph", "BBN Bitgraph Terminal",
766     BG_XMAX, BG_YMAX, BG_VCHAR, BG_HCHAR,
767     BG_VTIC, BG_HTIC, options_null, BG_init, BG_reset,
768     BG_text, null_scale, BG_graphics, BG_move, BG_vector,
769     BG_linetype, BG_put_text, null_text_angle,
770     null_justify_text, line_and_point, do_arrow, set_font_null
771 TERM_TABLE_END(bitgraph_driver)
772
773 #undef LAST_TERM
774 #define LAST_TERM bitgraph_driver
775
776 #endif /* BITGRAPH */
777
778 #ifdef XTERM
779 TERM_TABLE_START(xterm_driver)
780     "xterm", "Xterm Tektronix 4014 Mode",
781     TEK40XMAX, TEK40YMAX, TEK40VCHAR, TEK40HCHAR,
782     TEK40VTIC, TEK40HTIC, options_null, TEK40init, TEK40reset,
783     XTERM_text, null_scale, XTERM_graphics, TEK40move, TEK40vector,
784     VTTEK40linetype, VTTEK40put_text, null_text_angle,
785     null_justify_text, line_and_point, do_arrow, XTERM_set_font, 0,
786     TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE, XTERM_text, XTERM_resume
787 TERM_TABLE_END(xterm_driver)
788
789 #undef LAST_TERM
790 #define LAST_TERM xterm_driver
791
792 #endif /* XTERM */
793
794 #endif /* TERM_TABLE */
795
796 #endif /* TERM_PROTO_ONLY */
797
798 #ifdef TERM_HELP
799 START_HELP(tek40)
800 "1 tek40",
801 "?commands set terminal tek40xx",
802 "?set terminal tek40xx",
803 "?set term tek40xx",
804 "?terminal tek40xx",
805 "?term tek40xx",
806 "?tek40",
807 "?commands set terminal vttek",
808 "?set terminal vttek",
809 "?set term vttek",
810 "?terminal vttek",
811 "?term vttek",
812 "?vttek",
813 "?commands set terminal kc-tek40xx",
814 "?set terminal kc-tek40xx",
815 "?set term kc-tek40xx",
816 "?terminal kc-tek40xx",
817 "?term kc-tek40xx",
818 "?kc-tek40xx",
819 "?commands set terminal km-tek40xx",
820 "?set terminal km-tek40xx",
821 "?set term km-tek40xx",
822 "?terminal km-tek40xx",
823 "?term km-tek40xx",
824 "?km-tek40xx",
825 "?commands set terminal selanar",
826 "?set terminal selanar",
827 "?set term selanar",
828 "?terminal selanar",
829 "?term selanar",
830 "?selanar",
831 "?commands set terminal bitgraph",
832 "?set terminal bitgraph",
833 "?set term bitgraph",
834 "?terminal bitgraph",
835 "?term bitgraph",
836 "?bitgraph",
837 "?commands set terminal xterm",
838 "?set terminal xterm",
839 "?set term xterm",
840 "?terminal xterm",
841 "?term xterm",
842 "?xterm",
843 " This family of terminal drivers supports a variety of VT-like terminals.",
844 " `tek40xx` supports Tektronix 4010 and others as well as most TEK emulators;",
845 " `vttek` supports VT-like tek40xx terminal emulators; `kc-tek40xx` supports",
846 " MS-DOS Kermit Tek4010 terminal emulators in color: `km-tek40xx` supports them",
847 " in monochrome; `selanar` supports Selanar graphics; and `bitgraph` supports",
848 " BBN Bitgraph terminals.  None have any options."
849 END_HELP(tek40)
850 #endif /* TERM_HELP */