ICU 78.2: common/unicode/putil.h Source File

ICU 78.2 78.2

putil.h
Go to the documentation of this file.
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4 ******************************************************************************
5 *
6 * Copyright (C) 1997-2014, International Business Machines
7 * Corporation and others. All Rights Reserved.
8 *
9 ******************************************************************************
10 *
11 * FILE NAME : putil.h
12 *
13 * Date Name Description
14 * 05/14/98 nos Creation (content moved here from utypes.h).
15 * 06/17/99 erm Added IEEE_754
16 * 07/22/98 stephen Added IEEEremainder, max, min, trunc
17 * 08/13/98 stephen Added isNegativeInfinity, isPositiveInfinity
18 * 08/24/98 stephen Added longBitsFromDouble
19 * 03/02/99 stephen Removed openFile(). Added AS400 support.
20 * 04/15/99 stephen Converted to C
21 * 11/15/99 helena Integrated S/390 changes for IEEE support.
22 * 01/11/00 helena Added u_getVersion.
23 ******************************************************************************
24 */
25
26 #ifndef PUTIL_H
27 #define PUTIL_H
28
29 #include "unicode/utypes.h"
35 /*==========================================================================*/
36 /* Platform utilities */
37 /*==========================================================================*/
38
69 U_CAPI const char* U_EXPORT2 u_getDataDirectory(void);
70
71
91 U_CAPI void U_EXPORT2 u_setDataDirectory(const char *directory);
92
93 #ifndef U_HIDE_INTERNAL_API
102 U_CAPI const char * U_EXPORT2 u_getTimeZoneFilesDirectory(UErrorCode *status);
103
112 U_CAPI void U_EXPORT2 u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status);
113 #endif /* U_HIDE_INTERNAL_API */
114
115
122 #if U_PLATFORM_USES_ONLY_WIN32_API
123 # define U_FILE_SEP_CHAR '\\'
124 # define U_FILE_ALT_SEP_CHAR '/'
125 # define U_PATH_SEP_CHAR ';'
126 # define U_FILE_SEP_STRING "\\"
127 # define U_FILE_ALT_SEP_STRING "/"
128 # define U_PATH_SEP_STRING ";"
129 #else
130 # define U_FILE_SEP_CHAR '/'
131 # define U_FILE_ALT_SEP_CHAR '/'
132 # define U_PATH_SEP_CHAR ':'
133 # define U_FILE_SEP_STRING "/"
134 # define U_FILE_ALT_SEP_STRING "/"
135 # define U_PATH_SEP_STRING ":"
136 #endif
137
158 U_CAPI void U_EXPORT2
159 u_charsToUChars(const char *cs, UChar *us, int32_t length);
160
180 U_CAPI void U_EXPORT2
181 u_UCharsToChars(const UChar *us, char *cs, int32_t length);
182
183 #endif
u_UCharsToChars
U_CAPI void u_UCharsToChars(const UChar *us, char *cs, int32_t length)
Convert UChar characters to char characters.
u_setTimeZoneFilesDirectory
U_CAPI void u_setTimeZoneFilesDirectory(const char *path, UErrorCode *status)
Set the time zone files override directory.
u_setDataDirectory
U_CAPI void u_setDataDirectory(const char *directory)
Set the ICU data directory.
u_charsToUChars
U_CAPI void u_charsToUChars(const char *cs, UChar *us, int32_t length)
Convert char characters to UChar characters.
u_getTimeZoneFilesDirectory
U_CAPI const char * u_getTimeZoneFilesDirectory(UErrorCode *status)
Return the time zone files override directory, or an empty string if no directory was specified.
u_getDataDirectory
U_CAPI const char * u_getDataDirectory(void)
Platform utilities isolates the platform dependencies of the library.
U_CAPI
#define U_CAPI
This is used to declare a function as a public ICU C API.
Definition: umachine.h:110
UChar
char16_t UChar
The base type for UTF-16 code units and pointers.
Definition: umachine.h:400
utypes.h
Basic definitions for ICU, for both C and C++ APIs.
UErrorCode
UErrorCode
Standard ICU4C error code type, a substitute for exceptions.
Definition: utypes.h:509