stdio_netbsd_arm.go 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  1. // Code generated by 'ccgo stdio/gen.c -crt-import-path "" -export-defines "" -export-enums "" -export-externs X -export-fields F -export-structs "" -export-typedefs "" -header -hide _OSSwapInt16,_OSSwapInt32,_OSSwapInt64 -ignore-unsupported-alignment -o stdio/stdio_netbsd_arm.go -pkgname stdio', DO NOT EDIT.
  2. package stdio
  3. import (
  4. "math"
  5. "reflect"
  6. "sync/atomic"
  7. "unsafe"
  8. )
  9. var _ = math.Pi
  10. var _ reflect.Kind
  11. var _ atomic.Value
  12. var _ unsafe.Pointer
  13. const (
  14. BUFSIZ = 1024 // stdio.h:182:1:
  15. EOF = -1 // stdio.h:183:1:
  16. FILENAME_MAX = 1024 // stdio.h:192:1:
  17. FOPEN_MAX = 20 // stdio.h:191:1:
  18. FPARSELN_UNESCALL = 0x0f // stdio.h:411:1:
  19. FPARSELN_UNESCCOMM = 0x04 // stdio.h:409:1:
  20. FPARSELN_UNESCCONT = 0x02 // stdio.h:408:1:
  21. FPARSELN_UNESCESC = 0x01 // stdio.h:407:1:
  22. FPARSELN_UNESCREST = 0x08 // stdio.h:410:1:
  23. L_ctermid = 1024 // stdio.h:292:1:
  24. L_cuserid = 9 // stdio.h:293:1:
  25. L_tmpnam = 1024 // stdio.h:198:1:
  26. P_tmpdir = "/tmp/" // stdio.h:196:1:
  27. SEEK_CUR = 1 // stdio.h:209:1:
  28. SEEK_END = 2 // stdio.h:212:1:
  29. SEEK_SET = 0 // stdio.h:206:1:
  30. TMP_MAX = 308915776 // stdio.h:201:1:
  31. X_ARM_ARCH_4T = 0 // cdefs.h:44:1:
  32. X_ARM_ARCH_5 = 0 // cdefs.h:40:1:
  33. X_ARM_ARCH_5T = 0 // cdefs.h:36:1:
  34. X_ARM_ARCH_6 = 0 // cdefs.h:31:1:
  35. X_ARM_ARCH_7 = 0 // cdefs.h:20:1:
  36. X_ARM_ARCH_DWORD_OK = 0 // cdefs.h:51:1:
  37. X_ARM_ARCH_T2 = 0 // cdefs.h:24:1:
  38. X_ARM_CDEFS_H_ = 0 // cdefs.h:4:1:
  39. X_ARM_INT_TYPES_H_ = 0 // int_types.h:33:1:
  40. X_FILE_OFFSET_BITS = 64 // <builtin>:25:1:
  41. X_FSTDIO = 0 // stdio.h:72:1:
  42. X_IOFBF = 0 // stdio.h:178:1:
  43. X_IOLBF = 1 // stdio.h:179:1:
  44. X_IONBF = 2 // stdio.h:180:1:
  45. X_NETBSD_SOURCE = 1 // featuretest.h:70:1:
  46. X_STDIO_H_ = 0 // stdio.h:38:1:
  47. X_SYS_ANSI_H_ = 0 // ansi.h:33:1:
  48. X_SYS_CDEFS_ELF_H_ = 0 // cdefs_elf.h:31:1:
  49. X_SYS_CDEFS_H_ = 0 // cdefs.h:37:1:
  50. X_SYS_COMMON_ANSI_H_ = 0 // common_ansi.h:33:1:
  51. X_SYS_COMMON_INT_TYPES_H_ = 0 // common_int_types.h:33:1:
  52. X_SYS_NULL_H_ = 0 // null.h:9:1:
  53. )
  54. type Ptrdiff_t = int32 /* <builtin>:3:26 */
  55. type Size_t = uint32 /* <builtin>:9:23 */
  56. type Wchar_t = int32 /* <builtin>:15:24 */
  57. type X__builtin_va_list = uintptr /* <builtin>:46:14 */
  58. type X__float128 = float64 /* <builtin>:47:21 */
  59. // return true if value 'a' fits in type 't'
  60. // $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $
  61. // Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
  62. // Public domain.
  63. //
  64. // NOTE: Do not protect this header against multiple inclusion. Doing
  65. // so can have subtle side-effects due to header file inclusion order
  66. // and testing of e.g. _POSIX_SOURCE vs. _POSIX_C_SOURCE. Instead,
  67. // protect each CPP macro that we want to supply.
  68. // Feature-test macros are defined by several standards, and allow an
  69. // application to specify what symbols they want the system headers to
  70. // expose, and hence what standard they want them to conform to.
  71. // There are two classes of feature-test macros. The first class
  72. // specify complete standards, and if one of these is defined, header
  73. // files will try to conform to the relevant standard. They are:
  74. //
  75. // ANSI macros:
  76. // _ANSI_SOURCE ANSI C89
  77. //
  78. // POSIX macros:
  79. // _POSIX_SOURCE == 1 IEEE Std 1003.1 (version?)
  80. // _POSIX_C_SOURCE == 1 IEEE Std 1003.1-1990
  81. // _POSIX_C_SOURCE == 2 IEEE Std 1003.2-1992
  82. // _POSIX_C_SOURCE == 199309L IEEE Std 1003.1b-1993
  83. // _POSIX_C_SOURCE == 199506L ISO/IEC 9945-1:1996
  84. // _POSIX_C_SOURCE == 200112L IEEE Std 1003.1-2001
  85. // _POSIX_C_SOURCE == 200809L IEEE Std 1003.1-2008
  86. //
  87. // X/Open macros:
  88. // _XOPEN_SOURCE System Interfaces and Headers, Issue 4, Ver 2
  89. // _XOPEN_SOURCE_EXTENDED == 1 XSH4.2 UNIX extensions
  90. // _XOPEN_SOURCE == 500 System Interfaces and Headers, Issue 5
  91. // _XOPEN_SOURCE == 520 Networking Services (XNS), Issue 5.2
  92. // _XOPEN_SOURCE == 600 IEEE Std 1003.1-2001, XSI option
  93. // _XOPEN_SOURCE == 700 IEEE Std 1003.1-2008, XSI option
  94. //
  95. // NetBSD macros:
  96. // _NETBSD_SOURCE == 1 Make all NetBSD features available.
  97. //
  98. // If more than one of these "major" feature-test macros is defined,
  99. // then the set of facilities provided (and namespace used) is the
  100. // union of that specified by the relevant standards, and in case of
  101. // conflict, the earlier standard in the above list has precedence (so
  102. // if both _POSIX_C_SOURCE and _NETBSD_SOURCE are defined, the version
  103. // of rename() that's used is the POSIX one). If none of the "major"
  104. // feature-test macros is defined, _NETBSD_SOURCE is assumed.
  105. //
  106. // There are also "minor" feature-test macros, which enable extra
  107. // functionality in addition to some base standard. They should be
  108. // defined along with one of the "major" macros. The "minor" macros
  109. // are:
  110. //
  111. // _REENTRANT
  112. // _ISOC99_SOURCE
  113. // _ISOC11_SOURCE
  114. // _LARGEFILE_SOURCE Large File Support
  115. // <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
  116. // $NetBSD: ansi.h,v 1.14 2011/07/17 20:54:54 joerg Exp $
  117. // -
  118. // Copyright (c) 2000, 2001, 2002 The NetBSD Foundation, Inc.
  119. // All rights reserved.
  120. //
  121. // This code is derived from software contributed to The NetBSD Foundation
  122. // by Jun-ichiro itojun Hagino and by Klaus Klein.
  123. //
  124. // Redistribution and use in source and binary forms, with or without
  125. // modification, are permitted provided that the following conditions
  126. // are met:
  127. // 1. Redistributions of source code must retain the above copyright
  128. // notice, this list of conditions and the following disclaimer.
  129. // 2. Redistributions in binary form must reproduce the above copyright
  130. // notice, this list of conditions and the following disclaimer in the
  131. // documentation and/or other materials provided with the distribution.
  132. //
  133. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  134. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  135. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  136. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  137. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  138. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  139. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  140. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  141. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  142. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  143. // POSSIBILITY OF SUCH DAMAGE.
  144. // $NetBSD: ansi.h,v 1.18 2019/05/07 03:49:26 kamil Exp $
  145. // $NetBSD: common_ansi.h,v 1.1 2014/08/19 07:27:31 matt Exp $
  146. // -
  147. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  148. // All rights reserved.
  149. //
  150. // This code is derived from software contributed to The NetBSD Foundation
  151. // by Matt Thomas of 3am Software Foundry.
  152. //
  153. // Redistribution and use in source and binary forms, with or without
  154. // modification, are permitted provided that the following conditions
  155. // are met:
  156. // 1. Redistributions of source code must retain the above copyright
  157. // notice, this list of conditions and the following disclaimer.
  158. // 2. Redistributions in binary form must reproduce the above copyright
  159. // notice, this list of conditions and the following disclaimer in the
  160. // documentation and/or other materials provided with the distribution.
  161. //
  162. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  163. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  164. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  165. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  166. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  167. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  168. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  169. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  170. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  171. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  172. // POSSIBILITY OF SUCH DAMAGE.
  173. // $NetBSD: cdefs.h,v 1.141 2019/02/21 21:34:05 christos Exp $
  174. // * Copyright (c) 1991, 1993
  175. // The Regents of the University of California. All rights reserved.
  176. //
  177. // This code is derived from software contributed to Berkeley by
  178. // Berkeley Software Design, Inc.
  179. //
  180. // Redistribution and use in source and binary forms, with or without
  181. // modification, are permitted provided that the following conditions
  182. // are met:
  183. // 1. Redistributions of source code must retain the above copyright
  184. // notice, this list of conditions and the following disclaimer.
  185. // 2. Redistributions in binary form must reproduce the above copyright
  186. // notice, this list of conditions and the following disclaimer in the
  187. // documentation and/or other materials provided with the distribution.
  188. // 3. Neither the name of the University nor the names of its contributors
  189. // may be used to endorse or promote products derived from this software
  190. // without specific prior written permission.
  191. //
  192. // THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  193. // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  194. // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  195. // ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  196. // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  197. // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  198. // OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  199. // HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  200. // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  201. // OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  202. // SUCH DAMAGE.
  203. //
  204. // @(#)cdefs.h 8.8 (Berkeley) 1/9/95
  205. // $NetBSD: int_types.h,v 1.17 2014/07/25 21:43:13 joerg Exp $
  206. // -
  207. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  208. // All rights reserved.
  209. //
  210. // This code is derived from software contributed to The NetBSD Foundation
  211. // by Matt Thomas of 3am Software Foundry.
  212. //
  213. // Redistribution and use in source and binary forms, with or without
  214. // modification, are permitted provided that the following conditions
  215. // are met:
  216. // 1. Redistributions of source code must retain the above copyright
  217. // notice, this list of conditions and the following disclaimer.
  218. // 2. Redistributions in binary form must reproduce the above copyright
  219. // notice, this list of conditions and the following disclaimer in the
  220. // documentation and/or other materials provided with the distribution.
  221. //
  222. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  223. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  224. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  225. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  226. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  227. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  228. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  229. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  230. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  231. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  232. // POSSIBILITY OF SUCH DAMAGE.
  233. // $NetBSD: common_int_types.h,v 1.1 2014/07/25 21:43:13 joerg Exp $
  234. // -
  235. // Copyright (c) 2014 The NetBSD Foundation, Inc.
  236. // All rights reserved.
  237. //
  238. // This code is derived from software contributed to The NetBSD Foundation
  239. // by Joerg Sonnenberger.
  240. //
  241. // Redistribution and use in source and binary forms, with or without
  242. // modification, are permitted provided that the following conditions
  243. // are met:
  244. // 1. Redistributions of source code must retain the above copyright
  245. // notice, this list of conditions and the following disclaimer.
  246. // 2. Redistributions in binary form must reproduce the above copyright
  247. // notice, this list of conditions and the following disclaimer in the
  248. // documentation and/or other materials provided with the distribution.
  249. //
  250. // THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
  251. // ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  252. // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  253. // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
  254. // BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  255. // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  256. // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  257. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  258. // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  259. // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  260. // POSSIBILITY OF SUCH DAMAGE.
  261. // 7.18.1 Integer types
  262. // 7.18.1.1 Exact-width integer types
  263. type X__int8_t = int8 /* common_int_types.h:45:27 */
  264. type X__uint8_t = uint8 /* common_int_types.h:46:27 */
  265. type X__int16_t = int16 /* common_int_types.h:47:27 */
  266. type X__uint16_t = uint16 /* common_int_types.h:48:27 */
  267. type X__int32_t = int32 /* common_int_types.h:49:27 */
  268. type X__uint32_t = uint32 /* common_int_types.h:50:27 */
  269. type X__int64_t = int64 /* common_int_types.h:51:27 */
  270. type X__uint64_t = uint64 /* common_int_types.h:52:27 */
  271. // 7.18.1.4 Integer types capable of holding object pointers
  272. type X__intptr_t = int32 /* common_int_types.h:58:27 */
  273. type X__uintptr_t = uint32 /* common_int_types.h:59:26 */
  274. // Types which are fundamental to the implementation and may appear in
  275. // more than one standard header are defined here. Standard headers
  276. // then use:
  277. // #ifdef _BSD_SIZE_T_
  278. // typedef _BSD_SIZE_T_ size_t;
  279. // #undef _BSD_SIZE_T_
  280. // #endif
  281. type X__caddr_t = uintptr /* ansi.h:37:14 */ // core address
  282. type X__gid_t = X__uint32_t /* ansi.h:38:20 */ // group id
  283. type X__in_addr_t = X__uint32_t /* ansi.h:39:20 */ // IP(v4) address
  284. type X__in_port_t = X__uint16_t /* ansi.h:40:20 */ // "Internet" port number
  285. type X__mode_t = X__uint32_t /* ansi.h:41:20 */ // file permissions
  286. type X__off_t = X__int64_t /* ansi.h:42:19 */ // file offset
  287. type X__pid_t = X__int32_t /* ansi.h:43:19 */ // process id
  288. type X__sa_family_t = X__uint8_t /* ansi.h:44:19 */ // socket address family
  289. type X__socklen_t = uint32 /* ansi.h:45:22 */ // socket-related datum length
  290. type X__uid_t = X__uint32_t /* ansi.h:46:20 */ // user id
  291. type X__fsblkcnt_t = X__uint64_t /* ansi.h:47:20 */ // fs block count (statvfs)
  292. type X__fsfilcnt_t = X__uint64_t /* ansi.h:48:20 */
  293. type X__wctrans_t = uintptr /* ansi.h:51:32 */
  294. type X__wctype_t = uintptr /* ansi.h:54:31 */
  295. // mbstate_t is an opaque object to keep conversion state, during multibyte
  296. // stream conversions. The content must not be referenced by user programs.
  297. type X__mbstate_t = struct {
  298. F__mbstateL X__int64_t
  299. F__ccgo_pad1 [120]byte
  300. } /* ansi.h:63:3 */
  301. type X__va_list = X__builtin_va_list /* ansi.h:72:27 */
  302. type Ssize_t = int32 /* stdio.h:49:23 */
  303. // $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $
  304. // Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999.
  305. // Public domain.
  306. // This is fairly grotesque, but pure ANSI code must not inspect the
  307. // innards of an fpos_t anyway. The library internally uses off_t,
  308. // which we assume is exactly as big as eight chars.
  309. type X__sfpos = struct {
  310. F_pos X__off_t
  311. F_mbstate_in X__mbstate_t
  312. F_mbstate_out X__mbstate_t
  313. } /* stdio.h:67:9 */
  314. // $NetBSD: null.h,v 1.9 2010/07/06 11:56:20 kleink Exp $
  315. // Written by Klaus Klein <kleink@NetBSD.org>, December 22, 1999.
  316. // Public domain.
  317. // This is fairly grotesque, but pure ANSI code must not inspect the
  318. // innards of an fpos_t anyway. The library internally uses off_t,
  319. // which we assume is exactly as big as eight chars.
  320. type Fpos_t = X__sfpos /* stdio.h:70:3 */
  321. // NB: to fit things in six character monocase externals, the stdio
  322. // code uses the prefix `__s' for stdio objects, typically followed
  323. // by a three-character attempt at a mnemonic.
  324. // stdio buffers
  325. type X__sbuf = struct {
  326. F_base uintptr
  327. F_size int32
  328. } /* stdio.h:81:1 */
  329. // stdio state variables.
  330. //
  331. // The following always hold:
  332. //
  333. // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  334. // _lbfsize is -_bf._size, else _lbfsize is 0
  335. // if _flags&__SRD, _w is 0
  336. // if _flags&__SWR, _r is 0
  337. //
  338. // This ensures that the getc and putc macros (or inline functions) never
  339. // try to write or read from a file that is in `read' or `write' mode.
  340. // (Moreover, they can, and do, automatically switch from read mode to
  341. // write mode, and back, on "r+" and "w+" files.)
  342. //
  343. // _lbfsize is used only to make the inline line-buffered output stream
  344. // code as compact as possible.
  345. //
  346. // _ub, _up, and _ur are used when ungetc() pushes back more characters
  347. // than fit in the current _bf, or when ungetc() pushes back a character
  348. // that does not match the previous one in _bf. When this happens,
  349. // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  350. // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  351. //
  352. // NB: see WARNING above before changing the layout of this structure!
  353. type X__sFILE = struct {
  354. F_p uintptr
  355. F_r int32
  356. F_w int32
  357. F_flags uint16
  358. F_file int16
  359. F_bf struct {
  360. F_base uintptr
  361. F_size int32
  362. }
  363. F_lbfsize int32
  364. F_cookie uintptr
  365. F_close uintptr
  366. F_read uintptr
  367. F_seek uintptr
  368. F_write uintptr
  369. F_ext struct {
  370. F_base uintptr
  371. F_size int32
  372. }
  373. F_up uintptr
  374. F_ur int32
  375. F_ubuf [3]uint8
  376. F_nbuf [1]uint8
  377. F_flush uintptr
  378. F_lb_unused [4]uint8
  379. F_blksize int32
  380. F_offset X__off_t
  381. } /* stdio.h:112:9 */
  382. // stdio state variables.
  383. //
  384. // The following always hold:
  385. //
  386. // if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
  387. // _lbfsize is -_bf._size, else _lbfsize is 0
  388. // if _flags&__SRD, _w is 0
  389. // if _flags&__SWR, _r is 0
  390. //
  391. // This ensures that the getc and putc macros (or inline functions) never
  392. // try to write or read from a file that is in `read' or `write' mode.
  393. // (Moreover, they can, and do, automatically switch from read mode to
  394. // write mode, and back, on "r+" and "w+" files.)
  395. //
  396. // _lbfsize is used only to make the inline line-buffered output stream
  397. // code as compact as possible.
  398. //
  399. // _ub, _up, and _ur are used when ungetc() pushes back more characters
  400. // than fit in the current _bf, or when ungetc() pushes back a character
  401. // that does not match the previous one in _bf. When this happens,
  402. // _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
  403. // _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
  404. //
  405. // NB: see WARNING above before changing the layout of this structure!
  406. type FILE = X__sFILE /* stdio.h:146:3 */
  407. // X/Open CAE Specification Issue 5 Version 2
  408. type Off_t = X__off_t /* stdio.h:376:18 */
  409. type Locale_t = uintptr /* stdio.h:543:25 */
  410. var _ uint8 /* gen.c:2:13: */