diff --git a/buffer.c b/buffer.c index 8cffbaa..8a752df 100644 --- a/buffer.c +++ b/buffer.c @@ -23,6 +23,10 @@ #include "window.h" +struct buffer *curbp ; /* Current buffer */ +struct buffer *bheadp ; /* Head of list of buffers */ +struct buffer *blistp ; /* Buffer for C-X C-B */ + const char *modename[] = { /* name of modes */ "Wrap", "Cmode", "Spell", "Exact", "View", "Over", "Magic", @@ -34,6 +38,8 @@ const char *modename[] = { /* name of modes */ "Asave", "Utf-8", "Dos" } ; +int gmode = 0 ; /* global editor mode */ + static const char modecode[] = "WCSEVOMYAUD" ; /* letters to represent modes */ diff --git a/buffer.h b/buffer.h index 41b2e4f..2b69eb8 100644 --- a/buffer.h +++ b/buffer.h @@ -37,6 +37,10 @@ struct buffer { #endif }; +extern struct buffer *curbp ; /* Current buffer */ +extern struct buffer *bheadp ; /* Head of list of buffers */ +extern struct buffer *blistp ; /* Buffer for C-X C-B */ + #define BFINVS 0x01 /* Internal invisable buffer */ #define BFCHG 0x02 /* Changed since last write */ #define BFTRUNC 0x04 /* buffer was truncated when read */ @@ -60,6 +64,7 @@ struct buffer { extern const char *modename[] ; /* text names of modes */ +extern int gmode ; /* global editor mode */ int usebuffer( int f, int n) ; diff --git a/edef.h b/edef.h index 0615594..6f1274a 100644 --- a/edef.h +++ b/edef.h @@ -27,7 +27,6 @@ extern int fillcol; /* Fill column */ extern int eolexist; /* does clear to EOL exist? */ extern int revexist; /* does reverse video exist? */ extern int flickcode; /* do flicker supression? */ -extern int gmode; /* global editor mode */ extern int gfcolor; /* global forgrnd color (white) */ extern int gbcolor; /* global backgrnd color (black) */ extern int sgarbf; /* State of screen unknown */ @@ -71,10 +70,7 @@ extern int lastflag; /* Flags, last command */ extern int curgoal; /* Goal for C-P, C-N */ extern struct window *curwp; /* Current window */ -extern struct buffer *curbp; /* Current buffer */ extern struct window *wheadp; /* Head of list of windows */ -extern struct buffer *bheadp; /* Head of list of buffers */ -extern struct buffer *blistp; /* Buffer for C-X C-B */ extern char sres[NBUFN]; /* Current screen resolution. */ diff --git a/globals.c b/globals.c index 1823192..28eaef7 100644 --- a/globals.c +++ b/globals.c @@ -12,7 +12,6 @@ int fillcol = 72; /* Current fill column */ int eolexist = TRUE; /* does clear to EOL exist */ int revexist = FALSE; /* does reverse video exist? */ int flickcode = FALSE; /* do flicker supression? */ -int gmode = 0; /* global editor mode */ int sgarbf = TRUE; /* TRUE if screen is garbage */ int clexec = FALSE; /* command line execution flag */ int discmd = TRUE; /* display command flag */ @@ -41,9 +40,6 @@ int thisflag; /* Flags, this command */ int lastflag; /* Flags, last command */ int curgoal; /* Goal for C-P, C-N */ struct window *curwp; /* Current window */ -struct buffer *curbp; /* Current buffer */ struct window *wheadp; /* Head of list of windows */ -struct buffer *bheadp; /* Head of list of buffers */ -struct buffer *blistp; /* Buffer for C-X C-B */ char sres[NBUFN]; /* current screen resolution */