Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:06

0001 /*
0002 Copyright Rene Rivera 2008-2015
0003 Distributed under the Boost Software License, Version 1.0.
0004 (See accompanying file LICENSE_1_0.txt or copy at
0005 http://www.boost.org/LICENSE_1_0.txt)
0006 */
0007 #include <boost/predef/detail/test.h>
0008 
0009 #ifndef BOOST_PREDEF_MAKE_H
0010 #define BOOST_PREDEF_MAKE_H
0011 
0012 /*
0013 Shorthands for the common version number formats used by vendors...
0014 */
0015 
0016 /* tag::reference[]
0017 = `BOOST_PREDEF_MAKE_..` macros
0018 
0019 These set of macros decompose common vendor version number
0020 macros which are composed version, revision, and patch digits.
0021 The naming convention indicates:
0022 
0023 * The base of the specified version number. "`BOOST_PREDEF_MAKE_0X`" for
0024   hexadecimal digits, and "`BOOST_PREDEF_MAKE_10`" for decimal digits.
0025 * The format of the vendor version number. Where "`V`" indicates the version digits,
0026   "`R`" indicates the revision digits, "`P`" indicates the patch digits, and "`0`"
0027   indicates an ignored digit.
0028 
0029 Macros are:
0030 
0031 */ // end::reference[]
0032 /* tag::reference[]
0033 * `BOOST_PREDEF_MAKE_0X_VRP(V)`
0034 */ // end::reference[]
0035 #define BOOST_PREDEF_MAKE_0X_VRP(V) BOOST_VERSION_NUMBER((V&0xF00)>>8,(V&0xF0)>>4,(V&0xF))
0036 /* tag::reference[]
0037 * `BOOST_PREDEF_MAKE_0X_VVRP(V)`
0038 */ // end::reference[]
0039 #define BOOST_PREDEF_MAKE_0X_VVRP(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xF0)>>4,(V&0xF))
0040 /* tag::reference[]
0041 * `BOOST_PREDEF_MAKE_0X_VRPP(V)`
0042 */ // end::reference[]
0043 #define BOOST_PREDEF_MAKE_0X_VRPP(V) BOOST_VERSION_NUMBER((V&0xF000)>>12,(V&0xF00)>>8,(V&0xFF))
0044 /* tag::reference[]
0045 * `BOOST_PREDEF_MAKE_0X_VVRR(V)`
0046 */ // end::reference[]
0047 #define BOOST_PREDEF_MAKE_0X_VVRR(V) BOOST_VERSION_NUMBER((V&0xFF00)>>8,(V&0xFF),0)
0048 /* tag::reference[]
0049 * `BOOST_PREDEF_MAKE_0X_VRRPPPP(V)`
0050 */ // end::reference[]
0051 #define BOOST_PREDEF_MAKE_0X_VRRPPPP(V) BOOST_VERSION_NUMBER((V&0xF000000)>>24,(V&0xFF0000)>>16,(V&0xFFFF))
0052 /* tag::reference[]
0053 * `BOOST_PREDEF_MAKE_0X_VVRRP(V)`
0054 */ // end::reference[]
0055 #define BOOST_PREDEF_MAKE_0X_VVRRP(V) BOOST_VERSION_NUMBER((V&0xFF000)>>12,(V&0xFF0)>>4,(V&0xF))
0056 /* tag::reference[]
0057 * `BOOST_PREDEF_MAKE_0X_VRRPP000(V)`
0058 */ // end::reference[]
0059 #define BOOST_PREDEF_MAKE_0X_VRRPP000(V) BOOST_VERSION_NUMBER((V&0xF0000000)>>28,(V&0xFF00000)>>20,(V&0xFF000)>>12)
0060 /* tag::reference[]
0061 * `BOOST_PREDEF_MAKE_0X_VVRRPP(V)`
0062 */ // end::reference[]
0063 #define BOOST_PREDEF_MAKE_0X_VVRRPP(V) BOOST_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF))
0064 /* tag::reference[]
0065 * `BOOST_PREDEF_MAKE_10_VPPP(V)`
0066 */ // end::reference[]
0067 #define BOOST_PREDEF_MAKE_10_VPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000)
0068 /* tag::reference[]
0069 * `BOOST_PREDEF_MAKE_10_VVPPP(V)`
0070 */ // end::reference[]
0071 #define BOOST_PREDEF_MAKE_10_VVPPP(V) BOOST_VERSION_NUMBER(((V)/1000)%100,0,(V)%1000)
0072 /* tag::reference[]
0073 * `BOOST_PREDEF_MAKE_10_VR0(V)`
0074 */ // end::reference[]
0075 #define BOOST_PREDEF_MAKE_10_VR0(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,0)
0076 /* tag::reference[]
0077 * `BOOST_PREDEF_MAKE_10_VRP(V)`
0078 */ // end::reference[]
0079 #define BOOST_PREDEF_MAKE_10_VRP(V) BOOST_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10)
0080 /* tag::reference[]
0081 * `BOOST_PREDEF_MAKE_10_VRP000(V)`
0082 */ // end::reference[]
0083 #define BOOST_PREDEF_MAKE_10_VRP000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10)
0084 /* tag::reference[]
0085 * `BOOST_PREDEF_MAKE_10_VRPPPP(V)`
0086 */ // end::reference[]
0087 #define BOOST_PREDEF_MAKE_10_VRPPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,(V)%10000)
0088 /* tag::reference[]
0089 * `BOOST_PREDEF_MAKE_10_VRPP(V)`
0090 */ // end::reference[]
0091 #define BOOST_PREDEF_MAKE_10_VRPP(V) BOOST_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100)
0092 /* tag::reference[]
0093 * `BOOST_PREDEF_MAKE_10_VRR(V)`
0094 */ // end::reference[]
0095 #define BOOST_PREDEF_MAKE_10_VRR(V) BOOST_VERSION_NUMBER(((V)/100)%10,(V)%100,0)
0096 /* tag::reference[]
0097 * `BOOST_PREDEF_MAKE_10_VRRPP(V)`
0098 */ // end::reference[]
0099 #define BOOST_PREDEF_MAKE_10_VRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%10,((V)/100)%100,(V)%100)
0100 /* tag::reference[]
0101 * `BOOST_PREDEF_MAKE_10_VRR000(V)`
0102 */ // end::reference[]
0103 #define BOOST_PREDEF_MAKE_10_VRR000(V) BOOST_VERSION_NUMBER(((V)/100000)%10,((V)/1000)%100,0)
0104 /* tag::reference[]
0105 * `BOOST_PREDEF_MAKE_10_VV00(V)`
0106 */ // end::reference[]
0107 #define BOOST_PREDEF_MAKE_10_VV00(V) BOOST_VERSION_NUMBER(((V)/100)%100,0,0)
0108 /* tag::reference[]
0109 * `BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P)`, the second parameter specifies a year-month patch level with the first digit discarded
0110 */ // end::reference[]
0111 #define BOOST_PREDEF_MAKE_10_VVR_0PPPPP(V, P) BOOST_VERSION_NUMBER(((V)/10)%100,(V)%10,(P)%100000)
0112 /* tag::reference[]
0113 * `BOOST_PREDEF_MAKE_10_VVRR(V)`
0114 */ // end::reference[]
0115 #define BOOST_PREDEF_MAKE_10_VVRR(V) BOOST_VERSION_NUMBER(((V)/100)%100,(V)%100,0)
0116 /* tag::reference[]
0117 * `BOOST_PREDEF_MAKE_10_VVRRP(V)`
0118 */ // end::reference[]
0119 #define BOOST_PREDEF_MAKE_10_VVRRP(V) BOOST_VERSION_NUMBER(((V)/1000)%100,((V)/10)%100,(V)%10)
0120 /* tag::reference[]
0121 * `BOOST_PREDEF_MAKE_10_VVRRPP(V)`
0122 */ // end::reference[]
0123 #define BOOST_PREDEF_MAKE_10_VVRRPP(V) BOOST_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100)
0124 /* tag::reference[]
0125 * `BOOST_PREDEF_MAKE_10_VVRRPPP(V)`
0126 */ // end::reference[]
0127 #define BOOST_PREDEF_MAKE_10_VVRRPPP(V) BOOST_VERSION_NUMBER(((V)/100000)%100,((V)/1000)%100,(V)%1000)
0128 /* tag::reference[]
0129 * `BOOST_PREDEF_MAKE_10_VVRR0PP00(V)`
0130 */ // end::reference[]
0131 #define BOOST_PREDEF_MAKE_10_VVRR0PP00(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100)
0132 /* tag::reference[]
0133 * `BOOST_PREDEF_MAKE_10_VVRR0PPPP(V)`
0134 */ // end::reference[]
0135 #define BOOST_PREDEF_MAKE_10_VVRR0PPPP(V) BOOST_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,(V)%10000)
0136 /* tag::reference[]
0137 * `BOOST_PREDEF_MAKE_10_VVRR00PP00(V)`
0138 */ // end::reference[]
0139 #define BOOST_PREDEF_MAKE_10_VVRR00PP00(V) BOOST_VERSION_NUMBER(((V)/100000000)%100,((V)/1000000)%100,((V)/100)%100)
0140 
0141 /* tag::reference[]
0142 
0143 = `BOOST_PREDEF_MAKE_*..` date macros
0144 
0145 Date decomposition macros return a date in the relative to the 1970
0146 Epoch date. If the month is not available, January 1st is used as the month and day.
0147 If the day is not available, but the month is, the 1st of the month is used as the day.
0148 
0149 */ // end::reference[]
0150 /* tag::reference[]
0151 * `BOOST_PREDEF_MAKE_DATE(Y,M,D)`
0152 */ // end::reference[]
0153 #define BOOST_PREDEF_MAKE_DATE(Y,M,D) BOOST_VERSION_NUMBER((Y)%10000-1970,(M)%100,(D)%100)
0154 /* tag::reference[]
0155 * `BOOST_PREDEF_MAKE_YYYYMMDD(V)`
0156 */ // end::reference[]
0157 #define BOOST_PREDEF_MAKE_YYYYMMDD(V) BOOST_PREDEF_MAKE_DATE(((V)/10000)%10000,((V)/100)%100,(V)%100)
0158 /* tag::reference[]
0159 * `BOOST_PREDEF_MAKE_YYYY(V)`
0160 */ // end::reference[]
0161 #define BOOST_PREDEF_MAKE_YYYY(V) BOOST_PREDEF_MAKE_DATE(V,1,1)
0162 /* tag::reference[]
0163 * `BOOST_PREDEF_MAKE_YYYYMM(V)`
0164 */ // end::reference[]
0165 #define BOOST_PREDEF_MAKE_YYYYMM(V) BOOST_PREDEF_MAKE_DATE((V)/100,(V)%100,1)
0166 
0167 #endif