diff --git a/ansi.c b/ansi.c index f678ff9..89f54e5 100644 --- a/ansi.c +++ b/ansi.c @@ -253,7 +253,7 @@ int f, n; /* default flag, numeric argument [unused] */ } #endif #else -ansihello() +static void ansihello(void) { } #endif diff --git a/basic.c b/basic.c index 184b6d7..4f13c8c 100644 --- a/basic.c +++ b/basic.c @@ -243,8 +243,8 @@ int gotobop(int f, int n) #if PKCODE ((justflag == TRUE) || #endif - lgetc(curwp->w_dotp, curwp->w_doto) != TAB && - lgetc(curwp->w_dotp, curwp->w_doto) != ' ') + (lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ')) #if PKCODE ) #endif @@ -292,8 +292,8 @@ int gotoeop(int f, int n) #if PKCODE ((justflag == TRUE) || #endif - lgetc(curwp->w_dotp, curwp->w_doto) != TAB && - lgetc(curwp->w_dotp, curwp->w_doto) != ' ') + (lgetc(curwp->w_dotp, curwp->w_doto) != TAB && + lgetc(curwp->w_dotp, curwp->w_doto) != ' ')) #if PKCODE ) #endif diff --git a/edef.h b/edef.h index b54d22e..9afc249 100644 --- a/edef.h +++ b/edef.h @@ -135,7 +135,7 @@ WINDOW *wheadp; /* Head of list of windows */ BUFFER *bheadp; /* Head of list of buffers */ BUFFER *blistp; /* Buffer for C-X C-B */ -BUFFER *bfind(); /* Lookup a buffer by name */ +BUFFER *bfind(char *bname, int cflag, int bflag); /* Lookup a buffer by name */ WINDOW *wpopup(); /* Pop up window creation */ LINE *lalloc(); /* Allocate a line */ char sres[NBUFN]; /* current screen resolution */ diff --git a/estruct.h b/estruct.h index 9863ad3..70c9091 100644 --- a/estruct.h +++ b/estruct.h @@ -687,7 +687,7 @@ typedef struct WHBLOCK { #define EOL 6 #define DITTO 7 #define CLOSURE 256 /* An or-able value. */ -#define MASKCL CLOSURE - 1 +#define MASKCL (CLOSURE - 1) #define MC_ANY '.' /* 'Any' character (except newline). */ #define MC_CCL '[' /* Character class. */ diff --git a/posix.c b/posix.c index 2d4f63f..b9b0ada 100644 --- a/posix.c +++ b/posix.c @@ -15,22 +15,23 @@ #include #include "estruct.h" #include "edef.h" +#include "efunc.h" #include #include #include #include -int kbdflgs; /* saved keyboard fd flags */ -int kbdpoll; /* in O_NDELAY mode */ -int kbdqp; /* there is a char in kbdq */ -char kbdq; /* char we've already read */ +static int kbdflgs; /* saved keyboard fd flags */ +static int kbdpoll; /* in O_NDELAY mode */ +static int kbdqp; /* there is a char in kbdq */ +static char kbdq; /* char we've already read */ -struct termios otermios; /* original terminal characteristics */ -struct termios ntermios; /* charactoristics to use inside */ +static struct termios otermios; /* original terminal characteristics */ +static struct termios ntermios; /* charactoristics to use inside */ #define TBUFSIZ 128 -char tobuf[TBUFSIZ]; /* terminal output buffer */ +static char tobuf[TBUFSIZ]; /* terminal output buffer */ /* diff --git a/search.c b/search.c index fd28122..23e0144 100644 --- a/search.c +++ b/search.c @@ -442,21 +442,23 @@ static int amatch(MC *mcptr, int direct, LINE **pcwline, int *pcwoff) * notion that the meta-character '$' (and likewise * '^') match positions, not characters. */ - if (mcptr->mc_type == BOL) + if (mcptr->mc_type == BOL) { if (curoff == llength(curline)) { c = nextch(&curline, &curoff, direct ^ REVERSE); goto success; } else return FALSE; + } - if (mcptr->mc_type == EOL) + if (mcptr->mc_type == EOL) { if (curoff == 0) { c = nextch(&curline, &curoff, direct ^ REVERSE); goto success; } else return FALSE; + } /* Neither BOL nor EOL, so go through * the meta-character equal function. @@ -1278,6 +1280,7 @@ static int rmcstr(void) } rmcptr->mc_type = MCNIL; + return status; } /* diff --git a/tcap.c b/tcap.c index 3d016db..5079e7e 100644 --- a/tcap.c +++ b/tcap.c @@ -266,7 +266,6 @@ static void tcapeeop(void) */ static void tcaprev(int state) { - static int revstate = FALSE; if (state) { if (SO != NULL) putpad(SO); diff --git a/vmsvt.c b/vmsvt.c index 78210c0..9eaaf11 100644 --- a/vmsvt.c +++ b/vmsvt.c @@ -518,7 +518,7 @@ spal() * * Nothing returned ***/ -hellovms() +static void hellovms(void) { } diff --git a/vt52.c b/vt52.c index 1b35e85..190526e 100644 --- a/vt52.c +++ b/vt52.c @@ -178,7 +178,7 @@ int f, n; /* default flag, numeric argument [unused] */ #endif #else -vt52hello() +static void vt52hello(void) { } diff --git a/word.c b/word.c index d5c02d4..a1a84f3 100644 --- a/word.c +++ b/word.c @@ -653,15 +653,6 @@ int wordcount(int f, int n) int status; /* status return code */ REGION region; /* region to look at */ -#if PKCODE - struct { - long pk_1; - long pk_2; - int pk_3; - int pk_4; - } pk_mlrec; -#endif - /* make sure we have a region to count */ if ((status = getregion(®ion)) != TRUE) return (status);