diff options
author | ache <ache@FreeBSD.org> | 1999-10-24 04:47:57 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1999-10-24 04:47:57 +0000 |
commit | a9f235047cb2ec4a15ea4fcbb841e5ba60d6d606 (patch) | |
tree | 9ce4416ae378c58390e6e457d208a1a9944eb5f5 /usr.bin/comm | |
parent | d8f93ede383e9abcfdda58b79d5444b4bab65c6c (diff) | |
download | FreeBSD-src-a9f235047cb2ec4a15ea4fcbb841e5ba60d6d606.zip FreeBSD-src-a9f235047cb2ec4a15ea4fcbb841e5ba60d6d606.tar.gz |
Cosmetique: use standard prototypes scheme
Back out prev change: toupper is more compatible with sort -f
Diffstat (limited to 'usr.bin/comm')
-rw-r--r-- | usr.bin/comm/comm.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/usr.bin/comm/comm.c b/usr.bin/comm/comm.c index 545ea33..1adaaec 100644 --- a/usr.bin/comm/comm.c +++ b/usr.bin/comm/comm.c @@ -64,21 +64,9 @@ char *tabs[] = { "", "\t", "\t\t" }; FILE *file __P((char *)); void show __P((FILE *, char *, char *)); +int stricoll __P((char *, char *)); static void usage __P((void)); -int stricoll(char *s1, char *s2) -{ - char *p, line1[MAXLINELEN], line2[MAXLINELEN]; - - for (p = line1; *s1; s1++) - *p++ = tolower((unsigned char)*s1); - *p = '\0'; - for (p = line2; *s2; s2++) - *p++ = tolower((unsigned char)*s2); - *p = '\0'; - return strcoll(s1, s2); -} - int main(argc, argv) int argc; @@ -214,3 +202,18 @@ usage() (void)fprintf(stderr, "usage: comm [-123i] file1 file2\n"); exit(1); } + +int +stricoll(s1, s2) + char *s1, *s2; +{ + char *p, line1[MAXLINELEN], line2[MAXLINELEN]; + + for (p = line1; *s1; s1++) + *p++ = toupper((unsigned char)*s1); + *p = '\0'; + for (p = line2; *s2; s2++) + *p++ = toupper((unsigned char)*s2); + *p = '\0'; + return strcoll(s1, s2); +} |