summaryrefslogtreecommitdiff
path: root/libc/iconvdata/unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/iconvdata/unicode.c')
-rw-r--r--libc/iconvdata/unicode.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/libc/iconvdata/unicode.c b/libc/iconvdata/unicode.c
index df452d2a1..dba4c34d6 100644
--- a/libc/iconvdata/unicode.c
+++ b/libc/iconvdata/unicode.c
@@ -1,5 +1,5 @@
/* Conversion module for Unicode
- Copyright (C) 1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000-2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -57,7 +57,7 @@
*inptrp = inptr += 2; \
else if (get16u (inptr) == BOM_OE) \
{ \
- ((struct unicode_data *) step->__data)->swap = 1; \
+ data->__flags |= __GCONV_SWAP; \
*inptrp = inptr += 2; \
} \
} \
@@ -71,7 +71,7 @@
put16u (outbuf, BOM); \
outbuf += 2; \
} \
- swap = ((struct unicode_data *) step->__data)->swap;
+ swap = data->__flags & __GCONV_SWAP;
#define EXTRA_LOOP_ARGS , swap
@@ -86,7 +86,6 @@ enum direction
struct unicode_data
{
enum direction dir;
- int swap;
};
@@ -110,7 +109,6 @@ gconv_init (struct __gconv_step *step)
if (new_data != NULL)
{
new_data->dir = dir;
- new_data->swap = 0;
step->__data = new_data;
if (dir == from_unicode)