version 1.12, 2009/04/12 17:07:17 |
version 1.13, 2009/10/24 21:37:57 |
Line 454 res_hostalias(const res_state statp, con |
|
Line 454 res_hostalias(const res_state statp, con |
|
file = getenv("HOSTALIASES"); |
file = getenv("HOSTALIASES"); |
if (file == NULL || (fp = fopen(file, "r")) == NULL) |
if (file == NULL || (fp = fopen(file, "r")) == NULL) |
return (NULL); |
return (NULL); |
setbuf(fp, NULL); |
|
buf[sizeof(buf) - 1] = '\0'; |
buf[sizeof(buf) - 1] = '\0'; |
while (fgets(buf, sizeof(buf), fp)) { |
while (fgets(buf, sizeof(buf), fp)) { |
for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1) |
for (cp1 = buf; *cp1 && !isspace((unsigned char)*cp1); ++cp1) |