Lines Matching refs:cp
155 register char *cp, **pp; in res_init() local
215 if (issetugid() == 0 && (cp = getenv("LOCALDOMAIN")) != NULL) in res_init()
217 if ((cp = getenv("LOCALDOMAIN")) != NULL) in res_init()
220 (void)strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1); in res_init()
231 cp = _res.defdname; in res_init()
233 *pp++ = cp; in res_init()
234 for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) { in res_init()
235 if (*cp == '\n') /* silly backwards compat */ in res_init()
237 else if (*cp == ' ' || *cp == '\t') { in res_init()
238 *cp = 0; in res_init()
241 *pp++ = cp; in res_init()
247 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n') in res_init()
248 cp++; in res_init()
249 *cp = '\0'; in res_init()
268 cp = buf + sizeof("domain") - 1; in res_init()
269 while (*cp == ' ' || *cp == '\t') in res_init()
270 cp++; in res_init()
271 if ((*cp == '\0') || (*cp == '\n')) in res_init()
273 strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1); in res_init()
275 if ((cp = strpbrk(_res.defdname, " \t\n")) != NULL) in res_init()
276 *cp = '\0'; in res_init()
284 cp = buf + sizeof("search") - 1; in res_init()
285 while (*cp == ' ' || *cp == '\t') in res_init()
286 cp++; in res_init()
287 if ((*cp == '\0') || (*cp == '\n')) in res_init()
289 strncpy(_res.defdname, cp, sizeof(_res.defdname) - 1); in res_init()
291 if ((cp = strchr(_res.defdname, '\n')) != NULL) in res_init()
292 *cp = '\0'; in res_init()
297 cp = _res.defdname; in res_init()
299 *pp++ = cp; in res_init()
300 for (n = 0; *cp && pp < _res.dnsrch + MAXDNSRCH; cp++) { in res_init()
301 if (*cp == ' ' || *cp == '\t') { in res_init()
302 *cp = 0; in res_init()
305 *pp++ = cp; in res_init()
310 while (*cp != '\0' && *cp != ' ' && *cp != '\t') in res_init()
311 cp++; in res_init()
312 *cp = '\0'; in res_init()
321 cp = buf + sizeof("nameserver") - 1; in res_init()
322 while (*cp == ' ' || *cp == '\t') in res_init()
323 cp++; in res_init()
324 if ((*cp != '\0') && (*cp != '\n') && inet_aton(cp, &a)) { in res_init()
337 cp = buf + sizeof("sortlist") - 1; in res_init()
339 while (*cp == ' ' || *cp == '\t') in res_init()
340 cp++; in res_init()
341 if (*cp == '\0' || *cp == '\n' || *cp == ';') in res_init()
343 net = cp; in res_init()
344 while (*cp && !ISSORTMASK(*cp) && *cp != ';' && in res_init()
345 isascii(*cp) && !isspace(*cp)) in res_init()
346 cp++; in res_init()
347 n = *cp; in res_init()
348 *cp = 0; in res_init()
352 *cp++ = (char)n; in res_init()
353 net = cp; in res_init()
354 while (*cp && *cp != ';' && in res_init()
355 isascii(*cp) && !isspace(*cp)) in res_init()
356 cp++; in res_init()
357 n = *cp; in res_init()
358 *cp = 0; in res_init()
371 *cp = (char)n; in res_init()
390 (cp = strchr(buf, '.')) != NULL) in res_init()
391 strcpy(_res.defdname, cp + 1); in res_init()
401 for (cp = _res.defdname; *cp; cp++) in res_init()
402 dots += (*cp == '.'); in res_init()
404 cp = _res.defdname; in res_init()
408 cp = strchr(cp, '.') + 1; /* we know there is one */ in res_init()
409 *pp++ = cp; in res_init()
430 else if ((cp = getenv("RES_OPTIONS")) != NULL) in res_init()
431 res_setoptions(cp, "env"); in res_init()
445 char *cp = options; in res_setoptions() local
453 while (*cp) { in res_setoptions()
455 while (*cp == ' ' || *cp == '\t') in res_setoptions()
456 cp++; in res_setoptions()
458 if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) { in res_setoptions()
459 i = atoi(cp + sizeof("ndots:") - 1); in res_setoptions()
468 } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) { in res_setoptions()
477 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { in res_setoptions()
479 } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1)) { in res_setoptions()
485 while (*cp && *cp != ' ' && *cp != '\t') in res_setoptions()
486 cp++; in res_setoptions()