/l4re-core-master/uclibc/lib/contrib/uclibc/libc/stdio/ |
A D | _stdio.c | 344 assert(stream->__bufpos == stream->__bufstart); in _stdio_validate_FILE() 345 assert(stream->__bufread == stream->__bufstart); in _stdio_validate_FILE() 379 assert(stream->__bufpos >= stream->__bufstart); in _stdio_validate_FILE() 380 assert(stream->__bufpos <= stream->__bufend); in _stdio_validate_FILE() 382 assert(stream->__bufread >= stream->__bufstart); in _stdio_validate_FILE() 383 assert(stream->__bufread <= stream->__bufend); in _stdio_validate_FILE() 389 assert(stream->__bufpos == stream->__bufread); in _stdio_validate_FILE() 409 assert(stream->__bufread == stream->__bufstart); in _stdio_validate_FILE() 421 assert(stream->__bufpos <= stream->__bufread); in _stdio_validate_FILE() 426 assert(stream->__bufgetc_u <= stream->__bufread); in _stdio_validate_FILE() [all …]
|
A D | fgetwc.c | 16 stream->__bufend = stream->__bufstart = buf; in munge_stream() 30 __STDIO_STREAM_VALIDATE(stream); in fgetwc_unlocked() 38 if (((stream->__modeflags & 1) || stream->__ungot[1])) { in fgetwc_unlocked() 41 stream->__ungot_width[0] = stream->__ungot_width[1]; in fgetwc_unlocked() 44 wi = stream->__ungot[(stream->__modeflags--) & 1]; in fgetwc_unlocked() 45 stream->__ungot[1] = 0; in fgetwc_unlocked() 51 munge_stream(stream, sbuf); in fgetwc_unlocked() 52 ++stream->__bufend; in fgetwc_unlocked() 64 r = mbrtowc(wc, (const char*) stream->__bufpos, n, &stream->__state); in fgetwc_unlocked() 69 stream->__bufpos += r; in fgetwc_unlocked() [all …]
|
A D | fflush.c | 35 FILE *stream; in _stdio_openlist_dec_use() local 42 for (stream = _stdio_openlist; stream; stream = n) { in _stdio_openlist_dec_use() 57 p = stream; in _stdio_openlist_dec_use() 79 if ((stream != NULL) && (stream != (FILE *) &_stdio_openlist)) { in fflush_unlocked() 85 stream = NULL; in fflush_unlocked() 97 while(stream) { in fflush_unlocked() 118 stream = stream->__nextopen; in fflush_unlocked() 144 if ((stream != NULL) && (stream != (FILE *) &_stdio_openlist)) { in fflush_unlocked() 154 if ((stream != NULL) in fflush_unlocked() 164 if (stream && (stream->__modeflags & (__MASK_READING|__FLAG_READONLY))) { in fflush_unlocked() [all …]
|
A D | fgetc.c | 20 int __fgetc_unlocked(FILE *stream) in __fgetc_unlocked() argument 22 __STDIO_STREAM_VALIDATE(stream); in __fgetc_unlocked() 35 unsigned char uc = stream->__ungot[(stream->__modeflags--) & 1]; in __fgetc_unlocked() 36 stream->__ungot[1] = 0; in __fgetc_unlocked() 37 __STDIO_STREAM_VALIDATE(stream); in __fgetc_unlocked() 47 __STDIO_STREAM_SET_EOF(stream); in __fgetc_unlocked() 54 if (!__STDIO_STREAM_IS_FBF(stream)) { in __fgetc_unlocked() 66 if (__stdio_READ(stream, &uc, 1)) { in __fgetc_unlocked() 91 int fgetc(register FILE *stream) 93 if (stream->__user_locking != 0) { [all …]
|
A D | _fopen.c | 47 if (stream) { in _stdio_fopen() 100 return stream; in _stdio_fopen() 118 stream->__filedes = filedes; in _stdio_fopen() 171 if (isatty(stream->__filedes)) in _stdio_fopen() 176 if (!stream->__bufstart) { in _stdio_fopen() 178 stream->__bufend = stream->__bufstart + BUFSIZ; in _stdio_fopen() 182 stream->__bufstart = stream->__builtinbuf; in _stdio_fopen() 183 stream->__bufend = stream->__builtinbuf + sizeof(stream->__builtinbuf); in _stdio_fopen() 185 stream->__bufend = stream->__bufstart; in _stdio_fopen() 198 stream->__ungot_width[0] = 0; in _stdio_fopen() [all …]
|
A D | _trans2w.c | 30 __STDIO_STREAM_VALIDATE(stream); in __stdio_trans2w_o() 34 if (!(stream->__modeflags & oflag)) { in __stdio_trans2w_o() 39 stream->__modeflags |= oflag; in __stdio_trans2w_o() 51 __STDIO_STREAM_SET_ERROR(stream); in __stdio_trans2w_o() 52 __STDIO_STREAM_VALIDATE(stream); in __stdio_trans2w_o() 57 if (!__FEOF_UNLOCKED(stream)) { in __stdio_trans2w_o() 68 && fseek(stream, 0L, in __stdio_trans2w_o() 82 __STDIO_STREAM_DISABLE_GETC(stream); in __stdio_trans2w_o() 87 __STDIO_STREAM_SET_WRITING(stream); in __stdio_trans2w_o() 89 __STDIO_STREAM_ENABLE_PUTC(stream); in __stdio_trans2w_o() [all …]
|
A D | ungetc.c | 27 int ungetc(int c, register FILE *stream) in ungetc() argument 31 __STDIO_AUTO_THREADLOCK(stream); in ungetc() 32 __STDIO_STREAM_VALIDATE(stream); in ungetc() 47 && (stream->__bufpos > stream->__bufstart) in ungetc() 50 --stream->__bufpos; in ungetc() 60 && ((stream->__modeflags & 1) || stream->__ungot[1])) in ungetc() 64 __STDIO_STREAM_DISABLE_GETC(stream); in ungetc() 67 stream->__ungot[1] = 1; in ungetc() 68 stream->__ungot[(++stream->__modeflags) & 1] = c; in ungetc() 73 __STDIO_STREAM_VALIDATE(stream); in ungetc() [all …]
|
A D | fclose.c | 11 int fclose(register FILE *stream) in fclose() argument 29 if (ptr->__nextopen == stream) { in fclose() 42 __STDIO_AUTO_THREADLOCK(stream); in fclose() 44 __STDIO_STREAM_VALIDATE(stream); in fclose() 49 rv = fflush_unlocked(stream); in fclose() 57 stream->__filedes = -1; in fclose() 72 __STDIO_STREAM_RESET_GCS(stream); in fclose() 80 stream->__ungot_width[0] = 0; in fclose() 83 __INIT_MBSTATE(&(stream->__state)); in fclose() 87 __STDIO_AUTO_THREADUNLOCK(stream); in fclose() [all …]
|
A D | _rfill.c | 22 size_t attribute_hidden __stdio_rfill(register FILE *__restrict stream) in __stdio_rfill() argument 26 __STDIO_STREAM_VALIDATE(stream); in __stdio_rfill() 27 assert(stream->__filedes >= -1); in __stdio_rfill() 28 assert(__STDIO_STREAM_IS_READING(stream)); in __stdio_rfill() 31 assert(!(stream->__modeflags & __FLAG_UNGOT)); in __stdio_rfill() 33 assert(stream->__bufgetc_u == stream->__bufstart); in __stdio_rfill() 36 rv = __stdio_READ(stream, stream->__bufstart, in __stdio_rfill() 37 stream->__bufend - stream->__bufstart); in __stdio_rfill() 38 stream->__bufpos = stream->__bufstart; in __stdio_rfill() 39 stream->__bufread = stream->__bufstart + rv; in __stdio_rfill() [all …]
|
A D | fputc.c | 18 int __fputc_unlocked(int c, register FILE *stream) in __fputc_unlocked() argument 20 __STDIO_STREAM_VALIDATE(stream); in __fputc_unlocked() 30 if (__STDIO_STREAM_IS_NARROW_WRITING(stream) in __fputc_unlocked() 50 if (__STDIO_STREAM_IS_LBF(stream)) { in __fputc_unlocked() 62 if (! __stdio_WRITE(stream, &uc, 1)) { in __fputc_unlocked() 86 int fputc(int c, register FILE *stream) 88 if (stream->__user_locking != 0) { 89 return __PUTC_UNLOCKED_MACRO(c, stream); 92 __STDIO_ALWAYS_THREADLOCK(stream); 93 retval = __PUTC_UNLOCKED_MACRO(c, stream); [all …]
|
A D | fread.c | 15 FILE * __restrict stream) in fread_unlocked() argument 17 __STDIO_STREAM_VALIDATE(stream); in fread_unlocked() 18 assert(stream->__filedes >= -1); in fread_unlocked() 36 *buffer++ = stream->__ungot[(stream->__modeflags--) & 1]; in fread_unlocked() 37 stream->__ungot[1] = 0; in fread_unlocked() 45 if ((avail = stream->__bufread - stream->__bufpos) > 0) { in fread_unlocked() 51 stream->__bufpos += avail; in fread_unlocked() 76 __STDIO_STREAM_VALIDATE(stream); in fread_unlocked() 80 __STDIO_STREAM_SET_ERROR(stream); in fread_unlocked() 84 __STDIO_STREAM_VALIDATE(stream); in fread_unlocked() [all …]
|
A D | _trans2r.c | 30 __STDIO_STREAM_VALIDATE(stream); in __stdio_trans2r_o() 31 assert(!__STDIO_STREAM_IS_READING(stream)); in __stdio_trans2r_o() 34 if (!(stream->__modeflags & oflag)) { in __stdio_trans2r_o() 39 stream->__modeflags |= oflag; in __stdio_trans2r_o() 51 __STDIO_STREAM_SET_ERROR(stream); in __stdio_trans2r_o() 52 __STDIO_STREAM_VALIDATE(stream); in __stdio_trans2r_o() 56 if (__STDIO_STREAM_IS_WRITING(stream)) { in __stdio_trans2r_o() 63 __STDIO_STREAM_DISABLE_PUTC(stream); in __stdio_trans2r_o() 64 __STDIO_STREAM_CLEAR_WRITING(stream); in __stdio_trans2r_o() 74 __STDIO_STREAM_SET_READING(stream); in __stdio_trans2r_o() [all …]
|
A D | _fwrite.c | 17 register FILE * __restrict stream) in __stdio_fwrite() argument 22 __STDIO_STREAM_VALIDATE(stream); in __stdio_fwrite() 23 assert(__STDIO_STREAM_IS_WRITING(stream)); in __stdio_fwrite() 36 memcpy(stream->__bufpos, buffer, pending); in __stdio_fwrite() 37 stream->__bufpos += pending; in __stdio_fwrite() 38 __STDIO_STREAM_VALIDATE(stream); in __stdio_fwrite() 44 memcpy(stream->__bufpos, buffer, bytes); in __stdio_fwrite() 45 stream->__bufpos += bytes; in __stdio_fwrite() 46 if (__STDIO_STREAM_IS_LBF(stream) in __stdio_fwrite() 57 stream->__bufpos -= pending; in __stdio_fwrite() [all …]
|
A D | setvbuf.c | 26 __STDIO_AUTO_THREADLOCK(stream); in setvbuf() 27 __STDIO_STREAM_VALIDATE(stream); in setvbuf() 72 if (stream->__modeflags & __FLAG_FREEBUF) { in setvbuf() 73 stream->__modeflags &= ~(__FLAG_FREEBUF); in setvbuf() 74 free(stream->__bufstart); in setvbuf() 77 stream->__modeflags |= alloc_flag; in setvbuf() 78 stream->__bufstart = (unsigned char *) buf; in setvbuf() 81 __STDIO_STREAM_DISABLE_GETC(stream); in setvbuf() 82 __STDIO_STREAM_DISABLE_PUTC(stream); in setvbuf() 88 __STDIO_STREAM_VALIDATE(stream); in setvbuf() [all …]
|
A D | ungetwc.c | 15 wint_t ungetwc(wint_t c, register FILE *stream) in ungetwc() argument 19 __STDIO_AUTO_THREADLOCK(stream); in ungetwc() 20 __STDIO_STREAM_VALIDATE(stream); /* debugging only */ in ungetwc() 25 if ((!__STDIO_STREAM_IS_WIDE_READING(stream) in ungetwc() 26 && __STDIO_STREAM_TRANS_TO_READ(stream, __FLAG_WIDE)) in ungetwc() 27 || ((stream->__modeflags & __FLAG_UNGOT) in ungetwc() 28 && ((stream->__modeflags & 1) || stream->__ungot[1])) in ungetwc() 37 stream->__ungot[1] = 1; in ungetwc() 38 stream->__ungot[(++stream->__modeflags) & 1] = c; in ungetwc() 44 __STDIO_STREAM_VALIDATE(stream); in ungetwc() [all …]
|
A D | fseeko.c | 23 return fseeko64(stream, offset, whence); in FSEEK() 34 __STDIO_AUTO_THREADLOCK(stream); in FSEEK() 36 __STDIO_STREAM_VALIDATE(stream); in FSEEK() 38 if ((!__STDIO_STREAM_IS_WRITING(stream) in FSEEK() 46 stream->__modeflags &= in FSEEK() 51 __STDIO_STREAM_DISABLE_GETC(stream); in FSEEK() 52 __STDIO_STREAM_DISABLE_PUTC(stream); in FSEEK() 57 __INIT_MBSTATE(&(stream->__state)); in FSEEK() 60 stream->__ungot_width[0] = 0; in FSEEK() 66 __STDIO_STREAM_VALIDATE(stream); in FSEEK() [all …]
|
A D | _wfwrite.c | 21 register FILE *__restrict stream) in _wstdio_fwrite() argument 27 __STDIO_STREAM_VALIDATE(stream); in _wstdio_fwrite() 30 if (__STDIO_STREAM_IS_FAKE_VSWPRINTF(stream)) { in _wstdio_fwrite() 32 count = (((wchar_t *)(stream->__bufend)) in _wstdio_fwrite() 33 - ((wchar_t *)(stream->__bufpos))); in _wstdio_fwrite() 38 wmemcpy((wchar_t *)(stream->__bufpos), ws, count); in _wstdio_fwrite() 39 stream->__bufpos = (unsigned char *)(((wchar_t *)(stream->__bufpos)) + count); in _wstdio_fwrite() 41 __STDIO_STREAM_VALIDATE(stream); in _wstdio_fwrite() 48 if (__STDIO_STREAM_IS_WIDE_WRITING(stream) in _wstdio_fwrite() 49 || !__STDIO_STREAM_TRANS_TO_WRITE(stream, __FLAG_WIDE) in _wstdio_fwrite() [all …]
|
A D | _WRITE.c | 38 __STDIO_STREAM_VALIDATE(stream); in __stdio_WRITE() 39 assert(stream->__filedes >= -1); in __stdio_WRITE() 40 assert(__STDIO_STREAM_IS_WRITING(stream)); in __stdio_WRITE() 47 rv = __WRITE(stream, (char *) buf, stodo); in __stdio_WRITE() 62 __STDIO_STREAM_SET_ERROR(stream); in __stdio_WRITE() 85 stodo = __STDIO_STREAM_BUFFER_SIZE(stream); in __stdio_WRITE() 93 s = stream->__bufstart; in __stdio_WRITE() 98 && __STDIO_STREAM_IS_LBF(stream) in __stdio_WRITE() 106 stream->__bufpos = s; in __stdio_WRITE() 108 todo -= (s - stream->__bufstart); in __stdio_WRITE() [all …]
|
A D | fopencookie.c | 41 FILE *stream; in fopencookie() local 46 if (stream) { in fopencookie() 47 stream->__filedes = -1; in fopencookie() 49 stream->__gcs = io_functions; in fopencookie() 51 stream->__gcs.read = io_functions->read; in fopencookie() 52 stream->__gcs.write = io_functions->write; in fopencookie() 53 stream->__gcs.seek = io_functions->seek; in fopencookie() 54 stream->__gcs.close = io_functions->close; in fopencookie() 56 stream->__cookie = cookie; in fopencookie() 58 __STDIO_STREAM_VALIDATE(stream); in fopencookie() [all …]
|
A D | __fpurge.c | 15 void __fpurge(register FILE * __restrict stream) in __fpurge() argument 17 __STDIO_STREAM_VALIDATE(stream); in __fpurge() 19 __STDIO_STREAM_DISABLE_GETC(stream); in __fpurge() 20 __STDIO_STREAM_DISABLE_PUTC(stream); in __fpurge() 21 __STDIO_STREAM_INIT_BUFREAD_BUFPOS(stream); in __fpurge() 22 stream->__ungot[1] = 0; in __fpurge() 25 __INIT_MBSTATE(&(stream->__state)); in __fpurge() 28 stream->__ungot_width[0] = 0; in __fpurge() 31 stream->__modeflags &= ~(__MASK_READING|__FLAG_WRITING); in __fpurge() 33 __STDIO_STREAM_VALIDATE(stream); in __fpurge()
|
A D | _adjust_pos.c | 19 int attribute_hidden __stdio_adjust_position(register FILE * __restrict stream, in __stdio_adjust_position() argument 25 if ((corr = stream->__modeflags & __MASK_READING) != 0) { in __stdio_adjust_position() 30 if (corr && __STDIO_STREAM_IS_WIDE(stream)) { in __stdio_adjust_position() 34 if ((corr > 1) || stream->__ungot[1]) { /* User ungetwc, */ in __stdio_adjust_position() 37 corr -= (1 + stream->__ungot_width[1]); in __stdio_adjust_position() 38 if (stream->__state.__mask > 0) { /* Incomplete (bad?) mb char. */ in __stdio_adjust_position() 39 corr -= stream->__ungot_width[0]; in __stdio_adjust_position() 45 corr += (((__STDIO_STREAM_IS_WRITING(stream)) in __stdio_adjust_position() 46 ? stream->__bufstart : stream->__bufread) in __stdio_adjust_position() 47 - stream->__bufpos); in __stdio_adjust_position()
|
A D | freopen.c | 16 register FILE * __restrict stream) in freopen() argument 35 __STDIO_AUTO_THREADLOCK(stream); in freopen() 37 __STDIO_STREAM_VALIDATE(stream); in freopen() 43 dynmode = (stream->__modeflags & (__FLAG_FREEBUF|__FLAG_FREEFILE)); in freopen() 45 stream->__modeflags &= ~(__FLAG_FREEBUF|__FLAG_FREEFILE); in freopen() 48 if ((stream->__modeflags & (__FLAG_READONLY|__FLAG_WRITEONLY)) in freopen() 51 fclose(stream); /* Failures are ignored. */ in freopen() 60 fp = _stdio_fopen(((intptr_t) filename), mode, stream, FILEDES_ARG); in freopen() 64 stream->__modeflags = __FLAG_READONLY|__FLAG_WRITEONLY|__FLAG_FAILED_FREOPEN; in freopen() 68 stream->__modeflags |= dynmode; in freopen() [all …]
|
A D | _READ.c | 24 size_t attribute_hidden __stdio_READ(register FILE *stream, in __stdio_READ() argument 29 __STDIO_STREAM_VALIDATE(stream); in __stdio_READ() 30 assert(stream->__filedes >= -1); in __stdio_READ() 31 assert(__STDIO_STREAM_IS_READING(stream)); in __stdio_READ() 32 assert(!__STDIO_STREAM_BUFFER_RAVAIL(stream)); /* Buffer must be empty. */ in __stdio_READ() 33 assert(!(stream->__modeflags & __FLAG_UNGOT)); in __stdio_READ() 36 if (!__FEOF_UNLOCKED(stream)) { in __stdio_READ() 45 if ((rv = __READ(stream, (char *) buf, bufsize)) <= 0) { in __stdio_READ() 47 __STDIO_STREAM_SET_EOF(stream); in __stdio_READ() 50 __STDIO_STREAM_SET_ERROR(stream); in __stdio_READ() [all …]
|
A D | fwide.c | 12 int fwide(register FILE *stream, int mode) in fwide() argument 16 __STDIO_AUTO_THREADLOCK(stream); in fwide() 18 __STDIO_STREAM_VALIDATE(stream); in fwide() 20 if (mode && !(stream->__modeflags & (__FLAG_WIDE|__FLAG_NARROW))) { in fwide() 21 stream->__modeflags |= ((mode > 0) ? __FLAG_WIDE : __FLAG_NARROW); in fwide() 24 mode = (stream->__modeflags & __FLAG_WIDE) in fwide() 25 - (stream->__modeflags & __FLAG_NARROW); in fwide() 27 assert((stream->__modeflags & (__FLAG_WIDE|__FLAG_NARROW)) in fwide() 29 __STDIO_AUTO_THREADUNLOCK(stream); in fwide()
|
/l4re-core-master/uclibc/lib/contrib/uclibc/test/locale/ |
A D | gen-unicode-ctype.c | 136 FILE *stream; in fill_attributes() local 158 if (stream == NULL) in fill_attributes() 243 if (ferror (stream) || fclose (stream)) in fill_attributes() 555 fprintf (stream, "\n"); in output_charclass() 603 fprintf (stream, "\n"); in output_charmap() 618 FILE *stream; in output_tables() local 622 if (stream == NULL) in output_tables() 630 fprintf (stream, "\n"); in output_tables() 633 fprintf (stream, "\n"); in output_tables() 655 fprintf (stream, "\n"); in output_tables() [all …]
|