annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/include/unicode/uversion.h @ 69:33d812a61356

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 // © 2016 and later: Unicode, Inc. and others.
jpayne@69 2 // License & terms of use: http://www.unicode.org/copyright.html
jpayne@69 3 /*
jpayne@69 4 *******************************************************************************
jpayne@69 5 * Copyright (C) 2000-2011, International Business Machines
jpayne@69 6 * Corporation and others. All Rights Reserved.
jpayne@69 7 *******************************************************************************
jpayne@69 8 *
jpayne@69 9 * file name: uversion.h
jpayne@69 10 * encoding: UTF-8
jpayne@69 11 * tab size: 8 (not used)
jpayne@69 12 * indentation:4
jpayne@69 13 *
jpayne@69 14 * Created by: Vladimir Weinstein
jpayne@69 15 *
jpayne@69 16 * Gets included by utypes.h and Windows .rc files
jpayne@69 17 */
jpayne@69 18
jpayne@69 19 /**
jpayne@69 20 * \file
jpayne@69 21 * \brief C API: API for accessing ICU version numbers.
jpayne@69 22 */
jpayne@69 23 /*===========================================================================*/
jpayne@69 24 /* Main ICU version information */
jpayne@69 25 /*===========================================================================*/
jpayne@69 26
jpayne@69 27 #ifndef UVERSION_H
jpayne@69 28 #define UVERSION_H
jpayne@69 29
jpayne@69 30 #include "unicode/umachine.h"
jpayne@69 31
jpayne@69 32 /* Actual version info lives in uvernum.h */
jpayne@69 33 #include "unicode/uvernum.h"
jpayne@69 34
jpayne@69 35 /** Maximum length of the copyright string.
jpayne@69 36 * @stable ICU 2.4
jpayne@69 37 */
jpayne@69 38 #define U_COPYRIGHT_STRING_LENGTH 128
jpayne@69 39
jpayne@69 40 /** An ICU version consists of up to 4 numbers from 0..255.
jpayne@69 41 * @stable ICU 2.4
jpayne@69 42 */
jpayne@69 43 #define U_MAX_VERSION_LENGTH 4
jpayne@69 44
jpayne@69 45 /** In a string, ICU version fields are delimited by dots.
jpayne@69 46 * @stable ICU 2.4
jpayne@69 47 */
jpayne@69 48 #define U_VERSION_DELIMITER '.'
jpayne@69 49
jpayne@69 50 /** The maximum length of an ICU version string.
jpayne@69 51 * @stable ICU 2.4
jpayne@69 52 */
jpayne@69 53 #define U_MAX_VERSION_STRING_LENGTH 20
jpayne@69 54
jpayne@69 55 /** The binary form of a version on ICU APIs is an array of 4 uint8_t.
jpayne@69 56 * To compare two versions, use memcmp(v1,v2,sizeof(UVersionInfo)).
jpayne@69 57 * @stable ICU 2.4
jpayne@69 58 */
jpayne@69 59 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
jpayne@69 60
jpayne@69 61 /*===========================================================================*/
jpayne@69 62 /* C++ namespace if supported. Versioned unless versioning is disabled. */
jpayne@69 63 /*===========================================================================*/
jpayne@69 64
jpayne@69 65 /* Define C++ namespace symbols. */
jpayne@69 66 #ifdef __cplusplus
jpayne@69 67
jpayne@69 68 /**
jpayne@69 69 * \def U_NAMESPACE_BEGIN
jpayne@69 70 * This is used to begin a declaration of a public ICU C++ API within
jpayne@69 71 * versioned-ICU-namespace block.
jpayne@69 72 *
jpayne@69 73 * @stable ICU 2.4
jpayne@69 74 */
jpayne@69 75
jpayne@69 76 /**
jpayne@69 77 * \def U_NAMESPACE_END
jpayne@69 78 * This is used to end a declaration of a public ICU C++ API.
jpayne@69 79 * It ends the versioned-ICU-namespace block begun by U_NAMESPACE_BEGIN.
jpayne@69 80 *
jpayne@69 81 * @stable ICU 2.4
jpayne@69 82 */
jpayne@69 83
jpayne@69 84 /**
jpayne@69 85 * \def U_NAMESPACE_USE
jpayne@69 86 * This is used to specify that the rest of the code uses the
jpayne@69 87 * public ICU C++ API namespace.
jpayne@69 88 * @stable ICU 2.4
jpayne@69 89 */
jpayne@69 90
jpayne@69 91 /**
jpayne@69 92 * \def U_NAMESPACE_QUALIFIER
jpayne@69 93 * This is used to qualify that a function or class is part of
jpayne@69 94 * the public ICU C++ API namespace.
jpayne@69 95 *
jpayne@69 96 * This macro is unnecessary since ICU 49 requires namespace support.
jpayne@69 97 * You can just use "icu::" instead.
jpayne@69 98 * @stable ICU 2.4
jpayne@69 99 */
jpayne@69 100
jpayne@69 101 # if U_DISABLE_RENAMING
jpayne@69 102 # define U_ICU_NAMESPACE icu
jpayne@69 103 namespace U_ICU_NAMESPACE { }
jpayne@69 104 # else
jpayne@69 105 # define U_ICU_NAMESPACE U_ICU_ENTRY_POINT_RENAME(icu)
jpayne@69 106 namespace U_ICU_NAMESPACE { }
jpayne@69 107 namespace icu = U_ICU_NAMESPACE;
jpayne@69 108 # endif
jpayne@69 109
jpayne@69 110 # define U_NAMESPACE_BEGIN namespace U_ICU_NAMESPACE {
jpayne@69 111 # define U_NAMESPACE_END }
jpayne@69 112 # define U_NAMESPACE_USE using namespace U_ICU_NAMESPACE;
jpayne@69 113 # define U_NAMESPACE_QUALIFIER U_ICU_NAMESPACE::
jpayne@69 114
jpayne@69 115 # ifndef U_USING_ICU_NAMESPACE
jpayne@69 116 # if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \
jpayne@69 117 defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || \
jpayne@69 118 defined(U_LAYOUTEX_IMPLEMENTATION) || defined(U_TOOLUTIL_IMPLEMENTATION)
jpayne@69 119 # define U_USING_ICU_NAMESPACE 0
jpayne@69 120 # else
jpayne@69 121 # define U_USING_ICU_NAMESPACE 0
jpayne@69 122 # endif
jpayne@69 123 # endif
jpayne@69 124 # if U_USING_ICU_NAMESPACE
jpayne@69 125 U_NAMESPACE_USE
jpayne@69 126 # endif
jpayne@69 127 #endif /* __cplusplus */
jpayne@69 128
jpayne@69 129 /*===========================================================================*/
jpayne@69 130 /* General version helper functions. Definitions in putil.c */
jpayne@69 131 /*===========================================================================*/
jpayne@69 132
jpayne@69 133 /**
jpayne@69 134 * Parse a string with dotted-decimal version information and
jpayne@69 135 * fill in a UVersionInfo structure with the result.
jpayne@69 136 * Definition of this function lives in putil.c
jpayne@69 137 *
jpayne@69 138 * @param versionArray The destination structure for the version information.
jpayne@69 139 * @param versionString A string with dotted-decimal version information,
jpayne@69 140 * with up to four non-negative number fields with
jpayne@69 141 * values of up to 255 each.
jpayne@69 142 * @stable ICU 2.4
jpayne@69 143 */
jpayne@69 144 U_STABLE void U_EXPORT2
jpayne@69 145 u_versionFromString(UVersionInfo versionArray, const char *versionString);
jpayne@69 146
jpayne@69 147 /**
jpayne@69 148 * Parse a Unicode string with dotted-decimal version information and
jpayne@69 149 * fill in a UVersionInfo structure with the result.
jpayne@69 150 * Definition of this function lives in putil.c
jpayne@69 151 *
jpayne@69 152 * @param versionArray The destination structure for the version information.
jpayne@69 153 * @param versionString A Unicode string with dotted-decimal version
jpayne@69 154 * information, with up to four non-negative number
jpayne@69 155 * fields with values of up to 255 each.
jpayne@69 156 * @stable ICU 4.2
jpayne@69 157 */
jpayne@69 158 U_STABLE void U_EXPORT2
jpayne@69 159 u_versionFromUString(UVersionInfo versionArray, const UChar *versionString);
jpayne@69 160
jpayne@69 161
jpayne@69 162 /**
jpayne@69 163 * Write a string with dotted-decimal version information according
jpayne@69 164 * to the input UVersionInfo.
jpayne@69 165 * Definition of this function lives in putil.c
jpayne@69 166 *
jpayne@69 167 * @param versionArray The version information to be written as a string.
jpayne@69 168 * @param versionString A string buffer that will be filled in with
jpayne@69 169 * a string corresponding to the numeric version
jpayne@69 170 * information in versionArray.
jpayne@69 171 * The buffer size must be at least U_MAX_VERSION_STRING_LENGTH.
jpayne@69 172 * @stable ICU 2.4
jpayne@69 173 */
jpayne@69 174 U_STABLE void U_EXPORT2
jpayne@69 175 u_versionToString(const UVersionInfo versionArray, char *versionString);
jpayne@69 176
jpayne@69 177 /**
jpayne@69 178 * Gets the ICU release version. The version array stores the version information
jpayne@69 179 * for ICU. For example, release "1.3.31.2" is then represented as 0x01031F02.
jpayne@69 180 * Definition of this function lives in putil.c
jpayne@69 181 *
jpayne@69 182 * @param versionArray the version # information, the result will be filled in
jpayne@69 183 * @stable ICU 2.0
jpayne@69 184 */
jpayne@69 185 U_STABLE void U_EXPORT2
jpayne@69 186 u_getVersion(UVersionInfo versionArray);
jpayne@69 187 #endif