# VTH library (VTHLIB) definitions define (MAXSCREEN, 4335) define (MAXCOORDTYPE, 6) define (MAXSEQTYPE, 4) define (MAXROWS, 51) define (MAXCOLS, 85) define (MAXSEQ, 12) define (MAXPB, 400) define (MAXDEF, 1000) define (MAXNEST, 20) define (MAXESCAPE, 20) define (untyped, integer) define (SEQSIZE, 6) # character sequence size for cursor control define (send_str (s), { local i; integer i for(i=1;s(i)~=EOS;i+=1) call tnoua(ls(s(i),8),1) }) define (send_char (c), call tnoua(ls(c,8),1)) define (vt$pk (c, scr, row, col), scr (col, row) = c) define (vt$upk (c, scr, row, col), c = scr (col, row)) define (CHARSETSIZE, 128) define (CHARSETBASE, 127) define (DEFINITION, 4000) define (GET_NEXT_TABLE, 5000) define (MOVE_LEFT, 1000) define (TAB_LEFT, 1001) define (SKIP_LEFT, 1002) define (SCAN_LEFT, 1003) define (GOBBLE_LEFT, 1004) define (GOBBLE_TAB_LEFT, 1005) define (KILL_LEFT, 1006) define (GOBBLE_SCAN_LEFT, 1007) define (MOVE_RIGHT, 1008) define (TAB_RIGHT, 1009) define (SKIP_RIGHT, 1010) define (SCAN_RIGHT, 1011) define (GOBBLE_RIGHT, 1012) define (GOBBLE_TAB_RIGHT, 1013) define (KILL_RIGHT, 1014) define (GOBBLE_SCAN_RIGHT, 1015) define (RETURN, 1016) define (KILL_RIGHT_AND_RETURN, 1017) define (FUNNY_RETURN, 1018) define (MOVE_UP, 1019) define (MOVE_DOWN, 1020) define (INSERT_BLANK, 1021) define (INSERT_TAB, 1022) define (INSERT_NEWLINE, 1023) define (TOGGLE_INSERT_MODE, 1024) define (SHIFT_CASE, 1025) define (KILL_ALL, 1026) define (FIX_SCREEN, 1027) define (VTH_ESCAPE, 1028) define (DEFINE, 1029) define (UNDEFINE, 1030) define (TABSET, 1031) define (TABRESET, 1032) define (TABCLEAR, 1033) define (CLEAR_SCREEN, 1) define (CLEAR_TO_EOL, 2) define (CLEAR_TO_EOS, 3) define (CURSOR_HOME, 4) define (CURSOR_LEFT, 5) define (CURSOR_RIGHT, 6) define (CURSOR_UP, 7) define (CURSOR_DOWN, 8) define (ABS_POS, 9) define (VERT_POS, 10) define (HOR_POS, 11) define (COORD_TYPE, 12) define (DELAY_TIME, 13) define (ROWS, 14) define (COLUMNS, 15) define (SHIFT_IN, 16) define (SHIFT_OUT, 17) define (SHIFT_TYPE, 18) define (WRAP_AROUND, 19) define (INSERT_LINE, 20) define (DELETE_LINE, 21) define (INSERT_CHAR, 22) define (DELETE_CHAR, 23) define (INSERT_STRING, 24) define (NOMSG, 0) # values for message owner define (TIME_MSG, -1) define (CHAR_MSG, -2) define (INS_MSG, -3) define (CASE_MSG, -4) define (DEBUG, #) define (bound(a,b,c), max0 (b, min0 (a, c))) include VTH_DEFS