Home
last modified time | relevance | path

Searched refs:sz (Results 1 – 25 of 343) sorted by relevance

12345678910>>...14

/dragonfly/contrib/mdocml/
HDmandoc.c42 mandoc_font(const char *cp, int sz) in mandoc_font() argument
44 switch (sz) { in mandoc_font()
95 mandoc_escape(const char **end, const char **start, int *sz) in mandoc_escape() argument
109 if (NULL == sz) in mandoc_escape()
110 sz = &local_sz; in mandoc_escape()
128 *sz = 0; in mandoc_escape()
139 *sz = 2; in mandoc_escape()
223 *sz = 2; in mandoc_escape()
248 *sz = 1; in mandoc_escape()
315 *sz = 1; in mandoc_escape()
[all …]
HDpreconv.c115 size_t sz, phsz; in preconv_cue() local
118 sz = b->sz - offset; in preconv_cue()
122 if (NULL == (eoln = memchr(ln, '\n', sz))) in preconv_cue()
123 eoln = ln + sz; in preconv_cue()
127 if ((sz = (size_t)(eoln - ln)) < 10 || in preconv_cue()
134 sz -= 10; in preconv_cue()
136 while (sz > 0) { in preconv_cue()
137 while (sz > 0 && ' ' == *ln) { in preconv_cue()
139 sz--; in preconv_cue()
141 if (0 == sz) in preconv_cue()
[all …]
HDread.c80 buf->sz = buf->sz > initial/2 ? 2 * buf->sz : initial; in resize_buf()
81 buf->buf = mandoc_realloc(buf->buf, buf->sz); in resize_buf()
111 ep = cp + curp->primary->sz; in choose_parser()
165 ln.sz = 256; in mparse_buf_r()
166 ln.buf = mandoc_malloc(ln.sz); in mparse_buf_r()
174 while (i < blk.sz && (blk.buf[i] != '\0' || pos != 0)) { in mparse_buf_r()
186 while (i < blk.sz && (start || blk.buf[i] != '\0')) { in mparse_buf_r()
194 if ('\r' == blk.buf[i] && i + 1 < blk.sz && in mparse_buf_r()
208 if (pos + 12 > ln.sz) in mparse_buf_r()
253 thisln->sz = strlen(ln.buf) + 1; in mparse_buf_r()
[all …]
HDchars.c454 mchars_spec2cp(const char *p, size_t sz) in mchars_spec2cp() argument
459 end = p + sz; in mchars_spec2cp()
465 mchars_num2char(const char *p, size_t sz) in mchars_num2char() argument
469 i = mandoc_strntoi(p, sz, 10); in mchars_num2char()
474 mchars_num2uc(const char *p, size_t sz) in mchars_num2uc() argument
478 i = mandoc_strntoi(p, sz, 16); in mchars_num2uc()
484 mchars_spec2str(const char *p, size_t sz, size_t *rsz) in mchars_spec2str() argument
489 end = p + sz; in mchars_spec2str()
HDmandoc_ohash.c33 mandoc_ohash_init(struct ohash *h, unsigned int sz, ptrdiff_t ko) in mandoc_ohash_init() argument
43 ohash_init(h, sz, &info); in mandoc_ohash_init()
47 hash_alloc(size_t sz, void *arg) in hash_alloc() argument
50 return mandoc_malloc(sz); in hash_alloc()
54 hash_calloc(size_t n, size_t sz, void *arg) in hash_calloc() argument
57 return mandoc_calloc(n, sz); in hash_calloc()
HDterm.c527 int sz, uc; in term_word() local
567 esc = mandoc_escape(&word, &seq, &sz); in term_word()
570 uc = mchars_num2uc(seq + 1, sz - 1); in term_word()
573 uc = mchars_num2char(seq, sz); in term_word()
579 cp = mchars_spec2str(seq, sz, &ssz); in term_word()
583 uc = mchars_spec2cp(seq, sz); in term_word()
669 esc = mandoc_escape(&seq, &cp, &sz); in term_word()
672 uc = mchars_num2uc(cp + 1, sz - 1); in term_word()
675 uc = mchars_num2char(cp, sz); in term_word()
678 uc = mchars_spec2cp(cp, sz); in term_word()
[all …]
/dragonfly/lib/libefivar/
HDlibefivar.c78 size_t len, sz; in ucs2_to_utf8() local
83 sz = utf8_len_of_ucs2(nm) + 1; in ucs2_to_utf8()
88 cp = *name = malloc(sz); in ucs2_to_utf8()
95 if (len++ < sz) in ucs2_to_utf8()
97 if (len++ < sz) in ucs2_to_utf8()
99 if (len++ < sz) in ucs2_to_utf8()
102 if (len++ < sz) in ucs2_to_utf8()
104 if (len++ < sz) in ucs2_to_utf8()
107 if (len++ < sz) in ucs2_to_utf8()
112 if (len >= sz) { in ucs2_to_utf8()
[all …]
/dragonfly/lib/libc/db/btree/
HDbt_overflow.c80 uint32_t sz; in __ovfl_get() local
83 memmove(&sz, (char *)p + sizeof(pgno_t), sizeof(uint32_t)); in __ovfl_get()
84 *ssz = sz; in __ovfl_get()
87 if (pg == P_INVALID || sz == 0) in __ovfl_get()
91 if (*bufsz < sz) { in __ovfl_get()
92 *buf = reallocf(*buf, sz); in __ovfl_get()
95 *bufsz = sz; in __ovfl_get()
107 nb = MIN(sz, plen); in __ovfl_get()
111 if ((sz -= nb) == 0) in __ovfl_get()
135 uint32_t sz; in __ovfl_put() local
[all …]
/dragonfly/lib/libc/citrus/
HDcitrus_memstream.h69 void *ptr, size_t sz) in _citrus_memory_stream_bind_ptr() argument
73 _citrus_region_init(&r, ptr, sz); in _citrus_memory_stream_bind_ptr()
94 size_t sz; in _citrus_memory_stream_remainder() local
96 sz = _citrus_region_size(&ms->ms_region); in _citrus_memory_stream_remainder()
97 if (ms->ms_pos>sz) in _citrus_memory_stream_remainder()
99 return (sz-ms->ms_pos); in _citrus_memory_stream_remainder()
105 size_t sz; in _citrus_memory_stream_seek() local
107 sz = _citrus_region_size(&ms->ms_region); in _citrus_memory_stream_seek()
111 if (pos >= sz) in _citrus_memory_stream_seek()
117 if (pos >= sz) in _citrus_memory_stream_seek()
[all …]
HDcitrus_region.h42 _citrus_region_init(struct _citrus_region *r, void *h, size_t sz) in _citrus_region_init() argument
46 r->r_size = sz; in _citrus_region_init()
64 _citrus_region_check(const struct _citrus_region *r, size_t ofs, size_t sz) in _citrus_region_check() argument
67 return (r->r_size >= ofs + sz ? 0 : -1); in _citrus_region_check()
104 const struct _citrus_region *r, size_t ofs, size_t sz) in _citrus_region_get_subregion() argument
107 if (_citrus_region_check(r, ofs, sz)) in _citrus_region_get_subregion()
109 _citrus_region_init(subr, _citrus_region_offset(r, ofs), sz); in _citrus_region_get_subregion()
/dragonfly/contrib/gcc-8.0/libstdc++-v3/libsupc++/
Dnew_opa.cc50 aligned_alloc (std::size_t al, std::size_t sz)
51 { return _aligned_malloc(sz, al); }
54 aligned_alloc (std::size_t al, std::size_t sz)
61 int ret = posix_memalign (&ptr, al, sz);
68 aligned_alloc (std::size_t al, std::size_t sz)
76 return memalign (al, sz);
82 aligned_alloc (std::size_t al, std::size_t sz)
87 void* const malloc_ptr = malloc(sz + al);
102 operator new (std::size_t sz, std::align_val_t al) in operator new() argument
113 if (__builtin_expect (sz == 0, false)) in operator new()
[all …]
Deh_alloc.cc168 std::size_t sz = (*e)->size; in allocate() local
172 f->size = sz - size; in allocate()
181 std::size_t sz = (*e)->size; in allocate() local
185 x->size = sz; in allocate()
196 std::size_t sz = e->size; in free() local
198 || (reinterpret_cast <char *> (e) + sz in free()
206 f->size = sz; in free()
210 else if (reinterpret_cast <char *> (e) + sz in free()
217 f->size = sz + first_free_entry->size; in free()
228 > reinterpret_cast <char *> (e) + sz); in free()
[all …]
/dragonfly/contrib/elftoolchain/libelf/
HDlibelf_ar_util.c42 _libelf_ar_get_number(const char *src, size_t sz, unsigned int base, in _libelf_ar_get_number() argument
52 e = s + sz; in _libelf_ar_get_number()
231 size_t sz; in _libelf_ar_open() local
273 READ_AR_HEADER(s, arh, sz, end); in _libelf_ar_open()
279 if (sz == 0) in _libelf_ar_open()
296 e->e_u.e_ar.e_rawsymtabsz = sz; in _libelf_ar_open()
298 sz = LIBELF_ADJUST_AR_SIZE(sz); in _libelf_ar_open()
299 s += sz; in _libelf_ar_open()
305 e->e_u.e_ar.e_rawstrtabsz = sz; in _libelf_ar_open()
307 sz = LIBELF_ADJUST_AR_SIZE(sz); in _libelf_ar_open()
[all …]
HDelf_getident.c36 elf_getident(Elf *e, size_t *sz) in elf_getident() argument
51 if (sz) { in elf_getident()
53 *sz = SARMAG; in elf_getident()
55 *sz = EI_NIDENT; in elf_getident()
57 *sz = e->e_rawsize; in elf_getident()
63 if (sz) in elf_getident()
64 *sz = 0; in elf_getident()
/dragonfly/sbin/udevd/
HDudevd_socket.c62 size_t sz; in send_xml() local
64 sz = strlen(xml) + 1; in send_xml()
66 r = send(s, &sz, sizeof(sz), 0); in send_xml()
71 while (r < (ssize_t)sz) { in send_xml()
72 n = send(s, xml+r, sz-r, 0); in send_xml()
85 size_t sz; in read_xml() local
90 n = recv(s, &sz, sizeof(sz), MSG_WAITALL); in read_xml()
91 if ((n <= 0) || (sz > 12*1024*1024)) /* Arbitrary limit */ in read_xml()
94 xml = malloc(sz+2); in read_xml()
96 while (r < (ssize_t)sz) { in read_xml()
[all …]
/dragonfly/usr.sbin/quot/
HDquot.c135 off_t nblk, sz; in virtualblocks() local
137 sz = ip->di_size; in virtualblocks()
139 if (lblkno(super,sz) >= UFS_NDADDR) { in virtualblocks()
140 nblk = blkroundup(super,sz); in virtualblocks()
141 if (sz == nblk) in virtualblocks()
145 return sz / 1024; in virtualblocks()
149 if (lblkno(super,sz) >= UFS_NDADDR) { in virtualblocks()
150 nblk = blkroundup(super,sz); in virtualblocks()
151 sz = lblkno(super,nblk); in virtualblocks()
152 sz = (sz - UFS_NDADDR + NINDIR(super) - 1) / NINDIR(super); in virtualblocks()
[all …]
/dragonfly/crypto/openssh/
HDutf8.c73 grow_dst(char **dst, size_t *sz, size_t maxsz, char **dp, size_t need) in grow_dst() argument
78 if (*dp + need < *dst + *sz) in grow_dst()
80 tsz = *sz + 128; in grow_dst()
83 if ((tp = recallocarray(*dst, *sz, tsz, 1)) == NULL) in grow_dst()
87 *sz = tsz; in grow_dst()
111 size_t sz; /* Number of bytes allocated for dst. */ in vasnmprintf() local
122 sz = strlen(src) + 1; in vasnmprintf()
123 if ((dst = malloc(sz)) == NULL) { in vasnmprintf()
168 if (grow_dst(&dst, &sz, maxsz, in vasnmprintf()
190 if (grow_dst(&dst, &sz, maxsz, in vasnmprintf()
[all …]
/dragonfly/lib/libdevattr/
HDdevattr.c141 size_t sz; in send_xml() local
143 sz = strlen(xml) + 1; in send_xml()
145 r = send(s, &sz, sizeof(sz), 0); in send_xml()
150 while (r < (ssize_t)sz) { in send_xml()
151 n = send(s, xml+r, sz-r, 0); in send_xml()
164 size_t sz; in read_xml() local
169 n = recv(s, &sz, sizeof(sz), MSG_WAITALL); in read_xml()
170 if ((n <= 0) || (sz > 12*1024*1024)) /* Arbitrary limit */ in read_xml()
173 xml = malloc(sz+2); in read_xml()
175 while (r < (ssize_t)sz) { in read_xml()
[all …]
/dragonfly/lib/libtcplay/
HDio.c52 read_to_safe_mem(const char *file, off_t offset, size_t *sz) in read_to_safe_mem() argument
63 if ((mem = alloc_safe_mem(*sz)) == NULL) { in read_to_safe_mem()
73 if ((r = read(fd, mem, *sz)) <= 0) { in read_to_safe_mem()
79 *sz = r; in read_to_safe_mem()
117 size_t sz; in get_random() local
131 sz = 16; in get_random()
135 if ((len - rd) < sz) in get_random()
136 sz = (len - rd); in get_random()
138 if ((r = read(fd, buf+rd, sz)) < 0) { in get_random()
183 size_t sz; in secure_erase() local
[all …]
/dragonfly/lib/libc/iconv/
HDiconv.c185 __iconv_free_list(char **list, size_t sz) in __iconv_free_list() argument
188 _citrus_esdb_free_list(list, sz); in __iconv_free_list()
212 size_t sz; in iconvlist() local
217 if (__iconv_get_list(&list, &sz, true)) in iconvlist()
219 qsort((void *)list, sz, sizeof(char *), qsort_helper); in iconvlist()
220 while (i < sz) { in iconvlist()
224 names = (char **)malloc(sz * sizeof(char *)); in iconvlist()
226 __iconv_free_list(list, sz); in iconvlist()
231 for (; (i < sz) && (memcmp(curkey, list[i], strlen(curkey)) == 0); i++) { in iconvlist()
235 __iconv_free_list(list, sz); in iconvlist()
[all …]
/dragonfly/contrib/binutils-2.27/bfd/
HDlibbfd.c174 size_t sz = (size_t) size; in bfd_malloc() local
176 if (size != sz in bfd_malloc()
178 || ((signed long) sz) < 0) in bfd_malloc()
184 ptr = malloc (sz); in bfd_malloc()
185 if (ptr == NULL && sz != 0) in bfd_malloc()
213 size_t sz = (size_t) size; in bfd_realloc() local
218 if (size != sz in bfd_realloc()
220 || ((signed long) sz) < 0) in bfd_realloc()
226 ret = realloc (ptr, sz); in bfd_realloc()
228 if (ret == NULL && sz != 0) in bfd_realloc()
[all …]
/dragonfly/sys/platform/pc64/x86_64/
HDdump_machdep.c110 buf_write(struct dumperinfo *di, char *ptr, size_t sz) in buf_write() argument
115 while (sz) { in buf_write()
117 if (len > sz) in buf_write()
118 len = sz; in buf_write()
122 sz -= len; in buf_write()
159 size_t counter, sz, chunk; in cb_dumpdata() local
177 sz = chunk << PAGE_SHIFT; in cb_dumpdata()
178 counter += sz; in cb_dumpdata()
188 error = dev_ddump(di->priv, va, 0, dumplo, sz); in cb_dumpdata()
191 dumplo += sz; in cb_dumpdata()
[all …]
/dragonfly/contrib/wpa_supplicant/src/ap/
HDieee802_11_he.c23 u8 sz = 0, ru; in ieee80211_he_ppet_size() local
33 sz++; in ieee80211_he_ppet_size()
37 sz *= 1 + (ppe_thres_hdr & HE_PPE_THRES_NSS_MASK); in ieee80211_he_ppet_size()
38 sz = (sz * 6) + 7; in ieee80211_he_ppet_size()
39 if (sz % 8) in ieee80211_he_ppet_size()
40 sz += 8; in ieee80211_he_ppet_size()
41 sz /= 8; in ieee80211_he_ppet_size()
43 return sz; in ieee80211_he_ppet_size()
210 u8 sz = 1; in hostapd_eid_spatial_reuse() local
217 sz++; in hostapd_eid_spatial_reuse()
[all …]
/dragonfly/contrib/mpc/src/
HDget_x.c81 size_t sz; in prettify() local
88 sz = strlen (str) + 1; /* + terminal '\0' */ in prettify()
93 pretty = mpc_alloc_str (sz); in prettify()
109 ++sz; /* + decimal point */ in prettify()
117 sz += 3; /* + exponent char + sign + 1 digit */ in prettify()
126 sz++; in prettify()
138 sz++; in prettify()
143 pretty = mpc_alloc_str (sz); in prettify()
/dragonfly/usr.sbin/ppp/
HDudp.c115 int sz, ret; in udp_Recvfrom() local
120 sz = sizeof dev->sock; in udp_Recvfrom()
121 ret = recvfrom(p->fd, v, n, 0, (struct sockaddr *)&dev->sock, &sz); in udp_Recvfrom()
144 int sz = physical_MaxDeviceSize(); in udp_device2iov() local
146 iov[*niov].iov_base = realloc(d, sz); in udp_device2iov()
148 log_Printf(LogALERT, "Failed to allocate memory: %d\n", sz); in udp_device2iov()
151 iov[*niov].iov_len = sz; in udp_device2iov()
287 int type, sz; in udp_Create() local
289 sz = sizeof type; in udp_Create()
290 if (getsockopt(p->fd, SOL_SOCKET, SO_TYPE, &type, &sz) == -1) { in udp_Create()
[all …]

12345678910>>...14