head 1.5; access ; symbols ; locks ; comment @ * @; 1.5 date 89.02.23.17.47.26; author pkern; state Exp; branches ; next 1.4; 1.4 date 89.02.03.15.52.09; author pkern; state Exp; branches ; next 1.3; 1.3 date 89.01.31.14.22.09; author pkern; state Exp; branches ; next 1.2; 1.2 date 89.01.31.14.20.33; author pkern; state Exp; branches ; next 1.1; 1.1 date 89.01.31.13.31.53; author pkern; state Exp; branches ; next ; desc @@ 1.5 log @copyright info updated. @ text @/* * misc.c: * misc. strings including keypadv[] and vt100ids[] * * Copyright (c) 1989 University of Toronto. All rights reserved. * Anyone may use or copy this software, except that it may not be * sold for profit, that this copyright notice remain intact, and that * credit is given where it is due. The University of Toronto and the * author make no warranty and accept no liability for this software. */ static char rcsid[] = "$Header: misc.c,v 1.4 89/02/03 15:52:09 pkern Exp $"; #include "cterm.h" char copyright[] = "Copyright (c) 1989 University of Toronto. All rights reserved."; char proginfo[] = "Cterm Version 0.95"; char ansback[33]; /* answerback message */ char *keypadv[0x80] = { /* cursor key & keypad strings */ /* vt52 */ /* normal mode */ /* cursor keys */ "\033A", "\033B", "\033C", "\033D", "", "", "", "", /* keypad */ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", ",", ".", "\r", "\033P", "\033Q", "\033R", "\033S", "\200", "\b", "\003", "\r\n", ansback, "", /* application mode */ /* cursor keys */ "\033A", "\033B", "\033C", "\033D", "", "", "", "", /* keypad */ "\033?p", "\033?q", "\033?r", "\033?s", "\033?t", "\033?u", "\033?v", "\033?w", "\033?x", "\033?y", "\033?m", "\033?l", "\033?n", "\033?M", "\033P", "\033Q", "\033R", "\033S", "\200", "\b", "\003", "\033?M", ansback, "", /* ansi */ /* normal mode */ /* cursor keys */ "\033[A", "\033[B", "\033[C", "\033[D", "", "", "", "", /* keypad */ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "-", ",", ".", "\r", "\033OP", "\033OQ", "\033OR", "\033OS", "\200", "\b", "\003", "\r\n", ansback, "", /* application mode */ /* cursor keys */ "\033OA", "\033OB", "\033OC", "\033OD", "", "", "", "", /* keypad */ "\033Op", "\033Oq", "\033Or", "\033Os", "\033Ot", "\033Ou", "\033Ov", "\033Ow", "\033Ox", "\033Oy", "\033Om", "\033Ol", "\033On", "\033OM", "\033OP", "\033OQ", "\033OR", "\033OS", "\200", "\b", "\003", "\033OM", ansback, "" }; uchar vtidnum = 9; /* vt100ids index (see below) */ char *vt100ids[] = { /* device report terminal ID strings */ /* * strings lifted from vttest's main.c * STP = processor option * PP = printer port * AVO = advanced video option * GPO = graphics processor option */ "\033[?1;0c", /* No options (vanilla VT100) */ /* "\033[?1;1c", /* VT100 with STP */ "\033[?1;2c", /* VT100 with AVO (could be a VT102) */ /* "\033[?1;3c", /* VT100 with STP and AVO */ /* "\033[?1;4c", /* VT100 with GPO */ /* "\033[?1;5c", /* VT100 with STP and GPO */ /* "\033[?1;6c", /* VT100 with AVO and GPO */ /* "\033[?1;7c", /* VT100 with STP, AVO and GPO */ "\033[?1;11c", /* VT100 with PP and AVO */ "\033[?1;15c", /* VT100 with PP, GPO and AVO */ /* "\033[?4;2c", /* VT132 with AVO */ /* "\033[?4;3c", /* VT132 with AVO and STP */ /* "\033[?4;6c", /* VT132 with GPO and AVO */ /* "\033[?4;7c", /* VT132 with GPO, AVO, and STP */ /* "\033[?4;11c", /* VT132 with PP and AVO */ /* "\033[?4;15c", /* VT132 with PP, GPO and AVO */ /* "\033[?7c", /* VT131 */ /* "\033[?12;5c", /* VT125 */ /* "\033[?12;7c", /* VT125 with AVO */ /* "\033[?5;0c", /* VK100 (GIGI) */ /* "\033[?5c", /* VK100 (GIGI) */ "" }; char led[4] = { SP, SP, SP, SP}; /* simulated LEDs */ char *cset, *g0, *g1; /* character set pointers */ /* simulated US ASCII char set */ char *usascii = "\ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\ \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\ !\"#$%&'()*+,-./0123456789:;<=>\ ?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^\ _`abcdefghijklmnopqrstuvwxyz{|}~\177"; /* simulated UK ASCII set */ char *ukascii = "\ \000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\ \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\ !\"#$%&'()*+,-./0123456789:;<=>\ ?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^\ \040\004\261....\370\361..\331\277\332\300\305\304\ \304\304\304_\303\264\301\302\263\363\362\343\330\234\371\177"; /* tab string */ char tabs[133] = { 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,SP,SP,SP,SP,'T',SP,SP,SP,SP,SP,SP,SP, 'T',SP,SP,SP,NUL}; extern uchar m_columns; /* * tab -- return next tab-stop column position (x == current column). */ tab(x) int x; { register int i; i = x-1; if (tabs[i] != SP) i++; while (i+1 < m_columns && tabs[i] == SP) ++i; return(i+1); } /* * vtspeed: return DEC (ANSI?) code for given baudrate */ vtspeed(x) int x; { /* switch (x) { case B0: case B50: x=0; break; case B75: x=8; break; case B110: x=16; break; case B134: x=24; break; case B150: x=32; break; case B200: x=40; break; case B300: x=48; break; case B600: x=56; break; case B1200: x=64; break; case B1800: x=72; break; case B2000: x=80; break; case B2400: x=88; break; case B3600: x=96; break; case B4800: x=104; break; case EXTA: x=120; break; case B9600: default: x=112; break; } */ if (x < B75) return(0); else if (x > B4800) return(112); /* default 9600 */ return((x-1)*8); } @ 1.4 log @*** empty log message *** @ text @d5 5 a9 1 * copyright (c) University of Toronto, 1989. d11 1 a11 1 static char rcsid[] = "$Header: misc.c,v 1.3 89/01/31 14:22:09 pkern Exp $"; d15 5 a19 6 char *NAME = "Cterm"; char *VERS = "Version 0.9"; char *COPY = "copyright (c) 1989"; char *CWHO = "Univ. of Toronto"; char *COPYRIGHT = "Cterm Version 0.9 copyright (c) 1989 University of Toronto"; @ 1.3 log @*** empty log message *** @ text @d7 1 a7 1 static char rcsid[] = "$Header: misc.c,v 1.2 89/01/31 14:20:33 pkern Exp $"; d145 3 a147 1 /* return vt100 speed number */ @ 1.2 log @*** empty log message *** @ text @d5 1 a5 1 * copyright (c) University of Toronto, 1988. d7 1 a7 1 static char rcsid[] = "$Header$"; d9 1 a9 2 char *NAME = "Cterm - copyright (c) 1989 Univ. of Toronto."; char *VERS = "Vers. 0.8"; d11 6 a16 1 #include "common.h" @ 1.1 log @Initial revision @ text @d7 1 a7 1 static char *ID = "misc.c Oct/88 Univ. of Toronto"; @