Lines Matching refs:cp
175 register char *cp, **pp;
179 if ((cp = strchr(statp->defdname, '\n')) != NULL)
180 *cp = '\0';
181 cp = statp->defdname;
184 while (*cp == ' ' || *cp == '\t') /* skip leading white space */
185 cp++;
186 if (*cp == '\0') /* stop if nothing more */
188 *pp++ = cp; /* record this search domain */
189 while (*cp) { /* zero-terminate it */
190 if (*cp == ' ' || *cp == '\t') {
191 *cp++ = '\0';
194 cp++;
211 register char *cp, **pp;
283 if ((cp = getenv("LOCALDOMAIN")) != NULL) {
284 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
295 cp = statp->defdname;
297 *pp++ = cp;
298 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) {
299 if (*cp == '\n') /* silly backwards compat */
301 else if (*cp == ' ' || *cp == '\t') {
302 *cp = 0;
305 *pp++ = cp;
311 while (*cp != '\0' && *cp != ' ' && *cp != '\t' && *cp != '\n')
312 cp++;
313 *cp = '\0';
354 cp = propvalue;
356 while (*cp == ' ' || *cp == '\t')
357 cp++;
358 cp[strcspn(cp, ";# \t\n")] = '\0';
359 if ((*cp != '\0') && (*cp != '\n')) {
365 if (getaddrinfo(cp, sbuf, &hints, &ai) == 0 &&
403 cp = buf + sizeof("domain") - 1;
404 while (*cp == ' ' || *cp == '\t')
405 cp++;
406 if ((*cp == '\0') || (*cp == '\n'))
408 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
410 if ((cp = strpbrk(statp->defdname, " \t\n")) != NULL)
411 *cp = '\0';
419 cp = buf + sizeof("search") - 1;
420 while (*cp == ' ' || *cp == '\t')
421 cp++;
422 if ((*cp == '\0') || (*cp == '\n'))
424 strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
426 if ((cp = strchr(statp->defdname, '\n')) != NULL)
427 *cp = '\0';
432 cp = statp->defdname;
434 *pp++ = cp;
435 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) {
436 if (*cp == ' ' || *cp == '\t') {
437 *cp = 0;
440 *pp++ = cp;
445 while (*cp != '\0' && *cp != ' ' && *cp != '\t')
446 cp++;
447 *cp = '\0';
459 cp = buf + sizeof("nameserver") - 1;
460 while (*cp == ' ' || *cp == '\t')
461 cp++;
462 cp[strcspn(cp, ";# \t\n")] = '\0';
463 if ((*cp != '\0') && (*cp != '\n')) {
469 if (getaddrinfo(cp, sbuf, &hints, &ai) == 0 &&
490 cp = buf + sizeof("sortlist") - 1;
492 while (*cp == ' ' || *cp == '\t')
493 cp++;
494 if (*cp == '\0' || *cp == '\n' || *cp == ';')
496 net = cp;
497 while (*cp && !ISSORTMASK(*cp) && *cp != ';' &&
498 isascii(*cp) && !isspace((unsigned char)*cp))
499 cp++;
500 n = *cp;
501 *cp = 0;
505 *cp++ = n;
506 net = cp;
507 while (*cp && *cp != ';' &&
508 isascii(*cp) &&
509 !isspace((unsigned char)*cp))
510 cp++;
511 n = *cp;
512 *cp = 0;
525 *cp = n;
551 (cp = strchr(buf, '.')) != NULL)
552 strcpy(statp->defdname, cp + 1);
561 for (cp = statp->defdname; *cp; cp++)
562 dots += (*cp == '.');
564 cp = statp->defdname;
568 cp = strchr(cp, '.') + 1; /* we know there is one */
569 *pp++ = cp;
583 if ((cp = getenv("RES_OPTIONS")) != NULL)
584 res_setoptions(statp, cp, "env");
595 const char *cp = options;
604 while (*cp) {
606 while (*cp == ' ' || *cp == '\t')
607 cp++;
609 if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) {
610 i = atoi(cp + sizeof("ndots:") - 1);
619 } else if (!strncmp(cp, "timeout:", sizeof("timeout:") - 1)) {
620 i = atoi(cp + sizeof("timeout:") - 1);
629 } else if (!strncmp(cp, "attempts:", sizeof("attempts:") - 1)){
630 i = atoi(cp + sizeof("attempts:") - 1);
639 } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) {
648 } else if (!strncmp(cp, "no_tld_query",
650 !strncmp(cp, "no-tld-query",
653 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
655 } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
657 } else if (!strncmp(cp, "no-check-names",
662 else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) {
666 else if (!strncmp(cp, "dname", sizeof("dname") - 1)) {
669 else if (!strncmp(cp, "nibble:", sizeof("nibble:") - 1)) {
672 cp += sizeof("nibble:") - 1;
673 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix) - 1);
674 strncpy(ext->nsuffix, cp, (size_t)i);
677 else if (!strncmp(cp, "nibble2:", sizeof("nibble2:") - 1)) {
680 cp += sizeof("nibble2:") - 1;
681 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix2) - 1);
682 strncpy(ext->nsuffix2, cp, (size_t)i);
685 else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) {
686 cp += sizeof("v6revmode:") - 1;
688 if (!strncmp(cp, "single", sizeof("single") - 1)) {
690 } else if (!strncmp(cp, "both", sizeof("both") - 1)) {
700 while (*cp && *cp != ' ' && *cp != '\t')
701 cp++;