summaryrefslogtreecommitdiff
path: root/libio/iofwide.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofwide.c')
-rw-r--r--libio/iofwide.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/libio/iofwide.c b/libio/iofwide.c
index 03124219ad..7af9a633f8 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -228,8 +228,8 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
size_t dummy;
const unsigned char *from_start_copy = (unsigned char *) from_start;
- codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
- codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+ codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_out.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
@@ -238,7 +238,7 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
&dummy, 0, 0));
*from_stop = (wchar_t *) from_start_copy;
- *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+ *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
switch (status)
{
@@ -294,15 +294,15 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,
int status;
size_t dummy;
- codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
- codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+ codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_out.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
(gs, codecvt->__cd_out.__cd.__data, NULL, NULL,
NULL, &dummy, 1, 0));
- *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+ *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
switch (status)
{
@@ -357,15 +357,16 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,
size_t dummy;
const unsigned char *from_start_copy = (unsigned char *) from_start;
- codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_start;
- codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) to_end;
+ codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+ codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) to_end;
codecvt->__cd_in.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
(gs, codecvt->__cd_in.__cd.__data, &from_start_copy,
- from_end, NULL, &dummy, 0, 0));
+ (const unsigned char *) from_end, NULL,
+ &dummy, 0, 0));
- *from_stop = from_start_copy;
+ *from_stop = (const char *) from_start_copy;
*to_stop = (wchar_t *) codecvt->__cd_in.__cd.__data[0].__outbuf;
switch (status)
@@ -454,13 +455,14 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
int status;
size_t dummy;
- codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_buf;
- codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) &to_buf[max];
+ codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_buf;
+ codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) &to_buf[max];
codecvt->__cd_in.__cd.__data[0].__statep = statep;
status = DL_CALL_FCT (gs->__fct,
- (gs, codecvt->__cd_in.__cd.__data, &cp, from_end,
- NULL, &dummy, 0, 0));
+ (gs, codecvt->__cd_in.__cd.__data, &cp,
+ (const unsigned char *) from_end, NULL,
+ &dummy, 0, 0));
result = cp - (const unsigned char *) from_start;
#else