tcc 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (283) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +35 -0
  3. data/README.md +196 -0
  4. data/ext/tcc/extconf.rb +25 -0
  5. data/ext/tcc/tcc-0.9.26.patch +30 -0
  6. data/ext/tcc/tcc-0.9.26/COPYING +504 -0
  7. data/ext/tcc/tcc-0.9.26/Changelog +396 -0
  8. data/ext/tcc/tcc-0.9.26/Makefile +349 -0
  9. data/ext/tcc/tcc-0.9.26/README +101 -0
  10. data/ext/tcc/tcc-0.9.26/TODO +93 -0
  11. data/ext/tcc/tcc-0.9.26/VERSION +1 -0
  12. data/ext/tcc/tcc-0.9.26/arm-gen.c +2005 -0
  13. data/ext/tcc/tcc-0.9.26/c67-gen.c +2560 -0
  14. data/ext/tcc/tcc-0.9.26/coff.h +446 -0
  15. data/ext/tcc/tcc-0.9.26/config.h +8 -0
  16. data/ext/tcc/tcc-0.9.26/config.mak +28 -0
  17. data/ext/tcc/tcc-0.9.26/config.texi +1 -0
  18. data/ext/tcc/tcc-0.9.26/configure +540 -0
  19. data/ext/tcc/tcc-0.9.26/conftest.c +71 -0
  20. data/ext/tcc/tcc-0.9.26/elf.h +1731 -0
  21. data/ext/tcc/tcc-0.9.26/examples/ex1.c +8 -0
  22. data/ext/tcc/tcc-0.9.26/examples/ex2.c +98 -0
  23. data/ext/tcc/tcc-0.9.26/examples/ex3.c +24 -0
  24. data/ext/tcc/tcc-0.9.26/examples/ex4.c +26 -0
  25. data/ext/tcc/tcc-0.9.26/examples/ex5.c +8 -0
  26. data/ext/tcc/tcc-0.9.26/i386-asm.c +1498 -0
  27. data/ext/tcc/tcc-0.9.26/i386-asm.h +473 -0
  28. data/ext/tcc/tcc-0.9.26/i386-gen.c +1096 -0
  29. data/ext/tcc/tcc-0.9.26/i386-tok.h +243 -0
  30. data/ext/tcc/tcc-0.9.26/il-gen.c +667 -0
  31. data/ext/tcc/tcc-0.9.26/il-opcodes.h +251 -0
  32. data/ext/tcc/tcc-0.9.26/include/float.h +57 -0
  33. data/ext/tcc/tcc-0.9.26/include/stdarg.h +41 -0
  34. data/ext/tcc/tcc-0.9.26/include/stdbool.h +10 -0
  35. data/ext/tcc/tcc-0.9.26/include/stddef.h +28 -0
  36. data/ext/tcc/tcc-0.9.26/include/tcclib.h +78 -0
  37. data/ext/tcc/tcc-0.9.26/include/varargs.h +12 -0
  38. data/ext/tcc/tcc-0.9.26/lib/Makefile +102 -0
  39. data/ext/tcc/tcc-0.9.26/lib/alloca86-bt.S +47 -0
  40. data/ext/tcc/tcc-0.9.26/lib/alloca86.S +35 -0
  41. data/ext/tcc/tcc-0.9.26/lib/alloca86_64.S +42 -0
  42. data/ext/tcc/tcc-0.9.26/lib/bcheck.c +875 -0
  43. data/ext/tcc/tcc-0.9.26/lib/libtcc1.c +691 -0
  44. data/ext/tcc/tcc-0.9.26/libtcc.c +1941 -0
  45. data/ext/tcc/tcc-0.9.26/libtcc.h +103 -0
  46. data/ext/tcc/tcc-0.9.26/stab.def +234 -0
  47. data/ext/tcc/tcc-0.9.26/stab.h +17 -0
  48. data/ext/tcc/tcc-0.9.26/tcc-doc.html +2332 -0
  49. data/ext/tcc/tcc-0.9.26/tcc-doc.info +1151 -0
  50. data/ext/tcc/tcc-0.9.26/tcc-doc.texi +1268 -0
  51. data/ext/tcc/tcc-0.9.26/tcc.1 +415 -0
  52. data/ext/tcc/tcc-0.9.26/tcc.c +352 -0
  53. data/ext/tcc/tcc-0.9.26/tcc.h +1379 -0
  54. data/ext/tcc/tcc-0.9.26/tccasm.c +1118 -0
  55. data/ext/tcc/tcc-0.9.26/tcccoff.c +948 -0
  56. data/ext/tcc/tcc-0.9.26/tccelf.c +3129 -0
  57. data/ext/tcc/tcc-0.9.26/tccgen.c +5841 -0
  58. data/ext/tcc/tcc-0.9.26/tccpe.c +1887 -0
  59. data/ext/tcc/tcc-0.9.26/tccpp.c +3128 -0
  60. data/ext/tcc/tcc-0.9.26/tccrun.c +737 -0
  61. data/ext/tcc/tcc-0.9.26/tcctok.h +278 -0
  62. data/ext/tcc/tcc-0.9.26/tests/Makefile +199 -0
  63. data/ext/tcc/tcc-0.9.26/tests/asmtest.S +609 -0
  64. data/ext/tcc/tcc-0.9.26/tests/boundtest.c +233 -0
  65. data/ext/tcc/tcc-0.9.26/tests/gcctestsuite.sh +33 -0
  66. data/ext/tcc/tcc-0.9.26/tests/libtcc_test.c +76 -0
  67. data/ext/tcc/tcc-0.9.26/tests/tcctest.c +2713 -0
  68. data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.c +18 -0
  69. data/ext/tcc/tcc-0.9.26/tests/tests2/00_assignment.expect +3 -0
  70. data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.c +14 -0
  71. data/ext/tcc/tcc-0.9.26/tests/tests2/01_comment.expect +5 -0
  72. data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.c +18 -0
  73. data/ext/tcc/tcc-0.9.26/tests/tests2/02_printf.expect +15 -0
  74. data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.c +31 -0
  75. data/ext/tcc/tcc-0.9.26/tests/tests2/03_struct.expect +6 -0
  76. data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.c +15 -0
  77. data/ext/tcc/tcc-0.9.26/tests/tests2/04_for.expect +10 -0
  78. data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.c +21 -0
  79. data/ext/tcc/tcc-0.9.26/tests/tests2/05_array.expect +10 -0
  80. data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.c +29 -0
  81. data/ext/tcc/tcc-0.9.26/tests/tests2/06_case.expect +8 -0
  82. data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.c +30 -0
  83. data/ext/tcc/tcc-0.9.26/tests/tests2/07_function.expect +4 -0
  84. data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.c +24 -0
  85. data/ext/tcc/tcc-0.9.26/tests/tests2/08_while.expect +11 -0
  86. data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.c +24 -0
  87. data/ext/tcc/tcc-0.9.26/tests/tests2/09_do_while.expect +11 -0
  88. data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.c +40 -0
  89. data/ext/tcc/tcc-0.9.26/tests/tests2/10_pointer.expect +8 -0
  90. data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.c +40 -0
  91. data/ext/tcc/tcc-0.9.26/tests/tests2/11_precedence.expect +15 -0
  92. data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.c +14 -0
  93. data/ext/tcc/tcc-0.9.26/tests/tests2/12_hashdefine.expect +2 -0
  94. data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.c +20 -0
  95. data/ext/tcc/tcc-0.9.26/tests/tests2/13_integer_literals.expect +5 -0
  96. data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.c +21 -0
  97. data/ext/tcc/tcc-0.9.26/tests/tests2/14_if.expect +2 -0
  98. data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.c +21 -0
  99. data/ext/tcc/tcc-0.9.26/tests/tests2/15_recursion.expect +10 -0
  100. data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.c +21 -0
  101. data/ext/tcc/tcc-0.9.26/tests/tests2/16_nesting.expect +18 -0
  102. data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.c +29 -0
  103. data/ext/tcc/tcc-0.9.26/tests/tests2/17_enum.expect +3 -0
  104. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.c +12 -0
  105. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.expect +3 -0
  106. data/ext/tcc/tcc-0.9.26/tests/tests2/18_include.h +1 -0
  107. data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.c +28 -0
  108. data/ext/tcc/tcc-0.9.26/tests/tests2/19_pointer_arithmetic.expect +3 -0
  109. data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.c +24 -0
  110. data/ext/tcc/tcc-0.9.26/tests/tests2/20_pointer_comparison.expect +6 -0
  111. data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.c +33 -0
  112. data/ext/tcc/tcc-0.9.26/tests/tests2/21_char_array.expect +7 -0
  113. data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.c +50 -0
  114. data/ext/tcc/tcc-0.9.26/tests/tests2/22_floating_point.expect +16 -0
  115. data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.c +54 -0
  116. data/ext/tcc/tcc-0.9.26/tests/tests2/23_type_coercion.expect +12 -0
  117. data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.c +28 -0
  118. data/ext/tcc/tcc-0.9.26/tests/tests2/24_math_library.expect +18 -0
  119. data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.c +83 -0
  120. data/ext/tcc/tcc-0.9.26/tests/tests2/25_quicksort.expect +2 -0
  121. data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.c +17 -0
  122. data/ext/tcc/tcc-0.9.26/tests/tests2/26_character_constants.expect +8 -0
  123. data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.c +16 -0
  124. data/ext/tcc/tcc-0.9.26/tests/tests2/27_sizeof.expect +3 -0
  125. data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.c +46 -0
  126. data/ext/tcc/tcc-0.9.26/tests/tests2/28_strings.expect +19 -0
  127. data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.c +13 -0
  128. data/ext/tcc/tcc-0.9.26/tests/tests2/29_array_address.expect +1 -0
  129. data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.c +122 -0
  130. data/ext/tcc/tcc-0.9.26/tests/tests2/30_hanoi.expect +71 -0
  131. data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.c +14 -0
  132. data/ext/tcc/tcc-0.9.26/tests/tests2/31_args.expect +7 -0
  133. data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.c +266 -0
  134. data/ext/tcc/tcc-0.9.26/tests/tests2/32_led.expect +4 -0
  135. data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.c +15 -0
  136. data/ext/tcc/tcc-0.9.26/tests/tests2/33_ternary_op.expect +10 -0
  137. data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.c +23 -0
  138. data/ext/tcc/tcc-0.9.26/tests/tests2/34_array_assignment.expect +2 -0
  139. data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.c +14 -0
  140. data/ext/tcc/tcc-0.9.26/tests/tests2/35_sizeof.expect +2 -0
  141. data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.c +21 -0
  142. data/ext/tcc/tcc-0.9.26/tests/tests2/36_array_initialisers.expect +20 -0
  143. data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.c +17 -0
  144. data/ext/tcc/tcc-0.9.26/tests/tests2/37_sprintf.expect +20 -0
  145. data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.c +32 -0
  146. data/ext/tcc/tcc-0.9.26/tests/tests2/38_multiple_array_index.expect +4 -0
  147. data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.c +31 -0
  148. data/ext/tcc/tcc-0.9.26/tests/tests2/39_typedef.expect +3 -0
  149. data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.c +52 -0
  150. data/ext/tcc/tcc-0.9.26/tests/tests2/40_stdio.expect +27 -0
  151. data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.c +85 -0
  152. data/ext/tcc/tcc-0.9.26/tests/tests2/41_hashif.expect +6 -0
  153. data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.c +18 -0
  154. data/ext/tcc/tcc-0.9.26/tests/tests2/42_function_pointer.expect +2 -0
  155. data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.c +15 -0
  156. data/ext/tcc/tcc-0.9.26/tests/tests2/43_void_param.expect +1 -0
  157. data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.c +17 -0
  158. data/ext/tcc/tcc-0.9.26/tests/tests2/44_scoped_declarations.expect +1 -0
  159. data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.c +18 -0
  160. data/ext/tcc/tcc-0.9.26/tests/tests2/45_empty_for.expect +10 -0
  161. data/ext/tcc/tcc-0.9.26/tests/tests2/46_grep.c +564 -0
  162. data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.c +24 -0
  163. data/ext/tcc/tcc-0.9.26/tests/tests2/47_switch_return.expect +4 -0
  164. data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.c +26 -0
  165. data/ext/tcc/tcc-0.9.26/tests/tests2/48_nested_break.expect +1 -0
  166. data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.c +23 -0
  167. data/ext/tcc/tcc-0.9.26/tests/tests2/49_bracket_evaluation.expect +1 -0
  168. data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.c +29 -0
  169. data/ext/tcc/tcc-0.9.26/tests/tests2/50_logical_second_arg.expect +20 -0
  170. data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.c +30 -0
  171. data/ext/tcc/tcc-0.9.26/tests/tests2/51_static.expect +8 -0
  172. data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.c +27 -0
  173. data/ext/tcc/tcc-0.9.26/tests/tests2/52_unnamed_enum.expect +9 -0
  174. data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.c +56 -0
  175. data/ext/tcc/tcc-0.9.26/tests/tests2/54_goto.expect +8 -0
  176. data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.c +52 -0
  177. data/ext/tcc/tcc-0.9.26/tests/tests2/55_lshift_type.expect +1 -0
  178. data/ext/tcc/tcc-0.9.26/tests/tests2/LICENSE +37 -0
  179. data/ext/tcc/tcc-0.9.26/tests/tests2/Makefile +98 -0
  180. data/ext/tcc/tcc-0.9.26/texi2pod.pl +427 -0
  181. data/ext/tcc/tcc-0.9.26/win32/build-tcc.bat +60 -0
  182. data/ext/tcc/tcc-0.9.26/win32/examples/dll.c +12 -0
  183. data/ext/tcc/tcc-0.9.26/win32/examples/fib.c +23 -0
  184. data/ext/tcc/tcc-0.9.26/win32/examples/hello_dll.c +19 -0
  185. data/ext/tcc/tcc-0.9.26/win32/examples/hello_win.c +163 -0
  186. data/ext/tcc/tcc-0.9.26/win32/include/_mingw.h +139 -0
  187. data/ext/tcc/tcc-0.9.26/win32/include/assert.h +54 -0
  188. data/ext/tcc/tcc-0.9.26/win32/include/conio.h +409 -0
  189. data/ext/tcc/tcc-0.9.26/win32/include/ctype.h +281 -0
  190. data/ext/tcc/tcc-0.9.26/win32/include/dir.h +31 -0
  191. data/ext/tcc/tcc-0.9.26/win32/include/direct.h +68 -0
  192. data/ext/tcc/tcc-0.9.26/win32/include/dirent.h +135 -0
  193. data/ext/tcc/tcc-0.9.26/win32/include/dos.h +55 -0
  194. data/ext/tcc/tcc-0.9.26/win32/include/errno.h +75 -0
  195. data/ext/tcc/tcc-0.9.26/win32/include/excpt.h +123 -0
  196. data/ext/tcc/tcc-0.9.26/win32/include/fcntl.h +52 -0
  197. data/ext/tcc/tcc-0.9.26/win32/include/fenv.h +108 -0
  198. data/ext/tcc/tcc-0.9.26/win32/include/inttypes.h +297 -0
  199. data/ext/tcc/tcc-0.9.26/win32/include/io.h +418 -0
  200. data/ext/tcc/tcc-0.9.26/win32/include/limits.h +111 -0
  201. data/ext/tcc/tcc-0.9.26/win32/include/locale.h +91 -0
  202. data/ext/tcc/tcc-0.9.26/win32/include/malloc.h +175 -0
  203. data/ext/tcc/tcc-0.9.26/win32/include/math.h +777 -0
  204. data/ext/tcc/tcc-0.9.26/win32/include/mem.h +13 -0
  205. data/ext/tcc/tcc-0.9.26/win32/include/memory.h +40 -0
  206. data/ext/tcc/tcc-0.9.26/win32/include/process.h +176 -0
  207. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/conio_s.h +42 -0
  208. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/crtdbg_s.h +19 -0
  209. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/io_s.h +33 -0
  210. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/mbstring_s.h +52 -0
  211. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/search_s.h +25 -0
  212. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdio_s.h +145 -0
  213. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stdlib_s.h +67 -0
  214. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/stralign_s.h +30 -0
  215. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/string_s.h +41 -0
  216. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/sys/timeb_s.h +34 -0
  217. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/tchar_s.h +266 -0
  218. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/time_s.h +61 -0
  219. data/ext/tcc/tcc-0.9.26/win32/include/sec_api/wchar_s.h +128 -0
  220. data/ext/tcc/tcc-0.9.26/win32/include/setjmp.h +160 -0
  221. data/ext/tcc/tcc-0.9.26/win32/include/share.h +28 -0
  222. data/ext/tcc/tcc-0.9.26/win32/include/signal.h +63 -0
  223. data/ext/tcc/tcc-0.9.26/win32/include/stdint.h +209 -0
  224. data/ext/tcc/tcc-0.9.26/win32/include/stdio.h +429 -0
  225. data/ext/tcc/tcc-0.9.26/win32/include/stdlib.h +580 -0
  226. data/ext/tcc/tcc-0.9.26/win32/include/string.h +164 -0
  227. data/ext/tcc/tcc-0.9.26/win32/include/sys/fcntl.h +13 -0
  228. data/ext/tcc/tcc-0.9.26/win32/include/sys/file.h +14 -0
  229. data/ext/tcc/tcc-0.9.26/win32/include/sys/locking.h +30 -0
  230. data/ext/tcc/tcc-0.9.26/win32/include/sys/stat.h +290 -0
  231. data/ext/tcc/tcc-0.9.26/win32/include/sys/time.h +69 -0
  232. data/ext/tcc/tcc-0.9.26/win32/include/sys/timeb.h +133 -0
  233. data/ext/tcc/tcc-0.9.26/win32/include/sys/types.h +118 -0
  234. data/ext/tcc/tcc-0.9.26/win32/include/sys/unistd.h +14 -0
  235. data/ext/tcc/tcc-0.9.26/win32/include/sys/utime.h +146 -0
  236. data/ext/tcc/tcc-0.9.26/win32/include/tchar.h +1102 -0
  237. data/ext/tcc/tcc-0.9.26/win32/include/time.h +287 -0
  238. data/ext/tcc/tcc-0.9.26/win32/include/vadefs.h +11 -0
  239. data/ext/tcc/tcc-0.9.26/win32/include/values.h +4 -0
  240. data/ext/tcc/tcc-0.9.26/win32/include/wchar.h +871 -0
  241. data/ext/tcc/tcc-0.9.26/win32/include/wctype.h +172 -0
  242. data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetsd.h +149 -0
  243. data/ext/tcc/tcc-0.9.26/win32/include/winapi/basetyps.h +85 -0
  244. data/ext/tcc/tcc-0.9.26/win32/include/winapi/guiddef.h +151 -0
  245. data/ext/tcc/tcc-0.9.26/win32/include/winapi/intrin.h +11 -0
  246. data/ext/tcc/tcc-0.9.26/win32/include/winapi/poppack.h +8 -0
  247. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack1.h +8 -0
  248. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack2.h +8 -0
  249. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack4.h +8 -0
  250. data/ext/tcc/tcc-0.9.26/win32/include/winapi/pshpack8.h +8 -0
  251. data/ext/tcc/tcc-0.9.26/win32/include/winapi/reason.h +80 -0
  252. data/ext/tcc/tcc-0.9.26/win32/include/winapi/specstrings.h +7 -0
  253. data/ext/tcc/tcc-0.9.26/win32/include/winapi/stralign.h +154 -0
  254. data/ext/tcc/tcc-0.9.26/win32/include/winapi/tvout.h +79 -0
  255. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winbase.h +2951 -0
  256. data/ext/tcc/tcc-0.9.26/win32/include/winapi/wincon.h +301 -0
  257. data/ext/tcc/tcc-0.9.26/win32/include/winapi/windef.h +293 -0
  258. data/ext/tcc/tcc-0.9.26/win32/include/winapi/windows.h +123 -0
  259. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winerror.h +3166 -0
  260. data/ext/tcc/tcc-0.9.26/win32/include/winapi/wingdi.h +4080 -0
  261. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnetwk.h +476 -0
  262. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnls.h +765 -0
  263. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winnt.h +5770 -0
  264. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winreg.h +272 -0
  265. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winuser.h +5651 -0
  266. data/ext/tcc/tcc-0.9.26/win32/include/winapi/winver.h +160 -0
  267. data/ext/tcc/tcc-0.9.26/win32/lib/chkstk.S +191 -0
  268. data/ext/tcc/tcc-0.9.26/win32/lib/crt1.c +34 -0
  269. data/ext/tcc/tcc-0.9.26/win32/lib/dllcrt1.c +13 -0
  270. data/ext/tcc/tcc-0.9.26/win32/lib/dllmain.c +9 -0
  271. data/ext/tcc/tcc-0.9.26/win32/lib/gdi32.def +337 -0
  272. data/ext/tcc/tcc-0.9.26/win32/lib/kernel32.def +765 -0
  273. data/ext/tcc/tcc-0.9.26/win32/lib/msvcrt.def +1399 -0
  274. data/ext/tcc/tcc-0.9.26/win32/lib/user32.def +654 -0
  275. data/ext/tcc/tcc-0.9.26/win32/lib/wincrt1.c +64 -0
  276. data/ext/tcc/tcc-0.9.26/win32/tcc-win32.txt +156 -0
  277. data/ext/tcc/tcc-0.9.26/win32/tools/tiny_impdef.c +243 -0
  278. data/ext/tcc/tcc-0.9.26/win32/tools/tiny_libmaker.c +258 -0
  279. data/ext/tcc/tcc-0.9.26/x86_64-asm.h +448 -0
  280. data/ext/tcc/tcc-0.9.26/x86_64-gen.c +1701 -0
  281. data/lib/tcc.rb +291 -0
  282. data/tcc.gemspec +15 -0
  283. metadata +343 -0
