mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Make sources mostly sparse-clean
Mainly an issue of taking care of a few remaining K&R function declarations.
This commit is contained in:
parent
24338ae855
commit
ef92bc8cd9
3
bind.c
3
bind.c
@ -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)
|
||||
|
2
crypt.c
2
crypt.c
@ -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);
|
||||
|
15
edef.h
15
edef.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 */
|
||||
|
2
eval.c
2
eval.c
@ -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 */
|
||||
|
8
exec.c
8
exec.c
@ -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 */
|
||||
|
1
input.c
1
input.c
@ -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;
|
||||
|
3
lock.c
3
lock.c
@ -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);
|
||||
|
4
main.c
4
main.c
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user