Add static where appropriate.
Sync with some of DragonflyBSD's latest cleanups Reviewed by: mjg
This commit is contained in:
parent
bf043cea3c
commit
1e7652cc76
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258446
@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int match(const char *, const char *);
|
static int match(const char *, const char *);
|
||||||
static void usage(void);
|
static void usage(void);
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -81,7 +81,6 @@ main(int argc, char **argv)
|
|||||||
case 's':
|
case 's':
|
||||||
sender = optarg;
|
sender = optarg;
|
||||||
for (p = sender; *p; ++p)
|
for (p = sender; *p; ++p)
|
||||||
if (isupper(*p))
|
|
||||||
*p = tolower(*p);
|
*p = tolower(*p);
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
@ -142,7 +141,7 @@ usage(void)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
static int
|
||||||
match(const char *line, const char *sender)
|
match(const char *line, const char *sender)
|
||||||
{
|
{
|
||||||
char ch, pch, first;
|
char ch, pch, first;
|
||||||
@ -152,15 +151,14 @@ match(const char *line, const char *sender)
|
|||||||
if (isspace(ch = *line))
|
if (isspace(ch = *line))
|
||||||
return(0);
|
return(0);
|
||||||
++line;
|
++line;
|
||||||
if (isupper(ch))
|
|
||||||
ch = tolower(ch);
|
ch = tolower(ch);
|
||||||
if (ch != first)
|
if (ch != first)
|
||||||
continue;
|
continue;
|
||||||
for (p = sender, t = line;;) {
|
for (p = sender, t = line;;) {
|
||||||
if (!(pch = *p++))
|
if (!(pch = *p++))
|
||||||
return(1);
|
return(1);
|
||||||
if (isupper(ch = *t++))
|
ch = tolower(*t);
|
||||||
ch = tolower(ch);
|
t++;
|
||||||
if (ch != pch)
|
if (ch != pch)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user