stdio

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUFSIZ                                 = 1024        // stdio.h:103:1:
	EOF                                    = -1          // stdio.h:104:1:
	FILENAME_MAX                           = 1024        // stdio.h:108:1:
	FOPEN_MAX                              = 20          // stdio.h:107:1:
	L_ctermid                              = 1024        // stdio.h:202:1:
	L_tmpnam                               = 1024        // stdio.h:114:1:
	P_tmpdir                               = "/var/tmp/" // stdio.h:112:1:
	RENAME_EXCL                            = 0x00000004  // stdio.h:45:1:
	RENAME_SECLUDE                         = 0x00000001  // stdio.h:43:1:
	RENAME_SWAP                            = 0x00000002  // stdio.h:44:1:
	SEEK_CUR                               = 1           // stdio.h:121:1:
	SEEK_END                               = 2           // stdio.h:124:1:
	SEEK_SET                               = 0           // stdio.h:118:1:
	TMP_MAX                                = 308915776   // stdio.h:115:1:
	X_BSD_I386__TYPES_H_                   = 0           // _types.h:29:1:
	X_BSD_MACHINE_TYPES_H_                 = 0           // types.h:32:1:
	X_BSD_MACHINE__TYPES_H_                = 0           // _types.h:29:1:
	X_CDEFS_H_                             = 0           // cdefs.h:68:1:
	X_CTERMID_H_                           = 0           // _ctermid.h:25:1:
	X_DARWIN_FEATURE_64_BIT_INODE          = 1           // cdefs.h:745:1:
	X_DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE = 1           // cdefs.h:771:1:
	X_DARWIN_FEATURE_UNIX_CONFORMANCE      = 3           // cdefs.h:779:1:
	X_FILE_OFFSET_BITS                     = 64          // <builtin>:25:1:
	X_FORTIFY_SOURCE                       = 2           // _types.h:65:1:
	X_FSTDIO                               = 0           // _stdio.h:83:1:
	X_INT16_T                              = 0           // _int16_t.h:29:1:
	X_INT32_T                              = 0           // _int32_t.h:29:1:
	X_INT64_T                              = 0           // _int64_t.h:29:1:
	X_INT8_T                               = 0           // _int8_t.h:29:1:
	X_INTPTR_T                             = 0           // _intptr_t.h:29:1:
	X_IOFBF                                = 0           // stdio.h:99:1:
	X_IOLBF                                = 1           // stdio.h:100:1:
	X_IONBF                                = 2           // stdio.h:101:1:
	X_LP64                                 = 1           // <predefined>:1:1:
	X_MACHTYPES_H_                         = 0           // types.h:67:1:
	X_Nonnull                              = 0           // cdefs.h:243:1:
	X_Null_unspecified                     = 0           // cdefs.h:246:1:
	X_Nullable                             = 0           // cdefs.h:240:1:
	X_OFF_T                                = 0           // _off_t.h:29:1:
	X_SECURE__COMMON_H_                    = 0           // _common.h:25:1:
	X_SECURE__STDIO_H_                     = 0           // _stdio.h:29:1:
	X_SIZE_T                               = 0           // _size_t.h:29:1:
	X_SSIZE_T                              = 0           // _ssize_t.h:29:1:
	X_STDIO_H_                             = 0           // stdio.h:62:1:
	X_SYS_STDIO_H_                         = 0           // stdio.h:30:1:
	X_SYS__PTHREAD_TYPES_H_                = 0           // _pthread_types.h:30:1:
	X_SYS__TYPES_H_                        = 0           // _types.h:30:1:
	X_UINTPTR_T                            = 0           // _uintptr_t.h:29:1:
	X_USE_FORTIFY_LEVEL                    = 2           // _common.h:30:1:
	X_U_INT16_T                            = 0           // _u_int16_t.h:29:1:
	X_U_INT32_T                            = 0           // _u_int32_t.h:29:1:
	X_U_INT64_T                            = 0           // _u_int64_t.h:29:1:
	X_U_INT8_T                             = 0           // _u_int8_t.h:29:1:
	X_VA_LIST_T                            = 0           // _va_list.h:30:1:
)

