Marco Cimarosti <[EMAIL PROTECTED]>:

> 1) What should the function do when passed a NULL as the last argument?
> Should it use an internal mbstate_t variable or not? What should it return?

It uses an internal mbstate_t. Return values as usual.

> 2) What should it do and return if a mbstate_t is supplied that contains
> invalid state values (as it may happen with, e.g., an uninitialized local
> variable)?

It may detect the problem and return EINVAL. However, I think it may
also not detect the problem and behave in a way that it could not
behave had it started from a valid conversion state. It would nice to
implement mbrtowc() so that this second case doesn't happen, but there
is no requirement to validate the conversion state, as far as I know.
Of course, no one would want to impose such a requirement as it might
make mbrtowc slower.

Edmund
-
Linux-UTF8:   i18n of Linux on all levels
Archive:      http://mail.nl.linux.org/linux-utf8/

Reply via email to