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,407 @@
1
+ /* Z Kit - macros/templating.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_templating_H_
9
+ #define _Z_macros_templating_H_
10
+
11
+ #define Z_APPEND_UINT8(to) to##UINT8
12
+ #define Z_APPEND_UInt8(to) to##UInt8
13
+ #define Z_APPEND_uint8(to) to##uint8
14
+ #define Z_INSERT_UINT8(left, right) left##UINT8##right
15
+ #define Z_INSERT_UInt8(left, right) left##UInt8##right
16
+ #define Z_INSERT_uint8(left, right) left##uint8##right
17
+
18
+ #define Z_APPEND_SINT8(to) to##SINT8
19
+ #define Z_APPEND_SInt8(to) to##SInt8
20
+ #define Z_APPEND_sint8(to) to##sint8
21
+ #define Z_INSERT_SINT8(left, right) left##SINT8##right
22
+ #define Z_INSERT_SInt8(left, right) left##SInt8##right
23
+ #define Z_INSERT_sint8(left, right) left##sint8##right
24
+
25
+ #define Z_APPEND_UINT16(to) to##UINT16
26
+ #define Z_APPEND_UInt16(to) to##UInt16
27
+ #define Z_APPEND_uint16(to) to##uint16
28
+ #define Z_INSERT_UINT16(left, right) left##UINT16##right
29
+ #define Z_INSERT_UInt16(left, right) left##UInt16##right
30
+ #define Z_INSERT_uint16(left, right) left##uint16##right
31
+
32
+ #define Z_APPEND_SINT16(to) to##SINT16
33
+ #define Z_APPEND_SInt16(to) to##SInt16
34
+ #define Z_APPEND_sint16(to) to##sint16
35
+ #define Z_INSERT_SINT16(left, right) left##SINT16##right
36
+ #define Z_INSERT_SInt16(left, right) left##SInt16##right
37
+ #define Z_INSERT_sint16(left, right) left##sint16##right
38
+
39
+ #define Z_APPEND_UINT32(to) to##UINT32
40
+ #define Z_APPEND_UInt32(to) to##UInt32
41
+ #define Z_APPEND_uint32(to) to##uint32
42
+ #define Z_INSERT_UINT32(left, right) left##UINT32##right
43
+ #define Z_INSERT_UInt32(left, right) left##UInt32##right
44
+ #define Z_INSERT_uint32(left, right) left##uint32##right
45
+
46
+ #define Z_APPEND_SINT32(to) to##SINT32
47
+ #define Z_APPEND_SInt32(to) to##SInt32
48
+ #define Z_APPEND_sint32(to) to##sint32
49
+ #define Z_INSERT_SINT32(left, right) left##SINT32##right
50
+ #define Z_INSERT_SInt32(left, right) left##SInt32##right
51
+ #define Z_INSERT_sint32(left, right) left##sint32##right
52
+
53
+ #define Z_APPEND_UINT64(to) to##UINT64
54
+ #define Z_APPEND_UInt64(to) to##UInt64
55
+ #define Z_APPEND_uint64(to) to##uint64
56
+ #define Z_INSERT_UINT64(left, right) left##UINT64##right
57
+ #define Z_INSERT_UInt64(left, right) left##UInt64##right
58
+ #define Z_INSERT_uint64(left, right) left##uint64##right
59
+
60
+ #define Z_APPEND_SINT64(to) to##SINT64
61
+ #define Z_APPEND_SInt64(to) to##SInt64
62
+ #define Z_APPEND_sint64(to) to##sint64
63
+ #define Z_INSERT_SINT64(left, right) left##SINT64##right
64
+ #define Z_INSERT_SInt64(left, right) left##SInt64##right
65
+ #define Z_INSERT_sint64(left, right) left##sint64##right
66
+
67
+ #define Z_APPEND_UINT128(to) to##UINT128
68
+ #define Z_APPEND_UInt128(to) to##UInt128
69
+ #define Z_APPEND_uint128(to) to##uint128
70
+ #define Z_INSERT_UINT128(left, right) left##UINT128##right
71
+ #define Z_INSERT_UInt128(left, right) left##UInt128##right
72
+ #define Z_INSERT_uint128(left, right) left##uint128##right
73
+
74
+ #define Z_APPEND_SINT128(to) to##SINT128
75
+ #define Z_APPEND_SInt128(to) to##SInt128
76
+ #define Z_APPEND_sint128(to) to##sint128
77
+ #define Z_INSERT_SINT128(left, right) left##SINT128##right
78
+ #define Z_INSERT_SInt128(left, right) left##SInt128##right
79
+ #define Z_INSERT_sint128(left, right) left##sint128##right
80
+
81
+ #define Z_APPEND_FLOAT16(to) to##FLOAT16
82
+ #define Z_APPEND_Float16(to) to##Float16
83
+ #define Z_APPEND_float16(to) to##float16
84
+ #define Z_INSERT_FLOAT16(left, right) left##FLOAT16##right
85
+ #define Z_INSERT_Float16(left, right) left##Float16##right
86
+ #define Z_INSERT_float16(left, right) left##float16##right
87
+
88
+ #define Z_APPEND_FIXED_TYPE_192 Z_APPEND_FLOAT16
89
+ #define Z_APPEND_FixedType_192 Z_APPEND_Float16
90
+ #define Z_APPEND_fixed_type_192 Z_APPEND_float16
91
+ #define Z_INSERT_FIXED_TYPE_192 Z_INSERT_FLOAT16
92
+ #define Z_INSERT_FixedType_192 Z_INSERT_Float16
93
+ #define Z_INSERT_fixed_type_192 Z_INSERT_float16
94
+
95
+ #define Z_APPEND_FLOAT32(to) to##FLOAT32
96
+ #define Z_APPEND_Float32(to) to##Float32
97
+ #define Z_APPEND_float32(to) to##float32
98
+ #define Z_INSERT_FLOAT32(left, right) left##FLOAT32##right
99
+ #define Z_INSERT_Float32(left, right) left##Float32##right
100
+ #define Z_INSERT_float32(left, right) left##float32##right
101
+
102
+ #define Z_APPEND_FIXED_TYPE_193 Z_APPEND_FLOAT32
103
+ #define Z_APPEND_FixedType_193 Z_APPEND_Float32
104
+ #define Z_APPEND_fixed_type_193 Z_APPEND_float32
105
+ #define Z_INSERT_FIXED_TYPE_193 Z_INSERT_FLOAT32
106
+ #define Z_INSERT_FixedType_193 Z_INSERT_Float32
107
+ #define Z_INSERT_fixed_type_193 Z_INSERT_float32
108
+
109
+ #define Z_APPEND_FLOAT64(to) to##FLOAT64
110
+ #define Z_APPEND_Float64(to) to##Float64
111
+ #define Z_APPEND_float64(to) to##float64
112
+ #define Z_INSERT_FLOAT64(left, right) left##FLOAT64##right
113
+ #define Z_INSERT_Float64(left, right) left##Float64##right
114
+ #define Z_INSERT_float64(left, right) left##float64##right
115
+
116
+ #define Z_APPEND_FIXED_TYPE_194 Z_APPEND_FLOAT64
117
+ #define Z_APPEND_FixedType_194 Z_APPEND_Float64
118
+ #define Z_APPEND_fixed_type_194 Z_APPEND_float64
119
+ #define Z_INSERT_FIXED_TYPE_194 Z_INSERT_FLOAT64
120
+ #define Z_INSERT_FixedType_194 Z_INSERT_Float64
121
+ #define Z_INSERT_fixed_type_194 Z_INSERT_float64
122
+
123
+ #define Z_APPEND_FLOAT128(to) to##FLOAT128
124
+ #define Z_APPEND_Float128(to) to##Float128
125
+ #define Z_APPEND_float128(to) to##float128
126
+ #define Z_INSERT_FLOAT128(left, right) left##FLOAT128##right
127
+ #define Z_INSERT_Float128(left, right) left##Float128##right
128
+ #define Z_INSERT_float128(left, right) left##float128##right
129
+
130
+ #define Z_APPEND_FIXED_TYPE_195 Z_APPEND_FLOAT128
131
+ #define Z_APPEND_FixedType_195 Z_APPEND_Float128
132
+ #define Z_APPEND_fixed_type_195 Z_APPEND_float128
133
+ #define Z_INSERT_FIXED_TYPE_195 Z_INSERT_FLOAT128
134
+ #define Z_INSERT_FixedType_195 Z_INSERT_Float128
135
+ #define Z_INSERT_fixed_type_195 Z_INSERT_float128
136
+
137
+ #define Z_APPEND_FLOAT80_X87(to) to##FLOAT80_X87
138
+ #define Z_APPEND_Float80_x87(to) to##Float80_x87
139
+ #define Z_APPEND_float80_x87(to) to##float80_x87
140
+ #define Z_INSERT_FLOAT80_X87(left, right) left##FLOAT80_X87##right
141
+ #define Z_INSERT_Float80_x87(left, right) left##Float80_x87##right
142
+ #define Z_INSERT_float80_x87(left, right) left##float80_x87##right
143
+
144
+ #define Z_APPEND_FIXED_TYPE_196 Z_APPEND_FLOAT80_X87
145
+ #define Z_APPEND_FixedType_196 Z_APPEND_Float80_x87
146
+ #define Z_APPEND_fixed_type_196 Z_APPEND_float80_x87
147
+ #define Z_INSERT_FIXED_TYPE_196 Z_INSERT_FLOAT80_X87
148
+ #define Z_INSERT_FixedType_196 Z_INSERT_Float80_x87
149
+ #define Z_INSERT_fixed_type_196 Z_INSERT_float80_x87
150
+
151
+ #define Z_APPEND_FLOAT96_X87(to) to##FLOAT96_X87
152
+ #define Z_APPEND_Float96_x87(to) to##Float96_x87
153
+ #define Z_APPEND_float96_x87(to) to##float96_x87
154
+ #define Z_INSERT_FLOAT96_X87(left, right) left##FLOAT96_X87##right
155
+ #define Z_INSERT_Float96_x87(left, right) left##Float96_x87##right
156
+ #define Z_INSERT_float96_x87(left, right) left##float96_x87##right
157
+
158
+ #define Z_APPEND_FIXED_TYPE_197 Z_APPEND_FLOAT96_X87
159
+ #define Z_APPEND_FixedType_197 Z_APPEND_Float96_x87
160
+ #define Z_APPEND_fixed_type_197 Z_APPEND_float96_x87
161
+ #define Z_INSERT_FIXED_TYPE_197 Z_INSERT_FLOAT96_X87
162
+ #define Z_INSERT_FixedType_197 Z_INSERT_Float96_x87
163
+ #define Z_INSERT_fixed_type_197 Z_INSERT_float96_x87
164
+
165
+ #define Z_APPEND_FLOAT128_X87(to) to##FLOAT128_X87
166
+ #define Z_APPEND_Float128_x87(to) to##Float128_x87
167
+ #define Z_APPEND_float128_x87(to) to##float128_x87
168
+ #define Z_INSERT_FLOAT128_X87(left, right) left##FLOAT128_X87##right
169
+ #define Z_INSERT_Float128_x87(left, right) left##Float128_x87##right
170
+ #define Z_INSERT_float128_x87(left, right) left##float128_x87##right
171
+
172
+ #define Z_APPEND_FIXED_TYPE_198 Z_APPEND_FLOAT128_X87
173
+ #define Z_APPEND_FixedType_198 Z_APPEND_Float128_x87
174
+ #define Z_APPEND_fixed_type_198 Z_APPEND_float128_x87
175
+ #define Z_INSERT_FIXED_TYPE_198 Z_INSERT_FLOAT128_X87
176
+ #define Z_INSERT_FixedType_198 Z_INSERT_Float128_x87
177
+ #define Z_INSERT_fixed_type_198 Z_INSERT_float128_x87
178
+
179
+ #if ('\0' - 1) > 0
180
+ # define Z_APPEND_CHAR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UCHAR_BITS)
181
+ # define Z_APPEND_CHAR_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UCHAR_BITS)
182
+ # define Z_APPEND_CHAR_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UCHAR_BITS)
183
+ # define Z_APPEND_CHAR_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UCHAR_BITS)
184
+ # define Z_INSERT_CHAR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UCHAR_BITS)
185
+ # define Z_INSERT_CHAR_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UCHAR_BITS)
186
+ # define Z_INSERT_CHAR_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UCHAR_BITS)
187
+ # define Z_INSERT_CHAR_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UCHAR_BITS)
188
+ #else
189
+ # define Z_APPEND_CHAR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SCHAR_BITS)
190
+ # define Z_APPEND_CHAR_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SCHAR_BITS)
191
+ # define Z_APPEND_CHAR_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SCHAR_BITS)
192
+ # define Z_APPEND_CHAR_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SCHAR_BITS)
193
+ # define Z_INSERT_CHAR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SCHAR_BITS)
194
+ # define Z_INSERT_CHAR_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SCHAR_BITS)
195
+ # define Z_INSERT_CHAR_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SCHAR_BITS)
196
+ # define Z_INSERT_CHAR_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SCHAR_BITS)
197
+ #endif
198
+
199
+ #define Z_APPEND_UCHAR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UCHAR_BITS)
200
+ #define Z_APPEND_UCHAR_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UCHAR_BITS)
201
+ #define Z_APPEND_UCHAR_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UCHAR_BITS)
202
+ #define Z_APPEND_UCHAR_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UCHAR_BITS)
203
+ #define Z_INSERT_UCHAR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UCHAR_BITS)
204
+ #define Z_INSERT_UCHAR_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UCHAR_BITS)
205
+ #define Z_INSERT_UCHAR_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UCHAR_BITS)
206
+ #define Z_INSERT_UCHAR_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UCHAR_BITS)
207
+
208
+ #define Z_APPEND_SCHAR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SCHAR_BITS)
209
+ #define Z_APPEND_SCHAR_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SCHAR_BITS)
210
+ #define Z_APPEND_SCHAR_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SCHAR_BITS)
211
+ #define Z_APPEND_SCHAR_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SCHAR_BITS)
212
+ #define Z_INSERT_SCHAR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SCHAR_BITS)
213
+ #define Z_INSERT_SCHAR_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SCHAR_BITS)
214
+ #define Z_INSERT_SCHAR_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SCHAR_BITS)
215
+ #define Z_INSERT_SCHAR_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SCHAR_BITS)
216
+
217
+ #define Z_APPEND_USHORT_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_USHORT_BITS)
218
+ #define Z_APPEND_USHORT_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_USHORT_BITS)
219
+ #define Z_APPEND_USHORT_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_USHORT_BITS)
220
+ #define Z_APPEND_USHORT_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_USHORT_BITS)
221
+ #define Z_INSERT_USHORT_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_USHORT_BITS)
222
+ #define Z_INSERT_USHORT_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_USHORT_BITS)
223
+ #define Z_INSERT_USHORT_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_USHORT_BITS)
224
+ #define Z_INSERT_USHORT_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_USHORT_BITS)
225
+
226
+ #define Z_APPEND_SSHORT_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SSHORT_BITS)
227
+ #define Z_APPEND_SSHORT_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SSHORT_BITS)
228
+ #define Z_APPEND_SSHORT_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SSHORT_BITS)
229
+ #define Z_APPEND_SSHORT_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SSHORT_BITS)
230
+ #define Z_INSERT_SSHORT_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SSHORT_BITS)
231
+ #define Z_INSERT_SSHORT_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SSHORT_BITS)
232
+ #define Z_INSERT_SSHORT_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SSHORT_BITS)
233
+ #define Z_INSERT_SSHORT_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SSHORT_BITS)
234
+
235
+ #define Z_APPEND_UINT_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UINT_BITS)
236
+ #define Z_APPEND_UINT_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UINT_BITS)
237
+ #define Z_APPEND_UINT_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UINT_BITS)
238
+ #define Z_APPEND_UINT_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UINT_BITS)
239
+ #define Z_INSERT_UINT_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UINT_BITS)
240
+ #define Z_INSERT_UINT_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UINT_BITS)
241
+ #define Z_INSERT_UINT_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UINT_BITS)
242
+ #define Z_INSERT_UINT_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UINT_BITS)
243
+
244
+ #define Z_APPEND_SINT_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SINT_BITS)
245
+ #define Z_APPEND_SINT_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SINT_BITS)
246
+ #define Z_APPEND_SINT_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SINT_BITS)
247
+ #define Z_APPEND_SINT_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SINT_BITS)
248
+ #define Z_INSERT_SINT_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SINT_BITS)
249
+ #define Z_INSERT_SINT_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SINT_BITS)
250
+ #define Z_INSERT_SINT_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SINT_BITS)
251
+ #define Z_INSERT_SINT_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SINT_BITS)
252
+
253
+ #define Z_APPEND_ULONG_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_ULONG_BITS)
254
+ #define Z_APPEND_ULONG_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_ULONG_BITS)
255
+ #define Z_APPEND_ULONG_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_ULONG_BITS)
256
+ #define Z_APPEND_ULONG_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_ULONG_BITS)
257
+ #define Z_INSERT_ULONG_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_ULONG_BITS)
258
+ #define Z_INSERT_ULONG_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_ULONG_BITS)
259
+ #define Z_INSERT_ULONG_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_ULONG_BITS)
260
+ #define Z_INSERT_ULONG_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_ULONG_BITS)
261
+
262
+ #define Z_APPEND_SLONG_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SLONG_BITS)
263
+ #define Z_APPEND_SLONG_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SLONG_BITS)
264
+ #define Z_APPEND_SLONG_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SLONG_BITS)
265
+ #define Z_APPEND_SLONG_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SLONG_BITS)
266
+ #define Z_INSERT_SLONG_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SLONG_BITS)
267
+ #define Z_INSERT_SLONG_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SLONG_BITS)
268
+ #define Z_INSERT_SLONG_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SLONG_BITS)
269
+ #define Z_INSERT_SLONG_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SLONG_BITS)
270
+
271
+ #define Z_APPEND_ULLONG_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_ULLONG_BITS)
272
+ #define Z_APPEND_ULLONG_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_ULLONG_BITS)
273
+ #define Z_APPEND_ULLONG_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_ULLONG_BITS)
274
+ #define Z_APPEND_ULLONG_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_ULLONG_BITS)
275
+ #define Z_INSERT_ULLONG_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_ULLONG_BITS)
276
+ #define Z_INSERT_ULLONG_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_ULLONG_BITS)
277
+ #define Z_INSERT_ULLONG_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_ULLONG_BITS)
278
+ #define Z_INSERT_ULLONG_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_ULLONG_BITS)
279
+
280
+ #define Z_APPEND_SLLONG_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SLLONG_BITS)
281
+ #define Z_APPEND_SLLONG_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SLLONG_BITS)
282
+ #define Z_APPEND_SLLONG_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SLLONG_BITS)
283
+ #define Z_APPEND_SLLONG_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SLLONG_BITS)
284
+ #define Z_INSERT_SLLONG_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SLLONG_BITS)
285
+ #define Z_INSERT_SLLONG_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SLLONG_BITS)
286
+ #define Z_INSERT_SLLONG_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SLLONG_BITS)
287
+ #define Z_INSERT_SLLONG_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SLLONG_BITS)
288
+
289
+ #define Z_APPEND_FLOAT_FIXED_TYPE Z_JOIN_2(Z_APPEND_FIXED_TYPE_, Z_FLOAT_FIXED_VALUE_TYPE)
290
+ #define Z_APPEND_FLOAT_FixedType Z_JOIN_2(Z_APPEND_FixedType_, Z_FLOAT_FIXED_VALUE_TYPE)
291
+ #define Z_APPEND_FLOAT_fixed_type Z_JOIN_2(Z_APPEND_fixed_type_, Z_FLOAT_FIXED_VALUE_TYPE)
292
+ #define Z_INSERT_FLOAT_FIXED_TYPE Z_JOIN_2(Z_INSERT_FIXED_TYPE_, Z_FLOAT_FIXED_VALUE_TYPE)
293
+ #define Z_INSERT_FLOAT_FixedType Z_JOIN_2(Z_INSERT_FixedType_, Z_FLOAT_FIXED_VALUE_TYPE)
294
+ #define Z_INSERT_FLOAT_fixed_type Z_JOIN_2(Z_INSERT_fixed_type_, Z_FLOAT_FIXED_VALUE_TYPE)
295
+
296
+ #define Z_APPEND_DOUBLE_FIXED_TYPE Z_JOIN_2(Z_APPEND_FIXED_TYPE_, Z_DOUBLE_FIXED_VALUE_TYPE)
297
+ #define Z_APPEND_DOUBLE_FixedType Z_JOIN_2(Z_APPEND_FixedType_, Z_DOUBLE_FIXED_VALUE_TYPE)
298
+ #define Z_APPEND_DOUBLE_fixed_type Z_JOIN_2(Z_APPEND_fixed_type_, Z_DOUBLE_FIXED_VALUE_TYPE)
299
+ #define Z_INSERT_DOUBLE_FIXED_TYPE Z_JOIN_2(Z_INSERT_FIXED_TYPE_, Z_DOUBLE_FIXED_VALUE_TYPE)
300
+ #define Z_INSERT_DOUBLE_FixedType Z_JOIN_2(Z_INSERT_FixedType_, Z_DOUBLE_FIXED_VALUE_TYPE)
301
+ #define Z_INSERT_DOUBLE_fixed_type Z_JOIN_2(Z_INSERT_fixed_type_, Z_DOUBLE_FIXED_VALUE_TYPE)
302
+
303
+ #define Z_APPEND_LDOUBLE_FIXED_TYPE Z_JOIN_2(Z_APPEND_FIXED_TYPE_, Z_LDOUBLE_FIXED_VALUE_TYPE)
304
+ #define Z_APPEND_LDOUBLE_FixedType Z_JOIN_2(Z_APPEND_FixedType_, Z_LDOUBLE_FIXED_VALUE_TYPE)
305
+ #define Z_APPEND_LDOUBLE_fixed_type Z_JOIN_2(Z_APPEND_fixed_type_, Z_LDOUBLE_FIXED_VALUE_TYPE)
306
+ #define Z_INSERT_LDOUBLE_FIXED_TYPE Z_JOIN_2(Z_INSERT_FIXED_TYPE_, Z_LDOUBLE_FIXED_VALUE_TYPE)
307
+ #define Z_INSERT_LDOUBLE_FixedType Z_JOIN_2(Z_INSERT_FixedType_, Z_LDOUBLE_FIXED_VALUE_TYPE)
308
+ #define Z_INSERT_LDOUBLE_fixed_type Z_JOIN_2(Z_INSERT_fixed_type_, Z_LDOUBLE_FIXED_VALUE_TYPE)
309
+
310
+ #define Z_APPEND_USIZE_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_USIZE_BITS)
311
+ #define Z_APPEND_USIZE_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_USIZE_BITS)
312
+ #define Z_APPEND_USIZE_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_USIZE_BITS)
313
+ #define Z_APPEND_USIZE_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_USIZE_BITS)
314
+ #define Z_INSERT_USIZE_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_USIZE_BITS)
315
+ #define Z_INSERT_USIZE_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_USIZE_BITS)
316
+ #define Z_INSERT_USIZE_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_USIZE_BITS)
317
+ #define Z_INSERT_USIZE_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_USIZE_BITS)
318
+
319
+ #define Z_APPEND_SSIZE_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SSIZE_BITS)
320
+ #define Z_APPEND_SSIZE_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SSIZE_BITS)
321
+ #define Z_APPEND_SSIZE_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SSIZE_BITS)
322
+ #define Z_APPEND_SSIZE_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SSIZE_BITS)
323
+ #define Z_INSERT_SSIZE_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SSIZE_BITS)
324
+ #define Z_INSERT_SSIZE_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SSIZE_BITS)
325
+ #define Z_INSERT_SSIZE_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SSIZE_BITS)
326
+ #define Z_INSERT_SSIZE_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SSIZE_BITS)
327
+
328
+ #define Z_APPEND_UINTMAX_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UINTMAX_BITS)
329
+ #define Z_APPEND_UINTMAX_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UINTMAX_BITS)
330
+ #define Z_APPEND_UINTMAX_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UINTMAX_BITS)
331
+ #define Z_APPEND_UINTMAX_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UINTMAX_BITS)
332
+ #define Z_INSERT_UINTMAX_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UINTMAX_BITS)
333
+ #define Z_INSERT_UINTMAX_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UINTMAX_BITS)
334
+ #define Z_INSERT_UINTMAX_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UINTMAX_BITS)
335
+ #define Z_INSERT_UINTMAX_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UINTMAX_BITS)
336
+
337
+ #define Z_APPEND_SINTMAX_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SINTMAX_BITS)
338
+ #define Z_APPEND_SINTMAX_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SINTMAX_BITS)
339
+ #define Z_APPEND_SINTMAX_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SINTMAX_BITS)
340
+ #define Z_APPEND_SINTMAX_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SINTMAX_BITS)
341
+ #define Z_INSERT_SINTMAX_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SINTMAX_BITS)
342
+ #define Z_INSERT_SINTMAX_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SINTMAX_BITS)
343
+ #define Z_INSERT_SINTMAX_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SINTMAX_BITS)
344
+ #define Z_INSERT_SINTMAX_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SINTMAX_BITS)
345
+
346
+ #define Z_APPEND_UINTPTR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UINTPTR_BITS)
347
+ #define Z_APPEND_UINTPTR_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UINTPTR_BITS)
348
+ #define Z_APPEND_UINTPTR_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UINTPTR_BITS)
349
+ #define Z_APPEND_UINTPTR_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UINTPTR_BITS)
350
+ #define Z_INSERT_UINTPTR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UINTPTR_BITS)
351
+ #define Z_INSERT_UINTPTR_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UINTPTR_BITS)
352
+ #define Z_INSERT_UINTPTR_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UINTPTR_BITS)
353
+ #define Z_INSERT_UINTPTR_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UINTPTR_BITS)
354
+
355
+ #define Z_APPEND_SINTPTR_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SINTPTR_BITS)
356
+ #define Z_APPEND_SINTPTR_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SINTPTR_BITS)
357
+ #define Z_APPEND_SINTPTR_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SINTPTR_BITS)
358
+ #define Z_APPEND_SINTPTR_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SINTPTR_BITS)
359
+ #define Z_INSERT_SINTPTR_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SINTPTR_BITS)
360
+ #define Z_INSERT_SINTPTR_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SINTPTR_BITS)
361
+ #define Z_INSERT_SINTPTR_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SINTPTR_BITS)
362
+ #define Z_INSERT_SINTPTR_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SINTPTR_BITS)
363
+
364
+ #define Z_APPEND_UINTTOP_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_UINTTOP_BITS)
365
+ #define Z_APPEND_UINTTOP_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_UINTTOP_BITS)
366
+ #define Z_APPEND_UINTTOP_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_UINTTOP_BITS)
367
+ #define Z_APPEND_UINTTOP_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_UINTTOP_BITS)
368
+ #define Z_INSERT_UINTTOP_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_UINTTOP_BITS)
369
+ #define Z_INSERT_UINTTOP_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_UINTTOP_BITS)
370
+ #define Z_INSERT_UINTTOP_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_UINTTOP_BITS)
371
+ #define Z_INSERT_UINTTOP_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_UINTTOP_BITS)
372
+
373
+ #define Z_APPEND_SINTTOP_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_SINTTOP_BITS)
374
+ #define Z_APPEND_SINTTOP_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_SINTTOP_BITS)
375
+ #define Z_APPEND_SINTTOP_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_SINTTOP_BITS)
376
+ #define Z_APPEND_SINTTOP_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_SINTTOP_BITS)
377
+ #define Z_INSERT_SINTTOP_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_SINTTOP_BITS)
378
+ #define Z_INSERT_SINTTOP_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_SINTTOP_BITS)
379
+ #define Z_INSERT_SINTTOP_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_SINTTOP_BITS)
380
+ #define Z_INSERT_SINTTOP_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_SINTTOP_BITS)
381
+
382
+ #define Z_APPEND_NATURAL_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_NATURAL_BITS)
383
+ #define Z_APPEND_NATURAL_FIXED_TYPE Z_JOIN_2(Z_APPEND_UINT, Z_NATURAL_BITS)
384
+ #define Z_APPEND_NATURAL_FixedType Z_JOIN_2(Z_APPEND_UInt, Z_NATURAL_BITS)
385
+ #define Z_APPEND_NATURAL_fixed_type Z_JOIN_2(Z_APPEND_uint, Z_NATURAL_BITS)
386
+ #define Z_INSERT_NATURAL_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_NATURAL_BITS)
387
+ #define Z_INSERT_NATURAL_FIXED_TYPE Z_JOIN_2(Z_INSERT_UINT, Z_NATURAL_BITS)
388
+ #define Z_INSERT_NATURAL_FixedType Z_JOIN_2(Z_INSERT_UInt, Z_NATURAL_BITS)
389
+ #define Z_INSERT_NATURAL_fixed_type Z_JOIN_2(Z_INSERT_uint, Z_NATURAL_BITS)
390
+
391
+ #define Z_APPEND_INTEGER_BITS Z_JOIN_2(Z_APPEND_NUMBER_, Z_INTEGER_BITS)
392
+ #define Z_APPEND_INTEGER_FIXED_TYPE Z_JOIN_2(Z_APPEND_SINT, Z_INTEGER_BITS)
393
+ #define Z_APPEND_INTEGER_FixedType Z_JOIN_2(Z_APPEND_SInt, Z_INTEGER_BITS)
394
+ #define Z_APPEND_INTEGER_fixed_type Z_JOIN_2(Z_APPEND_sint, Z_INTEGER_BITS)
395
+ #define Z_INSERT_INTEGER_BITS Z_JOIN_2(Z_INSERT_NUMBER_, Z_INTEGER_BITS)
396
+ #define Z_INSERT_INTEGER_FIXED_TYPE Z_JOIN_2(Z_INSERT_SINT, Z_INTEGER_BITS)
397
+ #define Z_INSERT_INTEGER_FixedType Z_JOIN_2(Z_INSERT_SInt, Z_INTEGER_BITS)
398
+ #define Z_INSERT_INTEGER_fixed_type Z_JOIN_2(Z_INSERT_sint, Z_INTEGER_BITS)
399
+
400
+ #define Z_APPEND_REAL_FIXED_TYPE Z_JOIN_2(Z_APPEND_FIXED_TYPE_, Z_REAL_FIXED_VALUE_TYPE)
401
+ #define Z_APPEND_REAL_FixedType Z_JOIN_2(Z_APPEND_FixedType_, Z_REAL_FIXED_VALUE_TYPE)
402
+ #define Z_APPEND_REAL_fixed_type Z_JOIN_2(Z_APPEND_fixed_type_, Z_REAL_FIXED_VALUE_TYPE)
403
+ #define Z_INSERT_REAL_FIXED_TYPE Z_JOIN_2(Z_INSERT_FIXED_TYPE_, Z_REAL_FIXED_VALUE_TYPE)
404
+ #define Z_INSERT_REAL_FixedType Z_JOIN_2(Z_INSERT_FixedType_, Z_REAL_FIXED_VALUE_TYPE)
405
+ #define Z_INSERT_REAL_fixed_type Z_JOIN_2(Z_INSERT_fixed_type_, Z_REAL_FIXED_VALUE_TYPE)
406
+
407
+ #endif /* _Z_macros_templating_H_ */
@@ -0,0 +1,14 @@
1
+ /* Z Kit - macros/tokens.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_tokens_H_
9
+ #define _Z_macros_tokens_H_
10
+
11
+ #define Z_COMMA ,
12
+ #define Z_DOT .
13
+
14
+ #endif /* _Z_macros_tokens_H_ */
@@ -0,0 +1,43 @@
1
+ /* Z Kit - macros/type enumeration.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_type_enumeration_H_
9
+ #define _Z_macros_type_enumeration_H_
10
+
11
+ #include <Z/types/base.h>
12
+
13
+ #define Z_ENUMERATE_FIXED_NATURAL_TYPES_BITS(prefix, invalid) \
14
+ prefix##8, prefix##16, prefix##32, \
15
+ Z_TERNARY(Z_DATA_MODEL_HAS_TYPE(UINT64 ))(prefix##64, invalid), \
16
+ Z_TERNARY(Z_DATA_MODEL_HAS_TYPE(UINT128))(prefix##128, invalid)
17
+
18
+ #define Z_ENUMERATE_FIXED_INTEGER_TYPES_BITS(prefix, invalid) \
19
+ prefix##8, prefix##16, prefix##32, \
20
+ Z_TERNARY(Z_DATA_MODEL_HAS_TYPE(SINT64 ))(prefix##64, invalid), \
21
+ Z_TERNARY(Z_DATA_MODEL_HAS_TYPE(SINT128))(prefix##128, invalid)
22
+
23
+ #define Z_ENUMERATE_FIXED_REAL_TYPES_SUFFIXES(prefix, invalid) \
24
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT16 ))(prefix##16, invalid), \
25
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT32 ))(prefix##32, invalid), \
26
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT64 ))(prefix##64, invalid), \
27
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT128 ))(prefix##128, invalid), \
28
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT80_X87 ))(prefix##80_X87, invalid), \
29
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT96_X87 ))(prefix##96_X87, invalid), \
30
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT128_X87))(prefix##128_X87, invalid)
31
+
32
+ #define Z_ENUMERATE_FIXED_REAL_TYPES_Suffixes(prefix, invalid) \
33
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT16 ))(prefix##16, invalid), \
34
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT32 ))(prefix##32, invalid), \
35
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT64 ))(prefix##64, invalid), \
36
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT128 ))(prefix##128, invalid), \
37
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT80_X87 ))(prefix##80_x87, invalid), \
38
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT96_X87 ))(prefix##96_x87, invalid), \
39
+ Z_TERNARY(Z_FLOATING_POINT_HAS_TYPE(FLOAT128_X87))(prefix##128_x87, invalid)
40
+
41
+ #define Z_ENUMERATE_FIXED_REAL_TYPES_suffixes Z_ENUMERATE_FIXED_REAL_TYPES_Suffixes
42
+
43
+ #endif /* _Z_macros_type_enumeration_H_ */
@@ -0,0 +1,76 @@
1
+ /* Z Kit - macros/type selection.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_type_selection_HPP_
9
+ #define _Z_macros_type_selection_HPP_
10
+
11
+ #include <Z/traits/Type.hpp>
12
+ #include <Z/traits/mathematics.hpp>
13
+ #include <Z/macros/type enumeration.h>
14
+
15
+ #define ZTypeFixedNatural(Name, T) \
16
+ Zeta::SelectType< \
17
+ Zeta::Type<T>::is_natural \
18
+ ? Zeta::Logarithm2<sizeof(T)>::value \
19
+ : 31, \
20
+ Z_ENUMERATE_FIXED_NATURAL_TYPES_BITS(Name##UInt, void) \
21
+ >::type
22
+
23
+ #define ZTypeFixedInteger(Name, T) \
24
+ Zeta::SelectType< \
25
+ Zeta::Type<T>::is_integer \
26
+ ? Zeta::Logarithm2<sizeof(T)>::value \
27
+ : 31, \
28
+ Z_ENUMERATE_FIXED_INTEGER_TYPES_BITS(Name##SInt, void) \
29
+ >::type
30
+
31
+ #define ZTypeFixedExact(Name, T) \
32
+ Zeta::SelectType< \
33
+ Zeta::Type<T>::is_exact \
34
+ ? Zeta::Logarithm2<sizeof(T)>::value \
35
+ + (Zeta::Type<T>::is_signed ? 5 : 0) \
36
+ : 31, \
37
+ Z_ENUMERATE_FIXED_NATURAL_TYPES_BITS(Name##UInt, void), \
38
+ Z_ENUMERATE_FIXED_INTEGER_TYPES_BITS(Name##SInt, void) \
39
+ >::type
40
+
41
+ #define ZTypeFixedReal(Name, T) \
42
+ Zeta::SelectType< \
43
+ Zeta::Type<T>::is_real \
44
+ ? Type<T>::fixed_value_type \
45
+ - Z_KEY_INDEX_VALUE_TYPE_FIXED_REAL \
46
+ : 31, \
47
+ Z_ENUMERATE_FIXED_REAL_TYPES(Name##Float, void) \
48
+ >::type
49
+
50
+ #define ZTypeFixedSigned(Name, T) \
51
+ Zeta::SelectType< \
52
+ Zeta::Type<T>::is_signed \
53
+ ? (Zeta::Type<T>::is_integer \
54
+ ? Zeta::Logarithm2<sizeof(T)>::value \
55
+ : Type<T>::fixed_value_type \
56
+ - Z_KEY_INDEX_VALUE_TYPE_FIXED_REAL + 5) \
57
+ : 31, \
58
+ Z_ENUMERATE_FIXED_INTEGER_TYPES_BITS (Name##SInt, void), \
59
+ Z_ENUMERATE_FIXED_REAL_TYPES_Suffixes(Name##Float, void) \
60
+ >::type
61
+
62
+ #define ZTypeFixedNumber(Name, T) \
63
+ Zeta::SelectType< \
64
+ Zeta::Type<T>::is_number \
65
+ ? (Zeta::Type<T>::is_exact \
66
+ ? Zeta::Logarithm2<sizeof(T)>::value \
67
+ + (Zeta::Type<T>::is_signed ? 5 : 0) \
68
+ : Type<T>::fixed_value_type \
69
+ - Z_KEY_INDEX_VALUE_TYPE_FIXED_REAL + 5 + 5) \
70
+ : 31, \
71
+ Z_ENUMERATE_FIXED_NATURAL_TYPES_BITS (Name##UInt, void), \
72
+ Z_ENUMERATE_FIXED_INTEGER_TYPES_BITS (Name##SInt, void), \
73
+ Z_ENUMERATE_FIXED_REAL_TYPES_Suffixes(Name##Float, void) \
74
+ >::type
75
+
76
+ #endif // _Z_macros_type_selection_HPP_