lib9.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. /*
  2. * This file is part of Jehanne.
  3. *
  4. * Copyright (C) 2017-2019 Giacomo Tesio <giacomo@tesio.it>
  5. *
  6. * Jehanne is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, version 2 of the License.
  9. *
  10. * Jehanne is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with Jehanne. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /* lib9.h provides macros to map Plan9's libc functions to Jehanne one */
  19. #include <libc.h>
  20. #define memccpy jehanne_memccpy
  21. #define memset jehanne_memset
  22. #define memcmp jehanne_memcmp
  23. #define memcpy jehanne_memcpy
  24. #define memmove jehanne_memmove
  25. #define memchr jehanne_memchr
  26. #define strcat jehanne_strcat
  27. #define strchr jehanne_strchr
  28. #define strcmp jehanne_strcmp
  29. #define strcpy jehanne_strcpy
  30. #define strecpy jehanne_strecpy
  31. #define strdup jehanne_strdup
  32. #define strncat jehanne_strncat
  33. #define strncpy jehanne_strncpy
  34. #define strncmp jehanne_strncmp
  35. #define strpbrk jehanne_strpbrk
  36. #define strrchr jehanne_strrchr
  37. #define strtok jehanne_strtok
  38. #define strlen jehanne_strlen
  39. #define strspn jehanne_strspn
  40. #define strcspn jehanne_strcspn
  41. #define strstr jehanne_strstr
  42. #define cistrncmp jehanne_cistrncmp
  43. #define cistrcmp jehanne_cistrcmp
  44. #define cistrstr jehanne_cistrstr
  45. #define tokenize jehanne_tokenize
  46. #define runetochar jehanne_runetochar
  47. #define chartorune jehanne_chartorune
  48. #define runelen jehanne_runelen
  49. #define runenlen jehanne_runenlen
  50. #define fullrune jehanne_fullrune
  51. #define utflen jehanne_utflen
  52. #define utfnlen jehanne_utfnlen
  53. #define utfrune jehanne_utfrune
  54. #define utfrrune jehanne_utfrrune
  55. #define utfutf jehanne_utfutf
  56. #define utfecpy jehanne_utfecpy
  57. #define runestrcat jehanne_runestrcat
  58. #define runestrchr jehanne_runestrchr
  59. #define runestrcmp jehanne_runestrcmp
  60. #define runestrcpy jehanne_runestrcpy
  61. #define runestrncpy jehanne_runestrncpy
  62. #define runestrecpy jehanne_runestrecpy
  63. #define runestrdup jehanne_runestrdup
  64. #define runestrncat jehanne_runestrncat
  65. #define runestrncmp jehanne_runestrncmp
  66. #define runestrrchr jehanne_runestrrchr
  67. #define runestrlen jehanne_runestrlen
  68. #define runestrstr jehanne_runestrstr
  69. #define tolowerrune jehanne_tolowerrune
  70. #define totitlerune jehanne_totitlerune
  71. #define toupperrune jehanne_toupperrune
  72. #define tobaserune jehanne_tobaserune
  73. #define isalpharune jehanne_isalpharune
  74. #define isbaserune jehanne_isbaserune
  75. #define isdigitrune jehanne_isdigitrune
  76. #define islowerrune jehanne_islowerrune
  77. #define isspacerune jehanne_isspacerune
  78. #define istitlerune jehanne_istitlerune
  79. #define isupperrune jehanne_isupperrune
  80. #define malloc jehanne_malloc
  81. #define malloc jehanne_malloc
  82. #define mallocz jehanne_mallocz
  83. #define free jehanne_free
  84. #define msize jehanne_msize
  85. #define mallocalign jehanne_mallocalign
  86. #define calloc jehanne_calloc
  87. #define realloc jehanne_realloc
  88. #define setmalloctag jehanne_setmalloctag
  89. #define setrealloctag jehanne_setrealloctag
  90. #define getmalloctag jehanne_getmalloctag
  91. #define getrealloctag jehanne_getrealloctag
  92. #define malloctopoolblock jehanne_malloctopoolblock
  93. #define print jehanne_print
  94. #define print jehanne_print
  95. #define seprint jehanne_seprint
  96. #define vseprint jehanne_vseprint
  97. #define snprint jehanne_snprint
  98. #define vsnprint jehanne_vsnprint
  99. #define smprint jehanne_smprint
  100. #define vsmprint jehanne_vsmprint
  101. #define sprint jehanne_sprint
  102. #define fprint jehanne_fprint
  103. #define vfprint jehanne_vfprint
  104. #define runesprint jehanne_runesprint
  105. #define runesnprint jehanne_runesnprint
  106. #define runevsnprint jehanne_runevsnprint
  107. #define runeseprint jehanne_runeseprint
  108. #define runevseprint jehanne_runevseprint
  109. #define runesmprint jehanne_runesmprint
  110. #define runevsmprint jehanne_runevsmprint
  111. #define fmtfdinit jehanne_fmtfdinit
  112. #define fmtfdflush jehanne_fmtfdflush
  113. #define fmtstrinit jehanne_fmtstrinit
  114. #define fmtstrflush jehanne_fmtstrflush
  115. #define runefmtstrinit jehanne_runefmtstrinit
  116. #define runefmtstrflush jehanne_runefmtstrflush
  117. #define fmtinstall jehanne_fmtinstall
  118. #define dofmt jehanne_dofmt
  119. #define dorfmt jehanne_dorfmt
  120. #define fmtprint jehanne_fmtprint
  121. #define fmtvprint jehanne_fmtvprint
  122. #define fmtrune jehanne_fmtrune
  123. #define fmtstrcpy jehanne_fmtstrcpy
  124. #define fmtrunestrcpy jehanne_fmtrunestrcpy
  125. #define errfmt jehanne_errfmt
  126. #define unquotestrdup jehanne_unquotestrdup
  127. #define unquoterunestrdup jehanne_unquoterunestrdup
  128. #define quotestrdup jehanne_quotestrdup
  129. #define quoterunestrdup jehanne_quoterunestrdup
  130. #define quotestrfmt jehanne_quotestrfmt
  131. #define quoterunestrfmt jehanne_quoterunestrfmt
  132. #define quotefmtinstall jehanne_quotefmtinstall
  133. #define needsrcquote jehanne_needsrcquote
  134. #define srand jehanne_srand
  135. #define rand jehanne_rand
  136. #define nrand jehanne_nrand
  137. #define lrand jehanne_lrand
  138. #define lnrand jehanne_lnrand
  139. #define frand jehanne_frand
  140. #define truerand jehanne_truerand
  141. #define ntruerand jehanne_ntruerand
  142. #define getfcr jehanne_getfcr
  143. #define setfsr jehanne_setfsr
  144. #define setfcr jehanne_setfcr
  145. #define NaN jehanne_NaN
  146. #define Inf jehanne_Inf
  147. #define isNaN jehanne_isNaN
  148. #define isInf jehanne_isInf
  149. #define umuldiv jehanne_umuldiv
  150. #define muldiv jehanne_muldiv
  151. #define pow jehanne_pow
  152. #define atan2 jehanne_atan2
  153. #define fabs jehanne_fabs
  154. #define atan jehanne_atan
  155. #define log jehanne_log
  156. #define log10 jehanne_log10
  157. #define exp jehanne_exp
  158. #define floor jehanne_floor
  159. #define ceil jehanne_ceil
  160. #define hypot jehanne_hypot
  161. #define sin jehanne_sin
  162. #define cos jehanne_cos
  163. #define tan jehanne_tan
  164. #define asin jehanne_asin
  165. #define acos jehanne_acos
  166. #define sinh jehanne_sinh
  167. #define cosh jehanne_cosh
  168. #define tanh jehanne_tanh
  169. #define sqrt jehanne_sqrt
  170. #define fmod jehanne_fmod
  171. #define gmtime jehanne_gmtime
  172. #define localtime jehanne_localtime
  173. #define asctime jehanne_asctime
  174. #define ctime jehanne_ctime
  175. #define cputime jehanne_cputime
  176. #define times jehanne_times
  177. #define tm2sec jehanne_tm2sec
  178. #define nsec jehanne_nsec
  179. #define _assert jehanne__assert
  180. #define abs jehanne_abs
  181. #define atexit jehanne_atexit
  182. #define atexitdont jehanne_atexitdont
  183. #define atnotify jehanne_atnotify
  184. #define atof jehanne_atof
  185. #define atoi jehanne_atoi
  186. #define atol jehanne_atol
  187. #define atoll jehanne_atoll
  188. #define charstod jehanne_charstod
  189. #define chdir jehanne_chdir
  190. #define cleanname jehanne_cleanname
  191. #define dec64 jehanne_dec64
  192. #define enc64 jehanne_enc64
  193. #define dec32 jehanne_dec32
  194. #define enc32 jehanne_enc32
  195. #define dec16 jehanne_dec16
  196. #define enc16 jehanne_enc16
  197. #define encodefmt jehanne_encodefmt
  198. #define exits jehanne_exits
  199. #define frexp jehanne_frexp
  200. #define getcallerpc jehanne_getcallerpc
  201. #define getenv jehanne_getenv
  202. #define getfields jehanne_getfields
  203. #define gettokens jehanne_gettokens
  204. #define getuser jehanne_getuser
  205. #define getwd jehanne_getwd
  206. #define iounit jehanne_iounit
  207. #define labs jehanne_labs
  208. #define ldexp jehanne_ldexp
  209. #define longjmp jehanne_longjmp
  210. #define mktemp jehanne_mktemp
  211. #define modf jehanne_modf
  212. #define notejmp jehanne_notejmp
  213. #define nsec jehanne_nsec
  214. #define dup jehanne_dup
  215. #define ocreate jehanne_ocreate
  216. #define perror jehanne_perror
  217. #define pipe jehanne_pipe
  218. #define postnote jehanne_postnote
  219. #define pow10 jehanne_pow10
  220. #define putenv jehanne_putenv
  221. #define qsort jehanne_qsort
  222. #define bsearch jehanne_bsearch
  223. #define setjmp jehanne_setjmp
  224. #define strtod jehanne_strtod
  225. #define strtol jehanne_strtol
  226. #define strtoul jehanne_strtoul
  227. #define strtoll jehanne_strtoll
  228. #define strtoull jehanne_strtoull
  229. #define sysfatal jehanne_sysfatal
  230. #define syslog jehanne_syslog
  231. #define time jehanne_time
  232. #define tolower jehanne_tolower
  233. #define toupper jehanne_toupper
  234. #define ainc jehanne_ainc
  235. #define adec jehanne_adec
  236. #define tsemacquire jehanne_tsemacquire
  237. #define _tas jehanne__tas
  238. #define lock jehanne_lock
  239. #define lockt jehanne_lockt
  240. #define unlock jehanne_unlock
  241. #define canlock jehanne_canlock
  242. #define qlock jehanne_qlock
  243. #define qlockt jehanne_qlockt
  244. #define qunlock jehanne_qunlock
  245. #define canqlock jehanne_canqlock
  246. #define _qlockinit jehanne__qlockinit
  247. #define rlock jehanne_rlock
  248. #define rlockt jehanne_rlockt
  249. #define runlock jehanne_runlock
  250. #define canrlock jehanne_canrlock
  251. #define wlock jehanne_wlock
  252. #define wlockt jehanne_wlockt
  253. #define wunlock jehanne_wunlock
  254. #define canwlock jehanne_canwlock
  255. #define rsleep jehanne_rsleep
  256. #define rsleept jehanne_rsleept
  257. #define rwakeup jehanne_rwakeup
  258. #define rwakeupall jehanne_rwakeupall
  259. #define privalloc jehanne_privalloc
  260. #define accept jehanne_accept
  261. #define announce jehanne_announce
  262. #define dial jehanne_dial
  263. #define setnetmtpt jehanne_setnetmtpt
  264. #define hangup jehanne_hangup
  265. #define listen jehanne_listen
  266. #define netmkaddr jehanne_netmkaddr
  267. #define reject jehanne_reject
  268. #define pushssl jehanne_pushssl
  269. #define pushtls jehanne_pushtls
  270. #define getnetconninfo jehanne_getnetconninfo
  271. #define freenetconninfo jehanne_freenetconninfo
  272. #define access jehanne_access
  273. #define awakened jehanne_awakened
  274. #define brk jehanne_brk
  275. #define execl jehanne_execl
  276. #define forgivewkp jehanne_forgivewkp
  277. #define fork jehanne_fork
  278. #define readn jehanne_readn
  279. #define segbrk jehanne_segbrk
  280. #define segbrk jehanne_segbrk
  281. #define segattach jehanne_segattach
  282. #define segdetach jehanne_segdetach
  283. #define segfree jehanne_segfree
  284. #define sleep jehanne_sleep
  285. #define stat jehanne_stat
  286. #define wait jehanne_wait
  287. #define waitpid jehanne_waitpid
  288. #define wstat jehanne_wstat
  289. #define dirstat jehanne_dirstat
  290. #define dirfstat jehanne_dirfstat
  291. #define dirwstat jehanne_dirwstat
  292. #define dirfwstat jehanne_dirfwstat
  293. #define dirread jehanne_dirread
  294. #define nulldir jehanne_nulldir
  295. #define dirreadall jehanne_dirreadall
  296. #define getpid jehanne_getpid
  297. #define getppid jehanne_getppid
  298. #define getmainpid jehanne_getmainpid
  299. #define rerrstr jehanne_rerrstr
  300. #define sysname jehanne_sysname
  301. #define werrstr jehanne_werrstr
  302. #define convM2D jehanne_convM2D
  303. #define convD2M jehanne_convD2M
  304. #define sizeD2M jehanne_sizeD2M
  305. #define dirmodefmt jehanne_dirmodefmt
  306. #define chartorune jehanne_chartorune