aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-04-25 20:34:34 +0000
committerUlrich Drepper <drepper@redhat.com>1998-04-25 20:34:34 +0000
commit918b9d72a9980efd4622bd25506da9531a952dbe (patch)
treef45368136155cd1ef156aaf277047a5488b9c3ac /iconvdata/iso646.c
parentUpdate. (diff)
downloadglibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.gz
glibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.bz2
glibc-918b9d72a9980efd4622bd25506da9531a952dbe.zip
Update.
1998-04-25 18:39 Ulrich Drepper <drepper@cygnus.com> * 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.
Diffstat (limited to 'iconvdata/iso646.c')
-rw-r--r--iconvdata/iso646.c20
1 files changed, 15 insertions, 5 deletions
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); \