Home
last modified time | relevance | path

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

12

/bionic/libc/dns/resolv/
Dres_mkquery.c127 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.c171 register char *cp, **pp; in __res_vinit() local
249 if ((cp = getenv("LOCALDOMAIN")) != NULL) { in __res_vinit()
250 (void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1); in __res_vinit()
261 cp = statp->defdname; in __res_vinit()
263 *pp++ = cp; in __res_vinit()
264 for (n = 0; *cp && pp < statp->dnsrch + MAXDNSRCH; cp++) { in __res_vinit()
265 if (*cp == '\n') /* silly backwards compat */ in __res_vinit()
267 else if (*cp == ' ' || *cp == '\t') { in __res_vinit()
268 *cp = 0; in __res_vinit()
271 *pp++ = cp; in __res_vinit()
[all …]
Dres_debug.c220 const u_char *cp = ns_rr_rdata(rr); in do_section() local
223 GETSHORT(optcode, cp); in do_section()
224 GETSHORT(optlen, cp); in do_section()
234 cp[i]); in do_section()
238 isprint(cp[i])? in do_section()
239 cp[i] : '.'); in do_section()
251 cp[i]); in do_section()
255 isprint(cp[i]) ? in do_section()
256 cp[i] : '.'); in do_section()
369 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.c279 const u_char *cp = buf + HFIXEDSZ; in res_nameinquery() local
286 n = dn_expand(buf, eom, cp, tname, sizeof tname); in res_nameinquery()
289 cp += n; in res_nameinquery()
290 if (cp + 2 * INT16SZ > eom) in res_nameinquery()
292 ttype = ns_get16(cp); cp += INT16SZ; in res_nameinquery()
293 tclass = ns_get16(cp); cp += INT16SZ; in res_nameinquery()
316 const u_char *cp = buf1 + HFIXEDSZ; in res_queriesmatch() local
336 n = dn_expand(buf1, eom1, cp, tname, sizeof tname); in res_queriesmatch()
339 cp += n; in res_queriesmatch()
340 if (cp + 2 * INT16SZ > eom1) in res_queriesmatch()
[all …]
/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/stdio/
Dvfprintf.cpp48 CHAR_TYPE* cp; /* handy char pointer (short term usage) */ in FUNCTION_NAME() local
164 for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++) continue; in FUNCTION_NAME()
165 if (fmt != cp) { in FUNCTION_NAME()
166 ptrdiff_t m = fmt - cp; in FUNCTION_NAME()
168 PRINT(cp, m); in FUNCTION_NAME()
327 cp = buf; in FUNCTION_NAME()
330 *(cp = buf) = GETARG(int); in FUNCTION_NAME()
362 dtoaresult = cp = __hldtoa(fparg.ldbl, xdigs, prec, &expt, &signflag, &dtoaend); in FUNCTION_NAME()
369 dtoaresult = cp = __hdtoa(fparg.dbl, xdigs, prec, &expt, &signflag, &dtoaend); in FUNCTION_NAME()
399 dtoaresult = cp = __ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec, &expt, &signflag, &dtoaend); in FUNCTION_NAME()
[all …]
Dvfwprintf.cpp48 CHAR_TYPE* cp; /* handy char pointer (short term usage) */ in FUNCTION_NAME() local
153 for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++) continue; in FUNCTION_NAME()
154 if (fmt != cp) { in FUNCTION_NAME()
155 ptrdiff_t m = fmt - cp; in FUNCTION_NAME()
157 PRINT(cp, m); in FUNCTION_NAME()
307 *(cp = buf) = (wchar_t)GETARG(wint_t); in FUNCTION_NAME()
309 *(cp = buf) = (wchar_t)btowc(GETARG(int)); in FUNCTION_NAME()
356 cp = convbuf = helpers::mbsconv(dtoaresult, -1); in FUNCTION_NAME()
357 if (cp == nullptr) goto error; in FUNCTION_NAME()
396 cp = convbuf = helpers::mbsconv(dtoaresult, -1); in FUNCTION_NAME()
[all …]
Dprintf_common.h277 cp = fmt; \
278 while (is_digit(*cp)) { \
279 APPEND_DIGIT(n2, *cp); \
280 cp++; \
282 if (*cp == '$') { \
294 fmt = ++cp; \
368 cp = fmt; \ in __find_arguments()
369 while (is_digit(*cp)) { \ in __find_arguments()
370 APPEND_DIGIT(n2, *cp); \ in __find_arguments()
371 cp++; \ in __find_arguments()
[all …]
/bionic/libc/dns/net/
Dgethnamaddr.c205 BOUNDS_CHECK(cp, x); \
206 cp += (x); \
220 const u_char *cp; in getanswer() local
263 cp = answer->buf; in getanswer()
268 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
292 while (ancount-- > 0 && cp < eom && !had_error) { in getanswer()
293 n = dn_expand(answer->buf, eom, cp, bp, (int)(ep - bp)); in getanswer()
298 cp += n; /* name */ in getanswer()
299 BOUNDS_CHECK(cp, 3 * INT16SZ + INT32SZ); in getanswer()
300 type = _getshort(cp); in getanswer()
[all …]
Dgetaddrinfo.c1024 char *cp, *hostname2 = NULL, *scope, *addr; in explore_numeric_scope()
1045 cp = strchr(hostname, SCOPE_DELIMITER); in explore_numeric_scope()
1046 if (cp == NULL) in explore_numeric_scope()
1056 hostname2[cp - hostname] = '\0'; in explore_numeric_scope()
1058 scope = cp + 1; in explore_numeric_scope()
1300 BOUNDS_CHECK(cp, x); \
1301 cp += (x); \
1318 const u_char *cp; in getanswer() local
1354 cp = answer->buf; in getanswer()
1360 n = dn_expand(answer->buf, eom, cp, bp, ep - bp); in getanswer()
[all …]
Dsethostent.c182 char **cp; in _hf_gethtbyname2() local
183 for (cp = hp->h_aliases; *cp != NULL; cp++) in _hf_gethtbyname2()
184 if (strcasecmp(*cp, name) == 0) in _hf_gethtbyname2()
186 if (*cp == NULL) continue; in _hf_gethtbyname2()
/bionic/libc/bionic/
Darpa_inet.cpp25 in_addr_t inet_network(const char* cp) { in inet_network() argument
26 in_addr_t network_order = inet_addr(cp); in inet_network()
30 in_addr_t inet_addr(const char* cp) { in inet_addr() argument
32 return inet_aton(cp, &addr) ? addr.s_addr : INADDR_NONE; in inet_addr()
35 int inet_aton(const char* cp, in_addr* addr) { in inet_aton() argument
43 parts[i] = strtoul(cp, &end, 0); in inet_aton()
44 if (errno != 0 || end == cp || (*end != '.' && *end != '\0')) return 0; in inet_aton()
46 cp = end + 1; in inet_aton()
Dfts.c182 char *cp; in fts_load() local
193 if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { in fts_load()
194 len = strlen(++cp); in fts_load()
195 memmove(p->fts_name, cp, len + 1); in fts_load()
556 char *cp; in fts_build() local
635 cp = sp->fts_path + len; in fts_build()
636 *cp++ = '/'; in fts_build()
678 cp = sp->fts_path + len; in fts_build()
721 memmove(cp, p->fts_name, p->fts_namelen + 1); in fts_build()
760 --cp; in fts_build()
[all …]
/bionic/libc/upstream-openbsd/lib/libc/stdlib/
Dgetenv.c50 char **p, *cp; in __findenv() local
54 for (p = environ + *offset; (cp = *p) != NULL; ++p) { in __findenv()
55 for (np = name, i = len; i && *cp; i--) in __findenv()
56 if (*cp++ != *np++) in __findenv()
58 if (i == 0 && *cp++ == '=') { in __findenv()
60 return (cp); in __findenv()
Dsetenv.c45 char **P, *cp; in putenv() local
49 for (cp = str; *cp && *cp != '='; ++cp) in putenv()
51 if (cp == str || *cp != '=') { in putenv()
57 if (__findenv(str, (int)(cp - str), &offset) != NULL) { in putenv()
60 while (__findenv(str, (int)(cp - str), &offset)) { in putenv()
/bionic/libc/upstream-freebsd/lib/libc/string/
Dwcscat.c44 wchar_t *cp; in wcscat() local
46 cp = s1; in wcscat()
47 while (*cp != L'\0') in wcscat()
48 cp++; in wcscat()
49 while ((*cp++ = *s2++) != L'\0') in wcscat()
Dwcscpy.c44 wchar_t *cp; in wcscpy() local
46 cp = s1; in wcscpy()
47 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/stdio/
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/kernel/uapi/linux/
Dnilfs2_ondisk.h251 …OINT_FNS(flag,name) static inline void nilfs_checkpoint_set_ ##name(struct nilfs_checkpoint * cp) \
252 { cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) | (1UL << NILFS_CHECKPOINT_ ##flag)); \
253 } static inline void nilfs_checkpoint_clear_ ##name(struct nilfs_checkpoint * cp) \
254 { cp->cp_flags = __cpu_to_le32(__le32_to_cpu(cp->cp_flags) & ~(1UL << NILFS_CHECKPOINT_ ##flag)); \
255 } static inline int nilfs_checkpoint_ ##name(const struct nilfs_checkpoint * cp) \
256 { return ! ! (__le32_to_cpu(cp->cp_flags) & (1UL << NILFS_CHECKPOINT_ ##flag)); \
/bionic/linker/
Dlinker_config.cpp195 ConfigParser cp(std::move(content)); in parse_config_file() local
204 int result = cp.next_token(&name, &value, &error); in parse_config_file()
208 cp.lineno(), in parse_config_file()
222 cp.lineno(), in parse_config_file()
235 cp.lineno()); in parse_config_file()
259 cp.lineno(), in parse_config_file()
280 int result = cp.next_token(&name, &value, &error); in parse_config_file()
288 cp.lineno(), in parse_config_file()
300 int result = cp.next_token(&name, &value, &error); in parse_config_file()
310 cp.lineno(), in parse_config_file()
[all …]
/bionic/libc/include/arpa/
Dnameser.h482 #define NS_GET16(s, cp) do { \ argument
483 const u_char *t_cp = (const u_char *)(cp); \
487 (cp) += NS_INT16SZ; \
490 #define NS_GET32(l, cp) do { \ argument
491 const u_char *t_cp = (const u_char *)(cp); \
497 (cp) += NS_INT32SZ; \
500 #define NS_PUT16(s, cp) do { \ argument
502 u_char *t_cp = (u_char *)(cp); \
505 (cp) += NS_INT16SZ; \
508 #define NS_PUT32(l, cp) do { \ argument
[all …]
/bionic/libc/kernel/tools/
Dgenerate_uapi_headers.sh77 cp ${file} ${tgt_dir}
101 cp ${file} ${tgt_dir}

12