From: Peter Verthez Date: Sun, 2 Dec 2001 09:25:57 +0000 (+0000) Subject: Additional arguments to to_internal to specify output buffer explicitly. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=4bb5a0d957facb819893c42621bb17266e6f18a2;p=gedcom-parse.git Additional arguments to to_internal to specify output buffer explicitly. --- diff --git a/encoding.h b/encoding.h index f4a2129..1a9e79c 100644 --- a/encoding.h +++ b/encoding.h @@ -20,9 +20,14 @@ typedef enum _ENC { TWO_BYTE_LOHI = 2 } ENCODING; +/* All Unicode characters between U+0000 and U+FFFF can be encoded in + UTF-8 with 3 or less bytes */ +#define UTF_FACTOR 3 + int open_conv_to_internal(char* fromcode); void close_conv_to_internal(); -char* to_internal(char* str, size_t len); +char* to_internal(char* str, size_t len, + char* output_buffer, size_t out_len); void init_encodings(); void set_encoding_width(ENCODING enc);