[KoCo-CVS] [Commit] cjkcodecs/src cjkcommon.h
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-07-06 23:28:11
|
perky 03/07/06 16:28:09 Modified: src cjkcommon.h Log: Change maps' internal unicode type to ucs2_t. Revision Changes Path 1.10 +15 -10 cjkcodecs/src/cjkcommon.h Index: cjkcommon.h =================================================================== RCS file: /cvsroot/koco/cjkcodecs/src/cjkcommon.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- cjkcommon.h 20 Jun 2003 17:22:59 -0000 1.9 +++ cjkcommon.h 6 Jul 2003 23:28:09 -0000 1.10 @@ -26,25 +26,36 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $Id: cjkcommon.h,v 1.9 2003/06/20 17:22:59 perky Exp $ + * $Id: cjkcommon.h,v 1.10 2003/07/06 23:28:09 perky Exp $ */ #ifndef _CJKCOMMON_H_ #define _CJKCOMMON_H_ -typedef unsigned short DBCHAR; +#ifdef uint32_t +typedef uint32_t ucs4_t; +#else +typedef unsigned int ucs4_t; +#endif + +#ifdef uint16_t +typedef uint16_t ucs2_t, DBCHAR; +#else +typedef unsigned short ucs2_t, DBCHAR; +#endif + #define UNIINV Py_UNICODE_REPLACEMENT_CHARACTER #define NOCHAR 0xFFFF #define DBCINV 0xFFFD struct dbcs_index { - const Py_UNICODE *map; + const ucs2_t *map; unsigned char bottom, top; }; typedef struct dbcs_index decode_map; struct unim_index { - const DBCHAR *map; + const DBCHAR *map; unsigned char bottom, top; }; typedef struct unim_index encode_map; @@ -54,12 +65,6 @@ const struct unim_index *encmap; const struct dbcs_index *decmap; }; - -#ifdef uint32_t -typedef uint32_t ucs4_t; -#else -typedef unsigned int ucs4_t; -#endif #endif |