]>
Commit | Line | Data |
---|---|---|
b75a7d8f A |
1 | /* |
2 | ******************************************************************************* | |
3 | * Copyright (C) 2000-2003, 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 | /* Main ICU version information */ | |
20 | /*===========================================================================*/ | |
21 | ||
22 | #ifndef UVERSION_H | |
23 | #define UVERSION_H | |
24 | ||
25 | /** IMPORTANT: When updating version, the following things need to be done: */ | |
26 | /** source/common/unicode/uversion.h - this file: update major, minor, */ | |
27 | /** patchlevel, suffix, version, short version constants, namespace, */ | |
28 | /** and copyright */ | |
29 | /** source/common/common.dsp - update 'Output file name' on the link tab so */ | |
30 | /** that it contains the new major/minor combination */ | |
31 | /** source/i18n/i18n.dsp - same as for the common.dsp */ | |
32 | /** source/layout/layout.dsp - same as for the common.dsp */ | |
33 | /** source/stubdata/stubdata.dsp - same as for the common.dsp */ | |
34 | /** source/extra/ustdio/ustdio.dsp - same as for the common.dsp */ | |
35 | /** source/data/makedata.mak - change U_ICUDATA_NAME so that it contains */ | |
36 | /** the new major/minor combination */ | |
37 | /** source/tools/genren/genren.pl - use this script according to the README */ | |
38 | /** in that folder */ | |
39 | ||
40 | #include "unicode/umachine.h" | |
41 | ||
42 | /** The standard copyright notice that gets compiled into each library. | |
43 | * This value will change in the subsequent releases of ICU | |
44 | * @draft ICU 2.4 | |
45 | */ | |
46 | #define U_COPYRIGHT_STRING \ | |
47 | " Copyright (C) 2003, International Business Machines Corporation and others. All Rights Reserved. " | |
48 | ||
49 | /** Maximum length of the copyright string. | |
50 | * @draft ICU 2.4 | |
51 | */ | |
52 | #define U_COPYRIGHT_STRING_LENGTH 128 | |
53 | ||
54 | /** The current ICU major version as an integer. | |
55 | * This value will change in the subsequent releases of ICU | |
56 | * @draft ICU 2.4 | |
57 | */ | |
58 | #define U_ICU_VERSION_MAJOR_NUM 2 | |
59 | ||
60 | /** The current ICU minor version as an integer. | |
61 | * This value will change in the subsequent releases of ICU | |
62 | * @draft ICU 2.6 | |
63 | */ | |
64 | #define U_ICU_VERSION_MINOR_NUM 6 | |
65 | ||
66 | /** The current ICU patchlevel version as an integer. | |
67 | * This value will change in the subsequent releases of ICU | |
68 | * @draft ICU 2.4 | |
69 | */ | |
70 | #define U_ICU_VERSION_PATCHLEVEL_NUM 0 | |
71 | ||
72 | /** Glued version suffix for renamers | |
73 | * This value will change in the subsequent releases of ICU | |
74 | * @draft ICU 2.6 | |
75 | */ | |
76 | #define U_ICU_VERSION_SUFFIX _2_6 | |
77 | ||
78 | /** The current ICU library version as a dotted-decimal string. The patchlevel | |
79 | * only appears in this string if it non-zero. | |
80 | * This value will change in the subsequent releases of ICU | |
81 | * @draft ICU 2.4 | |
82 | */ | |
83 | #define U_ICU_VERSION "2.6" | |
84 | ||
85 | /** The current ICU library major/minor version as a string without dots, for library name suffixes. | |
86 | * This value will change in the subsequent releases of ICU | |
87 | * @draft ICU 2.6 | |
88 | */ | |
89 | #define U_ICU_VERSION_SHORT "26" | |
90 | ||
91 | /** An ICU version consists of up to 4 numbers from 0..255. | |
92 | * @draft ICU 2.4 | |
93 | */ | |
94 | #define U_MAX_VERSION_LENGTH 4 | |
95 | ||
96 | /** In a string, ICU version fields are delimited by dots. | |
97 | * @draft ICU 2.4 | |
98 | */ | |
99 | #define U_VERSION_DELIMITER '.' | |
100 | ||
101 | /** The maximum length of an ICU version string. | |
102 | * @draft ICU 2.4 | |
103 | */ | |
104 | #define U_MAX_VERSION_STRING_LENGTH 20 | |
105 | ||
106 | /** The binary form of a version on ICU APIs is an array of 4 uint8_t. | |
107 | * @draft ICU 2.4 | |
108 | */ | |
109 | typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; | |
110 | ||
111 | #if U_HAVE_NAMESPACE && defined(XP_CPLUSPLUS) | |
112 | #define U_ICU_NAMESPACE icu_2_6 | |
113 | namespace U_ICU_NAMESPACE { } | |
114 | namespace icu = U_ICU_NAMESPACE; | |
115 | U_NAMESPACE_USE | |
116 | #endif | |
117 | ||
118 | ||
119 | /*===========================================================================*/ | |
120 | /* General version helper functions. Definitions in putil.c */ | |
121 | /*===========================================================================*/ | |
122 | ||
123 | /** | |
124 | * Parse a string with dotted-decimal version information and | |
125 | * fill in a UVersionInfo structure with the result. | |
126 | * Definition of this function lives in putil.c | |
127 | * | |
128 | * @param versionArray The destination structure for the version information. | |
129 | * @param versionString A string with dotted-decimal version information, | |
130 | * with up to four non-negative number fields with | |
131 | * values of up to 255 each. | |
132 | * @draft ICU 2.4 | |
133 | */ | |
134 | U_CAPI void U_EXPORT2 | |
135 | u_versionFromString(UVersionInfo versionArray, const char *versionString); | |
136 | ||
137 | /** | |
138 | * Write a string with dotted-decimal version information according | |
139 | * to the input UVersionInfo. | |
140 | * Definition of this function lives in putil.c | |
141 | * | |
142 | * @param versionArray The version information to be written as a string. | |
143 | * @param versionString A string buffer that will be filled in with | |
144 | * a string corresponding to the numeric version | |
145 | * information in versionArray. | |
146 | * The buffer size must be at least U_MAX_VERSION_STRING_LENGTH. | |
147 | * @draft ICU 2.4 | |
148 | */ | |
149 | U_CAPI void U_EXPORT2 | |
150 | u_versionToString(UVersionInfo versionArray, char *versionString); | |
151 | ||
152 | /** | |
153 | * Gets the ICU release version. The version array stores the version information | |
154 | * for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02. | |
155 | * Definition of this function lives in putil.c | |
156 | * | |
157 | * @param versionArray the version # information, the result will be filled in | |
158 | * @stable ICU 2.0 | |
159 | */ | |
160 | U_CAPI void U_EXPORT2 | |
161 | u_getVersion(UVersionInfo versionArray); | |
162 | ||
163 | ||
164 | /*=========================================================================== | |
165 | * ICU collation framework version information | |
166 | * Version info that can be obtained from a collator is affected by these | |
167 | * numbers in a secret and magic way. Please use collator version as whole | |
168 | *=========================================================================== | |
169 | */ | |
170 | ||
171 | /** Collation runtime version (sort key generator, strcoll). | |
172 | * If the version is different, sortkeys for the same string could be different | |
173 | * version 2 was in ICU 1.8.1. changed is: compression intervals, French secondary | |
174 | * compression, generating quad level always when strength is quad or more | |
175 | * version 4 - ICU 2.2 - tracking UCA changes, ignore completely ignorables | |
176 | * in contractions, ignore primary ignorables after shifted | |
177 | * This value may change in the subsequent releases of ICU | |
178 | * @draft ICU 2.4 | |
179 | */ | |
180 | #define UCOL_RUNTIME_VERSION 4 | |
181 | ||
182 | /** Builder code version. When this is different, same tailoring might result | |
183 | * in assigning different collation elements to code points | |
184 | * version 2 was in ICU 1.8.1. added support for prefixes, tweaked canonical | |
185 | * closure. However, the tailorings should probably get same CEs assigned | |
186 | * version 5 - ICU 2.2 - fixed some bugs, renamed some indirect values. | |
187 | * Backward compatible with the old rules. | |
188 | * This value may change in the subsequent releases of ICU | |
189 | * @draft ICU 2.4 | |
190 | */ | |
191 | #define UCOL_BUILDER_VERSION 5 | |
192 | ||
193 | /** *** Removed *** Instead we use the data we read from FractionalUCA.txt | |
194 | * This is the version of FractionalUCA.txt tailoring rules | |
195 | * Version 1 was in ICU 1.8.1. Version two contains canonical closure for | |
196 | * supplementary code points | |
197 | * Version 4 in ICU 2.2, following UCA=3.1.1d6, UCD=3.2.0 | |
198 | * This value may change in the subsequent releases of ICU | |
199 | * @draft ICU 2.4 | |
200 | */ | |
201 | /*#define UCOL_FRACTIONAL_UCA_VERSION 4*/ | |
202 | ||
203 | /** This is the version of the tailorings | |
204 | * This value may change in the subsequent releases of ICU | |
205 | * @draft ICU 2.4 | |
206 | */ | |
207 | #define UCOL_TAILORINGS_VERSION 1 | |
208 | ||
209 | #endif |