consolidate str[n]casecmp_l into str[n]casecmp source files
this is mainly done for consistency with the ctype functions and to declutter the src/locale directory.
This commit is contained in:
1 parent
d89fdec51b
commit
7424ac58b1
4 files changed
+16
-13
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include <strings.h>
|
||||
#include <ctype.h>
|
||||
#include "libc.h"
|
||||
|
||||
int strcasecmp(const char *_l, const char *_r)
|
||||
{
|
||||
@@ -7,3 +8,10 @@ int strcasecmp(const char *_l, const char *_r)
|
||||
for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
|
||||
return tolower(*l) - tolower(*r);
|
||||
}
|
||||
|
||||
int __strcasecmp_l(const char *l, const char *r, locale_t loc)
|
||||
{
|
||||
return strcasecmp(l, r);
|
||||
}
|
||||
|
||||
weak_alias(__strcasecmp_l, strcasecmp_l);
|
||||
Reference in new issue
Block a user