zemu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/lib/zemu/config.rb +312 -0
  3. data/lib/zemu/instance.rb +179 -0
  4. data/lib/zemu.rb +172 -0
  5. data/src/debug.c +118 -0
  6. data/src/debug.h +30 -0
  7. data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
  8. data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
  9. data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
  10. data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
  11. data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
  12. data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
  13. data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
  14. data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
  15. data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
  16. data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
  17. data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
  18. data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
  19. data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
  20. data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
  21. data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
  22. data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
  23. data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
  24. data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
  25. data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
  26. data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
  27. data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
  28. data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
  29. data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
  30. data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
  31. data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
  32. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
  33. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
  34. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
  35. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
  36. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
  37. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
  38. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
  39. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
  40. data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
  41. data/src/external/Z/API/Z/constants/base.h +35 -0
  42. data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
  43. data/src/external/Z/API/Z/constants/numbers.h +963 -0
  44. data/src/external/Z/API/Z/constants/version.h +15 -0
  45. data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
  46. data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
  47. data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
  48. data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
  49. data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
  50. data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
  51. data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
  52. data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
  53. data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
  54. data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
  55. data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
  56. data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
  57. data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
  58. data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
  59. data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
  60. data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
  61. data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
  62. data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
  63. data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
  64. data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
  65. data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
  66. data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
  67. data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
  68. data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
  69. data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
  70. data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
  71. data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
  72. data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
  73. data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
  74. data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
  75. data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
  76. data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
  77. data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
  78. data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
  79. data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
  80. data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
  81. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
  82. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
  83. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
  84. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
  85. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
  86. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
  87. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
  88. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
  89. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
  90. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
  91. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
  92. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
  93. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
  94. data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
  95. data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
  96. data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
  97. data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
  98. data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
  99. data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
  100. data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
  101. data/src/external/Z/API/Z/functions/base/all.h +16 -0
  102. data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
  103. data/src/external/Z/API/Z/functions/base/character.h +38 -0
  104. data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
  105. data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
  106. data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
  107. data/src/external/Z/API/Z/functions/base/value.h +1901 -0
  108. data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
  109. data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
  110. data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
  111. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
  112. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
  113. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
  114. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
  115. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
  116. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
  117. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
  118. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
  119. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
  120. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
  121. data/src/external/Z/API/Z/functions/time/date.h +29 -0
  122. data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
  123. data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
  124. data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
  125. data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
  126. data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
  127. data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
  128. data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
  129. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
  130. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
  131. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
  132. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
  133. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
  134. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
  135. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
  136. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
  137. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
  138. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
  139. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
  140. data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
  141. data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
  142. data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
  143. data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
  144. data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
  145. data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
  146. data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
  147. data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
  148. data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
  149. data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
  150. data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
  151. data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
  152. data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
  153. data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
  154. data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
  155. data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
  156. data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
  157. data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
  158. data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
  159. data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
  160. data/src/external/Z/API/Z/inspection/C++.h +78 -0
  161. data/src/external/Z/API/Z/inspection/C.h +79 -0
  162. data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
  163. data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
  164. data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
  165. data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
  166. data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
  167. data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
  168. data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
  169. data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
  170. data/src/external/Z/API/Z/inspection/CPU.h +209 -0
  171. data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
  172. data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
  173. data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
  174. data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
  175. data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
  176. data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
  177. data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
  178. data/src/external/Z/API/Z/inspection/OS.h +236 -0
  179. data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
  180. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
  181. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
  182. data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
  183. data/src/external/Z/API/Z/inspection/Z.h +19 -0
  184. data/src/external/Z/API/Z/inspection/build.h +22 -0
  185. data/src/external/Z/API/Z/inspection/character set.h +66 -0
  186. data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
  187. data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
  188. data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
  189. data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
  190. data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
  191. data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
  192. data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
  193. data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
  194. data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
  195. data/src/external/Z/API/Z/inspection/compiler.h +299 -0
  196. data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
  197. data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
  198. data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
  199. data/src/external/Z/API/Z/inspection/data model.h +362 -0
  200. data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
  201. data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
  202. data/src/external/Z/API/Z/inspection/language.h +163 -0
  203. data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
  204. data/src/external/Z/API/Z/inspection/platform.h +29 -0
  205. data/src/external/Z/API/Z/keys/C++.h +27 -0
  206. data/src/external/Z/API/Z/keys/C.h +29 -0
  207. data/src/external/Z/API/Z/keys/CPU.h +80 -0
  208. data/src/external/Z/API/Z/keys/OS.h +182 -0
  209. data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
  210. data/src/external/Z/API/Z/keys/chemistry.h +26 -0
  211. data/src/external/Z/API/Z/keys/compiler.h +178 -0
  212. data/src/external/Z/API/Z/keys/data model.h +32 -0
  213. data/src/external/Z/API/Z/keys/endianness.h +24 -0
  214. data/src/external/Z/API/Z/keys/language.h +21 -0
  215. data/src/external/Z/API/Z/keys/layout.h +20 -0
  216. data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
  217. data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
  218. data/src/external/Z/API/Z/keys/order.h +18 -0
  219. data/src/external/Z/API/Z/keys/platform.h +87 -0
  220. data/src/external/Z/API/Z/keys/program.h +39 -0
  221. data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
  222. data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
  223. data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
  224. data/src/external/Z/API/Z/keys/status.h +69 -0
  225. data/src/external/Z/API/Z/keys/text.h +27 -0
  226. data/src/external/Z/API/Z/keys/value.h +88 -0
  227. data/src/external/Z/API/Z/macros/arguments.h +25 -0
  228. data/src/external/Z/API/Z/macros/casting.h +22 -0
  229. data/src/external/Z/API/Z/macros/character.h +159 -0
  230. data/src/external/Z/API/Z/macros/date.h +14 -0
  231. data/src/external/Z/API/Z/macros/key.h +20 -0
  232. data/src/external/Z/API/Z/macros/language.h +126 -0
  233. data/src/external/Z/API/Z/macros/language.hpp +81 -0
  234. data/src/external/Z/API/Z/macros/members.h +86 -0
  235. data/src/external/Z/API/Z/macros/pasting.h +308 -0
  236. data/src/external/Z/API/Z/macros/pointer.h +33 -0
  237. data/src/external/Z/API/Z/macros/repetition.h +283 -0
  238. data/src/external/Z/API/Z/macros/structure.h +104 -0
  239. data/src/external/Z/API/Z/macros/templating.h +407 -0
  240. data/src/external/Z/API/Z/macros/tokens.h +14 -0
  241. data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
  242. data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
  243. data/src/external/Z/API/Z/macros/value.h +489 -0
  244. data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
  245. data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
  246. data/src/external/Z/API/Z/macros/variadic.h +46 -0
  247. data/src/external/Z/API/Z/macros/version.h +17 -0
  248. data/src/external/Z/API/Z/network/3/IP.h +36 -0
  249. data/src/external/Z/API/Z/network/4/TCP.h +24 -0
  250. data/src/external/Z/API/Z/network/4/UDP.h +26 -0
  251. data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
  252. data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
  253. data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
  254. data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
  255. data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
  256. data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
  257. data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
  258. data/src/external/Z/API/Z/traits/base.hpp +19 -0
  259. data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
  260. data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
  261. data/src/external/Z/API/Z/types/arguments.h +19 -0
  262. data/src/external/Z/API/Z/types/base.h +1655 -0
  263. data/src/external/Z/API/Z/types/base.hpp +169 -0
  264. data/src/external/Z/API/Z/types/buffering.h +27 -0
  265. data/src/external/Z/API/Z/types/mathematics.h +135 -0
  266. data/src/external/Z/API/Z/types/time.h +23 -0
  267. data/src/external/Z/COPYING.LESSER +165 -0
  268. data/src/external/Z/development/Qt Creator/Z.pro +253 -0
  269. data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
  270. data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
  271. data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
  272. data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
  273. data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
  274. data/src/external/z80/README.md +229 -0
  275. data/src/external/z80/building/premake4.lua +33 -0
  276. data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
  277. data/src/external/z80/sources/Z80.c +1660 -0
  278. data/src/interrupt.c +6 -0
  279. data/src/interrupt.h +3 -0
  280. data/src/io.c.erb +115 -0
  281. data/src/io.h.erb +18 -0
  282. data/src/main.c +69 -0
  283. data/src/memory.c.erb +43 -0
  284. data/src/memory.h.erb +9 -0
  285. metadata +329 -0
