Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: source/tools/genrb/reslist.h

Issue 845603002: Update ICU to 54.1 step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: remove unusued directories Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « source/tools/genrb/prscmnts.cpp ('k') | source/tools/genrb/reslist.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ******************************************************************************* 2 *******************************************************************************
3 * 3 *
4 * Copyright (C) 2000-2011, International Business Machines 4 * Copyright (C) 2000-2014, International Business Machines
5 * Corporation and others. All Rights Reserved. 5 * Corporation and others. All Rights Reserved.
6 * 6 *
7 ******************************************************************************* 7 *******************************************************************************
8 * 8 *
9 * File reslist.h 9 * File reslist.h
10 * 10 *
11 * Modification History: 11 * Modification History:
12 * 12 *
13 * Date Name Description 13 * Date Name Description
14 * 02/21/00 weiv Creation. 14 * 02/21/00 weiv Creation.
15 ******************************************************************************* 15 *******************************************************************************
16 */ 16 */
17 17
18 #ifndef RESLIST_H 18 #ifndef RESLIST_H
19 #define RESLIST_H 19 #define RESLIST_H
20 20
21 #define KEY_SPACE_SIZE 65536 21 #define KEY_SPACE_SIZE 65536
22 #define RESLIST_MAX_INT_VECTOR 2048 22 #define RESLIST_MAX_INT_VECTOR 2048
23 23
24 #include "unicode/utypes.h" 24 #include "unicode/utypes.h"
25 #include "unicode/ures.h" 25 #include "unicode/ures.h"
26 #include "unicode/ustring.h" 26 #include "unicode/ustring.h"
27 #include "uresdata.h" 27 #include "uresdata.h"
28 #include "cmemory.h" 28 #include "cmemory.h"
29 #include "cstring.h" 29 #include "cstring.h"
30 #include "unewdata.h" 30 #include "unewdata.h"
31 #include "ustr.h" 31 #include "ustr.h"
32 #include "uhash.h"
33 32
34 U_CDECL_BEGIN 33 U_CDECL_BEGIN
35 34
36 typedef struct KeyMapEntry { 35 typedef struct KeyMapEntry {
37 int32_t oldpos, newpos; 36 int32_t oldpos, newpos;
38 } KeyMapEntry; 37 } KeyMapEntry;
39 38
40 /* Resource bundle root table */ 39 /* Resource bundle root table */
41 struct SRBRoot { 40 struct SRBRoot {
42 struct SResource *fRoot; 41 struct SResource *fRoot;
43 char *fLocale; 42 char *fLocale;
44 int32_t fIndexLength; 43 int32_t fIndexLength;
45 int32_t fMaxTableLength; 44 int32_t fMaxTableLength;
46 UBool noFallback; /* see URES_ATT_NO_FALLBACK */ 45 UBool noFallback; /* see URES_ATT_NO_FALLBACK */
47 int8_t fStringsForm; /* default STRINGS_UTF16_V1 */ 46 int8_t fStringsForm; /* default STRINGS_UTF16_V1 */
48 UBool fIsPoolBundle; 47 UBool fIsPoolBundle;
49 48
50 char *fKeys; 49 char *fKeys;
51 KeyMapEntry *fKeyMap; 50 KeyMapEntry *fKeyMap;
52 int32_t fKeysBottom, fKeysTop; 51 int32_t fKeysBottom, fKeysTop;
53 int32_t fKeysCapacity; 52 int32_t fKeysCapacity;
54 int32_t fKeysCount; 53 int32_t fKeysCount;
55 int32_t fLocalKeyLimit; /* key offset < limit fits into URES_TABLE */ 54 int32_t fLocalKeyLimit; /* key offset < limit fits into URES_TABLE */
56 55
57 UHashtable *fStringSet;
58 uint16_t *f16BitUnits; 56 uint16_t *f16BitUnits;
59 int32_t f16BitUnitsCapacity; 57 int32_t f16BitUnitsCapacity;
60 int32_t f16BitUnitsLength; 58 int32_t f16BitUnitsLength;
61 59
62 const char *fPoolBundleKeys; 60 const char *fPoolBundleKeys;
63 int32_t fPoolBundleKeysLength; 61 int32_t fPoolBundleKeysLength;
64 int32_t fPoolBundleKeysCount; 62 int32_t fPoolBundleKeysCount;
65 int32_t fPoolChecksum; 63 int32_t fPoolChecksum;
66 }; 64 };
67 65
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 struct SResString { 123 struct SResString {
126 struct SResource *fSame; /* used for duplicates */ 124 struct SResource *fSame; /* used for duplicates */
127 UChar *fChars; 125 UChar *fChars;
128 int32_t fLength; 126 int32_t fLength;
129 int32_t fSuffixOffset; /* this string is a suffix of fSame at this offset * / 127 int32_t fSuffixOffset; /* this string is a suffix of fSame at this offset * /
130 int8_t fNumCharsForLength; 128 int8_t fNumCharsForLength;
131 }; 129 };
132 130
133 struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UCh ar *value, int32_t len, const struct UString* comment, UErrorCode *status); 131 struct SResource *string_open(struct SRBRoot *bundle, const char *tag, const UCh ar *value, int32_t len, const struct UString* comment, UErrorCode *status);
134 132
135 /**
136 * Remove a string from a bundle and close (delete) it.
137 * The string must not have been added to a table or array yet.
138 * This function only undoes what string_open() did.
139 */
140 void bundle_closeString(struct SRBRoot *bundle, struct SResource *string);
141
142 struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *val ue, int32_t len, const struct UString* comment, UErrorCode *status); 133 struct SResource *alias_open(struct SRBRoot *bundle, const char *tag, UChar *val ue, int32_t len, const struct UString* comment, UErrorCode *status);
143 134
144 struct SResIntVector { 135 struct SResIntVector {
145 uint32_t fCount; 136 uint32_t fCount;
146 uint32_t *fArray; 137 uint32_t *fArray;
147 }; 138 };
148 139
149 struct SResource* intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status); 140 struct SResource* intvector_open(struct SRBRoot *bundle, const char *tag, const struct UString* comment, UErrorCode *status);
150 void intvector_add(struct SResource *intvector, int32_t value, UErrorCode *statu s); 141 void intvector_add(struct SResource *intvector, int32_t value, UErrorCode *statu s);
151 142
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 184
194 void setFormatVersion(int32_t formatVersion); 185 void setFormatVersion(int32_t formatVersion);
195 186
196 void setUsePoolBundle(UBool use); 187 void setUsePoolBundle(UBool use);
197 188
198 /* in wrtxml.cpp */ 189 /* in wrtxml.cpp */
199 uint32_t computeCRC(char *ptr, uint32_t len, uint32_t lastcrc); 190 uint32_t computeCRC(char *ptr, uint32_t len, uint32_t lastcrc);
200 191
201 U_CDECL_END 192 U_CDECL_END
202 #endif /* #ifndef RESLIST_H */ 193 #endif /* #ifndef RESLIST_H */
OLDNEW
« no previous file with comments | « source/tools/genrb/prscmnts.cpp ('k') | source/tools/genrb/reslist.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698