]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/gencase/gencase.h
ICU-8.11.1.tar.gz
[apple/icu.git] / icuSources / tools / gencase / gencase.h
index 2ca8eddf7ddfef1a957987e865c486d5a8f9da85..8b09cb2dfd137c7bf9c4e016a2e4cbe419887e73 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 2004, International Business Machines
+*   Copyright (C) 2004-2005, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
 
 U_CDECL_BEGIN
 
+/* Unicode versions --------------------------------------------------------- */
+
+enum {
+    UNI_1_0,
+    UNI_1_1,
+    UNI_2_0,
+    UNI_3_0,
+    UNI_3_1,
+    UNI_3_2,
+    UNI_4_0,
+    UNI_4_0_1,
+    UNI_4_1,
+    UNI_VER_COUNT
+};
+
+extern int32_t ucdVersion;
+
 /* gencase ------------------------------------------------------------------ */
 
 #define UGENCASE_EXC_SHIFT     16
 #define UGENCASE_EXC_MASK      0xffff0000
 
+/*
+ * Values for the ucase.icu unfold[] data array, see store.c.
+ * The values are stored in ucase.icu so that the runtime code will work with
+ * changing values, but they are hardcoded for gencase for simplicity.
+ * They are optimized, that is, provide for minimal table column widths,
+ * for the actual Unicode data, so that the table size is minimized.
+ * Future versions of Unicode may require increases of some of these values.
+ */
+enum {
+    UGENCASE_UNFOLD_STRING_WIDTH=3,
+    UGENCASE_UNFOLD_CP_WIDTH=2,
+    UGENCASE_UNFOLD_WIDTH=UGENCASE_UNFOLD_STRING_WIDTH+UGENCASE_UNFOLD_CP_WIDTH,
+    UGENCASE_UNFOLD_MAX_ROWS=250
+};
+
+/* Values for additional data stored in pv column 1 */
+enum {
+    UGENCASE_IS_MID_LETTER_SHIFT        /* bit 0 */
+};
+
 /* special casing data */
 typedef struct {
     UChar32 code;
@@ -45,6 +82,7 @@ typedef struct {
 /* case mapping properties */
 typedef struct {
     UChar32 code, lowerCase, upperCase, titleCase;
+    UChar32 closure[8];
     SpecialCasing *specialCasing;
     CaseFolding *caseFolding;
     uint8_t gc, cc;
@@ -82,7 +120,7 @@ extern void
 makeExceptions(void);
 
 extern void
-generateData(const char *dataDir);
+generateData(const char *dataDir, UBool csource);
 
 U_CDECL_END