Variables

View Source
var CAPI = map[string]struct{}{
	"__darwin_check_fd_set_overflow": {},
}
View Source
var X__darwin_check_fd_set_overflow uintptr /* <builtin>:146:5: */

Functions

This section is empty.

Types

type FILE

type FILE = X__sFILE /* _stdio.h:157:3 */

stdio state variables.

The following always hold:

if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
	_lbfsize is -_bf._size, else _lbfsize is 0
if _flags&__SRD, _w is 0
if _flags&__SWR, _r is 0

This ensures that the getc and putc macros (or inline functions) never try to write or read from a file that is in `read' or `write' mode. (Moreover, they can, and do, automatically switch from read mode to write mode, and back, on "r+" and "w+" files.)

_lbfsize is used only to make the inline line-buffered output stream code as compact as possible.

_ub, _up, and _ur are used when ungetc() pushes back more characters than fit in the current _bf, or when ungetc() pushes back a character that does not match the previous one in _bf. When this happens, _ub._base becomes non-nil (i.e., a stream has ungetc() data iff _ub._base!=NULL) and _up and _ur save the current values of _p and _r.

NB: see WARNING above before changing the layout of this structure!

type Fpos_t

type Fpos_t = X__darwin_off_t /* _stdio.h:81:25 */

type Int8_t

type Int8_t = int8 /* _int8_t.h:30:33 */

Basic integral types. Omit the typedef if not possible for a machine/compiler combination. Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type Int16_t

type Int16_t = int16 /* _int16_t.h:30:33 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type Int32_t

type Int32_t = int32 /* _int32_t.h:30:33 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type Int64_t

type Int64_t = int64 /* _int64_t.h:30:33 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type Intptr_t

type Intptr_t = X__darwin_intptr_t /* _intptr_t.h:32:33 */

type Off_t

type Off_t = X__darwin_off_t /* _off_t.h:31:33 */

type Ptrdiff_t

type Ptrdiff_t = int64 /* <builtin>:3:26 */

type Register_t

type Register_t = Int64_t /* types.h:87:33 */

type Size_t

type Size_t = uint64 /* <builtin>:9:23 */

type Ssize_t

type Ssize_t = X__darwin_ssize_t /* _ssize_t.h:31:33 */

Copyright (c) 2003-2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@ Copyright (c) 2000-2007 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@ Copyright 1995 NeXT Computer, Inc. All rights reserved.

type Syscall_arg_t

type Syscall_arg_t = U_int64_t /* types.h:111:33 */

This defines the size of syscall arguments after copying into the kernel:

type U_int8_t

type U_int8_t = uint8 /* _u_int8_t.h:30:33 */

Copyright (c) 2016 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type U_int16_t

type U_int16_t = uint16 /* _u_int16_t.h:30:41 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type U_int32_t

type U_int32_t = uint32 /* _u_int32_t.h:30:33 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type U_int64_t

type U_int64_t = uint64 /* _u_int64_t.h:30:33 */

Copyright (c) 2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type Uintptr_t

type Uintptr_t = uint64 /* _uintptr_t.h:30:33 */

Copyright (c) 2003-2012 Apple Inc. All rights reserved.

@APPLE_OSREFERENCE_LICENSE_HEADER_START@

This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. The rights granted to you under the License may not be used to create, or enable the creation or redistribution of, unlawful or unlicensed copies of an Apple operating system, or to circumvent, violate, or enable the circumvention or violation of, any terms of an Apple operating system software license agreement.

Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file.

The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License.

@APPLE_OSREFERENCE_LICENSE_HEADER_END@

type User_addr_t

type User_addr_t = U_int64_t /* types.h:97:33 */

These types are used for reserving the largest possible size.

type User_long_t

type User_long_t = Int64_t /* types.h:100:33 */

type User_off_t

type User_off_t = Int64_t /* types.h:103:33 */

type User_size_t

type User_size_t = U_int64_t /* types.h:98:33 */

type User_ssize_t

type User_ssize_t = Int64_t /* types.h:99:33 */

type User_time_t

type User_time_t = Int64_t /* types.h:102:33 */

type User_ulong_t

