Additional arguments to to_internal to specify output buffer explicitly.
authorPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 2 Dec 2001 09:25:57 +0000 (09:25 +0000)
committerPeter Verthez <Peter.Verthez@advalvas.be>
Sun, 2 Dec 2001 09:25:57 +0000 (09:25 +0000)
encoding.h

index f4a2129e09041cfcfbe887a3d7ad156c026899e5..1a9e79c65c3da9ec2a7cad810e0fce93c0784706 100644 (file)
@@ -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);