From fbb4007ac88656122f9319dea4563a3a4fd40e82 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 7 Oct 2000 23:37:03 +0000 Subject: Update and simplification. --- libc/string/strcasecmp.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'libc/string/strcasecmp.c') 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 #include -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; } - -- cgit v1.2.3