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,281 @@
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ #ifndef _INC_CTYPE
7
+ #define _INC_CTYPE
8
+
9
+ #include <_mingw.h>
10
+
11
+ #ifdef __cplusplus
12
+ extern "C" {
13
+ #endif
14
+
15
+ #ifndef WEOF
16
+ #define WEOF (wint_t)(0xFFFF)
17
+ #endif
18
+
19
+ #ifndef _CRT_CTYPEDATA_DEFINED
20
+ #define _CRT_CTYPEDATA_DEFINED
21
+ #ifndef _CTYPE_DISABLE_MACROS
22
+
23
+ #ifndef __PCTYPE_FUNC
24
+ #define __PCTYPE_FUNC __pctype_func()
25
+ #ifdef _MSVCRT_
26
+ #define __pctype_func() (_pctype)
27
+ #else
28
+ #define __pctype_func() (*_imp___pctype)
29
+ #endif
30
+ #endif
31
+
32
+ #ifndef _pctype
33
+ #ifdef _MSVCRT_
34
+ extern unsigned short *_pctype;
35
+ #else
36
+ extern unsigned short **_imp___pctype;
37
+ #define _pctype (*_imp___pctype)
38
+ #endif
39
+ #endif
40
+
41
+ #endif
42
+ #endif
43
+
44
+ #ifndef _CRT_WCTYPEDATA_DEFINED
45
+ #define _CRT_WCTYPEDATA_DEFINED
46
+ #ifndef _CTYPE_DISABLE_MACROS
47
+ #ifndef _wctype
48
+ #ifdef _MSVCRT_
49
+ extern unsigned short *_wctype;
50
+ #else
51
+ extern unsigned short **_imp___wctype;
52
+ #define _wctype (*_imp___wctype)
53
+ #endif
54
+ #endif
55
+ #ifdef _MSVCRT_
56
+ #define __pwctype_func() (_pwctype)
57
+ #ifndef _pwctype
58
+ extern unsigned short *_pwctype;
59
+ #endif
60
+ #else
61
+ #define __pwctype_func() (*_imp___pwctype)
62
+ #ifndef _pwctype
63
+ extern unsigned short **_imp___pwctype;
64
+ #define _pwctype (*_imp___pwctype)
65
+ #endif
66
+ #endif
67
+ #endif
68
+ #endif
69
+
70
+ /* CRT stuff */
71
+ #if 1
72
+ extern const unsigned char __newclmap[];
73
+ extern const unsigned char __newcumap[];
74
+ extern pthreadlocinfo __ptlocinfo;
75
+ extern pthreadmbcinfo __ptmbcinfo;
76
+ extern int __globallocalestatus;
77
+ extern int __locale_changed;
78
+ extern struct threadlocaleinfostruct __initiallocinfo;
79
+ extern _locale_tstruct __initiallocalestructinfo;
80
+ pthreadlocinfo __cdecl __updatetlocinfo(void);
81
+ pthreadmbcinfo __cdecl __updatetmbcinfo(void);
82
+ #endif
83
+
84
+ #define _UPPER 0x1
85
+ #define _LOWER 0x2
86
+ #define _DIGIT 0x4
87
+ #define _SPACE 0x8
88
+
89
+ #define _PUNCT 0x10
90
+ #define _CONTROL 0x20
91
+ #define _BLANK 0x40
92
+ #define _HEX 0x80
93
+
94
+ #define _LEADBYTE 0x8000
95
+ #define _ALPHA (0x0100|_UPPER|_LOWER)
96
+
97
+ #ifndef _CTYPE_DEFINED
98
+ #define _CTYPE_DEFINED
99
+
100
+ _CRTIMP int __cdecl _isctype(int _C,int _Type);
101
+ _CRTIMP int __cdecl _isctype_l(int _C,int _Type,_locale_t _Locale);
102
+ _CRTIMP int __cdecl isalpha(int _C);
103
+ _CRTIMP int __cdecl _isalpha_l(int _C,_locale_t _Locale);
104
+ _CRTIMP int __cdecl isupper(int _C);
105
+ _CRTIMP int __cdecl _isupper_l(int _C,_locale_t _Locale);
106
+ _CRTIMP int __cdecl islower(int _C);
107
+ _CRTIMP int __cdecl _islower_l(int _C,_locale_t _Locale);
108
+ _CRTIMP int __cdecl isdigit(int _C);
109
+ _CRTIMP int __cdecl _isdigit_l(int _C,_locale_t _Locale);
110
+ _CRTIMP int __cdecl isxdigit(int _C);
111
+ _CRTIMP int __cdecl _isxdigit_l(int _C,_locale_t _Locale);
112
+ _CRTIMP int __cdecl isspace(int _C);
113
+ _CRTIMP int __cdecl _isspace_l(int _C,_locale_t _Locale);
114
+ _CRTIMP int __cdecl ispunct(int _C);
115
+ _CRTIMP int __cdecl _ispunct_l(int _C,_locale_t _Locale);
116
+ _CRTIMP int __cdecl isalnum(int _C);
117
+ _CRTIMP int __cdecl _isalnum_l(int _C,_locale_t _Locale);
118
+ _CRTIMP int __cdecl isprint(int _C);
119
+ _CRTIMP int __cdecl _isprint_l(int _C,_locale_t _Locale);
120
+ _CRTIMP int __cdecl isgraph(int _C);
121
+ _CRTIMP int __cdecl _isgraph_l(int _C,_locale_t _Locale);
122
+ _CRTIMP int __cdecl iscntrl(int _C);
123
+ _CRTIMP int __cdecl _iscntrl_l(int _C,_locale_t _Locale);
124
+ _CRTIMP int __cdecl toupper(int _C);
125
+ _CRTIMP int __cdecl tolower(int _C);
126
+ _CRTIMP int __cdecl _tolower(int _C);
127
+ _CRTIMP int __cdecl _tolower_l(int _C,_locale_t _Locale);
128
+ _CRTIMP int __cdecl _toupper(int _C);
129
+ _CRTIMP int __cdecl _toupper_l(int _C,_locale_t _Locale);
130
+ _CRTIMP int __cdecl __isascii(int _C);
131
+ _CRTIMP int __cdecl __toascii(int _C);
132
+ _CRTIMP int __cdecl __iscsymf(int _C);
133
+ _CRTIMP int __cdecl __iscsym(int _C);
134
+
135
+ #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
136
+ int __cdecl isblank(int _C);
137
+ #endif
138
+ #endif
139
+
140
+ #ifndef _WCTYPE_DEFINED
141
+ #define _WCTYPE_DEFINED
142
+
143
+ int __cdecl iswalpha(wint_t _C);
144
+ _CRTIMP int __cdecl _iswalpha_l(wint_t _C,_locale_t _Locale);
145
+ int __cdecl iswupper(wint_t _C);
146
+ _CRTIMP int __cdecl _iswupper_l(wint_t _C,_locale_t _Locale);
147
+ int __cdecl iswlower(wint_t _C);
148
+ _CRTIMP int __cdecl _iswlower_l(wint_t _C,_locale_t _Locale);
149
+ int __cdecl iswdigit(wint_t _C);
150
+ _CRTIMP int __cdecl _iswdigit_l(wint_t _C,_locale_t _Locale);
151
+ int __cdecl iswxdigit(wint_t _C);
152
+ _CRTIMP int __cdecl _iswxdigit_l(wint_t _C,_locale_t _Locale);
153
+ int __cdecl iswspace(wint_t _C);
154
+ _CRTIMP int __cdecl _iswspace_l(wint_t _C,_locale_t _Locale);
155
+ int __cdecl iswpunct(wint_t _C);
156
+ _CRTIMP int __cdecl _iswpunct_l(wint_t _C,_locale_t _Locale);
157
+ int __cdecl iswalnum(wint_t _C);
158
+ _CRTIMP int __cdecl _iswalnum_l(wint_t _C,_locale_t _Locale);
159
+ int __cdecl iswprint(wint_t _C);
160
+ _CRTIMP int __cdecl _iswprint_l(wint_t _C,_locale_t _Locale);
161
+ int __cdecl iswgraph(wint_t _C);
162
+ _CRTIMP int __cdecl _iswgraph_l(wint_t _C,_locale_t _Locale);
163
+ int __cdecl iswcntrl(wint_t _C);
164
+ _CRTIMP int __cdecl _iswcntrl_l(wint_t _C,_locale_t _Locale);
165
+ int __cdecl iswascii(wint_t _C);
166
+ int __cdecl isleadbyte(int _C);
167
+ _CRTIMP int __cdecl _isleadbyte_l(int _C,_locale_t _Locale);
168
+ wint_t __cdecl towupper(wint_t _C);
169
+ _CRTIMP wint_t __cdecl _towupper_l(wint_t _C,_locale_t _Locale);
170
+ wint_t __cdecl towlower(wint_t _C);
171
+ _CRTIMP wint_t __cdecl _towlower_l(wint_t _C,_locale_t _Locale);
172
+ int __cdecl iswctype(wint_t _C,wctype_t _Type);
173
+ _CRTIMP int __cdecl _iswctype_l(wint_t _C,wctype_t _Type,_locale_t _Locale);
174
+ _CRTIMP int __cdecl __iswcsymf(wint_t _C);
175
+ _CRTIMP int __cdecl _iswcsymf_l(wint_t _C,_locale_t _Locale);
176
+ _CRTIMP int __cdecl __iswcsym(wint_t _C);
177
+ _CRTIMP int __cdecl _iswcsym_l(wint_t _C,_locale_t _Locale);
178
+ int __cdecl is_wctype(wint_t _C,wctype_t _Type);
179
+
180
+ #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || !defined (NO_OLDNAMES)
181
+ int __cdecl iswblank(wint_t _C);
182
+ #endif
183
+ #endif
184
+
185
+ #ifndef _CTYPE_DISABLE_MACROS
186
+
187
+ #ifndef MB_CUR_MAX
188
+ #define MB_CUR_MAX ___mb_cur_max_func()
189
+ #ifndef __mb_cur_max
190
+ #ifdef _MSVCRT_
191
+ extern int __mb_cur_max;
192
+ #else
193
+ #define __mb_cur_max (*_imp____mb_cur_max)
194
+ extern int *_imp____mb_cur_max;
195
+ #endif
196
+ #endif
197
+ #ifdef _MSVCRT_
198
+ #define ___mb_cur_max_func() (__mb_cur_max)
199
+ #else
200
+ #define ___mb_cur_max_func() (*_imp____mb_cur_max)
201
+ #endif
202
+ #endif
203
+
204
+ #define __chvalidchk(a,b) (__PCTYPE_FUNC[(a)] & (b))
205
+ #define _chvalidchk_l(_Char,_Flag,_Locale) (!_Locale ? __chvalidchk(_Char,_Flag) : ((_locale_t)_Locale)->locinfo->pctype[_Char] & (_Flag))
206
+ #define _ischartype_l(_Char,_Flag,_Locale) (((_Locale)!=NULL && (((_locale_t)(_Locale))->locinfo->mb_cur_max) > 1) ? _isctype_l(_Char,(_Flag),_Locale) : _chvalidchk_l(_Char,_Flag,_Locale))
207
+ #define _isalpha_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA,_Locale)
208
+ #define _isupper_l(_Char,_Locale) _ischartype_l(_Char,_UPPER,_Locale)
209
+ #define _islower_l(_Char,_Locale) _ischartype_l(_Char,_LOWER,_Locale)
210
+ #define _isdigit_l(_Char,_Locale) _ischartype_l(_Char,_DIGIT,_Locale)
211
+ #define _isxdigit_l(_Char,_Locale) _ischartype_l(_Char,_HEX,_Locale)
212
+ #define _isspace_l(_Char,_Locale) _ischartype_l(_Char,_SPACE,_Locale)
213
+ #define _ispunct_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT,_Locale)
214
+ #define _isalnum_l(_Char,_Locale) _ischartype_l(_Char,_ALPHA|_DIGIT,_Locale)
215
+ #define _isprint_l(_Char,_Locale) _ischartype_l(_Char,_BLANK|_PUNCT|_ALPHA|_DIGIT,_Locale)
216
+ #define _isgraph_l(_Char,_Locale) _ischartype_l(_Char,_PUNCT|_ALPHA|_DIGIT,_Locale)
217
+ #define _iscntrl_l(_Char,_Locale) _ischartype_l(_Char,_CONTROL,_Locale)
218
+ #define _tolower(_Char) ((_Char)-'A'+'a')
219
+ #define _toupper(_Char) ((_Char)-'a'+'A')
220
+ #define __isascii(_Char) ((unsigned)(_Char) < 0x80)
221
+ #define __toascii(_Char) ((_Char) & 0x7f)
222
+
223
+ #ifndef _WCTYPE_INLINE_DEFINED
224
+ #define _WCTYPE_INLINE_DEFINED
225
+
226
+ #undef _CRT_WCTYPE_NOINLINE
227
+ #ifndef __cplusplus
228
+ #define iswalpha(_c) (iswctype(_c,_ALPHA))
229
+ #define iswupper(_c) (iswctype(_c,_UPPER))
230
+ #define iswlower(_c) (iswctype(_c,_LOWER))
231
+ #define iswdigit(_c) (iswctype(_c,_DIGIT))
232
+ #define iswxdigit(_c) (iswctype(_c,_HEX))
233
+ #define iswspace(_c) (iswctype(_c,_SPACE))
234
+ #define iswpunct(_c) (iswctype(_c,_PUNCT))
235
+ #define iswalnum(_c) (iswctype(_c,_ALPHA|_DIGIT))
236
+ #define iswprint(_c) (iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT))
237
+ #define iswgraph(_c) (iswctype(_c,_PUNCT|_ALPHA|_DIGIT))
238
+ #define iswcntrl(_c) (iswctype(_c,_CONTROL))
239
+ #define iswascii(_c) ((unsigned)(_c) < 0x80)
240
+ #define _iswalpha_l(_c,_p) (_iswctype_l(_c,_ALPHA,_p))
241
+ #define _iswupper_l(_c,_p) (_iswctype_l(_c,_UPPER,_p))
242
+ #define _iswlower_l(_c,_p) (_iswctype_l(_c,_LOWER,_p))
243
+ #define _iswdigit_l(_c,_p) (_iswctype_l(_c,_DIGIT,_p))
244
+ #define _iswxdigit_l(_c,_p) (_iswctype_l(_c,_HEX,_p))
245
+ #define _iswspace_l(_c,_p) (_iswctype_l(_c,_SPACE,_p))
246
+ #define _iswpunct_l(_c,_p) (_iswctype_l(_c,_PUNCT,_p))
247
+ #define _iswalnum_l(_c,_p) (_iswctype_l(_c,_ALPHA|_DIGIT,_p))
248
+ #define _iswprint_l(_c,_p) (_iswctype_l(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT,_p))
249
+ #define _iswgraph_l(_c,_p) (_iswctype_l(_c,_PUNCT|_ALPHA|_DIGIT,_p))
250
+ #define _iswcntrl_l(_c,_p) (_iswctype_l(_c,_CONTROL,_p))
251
+ #endif
252
+ #endif
253
+
254
+ #define __iscsymf(_c) (isalpha(_c) || ((_c)=='_'))
255
+ #define __iscsym(_c) (isalnum(_c) || ((_c)=='_'))
256
+ #define __iswcsymf(_c) (iswalpha(_c) || ((_c)=='_'))
257
+ #define __iswcsym(_c) (iswalnum(_c) || ((_c)=='_'))
258
+ #define _iscsymf_l(_c,_p) (_isalpha_l(_c,_p) || ((_c)=='_'))
259
+ #define _iscsym_l(_c,_p) (_isalnum_l(_c,_p) || ((_c)=='_'))
260
+ #define _iswcsymf_l(_c,_p) (_iswalpha_l(_c,_p) || ((_c)=='_'))
261
+ #define _iswcsym_l(_c,_p) (_iswalnum_l(_c,_p) || ((_c)=='_'))
262
+ #endif
263
+
264
+ #ifndef NO_OLDNAMES
265
+ #ifndef _CTYPE_DEFINED
266
+ int __cdecl isascii(int _C);
267
+ int __cdecl toascii(int _C);
268
+ int __cdecl iscsymf(int _C);
269
+ int __cdecl iscsym(int _C);
270
+ #else
271
+ #define isascii __isascii
272
+ #define toascii __toascii
273
+ #define iscsymf __iscsymf
274
+ #define iscsym __iscsym
275
+ #endif
276
+ #endif
277
+
278
+ #ifdef __cplusplus
279
+ }
280
+ #endif
281
+ #endif
@@ -0,0 +1,31 @@
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ /*
7
+ * dir.h
8
+ *
9
+ * This file OBSOLESCENT and only provided for backward compatibility.
10
+ * Please use io.h instead.
11
+ *
12
+ * This file is part of the Mingw32 package.
13
+ *
14
+ * Contributors:
15
+ * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
16
+ * Mumit Khan <khan@xraylith.wisc.edu>
17
+ *
18
+ * THIS SOFTWARE IS NOT COPYRIGHTED
19
+ *
20
+ * This source code is offered for use in the public domain. You may
21
+ * use, modify or distribute it freely.
22
+ *
23
+ * This code is distributed in the hope that it will be useful but
24
+ * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
25
+ * DISCLAIMED. This includes but is not limited to warranties of
26
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27
+ *
28
+ */
29
+
30
+ #include <io.h>
31
+
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ #ifndef _INC_DIRECT
7
+ #define _INC_DIRECT
8
+
9
+ #include <_mingw.h>
10
+ #include <io.h>
11
+
12
+ #pragma pack(push,_CRT_PACKING)
13
+
14
+ #ifdef __cplusplus
15
+ extern "C" {
16
+ #endif
17
+
18
+ #ifndef _DISKFREE_T_DEFINED
19
+ #define _DISKFREE_T_DEFINED
20
+ struct _diskfree_t {
21
+ unsigned total_clusters;
22
+ unsigned avail_clusters;
23
+ unsigned sectors_per_cluster;
24
+ unsigned bytes_per_sector;
25
+ };
26
+ #endif
27
+
28
+ _CRTIMP char *__cdecl _getcwd(char *_DstBuf,int _SizeInBytes);
29
+ _CRTIMP char *__cdecl _getdcwd(int _Drive,char *_DstBuf,int _SizeInBytes);
30
+ char *__cdecl _getdcwd_nolock(int _Drive,char *_DstBuf,int _SizeInBytes);
31
+ _CRTIMP int __cdecl _chdir(const char *_Path);
32
+ _CRTIMP int __cdecl _mkdir(const char *_Path);
33
+ _CRTIMP int __cdecl _rmdir(const char *_Path);
34
+ _CRTIMP int __cdecl _chdrive(int _Drive);
35
+ _CRTIMP int __cdecl _getdrive(void);
36
+ _CRTIMP unsigned long __cdecl _getdrives(void);
37
+
38
+ #ifndef _GETDISKFREE_DEFINED
39
+ #define _GETDISKFREE_DEFINED
40
+ _CRTIMP unsigned __cdecl _getdiskfree(unsigned _Drive,struct _diskfree_t *_DiskFree);
41
+ #endif
42
+
43
+ #ifndef _WDIRECT_DEFINED
44
+ #define _WDIRECT_DEFINED
45
+ _CRTIMP wchar_t *__cdecl _wgetcwd(wchar_t *_DstBuf,int _SizeInWords);
46
+ _CRTIMP wchar_t *__cdecl _wgetdcwd(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
47
+ wchar_t *__cdecl _wgetdcwd_nolock(int _Drive,wchar_t *_DstBuf,int _SizeInWords);
48
+ _CRTIMP int __cdecl _wchdir(const wchar_t *_Path);
49
+ _CRTIMP int __cdecl _wmkdir(const wchar_t *_Path);
50
+ _CRTIMP int __cdecl _wrmdir(const wchar_t *_Path);
51
+ #endif
52
+
53
+ #ifndef NO_OLDNAMES
54
+
55
+ #define diskfree_t _diskfree_t
56
+
57
+ char *__cdecl getcwd(char *_DstBuf,int _SizeInBytes);
58
+ int __cdecl chdir(const char *_Path);
59
+ int __cdecl mkdir(const char *_Path);
60
+ int __cdecl rmdir(const char *_Path);
61
+ #endif
62
+
63
+ #ifdef __cplusplus
64
+ }
65
+ #endif
66
+
67
+ #pragma pack(pop)
68
+ #endif
@@ -0,0 +1,135 @@
1
+ /**
2
+ * This file has no copyright assigned and is placed in the Public Domain.
3
+ * This file is part of the w64 mingw-runtime package.
4
+ * No warranty is given; refer to the file DISCLAIMER within this package.
5
+ */
6
+ /* All the headers include this file. */
7
+ #include <_mingw.h>
8
+
9
+ #ifndef __STRICT_ANSI__
10
+
11
+ #ifndef _DIRENT_H_
12
+ #define _DIRENT_H_
13
+
14
+
15
+ #pragma pack(push,_CRT_PACKING)
16
+
17
+ #include <io.h>
18
+
19
+ #ifndef RC_INVOKED
20
+
21
+ #ifdef __cplusplus
22
+ extern "C" {
23
+ #endif
24
+
25
+ struct dirent
26
+ {
27
+ long d_ino; /* Always zero. */
28
+ unsigned short d_reclen; /* Always zero. */
29
+ unsigned short d_namlen; /* Length of name in d_name. */
30
+ char* d_name; /* File name. */
31
+ /* NOTE: The name in the dirent structure points to the name in the
32
+ * finddata_t structure in the DIR. */
33
+ };
34
+
35
+ /*
36
+ * This is an internal data structure. Good programmers will not use it
37
+ * except as an argument to one of the functions below.
38
+ * dd_stat field is now int (was short in older versions).
39
+ */
40
+ typedef struct
41
+ {
42
+ /* disk transfer area for this dir */
43
+ struct _finddata_t dd_dta;
44
+
45
+ /* dirent struct to return from dir (NOTE: this makes this thread
46
+ * safe as long as only one thread uses a particular DIR struct at
47
+ * a time) */
48
+ struct dirent dd_dir;
49
+
50
+ /* _findnext handle */
51
+ long dd_handle;
52
+
53
+ /*
54
+ * Status of search:
55
+ * 0 = not started yet (next entry to read is first entry)
56
+ * -1 = off the end
57
+ * positive = 0 based index of next entry
58
+ */
59
+ int dd_stat;
60
+
61
+ /* given path for dir with search pattern (struct is extended) */
62
+ char dd_name[1];
63
+ } DIR;
64
+
65
+ DIR* __cdecl opendir (const char*);
66
+ struct dirent* __cdecl readdir (DIR*);
67
+ int __cdecl closedir (DIR*);
68
+ void __cdecl rewinddir (DIR*);
69
+ long __cdecl telldir (DIR*);
70
+ void __cdecl seekdir (DIR*, long);
71
+
72
+
73
+ /* wide char versions */
74
+
75
+ struct _wdirent
76
+ {
77
+ long d_ino; /* Always zero. */
78
+ unsigned short d_reclen; /* Always zero. */
79
+ unsigned short d_namlen; /* Length of name in d_name. */
80
+ wchar_t* d_name; /* File name. */
81
+ /* NOTE: The name in the dirent structure points to the name in the * wfinddata_t structure in the _WDIR. */
82
+ };
83
+
84
+ /*
85
+ * This is an internal data structure. Good programmers will not use it
86
+ * except as an argument to one of the functions below.
87
+ */
88
+ typedef struct
89
+ {
90
+ /* disk transfer area for this dir */
91
+ struct _wfinddata_t dd_dta;
92
+
93
+ /* dirent struct to return from dir (NOTE: this makes this thread
94
+ * safe as long as only one thread uses a particular DIR struct at
95
+ * a time) */
96
+ struct _wdirent dd_dir;
97
+
98
+ /* _findnext handle */
99
+ long dd_handle;
100
+
101
+ /*
102
+ * Status of search:
103
+ * 0 = not started yet (next entry to read is first entry)
104
+ * -1 = off the end
105
+ * positive = 0 based index of next entry
106
+ */
107
+ int dd_stat;
108
+
109
+ /* given path for dir with search pattern (struct is extended) */
110
+ wchar_t dd_name[1];
111
+ } _WDIR;
112
+
113
+
114
+
115
+ _WDIR* __cdecl _wopendir (const wchar_t*);
116
+ struct _wdirent* __cdecl _wreaddir (_WDIR*);
117
+ int __cdecl _wclosedir (_WDIR*);
118
+ void __cdecl _wrewinddir (_WDIR*);
119
+ long __cdecl _wtelldir (_WDIR*);
120
+ void __cdecl _wseekdir (_WDIR*, long);
121
+
122
+
123
+ #ifdef __cplusplus
124
+ }
125
+ #endif
126
+
127
+ #endif /* Not RC_INVOKED */
128
+
129
+ #pragma pack(pop)
130
+
131
+ #endif /* Not _DIRENT_H_ */
132
+
133
+
134
+ #endif /* Not __STRICT_ANSI__ */
135
+