Home
last modified time | relevance | path

Searched refs:cp (Results 1 – 25 of 33) sorted by relevance

12

/bionic/libc/dns/resolv/
Dres_mkquery.c128 register u_char *cp, *ep; in res_nmkquery() local
150 cp = buf + HFIXEDSZ; in res_nmkquery()
162 if (ep - cp < QFIXEDSZ) in res_nmkquery()
164 if ((n = dn_comp(dname, cp, ep - cp - QFIXEDSZ, dnptrs, in res_nmkquery()
167 cp += n; in res_nmkquery()
168 ns_put16(type, cp); in res_nmkquery()
169 cp += INT16SZ; in res_nmkquery()
170 ns_put16(class, cp); in res_nmkquery()
171 cp += INT16SZ; in res_nmkquery()
178 if ((ep - cp) < RRFIXEDSZ) in res_nmkquery()
[all …]
Dres_init.c172 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()
[all …]
Dres_debug.c202 const u_char *cp = ns_rr_rdata(rr); in do_section() local
205 GETSHORT(optcode, cp); in do_section()
206 GETSHORT(optlen, cp); in do_section()
216 cp[i]); in do_section()
220 isprint(cp[i])? in do_section()
221 cp[i] : '.'); in do_section()
233 cp[i]); in do_section()
237 isprint(cp[i]) ? in do_section()
238 cp[i] : '.'); in do_section()
351 p_cdnname(const u_char *cp, const u_char *msg, int len, FILE *file) { in p_cdnname() argument
[all …]
Dres_query.c228 const char *cp, * const *domain; in res_nsearch() local
241 for (cp = name; *cp != '\0'; cp++) in res_nsearch()
242 dots += (*cp == '.'); in res_nsearch()
244 if (cp > name && *--cp == '.') in res_nsearch()
248 if (!dots && (cp = res_hostalias(statp, name, tmp, sizeof tmp))!= NULL) in res_nsearch()
249 return (res_nquery(statp, cp, class, type, answer, anslen)); in res_nsearch()
Dres_send.c291 const u_char *cp = buf + HFIXEDSZ; in res_nameinquery() local
298 n = dn_expand(buf, eom, cp, tname, sizeof tname); in res_nameinquery()
301 cp += n; in res_nameinquery()
302 if (cp + 2 * INT16SZ > eom) in res_nameinquery()
304 ttype = ns_get16(cp); cp += INT16SZ; in res_nameinquery()
305 tclass = ns_get16(cp); cp += INT16SZ; in res_nameinquery()
328 const u_char *cp = buf1 + HFIXEDSZ; in res_queriesmatch() local
348 n = dn_expand(buf1, eom1, cp, tname, sizeof tname); in res_queriesmatch()
351 cp += n; in res_queriesmatch()
352 if (cp + 2 * INT16SZ > eom1) in res_queriesmatch()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/net/
Dinet_network.c42 inet_network(const char *cp) in inet_network() argument
51 if (*cp == '0') in inet_network()
52 base = 8, cp++; in inet_network()
53 if (*cp == 'x' || *cp == 'X') in inet_network()
54 base = 16, cp++; in inet_network()
55 while ((c = *cp)) { in inet_network()
58 cp++; in inet_network()
63 cp++; in inet_network()
68 if (*cp == '.') { in inet_network()
71 *pp++ = val, cp++; in inet_network()
[all …]
Dinet_addr.c65 inet_addr(const char *cp) in inet_addr() argument
69 if (inet_aton(cp, &val)) in inet_addr()
82 inet_aton(const char *cp, struct in_addr *addr) in inet_aton() argument
90 c = *cp; in inet_aton()
101 c = *++cp; in inet_aton()
103 base = 16, c = *++cp; in inet_aton()
111 c = *++cp; in inet_aton()
117 c = *++cp; in inet_aton()
131 c = *++cp; in inet_aton()
/bionic/libc/upstream-freebsd/lib/libc/string/
Dwcscat.c42 wchar_t *cp; in wcscat() local
44 cp = s1; in wcscat()
45 while (*cp != L'\0') in wcscat()
46 cp++; in wcscat()
47 while ((*cp++ = *s2++) != L'\0') in wcscat()
Dwcscpy.c42 wchar_t *cp; in wcscpy() local
44 cp = s1; in wcscpy()
45 while ((*cp++ = *s2++) != L'\0') in wcscpy()
/bionic/libc/upstream-openbsd/lib/libc/string/
Dmemrchr.c28 const unsigned char *cp; in memrchr() local
31 cp = (unsigned char *)s + n; in memrchr()
33 if (*(--cp) == (unsigned char)c) in memrchr()
34 return((void *)cp); in memrchr()
/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Dgetenv.c52 char **p, *cp; in __findenv() local
56 for (p = environ + *offset; (cp = *p) != NULL; ++p) { in __findenv()
57 for (np = name, i = len; i && *cp; i--) in __findenv()
58 if (*cp++ != *np++) in __findenv()
60 if (i == 0 && *cp++ == '=') { in __findenv()
62 return (cp); in __findenv()
Dsetenv.c48 char **P, *cp; in putenv() local
52 for (cp = str; *cp && *cp != '='; ++cp) in putenv()
54 if (*cp != '=') { in putenv()
59 if (__findenv(str, (int)(cp - str), &offset) != NULL) { in putenv()
62 while (__findenv(str, (int)(cp - str), &offset)) { in putenv()
/bionic/libc/dns/nameser/
Dns_name.c100 const u_char *cp; in ns_name_ntop() local
106 cp = src; in ns_name_ntop()
110 while ((n = *cp++) != 0) { in ns_name_ntop()
123 if ((l = labellen(cp - 1)) < 0) { in ns_name_ntop()
139 if ((m = decode_bitstring(&cp, dn, eom)) < 0) in ns_name_ntop()
148 c = *cp++; in ns_name_ntop()
224 char *cp; in ns_name_pton2() local
234 if ((cp = strchr(src, ']')) == NULL) { in ns_name_pton2()
238 if ((e = encode_bitsring(&src, cp + 2, in ns_name_pton2()
254 else if ((cp = strchr(digits, c)) != NULL) { in ns_name_pton2()
[all …]
Dns_samedomain.c58 const char *cp; in ns_samedomain() local
144 cp = a + diff; in ns_samedomain()
145 return (strncasecmp(cp, b, lb) == 0); in ns_samedomain()
/bionic/libc/dns/net/
Dgethnamaddr.c189 cp += (x); \
190 if (cp > eom) \
205 const u_char *cp; in getanswer() local
248 cp = answer->buf; in getanswer()
253 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
277 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
278 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
283 cp += n; /* name */ in getanswer()
284 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
285 type = _getshort(cp); in getanswer()
[all …]
Dgetaddrinfo.c1019 char *cp, *hostname2 = NULL, *scope, *addr; in explore_numeric_scope()
1040 cp = strchr(hostname, SCOPE_DELIMITER); in explore_numeric_scope()
1041 if (cp == NULL) in explore_numeric_scope()
1051 hostname2[cp - hostname] = '\0'; in explore_numeric_scope()
1053 scope = cp + 1; in explore_numeric_scope()
1302 const u_char *cp; in getanswer() local
1338 cp = answer->buf + HFIXEDSZ; in getanswer()
1343 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer()
1348 cp += n + QFIXEDSZ; in getanswer()
1366 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
[all …]
Dsethostent.c172 char **cp; in _hf_gethtbyname2() local
173 for (cp = hp->h_aliases; *cp != NULL; cp++) in _hf_gethtbyname2()
174 if (strcasecmp(*cp, name) == 0) in _hf_gethtbyname2()
176 if (*cp == NULL) continue; in _hf_gethtbyname2()
/bionic/libc/upstream-openbsd/lib/libc/stdio/
Dvfprintf.c278 char *cp; /* handy char pointer (short term usage) */ in __vfprintf() local
431 cp = fmt; \ in __vfprintf()
432 while (is_digit(*cp)) { \ in __vfprintf()
433 APPEND_DIGIT(n2, *cp); \ in __vfprintf()
434 cp++; \ in __vfprintf()
436 if (*cp == '$') { \ in __vfprintf()
445 fmt = ++cp; \ in __vfprintf()
488 cp = fmt; in __vfprintf()
496 if (fmt != cp) { in __vfprintf()
497 ptrdiff_t m = fmt - cp; in __vfprintf()
[all …]
Dvfwprintf.c284 wchar_t *cp; /* handy char pointer (short term usage) */ in __vfwprintf() local
419 cp = fmt; \ in __vfwprintf()
420 while (is_digit(*cp)) { \ in __vfwprintf()
421 APPEND_DIGIT(n2, *cp); \ in __vfwprintf()
422 cp++; \ in __vfwprintf()
424 if (*cp == '$') { \ in __vfwprintf()
433 fmt = ++cp; \ in __vfwprintf()
470 for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++) in __vfwprintf()
472 if (fmt != cp) { in __vfwprintf()
473 ptrdiff_t m = fmt - cp; in __vfwprintf()
[all …]
Dmktemp.c47 char *start, *cp, *ep; in mktemp_internal() local
76 cp = start; in mktemp_internal()
86 for (i = 0; i < nitems(rbuf) && cp != ep; i++) in mktemp_internal()
87 *cp++ = tempchars[rbuf[i] % NUM_CHARS]; in mktemp_internal()
88 } while (cp != ep); in mktemp_internal()
/bionic/libc/upstream-netbsd/lib/libc/regex/
Dregex2.h168 #define MCadd(p, cs, cp) mcadd(p, cs, cp) /* regcomp() internal fns */ argument
169 #define MCsub(p, cs, cp) mcsub(p, cs, cp) argument
170 #define MCin(p, cs, cp) mcin(p, cs, cp) argument
Dregcomp.c151 static void mcadd(struct parse *p, cset *cs, const char *cp);
153 static void mcsub(cset *cs, char *cp);
154 static int mcin(cset *cs, char *cp);
155 static char *mcfind(cset *cs, char *cp);
915 const struct cclass *cp; in p_b_cclass() local
928 for (cp = cclasses; cp->name != NULL; cp++) in p_b_cclass()
929 if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0') in p_b_cclass()
931 if (cp->name == NULL) { in p_b_cclass()
937 u = cp->chars; in p_b_cclass()
940 for (u = cp->multis; *u != '\0'; u += strlen(u) + 1) in p_b_cclass()
[all …]
/bionic/libc/include/arpa/
Dnameser.h485 #define NS_GET16(s, cp) do { \ argument
486 const u_char *t_cp = (const u_char *)(cp); \
490 (cp) += NS_INT16SZ; \
493 #define NS_GET32(l, cp) do { \ argument
494 const u_char *t_cp = (const u_char *)(cp); \
500 (cp) += NS_INT32SZ; \
503 #define NS_PUT16(s, cp) do { \ argument
505 u_char *t_cp = (u_char *)(cp); \
508 (cp) += NS_INT16SZ; \
511 #define NS_PUT32(l, cp) do { \ argument
[all …]
/bionic/libc/kernel/tools/
Dgenerate_uapi_headers.sh72 cp ${file} ${tgt_dir}
96 cp ${file} ${tgt_dir}
/bionic/tests/libs/
DAndroid.build.dlext_testzip.mk39 $(hide) cp $^ $(dir $@)/libdir

12