diff options
author | ccornelius <ccornelius@google.com> | 2014-11-20 18:09:39 -0800 |
---|---|---|
committer | Narayan Kamath <narayan@google.com> | 2014-11-21 10:44:09 +0000 |
commit | f9878a236aa0d9662d8e40cafdaf2e04cd615835 (patch) | |
tree | b406ecbfd36b2e7ff6f597f813290262a76e9f48 /icu4c/source/io | |
parent | a1ba4c3899ccd14bfdd9a53b12a67977a2cc321e (diff) | |
download | android_external_icu-f9878a236aa0d9662d8e40cafdaf2e04cd615835.tar.gz android_external_icu-f9878a236aa0d9662d8e40cafdaf2e04cd615835.tar.bz2 android_external_icu-f9878a236aa0d9662d8e40cafdaf2e04cd615835.zip |
Update ICU4C/CLDR to versions 54.1/26.
Failing test summary:
| *** FAILING TEST SUMMARY FOR: intltest
TestCanonicalID
TimeZoneTest
TestTimeRoundTrip
TimeZoneFormatTest
format
| *** END FAILING TEST SUMMARY FOR: intltest
-----------
ALL TESTS SUMMARY:
ok: testdata iotest cintltst letest
===== ERRS: intltest
Change-Id: I91c82ef1042905bb6454a30c6973b4573da56f77
Diffstat (limited to 'icu4c/source/io')
-rw-r--r-- | icu4c/source/io/io.vcxproj | 17 | ||||
-rw-r--r-- | icu4c/source/io/io.vcxproj.filters | 6 | ||||
-rw-r--r-- | icu4c/source/io/locbund.cpp | 4 | ||||
-rw-r--r-- | icu4c/source/io/sprintf.c | 4 | ||||
-rw-r--r-- | icu4c/source/io/sscanf.c | 4 | ||||
-rw-r--r-- | icu4c/source/io/ucln_io.cpp | 69 | ||||
-rw-r--r-- | icu4c/source/io/ufile.c | 36 | ||||
-rw-r--r-- | icu4c/source/io/ufile.h | 6 | ||||
-rw-r--r-- | icu4c/source/io/ufmt_cmn.c | 6 | ||||
-rw-r--r-- | icu4c/source/io/unicode/ustdio.h | 29 | ||||
-rw-r--r-- | icu4c/source/io/unicode/ustream.h | 3 | ||||
-rw-r--r-- | icu4c/source/io/uprintf.cpp | 217 | ||||
-rw-r--r-- | icu4c/source/io/uprntf_p.c | 4 | ||||
-rw-r--r-- | icu4c/source/io/uscanf.c | 4 | ||||
-rw-r--r-- | icu4c/source/io/uscanf.h | 4 | ||||
-rw-r--r-- | icu4c/source/io/uscanf_p.c | 4 | ||||
-rw-r--r-- | icu4c/source/io/ustdio.c | 6 | ||||
-rw-r--r-- | icu4c/source/io/ustream.cpp | 6 |
18 files changed, 397 insertions, 32 deletions
diff --git a/icu4c/source/io/io.vcxproj b/icu4c/source/io/io.vcxproj index 415d78e95..2e0d542be 100644 --- a/icu4c/source/io/io.vcxproj +++ b/icu4c/source/io/io.vcxproj @@ -107,7 +107,7 @@ <AdditionalIncludeDirectories>..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <OutputFile>..\..\bin\icuio53.dll</OutputFile> + <OutputFile>..\..\bin\icuio54.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <ProgramDatabaseFile>.\..\..\lib\icuio.pdb</ProgramDatabaseFile> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -151,7 +151,7 @@ <AdditionalIncludeDirectories>..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <OutputFile>..\..\bin\icuio53d.dll</OutputFile> + <OutputFile>..\..\bin\icuio54d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>.\..\..\lib\icuiod.pdb</ProgramDatabaseFile> @@ -192,7 +192,7 @@ <AdditionalIncludeDirectories>..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <OutputFile>..\..\bin64\icuio53.dll</OutputFile> + <OutputFile>..\..\bin64\icuio54.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <ProgramDatabaseFile>.\..\..\lib64\icuio.pdb</ProgramDatabaseFile> <EnableCOMDATFolding>true</EnableCOMDATFolding> @@ -234,7 +234,7 @@ <AdditionalIncludeDirectories>..\common;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Link> - <OutputFile>..\..\bin64\icuio53d.dll</OutputFile> + <OutputFile>..\..\bin64\icuio54d.dll</OutputFile> <SuppressStartupBanner>true</SuppressStartupBanner> <GenerateDebugInformation>true</GenerateDebugInformation> <ProgramDatabaseFile>.\..\..\lib64\icuiod.pdb</ProgramDatabaseFile> @@ -247,15 +247,12 @@ <ClCompile Include="locbund.cpp" /> <ClCompile Include="sprintf.c" /> <ClCompile Include="sscanf.c" /> - <ClCompile Include="ucln_io.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> + <ClCompile Include="ucln_io.cpp"> + <DisableLanguageExtensions>false</DisableLanguageExtensions> </ClCompile> <ClCompile Include="ufile.c" /> <ClCompile Include="ufmt_cmn.c" /> - <ClCompile Include="uprintf.c" /> + <ClCompile Include="uprintf.cpp" /> <ClCompile Include="uprntf_p.c" /> <ClCompile Include="uscanf.c" /> <ClCompile Include="uscanf_p.c" /> diff --git a/icu4c/source/io/io.vcxproj.filters b/icu4c/source/io/io.vcxproj.filters index d82a19119..61252bff3 100644 --- a/icu4c/source/io/io.vcxproj.filters +++ b/icu4c/source/io/io.vcxproj.filters @@ -24,7 +24,7 @@ <ClCompile Include="sscanf.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="ucln_io.c"> + <ClCompile Include="ucln_io.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="ufile.c"> @@ -33,7 +33,7 @@ <ClCompile Include="ufmt_cmn.c"> <Filter>Source Files</Filter> </ClCompile> - <ClCompile Include="uprintf.c"> + <ClCompile Include="uprintf.cpp"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="uprntf_p.c"> @@ -85,4 +85,4 @@ <Filter>Header Files</Filter> </CustomBuild> </ItemGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/icu4c/source/io/locbund.cpp b/icu4c/source/io/locbund.cpp index ddf81679d..594ecc3b0 100644 --- a/icu4c/source/io/locbund.cpp +++ b/icu4c/source/io/locbund.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2013, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "locbund.h" diff --git a/icu4c/source/io/sprintf.c b/icu4c/source/io/sprintf.c index 91d29c56f..9f86e2548 100644 --- a/icu4c/source/io/sprintf.c +++ b/icu4c/source/io/sprintf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2001-2008, International Business Machines +* Copyright (C) 2001-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -20,7 +20,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustdio.h" #include "unicode/ustring.h" diff --git a/icu4c/source/io/sscanf.c b/icu4c/source/io/sscanf.c index eb0bedfb8..ffc850c84 100644 --- a/icu4c/source/io/sscanf.c +++ b/icu4c/source/io/sscanf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 2000-2004, International Business Machines +* Copyright (C) 2000-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -17,7 +17,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/putil.h" #include "unicode/ustdio.h" diff --git a/icu4c/source/io/ucln_io.cpp b/icu4c/source/io/ucln_io.cpp new file mode 100644 index 000000000..1775d5c50 --- /dev/null +++ b/icu4c/source/io/ucln_io.cpp @@ -0,0 +1,69 @@ +/* +****************************************************************************** +* * +* Copyright (C) 2001-2014, International Business Machines * +* Corporation and others. All Rights Reserved. * +* * +****************************************************************************** +* file name: ucln_io.cpp +* encoding: US-ASCII +* tab size: 8 (not used) +* indentation:4 +* +* created on: 2006August11 +* created by: George Rhoten +*/ + +#include "mutex.h" +#include "ucln.h" +#include "ucln_io.h" +#include "uassert.h" + +#ifndef U_IO_IMPLEMENTATION +#error U_IO_IMPLEMENTATION not set - must be set for all ICU source files in io/ - see http://userguide.icu-project.org/howtouseicu +#endif + + +/** Auto-client */ +#define UCLN_TYPE UCLN_IO +#include "ucln_imp.h" + +/* Leave this copyright notice here! It needs to go somewhere in this library. */ +static const char copyright[] = U_COPYRIGHT_STRING; + +static cleanupFunc *gCleanupFunctions[UCLN_IO_COUNT]; + +static UBool io_cleanup(void) +{ + int32_t libType = UCLN_IO_START; + + (void)copyright; // Suppress unused variable warning. + while (++libType<UCLN_IO_COUNT) { + if (gCleanupFunctions[libType]) + { + gCleanupFunctions[libType](); + gCleanupFunctions[libType] = NULL; + } + } +#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL)) + ucln_unRegisterAutomaticCleanup(); +#endif + return TRUE; +} + +void ucln_io_registerCleanup(ECleanupIOType type, + cleanupFunc *func) { + U_ASSERT(UCLN_IO_START < type && type < UCLN_IO_COUNT); + { + icu::Mutex m; // See ticket 10295 for discussion. + ucln_registerCleanup(UCLN_IO, io_cleanup); + if (UCLN_IO_START < type && type < UCLN_IO_COUNT) { + gCleanupFunctions[type] = func; + } + } + +#if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL)) + ucln_registerAutomaticCleanup(); +#endif +} + diff --git a/icu4c/source/io/ufile.c b/icu4c/source/io/ufile.c index 820071f1b..a8d8f0a3a 100644 --- a/icu4c/source/io/ufile.c +++ b/icu4c/source/io/ufile.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2013, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -27,10 +27,14 @@ #include "locmap.h" #include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + #include "ufile.h" #include "unicode/uloc.h" #include "unicode/ures.h" #include "unicode/ucnv.h" +#include "unicode/ustring.h" #include "cstring.h" #include "cmemory.h" @@ -148,6 +152,35 @@ u_fopen(const char *filename, } U_CAPI UFILE* U_EXPORT2 +u_fopen_u(const UChar *filename, + const char *perm, + const char *locale, + const char *codepage) +{ + UFILE *result; + char buffer[256]; + + u_austrcpy(buffer, filename); + + result = u_fopen(buffer, perm, locale, codepage); +#if U_PLATFORM_USES_ONLY_WIN32_API + /* Try Windows API _wfopen if the above fails. */ + if (!result) { + FILE *systemFile = _wfopen(filename, (UChar*)perm); + if (systemFile) { + result = finit_owner(systemFile, locale, codepage, TRUE); + } + if (!result) { + /* Something bad happened. + Maybe the converter couldn't be opened. */ + fclose(systemFile); + } + } +#endif + return result; /* not a file leak */ +} + +U_CAPI UFILE* U_EXPORT2 u_fstropen(UChar *stringBuf, int32_t capacity, const char *locale) @@ -312,3 +345,4 @@ U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(UFILE *file) } #endif +#endif diff --git a/icu4c/source/io/ufile.h b/icu4c/source/io/ufile.h index 330564291..42be4662c 100644 --- a/icu4c/source/io/ufile.h +++ b/icu4c/source/io/ufile.h @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 1998-2010, International Business Machines + * Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -20,6 +20,9 @@ #define UFILE_H #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/ucnv.h" #include "unicode/utrans.h" #include "locbund.h" @@ -130,3 +133,4 @@ ufile_flush_io(UFILE *f); #endif +#endif diff --git a/icu4c/source/io/ufmt_cmn.c b/icu4c/source/io/ufmt_cmn.c index e4e090339..90eaf8b79 100644 --- a/icu4c/source/io/ufmt_cmn.c +++ b/icu4c/source/io/ufmt_cmn.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2006, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -25,6 +25,9 @@ #include "unicode/ucnv.h" #include "ustr_cnv.h" +#if !UCONFIG_NO_CONVERSION + + #define DIGIT_0 0x0030 #define DIGIT_9 0x0039 #define LOWERCASE_A 0x0061 @@ -251,3 +254,4 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize, } +#endif diff --git a/icu4c/source/io/unicode/ustdio.h b/icu4c/source/io/unicode/ustdio.h index 8fed38df7..16bcf35ee 100644 --- a/icu4c/source/io/unicode/ustdio.h +++ b/icu4c/source/io/unicode/ustdio.h @@ -31,6 +31,8 @@ #include "unicode/localpointer.h" #include "unicode/unum.h" +#if !UCONFIG_NO_CONVERSION + /* TODO The following is a small list as to what is currently wrong/suggestions for @@ -241,6 +243,31 @@ u_fopen(const char *filename, const char *locale, const char *codepage); +#ifndef U_HIDE_DRAFT_API +/** + * Open a UFILE with a UChar* filename + * A UFILE is a wrapper around a FILE* that is locale and codepage aware. + * That is, data written to a UFILE will be formatted using the conventions + * specified by that UFILE's Locale; this data will be in the character set + * specified by that UFILE's codepage. + * @param filename The name of the file to open. + * @param perm The read/write permission for the UFILE; one of "r", "w", "rw" + * @param locale The locale whose conventions will be used to format + * and parse output. If this parameter is NULL, the default locale will + * be used. + * @param codepage The codepage in which data will be written to and + * read from the file. If this paramter is NULL the system default codepage + * will be used. + * @return A new UFILE, or NULL if an error occurred. + * @draft ICU 54 + */ +U_DRAFT UFILE* U_EXPORT2 +u_fopen_u(const UChar *filename, + const char *perm, + const char *locale, + const char *codepage); +#endif /* U_HIDE_DRAFT_API */ + /** * Open a UFILE on top of an existing FILE* stream. The FILE* stream * ownership remains with the caller. To have the UFILE take over @@ -983,6 +1010,8 @@ u_vsscanf_u(const UChar *buffer, const UChar *patternSpecification, va_list ap); + +#endif #endif #endif diff --git a/icu4c/source/io/unicode/ustream.h b/icu4c/source/io/unicode/ustream.h index dbb3098b4..41ccf5ae0 100644 --- a/icu4c/source/io/unicode/ustream.h +++ b/icu4c/source/io/unicode/ustream.h @@ -17,6 +17,8 @@ #include "unicode/unistr.h" +#if !UCONFIG_NO_CONVERSION // not available without conversion + /** * \file * \brief C++ API: Unicode iostream like API @@ -63,3 +65,4 @@ U_NAMESPACE_END /* No operator for UChar because it can conflict with wchar_t */ #endif +#endif diff --git a/icu4c/source/io/uprintf.cpp b/icu4c/source/io/uprintf.cpp new file mode 100644 index 000000000..a7e79f8ea --- /dev/null +++ b/icu4c/source/io/uprintf.cpp @@ -0,0 +1,217 @@ +/* +****************************************************************************** +* +* Copyright (C) 1998-2014, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* +* File uprintf.cpp +* +* Modification History: +* +* Date Name Description +* 11/19/98 stephen Creation. +* 03/12/99 stephen Modified for new C API. +* Added conversion from default codepage. +* 08/07/2003 george Reunify printf implementations +****************************************************************************** +*/ + +#include "unicode/utypes.h" + +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION + +#include "unicode/ustdio.h" +#include "unicode/ustring.h" +#include "unicode/unum.h" +#include "unicode/udat.h" +#include "unicode/putil.h" + +#include "cmemory.h" +#include "locbund.h" +#include "mutex.h" +#include "uassert.h" +#include "uprintf.h" +#include "ufile.h" +#include "ucln_io.h" + +U_NAMESPACE_USE + +static UFILE *gStdOut = NULL; +static UInitOnce gStdOutInitOnce = U_INITONCE_INITIALIZER; + +static UBool U_CALLCONV uprintf_cleanup(void) +{ + if (gStdOut != NULL) { + u_fclose(gStdOut); + gStdOut = NULL; + } + gStdOutInitOnce.reset(); + return TRUE; +} + +static void U_CALLCONV u_stdout_init() { + U_ASSERT(gStdOut == NULL); + gStdOut = u_finit(stdout, NULL, NULL); + ucln_io_registerCleanup(UCLN_IO_PRINTF, &uprintf_cleanup); +} + +U_CAPI UFILE * U_EXPORT2 +u_get_stdout() +{ + umtx_initOnce(gStdOutInitOnce, &u_stdout_init); + return gStdOut; +} + +static int32_t U_EXPORT2 +u_printf_write(void *context, + const UChar *str, + int32_t count) +{ + return u_file_write(str, count, (UFILE *)context); +} + +static int32_t +u_printf_pad_and_justify(void *context, + const u_printf_spec_info *info, + const UChar *result, + int32_t resultLen) +{ + UFILE *output = (UFILE *)context; + int32_t written, i; + + /* pad and justify, if needed */ + if(info->fWidth != -1 && resultLen < info->fWidth) { + /* left justify */ + if(info->fLeft) { + written = u_file_write(result, resultLen, output); + for(i = 0; i < info->fWidth - resultLen; ++i) { + written += u_file_write(&info->fPadChar, 1, output); + } + } + /* right justify */ + else { + written = 0; + for(i = 0; i < info->fWidth - resultLen; ++i) { + written += u_file_write(&info->fPadChar, 1, output); + } + written += u_file_write(result, resultLen, output); + } + } + /* just write the formatted output */ + else { + written = u_file_write(result, resultLen, output); + } + + return written; +} + +U_CAPI int32_t U_EXPORT2 +u_fprintf( UFILE *f, + const char *patternSpecification, + ... ) +{ + va_list ap; + int32_t count; + + va_start(ap, patternSpecification); + count = u_vfprintf(f, patternSpecification, ap); + va_end(ap); + + return count; +} + +U_CAPI int32_t U_EXPORT2 +u_printf(const char *patternSpecification, + ...) +{ + va_list ap; + int32_t count; + va_start(ap, patternSpecification); + count = u_vfprintf(u_get_stdout(), patternSpecification, ap); + va_end(ap); + return count; +} + +U_CAPI int32_t U_EXPORT2 +u_fprintf_u( UFILE *f, + const UChar *patternSpecification, + ... ) +{ + va_list ap; + int32_t count; + + va_start(ap, patternSpecification); + count = u_vfprintf_u(f, patternSpecification, ap); + va_end(ap); + + return count; +} + +U_CAPI int32_t U_EXPORT2 +u_printf_u(const UChar *patternSpecification, + ...) +{ + va_list ap; + int32_t count; + va_start(ap, patternSpecification); + count = u_vfprintf_u(u_get_stdout(), patternSpecification, ap); + va_end(ap); + return count; +} + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_vfprintf( UFILE *f, + const char *patternSpecification, + va_list ap) +{ + int32_t count; + UChar *pattern; + UChar buffer[UFMT_DEFAULT_BUFFER_SIZE]; + size_t size = strlen(patternSpecification) + 1; + + /* convert from the default codepage to Unicode */ + if (size >= MAX_UCHAR_BUFFER_SIZE(buffer)) { + pattern = (UChar *)uprv_malloc(size * sizeof(UChar)); + if(pattern == 0) { + return 0; + } + } + else { + pattern = buffer; + } + u_charsToUChars(patternSpecification, pattern, size); + + /* do the work */ + count = u_vfprintf_u(f, pattern, ap); + + /* clean up */ + if (pattern != buffer) { + uprv_free(pattern); + } + + return count; +} + +static const u_printf_stream_handler g_stream_handler = { + u_printf_write, + u_printf_pad_and_justify +}; + +U_CAPI int32_t U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */ +u_vfprintf_u( UFILE *f, + const UChar *patternSpecification, + va_list ap) +{ + int32_t written = 0; /* haven't written anything yet */ + + /* parse and print the whole format string */ + u_printf_parse(&g_stream_handler, patternSpecification, f, NULL, &f->str.fBundle, &written, ap); + + /* return # of UChars written */ + return written; +} + +#endif /* #if !UCONFIG_NO_FORMATTING */ + diff --git a/icu4c/source/io/uprntf_p.c b/icu4c/source/io/uprntf_p.c index 78c2e5da7..09ae6bad8 100644 --- a/icu4c/source/io/uprntf_p.c +++ b/icu4c/source/io/uprntf_p.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -19,7 +19,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustring.h" #include "unicode/utf16.h" diff --git a/icu4c/source/io/uscanf.c b/icu4c/source/io/uscanf.c index 5743f6519..3ef9b3c7b 100644 --- a/icu4c/source/io/uscanf.c +++ b/icu4c/source/io/uscanf.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2004, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/putil.h" #include "unicode/ustdio.h" diff --git a/icu4c/source/io/uscanf.h b/icu4c/source/io/uscanf.h index dd8b8546a..c192d6653 100644 --- a/icu4c/source/io/uscanf.h +++ b/icu4c/source/io/uscanf.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1998-2004, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -21,7 +21,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/ustdio.h" diff --git a/icu4c/source/io/uscanf_p.c b/icu4c/source/io/uscanf_p.c index e6b22e326..8219b5568 100644 --- a/icu4c/source/io/uscanf_p.c +++ b/icu4c/source/io/uscanf_p.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2011, International Business Machines +* Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -18,7 +18,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING +#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_CONVERSION #include "unicode/uchar.h" #include "unicode/ustring.h" diff --git a/icu4c/source/io/ustdio.c b/icu4c/source/io/ustdio.c index df4c4f1c3..3e6f71765 100644 --- a/icu4c/source/io/ustdio.c +++ b/icu4c/source/io/ustdio.c @@ -1,7 +1,7 @@ /* ****************************************************************************** * - * Copyright (C) 1998-2011, International Business Machines + * Copyright (C) 1998-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -18,6 +18,9 @@ */ #include "unicode/ustdio.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/putil.h" #include "cmemory.h" #include "cstring.h" @@ -724,3 +727,4 @@ u_file_read( UChar *chars, return read; } +#endif diff --git a/icu4c/source/io/ustream.cpp b/icu4c/source/io/ustream.cpp index fb5f88801..be02dd054 100644 --- a/icu4c/source/io/ustream.cpp +++ b/icu4c/source/io/ustream.cpp @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2001-2011, International Business Machines +* Copyright (C) 2001-2014, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * FILE NAME : ustream.cpp @@ -13,6 +13,9 @@ */ #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/uobject.h" #include "unicode/ustream.h" #include "unicode/ucnv.h" @@ -165,3 +168,4 @@ STOP_READING: U_NAMESPACE_END #endif +#endif |