Move globals variables to related modules.

This commit is contained in:
Renaud 2013-10-09 16:58:33 +08:00
parent 867f0d9d60
commit f03b7c97e3
10 changed files with 12 additions and 12 deletions

View File

@ -71,6 +71,7 @@ static int taboff = 0 ; /* tab offset for display */
int mpresf = FALSE ; /* TRUE if message in last line */
int scrollcount = 1 ; /* number of lines to scroll */
int discmd = TRUE ; /* display command flag */
static int reframe(struct window *wp);
static void updone(struct window *wp);

View File

@ -3,6 +3,9 @@
extern int mpresf ; /* Stuff in message line */
extern int scrollcount ; /* number of lines to scroll */
extern int discmd ; /* display command flag */
extern int gfcolor ; /* global forgrnd color (white) */
extern int gbcolor ; /* global backgrnd color (black) */
void vtinit( void) ;
void vtfree( void) ;

1
eval.c
View File

@ -43,6 +43,7 @@ char outline[ NSTRING] ; /* global string to hold debug line text */
int gflags = GFREAD ; /* global control flag */
int macbug = FALSE ; /* macro debuging flag */
int cmdstatus = TRUE ; /* last command status */
int flickcode = FALSE ; /* do flicker supression? */
static int saveflag = 0 ; /* Flags, saved with the $target var */

2
eval.h
View File

@ -18,7 +18,7 @@ extern char outline[] ; /* Global string to hold debug line text. */
extern int gflags ; /* global control flag */
extern int macbug ; /* macro debuging flag */
extern int cmdstatus ; /* last command status */
extern int flickcode ; /* do flicker supression? */
extern long envram ; /* # of bytes current in use by malloc */
/* Macro argument token types */

View File

@ -9,11 +9,7 @@
int fillcol = 72; /* Current fill column */
int flickcode = FALSE; /* do flicker supression? */
int sgarbf = TRUE; /* TRUE if screen is garbage */
int clexec = FALSE; /* command line execution flag */
int discmd = TRUE; /* display command flag */
int disinp = TRUE; /* display input characters */
int metac = CONTROL | '['; /* current meta character */
int ctlxc = CONTROL | 'X'; /* current control X prefix char */

View File

@ -8,13 +8,7 @@
extern int fillcol; /* Fill column */
extern int flickcode; /* do flicker supression? */
extern int gfcolor; /* global forgrnd color (white) */
extern int gbcolor; /* global backgrnd color (black) */
extern int sgarbf; /* State of screen unknown */
extern int clexec; /* command line execution flag */
extern int discmd; /* display command flag */
extern int disinp; /* display input characters */
extern int metac; /* current meta character */
extern int ctlxc; /* current control X prefix char */

View File

@ -45,6 +45,8 @@ kbdstate kbdmode = STOP ; /* current keyboard macro mode */
int lastkey = 0 ; /* last keystoke */
int kbdrep = 0 ; /* number of repetitions */
int disinp = TRUE ; /* display input characters */
static const int quotec = 0x11 ; /* quote char during mlreply() */
/*

View File

@ -12,7 +12,8 @@ extern int lastkey ; /* last keystoke */
extern int kbdrep ; /* number of repetitions */
extern int kbdm[] ; /* Holds kayboard macro data */
extern int *kbdptr ; /* current position in keyboard buf */
extern int *kbdend ; /* ptr to end of the keyboard */
extern int *kbdend ; /* ptr to end of the keyboard */
extern int disinp ; /* display input characters */
int mlyesno( const char *prompt) ;
int mlreply( const char *prompt, char *buf, int nbuf) ;

1
tcap.c
View File

@ -36,6 +36,7 @@
boolean eolexist = TRUE ; /* does clear to EOL exist */
boolean revexist = FALSE ; /* does reverse video exist? */
boolean sgarbf = TRUE ; /* TRUE if screen is garbage */
char sres[ NBUFN] ; /* current screen resolution */

View File

@ -73,6 +73,7 @@ extern int ttcol ; /* Column location of HW cursor */
extern boolean eolexist ; /* does clear to EOL exist? */
extern boolean revexist ; /* does reverse video exist? */
extern boolean sgarbf ; /* State of screen unknown */
extern char sres[] ; /* Current screen resolution. */