ICU 4.2.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
uversion.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * Copyright (C) 2000-2009, International Business Machines
4 * Corporation and others. All Rights Reserved.
5 *******************************************************************************
6 *
7 * file name: uversion.h
8 * encoding: US-ASCII
9 * tab size: 8 (not used)
10 * indentation:4
11 *
12 * Created by: Vladimir Weinstein
13 *
14 * Contains all the important version numbers for ICU.
15 * Gets included by utypes.h and Windows .rc files
16 */
17 
22 /*===========================================================================*/
23 /* Main ICU version information */
24 /*===========================================================================*/
25 
26 #ifndef UVERSION_H
27 #define UVERSION_H
28 
47 #include "unicode/umachine.h"
48 
53 #define U_COPYRIGHT_STRING \
54  " Copyright (C) 2009, International Business Machines Corporation and others. All Rights Reserved. "
55 
59 #define U_COPYRIGHT_STRING_LENGTH 128
60 
65 #define U_ICU_VERSION_MAJOR_NUM 4
66 
71 #define U_ICU_VERSION_MINOR_NUM 2
72 
77 #define U_ICU_VERSION_PATCHLEVEL_NUM 1
78 
83 #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
84 #define U_ICU_VERSION_BUILDLEVEL_NUM 0
85 #endif
86 
91 #define U_ICU_VERSION_SUFFIX _4_2
92 
98 #define U_ICU_VERSION "4.2.1"
99 
104 #define U_ICU_VERSION_SHORT "42"
105 
109 #define U_MAX_VERSION_LENGTH 4
110 
114 #define U_VERSION_DELIMITER '.'
115 
119 #define U_MAX_VERSION_STRING_LENGTH 20
120 
125 
126 /*===========================================================================*/
127 /* C++ namespace if supported. Versioned unless versioning is disabled. */
128 /*===========================================================================*/
129 
160 /* Define namespace symbols if the compiler supports it. */
161 #if U_HAVE_NAMESPACE && defined(XP_CPLUSPLUS)
162 # if U_DISABLE_RENAMING
163 # define U_ICU_NAMESPACE icu
164  namespace U_ICU_NAMESPACE { }
165 # else
166 # define U_ICU_NAMESPACE icu_4_2
167  namespace U_ICU_NAMESPACE { }
168  namespace icu = U_ICU_NAMESPACE;
169 # endif
170 
171 # define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
172 # define U_NAMESPACE_END }
173 # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
174 # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
175 
176 # ifndef U_USING_ICU_NAMESPACE
177 # define U_USING_ICU_NAMESPACE 1
178 # endif
179 # if U_USING_ICU_NAMESPACE
181 # endif
182 #else
183 # define U_NAMESPACE_BEGIN
184 # define U_NAMESPACE_END
185 # define U_NAMESPACE_USE
186 # define U_NAMESPACE_QUALIFIER
187 #endif
188 
189 
190 /*===========================================================================*/
191 /* General version helper functions. Definitions in putil.c */
192 /*===========================================================================*/
193 
205 U_STABLE void U_EXPORT2
206 u_versionFromString(UVersionInfo versionArray, const char *versionString);
207 
219 U_STABLE void U_EXPORT2
220 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
221 
234 U_STABLE void U_EXPORT2
235 u_versionToString(UVersionInfo versionArray, char *versionString);
236 
245 U_STABLE void U_EXPORT2
246 u_getVersion(UVersionInfo versionArray);
247 
260 
261 
262 /*===========================================================================
263  * ICU collation framework version information
264  * Version info that can be obtained from a collator is affected by these
265  * numbers in a secret and magic way. Please use collator version as whole
266  *===========================================================================
267  */
268 
280 #define UCOL_RUNTIME_VERSION 6
281 
294 #define UCOL_BUILDER_VERSION 7
295 
300 #define UCOL_TAILORINGS_VERSION 1
301 
302 #endif
uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]
The binary form of a version on ICU APIs is an array of 4 uint8_t.
Definition: uversion.h:124
#define U_MAX_VERSION_LENGTH
An ICU version consists of up to 4 numbers from 0..255.
Definition: uversion.h:109
void u_getVersion(UVersionInfo versionArray)
Gets the ICU release version.
void u_versionFromString(UVersionInfo versionArray, const char *versionString)
Parse a string with dotted-decimal version information and fill in a UVersionInfo structure with the ...
unsigned char uint8_t
Define 64 bit limits.
Definition: pwin32.h:131
int32_t u_compareVersions(UVersionInfo v1, UVersionInfo v2)
Compare two version numbers, v1 and v2, numerically.
Basic types and constants for UTF.
#define U_NAMESPACE_USE
This is used to specify that the rest of the code uses the public ICU C++ API namespace.
Definition: uversion.h:185
#define U_EXPORT2
Definition: platform.h:338
uint16_t UChar
Define UChar to be wchar_t if that is 16 bits wide; always assumed to be unsigned.
Definition: umachine.h:299
void u_versionFromUString(UVersionInfo versionArray, const UChar *versionString)
Parse a Unicode string with dotted-decimal version information and fill in a UVersionInfo structure w...
signed int int32_t
Define 64 bit limits.
Definition: pwin32.h:143
void u_versionToString(UVersionInfo versionArray, char *versionString)
Write a string with dotted-decimal version information according to the input UVersionInfo.
#define U_STABLE
This is used to declare a function as a stable public ICU C API.
Definition: umachine.h:117