PageRenderTime 50ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/src/pseudofun.d

https://github.com/ynd/clisp-branch--ynd-devel
D | 229 lines | 201 code | 9 blank | 19 comment | 0 complexity | f55e2be74311719091d8e95f9baad306 MD5 | raw file
Possible License(s): LGPL-2.0, GPL-2.0, BSD-3-Clause
  1. /*
  2. * List of all relocatable machine pointers
  3. * Bruno Haible 1990-2004
  4. * Sam Steingold 2005, 2007
  5. */
  6. /* There are three kinds of relocatable pointers:
  7. LPSEUDOCODE(fun) local C function defined in stream.d
  8. XPSEUDOCODE(rettype,name,arglist) external C function
  9. XPSEUDODATA(type,name) external C variable
  10. The macro PSEUDO, defined in the including file, determines the macro
  11. expansion for these macros.
  12. #define PSEUDO PSEUDO_A for the declaration of the code table
  13. #define PSEUDO PSEUDO_B for the declaration of the data table
  14. #define PSEUDO PSEUDO_C for the declaration of both tables' elements
  15. #define PSEUDO PSEUDO_D for the initialization of the code table
  16. #define PSEUDO PSEUDO_E for the initialization of the data table */
  17. #define LPSEUDOCODE CONCAT(LCODE_,PSEUDO)
  18. #define XPSEUDOCODE CONCAT(XCODE_,PSEUDO)
  19. #define XPSEUDODATA CONCAT(XDATA_,PSEUDO)
  20. #define LCODE_PSEUDO_A(fun) Pseudofun pseudo_##fun;
  21. #define LCODE_PSEUDO_B(fun)
  22. #define LCODE_PSEUDO_C(fun)
  23. #define LCODE_PSEUDO_D(fun) (Pseudofun)(&fun),
  24. #define LCODE_PSEUDO_E(fun)
  25. #define XCODE_PSEUDO_A(rettype,name,arglist) Pseudofun pseudo_##name;
  26. #define XCODE_PSEUDO_B(rettype,name,arglist)
  27. #define XCODE_PSEUDO_C(rettype,name,arglist) extern rettype name arglist;
  28. #define XCODE_PSEUDO_D(rettype,name,arglist) (Pseudofun)(&name),
  29. #define XCODE_PSEUDO_E(rettype,name,arglist)
  30. #define XDATA_PSEUDO_A(type,name)
  31. #define XDATA_PSEUDO_B(type,name) Pseudofun pseudo_##name;
  32. #define XDATA_PSEUDO_C(type,name) extern type name;
  33. #define XDATA_PSEUDO_D(type,name)
  34. #define XDATA_PSEUDO_E(type,name) (Pseudofun)(&name),
  35. /* For hashtabl.d. */
  36. XPSEUDOCODE(bool, eql, (object obj1, object obj2))
  37. XPSEUDOCODE(bool, equal, (object obj1, object obj2))
  38. XPSEUDOCODE(bool, equalp, (object obj1, object obj2))
  39. XPSEUDOCODE(uint32, hashcode1stable, (object obj))
  40. XPSEUDOCODE(uint32, hashcode2, (object obj))
  41. XPSEUDOCODE(uint32, hashcode2stable, (object obj))
  42. XPSEUDOCODE(uint32, hashcode3, (object obj))
  43. XPSEUDOCODE(uint32, hashcode3stable, (object obj))
  44. XPSEUDOCODE(uint32, hashcode4, (object obj))
  45. XPSEUDOCODE(bool, gcinvariant_hashcode1_p, (object obj))
  46. XPSEUDOCODE(bool, gcinvariant_hashcode1stable_p, (object obj))
  47. XPSEUDOCODE(bool, gcinvariant_hashcode2_p, (object obj))
  48. XPSEUDOCODE(bool, gcinvariant_hashcode2stable_p, (object obj))
  49. XPSEUDOCODE(bool, gcinvariant_hashcode3_p, (object obj))
  50. XPSEUDOCODE(bool, gcinvariant_hashcode3stable_p, (object obj))
  51. XPSEUDOCODE(bool, gcinvariant_hashcode4_p, (object obj))
  52. XPSEUDOCODE(bool, hash_lookup_builtin, (object ht, object obj, bool allowgc, gcv_object_t** KVptr_, gcv_object_t** Iptr_))
  53. #ifndef GENERATIONAL_GC
  54. XPSEUDOCODE(bool, hash_lookup_builtin_with_rehash, (object ht, object obj, bool allowgc, gcv_object_t** KVptr_, gcv_object_t** Iptr_))
  55. #endif
  56. XPSEUDOCODE(bool, hash_lookup_user, (object ht, object obj, bool allowgc, gcv_object_t** KVptr_, gcv_object_t** Iptr_))
  57. LPSEUDOCODE(rd_by_error) LPSEUDOCODE(rd_by_array_error) LPSEUDOCODE(rd_by_array_dummy)
  58. LPSEUDOCODE(wr_by_error) LPSEUDOCODE(wr_by_array_error) LPSEUDOCODE(wr_by_array_dummy)
  59. LPSEUDOCODE(rd_ch_error) LPSEUDOCODE(pk_ch_dummy) LPSEUDOCODE(rd_ch_array_error) LPSEUDOCODE(rd_ch_array_dummy)
  60. LPSEUDOCODE(wr_ch_error) LPSEUDOCODE(wr_ch_array_error) LPSEUDOCODE(wr_ch_array_dummy)
  61. LPSEUDOCODE(wr_ch_pending_newline) LPSEUDOCODE(wr_ch_array_pending_newline)
  62. LPSEUDOCODE(rd_by_synonym) LPSEUDOCODE(rd_by_array_synonym) LPSEUDOCODE(wr_by_synonym) LPSEUDOCODE(wr_by_array_synonym) LPSEUDOCODE(rd_ch_synonym) LPSEUDOCODE(pk_ch_synonym) LPSEUDOCODE(rd_ch_array_synonym) LPSEUDOCODE(wr_ch_synonym) LPSEUDOCODE(wr_ch_array_synonym)
  63. LPSEUDOCODE(wr_by_broad) LPSEUDOCODE(wr_by_array_broad) LPSEUDOCODE(wr_ch_broad) LPSEUDOCODE(wr_ch_array_broad)
  64. LPSEUDOCODE(rd_by_concat) LPSEUDOCODE(rd_by_array_concat) LPSEUDOCODE(rd_ch_concat) LPSEUDOCODE(pk_ch_concat) LPSEUDOCODE(rd_ch_array_concat)
  65. LPSEUDOCODE(wr_by_twoway) LPSEUDOCODE(wr_by_array_twoway) LPSEUDOCODE(wr_ch_twoway) LPSEUDOCODE(wr_ch_array_twoway)
  66. LPSEUDOCODE(rd_by_twoway) LPSEUDOCODE(rd_by_array_twoway) LPSEUDOCODE(rd_ch_twoway) LPSEUDOCODE(pk_ch_twoway) LPSEUDOCODE(rd_ch_array_twoway)
  67. LPSEUDOCODE(rd_by_echo) LPSEUDOCODE(rd_by_array_echo) LPSEUDOCODE(rd_ch_echo) LPSEUDOCODE(rd_ch_array_echo)
  68. LPSEUDOCODE(rd_ch_str_in) LPSEUDOCODE(rd_ch_array_str_in)
  69. LPSEUDOCODE(wr_ch_str_out) LPSEUDOCODE(wr_ch_array_str_out)
  70. LPSEUDOCODE(wr_ch_str_push)
  71. LPSEUDOCODE(wr_ch_pphelp) LPSEUDOCODE(wr_ch_array_pphelp)
  72. LPSEUDOCODE(rd_ch_buff_in)
  73. LPSEUDOCODE(wr_ch_buff_out)
  74. #ifdef GENERIC_STREAMS
  75. LPSEUDOCODE(rd_ch_generic) LPSEUDOCODE(pk_ch_generic) LPSEUDOCODE(wr_ch_generic) LPSEUDOCODE(wr_ch_array_generic) LPSEUDOCODE(rd_by_generic) LPSEUDOCODE(wr_by_generic)
  76. #endif
  77. LPSEUDOCODE(rd_by_iau_unbuffered) LPSEUDOCODE(rd_by_ias_unbuffered) LPSEUDOCODE(rd_by_iau8_unbuffered) LPSEUDOCODE(rd_by_array_iau8_unbuffered)
  78. LPSEUDOCODE(wr_by_iau_unbuffered) LPSEUDOCODE(wr_by_ias_unbuffered) LPSEUDOCODE(wr_by_iau8_unbuffered) LPSEUDOCODE(wr_by_array_iau8_unbuffered)
  79. LPSEUDOCODE(rd_ch_unbuffered) LPSEUDOCODE(rd_ch_array_unbuffered)
  80. LPSEUDOCODE(wr_ch_unbuffered_unix) LPSEUDOCODE(wr_ch_array_unbuffered_unix)
  81. LPSEUDOCODE(wr_ch_unbuffered_mac) LPSEUDOCODE(wr_ch_array_unbuffered_mac)
  82. LPSEUDOCODE(wr_ch_unbuffered_dos) LPSEUDOCODE(wr_ch_array_unbuffered_dos)
  83. LPSEUDOCODE(rd_ch_buffered) LPSEUDOCODE(rd_ch_array_buffered)
  84. LPSEUDOCODE(wr_ch_buffered_unix) LPSEUDOCODE(wr_ch_array_buffered_unix)
  85. LPSEUDOCODE(wr_ch_buffered_mac) LPSEUDOCODE(wr_ch_array_buffered_mac)
  86. LPSEUDOCODE(wr_ch_buffered_dos) LPSEUDOCODE(wr_ch_array_buffered_dos)
  87. LPSEUDOCODE(rd_by_iau_buffered) LPSEUDOCODE(rd_by_ias_buffered) LPSEUDOCODE(rd_by_ibu_buffered) LPSEUDOCODE(rd_by_ibs_buffered) LPSEUDOCODE(rd_by_icu_buffered) LPSEUDOCODE(rd_by_ics_buffered) LPSEUDOCODE(rd_by_iau8_buffered)
  88. LPSEUDOCODE(rd_by_array_iau8_buffered)
  89. LPSEUDOCODE(wr_by_iau_buffered) LPSEUDOCODE(wr_by_ias_buffered) LPSEUDOCODE(wr_by_ibu_buffered) LPSEUDOCODE(wr_by_ibs_buffered) LPSEUDOCODE(wr_by_icu_buffered) LPSEUDOCODE(wr_by_ics_buffered) LPSEUDOCODE(wr_by_iau8_buffered)
  90. LPSEUDOCODE(wr_by_array_iau8_buffered)
  91. #if defined(KEYBOARD)
  92. LPSEUDOCODE(rd_ch_keyboard)
  93. #endif
  94. #ifdef UNIX
  95. LPSEUDOCODE(wr_ch_terminal1) LPSEUDOCODE(rd_ch_terminal1) LPSEUDOCODE(wr_ch_array_terminal1)
  96. #if defined(GNU_READLINE)
  97. LPSEUDOCODE(wr_ch_terminal3) LPSEUDOCODE(rd_ch_terminal3) LPSEUDOCODE(wr_ch_array_terminal3)
  98. #endif
  99. #endif
  100. #ifdef SCREEN
  101. LPSEUDOCODE(wr_ch_window)
  102. #endif
  103. #ifdef PRINTER
  104. LPSEUDOCODE(wr_ch_printer)
  105. #endif
  106. /* External definitions from ENCODING.D: */
  107. #ifdef UNICODE
  108. XPSEUDOCODE(object, base64_range, (object encoding, uintL start, uintL end, uintL maxintervals))
  109. XPSEUDOCODE(uintL, base64_mblen, (object encoding, const uintB* src, const uintB* srcend))
  110. XPSEUDOCODE(void, base64_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  111. XPSEUDOCODE(uintL, base64_wcslen, (object encoding, const chart* src, const chart* srcend))
  112. XPSEUDOCODE(void, base64_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  113. XPSEUDOCODE(object, all_range, (object encoding, uintL start, uintL end, uintL maxintervals))
  114. XPSEUDOCODE(object, bmp_range, (object encoding, uintL start, uintL end, uintL maxintervals))
  115. XPSEUDOCODE(uintL, uni16_mblen, (object encoding, const uintB* src, const uintB* srcend))
  116. XPSEUDOCODE(void, uni16be_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  117. XPSEUDOCODE(void, uni16le_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  118. XPSEUDOCODE(uintL, uni16_wcslen, (object encoding, const chart* src, const chart* srcend))
  119. XPSEUDOCODE(void, uni16be_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  120. XPSEUDOCODE(void, uni16le_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  121. XPSEUDOCODE(uintL, uni32be_mblen, (object encoding, const uintB* src, const uintB* srcend))
  122. XPSEUDOCODE(uintL, uni32le_mblen, (object encoding, const uintB* src, const uintB* srcend))
  123. XPSEUDOCODE(void, uni32be_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  124. XPSEUDOCODE(void, uni32le_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  125. XPSEUDOCODE(uintL, uni32_wcslen, (object encoding, const chart* src, const chart* srcend))
  126. XPSEUDOCODE(void, uni32be_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  127. XPSEUDOCODE(void, uni32le_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  128. XPSEUDOCODE(uintL, utf8_mblen, (object encoding, const uintB* src, const uintB* srcend))
  129. XPSEUDOCODE(void, utf8_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  130. XPSEUDOCODE(uintL, utf8_wcslen, (object encoding, const chart* src, const chart* srcend))
  131. XPSEUDOCODE(void, utf8_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  132. XPSEUDOCODE(uintL, java_mblen, (object encoding, const uintB* src, const uintB* srcend))
  133. XPSEUDOCODE(void, java_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  134. XPSEUDOCODE(uintL, java_wcslen, (object encoding, const chart* src, const chart* srcend))
  135. XPSEUDOCODE(void, java_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  136. XPSEUDOCODE(uintL, nls_mblen, (object encoding, const uintB* src, const uintB* srcend))
  137. XPSEUDOCODE(void, nls_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  138. XPSEUDOCODE(uintL, nls_asciiext_mblen, (object encoding, const uintB* src, const uintB* srcend))
  139. XPSEUDOCODE(void, nls_asciiext_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  140. XPSEUDOCODE(uintL, nls_wcslen, (object encoding, const chart* src, const chart* srcend))
  141. XPSEUDOCODE(void, nls_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  142. XPSEUDOCODE(uintL, nls_asciiext_wcslen, (object encoding, const chart* src, const chart* srcend))
  143. XPSEUDOCODE(void, nls_asciiext_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  144. XPSEUDOCODE(object, nls_range, (object encoding, uintL start, uintL end, uintL maxintervals))
  145. XPSEUDODATA(struct nls_table_t, nls_ascii_table)
  146. XPSEUDODATA(struct nls_table_t, nls_iso8859_1_table)
  147. XPSEUDODATA(struct nls_table_t, nls_iso8859_2_table)
  148. XPSEUDODATA(struct nls_table_t, nls_iso8859_3_table)
  149. XPSEUDODATA(struct nls_table_t, nls_iso8859_4_table)
  150. XPSEUDODATA(struct nls_table_t, nls_iso8859_5_table)
  151. XPSEUDODATA(struct nls_table_t, nls_iso8859_6_table)
  152. XPSEUDODATA(struct nls_table_t, nls_iso8859_7_table)
  153. XPSEUDODATA(struct nls_table_t, nls_iso8859_8_table)
  154. XPSEUDODATA(struct nls_table_t, nls_iso8859_9_table)
  155. XPSEUDODATA(struct nls_table_t, nls_iso8859_10_table)
  156. XPSEUDODATA(struct nls_table_t, nls_iso8859_13_table)
  157. XPSEUDODATA(struct nls_table_t, nls_iso8859_14_table)
  158. XPSEUDODATA(struct nls_table_t, nls_iso8859_15_table)
  159. XPSEUDODATA(struct nls_table_t, nls_iso8859_16_table)
  160. XPSEUDODATA(struct nls_table_t, nls_koi8_r_table)
  161. XPSEUDODATA(struct nls_table_t, nls_koi8_u_table)
  162. XPSEUDODATA(struct nls_table_t, nls_mac_arabic_table)
  163. XPSEUDODATA(struct nls_table_t, nls_mac_centraleurope_table)
  164. XPSEUDODATA(struct nls_table_t, nls_mac_croatian_table)
  165. XPSEUDODATA(struct nls_table_t, nls_mac_cyrillic_table)
  166. XPSEUDODATA(struct nls_table_t, nls_mac_dingbat_table)
  167. XPSEUDODATA(struct nls_table_t, nls_mac_greek_table)
  168. XPSEUDODATA(struct nls_table_t, nls_mac_hebrew_table)
  169. XPSEUDODATA(struct nls_table_t, nls_mac_iceland_table)
  170. XPSEUDODATA(struct nls_table_t, nls_mac_roman_table)
  171. XPSEUDODATA(struct nls_table_t, nls_mac_romania_table)
  172. XPSEUDODATA(struct nls_table_t, nls_mac_symbol_table)
  173. XPSEUDODATA(struct nls_table_t, nls_mac_thai_table)
  174. XPSEUDODATA(struct nls_table_t, nls_mac_turkish_table)
  175. XPSEUDODATA(struct nls_table_t, nls_mac_ukraine_table)
  176. XPSEUDODATA(struct nls_table_t, nls_cp437_ms_table)
  177. XPSEUDODATA(struct nls_table_t, nls_cp437_ibm_table)
  178. XPSEUDODATA(struct nls_table_t, nls_cp737_table)
  179. XPSEUDODATA(struct nls_table_t, nls_cp775_table)
  180. XPSEUDODATA(struct nls_table_t, nls_cp850_table)
  181. XPSEUDODATA(struct nls_table_t, nls_cp852_ms_table)
  182. XPSEUDODATA(struct nls_table_t, nls_cp852_ibm_table)
  183. XPSEUDODATA(struct nls_table_t, nls_cp855_table)
  184. XPSEUDODATA(struct nls_table_t, nls_cp857_table)
  185. XPSEUDODATA(struct nls_table_t, nls_cp860_ms_table)
  186. XPSEUDODATA(struct nls_table_t, nls_cp860_ibm_table)
  187. XPSEUDODATA(struct nls_table_t, nls_cp861_ms_table)
  188. XPSEUDODATA(struct nls_table_t, nls_cp861_ibm_table)
  189. XPSEUDODATA(struct nls_table_t, nls_cp862_ms_table)
  190. XPSEUDODATA(struct nls_table_t, nls_cp862_ibm_table)
  191. XPSEUDODATA(struct nls_table_t, nls_cp863_ms_table)
  192. XPSEUDODATA(struct nls_table_t, nls_cp863_ibm_table)
  193. XPSEUDODATA(struct nls_table_t, nls_cp864_ms_table)
  194. XPSEUDODATA(struct nls_table_t, nls_cp864_ibm_table)
  195. XPSEUDODATA(struct nls_table_t, nls_cp865_ms_table)
  196. XPSEUDODATA(struct nls_table_t, nls_cp865_ibm_table)
  197. XPSEUDODATA(struct nls_table_t, nls_cp866_table)
  198. XPSEUDODATA(struct nls_table_t, nls_cp869_ms_table)
  199. XPSEUDODATA(struct nls_table_t, nls_cp869_ibm_table)
  200. XPSEUDODATA(struct nls_table_t, nls_cp874_ms_table)
  201. XPSEUDODATA(struct nls_table_t, nls_cp874_ibm_table)
  202. XPSEUDODATA(struct nls_table_t, nls_cp1250_table)
  203. XPSEUDODATA(struct nls_table_t, nls_cp1251_table)
  204. XPSEUDODATA(struct nls_table_t, nls_cp1252_table)
  205. XPSEUDODATA(struct nls_table_t, nls_cp1253_table)
  206. XPSEUDODATA(struct nls_table_t, nls_cp1254_table)
  207. XPSEUDODATA(struct nls_table_t, nls_cp1256_table)
  208. XPSEUDODATA(struct nls_table_t, nls_cp1257_table)
  209. XPSEUDODATA(struct nls_table_t, nls_hp_roman8_table)
  210. XPSEUDODATA(struct nls_table_t, nls_nextstep_table)
  211. XPSEUDODATA(struct nls_table_t, nls_jisx0201_table)
  212. #ifdef HAVE_GOOD_ICONV
  213. XPSEUDOCODE(uintL, iconv_mblen, (object encoding, const uintB* src, const uintB* srcend))
  214. XPSEUDOCODE(void, iconv_mbstowcs, (object encoding, object stream, const uintB* *srcp, const uintB* srcend, chart* *destp, chart* destend))
  215. XPSEUDOCODE(uintL, iconv_wcslen, (object encoding, const chart* src, const chart* srcend))
  216. XPSEUDOCODE(void, iconv_wcstombs, (object encoding, object stream, const chart* *srcp, const chart* srcend, uintB* *destp, uintB* destend))
  217. XPSEUDOCODE(object, iconv_range, (object encoding, uintL start, uintL end, uintL maxintervals))
  218. #endif
  219. #endif