char *charset_path=CHARSETPATH;
char *source_csname=SOURCE_CHARSET, *dest_csname=TARGET_CHARSET;
char *charset_path=CHARSETPATH;
char *source_csname=SOURCE_CHARSET, *dest_csname=TARGET_CHARSET;
/* Converts char in input charset into unicode representation */
/* Should be converted to macro */
/************************************************************************/
/* Converts char in input charset into unicode representation */
/* Should be converted to macro */
/************************************************************************/
/************************************************************************/
/* Reads charset file (as got from ftp.unicode.org) and returns array of*/
/* 256 short ints (malloced) mapping from charset t unicode */
/************************************************************************/
/* Reads charset file (as got from ftp.unicode.org) and returns array of*/
/* 256 short ints (malloced) mapping from charset t unicode */
-/************************************************************************/
-short int * read_charset(const char *filename) {
+/************************************************************************/int * read_charset(const char *filename) {
+uint16_t * read_charset(const char *filename) {
if (input_buffer)
setvbuf(f,input_buffer,_IOFBF,FILE_BUFFER);
/* defaults */
if (input_buffer)
setvbuf(f,input_buffer,_IOFBF,FILE_BUFFER);
/* defaults */
int result;
result=catdoc_read(buf, 1, 1, f);
if (result<0) {
int result;
result=catdoc_read(buf, 1, 1, f);
if (result<0) {
if (c<0x80)
return c;
if (c <0xC0)
return 0xfeff; /*skip corrupted sequebces*/
if (c <0xE0) {
if (catdoc_read(buf+1, 1, 1, f)<=0) return EOF;
if (c<0x80)
return c;
if (c <0xC0)
return 0xfeff; /*skip corrupted sequebces*/
if (c <0xE0) {
if (catdoc_read(buf+1, 1, 1, f)<=0) return EOF;
}
if (c <0xF0) {
if (catdoc_read(buf+1, 1, 2, f)<=2) return (int)EOF;
}
if (c <0xF0) {
if (catdoc_read(buf+1, 1, 2, f)<=2) return (int)EOF;