Skip to content

Commit

Permalink
ICU-22270 expose uproperty values in icuexportdata
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth authored and echeran committed Mar 7, 2023
1 parent ea2711d commit 6046af0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions icu4c/source/tools/icuexportdata/icuexportdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ void dumpBinaryProperty(UProperty uproperty, FILE* f) {
fputs("[[binary_property]]\n", f);
fprintf(f, "long_name = \"%s\"\n", fullPropName);
if (shortPropName) fprintf(f, "short_name = \"%s\"\n", shortPropName);
fprintf(f, "uproperty_discr = %X\n", uproperty);
dumpPropertyAliases(uproperty, f);
usrc_writeUnicodeSet(f, uset, UPRV_TARGET_SYNTAX_TOML);
}
Expand Down Expand Up @@ -216,6 +217,7 @@ void dumpEnumeratedProperty(UProperty uproperty, FILE* f) {
fputs("[[enum_property]]\n", f);
fprintf(f, "long_name = \"%s\"\n", fullPropName);
if (shortPropName) fprintf(f, "short_name = \"%s\"\n", shortPropName);
fprintf(f, "uproperty_discr = 0x%X\n", uproperty);
dumpPropertyAliases(uproperty, f);

int32_t minValue = u_getIntPropertyMinValue(uproperty);
Expand Down Expand Up @@ -268,6 +270,7 @@ void dumpGeneralCategoryMask(FILE* f) {
const char* shortPropName = u_getPropertyName(uproperty, U_SHORT_PROPERTY_NAME);
fprintf(f, "long_name = \"%s\"\n", fullPropName);
if (shortPropName) fprintf(f, "short_name = \"%s\"\n", shortPropName);
fprintf(f, "uproperty_discr = 0x%X\n", uproperty);
dumpPropertyAliases(uproperty, f);


Expand Down Expand Up @@ -303,6 +306,7 @@ void dumpScriptExtensions(FILE* f) {
const char* scxShortPropName = u_getPropertyName(UCHAR_SCRIPT_EXTENSIONS, U_SHORT_PROPERTY_NAME);
fprintf(f, "long_name = \"%s\"\n", scxFullPropName);
if (scxShortPropName) fprintf(f, "short_name = \"%s\"\n", scxShortPropName);
fprintf(f, "uproperty_discr = 0x%X\n", UCHAR_SCRIPT_EXTENSIONS);
dumpPropertyAliases(UCHAR_SCRIPT_EXTENSIONS, f);

// We want to use 16 bits for our exported trie of sc/scx data because we
Expand Down

0 comments on commit 6046af0

Please sign in to comment.