type User_ulong_t = U_int64_t /* types.h:101:33 */

type Va_list

type Va_list = X__darwin_va_list /* _va_list.h:32:26 */

type Wchar_t

type Wchar_t = int32 /* <builtin>:15:24 */

type X__builtin_va_list

type X__builtin_va_list = uintptr /* <builtin>:46:14 */

type X__darwin_blkcnt_t

type X__darwin_blkcnt_t = X__int64_t /* _types.h:55:25 */ // total blocks

type X__darwin_blksize_t

type X__darwin_blksize_t = X__int32_t /* _types.h:56:25 */ // preferred block size

type X__darwin_clock_t

type X__darwin_clock_t = uint64 /* _types.h:117:33 */ // clock()

type X__darwin_ct_rune_t

type X__darwin_ct_rune_t = int32 /* _types.h:70:33 */ // ct_rune_t

type X__darwin_dev_t

type X__darwin_dev_t = X__int32_t /* _types.h:57:25 */ // dev_t

type X__darwin_fsblkcnt_t

type X__darwin_fsblkcnt_t = uint32 /* _types.h:58:25 */ // Used by statvfs and fstatvfs

type X__darwin_fsfilcnt_t

type X__darwin_fsfilcnt_t = uint32 /* _types.h:59:25 */ // Used by statvfs and fstatvfs

type X__darwin_gid_t

type X__darwin_gid_t = X__uint32_t /* _types.h:60:25 */ // [???] process and group IDs

type X__darwin_id_t

type X__darwin_id_t = X__uint32_t /* _types.h:61:25 */ // [XSI] pid_t, uid_t, or gid_t

type X__darwin_ino64_t

type X__darwin_ino64_t = X__uint64_t /* _types.h:62:25 */ // [???] Used for 64 bit inodes

type X__darwin_ino_t

type X__darwin_ino_t = X__darwin_ino64_t /* _types.h:64:26 */ // [???] Used for inodes

type X__darwin_intptr_t

type X__darwin_intptr_t = int64 /* _types.h:49:33 */

type X__darwin_mach_port_name_t

type X__darwin_mach_port_name_t = X__darwin_natural_t /* _types.h:68:28 */ // Used by mach

type X__darwin_mach_port_t

type X__darwin_mach_port_t = X__darwin_mach_port_name_t /* _types.h:69:35 */ // Used by mach

type X__darwin_mbstate_t

type X__darwin_mbstate_t = X__mbstate_t /* _types.h:81:33 */ // mbstate_t

type X__darwin_mode_t

type X__darwin_mode_t = X__uint16_t /* _types.h:70:25 */ // [???] Some file attributes

type X__darwin_natural_t

type X__darwin_natural_t = uint32 /* _types.h:50:33 */

type X__darwin_nl_item

type X__darwin_nl_item = int32 /* _types.h:40:14 */

type X__darwin_off_t

type X__darwin_off_t = X__int64_t /* _types.h:71:25 */ // [???] Used for file sizes

type X__darwin_pid_t

type X__darwin_pid_t = X__int32_t /* _types.h:72:25 */ // [???] process and group IDs

type X__darwin_pthread_attr_t

type X__darwin_pthread_attr_t = X_opaque_pthread_attr_t /* _pthread_types.h:109:39 */

type X__darwin_pthread_cond_t

type X__darwin_pthread_cond_t = X_opaque_pthread_cond_t /* _pthread_types.h:110:39 */

type X__darwin_pthread_condattr_t

type X__darwin_pthread_condattr_t = X_opaque_pthread_condattr_t /* _pthread_types.h:111:43 */

type X__darwin_pthread_handler_rec

type X__darwin_pthread_handler_rec = struct {
	F__routine uintptr
	F__arg     uintptr
	F__next    uintptr

} /* _pthread_types.h:57:1 */

type X__darwin_pthread_key_t

type X__darwin_pthread_key_t = uint64 /* _pthread_types.h:112:23 */

type X__darwin_pthread_mutex_t

type X__darwin_pthread_mutex_t = X_opaque_pthread_mutex_t /* _pthread_types.h:113:40 */

