summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Costantini <fabien@onepost.net>2012-04-24 04:40:50 +0000
committerFabien Costantini <fabien@onepost.net>2012-04-24 04:40:50 +0000
commit6588c7f390245e7c8c1f97ae5f4c35c96f4f7080 (patch)
tree86d76ec3515c9d0faa2f149558334db23e3d3940
parent2340ea06a6329f0d4abdb87880769969572b0614 (diff)
Fixed indentation as specified by the CMP
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9398 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/flstring.c26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/flstring.c b/src/flstring.c
index 3bab28ca0..c6f2825d7 100644
--- a/src/flstring.c
+++ b/src/flstring.c
@@ -97,20 +97,18 @@ fl_strlcpy(char *dst, /* O - Destination string */
#define C_RANGE(c,l,r) ( (c) >= (l) && (c) <= (r) )
int fl_ascii_strcasecmp(const char *s, const char *t) {
- if (!s || !t) return (s!=t);
- size_t sl=strlen(s), tl=strlen(t);
-
- for(;*s && *t; s++,t++) {
- if (*s == *t) continue;
- if (*s < *t) {
- if ( (*s+0x20)!=*t || !C_RANGE(*s,'A','Z') ) return -1;
- } else { // *s > *t
- if ( (*s-0x20)!=*t || !C_RANGE(*s,'a','z') ) return +1;
- }
- }
- if (sl!=tl) return sl< tl ? -1 : +1;
-
- return 0;
+ if (!s || !t) return (s!=t);
+ size_t sl=strlen(s), tl=strlen(t);
+
+ for(;*s && *t; s++,t++) {
+ if (*s == *t) continue;
+ if (*s < *t) {
+ if ( (*s+0x20)!=*t || !C_RANGE(*s,'A','Z') ) return -1;
+ } else { // *s > *t
+ if ( (*s-0x20)!=*t || !C_RANGE(*s,'a','z') ) return +1;
+ }
+ }
+ return (sl==tl) ? 0 : (sl< tl ? -1 : +1);
}
/*