diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-03-14 09:11:00 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-03-14 09:11:00 +0000 |
commit | 0aece08ded7448746a91f33233f0ef94ba10b936 (patch) | |
tree | cf69f38fc49f838038bb03c80cba0946559f91d9 /iconv/skeleton.c | |
parent | 91eecefd761001298771b7aeaa25a98bcf26574b (diff) | |
download | glibc-0aece08ded7448746a91f33233f0ef94ba10b936.tar.gz glibc-0aece08ded7448746a91f33233f0ef94ba10b936.tar.xz glibc-0aece08ded7448746a91f33233f0ef94ba10b936.zip |
Update.
2000-03-14 Ulrich Drepper <drepper@redhat.com> * iconv/skeleton.c: Increment __invocation_counter in inner loop since modules depend on it counting the number of times the conversion function got called. * iconv/gconv_open.c: Optimize loop to setup step data structure. * iconv/gconv.h: Pretty print. 2000-03-04 Ulrich Drepper <drepper@redhat.com> * posix/wordexp-test.c: Correct one of the tests added in the last change. Really get the root passwd entry to check again ~root.
Diffstat (limited to 'iconv/skeleton.c')
-rw-r--r-- | iconv/skeleton.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/iconv/skeleton.c b/iconv/skeleton.c index 350b532e3a..726a76f00e 100644 --- a/iconv/skeleton.c +++ b/iconv/skeleton.c @@ -261,6 +261,9 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, data->__statep, step->__data, &converted EXTRA_LOOP_ARGS); + /* We finished one use of the loops. */ + ++data->__invocation_counter; + /* If this is the last step leave the loop, there is nothing we can do. */ if (data->__is_last) @@ -324,6 +327,11 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, rerun. */ assert (outbuf == outerr); assert (nstatus == __GCONV_FULL_OUTPUT); + + /* If we haven't consumed a single byte decrement + the invocation counter. */ + if (outbuf == outstart) + --data->__invocation_counter; #endif /* reset input buffer */ } @@ -336,9 +344,6 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data, if (status == __GCONV_FULL_OUTPUT) status = __GCONV_OK; } - - /* We finished one use of the loops. */ - ++data->__invocation_counter; } while (status == __GCONV_OK); |