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