mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 22:04:26 +08:00
Minor comments formatting discrepancies fix.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9573 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+4
-4
@@ -93,9 +93,9 @@ fl_strlcpy(char *dst, /* O - Destination string */
|
|||||||
#define C_RANGE(c,l,r) ( (c) >= (l) && (c) <= (r) )
|
#define C_RANGE(c,l,r) ( (c) >= (l) && (c) <= (r) )
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* locale independent ascii oriented case cmp
|
* locale independent ascii oriented case cmp
|
||||||
* returns 0 if string successfully compare, -1 if s<t, +1 if s>t
|
* returns 0 if string successfully compare, -1 if s<t, +1 if s>t
|
||||||
*/
|
*/
|
||||||
int fl_ascii_strcasecmp(const char *s, const char *t) {
|
int fl_ascii_strcasecmp(const char *s, const char *t) {
|
||||||
if (!s || !t) return (s==t ? 0 : (!s ? -1 : +1));
|
if (!s || !t) return (s==t ? 0 : (!s ? -1 : +1));
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ int fl_ascii_strcasecmp(const char *s, const char *t) {
|
|||||||
if (*s == *t) continue;
|
if (*s == *t) continue;
|
||||||
if (*s < *t) {
|
if (*s < *t) {
|
||||||
if ( (*s+0x20)!=*t || !C_RANGE(*s,'A','Z') ) return -1;
|
if ( (*s+0x20)!=*t || !C_RANGE(*s,'A','Z') ) return -1;
|
||||||
} else { /* *s > *t */
|
} else { /* (*s > *t) */
|
||||||
if ( (*s-0x20)!=*t || !C_RANGE(*s,'a','z') ) return +1;
|
if ( (*s-0x20)!=*t || !C_RANGE(*s,'a','z') ) return +1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-1
@@ -84,7 +84,10 @@ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
|
|||||||
# define strlcpy fl_strlcpy
|
# define strlcpy fl_strlcpy
|
||||||
# endif /* !HAVE_STRLCPY */
|
# endif /* !HAVE_STRLCPY */
|
||||||
|
|
||||||
/* locale independent ascii compare, does not introduce locale pbs as w/ case cmp */
|
/*
|
||||||
|
* locale independent ascii compare, does not introduce locale
|
||||||
|
* pbs as w/ case cmp
|
||||||
|
*/
|
||||||
FL_EXPORT extern int fl_ascii_strcasecmp(const char *s, const char *t);
|
FL_EXPORT extern int fl_ascii_strcasecmp(const char *s, const char *t);
|
||||||
|
|
||||||
# ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user