#include "unicode/utypes.h"
Go to the source code of this file.
Defines | |
#define | IEEE_754 1 |
#define | uprv_isNegative(number) (*((signed char *)&(number)+sizeof(number)-1)<0) |
#define | U_FILE_SEP_CHAR '/' |
Filesystem file and path separator characters. More... | |
#define | U_PATH_SEP_CHAR ':' |
#define | U_FILE_SEP_STRING "/" |
#define | U_PATH_SEP_STRING ":" |
#define | U_UPPER_ORDINAL(x) ((x)-'A') |
#define | U_MAX_PTR(base) ((void *)(((char *)(base)+0x7fffffff) > (char *)(base) ? ((char *)(base)+0x7fffffff) : (char *)-1)) |
Maximum value of a (void*) - use to indicate the limit of an 'infinite' buffer. More... | |
Functions | |
U_CAPI UBool U_EXPORT2 | uprv_isNaN (double) |
Platform utilities isolates the platform dependencies of the libarary. More... | |
U_CAPI UBool U_EXPORT2 | uprv_isInfinite (double) |
U_CAPI UBool U_EXPORT2 | uprv_isPositiveInfinity (double) |
U_CAPI UBool U_EXPORT2 | uprv_isNegativeInfinity (double) |
U_CAPI double U_EXPORT2 | uprv_getNaN (void) |
U_CAPI double U_EXPORT2 | uprv_getInfinity (void) |
U_CAPI double U_EXPORT2 | uprv_trunc (double d) |
U_CAPI double U_EXPORT2 | uprv_floor (double x) |
U_CAPI double U_EXPORT2 | uprv_ceil (double x) |
U_CAPI double U_EXPORT2 | uprv_fabs (double x) |
U_CAPI double U_EXPORT2 | uprv_modf (double x, double *y) |
U_CAPI double U_EXPORT2 | uprv_fmod (double x, double y) |
U_CAPI double U_EXPORT2 | uprv_pow (double x, double y) |
U_CAPI double U_EXPORT2 | uprv_pow10 (int32_t x) |
U_CAPI double U_EXPORT2 | uprv_fmax (double x, double y) |
U_CAPI double U_EXPORT2 | uprv_fmin (double x, double y) |
U_CAPI int32_t U_EXPORT2 | uprv_max (int32_t x, int32_t y) |
U_CAPI int32_t U_EXPORT2 | uprv_min (int32_t x, int32_t y) |
U_CAPI double U_EXPORT2 | uprv_maxMantissa (void) |
Return the largest positive number that can be represented by an integer type of arbitrary bit length. More... | |
U_CAPI int16_t U_EXPORT2 | uprv_log10 (double d) |
Return the floor of the log base 10 of a given double. More... | |
U_CAPI double U_EXPORT2 | uprv_log (double d) |
U_CAPI double U_EXPORT2 | uprv_round (double x) |
Does common notion of rounding e.g. More... | |
U_CAPI int32_t U_EXPORT2 | uprv_digitsAfterDecimal (double x) |
Returns the number of digits after the decimal point in a double number x. More... | |
U_CAPI void U_EXPORT2 | uprv_tzset (void) |
Time zone utilities. More... | |
U_CAPI int32_t U_EXPORT2 | uprv_timezone (void) |
Difference in seconds between coordinated universal time and local time. More... | |
U_CAPI char *U_EXPORT2 | uprv_tzname (int n) |
tzname(0) Three-letter time-zone name derived from TZ environment variable. More... | |
U_CAPI int32_t U_EXPORT2 | uprv_getUTCtime (void) |
Get UTC (GMT) time measured in seconds since 0:00 on 1/1/70. More... | |
U_CAPI const char *U_EXPORT2 | u_getDataDirectory (void) |
Return the ICU data directory. More... | |
U_CAPI void U_EXPORT2 | u_setDataDirectory (const char *directory) |
Set the ICU data directory. More... | |
U_CAPI const char *U_EXPORT2 | uprv_getDefaultCodepage (void) |
Return the default codepage for this platform and locale. More... | |
U_CAPI const char *U_EXPORT2 | uprv_getDefaultLocaleID (void) |
Return the default locale ID string by querying ths system, or zero if one cannot be found. More... | |
U_CAPI double U_EXPORT2 | uprv_nextDouble (double d, UBool positive) |
U_CAPI void U_EXPORT2 | u_charsToUChars (const char *cs, UChar *us, UTextOffset length) |
Convert char characters to UChar characters. More... | |
U_CAPI void U_EXPORT2 | u_UCharsToChars (const UChar *us, char *cs, UTextOffset length) |
Convert UChar characters to char characters. More... |
|
|
|
Filesystem file and path separator characters. Example: '/' and ':' on Unix, '\' and ';' on Windows.
|
|
|
|
Maximum value of a (void*) - use to indicate the limit of an 'infinite' buffer. In fact, buffer sizes must not exceed 2GB so that the difference between the buffer limit and the buffer start can be expressed in an int32_t. The definition of U_MAX_PTR must fulfill the following conditions:
|
|
|
|
|
|
|
|
|
|
Convert UChar characters to char characters. This utility function is useful only for "invariant characters" that can be encoded in the platform default encoding. They are a small, constant subset of the encoding and include just the latin letters, digits, and some punctuation. For details, see utypes.h .
|
|
Convert char characters to UChar characters. This utility function is useful only for "invariant characters" that are encoded in the platform default encoding. They are a small, constant subset of the encoding and include just the latin letters, digits, and some punctuation. For details, see utypes.h .
|
|
Return the ICU data directory. The data directory is where common format ICU data files (.dat files) are loaded from. Note that normal use of the built-in ICU facilities does not require loading of an external data file; unless you are adding custom data to ICU, the data directory does not need to be set. The data directory is determined as follows: If u_setDataDirectory() has been called, that is it, otherwise if the ICU_DATA environment variable is set, use that, otherwise On Windows, if the SOFTWARE\ICU\Unicode\Data registry entry exists, use that (use of the registry in this way is not recommended.) otherwise If a data directory was specifed at ICU build time, use that otherwise no data directory is available.
|
|
Set the ICU data directory. The data directory is where common format ICU data files (.dat files) are loaded from. Note that normal use of the built-in ICU facilities does not require loading of an external data file; unless you are adding custom data to ICU, the data directory does not need to be set. This function should be called at most once in a process, before the first ICU operation that will require the loading of an ICU data file.
|
|
|
|
Returns the number of digits after the decimal point in a double number x.
|
|
|
|
|
|
|
|
|
|
|
|
Return the default codepage for this platform and locale.
|
|
Return the default locale ID string by querying ths system, or zero if one cannot be found.
|
|
|
|
|
|
Get UTC (GMT) time measured in seconds since 0:00 on 1/1/70.
|
|
|
|
Platform utilities isolates the platform dependencies of the libarary. For each platform which this code is ported to, these functions may have to be re-implemented. |
|
|
|
|
|
|
|
Return the floor of the log base 10 of a given double. This method compensates for inaccuracies which arise naturally when computing logs, and always gives the correct value. The parameter must be positive and finite. (Thanks to Alan Liu for supplying this function.)
|
|
|
|
Return the largest positive number that can be represented by an integer type of arbitrary bit length.
|
|
|
|
|
|
|
|
|
|
|
|
Does common notion of rounding e.g. uprv_floor(x + 0.5); |
|
Difference in seconds between coordinated universal time and local time. E.g., -28,800 for PST (GMT-8hrs) |
|
|
|
tzname(0) Three-letter time-zone name derived from TZ environment variable. E.g., "PST". tzname(1) Three-letter DST zone name derived from TZ environment variable. E.g., "PDT". If DST zone is omitted from TZ, tzname(1) is an empty string. |
|
Time zone utilities. Wrappers for C runtime library functions relating to timezones. The t_tzset() function (similar to tzset) uses the current setting of the environment variable TZ to assign values to three global variables: daylight, timezone, and tzname. These variables have the following meanings, and are declared in <time.h>. daylight Nonzero if daylight-saving-time zone (DST) is specified in TZ; otherwise, 0. Default value is 1. timezone Difference in seconds between coordinated universal time and local time. E.g., -28,800 for PST (GMT-8hrs) tzname(0) Three-letter time-zone name derived from TZ environment variable. E.g., "PST". tzname(1) Three-letter DST zone name derived from TZ environment variable. E.g., "PDT". If DST zone is omitted from TZ, tzname(1) is an empty string. Notes: For example, to set the TZ environment variable to correspond to the current time zone in Germany, you can use one of the following statements: set TZ=GST1GDT set TZ=GST+1GDT If the TZ value is not set, t_tzset() attempts to use the time zone information specified by the operating system. Under Windows NT and Windows 95, this information is specified in the Control Panel’s Date/Time application.
|