Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 166) sorted by relevance

1234567

/picolibc-3.7.0-3.6.0/newlib/libc/time/
Dstrptime.c75 match_string (const char *__restrict *buf, const char * const*strs, in match_string() argument
83 if (strncasecmp_l (*buf, strs[i], len, locale) == 0) { in match_string()
84 *buf += len; in match_string()
157 strptime_l (const char *buf, const char *format, struct tm *timeptr, in strptime_l() argument
169 while (isspace_l ((unsigned char) *buf, locale)) in strptime_l()
170 ++buf; in strptime_l()
177 ret = match_string (&buf, _ctloc (weekday), locale); in strptime_l()
184 ret = match_string (&buf, _ctloc (wday), locale); in strptime_l()
191 ret = match_string (&buf, _ctloc (month), locale); in strptime_l()
199 ret = match_string (&buf, _ctloc (mon), locale); in strptime_l()
[all …]
/picolibc-3.7.0-3.6.0/test/
Dtest-long-long.c46 naive_atou(const char *buf) in naive_atou() argument
52 while ((c = *buf++) == ' ') in naive_atou()
57 c = *buf++; in naive_atou()
63 naive_atol(const char *buf) in naive_atol() argument
69 while ((c = *buf++) == ' ') in naive_atol()
74 c = *buf++; in naive_atol()
78 c = *buf++; in naive_atol()
84 c = *buf++; in naive_atol()
90 naive_utoa(char *buf, unsigned long long v) in naive_utoa() argument
92 buf += 21; in naive_utoa()
[all …]
Dtest-efcvt.c63 #define ecvt_r(n, dig, dec, sign, buf, len) (ecvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
64 #define fcvt_r(n, dig, dec, sign, buf, len) (fcvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
65 #define ecvtf_r(n, dig, dec, sign, buf, len) (ecvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
66 #define fcvtf_r(n, dig, dec, sign, buf, len) (fcvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
178 int ret = func(tests[i].value, tests[i].ndigit, &decpt, &sign, buf, sizeof(buf)); \
184 if (skip_long && strlen(buf) > 6) { \
185 printf("skipping test as result is long (%s)\n", buf); \
188 if (strcmp(buf, tests[i].expect) != 0 || \
193 i, buf, decpt, sign, \
205 static char buf[2048]; in main() local
Dprintf_scanf.c188 char buf[256]; in main() local
230 sprintf(buf, "%g", printf_float(0.0f)); in main()
231 if (strcmp(buf, "0") != 0) { in main()
232 printf("0: wanted \"0\" got \"%s\"\n", buf); in main()
275 strncpy(buf, "123", y - 1); in main()
276 buf[y-1] = '\0'; in main()
277 printf("%s: returned buffer want %s got %s\n", name, buf, tbuf); in main()
291 sprintf(buf, FMT(prefix, oconv), v); \ in main()
292 __n = sscanf(buf, FMT(prefix, iconv), &r); \ in main()
393 sprintf(buf, "%.55f", printf_float(v)); in main()
[all …]
Dt_fmemopen.c139 char buf[BUFSIZ]; in ATF_TC_BODY() local
143 fp = fmemopen(&buf[0], sizeof(buf), *p); in ATF_TC_BODY()
196 char buf[BUFSIZ]; in ATF_TC_BODY() local
201 memset(&buf[0], 0x1, sizeof(buf)); in ATF_TC_BODY()
202 fp = fmemopen(&buf[0], sizeof(buf), *p); in ATF_TC_BODY()
209 ATF_CHECK((unsigned char)buf[0] == 0x1); in ATF_TC_BODY()
218 ATF_CHECK(ftello(fp) == (off_t)sizeof(buf)); in ATF_TC_BODY()
249 char buf[BUFSIZ]; in ATF_TC_BODY() local
254 memset(&buf[0], 0x1, sizeof(buf)); in ATF_TC_BODY()
255 fp = fmemopen(&buf[0], sizeof(buf), *p); in ATF_TC_BODY()
[all …]
Dtest-memset.c86 check(char *label, void *buf, size_t size, size_t start, size_t end, int c) in check() argument
90 char *b = buf; in check()
128 static char buf[MAX_BUF]; variable
136 buf[p] = expect(p); in fill()
143 char *b = buf; in test()
146 error += check("memset", buf, MAX_BUF, start, end, c); in test()
150 error += check("bzero", buf, MAX_BUF, start, end, 0); in test()
155 error += check("__aeabi_memset", buf, MAX_BUF, start, end, c); in test()
159 error += check("__aeabi_memclr", buf, MAX_BUF, start, end, 0); in test()
166 error += check("__aeabi_memset4", buf, MAX_BUF, start, end, c); in test()
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/stdlib/
Decvtbuf.c67 char *buf, in print_f() argument
81 buf[0] = '\0'; in print_f()
87 strcpy (buf, p); in print_f()
92 *buf++ = *p++; in print_f()
98 *buf++ = '0'; in print_f()
105 *buf++ = '0'; in print_f()
107 *buf++ = '.'; in print_f()
110 *buf++ = '0'; in print_f()
118 *buf++ = *p++; in print_f()
124 *buf++ = '0'; in print_f()
[all …]
Dwcstod.c154 char *buf, *end; in wcstod_l() local
179 if ((buf = malloc(len + 1)) == NULL) in wcstod_l()
182 _wcsnrtombs_l(buf, &wcp, (size_t) -1, len + 1, &mbs, loc); in wcstod_l()
185 val = strtod_l(buf, &end, loc); in wcstod_l()
207 char *d = strstr (buf, decimal_point); in wcstod_l()
211 *endptr = (wchar_t *)nptr + (end - buf); in wcstod_l()
214 free(buf); in wcstod_l()
226 char *buf, *end; in wcstof_l() local
251 if ((buf = malloc(len + 1)) == NULL) in wcstof_l()
254 _wcsnrtombs_l(buf, &wcp, (size_t) -1, len + 1, &mbs, loc); in wcstof_l()
[all …]
Defgcvt.c133 char *buf) in gcvt() argument
135 char *tbuf = buf; in gcvt()
137 *buf = '-'; in gcvt()
138 buf++; in gcvt()
141 return (_gcvt (d, ndigit, buf, 'g', 0) ? tbuf : 0); in gcvt()
148 char *buf) in gcvtf() argument
151 return gcvt (asd, ndigit, buf); in gcvtf()
/picolibc-3.7.0-3.6.0/newlib/libc/stdio/
Dgetdelim.c50 char *buf; in __getdelim() local
63 buf = *bufptr; in __getdelim()
64 if (buf == NULL || *n < MIN_LINE_SIZE) in __getdelim()
66 buf = (char *)realloc (*bufptr, DEFAULT_LINE_SIZE); in __getdelim()
67 if (buf == NULL) in __getdelim()
71 *bufptr = buf; in __getdelim()
80 ptr = buf; in __getdelim()
108 pos = ptr - buf; in __getdelim()
110 buf = realloc (buf, newsize); in __getdelim()
111 if (buf == NULL) in __getdelim()
[all …]
Dfmemopen.c75 char *buf; /* buffer start */ member
89 char *buf, in fmemreader() argument
98 memcpy (buf, c->buf + c->pos, n); in fmemreader()
108 const char *buf, in fmemwriter() argument
119 memset (c->buf + c->eof, '\0', c->pos - c->eof); in fmemwriter()
135 c->saved = c->buf[c->eof - adjust] = '\0'; in fmemwriter()
141 c->saved = c->buf[c->pos + n - adjust]; in fmemwriter()
142 c->buf[c->pos + n - adjust] = '\0'; in fmemwriter()
149 memcpy (c->buf + c->pos - n, buf, n - adjust); in fmemwriter()
198 c->buf[c->pos] = c->saved; in fmemseeker()
[all …]
Dfputws.c102 char buf[BUFSIZ]; in fputws() local
114 iov.iov_base = buf; in fputws()
117 nbytes = wcsrtombs(buf, &ws, sizeof (buf), &fp->_mbstate); in fputws()
139 nbytes = wcsrtombs (buf, &ws, sizeof (buf), &fp->_mbstate); in fputws()
144 if (__swputc(buf[i], fp) == EOF) in fputws()
/picolibc-3.7.0-3.6.0/newlib/libc/include/rpc/
Dxdr.h268 #define IXDR_GET_INT32(buf) ((int32_t)ntohl((u_int32_t)*(buf)++)) argument
269 #define IXDR_PUT_INT32(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v)) argument
270 #define IXDR_GET_U_INT32(buf) ((uint32_t)IXDR_GET_INT32(buf)) argument
271 #define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_INT32((buf), ((int32_t)(v))) argument
277 #define IXDR_GET_LONG(buf) ((long)ntohl((u_int32_t)*(buf)++)) argument
278 #define IXDR_PUT_LONG(buf, v) (*(buf)++ =(int32_t)htonl((u_int32_t)v)) argument
279 #define IXDR_GET_U_LONG(buf) ((u_long)IXDR_GET_LONG(buf)) argument
280 #define IXDR_PUT_U_LONG(buf, v) IXDR_PUT_LONG((buf), (v)) argument
282 #define IXDR_GET_BOOL(buf) ((bool_t)IXDR_GET_LONG(buf)) argument
283 #define IXDR_GET_ENUM(buf, t) ((t)IXDR_GET_LONG(buf)) argument
[all …]
/picolibc-3.7.0-3.6.0/newlib/libc/machine/cris/
Dsetjmp.c60 setjmp (jmp_buf buf) in setjmp() argument
98 : "r" (buf) in setjmp()
120 : "r" (buf) in setjmp()
140 : "r" (buf) in setjmp()
150 longjmp(jmp_buf buf, int val) in longjmp() argument
191 : "r" (buf), "r" (val) in longjmp()
209 : "r" (buf), "r" (val) in longjmp()
/picolibc-3.7.0-3.6.0/newlib/libc/tinystdio/
Dfcvtl_r.c47 char *buf, in fcvtl_r() argument
129 memcpy(buf, digits, ndigit); in fcvtl_r()
130 buf += ndigit; in fcvtl_r()
133 memset(buf, '0', ntrailing); in fcvtl_r()
134 buf += ntrailing; in fcvtl_r()
137 buf[0] = '\0'; in fcvtl_r()
150 char *buf, in fcvtl_r() argument
153 return fcvtf_r((float) invalue, ndecimal, decpt, sign, buf, len); in fcvtl_r()
165 char *buf, in fcvtl_r() argument
168 return fcvt_r((double) invalue, ndecimal, decpt, sign, buf, len); in fcvtl_r()
Dfmemopen.c43 char *buf; member
58 mf->buf[pos++] = c; in __fmem_put()
66 mf->buf[mf->size] = '\0'; in __fmem_put()
83 return (unsigned char)mf->buf[mf->pos++]; in __fmem_get()
94 mf->buf[mf->pos] = '\0'; in __fmem_flush()
130 free(mf->buf); in __fmem_close()
138 fmemopen(void *buf, size_t size, const char *mode) in fmemopen() argument
159 if (buf == NULL) { in fmemopen()
167 buf = malloc(size); in fmemopen()
168 if (!buf) { in fmemopen()
[all …]
Dbufio.c44 char *buf; in __bufio_flush_locked() local
50 buf = bf->buf; in __bufio_flush_locked()
52 ssize_t this = (bf->write) (bf->fd, buf, bf->len); in __bufio_flush_locked()
87 len = (bf->read)(bf->fd, bf->buf, bf->size); in __bufio_fill_locked()
140 bf->buf[bf->len++] = c; in __bufio_put()
188 ret = (unsigned char) bf->buf[bf->off++]; in __bufio_get()
239 __bufio_setvbuf(FILE *f, char *buf, int mode, size_t size) in __bufio_setvbuf() argument
248 buf = NULL; in __bufio_setvbuf()
260 if (buf) { in __bufio_setvbuf()
261 free(bf->buf); in __bufio_setvbuf()
[all …]
Dfcvt_r.c47 char *buf, in fcvt_r() argument
123 memcpy(buf, digits, ndigit); in fcvt_r()
124 buf += ndigit; in fcvt_r()
127 memset(buf, '0', ntrailing); in fcvt_r()
128 buf += ntrailing; in fcvt_r()
131 buf[0] = '\0'; in fcvt_r()
144 char *buf, in fcvt_r() argument
147 return fcvtf_r((float) invalue, ndecimal, decpt, sign, buf, len); in fcvt_r()
Decvtl_r.c47 char *buf, in ecvtl_r() argument
82 memset(buf, '0', ndigit); in ecvtl_r()
83 memcpy(buf, digits, ngot); in ecvtl_r()
84 buf[ndigit] = '\0'; in ecvtl_r()
97 char *buf, in ecvtl_r() argument
100 return ecvtf_r((float) invalue, ndigit, decpt, sign, buf, len); in ecvtl_r()
112 char *buf, in ecvtl_r() argument
115 return ecvt_r((double) invalue, ndigit, decpt, sign, buf, len); in ecvtl_r()
Decvt_r.c47 char *buf, in ecvt_r() argument
76 memset(buf, '0', ndigit); in ecvt_r()
77 memcpy(buf, digits, ngot); in ecvt_r()
78 buf[ndigit] = '\0'; in ecvt_r()
91 char *buf, in ecvt_r() argument
94 return ecvtf_r(invalue, ndigit, decpt, sign, buf, len); in ecvt_r()
/picolibc-3.7.0-3.6.0/test/semihost/
Dsemihost-write.c52 char buf[TEST_STRING_LEN + 10]; in main() local
78 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
79 if (not_read + TEST_STRING_LEN != sizeof(buf)) { in main()
80 …printf("read bad result %ld expected %ld\n", (long) not_read, (long) (sizeof(buf) - TEST_STRING_LE… in main()
84 buf[TEST_STRING_LEN] = '\0'; in main()
85 if (memcmp(buf, TEST_STRING, TEST_STRING_LEN) != 0) { in main()
86 printf("read bad contents %s expected %s\n", buf, TEST_STRING); in main()
Dsemihost-read.c52 char buf[TEST_STRING_LEN + 10]; in main() local
78 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
79 if (not_read + TEST_STRING_LEN != sizeof(buf)) { in main()
80 …printf("read bad result %ld expected %ld\n", (long) not_read, (long) (sizeof(buf) - TEST_STRING_LE… in main()
84 buf[TEST_STRING_LEN] = '\0'; in main()
85 if (memcmp(buf, TEST_STRING, TEST_STRING_LEN) != 0) { in main()
86 printf("read bad contents %s expected %s\n", buf, TEST_STRING); in main()
Dsemihost-seek.c53 char buf[TEST_STRING_LEN + 10]; in main() local
88 not_read = sys_semihost_read(fd, buf, sizeof(buf)); in main()
89 if (sizeof (buf) - not_read != TEST_STRING_LEN - TEST_SEEK_POS) { in main()
91 (long) (sizeof(buf) - TEST_STRING_LEN + TEST_SEEK_POS)); in main()
95 buf[TEST_STRING_LEN - TEST_SEEK_POS] = '\0'; in main()
96 if (memcmp(buf, &TEST_STRING[0] + TEST_SEEK_POS, TEST_STRING_LEN - TEST_SEEK_POS) != 0) { in main()
98 buf, &TEST_STRING[0] + TEST_SEEK_POS); in main()
/picolibc-3.7.0-3.6.0/semihost/
Dtimes.c41 times(struct tms *buf) in times() argument
43 buf->tms_stime = buf->tms_cstime = buf->tms_cutime = 0; in times()
44 return buf->tms_utime = (clock_t) sys_semihost_elapsed(); in times()
/picolibc-3.7.0-3.6.0/newlib/libc/argz/
Dbuf_findstr.c17 _buf_findstr(const char *str, char **buf, size_t *buf_len) in _buf_findstr() argument
24 if (str[0] == (*buf)[i]) in _buf_findstr()
27 while (str[j - i] && (str[j - i] == (*buf)[j])) j++; in _buf_findstr()
30 *buf += j; in _buf_findstr()
39 *buf += *buf_len; in _buf_findstr()

1234567