sl@0: /* sl@0: ******************************************************************************* sl@0: * Copyright (C) 2000-2005, International Business Machines sl@0: * Corporation and others. All Rights Reserved. sl@0: ******************************************************************************* sl@0: * sl@0: * file name: uversion.h sl@0: * encoding: US-ASCII sl@0: * tab size: 8 (not used) sl@0: * indentation:4 sl@0: * sl@0: * Created by: Vladimir Weinstein sl@0: * sl@0: * Contains all the important version numbers for ICU. sl@0: * Gets included by utypes.h and Windows .rc files sl@0: */ sl@0: sl@0: /** sl@0: * \file sl@0: * \brief C API: Contains all the important version numbers for ICU. sl@0: */ sl@0: /*===========================================================================*/ sl@0: /* Main ICU version information */ sl@0: /*===========================================================================*/ sl@0: sl@0: #ifndef UVERSION_H sl@0: #define UVERSION_H sl@0: sl@0: /** sl@0: * IMPORTANT: When updating version, the following things need to be done: sl@0: * source/common/unicode/uversion.h - this file: update major, minor, sl@0: * patchlevel, suffix, version, short version constants, namespace, sl@0: * and copyright sl@0: * source/common/common.vcproj - update 'Output file name' on the link tab so sl@0: * that it contains the new major/minor combination sl@0: * source/i18n/i18n.vcproj - same as for the common.vcproj sl@0: * source/layout/layout.vcproj - same as for the common.vcproj sl@0: * source/stubdata/stubdata.vcproj - same as for the common.vcproj sl@0: * source/io/io.vcproj - same as for the common.vcproj sl@0: * source/data/makedata.mak - change U_ICUDATA_NAME so that it contains sl@0: * the new major/minor combination sl@0: * source/tools/genren/genren.pl - use this script according to the README sl@0: * in that folder sl@0: */ sl@0: sl@0: #include "unicode/umachine.h" sl@0: sl@0: /** The standard copyright notice that gets compiled into each library. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_COPYRIGHT_STRING \ sl@0: " Copyright (C) 2005, International Business Machines Corporation and others. All Rights Reserved. " sl@0: sl@0: /** Maximum length of the copyright string. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_COPYRIGHT_STRING_LENGTH 128 sl@0: sl@0: /** The current ICU major version as an integer. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_ICU_VERSION_MAJOR_NUM 3 sl@0: sl@0: /** The current ICU minor version as an integer. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.6 sl@0: */ sl@0: #define U_ICU_VERSION_MINOR_NUM 4 sl@0: sl@0: /** The current ICU patchlevel version as an integer. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_ICU_VERSION_PATCHLEVEL_NUM 0 sl@0: sl@0: /** Glued version suffix for renamers sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.6 sl@0: */ sl@0: #define U_ICU_VERSION_SUFFIX _3_4 sl@0: sl@0: /** The current ICU library version as a dotted-decimal string. The patchlevel sl@0: * only appears in this string if it non-zero. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_ICU_VERSION "3.4" sl@0: sl@0: /** The current ICU library major/minor version as a string without dots, for library name suffixes. sl@0: * This value will change in the subsequent releases of ICU sl@0: * @stable ICU 2.6 sl@0: */ sl@0: #define U_ICU_VERSION_SHORT "34" sl@0: sl@0: /** An ICU version consists of up to 4 numbers from 0..255. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_MAX_VERSION_LENGTH 4 sl@0: sl@0: /** In a string, ICU version fields are delimited by dots. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_VERSION_DELIMITER '.' sl@0: sl@0: /** The maximum length of an ICU version string. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define U_MAX_VERSION_STRING_LENGTH 20 sl@0: sl@0: /** The binary form of a version on ICU APIs is an array of 4 uint8_t. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH]; sl@0: sl@0: #if U_HAVE_NAMESPACE && defined(XP_CPLUSPLUS) sl@0: #if U_DISABLE_RENAMING sl@0: #define U_ICU_NAMESPACE icu sl@0: namespace U_ICU_NAMESPACE { } sl@0: #else sl@0: #define U_ICU_NAMESPACE icu_3_4 sl@0: namespace U_ICU_NAMESPACE { } sl@0: namespace icu = U_ICU_NAMESPACE; sl@0: #endif sl@0: U_NAMESPACE_USE sl@0: #endif sl@0: sl@0: sl@0: /*===========================================================================*/ sl@0: /* General version helper functions. Definitions in putil.c */ sl@0: /*===========================================================================*/ sl@0: sl@0: /** sl@0: * Parse a string with dotted-decimal version information and sl@0: * fill in a UVersionInfo structure with the result. sl@0: * Definition of this function lives in putil.c sl@0: * sl@0: * @param versionArray The destination structure for the version information. sl@0: * @param versionString A string with dotted-decimal version information, sl@0: * with up to four non-negative number fields with sl@0: * values of up to 255 each. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_versionFromString(UVersionInfo versionArray, const char *versionString); sl@0: sl@0: /** sl@0: * Write a string with dotted-decimal version information according sl@0: * to the input UVersionInfo. sl@0: * Definition of this function lives in putil.c sl@0: * sl@0: * @param versionArray The version information to be written as a string. sl@0: * @param versionString A string buffer that will be filled in with sl@0: * a string corresponding to the numeric version sl@0: * information in versionArray. sl@0: * The buffer size must be at least U_MAX_VERSION_STRING_LENGTH. sl@0: * @stable ICU 2.4 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_versionToString(UVersionInfo versionArray, char *versionString); sl@0: sl@0: /** sl@0: * Gets the ICU release version. The version array stores the version information sl@0: * for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02. sl@0: * Definition of this function lives in putil.c sl@0: * sl@0: * @param versionArray the version # information, the result will be filled in sl@0: * @stable ICU 2.0 sl@0: */ sl@0: U_STABLE void U_EXPORT2 sl@0: u_getVersion(UVersionInfo versionArray); sl@0: sl@0: sl@0: /*=========================================================================== sl@0: * ICU collation framework version information sl@0: * Version info that can be obtained from a collator is affected by these sl@0: * numbers in a secret and magic way. Please use collator version as whole sl@0: *=========================================================================== sl@0: */ sl@0: sl@0: /** Collation runtime version (sort key generator, strcoll). sl@0: * If the version is different, sortkeys for the same string could be different sl@0: * version 2 was in ICU 1.8.1. changed is: compression intervals, French secondary sl@0: * compression, generating quad level always when strength is quad or more sl@0: * version 4 - ICU 2.2 - tracking UCA changes, ignore completely ignorables sl@0: * in contractions, ignore primary ignorables after shifted sl@0: * version 5 - ICU 2.8 - changed implicit generation code sl@0: * version 6 - ICU 3.4 - with the UCA 4.1, Thai tag is no longer generated or used sl@0: * This value may change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define UCOL_RUNTIME_VERSION 6 sl@0: sl@0: /** Builder code version. When this is different, same tailoring might result sl@0: * in assigning different collation elements to code points sl@0: * version 2 was in ICU 1.8.1. added support for prefixes, tweaked canonical sl@0: * closure. However, the tailorings should probably get same CEs assigned sl@0: * version 5 - ICU 2.2 - fixed some bugs, renamed some indirect values. sl@0: * version 6 - ICU 2.8 - fixed bug in builder that allowed 0xFF in primary values sl@0: * version 7 - ICU 3.4 - with the UCA 4.1 Thai tag is no longer processed, complete ignorables sl@0: * now break contractions sl@0: * Backward compatible with the old rules. sl@0: * This value may change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define UCOL_BUILDER_VERSION 7 sl@0: sl@0: /** *** Removed *** Instead we use the data we read from FractionalUCA.txt sl@0: * This is the version of FractionalUCA.txt tailoring rules sl@0: * Version 1 was in ICU 1.8.1. Version two contains canonical closure for sl@0: * supplementary code points sl@0: * Version 4 in ICU 2.2, following UCA=3.1.1d6, UCD=3.2.0 sl@0: * This value may change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: /*#define UCOL_FRACTIONAL_UCA_VERSION 4*/ sl@0: sl@0: /** This is the version of the tailorings sl@0: * This value may change in the subsequent releases of ICU sl@0: * @stable ICU 2.4 sl@0: */ sl@0: #define UCOL_TAILORINGS_VERSION 1 sl@0: sl@0: #endif