| /netbsd-src/crypto/external/bsd/openssl/dist/apps/lib/ |
| H A D | app_params.c | 13 static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param) in describe_param_type() argument 45 printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key); in describe_param_type() 48 bufsz -= printed_len; in describe_param_type() 50 printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type); in describe_param_type() 53 bufsz -= printed_len; in describe_param_type() 56 printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type); in describe_param_type() 59 bufsz -= printed_len; in describe_param_type() 63 printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)"); in describe_param_type() 65 printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)", in describe_param_type() 69 bufsz -= printed_len; in describe_param_type()
|
| /netbsd-src/external/bsd/mdocml/dist/ |
| H A D | compat_getline.c | 32 getline(char **buf, size_t *bufsz, FILE *fp) in getline() argument 38 if (buf == NULL || bufsz == NULL) { in getline() 44 *bufsz = 0; in getline() 50 if (pos + 1 >= *bufsz) { in getline() 51 nbufsz = *bufsz ? *bufsz * 2 : BUFSIZ; in getline() 55 *bufsz = nbufsz; in getline()
|
| /netbsd-src/tools/compat/ |
| H A D | fgetln.c | 40 static size_t bufsz = 0; in fgetln() local 52 bufsz = BUFSIZ; in fgetln() 56 if (r == bufsz) { in fgetln() 61 if (!(p = realloc(buf, 2 * bufsz))) { in fgetln() 65 buf = NULL, bufsz = 0; in fgetln() 68 buf = p, bufsz = 2 * bufsz; in fgetln()
|
| /netbsd-src/external/bsd/elftoolchain/dist/libelf/ |
| H A D | libelf_open.c | 61 size_t bufsz, datasz; in _libelf_read_special_file() local 66 bufsz = _LIBELF_INITSIZE; in _libelf_read_special_file() 67 if ((buf = malloc(bufsz)) == NULL) in _libelf_read_special_file() 76 if (datasz == bufsz) { in _libelf_read_special_file() 77 bufsz *= 2; in _libelf_read_special_file() 78 if ((t = realloc(buf, bufsz)) == NULL) in _libelf_read_special_file() 84 assert(bufsz - datasz > 0); in _libelf_read_special_file() 86 if ((readsz = read(fd, t, bufsz - datasz)) <= 0) in _libelf_read_special_file() 89 } while (datasz < bufsz); in _libelf_read_special_file() 103 if (bufsz > datasz) { in _libelf_read_special_file()
|
| /netbsd-src/sys/external/bsd/drm/dist/shared-core/ |
| H A D | r300_cmdbuf.c | 333 cmdbuf->bufsz -= sz * 4; in r300_emit_carefully_checked_packet0() 359 if (sz * 4 > cmdbuf->bufsz) in r300_emit_packet0() 381 cmdbuf->bufsz -= sz * 4; in r300_emit_packet0() 404 if (sz * 16 > cmdbuf->bufsz) in r300_emit_vpu() 432 cmdbuf->bufsz -= sz * 16; in r300_emit_vpu() 446 if (8 * 4 > cmdbuf->bufsz) in r300_emit_clear() 466 cmdbuf->bufsz -= 8 * 4; in r300_emit_clear() 534 cmdbuf->bufsz -= (count + 2) * 4; in r300_emit_3d_load_vbpntr() 579 cmdbuf->bufsz -= (count+2)*4; in r300_emit_bitblt_multi() 610 cmdbuf->bufsz -= (count+2)*4; in r300_emit_draw_indx_2() [all …]
|
| /netbsd-src/external/gpl3/binutils/dist/gprofng/src/ |
| H A D | SAXParserFactory.cc | 187 int bufsz; member in SAXParserP 199 bufsz = 0x2000; in SAXParserP() 200 buffer = (char*) malloc (bufsz); in SAXParserP() 216 bufsz = 8192; in reset() 217 buffer = (char*) realloc (buffer, bufsz); in reset() 231 int rem = bufsz; in parse() 245 int oldbufsz = bufsz; in parse() 246 bufsz = bufsz >= 0x100000 ? bufsz + 0x100000 : bufsz * 2; in parse() 247 buffer = (char*) realloc (buffer, bufsz); in parse() 248 rem = bufsz - oldbufsz; in parse()
|
| /netbsd-src/external/gpl3/binutils.old/dist/gprofng/src/ |
| H A D | SAXParserFactory.cc | 187 int bufsz; member in SAXParserP 199 bufsz = 0x2000; in SAXParserP() 200 buffer = (char*) malloc (bufsz); in SAXParserP() 216 bufsz = 8192; in reset() 217 buffer = (char*) realloc (buffer, bufsz); in reset() 231 int rem = bufsz; in parse() 245 int oldbufsz = bufsz; in parse() 246 bufsz = bufsz >= 0x100000 ? bufsz + 0x100000 : bufsz * 2; in parse() 247 buffer = (char*) realloc (buffer, bufsz); in parse() 248 rem = bufsz - oldbufsz; in parse()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/ciphers/ |
| H A D | ciphercommon.c | 194 ctx->bufsz = 0; in cipher_generic_init_internal() 337 if (ctx->bufsz != 0) in ossl_cipher_generic_block_update() 338 nextblocks = ossl_cipher_fillblock(ctx->buf, &ctx->bufsz, blksz, in ossl_cipher_generic_block_update() 348 if (ctx->bufsz == blksz && (ctx->enc || inl > 0 || !ctx->pad)) { in ossl_cipher_generic_block_update() 357 ctx->bufsz = 0; in ossl_cipher_generic_block_update() 384 && !ossl_cipher_trailingdata(ctx->buf, &ctx->bufsz, blksz, &in, &inl)) { in ossl_cipher_generic_block_update() 415 ossl_cipher_padblock(ctx->buf, &ctx->bufsz, blksz); in ossl_cipher_generic_block_final() 416 } else if (ctx->bufsz == 0) { in ossl_cipher_generic_block_final() 419 } else if (ctx->bufsz != blksz) { in ossl_cipher_generic_block_final() 432 ctx->bufsz = 0; in ossl_cipher_generic_block_final() [all …]
|
| H A D | cipher_aes_ocb.c | 160 unsigned char *buf, size_t *bufsz, in aes_ocb_block_update_internal() argument 168 if (*bufsz != 0) in aes_ocb_block_update_internal() 169 nextblocks = ossl_cipher_fillblock(buf, bufsz, AES_BLOCK_SIZE, &in, &inl); in aes_ocb_block_update_internal() 173 if (*bufsz == AES_BLOCK_SIZE) { in aes_ocb_block_update_internal() 182 *bufsz = 0; in aes_ocb_block_update_internal() 201 && !ossl_cipher_trailingdata(buf, bufsz, AES_BLOCK_SIZE, &in, &inl)) { in aes_ocb_block_update_internal()
|
| /netbsd-src/crypto/external/bsd/openssl/dist/crypto/sha/ |
| H A D | sha3.c | 18 ctx->bufsz = 0; in ossl_sha3_reset() 54 if ((num = ctx->bufsz) != 0) { /* process intermediate buffer? */ in ossl_sha3_update() 59 ctx->bufsz += len; in ossl_sha3_update() 70 ctx->bufsz = 0; in ossl_sha3_update() 81 ctx->bufsz = rem; in ossl_sha3_update() 90 size_t num = ctx->bufsz; in ossl_sha3_final()
|
| /netbsd-src/sys/arch/ia64/stand/efi/libefi/ |
| H A D | efinet.c | 150 UINTN bufsz; in efinet_get() local 158 bufsz = sizeof(buf); in efinet_get() 159 status = net->Receive(net, 0, &bufsz, buf, 0, 0, 0); in efinet_get() 167 if (bufsz > len) in efinet_get() 168 bufsz = len; in efinet_get() 169 memcpy(pkt, buf, bufsz); in efinet_get() 170 return bufsz; in efinet_get()
|
| /netbsd-src/usr.bin/patch/ |
| H A D | pch.c | 114 while (getline(&buf, &bufsz, stdin) != -1) in open_patch_file() 274 if (getline(&buf, &bufsz, pfp) == -1) { in intuit_diff_type() 439 ret = getline(&buf, &bufsz, pfp); in skip_to() 547 ret = pgetline(&buf, &bufsz, pfp); in another_hunk() 557 ret = pgetline(&buf, &bufsz, pfp); in another_hunk() 709 strlcpy(buf + 1, " \n", bufsz - 1); in another_hunk() 875 ret = pgetline(&buf, &bufsz, pfp); in another_hunk() 918 snprintf(buf, bufsz, "*** %ld,%ld ****\n", p_first, in another_hunk() 926 snprintf(buf, bufsz, "--- %ld,%ld ----\n", p_newfirst, in another_hunk() 939 ret = pgetline(&buf, &bufsz, pfp); in another_hunk() [all …]
|
| /netbsd-src/external/mpl/bind/dist/lib/isc/ |
| H A D | picohttpparser.c | 605 size_t dst = 0, src = 0, bufsz = *_bufsz; in phr_decode_chunked() local 613 if (src == bufsz) { in phr_decode_chunked() 638 if (src == bufsz) { in phr_decode_chunked() 658 size_t avail = bufsz - src; in phr_decode_chunked() 680 if (src == bufsz) { in phr_decode_chunked() 696 if (src == bufsz) { in phr_decode_chunked() 710 if (src == bufsz) { in phr_decode_chunked() 726 ret = bufsz - src; 729 memmove(buf + dst, buf + src, bufsz - src);
|
| /netbsd-src/crypto/external/bsd/openssl/dist/providers/implementations/digests/ |
| H A D | sha3_prov.c | 78 if ((num = ctx->bufsz) != 0) { in keccak_update() 84 ctx->bufsz += len; in keccak_update() 93 ctx->bufsz = 0; in keccak_update() 100 ctx->bufsz = rem; in keccak_update() 165 s390x_klmd(ctx->buf, ctx->bufsz, NULL, 0, ctx->pad, ctx->A); in s390x_sha3_final() 176 s390x_klmd(ctx->buf, ctx->bufsz, md, ctx->md_size, ctx->pad, ctx->A); in s390x_shake_final()
|
| /netbsd-src/external/gpl3/gcc.old/dist/gcc/ |
| H A D | sort.cc | 264 size_t bufsz = (n / 2) * size; in gcc_qsort() local 265 void *buf = bufsz <= sizeof scratch ? scratch : xmalloc (bufsz); in gcc_qsort() 283 size_t bufsz = (n / 2) * size; in gcc_sort_r() local 284 void *buf = bufsz <= sizeof scratch ? scratch : xmalloc (bufsz); in gcc_sort_r()
|
| /netbsd-src/sys/dev/usb/ |
| H A D | if_urndis.c | 183 void **buf, size_t *bufsz) in urndis_ctrl_handle() argument 189 if (buf && bufsz) { in urndis_ctrl_handle() 191 *bufsz = 0; in urndis_ctrl_handle() 200 rval = urndis_ctrl_handle_query(un, hdr, buf, bufsz); in urndis_ctrl_handle() 293 const struct rndis_comp_hdr *hdr, void **buf, size_t *bufsz) in urndis_ctrl_handle_query() argument 308 if (buf && bufsz) { in urndis_ctrl_handle_query() 310 *bufsz = 0; in urndis_ctrl_handle_query() 335 if (buf && bufsz) { in urndis_ctrl_handle_query() 339 *bufsz = le32toh(msg->rm_infobuflen); in urndis_ctrl_handle_query() 909 size_t bufsz; in urndis_attach() local [all …]
|
| /netbsd-src/lib/libcrypt/ |
| H A D | hmac.c | 142 b2x(char *buf, int bufsz, unsigned char *data, int nbytes) in b2x() argument 146 if (bufsz <= (nbytes * 2)) in b2x() 158 x2b(unsigned char *buf, int bufsz, char *data, int nbytes) in x2b() argument 166 if (bufsz <= nbytes) in x2b()
|
| /netbsd-src/external/gpl3/gcc/dist/gcc/ |
| H A D | sort.cc | 264 size_t bufsz = (n / 2) * size; in gcc_qsort() local 265 void *buf = bufsz <= sizeof scratch ? scratch : xmalloc (bufsz); in gcc_qsort() 287 size_t bufsz = (n / 2) * size; in gcc_sort_r() local 288 void *buf = bufsz <= sizeof scratch ? scratch : xmalloc (bufsz); in gcc_sort_r()
|
| /netbsd-src/external/bsd/flex/dist/src/ |
| H A D | regex.c | 138 #define bufsz 20 in regmatch_strtol() macro 139 char buf[bufsz]; in regmatch_strtol() 145 if (regmatch_len (m) < bufsz) in regmatch_strtol()
|
| /netbsd-src/sys/fs/sysvbfs/ |
| H A D | bfs.c | 243 bfs_file_read(const struct bfs *bfs, const char *fname, void *buf, size_t bufsz, in bfs_file_read() argument 254 if (sz > bufsz) in bfs_file_read() 275 size_t bufsz) in bfs_file_write() argument 294 if ((err = bfs_file_create(bfs, name, buf, bufsz, &attr)) != 0) in bfs_file_write() 303 if ((err = bfs_file_create(bfs, name, buf, bufsz, &attr)) != 0) in bfs_file_write() 358 bfs_file_create(struct bfs *bfs, const char *fname, void *buf, size_t bufsz, in bfs_file_create() argument 372 n = (ROUND_SECTOR(bufsz) >> DEV_BSHIFT) - 1; in bfs_file_create() 395 inode->eof_offset_byte = start * DEV_BSIZE + bufsz - 1; in bfs_file_create() 422 memcpy(tmpbuf, p, bufsz - n); in bfs_file_create()
|
| /netbsd-src/external/cddl/osnet/dist/uts/common/fs/zfs/ |
| H A D | zfs_sa.c | 74 size_t bufsz; in zfs_sa_readlink() local 77 bufsz = zp->z_size; in zfs_sa_readlink() 78 if (bufsz + ZFS_OLD_ZNODE_PHYS_SIZE <= db->db_size) { in zfs_sa_readlink() 81 MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); in zfs_sa_readlink() 87 MIN((size_t)bufsz, uio->uio_resid), UIO_READ, uio); in zfs_sa_readlink()
|
| /netbsd-src/lib/libc/db/btree/ |
| H A D | bt_overflow.c | 83 __ovfl_get(BTREE *t, void *p, size_t *ssz, void **buf, size_t *bufsz) in __ovfl_get() argument 99 if (*bufsz < sz) { in __ovfl_get() 104 *bufsz = sz; in __ovfl_get()
|
| /netbsd-src/external/cddl/osnet/dist/tools/ctf/cvt/ |
| H A D | ctf.c | 865 size_t bufsz = h->cth_objtoff - h->cth_lbloff; in resurrect_labels() local 871 for (ctl = v; (caddr_t)ctl < buf + bufsz; ctl++) { in resurrect_labels() 910 size_t bufsz = h->cth_funcoff - h->cth_objtoff; in resurrect_objects() local 914 for (dptr = buf; dptr < buf + bufsz; dptr += 2) { in resurrect_objects() 923 (intmax_t)(dptr - buf), bufsz); in resurrect_objects() 953 size_t bufsz = h->cth_typeoff - h->cth_funcoff; in resurrect_functions() local 962 while (dptr < buf + bufsz) { in resurrect_functions() 1022 size_t bufsz = h->cth_stroff - h->cth_typeoff; in resurrect_types() local 1050 for (dptr = buf, tcnt = 0, tid = 1; dptr < buf + bufsz; tcnt++, tid++) { in resurrect_types() 1351 ctf_load(char *file, caddr_t buf, size_t bufsz, symit_data_t *si, char *label) in ctf_load() argument [all …]
|
| /netbsd-src/usr.bin/make/ |
| H A D | meta.c | 860 size_t bufsz = *szp; in fgetLine() local 864 if (fgets(&buf[o], (int)bufsz - o, fp) != NULL) { in fgetLine() 878 if (newsz <= bufsz) in fgetLine() 880 if (newsz <= bufsz) in fgetLine() 883 (unsigned)bufsz, (unsigned)newsz); in fgetLine() 886 *szp = bufsz = newsz; in fgetLine() 888 if (fgets(&buf[x], (int)bufsz - x, fp) == NULL) in fgetLine() 1118 static size_t bufsz; in meta_oodate() local 1127 bufsz = 8 * BUFSIZ; in meta_oodate() 1128 buf = bmake_malloc(bufsz); in meta_oodate() [all …]
|
| /netbsd-src/sys/kern/ |
| H A D | sys_pset.c | 558 const size_t bufsz = 1024; in sysctl_psets_list() local 564 buf = kmem_alloc(bufsz, KM_SLEEP); in sysctl_psets_list() 565 snprintf(buf, bufsz, "%d:1", PS_NONE); /* XXX */ in sysctl_psets_list() 572 strlcat(buf, tbuf, bufsz); in sysctl_psets_list() 580 kmem_free(buf, bufsz); in sysctl_psets_list()
|