From 918b9d72a9980efd4622bd25506da9531a952dbe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 25 Apr 1998 20:34:34 +0000 Subject: Update. 1998-04-25 18:39 Ulrich Drepper * iconvdata/Makefile: Use gap method for iso8859-5, iso8859-7, iso8859-8 and iso8859-10. * iconvdata/iso8859-5.c: Change to use gap method. * iconvdata/iso8859-7.c: Likewise. * iconvdata/iso8859-8.c: Likewise. * iconvdata/iso8859-10.c: Likewise. * iconvdata/Makefile: Add rules for ISO-2022-JP module. * iconv/skeleton.c: Allow END_LOOP do be defined and use it at the end of the loop. * iconvdata/iso-2022-jp.c: New file. * iconvdata/ksc5601.c: Don't use uint16_t to represent byte sequence. * iconvdata/ksc5601.h: Unify function interfaces. * iconvdata/euckr.c: Adapt for changed ksc5601.h interface. * iconvdata/uhc.c: Likewise. * iconvdata/gb2312.h: Use correct types. * iconvdata/iso646.c (gconv_open): Correctly initialize the character size elements of data. --- iconvdata/iso646.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'iconvdata/iso646.c') diff --git a/iconvdata/iso646.c b/iconvdata/iso646.c index fa54371be3..d3eaa77834 100644 --- a/iconvdata/iso646.c +++ b/iconvdata/iso646.c @@ -152,10 +152,20 @@ gconv_init (struct gconv_step *step) new_data->var = var; step->data = new_data; - step->min_needed_from = MIN_NEEDED_FROM; - step->max_needed_from = MIN_NEEDED_FROM; - step->min_needed_to = MIN_NEEDED_TO; - step->max_needed_to = MIN_NEEDED_TO; + if (var == from_iso646) + { + step->min_needed_from = MIN_NEEDED_FROM; + step->max_needed_from = MIN_NEEDED_FROM; + step->min_needed_to = MIN_NEEDED_TO; + step->max_needed_to = MIN_NEEDED_TO; + } + else + { + step->min_needed_from = MIN_NEEDED_TO; + step->max_needed_from = MIN_NEEDED_TO; + step->min_needed_to = MIN_NEEDED_FROM; + step->max_needed_to = MIN_NEEDED_FROM; + } step->stateful = 0; @@ -408,7 +418,7 @@ gconv_end (struct gconv_step *data) #define LOOPFCT TO_LOOP #define BODY \ { \ - unsigned char ch = '\0'; \ + unsigned char ch; \ int failure = GCONV_OK; \ \ ch = *((uint32_t *) inptr); \ -- cgit 1.4.1