about summary refs log tree commit diff
path: root/iconvdata/iso-2022-jp-3.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-09 20:03:58 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-09 20:03:58 +0000
commit4b1b449d1d4fda5658a3eb8378413aa224de0cf6 (patch)
tree9ab935ce8338639475e800500b66527d0ddfc03f /iconvdata/iso-2022-jp-3.c
parent148e12ed122d75506937cdc8ab2654f8449f2061 (diff)
downloadglibc-4b1b449d1d4fda5658a3eb8378413aa224de0cf6.tar.gz
glibc-4b1b449d1d4fda5658a3eb8378413aa224de0cf6.tar.xz
glibc-4b1b449d1d4fda5658a3eb8378413aa224de0cf6.zip
008-01-08 Jakub Jelinek <jakub@redhat.com>
	* iconv/loop.c (UPDATE_PARAMS): Define to empty statement if not
	defined.
	(REINIT_PARAMS): Likewise.  Undefine before end of file.
	(STANDARD_TO_LOOP_ERR_HANDLER): Use UPDATE_PARAMS before calling
	transliteration hooks and REINIT_PARAMS afterwards.
	* iconvdata/iso-2022-jp.c (BODY): Use a separate variable for
	status.
	(REINIT_PARAMS): Define.
	* iconvdata/ibm1364.c (REINIT_PARAMS): Likewise.
	* iconvdata/ibm930.c (REINIT_PARAMS): Likewise.
	* iconvdata/ibm933.c (REINIT_PARAMS): Likewise.
	* iconvdata/ibm935.c (REINIT_PARAMS): Likewise.
	* iconvdata/ibm937.c (REINIT_PARAMS): Likewise.
	* iconvdata/ibm939.c (REINIT_PARAMS): Likewise.
	* iconvdata/iso-2022-cn.c (REINIT_PARAMS): Likewise.
	* iconvdata/iso-2022-cn-ext.c (REINIT_PARAMS): Likewise.
	* iconvdata/iso-2022-jp-3.c (REINIT_PARAMS): Likewise.
	* iconvdata/iso-2022-kr.c (REINIT_PARAMS): Likewise.
	* iconvdata/Makefile: Add rules to build and run tst-iconv7.c.
	* iconvdata/tst-iconv7.c: New test.
Diffstat (limited to 'iconvdata/iso-2022-jp-3.c')
-rw-r--r--iconvdata/iso-2022-jp-3.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/iconvdata/iso-2022-jp-3.c b/iconvdata/iso-2022-jp-3.c
index bbccc2e965..7df8ea14ea 100644
--- a/iconvdata/iso-2022-jp-3.c
+++ b/iconvdata/iso-2022-jp-3.c
@@ -1,5 +1,6 @@
 /* Conversion module for ISO-2022-JP-3.
-   Copyright (C) 1998-1999, 2000-2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1998-1999, 2000-2002, 2004, 2008
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998,
    and Bruno Haible <bruno@clisp.org>, 2002.
@@ -759,6 +760,12 @@ static const struct
 #define EXTRA_LOOP_DECLS	, int *statep
 #define INIT_PARAMS		int set = *statep & CURRENT_SEL_MASK;	      \
 				uint32_t lasttwo = *statep >> 6
+#define REINIT_PARAMS		do					      \
+				  {					      \
+				    set = *statep & CURRENT_SEL_MASK;	      \
+				    lasttwo = *statep >> 6;		      \
+				  }					      \
+				while (0)
 #define UPDATE_PARAMS		*statep = set | (lasttwo << 6)
 #include <iconv/loop.c>