• Home
  • Raw
  • Download

Lines Matching refs:cp

172 	register char *cp, **pp;  in __res_vinit()  local
248 if ((cp = getenv("LOCALDOMAIN")) != NULL) { in __res_vinit()
249 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
260 cp = statp->defdname; in __res_vinit()
262 *pp++ = cp; in __res_vinit()
263 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) { in __res_vinit()
264 if (*cp == '\n') /* silly backwards compat */ in __res_vinit()
266 else if (*cp == ' ' || *cp == '\t') { in __res_vinit()
267 *cp = 0; in __res_vinit()
270 *pp++ = cp; in __res_vinit()
276 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n') in __res_vinit()
277 cp++; in __res_vinit()
278 *cp = '\0'; in __res_vinit()
302 cp = buf + sizeof("domain") - 1; in __res_vinit()
303 while (*cp == ' ' || *cp == '\t') in __res_vinit()
304 cp++; in __res_vinit()
305 if ((*cp == '\0') || (*cp == '\n')) in __res_vinit()
307 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
309 if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL) in __res_vinit()
310 *cp = '\0'; in __res_vinit()
318 cp = buf + sizeof("search") - 1; in __res_vinit()
319 while (*cp == ' ' || *cp == '\t') in __res_vinit()
320 cp++; in __res_vinit()
321 if ((*cp == '\0') || (*cp == '\n')) in __res_vinit()
323 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
325 if ((cp = strchr(statp->defdname, '\n')) != NULL) in __res_vinit()
326 *cp = '\0'; in __res_vinit()
331 cp = statp->defdname; in __res_vinit()
333 *pp++ = cp; in __res_vinit()
334 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) { in __res_vinit()
335 if (*cp == ' ' || *cp == '\t') { in __res_vinit()
336 *cp = 0; in __res_vinit()
339 *pp++ = cp; in __res_vinit()
344 while (*cp != '\0' && *cp != ' ' && *cp != '\t') in __res_vinit()
345 cp++; in __res_vinit()
346 *cp = '\0'; in __res_vinit()
358 cp = buf + sizeof("nameserver") - 1; in __res_vinit()
359 while (*cp == ' ' || *cp == '\t') in __res_vinit()
360 cp++; in __res_vinit()
361 cp[strcspn(cp, ";# \t\n")] = '\0'; in __res_vinit()
362 if ((*cp != '\0') && (*cp != '\n')) { in __res_vinit()
368 if (getaddrinfo(cp, sbuf, &hints, &ai) == 0 && in __res_vinit()
389 cp = buf + sizeof("sortlist") - 1; in __res_vinit()
391 while (*cp == ' ' || *cp == '\t') in __res_vinit()
392 cp++; in __res_vinit()
393 if (*cp == '\0' || *cp == '\n' || *cp == ';') in __res_vinit()
395 net = cp; in __res_vinit()
396 while (*cp && !ISSORTMASK(*cp) && *cp != ';' && in __res_vinit()
397 isascii(*cp) && !isspace((unsigned char)*cp)) in __res_vinit()
398 cp++; in __res_vinit()
399 n = *cp; in __res_vinit()
400 *cp = 0; in __res_vinit()
404 *cp++ = n; in __res_vinit()
405 net = cp; in __res_vinit()
406 while (*cp && *cp != ';' && in __res_vinit()
407 isascii(*cp) && in __res_vinit()
408 !isspace((unsigned char)*cp)) in __res_vinit()
409 cp++; in __res_vinit()
410 n = *cp; in __res_vinit()
411 *cp = 0; in __res_vinit()
424 *cp = n; in __res_vinit()
450 (cp = strchr(buf, '.')) != NULL) in __res_vinit()
451 strcpy(statp->defdname, cp + 1); in __res_vinit()
460 for (cp = statp->defdname; *cp; cp++) in __res_vinit()
461 dots += (*cp == '.'); in __res_vinit()
463 cp = statp->defdname; in __res_vinit()
467 cp = strchr(cp, '.') + 1; /* we know there is one */ in __res_vinit()
468 *pp++ = cp; in __res_vinit()
482 if ((cp = getenv("RES_OPTIONS")) != NULL) in __res_vinit()
483 res_setoptions(statp, cp, "env"); in __res_vinit()
494 const char *cp = options; in res_setoptions() local
503 while (*cp) { in res_setoptions()
505 while (*cp == ' ' || *cp == '\t') in res_setoptions()
506 cp++; in res_setoptions()
508 if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) { in res_setoptions()
509 i = atoi(cp + sizeof("ndots:") - 1); in res_setoptions()
518 } else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) { in res_setoptions()
519 i = atoi(cp + sizeof("timeout:") - 1); in res_setoptions()
528 } else if (!strncmp(cp, "attempts:", sizeof("attempts:") - 1)){ in res_setoptions()
529 i = atoi(cp + sizeof("attempts:") - 1); in res_setoptions()
538 } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) { in res_setoptions()
547 } else if (!strncmp(cp, "no_tld_query", in res_setoptions()
549 !strncmp(cp, "no-tld-query", in res_setoptions()
552 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { in res_setoptions()
554 } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) { in res_setoptions()
556 } else if (!strncmp(cp, "no-check-names", in res_setoptions()
561 else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) { in res_setoptions()
565 else if (!strncmp(cp, "dname", sizeof("dname") - 1)) { in res_setoptions()
568 else if (!strncmp(cp, "nibble:", sizeof("nibble:") - 1)) { in res_setoptions()
571 cp += sizeof("nibble:") - 1; in res_setoptions()
572 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix) - 1); in res_setoptions()
573 strncpy(ext->nsuffix, cp, (size_t)i); in res_setoptions()
576 else if (!strncmp(cp, "nibble2:", sizeof("nibble2:") - 1)) { in res_setoptions()
579 cp += sizeof("nibble2:") - 1; in res_setoptions()
580 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix2) - 1); in res_setoptions()
581 strncpy(ext->nsuffix2, cp, (size_t)i); in res_setoptions()
584 else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) { in res_setoptions()
585 cp += sizeof("v6revmode:") - 1; in res_setoptions()
587 if (!strncmp(cp, "single", sizeof("single") - 1)) { in res_setoptions()
589 } else if (!strncmp(cp, "both", sizeof("both") - 1)) { in res_setoptions()
599 while (*cp && *cp != ' ' && *cp != '\t') in res_setoptions()
600 cp++; in res_setoptions()