diff options
Diffstat (limited to 'wcsmbs')
-rw-r--r-- | wcsmbs/wcsnrtombs.c | 6 | ||||
-rw-r--r-- | wcsmbs/wcsrtombs.c | 6 | ||||
-rw-r--r-- | wcsmbs/wctob.c | 9 |
3 files changed, 10 insertions, 11 deletions
diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c index bb2ca1d08b..0ff26d6671 100644 --- a/wcsmbs/wcsnrtombs.c +++ b/wcsmbs/wcsnrtombs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. @@ -72,7 +72,7 @@ __wcsnrtombs (dst, src, nwc, len, ps) if (dst == NULL) { unsigned char buf[256]; /* Just an arbitrary value. */ - const wchar_t *inbuf = *src; + const unsigned char *inbuf = (const unsigned char *) *src; size_t dummy; result = 0; @@ -83,7 +83,7 @@ __wcsnrtombs (dst, src, nwc, len, ps) data.__outbuf = buf; status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, (const unsigned char **) &inbuf, + (tomb, &data, &inbuf, (const unsigned char *) srcend, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c index dda115dfd3..8b444ed8a2 100644 --- a/wcsmbs/wcsrtombs.c +++ b/wcsmbs/wcsrtombs.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.org>, 1996. @@ -66,7 +66,7 @@ __wcsrtombs (dst, src, len, ps) mbstate_t temp_state; unsigned char buf[256]; /* Just an arbitrary value. */ const wchar_t *srcend = *src + __wcslen (*src) + 1; - const wchar_t *inbuf = *src; + const unsigned char *inbuf = (const unsigned char *) *src; size_t dummy; temp_state = *data.__statep; @@ -80,7 +80,7 @@ __wcsrtombs (dst, src, len, ps) data.__outbuf = buf; status = DL_CALL_FCT (tomb->__fct, - (tomb, &data, (const unsigned char **) &inbuf, + (tomb, &data, &inbuf, (const unsigned char *) srcend, NULL, &dummy, 0, 1)); diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c index d053b9a28f..b85ba6dd8f 100644 --- a/wcsmbs/wctob.c +++ b/wcsmbs/wctob.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996,1997,1998,1999,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. @@ -58,11 +58,10 @@ wctob (c) /* Create the input string. */ inbuf[0] = c; + const unsigned char *argptr = (const unsigned char *) inptr; status = DL_CALL_FCT (fcts->tomb->__fct, - (fcts->tomb, &data, - (const unsigned char **) &inptr, - (const unsigned char *) &inbuf[1], - NULL, &dummy, 0, 1)); + (fcts->tomb, &data, &argptr, + argptr + sizeof (inbuf[0]), NULL, &dummy, 0, 1)); /* The conversion failed or the output is too long. */ if ((status != __GCONV_OK && status != __GCONV_FULL_OUTPUT |