diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-25 20:34:34 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-25 20:34:34 +0000 |
commit | 918b9d72a9980efd4622bd25506da9531a952dbe (patch) | |
tree | f45368136155cd1ef156aaf277047a5488b9c3ac /iconv/skeleton.c | |
parent | 05c9fa3c0511214e808ec048f1062540dc243eb9 (diff) | |
download | glibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.gz glibc-918b9d72a9980efd4622bd25506da9531a952dbe.tar.xz 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 'iconv/skeleton.c')
-rw-r--r-- | iconv/skeleton.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c index 78f584e9fe..cc090afe75 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -70,6 +70,7 @@ PREPARE_LOOP optional code preparing the conversion loop. Can contain variable definitions. + END_LOOP also optional, may be used to store information EXTRA_LOOP_ARGS optional macro specifying extra arguments passed to loop function. @@ -144,10 +145,20 @@ gconv_init (struct gconv_step *step) else return GCONV_NOCONV; - step->min_needed_from = MIN_NEEDED_FROM; - step->max_needed_from = MAX_NEEDED_FROM; - step->min_needed_to = MIN_NEEDED_TO; - step->max_needed_to = MAX_NEEDED_TO; + if (step->data == &from_object) + { + step->min_needed_from = MIN_NEEDED_FROM; + step->max_needed_from = MAX_NEEDED_FROM; + step->min_needed_to = MIN_NEEDED_TO; + step->max_needed_to = MAX_NEEDED_TO; + } + else + { + step->min_needed_from = MIN_NEEDED_TO; + step->max_needed_from = MAX_NEEDED_TO; + step->min_needed_to = MIN_NEEDED_FROM; + step->max_needed_to = MAX_NEEDED_FROM; + } #ifdef RESET_STATE step->stateful = 1; @@ -334,6 +345,10 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data, /* Remember how many characters we converted. */ *written += converted; + +#ifdef END_LOOP + END_LOOP +#endif } return status; @@ -354,3 +369,5 @@ FUNCTION_NAME (struct gconv_step *step, struct gconv_step_data *data, #undef RESET_STATE #undef RESET_INPUT_BUFFER #undef FUNCTION_NAME +#undef PREPARE_LOOP +#undef END_LOOP |