mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-25 03:54:17 +01:00
Cosmetique: use standard prototypes scheme
Back out prev change: toupper is more compatible with sort -f
This commit is contained in:
parent
e91cb30636
commit
fe6e52a784
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=52461
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user