X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/374ca955a76ecab1204ca8bfa63ff9238d998416..b331163bffd790ced0e88b73f44f86d49ccc48a5:/icuSources/common/unicode/putil.h diff --git a/icuSources/common/unicode/putil.h b/icuSources/common/unicode/putil.h index 685df530..df1b17ba 100644 --- a/icuSources/common/unicode/putil.h +++ b/icuSources/common/unicode/putil.h @@ -1,7 +1,7 @@ /* ****************************************************************************** * -* Copyright (C) 1997-2004, International Business Machines +* Copyright (C) 1997-2014, International Business Machines * Corporation and others. All Rights Reserved. * ****************************************************************************** @@ -25,12 +25,10 @@ #define PUTIL_H #include "unicode/utypes.h" - -/* Define this to 1 if your platform supports IEEE 754 floating point, - to 0 if it does not. */ -#ifndef IEEE_754 -# define IEEE_754 1 -#endif + /** + * \file + * \brief C API: Platform Utilities + */ /*==========================================================================*/ /* Platform utilities */ @@ -54,7 +52,11 @@ * If u_setDataDirectory() has been called, that is it, otherwise * if the ICU_DATA environment variable is set, use that, otherwise * If a data directory was specifed at ICU build time - * (#define ICU_DATA_DIR "path"), use that, + * + * \code + * #define ICU_DATA_DIR "path" + * \endcode + * use that, * otherwise no data directory is available. * * @return the data directory, or an empty string ("") if no data directory has @@ -64,6 +66,7 @@ */ U_STABLE const char* U_EXPORT2 u_getDataDirectory(void); + /** * Set the ICU data directory. * The data directory is where common format ICU data files (.dat files) @@ -85,40 +88,36 @@ U_STABLE const char* U_EXPORT2 u_getDataDirectory(void); */ U_STABLE void U_EXPORT2 u_setDataDirectory(const char *directory); +#ifndef U_HIDE_INTERNAL_API /** - * Please use ucnv_getDefaultName() instead. - * Return the default codepage for this platform and locale. - * This function can call setlocale() on Unix platforms. Please read the - * platform documentation on setlocale() before calling this function. - * @return the default codepage for this platform - * @internal - */ -U_INTERNAL const char* U_EXPORT2 uprv_getDefaultCodepage(void); + * Return the time zone files override directory, or an empty string if + * no directory was specified. Certain time zone resources will be preferrentially + * loaded from individual files in this directory. + * + * @return the time zone data override directory. + * @internal + */ +U_INTERNAL const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status); /** - * Please use uloc_getDefault() instead. - * Return the default locale ID string by querying ths system, or - * zero if one cannot be found. - * This function can call setlocale() on Unix platforms. Please read the - * platform documentation on setlocale() before calling this function. - * @return the default locale ID string - * @internal - */ -U_INTERNAL const char* U_EXPORT2 uprv_getDefaultLocaleID(void); + * Set the time zone files override directory. + * This function is not thread safe; it must not be called concurrently with + * u_getTimeZoneFilesDirectory() or any other use of ICU time zone functions. + * This function should only be called before using any ICU service that + * will access the time zone data. + * @internal + */ +U_INTERNAL void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status); +#endif /* U_HIDE_INTERNAL_API */ + /** + * @{ * Filesystem file and path separator characters. * Example: '/' and ':' on Unix, '\\' and ';' on Windows. * @stable ICU 2.0 */ -#ifdef XP_MAC -# define U_FILE_SEP_CHAR ':' -# define U_FILE_ALT_SEP_CHAR ':' -# define U_PATH_SEP_CHAR ';' -# define U_FILE_SEP_STRING ":" -# define U_FILE_ALT_SEP_STRING ":" -# define U_PATH_SEP_STRING ";" -#elif defined(WIN32) || defined(OS2) +#if U_PLATFORM_USES_ONLY_WIN32_API # define U_FILE_SEP_CHAR '\\' # define U_FILE_ALT_SEP_CHAR '/' # define U_PATH_SEP_CHAR ';' @@ -134,6 +133,8 @@ U_INTERNAL const char* U_EXPORT2 uprv_getDefaultLocaleID(void); # define U_PATH_SEP_STRING ":" #endif +/** @} */ + /** * Convert char characters to UChar characters. * This utility function is useful only for "invariant characters"