From b572c2da318d45e89bec5425692be84a2ac27ed4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 25 Aug 2000 22:13:09 +0000 Subject: Update. 2000-08-25 Ulrich Drepper * locales/i18n (default_missing): Change back to only U003F. --- iconv/gconv_trans.c | 4 ++-- iconv/loop.c | 11 +++++++++-- iconv/skeleton.c | 17 +++++++++-------- localedata/ChangeLog | 4 ++++ localedata/locales/i18n | 2 +- 5 files changed, 25 insertions(+), 13 deletions(-) diff --git a/iconv/gconv_trans.c b/iconv/gconv_trans.c index bb908176e6..8c658b126f 100644 --- a/iconv/gconv_trans.c +++ b/iconv/gconv_trans.c @@ -117,7 +117,7 @@ __gconv_transliterate (struct __gconv_step *step, (step, step_data, &toinptr, (const unsigned char *) &to_tbl[idx2 + len], (unsigned char **) outbufstart, - irreversible, 0, 0)); + NULL, 0, 0)); if (res != __GCONV_ILLEGAL_INPUT) { /* If the conversion succeeds we have to increment the @@ -200,7 +200,7 @@ __gconv_transliterate (struct __gconv_step *step, (step, step_data, &toinptr, (const unsigned char *) (default_missing + len), (unsigned char **) outbufstart, - irreversible, 0, 0)); + NULL, 0, 0)); if (res != __GCONV_ILLEGAL_INPUT) { diff --git a/iconv/loop.c b/iconv/loop.c index 9d168d84e9..3a2779ed4a 100644 --- a/iconv/loop.c +++ b/iconv/loop.c @@ -170,7 +170,8 @@ /* To make it easier for the writers of the modules, we define a macro to test whether we have to ignore errors. */ -#define ignore_errors_p() (flags & __GCONV_IGNORE_ERRORS) +#define ignore_errors_p() \ + (irreversible != NULL && (flags & __GCONV_IGNORE_ERRORS)) /* Error handling with transliteration/transcription function use and @@ -181,6 +182,12 @@ struct __gconv_trans_data *trans; \ \ result = __GCONV_ILLEGAL_INPUT; \ + \ + if (irreversible == NULL) \ + /* This means we are in call from __gconv_transliterate. In this \ + case we are not doing any error recovery outself. */ \ + break; \ + \ /* First try the transliteration methods. */ \ for (trans = step_data->__trans; trans != NULL; trans = trans->__next) \ { \ @@ -197,7 +204,7 @@ /* Next see whether we have to ignore the error. If not, stop. */ \ if (! ignore_errors_p ()) \ break; \ - \ + \ /* When we come here it means we ignore the character. */ \ ++*irreversible; \ inptr += Incr; \ diff --git a/iconv/skeleton.c b/iconv/skeleton.c index e203f0fddb..76189b56a9 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -320,6 +320,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, /* This variable is used to count the number of characters we actually converted. */ size_t lirreversible = 0; + size_t *lirreversiblep = irreversible ? &lirreversible : NULL; #if defined _STRING_ARCH_unaligned \ || MIN_NEEDED_FROM == 1 || MAX_NEEDED_FROM % MIN_NEEDED_FROM != 0 \ || MIN_NEEDED_TO == 1 || MAX_NEEDED_TO % MIN_NEEDED_TO != 0 @@ -350,7 +351,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, # if MAX_NEEDED_FROM > 1 if (MAX_NEEDED_TO == 1 || FROM_DIRECTION) status = SINGLE(FROM_LOOP) (step, data, inptrp, inend, &outbuf, - outend, &lirreversible + outend, lirreversiblep EXTRA_LOOP_ARGS); # endif # if MAX_NEEDED_FROM > 1 && MAX_NEEDED_TO > 1 && !ONE_DIRECTION @@ -358,7 +359,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, # endif # if MAX_NEEDED_TO > 1 && !ONE_DIRECTION status = SINGLE(TO_LOOP) (step, data, inptrp, inend, &outbuf, - outend, &lirreversible EXTRA_LOOP_ARGS); + outend, lirreversiblep EXTRA_LOOP_ARGS); # endif if (__builtin_expect (status, __GCONV_OK) != __GCONV_OK) @@ -402,11 +403,11 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, if (FROM_DIRECTION) /* Run the conversion loop. */ status = FROM_LOOP (step, data, inptrp, inend, &outbuf, outend, - &lirreversible EXTRA_LOOP_ARGS); + lirreversiblep EXTRA_LOOP_ARGS); else /* Run the conversion loop. */ status = TO_LOOP (step, data, inptrp, inend, &outbuf, outend, - &lirreversible EXTRA_LOOP_ARGS); + lirreversiblep EXTRA_LOOP_ARGS); } #if !defined _STRING_ARCH_unaligned \ && MIN_NEEDED_FROM != 1 && MAX_NEEDED_FROM % MIN_NEEDED_FROM == 0 \ @@ -417,13 +418,13 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, /* Run the conversion loop. */ status = GEN_unaligned (FROM_LOOP) (step, data, inptrp, inend, &outbuf, outend, - &lirreversible + lirreversiblep EXTRA_LOOP_ARGS); else /* Run the conversion loop. */ status = GEN_unaligned (TO_LOOP) (step, data, inptrp, inend, &outbuf, outend, - &lirreversible + lirreversiblep EXTRA_LOOP_ARGS); } #endif @@ -498,7 +499,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, (const unsigned char *) inend, (unsigned char **) &outbuf, (unsigned char *) outerr, - &lirreversible EXTRA_LOOP_ARGS); + lirreversiblep EXTRA_LOOP_ARGS); else /* Run the conversion loop. */ nstatus = TO_LOOP (step, data, @@ -506,7 +507,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, (const unsigned char *) inend, (unsigned char **) &outbuf, (unsigned char *) outerr, - &lirreversible EXTRA_LOOP_ARGS); + lirreversiblep EXTRA_LOOP_ARGS); /* We must run out of output buffer space in this rerun. */ diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 9941da6729..a851e49087 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ +2000-08-25 Ulrich Drepper + + * locales/i18n (default_missing): Change back to only U003F. + 2000-08-24 Andreas Jaeger * Makefile (generated): Add some .out files. diff --git a/localedata/locales/i18n b/localedata/locales/i18n index 30d2ae4159..965eb6b912 100644 --- a/localedata/locales/i18n +++ b/localedata/locales/i18n @@ -805,7 +805,7 @@ translit_start % RIGHT DOUBLE QUOTATION MARK. -default_missing ; +default_missing translit_end -- cgit v1.2.3