diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-01 01:09:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-01 01:09:22 -0700 |
commit | ef92bc8cd9ad58da15a1f6f311c234e991551710 (patch) | |
tree | f5f8ac7899f9ebb8aea3fb0033511e4e1f83969d | |
parent | 24338ae85538707c42408a953900374910c04771 (diff) | |
download | uemacs-ef92bc8cd9ad58da15a1f6f311c234e991551710.tar.gz |
Make sources mostly sparse-clean
Mainly an issue of taking care of a few remaining K&R function
declarations.
-rw-r--r-- | bind.c | 3 | ||||
-rw-r--r-- | crypt.c | 2 | ||||
-rw-r--r-- | display.c | 1 | ||||
-rw-r--r-- | edef.h | 15 | ||||
-rw-r--r-- | estruct.h | 2 | ||||
-rw-r--r-- | eval.c | 2 | ||||
-rw-r--r-- | exec.c | 8 | ||||
-rw-r--r-- | globals.c | 4 | ||||
-rw-r--r-- | input.c | 1 | ||||
-rw-r--r-- | lock.c | 3 | ||||
-rw-r--r-- | main.c | 4 | ||||
-rw-r--r-- | tcap.c | 1 |
12 files changed, 9 insertions, 37 deletions
@@ -89,7 +89,7 @@ int deskey(int f, int n) int bindtokey(int f, int n) { register unsigned int c; /* command key to bind */ - register int (*kfunc) (); /* ptr to the requested function to bind to */ + register fn_t kfunc; /* ptr to the requested function to bind to */ register KEYTAB *ktp; /* pointer into the command table */ register int found; /* matched command flag */ char outseq[80]; /* output buffer for keystroke sequence */ @@ -706,7 +706,6 @@ unsigned int stock(char *keyname) char *transbind(char *skey) { char *bindname; - unsigned int stock(); bindname = getfname(getbind(stock(skey))); if (bindname == NULL) @@ -12,7 +12,7 @@ #if CRYPT -static int mod95(); +static int mod95(int); /* * reset encryption key of current buffer @@ -1512,7 +1512,6 @@ void getscreensize(int *widthp, int *heightp) void sizesignal(int signr) { int w, h; - extern int errno; int old_errno = errno; getscreensize(&w, &h); @@ -17,16 +17,6 @@ typedef int (*fn_t)(int, int); struct VIDEO; -char *getval(); -char *gtenv(); -char *gtfun(); -char *gtusr(); -char *itoa(); -char *ltos(); -char *mklower(); -char *mkupper(); -char *token(); - /* initialized global external declarations */ extern int fillcol; /* Fill column */ @@ -121,7 +111,7 @@ extern BUFFER *blistp; /* Buffer for C-X C-B */ extern BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */ extern window_t *wpopup(); /* Pop up window creation */ -extern LINE *lalloc(); /* Allocate a line */ +extern LINE *lalloc(int); /* Allocate a line */ extern char sres[NBUFN]; /* current screen resolution */ extern char pat[]; /* Search pattern */ extern char tap[]; /* Reversed pattern array. */ @@ -149,7 +139,4 @@ extern char outline[]; /* global string to hold debug line text */ #endif /* terminal table defined only in TERM.C */ - -#ifndef termdef extern TERM term; /* Terminal information. */ -#endif @@ -601,7 +601,7 @@ typedef struct { typedef struct { short k_code; /* Key code */ - int (*k_fp) (); /* Routine to handle it */ + int (*k_fp)(int, int); /* Routine to handle it */ } KEYTAB; /* structure for the name binding table */ @@ -34,8 +34,6 @@ char *gtfun(char *fname) char arg2[NSTRING]; /* value of second argument */ char arg3[NSTRING]; /* value of third argument */ static char result[2 * NSTRING]; /* string result */ - char *flook(); /* look file up on path */ - char *xlat(); /* translate a char string */ /* look the function up in the function table */ fname[3] = 0; /* only first 3 chars significant */ @@ -20,8 +20,7 @@ */ int namedcmd(int f, int n) { - register int (*kfunc) (); /* ptr to the requexted function to bind to */ - int (*getname()) (); + register fn_t kfunc; /* ptr to the requexted function to bind to */ /* prompt the user to type a named command */ mlwrite(": "); @@ -34,7 +33,7 @@ int namedcmd(int f, int n) } /* and then execute the command */ - return ((*kfunc) (f, n)); + return kfunc(f, n); } /* @@ -74,12 +73,11 @@ int docmd(char *cline) { register int f; /* default argument flag */ register int n; /* numeric repeat value */ - int (*fnc) (); /* function to execute */ + fn_t fnc; /* function to execute */ int status; /* return status of function */ int oldcle; /* old contents of clexec flag */ char *oldestr; /* original exec string */ char tkn[NSTRING]; /* next token off of command line */ - int (*fncmatch()) (); /* if we are scanning and not executing..go back here */ if (execlevel) @@ -105,11 +105,7 @@ window_t *wheadp; /* Head of list of windows */ BUFFER *bheadp; /* Head of list of buffers */ BUFFER *blistp; /* Buffer for C-X C-B */ -BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */ -window_t *wpopup(); /* Pop up window creation */ -LINE *lalloc(); /* Allocate a line */ char sres[NBUFN]; /* current screen resolution */ - char pat[NPAT]; /* Search pattern */ char tap[NPAT]; /* Reversed pattern array. */ char rpat[NPAT]; /* replacement pattern */ @@ -112,7 +112,6 @@ fn_t getname(void) register NBIND *cffp; /* current ptr to entry in name binding table */ register NBIND *lffp; /* last ptr to entry in name binding table */ char buf[NSTRING]; /* buffer to hold tentative command name */ - int (*fncmatch()) (); /* starting at the beginning of the string buffer */ cpos = 0; @@ -27,7 +27,6 @@ int lockchk(char *fname) { register int i; /* loop indexes */ register int status; /* return status */ - char *undolock(); /* check to see if that file is already locked here */ if (numlocks > 0) @@ -97,7 +96,6 @@ int lock(char *fname) register char *locker; /* lock error message */ register int status; /* return status */ char msg[NSTRING]; /* message string */ - char *dolock(); /* attempt to lock the file */ locker = dolock(fname); @@ -131,7 +129,6 @@ int lock(char *fname) int unlock(char *fname) { register char *locker; /* undolock return string */ - char *undolock(); /* unclock and return */ locker = undolock(fname); @@ -82,9 +82,9 @@ extern unsigned _stklen = 32766; #if UNIX #include <signal.h> -static void emergencyexit(); +static void emergencyexit(int); #ifdef SIGWINCH -extern void sizesignal(); +extern void sizesignal(int); #endif #endif @@ -109,7 +109,6 @@ TERM term = { static void tcapopen(void) { - char *getenv(); char *t, *p; char tcbuf[1024]; char *tv_stype; |