diff --git a/tools/unicode/c/genprops/bidipropsbuilder.cpp b/tools/unicode/c/genprops/bidipropsbuilder.cpp index a2b4499f2f7..90d1cd634ef 100644 --- a/tools/unicode/c/genprops/bidipropsbuilder.cpp +++ b/tools/unicode/c/genprops/bidipropsbuilder.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2004-2014, International Business Machines +* Copyright (C) 2004-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -504,9 +504,7 @@ BiDiPropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { errorCode=U_FILE_ACCESS_ERROR; return; } - fputs("#ifndef INCLUDED_FROM_UBIDI_PROPS_C\n" - "# error This file must be #included from ubidi_props.c only.\n" - "#endif\n\n", f); + fputs("#ifdef INCLUDED_FROM_UBIDI_PROPS_C\n\n", f); usrc_writeArray(f, "static const UVersionInfo ubidi_props_dataVersion={", dataInfo.dataVersion, 8, 4, @@ -548,7 +546,8 @@ BiDiPropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { pTrie, "ubidi_props_trieIndex", NULL, " },\n"); usrc_writeArray(f, " { ", dataInfo.formatVersion, 8, 4, " }\n"); - fputs("};\n", f); + fputs("};\n\n" + "#endif // INCLUDED_FROM_UBIDI_PROPS_C\n", f); fclose(f); } diff --git a/tools/unicode/c/genprops/casepropsbuilder.cpp b/tools/unicode/c/genprops/casepropsbuilder.cpp index ab438991537..5cf99bfac41 100644 --- a/tools/unicode/c/genprops/casepropsbuilder.cpp +++ b/tools/unicode/c/genprops/casepropsbuilder.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2004-2015, International Business Machines +* Copyright (C) 2004-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -1122,9 +1122,7 @@ CasePropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { errorCode=U_FILE_ACCESS_ERROR; return; } - fputs("#ifndef INCLUDED_FROM_UCASE_CPP\n" - "# error This file must be #included from ucase.cpp only.\n" - "#endif\n\n", f); + fputs("#ifdef INCLUDED_FROM_UCASE_CPP\n\n", f); usrc_writeArray(f, "static const UVersionInfo ucase_props_dataVersion={", dataInfo.dataVersion, 8, 4, @@ -1157,7 +1155,8 @@ CasePropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { pTrie, "ucase_props_trieIndex", NULL, " },\n"); usrc_writeArray(f, " { ", dataInfo.formatVersion, 8, 4, " }\n"); - fputs("};\n", f); + fputs("};\n\n" + "#endif // INCLUDED_FROM_UCASE_CPP\n", f); fclose(f); } diff --git a/tools/unicode/c/genprops/corepropsbuilder.cpp b/tools/unicode/c/genprops/corepropsbuilder.cpp index 26b254ad19f..bf9e268b07b 100644 --- a/tools/unicode/c/genprops/corepropsbuilder.cpp +++ b/tools/unicode/c/genprops/corepropsbuilder.cpp @@ -771,9 +771,7 @@ CorePropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { errorCode=U_FILE_ACCESS_ERROR; return; } - fputs("#ifndef INCLUDED_FROM_UCHAR_C\n" - "# error This file must be #included from uchar.c only.\n" - "#endif\n\n", f); + fputs("#ifdef INCLUDED_FROM_UCHAR_C\n\n", f); usrc_writeArray(f, "static const UVersionInfo dataVersion={", dataInfo.dataVersion, 8, 4, @@ -812,6 +810,7 @@ CorePropsBuilder::writeCSourceFile(const char *path, UErrorCode &errorCode) { "static const int32_t indexes[UPROPS_INDEX_COUNT]={", indexes, 32, UPROPS_INDEX_COUNT, "};\n\n"); + fputs("#endif // INCLUDED_FROM_UCHAR_C\n", f); fclose(f); } diff --git a/tools/unicode/c/genprops/pnames_data.h b/tools/unicode/c/genprops/pnames_data.h index fca71f9e383..da651fdccd6 100644 --- a/tools/unicode/c/genprops/pnames_data.h +++ b/tools/unicode/c/genprops/pnames_data.h @@ -575,7 +575,7 @@ static const Value VALUES_nt[4] = { Value(U_NT_NUMERIC, "Nu Numeric"), }; -static const Value VALUES_sc[167] = { +static const Value VALUES_sc[175] = { Value(USCRIPT_COMMON, "Zyyy Common"), Value(USCRIPT_INHERITED, "Zinh Inherited Qaai"), Value(USCRIPT_ARABIC, "Arab Arabic"), @@ -743,6 +743,14 @@ static const Value VALUES_sc[167] = { Value(USCRIPT_MULTANI, "Mult Multani"), Value(USCRIPT_PAU_CIN_HAU, "Pauc Pau_Cin_Hau"), Value(USCRIPT_SIDDHAM, "Sidd Siddham"), + Value(USCRIPT_ADLAM, "Adlm Adlam"), + Value(USCRIPT_BHAIKSUKI, "Bhks Bhaiksuki"), + Value(USCRIPT_MARCHEN, "Marc Marchen"), + Value(USCRIPT_NEWA, "Newa Newa"), + Value(USCRIPT_OSAGE, "Osge Osage"), + Value(USCRIPT_HAN_WITH_BOPOMOFO, "Hanb Hanb"), + Value(USCRIPT_JAMO, "Jamo Jamo"), + Value(USCRIPT_SYMBOLS_EMOJI, "Zsye Zsye"), }; static const Value VALUES_hst[6] = { @@ -1069,7 +1077,7 @@ static const Property PROPERTIES[100] = { Property(UCHAR_JOINING_TYPE, "jt Joining_Type", VALUES_jt, 6), Property(UCHAR_LINE_BREAK, "lb Line_Break", VALUES_lb, 40), Property(UCHAR_NUMERIC_TYPE, "nt Numeric_Type", VALUES_nt, 4), - Property(UCHAR_SCRIPT, "sc Script", VALUES_sc, 167), + Property(UCHAR_SCRIPT, "sc Script", VALUES_sc, 175), Property(UCHAR_HANGUL_SYLLABLE_TYPE, "hst Hangul_Syllable_Type", VALUES_hst, 6), Property(UCHAR_NFD_QUICK_CHECK, "NFD_QC NFD_Quick_Check", VALUES_NFD_QC, 2), Property(UCHAR_NFKD_QUICK_CHECK, "NFKD_QC NFKD_Quick_Check", VALUES_NFKD_QC, 2), diff --git a/tools/unicode/c/genprops/pnamesbuilder.cpp b/tools/unicode/c/genprops/pnamesbuilder.cpp index f838087cc33..a3afe9ef9b0 100644 --- a/tools/unicode/c/genprops/pnamesbuilder.cpp +++ b/tools/unicode/c/genprops/pnamesbuilder.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002-2012, International Business Machines +* Copyright (C) 2002-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * Date Name Description @@ -494,11 +494,8 @@ PNamesBuilderImpl::writeCSourceFile(const char *path, UErrorCode &errorCode) { return; } - fputs("#ifndef INCLUDED_FROM_PROPNAME_CPP\n" - "# error This file must be #included from propname.cpp only.\n" - "#endif\n\n", f); - - fputs("U_NAMESPACE_BEGIN\n\n", f); + fputs("#ifdef INCLUDED_FROM_PROPNAME_CPP\n\n" + "U_NAMESPACE_BEGIN\n\n", f); usrc_writeArray(f, "const int32_t PropNameData::indexes[%ld]={", indexes, 32, PropNameData::IX_COUNT, @@ -514,7 +511,8 @@ PNamesBuilderImpl::writeCSourceFile(const char *path, UErrorCode &errorCode) { nameGroups.data(), nameGroups.length(), "\n};\n\n"); - fputs("U_NAMESPACE_END\n", f); + fputs("U_NAMESPACE_END\n\n" + "#endif // INCLUDED_FROM_PROPNAME_CPP\n", f); fclose(f); }