]> git.saurik.com Git - apple/icu.git/blob - icuSources/common/unicode/uversion.h
ICU-400.38.tar.gz
[apple/icu.git] / icuSources / common / unicode / uversion.h
1 /*
2 *******************************************************************************
3 * Copyright (C) 2000-2008, 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
18 /**
19 * \file
20 * \brief C API: Contains all the important version numbers for ICU.
21 */
22 /*===========================================================================*/
23 /* Main ICU version information */
24 /*===========================================================================*/
25
26 #ifndef UVERSION_H
27 #define UVERSION_H
28
29 /**
30 * IMPORTANT: When updating version, the following things need to be done:
31 * source/common/unicode/uversion.h - this file: update major, minor,
32 * patchlevel, suffix, version, short version constants, namespace,
33 * and copyright
34 * source/common/common.vcproj - update 'Output file name' on the link tab so
35 * that it contains the new major/minor combination
36 * source/i18n/i18n.vcproj - same as for the common.vcproj
37 * source/layout/layout.vcproj - same as for the common.vcproj
38 * source/layoutex/layoutex.vcproj - same
39 * source/stubdata/stubdata.vcproj - same as for the common.vcproj
40 * source/io/io.vcproj - same as for the common.vcproj
41 * source/data/makedata.mak - change U_ICUDATA_NAME so that it contains
42 * the new major/minor combination
43 * source/tools/genren/genren.pl - use this script according to the README
44 * in that folder
45 */
46
47 #include "unicode/umachine.h"
48
49 /** The standard copyright notice that gets compiled into each library.
50 * This value will change in the subsequent releases of ICU
51 * @stable ICU 2.4
52 */
53 #define U_COPYRIGHT_STRING \
54 " Copyright (C) 2008, International Business Machines Corporation and others. All Rights Reserved. "
55
56 /** Maximum length of the copyright string.
57 * @stable ICU 2.4
58 */
59 #define U_COPYRIGHT_STRING_LENGTH 128
60
61 /** The current ICU major version as an integer.
62 * This value will change in the subsequent releases of ICU
63 * @stable ICU 2.4
64 */
65 #define U_ICU_VERSION_MAJOR_NUM 4
66
67 /** The current ICU minor version as an integer.
68 * This value will change in the subsequent releases of ICU
69 * @stable ICU 2.6
70 */
71 #define U_ICU_VERSION_MINOR_NUM 0
72
73 /** The current ICU patchlevel version as an integer.
74 * This value will change in the subsequent releases of ICU
75 * @stable ICU 2.4
76 */
77 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
78
79 /** The current ICU build level version as an integer.
80 * This value is for use by ICU clients. It defaults to 0.
81 * @draft ICU 4.0
82 */
83 #ifndef U_ICU_VERSION_BUILDLEVEL_NUM
84 #define U_ICU_VERSION_BUILDLEVEL_NUM 0
85 #endif
86
87 /** Glued version suffix for renamers
88 * This value will change in the subsequent releases of ICU
89 * @stable ICU 2.6
90 */
91 #define U_ICU_VERSION_SUFFIX _4_0
92
93 /** The current ICU library version as a dotted-decimal string. The patchlevel
94 * only appears in this string if it non-zero.
95 * This value will change in the subsequent releases of ICU
96 * @stable ICU 2.4
97 */
98 #define U_ICU_VERSION "4.0"
99
100 /** The current ICU library major/minor version as a string without dots, for library name suffixes.
101 * This value will change in the subsequent releases of ICU
102 * @stable ICU 2.6
103 */
104 #define U_ICU_VERSION_SHORT "40"
105
106 /** An ICU version consists of up to 4 numbers from 0..255.
107 * @stable ICU 2.4
108 */
109 #define U_MAX_VERSION_LENGTH 4
110
111 /** In a string, ICU version fields are delimited by dots.
112 * @stable ICU 2.4
113 */
114 #define U_VERSION_DELIMITER '.'
115
116 /** The maximum length of an ICU version string.
117 * @stable ICU 2.4
118 */
119 #define U_MAX_VERSION_STRING_LENGTH 20
120
121 /** The binary form of a version on ICU APIs is an array of 4 uint8_t.
122 * @stable ICU 2.4
123 */
124 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
125
126 /*===========================================================================*/
127 /* C++ namespace if supported. Versioned unless versioning is disabled. */
128 /*===========================================================================*/
129
130 /**
131 * \def U_NAMESPACE_BEGIN
132 * This is used to begin a declaration of a public ICU C++ API.
133 * If the compiler doesn't support namespaces, this does nothing.
134 * @stable ICU 2.4
135 */
136
137 /**
138 * \def U_NAMESPACE_END
139 * This is used to end a declaration of a public ICU C++ API
140 * If the compiler doesn't support namespaces, this does nothing.
141 * @stable ICU 2.4
142 */
143
144 /**
145 * \def U_NAMESPACE_USE
146 * This is used to specify that the rest of the code uses the
147 * public ICU C++ API namespace.
148 * If the compiler doesn't support namespaces, this does nothing.
149 * @stable ICU 2.4
150 */
151
152 /**
153 * \def U_NAMESPACE_QUALIFIER
154 * This is used to qualify that a function or class is part of
155 * the public ICU C++ API namespace.
156 * If the compiler doesn't support namespaces, this does nothing.
157 * @stable ICU 2.4
158 */
159
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_0
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
180 U_NAMESPACE_USE
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
194 /**
195 * Parse a string with dotted-decimal version information and
196 * fill in a UVersionInfo structure with the result.
197 * Definition of this function lives in putil.c
198 *
199 * @param versionArray The destination structure for the version information.
200 * @param versionString A string with dotted-decimal version information,
201 * with up to four non-negative number fields with
202 * values of up to 255 each.
203 * @stable ICU 2.4
204 */
205 U_STABLE void U_EXPORT2
206 u_versionFromString(UVersionInfo versionArray, const char *versionString);
207
208 /**
209 * Write a string with dotted-decimal version information according
210 * to the input UVersionInfo.
211 * Definition of this function lives in putil.c
212 *
213 * @param versionArray The version information to be written as a string.
214 * @param versionString A string buffer that will be filled in with
215 * a string corresponding to the numeric version
216 * information in versionArray.
217 * The buffer size must be at least U_MAX_VERSION_STRING_LENGTH.
218 * @stable ICU 2.4
219 */
220 U_STABLE void U_EXPORT2
221 u_versionToString(UVersionInfo versionArray, char *versionString);
222
223 /**
224 * Gets the ICU release version. The version array stores the version information
225 * for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02.
226 * Definition of this function lives in putil.c
227 *
228 * @param versionArray the version # information, the result will be filled in
229 * @stable ICU 2.0
230 */
231 U_STABLE void U_EXPORT2
232 u_getVersion(UVersionInfo versionArray);
233
234
235 /*===========================================================================
236 * ICU collation framework version information
237 * Version info that can be obtained from a collator is affected by these
238 * numbers in a secret and magic way. Please use collator version as whole
239 *===========================================================================
240 */
241
242 /** Collation runtime version (sort key generator, strcoll).
243 * If the version is different, sortkeys for the same string could be different
244 * version 2 was in ICU 1.8.1. changed is: compression intervals, French secondary
245 * compression, generating quad level always when strength is quad or more
246 * version 4 - ICU 2.2 - tracking UCA changes, ignore completely ignorables
247 * in contractions, ignore primary ignorables after shifted
248 * version 5 - ICU 2.8 - changed implicit generation code
249 * version 6 - ICU 3.4 - with the UCA 4.1, Thai tag is no longer generated or used
250 * This value may change in the subsequent releases of ICU
251 * @stable ICU 2.4
252 */
253 #define UCOL_RUNTIME_VERSION 6
254
255 /** Builder code version. When this is different, same tailoring might result
256 * in assigning different collation elements to code points
257 * version 2 was in ICU 1.8.1. added support for prefixes, tweaked canonical
258 * closure. However, the tailorings should probably get same CEs assigned
259 * version 5 - ICU 2.2 - fixed some bugs, renamed some indirect values.
260 * version 6 - ICU 2.8 - fixed bug in builder that allowed 0xFF in primary values
261 * version 7 - ICU 3.4 - with the UCA 4.1 Thai tag is no longer processed, complete ignorables
262 * now break contractions
263 * Backward compatible with the old rules.
264 * This value may change in the subsequent releases of ICU
265 * @stable ICU 2.4
266 */
267 #define UCOL_BUILDER_VERSION 7
268
269 /** This is the version of the tailorings
270 * This value may change in the subsequent releases of ICU
271 * @stable ICU 2.4
272 */
273 #define UCOL_TAILORINGS_VERSION 1
274
275 #endif