home *** CD-ROM | disk | FTP | other *** search
- /* -------------------->>> tvx_glbl.ic <<<----------------------------- */
- /* --------------- TVX global declarations ------------------------ */
-
- /*
- Following trick allows only one file for externals. If EXTERN is not
- defined, then variables are decleared extern. ONE module, tvlex.c,
- defines EXTERN, and thus actually declares things. If you need to
- change one of these values (terminal definition, for example), then
- only tvlex.c needs to be recompiled!
- */
- #ifndef EXTERN
- #define EXTERN extern
- #define USEEXTERN /**/
- #endif
-
- /* constants defined within the next #ifndef area are the important
- system values that define the terminal, margins, etc. ALL variables
- between begpatch and endpatch must be initialized for the MS-DOS cii-86
- compiler to put them all in the same contiguous memory area.
- This allows the tvconfig program to work properly to find the #####:
- patch area patern. This works on the C/80 CP/M version, too, but
- has never been tried on unix since the termcap driver is normally used.
- */
-
- #ifndef USEEXTERN
- EXTERN char begpatch[6] = {'#','#','#','#','#',':'};
-
- #include "tvx_term.ic" /* include terminal definitions */
-
- /* define standard command set */
- EXTERN char lexsym[LEXVALUES+1] = { E0, 'r', 'l', 'd', 'u',
- 4, 21, 8, 'k', 'i', 11, '"', '\'', ',', '.', 'f', 6, 'p',
- 'b', 'e', 2, 'v', 'o', '/', 's', 'g', 23, 25, 24, ';', '&',
- 'm', ':', '=', 7, 9, '{', 'a', 16, '?', 'h', 20, 'c', 'j', 't',
- 'n', 14, 15, 5, 18, '#', '*','(', ')' };
-
- EXTERN char user_set[40] = ""; /* user search set */
- EXTERN char use_wild = 1; /* use wild cards by default */
- EXTERN char old_cmds[16] = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0 };
- EXTERN int old_cindex = 0; /* cursor into old_cmds */
-
- #ifdef MSDOS
- EXTERN char cfgname[40] = "-c=\\bin\\config.tvx";
- #endif
- #ifdef GEMDOS
- EXTERN char cfgname[40] = "-c=config.tvx";
- #endif
- #ifdef UNIX
- EXTERN char cfgname[40] = "-c=config.tvx";
- #endif
- #ifdef OSCPM
- EXTERN char cfgname[40] = "-c=a:config.tvx";
- #endif
- EXTERN int endpatch = 0; /* to get address of end of patch area */
-
- #else
- EXTERN char begpatch[6];
- EXTERN int addx, /* amount to add to get x */
- addy; /* to get y */
- EXTERN char cxychr; /* true if convert xy bin to ascii */
- EXTERN char cversn[12], /* a version to identify config */
- cxy1st, /* l if line first, c if column 1st */
- cxybeg[8], /* start xy control seq */
- cxymid[8], /* middle xy control seq */
- cxyend[8], /* end sequence */
- cerrbg[8], /* string to print when errors start */
- cerred[8], /* when errors done */
- ctopb[8], /* top blanks = reverse linefeed */
- cinit[20], /* start up sequence */
- cendit[20], /* to end session */
- cbotb[8], /* bottom sequence */
- celin[8], /* erase to end of line */
- cescr[8], /* erase to end of screen */
- ccsrcm[8], /* set cursor to command mode */
- ccsrin[8], /* set cursor to insert mode */
- ciline[8], /* insert a line */
- ckline[8], /* kill a line */
- cundlb[8], /* turn on underline */
- cundle[8], /* turn off underline */
- cboldb[8], /* start bold */
- cbolde[8]; /* end bold */
-
- EXTERN int ddline,dscrl,dxcase,usecz,autoin,logdef;
- EXTERN char delkey;
-
- EXTERN int tvlins, /* number of lines on screen */
- tvcols, /* number of columns on screen */
- tvhardlines, /* real number of lines (for small window) */
- tvx, /* current x cursor position */
- tvy, /* current y cursor position */
- tvdlin, /* the "active" display line */
- dsplin, /* the default display line */
- tabspc, /* spacing for tabs */
- leftmg, /* left margin of display */
- wraplm, /* auto wrap? */
- isibmpc; /* for possible use with a general version */
-
- EXTERN char synofr[20], /* from table */
- synoto[20]; /* translate to table */
-
- EXTERN char funkey, /* leading char for function key */
- funchar[50], /* code sent by function key */
- funcmd[50]; /* equivalent command */
- EXTERN char lexsym[LEXVALUES+1];
-
- EXTERN char user_set[40], /* wild matches */
- use_wild;
-
- EXTERN char old_cmds[16];
- EXTERN int old_cindex ; /* cursor into old_cmds */
-
- EXTERN char cfgname[40];
-
- EXTERN int endpatch; /* to get address of end of patch area */
- #endif
-
-
- EXTERN int bakpos, /* used when building log file */
- bakflg, /* if writing to log file */
- usebak, /* if want to build a log file or not */
- makebackup; /* if want to retain backup .bak file */
-
- EXTERN BUFFINDEX nxtsav, /* top of save buffer */
- curchr, /* pointer to current character */
- nxtchr, /* ptr to buff of next new chr */
- mxbuff, /* maximum number of chars in buff */
- *lines; /* line ptrs */
-
- EXTERN int curlin, /* pointer to current line */
- nxtlin, /* ptr to lines of next new line */
- mxline; /* maximum number of lines */
-
- EXTERN char *buff; /* character and save buffer */
-
- #ifdef NOALLOC
- EXTERN int myline[MAXLINE+1]; /* the real line buffer */
- EXTERN char mybuff[MAXBUFF+1]; /* the real buffer */
- #endif
-
- EXTERN int oldlen, /* length for '=' command */
- savlin, /* number of saved lines */
- savlen; /* line lenght of save buffer for rmvlst */
-
- EXTERN int oldlex, /* last commands lexical value */
- oldcol, /* beginning column for dwncol */
- echof, /* whether or not to echo action */
- xcases, /* exact case flag */
- scroll; /* scroll window */
-
- EXTERN int newfil; /* YES if creating a new file */
- EXTERN int rdonly; /* YES if reading a file only */
-
- EXTERN char orig_file[FNAMESIZE+1], /* original file */
- source_file[FNAMESIZE+1], /* where file really is */
- work_file[FNAMESIZE+1], /* current working output file */
- dest_file[FNAMESIZE+1]; /* ultimate name for file */
-
- EXTERN int rptuse, /* which repeat buffer currently active */
- rptcnt[REPEATBUFS], /* number of repeats left to do */
- nxtrpt[REPEATBUFS], /* pointer to next repeat character */
- lstrpt[REPEATBUFS]; /* last good char in buffer */
-
- EXTERN char rptbuf[REPEATBUFS][102]; /* up to 100 chars in repeat loop */
- EXTERN char sbuff[102]; /* search buffer */
- EXTERN char pat_buff[102]; /* save the pattern */
-
- /* other globals */
- #ifndef USEEXTERN
- int slastl = 0;
- #else
- extern int slastl;
- #endif
-
- EXTERN char unkbuf[130];
-
- EXTERN int useprint; /* whether to print */
- EXTERN int xoutcm; /* used for 240 col virtual screen */
- EXTERN int last_col_out; /* last column output */
- EXTERN int waserr;
- EXTERN int blimit; /* limit for read in buffer */
- EXTERN int ttymode; /* true if in tty mode */
- EXTERN int ttynext; /* cursor to next char from rdtty */
- EXTERN int ins_mode; /* true if insert mode */
- EXTERN int force_tty; /* for unix to force tty mode */
-
-
- EXTERN FILE *infile, *outfile, *bkuin, *bkuout;
- EXTERN int ineof;
-
- /* ---------------------------- GLOBALS ------------------------------- */
-