• Home
  • Raw
  • Download

Lines Matching refs:cp

132     char *cp, **pp;  in res_vinit()  local
170 (cp = strchr(buf, '.')) != NULL) in res_vinit()
171 strcpy(statp->defdname, cp + 1); in res_vinit()
180 for (cp = statp->defdname; *cp; cp++) dots += (*cp == '.'); in res_vinit()
182 cp = statp->defdname; in res_vinit()
185 cp = strchr(cp, '.') + 1; /* we know there is one */ in res_vinit()
186 *pp++ = cp; in res_vinit()
194 if ((cp = getenv("RES_OPTIONS")) != NULL) res_setoptions(statp, cp, "env"); in res_vinit()
203 const char* cp = options; in res_setoptions() local
209 while (*cp) { in res_setoptions()
211 while (*cp == ' ' || *cp == '\t') cp++; in res_setoptions()
213 if (!strncmp(cp, "ndots:", sizeof("ndots:") - 1)) { in res_setoptions()
214 i = atoi(cp + sizeof("ndots:") - 1); in res_setoptions()
221 } else if (!strncmp(cp, "debug", sizeof("debug") - 1)) { in res_setoptions()
228 } else if (!strncmp(cp, "no_tld_query", sizeof("no_tld_query") - 1) || in res_setoptions()
229 !strncmp(cp, "no-tld-query", sizeof("no-tld-query") - 1)) { in res_setoptions()
231 } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) { in res_setoptions()
233 } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) { in res_setoptions()
235 } else if (!strncmp(cp, "no-check-names", sizeof("no-check-names") - 1)) { in res_setoptions()
238 else if (!strncmp(cp, "edns0", sizeof("edns0") - 1)) { in res_setoptions()
241 else if (!strncmp(cp, "dname", sizeof("dname") - 1)) { in res_setoptions()
243 } else if (!strncmp(cp, "nibble:", sizeof("nibble:") - 1)) { in res_setoptions()
245 cp += sizeof("nibble:") - 1; in res_setoptions()
246 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix) - 1); in res_setoptions()
247 strncpy(ext->nsuffix, cp, (size_t) i); in res_setoptions()
249 } else if (!strncmp(cp, "nibble2:", sizeof("nibble2:") - 1)) { in res_setoptions()
251 cp += sizeof("nibble2:") - 1; in res_setoptions()
252 i = MIN(strcspn(cp, " \t"), sizeof(ext->nsuffix2) - 1); in res_setoptions()
253 strncpy(ext->nsuffix2, cp, (size_t) i); in res_setoptions()
255 } else if (!strncmp(cp, "v6revmode:", sizeof("v6revmode:") - 1)) { in res_setoptions()
256 cp += sizeof("v6revmode:") - 1; in res_setoptions()
258 if (!strncmp(cp, "single", sizeof("single") - 1)) { in res_setoptions()
260 } else if (!strncmp(cp, "both", sizeof("both") - 1)) { in res_setoptions()
268 while (*cp && *cp != ' ' && *cp != '\t') cp++; in res_setoptions()