aboutsummaryrefslogtreecommitdiff
path: root/wcsmbs/mbsnrtowcs.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-03-15 20:41:16 +0000
committerUlrich Drepper <drepper@redhat.com>1999-03-15 20:41:16 +0000
commitb117f744e10e769a5d219cf0b69cc10f81738650 (patch)
tree35f76b5a32b99735df14db028185e85df3834c33 /wcsmbs/mbsnrtowcs.c
parent1d0b8e4b8f9c636cfaec78be5ebf819d3d8c2284 (diff)
downloadglibc-b117f744e10e769a5d219cf0b69cc10f81738650.tar
glibc-b117f744e10e769a5d219cf0b69cc10f81738650.tar.gz
glibc-b117f744e10e769a5d219cf0b69cc10f81738650.tar.bz2
glibc-b117f744e10e769a5d219cf0b69cc10f81738650.zip
Update.
1999-03-15 Ulrich Drepper <drepper@cygnus.com> * iconv/gconv.h (gconv_fct): Change parameter from `char' to `unsigned char'. (gconv_step_data): Likewise. * iconv/gconv_int.h (__gconv): Likewise. (__BUILINT_TRANS): Likewise. * iconv/gconv.c (__gconv): Likewise. * iconv/iconv.c (iconv): Add casts for call of __gconv. * iconv/skeleton.c: Change local parameters and variable from `char' to `unsigned char'. Remove casts from calls into modules. * iconvdata/iso-2022-jp.c (gconv): Change local variable outbuf from `char' to `unsigned char'. * wcsmbs/btowc.c: Change pointers from `char *' to `unsigned char *'. * wcsmbs/mbrtowc.c: Likewise. * wcsmbs/mbsnrtowcs.c: Likewise. * wcsmbs/mbsrtowcs.c: Likewise. * wcsmbs/wcrtomb.c: Likewise. * wcsmbs/wcsnrtombs.c: Likewise. * wcsmbs/wcsrtombs.c: Likewise. * wcsmbs/wctob.c: Likewise.
Diffstat (limited to 'wcsmbs/mbsnrtowcs.c')
-rw-r--r--wcsmbs/mbsnrtowcs.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c
index fbebc8de4c..78e327eeea 100644
--- a/wcsmbs/mbsnrtowcs.c
+++ b/wcsmbs/mbsnrtowcs.c
@@ -44,7 +44,7 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
size_t len;
mbstate_t *ps;
{
- const char *srcend;
+ const unsigned char *srcend;
struct gconv_step_data data;
size_t result = 0;
int status;
@@ -66,7 +66,7 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
if (dst == NULL)
{
wchar_t buf[64]; /* Just an arbitrary size. */
- const char *inbuf = *src;
+ const unsigned char *inbuf = *src;
data.outbufend = data.outbuf + sizeof (buf);
do
@@ -89,12 +89,13 @@ __mbsnrtowcs (dst, src, nmc, len, ps)
/* This code is based on the safe assumption that all internal
multi-byte encodings use the NUL byte only to mark the end
of the string. */
- data.outbuf = (char *) dst;
+ data.outbuf = (unsigned char *) dst;
data.outbufend = data.outbuf + len * sizeof (wchar_t);
status = (*__wcsmbs_gconv_fcts.towc->fct) (__wcsmbs_gconv_fcts.towc,
- &data, src, srcend,
- &result, 0);
+ &data,
+ (const unsigned char **) src,
+ srcend, &result, 0);
/* We have to determine whether the last character converted
is the NUL character. */