@@ -0,0 +1,12 @@
1
+ char: a
2
+ char: b
3
+ char: c
4
+ int: 97
5
+ int: 98
6
+ int: 99
7
+ float: 97.000000
8
+ float: 98.000000
9
+ float: 99.000000
10
+ 97 97
11
+ 97 97
12
+ 97.000000 97.000000
@@ -0,0 +1,28 @@
1
+ #include <stdio.h>
2
+ #include <math.h>
3
+
4
+ int main()
5
+ {
6
+ printf("%f\n", sin(0.12));
7
+ printf("%f\n", cos(0.12));
8
+ printf("%f\n", tan(0.12));
9
+ printf("%f\n", asin(0.12));
10
+ printf("%f\n", acos(0.12));
11
+ printf("%f\n", atan(0.12));
12
+ printf("%f\n", sinh(0.12));
13
+ printf("%f\n", cosh(0.12));
14
+ printf("%f\n", tanh(0.12));
15
+ printf("%f\n", exp(0.12));
16
+ printf("%f\n", fabs(-0.12));
17
+ printf("%f\n", log(0.12));
18
+ printf("%f\n", log10(0.12));
19
+ printf("%f\n", pow(0.12, 0.12));
20
+ printf("%f\n", sqrt(0.12));
21
+ printf("%f\n", round(12.34));
22
+ printf("%f\n", ceil(12.34));
23
+ printf("%f\n", floor(12.34));
24
+
25
+ return 0;
26
+ }
27
+
28
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,18 @@
1
+ 0.119712
2
+ 0.992809
3
+ 0.120579
4
+ 0.120290
5
+ 1.450506
6
+ 0.119429
7
+ 0.120288
8
+ 1.007209
9
+ 0.119427
10
+ 1.127497
11
+ 0.120000
12
+ -2.120264
13
+ -0.920819
14
+ 0.775357
15
+ 0.346410
16
+ 12.000000
17
+ 13.000000
18
+ 12.000000
@@ -0,0 +1,83 @@
1
+ #include <stdio.h>
2
+
3
+ int array[16];
4
+
5
+ //Swap integer values by array indexes
6
+ void swap(int a, int b)
7
+ {
8
+ int tmp = array[a];
9
+ array[a] = array[b];
10
+ array[b] = tmp;
11
+ }
12
+
13
+ //Partition the array into two halves and return the
14
+ //index about which the array is partitioned
15
+ int partition(int left, int right)
16
+ {
17
+ int pivotIndex = left;
18
+ int pivotValue = array[pivotIndex];
19
+ int index = left;
20
+ int i;
21
+
22
+ swap(pivotIndex, right);
23
+ for(i = left; i < right; i++)
24
+ {
25
+ if(array[i] < pivotValue)
26
+ {
27
+ swap(i, index);
28
+ index += 1;
29
+ }
30
+ }
31
+ swap(right, index);
32
+
33
+ return index;
34
+ }
35
+
36
+ //Quicksort the array
37
+ void quicksort(int left, int right)
38
+ {
39
+ if(left >= right)
40
+ return;
41
+
42
+ int index = partition(left, right);
43
+ quicksort(left, index - 1);
44
+ quicksort(index + 1, right);
45
+ }
46
+
47
+ int main()
48
+ {
49
+ int i;
50
+
51
+ array[0] = 62;
52
+ array[1] = 83;
53
+ array[2] = 4;
54
+ array[3] = 89;
55
+ array[4] = 36;
56
+ array[5] = 21;
57
+ array[6] = 74;
58
+ array[7] = 37;
59
+ array[8] = 65;
60
+ array[9] = 33;
61
+ array[10] = 96;
62
+ array[11] = 38;
63
+ array[12] = 53;
64
+ array[13] = 16;
65
+ array[14] = 74;
66
+ array[15] = 55;
67
+
68
+ for (i = 0; i < 16; i++)
69
+ printf("%d ", array[i]);
70
+
71
+ printf("\n");
72
+
73
+ quicksort(0, 15);
74
+
75
+ for (i = 0; i < 16; i++)
76
+ printf("%d ", array[i]);
77
+
78
+ printf("\n");
79
+
80
+ return 0;
81
+ }
82
+
83
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,2 @@
1
+ 62 83 4 89 36 21 74 37 65 33 96 38 53 16 74 55
2
+ 4 16 21 33 36 37 38 53 55 62 65 74 74 83 89 96
@@ -0,0 +1,17 @@
1
+ #include <stdio.h>
2
+
3
+ int main()
4
+ {
5
+ printf("%d\n", '\1');
6
+ printf("%d\n", '\10');
7
+ printf("%d\n", '\100');
8
+ printf("%d\n", '\x01');
9
+ printf("%d\n", '\x0e');
10
+ printf("%d\n", '\x10');
11
+ printf("%d\n", '\x40');
12
+ printf("test \x40\n");
13
+
14
+ return 0;
15
+ }
16
+
17
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,8 @@
1
+ 1
2
+ 8
3
+ 64
4
+ 1
5
+ 14
6
+ 16
7
+ 64
8
+ test @
@@ -0,0 +1,16 @@
1
+ #include <stdio.h>
2
+
3
+ int main()
4
+ {
5
+ char a;
6
+ int b;
7
+ double c;
8
+
9
+ printf("%d\n", sizeof(a));
10
+ printf("%d\n", sizeof(b));
11
+ printf("%d\n", sizeof(c));
12
+
13
+ return 0;
14
+ }
15
+
16
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,46 @@
1
+ #include <stdio.h>
2
+ #include <string.h>
3
+ #include <strings.h>
4
+
5
+ int main()
6
+ {
7
+ char a[10];
8
+
9
+ strcpy(a, "hello");
10
+ printf("%s\n", a);
11
+
12
+ strncpy(a, "gosh", 2);
13
+ printf("%s\n", a);
14
+
15
+ printf("%d\n", strcmp(a, "apple") > 0);
16
+ printf("%d\n", strcmp(a, "goere") > 0);
17
+ printf("%d\n", strcmp(a, "zebra") < 0);
18
+
19
+ printf("%d\n", strlen(a));
20
+
21
+ strcat(a, "!");
22
+ printf("%s\n", a);
23
+
24
+ printf("%d\n", strncmp(a, "apple", 2) > 0);
25
+ printf("%d\n", strncmp(a, "goere", 2) == 0);
26
+ printf("%d\n", strncmp(a, "goerg", 2) == 0);
27
+ printf("%d\n", strncmp(a, "zebra", 2) < 0);
28
+
29
+ printf("%s\n", index(a, 'o'));
30
+ printf("%s\n", rindex(a, 'l'));
31
+ printf("%d\n", rindex(a, 'x') == NULL);
32
+
33
+ memset(&a[1], 'r', 4);
34
+ printf("%s\n", a);
35
+
36
+ memcpy(&a[2], a, 2);
37
+ printf("%s\n", a);
38
+
39
+ printf("%d\n", memcmp(a, "apple", 4) > 0);
40
+ printf("%d\n", memcmp(a, "grgr", 4) == 0);
41
+ printf("%d\n", memcmp(a, "zebra", 4) < 0);
42
+
43
+ return 0;
44
+ }
45
+
46
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,19 @@
1
+ hello
2
+ gollo
3
+ 1
4
+ 1
5
+ 1
6
+ 5
7
+ gollo!
8
+ 1
9
+ 1
10
+ 1
11
+ 1
12
+ ollo!
13
+ lo!
14
+ 1
15
+ grrrr!
16
+ grgrr!
17
+ 1
18
+ 1
19
+ 1
@@ -0,0 +1,13 @@
1
+ #include <stdio.h>
2
+ #include <string.h>
3
+
4
+ int main()
5
+ {
6
+ char a[10];
7
+ strcpy(a, "abcdef");
8
+ printf("%s\n", &a[1]);
9
+
10
+ return 0;
11
+ }
12
+
13
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,122 @@
1
+ /* example from http://barnyard.syr.edu/quickies/hanoi.c */
2
+
3
+ /* hanoi.c: solves the tower of hanoi problem. (Programming exercise.) */
4
+ /* By Terry R. McConnell (12/2/97) */
5
+ /* Compile: cc -o hanoi hanoi.c */
6
+
7
+ /* This program does no error checking. But then, if it's right,
8
+ it's right ... right ? */
9
+
10
+
11
+ /* The original towers of hanoi problem seems to have been originally posed
12
+ by one M. Claus in 1883. There is a popular legend that goes along with
13
+ it that has been often repeated and paraphrased. It goes something like this:
14
+ In the great temple at Benares there are 3 golden spikes. On one of them,
15
+ God placed 64 disks increasing in size from bottom to top, at the beginning
16
+ of time. Since then, and to this day, the priest on duty constantly transfers
17
+ disks, one at a time, in such a way that no larger disk is ever put on top
18
+ of a smaller one. When the disks have been transferred entirely to another
19
+ spike the Universe will come to an end in a large thunderclap.
20
+
21
+ This paraphrases the original legend due to DeParville, La Nature, Paris 1884,
22
+ Part I, 285-286. For this and further information see: Mathematical
23
+ Recreations & Essays, W.W. Rouse Ball, MacMillan, NewYork, 11th Ed. 1967,
24
+ 303-305.
25
+ *
26
+ *
27
+ */
28
+
29
+ #include <stdio.h>
30
+ #include <stdlib.h>
31
+
32
+ #define TRUE 1
33
+ #define FALSE 0
34
+
35
+ /* This is the number of "disks" on tower A initially. Taken to be 64 in the
36
+ * legend. The number of moves required, in general, is 2^N - 1. For N = 64,
37
+ * this is 18,446,744,073,709,551,615 */
38
+ #define N 4
39
+
40
+ /* These are the three towers. For example if the state of A is 0,1,3,4, that
41
+ * means that there are three discs on A of sizes 1, 3, and 4. (Think of right
42
+ * as being the "down" direction.) */
43
+ int A[N], B[N], C[N];
44
+
45
+ void Hanoi(int,int*,int*,int*);
46
+
47
+ /* Print the current configuration of A, B, and C to the screen */
48
+ void PrintAll()
49
+ {
50
+ int i;
51
+
52
+ printf("A: ");
53
+ for(i=0;i<N;i++)printf(" %d ",A[i]);
54
+ printf("\n");
55
+
56
+ printf("B: ");
57
+ for(i=0;i<N;i++)printf(" %d ",B[i]);
58
+ printf("\n");
59
+
60
+ printf("C: ");
61
+ for(i=0;i<N;i++)printf(" %d ",C[i]);
62
+ printf("\n");
63
+ printf("------------------------------------------\n");
64
+ return;
65
+ }
66
+
67
+ /* Move the leftmost nonzero element of source to dest, leave behind 0. */
68
+ /* Returns the value moved (not used.) */
69
+ int Move(int *source, int *dest)
70
+ {
71
+ int i,j;
72
+
73
+ while (i<N && (source[i])==0) i++;
74
+ while (j<N && (dest[j])==0) j++;
75
+
76
+ dest[j-1] = source[i];
77
+ source[i] = 0;
78
+ PrintAll(); /* Print configuration after each move. */
79
+ return dest[j-1];
80
+ }
81
+
82
+
83
+ /* Moves first n nonzero numbers from source to dest using the rules of Hanoi.
84
+ Calls itself recursively.
85
+ */
86
+ void Hanoi(int n,int *source, int *dest, int *spare)
87
+ {
88
+ int i;
89
+ if(n==1){
90
+ Move(source,dest);
91
+ return;
92
+ }
93
+
94
+ Hanoi(n-1,source,spare,dest);
95
+ Move(source,dest);
96
+ Hanoi(n-1,spare,dest,source);
97
+ return;
98
+ }
99
+
100
+ int main()
101
+ {
102
+ int i;
103
+
104
+ /* initialize the towers */
105
+ for(i=0;i<N;i++)A[i]=i+1;
106
+ for(i=0;i<N;i++)B[i]=0;
107
+ for(i=0;i<N;i++)C[i]=0;
108
+
109
+ printf("Solution of Tower of Hanoi Problem with %d Disks\n\n",N);
110
+
111
+ /* Print the starting state */
112
+ printf("Starting state:\n");
113
+ PrintAll();
114
+ printf("\n\nSubsequent states:\n\n");
115
+
116
+ /* Do it! Use A = Source, B = Destination, C = Spare */
117
+ Hanoi(N,A,B,C);
118
+
119
+ return 0;
120
+ }
121
+
122
+ /* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
@@ -0,0 +1,71 @@
1
+ Solution of Tower of Hanoi Problem with 4 Disks
2
+
3
+ Starting state:
4
+ A: 1 2 3 4
5
+ B: 0 0 0 0
6
+ C: 0 0 0 0
7
+ ------------------------------------------
8
+
9
+
10
+ Subsequent states:
11
+
12
+ A: 0 2 3 4
13
+ B: 0 0 0 0
14
+ C: 0 0 0 1
15
+ ------------------------------------------
16
+ A: 0 0 3 4
17
+ B: 0 0 0 2
18
+ C: 0 0 0 1
19
+ ------------------------------------------
20
+ A: 0 0 3 4
21
+ B: 0 0 1 2
22
+ C: 0 0 0 0
23
+ ------------------------------------------
24
+ A: 0 0 0 4
25
+ B: 0 0 1 2
26
+ C: 0 0 0 3
27
+ ------------------------------------------
28
+ A: 0 0 1 4
29
+ B: 0 0 0 2
30
+ C: 0 0 0 3
31
+ ------------------------------------------
32
+ A: 0 0 1 4
33
+ B: 0 0 0 0
34
+ C: 0 0 2 3
35
+ ------------------------------------------
36
+ A: 0 0 0 4
37
+ B: 0 0 0 0
38
+ C: 0 1 2 3
39
+ ------------------------------------------
40
+ A: 0 0 0 0
41
+ B: 0 0 0 4
42
+ C: 0 1 2 3
43
+ ------------------------------------------
44
+ A: 0 0 0 0
45
+ B: 0 0 1 4
46
+ C: 0 0 2 3
47
+ ------------------------------------------
48
+ A: 0 0 0 2
49
+ B: 0 0 1 4
50
+ C: 0 0 0 3
51
+ ------------------------------------------
52
+ A: 0 0 1 2
53
+ B: 0 0 0 4
54
+ C: 0 0 0 3
55
+ ------------------------------------------
56
+ A: 0 0 1 2
57
+ B: 0 0 3 4
58
+ C: 0 0 0 0
59
+ ------------------------------------------
60
+ A: 0 0 0 2
61
+ B: 0 0 3 4
62
+ C: 0 0 0 1
63
+ ------------------------------------------
64
+ A: 0 0 0 0
65
+ B: 0 2 3 4
66
+ C: 0 0 0 1
67
+ ------------------------------------------
68
+ A: 0 0 0 0
69
+ B: 1 2 3 4
70
+ C: 0 0 0 0
71
+ ------------------------------------------