| /trueos/secure/usr.bin/bdes/ |
| HD | bdes.c | 674 int nbytes; /* number of bytes to read */ in cfbenc() local 682 nbytes = fbbits / 8; in cfbenc() 686 for (bn = 1; (n = READ(ibuf, nbytes)) == nbytes; bn++) { in cfbenc() 689 for (n = 0; n < 8 - nbytes; n++) in cfbenc() 690 ivec[n] = ivec[n+nbytes]; in cfbenc() 691 for (n = 0; n < nbytes; n++) in cfbenc() 692 ivec[8 - nbytes + n] = ibuf[n] ^ msgbuf[n]; in cfbenc() 693 WRITE(&ivec[8 - nbytes], nbytes); in cfbenc() 700 MEMZERO(&ibuf[n], nbytes - n); in cfbenc() 701 ibuf[nbytes - 1] = n; in cfbenc() [all …]
|
| /trueos/contrib/apr/file_io/unix/ |
| HD | readwrite.c | 29 apr_size_t *nbytes) in file_read_buffered() argument 34 apr_uint64_t size = *nbytes; in file_read_buffered() 78 *nbytes = pos - (char *)buf; in file_read_buffered() 79 if (*nbytes) { in file_read_buffered() 85 APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes) in apr_file_read() argument 90 if (*nbytes <= 0) { in apr_file_read() 91 *nbytes = 0; in apr_file_read() 97 rv = file_read_buffered(thefile, buf, nbytes); in apr_file_read() 107 (*nbytes)--; in apr_file_read() 109 if (*nbytes == 0) { in apr_file_read() [all …]
|
| HD | fullrw.c | 21 apr_size_t nbytes, in apr_file_read_full() argument 28 apr_size_t amt = nbytes; in apr_file_read_full() 32 nbytes -= amt; in apr_file_read_full() 34 } while (status == APR_SUCCESS && nbytes > 0); in apr_file_read_full() 44 apr_size_t nbytes, in apr_file_write_full() argument 51 apr_size_t amt = nbytes; in apr_file_write_full() 55 nbytes -= amt; in apr_file_write_full() 57 } while (status == APR_SUCCESS && nbytes > 0); in apr_file_write_full()
|
| /trueos/contrib/file/src/ |
| HD | encoding.c | 68 file_encoding(struct magic_set *ms, const unsigned char *buf, size_t nbytes, unichar **ubuf, size_t… in file_encoding() argument 79 mlen = (nbytes + 1) * sizeof((*ubuf)[0]); in file_encoding() 84 mlen = (nbytes + 1) * sizeof(nbuf[0]); in file_encoding() 90 if (looks_ascii(buf, nbytes, *ubuf, ulen)) { in file_encoding() 94 } else if (looks_utf8_with_BOM(buf, nbytes, *ubuf, ulen) > 0) { in file_encoding() 98 } else if (file_looks_utf8(buf, nbytes, *ubuf, ulen) > 1) { in file_encoding() 102 } else if ((ucs_type = looks_ucs16(buf, nbytes, *ubuf, ulen)) != 0) { in file_encoding() 111 } else if (looks_latin1(buf, nbytes, *ubuf, ulen)) { in file_encoding() 115 } else if (looks_extended(buf, nbytes, *ubuf, ulen)) { in file_encoding() 120 from_ebcdic(buf, nbytes, nbuf); in file_encoding() [all …]
|
| HD | ascmagic.c | 62 trim_nuls(const unsigned char *buf, size_t nbytes) in trim_nuls() argument 64 while (nbytes > 1 && buf[nbytes - 1] == '\0') in trim_nuls() 65 nbytes--; in trim_nuls() 67 return nbytes; in trim_nuls() 71 file_ascmagic(struct magic_set *ms, const unsigned char *buf, size_t nbytes, in file_ascmagic() argument 85 nbytes = trim_nuls(buf, nbytes); in file_ascmagic() 88 if (file_encoding(ms, buf, nbytes, &ubuf, &ulen, &code, &code_mime, in file_ascmagic() 92 rv = file_ascmagic_with_encoding(ms, buf, nbytes, ubuf, ulen, code, in file_ascmagic() 102 size_t nbytes, unichar *ubuf, size_t ulen, const char *code, in file_ascmagic_with_encoding() argument 129 nbytes = trim_nuls(buf, nbytes); in file_ascmagic_with_encoding() [all …]
|
| /trueos/lib/libc/stdio/ |
| HD | fmemopen.c | 47 static int fmemopen_read(void *cookie, char *buf, int nbytes); 48 static int fmemopen_write(void *cookie, const char *buf, int nbytes); 162 fmemopen_read(void *cookie, char *buf, int nbytes) in fmemopen_read() argument 166 if (nbytes > ck->len - ck->off) in fmemopen_read() 167 nbytes = ck->len - ck->off; in fmemopen_read() 169 if (nbytes == 0) in fmemopen_read() 172 memcpy(buf, ck->buf + ck->off, nbytes); in fmemopen_read() 174 ck->off += nbytes; in fmemopen_read() 176 return (nbytes); in fmemopen_read() 180 fmemopen_write(void *cookie, const char *buf, int nbytes) in fmemopen_write() argument [all …]
|
| HD | xprintf_str.c | 60 size_t clen, nbytes; in __wcsconv() local 66 nbytes = wcsrtombs(NULL, (const wchar_t **)&p, 0, &mbs); in __wcsconv() 67 if (nbytes == (size_t)-1) in __wcsconv() 76 nbytes = prec; in __wcsconv() 78 nbytes = 0; in __wcsconv() 84 (int)(nbytes + clen) > prec) in __wcsconv() 86 nbytes += clen; in __wcsconv() 90 if ((convbuf = malloc(nbytes + 1)) == NULL) in __wcsconv() 96 if ((nbytes = wcsrtombs(convbuf, (const wchar_t **)&p, in __wcsconv() 97 nbytes, &mbs)) == (size_t)-1) { in __wcsconv() [all …]
|
| /trueos/bin/sh/ |
| HD | memalloc.c | 56 ckmalloc(size_t nbytes) in ckmalloc() argument 61 p = malloc(nbytes); in ckmalloc() 74 ckrealloc(pointer p, int nbytes) in ckrealloc() argument 77 p = realloc(p, nbytes); in ckrealloc() 135 stnewblock(int nbytes) in stnewblock() argument 140 if (nbytes < MINSIZE) in stnewblock() 141 nbytes = MINSIZE; in stnewblock() 143 allocsize = ALIGN(sizeof(struct stack_block)) + ALIGN(nbytes); in stnewblock() 157 stalloc(int nbytes) in stalloc() argument 161 nbytes = ALIGN(nbytes); in stalloc() [all …]
|
| /trueos/crypto/openssl/engines/ |
| HD | e_padlock.c | 678 const unsigned char *in, size_t nbytes); 864 const unsigned char *in_arg, size_t nbytes) in padlock_aes_cipher_omnivorous() argument 874 padlock_xcrypt_ecb(nbytes / AES_BLOCK_SIZE, cdata, out_arg, in_arg); in padlock_aes_cipher_omnivorous() 879 iv = padlock_xcrypt_cbc(nbytes / AES_BLOCK_SIZE, cdata, out_arg, in padlock_aes_cipher_omnivorous() 886 iv = padlock_xcrypt_cfb(nbytes / AES_BLOCK_SIZE, cdata, out_arg, in padlock_aes_cipher_omnivorous() 893 padlock_xcrypt_ofb(nbytes / AES_BLOCK_SIZE, cdata, out_arg, in_arg); in padlock_aes_cipher_omnivorous() 919 const unsigned char *in_arg, size_t nbytes) in padlock_aes_cipher() argument 940 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_aes_cipher() 942 chunk++, nbytes--; in padlock_aes_cipher() 944 while (chunk < AES_BLOCK_SIZE && nbytes != 0) { in padlock_aes_cipher() [all …]
|
| /trueos/lib/libc/db/btree/ |
| HD | bt_split.c | 88 u_int32_t n, nbytes, nksize; in __bt_split() local 176 nbytes = NBINTERNAL(bi->ksize); in __bt_split() 180 nbytes = NBINTERNAL(bl->ksize); in __bt_split() 190 if (n < nbytes) { in __bt_split() 192 bt_pfxsaved += nbytes - n; in __bt_split() 194 nbytes = n; in __bt_split() 202 nbytes = NRINTERNAL; in __bt_split() 209 if ((u_int32_t)(h->upper - h->lower) < nbytes + sizeof(indx_t)) { in __bt_split() 212 bt_root(t, h, &l, &r, &skip, nbytes) : in __bt_split() 213 bt_page(t, h, &l, &r, &skip, nbytes); in __bt_split() [all …]
|
| /trueos/usr.sbin/fdread/ |
| HD | fdread.c | 163 unsigned int nbytes, tracksize, mediasize, secsize, n; in doread() local 180 for (nbytes = 0; nbytes < mediasize;) { in doread() 181 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 186 warnx("premature EOF after %u bytes", nbytes); in doread() 190 nbytes += rv; in doread() 192 fprintf(stderr, "%5d KB\r", nbytes / 1024); in doread() 200 if (lseek(fd, nbytes, SEEK_SET) != nbytes) in doread() 204 nbytes += rv; in doread() 207 nbytes / 1024); in doread() 263 nbytes, in doread() [all …]
|
| /trueos/sys/netinet/libalias/ |
| HD | alias_util.c | 75 int nbytes) in LibAliasInternetChecksum() argument 81 while (nbytes > 1) { in LibAliasInternetChecksum() 83 nbytes -= 2; in LibAliasInternetChecksum() 85 if (nbytes == 1) { in LibAliasInternetChecksum() 111 int nhdr, ntcp, nbytes; in TcpChecksum() local 121 nbytes = ntcp; in TcpChecksum() 123 while (nbytes > 1) { in TcpChecksum() 125 nbytes -= 2; in TcpChecksum() 127 if (nbytes == 1) { in TcpChecksum()
|
| /trueos/contrib/gdb/gdb/ |
| HD | dwarfread.c | 1173 int nbytes; in decode_array_element_type() local 1178 nbytes = attribute_size (attribute); in decode_array_element_type() 1179 if (nbytes == -1) in decode_array_element_type() 1189 fundtype = target_to_host (scan, nbytes, GET_UNSIGNED, in decode_array_element_type() 1197 die_ref = target_to_host (scan, nbytes, GET_UNSIGNED, in decode_array_element_type() 1273 int nbytes; in decode_subscript_data_item() local 1288 nbytes = TARGET_FT_LONG_SIZE (current_objfile); in decode_subscript_data_item() 1289 lowbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); in decode_subscript_data_item() 1290 scan += nbytes; in decode_subscript_data_item() 1291 highbound = target_to_host (scan, nbytes, GET_UNSIGNED, current_objfile); in decode_subscript_data_item() [all …]
|
| /trueos/contrib/tcsh/ |
| HD | tc.alloc.c | 173 malloc(size_t nbytes) in malloc() argument 194 nbytes++; in malloc() 197 nbytes = MEMALIGN(MEMALIGN(sizeof(union overhead)) + nbytes + RSLOP); in malloc() 198 shiftr = (nbytes - 1) >> 2; in malloc() 215 xprintf(CGETS(19, 1, "nbytes=%zu: Out of memory\n"), nbytes); in malloc() 230 p->ov_size = (p->ov_index <= 13) ? nbytes - 1 : 0; in malloc() 232 *((U_int *) (((caddr_t) p) + nbytes - RSLOP)) = RMAGIC; in malloc() 236 if (nbytes) in malloc() 379 realloc(ptr_t cp, size_t nbytes) in realloc() argument 389 return (malloc(nbytes)); in realloc() [all …]
|
| /trueos/lib/libc/locale/ |
| HD | wcsnrtombs.c | 65 size_t nbytes; in __wcsnrtombs_std() local 70 nbytes = 0; in __wcsnrtombs_std() 78 return (nbytes + nb - 1); in __wcsnrtombs_std() 80 nbytes += nb; in __wcsnrtombs_std() 82 return (nbytes); in __wcsnrtombs_std() 114 return (nbytes + nb - 1); in __wcsnrtombs_std() 119 nbytes += nb; in __wcsnrtombs_std() 122 return (nbytes); in __wcsnrtombs_std()
|
| /trueos/contrib/expat/xmlwf/ |
| HD | readfilemap.c | 48 size_t nbytes; in filemap() local 69 nbytes = sb.st_size; in filemap() 71 if (nbytes == 0) { in filemap() 77 p = malloc(nbytes); in filemap() 83 n = read(fd, p, nbytes); in filemap() 90 if (n != nbytes) { in filemap() 96 processor(p, nbytes, name, arg); in filemap()
|
| HD | unixfilemap.c | 26 size_t nbytes; in filemap() local 46 nbytes = sb.st_size; in filemap() 48 if (nbytes == 0) { in filemap() 54 p = (void *)mmap((caddr_t)0, (size_t)nbytes, PROT_READ, in filemap() 61 processor(p, nbytes, name, arg); in filemap() 62 munmap((caddr_t)p, nbytes); in filemap()
|
| /trueos/contrib/apr/network_io/unix/ |
| HD | sendrecv.c | 261 int rv, nbytes = 0, total_hdrbytes, i; in apr_socket_sendfile() local 311 nbytes += hdrbytes; in apr_socket_sendfile() 358 *len = nbytes; in apr_socket_sendfile() 364 nbytes += rv; in apr_socket_sendfile() 367 *len = nbytes; in apr_socket_sendfile() 395 nbytes += trbytes; in apr_socket_sendfile() 397 *len = nbytes; in apr_socket_sendfile() 406 (*len) = nbytes; in apr_socket_sendfile() 417 apr_off_t nbytes = 0; in apr_socket_sendfile() local 471 nbytes = bytes_to_send; in apr_socket_sendfile() [all …]
|
| /trueos/contrib/subversion/subversion/libsvn_subr/ |
| HD | utf_width.c | 232 int nbytes; in svn_utf_cstring_utf8_width() local 239 nbytes = 1; in svn_utf_cstring_utf8_width() 244 nbytes = 2; in svn_utf_cstring_utf8_width() 249 nbytes = 3; in svn_utf_cstring_utf8_width() 254 nbytes = 4; in svn_utf_cstring_utf8_width() 267 for (i = 1; i < nbytes; i++) in svn_utf_cstring_utf8_width() 273 cstr += nbytes; in svn_utf_cstring_utf8_width()
|
| /trueos/sys/kern/ |
| HD | vfs_extattr.c | 160 void *data, size_t nbytes, struct thread *td) in extattr_set_vp() argument 174 aiov.iov_len = nbytes; in extattr_set_vp() 178 if (nbytes > IOSIZE_MAX) { in extattr_set_vp() 182 auio.uio_resid = nbytes; in extattr_set_vp() 186 cnt = nbytes; in extattr_set_vp() 235 attrname, uap->data, uap->nbytes, td); 270 uap->data, uap->nbytes, td); 305 uap->data, uap->nbytes, td); 323 void *data, size_t nbytes, struct thread *td) in extattr_get_vp() argument 343 aiov.iov_len = nbytes; in extattr_get_vp() [all …]
|
| /trueos/libexec/rtld-elf/ |
| HD | malloc.c | 152 malloc(nbytes) in malloc() argument 153 size_t nbytes; in malloc() 188 if (nbytes <= (unsigned long)(n = pagesz - sizeof (*op) - RSLOP)) { 201 while (nbytes > amt + n) { 228 op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1); 341 realloc(cp, nbytes) in realloc() argument 343 size_t nbytes; 352 return (malloc(nbytes)); 390 if (nbytes <= onb && nbytes > (size_t)i) { 392 op->ov_size = (nbytes + RSLOP - 1) & ~(RSLOP - 1); [all …]
|
| /trueos/sbin/dump/ |
| HD | cache.c | 81 cread(int fd, void *buf, size_t nbytes, off_t offset) in cread() argument 96 return(pread(fd, buf, nbytes, offset)); in cread() 107 if (nbytes >= BlockSize || in cread() 108 ((offset ^ (offset + nbytes - 1)) & mask) != 0) { in cread() 109 return(pread(fd, buf, nbytes, offset)); in cread() 137 bcopy(blk->b_Data + (offset - blk->b_Offset), buf, nbytes); in cread() 141 return(nbytes); in cread() 143 return(pread(fd, buf, nbytes, offset)); in cread()
|
| /trueos/crypto/heimdal/lib/roken/ |
| HD | net_read.c | 45 net_read (rk_socket_t fd, void *buf, size_t nbytes) in net_read() argument 49 size_t rem = nbytes; in net_read() 64 return nbytes; in net_read() 70 net_read(rk_socket_t sock, void *buf, size_t nbytes) in net_read() argument 74 size_t rem = nbytes; in net_read() 115 return nbytes; in net_read()
|
| HD | net_write.c | 45 net_write (rk_socket_t fd, const void *buf, size_t nbytes) in net_write() argument 49 size_t rem = nbytes; in net_write() 62 return nbytes; in net_write() 68 net_write(rk_socket_t sock, const void *buf, size_t nbytes) in net_write() argument 72 size_t rem = nbytes; in net_write() 104 return nbytes; in net_write()
|
| /trueos/contrib/llvm/lib/Target/NVPTX/ |
| HD | NVPTXutil.cpp | 36 static int encode_leb128(uint64_t val, int *nbytes, char *space, int splen) { in encode_leb128() argument 53 *nbytes = a - space; in encode_leb128() 73 int nbytes; in encode_leb128() local 75 int retval = encode_leb128(temp64.x, &nbytes, encoded, 16); in encode_leb128() 80 assert(nbytes <= 8 && in encode_leb128() 84 for (int i = 0; i < nbytes; ++i) in encode_leb128()
|