mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
use our own ISUPPER and ISLOWER macros
This commit is contained in:
parent
6d05a33ed9
commit
0db485a448
@ -86,7 +86,7 @@ inet_net_pton_ipv4(const char *src, unsigned char *dst, size_t size)
|
||||
dirty = 0;
|
||||
src++; /* skip x or X. */
|
||||
while ((ch = *src++) != '\0' && ISXDIGIT(ch)) {
|
||||
if (isupper(ch))
|
||||
if (ISUPPER(ch))
|
||||
ch = tolower(ch);
|
||||
n = (int)(strchr(xdigits, ch) - xdigits);
|
||||
if (dirty == 0)
|
||||
|
@ -122,6 +122,8 @@
|
||||
#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
|
||||
#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
|
||||
#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
|
||||
#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
|
||||
#define ISLOWER(x) (islower((int) ((unsigned char)x)))
|
||||
|
||||
|
||||
/*
|
||||
|
@ -41,8 +41,8 @@ ares_strncasecmp(const char *a, const char *b, int n)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
int c1 = isupper(a[i]) ? tolower(a[i]) : a[i];
|
||||
int c2 = isupper(b[i]) ? tolower(b[i]) : b[i];
|
||||
int c1 = ISUPPER(a[i]) ? tolower(a[i]) : a[i];
|
||||
int c2 = ISUPPER(b[i]) ? tolower(b[i]) : b[i];
|
||||
if (c1 != c2) return c1-c2;
|
||||
}
|
||||
return 0;
|
||||
|
@ -129,6 +129,8 @@
|
||||
#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
|
||||
#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
|
||||
#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
|
||||
#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
|
||||
#define ISLOWER(x) (islower((int) ((unsigned char)x)))
|
||||
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user