| /freebsd-10-stable/crypto/openssh/openbsd-compat/ |
| D | 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 …]
|
| D | 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()
|
| /freebsd-10-stable/lib/libc/gen/ |
| D | 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 …]
|
| D | 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()
|
| /freebsd-10-stable/contrib/bmake/ |
| D | dirname.c | 59 const char *endp; in xdirname_r() local 73 endp = path + strlen(path) - 1; in xdirname_r() 74 while (endp != path && *endp == '/') in xdirname_r() 75 endp--; in xdirname_r() 78 while (endp > path && *endp != '/') in xdirname_r() 79 endp--; in xdirname_r() 81 if (endp == path) { in xdirname_r() 82 path = *endp == '/' ? "/" : "."; in xdirname_r() 88 endp--; in xdirname_r() 89 while (endp > path && *endp == '/'); in xdirname_r() [all …]
|
| /freebsd-10-stable/lib/libc/resolv/ |
| D | 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 …]
|
| /freebsd-10-stable/contrib/gcclibs/libiberty/ |
| D | 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 …]
|
| /freebsd-10-stable/contrib/binutils/libiberty/ |
| D | 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 …]
|
| /freebsd-10-stable/sys/libkern/ |
| D | 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()
|
| /freebsd-10-stable/contrib/ntp/lib/isc/ |
| D | 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 (NS_INT16SZ > endp - tp) in inet_pton6() 181 if (ch == '.' && (NS_INADDRSZ <= endp - tp) && in inet_pton6() 190 if (NS_INT16SZ > endp - tp) 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()
|
| /freebsd-10-stable/lib/libc/inet/ |
| D | 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()
|
| D | 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()
|
| D | 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()
|
| /freebsd-10-stable/contrib/unbound/compat/ |
| D | 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)
|
| /freebsd-10-stable/contrib/ldns/compat/ |
| D | 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)
|
| /freebsd-10-stable/contrib/apr/network_io/unix/ |
| D | 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()
|
| /freebsd-10-stable/sbin/mknod/ |
| D | 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()
|
| /freebsd-10-stable/contrib/nvi/vi/ |
| D | 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()
|
| /freebsd-10-stable/usr.sbin/chroot/ |
| D | 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()
|
| /freebsd-10-stable/contrib/nvi/ex/ |
| D | 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 …]
|
| /freebsd-10-stable/contrib/tcpdump/ |
| D | print-cdp.c | 253 const u_char *endp = p + l; in cdp_print_addr() local 264 while (p < endp && num >= 0) { in cdp_print_addr() 266 if (p + 2 > endp) in cdp_print_addr() 273 if (p + pl + 2 > endp) in cdp_print_addr() 286 if (p + 4 > endp) in cdp_print_addr() 304 if (p + al > endp) in cdp_print_addr() 318 if (p + pl > endp) in cdp_print_addr() 324 if (p + 2 > endp) in cdp_print_addr() 330 if (p + al > endp) in cdp_print_addr()
|
| /freebsd-10-stable/lib/libc/stdlib/ |
| D | lsearch.c | 40 uint8_t *ep, *endp; in lwork() local 47 for (endp = (uint8_t *)(ep + width * *nelp); ep < endp; ep += width) { in lwork() 60 memcpy(endp, key, width); in lwork() 63 return (endp); in lwork()
|
| /freebsd-10-stable/lib/libc/tests/stdio/ |
| D | 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 …]
|
| /freebsd-10-stable/contrib/groff/src/preproc/refer/ |
| D | 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 …]
|
| /freebsd-10-stable/lib/libc/stdio/ |
| D | getdelim.c | 112 u_char *endp; in getdelim() local 136 while ((endp = memchr(fp->_p, delim, fp->_r)) == NULL) { in getdelim() 145 endp++; /* snarf the delimiter, too */ in getdelim() 146 if (sappend(linep, &linelen, linecapp, fp->_p, endp - fp->_p)) in getdelim() 148 fp->_r -= endp - fp->_p; in getdelim() 149 fp->_p = endp; in getdelim()
|