diff options
author | Karl Berry <karl@freefriends.org> | 2016-03-27 17:16:39 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-03-27 17:16:39 +0000 |
commit | 46133be58cca10fe420003f25e1a301d8bda6192 (patch) | |
tree | 0b0299934291f13c12eba2c11cd1ac33911b1224 /Build/source/libs/icu/icu-src/source/tools | |
parent | d96bcc9a2e41bd962e65f3026384837a9bd44734 (diff) |
import icu-57.1 (unmodified, TL patches coming next)
git-svn-id: svn://tug.org/texlive/trunk@40154 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu/icu-src/source/tools')
30 files changed, 131 insertions, 103 deletions
diff --git a/Build/source/libs/icu/icu-src/source/tools/ctestfw/ctestfw.vcxproj b/Build/source/libs/icu/icu-src/source/tools/ctestfw/ctestfw.vcxproj index c6c01fe80d5..555fa77ce7a 100644 --- a/Build/source/libs/icu/icu-src/source/tools/ctestfw/ctestfw.vcxproj +++ b/Build/source/libs/icu/icu-src/source/tools/ctestfw/ctestfw.vcxproj @@ -107,7 +107,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin\icutest55.dll</OutputFile> + <OutputFile>..\..\..\bin\icutest57.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <ProgramDatabaseFile>.\..\..\..\lib\icutest.pdb</ProgramDatabaseFile> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -150,7 +150,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin\icutest55d.dll</OutputFile> + <OutputFile>..\..\..\bin\icutest57d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>.\..\..\..\lib\icutestd.pdb</ProgramDatabaseFile> @@ -190,7 +190,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin64\icutest55.dll</OutputFile> + <OutputFile>..\..\..\bin64\icutest57.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <ProgramDatabaseFile>.\..\..\..\lib64\icutest.pdb</ProgramDatabaseFile> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -231,7 +231,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin64\icutest55d.dll</OutputFile> + <OutputFile>..\..\..\bin64\icutest57d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>.\..\..\..\lib64\icutestd.pdb</ProgramDatabaseFile> @@ -242,19 +242,17 @@ <ItemGroup> <ClCompile Include="ctest.c" /> <ClCompile Include="datamap.cpp" /> - <ClCompile Include="testdata.cpp" /> - <ClCompile Include="tstdtmod.cpp" /> + <ClCompile Include="testdata.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> + <ClCompile Include="tstdtmod.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ClCompile Include="ucln_ct.c"> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> <ClCompile Include="uperf.cpp"> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> </ItemGroup> <ItemGroup> diff --git a/Build/source/libs/icu/icu-src/source/tools/ctestfw/unicode/utimer.h b/Build/source/libs/icu/icu-src/source/tools/ctestfw/unicode/utimer.h index 7e42097dc5d..605158b05ba 100644 --- a/Build/source/libs/icu/icu-src/source/tools/ctestfw/unicode/utimer.h +++ b/Build/source/libs/icu/icu-src/source/tools/ctestfw/unicode/utimer.h @@ -10,7 +10,7 @@ #include "unicode/utypes.h" -#if U_PLATFORM_USES_ONLY_WIN32_API +#if U_PLATFORM_HAS_WIN32_API # define VC_EXTRALEAN # define WIN32_LEAN_AND_MEAN # include <windows.h> @@ -160,7 +160,7 @@ typedef struct UTimer UTimer; typedef void FuntionToBeTimed(void* param); -#if U_PLATFORM_USES_ONLY_WIN32_API +#if U_PLATFORM_HAS_WIN32_API struct UTimer{ LARGE_INTEGER start; diff --git a/Build/source/libs/icu/icu-src/source/tools/genbrk/genbrk.cpp b/Build/source/libs/icu/icu-src/source/tools/genbrk/genbrk.cpp index 789d2ed12ab..290b2e7d70a 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genbrk/genbrk.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/genbrk/genbrk.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002-2015, International Business Machines +* Copyright (C) 2002-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -138,7 +138,7 @@ int main(int argc, char **argv) { // U_MAIN_INIT_ARGS(argc, argv); progName = argv[0]; - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); if(argc<0) { // Unrecognized option fprintf(stderr, "error in command line argument \"%s\"\n", argv[-argc]); diff --git a/Build/source/libs/icu/icu-src/source/tools/genccode/genccode.c b/Build/source/libs/icu/icu-src/source/tools/genccode/genccode.c index 3950ef57747..58f5c2e8e0a 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genccode/genccode.c +++ b/Build/source/libs/icu/icu-src/source/tools/genccode/genccode.c @@ -1,6 +1,6 @@ /* ******************************************************************************* - * Copyright (C) 1999-2013, International Business Machines + * Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: gennames.c @@ -98,7 +98,7 @@ main(int argc, char* argv[]) { options[kOptDestDir].value = "."; /* read command line options */ - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/gencfu/gencfu.cpp b/Build/source/libs/icu/icu-src/source/tools/gencfu/gencfu.cpp index 0942f854651..74d89d9b9e4 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gencfu/gencfu.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/gencfu/gencfu.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2009-2015, International Business Machines +* Copyright (C) 2009-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -142,7 +142,7 @@ int main(int argc, char **argv) { // U_MAIN_INIT_ARGS(argc, argv); progName = argv[0]; - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); if(argc<0) { // Unrecognized option fprintf(stderr, "error in command line argument \"%s\"\n", argv[-argc]); diff --git a/Build/source/libs/icu/icu-src/source/tools/gencmn/gencmn.c b/Build/source/libs/icu/icu-src/source/tools/gencmn/gencmn.c index 8323ec4ed8a..a6498ce6a97 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gencmn/gencmn.c +++ b/Build/source/libs/icu/icu-src/source/tools/gencmn/gencmn.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2008, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -53,7 +53,7 @@ main(int argc, char* argv[]) { U_MAIN_INIT_ARGS(argc, argv); /* preset then read command line options */ - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/gencnval/gencnval.c b/Build/source/libs/icu/icu-src/source/tools/gencnval/gencnval.c index 4f5da6a8d29..adee18352b1 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gencnval/gencnval.c +++ b/Build/source/libs/icu/icu-src/source/tools/gencnval/gencnval.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2015 International Business Machines +* Copyright (C) 1999-2016 International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -230,7 +230,7 @@ main(int argc, char* argv[]) { /* preset then read command line options */ options[DESTDIR].value=options[SOURCEDIR].value=u_getDataDirectory(); - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/gencolusb/extract_unsafe_backwards.cpp b/Build/source/libs/icu/icu-src/source/tools/gencolusb/extract_unsafe_backwards.cpp index 72e55c69565..44dcaefc609 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gencolusb/extract_unsafe_backwards.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/gencolusb/extract_unsafe_backwards.cpp @@ -1,5 +1,5 @@ /** - * Copyright (c) 1999-2015, International Business Machines Corporation and + * Copyright (c) 1999-2016, International Business Machines Corporation and * others. All Rights Reserved. * * Generator for source/i18n/collunsafe.h @@ -106,6 +106,8 @@ int main(int argc, const char *argv[]) { printf("#ifndef COLLUNSAFE_H\n" "#define COLLUNSAFE_H\n" "\n" + "#include \"unicode/utypes.h\"\n" + "\n" "#define COLLUNSAFE_ICU_VERSION \"" U_ICU_VERSION "\"\n"); printf("#define COLLUNSAFE_COLL_VERSION \"%s\"\n", verString); diff --git a/Build/source/libs/icu/icu-src/source/tools/gendict/gendict.cpp b/Build/source/libs/icu/icu-src/source/tools/gendict/gendict.cpp index 18d6debe921..0b8b7260365 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gendict/gendict.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/gendict/gendict.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002-2015, International Business Machines +* Copyright (C) 2002-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * @@ -245,7 +245,7 @@ int main(int argc, char **argv) { // U_MAIN_INIT_ARGS(argc, argv); progName = argv[0]; - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); if(argc<0) { // Unrecognized option fprintf(stderr, "error in command line argument \"%s\"\n", argv[-argc]); diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/derb.cpp b/Build/source/libs/icu/icu-src/source/tools/genrb/derb.cpp index e3367750d44..3d2507bc14e 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/derb.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/derb.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2015, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -204,7 +204,7 @@ main(int argc, char* argv[]) { UBool fromICUData = !uprv_strcmp(inputDir, "-"); if (!fromICUData) { UBool absfilename = *arg == U_FILE_SEP_CHAR; -#if U_PLATFORM_HAS_WIN32_API && U_PLATFORM != U_PF_CYGWIN +#if U_PLATFORM_HAS_WIN32_API if (!absfilename) { absfilename = (uprv_strlen(arg) > 2 && isalpha(arg[0]) && arg[1] == ':' && arg[2] == U_FILE_SEP_CHAR); @@ -342,7 +342,7 @@ static UChar *quotedString(const UChar *string) { case 0x0022: *np++ = 0x005C; - + U_FALLTHROUGH; default: *np++ = *sp; break; diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/errmsg.h b/Build/source/libs/icu/icu-src/source/tools/genrb/errmsg.h index 190a61ebe17..19dfee8d858 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/errmsg.h +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/errmsg.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,6 +18,8 @@ #ifndef ERROR_H #define ERROR_H 1 +#include "unicode/utypes.h" + U_CDECL_BEGIN extern const char *gCurrentFileName; diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.cpp b/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.cpp index 720ace6183e..50e9bfd02e9 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2015, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -22,6 +22,7 @@ #include "unicode/uclean.h" #include "unicode/utf16.h" #include "charstr.h" +#include "cmemory.h" #include "reslist.h" #include "ucmndata.h" /* TODO: for reading the pool bundle */ @@ -126,7 +127,7 @@ main(int argc, options[JAVA_PACKAGE].value = "com.ibm.icu.impl.data"; options[BUNDLE_NAME].value = "LocaleElements"; - argc = u_parseArgs(argc, argv, (int32_t)(sizeof(options)/sizeof(options[0])), options); + argc = u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.vcxproj b/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.vcxproj index 3131325ff00..3d242bb8224 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.vcxproj +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/genrb.vcxproj @@ -243,14 +243,22 @@ <ClCompile Include="parse.cpp"> <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> - <ClCompile Include="prscmnts.cpp" /> + <ClCompile Include="prscmnts.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ClCompile Include="rbutil.c" /> <ClCompile Include="read.c" /> - <ClCompile Include="reslist.cpp" /> + <ClCompile Include="reslist.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ClCompile Include="rle.c" /> <ClCompile Include="ustr.c" /> - <ClCompile Include="wrtjava.cpp" /> - <ClCompile Include="wrtxml.cpp" /> + <ClCompile Include="wrtjava.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> + <ClCompile Include="wrtxml.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="errmsg.h" /> diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/prscmnts.h b/Build/source/libs/icu/icu-src/source/tools/genrb/prscmnts.h index c4f27054567..35dd9e92d29 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/prscmnts.h +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/prscmnts.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2003, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -19,6 +19,8 @@ #ifndef PRSCMNTS_H #define PRSCMNTS_H 1 +#include "unicode/utypes.h" + #if UCONFIG_NO_REGULAR_EXPRESSIONS==0 /* donot compile when no RegularExpressions are available */ enum UParseCommentsOption { diff --git a/Build/source/libs/icu/icu-src/source/tools/genrb/rbutil.h b/Build/source/libs/icu/icu-src/source/tools/genrb/rbutil.h index b059bfa00d4..3f055a848c8 100644 --- a/Build/source/libs/icu/icu-src/source/tools/genrb/rbutil.h +++ b/Build/source/libs/icu/icu-src/source/tools/genrb/rbutil.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2005, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,11 +18,14 @@ #ifndef UTIL_H #define UTIL_H 1 +#include "unicode/utypes.h" + U_CDECL_BEGIN void get_dirname(char *dirname, const char *filename); void get_basename(char *basename, const char *filename); int32_t itostr(char * buffer, int32_t i, uint32_t radix, int32_t pad); + U_CDECL_END -#endif /* ! UTIL_H */ +#endif /* ! UTIL_H */ diff --git a/Build/source/libs/icu/icu-src/source/tools/gensprep/gensprep.c b/Build/source/libs/icu/icu-src/source/tools/gensprep/gensprep.c index 94ba08d89b9..dd1d9bdea93 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gensprep/gensprep.c +++ b/Build/source/libs/icu/icu-src/source/tools/gensprep/gensprep.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2003-2012, International Business Machines +* Copyright (C) 2003-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -153,7 +153,7 @@ main(int argc, char* argv[]) { options[BUNDLE_NAME].value = DATA_NAME; options[NORMALIZE].value = ""; - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/gentest/gentest.c b/Build/source/libs/icu/icu-src/source/tools/gentest/gentest.c index 0cf44c87319..62e66d295bd 100644 --- a/Build/source/libs/icu/icu-src/source/tools/gentest/gentest.c +++ b/Build/source/libs/icu/icu-src/source/tools/gentest/gentest.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2010, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -66,7 +66,7 @@ main(int argc, char* argv[]) { /* preset then read command line options */ options[2].value=u_getDataDirectory(); - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/icuinfo/icuinfo.cpp b/Build/source/libs/icu/icu-src/source/tools/icuinfo/icuinfo.cpp index 003b0bde507..cfb7e97e46d 100644 --- a/Build/source/libs/icu/icu-src/source/tools/icuinfo/icuinfo.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/icuinfo/icuinfo.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1999-2015, International Business Machines +* Copyright (C) 1999-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -217,7 +217,7 @@ main(int argc, char* argv[]) { UBool didSomething = FALSE; /* preset then read command line options */ - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ if(argc<0) { diff --git a/Build/source/libs/icu/icu-src/source/tools/makeconv/genmbcs.cpp b/Build/source/libs/icu/icu-src/source/tools/makeconv/genmbcs.cpp index e3c78dec494..61a346e1a4b 100644 --- a/Build/source/libs/icu/icu-src/source/tools/makeconv/genmbcs.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/makeconv/genmbcs.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2000-2013, International Business Machines +* Copyright (C) 2000-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -831,10 +831,13 @@ MBCSAddFromUnicode(MBCSData *mbcsData, switch(length) { case 4: b=*pb++; + U_FALLTHROUGH; case 3: b=(b<<8)|*pb++; + U_FALLTHROUGH; case 2: b=(b<<8)|*pb++; + U_FALLTHROUGH; case 1: default: b=(b<<8)|*pb++; @@ -1011,6 +1014,7 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati case -1: /* there was no precision/fallback indicator */ /* fall through to set the mappings */ + U_FALLTHROUGH; case 0: /* set roundtrip mappings */ isOK&=MBCSAddToUnicode(mbcsData, m->b.bytes, m->bLen, c, f); diff --git a/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp b/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp index 03304ba74cc..8b99f75b020 100644 --- a/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgdata.cpp @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2000-2015, International Business Machines + * Copyright (C) 2000-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* * file name: pkgdata.cpp @@ -274,7 +274,7 @@ main(int argc, char* argv[]) { options[MODE].value = "common"; /* read command line options */ - argc=u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); /* error handling, printing usage message */ /* I've decided to simply print an error and quit. This tool has too @@ -332,7 +332,7 @@ main(int argc, char* argv[]) { progname); fprintf(stderr, "\n options:\n"); - for(i=0;i<(sizeof(options)/sizeof(options[0]));i++) { + for(i=0;i<UPRV_LENGTHOF(options);i++) { fprintf(stderr, "%-5s -%c %s%-10s %s\n", (i<1?"[REQ]":""), options[i].shortName, @@ -342,7 +342,7 @@ main(int argc, char* argv[]) { } fprintf(stderr, "modes: (-m option)\n"); - for(i=0;i<(sizeof(modes)/sizeof(modes[0]));i++) { + for(i=0;i<UPRV_LENGTHOF(modes);i++) { fprintf(stderr, " %-9s ", modes[i].name); if (modes[i].alt_name) { fprintf(stderr, "/ %-9s", modes[i].alt_name); diff --git a/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgtypes.c b/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgtypes.c index 2769e453821..c8e08c2e828 100644 --- a/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgtypes.c +++ b/Build/source/libs/icu/icu-src/source/tools/pkgdata/pkgtypes.c @@ -1,6 +1,6 @@ /************************************************************************** * -* Copyright (C) 2000-2011, International Business Machines +* Copyright (C) 2000-2016, International Business Machines * Corporation and others. All Rights Reserved. * *************************************************************************** @@ -223,7 +223,7 @@ CharList *pkg_appendUniqueDirToList(CharList *l, CharList** end, const char *str if(!rPtr) { return l; /* no dir path */ } - if((rPtr-strAlias) >= (sizeof(aBuf)/sizeof(aBuf[0]))) { + if((rPtr-strAlias) >= UPRV_LENGTHOF(aBuf)) { fprintf(stderr, "## ERR: Path too long [%d chars]: %s\n", (int)sizeof(aBuf), strAlias); return l; } diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/flagparser.c b/Build/source/libs/icu/icu-src/source/tools/toolutil/flagparser.c index 554341534b4..fac18e2ffdb 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/flagparser.c +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/flagparser.c @@ -97,7 +97,7 @@ parseFlagsFile_cleanup: T_FileStream_close(f); - if (U_FAILURE(*status)) { + if (U_FAILURE(*status) && *status != U_BUFFER_OVERFLOW_ERROR) { return -1; } diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_genc.c b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_genc.c index 3096db87f87..46c06a7eec2 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_genc.c +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_genc.c @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2009-2015, International Business Machines + * Copyright (C) 2009-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* */ @@ -126,7 +126,7 @@ static const struct AssemblyType { "\t.type %s,%%object\n" "%s:\n\n", - ".long ","",HEX_0X + ".long ",".size %s, .-%s\n",HEX_0X }, {"gcc-darwin", /*"\t.section __TEXT,__text,regular,pure_instructions\n" @@ -232,7 +232,7 @@ U_CAPI UBool U_EXPORT2 checkAssemblyHeaderName(const char* optAssembly) { int32_t idx; assemblyHeaderIndex = -1; - for (idx = 0; idx < (int32_t)(sizeof(assemblyHeader)/sizeof(assemblyHeader[0])); idx++) { + for (idx = 0; idx < UPRV_LENGTHOF(assemblyHeader); idx++) { if (uprv_strcmp(optAssembly, assemblyHeader[idx].name) == 0) { assemblyHeaderIndex = idx; hexType = assemblyHeader[idx].hexType; /* set the hex type */ @@ -248,7 +248,7 @@ U_CAPI void U_EXPORT2 printAssemblyHeadersToStdErr(void) { int32_t idx; fprintf(stderr, "%s", assemblyHeader[0].name); - for (idx = 1; idx < (int32_t)(sizeof(assemblyHeader)/sizeof(assemblyHeader[0])); idx++) { + for (idx = 1; idx < UPRV_LENGTHOF(assemblyHeader); idx++) { fprintf(stderr, ", %s", assemblyHeader[idx].name); } fprintf(stderr, diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_icu.h b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_icu.h index 8451f8d550f..50f3f51c96d 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_icu.h +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_icu.h @@ -1,5 +1,5 @@ /****************************************************************************** - * Copyright (C) 2008-2012, International Business Machines + * Copyright (C) 2008-2016, International Business Machines * Corporation and others. All Rights Reserved. ******************************************************************************* */ @@ -8,6 +8,7 @@ #define __PKG_ICU_H__ #include "unicode/utypes.h" +#include "package.h" #define U_PKG_RESERVED_CHARS "\"%&'()*+,-./:;<=>?_" diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_imp.h b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_imp.h index 0b0c2b740f8..45ddc4c0912 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_imp.h +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/pkg_imp.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2005, International Business Machines +* Copyright (C) 2005-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -20,6 +20,7 @@ #define __PKG_IMP_H__ #include "unicode/utypes.h" +#include "unicode/udata.h" /* * Read an ICU data item with any platform type, diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/toolutil.vcxproj b/Build/source/libs/icu/icu-src/source/tools/toolutil/toolutil.vcxproj index b1d0d70dafb..fd6c26508c3 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/toolutil.vcxproj +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/toolutil.vcxproj @@ -107,7 +107,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin\icutu55.dll</OutputFile> + <OutputFile>..\..\..\bin\icutu57.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>.\..\..\..\lib\icutu.pdb</ProgramDatabaseFile> @@ -151,7 +151,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin\icutu55d.dll</OutputFile> + <OutputFile>..\..\..\bin\icutu57d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -193,7 +193,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin64\icutu55.dll</OutputFile> + <OutputFile>..\..\..\bin64\icutu57.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>.\..\..\..\lib64\icutu.pdb</ProgramDatabaseFile> @@ -235,7 +235,7 @@ <Culture>0x0409</Culture> </ResourceCompile> <Link> - <OutputFile>..\..\..\bin64\icutu55d.dll</OutputFile> + <OutputFile>..\..\..\bin64\icutu57d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <AdditionalLibraryDirectories>..\..\..\lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> @@ -255,36 +255,38 @@ <ClCompile Include="flagparser.c" /> <ClCompile Include="package.cpp" /> <ClCompile Include="pkg_genc.c"> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> <ClCompile Include="pkg_gencmn.c"> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</DisableLanguageExtensions> - <DisableLanguageExtensions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</DisableLanguageExtensions> + <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> <ClCompile Include="pkg_icu.cpp" /> <ClCompile Include="pkgitems.cpp" /> - <ClCompile Include="ppucd.cpp" /> + <ClCompile Include="ppucd.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ClCompile Include="swapimpl.cpp"> <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> <ClCompile Include="toolutil.cpp"> <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> - <ClCompile Include="ucbuf.c" /> + <ClCompile Include="ucbuf.cpp" /> <ClCompile Include="ucm.c" /> <ClCompile Include="ucmstate.c" /> <ClCompile Include="unewdata.c" /> <ClCompile Include="uoptions.c" /> <ClCompile Include="uparse.c" /> <ClCompile Include="writesrc.c" /> - <ClCompile Include="xmlparser.cpp" /> - <ClCompile Include="dbgutil.cpp" /> - <ClCompile Include="udbgutil.cpp" /> + <ClCompile Include="xmlparser.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> + <ClCompile Include="dbgutil.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> + <ClCompile Include="udbgutil.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> + </ClCompile> <ClCompile Include="ucln_tu.cpp"> <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.c b/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.cpp index 93dbba133dc..d1c5c4de827 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.c +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.cpp @@ -1,12 +1,12 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2014, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * -* File ucbuf.c +* File ucbuf.cpp * * Modification History: * @@ -415,7 +415,7 @@ ucbuf_getcx32(UCHARBUF* buf,UErrorCode* error) { /* check if u_unescapeAt unescaped and converted * to c32 or not */ - if(c32==0xFFFFFFFF){ + if(c32==(UChar32)0xFFFFFFFF){ if(buf->showWarning) { char context[CONTEXT_LEN+1]; int32_t len = CONTEXT_LEN; diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.h b/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.h index 37fc783dec8..4cfcee4d7ef 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.h +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/ucbuf.h @@ -1,12 +1,12 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2015, International Business Machines +* Copyright (C) 1998-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* * -* File ucbuf.c +* File ucbuf.h * * Modification History: * @@ -17,6 +17,7 @@ ******************************************************************************* */ +#include "unicode/localpointer.h" #include "unicode/ucnv.h" #include "filestrm.h" @@ -45,11 +46,11 @@ struct ULine { /** * Opens the UCHARBUF with the given file stream and code page for conversion * @param fileName Name of the file to open. - * @param codepage The encoding of the file stream to convert to Unicode. + * @param codepage The encoding of the file stream to convert to Unicode. * If *codepoge is NULL on input the API will try to autodetect * popular Unicode encodings * @param showWarning Flag to print out warnings to STDOUT - * @param buffered If TRUE performs a buffered read of the input file. If FALSE reads + * @param buffered If TRUE performs a buffered read of the input file. If FALSE reads * the whole file into memory and converts it. * @param err is a pointer to a valid <code>UErrorCode</code> value. If this value * indicates a failure on entry, the function will immediately return. @@ -82,7 +83,7 @@ U_CAPI int32_t U_EXPORT2 ucbuf_getc32(UCHARBUF* buf,UErrorCode* err); /** - * Gets a UTF-16 code unit at the current position from the converted buffer after + * Gets a UTF-16 code unit at the current position from the converted buffer after * unescaping and increments the current position. If the escape sequence is for UTF-32 * code point (\\Uxxxxxxxx) then a UTF-32 codepoint is returned * @param buf Pointer to UCHARBUF structure @@ -95,7 +96,7 @@ ucbuf_getcx32(UCHARBUF* buf,UErrorCode* err); /** * Gets a pointer to the current position in the internal buffer and length of the line. - * It imperative to make a copy of the returned buffere before performing operations on it. + * It imperative to make a copy of the returned buffer before performing operations on it. * @param buf Pointer to UCHARBUF structure * @param len Output param to receive the len of the buffer returned till end of the line * @param err is a pointer to a valid <code>UErrorCode</code> value. If this value @@ -141,6 +142,14 @@ ucbuf_close(UCHARBUF* buf); U_NAMESPACE_BEGIN +/** + * \class LocalUCHARBUFPointer + * "Smart pointer" class, closes a UCHARBUF via ucbuf_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + */ U_DEFINE_LOCAL_OPEN_POINTER(LocalUCHARBUFPointer, UCHARBUF, ucbuf_close); U_NAMESPACE_END @@ -155,7 +164,7 @@ ucbuf_ungetc(int32_t ungetChar,UCHARBUF* buf); /** - * Autodetects the encoding of the file stream. Only Unicode charsets are autodectected. + * Autodetects the encoding of the file stream. Only Unicode charsets are autodectected. * Some Unicode charsets are stateful and need byte identifiers to be converted also to bring * the converter to correct state for converting the rest of the stream. So the UConverter parameter * is necessary. @@ -175,7 +184,7 @@ ucbuf_autodetect(const char* fileName, const char** cp,UConverter** conv, int32_t* signatureLength, UErrorCode* status); /** - * Autodetects the encoding of the file stream. Only Unicode charsets are autodectected. + * Autodetects the encoding of the file stream. Only Unicode charsets are autodectected. * Some Unicode charsets are stateful and need byte identifiers to be converted also to bring * the converter to correct state for converting the rest of the stream. So the UConverter parameter * is necessary. diff --git a/Build/source/libs/icu/icu-src/source/tools/toolutil/udbgutil.cpp b/Build/source/libs/icu/icu-src/source/tools/toolutil/udbgutil.cpp index d4e9f3a5ea2..819cbd91150 100644 --- a/Build/source/libs/icu/icu-src/source/tools/toolutil/udbgutil.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/toolutil/udbgutil.cpp @@ -1,12 +1,13 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2007-2015, International Business Machines Corporation and + * Copyright (c) 2007-2016, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ #include "udbgutil.h" #include <string.h> #include "ustr_imp.h" +#include "cmemory.h" #include "cstring.h" #include "putilimp.h" #include "unicode/ulocdata.h" @@ -61,11 +62,6 @@ struct Field { }; /** - * Calculate the size of an array. - */ -#define DBG_ARRAY_COUNT(x) (sizeof(x)/sizeof(x[0])) - -/** * Define another field name. Used in an array of Field s * @param y the common prefix length (i.e. 6 for "USHOE_" ) * @param x the actual enum value - it will be copied in both string and symbolic form. @@ -230,7 +226,7 @@ static const Field names_UDebugEnumType[] = // --- Add new enum types above this line --- -#define COUNT_CASE(x) case UDBG_##x: return (actual?count_##x:DBG_ARRAY_COUNT(names_##x)); +#define COUNT_CASE(x) case UDBG_##x: return (actual?count_##x:UPRV_LENGTHOF(names_##x)); #define COUNT_FAIL_CASE(x) case UDBG_##x: return -1; #define FIELD_CASE(x) case UDBG_##x: return names_##x; @@ -352,10 +348,8 @@ int32_t udbg_enumByName(UDebugEnumType type, const char *value) { */ U_CAPI const char *udbg_getPlatform(void) { -#if U_PLATFORM_USES_ONLY_WIN32_API +#if U_PLATFORM_HAS_WIN32_API return "Windows"; -#elif U_PLATFORM == U_PF_CYGWIN - return "Cygwin"; #elif U_PLATFORM == U_PF_UNKNOWN return "unknown"; #elif U_PLATFORM == U_PF_DARWIN @@ -560,7 +554,7 @@ static const USystemParams systemParams[] = { }; -#define U_SYSPARAM_COUNT (sizeof(systemParams)/sizeof(systemParams[0])) +#define U_SYSPARAM_COUNT UPRV_LENGTHOF(systemParams) U_CAPI const char *udbg_getSystemParameterNameByIndex(int32_t i) { if(i>=0 && i < (int32_t)U_SYSPARAM_COUNT) { diff --git a/Build/source/libs/icu/icu-src/source/tools/tzcode/icuzdump.cpp b/Build/source/libs/icu/icu-src/source/tools/tzcode/icuzdump.cpp index b63e877e940..d635d9b0c5c 100644 --- a/Build/source/libs/icu/icu-src/source/tools/tzcode/icuzdump.cpp +++ b/Build/source/libs/icu/icu-src/source/tools/tzcode/icuzdump.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 2007-2014, International Business Machines +* Copyright (C) 2007-2016, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -34,6 +34,7 @@ #include "unicode/ustream.h" #include "unicode/putil.h" +#include "cmemory.h" #include "uoptions.h" using namespace std; @@ -289,7 +290,7 @@ main(int argc, char *argv[]) { const char *linesep = NULL; U_MAIN_INIT_ARGS(argc, argv); - argc = u_parseArgs(argc, argv, sizeof(options)/sizeof(options[0]), options); + argc = u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options); if (argc < 0) { cerr << "Illegal command line argument(s)" << endl << endl; |