/* 4 space tabs filename: uu.h package: common utils/unicode utilities description: unicode/utf-8 conversion routine headers for uu.c author: ydnar version history date user description ---------------------------------------------------------------------------- 02.13.2001 ydnar initial version for ia32 linux 02.19.2001 ydnar tiny modification 02.22.2001 ydnar changed arg order on conversion routine */ /* fingerprint */ #ifndef UU_H #define UU_H #endif /* includes */ #ifndef CT_H #include "ct.h" /* common types */ #endif /* types */ typedef struct UUReader UUReader; struct UUReader { UInt32 u8WantLen, u8Len; UCS4Char uc; UTF8Char u8[ 8 ]; /* up to 7 bytes used, eighth is for padding */ UInt32 bufLen, bufPos; UTF8String buf; }; /* public function prototypes */ Error uuOpenReader( UUReader *r ); Error uuCloseReader( UUReader *r ); Error uuFillReader( UUReader *r, UInt32 bufLen, Char *buf ); Error uuReadNextChar( UUReader *r ); Error uuUCS4CharToUTF8Char( UCS4Char uc, UInt32 *u8Len, UTF8String u8 ); Error uuUTF8CharToUCS4Char( UTF8String u8, UCS4Char *uc );