type X__darwin_pthread_mutexattr_t

type X__darwin_pthread_mutexattr_t = X_opaque_pthread_mutexattr_t /* _pthread_types.h:114:44 */

type X__darwin_pthread_once_t

type X__darwin_pthread_once_t = X_opaque_pthread_once_t /* _pthread_types.h:115:39 */

type X__darwin_pthread_rwlock_t

type X__darwin_pthread_rwlock_t = X_opaque_pthread_rwlock_t /* _pthread_types.h:116:41 */

type X__darwin_pthread_rwlockattr_t

type X__darwin_pthread_rwlockattr_t = X_opaque_pthread_rwlockattr_t /* _pthread_types.h:117:45 */

type X__darwin_pthread_t

type X__darwin_pthread_t = uintptr /* _pthread_types.h:118:34 */

type X__darwin_ptrdiff_t

type X__darwin_ptrdiff_t = int64 /* _types.h:84:33 */ // ptr1 - ptr2

type X__darwin_rune_t

type X__darwin_rune_t = X__darwin_wchar_t /* _types.h:109:33 */ // rune_t

type X__darwin_sigset_t

type X__darwin_sigset_t = X__uint32_t /* _types.h:73:25 */ // [???] signal set

type X__darwin_size_t

type X__darwin_size_t = uint64 /* _types.h:92:33 */ // sizeof()

type X__darwin_socklen_t

type X__darwin_socklen_t = X__uint32_t /* _types.h:118:33 */ // socklen_t (duh)

type X__darwin_ssize_t

type X__darwin_ssize_t = int64 /* _types.h:119:33 */ // byte count or error

type X__darwin_suseconds_t

type X__darwin_suseconds_t = X__int32_t /* _types.h:74:25 */ // [???] microseconds

type X__darwin_time_t

type X__darwin_time_t = int64 /* _types.h:120:33 */ // time()

type X__darwin_uid_t

type X__darwin_uid_t = X__uint32_t /* _types.h:75:25 */ // [???] user IDs

type X__darwin_useconds_t

type X__darwin_useconds_t = X__uint32_t /* _types.h:76:25 */ // [???] microseconds

type X__darwin_uuid_string_t

type X__darwin_uuid_string_t = [37]int8 /* _types.h:78:17 */

type X__darwin_uuid_t

type X__darwin_uuid_t = [16]uint8 /* _types.h:77:25 */

type X__darwin_va_list

type X__darwin_va_list = X__builtin_va_list /* _types.h:98:33 */ // va_list

type X__darwin_wchar_t

type X__darwin_wchar_t = int32 /* _types.h:104:33 */ // wchar_t

type X__darwin_wctrans_t

type X__darwin_wctrans_t = int32 /* _types.h:41:14 */

type X__darwin_wctype_t

type X__darwin_wctype_t = X__uint32_t /* _types.h:43:20 */

type X__darwin_wint_t

type X__darwin_wint_t = int32 /* _types.h:112:33 */ // wint_t

type X__float128

type X__float128 = float64 /* <builtin>:47:21 */

type X__int8_t

type X__int8_t = int8 /* _types.h:37:33 */

type X__int16_t

type X__int16_t = int16 /* _types.h:42:33 */

type X__int32_t

type X__int32_t = int32 /* _types.h:44:33 */

type X__int64_t

type X__int64_t = int64 /* _types.h:46:33 */

type X__int128_t

type X__int128_t = struct {
	Flo int64
	Fhi int64

} /* <builtin>:21:43 */ // must match modernc.org/mathutil.Int128

type X__mbstate_t

type X__mbstate_t = struct {
	F__ccgo_pad1 [0]uint64
	F__mbstate8  [128]int8

} /* _types.h:79:3 */

mbstate_t is an opaque object to keep conversion state, during multibyte stream conversions. The content must not be referenced by user programs.

type X__sFILE

