os/textandloc/fontservices/textshaperplugin/IcuSource/common/unicode/uversion.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 *******************************************************************************
     3 *   Copyright (C) 2000-2005, 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/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  */
    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
    50  *  @stable ICU 2.4
    51  */
    52 #define U_COPYRIGHT_STRING \
    53   " Copyright (C) 2005, International Business Machines Corporation and others. All Rights Reserved. "
    54 
    55 /** Maximum length of the copyright string.
    56  *  @stable ICU 2.4
    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
    62  *  @stable ICU 2.4
    63  */
    64 #define U_ICU_VERSION_MAJOR_NUM 3
    65 
    66 /** The current ICU minor version as an integer. 
    67  *  This value will change in the subsequent releases of ICU
    68  *  @stable ICU 2.6
    69  */
    70 #define U_ICU_VERSION_MINOR_NUM 4
    71 
    72 /** The current ICU patchlevel version as an integer.  
    73  *  This value will change in the subsequent releases of ICU
    74  *  @stable ICU 2.4
    75  */
    76 #define U_ICU_VERSION_PATCHLEVEL_NUM 0
    77 
    78 /** Glued version suffix for renamers 
    79  *  This value will change in the subsequent releases of ICU
    80  *  @stable ICU 2.6
    81  */
    82 #define U_ICU_VERSION_SUFFIX _3_4
    83 
    84 /** The current ICU library version as a dotted-decimal string. The patchlevel
    85  *  only appears in this string if it non-zero. 
    86  *  This value will change in the subsequent releases of ICU
    87  *  @stable ICU 2.4
    88  */
    89 #define U_ICU_VERSION "3.4"
    90 
    91 /** The current ICU library major/minor version as a string without dots, for library name suffixes. 
    92  *  This value will change in the subsequent releases of ICU
    93  *  @stable ICU 2.6
    94  */
    95 #define U_ICU_VERSION_SHORT "34"
    96 
    97 /** An ICU version consists of up to 4 numbers from 0..255.
    98  *  @stable ICU 2.4
    99  */
   100 #define U_MAX_VERSION_LENGTH 4
   101 
   102 /** In a string, ICU version fields are delimited by dots.
   103  *  @stable ICU 2.4
   104  */
   105 #define U_VERSION_DELIMITER '.'
   106 
   107 /** The maximum length of an ICU version string.
   108  *  @stable ICU 2.4
   109  */
   110 #define U_MAX_VERSION_STRING_LENGTH 20
   111 
   112 /** The binary form of a version on ICU APIs is an array of 4 uint8_t.
   113  *  @stable ICU 2.4
   114  */
   115 typedef uint8_t UVersionInfo[U_MAX_VERSION_LENGTH];
   116 
   117 #if U_HAVE_NAMESPACE && defined(XP_CPLUSPLUS)
   118 #if U_DISABLE_RENAMING
   119 #define U_ICU_NAMESPACE icu
   120 namespace U_ICU_NAMESPACE { }
   121 #else
   122 #define U_ICU_NAMESPACE icu_3_4
   123 namespace U_ICU_NAMESPACE { }
   124 namespace icu = U_ICU_NAMESPACE;
   125 #endif
   126 U_NAMESPACE_USE
   127 #endif
   128 
   129 
   130 /*===========================================================================*/
   131 /* General version helper functions. Definitions in putil.c                  */
   132 /*===========================================================================*/
   133 
   134 /**
   135  * Parse a string with dotted-decimal version information and
   136  * fill in a UVersionInfo structure with the result.
   137  * Definition of this function lives in putil.c
   138  *
   139  * @param versionArray The destination structure for the version information.
   140  * @param versionString A string with dotted-decimal version information,
   141  *                      with up to four non-negative number fields with
   142  *                      values of up to 255 each.
   143  * @stable ICU 2.4
   144  */
   145 U_STABLE void U_EXPORT2
   146 u_versionFromString(UVersionInfo versionArray, const char *versionString);
   147 
   148 /**
   149  * Write a string with dotted-decimal version information according
   150  * to the input UVersionInfo.
   151  * Definition of this function lives in putil.c
   152  *
   153  * @param versionArray The version information to be written as a string.
   154  * @param versionString A string buffer that will be filled in with
   155  *                      a string corresponding to the numeric version
   156  *                      information in versionArray.
   157  *                      The buffer size must be at least U_MAX_VERSION_STRING_LENGTH.
   158  * @stable ICU 2.4
   159  */
   160 U_STABLE void U_EXPORT2
   161 u_versionToString(UVersionInfo versionArray, char *versionString);
   162 
   163 /**
   164  * Gets the ICU release version.  The version array stores the version information
   165  * for ICU.  For example, release "1.3.31.2" is then represented as 0x01031F02.
   166  * Definition of this function lives in putil.c
   167  *
   168  * @param versionArray the version # information, the result will be filled in
   169  * @stable ICU 2.0
   170  */
   171 U_STABLE void U_EXPORT2
   172 u_getVersion(UVersionInfo versionArray);
   173 
   174 
   175 /*===========================================================================
   176  * ICU collation framework version information                               
   177  * Version info that can be obtained from a collator is affected by these    
   178  * numbers in a secret and magic way. Please use collator version as whole
   179  *===========================================================================
   180  */
   181 
   182 /** Collation runtime version (sort key generator, strcoll). 
   183  * If the version is different, sortkeys for the same string could be different 
   184  * version 2 was in ICU 1.8.1. changed is: compression intervals, French secondary 
   185  * compression, generating quad level always when strength is quad or more 
   186  * version 4 - ICU 2.2 - tracking UCA changes, ignore completely ignorables 
   187  * in contractions, ignore primary ignorables after shifted 
   188  * version 5 - ICU 2.8 - changed implicit generation code
   189  * version 6 - ICU 3.4 - with the UCA 4.1, Thai tag is no longer generated or used
   190  * This value may change in the subsequent releases of ICU
   191  * @stable ICU 2.4
   192  */
   193 #define UCOL_RUNTIME_VERSION 6
   194 
   195 /** Builder code version. When this is different, same tailoring might result
   196  * in assigning different collation elements to code points                  
   197  * version 2 was in ICU 1.8.1. added support for prefixes, tweaked canonical 
   198  * closure. However, the tailorings should probably get same CEs assigned    
   199  * version 5 - ICU 2.2 - fixed some bugs, renamed some indirect values.      
   200  * version 6 - ICU 2.8 - fixed bug in builder that allowed 0xFF in primary values
   201  * version 7 - ICU 3.4 - with the UCA 4.1 Thai tag is no longer processed, complete ignorables
   202  *                       now break contractions
   203  * Backward compatible with the old rules. 
   204  * This value may change in the subsequent releases of ICU
   205  * @stable ICU 2.4
   206  */
   207 #define UCOL_BUILDER_VERSION 7
   208 
   209 /** *** Removed *** Instead we use the data we read from FractionalUCA.txt
   210  * This is the version of FractionalUCA.txt tailoring rules
   211  * Version 1 was in ICU 1.8.1. Version two contains canonical closure for
   212  * supplementary code points 
   213  * Version 4 in ICU 2.2, following UCA=3.1.1d6, UCD=3.2.0 
   214  * This value may change in the subsequent releases of ICU
   215  * @stable ICU 2.4
   216  */
   217 /*#define UCOL_FRACTIONAL_UCA_VERSION 4*/
   218 
   219 /** This is the version of the tailorings 
   220  *  This value may change in the subsequent releases of ICU
   221  *  @stable ICU 2.4
   222  */
   223 #define UCOL_TAILORINGS_VERSION 1
   224 
   225 #endif