/* ******************************************************************************* * * Copyright (C) 2002-2010, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * file name: uprops.h * encoding: US-ASCII * tab size: 8 (not used) * indentation:4 * * created on: 2002feb24 * created by: Markus W. Scherer * * Constants for mostly non-core Unicode character properties * stored in uprops.icu. */ #ifndef __UPROPS_H__ #define __UPROPS_H__ #include "unicode/utypes.h" #include "unicode/uset.h" #include "uset_imp.h" #include "udataswp.h" /* indexes[] entries */ enum { UPROPS_PROPS32_INDEX, UPROPS_EXCEPTIONS_INDEX, UPROPS_EXCEPTIONS_TOP_INDEX, UPROPS_ADDITIONAL_TRIE_INDEX, UPROPS_ADDITIONAL_VECTORS_INDEX, UPROPS_ADDITIONAL_VECTORS_COLUMNS_INDEX, UPROPS_SCRIPT_EXTENSIONS_INDEX, UPROPS_RESERVED_INDEX_7, UPROPS_RESERVED_INDEX_8, /* size of the data file (number of 32-bit units after the header) */ UPROPS_DATA_TOP_INDEX, /* maximum values for code values in vector word 0 */ UPROPS_MAX_VALUES_INDEX=10, /* maximum values for code values in vector word 2 */ UPROPS_MAX_VALUES_2_INDEX, UPROPS_INDEX_COUNT=16 }; /* definitions for the main properties words */ enum { /* general category shift==0 0 (5 bits) */ /* reserved 5 (1 bit) */ UPROPS_NUMERIC_TYPE_VALUE_SHIFT=6 /* 6 (10 bits) */ }; #define GET_CATEGORY(props) ((props)&0x1f) #define CAT_MASK(props) U_MASK(GET_CATEGORY(props)) #define GET_NUMERIC_TYPE_VALUE(props) ((props)>>UPROPS_NUMERIC_TYPE_VALUE_SHIFT) /* constants for the storage form of numeric types and values */ enum { UPROPS_NTV_NONE=0, UPROPS_NTV_DECIMAL_START=1, UPROPS_NTV_DIGIT_START=11, UPROPS_NTV_NUMERIC_START=21, UPROPS_NTV_FRACTION_START=0xb0, UPROPS_NTV_LARGE_START=0x1e0, UPROPS_NTV_RESERVED_START=0x300, UPROPS_NTV_MAX_SMALL_INT=UPROPS_NTV_FRACTION_START-UPROPS_NTV_NUMERIC_START-1 }; #define UPROPS_NTV_GET_TYPE(ntv) \ ((ntv==UPROPS_NTV_NONE) ? U_NT_NONE : \ (ntv