1 /*
2 ** extern.h
3 **
4 ** external data definitions
5 ** for the screen editor
6 **
7 ** This file is in the public domain.
8 */
9 
10 #ifndef __EXTERN_H
11 #define __EXTERN_H
12 
13 /* Concerning line numbers: */
14 extern int Line1;		/* first line number on command */
15 extern int Line2;		/* second line number on command */
16 extern int Nlines;		/* number of line numbers specified */
17 extern int Curln;		/* current line; value of dot */
18 extern int Lastln;		/* last line; value of dollar */
19 
20 
21 /* Concerning patterns: */
22 extern char Pat[MAXPAT];	/* saved pattern */
23 
24 
25 /* Concerning the text of lines: */
26 extern char Txt[MAXLINE];	/* text of current line */
27 
28 
29 /* Concerning file names: */
30 extern char Savfil[MAXLINE];	/* remembered file name */
31 
32 
33 /* Concerning line descriptors: */
34 extern LINEDESC Buf[MAXBUF];
35 extern LINEDESC *Line0;		/* head of list of line descriptors */
36 
37 
38 /* Concerning the 'undo' command: */
39 extern LINEDESC *Limbo;		/* head of limbo list for undo */
40 extern int Limcnt;		/* number of lines in limbo list */
41 
42 
43 /* Concerning the scratch file: */
44 extern int Scr;			/* scratch file descriptor */
45 extern unsigned Scrend;		/* end of info on scratch file */
46 extern char Scrname[MAXLINE];	/* name of scratch file */
47 extern int Lost_lines;		/* number of garbage lines in scratch file */
48 
49 
50 /* Concerning miscellaneous variables */
51 extern int Buffer_changed;	/* YES if buffer changed since last write */
52 extern int Errcode;		/* cause of most recent error */
53 extern int Saverrcode;		/* cause of previous error */
54 extern int Probation;		/* YES if unsaved buffer can be destroyed */
55 extern int Argno;		/* command line argument pointer */
56 extern char Last_char_scanned;	/* last char scanned with ctl-s or -l */
57 extern char Peekc;		/* push a SKIP_RIGHT if adding delimiters */
58 extern int Reading;		/* are we doing terminal input? */
59 
60 
61 /* Concerning options: */
62 extern int Tabstops[MAXLINE];	/* array of tab stops */
63 extern char Unprintable;	/* char to print for unprintable chars */
64 extern int Absnos;		/* use absolute numbers in margin */
65 extern int Nchoise;		/* choice of line number for cont. display */
66 extern int Overlay_col;		/* initial cursor column for 'v' command */
67 extern int Warncol;		/* where to turn on column warning */
68 extern int Firstcol;		/* leftmost column to display */
69 extern int Indent;		/* indent col; 0=same as previous line */
70 extern int Notify;		/* notify user if he has mail in mail file */
71 extern int Globals;		/* substitutes in a global don't fail */
72 extern int No_hardware;		/* never use hardware insert/delete */
73 
74 
75 /* Concerning the screen format: */
76 extern char Screen_image[MAXROWS][MAXCOLS];
77 extern char Msgalloc[MAXCOLS];	/* column allocation of status line */
78 extern int Nrows;		/* number of rows on screen */
79 extern int Ncols;		/* number of columns on screen */
80 extern int Currow;		/* vertical cursor coordinate */
81 extern int Curcol;		/* horizontal cursor coordinate */
82 extern int Toprow;		/* top row of window field on screen */
83 extern int Botrow;		/* bottom row of window field on screen */
84 extern int Cmdrow;		/* row number of command line */
85 extern int Topln;		/* line number of first line on screen */
86 extern int Insert_mode;		/* flag to specify character insertion */
87 extern int Invert_case;		/* flag to specify case mapping on input */
88 extern int First_affected;	/* number of first line affected by cmd */
89 extern int Rel_a;		/* char to use for first alpha line number */
90 extern int Rel_z;		/* char to use for last alpha line number */
91 extern int Scline[MAXROWS];	/* lines currently on screen (rel to Sctop) */
92 extern int Sctop;		/* first line currently on screen */
93 extern int Sclen;		/* number of lines currently on screen */
94 extern char Blanks[MAXCOLS];	/* all blanks for filling in lines on screen */
95 extern char Tobuf[MAXTOBUF];	/* buffer for collecting terminal output */
96 extern char *Tobp;		/* pointer to last used part of Tobuf */
97 
98 
99 /* Concerning interrupts: */
100 extern int Int_caught;		/* caught a SIGINT from user */
101 extern int Hup_caught;		/* caught a SIGHUP when phone line dropped */
102 extern int Catching_stops;	/* catching or ignoring SIGTSTP's? */
103 
104 
105 /* Concerning file encryption: */
106 extern int Crypting;		/* doing file encryption? */
107 extern char Key[KEYSIZE];	/* encryption key */
108 
109 #endif
110