1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-18 16:35:23 +00:00

Move globals rval and tabmask to eval and line.

This commit is contained in:
Renaud 2013-10-10 11:42:33 +08:00
parent 96ca2e8580
commit bd14ff374f
7 changed files with 10 additions and 12 deletions

View File

@ -249,7 +249,6 @@
/* Internal defined functions */ /* Internal defined functions */
#define nextab(a) (a & ~tabmask) + (tabmask+1)
#ifdef abs #ifdef abs
#undef abs #undef abs
#endif #endif

4
eval.c
View File

@ -40,10 +40,12 @@
char outline[ NSTRING] ; /* global string to hold debug line text */ char outline[ NSTRING] ; /* global string to hold debug line text */
#endif #endif
int gflags = GFREAD ; /* global control flag */ int gflags = GFREAD ; /* global control flag */
int macbug = FALSE ; /* macro debuging flag */ int macbug = FALSE ; /* macro debuging flag */
int cmdstatus = TRUE ; /* last command status */ int cmdstatus = TRUE ; /* last command status */
int flickcode = FALSE ; /* do flicker supression? */ int flickcode = FALSE ; /* do flicker supression? */
int rval = 0 ; /* return value of a subprocess */
static int saveflag = 0 ; /* Flags, saved with the $target var */ static int saveflag = 0 ; /* Flags, saved with the $target var */

1
eval.h
View File

@ -19,6 +19,7 @@ extern int gflags ; /* global control flag */
extern int macbug ; /* macro debuging flag */ extern int macbug ; /* macro debuging flag */
extern int cmdstatus ; /* last command status */ extern int cmdstatus ; /* last command status */
extern int flickcode ; /* do flicker supression? */ extern int flickcode ; /* do flicker supression? */
extern int rval ; /* return value of a subprocess */
extern long envram ; /* # of bytes current in use by malloc */ extern long envram ; /* # of bytes current in use by malloc */
/* Macro argument token types */ /* Macro argument token types */

View File

@ -10,11 +10,6 @@ int ctlxc = CONTROL | 'X'; /* current control X prefix char */
int reptc = CONTROL | 'U'; /* current universal repeat char */ int reptc = CONTROL | 'U'; /* current universal repeat char */
int abortc = CONTROL | 'G'; /* current abort command char */ int abortc = CONTROL | 'G'; /* current abort command char */
int tabmask = 0x07; /* tabulator mask */
int rval = 0; /* return value of a subprocess */
/* uninitialized global definitions */ /* uninitialized global definitions */
int thisflag; /* Flags, this command */ int thisflag; /* Flags, this command */

View File

@ -10,11 +10,6 @@ extern int ctlxc; /* current control X prefix char */
extern int reptc; /* current universal repeat char */ extern int reptc; /* current universal repeat char */
extern int abortc; /* current abort command char */ extern int abortc; /* current abort command char */
extern int tabmask;
extern int rval; /* return value of a subprocess */
/* Uninitialized global external declarations. */ /* Uninitialized global external declarations. */
#define CFCPCN 0x0001 /* Last command was C-P, C-N */ #define CFCPCN 0x0001 /* Last command was C-P, C-N */

3
line.c
View File

@ -26,6 +26,9 @@
#include "log.h" #include "log.h"
#include "window.h" #include "window.h"
int tabmask = 0x07 ; /* tabulator mask */
#define BLOCK_SIZE 16 /* Line block chunk size. */ #define BLOCK_SIZE 16 /* Line block chunk size. */
static int ldelnewline( void) ; static int ldelnewline( void) ;

3
line.h
View File

@ -25,6 +25,9 @@ struct line {
#define lputc(lp, n, c) ((lp)->l_text[(n)]=(c)) #define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
#define llength(lp) ((lp)->l_used) #define llength(lp) ((lp)->l_used)
#define nextab(a) (a & ~tabmask) + (tabmask+1)
extern int tabmask ;
char *getkill( void) ; char *getkill( void) ;
int backchar( int f, int n) ; int backchar( int f, int n) ;