--- np2/codecnv/textcnv.h 2005/03/19 18:54:57 1.1 +++ np2/codecnv/textcnv.h 2005/04/01 15:35:48 1.2 @@ -5,19 +5,35 @@ enum { TEXTCNV_DEFAULT = 0, TEXTCNV_SJIS = 1, TEXTCNV_EUC = 2, - TEXTCNV_UFT8 = 3, + TEXTCNV_UTF8 = 3, TEXTCNV_UCS2 = 4 }; +enum { + TEXTCNV_READ = 0x01, + TEXTCNV_WRITE = 0x02 +}; + typedef UINT (*TCTOOEM)(OEMCHAR *dst, UINT dcnt, const void *src, UINT scnt); typedef UINT (*TCFROMOEM)(void *dst, UINT dcnt, const OEMCHAR *src, UINT scnt); +typedef struct { + UINT8 caps; + UINT8 xendian; + UINT8 width; + UINT8 hdrsize; + TCTOOEM tooem; + TCFROMOEM fromoem; +} TCINF; + + #ifdef __cplusplus extern "C" { #endif -BRESULT textcnv_tooem(UINT code, TCTOOEM *tcto); -BRESULT textcnv_fromoem(UINT code, TCFROMOEM *tcfo); +UINT textcnv_getinfo(TCINF *inf, const UINT8 *hdr, UINT hdrsize); +void textcnv_swapendian16(void *buf, UINT leng); +void textcnv_swapendian32(void *buf, UINT leng); #ifdef __cplusplus }