From 304d7abfadb59d53c078c43bf825d13d279992c0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 17 May 2001 07:11:00 +0000 Subject: Update. 2001-05-14 Bruno Haible * 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 * 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. --- iconvdata/iso-2022-cn-ext.c | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) (limited to 'iconvdata') 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; \ } \ -- cgit 1.4.1