commonmarker 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of commonmarker might be problematic. Click here for more details.

Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/ext/commonmarker/cmark/CMakeLists.txt +2 -2
  3. data/ext/commonmarker/cmark/api_test/main.c +98 -90
  4. data/ext/commonmarker/cmark/build/CMakeCache.txt +82 -59
  5. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeCCompiler.cmake +6 -6
  6. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeCXXCompiler.cmake +6 -6
  7. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeDetermineCompilerABI_C.bin +0 -0
  8. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeDetermineCompilerABI_CXX.bin +0 -0
  9. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CMakeSystem.cmake +4 -4
  10. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdC/a.out +0 -0
  11. data/ext/commonmarker/cmark/build/CMakeFiles/3.3.2/CompilerIdCXX/a.out +0 -0
  12. data/ext/commonmarker/cmark/build/CMakeFiles/CMakeError.log +6 -7
  13. data/ext/commonmarker/cmark/build/CMakeFiles/CMakeOutput.log +216 -381
  14. data/ext/commonmarker/cmark/build/CMakeFiles/Makefile.cmake +69 -0
  15. data/ext/commonmarker/cmark/build/CMakeFiles/feature_tests.bin +0 -0
  16. data/ext/commonmarker/cmark/build/Makefile +1 -1
  17. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/build.make +10 -10
  18. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/flags.make +2 -2
  19. data/ext/commonmarker/cmark/build/api_test/CMakeFiles/api_test.dir/link.txt +1 -1
  20. data/ext/commonmarker/cmark/build/api_test/Makefile +1 -1
  21. data/ext/commonmarker/cmark/build/man/Makefile +1 -1
  22. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/build.make +60 -60
  23. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/flags.make +1 -1
  24. data/ext/commonmarker/cmark/build/src/CMakeFiles/cmark.dir/link.txt +1 -1
  25. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/DependInfo.cmake +1 -1
  26. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/build.make +80 -80
  27. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/cmake_clean.cmake +1 -1
  28. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/flags.make +1 -1
  29. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark.dir/link.txt +1 -1
  30. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/C.includecache +4 -0
  31. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/blocks.c.o +0 -0
  32. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/build.make +57 -57
  33. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/cmark.c.o +0 -0
  34. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/commonmark.c.o +0 -0
  35. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/flags.make +1 -1
  36. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/html.c.o +0 -0
  37. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/iterator.c.o +0 -0
  38. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/latex.c.o +0 -0
  39. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/link.txt +2 -2
  40. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/man.c.o +0 -0
  41. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/node.c.o +0 -0
  42. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/render.c.o +0 -0
  43. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/scanners.c.o +0 -0
  44. data/ext/commonmarker/cmark/build/src/CMakeFiles/libcmark_static.dir/xml.c.o +0 -0
  45. data/ext/commonmarker/cmark/build/src/Makefile +1 -1
  46. data/ext/commonmarker/cmark/build/src/cmake_install.cmake +5 -5
  47. data/ext/commonmarker/cmark/build/src/cmark_version.h +2 -2
  48. data/ext/commonmarker/cmark/build/src/config.h +51 -0
  49. data/ext/commonmarker/cmark/build/src/libcmark.a +0 -0
  50. data/ext/commonmarker/cmark/build/src/libcmark.pc +1 -1
  51. data/ext/commonmarker/cmark/build/testdir/Makefile +1 -1
  52. data/ext/commonmarker/cmark/changelog.txt +54 -0
  53. data/ext/commonmarker/cmark/man/make_man_page.py +3 -1
  54. data/ext/commonmarker/cmark/man/man3/cmark.3 +114 -15
  55. data/ext/commonmarker/cmark/src/blocks.c +1 -5
  56. data/ext/commonmarker/cmark/src/chunk.h +4 -4
  57. data/ext/commonmarker/cmark/src/cmark.h +13 -7
  58. data/ext/commonmarker/cmark/src/commonmark.c +45 -27
  59. data/ext/commonmarker/cmark/src/config.h.in +51 -0
  60. data/ext/commonmarker/cmark/src/html.c +9 -7
  61. data/ext/commonmarker/cmark/src/iterator.c +3 -0
  62. data/ext/commonmarker/cmark/src/latex.c +4 -2
  63. data/ext/commonmarker/cmark/src/man.c +3 -2
  64. data/ext/commonmarker/cmark/src/node.c +10 -2
  65. data/ext/commonmarker/cmark/src/render.c +17 -5
  66. data/ext/commonmarker/cmark/src/scanners.c +10457 -16407
  67. data/ext/commonmarker/cmark/src/scanners.re +3 -3
  68. data/ext/commonmarker/cmark/src/xml.c +10 -7
  69. data/ext/commonmarker/cmark/test/smart_punct.txt +30 -30
  70. data/ext/commonmarker/cmark/test/spec.txt +2152 -1440
  71. data/ext/commonmarker/cmark/test/spec_tests.py +21 -17
  72. data/ext/commonmarker/cmark/wrappers/wrapper.py +1 -1
  73. data/lib/commonmarker/version.rb +1 -1
  74. data/test/test_helper.rb +23 -21
  75. data/test/test_smartpunct.rb +1 -1
  76. data/test/test_spec.rb +1 -1
  77. metadata +2 -11
  78. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CMakeCCompiler.cmake +0 -55
  79. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CMakeCXXCompiler.cmake +0 -56
  80. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CMakeDetermineCompilerABI_C.bin +0 -0
  81. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CMakeDetermineCompilerABI_CXX.bin +0 -0
  82. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CMakeSystem.cmake +0 -15
  83. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CompilerIdC/CMakeCCompilerId.c +0 -393
  84. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CompilerIdC/a.out +0 -0
  85. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CompilerIdCXX/CMakeCXXCompilerId.cpp +0 -375
  86. data/ext/commonmarker/cmark/build/CMakeFiles/2.8.10.1/CompilerIdCXX/a.out +0 -0
