Update
[uemacs.git] / src / edef.h
blob0fd2b3799e2a1c94314866622dc95d166ce3a636
1 /* edef.h
3 * Global variable definitions
5 * written by Dave G. Conroy
6 * modified by Steve Wilhite, George Jones
7 * greatly modified by Daniel Lawrence
8 * modified by Petri Kutvonen
9 */
11 #ifndef EDEF_H
12 #define EDEF_H
14 #include <stdlib.h>
15 #include <string.h>
17 /* Some global fuction declarations. */
18 typedef int (*fn_t)(int, int);
20 /* Initialized global external declarations. */
22 extern int fillcol; /* Fill column */
23 extern short kbdm[]; /* Holds kayboard macro data */
24 extern char pat[]; /* Search pattern */
25 extern char rpat[]; /* Replacement pattern */
26 extern char *execstr; /* pointer to string to execute */
27 extern char golabel[]; /* current line to go to */
28 extern int execlevel; /* execution IF level */
29 extern int eolexist; /* does clear to EOL exist? */
30 extern int revexist; /* does reverse video exist? */
31 extern int flickcode; /* do flicker supression? */
32 extern char *modename[]; /* text names of modes */
33 extern char *mode2name[]; /* text names of modes */
34 extern char modecode[]; /* letters to represent modes */
35 extern struct key_tab keytab[]; /* key bind to functions table */
36 extern struct name_bind names[];/* name to function table */
37 extern int gmode; /* global editor mode */
38 extern int gflags; /* global control flag */
39 extern int gfcolor; /* global forgrnd color (white) */
40 extern int gbcolor; /* global backgrnd color (black) */
41 extern int gasave; /* global ASAVE size */
42 extern int gacount; /* count until next ASAVE */
43 extern int sgarbf; /* State of screen unknown */
44 extern int mpresf; /* Stuff in message line */
45 extern int clexec; /* command line execution flag */
46 extern int mstore; /* storing text to macro flag */
47 extern int discmd; /* display command flag */
48 extern int disinp; /* display input characters */
49 extern struct buffer *bstore; /* buffer to store macro text to */
50 extern int vtrow; /* Row location of SW cursor */
51 extern int vtcol; /* Column location of SW cursor */
52 extern int ttrow; /* Row location of HW cursor */
53 extern int ttcol; /* Column location of HW cursor */
54 extern int lbound; /* leftmost column of current line
55 being displayed */
56 extern int taboff; /* tab offset for display */
57 extern int metac; /* current meta character */
58 extern int ctlxc; /* current control X prefix char */
59 extern int reptc; /* current universal repeat char */
60 extern int abortc; /* current abort command char */
62 extern int quotec; /* quote char during mlreply() */
63 extern int tabmask;
64 extern char *cname[]; /* names of colors */
65 extern struct kill *kbufp; /* current kill buffer chunk pointer */
66 extern struct kill *kbufh; /* kill buffer header pointer */
67 extern int kused; /* # of bytes used in KB */
68 extern struct window *swindow; /* saved window pointer */
69 extern int cryptflag; /* currently encrypting? */
70 extern short *kbdptr; /* current position in keyboard buf */
71 extern short *kbdend; /* ptr to end of the keyboard */
72 extern int kbdmode; /* current keyboard macro mode */
73 extern int kbdrep; /* number of repetitions */
74 extern int restflag; /* restricted use? */
75 extern int lastkey; /* last keystoke */
76 extern int seed; /* random number seed */
77 extern long envram; /* # of bytes current in use by malloc */
78 extern int macbug; /* macro debuging flag */
79 extern char errorm[]; /* error literal */
80 extern char truem[]; /* true literal */
81 extern char falsem[]; /* false litereal */
82 extern int cmdstatus; /* last command status */
83 extern char palstr[]; /* palette string */
84 extern int saveflag; /* Flags, saved with the $target var */
85 extern char *fline; /* dynamic return line */
86 extern int flen; /* current length of fline */
87 extern int rval; /* return value of a subprocess */
88 #if PKCODE
89 extern int nullflag;
90 extern int justflag; /* justify, don't fill */
91 #endif
92 extern int overlap; /* line overlap in forw/back page */
93 extern int scrollcount; /* number of lines to scroll */
95 /* Uninitialized global external declarations. */
97 extern int currow; /* Cursor row */
98 extern int curcol; /* Cursor column */
99 extern int thisflag; /* Flags, this command */
100 extern int lastflag; /* Flags, last command */
101 extern int curgoal; /* Goal for C-P, C-N */
102 extern struct window *curwp; /* Current window */
103 extern struct buffer *curbp; /* Current buffer */
104 extern struct window *wheadp; /* Head of list of windows */
105 extern struct buffer *bheadp; /* Head of list of buffers */
106 extern struct buffer *blistp; /* Buffer for C-X C-B */
108 extern char sres[NBUFN]; /* Current screen resolution. */
109 extern char pat[]; /* Search pattern. */
110 extern char tap[]; /* Reversed pattern array. */
111 extern char rpat[]; /* Replacement pattern. */
113 extern unsigned int matchlen;
114 extern unsigned int mlenold;
115 extern char *patmatch;
116 extern struct line *matchline;
117 extern int matchoff;
119 #if MAGIC
120 extern short int magical;
121 extern short int rmagical;
122 extern MC mcpat[NPAT]; /* The magic pattern. */
123 extern MC tapcm[NPAT]; /* The reversed magic patterni. */
124 extern RMC rmcpat[NPAT]; /* The replacement magic array. */
125 #endif
127 extern char *dname[]; /* Directive name table. */
129 #if DEBUGM
130 /* Vars needed for macro debugging output. */
131 extern char outline[]; /* Global string to hold debug line text. */
132 #endif
134 /* Terminal table defined only in term.c */
135 extern struct terminal term;
137 #endif /* EDEF_H */