type X__sFILE = struct {
	F_p          uintptr
	F_r          int32
	F_w          int32
	F_flags      int16
	F_file       int16
	F__ccgo_pad1 [4]byte
	F_bf         struct {
		F_base       uintptr
		F_size       int32
		F__ccgo_pad1 [4]byte
	}
	F_lbfsize    int32
	F__ccgo_pad2 [4]byte
	F_cookie     uintptr
	F_close      uintptr
	F_read       uintptr
	F_seek       uintptr
	F_write      uintptr
	F_ub         struct {
		F_base       uintptr
		F_size       int32
		F__ccgo_pad1 [4]byte
	}
	F_extra uintptr
	F_ur    int32
	F_ubuf  [3]uint8
	F_nbuf  [1]uint8
	F_lb    struct {
		F_base       uintptr
		F_size       int32
		F__ccgo_pad1 [4]byte
	}
	F_blksize    int32
	F__ccgo_pad3 [4]byte
	F_offset     Fpos_t

} /* _stdio.h:126:9 */

stdio state variables.

The following always hold:

if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
	_lbfsize is -_bf._size, else _lbfsize is 0
if _flags&__SRD, _w is 0
if _flags&__SWR, _r is 0

This ensures that the getc and putc macros (or inline functions) never try to write or read from a file that is in `read' or `write' mode. (Moreover, they can, and do, automatically switch from read mode to write mode, and back, on "r+" and "w+" files.)

_lbfsize is used only to make the inline line-buffered output stream code as compact as possible.

_ub, _up, and _ur are used when ungetc() pushes back more characters than fit in the current _bf, or when ungetc() pushes back a character that does not match the previous one in _bf. When this happens, _ub._base becomes non-nil (i.e., a stream has ungetc() data iff _ub._base!=NULL) and _up and _ur save the current values of _p and _r.

NB: see WARNING above before changing the layout of this structure!

type X__sbuf

type X__sbuf = struct {
	F_base       uintptr
	F_size       int32
	F__ccgo_pad1 [4]byte

} /* _stdio.h:92:1 */

stdio buffers

type X__uint8_t

type X__uint8_t = uint8 /* _types.h:41:33 */

type X__uint16_t

type X__uint16_t = uint16 /* _types.h:43:33 */

type X__uint32_t

type X__uint32_t = uint32 /* _types.h:45:33 */

type X__uint64_t

type X__uint64_t = uint64 /* _types.h:47:33 */

type X__uint128_t

type X__uint128_t = struct {
	Flo uint64
	Fhi uint64

} /* <builtin>:22:44 */ // must match modernc.org/mathutil.Int128

type X_opaque_pthread_attr_t

type X_opaque_pthread_attr_t = struct {
	F__sig    int64
	F__opaque [56]int8

} /* _pthread_types.h:63:1 */

type X_opaque_pthread_cond_t

type X_opaque_pthread_cond_t = struct {
	F__sig    int64
	F__opaque [40]int8

} /* _pthread_types.h:68:1 */

type X_opaque_pthread_condattr_t

type X_opaque_pthread_condattr_t = struct {
	F__sig    int64
	F__opaque [8]int8

} /* _pthread_types.h:73:1 */

type X_opaque_pthread_mutex_t

type X_opaque_pthread_mutex_t = struct {
	F__sig    int64
	F__opaque [56]int8

} /* _pthread_types.h:78:1 */

type X_opaque_pthread_mutexattr_t

type X_opaque_pthread_mutexattr_t = struct {
	F__sig    int64
	F__opaque [8]int8

} /* _pthread_types.h:83:1 */

type X_opaque_pthread_once_t

type X_opaque_pthread_once_t = struct {
	F__sig    int64
	F__opaque [8]int8

} /* _pthread_types.h:88:1 */

type X_opaque_pthread_rwlock_t

type X_opaque_pthread_rwlock_t = struct {
	F__sig    int64
	F__opaque [192]int8

} /* _pthread_types.h:93:1 */

type X_opaque_pthread_rwlockattr_t

type X_opaque_pthread_rwlockattr_t = struct {
	F__sig    int64
	F__opaque [16]int8

} /* _pthread_types.h:98:1 */

type X_opaque_pthread_t

type X_opaque_pthread_t = struct {
	F__sig           int64
	F__cleanup_stack uintptr
	F__opaque        [8176]int8

} /* _pthread_types.h:103:1 */

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL