--- /dev/null
+/* Hello, Emacs, this is -*-C-*-
+ * $Id: emxvga.trm,v 1.15 2006/07/21 02:35:46 sfeam Exp $
+ */
+
+/* GNUPLOT - emxvga.trm */
+
+/*[
+ * Copyright 1994, 1998, 2004
+ *
+ * Permission to use, copy, and distribute this software and its
+ * documentation for any purpose with or without fee is hereby granted,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.
+ *
+ * Permission to modify the software is granted, but not the right to
+ * distribute the complete modified source code. Modifications are to
+ * be distributed as patches to the released version. Permission to
+ * distribute binaries produced by compiling modified sources is granted,
+ * provided you
+ * 1. distribute the corresponding source modifications from the
+ * released version in the form of a patch file along with the binaries,
+ * 2. add special version identification to distinguish your version
+ * in addition to the base release version number,
+ * 3. provide your name and address as the primary contact for the
+ * support of your modified version, and
+ * 4. retain our contact information in regard to use of the base
+ * software.
+ * Permission to distribute the released version of the source code along
+ * with corresponding source modifications in the form of a patch file is
+ * granted with same provisions 2 through 4 for binary distributions.
+ *
+ * This software is provided "as is" without express or implied warranty
+ * to the extent permitted by applicable law.
+]*/
+
+/*
+ * This file is included by ../term.c.
+ *
+ * This terminal driver supports:
+ * SVGA 1024x768x256 for PC's running DOS or OS/2
+ *
+ * AUTHOR
+ * David J. Liu (liudj0@minerva.cis.yale.edu)
+ */
+/*
+ * Compile with GCC (emx) with VESA and SVGAKIT maintained by
+ * Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE)
+ * with additions by David J. Liu (liudj0@minerva.cis.yale.edu)
+ * supports VESA, Trident, Cirrus, ET4000, WD and S3.
+ */
+/*
+ * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
+ */
+
+#include "driver.h"
+
+#ifdef TERM_REGISTER
+#ifdef EMXVESA
+register_term(vesa)
+#endif /* EMXVESA */
+register_term(emxvga)
+#endif
+
+#ifdef TERM_PROTO
+TERM_PUBLIC void EMXVGA_init __PROTO((void));
+TERM_PUBLIC void EMXVGA_reset __PROTO((void));
+TERM_PUBLIC void EMXVGA_text __PROTO((void));
+TERM_PUBLIC void EMXVGA_graphics __PROTO((void));
+TERM_PUBLIC void EMXVGA_linetype __PROTO((int));
+TERM_PUBLIC void EMXVGA_move __PROTO((unsigned int, unsigned int));
+TERM_PUBLIC void EMXVGA_vector __PROTO((unsigned int, unsigned int));
+TERM_PUBLIC int EMXVGA_text_angle __PROTO((int));
+TERM_PUBLIC void EMXVGA_put_text __PROTO((unsigned int, unsigned int, const char *));
+#define EMXVGA_VCHAR 8
+#define EMXVGA_HCHAR 8
+#define EMXVGA_VTIC 4
+#define EMXVGA_HTIC 4
+#define EMXVGA_XMAX 0 /* These two entries are just place holders. */
+#define EMXVGA_YMAX 0 /* The actual values will be filled in init. */
+#ifdef EMXVESA
+TERM_PUBLIC void EMXVESA_options __PROTO((void));
+TERM_PUBLIC void EMXVESA_init __PROTO((void));
+TERM_PUBLIC void EMXVESA_graphics __PROTO((void));
+TERM_PUBLIC void EMXVESA_text __PROTO((void));
+TERM_PUBLIC void EMXVESA_reset __PROTO((void));
+#endif
+#endif /* TERM_PROTO */
+#ifndef TERM_PROTO_ONLY
+#ifdef TERM_BODY
+/* avoid name clash with graph.h - lets hope that no following
+ * driver needs these symbols !
+ */
+#ifdef RIGHT
+#undef RIGHT
+#endif
+#ifdef DOWN
+#undef DOWN
+#endif
+#include <vesa.h>
+#include <jmgraph.h>
+#include <conio.h> /* for getch() -SB */
+#include <stdlib.h>
+#include <dos.h>
+/*
+ * Some versions of graph.h (e.g. jmgraph.h) define RIGHT to be 0
+ * colliding with enum JUSTIFY. We don't need this define anyway,
+ * just undef it. -SB
+ */
+#ifdef RIGHT
+#undef RIGHT
+#endif
+#ifdef DOWN
+#undef DOWN
+#endif
+static int EMXVGA_vmode = G640x480x256; /* default mode */
+static int vgacolor[] ={ 7, 8, 2, 3, 4, 5, 9, 14, 12, 15, 13, 10, 11, 1, 6 };
+static int graphics_on = FALSE;
+int startx, starty, lasty;
+int EMXVGA_angle, EMXVGA_color;
+char *EMXVGA_buf;
+
+void
+emx_getch()
+{
+ union REGS reg;
+ char c;
+ if (_osmode == OS2_MODE)
+ VesaGetCharacter(&c);
+ else {
+ reg.x.ax = 0x0000;
+ _int86(0x16, ®, ®);
+ if (reg.h.al == 0) {
+ reg.x.ax = 0x0000;
+ _int86(0x16, ®, ®);
+ }
+ }
+}
+
+/* gstring.c (emx+gcc) -- Copyright (c) 1994 by David J. Liu */
+unsigned char font[128][8] =
+{ /* 8x8 font */
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x7E, 0x81, 0xA5, 0x81, 0xBD, 0x99, 0x81, 0x7E},
+ {0x7E, 0xFF, 0xDB, 0xFF, 0xC3, 0xE7, 0xFF, 0x7E},
+ {0x6C, 0xFE, 0xFE, 0xFE, 0x7C, 0x38, 0x10, 0x00},
+ {0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x10, 0x00},
+ {0x38, 0x7C, 0x38, 0xFE, 0xFE, 0x92, 0x10, 0x7C},
+ {0x00, 0x10, 0x38, 0x7C, 0xFE, 0x7C, 0x38, 0x7C},
+ {0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00},
+ {0xFF, 0xFF, 0xE7, 0xC3, 0xC3, 0xE7, 0xFF, 0xFF},
+ {0x00, 0x3C, 0x66, 0x42, 0x42, 0x66, 0x3C, 0x00},
+ {0xFF, 0xC3, 0x99, 0xBD, 0xBD, 0x99, 0xC3, 0xFF},
+ {0x0F, 0x07, 0x0F, 0x7D, 0xCC, 0xCC, 0xCC, 0x78},
+ {0x3C, 0x66, 0x66, 0x66, 0x3C, 0x18, 0x7E, 0x18},
+ {0x3F, 0x33, 0x3F, 0x30, 0x30, 0x70, 0xF0, 0xE0},
+ {0x7F, 0x63, 0x7F, 0x63, 0x63, 0x67, 0xE6, 0xC0},
+ {0x99, 0x5A, 0x3C, 0xE7, 0xE7, 0x3C, 0x5A, 0x99},
+ {0x80, 0xE0, 0xF8, 0xFE, 0xF8, 0xE0, 0x80, 0x00},
+ {0x02, 0x0E, 0x3E, 0xFE, 0x3E, 0x0E, 0x02, 0x00},
+ {0x18, 0x3C, 0x7E, 0x18, 0x18, 0x7E, 0x3C, 0x18},
+ {0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x00},
+ {0x7F, 0xDB, 0xDB, 0x7B, 0x1B, 0x1B, 0x1B, 0x00},
+ {0x3E, 0x63, 0x38, 0x6C, 0x6C, 0x38, 0x86, 0xFC},
+ {0x00, 0x00, 0x00, 0x00, 0x7E, 0x7E, 0x7E, 0x00},
+ {0x18, 0x3C, 0x7E, 0x18, 0x7E, 0x3C, 0x18, 0xFF},
+ {0x18, 0x3C, 0x7E, 0x18, 0x18, 0x18, 0x18, 0x00},
+ {0x18, 0x18, 0x18, 0x18, 0x7E, 0x3C, 0x18, 0x00},
+ {0x00, 0x18, 0x0C, 0xFE, 0x0C, 0x18, 0x00, 0x00},
+ {0x00, 0x30, 0x60, 0xFE, 0x60, 0x30, 0x00, 0x00},
+ {0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xFE, 0x00, 0x00},
+ {0x00, 0x24, 0x66, 0xFF, 0x66, 0x24, 0x00, 0x00},
+ {0x00, 0x18, 0x3C, 0x7E, 0xFF, 0xFF, 0x00, 0x00},
+ {0x00, 0xFF, 0xFF, 0x7E, 0x3C, 0x18, 0x00, 0x00},
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00},
+ {0x6C, 0x6C, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00},
+ {0x18, 0x7E, 0xC0, 0x7C, 0x06, 0xFC, 0x18, 0x00},
+ {0x00, 0xC6, 0xCC, 0x18, 0x30, 0x66, 0xC6, 0x00},
+ {0x38, 0x6C, 0x38, 0x76, 0xDC, 0xCC, 0x76, 0x00},
+ {0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x18, 0x30, 0x60, 0x60, 0x60, 0x30, 0x18, 0x00},
+ {0x60, 0x30, 0x18, 0x18, 0x18, 0x30, 0x60, 0x00},
+ {0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00},
+ {0x00, 0x18, 0x18, 0x7E, 0x18, 0x18, 0x00, 0x00},
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30},
+ {0x00, 0x00, 0x00, 0x7E, 0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00},
+ {0x06, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0x80, 0x00},
+ {0x7C, 0xCE, 0xDE, 0xF6, 0xE6, 0xC6, 0x7C, 0x00},
+ {0x30, 0x70, 0x30, 0x30, 0x30, 0x30, 0xFC, 0x00},
+ {0x78, 0xCC, 0x0C, 0x38, 0x60, 0xCC, 0xFC, 0x00},
+ {0x78, 0xCC, 0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00},
+ {0x1C, 0x3C, 0x6C, 0xCC, 0xFE, 0x0C, 0x1E, 0x00},
+ {0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 0x78, 0x00},
+ {0x38, 0x60, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00},
+ {0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00},
+ {0x78, 0xCC, 0xCC, 0x78, 0xCC, 0xCC, 0x78, 0x00},
+ {0x78, 0xCC, 0xCC, 0x7C, 0x0C, 0x18, 0x70, 0x00},
+ {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x00},
+ {0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30},
+ {0x18, 0x30, 0x60, 0xC0, 0x60, 0x30, 0x18, 0x00},
+ {0x00, 0x00, 0x7E, 0x00, 0x7E, 0x00, 0x00, 0x00},
+ {0x60, 0x30, 0x18, 0x0C, 0x18, 0x30, 0x60, 0x00},
+ {0x3C, 0x66, 0x0C, 0x18, 0x18, 0x00, 0x18, 0x00},
+ {0x7C, 0xC6, 0xDE, 0xDE, 0xDC, 0xC0, 0x7C, 0x00},
+ {0x30, 0x78, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0x00},
+ {0xFC, 0x66, 0x66, 0x7C, 0x66, 0x66, 0xFC, 0x00},
+ {0x3C, 0x66, 0xC0, 0xC0, 0xC0, 0x66, 0x3C, 0x00},
+ {0xF8, 0x6C, 0x66, 0x66, 0x66, 0x6C, 0xF8, 0x00},
+ {0xFE, 0x62, 0x68, 0x78, 0x68, 0x62, 0xFE, 0x00},
+ {0xFE, 0x62, 0x68, 0x78, 0x68, 0x60, 0xF0, 0x00},
+ {0x3C, 0x66, 0xC0, 0xC0, 0xCE, 0x66, 0x3A, 0x00},
+ {0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00},
+ {0x78, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00},
+ {0x1E, 0x0C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78, 0x00},
+ {0xE6, 0x66, 0x6C, 0x78, 0x6C, 0x66, 0xE6, 0x00},
+ {0xF0, 0x60, 0x60, 0x60, 0x62, 0x66, 0xFE, 0x00},
+ {0xC6, 0xEE, 0xFE, 0xFE, 0xD6, 0xC6, 0xC6, 0x00},
+ {0xC6, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0xC6, 0x00},
+ {0x38, 0x6C, 0xC6, 0xC6, 0xC6, 0x6C, 0x38, 0x00},
+ {0xFC, 0x66, 0x66, 0x7C, 0x60, 0x60, 0xF0, 0x00},
+ {0x7C, 0xC6, 0xC6, 0xC6, 0xD6, 0x7C, 0x0E, 0x00},
+ {0xFC, 0x66, 0x66, 0x7C, 0x6C, 0x66, 0xE6, 0x00},
+ {0x7C, 0xC6, 0xE0, 0x78, 0x0E, 0xC6, 0x7C, 0x00},
+ {0xFC, 0xB4, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00},
+ {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xFC, 0x00},
+ {0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00},
+ {0xC6, 0xC6, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00},
+ {0xC6, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0xC6, 0x00},
+ {0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x78, 0x00},
+ {0xFE, 0xC6, 0x8C, 0x18, 0x32, 0x66, 0xFE, 0x00},
+ {0x78, 0x60, 0x60, 0x60, 0x60, 0x60, 0x78, 0x00},
+ {0xC0, 0x60, 0x30, 0x18, 0x0C, 0x06, 0x02, 0x00},
+ {0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x00},
+ {0x10, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF},
+ {0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x00, 0x78, 0x0C, 0x7C, 0xCC, 0x76, 0x00},
+ {0xE0, 0x60, 0x60, 0x7C, 0x66, 0x66, 0xDC, 0x00},
+ {0x00, 0x00, 0x78, 0xCC, 0xC0, 0xCC, 0x78, 0x00},
+ {0x1C, 0x0C, 0x0C, 0x7C, 0xCC, 0xCC, 0x76, 0x00},
+ {0x00, 0x00, 0x78, 0xCC, 0xFC, 0xC0, 0x78, 0x00},
+ {0x38, 0x6C, 0x64, 0xF0, 0x60, 0x60, 0xF0, 0x00},
+ {0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8},
+ {0xE0, 0x60, 0x6C, 0x76, 0x66, 0x66, 0xE6, 0x00},
+ {0x30, 0x00, 0x70, 0x30, 0x30, 0x30, 0x78, 0x00},
+ {0x0C, 0x00, 0x1C, 0x0C, 0x0C, 0xCC, 0xCC, 0x78},
+ {0xE0, 0x60, 0x66, 0x6C, 0x78, 0x6C, 0xE6, 0x00},
+ {0x70, 0x30, 0x30, 0x30, 0x30, 0x30, 0x78, 0x00},
+ {0x00, 0x00, 0xCC, 0xFE, 0xFE, 0xD6, 0xD6, 0x00},
+ {0x00, 0x00, 0xB8, 0xCC, 0xCC, 0xCC, 0xCC, 0x00},
+ {0x00, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00},
+ {0x00, 0x00, 0xDC, 0x66, 0x66, 0x7C, 0x60, 0xF0},
+ {0x00, 0x00, 0x76, 0xCC, 0xCC, 0x7C, 0x0C, 0x1E},
+ {0x00, 0x00, 0xDC, 0x76, 0x62, 0x60, 0xF0, 0x00},
+ {0x00, 0x00, 0x7C, 0xC0, 0x70, 0x1C, 0xF8, 0x00},
+ {0x10, 0x30, 0xFC, 0x30, 0x30, 0x34, 0x18, 0x00},
+ {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0xCC, 0x76, 0x00},
+ {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x00},
+ {0x00, 0x00, 0xC6, 0xC6, 0xD6, 0xFE, 0x6C, 0x00},
+ {0x00, 0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00},
+ {0x00, 0x00, 0xCC, 0xCC, 0xCC, 0x7C, 0x0C, 0xF8},
+ {0x00, 0x00, 0xFC, 0x98, 0x30, 0x64, 0xFC, 0x00},
+ {0x1C, 0x30, 0x30, 0xE0, 0x30, 0x30, 0x1C, 0x00},
+ {0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00},
+ {0xE0, 0x30, 0x30, 0x1C, 0x30, 0x30, 0xE0, 0x00},
+ {0x76, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
+ {0x00, 0x10, 0x38, 0x6C, 0xC6, 0xC6, 0xFE, 0x00}
+};
+
+void g_set(int x, int y, int color); /* part of SVGA */
+
+void
+g_string(int x0, int y0, int color, int angle, char *s)
+{
+ int i, j, k;
+ float sa, ca, x, y;
+ k = 0;
+ x = 0.5 + x0;
+ y = 0.5 + y0;
+ sa = sin(- DEG2RAD * angle);
+ ca = cos(DEG2RAD * angle);
+ while (s[k]) {
+ for (i = 0; i < 8; i++)
+ for (j = 0; j < 8; j++)
+ g_set(x + ca * j - sa * i, y + ca * i + sa * j, (font[(int) s[k]][i] & (1 << (7 - j))) ? color : 0);
+ k++;
+ x += ca * 8;
+ y += sa * 8;
+ }
+}
+
+/* end of gstring.c */
+
+TERM_PUBLIC void
+EMXVGA_init()
+{
+ if (!g_mode(EMXVGA_vmode)) {
+ fputs("Unable to initiate graphics.\n", stderr);
+ return;
+ }
+ term->xmax = g_xsize;
+ term->ymax = g_ysize;
+ lasty = g_ysize - 1;
+}
+
+TERM_PUBLIC void
+EMXVGA_reset()
+{
+ g_mode(GTEXT);
+ graphics_on = FALSE;
+}
+
+TERM_PUBLIC void
+EMXVGA_text()
+{
+ if (graphics_on) {
+ emx_getch();
+ g_mode(GTEXT);
+ graphics_on = FALSE;
+ }
+}
+
+TERM_PUBLIC void
+EMXVGA_graphics()
+{
+ if (!graphics_on) {
+ g_mode(EMXVGA_vmode);
+ graphics_on = TRUE;
+ }
+}
+
+TERM_PUBLIC void
+EMXVGA_linetype(int linetype)
+{
+ EMXVGA_color = vgacolor[(linetype % 13) + 2];
+}
+
+TERM_PUBLIC void
+EMXVGA_move(unsigned int x, unsigned int y)
+{
+ startx = x;
+ starty = y;
+}
+
+TERM_PUBLIC void
+EMXVGA_vector(unsigned int x, unsigned int y)
+{
+ g_line(startx, lasty - starty, x, lasty - y, EMXVGA_color);
+ startx = x;
+ starty = y;
+}
+
+TERM_PUBLIC int
+EMXVGA_text_angle(int ang)
+{
+ EMXVGA_angle = (ang ? 90 : 0);
+ return (TRUE);
+}
+
+TERM_PUBLIC void
+EMXVGA_put_text(unsigned int x, unsigned int y, const char *str)
+{
+ g_string(x, lasty - y - 3, EMXVGA_color, EMXVGA_angle, str);
+}
+
+TERM_PUBLIC void
+EMXVGA_suspend()
+{
+ if (EMXVGA_buf)
+ free(EMXVGA_buf); /* do this just for safety */
+ EMXVGA_buf = (char *) malloc(g_memsize);
+ g_save(EMXVGA_buf);
+ emx_getch();
+ g_mode(GTEXT);
+}
+
+TERM_PUBLIC void
+EMXVGA_resume()
+{
+ g_mode(EMXVGA_vmode);
+ g_restore(EMXVGA_buf);
+ free(EMXVGA_buf);
+}
+
+#ifdef EMXVESA
+int emx_vesamode = G640x480x256;
+int emx_xlast, emx_ylast;
+TERM_PUBLIC void
+EMXVESA_options()
+{
+ if (!END_OF_COMMAND) {
+ if (almost_equals(c_token, "d$efault")) {
+ emx_vesamode = G640x480x256;
+ c_token++;
+ }
+ }
+ if (!END_OF_COMMAND) {
+ /* We have a vesa mode specified */
+ struct value a;
+ emx_vesamode = (int) real(const_express(&a));
+ }
+ sprintf(term_options, "%d", emx_vesamode);
+}
+
+TERM_PUBLIC void
+EMXVESA_init()
+{
+ if (!g_mode(emx_vesamode))
+ int_error(NO_CARET, "Couldn't select graphics mode");
+ emx_xlast = g_xsize - 1;
+ term->xmax = emx_xlast + 1;
+ emx_ylast = g_ysize - 1;
+ term->ymax = emx_ylast + 1;
+ g_mode(GTEXT);
+}
+
+TERM_PUBLIC void
+EMXVESA_graphics()
+{
+ g_mode(emx_vesamode);
+}
+
+TERM_PUBLIC void
+EMXVESA_text()
+{
+ int ch;
+ ch = getch();
+ g_mode(GTEXT);
+ if (ch == 3)
+ int_error(NO_CARET, "Interrupt");
+}
+
+TERM_PUBLIC void
+EMXVESA_reset()
+{
+}
+
+#endif /* VESA */
+#endif /* TERM_BODY */
+
+#ifdef TERM_TABLE
+#ifdef EMXVESA
+TERM_TABLE_START(vesa_driver)
+ "vesa", "IBM PC/Clone with VESA SVGA graphics board [vesa mode]",
+ EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR,
+ EMXVGA_VTIC, EMXVGA_HTIC, EMXVESA_options, EMXVESA_init, EMXVESA_reset,
+ EMXVESA_text, null_scale, EMXVESA_graphics, EMXVGA_move, EMXVGA_vector,
+ EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle,
+ null_justify_text, do_point, do_arrow, set_font_null
+TERM_TABLE_END(vesa_driver)
+
+#undef LAST_TERM
+#define LAST_TERM vesa_driver
+
+#endif /* VESA */
+
+TERM_TABLE_START(emxvga_driver)
+ "emxvga", "PC with VGA running DOS or OS/2",
+ EMXVGA_XMAX, EMXVGA_YMAX, EMXVGA_VCHAR, EMXVGA_HCHAR,
+ EMXVGA_VTIC, EMXVGA_HTIC, options_null, EMXVGA_init, EMXVGA_reset,
+ EMXVGA_text, null_scale, EMXVGA_graphics, EMXVGA_move,
+ EMXVGA_vector, EMXVGA_linetype, EMXVGA_put_text, EMXVGA_text_angle,
+ null_justify_text, do_point, do_arrow, set_font_null,
+ 0, /* pointsize */
+ TERM_CAN_MULTIPLOT, EMXVGA_suspend, EMXVGA_resume
+TERM_TABLE_END(emxvga_driver)
+
+#undef LAST_TERM
+#define LAST_TERM emxvga_driver
+
+#endif /* TERM_TABLE */
+#endif /* TERM_PROTO_ONLY */
+#ifdef TERM_HELP
+START_HELP(emxvga)
+"1 emxvga",
+"?commands set terminal emxvga",
+"?set terminal emxvga",
+"?set term emxvga",
+"?terminal emxvga",
+"?term emxvga",
+"?emxvga",
+"?commands set terminal emxvesa",
+"?set terminal emxvesa",
+"?set term emxvesa",
+"?terminal emxvesa",
+"?term emxvesa",
+"?emxvesa",
+"?commands set terminal vgal",
+"?set terminal vgal",
+"?set term vgal",
+"?terminal vgal",
+"?term vgal",
+"?vgal",
+" The `emxvga`, `emxvesa` and `vgal` terminal drivers support PCs with SVGA,",
+" vesa SVGA and VGA graphics boards, respectively. They are intended to be",
+" compiled with \"emx-gcc\" under either DOS or OS/2. They also need VESA and",
+" SVGAKIT maintained by Johannes Martin (JMARTIN@GOOFY.ZDV.UNI-MAINZ.DE) with",
+" additions by David J. Liu (liu@phri.nyu.edu).",
+"",
+" Syntax:",
+" set terminal emxvga",
+" set terminal emxvesa {vesa-mode}",
+" set terminal vgal",
+"",
+" The only option is the vesa mode for `emxvesa`, which defaults to G640x480x256."
+END_HELP(emxvga)
+#endif /* TERM_HELP */