Encode::Tcl. add "HZ" encoding and bugfix
[p5sagit/p5-mst-13.2.git] / ext / Encode / encode.h
index 10f8386..aecc66e 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef ENCODE_H
+#define ENCODE_H
 #ifndef U8
 typedef unsigned char U8;
 #endif
@@ -17,10 +19,24 @@ struct encpage_s
 typedef struct encode_s encode_t;
 struct encode_s
 {
- const char *name;
  encpage_t  *t_utf8;
  encpage_t  *f_utf8;
  const U8   *rep;
  int        replen;
+ U8         min_el;
+ U8         max_el;
+ const char *name[2];
 };
 
+#ifdef U8
+extern int do_encode(encpage_t *enc, const U8 *src, STRLEN *slen,
+                     U8 *dst, STRLEN dlen, STRLEN *dout, int approx);
+
+extern void Encode_DefineEncoding(encode_t *enc);
+#endif
+
+#define ENCODE_NOSPACE  1
+#define ENCODE_PARTIAL  2
+#define ENCODE_NOREP    3
+#define ENCODE_FALLBACK 4
+#endif