| /NextBSD/crypto/openssh/openbsd-compat/ |
| HD | dirname.c | 33 const char *endp; in dirname() local 43 endp = path + strlen(path) - 1; in dirname() 44 while (endp > path && *endp == '/') in dirname() 45 endp--; in dirname() 48 while (endp > path && *endp != '/') in dirname() 49 endp--; in dirname() 52 if (endp == path) { in dirname() 53 dname[0] = *endp == '/' ? '/' : '.'; in dirname() 59 endp--; in dirname() 60 } while (endp > path && *endp == '/'); in dirname() [all …]
|
| HD | basename.c | 31 const char *endp, *startp; in basename() local 41 endp = path + strlen(path) - 1; in basename() 42 while (endp > path && *endp == '/') in basename() 43 endp--; in basename() 46 if (endp == path && *endp == '/') { in basename() 53 startp = endp; in basename() 57 len = endp - startp + 1; in basename()
|
| /NextBSD/lib/libc/gen/ |
| HD | dirname.c | 33 const char *endp; in dirname() local 49 endp = path + strlen(path) - 1; in dirname() 50 while (endp > path && *endp == '/') in dirname() 51 endp--; in dirname() 54 while (endp > path && *endp != '/') in dirname() 55 endp--; in dirname() 58 if (endp == path) { in dirname() 59 dname[0] = *endp == '/' ? '/' : '.'; in dirname() 65 endp--; in dirname() 66 } while (endp > path && *endp == '/'); in dirname() [all …]
|
| HD | basename.c | 31 const char *endp, *startp; in basename_r() local 42 endp = path + strlen(path) - 1; in basename_r() 43 while (endp > path && *endp == '/') in basename_r() 44 endp--; in basename_r() 47 if (endp == path && *endp == '/') { in basename_r() 54 startp = endp; in basename_r() 58 len = endp - startp + 1; in basename_r()
|
| /NextBSD/lib/libc/resolv/ |
| HD | res_mkupdate.c | 98 u_char *cp, *sp2, *startp, *endp; in res_nmkupdate() local 224 endp = startp + rrecp->r_size - 1; in res_nmkupdate() 228 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 243 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 256 endp)) in res_nmkupdate() 276 soanum = getnum_str(&startp, endp); in res_nmkupdate() 292 n = getnum_str(&startp, endp); in res_nmkupdate() 297 if (!getword_str(buf2, sizeof buf2, &startp, endp)) in res_nmkupdate() 306 n = getnum_str(&startp, endp); in res_nmkupdate() 312 n = getnum_str(&startp, endp); in res_nmkupdate() [all …]
|
| /NextBSD/usr.sbin/ypldap/ |
| HD | entries.c | 46 char *endp; in flatten_entries() local 66 endp = linep; in flatten_entries() 76 memcpy(endp, ue->ue_line, len); in flatten_entries() 77 endp[strcspn(endp, ":")] = '\0'; in flatten_entries() 79 ue->ue_line = endp; in flatten_entries() 80 endp += len; in flatten_entries() 103 endp = linep; in flatten_entries() 112 memcpy(endp, ge->ge_line, len); in flatten_entries() 113 endp[strcspn(endp, ":")] = '\0'; in flatten_entries() 115 ge->ge_line = endp; in flatten_entries() [all …]
|
| /NextBSD/contrib/gcclibs/libiberty/ |
| HD | make-relative-prefix.c | 242 char *startp, *endp, *nstore; in make_relative_prefix() local 249 startp = endp = temp; in make_relative_prefix() 252 if (*endp == PATH_SEPARATOR || *endp == 0) in make_relative_prefix() 254 if (endp == startp) in make_relative_prefix() 262 strncpy (nstore, startp, endp - startp); in make_relative_prefix() 263 if (! IS_DIR_SEPARATOR (endp[-1])) in make_relative_prefix() 265 nstore[endp - startp] = DIR_SEPARATOR; in make_relative_prefix() 266 nstore[endp - startp + 1] = 0; in make_relative_prefix() 269 nstore[endp - startp] = 0; in make_relative_prefix() 282 if (*endp == 0) in make_relative_prefix() [all …]
|
| /NextBSD/contrib/binutils/libiberty/ |
| HD | make-relative-prefix.c | 242 char *startp, *endp, *nstore; in make_relative_prefix_1() local 249 startp = endp = temp; in make_relative_prefix_1() 252 if (*endp == PATH_SEPARATOR || *endp == 0) in make_relative_prefix_1() 254 if (endp == startp) in make_relative_prefix_1() 262 strncpy (nstore, startp, endp - startp); in make_relative_prefix_1() 263 if (! IS_DIR_SEPARATOR (endp[-1])) in make_relative_prefix_1() 265 nstore[endp - startp] = DIR_SEPARATOR; in make_relative_prefix_1() 266 nstore[endp - startp + 1] = 0; in make_relative_prefix_1() 269 nstore[endp - startp] = 0; in make_relative_prefix_1() 282 if (*endp == 0) in make_relative_prefix_1() [all …]
|
| /NextBSD/contrib/ntp/lib/isc/ |
| HD | inet_pton.c | 138 unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_pton6() local 144 endp = tp + NS_IN6ADDRSZ; in inet_pton6() 173 if (tp + NS_INT16SZ > endp) in inet_pton6() 181 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_pton6() 190 if (tp + NS_INT16SZ > endp) in inet_pton6() 203 if (tp == endp) in inet_pton6() 206 endp[- i] = colonp[n - i]; in inet_pton6() 209 tp = endp; in inet_pton6() 211 if (tp != endp) in inet_pton6()
|
| /NextBSD/sys/libkern/ |
| HD | inet_pton.c | 138 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_pton6() local 144 endp = tp + NS_IN6ADDRSZ; in inet_pton6() 175 if (tp + NS_INT16SZ > endp) in inet_pton6() 183 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_pton6() 192 if (tp + NS_INT16SZ > endp) in inet_pton6() 205 if (tp == endp) in inet_pton6() 208 endp[- i] = colonp[n - i]; in inet_pton6() 211 tp = endp; in inet_pton6() 213 if (tp != endp) in inet_pton6()
|
| /NextBSD/lib/libc/inet/ |
| HD | inet_pton.c | 137 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_pton6() local 143 endp = tp + NS_IN6ADDRSZ; in inet_pton6() 174 if (tp + NS_INT16SZ > endp) in inet_pton6() 182 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_pton6() 191 if (tp + NS_INT16SZ > endp) in inet_pton6() 204 if (tp == endp) in inet_pton6() 207 endp[- i] = colonp[n - i]; in inet_pton6() 210 tp = endp; in inet_pton6() 212 if (tp != endp) in inet_pton6()
|
| HD | inet_cidr_pton.c | 157 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_cidr_pton_ipv6() local 164 endp = tp + NS_IN6ADDRSZ; in inet_cidr_pton_ipv6() 197 if (tp + NS_INT16SZ > endp) in inet_cidr_pton_ipv6() 205 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_cidr_pton_ipv6() 220 if (tp + NS_INT16SZ > endp) in inet_cidr_pton_ipv6() 233 if (tp == endp) in inet_cidr_pton_ipv6() 236 endp[- i] = colonp[n - i]; in inet_cidr_pton_ipv6() 239 tp = endp; in inet_cidr_pton_ipv6()
|
| HD | inet_net_pton.c | 268 u_char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; in inet_net_pton_ipv6() local 279 endp = tp + NS_IN6ADDRSZ; in inet_net_pton_ipv6() 313 if (tp + NS_INT16SZ > endp) in inet_net_pton_ipv6() 322 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && in inet_net_pton_ipv6() 334 if (tp + NS_INT16SZ > endp) in inet_net_pton_ipv6() 347 endp = tmp + 2 * words; in inet_net_pton_ipv6() 357 if (tp == endp) in inet_net_pton_ipv6() 360 endp[- i] = colonp[n - i]; in inet_net_pton_ipv6() 363 tp = endp; in inet_net_pton_ipv6() 365 if (tp != endp) in inet_net_pton_ipv6()
|
| /NextBSD/contrib/wpa/src/fst/ |
| HD | fst_ctrl_iface.c | 559 char *endp; in get_peer_mbies() local 566 if (fst_read_next_text_param(params, ifname, sizeof(ifname), &endp) || in get_peer_mbies() 570 while (isspace(*endp)) in get_peer_mbies() 571 endp++; in get_peer_mbies() 572 if (fst_read_peer_addr(endp, peer_addr)) in get_peer_mbies() 821 int fst_read_next_int_param(const char *params, Boolean *valid, char **endp) in fst_read_next_int_param() argument 827 *endp = (char *) params; in fst_read_next_int_param() 830 ret = (int) strtol(curp, endp, 0); in fst_read_next_int_param() 831 if (!**endp || isspace(**endp)) in fst_read_next_int_param() 840 char **endp) in fst_read_next_text_param() argument [all …]
|
| /NextBSD/contrib/apr/network_io/unix/ |
| HD | inet_pton.c | 163 unsigned char tmp[IN6ADDRSZ], *tp, *endp, *colonp; in inet_pton6() local 169 endp = tp + IN6ADDRSZ; in inet_pton6() 199 if (tp + INT16SZ > endp) in inet_pton6() 207 if (ch == '.' && ((tp + INADDRSZ) <= endp) && in inet_pton6() 216 if (tp + INT16SZ > endp) in inet_pton6() 230 endp[- i] = colonp[n - i]; in inet_pton6() 233 tp = endp; in inet_pton6() 235 if (tp != endp) in inet_pton6()
|
| /NextBSD/contrib/ldns/compat/ |
| HD | inet_pton.c | 154 uint8_t tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; local 160 endp = tp + NS_IN6ADDRSZ; 190 if (tp + NS_INT16SZ > endp) 198 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && 207 if (tp + NS_INT16SZ > endp) 221 endp[- i] = colonp[n - i]; 224 tp = endp; 226 if (tp != endp)
|
| /NextBSD/contrib/unbound/compat/ |
| HD | inet_pton.c | 154 uint8_t tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp; local 160 endp = tp + NS_IN6ADDRSZ; 190 if (tp + NS_INT16SZ > endp) 198 if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) && 207 if (tp + NS_INT16SZ > endp) 221 endp[- i] = colonp[n - i]; 224 tp = endp; 226 if (tp != endp)
|
| /NextBSD/sbin/mknod/ |
| HD | mknod.c | 116 char *cp, *endp; in main() local 132 mymajor = (long)strtoul(argv[3], &endp, 0); in main() 133 if (endp == argv[3] || *endp != '\0') in main() 137 myminor = (long)strtoul(argv[4], &endp, 0); in main() 138 if (endp == argv[4] || *endp != '\0') in main()
|
| /NextBSD/contrib/nvi/vi/ |
| HD | v_ch.c | 143 CHAR_T *endp, *p, *startp; in v_chf() local 166 endp = (startp = p) + len; in v_chf() 169 while (++p < endp && *p != key); in v_chf() 170 if (p == endp) { in v_chf() 225 CHAR_T *endp, *p; in v_chF() local 249 endp = p - 1; in v_chF() 252 while (--p > endp && *p != key); in v_chF() 253 if (p == endp) { in v_chF() 259 vp->m_stop.cno = (p - endp) - 1; in v_chF()
|
| /NextBSD/contrib/nvi/ex/ |
| HD | ex_script.c | 198 char *endp, *p, *t, buf[1024]; in sscr_getprompt() local 210 endp = buf; in sscr_getprompt() 230 more: len = sizeof(buf) - (endp - buf); in sscr_getprompt() 231 switch (nr = read(sc->sh_master, endp, len)) { in sscr_getprompt() 239 endp += nr; in sscr_getprompt() 244 for (p = t = buf; p < endp; ++p) { in sscr_getprompt() 255 memmove(buf, t, endp - t); in sscr_getprompt() 256 endp = buf + (endp - t); in sscr_getprompt() 258 if (endp == buf) in sscr_getprompt() 275 llen = endp - buf; in sscr_getprompt() [all …]
|
| /NextBSD/usr.sbin/chroot/ |
| HD | chroot.c | 64 char *endp, *p, *user, *group, *grouplist; in main() local 104 gid = (gid_t)strtoul(group, &endp, 0); in main() 105 if (*endp != '\0') in main() 125 gidlist[gids] = (gid_t)strtoul(p, &endp, 0); in main() 126 if (*endp != '\0') in main() 142 uid = (uid_t)strtoul(user, &endp, 0); in main() 143 if (*endp != '\0') in main()
|
| /NextBSD/lib/libc/tests/stdio/ |
| HD | scanfloat_test.c | 285 char *endp; in ATF_TC_BODY() local 289 ATF_REQUIRE(strtod("0xy", &endp) == 0); in ATF_TC_BODY() 290 ATF_REQUIRE(strcmp("xy", endp) == 0); in ATF_TC_BODY() 294 ATF_REQUIRE(strtof("3.5e38", &endp) == FLT_MAX); in ATF_TC_BODY() 295 ATF_REQUIRE(strtod("2e308", &endp) == DBL_MAX); in ATF_TC_BODY() 297 ATF_REQUIRE(strtof("3.5e38", &endp) == INFINITY); in ATF_TC_BODY() 298 ATF_REQUIRE(strtod("2e308", &endp) == INFINITY); in ATF_TC_BODY() 300 ATF_REQUIRE(strtof("3.5e38", &endp) == FLT_MAX); in ATF_TC_BODY() 301 ATF_REQUIRE(strtod("2e308", &endp) == DBL_MAX); in ATF_TC_BODY() 303 ATF_REQUIRE(strtof("3.5e38", &endp) == INFINITY); in ATF_TC_BODY() [all …]
|
| /NextBSD/lib/libc/stdlib/ |
| HD | lsearch.c | 40 uint8_t *ep, *endp; in lwork() local 43 for (endp = (uint8_t *)(ep + width * *nelp); ep < endp; ep += width) { in lwork() 56 memcpy(endp, key, width); in lwork() 59 return (endp); in lwork()
|
| /NextBSD/contrib/groff/src/preproc/refer/ |
| HD | ref.cpp | 547 const char **endp) in find_last_name() argument 557 *endp = token_start; in find_last_name() 566 *endp = end; in find_last_name() 883 const char *find_year(const char *start, const char *end, const char **endp) in find_year() argument 896 *endp = ptr; in find_year() 905 const char **endp) in find_day() argument 921 *endp = ptr; in find_day() 991 const char *reference::get_year(const char **endp) const in get_year() 997 return find_year(start, end, endp); in get_year() 1003 const char *reference::get_field(unsigned char c, const char **endp) const in get_field() [all …]
|
| /NextBSD/contrib/tcpdump/ |
| HD | print-cdp.c | 280 const u_char *endp = p + l; in cdp_print_addr() local 288 if (p + 4 > endp) in cdp_print_addr() 293 while (p < endp && num >= 0) { in cdp_print_addr() 295 if (p + 2 > endp) in cdp_print_addr() 302 if (p + pl + 2 > endp) in cdp_print_addr() 315 if (p + 4 > endp) in cdp_print_addr() 331 if (p + al > endp) in cdp_print_addr() 343 if (p + pl > endp) in cdp_print_addr() 349 if (p + 2 > endp) in cdp_print_addr() 355 if (p + al > endp) in cdp_print_addr()
|