X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/charset/blobdiff_plain/32361bda545f94503610f2cdfc85374a07c56635..efaed6748de62c836d7fb2f7a7c7d415abc1ff98:/charset.h diff --git a/charset.h b/charset.h index 545784f..5dd4d3a 100644 --- a/charset.h +++ b/charset.h @@ -33,7 +33,9 @@ typedef enum { CS_ISO8859_16, CS_CP437, CS_CP850, + CS_CP852, CS_CP866, + CS_CP874, CS_CP1250, CS_CP1251, CS_CP1252, @@ -135,6 +137,13 @@ extern const charset_state charset_init_state; * NULL, `errlen' will be ignored, and the library will choose * something sensible to do on its own. For Unicode, this will be * U+FFFD (REPLACEMENT CHARACTER). + * + * `output' may be NULL, in which case the entire translation will + * be performed in theory (e.g. a dry run to work out how much + * space needs to be allocated for the real thing). `outlen' may + * also be negative, indicating an unlimited buffer length + * (although this is almost certainly unwise if `output' is _not_ + * NULL). */ int charset_to_unicode(const char **input, int *inlen, @@ -165,6 +174,13 @@ int charset_to_unicode(const char **input, int *inlen, * If `input' is NULL, this routine will output the necessary bytes * to reset the encoding state in any way which might be required * at the end of an output piece of text. + * + * `output' may be NULL, in which case the entire translation will + * be performed in theory (e.g. a dry run to work out how much + * space needs to be allocated for the real thing). `outlen' may + * also be negative, indicating an unlimited buffer length + * (although this is almost certainly unwise if `output' is _not_ + * NULL). */ int charset_from_unicode(const wchar_t **input, int *inlen,