Cleanup:
- Change signedness of nxtfld() to make msgs(1) WARNS=6 clean - Add several static's
This commit is contained in:
parent
f1858c523b
commit
617efa7ad5
@ -2,6 +2,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PROG= msgs
|
PROG= msgs
|
||||||
|
WARNS?= 6
|
||||||
DPADD= ${LIBTERMCAP}
|
DPADD= ${LIBTERMCAP}
|
||||||
LDADD= -ltermcap
|
LDADD= -ltermcap
|
||||||
|
|
||||||
|
@ -151,14 +151,14 @@ bool clean = NO;
|
|||||||
bool lastcmd = NO;
|
bool lastcmd = NO;
|
||||||
jmp_buf tstpbuf;
|
jmp_buf tstpbuf;
|
||||||
|
|
||||||
void ask(const char *);
|
static void ask(const char *);
|
||||||
void gfrsub(FILE *);
|
static void gfrsub(FILE *);
|
||||||
int linecnt(FILE *);
|
static int linecnt(FILE *);
|
||||||
int next(char *);
|
static int next(char *);
|
||||||
char *nxtfld(unsigned char *);
|
static char *nxtfld(char *);
|
||||||
void onsusp(int);
|
static void onsusp(int);
|
||||||
void onintr(int);
|
static void onintr(int);
|
||||||
void prmesg(int);
|
static void prmesg(int);
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -628,7 +628,7 @@ usage(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
prmesg(int length)
|
prmesg(int length)
|
||||||
{
|
{
|
||||||
FILE *outf;
|
FILE *outf;
|
||||||
@ -675,7 +675,7 @@ prmesg(int length)
|
|||||||
tcdrain(fileno(stdout));
|
tcdrain(fileno(stdout));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
onintr(int unused __unused)
|
onintr(int unused __unused)
|
||||||
{
|
{
|
||||||
signal(SIGINT, onintr);
|
signal(SIGINT, onintr);
|
||||||
@ -700,7 +700,7 @@ onintr(int unused __unused)
|
|||||||
/*
|
/*
|
||||||
* We have just gotten a susp. Suspend and prepare to resume.
|
* We have just gotten a susp. Suspend and prepare to resume.
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
onsusp(int unused __unused)
|
onsusp(int unused __unused)
|
||||||
{
|
{
|
||||||
signal(SIGTSTP, SIG_DFL);
|
signal(SIGTSTP, SIG_DFL);
|
||||||
@ -711,7 +711,7 @@ onsusp(int unused __unused)
|
|||||||
longjmp(tstpbuf, 0);
|
longjmp(tstpbuf, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
linecnt(FILE *f)
|
linecnt(FILE *f)
|
||||||
{
|
{
|
||||||
off_t oldpos = ftello(f);
|
off_t oldpos = ftello(f);
|
||||||
@ -725,7 +725,7 @@ linecnt(FILE *f)
|
|||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
next(char *buf)
|
next(char *buf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@ -734,7 +734,7 @@ next(char *buf)
|
|||||||
return(--i);
|
return(--i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
ask(const char *prompt)
|
ask(const char *prompt)
|
||||||
{
|
{
|
||||||
char inch;
|
char inch;
|
||||||
@ -820,7 +820,7 @@ ask(const char *prompt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
gfrsub(FILE *infile)
|
gfrsub(FILE *infile)
|
||||||
{
|
{
|
||||||
off_t frompos;
|
off_t frompos;
|
||||||
@ -900,8 +900,8 @@ gfrsub(FILE *infile)
|
|||||||
strncpy(subj, "(No Subject)\n", sizeof subj);
|
strncpy(subj, "(No Subject)\n", sizeof subj);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
static char *
|
||||||
nxtfld(unsigned char *s)
|
nxtfld(char *s)
|
||||||
{
|
{
|
||||||
if (*s) while (*s && !isspace(*s)) s++; /* skip over this field */
|
if (*s) while (*s && !isspace(*s)) s++; /* skip over this field */
|
||||||
if (*s) while (*s && isspace(*s)) s++; /* find start of next field */
|
if (*s) while (*s && isspace(*s)) s++; /* find start of next field */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user