@@ -0,0 +1,20 @@
1
+ /* Z Kit - macros/key.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_macros_key_H_
9
+ #define _Z_macros_key_H_
10
+
11
+ #include <Z/types/base.h>
12
+
13
+ #define ZKey( NAME) Z_JOIN_2(Z_APPEND_NUMBER_, Z_KEY_BITS_##NAME)(zuint)
14
+ #define Z_KEY_VALUE_TYPE( NAME) Z_JOIN_2(Z_INSERT_NUMBER_, Z_KEY_BITS_##NAME)(Z_UINT, _VALUE_TYPE )
15
+ #define Z_KEY_FIXED_VALUE_TYPE(NAME) Z_JOIN_2(Z_INSERT_NUMBER_, Z_KEY_BITS_##NAME)(Z_UINT, _FIXED_VALUE_TYPE)
16
+ #define Z_KEY_VALUE_FORMAT( NAME) Z_JOIN_2(Z_INSERT_NUMBER_, Z_KEY_BITS_##NAME)(Z_UINT, _VALUE_FORMAT )
17
+ #define Z_KEY_BITS( NAME) Z_KEY_BITS_##NAME
18
+ #define Z_KEY_SIZE( NAME) Z_JOIN_2(Z_INSERT_NUMBER_, Z_KEY_BITS_##NAME)(Z_UINT, _SIZE )
19
+
20
+ #endif /* _Z_macros_key_H_ */
@@ -0,0 +1,126 @@
1
+ /* Z Kit - macros/language.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_macros_language_H_
9
+ #define _Z_macros_language_H_
10
+
11
+ #include <Z/inspection/language.h>
12
+
13
+ /* MARK: - Attributes */
14
+
15
+ #if Z_COMPILER_HAS_ATTRIBUTE(NULL_TERMINATED)
16
+ # define Z_NULL_TERMINATED Z_COMPILER_ATTRIBUTE(NULL_TERMINATED)
17
+ #else
18
+ # define Z_NULL_TERMINATED
19
+ #endif
20
+
21
+ #if Z_COMPILER_HAS_ATTRIBUTE(STRICT_SIZE_BEGIN) && Z_COMPILER_HAS_ATTRIBUTE(STRICT_SIZE_END)
22
+ # define Z_STRICT_SIZE_BEGIN Z_COMPILER_ATTRIBUTE(STRICT_SIZE_BEGIN)
23
+ # define Z_STRICT_SIZE_END Z_COMPILER_ATTRIBUTE(STRICT_SIZE_END)
24
+ #else
25
+ # define Z_STRICT_SIZE_BEGIN
26
+ # define Z_STRICT_SIZE_END
27
+ #endif
28
+
29
+ #if Z_COMPILER_HAS_ATTRIBUTE(PRIVATE)
30
+ # define Z_PRIVATE Z_COMPILER_ATTRIBUTE(PRIVATE)
31
+ #elif Z_LANGUAGE_HAS_STORAGE_CLASS(C, STATIC)
32
+ # define Z_PRIVATE static
33
+ #else
34
+ # define Z_PRIVATE
35
+ #endif
36
+
37
+ #if Z_COMPILER_HAS_ATTRIBUTE(PUBLIC)
38
+ # define Z_PUBLIC Z_COMPILER_ATTRIBUTE(PUBLIC)
39
+ #else
40
+ # define Z_PUBLIC
41
+ #endif
42
+
43
+ #if Z_COMPILER_HAS_ATTRIBUTE(WEAK)
44
+ # define Z_WEAK Z_COMPILER_ATTRIBUTE(WEAK)
45
+ #else
46
+ # define Z_WEAK
47
+ #endif
48
+
49
+ #if Z_COMPILER_HAS_ATTRIBUTE(API)
50
+ # define Z_API Z_COMPILER_ATTRIBUTE(API)
51
+ #else
52
+ # define Z_API
53
+ #endif
54
+
55
+ #if Z_COMPILER_HAS_ATTRIBUTE(API_EXPORT)
56
+ # define Z_API_EXPORT Z_COMPILER_ATTRIBUTE(API_EXPORT)
57
+ #else
58
+ # define Z_API_EXPORT Z_PUBLIC
59
+ #endif
60
+
61
+ #if Z_COMPILER_HAS_ATTRIBUTE(API_WEAK_EXPORT)
62
+ # define Z_API_WEAK_EXPORT Z_COMPILER_ATTRIBUTE(API_WEAK_EXPORT)
63
+ #else
64
+ # define Z_API_WEAK_EXPORT Z_API_EXPORT Z_WEAK
65
+ #endif
66
+
67
+ /* MARK: - Specifiers */
68
+
69
+ #if Z_COMPILER_HAS_ATTRIBUTE(INLINE)
70
+ # define Z_INLINE Z_COMPILER_ATTRIBUTE(INLINE)
71
+
72
+ #elif Z_LANGUAGE_HAS_SPECIFIER(C, INLINE) || Z_LANGUAGE_HAS_SPECIFIER(CPP, INLINE)
73
+ # define Z_INLINE inline
74
+ #else
75
+ # define Z_INLINE
76
+ #endif
77
+
78
+ #if Z_COMPILER_HAS_ATTRIBUTE(NO_RETURN)
79
+ # define Z_NO_RETURN Z_COMPILER_ATTRIBUTE(NO_RETURN)
80
+
81
+ #elif Z_LANGUAGE_HAS_SPECIFIER(C, NO_RETURN)
82
+ # define Z_NO_RETURN _Noreturn
83
+
84
+ #elif Z_LANGUAGE_HAS_ATTRIBUTE(CPP, NO_RETURN)
85
+ # define Z_NO_RETURN [[noreturn]]
86
+
87
+ #else
88
+ # define Z_NO_RETURN
89
+ #endif
90
+
91
+ /* MARK: - Storage classes */
92
+
93
+ #if Z_COMPILER_HAS_ATTRIBUTE(THREAD_LOCAL)
94
+ # define Z_THREAD_LOCAL Z_COMPILER_ATTRIBUTE(THREAD_LOCAL)
95
+
96
+ #elif Z_LANGUAGE_HAS_STORAGE_CLASS(C, THREAD_LOCAL)
97
+ # define Z_THREAD_LOCAL _Thread_local
98
+
99
+ #elif Z_LANGUAGE_HAS_STORAGE_CLASS(CPP, THREAD_LOCAL)
100
+ # define Z_THREAD_LOCAL thread_local
101
+ #endif
102
+
103
+ /* MARK: - Built-in macros: Struture */
104
+
105
+ #if Z_COMPILER_HAS_MACRO(OFFSET_OF)
106
+ # define Z_OFFSET_OF Z_COMPILER_MACRO(OFFSET_OF)
107
+ #else
108
+ # define Z_OFFSET_OF(type, member) (((unsigned long int)&((type *)(1))->member) - 1)
109
+ #endif
110
+
111
+ /* MARK: - Informative macros */
112
+
113
+ #define Z_OUT
114
+ #define Z_INOUT
115
+
116
+ /* MARK: - Sections */
117
+
118
+ #ifdef __cplusplus
119
+ # define Z_C_SYMBOLS_BEGIN extern "C" {
120
+ # define Z_C_SYMBOLS_END }
121
+ #else
122
+ # define Z_C_SYMBOLS_BEGIN
123
+ # define Z_C_SYMBOLS_END
124
+ #endif
125
+
126
+ #endif /* _Z_macros_language_H_ */
@@ -0,0 +1,81 @@
1
+ /* Z Kit - macros/language.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_macros_language_HPP_
9
+ #define _Z_macros_language_HPP_
10
+
11
+ #include <Z/macros/language.h>
12
+
13
+ /* MARK: - Attributes */
14
+
15
+ #if Z_COMPILER_HAS_ATTRIBUTE(EBCO)
16
+ # define Z_EBCO Z_COMPILER_ATTRIBUTE(EBCO)
17
+ #else
18
+ # define Z_EBCO
19
+ #endif
20
+
21
+ /* MARK: - Constants */
22
+
23
+ #if !Z_LANGUAGE_HAS_TYPE(CPP, BOOLEAN)
24
+ # ifndef true
25
+ # define true TRUE
26
+ # endif
27
+
28
+ # ifndef false
29
+ # define false FALSE
30
+ # endif
31
+ #endif
32
+
33
+ /* MARK: - Specifiers */
34
+
35
+ #if Z_LANGUAGE_HAS_SPECIFIER(CPP, CONSTANT_EXPRESSION)
36
+ # define Z_CONSTANT constexpr
37
+ # define Z_CT_CPP11 constexpr
38
+ #else
39
+ # define Z_CONSTANT
40
+ # define Z_CT_CPP11
41
+ #endif
42
+
43
+ #if Z_LANGUAGE_HAS(CPP, CPP14_RULES_ON_CONSTANT_EXPRESSION_FUNCTION)
44
+ # define Z_CT_CPP14 constexpr
45
+ #else
46
+ # define Z_CT_CPP14
47
+ #endif
48
+
49
+ #define Z_CT(CONFORM_TO) Z_CT_##CONFORM_TO Z_INLINE
50
+
51
+ #if Z_LANGUAGE_HAS_SPECIFIER(CPP, EXPLICIT)
52
+ # define Z_EXPLICIT explicit
53
+ #else
54
+ # define Z_EXPLICIT
55
+ #endif
56
+
57
+ #if Z_LANGUAGE_HAS_SPECIFIER(CPP, NO_EXCEPTION)
58
+ # define Z_NO_EXCEPTION noexcept
59
+ #else
60
+ # define Z_NO_EXCEPTION throw()
61
+ #endif
62
+
63
+ /* MARK: - Defaulted functions */
64
+
65
+ #if !defined(Z_AVOID_VARIADIC_MACROS) && \
66
+ (Z_LANGUAGE_HAS(C, VARIADIC_MACRO) || Z_LANGUAGE_HAS(CPP, C99_PREPROCESSOR))
67
+
68
+ # if Z_LANGUAGE_HAS(CPP, DEFAULTED_FUNCTION)
69
+ # define Z_DEFAULTED(...) = default;
70
+ # else
71
+ # define Z_DEFAULTED(...) __VA_ARGS__
72
+ # endif
73
+ #else
74
+ # if Z_LANGUAGE_HAS(CPP, DEFAULTED_FUNCTION)
75
+ # define Z_DEFAULTED(body) = default;
76
+ # else
77
+ # define Z_DEFAULTED(body) body
78
+ # endif
79
+ #endif
80
+
81
+ #endif // _Z_macros_language_HPP_
@@ -0,0 +1,86 @@
1
+ /* Z Kit - macros/members.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_macros_members_H_
9
+ #define _Z_macros_members_H_
10
+
11
+ #include <Z/keys/order.h>
12
+ #include <Z/inspection/CPU.h>
13
+ #include <Z/macros/pasting.h>
14
+
15
+ #define Z_MEMBERIZE_2( m1, m2 ) m1; m2;
16
+ #define Z_MEMBERIZE_3( m1, m2, m3 ) m1; m2; m3;
17
+ #define Z_MEMBERIZE_4( m1, m2, m3, m4 ) m1; m2; m3; m4;
18
+ #define Z_MEMBERIZE_5( m1, m2, m3, m4, m5 ) m1; m2; m3; m4; m5;
19
+ #define Z_MEMBERIZE_6( m1, m2, m3, m4, m5, m6 ) m1; m2; m3; m4; m5; m6;
20
+ #define Z_MEMBERIZE_7( m1, m2, m3, m4, m5, m6, m7 ) m1; m2; m3; m4; m5; m6; m7;
21
+ #define Z_MEMBERIZE_8( m1, m2, m3, m4, m5, m6, m7, m8 ) m1; m2; m3; m4; m5; m6; m7; m8;
22
+ #define Z_MEMBERIZE_9( m1, m2, m3, m4, m5, m6, m7, m8, m9 ) m1; m2; m3; m4; m5; m6; m7; m8; m9;
23
+ #define Z_MEMBERIZE_10( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10;
24
+ #define Z_MEMBERIZE_11( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11;
25
+ #define Z_MEMBERIZE_12( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12;
26
+ #define Z_MEMBERIZE_13( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13;
27
+ #define Z_MEMBERIZE_14( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14;
28
+ #define Z_MEMBERIZE_15( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15;
29
+ #define Z_MEMBERIZE_16( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16;
30
+ #define Z_MEMBERIZE_17( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17;
31
+ #define Z_MEMBERIZE_18( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18;
32
+ #define Z_MEMBERIZE_19( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19;
33
+ #define Z_MEMBERIZE_20( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20;
34
+ #define Z_MEMBERIZE_21( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21;
35
+ #define Z_MEMBERIZE_22( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22;
36
+ #define Z_MEMBERIZE_23( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23;
37
+ #define Z_MEMBERIZE_24( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24;
38
+ #define Z_MEMBERIZE_25( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25;
39
+ #define Z_MEMBERIZE_26( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26;
40
+ #define Z_MEMBERIZE_27( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27;
41
+ #define Z_MEMBERIZE_28( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27; m28;
42
+ #define Z_MEMBERIZE_29( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27; m28; m29;
43
+ #define Z_MEMBERIZE_30( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27; m28; m29; m30;
44
+ #define Z_MEMBERIZE_31( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31 ) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27; m28; m29; m30; m31;
45
+ #define Z_MEMBERIZE_32( m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32) m1; m2; m3; m4; m5; m6; m7; m8; m9; m10; m11; m12; m13; m14; m15; m16; m17; m18; m19; m20; m21; m22; m23; m24; m25; m26; m27; m28; m29; m30; m31; m32;
46
+ #define Z_MEMBERIZE_REVERSED_2( m1, m2 ) m2; m1;
47
+ #define Z_MEMBERIZE_REVERSED_3( m1, m2, m3 ) m3; m2; m1;
48
+ #define Z_MEMBERIZE_REVERSED_4( m1, m2, m3, m4 ) m4; m3; m2; m1;
49
+ #define Z_MEMBERIZE_REVERSED_5( m1, m2, m3, m4, m5 ) m5; m4; m3; m2; m1;
50
+ #define Z_MEMBERIZE_REVERSED_6( m1, m2, m3, m4, m5, m6 ) m6; m5; m4; m3; m2; m1;
51
+ #define Z_MEMBERIZE_REVERSED_7( m1, m2, m3, m4, m5, m6, m7 ) m7; m6; m5; m4; m3; m2; m1;
52
+ #define Z_MEMBERIZE_REVERSED_8( m1, m2, m3, m4, m5, m6, m7, m8 ) m8; m7; m6; m5; m4; m3; m2; m1;
53
+ #define Z_MEMBERIZE_REVERSED_9( m1, m2, m3, m4, m5, m6, m7, m8, m9 ) m9; m8; m7; m6; m5; m4; m3; m2; m1;
54
+ #define Z_MEMBERIZE_REVERSED_10(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10 ) m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
55
+ #define Z_MEMBERIZE_REVERSED_11(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11 ) m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
56
+ #define Z_MEMBERIZE_REVERSED_12(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12 ) m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
57
+ #define Z_MEMBERIZE_REVERSED_13(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13 ) m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
58
+ #define Z_MEMBERIZE_REVERSED_14(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14 ) m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
59
+ #define Z_MEMBERIZE_REVERSED_15(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15 ) m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
60
+ #define Z_MEMBERIZE_REVERSED_16(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16 ) m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
61
+ #define Z_MEMBERIZE_REVERSED_17(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17 ) m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
62
+ #define Z_MEMBERIZE_REVERSED_18(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18 ) m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
63
+ #define Z_MEMBERIZE_REVERSED_19(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19 ) m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
64
+ #define Z_MEMBERIZE_REVERSED_20(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20 ) m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
65
+ #define Z_MEMBERIZE_REVERSED_21(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21 ) m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
66
+ #define Z_MEMBERIZE_REVERSED_22(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22 ) m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
67
+ #define Z_MEMBERIZE_REVERSED_23(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23 ) m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
68
+ #define Z_MEMBERIZE_REVERSED_24(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24 ) m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
69
+ #define Z_MEMBERIZE_REVERSED_25(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25 ) m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
70
+ #define Z_MEMBERIZE_REVERSED_26(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26 ) m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
71
+ #define Z_MEMBERIZE_REVERSED_27(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27 ) m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
72
+ #define Z_MEMBERIZE_REVERSED_28(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28 ) m28; m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
73
+ #define Z_MEMBERIZE_REVERSED_29(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29 ) m29; m28; m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
74
+ #define Z_MEMBERIZE_REVERSED_30(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30 ) m30; m29; m28; m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
75
+ #define Z_MEMBERIZE_REVERSED_31(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31 ) m31; m30; m29; m28; m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
76
+ #define Z_MEMBERIZE_REVERSED_32(m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11, m12, m13, m14, m15, m16, m17, m18, m19, m20, m21, m22, m23, m24, m25, m26, m27, m28, m29, m30, m31, m32) m32; m31; m30; m29; m28; m27; m26; m25; m24; m23; m22; m21; m20; m19; m18; m17; m16; m15; m14; m13; m12; m11; m10; m9; m8; m7; m6; m5; m4; m3; m2; m1;
77
+
78
+ #define Z_BIT_FIELD(bits, member_count) \
79
+ Z_TERNARY_APPEND(Z_COMPILER_BIT_FIELD_ORDER_##bits##BIT) \
80
+ (Z_MEMBERIZE_, REVERSED_##member_count, member_count)
81
+
82
+ #define Z_ENDIANIZED_MEMBERS(bits, member_count) \
83
+ Z_TERNARY_APPEND(Z_CPU_ENDIANNESS(INTEGER, bits)) \
84
+ (Z_MEMBERIZE_, REVERSED_##member_count, member_count)
85
+
86
+ #endif /* _Z_macros_members_H_ */
@@ -0,0 +1,308 @@
1
+ /* Z Kit - macros/pasting.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_macros_pasting_H_
9
+ #define _Z_macros_pasting_H_
10
+
11
+ #define Z_EMPTY_(dummy)
12
+ #define Z_EMPTY Z_EMPTY_(.)
13
+
14
+ #define Z_QUOTED_(what) #what
15
+ #define Z_QUOTED( what) Z_QUOTED_(what)
16
+ #define Z_SAME( what) what
17
+
18
+ #define Z_EXPAND_PREFIX_0( what) 0##what
19
+ #define Z_EXPAND_PREFIX_0x( what) 0x##what
20
+ #define Z_EXPAND_PREFIX_Z( what) Z##what
21
+ #define Z_EXPAND_PREFIX_Z_( what) Z_##what
22
+ #define Z_EXPAND_PREFIX_z( what) z##what
23
+ #define Z_EXPAND_PREFIX_z_( what) z_##what
24
+ #define Z_EXPAND_PREFIX_zb_(what) zb_##what
25
+ #define Z_EXPAND_SUFFIX_DD( what) what##DD
26
+ #define Z_EXPAND_SUFFIX_DF( what) what##DF
27
+ #define Z_EXPAND_SUFFIX_DL( what) what##DL
28
+ #define Z_EXPAND_SUFFIX_F( what) what##F
29
+ #define Z_EXPAND_SUFFIX_L( what) what##L
30
+ #define Z_EXPAND_SUFFIX_LL( what) what##LL
31
+ #define Z_EXPAND_SUFFIX_Q( what) what##Q
32
+ #define Z_EXPAND_SUFFIX_U( what) what##U
33
+ #define Z_EXPAND_SUFFIX_UL( what) what##UL
34
+ #define Z_EXPAND_SUFFIX_ULL(what) what##ULL
35
+ #define Z_EXPAND_SUFFIX_W( what) what##W
36
+
37
+ #define Z_PREFIX_ Z_SAME
38
+ #define Z_PREFIX_0( what) Z_EXPAND_PREFIX_0 (what)
39
+ #define Z_PREFIX_0x( what) Z_EXPAND_PREFIX_0x (what)
40
+ #define Z_PREFIX_Z( what) Z_EXPAND_PREFIX_Z (what)
41
+ #define Z_PREFIX_Z_( what) Z_EXPAND_PREFIX_Z_ (what)
42
+ #define Z_PREFIX_z( what) Z_EXPAND_PREFIX_z (what)
43
+ #define Z_PREFIX_z_( what) Z_EXPAND_PREFIX_z_ (what)
44
+ #define Z_PREFIX_zb_(what) Z_EXPAND_PREFIX_zb_(what)
45
+ #define Z_SUFFIX_ Z_SAME
46
+ #define Z_SUFFIX_DD( what) Z_EXPAND_SUFFIX_DD (what)
47
+ #define Z_SUFFIX_DF( what) Z_EXPAND_SUFFIX_DF (what)
48
+ #define Z_SUFFIX_DL( what) Z_EXPAND_SUFFIX_DL (what)
49
+ #define Z_SUFFIX_F( what) Z_EXPAND_SUFFIX_F (what)
50
+ #define Z_SUFFIX_L( what) Z_EXPAND_SUFFIX_L (what)
51
+ #define Z_SUFFIX_LL( what) Z_EXPAND_SUFFIX_LL (what)
52
+ #define Z_SUFFIX_Q( what) Z_EXPAND_SUFFIX_Q (what)
53
+ #define Z_SUFFIX_U( what) Z_EXPAND_SUFFIX_U (what)
54
+ #define Z_SUFFIX_UL( what) Z_EXPAND_SUFFIX_UL (what)
55
+ #define Z_SUFFIX_ULL(what) Z_EXPAND_SUFFIX_ULL(what)
56
+ #define Z_SUFFIX_W( what) Z_EXPAND_SUFFIX_W (what)
57
+
58
+ #define Z_EXPAND_UNDERSCORE_( what) _##what##_
59
+ #define Z_EXPAND_UNDERSCORE_X2_( what) __##what##__
60
+ #define Z_EXPAND_PREFIX_UNDERSCORE_( what) _##what
61
+ #define Z_EXPAND_PREFIX_UNDERSCORE_X2_(what) __##what
62
+ #define Z_EXPAND_SUFFIX_UNDERSCORE_( what) what##_
63
+ #define Z_EXPAND_SUFFIX_UNDERSCORE_X2_(what) what##__
64
+
65
+ #define Z_UNDERSCORE( what) Z_EXPAND_UNDERSCORE_ (what)
66
+ #define Z_UNDERSCORE_X2( what) Z_EXPAND_UNDERSCORE_X2_ (what)
67
+ #define Z_PREFIX_UNDERSCORE( what) Z_EXPAND_PREFIX_UNDERSCORE_ (what)
68
+ #define Z_PREFIX_UNDERSCORE_X2(what) Z_EXPAND_PREFIX_UNDERSCORE_X2_(what)
69
+ #define Z_SUFFIX_UNDERSCORE( what) Z_EXPAND_SUFFIX_UNDERSCORE_ (what)
70
+ #define Z_SUFFIX_UNDERSCORE_X2(what) Z_EXPAND_SUFFIX_UNDERSCORE_X2_(what)
71
+
72
+
73
+ #define Z_PASTE_2( _1, _2) _1##_2
74
+ #define Z_PASTE_3( _1, _2, _3) _1##_2##_3
75
+ #define Z_PASTE_4( _1, _2, _3, _4) _1##_2##_3##_4
76
+ #define Z_PASTE_5( _1, _2, _3, _4, _5) _1##_2##_3##_4##_5
77
+ #define Z_PASTE_6( _1, _2, _3, _4, _5, _6) _1##_2##_3##_4##_5##_6
78
+ #define Z_PASTE_7( _1, _2, _3, _4, _5, _6, _7) _1##_2##_3##_4##_5##_6##_7
79
+ #define Z_PASTE_8( _1, _2, _3, _4, _5, _6, _7, _8) _1##_2##_3##_4##_5##_6##_7##_8
80
+ #define Z_PASTE_9( _1, _2, _3, _4, _5, _6, _7, _8, _9) _1##_2##_3##_4##_5##_6##_7##_8##_9
81
+ #define Z_PASTE_10(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10
82
+ #define Z_PASTE_11(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11
83
+ #define Z_PASTE_12(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12
84
+ #define Z_PASTE_13(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13
85
+ #define Z_PASTE_14(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14
86
+ #define Z_PASTE_15(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15
87
+ #define Z_PASTE_16(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16
88
+ #define Z_PASTE_17(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17
89
+ #define Z_PASTE_18(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18
90
+ #define Z_PASTE_19(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19
91
+ #define Z_PASTE_20(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20
92
+ #define Z_PASTE_21(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21
93
+ #define Z_PASTE_22(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22
94
+ #define Z_PASTE_23(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23
95
+ #define Z_PASTE_24(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24
96
+ #define Z_PASTE_25(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25
97
+ #define Z_PASTE_26(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26
98
+ #define Z_PASTE_27(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27
99
+ #define Z_PASTE_28(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27##_28
100
+ #define Z_PASTE_29(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27##_28##_29
101
+ #define Z_PASTE_30(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27##_28##_29##_30
102
+ #define Z_PASTE_31(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27##_28##_29##_30##_31
103
+ #define Z_PASTE_32(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) _1##_2##_3##_4##_5##_6##_7##_8##_9##_10##_11##_12##_13##_14##_15##_16##_17##_18##_19##_20##_21##_22##_23##_24##_25##_26##_27##_28##_29##_30##_31##_32
104
+
105
+ #define Z_JOIN_2( _1, _2) Z_PASTE_2 (_1, _2)
106
+ #define Z_JOIN_3( _1, _2, _3) Z_PASTE_3 (_1, _2, _3)
107
+ #define Z_JOIN_4( _1, _2, _3, _4) Z_PASTE_4 (_1, _2, _3, _4)
108
+ #define Z_JOIN_5( _1, _2, _3, _4, _5) Z_PASTE_5 (_1, _2, _3, _4, _5)
109
+ #define Z_JOIN_6( _1, _2, _3, _4, _5, _6) Z_PASTE_6 (_1, _2, _3, _4, _5, _6)
110
+ #define Z_JOIN_7( _1, _2, _3, _4, _5, _6, _7) Z_PASTE_7 (_1, _2, _3, _4, _5, _6, _7)
111
+ #define Z_JOIN_8( _1, _2, _3, _4, _5, _6, _7, _8) Z_PASTE_8 (_1, _2, _3, _4, _5, _6, _7, _8)
112
+ #define Z_JOIN_9( _1, _2, _3, _4, _5, _6, _7, _8, _9) Z_PASTE_9 (_1, _2, _3, _4, _5, _6, _7, _8, _9)
113
+ #define Z_JOIN_10(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) Z_PASTE_10(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10)
114
+ #define Z_JOIN_11(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11) Z_PASTE_11(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11)
115
+ #define Z_JOIN_12(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12) Z_PASTE_12(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12)
116
+ #define Z_JOIN_13(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13) Z_PASTE_13(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13)
117
+ #define Z_JOIN_14(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14) Z_PASTE_14(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14)
118
+ #define Z_JOIN_15(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15) Z_PASTE_15(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15)
119
+ #define Z_JOIN_16(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16) Z_PASTE_16(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16)
120
+ #define Z_JOIN_17(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17) Z_PASTE_17(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17)
121
+ #define Z_JOIN_18(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18) Z_PASTE_18(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18)
122
+ #define Z_JOIN_19(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19) Z_PASTE_19(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19)
123
+ #define Z_JOIN_20(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20) Z_PASTE_20(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20)
124
+ #define Z_JOIN_21(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21) Z_PASTE_21(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21)
125
+ #define Z_JOIN_22(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22) Z_PASTE_22(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22)
126
+ #define Z_JOIN_23(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23) Z_PASTE_23(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23)
127
+ #define Z_JOIN_24(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24) Z_PASTE_24(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24)
128
+ #define Z_JOIN_25(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25) Z_PASTE_25(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25)
129
+ #define Z_JOIN_26(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26) Z_PASTE_26(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26)
130
+ #define Z_JOIN_27(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27) Z_PASTE_27(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27)
131
+ #define Z_JOIN_28(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28) Z_PASTE_28(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28)
132
+ #define Z_JOIN_29(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29) Z_PASTE_29(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29)
133
+ #define Z_JOIN_30(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30) Z_PASTE_31(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30)
134
+ #define Z_JOIN_31(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31) Z_PASTE_31(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31)
135
+ #define Z_JOIN_32(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32) Z_PASTE_32(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32)
136
+
137
+ #define Z_PREPEND_NUMBER_0( to) 0##to
138
+ #define Z_PREPEND_NUMBER_1( to) 1##to
139
+ #define Z_PREPEND_NUMBER_2( to) 2##to
140
+ #define Z_PREPEND_NUMBER_3( to) 3##to
141
+ #define Z_PREPEND_NUMBER_4( to) 4##to
142
+ #define Z_PREPEND_NUMBER_5( to) 5##to
143
+ #define Z_PREPEND_NUMBER_6( to) 6##to
144
+ #define Z_PREPEND_NUMBER_7( to) 7##to
145
+ #define Z_PREPEND_NUMBER_8( to) 8##to
146
+ #define Z_PREPEND_NUMBER_9( to) 9##to
147
+ #define Z_PREPEND_NUMBER_10( to) 10##to
148
+ #define Z_PREPEND_NUMBER_11( to) 11##to
149
+ #define Z_PREPEND_NUMBER_12( to) 12##to
150
+ #define Z_PREPEND_NUMBER_13( to) 13##to
151
+ #define Z_PREPEND_NUMBER_14( to) 14##to
152
+ #define Z_PREPEND_NUMBER_15( to) 15##to
153
+ #define Z_PREPEND_NUMBER_16( to) 16##to
154
+ #define Z_PREPEND_NUMBER_17( to) 17##to
155
+ #define Z_PREPEND_NUMBER_18( to) 18##to
156
+ #define Z_PREPEND_NUMBER_19( to) 19##to
157
+ #define Z_PREPEND_NUMBER_20( to) 20##to
158
+ #define Z_PREPEND_NUMBER_21( to) 21##to
159
+ #define Z_PREPEND_NUMBER_22( to) 22##to
160
+ #define Z_PREPEND_NUMBER_23( to) 23##to
161
+ #define Z_PREPEND_NUMBER_24( to) 24##to
162
+ #define Z_PREPEND_NUMBER_25( to) 25##to
163
+ #define Z_PREPEND_NUMBER_26( to) 26##to
164
+ #define Z_PREPEND_NUMBER_27( to) 27##to
165
+ #define Z_PREPEND_NUMBER_28( to) 28##to
166
+ #define Z_PREPEND_NUMBER_29( to) 29##to
167
+ #define Z_PREPEND_NUMBER_30( to) 30##to
168
+ #define Z_PREPEND_NUMBER_31( to) 31##to
169
+ #define Z_PREPEND_NUMBER_32( to) 32##to
170
+ #define Z_PREPEND_NUMBER_48( to) 48##to
171
+ #define Z_PREPEND_NUMBER_64( to) 64##to
172
+ #define Z_PREPEND_NUMBER_72( to) 72##to
173
+ #define Z_PREPEND_NUMBER_80( to) 80##to
174
+ #define Z_PREPEND_NUMBER_96( to) 96##to
175
+ #define Z_PREPEND_NUMBER_128( to) 128##to
176
+ #define Z_PREPEND_NUMBER_256( to) 256##to
177
+ #define Z_PREPEND_NUMBER_512( to) 512##to
178
+ #define Z_PREPEND_NUMBER_1024(to) 1024##to
179
+
180
+ #define Z_INSERT_NUMBER_0( left, right) left##0##right
181
+ #define Z_INSERT_NUMBER_1( left, right) left##1##right
182
+ #define Z_INSERT_NUMBER_2( left, right) left##2##right
183
+ #define Z_INSERT_NUMBER_3( left, right) left##3##right
184
+ #define Z_INSERT_NUMBER_4( left, right) left##4##right
185
+ #define Z_INSERT_NUMBER_5( left, right) left##5##right
186
+ #define Z_INSERT_NUMBER_6( left, right) left##6##right
187
+ #define Z_INSERT_NUMBER_7( left, right) left##7##right
188
+ #define Z_INSERT_NUMBER_8( left, right) left##8##right
189
+ #define Z_INSERT_NUMBER_9( left, right) left##9##right
190
+ #define Z_INSERT_NUMBER_10( left, right) left##10##right
191
+ #define Z_INSERT_NUMBER_11( left, right) left##11##right
192
+ #define Z_INSERT_NUMBER_12( left, right) left##12##right
193
+ #define Z_INSERT_NUMBER_13( left, right) left##13##right
194
+ #define Z_INSERT_NUMBER_14( left, right) left##14##right
195
+ #define Z_INSERT_NUMBER_15( left, right) left##15##right
196
+ #define Z_INSERT_NUMBER_16( left, right) left##16##right
197
+ #define Z_INSERT_NUMBER_17( left, right) left##17##right
198
+ #define Z_INSERT_NUMBER_18( left, right) left##18##right
199
+ #define Z_INSERT_NUMBER_19( left, right) left##19##right
200
+ #define Z_INSERT_NUMBER_20( left, right) left##20##right
201
+ #define Z_INSERT_NUMBER_21( left, right) left##21##right
202
+ #define Z_INSERT_NUMBER_22( left, right) left##22##right
203
+ #define Z_INSERT_NUMBER_23( left, right) left##23##right
204
+ #define Z_INSERT_NUMBER_24( left, right) left##24##right
205
+ #define Z_INSERT_NUMBER_25( left, right) left##25##right
206
+ #define Z_INSERT_NUMBER_26( left, right) left##26##right
207
+ #define Z_INSERT_NUMBER_27( left, right) left##27##right
208
+ #define Z_INSERT_NUMBER_28( left, right) left##28##right
209
+ #define Z_INSERT_NUMBER_29( left, right) left##29##right
210
+ #define Z_INSERT_NUMBER_30( left, right) left##30##right
211
+ #define Z_INSERT_NUMBER_31( left, right) left##31##right
212
+ #define Z_INSERT_NUMBER_32( left, right) left##32##right
213
+ #define Z_INSERT_NUMBER_48( left, right) left##48##right
214
+ #define Z_INSERT_NUMBER_64( left, right) left##64##right
215
+ #define Z_INSERT_NUMBER_72( left, right) left##72##right
216
+ #define Z_INSERT_NUMBER_80( left, right) left##80##right
217
+ #define Z_INSERT_NUMBER_96( left, right) left##96##right
218
+ #define Z_INSERT_NUMBER_128( left, right) left##128##right
219
+ #define Z_INSERT_NUMBER_256( left, right) left##256##right
220
+ #define Z_INSERT_NUMBER_512( left, right) left##512##right
221
+ #define Z_INSERT_NUMBER_1024(left, right) left##1024##right
222
+
223
+ #define Z_APPEND_NUMBER_0( to) to##0
224
+ #define Z_APPEND_NUMBER_1( to) to##1
225
+ #define Z_APPEND_NUMBER_2( to) to##2
226
+ #define Z_APPEND_NUMBER_3( to) to##3
227
+ #define Z_APPEND_NUMBER_4( to) to##4
228
+ #define Z_APPEND_NUMBER_5( to) to##5
229
+ #define Z_APPEND_NUMBER_6( to) to##6
230
+ #define Z_APPEND_NUMBER_7( to) to##7
231
+ #define Z_APPEND_NUMBER_8( to) to##8
232
+ #define Z_APPEND_NUMBER_9( to) to##9
233
+ #define Z_APPEND_NUMBER_10( to) to##10
234
+ #define Z_APPEND_NUMBER_11( to) to##11
235
+ #define Z_APPEND_NUMBER_12( to) to##12
236
+ #define Z_APPEND_NUMBER_13( to) to##13
237
+ #define Z_APPEND_NUMBER_14( to) to##14
238
+ #define Z_APPEND_NUMBER_15( to) to##15
239
+ #define Z_APPEND_NUMBER_16( to) to##16
240
+ #define Z_APPEND_NUMBER_17( to) to##17
241
+ #define Z_APPEND_NUMBER_18( to) to##18
242
+ #define Z_APPEND_NUMBER_19( to) to##19
243
+ #define Z_APPEND_NUMBER_20( to) to##20
244
+ #define Z_APPEND_NUMBER_21( to) to##21
245
+ #define Z_APPEND_NUMBER_22( to) to##22
246
+ #define Z_APPEND_NUMBER_23( to) to##23
247
+ #define Z_APPEND_NUMBER_24( to) to##24
248
+ #define Z_APPEND_NUMBER_25( to) to##25
249
+ #define Z_APPEND_NUMBER_26( to) to##26
250
+ #define Z_APPEND_NUMBER_27( to) to##27
251
+ #define Z_APPEND_NUMBER_28( to) to##28
252
+ #define Z_APPEND_NUMBER_29( to) to##29
253
+ #define Z_APPEND_NUMBER_30( to) to##30
254
+ #define Z_APPEND_NUMBER_31( to) to##31
255
+ #define Z_APPEND_NUMBER_32( to) to##32
256
+ #define Z_APPEND_NUMBER_48( to) to##48
257
+ #define Z_APPEND_NUMBER_64( to) to##64
258
+ #define Z_APPEND_NUMBER_72( to) to##72
259
+ #define Z_APPEND_NUMBER_80( to) to##80
260
+ #define Z_APPEND_NUMBER_96( to) to##96
261
+ #define Z_APPEND_NUMBER_128( to) to##128
262
+ #define Z_APPEND_NUMBER_256( to) to##256
263
+ #define Z_APPEND_NUMBER_512( to) to##512
264
+ #define Z_APPEND_NUMBER_1024(to) to##1024
265
+
266
+ #define Z_TERNARY_PREPEND_1( to, a, b) a##to
267
+ #define Z_TERNARY_PREPEND_0( to, a, b) b##to
268
+ #define Z_TERNARY_PREPEND_TRUE( to, a, b) a##to
269
+ #define Z_TERNARY_PREPEND_FALSE(to, a, b) b##to
270
+
271
+ #define Z_TERNARY_PREPEND(condition) Z_JOIN_2(Z_TERNARY_PREPEND_, condition)
272
+
273
+ #define Z_TERNARY_INSERT_1( left, right, a, b) left##a##right
274
+ #define Z_TERNARY_INSERT_0( left, right, a, b) left##b##right
275
+ #define Z_TERNARY_INSERT_TRUE( left, right, a, b) left##a##right
276
+ #define Z_TERNARY_INSERT_FALSE(left, right, a, b) left##b##right
277
+
278
+ #define Z_TERNARY_INSERT(condition) Z_JOIN_2(Z_TERNARY_INSERT_, condition)
279
+
280
+ #define Z_TERNARY_APPEND_1( to, a, b) to##a
281
+ #define Z_TERNARY_APPEND_0( to, a, b) to##b
282
+ #define Z_TERNARY_APPEND_TRUE( to, a, b) to##a
283
+ #define Z_TERNARY_APPEND_FALSE(to, a, b) to##b
284
+
285
+ #define Z_TERNARY_APPEND(condition) Z_JOIN_2(Z_TERNARY_APPEND_, condition)
286
+
287
+ #define Z_IF_1( what) what
288
+ #define Z_IF_0( what)
289
+ #define Z_IF_TRUE( what) what
290
+ #define Z_IF_FALSE(what)
291
+
292
+ #define Z_IF(condition) Z_JOIN_2(Z_IF_, condition)
293
+
294
+ #define Z_UNLESS_1( what)
295
+ #define Z_UNLESS_0( what) what
296
+ #define Z_UNLESS_TRUE( what)
297
+ #define Z_UNLESS_FALSE(what) what
298
+
299
+ #define Z_UNLESS(condition) Z_JOIN_2(Z_UNLESS_, condition)
300
+
301
+ #define Z_TERNARY_1( a, b) a
302
+ #define Z_TERNARY_0( a, b) b
303
+ #define Z_TERNARY_TRUE( a, b) a
304
+ #define Z_TERNARY_FALSE(a, b) b
305
+
306
+ #define Z_TERNARY(condition) Z_JOIN_2(Z_TERNARY_, condition)
307
+
308
+ #endif /* _Z_macros_pasting_H_ */