ICU4C Proposal: API to query the number of input pending

Ram Viswanadha <[email protected]> Mon, 31 Jan 2005 17:01:09 -0800
Newsgroups gmane.comp.lib.icu.general
Message-ID <[email protected]>
Expiry
======
2005-2-11

Proposal
========
/**
  * Returns the number of UChars held in the converter's internal state
  * because more input is needed for completing the conversion. This
  * function is
  * useful for mapping semantics of ICU's converter interface to those 
of
  * iconv,
  * and this information is not needed for normal conversion.
  * @param cnv       The converter in which the input is held
  * @param status    ICU error code in/out parameter.
  *                  Must fulfill U_SUCCESS before the function call.
  * @return The number of UChars in the state. -1 if an error is
  * encountered.
  * @draft ICU 3.4
  */
U_DRAFT int32_t U_EXPORT2
ucnv_fromUCountPending(const UConverter* cnv, UErrorCode* status);

/**
  * Returns the number of chars held in the converter's internal state
  * because more input is needed for completing the conversion. This
  * function is
  * useful for mapping semantics of ICU's converter interface to those of
  * iconv,
  * and this information is not needed for normal conversion.
  * @param cnv       The converter in which the input is held as internal
  * state
  * @param status    ICU error code in/out parameter.
  *                  Must fulfill U_SUCCESS before the function call.
  * @return The number of chars in the state. -1 if an error is
  * encountered.
  * @draft ICU 3.4
  */
U_DRAFT int32_t U_EXPORT2
ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status);


Best Regards,

Ram Viswanadha