summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/flstring.c8
-rw-r--r--src/flstring.h5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/flstring.c b/src/flstring.c
index 48ad7bf39..455b048b7 100644
--- a/src/flstring.c
+++ b/src/flstring.c
@@ -93,9 +93,9 @@ fl_strlcpy(char *dst, /* O - Destination string */
#define C_RANGE(c,l,r) ( (c) >= (l) && (c) <= (r) )
/**
-* locale independent ascii oriented case cmp
-* returns 0 if string successfully compare, -1 if s<t, +1 if s>t
-*/
+ * locale independent ascii oriented case cmp
+ * returns 0 if string successfully compare, -1 if s<t, +1 if s>t
+ */
int fl_ascii_strcasecmp(const char *s, const char *t) {
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) {
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;
}
}
diff --git a/src/flstring.h b/src/flstring.h
index 4e2d9dfe2..3f565a7c9 100644
--- a/src/flstring.h
+++ b/src/flstring.h
@@ -84,7 +84,10 @@ FL_EXPORT extern size_t fl_strlcpy(char *, const char *, size_t);
# define strlcpy fl_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);
# ifdef __cplusplus