tinyc.html 49 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <!-- This file is generated by Nim. -->
  4. <html xmlns="https://www.w3.org/1999/xhtml" xml:lang="en" lang="en" data-theme="auto">
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <title>std/tinyc</title>
  9. <!-- Google fonts -->
  10. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  11. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  12. <!-- Favicon -->
  13. <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
  14. <link rel="icon" type="image/png" sizes="32x32" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA3XAAAN1wFCKJt4AAAAB3RJTUUH4QQQEwksSS9ZWwAAAk1JREFUWMPtll2ITVEUx39nn/O7Y5qR8f05wtCUUr6ZIS++8pEnkZInPImneaCQ5METNdOkeFBKUhMPRIkHKfEuUZSUlGlKPN2TrgfncpvmnntnmlEyq1Z7t89/rf9a6+y99oZxGZf/XeIq61EdtgKXgdXA0xrYAvBjOIF1AI9zvjcC74BSpndrJPkBWDScTF8Aa4E3wDlgHbASaANmVqlcCnwHvgDvgVfAJ+AikAAvgfVZwLnSVZHZaOuKoQi3ZOMi4NkYkpe1p4J7A8BpYAD49hfIy/oqG0+hLomiKP2L5L+1ubn5115S+3OAn4EnwBlgMzCjyt6ZAnQCJ4A7wOs88iRJHvw50HoujuPBoCKwHWiosy8MdfZnAdcHk8dxXFJ3VQbQlCTJvRBCGdRbD4M6uc5glpY3eAihpN5S5w12diSEcCCEcKUO4ljdr15T76ur1FDDLIQQ3qv71EdDOe3Kxj3leRXyk+pxdWnFWod6Wt2bY3de3aSuUHcPBVimHs7mK9WrmeOF6lR1o9qnzskh2ar2qm1qizpfXaPeVGdlmGN5pb09qMxz1Xb1kLqgzn1RyH7JUXW52lr5e/Kqi9qpto7V1atuUzfnARrV7jEib1T76gG2qxdGmXyiekkt1GswPTtek0aBfJp6YySGBfWg2tPQ0FAYgf1stUfdmdcjarbYJEniKIq6gY/Aw+zWHAC+p2labGpqiorFYgGYCEzN7oQdQClN07O1/EfDyGgC0ALMBdYAi4FyK+4H3gLPsxfR1zRNi+NP7nH5J+QntnXe5B5mpfQAAAAASUVORK5CYII=">
  15. <!-- CSS -->
  16. <link rel="stylesheet" type="text/css" href="nimdoc.out.css?v=2.3.1">
  17. <!-- JS -->
  18. <script type="text/javascript" src="dochack.js?v=2.3.1"></script>
  19. </head>
  20. <body>
  21. <div class="document" id="documentId">
  22. <div class="container">
  23. <h1 class="title">std/tinyc</h1>
  24. <div class="row">
  25. <div class="three columns">
  26. <div class="theme-select-wrapper">
  27. <label for="theme-select">Theme:&nbsp;</label>
  28. <select id="theme-select" onchange="setTheme(this.value)">
  29. <option value="auto">🌗 Match OS</option>
  30. <option value="dark">🌑 Dark</option>
  31. <option value="light">🌕 Light</option>
  32. </select>
  33. </div>
  34. <div id="global-links">
  35. <ul class="simple-boot">
  36. <li><a href="manual.html">Manual</a></li>
  37. <li><a href="lib.html">Standard library</a></li>
  38. <li> <a id="indexLink" href="theindex.html">Index</a></li>
  39. <li><a href="compiler/theindex.html">Compiler docs</a></li>
  40. <li><a href="https://nim-lang.github.io/fusion/theindex.html">Fusion docs</a></li>
  41. <li><a href="https://nim-lang.github.io/Nim/">devel</a>, <a href="https://nim-lang.org/documentation.html">stable</a></li>
  42. </ul>
  43. </div>
  44. <div id="searchInputDiv">
  45. Search: <input type="search" id="searchInput"
  46. oninput="search()" />
  47. </div>
  48. <ul class="simple simple-toc" id="toc-list">
  49. <li>
  50. <details open>
  51. <summary><a class="reference reference-toplevel" href="#7" id="57">Types</a></summary>
  52. <ul class="simple simple-toc-section">
  53. <li><a class="reference" href="#ErrorFunc" title="ErrorFunc = proc (opaque: pointer; msg: cstring) {.cdecl.}">ErrorFunc</a></li>
  54. <li><a class="reference" href="#PccState" title="PccState = ptr CcState">PccState</a></li>
  55. </ul>
  56. </details>
  57. </li>
  58. <li>
  59. <details open>
  60. <summary><a class="reference reference-toplevel" href="#10" id="60">Consts</a></summary>
  61. <ul class="simple simple-toc-section">
  62. <li><a class="reference" href="#OutputDll" title="OutputDll: cint = 3">OutputDll</a></li>
  63. <li><a class="reference" href="#OutputExe" title="OutputExe: cint = 2">OutputExe</a></li>
  64. <li><a class="reference" href="#OutputMemory" title="OutputMemory: cint = 1">OutputMemory</a></li>
  65. <li><a class="reference" href="#OutputObj" title="OutputObj: cint = 4">OutputObj</a></li>
  66. <li><a class="reference" href="#OutputPreprocess" title="OutputPreprocess: cint = 5">OutputPreprocess</a></li>
  67. </ul>
  68. </details>
  69. </li>
  70. <li>
  71. <details open>
  72. <summary><a class="reference reference-toplevel" href="#12" id="62">Procs</a></summary>
  73. <ul class="simple simple-toc-section">
  74. <ul class="simple nested-toc-section">addFile
  75. <li><a class="reference" href="#addFile%2CPccState%2Ccstring" title="addFile(s: PccState; filename: cstring): cint">addFile(s: PccState; filename: cstring): cint</a></li>
  76. </ul>
  77. <ul class="simple nested-toc-section">addIncludePath
  78. <li><a class="reference" href="#addIncludePath%2CPccState%2Ccstring" title="addIncludePath(s: PccState; pathname: cstring)">addIncludePath(s: PccState; pathname: cstring)</a></li>
  79. </ul>
  80. <ul class="simple nested-toc-section">addLibrary
  81. <li><a class="reference" href="#addLibrary%2CPccState%2Ccstring" title="addLibrary(s: PccState; libraryname: cstring): cint">addLibrary(s: PccState; libraryname: cstring): cint</a></li>
  82. </ul>
  83. <ul class="simple nested-toc-section">addLibraryPath
  84. <li><a class="reference" href="#addLibraryPath%2CPccState%2Ccstring" title="addLibraryPath(s: PccState; pathname: cstring): cint">addLibraryPath(s: PccState; pathname: cstring): cint</a></li>
  85. </ul>
  86. <ul class="simple nested-toc-section">addSymbol
  87. <li><a class="reference" href="#addSymbol%2CPccState%2Ccstring%2Cpointer" title="addSymbol(s: PccState; name: cstring; val: pointer): cint">addSymbol(s: PccState; name: cstring; val: pointer): cint</a></li>
  88. </ul>
  89. <ul class="simple nested-toc-section">addSysincludePath
  90. <li><a class="reference" href="#addSysincludePath%2CPccState%2Ccstring" title="addSysincludePath(s: PccState; pathname: cstring)">addSysincludePath(s: PccState; pathname: cstring)</a></li>
  91. </ul>
  92. <ul class="simple nested-toc-section">closeCCState
  93. <li><a class="reference" href="#closeCCState%2CPccState" title="closeCCState(s: PccState)">closeCCState(s: PccState)</a></li>
  94. </ul>
  95. <ul class="simple nested-toc-section">compileString
  96. <li><a class="reference" href="#compileString%2CPccState%2Ccstring" title="compileString(s: PccState; buf: cstring): cint">compileString(s: PccState; buf: cstring): cint</a></li>
  97. </ul>
  98. <ul class="simple nested-toc-section">defineSymbol
  99. <li><a class="reference" href="#defineSymbol%2CPccState%2Ccstring%2Ccstring" title="defineSymbol(s: PccState; sym, value: cstring)">defineSymbol(s: PccState; sym, value: cstring)</a></li>
  100. </ul>
  101. <ul class="simple nested-toc-section">getSymbol
  102. <li><a class="reference" href="#getSymbol%2CPccState%2Ccstring" title="getSymbol(s: PccState; name: cstring): pointer">getSymbol(s: PccState; name: cstring): pointer</a></li>
  103. </ul>
  104. <ul class="simple nested-toc-section">openCCState
  105. <li><a class="reference" href="#openCCState" title="openCCState(): PccState">openCCState(): PccState</a></li>
  106. </ul>
  107. <ul class="simple nested-toc-section">outputFile
  108. <li><a class="reference" href="#outputFile%2CPccState%2Ccstring" title="outputFile(s: PccState; filename: cstring): cint">outputFile(s: PccState; filename: cstring): cint</a></li>
  109. </ul>
  110. <ul class="simple nested-toc-section">relocate
  111. <li><a class="reference" href="#relocate%2CPccState%2Cpointer" title="relocate(s: PccState; p: pointer): cint">relocate(s: PccState; p: pointer): cint</a></li>
  112. </ul>
  113. <ul class="simple nested-toc-section">run
  114. <li><a class="reference" href="#run%2CPccState%2Ccint%2CcstringArray" title="run(s: PccState; argc: cint; argv: cstringArray): cint">run(s: PccState; argc: cint; argv: cstringArray): cint</a></li>
  115. </ul>
  116. <ul class="simple nested-toc-section">setErrorFunc
  117. <li><a class="reference" href="#setErrorFunc%2CPccState%2Cpointer%2CErrorFunc" title="setErrorFunc(s: PccState; errorOpaque: pointer; errorFun: ErrorFunc)">setErrorFunc(s: PccState; errorOpaque: pointer; errorFun: ErrorFunc)</a></li>
  118. </ul>
  119. <ul class="simple nested-toc-section">setLibPath
  120. <li><a class="reference" href="#setLibPath%2CPccState%2Ccstring" title="setLibPath(s: PccState; path: cstring)">setLibPath(s: PccState; path: cstring)</a></li>
  121. </ul>
  122. <ul class="simple nested-toc-section">setOptions
  123. <li><a class="reference" href="#setOptions%2CPccState%2Ccstring" title="setOptions(s: PccState; options: cstring)">setOptions(s: PccState; options: cstring)</a></li>
  124. </ul>
  125. <ul class="simple nested-toc-section">setOutputType
  126. <li><a class="reference" href="#setOutputType%2CPccState%2Ccint" title="setOutputType(s: PccState; outputType: cint): cint">setOutputType(s: PccState; outputType: cint): cint</a></li>
  127. </ul>
  128. <ul class="simple nested-toc-section">undefineSymbol
  129. <li><a class="reference" href="#undefineSymbol%2CPccState%2Ccstring" title="undefineSymbol(s: PccState; sym: cstring)">undefineSymbol(s: PccState; sym: cstring)</a></li>
  130. </ul>
  131. </ul>
  132. </details>
  133. </li>
  134. </ul>
  135. </div>
  136. <div class="nine columns" id="content">
  137. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L1" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  138. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L1" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  139. <div id="tocRoot"></div>
  140. <p class="module-desc"></p>
  141. <div class="section" id="7">
  142. <h1><a class="toc-backref" href="#7">Types</a></h1>
  143. <dl class="item">
  144. <div id="ErrorFunc">
  145. <dt><pre><a href="tinyc.html#ErrorFunc"><span class="Identifier">ErrorFunc</span></a> <span class="Other">=</span> <span class="Keyword">proc</span> <span class="Other">(</span><span class="Identifier">opaque</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</span></a><span class="Other">;</span> <span class="Identifier">msg</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span>.}</pre></dt>
  146. <dd>
  147. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L14" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  148. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L14" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  149. </dd>
  150. </div>
  151. <div id="PccState">
  152. <dt><pre><a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a> <span class="Other">=</span> <span class="Keyword">ptr</span> <span class="Identifier">CcState</span></pre></dt>
  153. <dd>
  154. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L12" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  155. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L12" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  156. </dd>
  157. </div>
  158. </dl>
  159. </div>
  160. <div class="section" id="10">
  161. <h1><a class="toc-backref" href="#10">Consts</a></h1>
  162. <dl class="item">
  163. <div id="OutputDll">
  164. <dt><pre><a href="tinyc.html#OutputDll"><span class="Identifier">OutputDll</span></a><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Other">=</span> <span class="DecNumber">3</span></pre></dt>
  165. <dd>
  166. dynamic library
  167. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L65" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  168. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L65" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  169. </dd>
  170. </div>
  171. <div id="OutputExe">
  172. <dt><pre><a href="tinyc.html#OutputExe"><span class="Identifier">OutputExe</span></a><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Other">=</span> <span class="DecNumber">2</span></pre></dt>
  173. <dd>
  174. executable file
  175. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L64" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  176. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L64" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  177. </dd>
  178. </div>
  179. <div id="OutputMemory">
  180. <dt><pre><a href="tinyc.html#OutputMemory"><span class="Identifier">OutputMemory</span></a><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Other">=</span> <span class="DecNumber">1</span></pre></dt>
  181. <dd>
  182. output will be ran in memory (no output file) (default)
  183. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L62" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  184. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L62" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  185. </dd>
  186. </div>
  187. <div id="OutputObj">
  188. <dt><pre><a href="tinyc.html#OutputObj"><span class="Identifier">OutputObj</span></a><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Other">=</span> <span class="DecNumber">4</span></pre></dt>
  189. <dd>
  190. object file
  191. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L66" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  192. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L66" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  193. </dd>
  194. </div>
  195. <div id="OutputPreprocess">
  196. <dt><pre><a href="tinyc.html#OutputPreprocess"><span class="Identifier">OutputPreprocess</span></a><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> <span class="Other">=</span> <span class="DecNumber">5</span></pre></dt>
  197. <dd>
  198. preprocessed file (used internally)
  199. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L67" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  200. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L67" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  201. </dd>
  202. </div>
  203. </dl>
  204. </div>
  205. <div class="section" id="12">
  206. <h1><a class="toc-backref" href="#12">Procs</a></h1>
  207. <dl class="item">
  208. <div id="addFile-procs-all">
  209. <div id="addFile,PccState,cstring">
  210. <dt><pre><span class="Keyword">proc</span> <a href="#addFile%2CPccState%2Ccstring"><span class="Identifier">addFile</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  211. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_file&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  212. <dd>
  213. add a file (either a C file, dll, an object, a library or an ld script). Return -1 if error.
  214. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L49" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  215. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L49" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  216. </dd>
  217. </div>
  218. </div>
  219. <div id="addIncludePath-procs-all">
  220. <div id="addIncludePath,PccState,cstring">
  221. <dt><pre><span class="Keyword">proc</span> <a href="#addIncludePath%2CPccState%2Ccstring"><span class="Identifier">addIncludePath</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">pathname</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  222. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_include_path&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  223. <dd>
  224. add include path
  225. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L31" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  226. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L31" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  227. </dd>
  228. </div>
  229. </div>
  230. <div id="addLibrary-procs-all">
  231. <div id="addLibrary,PccState,cstring">
  232. <dt><pre><span class="Keyword">proc</span> <a href="#addLibrary%2CPccState%2Ccstring"><span class="Identifier">addLibrary</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">libraryname</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  233. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_library&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  234. <dd>
  235. the library name is the same as the argument of the '-l' option
  236. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L77" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  237. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L77" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  238. </dd>
  239. </div>
  240. </div>
  241. <div id="addLibraryPath-procs-all">
  242. <div id="addLibraryPath,PccState,cstring">
  243. <dt><pre><span class="Keyword">proc</span> <a href="#addLibraryPath%2CPccState%2Ccstring"><span class="Identifier">addLibraryPath</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">pathname</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  244. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_library_path&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  245. <dd>
  246. equivalent to -Lpath option
  247. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L73" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  248. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L73" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  249. </dd>
  250. </div>
  251. </div>
  252. <div id="addSymbol-procs-all">
  253. <div id="addSymbol,PccState,cstring,pointer">
  254. <dt><pre><span class="Keyword">proc</span> <a href="#addSymbol%2CPccState%2Ccstring%2Cpointer"><span class="Identifier">addSymbol</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">;</span> <span class="Identifier">val</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  255. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_symbol&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  256. <dd>
  257. add a symbol to the compiled program
  258. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L81" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  259. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L81" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  260. </dd>
  261. </div>
  262. </div>
  263. <div id="addSysincludePath-procs-all">
  264. <div id="addSysincludePath,PccState,cstring">
  265. <dt><pre><span class="Keyword">proc</span> <a href="#addSysincludePath%2CPccState%2Ccstring"><span class="Identifier">addSysincludePath</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">pathname</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  266. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_add_sysinclude_path&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  267. <dd>
  268. add in system include path
  269. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L35" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  270. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L35" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  271. </dd>
  272. </div>
  273. </div>
  274. <div id="closeCCState-procs-all">
  275. <div id="closeCCState,PccState">
  276. <dt><pre><span class="Keyword">proc</span> <a href="#closeCCState%2CPccState"><span class="Identifier">closeCCState</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">)</span> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_delete&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
  277. <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  278. <dd>
  279. free a TCC compilation context
  280. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L19" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  281. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L19" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  282. </dd>
  283. </div>
  284. </div>
  285. <div id="compileString-procs-all">
  286. <div id="compileString,PccState,cstring">
  287. <dt><pre><span class="Keyword">proc</span> <a href="#compileString%2CPccState%2Ccstring"><span class="Identifier">compileString</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">buf</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  288. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_compile_string&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  289. <dd>
  290. compile a string containing a C source. Return non zero if error.
  291. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L54" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  292. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L54" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  293. </dd>
  294. </div>
  295. </div>
  296. <div id="defineSymbol-procs-all">
  297. <div id="defineSymbol,PccState,cstring,cstring">
  298. <dt><pre><span class="Keyword">proc</span> <a href="#defineSymbol%2CPccState%2Ccstring%2Ccstring"><span class="Identifier">defineSymbol</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">sym</span><span class="Other">,</span> <span class="Identifier">value</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  299. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_define_symbol&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  300. <dd>
  301. define preprocessor symbol 'sym'. Can put optional value
  302. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L39" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  303. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L39" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  304. </dd>
  305. </div>
  306. </div>
  307. <div id="getSymbol-procs-all">
  308. <div id="getSymbol,PccState,cstring">
  309. <dt><pre><span class="Keyword">proc</span> <a href="#getSymbol%2CPccState%2Ccstring"><span class="Identifier">getSymbol</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">name</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  310. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_get_symbol&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  311. <dd>
  312. return symbol value or NULL if not found
  313. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L101" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  314. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L101" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  315. </dd>
  316. </div>
  317. </div>
  318. <div id="openCCState-procs-all">
  319. <div id="openCCState">
  320. <dt><pre><span class="Keyword">proc</span> <a href="#openCCState"><span class="Identifier">openCCState</span></a><span class="Other">(</span><span class="Other">)</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a> {.<span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_new&quot;</span><span class="Other">,</span> <span class="Identifier">cdecl</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span>
  321. <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  322. <dd>
  323. create a new TCC compilation context
  324. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L16" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  325. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L16" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  326. </dd>
  327. </div>
  328. </div>
  329. <div id="outputFile-procs-all">
  330. <div id="outputFile,PccState,cstring">
  331. <dt><pre><span class="Keyword">proc</span> <a href="#outputFile%2CPccState%2Ccstring"><span class="Identifier">outputFile</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">filename</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  332. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_output_file&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  333. <dd>
  334. output an executable, library or object file. DO NOT call tcc_relocate() before.
  335. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L85" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  336. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L85" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  337. </dd>
  338. </div>
  339. </div>
  340. <div id="relocate-procs-all">
  341. <div id="relocate,PccState,pointer">
  342. <dt><pre><span class="Keyword">proc</span> <a href="#relocate%2CPccState%2Cpointer"><span class="Identifier">relocate</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">p</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span> <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_relocate&quot;</span><span class="Other">,</span>
  343. <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  344. <dd>
  345. copy code into memory passed in by the caller and do all relocations (needed before using tcc_get_symbol()). returns -1 on error and required size if ptr is NULL
  346. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L95" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  347. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L95" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  348. </dd>
  349. </div>
  350. </div>
  351. <div id="run-procs-all">
  352. <div id="run,PccState,cint,cstringArray">
  353. <dt><pre><span class="Keyword">proc</span> <a href="#run%2CPccState%2Ccint%2CcstringArray"><span class="Identifier">run</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">argc</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">;</span> <span class="Identifier">argv</span><span class="Other">:</span> <a href="ctypes.html#cstringArray"><span class="Identifier">cstringArray</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  354. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_run&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  355. <dd>
  356. link and run main() function and return its value. DO NOT call tcc_relocate() before.
  357. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L90" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  358. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L90" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  359. </dd>
  360. </div>
  361. </div>
  362. <div id="setErrorFunc-procs-all">
  363. <div id="setErrorFunc,PccState,pointer,ErrorFunc">
  364. <dt><pre><span class="Keyword">proc</span> <a href="#setErrorFunc%2CPccState%2Cpointer%2CErrorFunc"><span class="Identifier">setErrorFunc</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">errorOpaque</span><span class="Other">:</span> <a href="system.html#pointer"><span class="Identifier">pointer</span></a><span class="Other">;</span> <span class="Identifier">errorFun</span><span class="Other">:</span> <a href="tinyc.html#ErrorFunc"><span class="Identifier">ErrorFunc</span></a><span class="Other">)</span> {.
  365. <span class="Identifier">cdecl</span><span class="Other">,</span> <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_set_error_func&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  366. <dd>
  367. set error/warning display callback
  368. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L22" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  369. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L22" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  370. </dd>
  371. </div>
  372. </div>
  373. <div id="setLibPath-procs-all">
  374. <div id="setLibPath,PccState,cstring">
  375. <dt><pre><span class="Keyword">proc</span> <a href="#setLibPath%2CPccState%2Ccstring"><span class="Identifier">setLibPath</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">path</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  376. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_set_lib_path&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  377. <dd>
  378. set CONFIG_TCCDIR at runtime
  379. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L105" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  380. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L105" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  381. </dd>
  382. </div>
  383. </div>
  384. <div id="setOptions-procs-all">
  385. <div id="setOptions,PccState,cstring">
  386. <dt><pre><span class="Keyword">proc</span> <a href="#setOptions%2CPccState%2Ccstring"><span class="Identifier">setOptions</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">options</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  387. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_set_options&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  388. <dd>
  389. set a options
  390. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L26" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  391. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L26" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  392. </dd>
  393. </div>
  394. </div>
  395. <div id="setOutputType-procs-all">
  396. <div id="setOutputType,PccState,cint">
  397. <dt><pre><span class="Keyword">proc</span> <a href="#setOutputType%2CPccState%2Ccint"><span class="Identifier">setOutputType</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">outputType</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a><span class="Other">)</span><span class="Other">:</span> <a href="ctypes.html#cint"><span class="Identifier">cint</span></a> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  398. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_set_output_type&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  399. <dd>
  400. set output type. MUST BE CALLED before any compilation
  401. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L69" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  402. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L69" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  403. </dd>
  404. </div>
  405. </div>
  406. <div id="undefineSymbol-procs-all">
  407. <div id="undefineSymbol,PccState,cstring">
  408. <dt><pre><span class="Keyword">proc</span> <a href="#undefineSymbol%2CPccState%2Ccstring"><span class="Identifier">undefineSymbol</span></a><span class="Other">(</span><span class="Identifier">s</span><span class="Other">:</span> <a href="tinyc.html#PccState"><span class="Identifier">PccState</span></a><span class="Other">;</span> <span class="Identifier">sym</span><span class="Other">:</span> <a href="system.html#cstring"><span class="Identifier">cstring</span></a><span class="Other">)</span> {.<span class="Identifier">cdecl</span><span class="Other">,</span>
  409. <span class="Identifier">importc</span><span class="Other">:</span> <span class="StringLit">&quot;tcc_undefine_symbol&quot;</span><span class="Other">,</span> <span><span class="Other pragmadots">...</span></span><span class="pragmawrap"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">forbids</span><span class="Other">:</span> <span class="Other">[</span><span class="Other">]</span></span>.}</pre></dt>
  410. <dd>
  411. undefine preprocess symbol 'sym'
  412. <a href="https://github.com/nim-lang/Nim/tree/devel/lib/wrappers/tinyc.nim#L43" class="link-seesrc" target="_blank">Source</a>&nbsp;&nbsp;
  413. <a href="https://github.com/nim-lang/Nim/edit/devel/lib/wrappers/tinyc.nim#L43" class="link-seesrc" target="_blank" >Edit</a>&nbsp;&nbsp;
  414. </dd>
  415. </div>
  416. </div>
  417. </dl>
  418. </div>
  419. </div>
  420. </div>
  421. <div class="twelve-columns footer">
  422. <span class="nim-sprite"></span>
  423. <br>
  424. <small style="color: var(--hint);">Made with Nim. Generated: 2024-12-25 08:36:41 UTC</small>
  425. </div>
  426. </div>
  427. </div>
  428. <script defer data-domain="nim-lang.org" src="https://plausible.io/js/plausible.js"></script>
  429. </body>
  430. </html>