diff options
author | ed <ed@FreeBSD.org> | 2011-11-06 08:15:59 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2011-11-06 08:15:59 +0000 |
commit | 15a0ba36db61204e010694122f96281b4111cdf4 (patch) | |
tree | 9a2437fcb2332f47094a30c8c49a9e9f343ab336 | |
parent | b3e1c421c63a50b404ad9882c7de1f2b2782a86f (diff) | |
download | FreeBSD-src-15a0ba36db61204e010694122f96281b4111cdf4.zip FreeBSD-src-15a0ba36db61204e010694122f96281b4111cdf4.tar.gz |
Add missing static keywords to look(1)
-rw-r--r-- | usr.bin/look/look.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index 4e8cf34..e77a216 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -77,14 +77,14 @@ static char _path_words[] = _PATH_WORDS; #define GREATER 1 #define LESS (-1) -int dflag, fflag; +static int dflag, fflag; -char *binary_search(wchar_t *, unsigned char *, unsigned char *); -int compare(wchar_t *, unsigned char *, unsigned char *); -char *linear_search(wchar_t *, unsigned char *, unsigned char *); -int look(wchar_t *, unsigned char *, unsigned char *); -wchar_t *prepkey(const char *, wchar_t); -void print_from(wchar_t *, unsigned char *, unsigned char *); +static char *binary_search(wchar_t *, unsigned char *, unsigned char *); +static int compare(wchar_t *, unsigned char *, unsigned char *); +static char *linear_search(wchar_t *, unsigned char *, unsigned char *); +static int look(wchar_t *, unsigned char *, unsigned char *); +static wchar_t *prepkey(const char *, wchar_t); +static void print_from(wchar_t *, unsigned char *, unsigned char *); static void usage(void); @@ -151,7 +151,7 @@ main(int argc, char *argv[]) exit(match); } -wchar_t * +static wchar_t * prepkey(const char *string, wchar_t termchar) { const char *readp; @@ -182,7 +182,7 @@ prepkey(const char *string, wchar_t termchar) return (key); } -int +static int look(wchar_t *string, unsigned char *front, unsigned char *back) { @@ -236,7 +236,7 @@ look(wchar_t *string, unsigned char *front, unsigned char *back) #define SKIP_PAST_NEWLINE(p, back) \ while (p < back && *p++ != '\n'); -char * +static char * binary_search(wchar_t *string, unsigned char *front, unsigned char *back) { unsigned char *p; @@ -270,7 +270,7 @@ binary_search(wchar_t *string, unsigned char *front, unsigned char *back) * o front points at the first character in a line. * o front is before or at the first line to be printed. */ -char * +static char * linear_search(wchar_t *string, unsigned char *front, unsigned char *back) { while (front < back) { @@ -290,7 +290,7 @@ linear_search(wchar_t *string, unsigned char *front, unsigned char *back) /* * Print as many lines as match string, starting at front. */ -void +static void print_from(wchar_t *string, unsigned char *front, unsigned char *back) { for (; front < back && compare(string, front, back) == EQUAL; ++front) { @@ -315,7 +315,7 @@ print_from(wchar_t *string, unsigned char *front, unsigned char *back) * The string "s1" is null terminated. The string s2 is '\n' terminated (or * "back" terminated). */ -int +static int compare(wchar_t *s1, unsigned char *s2, unsigned char *back) { wchar_t ch1, ch2; |