diff options
Diffstat (limited to 'iconvdata')
-rw-r--r-- | iconvdata/Makefile | 4 | ||||
-rw-r--r-- | iconvdata/iso-2022-jp.c | 2 | ||||
-rw-r--r-- | iconvdata/iso-2022-kr.c | 13 | ||||
-rw-r--r-- | iconvdata/iso646.c | 2 |
4 files changed, 16 insertions, 5 deletions
diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 8d5ace8..f438b3d 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -165,8 +165,8 @@ $(objpfx)EUC-TW.so: $(objpfx)libCNS.so LDFLAGS-ISO-2022-JP.so = -Wl,-rpath,$(gconvdir) $(objpfx)ISO-2022-JP.so: $(objpfx)libJIS.so $(objpfx)libGB.so \ $(objpfx)libCNS.so $(objpfx)libKSC.so -LDFLAGS-ISO-2022-JP.so = -Wl,-rpath,$(gconvdir) -$(objpfx)ISO-2022-JP.so: $(objpfx)libKSC.so +LDFLAGS-ISO-2022-KR.so = -Wl,-rpath,$(gconvdir) +$(objpfx)ISO-2022-KR.so: $(objpfx)libKSC.so LDFLAGS-libJIS.so = -Wl,-soname,$(@F) LDFLAGS-libKSC.so = -Wl,-soname,$(@F) diff --git a/iconvdata/iso-2022-jp.c b/iconvdata/iso-2022-jp.c index 2c0f701..900c733 100644 --- a/iconvdata/iso-2022-jp.c +++ b/iconvdata/iso-2022-jp.c @@ -50,7 +50,7 @@ struct gap #define MAX_NEEDED_FROM 4 #define MIN_NEEDED_TO 4 #define MAX_NEEDED_TO 4 -#define FROM_DIRECTION dir == from_iso2022jp +#define FROM_DIRECTION (dir == from_iso2022jp) #define PREPARE_LOOP \ enum direction dir = ((struct iso2022jp_data *) step->data)->dir; \ enum variant var = ((struct iso2022jp_data *) step->data)->var; \ diff --git a/iconvdata/iso-2022-kr.c b/iconvdata/iso-2022-kr.c index 69a1f5f..cb02cc9 100644 --- a/iconvdata/iso-2022-kr.c +++ b/iconvdata/iso-2022-kr.c @@ -44,7 +44,18 @@ #define MAX_NEEDED_TO 4 #define PREPARE_LOOP \ int save_set; \ - int set = data->statep->count; + int set = data->statep->count; \ + if (!FROM_DIRECTION && !data->internal_use && data->invocation_counter == 0)\ + { \ + /* Emit the designator sequence. */ \ + if (outptr + 4 > outend) \ + return GCONV_FULL_OUTPUT; \ + \ + *outptr++ = '\x1b'; \ + *outptr++ = '\x24'; \ + *outptr++ = '\x29'; \ + *outptr++ = '\x43'; \ + } #define EXTRA_LOOP_ARGS , set diff --git a/iconvdata/iso646.c b/iconvdata/iso646.c index 29a452d..af1479a 100644 --- a/iconvdata/iso646.c +++ b/iconvdata/iso646.c @@ -42,7 +42,7 @@ #define DEFINE_FINI 0 #define MIN_NEEDED_FROM 1 #define MIN_NEEDED_TO 4 -#define FROM_DIRECTION dir == from_iso646 +#define FROM_DIRECTION (dir == from_iso646) #define PREPARE_LOOP \ enum direction dir = ((struct iso646_data *) step->data)->dir; \ enum variant var = ((struct iso646_data *) step->data)->var; |