Lines Matching refs:cp
171 register char *cp, **pp;
237 if ((cp = getenv("LOCALDOMAIN")) != NULL) {
238 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
249 cp = statp->defdname;
251 *pp++ = cp;
252 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) {
253 if (*cp == '\n') /* silly backwards compat */
255 else if (*cp == ' ' || *cp == '\t') {
256 *cp = 0;
259 *pp++ = cp;
265 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
266 cp++;
267 *cp = '\0';
291 cp = buf + sizeof("domain") - 1;
292 while (*cp == ' ' || *cp == '\t')
293 cp++;
294 if ((*cp == '\0') || (*cp == '\n'))
296 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
298 if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL)
299 *cp = '\0';
307 cp = buf + sizeof("search") - 1;
308 while (*cp == ' ' || *cp == '\t')
309 cp++;
310 if ((*cp == '\0') || (*cp == '\n'))
312 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
314 if ((cp = strchr(statp->defdname, '\n')) != NULL)
315 *cp = '\0';
320 cp = statp->defdname;
322 *pp++ = cp;
323 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) {
324 if (*cp == ' ' || *cp == '\t') {
325 *cp = 0;
328 *pp++ = cp;
333 while (*cp != '\0' && *cp != ' ' && *cp != '\t')
334 cp++;
335 *cp = '\0';
347 cp = buf + sizeof("nameserver") - 1;
348 while (*cp == ' ' || *cp == '\t')
349 cp++;
350 cp[strcspn(cp, ";# \t\n")] = '\0';
351 if ((*cp != '\0') && (*cp != '\n')) {
357 if (getaddrinfo(cp, sbuf, &hints, &ai) == 0 &&
378 cp = buf + sizeof("sortlist") - 1;
380 while (*cp == ' ' || *cp == '\t')
381 cp++;
382 if (*cp == '\0' || *cp == '\n' || *cp == ';')
384 net = cp;
385 while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
386 isascii(*cp) && !isspace((unsigned char)*cp))
387 cp++;
388 n = *cp;
389 *cp = 0;
393 *cp++ = n;
394 net = cp;
395 while (*cp && *cp != ';' &&
396 isascii(*cp) &&
397 !isspace((unsigned char)*cp))
398 cp++;
399 n = *cp;
400 *cp = 0;
413 *cp = n;
439 (cp = strchr(buf, '.')) != NULL)
440 strcpy(statp->defdname, cp + 1);
449 for (cp = statp->defdname; *cp; cp++)
450 dots += (*cp == '.');
452 cp = statp->defdname;
456 cp = strchr(cp, '.') + 1; /* we know there is one */
457 *pp++ = cp;
471 if ((cp = getenv("RES_OPTIONS")) != NULL)
472 res_setoptions(statp, cp, "env");
483 const char *cp = options;
492 while (*cp) {
494 while (*cp == ' ' || *cp == '\t')
495 cp++;
497 if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
498 i = atoi(cp + sizeof("ndots:") - 1);
507 } else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
508 i = atoi(cp + sizeof("timeout:") - 1);
517 } else if (!strncmp(cp, "attempts:", sizeof("attempts:") - 1)){
518 i = atoi(cp + sizeof("attempts:") - 1);
527 } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
536 } else if (!strncmp(cp, "no_tld_query",
538 !strncmp(cp, "no-tld-query",
541 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
543 } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
545 } else if (!strncmp(cp, "no-check-names",
550 else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
554 else if (!strncmp(cp, "dname", sizeof("dname") - 1)) {
557 else if (!strncmp(cp, "nibble:", sizeof("nibble:") - 1)) {
560 cp += sizeof("nibble:") - 1;
561 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix) - 1);
562 strncpy(ext->nsuffix, cp, (size_t)i);
565 else if (!strncmp(cp, "nibble2:", sizeof("nibble2:") - 1)) {
568 cp += sizeof("nibble2:") - 1;
569 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix2) - 1);
570 strncpy(ext->nsuffix2, cp, (size_t)i);
573 else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) {
574 cp += sizeof("v6revmode:") - 1;
576 if (!strncmp(cp, "single", sizeof("single") - 1)) {
578 } else if (!strncmp(cp, "both", sizeof("both") - 1)) {
588 while (*cp && *cp != ' ' && *cp != '\t')
589 cp++;