Home
last modified time | relevance | path

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

123456

/picolibc-3.5.0-3.4.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.5.0-3.4.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()
Dwcstold.c55 char *buf, *end; in wcstold_l()
73 if ((buf = malloc (len + 1)) == NULL) in wcstold_l()
77 _wcsnrtombs_l (buf, &wcp, (size_t) -1, len + 1, &mbs, loc); in wcstold_l()
79 val = strtold_l (buf, &end, loc); in wcstold_l()
102 char *d = strstr (buf, decimal_point); in wcstold_l()
108 *endptr = (wchar_t *) nptr + (end - buf); in wcstold_l()
111 free (buf); in wcstold_l()
/picolibc-3.5.0-3.4.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
113 iov.iov_base = buf; in fputws()
116 nbytes = wcsrtombs(buf, &ws, sizeof (buf), &fp->_mbstate); in fputws()
139 nbytes = wcsrtombs (buf, &ws, sizeof (buf), &fp->_mbstate); in fputws()
144 if (_sputc ( buf[i], fp) == EOF) in fputws()
/picolibc-3.5.0-3.4.0/test/
Dtest-efcvt.c57 #define ecvt_r(n, dig, dec, sign, buf, len) (ecvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
58 #define fcvt_r(n, dig, dec, sign, buf, len) (fcvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
59 #define ecvtf_r(n, dig, dec, sign, buf, len) (ecvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
60 #define fcvtf_r(n, dig, dec, sign, buf, len) (fcvtbuf(n, dig, dec, sign, buf) ? 0 : -1) argument
158 int ret = func(tests[i].value, tests[i].ndigit, &decpt, &sign, buf, sizeof(buf)); \
164 if (skip_long && strlen(buf) > 6) { \
165 printf("skipping test as result is long (%s)\n", buf); \
168 if (strcmp(buf, tests[i].expect) != 0 || \
173 i, buf, decpt, sign, \
185 static char buf[2048]; in main() local
Dprintf_scanf.c143 char buf[256]; in main() local
182 sprintf(buf, "%g", printf_float(0.0f)); in main()
183 if (strcmp(buf, "0") != 0) { in main()
184 printf("0: wanted \"0\" got \"%s\"\n", buf); in main()
226 strncpy(buf, "123", y - 1); in main()
227 buf[y-1] = '\0'; in main()
228 printf("%s: returned buffer want %s got %s\n", name, buf, tbuf); in main()
242 sprintf(buf, FMT(prefix, oconv), v); \ in main()
243 __n = sscanf(buf, FMT(prefix, iconv), &r); \ in main()
337 sprintf(buf, "%.55f", printf_float(v)); in main()
[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.5.0-3.4.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.5.0-3.4.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.5.0-3.4.0/newlib/libc/tinystdio/
Dbufio.c47 char *buf; in __bufio_flush_locked() local
54 buf = bf->buf; in __bufio_flush_locked()
56 ssize_t this = (bf->write) (bf->fd, buf, bf->len); in __bufio_flush_locked()
120 bf->buf[bf->len++] = c; in __bufio_put()
158 bf->len = (bf->read)(bf->fd, bf->buf, bf->size); in __bufio_get()
174 ret = (unsigned char) bf->buf[bf->off++]; in __bufio_get()
204 __bufio_setvbuf(FILE *f, char *buf, int mode, size_t size) in __bufio_setvbuf() argument
213 buf = NULL; in __bufio_setvbuf()
231 if (!buf) { in __bufio_setvbuf()
232 buf = realloc(bf->buf, size); in __bufio_setvbuf()
[all …]
Dfmemopen.c45 char *buf; member
55 mf->buf[mf->pos++] = c; in __fmem_put()
66 c = (unsigned char) mf->buf[mf->pos++]; in __fmem_get()
78 mf->buf[mf->pos] = '\0'; in __fmem_flush()
107 free (mf->buf); in __fmem_close()
115 fmemopen(void *buf, size_t size, const char *mode) in fmemopen() argument
132 if (buf == NULL) { in fmemopen()
133 buf = malloc(size); in fmemopen()
134 if (!buf) { in fmemopen()
144 .buf = buf, in fmemopen()
Dfcvt_r.c48 char *buf, in fcvt_r() argument
124 memcpy(buf, digits, ndigit); in fcvt_r()
126 buf += ndigit; in fcvt_r()
129 memset(buf, '0', ntrailing); in fcvt_r()
130 buf += ntrailing; in fcvt_r()
133 buf[0] = '\0'; in fcvt_r()
Dfcvtf_r.c48 char *buf, in fcvtf_r() argument
124 memcpy(buf, digits, ndigit); in fcvtf_r()
126 buf += ndigit; in fcvtf_r()
129 memset(buf, '0', ntrailing); in fcvtf_r()
130 buf += ntrailing; in fcvtf_r()
133 buf[0] = '\0'; in fcvtf_r()
/picolibc-3.5.0-3.4.0/test/semihost/
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-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-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.5.0-3.4.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.5.0-3.4.0/newlib/libc/ssp/
Dgets_chk.c50 __gets_chk(char * __restrict buf, size_t slen) in __gets_chk() argument
56 return __gets(buf); in __gets_chk()
59 return __gets(buf); in __gets_chk()
73 (void)memcpy(buf, abuf, len); in __gets_chk()
75 buf[len] = '\0'; in __gets_chk()
77 return buf; in __gets_chk()
/picolibc-3.5.0-3.4.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()
/picolibc-3.5.0-3.4.0/semihost/machine/x86/
De9_exit.c43 char buf[15]; in _exit() local
46 n = snprintf(buf, sizeof(buf), "%cexit %d\n", 0xe9, code); in _exit()
47 write(1, buf, n); in _exit()
/picolibc-3.5.0-3.4.0/semihost/machine/powerpc/
Dpowerpc_exit.c44 char buf[15]; in _exit() local
47 n = snprintf(buf, sizeof(buf), "%cexit %d\n", 0xe9, code); in _exit()
48 opal_console_write(OPAL_TERMINAL_DEFAULT, n, buf); in _exit()

123456