Home
last modified time | relevance | path

Searched refs:bytes (Results 1 – 25 of 65) sorted by relevance

123

/picolibc-3.7.0-3.6.0/newlib/libc/iconv/ces/
Dutf-8.c51 register size_t bytes; in convert_from_ucs() local
59 bytes = 1; in convert_from_ucs()
61 bytes = 2; in convert_from_ucs()
63 bytes = 3; in convert_from_ucs()
65 bytes = 4; in convert_from_ucs()
67 bytes = 5; in convert_from_ucs()
69 bytes = 6; in convert_from_ucs()
71 if (*outbytesleft < bytes) in convert_from_ucs()
76 switch (bytes) in convert_from_ucs()
118 *outbytesleft -= bytes; in convert_from_ucs()
[all …]
Dutf-16.c94 register size_t bytes; in utf_16_convert_from_ucs() local
102 bytes = (*state == UTF16_SYSTEM_ENDIAN) ? sizeof (ucs2_t) * 2 in utf_16_convert_from_ucs()
106 bytes += sizeof (ucs2_t); in utf_16_convert_from_ucs()
108 if (*outbytesleft < bytes) in utf_16_convert_from_ucs()
160 *outbuf += bytes; in utf_16_convert_from_ucs()
161 *outbytesleft -= bytes; in utf_16_convert_from_ucs()
163 return bytes; in utf_16_convert_from_ucs()
197 size_t bytes = sizeof (ucs2_t); in utf_16_convert_to_ucs() local
200 if (*inbytesleft < bytes) in utf_16_convert_to_ucs()
216 if (*inbytesleft < (bytes += sizeof (ucs2_t))) in utf_16_convert_to_ucs()
[all …]
Deuc.c53 int bytes; member
206 if (((int)*outbytesleft - d->desc[i].prefixbytes - d->desc[i].bytes) < 0) in euc_convert_from_ucs()
232 if (res == d->desc[i].bytes) in euc_convert_from_ucs()
238 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_from_ucs()
248 return (size_t)(res + d->desc[i].bytes); in euc_convert_from_ucs()
362 if (((int)*inbytesleft - d->desc[i].prefixbytes - d->desc[i].bytes) < 0) in euc_convert_to_ucs()
366 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_to_ucs()
373 for (j = 0; j < d->desc[i].bytes; j++) in euc_convert_to_ucs()
376 inbytesleft1 = d->desc[i].bytes; in euc_convert_to_ucs()
384 *inbuf += d->desc[i].bytes + d->desc[i].prefixbytes; in euc_convert_to_ucs()
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/stdlib/
Dwcstombs.c66 int i, bytes, num_to_copy; in wcstombs() local
73 bytes = __WCTOMB (buff, *pwcs++, &state); in wcstombs()
74 if (bytes == -1) in wcstombs()
76 num_bytes += bytes; in wcstombs()
84 bytes = __WCTOMB (buff, *pwcs, &state); in wcstombs()
85 if (bytes == -1) in wcstombs()
87 num_to_copy = (n > (size_t) bytes ? bytes : (int)n); in wcstombs()
92 return ptr - s - (n >= (size_t) bytes); in wcstombs()
Dmbsnrtowcs.c76 int bytes; in mbsnrtowcs() local
98 bytes = mbrtowc (ptr, *src, nms, ps); in mbsnrtowcs()
99 if (bytes > 0) in mbsnrtowcs()
101 *src += bytes; in mbsnrtowcs()
102 nms -= bytes; in mbsnrtowcs()
107 else if (bytes == -2) in mbsnrtowcs()
112 else if (bytes == 0) in mbsnrtowcs()
Dmbstowcs.c64 int bytes; in mbstowcs() local
70 bytes = __MBTOWC (pwcs, t, MB_CUR_MAX, &state); in mbstowcs()
71 if (bytes < 0) in mbstowcs()
76 else if (bytes == 0) in mbstowcs()
78 t += bytes; in mbstowcs()
Dreallocarray.c28 size_t bytes; in reallocarray() local
30 if (mul_overflow (nmemb, size, &bytes)) in reallocarray()
35 return realloc(optr, bytes); in reallocarray()
Dwcsnrtombs.c104 int bytes = loc->wctomb (buff, *pwcs, ps); in _wcsnrtombs_l() local
105 if (bytes == -1) in _wcsnrtombs_l()
111 if (n + bytes <= len) in _wcsnrtombs_l()
113 n += bytes; in _wcsnrtombs_l()
116 for (i = 0; i < bytes; ++i) in _wcsnrtombs_l()
Dchacha_private.h106 chacha_encrypt_bytes(chacha_ctx *x,const u8 *m,u8 *c,u32 bytes) in chacha_encrypt_bytes() argument
114 if (!bytes) return; in chacha_encrypt_bytes()
134 if (bytes < 64) { in chacha_encrypt_bytes()
135 for (i = 0;i < bytes;++i) tmp[i] = m[i]; in chacha_encrypt_bytes()
225 if (bytes <= 64) { in chacha_encrypt_bytes()
226 if (bytes < 64) { in chacha_encrypt_bytes()
227 for (i = 0;i < bytes;++i) ctarget[i] = c[i]; in chacha_encrypt_bytes()
233 bytes -= 64; in chacha_encrypt_bytes()
Dmallocr.c2303 Void_t* mALLOc(size_t bytes) in mALLOc() argument
2305 Void_t* mALLOc(bytes) RDECL size_t bytes; in mALLOc()
2310 return malloc (bytes); // Make sure that the pointer returned by malloc is returned back.
2327 INTERNAL_SIZE_T nb = request2size(bytes); /* padded request size; */
2330 if (nb > INT_MAX || nb < bytes)
2754 Void_t* rEALLOc(Void_t* oldmem, size_t bytes) in rEALLOc() argument
2756 Void_t* rEALLOc(oldmem, bytes) RDECL Void_t* oldmem; size_t bytes; in rEALLOc()
2761 realloc (oldmem, bytes);
2787 if (bytes == 0) { fREe(oldmem); return 0; }
2792 if (oldmem == 0) return mALLOc(bytes);
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/tinystdio/
Dfwrite.c48 size_t bytes; in fwrite() local
53 !mul_overflow(size, nmemb, &bytes) && in fwrite()
54 bytes > 0) in fwrite()
59 if (bytes < (unsigned) bf->size) { in fwrite()
61 while (bytes) { in fwrite()
70 if ((unsigned) this_time > bytes) in fwrite()
71 this_time = bytes; in fwrite()
75 bytes -= this_time; in fwrite()
80 while (bytes) { in fwrite()
81 ssize_t len = (bf->write)(bf->fd, cp, bytes); in fwrite()
[all …]
Dfread.c52 size_t bytes; in fread() local
54 !mul_overflow(size, nmemb, &bytes) && bytes > 0) in fread()
67 bytes--; in fread()
70 while (bytes) { in fread()
75 if (bytes < (size_t) this_time) in fread()
76 this_time = bytes; in fread()
80 bytes -= this_time; in fread()
91 if (bytes < (size_t) bf->size) { in fread()
104 ssize_t len = (bf->read)(bf->fd, cp, bytes); in fread()
110 bytes -= len; in fread()
/picolibc-3.7.0-3.6.0/newlib/libc/machine/rx/
Dstrncpy.S16 2: mov.b [r2+], r5 ; Copy bytes until...
23 4: mov.b r5, [r4+] ; Continue to write further NUL bytes
32 smovu ; Copy the bytes
33 cmp #0, r3 ; If we have copied the number of bytes requested
36 sub r3, r1 ; Subtract the number of bytes left to be written.
37 mov #0, r2 ; Fill the remaining bytes with NULs,
Dstrncat.S12 ;; r3 => Max number of bytes to copy
25 3: mov.b [r2+], r5 ; Copy bytes from the source into the destination ...
30 bne 3b ; ... or we have copied N bytes.
43 mov r14, r3 ; Restore the limit on the number of bytes copied.
48 …add #0, r14, r3 ; Restore the number of bytes to copy (again), but this time set the Z flag as wel…
49 …beq 1f ; If we copied 0 bytes then we already know that the dest string is NUL terminated, so w…
51 mov r5, r1 ; was included in the bytes that were copied.
54 add r14, r5 ; Point at byte after end of copied bytes.
Dstrcat.S21 2: mov.b [r2+], r5 ; Copy bytes from R2 to R4 until we reach a NUL byte.
32 mov #-1, r3 ; Limit on the number of bytes examined.
36 mov #-1, r3 ; Set a limit on the number of bytes copied.
/picolibc-3.7.0-3.6.0/newlib/libc/machine/i960/
Dstrncpy_ca.S113 cmpibge.f 0,g2,Lexit_code # Lexit if number of bytes to move is <= zero.
128 cmpi g2,4 # check for fewer than four bytes to move
131 bl.f Lcase_1_cloop.a # branch if fewer than four bytes to copy
134 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
178 andnot g5,g1,g1 # last bytes to copy, and null pad rest of word
180 subo 1,LSW,g5 # mask to get last bytes to copy, and null pad
181 and g5,g1,g1 # last bytes to copy, and null pad rest of word
186 cmpi g2,4 # check for fewer than four bytes to move
188 bl.f Lcase_1_cloop.b # branch if fewer than four bytes to copy
189 subo 4,g2,g2 # decrease max_byte count by the 4 bytes moved
[all …]
Dmemcpy_ca.S115 cmpibge.f 0,g2,Lquick_exit # Lexit if number of bytes to move is <= zero.
160 cmpi g2,4 # less than four bytes to move?
162 eshro g14,g6,g1 # extract 4 bytes of src
163 bl.f Lcase_3_cloop # branch if < four bytes left to move
166 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
167 st g1,(g4) # store 4 bytes to dest
172 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
177 cmpi g2,4 # check for fewer than four bytes to move
180 bge.t Lcase_1_wloop # branch if at least four bytes to copy
214 cmpo g0,g1 # < indicates first word of dest has more bytes
[all …]
Dmemccpy_ca.S94 cmpibge.f 0,g3,Lexit_char_not_found # Lexit if # of bytes to move is <= 0
144 cmpi g3,4 # less than four bytes to move?
146 mov LSW,g1 # extract 4 bytes of src
147 bl.f Lcase_13_cloop_setup # branch if < four bytes left to move
152 subi 4,g3,g3 # decrease max_byte count by the 4 bytes moved
153 st g1,(g0) # store 4 bytes to dest
159 cmpi g3,4 # less than four bytes to move?
161 eshro g14,g6,g1 # extract 4 bytes of src
162 bl.f Lcase_13_cloop_setup # branch if < four bytes left to move
167 subi 4,g3,g3 # decrease max_byte count by the 4 bytes moved
[all …]
Dmemcpy.S108 cmpibge 0,g2,Lexit # exit if number of bytes to move is <= zero.
128 bge Lwloop_a # loop if more than 3 bytes to move
129 cmpobe g6, g5, Lexit # quit if no more bytes to move
135 cmpobne g6, g5, Lcloop_a # quit if no more bytes to move
150 ble Lwloop.a # loop if more than 3 bytes to move
151 cmpobe g6, g0, Lexit # quit if no more bytes to move
157 cmpobne g6, g0, Lcloop.a # quit if no more bytes to move
Dstrncat_ca.S113 cmpibge.f 0,g2,Lexit_code # Lexit if number of bytes to move is <= zero.
119 shro g14,LSW,LSW # get mask for bytes needed from first word
121 shlo g14,LSW,LSW # get mask for bytes needed from first word
123 notor MSW,LSW,MSW # set unneeded bytes to all ones
149 cmpi g2,4 # check for fewer than four bytes to move
151 bl.f Lcase_1_cloop # branch if fewer than four bytes to copy
156 subi 4,g2,g2 # decrease max_byte count by the 4 bytes moved
204 cmpo MSW,g1 # < indicates first word of dest has more bytes
210 eshro g14,g6,g5 # extract four bytes
258 cmpi g2,4 # less than four bytes to move?
[all …]
Dstrchr_ca.S92 shlo 8,g1,g2 # broadcast the char to four bytes
106 shro g6,g5,g5 # get mask for bytes needed from first word
108 shlo g6,g5,g5 # get mask for bytes needed from first word
110 notor g4,g5,g4 # set unneeded bytes to all ones
148 and g4,g2,g4 # make unimportant bytes of first word 0x0f
Dmemchr_ca.S99 shlo 8,g1,g3 # broadcast the char to four bytes
108 shro g6,g5,g5 # get mask for bytes needed from first word
110 shlo g6,g5,g5 # get mask for bytes needed from first word
112 notor g4,g5,g4 # set unneeded bytes to all ones
150 and g4,g6,g4 # make unimportant bytes of first word 0x0f
Dstrlen_ca.S99 shro g7,g3,g3 # get mask for bytes needed from first word
100 notor g5,g3,g7 # set unneeded bytes to all ones
103 shlo g7,g3,g3 # get mask for bytes needed from first word
104 notor g5,g3,g7 # set unneeded bytes to all ones
/picolibc-3.7.0-3.6.0/newlib/libc/iconv/ccs/
Dmktbl.pl547 my $bytes;
553 $bytes = \$ToSpeedBytes;
559 $bytes = \$FromSpeedBytes;
579 $$bytes = 0;
583 $$bytes += 256;
589 $$bytes *= 2 if $Bits == 16;
590 $$bytes += $Hdr8bitFromUCS if $Bits == 8;
591 $$bytes += 512;
624 my $bytes;
630 $bytes = \$ToSizeBytes;
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/iconv/lib/
Ducsconv.c159 register size_t bytes; in ucs_based_conversion_convert() local
191 bytes = uc->from_ucs.handlers->convert_from_ucs (uc->from_ucs.data, ch, in ucs_based_conversion_convert()
194 if (bytes == (size_t)ICONV_CES_NOSPACE) in ucs_based_conversion_convert()
201 else if (bytes == (size_t)ICONV_CES_INVALID_CHARACTER) in ucs_based_conversion_convert()
216 bytes = uc->from_ucs.handlers->convert_from_ucs ( in ucs_based_conversion_convert()
221 if ((ssize_t)bytes < 0) in ucs_based_conversion_convert()

123