mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
Store invocation-specific data of conversion modules in __gconv_step_data
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user