diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 10:46:57 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-12-23 10:46:57 +0000 |
commit | 1e0c4ca7448cf41bd38742ae885c9da6f4e48d97 (patch) | |
tree | 3908c0720db2470fefbc4c0824401dbf45862f83 /libc/stdio/fgetwc.c | |
parent | 7bca85d261904a0a67f2e514b6c4972128561156 (diff) | |
download | uClibc-alpine-1e0c4ca7448cf41bd38742ae885c9da6f4e48d97.tar.bz2 uClibc-alpine-1e0c4ca7448cf41bd38742ae885c9da6f4e48d97.tar.xz |
sync with trunk. Compile tested on i386
Diffstat (limited to 'libc/stdio/fgetwc.c')
-rw-r--r-- | libc/stdio/fgetwc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libc/stdio/fgetwc.c b/libc/stdio/fgetwc.c index 34327434c..18a6b5bb5 100644 --- a/libc/stdio/fgetwc.c +++ b/libc/stdio/fgetwc.c @@ -58,12 +58,12 @@ wint_t fgetwc_unlocked(register FILE *stream) stream->__ungot_width[0] = 0; /* then reset the width. */ } - LOOP: + LOOP: if ((n = __STDIO_STREAM_BUFFER_RAVAIL(stream)) == 0) { goto FILL_BUFFER; } - r = mbrtowc(wc, stream->__bufpos, n, &stream->__state); + r = mbrtowc(wc, (const char*) stream->__bufpos, n, &stream->__state); if (((ssize_t) r) >= 0) { /* Success... */ if (r == 0) { /* Nul wide char... means 0 byte for us so */ ++r; /* increment r and handle below as single. */ @@ -78,7 +78,7 @@ wint_t fgetwc_unlocked(register FILE *stream) /* Potentially valid but incomplete and no more buffered. */ stream->__bufpos += n; /* Update bufpos for stream. */ stream->__ungot_width[0] += n; - FILL_BUFFER: + FILL_BUFFER: if(__STDIO_FILL_READ_BUFFER(stream)) { /* Refill succeeded? */ goto LOOP; } @@ -98,7 +98,7 @@ wint_t fgetwc_unlocked(register FILE *stream) * error indicator is set. */ stream->__modeflags |= __FLAG_ERROR; - DONE: + DONE: if (stream->__bufstart == sbuf) { /* Need to un-munge the stream. */ munge_stream(stream, NULL); } |