@@ -1,375 +0,0 @@
1
- /* This source file must have a .cpp extension so that all C++ compilers
2
- recognize the extension without flags. Borland does not know .cxx for
3
- example. */
4
- #ifndef __cplusplus
5
- # error "A C compiler has been selected for C++."
6
- #endif
7
-
8
- /* Version number components: V=Version, R=Revision, P=Patch
9
- Version date components: YYYY=Year, MM=Month, DD=Day */
10
-
11
- #if defined(__COMO__)
12
- # define COMPILER_ID "Comeau"
13
- /* __COMO_VERSION__ = VRR */
14
- # define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
15
- # define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
16
-
17
- #elif defined(__INTEL_COMPILER) || defined(__ICC)
18
- # define COMPILER_ID "Intel"
19
- /* __INTEL_COMPILER = VRP */
20
- # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
21
- # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
22
- # define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
23
- # if defined(__INTEL_COMPILER_BUILD_DATE)
24
- /* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
25
- # define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
26
- # endif
27
-
28
- #elif defined(__PATHCC__)
29
- # define COMPILER_ID "PathScale"
30
- # define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
31
- # define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
32
- # if defined(__PATHCC_PATCHLEVEL__)
33
- # define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
34
- # endif
35
-
36
- #elif defined(__clang__)
37
- # define COMPILER_ID "Clang"
38
- # define COMPILER_VERSION_MAJOR DEC(__clang_major__)
39
- # define COMPILER_VERSION_MINOR DEC(__clang_minor__)
40
- # define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
41
-
42
- #elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
43
- # define COMPILER_ID "Embarcadero"
44
- # define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
45
- # define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
46
- # define COMPILER_VERSION_PATCH HEX(__CODEGEARC_VERSION__ & 0xFFFF)
47
-
48
- #elif defined(__BORLANDC__)
49
- # define COMPILER_ID "Borland"
50
- /* __BORLANDC__ = 0xVRR */
51
- # define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
52
- # define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
53
-
54
- #elif defined(__WATCOMC__)
55
- # define COMPILER_ID "Watcom"
56
- /* __WATCOMC__ = VVRR */
57
- # define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
58
- # define COMPILER_VERSION_MINOR DEC(__WATCOMC__ % 100)
59
-
60
- #elif defined(__SUNPRO_CC)
61
- # define COMPILER_ID "SunPro"
62
- # if __SUNPRO_CC >= 0x5100
63
- /* __SUNPRO_CC = 0xVRRP */
64
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
65
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
66
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
67
- # else
68
- /* __SUNPRO_CC = 0xVRP */
69
- # define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
70
- # define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
71
- # define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
72
- # endif
73
-
74
- #elif defined(__HP_aCC)
75
- # define COMPILER_ID "HP"
76
- /* __HP_aCC = VVRRPP */
77
- # define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
78
- # define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
79
- # define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
80
-
81
- #elif defined(__DECCXX)
82
- # define COMPILER_ID "Compaq"
83
- /* __DECCXX_VER = VVRRTPPPP */
84
- # define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
85
- # define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
86
- # define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
87
-
88
- #elif defined(__IBMCPP__)
89
- # if defined(__COMPILER_VER__)
90
- # define COMPILER_ID "zOS"
91
- # else
92
- # if __IBMCPP__ >= 800
93
- # define COMPILER_ID "XL"
94
- # else
95
- # define COMPILER_ID "VisualAge"
96
- # endif
97
- /* __IBMCPP__ = VRP */
98
- # define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
99
- # define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
100
- # define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
101
- # endif
102
-
103
- #elif defined(__PGI)
104
- # define COMPILER_ID "PGI"
105
- # define COMPILER_VERSION_MAJOR DEC(__PGIC__)
106
- # define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
107
- # if defined(__PGIC_PATCHLEVEL__)
108
- # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
109
- # endif
110
-
111
- #elif defined(_CRAYC)
112
- # define COMPILER_ID "Cray"
113
- # define COMPILER_VERSION_MAJOR DEC(_RELEASE)
114
- # define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
115
-
116
- #elif defined(__TI_COMPILER_VERSION__)
117
- # define COMPILER_ID "TI_DSP"
118
- /* __TI_COMPILER_VERSION__ = VVVRRRPPP */
119
- # define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
120
- # define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
121
- # define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
122
-
123
- #elif defined(__SCO_VERSION__)
124
- # define COMPILER_ID "SCO"
125
-
126
- #elif defined(__GNUC__)
127
- # define COMPILER_ID "GNU"
128
- # define COMPILER_VERSION_MAJOR DEC(__GNUC__)
129
- # define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
130
- # if defined(__GNUC_PATCHLEVEL__)
131
- # define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
132
- # endif
133
-
134
- #elif defined(_MSC_VER)
135
- # define COMPILER_ID "MSVC"
136
- /* _MSC_VER = VVRR */
137
- # define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
138
- # define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
139
- # if defined(_MSC_FULL_VER)
140
- # if _MSC_VER >= 1400
141
- /* _MSC_FULL_VER = VVRRPPPPP */
142
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
143
- # else
144
- /* _MSC_FULL_VER = VVRRPPPP */
145
- # define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
146
- # endif
147
- # endif
148
- # if defined(_MSC_BUILD)
149
- # define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
150
- # endif
151
-
152
- /* Analog VisualDSP++ >= 4.5.6 */
153
- #elif defined(__VISUALDSPVERSION__)
154
- # define COMPILER_ID "ADSP"
155
- /* __VISUALDSPVERSION__ = 0xVVRRPP00 */
156
- # define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
157
- # define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
158
- # define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
159
-
160
- /* Analog VisualDSP++ < 4.5.6 */
161
- #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
162
- # define COMPILER_ID "ADSP"
163
-
164
- #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
165
- # define COMPILER_ID "MIPSpro"
166
- # if defined(_SGI_COMPILER_VERSION)
167
- /* _SGI_COMPILER_VERSION = VRP */
168
- # define COMPILER_VERSION_MAJOR DEC(_SGI_COMPILER_VERSION/100)
169
- # define COMPILER_VERSION_MINOR DEC(_SGI_COMPILER_VERSION/10 % 10)
170
- # define COMPILER_VERSION_PATCH DEC(_SGI_COMPILER_VERSION % 10)
171
- # else
172
- /* _COMPILER_VERSION = VRP */
173
- # define COMPILER_VERSION_MAJOR DEC(_COMPILER_VERSION/100)
174
- # define COMPILER_VERSION_MINOR DEC(_COMPILER_VERSION/10 % 10)
175
- # define COMPILER_VERSION_PATCH DEC(_COMPILER_VERSION % 10)
176
- # endif
177
-
178
- /* This compiler is either not known or is too old to define an
179
- identification macro. Try to identify the platform and guess that
180
- it is the native compiler. */
181
- #elif defined(__sgi)
182
- # define COMPILER_ID "MIPSpro"
183
-
184
- #elif defined(__hpux) || defined(__hpua)
185
- # define COMPILER_ID "HP"
186
-
187
- #else /* unknown compiler */
188
- # define COMPILER_ID ""
189
-
190
- #endif
191
-
192
- /* Construct the string literal in pieces to prevent the source from
193
- getting matched. Store it in a pointer rather than an array
194
- because some compilers will just produce instructions to fill the
195
- array rather than assigning a pointer to a static array. */
196
- char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
197
-
198
- /* Identify known platforms by name. */
199
- #if defined(__linux) || defined(__linux__) || defined(linux)
200
- # define PLATFORM_ID "Linux"
201
-
202
- #elif defined(__CYGWIN__)
203
- # define PLATFORM_ID "Cygwin"
204
-
205
- #elif defined(__MINGW32__)
206
- # define PLATFORM_ID "MinGW"
207
-
208
- #elif defined(__APPLE__)
209
- # define PLATFORM_ID "Darwin"
210
-
211
- #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
212
- # define PLATFORM_ID "Windows"
213
-
214
- #elif defined(__FreeBSD__) || defined(__FreeBSD)
215
- # define PLATFORM_ID "FreeBSD"
216
-
217
- #elif defined(__NetBSD__) || defined(__NetBSD)
218
- # define PLATFORM_ID "NetBSD"
219
-
220
- #elif defined(__OpenBSD__) || defined(__OPENBSD)
221
- # define PLATFORM_ID "OpenBSD"
222
-
223
- #elif defined(__sun) || defined(sun)
224
- # define PLATFORM_ID "SunOS"
225
-
226
- #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
227
- # define PLATFORM_ID "AIX"
228
-
229
- #elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
230
- # define PLATFORM_ID "IRIX"
231
-
232
- #elif defined(__hpux) || defined(__hpux__)
233
- # define PLATFORM_ID "HP-UX"
234
-
235
- #elif defined(__HAIKU) || defined(__HAIKU__) || defined(_HAIKU)
236
- # define PLATFORM_ID "Haiku"
237
- /* Haiku also defines __BEOS__ so we must
238
- put it prior to the check for __BEOS__
239
- */
240
-
241
- #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
242
- # define PLATFORM_ID "BeOS"
243
-
244
- #elif defined(__QNX__) || defined(__QNXNTO__)
245
- # define PLATFORM_ID "QNX"
246
-
247
- #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
248
- # define PLATFORM_ID "Tru64"
249
-
250
- #elif defined(__riscos) || defined(__riscos__)
251
- # define PLATFORM_ID "RISCos"
252
-
253
- #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
254
- # define PLATFORM_ID "SINIX"
255
-
256
- #elif defined(__UNIX_SV__)
257
- # define PLATFORM_ID "UNIX_SV"
258
-
259
- #elif defined(__bsdos__)
260
- # define PLATFORM_ID "BSDOS"
261
-
262
- #elif defined(_MPRAS) || defined(MPRAS)
263
- # define PLATFORM_ID "MP-RAS"
264
-
265
- #elif defined(__osf) || defined(__osf__)
266
- # define PLATFORM_ID "OSF1"
267
-
268
- #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
269
- # define PLATFORM_ID "SCO_SV"
270
-
271
- #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
272
- # define PLATFORM_ID "ULTRIX"
273
-
274
- #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
275
- # define PLATFORM_ID "Xenix"
276
-
277
- #else /* unknown platform */
278
- # define PLATFORM_ID ""
279
-
280
- #endif
281
-
282
- /* For windows compilers MSVC and Intel we can determine
283
- the architecture of the compiler being used. This is because
284
- the compilers do not have flags that can change the architecture,
285
- but rather depend on which compiler is being used
286
- */
287
- #if defined(_WIN32) && defined(_MSC_VER)
288
- # if defined(_M_IA64)
289
- # define ARCHITECTURE_ID "IA64"
290
-
291
- # elif defined(_M_X64) || defined(_M_AMD64)
292
- # define ARCHITECTURE_ID "x64"
293
-
294
- # elif defined(_M_IX86)
295
- # define ARCHITECTURE_ID "X86"
296
-
297
- # elif defined(_M_ARM)
298
- # define ARCHITECTURE_ID "ARM"
299
-
300
- # elif defined(_M_MIPS)
301
- # define ARCHITECTURE_ID "MIPS"
302
-
303
- # elif defined(_M_SH)
304
- # define ARCHITECTURE_ID "SHx"
305
-
306
- # else /* unknown architecture */
307
- # define ARCHITECTURE_ID ""
308
- # endif
309
-
310
- #else
311
- # define ARCHITECTURE_ID ""
312
- #endif
313
-
314
- /* Convert integer to decimal digit literals. */
315
- #define DEC(n) \
316
- ('0' + (((n) / 10000000)%10)), \
317
- ('0' + (((n) / 1000000)%10)), \
318
- ('0' + (((n) / 100000)%10)), \
319
- ('0' + (((n) / 10000)%10)), \
320
- ('0' + (((n) / 1000)%10)), \
321
- ('0' + (((n) / 100)%10)), \
322
- ('0' + (((n) / 10)%10)), \
323
- ('0' + ((n) % 10))
324
-
325
- /* Convert integer to hex digit literals. */
326
- #define HEX(n) \
327
- ('0' + ((n)>>28 & 0xF)), \
328
- ('0' + ((n)>>24 & 0xF)), \
329
- ('0' + ((n)>>20 & 0xF)), \
330
- ('0' + ((n)>>16 & 0xF)), \
331
- ('0' + ((n)>>12 & 0xF)), \
332
- ('0' + ((n)>>8 & 0xF)), \
333
- ('0' + ((n)>>4 & 0xF)), \
334
- ('0' + ((n) & 0xF))
335
-
336
- /* Construct a string literal encoding the version number components. */
337
- #ifdef COMPILER_VERSION_MAJOR
338
- char const info_version[] = {
339
- 'I', 'N', 'F', 'O', ':',
340
- 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
341
- COMPILER_VERSION_MAJOR,
342
- # ifdef COMPILER_VERSION_MINOR
343
- '.', COMPILER_VERSION_MINOR,
344
- # ifdef COMPILER_VERSION_PATCH
345
- '.', COMPILER_VERSION_PATCH,
346
- # ifdef COMPILER_VERSION_TWEAK
347
- '.', COMPILER_VERSION_TWEAK,
348
- # endif
349
- # endif
350
- # endif
351
- ']','\0'};
352
- #endif
353
-
354
- /* Construct the string literal in pieces to prevent the source from
355
- getting matched. Store it in a pointer rather than an array
356
- because some compilers will just produce instructions to fill the
357
- array rather than assigning a pointer to a static array. */
358
- char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
359
- char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
360
-
361
-
362
-
363
- /*--------------------------------------------------------------------------*/
364
-
365
- int main(int argc, char* argv[])
366
- {
367
- int require = 0;
368
- require += info_compiler[argc];
369
- require += info_platform[argc];
370
- #ifdef COMPILER_VERSION_MAJOR
371
- require += info_version[argc];
372
- #endif
373
- (void)argv;
374
- return require;
375
- }