| OLD | NEW |
| 1 /* | 1 /* |
| 2 ********************************************************************** | 2 ********************************************************************** |
| 3 * Copyright (C) 2000-2011, International Business Machines | 3 * Copyright (C) 2000-2014, International Business Machines |
| 4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
| 5 ********************************************************************** | 5 ********************************************************************** |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef URESIMP_H | 8 #ifndef URESIMP_H |
| 9 #define URESIMP_H | 9 #define URESIMP_H |
| 10 | 10 |
| 11 #include "unicode/ures.h" | 11 #include "unicode/ures.h" |
| 12 | 12 |
| 13 #include "uresdata.h" | 13 #include "uresdata.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 25 #define kVersionTag "Version" | 25 #define kVersionTag "Version" |
| 26 | 26 |
| 27 #define MAGIC1 19700503 | 27 #define MAGIC1 19700503 |
| 28 #define MAGIC2 19641227 | 28 #define MAGIC2 19641227 |
| 29 | 29 |
| 30 #define URES_MAX_ALIAS_LEVEL 256 | 30 #define URES_MAX_ALIAS_LEVEL 256 |
| 31 #define URES_MAX_BUFFER_SIZE 256 | 31 #define URES_MAX_BUFFER_SIZE 256 |
| 32 | 32 |
| 33 #define EMPTY_SET 0x2205 | 33 #define EMPTY_SET 0x2205 |
| 34 | 34 |
| 35 /* | |
| 36 enum UResEntryType { | |
| 37 ENTRY_OK = 0, | |
| 38 ENTRY_GOTO_ROOT = 1, | |
| 39 ENTRY_GOTO_DEFAULT = 2, | |
| 40 ENTRY_INVALID = 3 | |
| 41 }; | |
| 42 | |
| 43 typedef enum UResEntryType UResEntryType; | |
| 44 */ | |
| 45 | |
| 46 struct UResourceDataEntry; | 35 struct UResourceDataEntry; |
| 47 typedef struct UResourceDataEntry UResourceDataEntry; | 36 typedef struct UResourceDataEntry UResourceDataEntry; |
| 48 | 37 |
| 49 /* | 38 /* |
| 50 * Note: If we wanted to make this structure smaller, then we could try | 39 * Note: If we wanted to make this structure smaller, then we could try |
| 51 * to use one UResourceDataEntry pointer for fAlias and fPool, with a separate | 40 * to use one UResourceDataEntry pointer for fAlias and fPool, with a separate |
| 52 * flag to distinguish whether this struct is for a real bundle with a pool, | 41 * flag to distinguish whether this struct is for a real bundle with a pool, |
| 53 * or for an alias entry for which we won't use the pool after loading. | 42 * or for an alias entry for which we won't use the pool after loading. |
| 54 */ | 43 */ |
| 55 struct UResourceDataEntry { | 44 struct UResourceDataEntry { |
| (...skipping 28 matching lines...) Expand all Loading... |
| 84 uint32_t fMagic1; /* For determining if it's a stack object */ | 73 uint32_t fMagic1; /* For determining if it's a stack object */ |
| 85 uint32_t fMagic2; /* For determining if it's a stack object */ | 74 uint32_t fMagic2; /* For determining if it's a stack object */ |
| 86 int32_t fIndex; | 75 int32_t fIndex; |
| 87 int32_t fSize; | 76 int32_t fSize; |
| 88 | 77 |
| 89 /*const UResourceBundle *fParentRes;*/ /* needed to get the actual locale fo
r a child resource */ | 78 /*const UResourceBundle *fParentRes;*/ /* needed to get the actual locale fo
r a child resource */ |
| 90 }; | 79 }; |
| 91 | 80 |
| 92 U_CAPI void U_EXPORT2 ures_initStackObject(UResourceBundle* resB); | 81 U_CAPI void U_EXPORT2 ures_initStackObject(UResourceBundle* resB); |
| 93 | 82 |
| 83 /** |
| 84 * Opens a resource bundle for the locale; |
| 85 * if there is not even a base language bundle, then loads the root bundle; |
| 86 * never falls back to the default locale. |
| 87 * |
| 88 * This is used for algorithms that have good pan-Unicode default behavior, |
| 89 * such as case mappings, collation, and segmentation (BreakIterator). |
| 90 */ |
| 91 U_CAPI UResourceBundle* U_EXPORT2 |
| 92 ures_openNoDefault(const char* path, const char* localeID, UErrorCode* status); |
| 93 |
| 94 /* Some getters used by the copy constructor */ | 94 /* Some getters used by the copy constructor */ |
| 95 U_CFUNC const char* ures_getName(const UResourceBundle* resB); | 95 U_CFUNC const char* ures_getName(const UResourceBundle* resB); |
| 96 #ifdef URES_DEBUG | 96 #ifdef URES_DEBUG |
| 97 U_CFUNC const char* ures_getPath(const UResourceBundle* resB); | 97 U_CFUNC const char* ures_getPath(const UResourceBundle* resB); |
| 98 /** | 98 /** |
| 99 * If anything was in the RB cache, dump it to the screen. | 99 * If anything was in the RB cache, dump it to the screen. |
| 100 * @return TRUE if there was anything into the cache | 100 * @return TRUE if there was anything into the cache |
| 101 */ | 101 */ |
| 102 U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void); | 102 U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void); |
| 103 #endif | 103 #endif |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 * | 259 * |
| 260 * @param resourceBundle resource bundle in question | 260 * @param resourceBundle resource bundle in question |
| 261 * @param status just for catching illegal arguments | 261 * @param status just for catching illegal arguments |
| 262 * @return A Locale name | 262 * @return A Locale name |
| 263 */ | 263 */ |
| 264 U_CAPI const char* U_EXPORT2 | 264 U_CAPI const char* U_EXPORT2 |
| 265 ures_getLocaleInternal(const UResourceBundle* resourceBundle, | 265 ures_getLocaleInternal(const UResourceBundle* resourceBundle, |
| 266 UErrorCode* status); | 266 UErrorCode* status); |
| 267 | 267 |
| 268 #endif /*URESIMP_H*/ | 268 #endif /*URESIMP_H*/ |
| OLD | NEW |