Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 115) sorted by relevance

12345

/bionic/libc/stdio/
Dfgets.c47 size_t len; in fgets() local
69 len = fp->_r; in fgets()
78 if ((int)len > n) in fgets()
79 len = n; in fgets()
80 t = memchr((void *)p, '\n', len); in fgets()
82 len = ++t - p; in fgets()
83 fp->_r -= len; in fgets()
85 (void)memcpy((void *)s, (void *)p, len); in fgets()
86 s[len] = '\0'; in fgets()
89 fp->_r -= len; in fgets()
[all …]
Dfgetln.c74 size_t len; in fgetln() local
94 *lenp = len = p - fp->_p; in fgetln()
96 fp->_r -= len; in fgetln()
111 for (len = fp->_r, off = 0;; len += fp->_r) { in fgetln()
119 if (__slbexpand(fp, len + OPTIMISTIC)) in fgetln()
122 len - off); in fgetln()
123 off = len; in fgetln()
132 len += diff; in fgetln()
133 if (__slbexpand(fp, len)) in fgetln()
141 *lenp = len; in fgetln()
[all …]
Dfvwrite.c50 size_t len; in __sfvwrite() local
57 if ((len = uio->uio_resid) == 0) in __sfvwrite()
70 len = iov->iov_len; in __sfvwrite()
73 while (len == 0) { \ in __sfvwrite()
76 len = iov->iov_len; \ in __sfvwrite()
86 w = (*fp->_write)(fp->_cookie, p, len); in __sfvwrite()
88 w = (*fp->_write)(fp->_cookie, p, MIN(len, BUFSIZ2)); in __sfvwrite()
93 len -= w; in __sfvwrite()
110 (__SALC | __SSTR) && fp->_w < (int)len) { in __sfvwrite()
119 } while (_size < (int)(blen + len)); in __sfvwrite()
[all …]
/bionic/libc/bionic/
Ddirname_r.c37 int result, len; in dirname_r() local
42 len = 1; in dirname_r()
58 len = 1; in dirname_r()
66 len = endp - path +1; in dirname_r()
69 result = len; in dirname_r()
70 if (len+1 > MAXPATHLEN) { in dirname_r()
77 if (len > (int)bufflen-1) { in dirname_r()
78 len = (int)bufflen-1; in dirname_r()
83 if (len >= 0) { in dirname_r()
84 memcpy( buffer, path, len ); in dirname_r()
[all …]
Dbasename_r.c37 int len, result; in basename_r() local
43 len = 1; in basename_r()
55 len = 1; in basename_r()
64 len = endp - startp +1; in basename_r()
67 result = len; in basename_r()
71 if (len > (int)bufflen-1) { in basename_r()
72 len = (int)bufflen-1; in basename_r()
77 if (len >= 0) { in basename_r()
78 memcpy( buffer, startp, len ); in basename_r()
79 buffer[len] = 0; in basename_r()
/bionic/libc/wchar/
Dwcsnlen.c35 size_t len; in wcsnlen() local
37 for (len = 0; len < maxlen; len++, s++) { in wcsnlen()
41 return (len); in wcsnlen()
Dwcsxfrm.c35 wcsxfrm(wchar_t * __restrict dest, const wchar_t * __restrict src, size_t len) in wcsxfrm() argument
42 if (len != 0) in wcsxfrm()
48 if (len > 0) { in wcsxfrm()
49 if (slen < len) in wcsxfrm()
52 wcsncpy(dest, src, len - 1); in wcsxfrm()
53 dest[len - 1] = L'\0'; in wcsxfrm()
Dwcswidth.c47 int len, l; in wcswidth() local
49 len = 0; in wcswidth()
53 len += l; in wcswidth()
55 return (len); in wcswidth()
Dwcsdup.c37 size_t len; in wcsdup() local
39 len = wcslen(s) + 1; in wcsdup()
40 if ((copy = malloc(len * sizeof(wchar_t))) == NULL) in wcsdup()
42 return (wmemcpy(copy, s, len)); in wcsdup()
Dwcsstr.c50 size_t len; in wcsstr() local
53 len = wcslen(find); in wcsstr()
59 } while (wcsncmp(s, find, len) != 0); in wcsstr()
/bionic/libc/kernel/common/linux/
Dnetlink.h76 #define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) ) argument
78 #define NLMSG_LENGTH(len) ((len)+NLMSG_ALIGN(NLMSG_HDRLEN)) argument
79 #define NLMSG_SPACE(len) NLMSG_ALIGN(NLMSG_LENGTH(len)) argument
81 #define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(… argument
82 …e NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct … argument
83 #define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len))) argument
127 #define NLA_ALIGN(len) (((len) + NLA_ALIGNTO - 1) & ~(NLA_ALIGNTO - 1)) argument
/bionic/libc/string/
Dstrxfrm.c41 size_t len = strlen(s2) + 1; in strxfrm() local
43 if (len < n) in strxfrm()
44 n = len; in strxfrm()
46 return len; in strxfrm()
Dstrerror_r.c96 int len, ret = 0; in strerror_r() local
102 len = strlcpy(strerrbuf, msg, buflen); in strerror_r()
103 if ((size_t)len >= buflen) in strerror_r()
106 len = strlcpy(strerrbuf, "Unknown error: ", buflen); in strerror_r()
107 if ((size_t)len >= buflen) in strerror_r()
110 int ret = __itoa(errnum, 1, strerrbuf, len, buflen); in strerror_r()
132 size_t len;
135 len = strlcpy(buf, def, buflen);
136 if (len >= buflen)
139 len = strlcpy(buf, def, buflen);
[all …]
Dstrstr.c43 size_t len; in strstr() local
46 len = strlen(find); in strstr()
52 } while (strncmp(s, find, len) != 0); in strstr()
Dstrcasestr.c46 size_t len; in strcasestr() local
50 len = strlen(find); in strcasestr()
56 } while (strncasecmp(s, find, len) != 0); in strcasestr()
/bionic/libc/netbsd/nameser/
Dns_print.c68 static void addlen(size_t len, char **buf, size_t *buflen);
69 static int addstr(const char *src, size_t len,
71 static int addtab(size_t len, size_t target, int spaced,
126 int len, x; in ns_sprintrrf() local
134 len = prune_origin(name, origin); in ns_sprintrrf()
137 } else if (len == 0) { in ns_sprintrrf()
140 T(addstr(name, (size_t)len, &buf, &buflen)); in ns_sprintrrf()
144 name[len] == '\0')) && name[len - 1] != '.') { in ns_sprintrrf()
147 len++; in ns_sprintrrf()
149 T(spaced = addtab((size_t)len, 24, spaced, &buf, &buflen)); in ns_sprintrrf()
[all …]
/bionic/libc/unistd/
Dptsname_r.c39 int len; in ptsname_r() local
51 len = snprintf( buff, sizeof(buff), "/dev/pts/%u", pty_num ); in ptsname_r()
52 if (len+1 > (int)buflen) { in ptsname_r()
56 memcpy( buf, buff, len+1 ); in ptsname_r()
/bionic/libc/kernel/common/linux/netfilter/
Dnfnetlink.h52 #define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) argument
53 #define NFA_OK(nfa,len) ((len) > 0 && (nfa)->nfa_len >= sizeof(struct nfattr) && (nfa)->nfa_len <… argument
55 #define NFA_LENGTH(len) (NFA_ALIGN(sizeof(struct nfattr)) + (len)) argument
56 #define NFA_SPACE(len) NFA_ALIGN(NFA_LENGTH(len)) argument
60 …_END(skb, start) ({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); (skb)->len; })
/bionic/libc/inet/
Dinet_ntop.c105 struct { int base, len; } best, cur; in inet_ntop6() member
119 best.len = 0; in inet_ntop6()
121 cur.len = 0; in inet_ntop6()
125 cur.base = i, cur.len = 1; in inet_ntop6()
127 cur.len++; in inet_ntop6()
130 if (best.base == -1 || cur.len > best.len) in inet_ntop6()
137 if (best.base == -1 || cur.len > best.len) in inet_ntop6()
140 if (best.base != -1 && best.len < 2) in inet_ntop6()
151 i < (best.base + best.len)) { in inet_ntop6()
167 (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) { in inet_ntop6()
[all …]
/bionic/libc/kernel/arch-x86/asm/
Dcacheflush.h27 #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) argument
31 #define copy_to_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) argument
32 #define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) argument
/bionic/libc/tzcode/
Dstrptime.c107 size_t len = 0; in _strptime() local
209 len = strlen(_ctloc(day[i])); in _strptime()
210 if (strncasecmp(_ctloc(day[i]), (const char*)bp, len) == 0) in _strptime()
214 len = strlen(_ctloc(abday[i])); in _strptime()
215 if (strncasecmp(_ctloc(abday[i]), (const char*)bp, len) == 0) in _strptime()
224 bp += len; in _strptime()
233 len = strlen(_ctloc(mon[i])); in _strptime()
234 if (strncasecmp(_ctloc(mon[i]), (const char*)bp, len) == 0) in _strptime()
238 len = strlen(_ctloc(abmon[i])); in _strptime()
239 if (strncasecmp(_ctloc(abmon[i]), (const char*)bp, len) == 0) in _strptime()
[all …]
/bionic/libc/kernel/common/linux/mtd/
Dmtd.h38 u_int32_t len; member
64 size_t len; member
100 int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
102 void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
104 int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
105 int (*write) (struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen, const u_char *buf);
112 int (*get_fact_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
113 …int (*read_fact_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *…
114 int (*get_user_prot_info) (struct mtd_info *mtd, struct otp_info *buf, size_t len);
115 …int (*read_user_prot_reg) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *…
[all …]
/bionic/libc/kernel/common/linux/sunrpc/
Dgss_asn1.h34 #define g_OID_equal(o1,o2) (((o1)->len == (o2)->len) && (memcmp((o1)->data,(o2)->data,(int) (o1…
/bionic/linker/
Dba.c44 static unsigned long ba_order(struct ba *ba, unsigned long len);
87 static unsigned long ba_order(struct ba *ba, unsigned long len) in ba_order() argument
91 len = (len + ba->min_alloc - 1) / ba->min_alloc; in ba_order()
92 len--; in ba_order()
93 for (i = 0; i < sizeof(len)*8; i++) in ba_order()
94 if (len >> i == 0) in ba_order()
99 int ba_allocate(struct ba *ba, unsigned long len) in ba_allocate() argument
104 unsigned long order = ba_order(ba, len); in ba_allocate()
/bionic/libc/tools/
Dgenserv.py28 result = "\\%0o%s" % (len(self.name),self.name)
35 result += "\\%0o" % len(self.aliases)
37 result += "\\%0o%s" % (len(alias), alias)
44 if len(line) > 0 and line[-1] == "\n":
46 if len(line) > 0 and line[-1] == "\r":
50 if len(line) == 0 or line[0] == "#":

12345