summaryrefslogtreecommitdiff
path: root/libc/string/strcasecmp.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2000-10-07 23:37:03 +0000
committerEric Andersen <andersen@codepoet.org>2000-10-07 23:37:03 +0000
commitfbb4007ac88656122f9319dea4563a3a4fd40e82 (patch)
treeca4265ac43d139b3fd02ba32bfe6d5e12cadb65c /libc/string/strcasecmp.c
parentb8f03a94957c913fa0d8588c41b0332b49310ff0 (diff)
Update and simplification.
Diffstat (limited to 'libc/string/strcasecmp.c')
-rw-r--r--libc/string/strcasecmp.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/libc/string/strcasecmp.c b/libc/string/strcasecmp.c
index c6144ff23..0ec81f641 100644
--- a/libc/string/strcasecmp.c
+++ b/libc/string/strcasecmp.c
@@ -6,21 +6,16 @@
#include <string.h>
#include <ctype.h>
-int
-strcasecmp(s, d)
-const char *s;
-const char *d;
+int strcasecmp( const char *s, const char *d)
{
- for(;;)
- {
- if( *s != *d )
- {
- if( tolower(*s) != tolower(*d) )
- return *s - *d;
- }
- else if( *s == '\0' ) break;
- s++; d++;
- }
- return 0;
+ for (;;) {
+ if (*s != *d) {
+ if (tolower(*s) != tolower(*d))
+ return *s - *d;
+ } else if (*s == '\0')
+ break;
+ s++;
+ d++;
+ }
+ return 0;
}
-