From 3af048b3681f64af95e1bb24dab4141028cf5097 Mon Sep 17 00:00:00 2001 From: xushiwei Date: Tue, 26 Jul 2022 22:56:10 +0800 Subject: [PATCH] public struct fields --- c2go_autogen.go | 24 +- c2go_header.i.go | 372 ++++++++++++------------------- c_locale.c.i.go | 4 +- clearerr.c.i.go | 6 +- ext.c.i.go | 44 ++-- ext2.c.i.go | 22 +- fclose.c.i.go | 24 +- feof.c.i.go | 6 +- ferror.c.i.go | 6 +- fflush.c.i.go | 32 +-- fgetc.c.i.go | 2 +- fgetln.c.i.go | 20 +- fgetpos.c.i.go | 2 +- fgets.c.i.go | 24 +- fgetwc.c.i.go | 32 +-- fgetws.c.i.go | 6 +- fileno.c.i.go | 6 +- floatscan.c.i.go | 162 +++++++------- flockfile.c.i.go | 2 +- fmemopen.c.i.go | 66 +++--- fopen.c.i.go | 10 +- fopencookie.c.i.go | 98 ++++---- forkpty.c.i.go | 6 +- fprintf.c.i.go | 2 +- fputc.c.i.go | 2 +- fputs.c.i.go | 2 +- fputwc.c.i.go | 26 +-- fputws.c.i.go | 10 +- fread.c.i.go | 18 +- fscanf.c.i.go | 2 +- fseek.c.i.go | 32 +-- fsetpos.c.i.go | 2 +- ftell.c.i.go | 20 +- funlockfile.c.i.go | 8 +- fwide.c.i.go | 20 +- fwprintf.c.i.go | 2 +- fwrite.c.i.go | 20 +- fwscanf.c.i.go | 2 +- getc.c.i.go | 2 +- getc_unlocked.c.i.go | 6 +- getchar_unlocked.c.i.go | 4 +- getdelim.c.i.go | 36 +-- getline.c.i.go | 2 +- getopt.c.i.go | 4 +- getrusage.c.i.go | 4 +- gets.c.i.go | 8 +- getw.c.i.go | 2 +- getwc.c.i.go | 2 +- isalnum.c.i.go | 2 +- isalpha.c.i.go | 2 +- isblank.c.i.go | 2 +- iscntrl.c.i.go | 2 +- isdigit.c.i.go | 2 +- isgraph.c.i.go | 2 +- islower.c.i.go | 2 +- isprint.c.i.go | 2 +- ispunct.c.i.go | 2 +- isspace.c.i.go | 2 +- isupper.c.i.go | 2 +- iswalnum.c.i.go | 2 +- iswalpha.c.i.go | 2 +- iswblank.c.i.go | 2 +- iswcntrl.c.i.go | 2 +- iswctype.c.i.go | 4 +- iswdigit.c.i.go | 2 +- iswgraph.c.i.go | 2 +- iswlower.c.i.go | 2 +- iswprint.c.i.go | 2 +- iswpunct.c.i.go | 2 +- iswspace.c.i.go | 2 +- iswupper.c.i.go | 2 +- iswxdigit.c.i.go | 2 +- isxdigit.c.i.go | 2 +- mntent.c.i.go | 10 +- ofl.c.i.go | 4 +- ofl_add.c.i.go | 8 +- openpty.c.i.go | 2 +- pclose.c.i.go | 4 +- perror.c.i.go | 12 +- putc.c.i.go | 2 +- putc_unlocked.c.i.go | 6 +- putchar_unlocked.c.i.go | 4 +- putw.c.i.go | 2 +- putwc.c.i.go | 2 +- rewind.c.i.go | 6 +- setbuf.c.i.go | 2 +- setbuffer.c.i.go | 2 +- setlinebuf.c.i.go | 2 +- setvbuf.c.i.go | 16 +- shgetc.c.i.go | 36 +-- stderr.c.i.go | 8 +- stdin.c.i.go | 8 +- stdout.c.i.go | 8 +- strcasecmp.c.i.go | 2 +- strerror.c.i.go | 6 +- strncasecmp.c.i.go | 2 +- strtod.c.i.go | 10 +- test/c2go.cfg | 5 - tmpfile.c.i.go | 6 +- tolower.c.i.go | 2 +- toupper.c.i.go | 2 +- towctrans.c.i.go | 4 +- ungetc.c.i.go | 12 +- ungetwc.c.i.go | 24 +- vdprintf.c.i.go | 2 +- vfprintf.c.i.go | 54 ++--- vsnprintf.c.i.go | 18 +- vsscanf.c.i.go | 12 +- vswscanf.c.i.go | 20 +- wcscasecmp_l.c.i.go | 2 +- wcsncasecmp_l.c.i.go | 2 +- wctrans.c.i.go | 4 +- wordexp.c.i.go | 6 +- x2g__ctype_get_mb_cur_max.c.i.go | 4 +- x2g__errno_location.c.i.go | 2 +- x2g__fclose_ca.c.i.go | 4 +- x2g__fdopen.c.i.go | 40 ++-- x2g__fopen_rb_ca.c.i.go | 24 +- x2g__fpclassifyf.c.i.go | 2 +- x2g__lctrans.c.i.go | 2 +- x2g__lockfile.c.i.go | 20 +- x2g__overflow.c.i.go | 10 +- x2g__signbitf.c.i.go | 2 +- x2g__stdio_close.c.i.go | 4 +- x2g__stdio_exit.c.i.go | 18 +- x2g__stdio_read.c.i.go | 28 +-- x2g__stdio_seek.c.i.go | 4 +- x2g__stdio_write.c.i.go | 36 +-- x2g__stdout_write.c.i.go | 10 +- x2g__toread.c.i.go | 26 +-- x2g__towrite.c.i.go | 20 +- x2g__uflow.c.i.go | 4 +- z_pthread.go | 6 +- z_syscall_unix.go | 16 +- 134 files changed, 903 insertions(+), 984 deletions(-) diff --git a/c2go_autogen.go b/c2go_autogen.go index 60804ec5..318de4db 100644 --- a/c2go_autogen.go +++ b/c2go_autogen.go @@ -5,10 +5,10 @@ import unsafe "unsafe" type struct___dirstream struct { } -func Fdopen(int32, *int8) *struct__IO_FILE { +func Fdopen(int32, *int8) *Struct__IO_FILE { panic("notimpl") } -func Ftrylockfile(*struct__IO_FILE) int32 { +func Ftrylockfile(*Struct__IO_FILE) int32 { panic("notimpl") } func Mblen(*int8, uint64) int32 { @@ -20,7 +20,7 @@ func Mbtowc(*uint32, *int8, uint64) int32 { func Sqrtf(float32) float32 { panic("notimpl") } -func Vfscanf(*struct__IO_FILE, *int8, []interface { +func Vfscanf(*Struct__IO_FILE, *int8, []interface { }) int32 { panic("notimpl") } @@ -39,13 +39,13 @@ func __futexwait(addr unsafe.Pointer, val int32, priv int32) { func __randname(*int8) *int8 { panic("notimpl") } -func __register_locked_file(*struct__IO_FILE, *struct___pthread) { +func __register_locked_file(*Struct__IO_FILE, *Struct___pthread) { panic("notimpl") } func __restore_sigs(unsafe.Pointer) { panic("notimpl") } -func __unlist_locked_file(*struct__IO_FILE) { +func __unlist_locked_file(*Struct__IO_FILE) { panic("notimpl") } func __vm_wait() { @@ -102,7 +102,7 @@ func kill(int32, int32) int32 { func lstat(*int8, *struct_stat) int32 { panic("notimpl") } -func mbrtowc(*uint32, *int8, uint64, *struct___mbstate_t) uint64 { +func mbrtowc(*uint32, *int8, uint64, *Struct___mbstate_t) uint64 { panic("notimpl") } func open(*int8, int32, ...interface { @@ -115,7 +115,7 @@ func pipe2(fd *int32, flag int32) int32 { func pthread_setcancelstate(int32, *int32) int32 { panic("notimpl") } -func pthread_sigmask(int32, *struct___sigset_t, *struct___sigset_t) int32 { +func pthread_sigmask(int32, *Struct___sigset_t, *Struct___sigset_t) int32 { panic("notimpl") } func read(fd int32, buf unsafe.Pointer, count uint64) int64 { @@ -130,7 +130,7 @@ func setgroups(uint64, *uint32) int32 { func setsid() int32 { panic("notimpl") } -func sigfillset(*struct___sigset_t) int32 { +func sigfillset(*Struct___sigset_t) int32 { panic("notimpl") } func stat(*int8, *struct_stat) int32 { @@ -142,11 +142,11 @@ func tcsetattr(int32, int32, *struct_termios) int32 { func uname(*struct_utsname) int32 { panic("notimpl") } -func vfwprintf(*struct__IO_FILE, *uint32, []interface { +func vfwprintf(*Struct__IO_FILE, *uint32, []interface { }) int32 { panic("notimpl") } -func vfwscanf(*struct__IO_FILE, *uint32, []interface { +func vfwscanf(*Struct__IO_FILE, *uint32, []interface { }) int32 { panic("notimpl") } @@ -157,9 +157,9 @@ func vswprintf(*uint32, uint64, *uint32, []interface { func waitpid(int32, *int32, int32) int32 { panic("notimpl") } -func wcrtomb(*int8, uint32, *struct___mbstate_t) uint64 { +func wcrtomb(*int8, uint32, *Struct___mbstate_t) uint64 { panic("notimpl") } -func wcsrtombs(*int8, **uint32, uint64, *struct___mbstate_t) uint64 { +func wcsrtombs(*int8, **uint32, uint64, *Struct___mbstate_t) uint64 { panic("notimpl") } diff --git a/c2go_header.i.go b/c2go_header.i.go index e8bc7d10..415f9311 100644 --- a/c2go_header.i.go +++ b/c2go_header.i.go @@ -2,94 +2,74 @@ package libc import unsafe "unsafe" -type size_t = uint64 type Size_t = uint64 -type time_t = int64 type Time_t = int64 -type clockid_t = int32 type Clockid_t = int32 -type struct_timespec struct { - tv_sec int64 +type Struct_timespec struct { + Tv_sec int64 Xbf_0 int32 - tv_nsec int64 + Tv_nsec int64 Xbf_1 int32 } -type Struct_timespec = struct_timespec -type pthread_t = *struct___pthread -type Pthread_t = *struct___pthread -type pthread_once_t = int32 +type Pthread_t = *Struct___pthread type Pthread_once_t = int32 -type pthread_key_t = uint32 type Pthread_key_t = uint32 -type pthread_spinlock_t = int32 type Pthread_spinlock_t = int32 type _cgoa_1_a64l struct { - __attr uint32 + X__attr uint32 } -type pthread_mutexattr_t = _cgoa_1_a64l type Pthread_mutexattr_t = _cgoa_1_a64l type _cgoa_2_a64l struct { - __attr uint32 + X__attr uint32 } -type pthread_condattr_t = _cgoa_2_a64l type Pthread_condattr_t = _cgoa_2_a64l type _cgoa_3_a64l struct { - __attr uint32 + X__attr uint32 } -type pthread_barrierattr_t = _cgoa_3_a64l type Pthread_barrierattr_t = _cgoa_3_a64l type _cgoa_4_a64l struct { - __attr [2]uint32 + X__attr [2]uint32 } -type pthread_rwlockattr_t = _cgoa_4_a64l type Pthread_rwlockattr_t = _cgoa_4_a64l -type struct___sigset_t struct { - __bits [16]uint64 +type Struct___sigset_t struct { + X__bits [16]uint64 } -type Struct___sigset_t = struct___sigset_t -type sigset_t = struct___sigset_t -type Sigset_t = struct___sigset_t +type Sigset_t = Struct___sigset_t type _cgoa_6_a64l struct { - __i [14]int32 + X__i [14]int32 } type _cgoa_5_a64l struct { - __u _cgoa_6_a64l + X__u _cgoa_6_a64l } -type pthread_attr_t = _cgoa_5_a64l type Pthread_attr_t = _cgoa_5_a64l type _cgoa_8_a64l struct { - __i [10]int32 + X__i [10]int32 } type _cgoa_7_a64l struct { - __u _cgoa_8_a64l + X__u _cgoa_8_a64l } -type pthread_mutex_t = _cgoa_7_a64l type Pthread_mutex_t = _cgoa_7_a64l type _cgoa_10_a64l struct { - __i [12]int32 + X__i [12]int32 } type _cgoa_9_a64l struct { - __u _cgoa_10_a64l + X__u _cgoa_10_a64l } -type pthread_cond_t = _cgoa_9_a64l type Pthread_cond_t = _cgoa_9_a64l type _cgoa_12_a64l struct { - __i [14]int32 + X__i [14]int32 } type _cgoa_11_a64l struct { - __u _cgoa_12_a64l + X__u _cgoa_12_a64l } -type pthread_rwlock_t = _cgoa_11_a64l type Pthread_rwlock_t = _cgoa_11_a64l type _cgoa_14_a64l struct { - __i [8]int32 + X__i [8]int32 } type _cgoa_13_a64l struct { - __u _cgoa_14_a64l + X__u _cgoa_14_a64l } -type pthread_barrier_t = _cgoa_13_a64l type Pthread_barrier_t = _cgoa_13_a64l -type pid_t = int32 type Pid_t = int32 type struct_sched_param struct { sched_priority int32 @@ -97,12 +77,9 @@ type struct_sched_param struct { __reserved2 [4]int64 __reserved3 int32 } -type timer_t = unsafe.Pointer type Timer_t = unsafe.Pointer -type clock_t = int64 type Clock_t = int64 -type locale_t = *struct___locale_struct -type Locale_t = *struct___locale_struct +type Locale_t = *Struct___locale_struct type struct_tm struct { tm_sec int32 tm_min int32 @@ -117,35 +94,28 @@ type struct_tm struct { tm_zone *int8 } type struct_itimerspec struct { - it_interval struct_timespec - it_value struct_timespec + it_interval Struct_timespec + it_value Struct_timespec } type struct___ptcb struct { __f func(unsafe.Pointer) __x unsafe.Pointer __next *struct___ptcb } -type ssize_t = int64 type Ssize_t = int64 -type off_t = int64 type Off_t = int64 -type FILE = struct__IO_FILE -type va_list = []interface { -} +type FILE = Struct__IO_FILE type Va_list = []interface { } -type __isoc_va_list = []interface { +type X__isoc_va_list = []interface { } -type union__G_fpos64_t struct { - __opaque [16]int8 +type Union__G_fpos64_t struct { + X__opaque [16]int8 } -type Union__G_fpos64_t = union__G_fpos64_t -type fpos_t = union__G_fpos64_t -type Fpos_t = union__G_fpos64_t -type struct___locale_struct struct { - cat [6]*struct___locale_map +type Fpos_t = Union__G_fpos64_t +type Struct___locale_struct struct { + Cat [6]*struct___locale_map } -type Struct___locale_struct = struct___locale_struct type struct_tls_module struct { next *struct_tls_module image unsafe.Pointer @@ -166,58 +136,41 @@ type struct___libc struct { tls_align uint64 tls_cnt uint64 page_size uint64 - global_locale struct___locale_struct + global_locale Struct___locale_struct } -type struct___pthread struct { - tid int32 - errno_val int32 - sys_r1 int64 - locale *struct___locale_struct +type Struct___pthread struct { + Tid int32 + Errno_val int32 + Sys_r1 int64 + Locale *Struct___locale_struct } -type Struct___pthread = struct___pthread -type wchar_t = uint32 type Wchar_t = uint32 type _cgoa_15_a64l struct { - quot int32 - rem int32 + Quot int32 + Rem int32 } -type div_t = _cgoa_15_a64l type Div_t = _cgoa_15_a64l type _cgoa_16_a64l struct { - quot int64 - rem int64 + Quot int64 + Rem int64 } -type ldiv_t = _cgoa_16_a64l type Ldiv_t = _cgoa_16_a64l type _cgoa_17_a64l struct { - quot int64 - rem int64 + Quot int64 + Rem int64 } -type lldiv_t = _cgoa_17_a64l type Lldiv_t = _cgoa_17_a64l -type uintptr_t = uint64 type Uintptr_t = uint64 -type intptr_t = int64 type Intptr_t = int64 -type int8_t = int8 type Int8_t = int8 -type int16_t = int16 type Int16_t = int16 -type int32_t = int32 type Int32_t = int32 -type int64_t = int64 type Int64_t = int64 -type intmax_t = int64 type Intmax_t = int64 -type uint8_t = uint8 type Uint8_t = uint8 -type uint16_t = uint16 type Uint16_t = uint16 -type uint32_t = uint32 type Uint32_t = uint32 -type uint64_t = uint64 type Uint64_t = uint64 -type uintmax_t = uint64 type Uintmax_t = uint64 type int_fast8_t = int8 type int_fast64_t = int64 @@ -402,7 +355,6 @@ func a_clz_32(x uint32) int32 { return int32(31) - a_ctz_32(x) } -type mode_t = uint32 type Mode_t = uint32 type struct_flock struct { l_type int16 @@ -411,19 +363,15 @@ type struct_flock struct { l_len int64 l_pid int32 } -type uid_t = uint32 type Uid_t = uint32 -type gid_t = uint32 type Gid_t = uint32 -type useconds_t = uint32 type Useconds_t = uint32 -type struct_winsize struct { - ws_row uint16 - ws_col uint16 - ws_xpixel uint16 - ws_ypixel uint16 +type Struct_winsize struct { + Ws_row uint16 + Ws_col uint16 + Ws_xpixel uint16 + Ws_ypixel uint16 } -type Struct_winsize = struct_winsize type cc_t = uint8 type speed_t = uint32 type tcflag_t = uint32 @@ -437,13 +385,11 @@ type struct_termios struct { __c_ispeed uint32 __c_ospeed uint32 } -type suseconds_t = int64 type Suseconds_t = int64 -type struct_timeval struct { - tv_sec int64 - tv_usec int64 +type Struct_timeval struct { + Tv_sec int64 + Tv_usec int64 } -type Struct_timeval = struct_timeval type _cgoa_18_forkpty struct { __e_termination int16 __e_exit int16 @@ -459,7 +405,7 @@ type struct_utmpx struct { ut_exit _cgoa_18_forkpty ut_session int32 __ut_pad2 int32 - ut_tv struct_timeval + ut_tv Struct_timeval ut_addr_v6 [4]uint32 __unused [20]int8 } @@ -468,7 +414,6 @@ type struct_lastlog struct { ll_line [32]int8 ll_host [256]int8 } -type id_t = uint32 type Id_t = uint32 const ( @@ -516,7 +461,7 @@ type struct___ucontext struct { uc_link *struct___ucontext uc_stack struct_sigaltstack uc_mcontext struct_sigcontext - uc_sigmask struct___sigset_t + uc_sigmask Struct___sigset_t uc_regspace [64]uint64 } type ucontext_t = struct___ucontext @@ -582,7 +527,7 @@ type _cgoa_32_forkpty struct { } type struct_sigaction struct { __sa_handler _cgoa_32_forkpty - sa_mask struct___sigset_t + sa_mask Struct___sigset_t sa_flags int32 sa_restorer func() } @@ -607,8 +552,8 @@ type _cgoa_35_forkpty struct { } type fd_set = _cgoa_35_forkpty type struct_itimerval struct { - it_interval struct_timeval - it_value struct_timeval + it_interval Struct_timeval + it_value Struct_timeval } type struct_timezone struct { tz_minuteswest int32 @@ -620,8 +565,8 @@ type struct_rlimit struct { rlim_max uint64 } type struct_rusage struct { - ru_utime struct_timeval - ru_stime struct_timeval + ru_utime Struct_timeval + ru_stime Struct_timeval ru_maxrss int64 ru_ixrss int64 ru_idrss int64 @@ -662,32 +607,21 @@ func __CPU_XOR_S(__size uint64, __dest *struct_cpu_set_t, __src1 *struct_cpu_set } } -type cookie_read_function_t = func(unsafe.Pointer, *int8, uint64) int64 type Cookie_read_function_t = func(unsafe.Pointer, *int8, uint64) int64 -type cookie_write_function_t = func(unsafe.Pointer, *int8, uint64) int64 type Cookie_write_function_t = func(unsafe.Pointer, *int8, uint64) int64 -type cookie_seek_function_t = func(unsafe.Pointer, *int64, int32) int32 type Cookie_seek_function_t = func(unsafe.Pointer, *int64, int32) int32 -type cookie_close_function_t = func(unsafe.Pointer) int32 type Cookie_close_function_t = func(unsafe.Pointer) int32 -type struct__IO_cookie_io_functions_t struct { - read func(unsafe.Pointer, *int8, uint64) int64 - write func(unsafe.Pointer, *int8, uint64) int64 - seek func(unsafe.Pointer, *int64, int32) int32 - close func(unsafe.Pointer) int32 -} -type Struct__IO_cookie_io_functions_t = struct__IO_cookie_io_functions_t -type cookie_io_functions_t = struct__IO_cookie_io_functions_t -type Cookie_io_functions_t = struct__IO_cookie_io_functions_t -type nlink_t = uint32 +type Struct__IO_cookie_io_functions_t struct { + Read func(unsafe.Pointer, *int8, uint64) int64 + Write func(unsafe.Pointer, *int8, uint64) int64 + Seek func(unsafe.Pointer, *int64, int32) int32 + Close func(unsafe.Pointer) int32 +} +type Cookie_io_functions_t = Struct__IO_cookie_io_functions_t type Nlink_t = uint32 -type ino_t = uint64 type Ino_t = uint64 -type dev_t = uint64 type Dev_t = uint64 -type blksize_t = int64 type Blksize_t = int64 -type blkcnt_t = int64 type Blkcnt_t = int64 type _cgoa_18_get_current_dir_name struct { tv_sec int64 @@ -710,9 +644,9 @@ type struct_stat struct { __st_mtim32 _cgoa_18_get_current_dir_name __st_ctim32 _cgoa_18_get_current_dir_name st_ino uint64 - st_atim struct_timespec - st_mtim struct_timespec - st_ctim struct_timespec + st_atim Struct_timespec + st_mtim Struct_timespec + st_ctim Struct_timespec } type Elf32_Half = uint16 type Elf64_Half = uint16 @@ -1081,17 +1015,13 @@ type struct_utsname struct { machine [65]int8 domainname [65]int8 } -type wint_t = uint32 type Wint_t = uint32 -type wctype_t = uint64 type Wctype_t = uint64 -type struct___mbstate_t struct { - __opaque1 uint32 - __opaque2 uint32 +type Struct___mbstate_t struct { + X__opaque1 uint32 + X__opaque2 uint32 } -type Struct___mbstate_t = struct___mbstate_t -type mbstate_t = struct___mbstate_t -type Mbstate_t = struct___mbstate_t +type Mbstate_t = Struct___mbstate_t type struct_lconv struct { decimal_point *int8 thousands_sep *int8 @@ -1139,47 +1069,44 @@ func __alt_socketcall(sys int32, sock int32, cp int32, a int64, b int64, c int64 return r } -type struct__IO_FILE struct { - flags uint32 - rpos *uint8 - rend *uint8 - close func(*struct__IO_FILE) int32 - wend *uint8 - wpos *uint8 - mustbezero_1 *uint8 - wbase *uint8 - read func(*struct__IO_FILE, *uint8, uint64) uint64 - write func(*struct__IO_FILE, *uint8, uint64) uint64 - seek func(*struct__IO_FILE, int64, int32) int64 - buf *uint8 - buf_size uint64 - prev *struct__IO_FILE - next *struct__IO_FILE - fd int32 - pipe_pid int32 - lockcount int64 - mode int32 - lock int32 - lbf int32 - cookie unsafe.Pointer - off int64 - getln_buf *int8 - mustbezero_2 unsafe.Pointer - shend *uint8 - shlim int64 - shcnt int64 - prev_locked *struct__IO_FILE - next_locked *struct__IO_FILE - locale *struct___locale_struct -} -type Struct__IO_FILE = struct__IO_FILE +type Struct__IO_FILE struct { + Flags uint32 + Rpos *uint8 + Rend *uint8 + Close func(*Struct__IO_FILE) int32 + Wend *uint8 + Wpos *uint8 + Mustbezero_1 *uint8 + Wbase *uint8 + Read func(*Struct__IO_FILE, *uint8, uint64) uint64 + Write func(*Struct__IO_FILE, *uint8, uint64) uint64 + Seek func(*Struct__IO_FILE, int64, int32) int64 + Buf *uint8 + Buf_size uint64 + Prev *Struct__IO_FILE + Next *Struct__IO_FILE + Fd int32 + Pipe_pid int32 + Lockcount int64 + Mode int32 + Lock int32 + Lbf int32 + Cookie unsafe.Pointer + Off int64 + Getln_buf *int8 + Mustbezero_2 unsafe.Pointer + Shend *uint8 + Shlim int64 + Shcnt int64 + Prev_locked *Struct__IO_FILE + Next_locked *Struct__IO_FILE + Locale *Struct___locale_struct +} type _cgoa_1_getopt_long struct { - __ll int64 - __ld float64 + X__ll int64 + X__ld float64 } -type max_align_t = _cgoa_1_getopt_long type Max_align_t = _cgoa_1_getopt_long -type ptrdiff_t = int64 type Ptrdiff_t = int64 type struct_option struct { name *int8 @@ -1219,9 +1146,7 @@ type _cgoa_18_wordexp struct { we_offs uint64 } type wordexp_t = _cgoa_18_wordexp -type float_t = float32 type Float_t = float32 -type double_t = float64 type Double_t = float64 func X__FLOAT_BITS(__f float32) uint32 { @@ -1240,7 +1165,7 @@ func X__DOUBLE_BITS(__f float64) uint64 { __u.__f = __f return *(*uint64)(unsafe.Pointer(&__u)) } -func __islessf(__x float32, __y float32) int32 { +func X__islessf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1321,7 +1246,7 @@ func __islessf(__x float32, __y float32) int32 { } }() } -func __isless(__x float64, __y float64) int32 { +func X__isless(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1402,7 +1327,7 @@ func __isless(__x float64, __y float64) int32 { } }() } -func __islessl(__x float64, __y float64) int32 { +func X__islessl(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1483,7 +1408,7 @@ func __islessl(__x float64, __y float64) int32 { } }() } -func __islessequalf(__x float32, __y float32) int32 { +func X__islessequalf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1564,7 +1489,7 @@ func __islessequalf(__x float32, __y float32) int32 { } }() } -func __islessequal(__x float64, __y float64) int32 { +func X__islessequal(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1645,7 +1570,7 @@ func __islessequal(__x float64, __y float64) int32 { } }() } -func __islessequall(__x float64, __y float64) int32 { +func X__islessequall(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1726,7 +1651,7 @@ func __islessequall(__x float64, __y float64) int32 { } }() } -func __islessgreaterf(__x float32, __y float32) int32 { +func X__islessgreaterf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1807,7 +1732,7 @@ func __islessgreaterf(__x float32, __y float32) int32 { } }() } -func __islessgreater(__x float64, __y float64) int32 { +func X__islessgreater(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1888,7 +1813,7 @@ func __islessgreater(__x float64, __y float64) int32 { } }() } -func __islessgreaterl(__x float64, __y float64) int32 { +func X__islessgreaterl(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -1969,7 +1894,7 @@ func __islessgreaterl(__x float64, __y float64) int32 { } }() } -func __isgreaterf(__x float32, __y float32) int32 { +func X__isgreaterf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2050,7 +1975,7 @@ func __isgreaterf(__x float32, __y float32) int32 { } }() } -func __isgreater(__x float64, __y float64) int32 { +func X__isgreater(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2131,7 +2056,7 @@ func __isgreater(__x float64, __y float64) int32 { } }() } -func __isgreaterl(__x float64, __y float64) int32 { +func X__isgreaterl(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2212,7 +2137,7 @@ func __isgreaterl(__x float64, __y float64) int32 { } }() } -func __isgreaterequalf(__x float32, __y float32) int32 { +func X__isgreaterequalf(__x float32, __y float32) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2293,7 +2218,7 @@ func __isgreaterequalf(__x float32, __y float32) int32 { } }() } -func __isgreaterequal(__x float64, __y float64) int32 { +func X__isgreaterequal(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2374,7 +2299,7 @@ func __isgreaterequal(__x float64, __y float64) int32 { } }() } -func __isgreaterequall(__x float64, __y float64) int32 { +func X__isgreaterequall(__x float64, __y float64) int32 { return func() int32 { if !(func() int32 { if func() int32 { @@ -2595,20 +2520,19 @@ type struct_powf_log2_data struct { tab [16]_cgoa_18_powf poly [5]float64 } -type struct_iovec struct { - iov_base unsafe.Pointer - iov_len uint64 +type Struct_iovec struct { + Iov_base unsafe.Pointer + Iov_len uint64 } -type Struct_iovec = struct_iovec -func locking_getc(f *struct__IO_FILE) int32 { - if a_cas(&f.lock, int32(0), 1073741823) != 0 { +func locking_getc(f *Struct__IO_FILE) int32 { + if a_cas(&f.Lock, int32(0), 1073741823) != 0 { __lockfile(f) } var c int32 = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -2617,18 +2541,18 @@ func locking_getc(f *struct__IO_FILE) int32 { return __uflow(f) } }() - if a_swap(&f.lock, int32(0))&int32(1073741824) != 0 { - __wake(unsafe.Pointer(&f.lock), int32(1), int32(1)) + if a_swap(&f.Lock, int32(0))&int32(1073741824) != 0 { + __wake(unsafe.Pointer(&f.Lock), int32(1), int32(1)) } return c } -func do_getc(f *struct__IO_FILE) int32 { - var l int32 = f.lock - if l < int32(0) || l != 0 && l&-1073741825 == __pthread_self().tid { +func do_getc(f *Struct__IO_FILE) int32 { + var l int32 = f.Lock + if l < int32(0) || l != 0 && l&-1073741825 == __pthread_self().Tid { return func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -2656,15 +2580,15 @@ type struct_f_owner_ex struct { pid int32 } -func locking_putc(c int32, f *struct__IO_FILE) int32 { - if a_cas(&f.lock, int32(0), 1073741823) != 0 { +func locking_putc(c int32, f *Struct__IO_FILE) int32 { + if a_cas(&f.Lock, int32(0), 1073741823) != 0 { __lockfile(f) } c = func() int32 { - if int32(uint8(c)) != f.lbf && uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wend)) { + if int32(uint8(c)) != f.Lbf && uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wend)) { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &f.wpos + _cgo_addr := &f.Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -2676,19 +2600,19 @@ func locking_putc(c int32, f *struct__IO_FILE) int32 { return __overflow(f, int32(uint8(c))) } }() - if a_swap(&f.lock, int32(0))&int32(1073741824) != 0 { - __wake(unsafe.Pointer(&f.lock), int32(1), int32(1)) + if a_swap(&f.Lock, int32(0))&int32(1073741824) != 0 { + __wake(unsafe.Pointer(&f.Lock), int32(1), int32(1)) } return c } -func do_putc(c int32, f *struct__IO_FILE) int32 { - var l int32 = f.lock - if l < int32(0) || l != 0 && l&-1073741825 == __pthread_self().tid { +func do_putc(c int32, f *Struct__IO_FILE) int32 { + var l int32 = f.Lock + if l < int32(0) || l != 0 && l&-1073741825 == __pthread_self().Tid { return func() int32 { - if int32(uint8(c)) != f.lbf && uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wend)) { + if int32(uint8(c)) != f.Lbf && uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wend)) { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &f.wpos + _cgo_addr := &f.Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -2703,7 +2627,7 @@ func do_putc(c int32, f *struct__IO_FILE) int32 { } return locking_putc(c, f) } -func __isspace(_c int32) int32 { +func X__isspace(_c int32) int32 { return func() int32 { if _c == ' ' || uint32(_c)-uint32('\t') < uint32(5) { return 1 diff --git a/c_locale.c.i.go b/c_locale.c.i.go index 4b352f2d..ddf4c6c9 100644 --- a/c_locale.c.i.go +++ b/c_locale.c.i.go @@ -4,5 +4,5 @@ import unsafe "unsafe" var _cgos_empty_mo_c_locale [5]uint32 = [5]uint32{uint32(2500072158), uint32(0), uint32(4294967295), uint32(4294967295), uint32(4294967295)} var __c_dot_utf8 struct___locale_map = struct___locale_map{unsafe.Pointer((*uint32)(unsafe.Pointer(&_cgos_empty_mo_c_locale))), 20, [24]int8{'C', '.', 'U', 'T', 'F', '-', '8', '\x00'}, nil} -var __c_locale struct___locale_struct = struct___locale_struct{[6]*struct___locale_map{nil}} -var __c_dot_utf8_locale struct___locale_struct = struct___locale_struct{[6]*struct___locale_map{&__c_dot_utf8}} +var __c_locale Struct___locale_struct = Struct___locale_struct{[6]*struct___locale_map{nil}} +var __c_dot_utf8_locale Struct___locale_struct = Struct___locale_struct{[6]*struct___locale_map{&__c_dot_utf8}} diff --git a/clearerr.c.i.go b/clearerr.c.i.go index 3cc5186b..f11e60ec 100644 --- a/clearerr.c.i.go +++ b/clearerr.c.i.go @@ -1,14 +1,14 @@ package libc -func Clearerr(f *struct__IO_FILE) { +func Clearerr(f *Struct__IO_FILE) { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - f.flags &= uint32(4294967247) + f.Flags &= uint32(4294967247) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/ext.c.i.go b/ext.c.i.go index 2c32b88e..b9cf3fb5 100644 --- a/ext.c.i.go +++ b/ext.c.i.go @@ -5,78 +5,78 @@ import unsafe "unsafe" func _flushlbf() { Fflush(nil) } -func __fsetlocking(f *struct__IO_FILE, type_ int32) int32 { +func __fsetlocking(f *Struct__IO_FILE, type_ int32) int32 { return int32(0) } -func __fwriting(f *struct__IO_FILE) int32 { +func __fwriting(f *Struct__IO_FILE) int32 { return func() int32 { - if f.flags&uint32(4) != 0 || f.wend != nil { + if f.Flags&uint32(4) != 0 || f.Wend != nil { return 1 } else { return 0 } }() } -func __freading(f *struct__IO_FILE) int32 { +func __freading(f *Struct__IO_FILE) int32 { return func() int32 { - if f.flags&uint32(8) != 0 || f.rend != nil { + if f.Flags&uint32(8) != 0 || f.Rend != nil { return 1 } else { return 0 } }() } -func __freadable(f *struct__IO_FILE) int32 { +func __freadable(f *Struct__IO_FILE) int32 { return func() int32 { - if !(f.flags&uint32(4) != 0) { + if !(f.Flags&uint32(4) != 0) { return 1 } else { return 0 } }() } -func __fwritable(f *struct__IO_FILE) int32 { +func __fwritable(f *Struct__IO_FILE) int32 { return func() int32 { - if !(f.flags&uint32(8) != 0) { + if !(f.Flags&uint32(8) != 0) { return 1 } else { return 0 } }() } -func __flbf(f *struct__IO_FILE) int32 { +func __flbf(f *Struct__IO_FILE) int32 { return func() int32 { - if f.lbf >= int32(0) { + if f.Lbf >= int32(0) { return 1 } else { return 0 } }() } -func __fbufsize(f *struct__IO_FILE) uint64 { - return f.buf_size +func __fbufsize(f *Struct__IO_FILE) uint64 { + return f.Buf_size } -func __fpending(f *struct__IO_FILE) uint64 { +func __fpending(f *Struct__IO_FILE) uint64 { return uint64(func() int64 { - if f.wend != nil { - return int64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase))) + if f.Wend != nil { + return int64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase))) } else { return int64(0) } }()) } -func __fpurge(f *struct__IO_FILE) int32 { - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase +func __fpurge(f *Struct__IO_FILE) int32 { + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() diff --git a/ext2.c.i.go b/ext2.c.i.go index 9ac7cc6c..56590e1d 100644 --- a/ext2.c.i.go +++ b/ext2.c.i.go @@ -2,25 +2,25 @@ package libc import unsafe "unsafe" -func __freadahead(f *struct__IO_FILE) uint64 { +func __freadahead(f *Struct__IO_FILE) uint64 { return uint64(func() int64 { - if f.rend != nil { - return int64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) + if f.Rend != nil { + return int64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) } else { return int64(0) } }()) } -func __freadptr(f *struct__IO_FILE, sizep *uint64) *int8 { - if uintptr(unsafe.Pointer(f.rpos)) == uintptr(unsafe.Pointer(f.rend)) { +func __freadptr(f *Struct__IO_FILE, sizep *uint64) *int8 { + if uintptr(unsafe.Pointer(f.Rpos)) == uintptr(unsafe.Pointer(f.Rend)) { return (*int8)(nil) } - *sizep = uint64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) - return (*int8)(unsafe.Pointer(f.rpos)) + *sizep = uint64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) + return (*int8)(unsafe.Pointer(f.Rpos)) } -func __freadptrinc(f *struct__IO_FILE, inc uint64) { - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(inc) +func __freadptrinc(f *Struct__IO_FILE, inc uint64) { + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(inc) } -func __fseterr(f *struct__IO_FILE) { - f.flags |= uint32(32) +func __fseterr(f *Struct__IO_FILE) { + f.Flags |= uint32(32) } diff --git a/fclose.c.i.go b/fclose.c.i.go index 0517a4ac..85f2f5a4 100644 --- a/fclose.c.i.go +++ b/fclose.c.i.go @@ -2,19 +2,19 @@ package libc import unsafe "unsafe" -func _cgos_dummy_fclose(f *struct__IO_FILE) { +func _cgos_dummy_fclose(f *Struct__IO_FILE) { } -func Fclose(f *struct__IO_FILE) int32 { +func Fclose(f *Struct__IO_FILE) int32 { var r int32 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() r = Fflush(f) - r |= f.close(f) + r |= f.Close(f) for { if __need_unlock != 0 { __unlockfile(f) @@ -23,22 +23,22 @@ func Fclose(f *struct__IO_FILE) int32 { break } } - if f.flags&uint32(1) != 0 { + if f.Flags&uint32(1) != 0 { return r } __unlist_locked_file(f) - var head **struct__IO_FILE = __ofl_lock() - if f.prev != nil { - f.prev.next = f.next + var head **Struct__IO_FILE = __ofl_lock() + if f.Prev != nil { + f.Prev.Next = f.Next } - if f.next != nil { - f.next.prev = f.prev + if f.Next != nil { + f.Next.Prev = f.Prev } if uintptr(unsafe.Pointer(*head)) == uintptr(unsafe.Pointer(f)) { - *head = f.next + *head = f.Next } __ofl_unlock() - Free(unsafe.Pointer(f.getln_buf)) + Free(unsafe.Pointer(f.Getln_buf)) Free(unsafe.Pointer(f)) return r } diff --git a/feof.c.i.go b/feof.c.i.go index 33bb235f..f5bf5484 100644 --- a/feof.c.i.go +++ b/feof.c.i.go @@ -1,15 +1,15 @@ package libc -func Feof(f *struct__IO_FILE) int32 { +func Feof(f *Struct__IO_FILE) int32 { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() var ret int32 = func() int32 { - if !!(f.flags&uint32(16) != 0) { + if !!(f.Flags&uint32(16) != 0) { return 1 } else { return 0 diff --git a/ferror.c.i.go b/ferror.c.i.go index 8e48cf9f..2bda94a1 100644 --- a/ferror.c.i.go +++ b/ferror.c.i.go @@ -1,15 +1,15 @@ package libc -func Ferror(f *struct__IO_FILE) int32 { +func Ferror(f *Struct__IO_FILE) int32 { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() var ret int32 = func() int32 { - if !!(f.flags&uint32(32) != 0) { + if !!(f.Flags&uint32(32) != 0) { return 1 } else { return 0 diff --git a/fflush.c.i.go b/fflush.c.i.go index 96699487..da0ed782 100644 --- a/fflush.c.i.go +++ b/fflush.c.i.go @@ -2,9 +2,9 @@ package libc import unsafe "unsafe" -var _cgos_dummy_fflush *struct__IO_FILE = nil +var _cgos_dummy_fflush *Struct__IO_FILE = nil -func Fflush(f *struct__IO_FILE) int32 { +func Fflush(f *Struct__IO_FILE) int32 { if !(f != nil) { var r int32 = int32(0) if __stdout_used != nil { @@ -13,15 +13,15 @@ func Fflush(f *struct__IO_FILE) int32 { if __stderr_used != nil { r |= Fflush(__stderr_used) } - for f = *__ofl_lock(); f != nil; f = f.next { + for f = *__ofl_lock(); f != nil; f = f.Next { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { r |= Fflush(f) } for { @@ -37,15 +37,15 @@ func Fflush(f *struct__IO_FILE) int32 { return r } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { - f.write(f, nil, uint64(0)) - if !(f.wpos != nil) { + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { + f.Write(f, nil, uint64(0)) + if !(f.Wpos != nil) { for { if __need_unlock != 0 { __unlockfile(f) @@ -57,20 +57,20 @@ func Fflush(f *struct__IO_FILE) int32 { return -1 } } - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { - f.seek(f, int64(uintptr(unsafe.Pointer(f.rpos))-uintptr(unsafe.Pointer(f.rend))), int32(1)) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { + f.Seek(f, int64(uintptr(unsafe.Pointer(f.Rpos))-uintptr(unsafe.Pointer(f.Rend))), int32(1)) } - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() diff --git a/fgetc.c.i.go b/fgetc.c.i.go index 102a00ed..0f3643c3 100644 --- a/fgetc.c.i.go +++ b/fgetc.c.i.go @@ -1,5 +1,5 @@ package libc -func Fgetc(f *struct__IO_FILE) int32 { +func Fgetc(f *Struct__IO_FILE) int32 { return do_getc(f) } diff --git a/fgetln.c.i.go b/fgetln.c.i.go index 0e14cbbf..98a6f22d 100644 --- a/fgetln.c.i.go +++ b/fgetln.c.i.go @@ -2,21 +2,21 @@ package libc import unsafe "unsafe" -func Fgetln(f *struct__IO_FILE, plen *uint64) *int8 { +func Fgetln(f *Struct__IO_FILE, plen *uint64) *int8 { var ret *int8 = nil var z *int8 var l int64 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() Ungetc(func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -25,25 +25,25 @@ func Fgetln(f *struct__IO_FILE, plen *uint64) *int8 { return __uflow(f) } }(), f) - if f.rend != nil && func() (_cgo_ret *int8) { + if f.Rend != nil && func() (_cgo_ret *int8) { _cgo_addr := &z - *_cgo_addr = (*int8)(Memchr(unsafe.Pointer(f.rpos), '\n', uint64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))))) + *_cgo_addr = (*int8)(Memchr(unsafe.Pointer(f.Rpos), '\n', uint64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))))) return *_cgo_addr }() != nil { - ret = (*int8)(unsafe.Pointer(f.rpos)) + ret = (*int8)(unsafe.Pointer(f.Rpos)) *plen = uint64(uintptr(unsafe.Pointer(func() (_cgo_ret *int8) { _cgo_addr := &z *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return *_cgo_addr }())) - uintptr(unsafe.Pointer(ret))) - f.rpos = (*uint8)(unsafe.Pointer(z)) + f.Rpos = (*uint8)(unsafe.Pointer(z)) } else if func() (_cgo_ret int64) { _cgo_addr := &l - *_cgo_addr = Getline(&f.getln_buf, (*uint64)(unsafe.Pointer(&[1]uint64{uint64(0)})), f) + *_cgo_addr = Getline(&f.Getln_buf, (*uint64)(unsafe.Pointer(&[1]uint64{uint64(0)})), f) return *_cgo_addr }() > int64(0) { *plen = uint64(l) - ret = f.getln_buf + ret = f.Getln_buf } for { if __need_unlock != 0 { diff --git a/fgetpos.c.i.go b/fgetpos.c.i.go index 41abe116..56e0463d 100644 --- a/fgetpos.c.i.go +++ b/fgetpos.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func Fgetpos(f *struct__IO_FILE, pos *union__G_fpos64_t) int32 { +func Fgetpos(f *Struct__IO_FILE, pos *Union__G_fpos64_t) int32 { var off int64 = __ftello(f) if off < int64(0) { return -1 diff --git a/fgets.c.i.go b/fgets.c.i.go index 1a938ed1..d748d671 100644 --- a/fgets.c.i.go +++ b/fgets.c.i.go @@ -2,13 +2,13 @@ package libc import unsafe "unsafe" -func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { +func Fgets(s *int8, n int32, f *Struct__IO_FILE) *int8 { var p *int8 = s var z *uint8 var k uint64 var c int32 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) @@ -20,7 +20,7 @@ func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { *_cgo_addr-- return }() <= int32(1) { - f.mode |= f.mode - int32(1) + f.Mode |= f.Mode - int32(1) for { if __need_unlock != 0 { __unlockfile(f) @@ -36,13 +36,13 @@ func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { return s } for n != 0 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { - z = (*uint8)(Memchr(unsafe.Pointer(f.rpos), '\n', uint64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))))) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { + z = (*uint8)(Memchr(unsafe.Pointer(f.Rpos), '\n', uint64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))))) k = uint64(func() int64 { if z != nil { - return int64(uintptr(unsafe.Pointer(z)) - uintptr(unsafe.Pointer(f.rpos)) + uintptr(int64(1))) + return int64(uintptr(unsafe.Pointer(z)) - uintptr(unsafe.Pointer(f.Rpos)) + uintptr(int64(1))) } else { - return int64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) + return int64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) } }()) k = func() uint64 { @@ -52,8 +52,8 @@ func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { return uint64(n) } }() - Memcpy(unsafe.Pointer(p), unsafe.Pointer(f.rpos), k) - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(k) + Memcpy(unsafe.Pointer(p), unsafe.Pointer(f.Rpos), k) + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(k) *(*uintptr)(unsafe.Pointer(&p)) += uintptr(k) n -= int32(k) if z != nil || !(n != 0) { @@ -63,9 +63,9 @@ func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { if func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -76,7 +76,7 @@ func Fgets(s *int8, n int32, f *struct__IO_FILE) *int8 { }() return *_cgo_addr }() < int32(0) { - if uintptr(unsafe.Pointer(p)) == uintptr(unsafe.Pointer(s)) || !(f.flags&uint32(16) != 0) { + if uintptr(unsafe.Pointer(p)) == uintptr(unsafe.Pointer(s)) || !(f.Flags&uint32(16) != 0) { s = (*int8)(nil) } break diff --git a/fgetwc.c.i.go b/fgetwc.c.i.go index bc8c4ffe..493d7b55 100644 --- a/fgetwc.c.i.go +++ b/fgetwc.c.i.go @@ -2,14 +2,14 @@ package libc import unsafe "unsafe" -func _cgos___fgetwc_unlocked_internal_fgetwc(f *struct__IO_FILE) uint32 { +func _cgos___fgetwc_unlocked_internal_fgetwc(f *Struct__IO_FILE) uint32 { var wc uint32 var c int32 var l uint64 - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { - l = uint64(Mbtowc(&wc, (*int8)(unsafe.Pointer(f.rpos)), uint64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))))) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { + l = uint64(Mbtowc(&wc, (*int8)(unsafe.Pointer(f.Rpos)), uint64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))))) if l+uint64(1) >= uint64(1) { - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(l + func() uint64 { + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(l + func() uint64 { if !(l != 0) { return 1 } else { @@ -19,16 +19,16 @@ func _cgos___fgetwc_unlocked_internal_fgetwc(f *struct__IO_FILE) uint32 { return wc } } - var st struct___mbstate_t = struct___mbstate_t{uint32(0), 0} + var st Struct___mbstate_t = Struct___mbstate_t{uint32(0), 0} var b uint8 var first int32 = int32(1) for { b = uint8(func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -41,7 +41,7 @@ func _cgos___fgetwc_unlocked_internal_fgetwc(f *struct__IO_FILE) uint32 { }()) if c < int32(0) { if !(first != 0) { - f.flags |= uint32(32) + f.Flags |= uint32(32) *__errno_location() = int32(84) } return uint32(4294967295) @@ -49,7 +49,7 @@ func _cgos___fgetwc_unlocked_internal_fgetwc(f *struct__IO_FILE) uint32 { l = mbrtowc(&wc, (*int8)(unsafe.Pointer(&b)), uint64(1), &st) if l == uint64(18446744073709551615) { if !(first != 0) { - f.flags |= uint32(32) + f.Flags |= uint32(32) Ungetc(int32(b), f) } return uint32(4294967295) @@ -61,21 +61,21 @@ func _cgos___fgetwc_unlocked_internal_fgetwc(f *struct__IO_FILE) uint32 { } return wc } -func __fgetwc_unlocked(f *struct__IO_FILE) uint32 { - var ploc **struct___locale_struct = &__pthread_self().locale - var loc *struct___locale_struct = *ploc - if f.mode <= int32(0) { +func __fgetwc_unlocked(f *Struct__IO_FILE) uint32 { + var ploc **Struct___locale_struct = &__pthread_self().Locale + var loc *Struct___locale_struct = *ploc + if f.Mode <= int32(0) { fwide(f, int32(1)) } - *ploc = f.locale + *ploc = f.Locale var wc uint32 = _cgos___fgetwc_unlocked_internal_fgetwc(f) *ploc = loc return wc } -func fgetwc(f *struct__IO_FILE) uint32 { +func fgetwc(f *Struct__IO_FILE) uint32 { var c uint32 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) diff --git a/fgetws.c.i.go b/fgetws.c.i.go index 323c3983..48e424b3 100644 --- a/fgetws.c.i.go +++ b/fgetws.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func fgetws(s *uint32, n int32, f *struct__IO_FILE) *uint32 { +func fgetws(s *uint32, n int32, f *Struct__IO_FILE) *uint32 { var p *uint32 = s if !(func() (_cgo_ret int32) { _cgo_addr := &n @@ -13,7 +13,7 @@ func fgetws(s *uint32, n int32, f *struct__IO_FILE) *uint32 { return s } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) @@ -36,7 +36,7 @@ func fgetws(s *uint32, n int32, f *struct__IO_FILE) *uint32 { } } *p = uint32(0) - if f.flags&uint32(32) != 0 || *__errno_location() == int32(84) { + if f.Flags&uint32(32) != 0 || *__errno_location() == int32(84) { p = s } for { diff --git a/fileno.c.i.go b/fileno.c.i.go index ca3f3e16..15077bc9 100644 --- a/fileno.c.i.go +++ b/fileno.c.i.go @@ -1,14 +1,14 @@ package libc -func Fileno(f *struct__IO_FILE) int32 { +func Fileno(f *Struct__IO_FILE) int32 { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - var fd int32 = f.fd + var fd int32 = f.Fd for { if __need_unlock != 0 { __unlockfile(f) diff --git a/floatscan.c.i.go b/floatscan.c.i.go index d62a30e5..6e4cceea 100644 --- a/floatscan.c.i.go +++ b/floatscan.c.i.go @@ -2,15 +2,15 @@ package libc import unsafe "unsafe" -func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { +func _cgos_scanexp_floatscan(f *Struct__IO_FILE, pok int32) int64 { var c int32 var x int32 var y int64 var neg int32 = int32(0) c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -28,9 +28,9 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { } }() c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -40,10 +40,10 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { } }() if uint32(c-'0') >= uint32(10) && pok != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -59,10 +59,10 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { } } if uint32(c-'0') >= uint32(10) { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -78,9 +78,9 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { return -9223372036854775808 } for x = int32(0); uint32(c-'0') < uint32(10) && x < 214748364; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -92,9 +92,9 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { x = int32(10)*x + c - '0' } for y = int64(x); uint32(c-'0') < uint32(10) && y < 92233720368547758; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -106,9 +106,9 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { y = int64(10)*y + int64(c) - int64('0') } for ; uint32(c-'0') < uint32(10); c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -118,10 +118,10 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { } }() { } - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -142,7 +142,7 @@ func _cgos_scanexp_floatscan(f *struct__IO_FILE, pok int32) int64 { } }() } -func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int32, sign int32, pok int32) float64 { +func _cgos_decfloat_floatscan(f *Struct__IO_FILE, c int32, bits int32, emin int32, sign int32, pok int32) float64 { var x [128]uint32 var i int32 var j int32 @@ -165,9 +165,9 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 j = int32(0) k = int32(0) for ; c == '0'; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -181,9 +181,9 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 if c == '.' { gotrad = int32(1) for c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -192,9 +192,9 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 return __shgetc(f) } }(); c == '0'; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -216,9 +216,9 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 } *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint32)(unsafe.Pointer(&x)))) + uintptr(int32(0))*4)) = uint32(0) for ; uint32(c-'0') < uint32(10) || c == '.'; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -267,10 +267,10 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 e10 = _cgos_scanexp_floatscan(f, pok) if e10 == -9223372036854775808 { if pok != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -291,10 +291,10 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 } lrp += e10 } else if c >= int32(0) { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -514,7 +514,7 @@ func _cgos_decfloat_floatscan(f *struct__IO_FILE, c int32, bits int32, emin int3 var _cgos_th_floatscan [2]uint32 = [2]uint32{uint32(9007199), uint32(254740991)} var _cgos_p10s_floatscan [8]int32 = [8]int32{int32(10), int32(100), int32(1000), int32(10000), int32(100000), int32(1000000), int32(10000000), int32(100000000)} -func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign int32, pok int32) float64 { +func _cgos_hexfloat_floatscan(f *Struct__IO_FILE, bits int32, emin int32, sign int32, pok int32) float64 { var x uint32 = uint32(0) var y float64 = float64(int32(0)) var scale float64 = float64(int32(1)) @@ -528,9 +528,9 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i var d int32 var c int32 c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -540,9 +540,9 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i } }() for ; c == '0'; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -556,9 +556,9 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i if c == '.' { gotrad = int32(1) c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -569,9 +569,9 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i }() for rp = int64(0); c == '0'; func() int64 { c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -591,9 +591,9 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i } } for ; uint32(c-'0') < uint32(10) || uint32(c|int32(32)-'a') < uint32(6) || c == '.'; c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -631,10 +631,10 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i } } if !(gotdig != 0) { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -648,10 +648,10 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i }() } if pok != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -665,10 +665,10 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i }() } if gotrad != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -705,10 +705,10 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i e2 = _cgos_scanexp_floatscan(f, pok) if e2 == -9223372036854775808 { if pok != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -727,10 +727,10 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i } e2 = int64(0) } - } else if f.shlim >= int64(0) { + } else if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -791,7 +791,7 @@ func _cgos_hexfloat_floatscan(f *struct__IO_FILE, bits int32, emin int32, sign i } return Scalbnl(y, int32(e2)) } -func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { +func __floatscan(f *Struct__IO_FILE, prec int32, pok int32) float64 { var sign int32 = int32(1) var i uint64 var bits int32 @@ -813,12 +813,12 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { default: return float64(int32(0)) } - for __isspace(func() (_cgo_ret int32) { + for X__isspace(func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -839,9 +839,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } }() c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -854,9 +854,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { for i = uint64(0); i < uint64(8) && c|int32(32) == int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&[9]int8{'i', 'n', 'f', 'i', 'n', 'i', 't', 'y', '\x00'})))) + uintptr(i)))); i++ { if i < uint64(7) { c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -869,10 +869,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } if i == uint64(3) || i == uint64(8) || i > uint64(3) && pok != 0 { if i != uint64(8) { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -887,10 +887,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } if pok != 0 { for ; i > uint64(3); i-- { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -912,9 +912,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { for i = uint64(0); i < uint64(3) && c|int32(32) == int32(*(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&[4]int8{'n', 'a', 'n', '\x00'})))) + uintptr(i)))); i++ { if i < uint64(2) { c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -928,9 +928,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } if i == uint64(3) { if func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -939,10 +939,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { return __shgetc(f) } }() != '(' { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -959,9 +959,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } for i = uint64(1); ; i++ { c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -976,10 +976,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { if c == ')' { return float64(X__builtin_nanf((*int8)(unsafe.Pointer(&[1]int8{'\x00'})))) } - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -1003,10 +1003,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { *_cgo_addr-- return }() != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -1025,10 +1025,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { return float64(X__builtin_nanf((*int8)(unsafe.Pointer(&[1]int8{'\x00'})))) } if i != 0 { - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return @@ -1047,9 +1047,9 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { } if c == '0' { c = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.shend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Shend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -1061,10 +1061,10 @@ func __floatscan(f *struct__IO_FILE, prec int32, pok int32) float64 { if c|int32(32) == 'x' { return _cgos_hexfloat_floatscan(f, bits, emin, sign, pok) } - if f.shlim >= int64(0) { + if f.Shlim >= int64(0) { func() int { _ = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return diff --git a/flockfile.c.i.go b/flockfile.c.i.go index dfeec803..21007c53 100644 --- a/flockfile.c.i.go +++ b/flockfile.c.i.go @@ -1,6 +1,6 @@ package libc -func Flockfile(f *struct__IO_FILE) { +func Flockfile(f *Struct__IO_FILE) { if !(Ftrylockfile(f) != 0) { return } diff --git a/fmemopen.c.i.go b/fmemopen.c.i.go index fb3be658..cac14318 100644 --- a/fmemopen.c.i.go +++ b/fmemopen.c.i.go @@ -10,16 +10,16 @@ type _cgos_cookie_fmemopen struct { mode int32 } type _cgos_mem_FILE_fmemopen struct { - f struct__IO_FILE + f Struct__IO_FILE c _cgos_cookie_fmemopen buf [1032]uint8 buf2 [0]uint8 } -func _cgos_mseek_fmemopen(f *struct__IO_FILE, off int64, whence int32) int64 { +func _cgos_mseek_fmemopen(f *Struct__IO_FILE, off int64, whence int32) int64 { var base int64 - var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.cookie) + var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.Cookie) if !(uint32(whence) > uint32(2)) { goto _cgol_1 } @@ -39,35 +39,35 @@ _cgol_2: return *_cgo_addr }()) } -func _cgos_mread_fmemopen(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.cookie) +func _cgos_mread_fmemopen(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.Cookie) var rem uint64 = c.len - c.pos if c.pos > c.len { rem = uint64(0) } if len > rem { len = rem - f.flags |= uint32(16) + f.Flags |= uint32(16) } Memcpy(unsafe.Pointer(buf), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(c.buf))+uintptr(c.pos)))), len) c.pos += len rem -= len - if rem > f.buf_size { - rem = f.buf_size + if rem > f.Buf_size { + rem = f.Buf_size } - f.rpos = f.buf - f.rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(rem))) - Memcpy(unsafe.Pointer(f.rpos), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(c.buf))+uintptr(c.pos)))), rem) + f.Rpos = f.Buf + f.Rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(rem))) + Memcpy(unsafe.Pointer(f.Rpos), unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(c.buf))+uintptr(c.pos)))), rem) c.pos += rem return len } -func _cgos_mwrite_fmemopen(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.cookie) +func _cgos_mwrite_fmemopen(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var c *_cgos_cookie_fmemopen = (*_cgos_cookie_fmemopen)(f.Cookie) var rem uint64 - var len2 uint64 = uint64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase))) + var len2 uint64 = uint64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase))) if len2 != 0 { - f.wpos = f.wbase - if _cgos_mwrite_fmemopen(f, f.wpos, len2) < len2 { + f.Wpos = f.Wbase + if _cgos_mwrite_fmemopen(f, f.Wpos, len2) < len2 { return uint64(0) } } @@ -84,16 +84,16 @@ func _cgos_mwrite_fmemopen(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { c.len = c.pos if c.len < c.size { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(c.buf)) + uintptr(c.len))) = uint8(0) - } else if f.flags&uint32(4) != 0 && c.size != 0 { + } else if f.Flags&uint32(4) != 0 && c.size != 0 { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(c.buf)) + uintptr(c.size-uint64(1)))) = uint8(0) } } return len } -func _cgos_mclose_fmemopen(m *struct__IO_FILE) int32 { +func _cgos_mclose_fmemopen(m *Struct__IO_FILE) int32 { return int32(0) } -func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *struct__IO_FILE { +func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *Struct__IO_FILE { var f *_cgos_mem_FILE_fmemopen var plus int32 = func() int32 { if !!(Strchr(mode, '+') != nil) { @@ -104,11 +104,11 @@ func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *struct__IO_FILE { }() if !(Strchr((*int8)(unsafe.Pointer(&[4]int8{'r', 'w', 'a', '\x00'})), int32(*mode)) != nil) { *__errno_location() = int32(22) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } if !(buf != nil) && size > uint64(2147483647) { *__errno_location() = int32(12) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } f = (*_cgos_mem_FILE_fmemopen)(Malloc(1300 + func() uint64 { if buf != nil { @@ -118,14 +118,14 @@ func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *struct__IO_FILE { } }())) if !(f != nil) { - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } Memset(unsafe.Pointer(f), int32(0), 268) - f.f.cookie = unsafe.Pointer(&f.c) - f.f.fd = -1 - f.f.lbf = -1 - f.f.buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&f.buf)))) + uintptr(int32(8)))) - f.f.buf_size = 1024 + f.f.Cookie = unsafe.Pointer(&f.c) + f.f.Fd = -1 + f.f.Lbf = -1 + f.f.Buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&f.buf)))) + uintptr(int32(8)))) + f.f.Buf_size = 1024 if !(buf != nil) { buf = unsafe.Pointer((*uint8)(unsafe.Pointer(&f.buf2))) Memset(buf, int32(0), size) @@ -134,7 +134,7 @@ func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *struct__IO_FILE { f.c.size = size f.c.mode = int32(*mode) if !(plus != 0) { - f.f.flags = uint32(func() int32 { + f.f.Flags = uint32(func() int32 { if int32(*mode) == 'r' { return int32(8) } else { @@ -153,12 +153,12 @@ func Fmemopen(buf unsafe.Pointer, size uint64, mode *int8) *struct__IO_FILE { } else if plus != 0 { *f.c.buf = uint8(0) } - f.f.read = _cgos_mread_fmemopen - f.f.write = _cgos_mwrite_fmemopen - f.f.seek = _cgos_mseek_fmemopen - f.f.close = _cgos_mclose_fmemopen + f.f.Read = _cgos_mread_fmemopen + f.f.Write = _cgos_mwrite_fmemopen + f.f.Seek = _cgos_mseek_fmemopen + f.f.Close = _cgos_mclose_fmemopen if !(__libc.threaded != 0) { - f.f.lock = -1 + f.f.Lock = -1 } return __ofl_add(&f.f) } diff --git a/fopen.c.i.go b/fopen.c.i.go index 2848a52d..572782bf 100644 --- a/fopen.c.i.go +++ b/fopen.c.i.go @@ -2,18 +2,18 @@ package libc import unsafe "unsafe" -func Fopen(filename *int8, mode *int8) *struct__IO_FILE { - var f *struct__IO_FILE +func Fopen(filename *int8, mode *int8) *Struct__IO_FILE { + var f *Struct__IO_FILE var fd int32 var flags int32 if !(Strchr((*int8)(unsafe.Pointer(&[4]int8{'r', 'w', 'a', '\x00'})), int32(*mode)) != nil) { *__errno_location() = int32(22) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } flags = __fmodeflags(mode) fd = int32(__syscall3_r1(int64(5), int64(uintptr(unsafe.Pointer(filename))), int64(flags|int32(131072)), int64(438))) if fd < int32(0) { - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } if flags&int32(524288) != 0 { __syscall3(int64(92), int64(fd), int64(2), int64(1)) @@ -23,5 +23,5 @@ func Fopen(filename *int8, mode *int8) *struct__IO_FILE { return f } __syscall1(int64(6), int64(fd)) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } diff --git a/fopencookie.c.i.go b/fopencookie.c.i.go index fb19dad3..78604cad 100644 --- a/fopencookie.c.i.go +++ b/fopencookie.c.i.go @@ -4,39 +4,39 @@ import unsafe "unsafe" type _cgos_fcookie_fopencookie struct { cookie unsafe.Pointer - iofuncs struct__IO_cookie_io_functions_t + iofuncs Struct__IO_cookie_io_functions_t } type _cgos_cookie_FILE_fopencookie struct { - f struct__IO_FILE + f Struct__IO_FILE fc _cgos_fcookie_fopencookie buf [1032]uint8 } -func _cgos_cookieread_fopencookie(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.cookie) +func _cgos_cookieread_fopencookie(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.Cookie) var ret int64 = int64(-1) var remain uint64 = len var readlen uint64 = uint64(0) var len2 uint64 = len - func() uint64 { - if !!(f.buf_size != 0) { + if !!(f.Buf_size != 0) { return 1 } else { return 0 } }() - if !(fc.iofuncs.read != nil) { + if !(fc.iofuncs.Read != nil) { goto bail } if len2 != 0 { - ret = fc.iofuncs.read(fc.cookie, (*int8)(unsafe.Pointer(buf)), len2) + ret = fc.iofuncs.Read(fc.cookie, (*int8)(unsafe.Pointer(buf)), len2) if ret <= int64(0) { goto bail } readlen += uint64(ret) remain -= uint64(ret) } - if !(f.buf_size != 0) || remain > func() uint64 { - if !!(f.buf_size != 0) { + if !(f.Buf_size != 0) || remain > func() uint64 { + if !!(f.Buf_size != 0) { return 1 } else { return 0 @@ -44,108 +44,108 @@ func _cgos_cookieread_fopencookie(f *struct__IO_FILE, buf *uint8, len uint64) ui }() { return readlen } - f.rpos = f.buf - ret = fc.iofuncs.read(fc.cookie, (*int8)(unsafe.Pointer(f.rpos)), f.buf_size) + f.Rpos = f.Buf + ret = fc.iofuncs.Read(fc.cookie, (*int8)(unsafe.Pointer(f.Rpos)), f.Buf_size) if ret <= int64(0) { goto bail } - f.rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.rpos)) + uintptr(ret))) + f.Rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Rpos)) + uintptr(ret))) *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(func() (_cgo_ret uint64) { _cgo_addr := &readlen _cgo_ret = *_cgo_addr *_cgo_addr++ return }()))) = *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return }() return readlen bail: - f.flags |= uint32(func() int32 { + f.Flags |= uint32(func() int32 { if ret == int64(0) { return int32(16) } else { return int32(32) } }()) - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend - *_cgo_addr = f.buf + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend + *_cgo_addr = f.Buf return *_cgo_addr }() return readlen } -func _cgos_cookiewrite_fopencookie(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.cookie) +func _cgos_cookiewrite_fopencookie(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.Cookie) var ret int64 - var len2 uint64 = uint64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase))) - if !(fc.iofuncs.write != nil) { + var len2 uint64 = uint64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase))) + if !(fc.iofuncs.Write != nil) { return len } if len2 != 0 { - f.wpos = f.wbase - if _cgos_cookiewrite_fopencookie(f, f.wpos, len2) < len2 { + f.Wpos = f.Wbase + if _cgos_cookiewrite_fopencookie(f, f.Wpos, len2) < len2 { return uint64(0) } } - ret = fc.iofuncs.write(fc.cookie, (*int8)(unsafe.Pointer(buf)), len) + ret = fc.iofuncs.Write(fc.cookie, (*int8)(unsafe.Pointer(buf)), len) if ret < int64(0) { - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - f.flags |= uint32(32) + f.Flags |= uint32(32) return uint64(0) } return uint64(ret) } -func _cgos_cookieseek_fopencookie(f *struct__IO_FILE, off int64, whence int32) int64 { - var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.cookie) +func _cgos_cookieseek_fopencookie(f *Struct__IO_FILE, off int64, whence int32) int64 { + var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.Cookie) var res int32 if uint32(whence) > uint32(2) { *__errno_location() = int32(22) return int64(-1) } - if !(fc.iofuncs.seek != nil) { + if !(fc.iofuncs.Seek != nil) { *__errno_location() = int32(95) return int64(-1) } - res = fc.iofuncs.seek(fc.cookie, &off, whence) + res = fc.iofuncs.Seek(fc.cookie, &off, whence) if res < int32(0) { return int64(res) } return off } -func _cgos_cookieclose_fopencookie(f *struct__IO_FILE) int32 { - var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.cookie) - if fc.iofuncs.close != nil { - return fc.iofuncs.close(fc.cookie) +func _cgos_cookieclose_fopencookie(f *Struct__IO_FILE) int32 { + var fc *_cgos_fcookie_fopencookie = (*_cgos_fcookie_fopencookie)(f.Cookie) + if fc.iofuncs.Close != nil { + return fc.iofuncs.Close(fc.cookie) } return int32(0) } -func Fopencookie(cookie unsafe.Pointer, mode *int8, iofuncs struct__IO_cookie_io_functions_t) *struct__IO_FILE { +func Fopencookie(cookie unsafe.Pointer, mode *int8, iofuncs Struct__IO_cookie_io_functions_t) *Struct__IO_FILE { var f *_cgos_cookie_FILE_fopencookie if !(Strchr((*int8)(unsafe.Pointer(&[4]int8{'r', 'w', 'a', '\x00'})), int32(*mode)) != nil) { *__errno_location() = int32(22) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } if !(func() (_cgo_ret *_cgos_cookie_FILE_fopencookie) { _cgo_addr := &f *_cgo_addr = (*_cgos_cookie_FILE_fopencookie)(Malloc(1304)) return *_cgo_addr }() != nil) { - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } Memset(unsafe.Pointer(&f.f), int32(0), 232) if !(Strchr(mode, '+') != nil) { - f.f.flags = uint32(func() int32 { + f.f.Flags = uint32(func() int32 { if int32(*mode) == 'r' { return int32(8) } else { @@ -155,14 +155,14 @@ func Fopencookie(cookie unsafe.Pointer, mode *int8, iofuncs struct__IO_cookie_io } f.fc.cookie = cookie f.fc.iofuncs = iofuncs - f.f.fd = -1 - f.f.cookie = unsafe.Pointer(&f.fc) - f.f.buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&f.buf)))) + uintptr(int32(8)))) - f.f.buf_size = 1024 - f.f.lbf = -1 - f.f.read = _cgos_cookieread_fopencookie - f.f.write = _cgos_cookiewrite_fopencookie - f.f.seek = _cgos_cookieseek_fopencookie - f.f.close = _cgos_cookieclose_fopencookie + f.f.Fd = -1 + f.f.Cookie = unsafe.Pointer(&f.fc) + f.f.Buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&f.buf)))) + uintptr(int32(8)))) + f.f.Buf_size = 1024 + f.f.Lbf = -1 + f.f.Read = _cgos_cookieread_fopencookie + f.f.Write = _cgos_cookiewrite_fopencookie + f.f.Seek = _cgos_cookieseek_fopencookie + f.f.Close = _cgos_cookieclose_fopencookie return __ofl_add(&f.f) } diff --git a/forkpty.c.i.go b/forkpty.c.i.go index 24bba3c0..d715ead0 100644 --- a/forkpty.c.i.go +++ b/forkpty.c.i.go @@ -2,15 +2,15 @@ package libc import unsafe "unsafe" -func forkpty(pm *int32, name *int8, tio *struct_termios, ws *struct_winsize) int32 { +func forkpty(pm *int32, name *int8, tio *struct_termios, ws *Struct_winsize) int32 { var m int32 var s int32 var ec int32 = int32(0) var p [2]int32 var cs int32 var pid int32 = -1 - var set struct___sigset_t - var oldset struct___sigset_t + var set Struct___sigset_t + var oldset Struct___sigset_t if openpty(&m, &s, name, tio, ws) < int32(0) { return -1 } diff --git a/fprintf.c.i.go b/fprintf.c.i.go index fb4f721d..daafd3a6 100644 --- a/fprintf.c.i.go +++ b/fprintf.c.i.go @@ -1,6 +1,6 @@ package libc -func Fprintf(f *struct__IO_FILE, fmt *int8, __cgo_args ...interface { +func Fprintf(f *Struct__IO_FILE, fmt *int8, __cgo_args ...interface { }) int32 { var ret int32 var ap []interface { diff --git a/fputc.c.i.go b/fputc.c.i.go index 43b1b09e..d7815c20 100644 --- a/fputc.c.i.go +++ b/fputc.c.i.go @@ -1,5 +1,5 @@ package libc -func Fputc(c int32, f *struct__IO_FILE) int32 { +func Fputc(c int32, f *Struct__IO_FILE) int32 { return do_putc(c, f) } diff --git a/fputs.c.i.go b/fputs.c.i.go index d98af992..40f9a834 100644 --- a/fputs.c.i.go +++ b/fputs.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func Fputs(s *int8, f *struct__IO_FILE) int32 { +func Fputs(s *int8, f *Struct__IO_FILE) int32 { var l uint64 = Strlen(s) return func() int32 { if Fwrite(unsafe.Pointer(s), uint64(1), l, f) == l { diff --git a/fputwc.c.i.go b/fputwc.c.i.go index a29a8242..8bd22f53 100644 --- a/fputwc.c.i.go +++ b/fputwc.c.i.go @@ -2,15 +2,15 @@ package libc import unsafe "unsafe" -func __fputwc_unlocked(c uint32, f *struct__IO_FILE) uint32 { +func __fputwc_unlocked(c uint32, f *Struct__IO_FILE) uint32 { var mbc [4]int8 var l int32 - var ploc **struct___locale_struct = &__pthread_self().locale - var loc *struct___locale_struct = *ploc - if f.mode <= int32(0) { + var ploc **Struct___locale_struct = &__pthread_self().Locale + var loc *Struct___locale_struct = *ploc + if f.Mode <= int32(0) { fwide(f, int32(1)) } - *ploc = f.locale + *ploc = f.Locale if func() int32 { if int32(0) != 0 { return Isascii(int32(c)) @@ -25,10 +25,10 @@ func __fputwc_unlocked(c uint32, f *struct__IO_FILE) uint32 { } }() != 0 { c = uint32(func() int32 { - if int32(uint8(c)) != f.lbf && uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wend)) { + if int32(uint8(c)) != f.Lbf && uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wend)) { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &f.wpos + _cgo_addr := &f.Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -40,12 +40,12 @@ func __fputwc_unlocked(c uint32, f *struct__IO_FILE) uint32 { return __overflow(f, int32(uint8(c))) } }()) - } else if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.wpos))+uintptr(int32(4)))))) < uintptr(unsafe.Pointer(f.wend)) { - l = Wctomb((*int8)(unsafe.Pointer(f.wpos)), c) + } else if uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Wpos))+uintptr(int32(4)))))) < uintptr(unsafe.Pointer(f.Wend)) { + l = Wctomb((*int8)(unsafe.Pointer(f.Wpos)), c) if l < int32(0) { c = uint32(4294967295) } else { - *(*uintptr)(unsafe.Pointer(&f.wpos)) += uintptr(l) + *(*uintptr)(unsafe.Pointer(&f.Wpos)) += uintptr(l) } } else { l = Wctomb((*int8)(unsafe.Pointer(&mbc)), c) @@ -54,14 +54,14 @@ func __fputwc_unlocked(c uint32, f *struct__IO_FILE) uint32 { } } if c == uint32(4294967295) { - f.flags |= uint32(32) + f.Flags |= uint32(32) } *ploc = loc return c } -func fputwc(c uint32, f *struct__IO_FILE) uint32 { +func fputwc(c uint32, f *Struct__IO_FILE) uint32 { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) diff --git a/fputws.c.i.go b/fputws.c.i.go index 86e7fc9a..d42eb64a 100644 --- a/fputws.c.i.go +++ b/fputws.c.i.go @@ -2,20 +2,20 @@ package libc import unsafe "unsafe" -func fputws(ws *uint32, f *struct__IO_FILE) int32 { +func fputws(ws *uint32, f *Struct__IO_FILE) int32 { var buf [1024]uint8 var l uint64 = uint64(0) - var ploc **struct___locale_struct = &__pthread_self().locale - var loc *struct___locale_struct = *ploc + var ploc **Struct___locale_struct = &__pthread_self().Locale + var loc *Struct___locale_struct = *ploc var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() fwide(f, int32(1)) - *ploc = f.locale + *ploc = f.Locale for ws != nil && func() (_cgo_ret uint64) { _cgo_addr := &l *_cgo_addr = wcsrtombs((*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&buf)))), (**uint32)(unsafe.Pointer(&ws)), 1024, nil) diff --git a/fread.c.i.go b/fread.c.i.go index 5f732350..e08ddea3 100644 --- a/fread.c.i.go +++ b/fread.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func Fread(destv unsafe.Pointer, size uint64, nmemb uint64, f *struct__IO_FILE) uint64 { +func Fread(destv unsafe.Pointer, size uint64, nmemb uint64, f *Struct__IO_FILE) uint64 { var dest *uint8 = (*uint8)(destv) var len uint64 = size * nmemb var l uint64 = len @@ -11,23 +11,23 @@ func Fread(destv unsafe.Pointer, size uint64, nmemb uint64, f *struct__IO_FILE) nmemb = uint64(0) } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - f.mode |= f.mode - int32(1) - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + f.Mode |= f.Mode - int32(1) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { k = func() uint64 { - if uint64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))) < l { - return uint64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) + if uint64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))) < l { + return uint64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) } else { return l } }() - Memcpy(unsafe.Pointer(dest), unsafe.Pointer(f.rpos), k) - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(k) + Memcpy(unsafe.Pointer(dest), unsafe.Pointer(f.Rpos), k) + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(k) *(*uintptr)(unsafe.Pointer(&dest)) += uintptr(k) l -= k } @@ -43,7 +43,7 @@ func Fread(destv unsafe.Pointer, size uint64, nmemb uint64, f *struct__IO_FILE) if __toread(f) != 0 { return uint64(0) } else { - return f.read(f, dest, l) + return f.Read(f, dest, l) } }() if !(k != 0) { diff --git a/fscanf.c.i.go b/fscanf.c.i.go index 0c1bb8a6..5973ac27 100644 --- a/fscanf.c.i.go +++ b/fscanf.c.i.go @@ -1,6 +1,6 @@ package libc -func Fscanf(f *struct__IO_FILE, fmt *int8, __cgo_args ...interface { +func Fscanf(f *Struct__IO_FILE, fmt *int8, __cgo_args ...interface { }) int32 { var ret int32 var ap []interface { diff --git a/fseek.c.i.go b/fseek.c.i.go index 96177d7d..7efe94e3 100644 --- a/fseek.c.i.go +++ b/fseek.c.i.go @@ -2,40 +2,40 @@ package libc import unsafe "unsafe" -func __fseeko_unlocked(f *struct__IO_FILE, off int64, whence int32) int32 { - if whence == int32(1) && f.rend != nil { - off -= int64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) +func __fseeko_unlocked(f *Struct__IO_FILE, off int64, whence int32) int32 { + if whence == int32(1) && f.Rend != nil { + off -= int64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) } - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { - f.write(f, nil, uint64(0)) - if !(f.wpos != nil) { + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { + f.Write(f, nil, uint64(0)) + if !(f.Wpos != nil) { return -1 } } - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - if f.seek(f, off, whence) < int64(0) { + if f.Seek(f, off, whence) < int64(0) { return -1 } - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() - f.flags &= uint32(4294967279) + f.Flags &= uint32(4294967279) return int32(0) } -func __fseeko(f *struct__IO_FILE, off int64, whence int32) int32 { +func __fseeko(f *Struct__IO_FILE, off int64, whence int32) int32 { var result int32 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) @@ -52,6 +52,6 @@ func __fseeko(f *struct__IO_FILE, off int64, whence int32) int32 { } return result } -func Fseek(f *struct__IO_FILE, off int64, whence int32) int32 { +func Fseek(f *Struct__IO_FILE, off int64, whence int32) int32 { return __fseeko(f, int64(off), whence) } diff --git a/fsetpos.c.i.go b/fsetpos.c.i.go index d8b1ac40..6645e6e4 100644 --- a/fsetpos.c.i.go +++ b/fsetpos.c.i.go @@ -2,6 +2,6 @@ package libc import unsafe "unsafe" -func Fsetpos(f *struct__IO_FILE, pos *union__G_fpos64_t) int32 { +func Fsetpos(f *Struct__IO_FILE, pos *Union__G_fpos64_t) int32 { return __fseeko(f, *(*int64)(unsafe.Pointer(pos)), int32(0)) } diff --git a/ftell.c.i.go b/ftell.c.i.go index 89fec03d..325c0cff 100644 --- a/ftell.c.i.go +++ b/ftell.c.i.go @@ -2,9 +2,9 @@ package libc import unsafe "unsafe" -func __ftello_unlocked(f *struct__IO_FILE) int64 { - var pos int64 = f.seek(f, int64(0), func() int32 { - if f.flags&uint32(128) != 0 && uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { +func __ftello_unlocked(f *Struct__IO_FILE) int64 { + var pos int64 = f.Seek(f, int64(0), func() int32 { + if f.Flags&uint32(128) != 0 && uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { return int32(2) } else { return int32(1) @@ -13,17 +13,17 @@ func __ftello_unlocked(f *struct__IO_FILE) int64 { if pos < int64(0) { return pos } - if f.rend != nil { - pos += int64(uintptr(unsafe.Pointer(f.rpos)) - uintptr(unsafe.Pointer(f.rend))) - } else if f.wbase != nil { - pos += int64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase))) + if f.Rend != nil { + pos += int64(uintptr(unsafe.Pointer(f.Rpos)) - uintptr(unsafe.Pointer(f.Rend))) + } else if f.Wbase != nil { + pos += int64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase))) } return pos } -func __ftello(f *struct__IO_FILE) int64 { +func __ftello(f *Struct__IO_FILE) int64 { var pos int64 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) @@ -40,7 +40,7 @@ func __ftello(f *struct__IO_FILE) int64 { } return pos } -func Ftell(f *struct__IO_FILE) int64 { +func Ftell(f *Struct__IO_FILE) int64 { var pos int64 = __ftello(f) if pos > int64(2147483647) { *__errno_location() = int32(75) diff --git a/funlockfile.c.i.go b/funlockfile.c.i.go index bb2cef35..558c4e14 100644 --- a/funlockfile.c.i.go +++ b/funlockfile.c.i.go @@ -1,11 +1,11 @@ package libc -func Funlockfile(f *struct__IO_FILE) { - if f.lockcount == int64(1) { +func Funlockfile(f *Struct__IO_FILE) { + if f.Lockcount == int64(1) { __unlist_locked_file(f) - f.lockcount = int64(0) + f.Lockcount = int64(0) __unlockfile(f) } else { - f.lockcount-- + f.Lockcount-- } } diff --git a/fwide.c.i.go b/fwide.c.i.go index 63d13f58..ba5b5cfb 100644 --- a/fwide.c.i.go +++ b/fwide.c.i.go @@ -2,32 +2,32 @@ package libc import unsafe "unsafe" -func fwide(f *struct__IO_FILE, mode int32) int32 { +func fwide(f *Struct__IO_FILE, mode int32) int32 { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() if mode != 0 { - if !(f.locale != nil) { - f.locale = func() *struct___locale_struct { + if !(f.Locale != nil) { + f.Locale = func() *Struct___locale_struct { if func() int32 { - if !!(*(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().locale.cat)))) + uintptr(int32(0))*8)) != nil) { + if !!(*(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().Locale.Cat)))) + uintptr(int32(0))*8)) != nil) { return int32(4) } else { return int32(1) } }() == int32(1) { - return (*struct___locale_struct)(unsafe.Pointer(&__c_locale)) + return (*Struct___locale_struct)(unsafe.Pointer(&__c_locale)) } else { - return (*struct___locale_struct)(unsafe.Pointer(&__c_dot_utf8_locale)) + return (*Struct___locale_struct)(unsafe.Pointer(&__c_dot_utf8_locale)) } }() } - if !(f.mode != 0) { - f.mode = func() int32 { + if !(f.Mode != 0) { + f.Mode = func() int32 { if mode > int32(0) { return int32(1) } else { @@ -36,7 +36,7 @@ func fwide(f *struct__IO_FILE, mode int32) int32 { }() } } - mode = f.mode + mode = f.Mode for { if __need_unlock != 0 { __unlockfile(f) diff --git a/fwprintf.c.i.go b/fwprintf.c.i.go index 4462bad7..7f1e9f7c 100644 --- a/fwprintf.c.i.go +++ b/fwprintf.c.i.go @@ -1,6 +1,6 @@ package libc -func fwprintf(f *struct__IO_FILE, fmt *uint32, __cgo_args ...interface { +func fwprintf(f *Struct__IO_FILE, fmt *uint32, __cgo_args ...interface { }) int32 { var ret int32 var ap []interface { diff --git a/fwrite.c.i.go b/fwrite.c.i.go index 43577c0e..c380710f 100644 --- a/fwrite.c.i.go +++ b/fwrite.c.i.go @@ -2,19 +2,19 @@ package libc import unsafe "unsafe" -func __fwritex(s *uint8, l uint64, f *struct__IO_FILE) uint64 { +func __fwritex(s *uint8, l uint64, f *Struct__IO_FILE) uint64 { var i uint64 = uint64(0) - if !(f.wend != nil) && __towrite(f) != 0 { + if !(f.Wend != nil) && __towrite(f) != 0 { return uint64(0) } - if l > uint64(uintptr(unsafe.Pointer(f.wend))-uintptr(unsafe.Pointer(f.wpos))) { - return f.write(f, s, l) + if l > uint64(uintptr(unsafe.Pointer(f.Wend))-uintptr(unsafe.Pointer(f.Wpos))) { + return f.Write(f, s, l) } - if f.lbf >= int32(0) { + if f.Lbf >= int32(0) { for i = l; i != 0 && int32(*(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(s)) + uintptr(i-uint64(1))))) != '\n'; i-- { } if i != 0 { - var n uint64 = f.write(f, s, i) + var n uint64 = f.Write(f, s, i) if n < i { return n } @@ -22,18 +22,18 @@ func __fwritex(s *uint8, l uint64, f *struct__IO_FILE) uint64 { l -= i } } - Memcpy(unsafe.Pointer(f.wpos), unsafe.Pointer(s), l) - *(*uintptr)(unsafe.Pointer(&f.wpos)) += uintptr(l) + Memcpy(unsafe.Pointer(f.Wpos), unsafe.Pointer(s), l) + *(*uintptr)(unsafe.Pointer(&f.Wpos)) += uintptr(l) return l + i } -func Fwrite(src unsafe.Pointer, size uint64, nmemb uint64, f *struct__IO_FILE) uint64 { +func Fwrite(src unsafe.Pointer, size uint64, nmemb uint64, f *Struct__IO_FILE) uint64 { var k uint64 var l uint64 = size * nmemb if !(size != 0) { nmemb = uint64(0) } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) diff --git a/fwscanf.c.i.go b/fwscanf.c.i.go index 195a3202..94e9468c 100644 --- a/fwscanf.c.i.go +++ b/fwscanf.c.i.go @@ -1,6 +1,6 @@ package libc -func fwscanf(f *struct__IO_FILE, fmt *uint32, __cgo_args ...interface { +func fwscanf(f *Struct__IO_FILE, fmt *uint32, __cgo_args ...interface { }) int32 { var ret int32 var ap []interface { diff --git a/getc.c.i.go b/getc.c.i.go index 9416e8e5..fd9954b9 100644 --- a/getc.c.i.go +++ b/getc.c.i.go @@ -1,5 +1,5 @@ package libc -func Getc(f *struct__IO_FILE) int32 { +func Getc(f *Struct__IO_FILE) int32 { return do_getc(f) } diff --git a/getc_unlocked.c.i.go b/getc_unlocked.c.i.go index 60a9c7c4..670df853 100644 --- a/getc_unlocked.c.i.go +++ b/getc_unlocked.c.i.go @@ -2,11 +2,11 @@ package libc import unsafe "unsafe" -func Getc_unlocked(f *struct__IO_FILE) int32 { +func Getc_unlocked(f *Struct__IO_FILE) int32 { return func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return diff --git a/getchar_unlocked.c.i.go b/getchar_unlocked.c.i.go index 109b809b..50bd205f 100644 --- a/getchar_unlocked.c.i.go +++ b/getchar_unlocked.c.i.go @@ -4,9 +4,9 @@ import unsafe "unsafe" func Getchar_unlocked() int32 { return func() int32 { - if uintptr(unsafe.Pointer((&__stdin_FILE).rpos)) != uintptr(unsafe.Pointer((&__stdin_FILE).rend)) { + if uintptr(unsafe.Pointer((&__stdin_FILE).Rpos)) != uintptr(unsafe.Pointer((&__stdin_FILE).Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &(&__stdin_FILE).rpos + _cgo_addr := &(&__stdin_FILE).Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return diff --git a/getdelim.c.i.go b/getdelim.c.i.go index 26058353..2f7fbb55 100644 --- a/getdelim.c.i.go +++ b/getdelim.c.i.go @@ -2,22 +2,22 @@ package libc import unsafe "unsafe" -func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { +func Getdelim(s **int8, n *uint64, delim int32, f *Struct__IO_FILE) int64 { var tmp *int8 var z *uint8 var k uint64 var i uint64 = uint64(0) var c int32 var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() if !(n != nil) || !(s != nil) { - f.mode |= f.mode - int32(1) - f.flags |= uint32(32) + f.Mode |= f.Mode - int32(1) + f.Flags |= uint32(32) for { if __need_unlock != 0 { __unlockfile(f) @@ -33,13 +33,13 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { *n = uint64(0) } for { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { - z = (*uint8)(Memchr(unsafe.Pointer(f.rpos), delim, uint64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))))) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { + z = (*uint8)(Memchr(unsafe.Pointer(f.Rpos), delim, uint64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))))) k = uint64(func() int64 { if z != nil { - return int64(uintptr(unsafe.Pointer(z)) - uintptr(unsafe.Pointer(f.rpos)) + uintptr(int64(1))) + return int64(uintptr(unsafe.Pointer(z)) - uintptr(unsafe.Pointer(f.Rpos)) + uintptr(int64(1))) } else { - return int64(uintptr(unsafe.Pointer(f.rend)) - uintptr(unsafe.Pointer(f.rpos))) + return int64(uintptr(unsafe.Pointer(f.Rend)) - uintptr(unsafe.Pointer(f.Rpos))) } }()) } else { @@ -57,10 +57,10 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { tmp = (*int8)(Realloc(unsafe.Pointer(*s), m)) if !(tmp != nil) { k = *n - i - Memcpy(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(*s))+uintptr(i)))), unsafe.Pointer(f.rpos), k) - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(k) - f.mode |= f.mode - int32(1) - f.flags |= uint32(32) + Memcpy(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(*s))+uintptr(i)))), unsafe.Pointer(f.Rpos), k) + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(k) + f.Mode |= f.Mode - int32(1) + f.Flags |= uint32(32) for { if __need_unlock != 0 { __unlockfile(f) @@ -76,8 +76,8 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { *s = tmp *n = m } - Memcpy(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(*s))+uintptr(i)))), unsafe.Pointer(f.rpos), k) - *(*uintptr)(unsafe.Pointer(&f.rpos)) += uintptr(k) + Memcpy(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(*s))+uintptr(i)))), unsafe.Pointer(f.Rpos), k) + *(*uintptr)(unsafe.Pointer(&f.Rpos)) += uintptr(k) i += k if z != nil { break @@ -85,9 +85,9 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { if func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = func() int32 { - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -98,7 +98,7 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { }() return *_cgo_addr }() == -1 { - if !(i != 0) || !(f.flags&uint32(16) != 0) { + if !(i != 0) || !(f.Flags&uint32(16) != 0) { for { if __need_unlock != 0 { __unlockfile(f) @@ -113,7 +113,7 @@ func Getdelim(s **int8, n *uint64, delim int32, f *struct__IO_FILE) int64 { } if i+uint64(1) >= *n { *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return *_cgo_addr }() = uint8(c) diff --git a/getline.c.i.go b/getline.c.i.go index c2971c4a..9518cfab 100644 --- a/getline.c.i.go +++ b/getline.c.i.go @@ -1,5 +1,5 @@ package libc -func Getline(s **int8, n *uint64, f *struct__IO_FILE) int64 { +func Getline(s **int8, n *uint64, f *Struct__IO_FILE) int64 { return Getdelim(s, n, '\n', f) } diff --git a/getopt.c.i.go b/getopt.c.i.go index 58f19bbc..c477d629 100644 --- a/getopt.c.i.go +++ b/getopt.c.i.go @@ -10,10 +10,10 @@ var __optpos int32 var __optreset int32 = int32(0) func __getopt_msg(a *int8, b *int8, c *int8, l uint64) { - var f *struct__IO_FILE = &__stderr_FILE + var f *Struct__IO_FILE = &__stderr_FILE b = __lctrans_cur(b) var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) diff --git a/getrusage.c.i.go b/getrusage.c.i.go index 18d73895..83169d32 100644 --- a/getrusage.c.i.go +++ b/getrusage.c.i.go @@ -9,8 +9,8 @@ func getrusage(who int32, ru *struct_rusage) int32 { if !(r != 0) && false { var kru [4]int64 Memcpy(unsafe.Pointer((*int64)(unsafe.Pointer(&kru))), unsafe.Pointer(dest), 32) - ru.ru_utime = struct_timeval{int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(0))*8))), int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(1))*8)))} - ru.ru_stime = struct_timeval{int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(2))*8))), int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(3))*8)))} + ru.ru_utime = Struct_timeval{int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(0))*8))), int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(1))*8)))} + ru.ru_stime = Struct_timeval{int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(2))*8))), int64(*(*int64)(unsafe.Pointer(uintptr(unsafe.Pointer((*int64)(unsafe.Pointer(&kru)))) + uintptr(int32(3))*8)))} } return int32(__syscall_ret(uint64(r))) } diff --git a/gets.c.i.go b/gets.c.i.go index 363909d3..f3aeca44 100644 --- a/gets.c.i.go +++ b/gets.c.i.go @@ -6,7 +6,7 @@ func gets(s *int8) *int8 { var i uint64 = uint64(0) var c int32 var __need_unlock int32 = func() int32 { - if (&__stdin_FILE).lock >= int32(0) { + if (&__stdin_FILE).Lock >= int32(0) { return __lockfile(&__stdin_FILE) } else { return int32(0) @@ -15,9 +15,9 @@ func gets(s *int8) *int8 { for func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = func() int32 { - if uintptr(unsafe.Pointer((&__stdin_FILE).rpos)) != uintptr(unsafe.Pointer((&__stdin_FILE).rend)) { + if uintptr(unsafe.Pointer((&__stdin_FILE).Rpos)) != uintptr(unsafe.Pointer((&__stdin_FILE).Rend)) { return int32(*func() (_cgo_ret *uint8) { - _cgo_addr := &(&__stdin_FILE).rpos + _cgo_addr := &(&__stdin_FILE).Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -36,7 +36,7 @@ func gets(s *int8) *int8 { }()))) = int8(c) } *(*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(s)) + uintptr(i))) = int8(0) - if c != '\n' && (!((&__stdin_FILE).flags&uint32(16) != 0) || !(i != 0)) { + if c != '\n' && (!((&__stdin_FILE).Flags&uint32(16) != 0) || !(i != 0)) { s = (*int8)(nil) } for { diff --git a/getw.c.i.go b/getw.c.i.go index d4b6d38f..ff95d8da 100644 --- a/getw.c.i.go +++ b/getw.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func Getw(f *struct__IO_FILE) int32 { +func Getw(f *Struct__IO_FILE) int32 { var x int32 return func() int32 { if Fread(unsafe.Pointer(&x), 4, uint64(1), f) != 0 { diff --git a/getwc.c.i.go b/getwc.c.i.go index 59eab351..6151cb0f 100644 --- a/getwc.c.i.go +++ b/getwc.c.i.go @@ -1,5 +1,5 @@ package libc -func getwc(f *struct__IO_FILE) uint32 { +func getwc(f *Struct__IO_FILE) uint32 { return fgetwc(f) } diff --git a/isalnum.c.i.go b/isalnum.c.i.go index 04e7d249..fca100d6 100644 --- a/isalnum.c.i.go +++ b/isalnum.c.i.go @@ -33,6 +33,6 @@ func Isalnum(c int32) int32 { } }() } -func __isalnum_l(c int32, l *struct___locale_struct) int32 { +func __isalnum_l(c int32, l *Struct___locale_struct) int32 { return Isalnum(c) } diff --git a/isalpha.c.i.go b/isalpha.c.i.go index 33abf748..e7d1e266 100644 --- a/isalpha.c.i.go +++ b/isalpha.c.i.go @@ -9,6 +9,6 @@ func Isalpha(c int32) int32 { } }() } -func __isalpha_l(c int32, l *struct___locale_struct) int32 { +func __isalpha_l(c int32, l *Struct___locale_struct) int32 { return Isalpha(c) } diff --git a/isblank.c.i.go b/isblank.c.i.go index 54cc5481..6560f5fe 100644 --- a/isblank.c.i.go +++ b/isblank.c.i.go @@ -9,6 +9,6 @@ func Isblank(c int32) int32 { } }() } -func __isblank_l(c int32, l *struct___locale_struct) int32 { +func __isblank_l(c int32, l *Struct___locale_struct) int32 { return Isblank(c) } diff --git a/iscntrl.c.i.go b/iscntrl.c.i.go index a9a25a04..cde49956 100644 --- a/iscntrl.c.i.go +++ b/iscntrl.c.i.go @@ -9,6 +9,6 @@ func Iscntrl(c int32) int32 { } }() } -func __iscntrl_l(c int32, l *struct___locale_struct) int32 { +func __iscntrl_l(c int32, l *Struct___locale_struct) int32 { return Iscntrl(c) } diff --git a/isdigit.c.i.go b/isdigit.c.i.go index c45dad34..7e1a47a8 100644 --- a/isdigit.c.i.go +++ b/isdigit.c.i.go @@ -9,6 +9,6 @@ func Isdigit(c int32) int32 { } }() } -func __isdigit_l(c int32, l *struct___locale_struct) int32 { +func __isdigit_l(c int32, l *Struct___locale_struct) int32 { return Isdigit(c) } diff --git a/isgraph.c.i.go b/isgraph.c.i.go index d80c5df0..dd414d59 100644 --- a/isgraph.c.i.go +++ b/isgraph.c.i.go @@ -9,6 +9,6 @@ func Isgraph(c int32) int32 { } }() } -func __isgraph_l(c int32, l *struct___locale_struct) int32 { +func __isgraph_l(c int32, l *Struct___locale_struct) int32 { return Isgraph(c) } diff --git a/islower.c.i.go b/islower.c.i.go index ac068a58..7041fc3b 100644 --- a/islower.c.i.go +++ b/islower.c.i.go @@ -9,6 +9,6 @@ func Islower(c int32) int32 { } }() } -func __islower_l(c int32, l *struct___locale_struct) int32 { +func __islower_l(c int32, l *Struct___locale_struct) int32 { return Islower(c) } diff --git a/isprint.c.i.go b/isprint.c.i.go index e1250676..05a7e076 100644 --- a/isprint.c.i.go +++ b/isprint.c.i.go @@ -9,6 +9,6 @@ func Isprint(c int32) int32 { } }() } -func __isprint_l(c int32, l *struct___locale_struct) int32 { +func __isprint_l(c int32, l *Struct___locale_struct) int32 { return Isprint(c) } diff --git a/ispunct.c.i.go b/ispunct.c.i.go index 6e7d0511..9ae46090 100644 --- a/ispunct.c.i.go +++ b/ispunct.c.i.go @@ -21,6 +21,6 @@ func Ispunct(c int32) int32 { } }() } -func __ispunct_l(c int32, l *struct___locale_struct) int32 { +func __ispunct_l(c int32, l *Struct___locale_struct) int32 { return Ispunct(c) } diff --git a/isspace.c.i.go b/isspace.c.i.go index eb1be65b..4a2e8e6a 100644 --- a/isspace.c.i.go +++ b/isspace.c.i.go @@ -9,6 +9,6 @@ func Isspace(c int32) int32 { } }() } -func __isspace_l(c int32, l *struct___locale_struct) int32 { +func __isspace_l(c int32, l *Struct___locale_struct) int32 { return Isspace(c) } diff --git a/isupper.c.i.go b/isupper.c.i.go index 06af5368..64a5ff5f 100644 --- a/isupper.c.i.go +++ b/isupper.c.i.go @@ -9,6 +9,6 @@ func Isupper(c int32) int32 { } }() } -func __isupper_l(c int32, l *struct___locale_struct) int32 { +func __isupper_l(c int32, l *Struct___locale_struct) int32 { return Isupper(c) } diff --git a/iswalnum.c.i.go b/iswalnum.c.i.go index d2304a30..53eee46a 100644 --- a/iswalnum.c.i.go +++ b/iswalnum.c.i.go @@ -21,6 +21,6 @@ func iswalnum(wc uint32) int32 { } }() } -func __iswalnum_l(c uint32, l *struct___locale_struct) int32 { +func __iswalnum_l(c uint32, l *Struct___locale_struct) int32 { return iswalnum(c) } diff --git a/iswalpha.c.i.go b/iswalpha.c.i.go index e0b7667f..0c5c74e3 100644 --- a/iswalpha.c.i.go +++ b/iswalpha.c.i.go @@ -13,6 +13,6 @@ func iswalpha(wc uint32) int32 { } return int32(0) } -func __iswalpha_l(c uint32, l *struct___locale_struct) int32 { +func __iswalpha_l(c uint32, l *Struct___locale_struct) int32 { return iswalpha(c) } diff --git a/iswblank.c.i.go b/iswblank.c.i.go index c3854c12..8b21eb21 100644 --- a/iswblank.c.i.go +++ b/iswblank.c.i.go @@ -3,6 +3,6 @@ package libc func iswblank(wc uint32) int32 { return Isblank(int32(wc)) } -func __iswblank_l(c uint32, l *struct___locale_struct) int32 { +func __iswblank_l(c uint32, l *Struct___locale_struct) int32 { return iswblank(c) } diff --git a/iswcntrl.c.i.go b/iswcntrl.c.i.go index 4fb5cc8b..c3ea7c8c 100644 --- a/iswcntrl.c.i.go +++ b/iswcntrl.c.i.go @@ -9,6 +9,6 @@ func iswcntrl(wc uint32) int32 { } }() } -func __iswcntrl_l(c uint32, l *struct___locale_struct) int32 { +func __iswcntrl_l(c uint32, l *Struct___locale_struct) int32 { return iswcntrl(c) } diff --git a/iswctype.c.i.go b/iswctype.c.i.go index 04125be0..b6d49afe 100644 --- a/iswctype.c.i.go +++ b/iswctype.c.i.go @@ -70,9 +70,9 @@ func wctype(s *int8) uint64 { var _cgos_names_iswctype [73]int8 = [73]int8{'a', 'l', 'n', 'u', 'm', '\x00', 'a', 'l', 'p', 'h', 'a', '\x00', 'b', 'l', 'a', 'n', 'k', '\x00', 'c', 'n', 't', 'r', 'l', '\x00', 'd', 'i', 'g', 'i', 't', '\x00', 'g', 'r', 'a', 'p', 'h', '\x00', 'l', 'o', 'w', 'e', 'r', '\x00', 'p', 'r', 'i', 'n', 't', '\x00', 'p', 'u', 'n', 'c', 't', '\x00', 's', 'p', 'a', 'c', 'e', '\x00', 'u', 'p', 'p', 'e', 'r', '\x00', 'x', 'd', 'i', 'g', 'i', 't', '\x00'} -func __iswctype_l(c uint32, t uint64, l *struct___locale_struct) int32 { +func __iswctype_l(c uint32, t uint64, l *Struct___locale_struct) int32 { return iswctype(c, t) } -func __wctype_l(s *int8, l *struct___locale_struct) uint64 { +func __wctype_l(s *int8, l *Struct___locale_struct) uint64 { return wctype(s) } diff --git a/iswdigit.c.i.go b/iswdigit.c.i.go index fb0fd65d..45e5048d 100644 --- a/iswdigit.c.i.go +++ b/iswdigit.c.i.go @@ -9,6 +9,6 @@ func iswdigit(wc uint32) int32 { } }() } -func __iswdigit_l(c uint32, l *struct___locale_struct) int32 { +func __iswdigit_l(c uint32, l *Struct___locale_struct) int32 { return iswdigit(c) } diff --git a/iswgraph.c.i.go b/iswgraph.c.i.go index 1fa056b5..1735c3c6 100644 --- a/iswgraph.c.i.go +++ b/iswgraph.c.i.go @@ -9,6 +9,6 @@ func iswgraph(wc uint32) int32 { } }() } -func __iswgraph_l(c uint32, l *struct___locale_struct) int32 { +func __iswgraph_l(c uint32, l *Struct___locale_struct) int32 { return iswgraph(c) } diff --git a/iswlower.c.i.go b/iswlower.c.i.go index 2a5cfacb..fe1d90f3 100644 --- a/iswlower.c.i.go +++ b/iswlower.c.i.go @@ -9,6 +9,6 @@ func iswlower(wc uint32) int32 { } }() } -func __iswlower_l(c uint32, l *struct___locale_struct) int32 { +func __iswlower_l(c uint32, l *Struct___locale_struct) int32 { return iswlower(c) } diff --git a/iswprint.c.i.go b/iswprint.c.i.go index 07f937ec..92d4fc83 100644 --- a/iswprint.c.i.go +++ b/iswprint.c.i.go @@ -18,6 +18,6 @@ func iswprint(wc uint32) int32 { } return int32(1) } -func __iswprint_l(c uint32, l *struct___locale_struct) int32 { +func __iswprint_l(c uint32, l *Struct___locale_struct) int32 { return iswprint(c) } diff --git a/iswpunct.c.i.go b/iswpunct.c.i.go index ae1fa50d..a6db56c9 100644 --- a/iswpunct.c.i.go +++ b/iswpunct.c.i.go @@ -10,6 +10,6 @@ func iswpunct(wc uint32) int32 { } return int32(0) } -func __iswpunct_l(c uint32, l *struct___locale_struct) int32 { +func __iswpunct_l(c uint32, l *Struct___locale_struct) int32 { return iswpunct(c) } diff --git a/iswspace.c.i.go b/iswspace.c.i.go index d0accbd6..aea4d34f 100644 --- a/iswspace.c.i.go +++ b/iswspace.c.i.go @@ -14,6 +14,6 @@ func iswspace(wc uint32) int32 { var _cgos_spaces_iswspace [22]uint32 = [22]uint32{uint32(' '), uint32('\t'), uint32('\n'), uint32('\r'), uint32(11), uint32(12), uint32(133), uint32(8192), uint32(8193), uint32(8194), uint32(8195), uint32(8196), uint32(8197), uint32(8198), uint32(8200), uint32(8201), uint32(8202), uint32(8232), uint32(8233), uint32(8287), uint32(12288), uint32(0)} -func __iswspace_l(c uint32, l *struct___locale_struct) int32 { +func __iswspace_l(c uint32, l *Struct___locale_struct) int32 { return iswspace(c) } diff --git a/iswupper.c.i.go b/iswupper.c.i.go index b23b7a51..8b5dbb99 100644 --- a/iswupper.c.i.go +++ b/iswupper.c.i.go @@ -9,6 +9,6 @@ func iswupper(wc uint32) int32 { } }() } -func __iswupper_l(c uint32, l *struct___locale_struct) int32 { +func __iswupper_l(c uint32, l *Struct___locale_struct) int32 { return iswupper(c) } diff --git a/iswxdigit.c.i.go b/iswxdigit.c.i.go index 93f1fafc..7125209d 100644 --- a/iswxdigit.c.i.go +++ b/iswxdigit.c.i.go @@ -9,6 +9,6 @@ func iswxdigit(wc uint32) int32 { } }() } -func __iswxdigit_l(c uint32, l *struct___locale_struct) int32 { +func __iswxdigit_l(c uint32, l *Struct___locale_struct) int32 { return iswxdigit(c) } diff --git a/isxdigit.c.i.go b/isxdigit.c.i.go index 281b1309..24330f61 100644 --- a/isxdigit.c.i.go +++ b/isxdigit.c.i.go @@ -21,6 +21,6 @@ func Isxdigit(c int32) int32 { } }() } -func __isxdigit_l(c int32, l *struct___locale_struct) int32 { +func __isxdigit_l(c int32, l *Struct___locale_struct) int32 { return Isxdigit(c) } diff --git a/mntent.c.i.go b/mntent.c.i.go index fcef42d9..32a65008 100644 --- a/mntent.c.i.go +++ b/mntent.c.i.go @@ -5,16 +5,16 @@ import unsafe "unsafe" var _cgos_internal_buf_mntent *int8 var _cgos_internal_bufsize_mntent uint64 -func setmntent(name *int8, mode *int8) *struct__IO_FILE { +func setmntent(name *int8, mode *int8) *Struct__IO_FILE { return Fopen(name, mode) } -func endmntent(f *struct__IO_FILE) int32 { +func endmntent(f *Struct__IO_FILE) int32 { if f != nil { Fclose(f) } return int32(1) } -func getmntent_r(f *struct__IO_FILE, mnt *struct_mntent, linebuf *int8, buflen int32) *struct_mntent { +func getmntent_r(f *Struct__IO_FILE, mnt *struct_mntent, linebuf *int8, buflen int32) *struct_mntent { var cnt int32 var n [8]int32 var use_internal int32 = func() int32 { @@ -56,13 +56,13 @@ func getmntent_r(f *struct__IO_FILE, mnt *struct_mntent, linebuf *int8, buflen i mnt.mnt_opts = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(linebuf)) + uintptr(*(*int32)(unsafe.Pointer(uintptr(unsafe.Pointer((*int32)(unsafe.Pointer(&n)))) + uintptr(int32(6))*4))))) return mnt } -func getmntent(f *struct__IO_FILE) *struct_mntent { +func getmntent(f *Struct__IO_FILE) *struct_mntent { return getmntent_r(f, &_cgos_mnt_mntent, (*int8)(unsafe.Pointer(&_cgos_internal_buf_mntent)), int32(0)) } var _cgos_mnt_mntent struct_mntent -func addmntent(f *struct__IO_FILE, mnt *struct_mntent) int32 { +func addmntent(f *Struct__IO_FILE, mnt *struct_mntent) int32 { if Fseek(f, int64(0), int32(2)) != 0 { return int32(1) } diff --git a/ofl.c.i.go b/ofl.c.i.go index 090cdb7e..bb51855f 100644 --- a/ofl.c.i.go +++ b/ofl.c.i.go @@ -2,11 +2,11 @@ package libc import unsafe "unsafe" -var _cgos_ofl_head_ofl *struct__IO_FILE +var _cgos_ofl_head_ofl *Struct__IO_FILE var _cgos_ofl_lock_ofl [1]int32 var __stdio_ofl_lockptr *int32 = (*int32)(unsafe.Pointer(&_cgos_ofl_lock_ofl)) -func __ofl_lock() **struct__IO_FILE { +func __ofl_lock() **Struct__IO_FILE { __lock((*int32)(unsafe.Pointer(&_cgos_ofl_lock_ofl))) return &_cgos_ofl_head_ofl } diff --git a/ofl_add.c.i.go b/ofl_add.c.i.go index 0185795e..8eae39e0 100644 --- a/ofl_add.c.i.go +++ b/ofl_add.c.i.go @@ -1,10 +1,10 @@ package libc -func __ofl_add(f *struct__IO_FILE) *struct__IO_FILE { - var head **struct__IO_FILE = __ofl_lock() - f.next = *head +func __ofl_add(f *Struct__IO_FILE) *Struct__IO_FILE { + var head **Struct__IO_FILE = __ofl_lock() + f.Next = *head if *head != nil { - (*head).prev = f + (*head).Prev = f } *head = f __ofl_unlock() diff --git a/openpty.c.i.go b/openpty.c.i.go index a0d44c91..eddc8fab 100644 --- a/openpty.c.i.go +++ b/openpty.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func openpty(pm *int32, ps *int32, name *int8, tio *struct_termios, ws *struct_winsize) int32 { +func openpty(pm *int32, ps *int32, name *int8, tio *struct_termios, ws *Struct_winsize) int32 { var m int32 var s int32 var n int32 = int32(0) diff --git a/pclose.c.i.go b/pclose.c.i.go index 7248af5c..9f673e18 100644 --- a/pclose.c.i.go +++ b/pclose.c.i.go @@ -2,10 +2,10 @@ package libc import unsafe "unsafe" -func Pclose(f *struct__IO_FILE) int32 { +func Pclose(f *Struct__IO_FILE) int32 { var status int32 var r int32 - var pid int32 = f.pipe_pid + var pid int32 = f.Pipe_pid Fclose(f) for func() (_cgo_ret int32) { _cgo_addr := &r diff --git a/perror.c.i.go b/perror.c.i.go index 50b6fa04..eb41fa39 100644 --- a/perror.c.i.go +++ b/perror.c.i.go @@ -3,17 +3,17 @@ package libc import unsafe "unsafe" func Perror(msg *int8) { - var f *struct__IO_FILE = &__stderr_FILE + var f *Struct__IO_FILE = &__stderr_FILE var errstr *int8 = Strerror(*__errno_location()) var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - var old_locale unsafe.Pointer = unsafe.Pointer(f.locale) - var old_mode int32 = f.mode + var old_locale unsafe.Pointer = unsafe.Pointer(f.Locale) + var old_mode int32 = f.Mode if msg != nil && int32(*msg) != 0 { Fwrite(unsafe.Pointer(msg), Strlen(msg), uint64(1), f) Fputc(':', f) @@ -21,8 +21,8 @@ func Perror(msg *int8) { } Fwrite(unsafe.Pointer(errstr), Strlen(errstr), uint64(1), f) Fputc('\n', f) - f.mode = old_mode - f.locale = (*struct___locale_struct)(old_locale) + f.Mode = old_mode + f.Locale = (*Struct___locale_struct)(old_locale) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/putc.c.i.go b/putc.c.i.go index 4baeac8f..b3aa4e08 100644 --- a/putc.c.i.go +++ b/putc.c.i.go @@ -1,5 +1,5 @@ package libc -func Putc(c int32, f *struct__IO_FILE) int32 { +func Putc(c int32, f *Struct__IO_FILE) int32 { return do_putc(c, f) } diff --git a/putc_unlocked.c.i.go b/putc_unlocked.c.i.go index 0ead7218..f3f13a13 100644 --- a/putc_unlocked.c.i.go +++ b/putc_unlocked.c.i.go @@ -2,12 +2,12 @@ package libc import unsafe "unsafe" -func Putc_unlocked(c int32, f *struct__IO_FILE) int32 { +func Putc_unlocked(c int32, f *Struct__IO_FILE) int32 { return func() int32 { - if int32(uint8(c)) != f.lbf && uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wend)) { + if int32(uint8(c)) != f.Lbf && uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wend)) { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &f.wpos + _cgo_addr := &f.Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return diff --git a/putchar_unlocked.c.i.go b/putchar_unlocked.c.i.go index 26117480..680ff5e9 100644 --- a/putchar_unlocked.c.i.go +++ b/putchar_unlocked.c.i.go @@ -4,10 +4,10 @@ import unsafe "unsafe" func Putchar_unlocked(c int32) int32 { return func() int32 { - if int32(uint8(c)) != (&__stdout_FILE).lbf && uintptr(unsafe.Pointer((&__stdout_FILE).wpos)) != uintptr(unsafe.Pointer((&__stdout_FILE).wend)) { + if int32(uint8(c)) != (&__stdout_FILE).Lbf && uintptr(unsafe.Pointer((&__stdout_FILE).Wpos)) != uintptr(unsafe.Pointer((&__stdout_FILE).Wend)) { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &(&__stdout_FILE).wpos + _cgo_addr := &(&__stdout_FILE).Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return diff --git a/putw.c.i.go b/putw.c.i.go index 6266068d..7c650969 100644 --- a/putw.c.i.go +++ b/putw.c.i.go @@ -2,6 +2,6 @@ package libc import unsafe "unsafe" -func Putw(x int32, f *struct__IO_FILE) int32 { +func Putw(x int32, f *Struct__IO_FILE) int32 { return int32(Fwrite(unsafe.Pointer(&x), 4, uint64(1), f)) - int32(1) } diff --git a/putwc.c.i.go b/putwc.c.i.go index 0d4da062..dd429aa7 100644 --- a/putwc.c.i.go +++ b/putwc.c.i.go @@ -1,5 +1,5 @@ package libc -func putwc(c uint32, f *struct__IO_FILE) uint32 { +func putwc(c uint32, f *Struct__IO_FILE) uint32 { return fputwc(c, f) } diff --git a/rewind.c.i.go b/rewind.c.i.go index 37eee9e0..62a2d57c 100644 --- a/rewind.c.i.go +++ b/rewind.c.i.go @@ -1,15 +1,15 @@ package libc -func Rewind(f *struct__IO_FILE) { +func Rewind(f *Struct__IO_FILE) { var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() __fseeko_unlocked(f, int64(0), int32(0)) - f.flags &= uint32(4294967263) + f.Flags &= uint32(4294967263) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/setbuf.c.i.go b/setbuf.c.i.go index c9ccc084..4e59aff1 100644 --- a/setbuf.c.i.go +++ b/setbuf.c.i.go @@ -1,6 +1,6 @@ package libc -func Setbuf(f *struct__IO_FILE, buf *int8) { +func Setbuf(f *Struct__IO_FILE, buf *int8) { Setvbuf(f, buf, func() int32 { if buf != nil { return int32(0) diff --git a/setbuffer.c.i.go b/setbuffer.c.i.go index 008a20ab..982f7a5f 100644 --- a/setbuffer.c.i.go +++ b/setbuffer.c.i.go @@ -1,6 +1,6 @@ package libc -func Setbuffer(f *struct__IO_FILE, buf *int8, size uint64) { +func Setbuffer(f *Struct__IO_FILE, buf *int8, size uint64) { Setvbuf(f, buf, func() int32 { if buf != nil { return int32(0) diff --git a/setlinebuf.c.i.go b/setlinebuf.c.i.go index f202ddbc..b1f8c9f9 100644 --- a/setlinebuf.c.i.go +++ b/setlinebuf.c.i.go @@ -1,5 +1,5 @@ package libc -func Setlinebuf(f *struct__IO_FILE) { +func Setlinebuf(f *Struct__IO_FILE) { Setvbuf(f, nil, int32(1), uint64(0)) } diff --git a/setvbuf.c.i.go b/setvbuf.c.i.go index e70bfdc2..a0a3a222 100644 --- a/setvbuf.c.i.go +++ b/setvbuf.c.i.go @@ -2,21 +2,21 @@ package libc import unsafe "unsafe" -func Setvbuf(f *struct__IO_FILE, buf *int8, type_ int32, size uint64) int32 { - f.lbf = -1 +func Setvbuf(f *Struct__IO_FILE, buf *int8, type_ int32, size uint64) int32 { + f.Lbf = -1 if type_ == int32(2) { - f.buf_size = uint64(0) + f.Buf_size = uint64(0) } else if type_ == int32(1) || type_ == int32(0) { if buf != nil && size >= uint64(8) { - f.buf = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(int32(8)))))) - f.buf_size = size - uint64(8) + f.Buf = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(int32(8)))))) + f.Buf_size = size - uint64(8) } - if type_ == int32(1) && f.buf_size != 0 { - f.lbf = int32('\n') + if type_ == int32(1) && f.Buf_size != 0 { + f.Lbf = int32('\n') } } else { return -1 } - f.flags |= uint32(64) + f.Flags |= uint32(64) return int32(0) } diff --git a/shgetc.c.i.go b/shgetc.c.i.go index 77cef693..394981e0 100644 --- a/shgetc.c.i.go +++ b/shgetc.c.i.go @@ -2,37 +2,37 @@ package libc import unsafe "unsafe" -func __shlim(f *struct__IO_FILE, lim int64) { - f.shlim = lim - f.shcnt = int64(uintptr(unsafe.Pointer(f.buf)) - uintptr(unsafe.Pointer(f.rpos))) - if lim != 0 && int64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))) > lim { - f.shend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.rpos)) + uintptr(lim))) +func __shlim(f *Struct__IO_FILE, lim int64) { + f.Shlim = lim + f.Shcnt = int64(uintptr(unsafe.Pointer(f.Buf)) - uintptr(unsafe.Pointer(f.Rpos))) + if lim != 0 && int64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))) > lim { + f.Shend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Rpos)) + uintptr(lim))) } else { - f.shend = f.rend + f.Shend = f.Rend } } -func __shgetc(f *struct__IO_FILE) int32 { +func __shgetc(f *Struct__IO_FILE) int32 { var c int32 - var cnt int64 = f.shcnt + int64(uintptr(unsafe.Pointer(f.rpos))-uintptr(unsafe.Pointer(f.buf))) - if f.shlim != 0 && cnt >= f.shlim || func() (_cgo_ret int32) { + var cnt int64 = f.Shcnt + int64(uintptr(unsafe.Pointer(f.Rpos))-uintptr(unsafe.Pointer(f.Buf))) + if f.Shlim != 0 && cnt >= f.Shlim || func() (_cgo_ret int32) { _cgo_addr := &c *_cgo_addr = __uflow(f) return *_cgo_addr }() < int32(0) { - f.shcnt = int64(uintptr(unsafe.Pointer(f.buf))-uintptr(unsafe.Pointer(f.rpos))) + cnt - f.shend = f.rpos - f.shlim = int64(-1) + f.Shcnt = int64(uintptr(unsafe.Pointer(f.Buf))-uintptr(unsafe.Pointer(f.Rpos))) + cnt + f.Shend = f.Rpos + f.Shlim = int64(-1) return -1 } cnt++ - if f.shlim != 0 && int64(uintptr(unsafe.Pointer(f.rend))-uintptr(unsafe.Pointer(f.rpos))) > f.shlim-cnt { - f.shend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.rpos)) + uintptr(f.shlim-cnt))) + if f.Shlim != 0 && int64(uintptr(unsafe.Pointer(f.Rend))-uintptr(unsafe.Pointer(f.Rpos))) > f.Shlim-cnt { + f.Shend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Rpos)) + uintptr(f.Shlim-cnt))) } else { - f.shend = f.rend + f.Shend = f.Rend } - f.shcnt = int64(uintptr(unsafe.Pointer(f.buf))-uintptr(unsafe.Pointer(f.rpos))) + cnt - if uintptr(unsafe.Pointer(f.rpos)) <= uintptr(unsafe.Pointer(f.buf)) { - *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.rpos)) - uintptr(1))) = uint8(c) + f.Shcnt = int64(uintptr(unsafe.Pointer(f.Buf))-uintptr(unsafe.Pointer(f.Rpos))) + cnt + if uintptr(unsafe.Pointer(f.Rpos)) <= uintptr(unsafe.Pointer(f.Buf)) { + *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Rpos)) - uintptr(1))) = uint8(c) } return c } diff --git a/stderr.c.i.go b/stderr.c.i.go index 7095ff05..d7264076 100644 --- a/stderr.c.i.go +++ b/stderr.c.i.go @@ -3,11 +3,11 @@ package libc import unsafe "unsafe" var _cgos_buf_stderr [8]uint8 -var __stderr_FILE struct__IO_FILE +var __stderr_FILE Struct__IO_FILE func init() { - __stderr_FILE = struct__IO_FILE{uint32(5), nil, nil, __stdio_close, nil, nil, nil, nil, nil, __stdio_write, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stderr)))) + uintptr(int32(8)))), uint64(0), nil, nil, int32(2), 0, 0, 0, -1, -1, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} + __stderr_FILE = Struct__IO_FILE{uint32(5), nil, nil, __stdio_close, nil, nil, nil, nil, nil, __stdio_write, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stderr)))) + uintptr(int32(8)))), uint64(0), nil, nil, int32(2), 0, 0, 0, -1, -1, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} } -var Stderr *struct__IO_FILE = &__stderr_FILE -var __stderr_used *struct__IO_FILE = &__stderr_FILE +var Stderr *Struct__IO_FILE = &__stderr_FILE +var __stderr_used *Struct__IO_FILE = &__stderr_FILE diff --git a/stdin.c.i.go b/stdin.c.i.go index 4eeeacaa..a135858e 100644 --- a/stdin.c.i.go +++ b/stdin.c.i.go @@ -3,11 +3,11 @@ package libc import unsafe "unsafe" var _cgos_buf_stdin [1032]uint8 -var __stdin_FILE struct__IO_FILE +var __stdin_FILE Struct__IO_FILE func init() { - __stdin_FILE = struct__IO_FILE{uint32(9), nil, nil, __stdio_close, nil, nil, nil, nil, __stdio_read, nil, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stdin)))) + uintptr(int32(8)))), 1024, nil, nil, int32(0), 0, 0, 0, -1, 0, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} + __stdin_FILE = Struct__IO_FILE{uint32(9), nil, nil, __stdio_close, nil, nil, nil, nil, __stdio_read, nil, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stdin)))) + uintptr(int32(8)))), 1024, nil, nil, int32(0), 0, 0, 0, -1, 0, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} } -var Stdin *struct__IO_FILE = &__stdin_FILE -var __stdin_used *struct__IO_FILE = &__stdin_FILE +var Stdin *Struct__IO_FILE = &__stdin_FILE +var __stdin_used *Struct__IO_FILE = &__stdin_FILE diff --git a/stdout.c.i.go b/stdout.c.i.go index 3216addb..702d8cf4 100644 --- a/stdout.c.i.go +++ b/stdout.c.i.go @@ -3,11 +3,11 @@ package libc import unsafe "unsafe" var _cgos_buf_stdout [1032]uint8 -var __stdout_FILE struct__IO_FILE +var __stdout_FILE Struct__IO_FILE func init() { - __stdout_FILE = struct__IO_FILE{uint32(5), nil, nil, __stdio_close, nil, nil, nil, nil, nil, __stdout_write, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stdout)))) + uintptr(int32(8)))), 1024, nil, nil, int32(1), 0, 0, 0, -1, '\n', nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} + __stdout_FILE = Struct__IO_FILE{uint32(5), nil, nil, __stdio_close, nil, nil, nil, nil, nil, __stdout_write, __stdio_seek, (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(&_cgos_buf_stdout)))) + uintptr(int32(8)))), 1024, nil, nil, int32(1), 0, 0, 0, -1, '\n', nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} } -var Stdout *struct__IO_FILE = &__stdout_FILE -var __stdout_used *struct__IO_FILE = &__stdout_FILE +var Stdout *Struct__IO_FILE = &__stdout_FILE +var __stdout_used *Struct__IO_FILE = &__stdout_FILE diff --git a/strcasecmp.c.i.go b/strcasecmp.c.i.go index 9ddecf9e..1193d675 100644 --- a/strcasecmp.c.i.go +++ b/strcasecmp.c.i.go @@ -17,6 +17,6 @@ func strcasecmp(_l *int8, _r *int8) int32 { } return Tolower(int32(*l)) - Tolower(int32(*r)) } -func __strcasecmp_l(l *int8, r *int8, loc *struct___locale_struct) int32 { +func __strcasecmp_l(l *int8, r *int8, loc *Struct___locale_struct) int32 { return strcasecmp(l, r) } diff --git a/strerror.c.i.go b/strerror.c.i.go index 30c32c3d..93293361 100644 --- a/strerror.c.i.go +++ b/strerror.c.i.go @@ -97,14 +97,14 @@ type _cgos_errmsgstr_t_strerror struct { var _cgos_errmsgstr_strerror _cgos_errmsgstr_t_strerror = _cgos_errmsgstr_t_strerror{[21]int8{'N', 'o', ' ', 'e', 'r', 'r', 'o', 'r', ' ', 'i', 'n', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', '\x00'}, [22]int8{'I', 'l', 'l', 'e', 'g', 'a', 'l', ' ', 'b', 'y', 't', 'e', ' ', 's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', '\x00'}, [13]int8{'D', 'o', 'm', 'a', 'i', 'n', ' ', 'e', 'r', 'r', 'o', 'r', '\x00'}, [25]int8{'R', 'e', 's', 'u', 'l', 't', ' ', 'n', 'o', 't', ' ', 'r', 'e', 'p', 'r', 'e', 's', 'e', 'n', 't', 'a', 'b', 'l', 'e', '\x00'}, [10]int8{'N', 'o', 't', ' ', 'a', ' ', 't', 't', 'y', '\x00'}, [18]int8{'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', ' ', 'd', 'e', 'n', 'i', 'e', 'd', '\x00'}, [24]int8{'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', ' ', 'n', 'o', 't', ' ', 'p', 'e', 'r', 'm', 'i', 't', 't', 'e', 'd', '\x00'}, [26]int8{'N', 'o', ' ', 's', 'u', 'c', 'h', ' ', 'f', 'i', 'l', 'e', ' ', 'o', 'r', ' ', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\x00'}, [16]int8{'N', 'o', ' ', 's', 'u', 'c', 'h', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', '\x00'}, [12]int8{'F', 'i', 'l', 'e', ' ', 'e', 'x', 'i', 's', 't', 's', '\x00'}, [30]int8{'V', 'a', 'l', 'u', 'e', ' ', 't', 'o', 'o', ' ', 'l', 'a', 'r', 'g', 'e', ' ', 'f', 'o', 'r', ' ', 'd', 'a', 't', 'a', ' ', 't', 'y', 'p', 'e', '\x00'}, [24]int8{'N', 'o', ' ', 's', 'p', 'a', 'c', 'e', ' ', 'l', 'e', 'f', 't', ' ', 'o', 'n', ' ', 'd', 'e', 'v', 'i', 'c', 'e', '\x00'}, [14]int8{'O', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', '\x00'}, [14]int8{'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', ' ', 'b', 'u', 's', 'y', '\x00'}, [24]int8{'I', 'n', 't', 'e', 'r', 'r', 'u', 'p', 't', 'e', 'd', ' ', 's', 'y', 's', 't', 'e', 'm', ' ', 'c', 'a', 'l', 'l', '\x00'}, [33]int8{'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', ' ', 't', 'e', 'm', 'p', 'o', 'r', 'a', 'r', 'i', 'l', 'y', ' ', 'u', 'n', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [13]int8{'I', 'n', 'v', 'a', 'l', 'i', 'd', ' ', 's', 'e', 'e', 'k', '\x00'}, [18]int8{'C', 'r', 'o', 's', 's', '-', 'd', 'e', 'v', 'i', 'c', 'e', ' ', 'l', 'i', 'n', 'k', '\x00'}, [22]int8{'R', 'e', 'a', 'd', '-', 'o', 'n', 'l', 'y', ' ', 'f', 'i', 'l', 'e', ' ', 's', 'y', 's', 't', 'e', 'm', '\x00'}, [20]int8{'D', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', ' ', 'n', 'o', 't', ' ', 'e', 'm', 'p', 't', 'y', '\x00'}, [25]int8{'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', ' ', 'r', 'e', 's', 'e', 't', ' ', 'b', 'y', ' ', 'p', 'e', 'e', 'r', '\x00'}, [20]int8{'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', ' ', 't', 'i', 'm', 'e', 'd', ' ', 'o', 'u', 't', '\x00'}, [19]int8{'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', ' ', 'r', 'e', 'f', 'u', 's', 'e', 'd', '\x00'}, [13]int8{'H', 'o', 's', 't', ' ', 'i', 's', ' ', 'd', 'o', 'w', 'n', '\x00'}, [20]int8{'H', 'o', 's', 't', ' ', 'i', 's', ' ', 'u', 'n', 'r', 'e', 'a', 'c', 'h', 'a', 'b', 'l', 'e', '\x00'}, [15]int8{'A', 'd', 'd', 'r', 'e', 's', 's', ' ', 'i', 'n', ' ', 'u', 's', 'e', '\x00'}, [12]int8{'B', 'r', 'o', 'k', 'e', 'n', ' ', 'p', 'i', 'p', 'e', '\x00'}, [10]int8{'I', '/', 'O', ' ', 'e', 'r', 'r', 'o', 'r', '\x00'}, [26]int8{'N', 'o', ' ', 's', 'u', 'c', 'h', ' ', 'd', 'e', 'v', 'i', 'c', 'e', ' ', 'o', 'r', ' ', 'a', 'd', 'd', 'r', 'e', 's', 's', '\x00'}, [22]int8{'B', 'l', 'o', 'c', 'k', ' ', 'd', 'e', 'v', 'i', 'c', 'e', ' ', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\x00'}, [15]int8{'N', 'o', ' ', 's', 'u', 'c', 'h', ' ', 'd', 'e', 'v', 'i', 'c', 'e', '\x00'}, [16]int8{'N', 'o', 't', ' ', 'a', ' ', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\x00'}, [15]int8{'I', 's', ' ', 'a', ' ', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\x00'}, [15]int8{'T', 'e', 'x', 't', ' ', 'f', 'i', 'l', 'e', ' ', 'b', 'u', 's', 'y', '\x00'}, [18]int8{'E', 'x', 'e', 'c', ' ', 'f', 'o', 'r', 'm', 'a', 't', ' ', 'e', 'r', 'r', 'o', 'r', '\x00'}, [17]int8{'I', 'n', 'v', 'a', 'l', 'i', 'd', ' ', 'a', 'r', 'g', 'u', 'm', 'e', 'n', 't', '\x00'}, [23]int8{'A', 'r', 'g', 'u', 'm', 'e', 'n', 't', ' ', 'l', 'i', 's', 't', ' ', 't', 'o', 'o', ' ', 'l', 'o', 'n', 'g', '\x00'}, [19]int8{'S', 'y', 'm', 'b', 'o', 'l', 'i', 'c', ' ', 'l', 'i', 'n', 'k', ' ', 'l', 'o', 'o', 'p', '\x00'}, [18]int8{'F', 'i', 'l', 'e', 'n', 'a', 'm', 'e', ' ', 't', 'o', 'o', ' ', 'l', 'o', 'n', 'g', '\x00'}, [30]int8{'T', 'o', 'o', ' ', 'm', 'a', 'n', 'y', ' ', 'o', 'p', 'e', 'n', ' ', 'f', 'i', 'l', 'e', 's', ' ', 'i', 'n', ' ', 's', 'y', 's', 't', 'e', 'm', '\x00'}, [30]int8{'N', 'o', ' ', 'f', 'i', 'l', 'e', ' ', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 's', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [20]int8{'B', 'a', 'd', ' ', 'f', 'i', 'l', 'e', ' ', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '\x00'}, [17]int8{'N', 'o', ' ', 'c', 'h', 'i', 'l', 'd', ' ', 'p', 'r', 'o', 'c', 'e', 's', 's', '\x00'}, [12]int8{'B', 'a', 'd', ' ', 'a', 'd', 'd', 'r', 'e', 's', 's', '\x00'}, [15]int8{'F', 'i', 'l', 'e', ' ', 't', 'o', 'o', ' ', 'l', 'a', 'r', 'g', 'e', '\x00'}, [15]int8{'T', 'o', 'o', ' ', 'm', 'a', 'n', 'y', ' ', 'l', 'i', 'n', 'k', 's', '\x00'}, [19]int8{'N', 'o', ' ', 'l', 'o', 'c', 'k', 's', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [30]int8{'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', ' ', 'd', 'e', 'a', 'd', 'l', 'o', 'c', 'k', ' ', 'w', 'o', 'u', 'l', 'd', ' ', 'o', 'c', 'c', 'u', 'r', '\x00'}, [22]int8{'S', 't', 'a', 't', 'e', ' ', 'n', 'o', 't', ' ', 'r', 'e', 'c', 'o', 'v', 'e', 'r', 'a', 'b', 'l', 'e', '\x00'}, [20]int8{'P', 'r', 'e', 'v', 'i', 'o', 'u', 's', ' ', 'o', 'w', 'n', 'e', 'r', ' ', 'd', 'i', 'e', 'd', '\x00'}, [19]int8{'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', ' ', 'c', 'a', 'n', 'c', 'e', 'l', 'e', 'd', '\x00'}, [25]int8{'F', 'u', 'n', 'c', 't', 'i', 'o', 'n', ' ', 'n', 'o', 't', ' ', 'i', 'm', 'p', 'l', 'e', 'm', 'e', 'n', 't', 'e', 'd', '\x00'}, [27]int8{'N', 'o', ' ', 'm', 'e', 's', 's', 'a', 'g', 'e', ' ', 'o', 'f', ' ', 'd', 'e', 's', 'i', 'r', 'e', 'd', ' ', 't', 'y', 'p', 'e', '\x00'}, [19]int8{'I', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', ' ', 'r', 'e', 'm', 'o', 'v', 'e', 'd', '\x00'}, [20]int8{'D', 'e', 'v', 'i', 'c', 'e', ' ', 'n', 'o', 't', ' ', 'a', ' ', 's', 't', 'r', 'e', 'a', 'm', '\x00'}, [18]int8{'N', 'o', ' ', 'd', 'a', 't', 'a', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [15]int8{'D', 'e', 'v', 'i', 'c', 'e', ' ', 't', 'i', 'm', 'e', 'o', 'u', 't', '\x00'}, [25]int8{'O', 'u', 't', ' ', 'o', 'f', ' ', 's', 't', 'r', 'e', 'a', 'm', 's', ' ', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\x00'}, [22]int8{'L', 'i', 'n', 'k', ' ', 'h', 'a', 's', ' ', 'b', 'e', 'e', 'n', ' ', 's', 'e', 'v', 'e', 'r', 'e', 'd', '\x00'}, [15]int8{'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'e', 'r', 'r', 'o', 'r', '\x00'}, [12]int8{'B', 'a', 'd', ' ', 'm', 'e', 's', 's', 'a', 'g', 'e', '\x00'}, [29]int8{'F', 'i', 'l', 'e', ' ', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', ' ', 'i', 'n', ' ', 'b', 'a', 'd', ' ', 's', 't', 'a', 't', 'e', '\x00'}, [13]int8{'N', 'o', 't', ' ', 'a', ' ', 's', 'o', 'c', 'k', 'e', 't', '\x00'}, [29]int8{'D', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', ' ', 'a', 'd', 'd', 'r', 'e', 's', 's', ' ', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\x00'}, [18]int8{'M', 'e', 's', 's', 'a', 'g', 'e', ' ', 't', 'o', 'o', ' ', 'l', 'a', 'r', 'g', 'e', '\x00'}, [31]int8{'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'w', 'r', 'o', 'n', 'g', ' ', 't', 'y', 'p', 'e', ' ', 'f', 'o', 'r', ' ', 's', 'o', 'c', 'k', 'e', 't', '\x00'}, [23]int8{'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'n', 'o', 't', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [23]int8{'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\x00'}, [26]int8{'S', 'o', 'c', 'k', 'e', 't', ' ', 't', 'y', 'p', 'e', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\x00'}, [14]int8{'N', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\x00'}, [30]int8{'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', ' ', 'f', 'a', 'm', 'i', 'l', 'y', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', '\x00'}, [41]int8{'A', 'd', 'd', 'r', 'e', 's', 's', ' ', 'f', 'a', 'm', 'i', 'l', 'y', ' ', 'n', 'o', 't', ' ', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', ' ', 'b', 'y', ' ', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\x00'}, [22]int8{'A', 'd', 'd', 'r', 'e', 's', 's', ' ', 'n', 'o', 't', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [16]int8{'N', 'e', 't', 'w', 'o', 'r', 'k', ' ', 'i', 's', ' ', 'd', 'o', 'w', 'n', '\x00'}, [20]int8{'N', 'e', 't', 'w', 'o', 'r', 'k', ' ', 'u', 'n', 'r', 'e', 'a', 'c', 'h', 'a', 'b', 'l', 'e', '\x00'}, [28]int8{'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', ' ', 'r', 'e', 's', 'e', 't', ' ', 'b', 'y', ' ', 'n', 'e', 't', 'w', 'o', 'r', 'k', '\x00'}, [19]int8{'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', ' ', 'a', 'b', 'o', 'r', 't', 'e', 'd', '\x00'}, [26]int8{'N', 'o', ' ', 'b', 'u', 'f', 'f', 'e', 'r', ' ', 's', 'p', 'a', 'c', 'e', ' ', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e', '\x00'}, [20]int8{'S', 'o', 'c', 'k', 'e', 't', ' ', 'i', 's', ' ', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'e', 'd', '\x00'}, [21]int8{'S', 'o', 'c', 'k', 'e', 't', ' ', 'n', 'o', 't', ' ', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'e', 'd', '\x00'}, [34]int8{'C', 'a', 'n', 'n', 'o', 't', ' ', 's', 'e', 'n', 'd', ' ', 'a', 'f', 't', 'e', 'r', ' ', 's', 'o', 'c', 'k', 'e', 't', ' ', 's', 'h', 'u', 't', 'd', 'o', 'w', 'n', '\x00'}, [30]int8{'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', ' ', 'a', 'l', 'r', 'e', 'a', 'd', 'y', ' ', 'i', 'n', ' ', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\x00'}, [22]int8{'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', ' ', 'i', 'n', ' ', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\x00'}, [18]int8{'S', 't', 'a', 'l', 'e', ' ', 'f', 'i', 'l', 'e', ' ', 'h', 'a', 'n', 'd', 'l', 'e', '\x00'}, [17]int8{'R', 'e', 'm', 'o', 't', 'e', ' ', 'I', '/', 'O', ' ', 'e', 'r', 'r', 'o', 'r', '\x00'}, [15]int8{'Q', 'u', 'o', 't', 'a', ' ', 'e', 'x', 'c', 'e', 'e', 'd', 'e', 'd', '\x00'}, [16]int8{'N', 'o', ' ', 'm', 'e', 'd', 'i', 'u', 'm', ' ', 'f', 'o', 'u', 'n', 'd', '\x00'}, [18]int8{'W', 'r', 'o', 'n', 'g', ' ', 'm', 'e', 'd', 'i', 'u', 'm', ' ', 't', 'y', 'p', 'e', '\x00'}, [19]int8{'M', 'u', 'l', 't', 'i', 'h', 'o', 'p', ' ', 'a', 't', 't', 'e', 'm', 'p', 't', 'e', 'd', '\x00'}} var _cgos_errmsgidx_strerror [132]uint16 = [132]uint16{uint16(0), uint16(109), uint16(133), uint16(159), uint16(269), uint16(523), uint16(533), uint16(677), uint16(642), uint16(797), uint16(817), uint16(293), uint16(241), uint16(91), uint16(834), uint16(559), uint16(255), uint16(175), uint16(339), uint16(581), uint16(596), uint16(612), uint16(660), uint16(737), uint16(767), uint16(81), uint16(627), uint16(846), uint16(217), uint16(326), uint16(357), uint16(861), uint16(511), uint16(43), uint16(56), uint16(895), uint16(719), uint16(876), uint16(986), uint16(379), uint16(700), 0, uint16(1011), uint16(1038), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint16(1057), uint16(1077), uint16(1095), uint16(1110), 0, 0, 0, uint16(1135), 0, 0, 0, uint16(1157), uint16(1803), 0, uint16(1172), uint16(187), 0, uint16(1184), 0, 0, 0, 0, 0, 0, uint16(21), 0, 0, 0, uint16(1213), uint16(1226), uint16(1255), uint16(1273), uint16(1304), uint16(1327), uint16(1350), uint16(1376), uint16(1390), uint16(1420), uint16(496), uint16(1461), uint16(1483), uint16(1499), uint16(1519), uint16(1547), uint16(399), uint16(1566), uint16(1592), uint16(1612), uint16(1633), 0, uint16(424), uint16(444), uint16(463), uint16(476), uint16(1667), uint16(1697), uint16(1719), 0, 0, 0, 0, uint16(1737), uint16(1754), uint16(1769), uint16(1785), uint16(967), 0, 0, 0, 0, uint16(947), uint16(925)} -func __strerror_l(e int32, loc *struct___locale_struct) *int8 { +func __strerror_l(e int32, loc *Struct___locale_struct) *int8 { var s *int8 if uint64(e) >= 132 { e = int32(0) } s = (*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&_cgos_errmsgstr_strerror)))) + uintptr(int32(*(*uint16)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint16)(unsafe.Pointer(&_cgos_errmsgidx_strerror)))) + uintptr(e)*2)))))) - return (*int8)(unsafe.Pointer(__lctrans(s, *(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&loc.cat)))) + uintptr(int32(5))*8))))) + return (*int8)(unsafe.Pointer(__lctrans(s, *(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&loc.Cat)))) + uintptr(int32(5))*8))))) } func Strerror(e int32) *int8 { - return __strerror_l(e, __pthread_self().locale) + return __strerror_l(e, __pthread_self().Locale) } diff --git a/strncasecmp.c.i.go b/strncasecmp.c.i.go index 28743536..2de35604 100644 --- a/strncasecmp.c.i.go +++ b/strncasecmp.c.i.go @@ -33,6 +33,6 @@ func strncasecmp(_l *int8, _r *int8, n uint64) int32 { } return Tolower(int32(*l)) - Tolower(int32(*r)) } -func __strncasecmp_l(l *int8, r *int8, n uint64, loc *struct___locale_struct) int32 { +func __strncasecmp_l(l *int8, r *int8, n uint64, loc *Struct___locale_struct) int32 { return strncasecmp(l, r, n) } diff --git a/strtod.c.i.go b/strtod.c.i.go index ae76b40b..982a8175 100644 --- a/strtod.c.i.go +++ b/strtod.c.i.go @@ -3,22 +3,22 @@ package libc import unsafe "unsafe" func _cgos_strtox_strtod(s *int8, p **int8, prec int32) float64 { - var f struct__IO_FILE + var f Struct__IO_FILE func() *uint8 { - (&f).buf = func() (_cgo_ret *uint8) { - _cgo_addr := &(&f).rpos + (&f).Buf = func() (_cgo_ret *uint8) { + _cgo_addr := &(&f).Rpos *_cgo_addr = (*uint8)(unsafe.Pointer(s)) return *_cgo_addr }() return func() (_cgo_ret *uint8) { - _cgo_addr := &(&f).rend + _cgo_addr := &(&f).Rend *_cgo_addr = (*uint8)(unsafe.Pointer(uintptr(18446744073709551615))) return *_cgo_addr }() }() __shlim(&f, int64(0)) var y float64 = __floatscan(&f, prec, int32(1)) - var cnt int64 = (&f).shcnt + int64(uintptr(unsafe.Pointer((&f).rpos))-uintptr(unsafe.Pointer((&f).buf))) + var cnt int64 = (&f).Shcnt + int64(uintptr(unsafe.Pointer((&f).Rpos))-uintptr(unsafe.Pointer((&f).Buf))) if p != nil { *p = func() *int8 { if cnt != 0 { diff --git a/test/c2go.cfg b/test/c2go.cfg index 069dc9fe..e7adc0e7 100644 --- a/test/c2go.cfg +++ b/test/c2go.cfg @@ -45,10 +45,5 @@ ] }, "include": [ - "./src/common", - "../c2go/include", - "../include", - "../arch/arm", - "../arch/generic" ] } diff --git a/tmpfile.c.i.go b/tmpfile.c.i.go index 4e255fcb..c108ae8a 100644 --- a/tmpfile.c.i.go +++ b/tmpfile.c.i.go @@ -2,10 +2,10 @@ package libc import unsafe "unsafe" -func Tmpfile() *struct__IO_FILE { +func Tmpfile() *Struct__IO_FILE { var s [20]int8 = [20]int8{'/', 't', 'm', 'p', '/', 't', 'm', 'p', 'f', 'i', 'l', 'e', '_', 'X', 'X', 'X', 'X', 'X', 'X', '\x00'} var fd int32 - var f *struct__IO_FILE + var f *Struct__IO_FILE var try int32 for try = int32(0); try < int32(100); try++ { __randname((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)(unsafe.Pointer(&s)))) + uintptr(int32(13))))) @@ -19,5 +19,5 @@ func Tmpfile() *struct__IO_FILE { return f } } - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } diff --git a/tolower.c.i.go b/tolower.c.i.go index d94afc30..4a0d5671 100644 --- a/tolower.c.i.go +++ b/tolower.c.i.go @@ -18,6 +18,6 @@ func Tolower(c int32) int32 { } return c } -func __tolower_l(c int32, l *struct___locale_struct) int32 { +func __tolower_l(c int32, l *Struct___locale_struct) int32 { return Tolower(c) } diff --git a/toupper.c.i.go b/toupper.c.i.go index cb03ba42..c1bb81ee 100644 --- a/toupper.c.i.go +++ b/toupper.c.i.go @@ -18,6 +18,6 @@ func Toupper(c int32) int32 { } return c } -func __toupper_l(c int32, l *struct___locale_struct) int32 { +func __toupper_l(c int32, l *Struct___locale_struct) int32 { return Toupper(c) } diff --git a/towctrans.c.i.go b/towctrans.c.i.go index 282c308b..d98e0e24 100644 --- a/towctrans.c.i.go +++ b/towctrans.c.i.go @@ -64,9 +64,9 @@ func towlower(wc uint32) uint32 { func towupper(wc uint32) uint32 { return uint32(_cgos_casemap_towctrans(wc, int32(1))) } -func __towupper_l(c uint32, l *struct___locale_struct) uint32 { +func __towupper_l(c uint32, l *Struct___locale_struct) uint32 { return towupper(c) } -func __towlower_l(c uint32, l *struct___locale_struct) uint32 { +func __towlower_l(c uint32, l *Struct___locale_struct) uint32 { return towlower(c) } diff --git a/ungetc.c.i.go b/ungetc.c.i.go index 390a2b8d..25eb6e2b 100644 --- a/ungetc.c.i.go +++ b/ungetc.c.i.go @@ -2,21 +2,21 @@ package libc import unsafe "unsafe" -func Ungetc(c int32, f *struct__IO_FILE) int32 { +func Ungetc(c int32, f *Struct__IO_FILE) int32 { if c == -1 { return c } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - if !(f.rpos != nil) { + if !(f.Rpos != nil) { __toread(f) } - if !(f.rpos != nil) || uintptr(unsafe.Pointer(f.rpos)) <= uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf))-uintptr(int32(8)))))) { + if !(f.Rpos != nil) || uintptr(unsafe.Pointer(f.Rpos)) <= uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf))-uintptr(int32(8)))))) { for { if __need_unlock != 0 { __unlockfile(f) @@ -28,11 +28,11 @@ func Ungetc(c int32, f *struct__IO_FILE) int32 { return -1 } *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return *_cgo_addr }() = uint8(c) - f.flags &= uint32(4294967279) + f.Flags &= uint32(4294967279) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/ungetwc.c.i.go b/ungetwc.c.i.go index a95d04d4..0e0fc587 100644 --- a/ungetwc.c.i.go +++ b/ungetwc.c.i.go @@ -2,30 +2,30 @@ package libc import unsafe "unsafe" -func ungetwc(c uint32, f *struct__IO_FILE) uint32 { +func ungetwc(c uint32, f *Struct__IO_FILE) uint32 { var mbc [4]uint8 var l int32 - var ploc **struct___locale_struct = &__pthread_self().locale - var loc *struct___locale_struct = *ploc + var ploc **Struct___locale_struct = &__pthread_self().Locale + var loc *Struct___locale_struct = *ploc var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - if f.mode <= int32(0) { + if f.Mode <= int32(0) { fwide(f, int32(1)) } - *ploc = f.locale - if !(f.rpos != nil) { + *ploc = f.Locale + if !(f.Rpos != nil) { __toread(f) } - if !(f.rpos != nil) || c == uint32(4294967295) || func() (_cgo_ret int32) { + if !(f.Rpos != nil) || c == uint32(4294967295) || func() (_cgo_ret int32) { _cgo_addr := &l *_cgo_addr = int32(wcrtomb((*int8)(unsafe.Pointer((*uint8)(unsafe.Pointer(&mbc)))), c, nil)) return *_cgo_addr - }() < int32(0) || uintptr(unsafe.Pointer(f.rpos)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf))-uintptr(int32(8))))))+uintptr(l))))) { + }() < int32(0) || uintptr(unsafe.Pointer(f.Rpos)) < uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf))-uintptr(int32(8))))))+uintptr(l))))) { for { if __need_unlock != 0 { __unlockfile(f) @@ -51,18 +51,18 @@ func ungetwc(c uint32, f *struct__IO_FILE) uint32 { } }() != 0 { *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos *(*uintptr)(unsafe.Pointer(_cgo_addr))-- return *_cgo_addr }() = uint8(c) } else { Memcpy(unsafe.Pointer(func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos *(*uintptr)(unsafe.Pointer(&*_cgo_addr)) -= uintptr(l) return *_cgo_addr }()), unsafe.Pointer((*uint8)(unsafe.Pointer(&mbc))), uint64(l)) } - f.flags &= uint32(4294967279) + f.Flags &= uint32(4294967279) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/vdprintf.c.i.go b/vdprintf.c.i.go index 01764706..d42d21a5 100644 --- a/vdprintf.c.i.go +++ b/vdprintf.c.i.go @@ -4,6 +4,6 @@ import unsafe "unsafe" func Vdprintf(fd int32, fmt *int8, ap []interface { }) int32 { - var f struct__IO_FILE = struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, nil, __stdio_write, nil, (*uint8)(unsafe.Pointer(fmt)), uint64(0), nil, nil, fd, 0, 0, 0, -1, -1, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} + var f Struct__IO_FILE = Struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, nil, __stdio_write, nil, (*uint8)(unsafe.Pointer(fmt)), uint64(0), nil, nil, fd, 0, 0, 0, -1, -1, nil, 0, nil, nil, nil, 0, 0, nil, nil, nil} return Vfprintf(&f, fmt, ap) } diff --git a/vfprintf.c.i.go b/vfprintf.c.i.go index a9468202..c39f0b00 100644 --- a/vfprintf.c.i.go +++ b/vfprintf.c.i.go @@ -268,12 +268,12 @@ func _cgos_pop_arg_vfprintf(arg *_cgos_arg_vfprintf, type_ int32, ap *[]interfac }(*ap) } } -func _cgos_out_vfprintf(f *struct__IO_FILE, s *int8, l uint64) { - if !(f.flags&uint32(32) != 0) { +func _cgos_out_vfprintf(f *Struct__IO_FILE, s *int8, l uint64) { + if !(f.Flags&uint32(32) != 0) { __fwritex((*uint8)(unsafe.Pointer(s)), l, f) } } -func _cgos_pad_vfprintf(f *struct__IO_FILE, c int8, w int32, l int32, fl int32) { +func _cgos_pad_vfprintf(f *Struct__IO_FILE, c int8, w int32, l int32, fl int32) { var pad [256]int8 if uint32(fl)&73728 != 0 || l >= w { return @@ -335,7 +335,7 @@ func _cgos_fmt_u_vfprintf(x uint64, s *int8) *int8 { type compiler_defines_long_double_incorrectly = int32 -func _cgos_fmt_fp_vfprintf(f *struct__IO_FILE, y float64, w int32, p int32, fl int32, t int32) int32 { +func _cgos_fmt_fp_vfprintf(f *Struct__IO_FILE, y float64, w int32, p int32, fl int32, t int32) int32 { var big [126]uint32 var a *uint32 var d *uint32 @@ -1056,7 +1056,7 @@ func _cgos_getint_vfprintf(s **int8) int32 { } return i } -func _cgos_printf_core_vfprintf(f *struct__IO_FILE, fmt *int8, ap *[]interface { +func _cgos_printf_core_vfprintf(f *Struct__IO_FILE, fmt *int8, ap *[]interface { }, nl_arg *_cgos_arg_vfprintf, nl_type *int32) int32 { var ( _tag_cgo1 int32 @@ -1646,7 +1646,7 @@ overflow: *__errno_location() = int32(75) return -1 } -func Vfprintf(f *struct__IO_FILE, fmt *int8, ap []interface { +func Vfprintf(f *Struct__IO_FILE, fmt *int8, ap []interface { }) int32 { var ap2 []interface { } @@ -1661,56 +1661,56 @@ func Vfprintf(f *struct__IO_FILE, fmt *int8, ap []interface { return -1 } var __need_unlock int32 = func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - olderr = int32(f.flags & uint32(32)) - if f.mode < int32(1) { - f.flags &= uint32(4294967263) + olderr = int32(f.Flags & uint32(32)) + if f.Mode < int32(1) { + f.Flags &= uint32(4294967263) } - if !(f.buf_size != 0) { - saved_buf = f.buf - f.buf = (*uint8)(unsafe.Pointer(&internal_buf)) - f.buf_size = uint64(80) - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + if !(f.Buf_size != 0) { + saved_buf = f.Buf + f.Buf = (*uint8)(unsafe.Pointer(&internal_buf)) + f.Buf_size = uint64(80) + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() } - if !(f.wend != nil) && __towrite(f) != 0 { + if !(f.Wend != nil) && __towrite(f) != 0 { ret = -1 } else { ret = _cgos_printf_core_vfprintf(f, fmt, &ap2, (*_cgos_arg_vfprintf)(unsafe.Pointer(&nl_arg)), (*int32)(unsafe.Pointer(&nl_type))) } if saved_buf != nil { - f.write(f, nil, uint64(0)) - if !(f.wpos != nil) { + f.Write(f, nil, uint64(0)) + if !(f.Wpos != nil) { ret = -1 } - f.buf = saved_buf - f.buf_size = uint64(0) - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Buf = saved_buf + f.Buf_size = uint64(0) + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() } - if f.flags&uint32(32) != 0 { + if f.Flags&uint32(32) != 0 { ret = -1 } - f.flags |= uint32(olderr) + f.Flags |= uint32(olderr) for { if __need_unlock != 0 { __unlockfile(f) diff --git a/vsnprintf.c.i.go b/vsnprintf.c.i.go index c3250ad9..03a53c83 100644 --- a/vsnprintf.c.i.go +++ b/vsnprintf.c.i.go @@ -7,17 +7,17 @@ type _cgos_cookie_vsnprintf struct { n uint64 } -func _cgos_sn_write_vsnprintf(f *struct__IO_FILE, s *uint8, l uint64) uint64 { - var c *_cgos_cookie_vsnprintf = (*_cgos_cookie_vsnprintf)(f.cookie) +func _cgos_sn_write_vsnprintf(f *Struct__IO_FILE, s *uint8, l uint64) uint64 { + var c *_cgos_cookie_vsnprintf = (*_cgos_cookie_vsnprintf)(f.Cookie) var k uint64 = func() uint64 { - if c.n < uint64(uintptr(unsafe.Pointer(f.wpos))-uintptr(unsafe.Pointer(f.wbase))) { + if c.n < uint64(uintptr(unsafe.Pointer(f.Wpos))-uintptr(unsafe.Pointer(f.Wbase))) { return c.n } else { - return uint64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase))) + return uint64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase))) } }() if k != 0 { - Memcpy(unsafe.Pointer(c.s), unsafe.Pointer(f.wbase), k) + Memcpy(unsafe.Pointer(c.s), unsafe.Pointer(f.Wbase), k) *(*uintptr)(unsafe.Pointer(&c.s)) += uintptr(k) c.n -= k } @@ -34,9 +34,9 @@ func _cgos_sn_write_vsnprintf(f *struct__IO_FILE, s *uint8, l uint64) uint64 { c.n -= k } *c.s = int8(0) - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase - *_cgo_addr = f.buf + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase + *_cgo_addr = f.Buf return *_cgo_addr }() return l @@ -58,7 +58,7 @@ func Vsnprintf(s *int8, n uint64, fmt *int8, ap []interface { return uint64(0) } }()} - var f struct__IO_FILE = struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, nil, _cgos_sn_write_vsnprintf, nil, (*uint8)(unsafe.Pointer(&buf)), 0, nil, nil, 0, 0, 0, 0, -1, -1, unsafe.Pointer(&c), 0, nil, nil, nil, 0, 0, nil, nil, nil} + var f Struct__IO_FILE = Struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, nil, _cgos_sn_write_vsnprintf, nil, (*uint8)(unsafe.Pointer(&buf)), 0, nil, nil, 0, 0, 0, 0, -1, -1, unsafe.Pointer(&c), 0, nil, nil, nil, 0, 0, nil, nil, nil} if n > uint64(2147483647) { *__errno_location() = int32(75) return -1 diff --git a/vsscanf.c.i.go b/vsscanf.c.i.go index acae41f2..7eb7326b 100644 --- a/vsscanf.c.i.go +++ b/vsscanf.c.i.go @@ -2,8 +2,8 @@ package libc import unsafe "unsafe" -func _cgos_string_read_vsscanf(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var src *int8 = (*int8)(f.cookie) +func _cgos_string_read_vsscanf(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var src *int8 = (*int8)(f.Cookie) var k uint64 = len + uint64(256) var end *int8 = (*int8)(Memchr(unsafe.Pointer(src), int32(0), k)) if end != nil { @@ -13,13 +13,13 @@ func _cgos_string_read_vsscanf(f *struct__IO_FILE, buf *uint8, len uint64) uint6 len = k } Memcpy(unsafe.Pointer(buf), unsafe.Pointer(src), len) - f.rpos = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(len))))) - f.rend = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(k))))) - f.cookie = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(k)))) + f.Rpos = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(len))))) + f.Rend = (*uint8)(unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(k))))) + f.Cookie = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer(src)) + uintptr(k)))) return len } func Vsscanf(s *int8, fmt *int8, ap []interface { }) int32 { - var f struct__IO_FILE = struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, _cgos_string_read_vsscanf, nil, nil, (*uint8)(unsafe.Pointer(s)), 0, nil, nil, 0, 0, 0, 0, -1, 0, unsafe.Pointer(s), 0, nil, nil, nil, 0, 0, nil, nil, nil} + var f Struct__IO_FILE = Struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, _cgos_string_read_vsscanf, nil, nil, (*uint8)(unsafe.Pointer(s)), 0, nil, nil, 0, 0, 0, 0, -1, 0, unsafe.Pointer(s), 0, nil, nil, nil, 0, 0, nil, nil, nil} return Vfscanf(&f, fmt, ap) } diff --git a/vswscanf.c.i.go b/vswscanf.c.i.go index 63beb658..c393ec43 100644 --- a/vswscanf.c.i.go +++ b/vswscanf.c.i.go @@ -2,29 +2,29 @@ package libc import unsafe "unsafe" -func _cgos_wstring_read_vswscanf(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var src *uint32 = (*uint32)(f.cookie) +func _cgos_wstring_read_vswscanf(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var src *uint32 = (*uint32)(f.Cookie) var k uint64 if !(src != nil) { return uint64(0) } - k = wcsrtombs((*int8)(unsafe.Pointer(f.buf)), &src, f.buf_size, nil) + k = wcsrtombs((*int8)(unsafe.Pointer(f.Buf)), &src, f.Buf_size, nil) if k == uint64(18446744073709551615) { - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return uint64(0) } - f.rpos = f.buf - f.rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(k))) - f.cookie = unsafe.Pointer(src) + f.Rpos = f.Buf + f.Rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(k))) + f.Cookie = unsafe.Pointer(src) if !(len != 0) || !(k != 0) { return uint64(0) } *buf = *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -34,6 +34,6 @@ func _cgos_wstring_read_vswscanf(f *struct__IO_FILE, buf *uint8, len uint64) uin func vswscanf(s *uint32, fmt *uint32, ap []interface { }) int32 { var buf [256]uint8 - var f struct__IO_FILE = struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, _cgos_wstring_read_vswscanf, nil, nil, (*uint8)(unsafe.Pointer(&buf)), 256, nil, nil, 0, 0, 0, 0, -1, 0, unsafe.Pointer(s), 0, nil, nil, nil, 0, 0, nil, nil, nil} + var f Struct__IO_FILE = Struct__IO_FILE{0, nil, nil, nil, nil, nil, nil, nil, _cgos_wstring_read_vswscanf, nil, nil, (*uint8)(unsafe.Pointer(&buf)), 256, nil, nil, 0, 0, 0, 0, -1, 0, unsafe.Pointer(s), 0, nil, nil, nil, 0, 0, nil, nil, nil} return vfwscanf(&f, fmt, ap) } diff --git a/wcscasecmp_l.c.i.go b/wcscasecmp_l.c.i.go index 864c4431..2f731541 100644 --- a/wcscasecmp_l.c.i.go +++ b/wcscasecmp_l.c.i.go @@ -1,5 +1,5 @@ package libc -func wcscasecmp_l(l *uint32, r *uint32, locale *struct___locale_struct) int32 { +func wcscasecmp_l(l *uint32, r *uint32, locale *Struct___locale_struct) int32 { return wcscasecmp(l, r) } diff --git a/wcsncasecmp_l.c.i.go b/wcsncasecmp_l.c.i.go index 5ae3a53e..174f1ef3 100644 --- a/wcsncasecmp_l.c.i.go +++ b/wcsncasecmp_l.c.i.go @@ -1,5 +1,5 @@ package libc -func wcsncasecmp_l(l *uint32, r *uint32, n uint64, locale *struct___locale_struct) int32 { +func wcsncasecmp_l(l *uint32, r *uint32, n uint64, locale *Struct___locale_struct) int32 { return wcsncasecmp(l, r, n) } diff --git a/wctrans.c.i.go b/wctrans.c.i.go index 962aa263..c92173b4 100644 --- a/wctrans.c.i.go +++ b/wctrans.c.i.go @@ -20,9 +20,9 @@ func towctrans(wc uint32, trans *int32) uint32 { } return wc } -func __wctrans_l(s *int8, l *struct___locale_struct) *int32 { +func __wctrans_l(s *int8, l *Struct___locale_struct) *int32 { return wctrans(s) } -func __towctrans_l(c uint32, t *int32, l *struct___locale_struct) uint32 { +func __towctrans_l(c uint32, t *int32, l *Struct___locale_struct) uint32 { return towctrans(c, t) } diff --git a/wordexp.c.i.go b/wordexp.c.i.go index 078d84a2..4a758baf 100644 --- a/wordexp.c.i.go +++ b/wordexp.c.i.go @@ -7,7 +7,7 @@ func _cgos_reap_wordexp(pid int32) { for waitpid(pid, &status, int32(0)) < int32(0) && *__errno_location() == int32(4) { } } -func _cgos_getword_wordexp(f *struct__IO_FILE) *int8 { +func _cgos_getword_wordexp(f *Struct__IO_FILE) *int8 { var s *int8 = nil return func() *int8 { if Getdelim(&s, (*uint64)(unsafe.Pointer(&[1]uint64{uint64(0)})), int32(0), f) < int64(0) { @@ -33,12 +33,12 @@ func _cgos_do_wordexp_wordexp(s *int8, we *_cgoa_18_wordexp, flags int32) int32 } }() var err int32 = int32(0) - var f *struct__IO_FILE + var f *Struct__IO_FILE var wc uint64 = uint64(0) var wv **int8 = nil var p [2]int32 var pid int32 - var set struct___sigset_t + var set Struct___sigset_t if flags&int32(8) != 0 { wordfree(we) } diff --git a/x2g__ctype_get_mb_cur_max.c.i.go b/x2g__ctype_get_mb_cur_max.c.i.go index 183f8e47..d14a1ec6 100644 --- a/x2g__ctype_get_mb_cur_max.c.i.go +++ b/x2g__ctype_get_mb_cur_max.c.i.go @@ -2,9 +2,9 @@ package libc import unsafe "unsafe" -func __ctype_get_mb_cur_max() uint64 { +func X__ctype_get_mb_cur_max() uint64 { return uint64(func() int32 { - if !!(*(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().locale.cat)))) + uintptr(int32(0))*8)) != nil) { + if !!(*(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().Locale.Cat)))) + uintptr(int32(0))*8)) != nil) { return int32(4) } else { return int32(1) diff --git a/x2g__errno_location.c.i.go b/x2g__errno_location.c.i.go index 12faf6db..a7fbf5ae 100644 --- a/x2g__errno_location.c.i.go +++ b/x2g__errno_location.c.i.go @@ -1,5 +1,5 @@ package libc func __errno_location() *int32 { - return &__pthread_self().errno_val + return &__pthread_self().Errno_val } diff --git a/x2g__fclose_ca.c.i.go b/x2g__fclose_ca.c.i.go index 42c7afc5..e56d9f48 100644 --- a/x2g__fclose_ca.c.i.go +++ b/x2g__fclose_ca.c.i.go @@ -1,5 +1,5 @@ package libc -func __fclose_ca(f *struct__IO_FILE) int32 { - return f.close(f) +func __fclose_ca(f *Struct__IO_FILE) int32 { + return f.Close(f) } diff --git a/x2g__fdopen.c.i.go b/x2g__fdopen.c.i.go index 0d7fd245..181e71ca 100644 --- a/x2g__fdopen.c.i.go +++ b/x2g__fdopen.c.i.go @@ -2,23 +2,23 @@ package libc import unsafe "unsafe" -func __fdopen(fd int32, mode *int8) *struct__IO_FILE { - var f *struct__IO_FILE - var wsz struct_winsize +func __fdopen(fd int32, mode *int8) *Struct__IO_FILE { + var f *Struct__IO_FILE + var wsz Struct_winsize if !(Strchr((*int8)(unsafe.Pointer(&[4]int8{'r', 'w', 'a', '\x00'})), int32(*mode)) != nil) { *__errno_location() = int32(22) - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } - if !(func() (_cgo_ret *struct__IO_FILE) { + if !(func() (_cgo_ret *Struct__IO_FILE) { _cgo_addr := &f - *_cgo_addr = (*struct__IO_FILE)(Malloc(1264)) + *_cgo_addr = (*Struct__IO_FILE)(Malloc(1264)) return *_cgo_addr }() != nil) { - return (*struct__IO_FILE)(nil) + return (*Struct__IO_FILE)(nil) } Memset(unsafe.Pointer(f), int32(0), 232) if !(Strchr(mode, '+') != nil) { - f.flags = uint32(func() int32 { + f.Flags = uint32(func() int32 { if int32(*mode) == 'r' { return int32(8) } else { @@ -34,21 +34,21 @@ func __fdopen(fd int32, mode *int8) *struct__IO_FILE { if !(flags&int32(1024) != 0) { __syscall3(int64(92), int64(fd), int64(4), int64(flags|int32(1024))) } - f.flags |= uint32(128) + f.Flags |= uint32(128) } - f.fd = fd - f.buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(f))))+uintptr(232))))) + uintptr(int32(8)))) - f.buf_size = uint64(1024) - f.lbf = -1 - if !(f.flags&uint32(8) != 0) && !(__syscall3(int64(54), int64(fd), int64(21523), int64(uintptr(unsafe.Pointer(&wsz)))) != 0) { - f.lbf = int32('\n') + f.Fd = fd + f.Buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer((*uint8)(unsafe.Pointer(f))))+uintptr(232))))) + uintptr(int32(8)))) + f.Buf_size = uint64(1024) + f.Lbf = -1 + if !(f.Flags&uint32(8) != 0) && !(__syscall3(int64(54), int64(fd), int64(21523), int64(uintptr(unsafe.Pointer(&wsz)))) != 0) { + f.Lbf = int32('\n') } - f.read = __stdio_read - f.write = __stdio_write - f.seek = __stdio_seek - f.close = __stdio_close + f.Read = __stdio_read + f.Write = __stdio_write + f.Seek = __stdio_seek + f.Close = __stdio_close if !(__libc.threaded != 0) { - f.lock = -1 + f.Lock = -1 } return __ofl_add(f) } diff --git a/x2g__fopen_rb_ca.c.i.go b/x2g__fopen_rb_ca.c.i.go index 5077c263..5b01a0f2 100644 --- a/x2g__fopen_rb_ca.c.i.go +++ b/x2g__fopen_rb_ca.c.i.go @@ -2,19 +2,19 @@ package libc import unsafe "unsafe" -func __fopen_rb_ca(filename *int8, f *struct__IO_FILE, buf *uint8, len uint64) *struct__IO_FILE { +func __fopen_rb_ca(filename *int8, f *Struct__IO_FILE, buf *uint8, len uint64) *Struct__IO_FILE { Memset(unsafe.Pointer(f), int32(0), 232) - f.fd = int32(__syscall2_r1(int64(5), int64(uintptr(unsafe.Pointer(filename))), int64(655360))) - if f.fd < int32(0) { - return (*struct__IO_FILE)(nil) + f.Fd = int32(__syscall2_r1(int64(5), int64(uintptr(unsafe.Pointer(filename))), int64(655360))) + if f.Fd < int32(0) { + return (*Struct__IO_FILE)(nil) } - __syscall3(int64(92), int64(f.fd), int64(2), int64(1)) - f.flags = uint32(9) - f.buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(int32(8)))) - f.buf_size = len - uint64(8) - f.read = __stdio_read - f.seek = __stdio_seek - f.close = __stdio_close - f.lock = -1 + __syscall3(int64(92), int64(f.Fd), int64(2), int64(1)) + f.Flags = uint32(9) + f.Buf = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(int32(8)))) + f.Buf_size = len - uint64(8) + f.Read = __stdio_read + f.Seek = __stdio_seek + f.Close = __stdio_close + f.Lock = -1 return f } diff --git a/x2g__fpclassifyf.c.i.go b/x2g__fpclassifyf.c.i.go index 5ed997c2..28d4fbc9 100644 --- a/x2g__fpclassifyf.c.i.go +++ b/x2g__fpclassifyf.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func __fpclassifyf(x float32) int32 { +func X__fpclassifyf(x float32) int32 { type _cgoa_18___fpclassifyf struct { f float32 } diff --git a/x2g__lctrans.c.i.go b/x2g__lctrans.c.i.go index 8034b7ac..86ceab1e 100644 --- a/x2g__lctrans.c.i.go +++ b/x2g__lctrans.c.i.go @@ -9,5 +9,5 @@ func __lctrans(msg *int8, lm *struct___locale_map) *int8 { return __lctrans_impl(msg, lm) } func __lctrans_cur(msg *int8) *int8 { - return __lctrans_impl(msg, *(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().locale.cat)))) + uintptr(int32(5))*8))) + return __lctrans_impl(msg, *(**struct___locale_map)(unsafe.Pointer(uintptr(unsafe.Pointer((**struct___locale_map)(unsafe.Pointer(&__pthread_self().Locale.Cat)))) + uintptr(int32(5))*8))) } diff --git a/x2g__lockfile.c.i.go b/x2g__lockfile.c.i.go index 4f9bcc85..66006e13 100644 --- a/x2g__lockfile.c.i.go +++ b/x2g__lockfile.c.i.go @@ -2,29 +2,29 @@ package libc import unsafe "unsafe" -func __lockfile(f *struct__IO_FILE) int32 { - var owner int32 = f.lock - var tid int32 = __pthread_self().tid +func __lockfile(f *Struct__IO_FILE) int32 { + var owner int32 = f.Lock + var tid int32 = __pthread_self().Tid if owner&-1073741825 == tid { return int32(0) } - owner = a_cas(&f.lock, int32(0), tid) + owner = a_cas(&f.Lock, int32(0), tid) if !(owner != 0) { return int32(1) } for func() (_cgo_ret int32) { _cgo_addr := &owner - *_cgo_addr = a_cas(&f.lock, int32(0), tid|int32(1073741824)) + *_cgo_addr = a_cas(&f.Lock, int32(0), tid|int32(1073741824)) return *_cgo_addr }() != 0 { - if owner&int32(1073741824) != 0 || a_cas(&f.lock, owner, owner|int32(1073741824)) == owner { - __futexwait(unsafe.Pointer(&f.lock), owner|int32(1073741824), int32(1)) + if owner&int32(1073741824) != 0 || a_cas(&f.Lock, owner, owner|int32(1073741824)) == owner { + __futexwait(unsafe.Pointer(&f.Lock), owner|int32(1073741824), int32(1)) } } return int32(1) } -func __unlockfile(f *struct__IO_FILE) { - if a_swap(&f.lock, int32(0))&int32(1073741824) != 0 { - __wake(unsafe.Pointer(&f.lock), int32(1), int32(1)) +func __unlockfile(f *Struct__IO_FILE) { + if a_swap(&f.Lock, int32(0))&int32(1073741824) != 0 { + __wake(unsafe.Pointer(&f.Lock), int32(1), int32(1)) } } diff --git a/x2g__overflow.c.i.go b/x2g__overflow.c.i.go index 64c34d5f..8d087643 100644 --- a/x2g__overflow.c.i.go +++ b/x2g__overflow.c.i.go @@ -2,15 +2,15 @@ package libc import unsafe "unsafe" -func __overflow(f *struct__IO_FILE, _c int32) int32 { +func __overflow(f *Struct__IO_FILE, _c int32) int32 { var c uint8 = uint8(_c) - if !(f.wend != nil) && __towrite(f) != 0 { + if !(f.Wend != nil) && __towrite(f) != 0 { return -1 } - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wend)) && int32(c) != f.lbf { + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wend)) && int32(c) != f.Lbf { return int32(func() (_cgo_ret uint8) { _cgo_addr := &*func() (_cgo_ret *uint8) { - _cgo_addr := &f.wpos + _cgo_addr := &f.Wpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return @@ -19,7 +19,7 @@ func __overflow(f *struct__IO_FILE, _c int32) int32 { return *_cgo_addr }()) } - if f.write(f, &c, uint64(1)) != uint64(1) { + if f.Write(f, &c, uint64(1)) != uint64(1) { return -1 } return int32(c) diff --git a/x2g__signbitf.c.i.go b/x2g__signbitf.c.i.go index 349ddcaa..dcc9ea80 100644 --- a/x2g__signbitf.c.i.go +++ b/x2g__signbitf.c.i.go @@ -2,7 +2,7 @@ package libc import unsafe "unsafe" -func __signbitf(x float32) int32 { +func X__signbitf(x float32) int32 { type _cgoa_18___signbitf struct { f float32 } diff --git a/x2g__stdio_close.c.i.go b/x2g__stdio_close.c.i.go index 52e88130..5ba8dbbc 100644 --- a/x2g__stdio_close.c.i.go +++ b/x2g__stdio_close.c.i.go @@ -3,6 +3,6 @@ package libc func _cgos_dummy___stdio_close(fd int32) int32 { return fd } -func __stdio_close(f *struct__IO_FILE) int32 { - return int32(__syscall1_r1(int64(6), int64(__aio_close(f.fd)))) +func __stdio_close(f *Struct__IO_FILE) int32 { + return int32(__syscall1_r1(int64(6), int64(__aio_close(f.Fd)))) } diff --git a/x2g__stdio_exit.c.i.go b/x2g__stdio_exit.c.i.go index 60910c93..09137139 100644 --- a/x2g__stdio_exit.c.i.go +++ b/x2g__stdio_exit.c.i.go @@ -2,29 +2,29 @@ package libc import unsafe "unsafe" -var _cgos_dummy_file___stdio_exit *struct__IO_FILE = nil +var _cgos_dummy_file___stdio_exit *Struct__IO_FILE = nil -func _cgos_close_file___stdio_exit(f *struct__IO_FILE) { +func _cgos_close_file___stdio_exit(f *Struct__IO_FILE) { if !(f != nil) { return } func() int32 { - if f.lock >= int32(0) { + if f.Lock >= int32(0) { return __lockfile(f) } else { return int32(0) } }() - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { - f.write(f, nil, uint64(0)) + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { + f.Write(f, nil, uint64(0)) } - if uintptr(unsafe.Pointer(f.rpos)) != uintptr(unsafe.Pointer(f.rend)) { - f.seek(f, int64(uintptr(unsafe.Pointer(f.rpos))-uintptr(unsafe.Pointer(f.rend))), int32(1)) + if uintptr(unsafe.Pointer(f.Rpos)) != uintptr(unsafe.Pointer(f.Rend)) { + f.Seek(f, int64(uintptr(unsafe.Pointer(f.Rpos))-uintptr(unsafe.Pointer(f.Rend))), int32(1)) } } func __stdio_exit() { - var f *struct__IO_FILE - for f = *__ofl_lock(); f != nil; f = f.next { + var f *Struct__IO_FILE + for f = *__ofl_lock(); f != nil; f = f.Next { _cgos_close_file___stdio_exit(f) } _cgos_close_file___stdio_exit(__stdin_used) diff --git a/x2g__stdio_read.c.i.go b/x2g__stdio_read.c.i.go index f7ea96a8..ffe2d41c 100644 --- a/x2g__stdio_read.c.i.go +++ b/x2g__stdio_read.c.i.go @@ -2,24 +2,24 @@ package libc import unsafe "unsafe" -func __stdio_read(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var iov [2]struct_iovec = [2]struct_iovec{struct_iovec{unsafe.Pointer(buf), len - func() uint64 { - if !!(f.buf_size != 0) { +func __stdio_read(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var iov [2]Struct_iovec = [2]Struct_iovec{Struct_iovec{unsafe.Pointer(buf), len - func() uint64 { + if !!(f.Buf_size != 0) { return 1 } else { return 0 } - }()}, struct_iovec{unsafe.Pointer(f.buf), f.buf_size}} + }()}, Struct_iovec{unsafe.Pointer(f.Buf), f.Buf_size}} var cnt int64 cnt = func() int64 { - if (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).iov_len != 0 { - return __syscall3_r1(int64(120), int64(f.fd), int64(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov))))), int64(2)) + if (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).Iov_len != 0 { + return __syscall3_r1(int64(120), int64(f.Fd), int64(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov))))), int64(2)) } else { - return __syscall3_r1(int64(3), int64(f.fd), int64(uintptr((*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(1))*16))).iov_base)), int64((*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(1))*16))).iov_len)) + return __syscall3_r1(int64(3), int64(f.Fd), int64(uintptr((*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(1))*16))).Iov_base)), int64((*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(1))*16))).Iov_len)) } }() if cnt <= int64(0) { - f.flags |= uint32(func() int32 { + f.Flags |= uint32(func() int32 { if cnt != 0 { return int32(32) } else { @@ -28,15 +28,15 @@ func __stdio_read(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { }()) return uint64(0) } - if uint64(cnt) <= (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).iov_len { + if uint64(cnt) <= (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).Iov_len { return uint64(cnt) } - cnt -= int64((*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).iov_len) - f.rpos = f.buf - f.rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(cnt))) - if f.buf_size != 0 { + cnt -= int64((*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer((*Struct_iovec)(unsafe.Pointer(&iov)))) + uintptr(int32(0))*16))).Iov_len) + f.Rpos = f.Buf + f.Rend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(cnt))) + if f.Buf_size != 0 { *(*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(buf)) + uintptr(len-uint64(1)))) = *func() (_cgo_ret *uint8) { - _cgo_addr := &f.rpos + _cgo_addr := &f.Rpos _cgo_ret = *_cgo_addr *(*uintptr)(unsafe.Pointer(_cgo_addr))++ return diff --git a/x2g__stdio_seek.c.i.go b/x2g__stdio_seek.c.i.go index bbcdb31c..d30c0e66 100644 --- a/x2g__stdio_seek.c.i.go +++ b/x2g__stdio_seek.c.i.go @@ -1,5 +1,5 @@ package libc -func __stdio_seek(f *struct__IO_FILE, off int64, whence int32) int64 { - return __lseek(f.fd, off, whence) +func __stdio_seek(f *Struct__IO_FILE, off int64, whence int32) int64 { + return __lseek(f.Fd, off, whence) } diff --git a/x2g__stdio_write.c.i.go b/x2g__stdio_write.c.i.go index d9662011..68b64a0c 100644 --- a/x2g__stdio_write.c.i.go +++ b/x2g__stdio_write.c.i.go @@ -2,50 +2,50 @@ package libc import unsafe "unsafe" -func __stdio_write(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var iovs [2]struct_iovec = [2]struct_iovec{struct_iovec{unsafe.Pointer(f.wbase), uint64(uintptr(unsafe.Pointer(f.wpos)) - uintptr(unsafe.Pointer(f.wbase)))}, struct_iovec{unsafe.Pointer(buf), len}} - var iov *struct_iovec = (*struct_iovec)(unsafe.Pointer(&iovs)) - var rem uint64 = (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_len + (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(1))*16))).iov_len +func __stdio_write(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var iovs [2]Struct_iovec = [2]Struct_iovec{Struct_iovec{unsafe.Pointer(f.Wbase), uint64(uintptr(unsafe.Pointer(f.Wpos)) - uintptr(unsafe.Pointer(f.Wbase)))}, Struct_iovec{unsafe.Pointer(buf), len}} + var iov *Struct_iovec = (*Struct_iovec)(unsafe.Pointer(&iovs)) + var rem uint64 = (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_len + (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(1))*16))).Iov_len var iovcnt int32 = int32(2) var cnt int64 for { - cnt = __syscall3_r1(int64(121), int64(f.fd), int64(uintptr(unsafe.Pointer(iov))), int64(iovcnt)) + cnt = __syscall3_r1(int64(121), int64(f.Fd), int64(uintptr(unsafe.Pointer(iov))), int64(iovcnt)) if uint64(cnt) == rem { - f.wend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(f.buf_size))) - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase - *_cgo_addr = f.buf + f.Wend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(f.Buf_size))) + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase + *_cgo_addr = f.Buf return *_cgo_addr }() return len } if cnt < int64(0) { - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - f.flags |= uint32(32) + f.Flags |= uint32(32) return func() uint64 { if iovcnt == int32(2) { return uint64(0) } else { - return len - (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_len + return len - (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_len } }() } rem -= uint64(cnt) - if uint64(cnt) > (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_len { - cnt -= int64((*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_len) + if uint64(cnt) > (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_len { + cnt -= int64((*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_len) *(*uintptr)(unsafe.Pointer(&iov)) += 16 iovcnt-- } - (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_base = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)((*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_base))) + uintptr(cnt)))) - (*(*struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).iov_len -= uint64(cnt) + (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_base = unsafe.Pointer((*int8)(unsafe.Pointer(uintptr(unsafe.Pointer((*int8)((*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_base))) + uintptr(cnt)))) + (*(*Struct_iovec)(unsafe.Pointer(uintptr(unsafe.Pointer(iov)) + uintptr(int32(0))*16))).Iov_len -= uint64(cnt) } return 0 } diff --git a/x2g__stdout_write.c.i.go b/x2g__stdout_write.c.i.go index 1dda3eff..e29512ea 100644 --- a/x2g__stdout_write.c.i.go +++ b/x2g__stdout_write.c.i.go @@ -2,11 +2,11 @@ package libc import unsafe "unsafe" -func __stdout_write(f *struct__IO_FILE, buf *uint8, len uint64) uint64 { - var wsz struct_winsize - f.write = __stdio_write - if !(f.flags&uint32(64) != 0) && __syscall3(int64(54), int64(f.fd), int64(21523), int64(uintptr(unsafe.Pointer(&wsz)))) != 0 { - f.lbf = -1 +func __stdout_write(f *Struct__IO_FILE, buf *uint8, len uint64) uint64 { + var wsz Struct_winsize + f.Write = __stdio_write + if !(f.Flags&uint32(64) != 0) && __syscall3(int64(54), int64(f.Fd), int64(21523), int64(uintptr(unsafe.Pointer(&wsz)))) != 0 { + f.Lbf = -1 } return __stdio_write(f, buf, len) } diff --git a/x2g__toread.c.i.go b/x2g__toread.c.i.go index 71e339a4..2b9dde44 100644 --- a/x2g__toread.c.i.go +++ b/x2g__toread.c.i.go @@ -2,31 +2,31 @@ package libc import unsafe "unsafe" -func __toread(f *struct__IO_FILE) int32 { - f.mode |= f.mode - int32(1) - if uintptr(unsafe.Pointer(f.wpos)) != uintptr(unsafe.Pointer(f.wbase)) { - f.write(f, nil, uint64(0)) +func __toread(f *Struct__IO_FILE) int32 { + f.Mode |= f.Mode - int32(1) + if uintptr(unsafe.Pointer(f.Wpos)) != uintptr(unsafe.Pointer(f.Wbase)) { + f.Write(f, nil, uint64(0)) } - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase *_cgo_addr = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wend + _cgo_addr := &f.Wend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() return *_cgo_addr }() - if f.flags&uint32(4) != 0 { - f.flags |= uint32(32) + if f.Flags&uint32(4) != 0 { + f.Flags |= uint32(32) return -1 } - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend - *_cgo_addr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(f.buf_size))) + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend + *_cgo_addr = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(f.Buf_size))) return *_cgo_addr }() return func() int32 { - if f.flags&uint32(16) != 0 { + if f.Flags&uint32(16) != 0 { return -1 } else { return int32(0) diff --git a/x2g__towrite.c.i.go b/x2g__towrite.c.i.go index 25ac4296..98e64207 100644 --- a/x2g__towrite.c.i.go +++ b/x2g__towrite.c.i.go @@ -2,23 +2,23 @@ package libc import unsafe "unsafe" -func __towrite(f *struct__IO_FILE) int32 { - f.mode |= f.mode - int32(1) - if f.flags&uint32(8) != 0 { - f.flags |= uint32(32) +func __towrite(f *Struct__IO_FILE) int32 { + f.Mode |= f.Mode - int32(1) + if f.Flags&uint32(8) != 0 { + f.Flags |= uint32(32) return -1 } - f.rpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.rend + f.Rpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Rend *_cgo_addr = (*uint8)(nil) return *_cgo_addr }() - f.wpos = func() (_cgo_ret *uint8) { - _cgo_addr := &f.wbase - *_cgo_addr = f.buf + f.Wpos = func() (_cgo_ret *uint8) { + _cgo_addr := &f.Wbase + *_cgo_addr = f.Buf return *_cgo_addr }() - f.wend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.buf)) + uintptr(f.buf_size))) + f.Wend = (*uint8)(unsafe.Pointer(uintptr(unsafe.Pointer(f.Buf)) + uintptr(f.Buf_size))) return int32(0) } func __towrite_needs_stdio_exit() { diff --git a/x2g__uflow.c.i.go b/x2g__uflow.c.i.go index 67df3a3d..ae079cb7 100644 --- a/x2g__uflow.c.i.go +++ b/x2g__uflow.c.i.go @@ -1,8 +1,8 @@ package libc -func __uflow(f *struct__IO_FILE) int32 { +func __uflow(f *Struct__IO_FILE) int32 { var c uint8 - if !(__toread(f) != 0) && f.read(f, &c, uint64(1)) == uint64(1) { + if !(__toread(f) != 0) && f.Read(f, &c, uint64(1)) == uint64(1) { return int32(c) } return -1 diff --git a/z_pthread.go b/z_pthread.go index ecf67f8b..9bdd9177 100644 --- a/z_pthread.go +++ b/z_pthread.go @@ -10,12 +10,12 @@ var ( c2go_gtls sync.Map ) -func __pthread_self() (self *struct___pthread) { +func __pthread_self() (self Pthread_t) { id := goid.Get() if ret, ok := c2go_gtls.Load(id); ok { - self = ret.(*struct___pthread) + self = ret.(*Struct___pthread) } else { - self = &struct___pthread{tid: int32(id)} + self = &Struct___pthread{Tid: int32(id)} c2go_gtls.Store(id, self) } return diff --git a/z_syscall_unix.go b/z_syscall_unix.go index fec2b458..14c572d0 100644 --- a/z_syscall_unix.go +++ b/z_syscall_unix.go @@ -9,7 +9,7 @@ import ( func __syscall0(n int64) int64 { r1, _, ret := syscall.Syscall(uintptr(n), 0, 0, 0) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -20,7 +20,7 @@ func __syscall0_r1(n int64) int64 { func __syscall1(n int64, a int64) int64 { r1, _, ret := syscall.Syscall(uintptr(n), uintptr(a), 0, 0) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -31,7 +31,7 @@ func __syscall1_r1(n int64, a int64) int64 { func __syscall2(n int64, a, b int64) int64 { r1, _, ret := syscall.Syscall(uintptr(n), uintptr(a), uintptr(b), 0) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -42,7 +42,7 @@ func __syscall2_r1(n int64, a, b int64) int64 { func __syscall3(n int64, a int64, b int64, c int64) int64 { r1, _, ret := syscall.Syscall(uintptr(n), uintptr(a), uintptr(b), uintptr(c)) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -53,7 +53,7 @@ func __syscall3_r1(n int64, a int64, b int64, c int64) int64 { func __syscall4(n int64, a int64, b int64, c int64, d int64) int64 { r1, _, ret := syscall.Syscall6(uintptr(n), uintptr(a), uintptr(b), uintptr(c), uintptr(d), 0, 0) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -64,7 +64,7 @@ func __syscall4_r1(n int64, a int64, b int64, c int64, d int64) int64 { func __syscall5(n int64, a int64, b int64, c int64, d int64, e int64) int64 { r1, _, ret := syscall.Syscall6(uintptr(n), uintptr(a), uintptr(b), uintptr(c), uintptr(d), uintptr(e), 0) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -75,7 +75,7 @@ func __syscall5_r1(n int64, a int64, b int64, c int64, d int64, e int64) int64 { func __syscall6(n int64, a int64, b int64, c int64, d int64, e int64, f int64) int64 { r1, _, ret := syscall.Syscall6(uintptr(n), uintptr(a), uintptr(b), uintptr(c), uintptr(d), uintptr(e), uintptr(f)) - __pthread_self().sys_r1 = int64(r1) + __pthread_self().Sys_r1 = int64(r1) return int64(ret) } @@ -89,5 +89,5 @@ func __syscall_cp(n int64, a int64, b int64, c int64, d int64, e int64, f int64) } func __syscall_ret(uint64) int64 { - return __pthread_self().sys_r1 + return __pthread_self().Sys_r1 }