2001-05-31 01:27:20 +00:00
|
|
|
#ifndef __CHARSETS_H__
|
|
|
|
#define __CHARSETS_H__
|
|
|
|
|
2002-10-30 23:14:26 +00:00
|
|
|
#ifdef HAVE_CHARSET
|
|
|
|
|
2001-05-31 01:27:20 +00:00
|
|
|
#define UNKNCHAR '\001'
|
|
|
|
|
2001-06-07 22:36:45 +00:00
|
|
|
#define CHARSETS_INDEX "mc.charsets"
|
2001-05-31 01:27:20 +00:00
|
|
|
|
|
|
|
extern int n_codepages;
|
|
|
|
|
2002-10-30 23:14:26 +00:00
|
|
|
extern unsigned char conv_displ[256];
|
|
|
|
extern unsigned char conv_input[256];
|
|
|
|
extern unsigned char printable[256];
|
2001-05-31 01:27:20 +00:00
|
|
|
|
|
|
|
struct codepage_desc {
|
|
|
|
char *id;
|
|
|
|
char *name;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern struct codepage_desc *codepages;
|
|
|
|
|
2002-10-30 23:14:26 +00:00
|
|
|
char *get_codepage_id (int n);
|
|
|
|
int get_codepage_index (const char *id);
|
|
|
|
int load_codepages_list (void);
|
|
|
|
void free_codepages_list (void);
|
|
|
|
char *init_translation_table (int cpsource, int cpdisplay);
|
|
|
|
void convert_to_display (char *str);
|
|
|
|
void convert_from_input (char *str);
|
|
|
|
void convert_string (unsigned char *str);
|
|
|
|
|
|
|
|
#else /* !HAVE_CHARSET */
|
|
|
|
#define convert_to_display(x) do {} while (0)
|
|
|
|
#define convert_from_input(x) do {} while (0)
|
|
|
|
#endif /* HAVE_CHARSET */
|
2001-05-31 01:27:20 +00:00
|
|
|
|
|
|
|
#endif /* __CHARSETS_H__ */
|