Index: trunk/src/emx/include/unidef.h
===================================================================
--- trunk/src/emx/include/unidef.h	(revision 418)
+++ trunk/src/emx/include/unidef.h	(revision 419)
@@ -64,5 +64,141 @@
 #define LC_MESSAGES		5
 
-/* Locale conventions structure */
+
+/** @group Character Type Consts (itype)
+ * @{ */
+#define CT_UPPER            0x0001      /** Upper case. */
+#define CT_LOWER            0x0002      /** Lower case. */
+#define CT_DIGIT            0x0004      /** Digits (0-9). */
+#define CT_SPACE            0x0008      /** White space and line ends. */
+#define CT_PUNCT            0x0010      /** Punctuation marks. */
+#define CT_CNTRL            0x0020      /** Control and format characters. */
+#define CT_BLANK            0x0040      /** Space and tab. */
+#define CT_XDIGIT           0x0080      /** Hex digits. */
+#define CT_ALPHA            0x0100      /** Any linguistic character. */
+#define CT_ALNUM            0x0200      /** Alphanumeric. */
+#define CT_GRAPH            0x0400      /** All except controls and space. */
+#define CT_PRINT            0x0800      /** Everything except controls. */
+#define CT_NUMBER           0x1000      /** Integral number. */
+#define CT_SYMBOL           0x2000      /** Symbol. */
+#define CT_ASCII            0x8000      /** In standard ASCII set. */
+/** @} */
+
+
+/** @group CType 1 Flag Bits.
+ * @{ */
+#define C1_ALPHA            CT_ALPHA    /** Any linguistic character. */
+#define C1_BLANK            CT_BLANK    /** Blank characters. */
+#define C1_CNTRL            CT_CNTRL    /** Control characters. */
+#define C1_DIGIT            CT_DIGIT    /** Decimal digits. */
+#define C1_LOWER            CT_LOWER    /** Lower case. */
+#define C1_PUNCT            CT_PUNCT    /** Punctuation characters. */
+#define C1_SPACE            CT_SPACE    /** Spacing characters. */
+#define C1_UPPER            CT_UPPER    /** Upper case. */
+#define C1_XDIGIT           CT_XDIGIT   /** Hex digits. */
+/** @} */
+
+
+/** @group CType 2 Flag Bits. (bidi)
+ * @{ */
+#define C2_NOTAPPLICABLE    0x00        /** NA - Not a character. */
+#define C2_LEFTTORIGHT      0x01        /** L  - Left to Right. */
+#define C2_RIGHTTOLEFT      0x02        /** R  - Right to Left. */
+#define C2_EUROPENUMBER     0x03        /** EN - European number. */
+#define C2_EUROPESEPARATOR  0x04        /** ES - European separator. */
+#define C2_EUROPETERMINATOR 0x05        /** ET - European terminator. */
+#define C2_ARABICNUMBER     0x06        /** AN - Arabic number. */
+#define C2_COMMONSEPARATOR  0x07        /** CS - Common separator. */
+#define C2_BLOCKSEPARATOR   0x08        /** B  - Block separator. */
+#define C2_WHITESPACE       0x0a        /** WS - Whitespace. */
+#define C2_OTHERNEUTRAL     0x0b        /** ON - Other neutral. */
+#define C2_MIRRORED         0x0c        /** M  - Symetrical (not Win32). */
+/** @} */
+
+
+/** @group CType 3 Flag Bits.
+ * @{ */
+#define C3_NONSPACING       0x0001      /** Nonspacing mark. */
+#define C3_DIACRITIC        0x0002      /** Diacritic mark. */
+#define C3_NSDIACRITIC      0x0003
+#define C3_VOWELMARK        0x0004      /** Vowel mark. */
+#define C3_NSVOWEL          0x0005
+#define C3_SYMBOL           0x0008      /** Symbol (see CT_SYMBOL)*/
+#define C3_KATAKANA         0x0010      /** Katakana character (jap). */
+#define C3_HIRAGANA         0x0020      /** Hiragana character (jap). */
+#define C3_HALFWIDTH        0x0040      /** Half-width varient. */
+#define C3_FULLWIDTH        0x0080      /** Full-width varient. */
+#define C3_IDEOGRAPH        0x0100      /** Kanji/Han character (asian). */
+#define C3_KASHIDA          0x0200      /** Arabic enlonger. */
+#define C3_ALPHA            0x8000      /** Alphabetic. */
+#define C3_MASK             0x83FF      /** Mask for Win32 bits. */
+/** @} */
+
+
+/** @group Character Set Values. (charset)
+ * Linguistic groups and subtypes.
+ * @{ */
+#define CHS_NONCHAR         0x00000000
+#define CHS_OTHER           0x00000001
+#define CHS_LATIN           0x00000002
+#define CHS_CYRILLIC        0x00000003
+#define CHS_ARABIC          0x00000004
+#define CHS_GREEK           0x00000005
+#define CHS_HEBREW          0x00000006
+#define CHS_THAI            0x00000007
+#define CHS_KATAKANA        0x00000008
+#define CHS_HIRAGANA        0x00000009
+#define CHS_HANGUEL         0x0000000a
+#define CHS_BOPOMOFO        0x0000000b
+#define CHS_DEVANAGARI      0x0000000c
+#define CHS_TELUGU          0x0000000d
+#define CHS_BENGALI         0x0000000e
+#define CHS_GUJARATI        0x0000000f
+#define CHS_GURMUKHI        0x00000010
+#define CHS_TAMIL           0x00000011
+#define CHS_LAO             0x00000012
+/* .. */
+#define CHS_PUNCTSTART      0x00000020
+#define CHS_PUNCTEND        0x00000021
+#define CHS_DINGBAT         0x00000022
+#define CHS_MATH            0x00000023
+#define CHS_APL             0x00000024
+#define CHS_ARROW           0x00000025
+#define CHS_BOX             0x00000026
+#define CHS_DASH            0x00000027
+#define CHS_CURRENCY        0x00000028
+#define CHS_FRACTION        0x00000029
+#define CHS_LINESEP         0x0000002a
+#define CHS_USERDEF         0x0000002b
+/** @} */
+
+
+/** @group UGL Codepage Consts. (codepage)
+ * @{ */
+#define CCP_437             0x01  /** US PC. */
+#define CCP_850             0x02  /** Multilingual PC. */
+#define CCP_SYMB            0x04  /** PostScript Symbol. */
+#define CCP_1252            0x08  /** Windows Latin 1. */
+#define CCP_1250            0x10  /** Windows Latin 2. */
+#define CCP_1251            0x20  /** Windows Cyrillic. */
+#define CCP_1254            0x40  /** Windows Turkish. */
+#define CCP_1257            0x80  /** Windows Baltic. */
+/** @} */
+
+
+/** @group Character Type (kind/UniQueryStringType)
+ * @{ */
+#define CT_ITYPE            0x0001
+#define CT_BIDI             0x0002
+#define CT_CHARSET          0x0003
+#define CT_EXTENDED         0x0004
+#define CT_CODEPAGE         0x0005
+#define CT_INDEX            0x0006
+#define CT_CTYPE1           0x0007  /** C1_* - Win32 compat xpg4. */
+#define CT_CTYPE2           0x0008  /** C2_* - Win32 compat bidi. */
+#define CT_CTYPE3           0x0009  /** C3_* - Win32 compat extended. */
+/** @} */
+
+
+/** Locale conventions structure */
 typedef struct UniLconv
 {
@@ -92,11 +228,12 @@
 } UNILCONV;
 
-/* Char/String Type (QueryCharType and UniQueryStringType). */
+
+/** Char/String Type (QueryCharType and UniQueryStringType). */
 typedef struct UniCType {
-    unsigned short  itype;
-    char            bidi;
-    char            charset;
-    unsigned short  extend;
-    unsigned short  codepage;
+    unsigned short  itype;              /** XPG/4 type attributes (C1_*). */
+    unsigned char   bidi;               /** BiDi type attributes (C2_*). */
+    unsigned char   charset;            /** Character set (CHS_*). */
+    unsigned short  extend;             /** Win32 Extended attributes (C3_*). */
+    unsigned short  codepage;           /** Codepage bits. (CCP_*) */
 } UNICTYPE;
 
