diff --git a/bind.c b/bind.c index bd5c2a6..69fade0 100644 --- a/bind.c +++ b/bind.c @@ -27,8 +27,18 @@ #include "window.h" +#if APROP +static int strinc( char *source, char *sub) ; +#endif + +static void cmdstr( int c, char *seq) ; +static unsigned int getckey( int mflag) ; +static unsigned int stock( char *keyname) ; +static int buildlist( int type, char *mstring) ; +static int unbindchar( int c) ; static char *getfname( fn_t) ; + int help(int f, int n) { /* give me some help!!!! bring up a fake buffer and read the help file @@ -223,8 +233,7 @@ int unbindkey(int f, int n) * * int c; command key to unbind */ -int unbindchar(int c) -{ +static int unbindchar( int c) { struct key_tab *ktp; /* pointer into the command table */ struct key_tab *sktp; /* saved pointer into the command table */ int found; /* matched command flag */ @@ -289,7 +298,7 @@ int apro(int f, int n) * int type; true = full list, false = partial list * char *mstring; match string if a partial list */ -int buildlist(int type, char *mstring) +static int buildlist( int type, char *mstring) #endif { struct window *wp; /* scanning pointer to windows */ @@ -403,8 +412,7 @@ int buildlist(int type, char *mstring) * char *source; string to search in * char *sub; substring to look for */ -int strinc(char *source, char *sub) -{ +static int strinc( char *source, char *sub) { char *sp; /* ptr into source */ char *nxtsp; /* next ptr into source */ char *tp; /* ptr into substring */ @@ -439,8 +447,7 @@ int strinc(char *source, char *sub) * * int mflag; going for a meta sequence? */ -unsigned int getckey(int mflag) -{ +static unsigned int getckey( int mflag) { unsigned int c; /* character fetched */ char tok[NSTRING]; /* command incoming */ @@ -480,8 +487,7 @@ int startup( const char *fname) { * int c; sequence to translate * char *seq; destination string for sequence */ -void cmdstr(int c, char *seq) -{ +static void cmdstr( int c, char *seq) { char *ptr; /* pointer into current position in sequence */ ptr = seq; @@ -581,8 +587,7 @@ int (*fncmatch(char *fname)) (int, int) * * char *keyname; name of key to translate to Command key form */ -unsigned int stock(char *keyname) -{ +static unsigned int stock( char *keyname) { unsigned int c; /* key sequence to return */ /* parse it up */ diff --git a/bind.h b/bind.h index 09d7af9..7f3b0ee 100644 --- a/bind.h +++ b/bind.h @@ -5,7 +5,6 @@ #if APROP int apro( int f, int n) ; -int strinc( char *source, char *sub) ; #endif /* Some global fuction declarations. */ @@ -15,15 +14,10 @@ int help( int f, int n) ; int deskey( int f, int n) ; int bindtokey( int f, int n) ; int unbindkey( int f, int n) ; -int unbindchar( int c) ; int desbind( int f, int n) ; -int buildlist( int type, char *mstring) ; -unsigned int getckey( int mflag) ; int startup( const char *fname) ; -void cmdstr( int c, char *seq) ; fn_t getbind( int c) ; fn_t fncmatch( char *) ; -unsigned int stock( char *keyname) ; char *transbind( char *skey) ; #endif diff --git a/eval.c b/eval.c index ebba735..323a829 100644 --- a/eval.c +++ b/eval.c @@ -63,7 +63,7 @@ int readfirst_f( void) { int macbug = FALSE ; /* macro debuging flag */ int cmdstatus = TRUE ; /* last command status */ -int flickcode = FALSE ; /* do flicker supression? */ +static int flickcode = FALSE ; /* do flicker supression? */ int rval = 0 ; /* return value of a subprocess */ diff --git a/eval.h b/eval.h index dea3397..3d6ef4a 100644 --- a/eval.h +++ b/eval.h @@ -11,7 +11,6 @@ int mdbugout( char *fmt, char *s1, char *s2, char *s3) ; extern int macbug ; /* macro debuging flag */ extern int cmdstatus ; /* last command status */ -extern int flickcode ; /* do flicker supression? */ extern int rval ; /* return value of a subprocess */ extern long envram ; /* # of bytes current in use by malloc */ diff --git a/file.c b/file.c index 7e5571e..3b3dedf 100644 --- a/file.c +++ b/file.c @@ -57,6 +57,10 @@ static const char *codename[] = { boolean restflag = FALSE ; /* restricted use? */ + +static int ifile( const char *fname) ; + + boolean resterr( void) { mloutfmt( "%B(That command is RESTRICTED)") ; return FALSE ; @@ -646,8 +650,7 @@ int filename(int f, int n) * buffer, Called by insert file command. Return the final * status of the read. */ -int ifile( const char *fname) -{ +static int ifile( const char *fname) { struct line *lp0; struct line *lp1; struct line *lp2; diff --git a/file.h b/file.h index 5643833..8126cc1 100644 --- a/file.h +++ b/file.h @@ -25,6 +25,5 @@ int filewrite( int f, int n) ; int filesave( int f, int n) ; int writeout( const char *fn) ; int filename( int f, int n) ; -int ifile( const char *fname) ; #endif diff --git a/fileio.c b/fileio.c index 991dd29..a0dcd6f 100644 --- a/fileio.c +++ b/fileio.c @@ -28,7 +28,7 @@ boolean is_crypted ; /* currently encrypting? */ #endif char *fline = NULL ; /* dynamic return line */ -int flen = 0 ; /* current allocated length of fline */ +static int flen = 0 ; /* current allocated length of fline */ int ftype ; int fcode ; /* encoding type FCODE_xxxxx */ int fpayload ; /* actual length of fline content */ diff --git a/fileio.h b/fileio.h index a8d6770..6f8990a 100644 --- a/fileio.h +++ b/fileio.h @@ -31,7 +31,6 @@ extern boolean is_crypted ; /* currently encrypting? */ #endif extern char *fline ; /* dynamic return line */ -extern int flen ; /* current allocated length of fline */ extern int ftype ; extern int fcode ; /* encoding type */ extern int fpayload ; /* actual length of fline content */ diff --git a/random.c b/random.c index f13bc1a..58bbf91 100644 --- a/random.c +++ b/random.c @@ -48,6 +48,9 @@ int thisflag ; /* Flags, this command */ int lastflag ; /* Flags, last command */ +static int adjustmode( int kind, int global) ; +static int cinsert( void) ; + /* * Set fill column to n. */ @@ -526,7 +529,7 @@ int insert_newline(int f, int n) return TRUE; } -int cinsert(void) +static int cinsert(void) { /* insert a newline and indentation for C */ char *cptr; /* string pointer into text to copy */ int tptr; /* index to scan into line */ @@ -936,8 +939,7 @@ int delgmode(int f, int n) * int kind; true = set, false = delete * int global; true = global flag, false = current buffer flag */ -int adjustmode(int kind, int global) -{ +static int adjustmode( int kind, int global) { int i; /* loop index */ int status; /* error return on input */ char prompt[50]; /* string to prompt user with */ diff --git a/random.h b/random.h index e3136cd..a5e1899 100644 --- a/random.h +++ b/random.h @@ -29,7 +29,6 @@ int trim( int f, int n) ; #endif int openline( int f, int n) ; int insert_newline( int f, int n) ; -int cinsert( void) ; int insbrace( int n, int c) ; int inspound( void) ; int deblank( int f, int n) ; @@ -41,7 +40,6 @@ int setemode( int f, int n) ; int delmode( int f, int n) ; int setgmode( int f, int n) ; int delgmode( int f, int n) ; -int adjustmode( int kind, int global) ; int getfence( int f, int n) ; int fmatch( int ch) ; int istring( int f, int n) ;