summaryrefslogtreecommitdiff
path: root/ares__get_hostent.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2006-10-18 03:42:06 +0000
committerYang Tse <yangsita@gmail.com>2006-10-18 03:42:06 +0000
commitdd3b42e1ac7536e6b5445292c298b89a7fb6c605 (patch)
tree4588498a79fc4485f9d59bdcd0f67caef5adfce6 /ares__get_hostent.c
parent2a7b004e49fb7c355dec0d299f9cd5c63c119ccd (diff)
downloadc-ares-dd3b42e1ac7536e6b5445292c298b89a7fb6c605.tar.gz
c-ares-dd3b42e1ac7536e6b5445292c298b89a7fb6c605.tar.bz2
c-ares-dd3b42e1ac7536e6b5445292c298b89a7fb6c605.zip
Replace is*() macros with our own IS*() ones.
Get rid of non ANSI/ISO isascii().
Diffstat (limited to 'ares__get_hostent.c')
-rw-r--r--ares__get_hostent.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c
index ecfd52a..333cf50 100644
--- a/ares__get_hostent.c
+++ b/ares__get_hostent.c
@@ -54,7 +54,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
/* Get the address part. */
p = line;
- while (*p && !isspace((unsigned char)*p))
+ while (*p && !ISSPACE(*p))
p++;
if (!*p)
continue;
@@ -76,12 +76,12 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
/* Get the canonical hostname. */
p++;
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
if (!*p)
continue;
q = p;
- while (*q && !isspace((unsigned char)*q))
+ while (*q && !ISSPACE(*q))
q++;
end_at_hostname = (*q == 0);
*q = 0;
@@ -92,13 +92,13 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
{
/* Count the aliases. */
p = q + 1;
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
while (*p)
{
- while (*p && !isspace((unsigned char)*p))
+ while (*p && !ISSPACE(*p))
p++;
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
naliases++;
}
@@ -128,12 +128,12 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
if (!end_at_hostname)
{
p = canonical + strlen(canonical) + 1;
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
while (*p)
{
q = p;
- while (*q && !isspace((unsigned char)*q))
+ while (*q && !ISSPACE(*q))
q++;
hostent->h_aliases[naliases] = malloc(q - p + 1);
if (hostent->h_aliases[naliases] == NULL)
@@ -141,7 +141,7 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host)
memcpy(hostent->h_aliases[naliases], p, q - p);
hostent->h_aliases[naliases][q - p] = 0;
p = q;
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
naliases++;
}