aboutsummaryrefslogtreecommitdiff
path: root/iconvdata/iso-2022-cn-ext.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-05-17 07:11:00 +0000
committerUlrich Drepper <drepper@redhat.com>2001-05-17 07:11:00 +0000
commit304d7abfadb59d53c078c43bf825d13d279992c0 (patch)
treefec6f832bfe4b8668556f3c64e6eb7150c181546 /iconvdata/iso-2022-cn-ext.c
parentd1abdd5c07fd4479d4981b12c5719e74a4c80189 (diff)
downloadglibc-304d7abfadb59d53c078c43bf825d13d279992c0.tar
glibc-304d7abfadb59d53c078c43bf825d13d279992c0.tar.gz
glibc-304d7abfadb59d53c078c43bf825d13d279992c0.tar.bz2
glibc-304d7abfadb59d53c078c43bf825d13d279992c0.zip
Update.
2001-05-14 Bruno Haible <haible@clisp.cons.org> * iconvdata/iso-2022-cn-ext.c (BODY for FROM_LOOP): If SO is seen without previous announcement, reject it regularly, don't abort. 2001-05-16 Ulrich Drepper <drepper@redhat.com> * math/tgmath.h: Fix handling of int parameters to binary and ternary functions. Reported by mitr@volny.cz. * math/test-tgmath.c: Add tests for calls with integer parameters. * manual/llio.texi: Many grammar and typo fixes to the section on AIO.
Diffstat (limited to 'iconvdata/iso-2022-cn-ext.c')
-rw-r--r--iconvdata/iso-2022-cn-ext.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/iconvdata/iso-2022-cn-ext.c b/iconvdata/iso-2022-cn-ext.c
index d6ab2e8bbe..ab8a988550 100644
--- a/iconvdata/iso-2022-cn-ext.c
+++ b/iconvdata/iso-2022-cn-ext.c
@@ -260,21 +260,33 @@ enum
XXX For now I'll default to use GB2312. If this is not the \
best behavior (e.g., we should flag an error) let me know. */ \
++inptr; \
- switch (ann & SO_ann) \
+ if ((ann & SO_ann) != 0) \
+ switch (ann & SO_ann) \
+ { \
+ case GB2312_ann: \
+ set = GB2312_set; \
+ break; \
+ case GB12345_ann: \
+ set = GB12345_set; \
+ break; \
+ case CNS11643_1_ann: \
+ set = CNS11643_1_set; \
+ break; \
+ case ISO_IR_165_ann: \
+ set = ISO_IR_165_set; \
+ break; \
+ default: \
+ abort (); \
+ } \
+ else \
{ \
- case GB2312_ann: \
- set = GB2312_set; \
- break; \
- case GB12345_ann: \
- set = GB12345_set; \
- break; \
- case CNS11643_1_ann: \
- set = CNS11643_1_set; \
- break; \
- default: \
- assert ((ann & SO_ann) == ISO_IR_165_ann); \
- set = ISO_IR_165_set; \
- break; \
+ if (! ignore_errors_p ()) \
+ { \
+ result = __GCONV_ILLEGAL_INPUT; \
+ break; \
+ } \
+ ++inptr; \
+ ++*irreversible; \
} \
continue; \
} \