2 * Character Set Conversion Library 1.1
4 * (c) 1998--2001 Martin Mares <mj@ucw.cz>
6 * This software may be freely distributed and used according to the terms
7 * of the GNU Lesser General Public License.
12 /* Parameters supplied by the caller */
14 const unsigned char *source; /* Current position in source buffer */
15 const unsigned char *source_end; /* End of source buffer */
16 unsigned char *dest; /* Current position in destination buffer */
17 unsigned char *dest_start; /* First byte of destination buffer */
18 unsigned char *dest_end; /* End of destination buffer */
20 /* Internal variables */
22 int (*convert)(struct conv_context *);
23 unsigned short int *in_to_x;
24 unsigned short int *x_to_out;
25 unsigned int state, value;
28 void conv_init(struct conv_context *);
29 void conv_set_charset(struct conv_context *, int, int);
30 #define conv_run(c) ((c)->convert(c))
32 #define CONV_SOURCE_END 1
33 #define CONV_DEST_END 2
38 CONV_CHARSET_ISO_8859_1,
39 CONV_CHARSET_ISO_8859_2,
40 CONV_CHARSET_ISO_8859_3,
41 CONV_CHARSET_ISO_8859_4,
42 CONV_CHARSET_ISO_8859_5,
43 CONV_CHARSET_ISO_8859_6,
44 CONV_CHARSET_ISO_8859_7,
45 CONV_CHARSET_ISO_8859_8,
46 CONV_CHARSET_ISO_8859_9,
47 CONV_CHARSET_ISO_8859_10,
48 CONV_CHARSET_ISO_8859_11,
49 CONV_CHARSET_ISO_8859_13,
50 CONV_CHARSET_ISO_8859_14,
51 CONV_CHARSET_ISO_8859_15,
52 CONV_CHARSET_ISO_8859_16,
56 CONV_CHARSET_CSN369103,
64 /* For those brave ones who want to mess with charconv internals */
65 unsigned int conv_x_to_ucs(unsigned int x);
66 unsigned int conv_ucs_to_x(unsigned int ucs);
67 unsigned int conv_x_count(void);
71 int find_charset_by_name(char *);
72 char *charset_name(int);