From da8eeb74b9927a038e5c99079680930de9b8cd42 Mon Sep 17 00:00:00 2001 From: Fenrir Date: Tue, 15 May 2018 00:30:18 -0600 Subject: [PATCH] Update bindings for libctru 1.5.0 --- ctru-sys/bindgen.sh | 38 + ctru-sys/src/bindings.rs | 4742 +++++++++++++++++++------------------- ctru-sys/src/lib.rs | 1 - 3 files changed, 2414 insertions(+), 2367 deletions(-) create mode 100755 ctru-sys/bindgen.sh diff --git a/ctru-sys/bindgen.sh b/ctru-sys/bindgen.sh new file mode 100755 index 0000000..44453bc --- /dev/null +++ b/ctru-sys/bindgen.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +clang_version=$1 + +if [ -z "$clang_version" ]; then + echo " usage: ./bindgen.sh " + echo "example: ./bindgen.sh 5.0.0" + echo "Check your current version with \`clang -v\`." + exit 1 +fi + +set -euxo pipefail + +bindgen "$DEVKITPRO/libctru/include/3ds.h" \ + --rust-target nightly \ + --use-core \ + --distrust-clang-mangling \ + --no-doc-comments \ + --no-layout-tests \ + --ctypes-prefix "::libc" \ + --no-prepend-enum-name \ + --generate "functions,types,vars" \ + --blacklist-type "u(8|16|32|64)" \ + --blacklist-type "__builtin_va_list" \ + --blacklist-type "__va_list" \ + -- \ + --target=arm-none-eabi \ + --sysroot=$DEVKITARM/arm-none-eabi \ + -isystem$DEVKITARM/arm-none-eabi/include \ + -isystem/usr/lib/clang/$clang_version/include \ + -I$DEVKITPRO/libctru/include \ + -mfloat-abi=hard \ + -march=armv6k \ + -mtune=mpcore \ + -mfpu=vfp \ + -DARM11 \ + -D_3DS \ +> src/bindings.rs diff --git a/ctru-sys/src/bindings.rs b/ctru-sys/src/bindings.rs index c897cca..f63f286 100644 --- a/ctru-sys/src/bindings.rs +++ b/ctru-sys/src/bindings.rs @@ -1,5 +1,84 @@ /* automatically generated by rust-bindgen */ +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +pub struct __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + storage: Storage, + align: [Align; 0], +} + +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + pub fn new(storage: Storage) -> Self { + Self { storage, align: [] } + } + + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + + let bit_index = index % 8; + let mask = 1 << bit_index; + + byte & mask == mask + } + + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + + let bit_index = index % 8; + let mask = 1 << bit_index; + + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + + let mut val = 0; + + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + val |= 1 << i; + } + } + + val + } + + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + self.set_bit(i + bit_offset, val_bit_is_set); + } + } +} #[repr(C)] #[derive(Default)] pub struct __IncompleteArrayField(::core::marker::PhantomData); @@ -80,35 +159,36 @@ impl ::core::cmp::PartialEq for __BindgenUnionField { } } impl ::core::cmp::Eq for __BindgenUnionField {} -pub const _NEWLIB_VERSION_H__: libc::c_uint = 1; -pub const _NEWLIB_VERSION: &'static [u8; 6usize] = b"2.5.0\0"; -pub const __NEWLIB__: libc::c_uint = 2; -pub const __NEWLIB_MINOR__: libc::c_uint = 5; -pub const __NEWLIB_PATCHLEVEL__: libc::c_uint = 0; -pub const _DEFAULT_SOURCE: libc::c_uint = 1; -pub const _POSIX_SOURCE: libc::c_uint = 1; -pub const _POSIX_C_SOURCE: libc::c_uint = 200809; -pub const _ATFILE_SOURCE: libc::c_uint = 1; -pub const __ATFILE_VISIBLE: libc::c_uint = 1; -pub const __BSD_VISIBLE: libc::c_uint = 1; -pub const __GNU_VISIBLE: libc::c_uint = 0; -pub const __ISO_C_VISIBLE: libc::c_uint = 2011; -pub const __LARGEFILE_VISIBLE: libc::c_uint = 0; -pub const __MISC_VISIBLE: libc::c_uint = 1; -pub const __POSIX_VISIBLE: libc::c_uint = 200809; -pub const __SVID_VISIBLE: libc::c_uint = 1; -pub const __XSI_VISIBLE: libc::c_uint = 0; -pub const __have_longlong64: libc::c_uint = 1; -pub const __have_long32: libc::c_uint = 1; -pub const ___int8_t_defined: libc::c_uint = 1; -pub const ___int16_t_defined: libc::c_uint = 1; -pub const ___int32_t_defined: libc::c_uint = 1; -pub const ___int64_t_defined: libc::c_uint = 1; -pub const ___int_least8_t_defined: libc::c_uint = 1; -pub const ___int_least16_t_defined: libc::c_uint = 1; -pub const ___int_least32_t_defined: libc::c_uint = 1; -pub const ___int_least64_t_defined: libc::c_uint = 1; -pub const __int20: libc::c_uint = 2; +pub const _NEWLIB_VERSION_H__: u32 = 1; +pub const _NEWLIB_VERSION: &'static [u8; 6usize] = b"3.0.0\0"; +pub const __NEWLIB__: u32 = 3; +pub const __NEWLIB_MINOR__: u32 = 0; +pub const __NEWLIB_PATCHLEVEL__: u32 = 0; +pub const _DEFAULT_SOURCE: u32 = 1; +pub const _POSIX_SOURCE: u32 = 1; +pub const _POSIX_C_SOURCE: u32 = 200809; +pub const _ATFILE_SOURCE: u32 = 1; +pub const __ATFILE_VISIBLE: u32 = 1; +pub const __BSD_VISIBLE: u32 = 1; +pub const __GNU_VISIBLE: u32 = 0; +pub const __ISO_C_VISIBLE: u32 = 2011; +pub const __LARGEFILE_VISIBLE: u32 = 0; +pub const __MISC_VISIBLE: u32 = 1; +pub const __POSIX_VISIBLE: u32 = 200809; +pub const __SVID_VISIBLE: u32 = 1; +pub const __XSI_VISIBLE: u32 = 0; +pub const __SSP_FORTIFY_LEVEL: u32 = 0; +pub const __have_longlong64: u32 = 1; +pub const __have_long32: u32 = 1; +pub const ___int8_t_defined: u32 = 1; +pub const ___int16_t_defined: u32 = 1; +pub const ___int32_t_defined: u32 = 1; +pub const ___int64_t_defined: u32 = 1; +pub const ___int_least8_t_defined: u32 = 1; +pub const ___int_least16_t_defined: u32 = 1; +pub const ___int_least32_t_defined: u32 = 1; +pub const ___int_least64_t_defined: u32 = 1; +pub const __int20: u32 = 2; pub const __INT8: &'static [u8; 3usize] = b"hh\0"; pub const __INT16: &'static [u8; 2usize] = b"h\0"; pub const __INT64: &'static [u8; 3usize] = b"ll\0"; @@ -118,944 +198,962 @@ pub const __FAST64: &'static [u8; 3usize] = b"ll\0"; pub const __LEAST8: &'static [u8; 3usize] = b"hh\0"; pub const __LEAST16: &'static [u8; 2usize] = b"h\0"; pub const __LEAST64: &'static [u8; 3usize] = b"ll\0"; -pub const __int8_t_defined: libc::c_uint = 1; -pub const __int16_t_defined: libc::c_uint = 1; -pub const __int32_t_defined: libc::c_uint = 1; -pub const __int64_t_defined: libc::c_uint = 1; -pub const __int_least8_t_defined: libc::c_uint = 1; -pub const __int_least16_t_defined: libc::c_uint = 1; -pub const __int_least32_t_defined: libc::c_uint = 1; -pub const __int_least64_t_defined: libc::c_uint = 1; -pub const __int_fast8_t_defined: libc::c_uint = 1; -pub const __int_fast16_t_defined: libc::c_uint = 1; -pub const __int_fast32_t_defined: libc::c_uint = 1; -pub const __int_fast64_t_defined: libc::c_uint = 1; -pub const WINT_MIN: libc::c_uint = 0; -pub const true_: libc::c_uint = 1; -pub const false_: libc::c_uint = 0; -pub const __bool_true_false_are_defined: libc::c_uint = 1; -pub const CUR_PROCESS_HANDLE: libc::c_uint = 4294934529; -pub const ARBITRATION_SIGNAL_ALL: libc::c_int = -1; -pub const CUR_THREAD_HANDLE: libc::c_uint = 4294934528; -pub const __NEWLIB_H__: libc::c_uint = 1; -pub const _WANT_IO_C99_FORMATS: libc::c_uint = 1; -pub const _WANT_IO_LONG_LONG: libc::c_uint = 1; -pub const _WANT_IO_POS_ARGS: libc::c_uint = 1; -pub const _MB_CAPABLE: libc::c_uint = 1; -pub const _MB_LEN_MAX: libc::c_uint = 8; -pub const HAVE_INITFINI_ARRAY: libc::c_uint = 1; -pub const _ATEXIT_DYNAMIC_ALLOC: libc::c_uint = 1; -pub const _HAVE_LONG_DOUBLE: libc::c_uint = 1; -pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL: libc::c_uint = 1; -pub const _LDBL_EQ_DBL: libc::c_uint = 1; -pub const _FVWRITE_IN_STREAMIO: libc::c_uint = 1; -pub const _FSEEK_OPTIMIZATION: libc::c_uint = 1; -pub const _UNBUF_STREAM_OPT: libc::c_uint = 1; -pub const __RAND_MAX: libc::c_uint = 2147483647; -pub const CONSOLE_COLOR_BOLD: libc::c_uint = 1; -pub const CONSOLE_COLOR_FAINT: libc::c_uint = 2; -pub const CONSOLE_ITALIC: libc::c_uint = 4; -pub const CONSOLE_UNDERLINE: libc::c_uint = 8; -pub const CONSOLE_BLINK_SLOW: libc::c_uint = 16; -pub const CONSOLE_BLINK_FAST: libc::c_uint = 32; -pub const CONSOLE_COLOR_REVERSE: libc::c_uint = 64; -pub const CONSOLE_CONCEAL: libc::c_uint = 128; -pub const CONSOLE_CROSSED_OUT: libc::c_uint = 256; -pub const __GNUCLIKE_ASM: libc::c_uint = 3; -pub const __GNUCLIKE___TYPEOF: libc::c_uint = 1; -pub const __GNUCLIKE___OFFSETOF: libc::c_uint = 1; -pub const __GNUCLIKE___SECTION: libc::c_uint = 1; -pub const __GNUCLIKE_CTOR_SECTION_HANDLING: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_CONSTANT_P: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_VARARGS: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_STDARG: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_VAALIST: libc::c_uint = 1; -pub const __GNUC_VA_LIST_COMPATIBILITY: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_NEXT_ARG: libc::c_uint = 1; -pub const __GNUCLIKE_BUILTIN_MEMCPY: libc::c_uint = 1; -pub const __CC_SUPPORTS_INLINE: libc::c_uint = 1; -pub const __CC_SUPPORTS___INLINE: libc::c_uint = 1; -pub const __CC_SUPPORTS___INLINE__: libc::c_uint = 1; -pub const __CC_SUPPORTS___FUNC__: libc::c_uint = 1; -pub const __CC_SUPPORTS_WARNING: libc::c_uint = 1; -pub const __CC_SUPPORTS_VARADIC_XXX: libc::c_uint = 1; -pub const __CC_SUPPORTS_DYNAMIC_ARRAY_INIT: libc::c_uint = 1; -pub const __BIT_TYPES_DEFINED__: libc::c_uint = 1; -pub const _LITTLE_ENDIAN: libc::c_uint = 1234; -pub const _BIG_ENDIAN: libc::c_uint = 4321; -pub const _PDP_ENDIAN: libc::c_uint = 3412; -pub const _BYTE_ORDER: libc::c_uint = 1234; -pub const _QUAD_HIGHWORD: libc::c_uint = 1; -pub const _QUAD_LOWWORD: libc::c_uint = 0; -pub const LITTLE_ENDIAN: libc::c_uint = 1234; -pub const BIG_ENDIAN: libc::c_uint = 4321; -pub const PDP_ENDIAN: libc::c_uint = 3412; -pub const BYTE_ORDER: libc::c_uint = 1234; -pub const FD_SETSIZE: libc::c_uint = 64; -pub const CSND_NUM_CHANNELS: libc::c_uint = 32; -pub const HTTPC_RESULTCODE_DOWNLOADPENDING: libc::c_uint = 3628113963; -pub const HTTPC_RESULTCODE_NOTFOUND: libc::c_uint = 3628113960; -pub const HTTPC_RESULTCODE_TIMEDOUT: libc::c_uint = 3626016873; -pub const UDS_MAXNODES: libc::c_uint = 16; -pub const UDS_BROADCAST_NETWORKNODEID: libc::c_uint = 65535; -pub const UDS_HOST_NETWORKNODEID: libc::c_uint = 1; -pub const UDS_DEFAULT_RECVBUFSIZE: libc::c_uint = 11824; -pub const UDS_DATAFRAME_MAXSIZE: libc::c_uint = 1478; -pub const DST_NONE: libc::c_uint = 0; -pub const DST_USA: libc::c_uint = 1; -pub const DST_AUST: libc::c_uint = 2; -pub const DST_WET: libc::c_uint = 3; -pub const DST_MET: libc::c_uint = 4; -pub const DST_EET: libc::c_uint = 5; -pub const DST_CAN: libc::c_uint = 6; -pub const SBT_MAX: libc::c_ulonglong = 9223372036854775807; -pub const ITIMER_REAL: libc::c_uint = 0; -pub const ITIMER_VIRTUAL: libc::c_uint = 1; -pub const ITIMER_PROF: libc::c_uint = 2; -pub const _NULL: libc::c_uint = 0; -pub const _ATEXIT_SIZE: libc::c_uint = 32; -pub const _RAND48_SEED_0: libc::c_uint = 13070; -pub const _RAND48_SEED_1: libc::c_uint = 43981; -pub const _RAND48_SEED_2: libc::c_uint = 4660; -pub const _RAND48_MULT_0: libc::c_uint = 58989; -pub const _RAND48_MULT_1: libc::c_uint = 57068; -pub const _RAND48_MULT_2: libc::c_uint = 5; -pub const _RAND48_ADD: libc::c_uint = 11; -pub const _REENT_EMERGENCY_SIZE: libc::c_uint = 25; -pub const _REENT_ASCTIME_SIZE: libc::c_uint = 26; -pub const _REENT_SIGNAL_SIZE: libc::c_uint = 24; -pub const _N_LISTS: libc::c_uint = 30; -pub const _CLOCKS_PER_SEC_: libc::c_uint = 100; -pub const CLOCKS_PER_SEC: libc::c_uint = 100; -pub const CLK_TCK: libc::c_uint = 100; -pub const CLOCK_ENABLED: libc::c_uint = 1; -pub const CLOCK_DISABLED: libc::c_uint = 0; -pub const CLOCK_ALLOWED: libc::c_uint = 1; -pub const CLOCK_DISALLOWED: libc::c_uint = 0; -pub const TIMER_ABSTIME: libc::c_uint = 4; -pub const SOL_SOCKET: libc::c_uint = 65535; -pub const PF_UNSPEC: libc::c_uint = 0; -pub const PF_INET: libc::c_uint = 2; -pub const PF_INET6: libc::c_uint = 23; -pub const AF_UNSPEC: libc::c_uint = 0; -pub const AF_INET: libc::c_uint = 2; -pub const AF_INET6: libc::c_uint = 23; -pub const SOCK_STREAM: libc::c_uint = 1; -pub const SOCK_DGRAM: libc::c_uint = 2; -pub const MSG_OOB: libc::c_uint = 1; -pub const MSG_PEEK: libc::c_uint = 2; -pub const MSG_DONTWAIT: libc::c_uint = 4; -pub const MSG_DONTROUTE: libc::c_uint = 0; -pub const MSG_WAITALL: libc::c_uint = 0; -pub const MSG_MORE: libc::c_uint = 0; -pub const MSG_NOSIGNAL: libc::c_uint = 0; -pub const SHUT_RD: libc::c_uint = 0; -pub const SHUT_WR: libc::c_uint = 1; -pub const SHUT_RDWR: libc::c_uint = 2; -pub const SO_REUSEADDR: libc::c_uint = 4; -pub const SO_LINGER: libc::c_uint = 128; -pub const SO_OOBINLINE: libc::c_uint = 256; -pub const SO_SNDBUF: libc::c_uint = 4097; -pub const SO_RCVBUF: libc::c_uint = 4098; -pub const SO_SNDLOWAT: libc::c_uint = 4099; -pub const SO_RCVLOWAT: libc::c_uint = 4100; -pub const SO_TYPE: libc::c_uint = 4104; -pub const SO_ERROR: libc::c_uint = 4105; -pub const INADDR_LOOPBACK: libc::c_uint = 2130706433; -pub const INADDR_ANY: libc::c_uint = 0; -pub const INADDR_BROADCAST: libc::c_uint = 4294967295; -pub const INADDR_NONE: libc::c_uint = 4294967295; -pub const INET_ADDRSTRLEN: libc::c_uint = 16; -pub const IPPROTO_IP: libc::c_uint = 0; -pub const IPPROTO_UDP: libc::c_uint = 17; -pub const IPPROTO_TCP: libc::c_uint = 6; -pub const IP_TOS: libc::c_uint = 7; -pub const IP_TTL: libc::c_uint = 8; -pub const IP_MULTICAST_LOOP: libc::c_uint = 9; -pub const IP_MULTICAST_TTL: libc::c_uint = 10; -pub const IP_ADD_MEMBERSHIP: libc::c_uint = 11; -pub const IP_DROP_MEMBERSHIP: libc::c_uint = 12; -pub const SOL_CONFIG: libc::c_uint = 65534; -pub const ROUTING_FLAG_G: libc::c_uint = 1; -pub const TCP_STATE_CLOSED: libc::c_uint = 1; -pub const TCP_STATE_LISTEN: libc::c_uint = 2; -pub const TCP_STATE_ESTABLISHED: libc::c_uint = 5; -pub const TCP_STATE_FINWAIT1: libc::c_uint = 6; -pub const TCP_STATE_FINWAIT2: libc::c_uint = 7; -pub const TCP_STATE_CLOSE_WAIT: libc::c_uint = 8; -pub const TCP_STATE_LAST_ACK: libc::c_uint = 9; -pub const TCP_STATE_TIME_WAIT: libc::c_uint = 11; -pub const MVD_STATUS_OK: libc::c_uint = 94208; -pub const MVD_STATUS_PARAMSET: libc::c_uint = 94209; -pub const MVD_STATUS_BUSY: libc::c_uint = 94210; -pub const MVD_STATUS_FRAMEREADY: libc::c_uint = 94211; -pub const MVD_STATUS_INCOMPLETEPROCESSING: libc::c_uint = 94212; -pub const MVD_STATUS_NALUPROCFLAG: libc::c_uint = 94215; -pub const MVD_DEFAULT_WORKBUF_SIZE: libc::c_uint = 9438920; -pub const NFC_ERR_INVALID_STATE: libc::c_uint = 3366024704; -pub const NFC_ERR_APPDATA_UNINITIALIZED: libc::c_uint = 3366024736; -pub const NFC_ERR_AMIIBO_NOTSETUP: libc::c_uint = 3366024744; -pub const NFC_ERR_APPID_MISMATCH: libc::c_uint = 3366024760; -pub const NFC_ERR_DATACORRUPTION0: libc::c_uint = 3368121868; -pub const NFC_ERR_DATACORRUPTION1: libc::c_uint = 3366024728; -pub const NFC_STARTSCAN_DEFAULTINPUT: libc::c_uint = 0; -pub const GPUREG_0000: libc::c_uint = 0; -pub const GPUREG_0001: libc::c_uint = 1; -pub const GPUREG_0002: libc::c_uint = 2; -pub const GPUREG_0003: libc::c_uint = 3; -pub const GPUREG_0004: libc::c_uint = 4; -pub const GPUREG_0005: libc::c_uint = 5; -pub const GPUREG_0006: libc::c_uint = 6; -pub const GPUREG_0007: libc::c_uint = 7; -pub const GPUREG_0008: libc::c_uint = 8; -pub const GPUREG_0009: libc::c_uint = 9; -pub const GPUREG_000A: libc::c_uint = 10; -pub const GPUREG_000B: libc::c_uint = 11; -pub const GPUREG_000C: libc::c_uint = 12; -pub const GPUREG_000D: libc::c_uint = 13; -pub const GPUREG_000E: libc::c_uint = 14; -pub const GPUREG_000F: libc::c_uint = 15; -pub const GPUREG_FINALIZE: libc::c_uint = 16; -pub const GPUREG_0011: libc::c_uint = 17; -pub const GPUREG_0012: libc::c_uint = 18; -pub const GPUREG_0013: libc::c_uint = 19; -pub const GPUREG_0014: libc::c_uint = 20; -pub const GPUREG_0015: libc::c_uint = 21; -pub const GPUREG_0016: libc::c_uint = 22; -pub const GPUREG_0017: libc::c_uint = 23; -pub const GPUREG_0018: libc::c_uint = 24; -pub const GPUREG_0019: libc::c_uint = 25; -pub const GPUREG_001A: libc::c_uint = 26; -pub const GPUREG_001B: libc::c_uint = 27; -pub const GPUREG_001C: libc::c_uint = 28; -pub const GPUREG_001D: libc::c_uint = 29; -pub const GPUREG_001E: libc::c_uint = 30; -pub const GPUREG_001F: libc::c_uint = 31; -pub const GPUREG_0020: libc::c_uint = 32; -pub const GPUREG_0021: libc::c_uint = 33; -pub const GPUREG_0022: libc::c_uint = 34; -pub const GPUREG_0023: libc::c_uint = 35; -pub const GPUREG_0024: libc::c_uint = 36; -pub const GPUREG_0025: libc::c_uint = 37; -pub const GPUREG_0026: libc::c_uint = 38; -pub const GPUREG_0027: libc::c_uint = 39; -pub const GPUREG_0028: libc::c_uint = 40; -pub const GPUREG_0029: libc::c_uint = 41; -pub const GPUREG_002A: libc::c_uint = 42; -pub const GPUREG_002B: libc::c_uint = 43; -pub const GPUREG_002C: libc::c_uint = 44; -pub const GPUREG_002D: libc::c_uint = 45; -pub const GPUREG_002E: libc::c_uint = 46; -pub const GPUREG_002F: libc::c_uint = 47; -pub const GPUREG_0030: libc::c_uint = 48; -pub const GPUREG_0031: libc::c_uint = 49; -pub const GPUREG_0032: libc::c_uint = 50; -pub const GPUREG_0033: libc::c_uint = 51; -pub const GPUREG_0034: libc::c_uint = 52; -pub const GPUREG_0035: libc::c_uint = 53; -pub const GPUREG_0036: libc::c_uint = 54; -pub const GPUREG_0037: libc::c_uint = 55; -pub const GPUREG_0038: libc::c_uint = 56; -pub const GPUREG_0039: libc::c_uint = 57; -pub const GPUREG_003A: libc::c_uint = 58; -pub const GPUREG_003B: libc::c_uint = 59; -pub const GPUREG_003C: libc::c_uint = 60; -pub const GPUREG_003D: libc::c_uint = 61; -pub const GPUREG_003E: libc::c_uint = 62; -pub const GPUREG_003F: libc::c_uint = 63; -pub const GPUREG_FACECULLING_CONFIG: libc::c_uint = 64; -pub const GPUREG_VIEWPORT_WIDTH: libc::c_uint = 65; -pub const GPUREG_VIEWPORT_INVW: libc::c_uint = 66; -pub const GPUREG_VIEWPORT_HEIGHT: libc::c_uint = 67; -pub const GPUREG_VIEWPORT_INVH: libc::c_uint = 68; -pub const GPUREG_0045: libc::c_uint = 69; -pub const GPUREG_0046: libc::c_uint = 70; -pub const GPUREG_FRAGOP_CLIP: libc::c_uint = 71; -pub const GPUREG_FRAGOP_CLIP_DATA0: libc::c_uint = 72; -pub const GPUREG_FRAGOP_CLIP_DATA1: libc::c_uint = 73; -pub const GPUREG_FRAGOP_CLIP_DATA2: libc::c_uint = 74; -pub const GPUREG_FRAGOP_CLIP_DATA3: libc::c_uint = 75; -pub const GPUREG_004C: libc::c_uint = 76; -pub const GPUREG_DEPTHMAP_SCALE: libc::c_uint = 77; -pub const GPUREG_DEPTHMAP_OFFSET: libc::c_uint = 78; -pub const GPUREG_SH_OUTMAP_TOTAL: libc::c_uint = 79; -pub const GPUREG_SH_OUTMAP_O0: libc::c_uint = 80; -pub const GPUREG_SH_OUTMAP_O1: libc::c_uint = 81; -pub const GPUREG_SH_OUTMAP_O2: libc::c_uint = 82; -pub const GPUREG_SH_OUTMAP_O3: libc::c_uint = 83; -pub const GPUREG_SH_OUTMAP_O4: libc::c_uint = 84; -pub const GPUREG_SH_OUTMAP_O5: libc::c_uint = 85; -pub const GPUREG_SH_OUTMAP_O6: libc::c_uint = 86; -pub const GPUREG_0057: libc::c_uint = 87; -pub const GPUREG_0058: libc::c_uint = 88; -pub const GPUREG_0059: libc::c_uint = 89; -pub const GPUREG_005A: libc::c_uint = 90; -pub const GPUREG_005B: libc::c_uint = 91; -pub const GPUREG_005C: libc::c_uint = 92; -pub const GPUREG_005D: libc::c_uint = 93; -pub const GPUREG_005E: libc::c_uint = 94; -pub const GPUREG_005F: libc::c_uint = 95; -pub const GPUREG_0060: libc::c_uint = 96; -pub const GPUREG_EARLYDEPTH_FUNC: libc::c_uint = 97; -pub const GPUREG_EARLYDEPTH_TEST1: libc::c_uint = 98; -pub const GPUREG_EARLYDEPTH_CLEAR: libc::c_uint = 99; -pub const GPUREG_SH_OUTATTR_MODE: libc::c_uint = 100; -pub const GPUREG_SCISSORTEST_MODE: libc::c_uint = 101; -pub const GPUREG_SCISSORTEST_POS: libc::c_uint = 102; -pub const GPUREG_SCISSORTEST_DIM: libc::c_uint = 103; -pub const GPUREG_VIEWPORT_XY: libc::c_uint = 104; -pub const GPUREG_0069: libc::c_uint = 105; -pub const GPUREG_EARLYDEPTH_DATA: libc::c_uint = 106; -pub const GPUREG_006B: libc::c_uint = 107; -pub const GPUREG_006C: libc::c_uint = 108; -pub const GPUREG_DEPTHMAP_ENABLE: libc::c_uint = 109; -pub const GPUREG_RENDERBUF_DIM: libc::c_uint = 110; -pub const GPUREG_SH_OUTATTR_CLOCK: libc::c_uint = 111; -pub const GPUREG_0070: libc::c_uint = 112; -pub const GPUREG_0071: libc::c_uint = 113; -pub const GPUREG_0072: libc::c_uint = 114; -pub const GPUREG_0073: libc::c_uint = 115; -pub const GPUREG_0074: libc::c_uint = 116; -pub const GPUREG_0075: libc::c_uint = 117; -pub const GPUREG_0076: libc::c_uint = 118; -pub const GPUREG_0077: libc::c_uint = 119; -pub const GPUREG_0078: libc::c_uint = 120; -pub const GPUREG_0079: libc::c_uint = 121; -pub const GPUREG_007A: libc::c_uint = 122; -pub const GPUREG_007B: libc::c_uint = 123; -pub const GPUREG_007C: libc::c_uint = 124; -pub const GPUREG_007D: libc::c_uint = 125; -pub const GPUREG_007E: libc::c_uint = 126; -pub const GPUREG_007F: libc::c_uint = 127; -pub const GPUREG_TEXUNIT_CONFIG: libc::c_uint = 128; -pub const GPUREG_TEXUNIT0_BORDER_COLOR: libc::c_uint = 129; -pub const GPUREG_TEXUNIT0_DIM: libc::c_uint = 130; -pub const GPUREG_TEXUNIT0_PARAM: libc::c_uint = 131; -pub const GPUREG_TEXUNIT0_LOD: libc::c_uint = 132; -pub const GPUREG_TEXUNIT0_ADDR1: libc::c_uint = 133; -pub const GPUREG_TEXUNIT0_ADDR2: libc::c_uint = 134; -pub const GPUREG_TEXUNIT0_ADDR3: libc::c_uint = 135; -pub const GPUREG_TEXUNIT0_ADDR4: libc::c_uint = 136; -pub const GPUREG_TEXUNIT0_ADDR5: libc::c_uint = 137; -pub const GPUREG_TEXUNIT0_ADDR6: libc::c_uint = 138; -pub const GPUREG_TEXUNIT0_SHADOW: libc::c_uint = 139; -pub const GPUREG_008C: libc::c_uint = 140; -pub const GPUREG_008D: libc::c_uint = 141; -pub const GPUREG_TEXUNIT0_TYPE: libc::c_uint = 142; -pub const GPUREG_LIGHTING_ENABLE0: libc::c_uint = 143; -pub const GPUREG_0090: libc::c_uint = 144; -pub const GPUREG_TEXUNIT1_BORDER_COLOR: libc::c_uint = 145; -pub const GPUREG_TEXUNIT1_DIM: libc::c_uint = 146; -pub const GPUREG_TEXUNIT1_PARAM: libc::c_uint = 147; -pub const GPUREG_TEXUNIT1_LOD: libc::c_uint = 148; -pub const GPUREG_TEXUNIT1_ADDR: libc::c_uint = 149; -pub const GPUREG_TEXUNIT1_TYPE: libc::c_uint = 150; -pub const GPUREG_0097: libc::c_uint = 151; -pub const GPUREG_0098: libc::c_uint = 152; -pub const GPUREG_TEXUNIT2_BORDER_COLOR: libc::c_uint = 153; -pub const GPUREG_TEXUNIT2_DIM: libc::c_uint = 154; -pub const GPUREG_TEXUNIT2_PARAM: libc::c_uint = 155; -pub const GPUREG_TEXUNIT2_LOD: libc::c_uint = 156; -pub const GPUREG_TEXUNIT2_ADDR: libc::c_uint = 157; -pub const GPUREG_TEXUNIT2_TYPE: libc::c_uint = 158; -pub const GPUREG_009F: libc::c_uint = 159; -pub const GPUREG_00A0: libc::c_uint = 160; -pub const GPUREG_00A1: libc::c_uint = 161; -pub const GPUREG_00A2: libc::c_uint = 162; -pub const GPUREG_00A3: libc::c_uint = 163; -pub const GPUREG_00A4: libc::c_uint = 164; -pub const GPUREG_00A5: libc::c_uint = 165; -pub const GPUREG_00A6: libc::c_uint = 166; -pub const GPUREG_00A7: libc::c_uint = 167; -pub const GPUREG_TEXUNIT3_PROCTEX0: libc::c_uint = 168; -pub const GPUREG_TEXUNIT3_PROCTEX1: libc::c_uint = 169; -pub const GPUREG_TEXUNIT3_PROCTEX2: libc::c_uint = 170; -pub const GPUREG_TEXUNIT3_PROCTEX3: libc::c_uint = 171; -pub const GPUREG_TEXUNIT3_PROCTEX4: libc::c_uint = 10; -pub const GPUREG_TEXUNIT3_PROCTEX5: libc::c_uint = 13; -pub const GPUREG_00AE: libc::c_uint = 174; -pub const GPUREG_PROCTEX_LUT: libc::c_uint = 175; -pub const GPUREG_PROCTEX_LUT_DATA0: libc::c_uint = 176; -pub const GPUREG_PROCTEX_LUT_DATA1: libc::c_uint = 177; -pub const GPUREG_PROCTEX_LUT_DATA2: libc::c_uint = 178; -pub const GPUREG_PROCTEX_LUT_DATA3: libc::c_uint = 179; -pub const GPUREG_PROCTEX_LUT_DATA4: libc::c_uint = 180; -pub const GPUREG_PROCTEX_LUT_DATA5: libc::c_uint = 181; -pub const GPUREG_PROCTEX_LUT_DATA6: libc::c_uint = 182; -pub const GPUREG_PROCTEX_LUT_DATA7: libc::c_uint = 183; -pub const GPUREG_00B8: libc::c_uint = 184; -pub const GPUREG_00B9: libc::c_uint = 185; -pub const GPUREG_00BA: libc::c_uint = 186; -pub const GPUREG_00BB: libc::c_uint = 187; -pub const GPUREG_00BC: libc::c_uint = 188; -pub const GPUREG_00BD: libc::c_uint = 189; -pub const GPUREG_00BE: libc::c_uint = 190; -pub const GPUREG_00BF: libc::c_uint = 191; -pub const GPUREG_TEXENV0_SOURCE: libc::c_uint = 192; -pub const GPUREG_TEXENV0_OPERAND: libc::c_uint = 193; -pub const GPUREG_TEXENV0_COMBINER: libc::c_uint = 194; -pub const GPUREG_TEXENV0_COLOR: libc::c_uint = 195; -pub const GPUREG_TEXENV0_SCALE: libc::c_uint = 196; -pub const GPUREG_00C5: libc::c_uint = 197; -pub const GPUREG_00C6: libc::c_uint = 198; -pub const GPUREG_00C7: libc::c_uint = 199; -pub const GPUREG_TEXENV1_SOURCE: libc::c_uint = 200; -pub const GPUREG_TEXENV1_OPERAND: libc::c_uint = 201; -pub const GPUREG_TEXENV1_COMBINER: libc::c_uint = 202; -pub const GPUREG_TEXENV1_COLOR: libc::c_uint = 203; -pub const GPUREG_TEXENV1_SCALE: libc::c_uint = 204; -pub const GPUREG_00CD: libc::c_uint = 205; -pub const GPUREG_00CE: libc::c_uint = 206; -pub const GPUREG_00CF: libc::c_uint = 207; -pub const GPUREG_TEXENV2_SOURCE: libc::c_uint = 208; -pub const GPUREG_TEXENV2_OPERAND: libc::c_uint = 209; -pub const GPUREG_TEXENV2_COMBINER: libc::c_uint = 210; -pub const GPUREG_TEXENV2_COLOR: libc::c_uint = 211; -pub const GPUREG_TEXENV2_SCALE: libc::c_uint = 212; -pub const GPUREG_00D5: libc::c_uint = 213; -pub const GPUREG_00D6: libc::c_uint = 214; -pub const GPUREG_00D7: libc::c_uint = 215; -pub const GPUREG_TEXENV3_SOURCE: libc::c_uint = 216; -pub const GPUREG_TEXENV3_OPERAND: libc::c_uint = 217; -pub const GPUREG_TEXENV3_COMBINER: libc::c_uint = 218; -pub const GPUREG_TEXENV3_COLOR: libc::c_uint = 219; -pub const GPUREG_TEXENV3_SCALE: libc::c_uint = 220; -pub const GPUREG_00DD: libc::c_uint = 221; -pub const GPUREG_00DE: libc::c_uint = 222; -pub const GPUREG_00DF: libc::c_uint = 223; -pub const GPUREG_TEXENV_UPDATE_BUFFER: libc::c_uint = 224; -pub const GPUREG_FOG_COLOR: libc::c_uint = 225; -pub const GPUREG_00E2: libc::c_uint = 226; -pub const GPUREG_00E3: libc::c_uint = 227; -pub const GPUREG_GAS_ATTENUATION: libc::c_uint = 228; -pub const GPUREG_GAS_ACCMAX: libc::c_uint = 229; -pub const GPUREG_FOG_LUT_INDEX: libc::c_uint = 230; -pub const GPUREG_00E7: libc::c_uint = 231; -pub const GPUREG_FOG_LUT_DATA0: libc::c_uint = 232; -pub const GPUREG_FOG_LUT_DATA1: libc::c_uint = 233; -pub const GPUREG_FOG_LUT_DATA2: libc::c_uint = 234; -pub const GPUREG_FOG_LUT_DATA3: libc::c_uint = 235; -pub const GPUREG_FOG_LUT_DATA4: libc::c_uint = 236; -pub const GPUREG_FOG_LUT_DATA5: libc::c_uint = 237; -pub const GPUREG_FOG_LUT_DATA6: libc::c_uint = 238; -pub const GPUREG_FOG_LUT_DATA7: libc::c_uint = 239; -pub const GPUREG_TEXENV4_SOURCE: libc::c_uint = 240; -pub const GPUREG_TEXENV4_OPERAND: libc::c_uint = 241; -pub const GPUREG_TEXENV4_COMBINER: libc::c_uint = 242; -pub const GPUREG_TEXENV4_COLOR: libc::c_uint = 243; -pub const GPUREG_TEXENV4_SCALE: libc::c_uint = 244; -pub const GPUREG_00F5: libc::c_uint = 245; -pub const GPUREG_00F6: libc::c_uint = 246; -pub const GPUREG_00F7: libc::c_uint = 247; -pub const GPUREG_TEXENV5_SOURCE: libc::c_uint = 248; -pub const GPUREG_TEXENV5_OPERAND: libc::c_uint = 249; -pub const GPUREG_TEXENV5_COMBINER: libc::c_uint = 250; -pub const GPUREG_TEXENV5_COLOR: libc::c_uint = 251; -pub const GPUREG_TEXENV5_SCALE: libc::c_uint = 252; -pub const GPUREG_TEXENV_BUFFER_COLOR: libc::c_uint = 253; -pub const GPUREG_00FE: libc::c_uint = 254; -pub const GPUREG_00FF: libc::c_uint = 255; -pub const GPUREG_COLOR_OPERATION: libc::c_uint = 256; -pub const GPUREG_BLEND_FUNC: libc::c_uint = 257; -pub const GPUREG_LOGIC_OP: libc::c_uint = 258; -pub const GPUREG_BLEND_COLOR: libc::c_uint = 259; -pub const GPUREG_FRAGOP_ALPHA_TEST: libc::c_uint = 260; -pub const GPUREG_STENCIL_TEST: libc::c_uint = 261; -pub const GPUREG_STENCIL_OP: libc::c_uint = 262; -pub const GPUREG_DEPTH_COLOR_MASK: libc::c_uint = 263; -pub const GPUREG_0108: libc::c_uint = 264; -pub const GPUREG_0109: libc::c_uint = 265; -pub const GPUREG_010A: libc::c_uint = 266; -pub const GPUREG_010B: libc::c_uint = 267; -pub const GPUREG_010C: libc::c_uint = 268; -pub const GPUREG_010D: libc::c_uint = 269; -pub const GPUREG_010E: libc::c_uint = 270; -pub const GPUREG_010F: libc::c_uint = 271; -pub const GPUREG_FRAMEBUFFER_INVALIDATE: libc::c_uint = 272; -pub const GPUREG_FRAMEBUFFER_FLUSH: libc::c_uint = 273; -pub const GPUREG_COLORBUFFER_READ: libc::c_uint = 274; -pub const GPUREG_COLORBUFFER_WRITE: libc::c_uint = 275; -pub const GPUREG_DEPTHBUFFER_READ: libc::c_uint = 276; -pub const GPUREG_DEPTHBUFFER_WRITE: libc::c_uint = 277; -pub const GPUREG_DEPTHBUFFER_FORMAT: libc::c_uint = 278; -pub const GPUREG_COLORBUFFER_FORMAT: libc::c_uint = 279; -pub const GPUREG_EARLYDEPTH_TEST2: libc::c_uint = 280; -pub const GPUREG_0119: libc::c_uint = 281; -pub const GPUREG_011A: libc::c_uint = 282; -pub const GPUREG_FRAMEBUFFER_BLOCK32: libc::c_uint = 283; -pub const GPUREG_DEPTHBUFFER_LOC: libc::c_uint = 284; -pub const GPUREG_COLORBUFFER_LOC: libc::c_uint = 285; -pub const GPUREG_FRAMEBUFFER_DIM: libc::c_uint = 286; -pub const GPUREG_011F: libc::c_uint = 287; -pub const GPUREG_GAS_LIGHT_XY: libc::c_uint = 288; -pub const GPUREG_GAS_LIGHT_Z: libc::c_uint = 289; -pub const GPUREG_GAS_LIGHT_Z_COLOR: libc::c_uint = 290; -pub const GPUREG_GAS_LUT_INDEX: libc::c_uint = 291; -pub const GPUREG_GAS_LUT_DATA: libc::c_uint = 292; -pub const GPUREG_0125: libc::c_uint = 293; -pub const GPUREG_GAS_DELTAZ_DEPTH: libc::c_uint = 294; -pub const GPUREG_0127: libc::c_uint = 295; -pub const GPUREG_0128: libc::c_uint = 296; -pub const GPUREG_0129: libc::c_uint = 297; -pub const GPUREG_012A: libc::c_uint = 298; -pub const GPUREG_012B: libc::c_uint = 299; -pub const GPUREG_012C: libc::c_uint = 300; -pub const GPUREG_012D: libc::c_uint = 301; -pub const GPUREG_012E: libc::c_uint = 302; -pub const GPUREG_012F: libc::c_uint = 303; -pub const GPUREG_FRAGOP_SHADOW: libc::c_uint = 304; -pub const GPUREG_0131: libc::c_uint = 305; -pub const GPUREG_0132: libc::c_uint = 306; -pub const GPUREG_0133: libc::c_uint = 307; -pub const GPUREG_0134: libc::c_uint = 308; -pub const GPUREG_0135: libc::c_uint = 309; -pub const GPUREG_0136: libc::c_uint = 310; -pub const GPUREG_0137: libc::c_uint = 311; -pub const GPUREG_0138: libc::c_uint = 312; -pub const GPUREG_0139: libc::c_uint = 313; -pub const GPUREG_013A: libc::c_uint = 314; -pub const GPUREG_013B: libc::c_uint = 315; -pub const GPUREG_013C: libc::c_uint = 316; -pub const GPUREG_013D: libc::c_uint = 317; -pub const GPUREG_013E: libc::c_uint = 318; -pub const GPUREG_013F: libc::c_uint = 319; -pub const GPUREG_LIGHT0_SPECULAR0: libc::c_uint = 320; -pub const GPUREG_LIGHT0_SPECULAR1: libc::c_uint = 321; -pub const GPUREG_LIGHT0_DIFFUSE: libc::c_uint = 322; -pub const GPUREG_LIGHT0_AMBIENT: libc::c_uint = 323; -pub const GPUREG_LIGHT0_XY: libc::c_uint = 324; -pub const GPUREG_LIGHT0_Z: libc::c_uint = 325; -pub const GPUREG_LIGHT0_SPOTDIR_XY: libc::c_uint = 326; -pub const GPUREG_LIGHT0_SPOTDIR_Z: libc::c_uint = 327; -pub const GPUREG_0148: libc::c_uint = 328; -pub const GPUREG_LIGHT0_CONFIG: libc::c_uint = 329; -pub const GPUREG_LIGHT0_ATTENUATION_BIAS: libc::c_uint = 330; -pub const GPUREG_LIGHT0_ATTENUATION_SCALE: libc::c_uint = 331; -pub const GPUREG_014C: libc::c_uint = 332; -pub const GPUREG_014D: libc::c_uint = 333; -pub const GPUREG_014E: libc::c_uint = 334; -pub const GPUREG_014F: libc::c_uint = 335; -pub const GPUREG_LIGHT1_SPECULAR0: libc::c_uint = 336; -pub const GPUREG_LIGHT1_SPECULAR1: libc::c_uint = 337; -pub const GPUREG_LIGHT1_DIFFUSE: libc::c_uint = 338; -pub const GPUREG_LIGHT1_AMBIENT: libc::c_uint = 339; -pub const GPUREG_LIGHT1_XY: libc::c_uint = 340; -pub const GPUREG_LIGHT1_Z: libc::c_uint = 341; -pub const GPUREG_LIGHT1_SPOTDIR_XY: libc::c_uint = 342; -pub const GPUREG_LIGHT1_SPOTDIR_Z: libc::c_uint = 343; -pub const GPUREG_0158: libc::c_uint = 344; -pub const GPUREG_LIGHT1_CONFIG: libc::c_uint = 345; -pub const GPUREG_LIGHT1_ATTENUATION_BIAS: libc::c_uint = 346; -pub const GPUREG_LIGHT1_ATTENUATION_SCALE: libc::c_uint = 347; -pub const GPUREG_015C: libc::c_uint = 348; -pub const GPUREG_015D: libc::c_uint = 349; -pub const GPUREG_015E: libc::c_uint = 350; -pub const GPUREG_015F: libc::c_uint = 351; -pub const GPUREG_LIGHT2_SPECULAR0: libc::c_uint = 352; -pub const GPUREG_LIGHT2_SPECULAR1: libc::c_uint = 353; -pub const GPUREG_LIGHT2_DIFFUSE: libc::c_uint = 354; -pub const GPUREG_LIGHT2_AMBIENT: libc::c_uint = 355; -pub const GPUREG_LIGHT2_XY: libc::c_uint = 356; -pub const GPUREG_LIGHT2_Z: libc::c_uint = 357; -pub const GPUREG_LIGHT2_SPOTDIR_XY: libc::c_uint = 358; -pub const GPUREG_LIGHT2_SPOTDIR_Z: libc::c_uint = 359; -pub const GPUREG_0168: libc::c_uint = 360; -pub const GPUREG_LIGHT2_CONFIG: libc::c_uint = 361; -pub const GPUREG_LIGHT2_ATTENUATION_BIAS: libc::c_uint = 362; -pub const GPUREG_LIGHT2_ATTENUATION_SCALE: libc::c_uint = 363; -pub const GPUREG_016C: libc::c_uint = 364; -pub const GPUREG_016D: libc::c_uint = 365; -pub const GPUREG_016E: libc::c_uint = 366; -pub const GPUREG_016F: libc::c_uint = 367; -pub const GPUREG_LIGHT3_SPECULAR0: libc::c_uint = 368; -pub const GPUREG_LIGHT3_SPECULAR1: libc::c_uint = 369; -pub const GPUREG_LIGHT3_DIFFUSE: libc::c_uint = 370; -pub const GPUREG_LIGHT3_AMBIENT: libc::c_uint = 371; -pub const GPUREG_LIGHT3_XY: libc::c_uint = 372; -pub const GPUREG_LIGHT3_Z: libc::c_uint = 373; -pub const GPUREG_LIGHT3_SPOTDIR_XY: libc::c_uint = 374; -pub const GPUREG_LIGHT3_SPOTDIR_Z: libc::c_uint = 375; -pub const GPUREG_0178: libc::c_uint = 376; -pub const GPUREG_LIGHT3_CONFIG: libc::c_uint = 377; -pub const GPUREG_LIGHT3_ATTENUATION_BIAS: libc::c_uint = 378; -pub const GPUREG_LIGHT3_ATTENUATION_SCALE: libc::c_uint = 379; -pub const GPUREG_017C: libc::c_uint = 380; -pub const GPUREG_017D: libc::c_uint = 381; -pub const GPUREG_017E: libc::c_uint = 382; -pub const GPUREG_017F: libc::c_uint = 383; -pub const GPUREG_LIGHT4_SPECULAR0: libc::c_uint = 384; -pub const GPUREG_LIGHT4_SPECULAR1: libc::c_uint = 385; -pub const GPUREG_LIGHT4_DIFFUSE: libc::c_uint = 386; -pub const GPUREG_LIGHT4_AMBIENT: libc::c_uint = 387; -pub const GPUREG_LIGHT4_XY: libc::c_uint = 388; -pub const GPUREG_LIGHT4_Z: libc::c_uint = 389; -pub const GPUREG_LIGHT4_SPOTDIR_XY: libc::c_uint = 390; -pub const GPUREG_LIGHT4_SPOTDIR_Z: libc::c_uint = 391; -pub const GPUREG_0188: libc::c_uint = 392; -pub const GPUREG_LIGHT4_CONFIG: libc::c_uint = 393; -pub const GPUREG_LIGHT4_ATTENUATION_BIAS: libc::c_uint = 394; -pub const GPUREG_LIGHT4_ATTENUATION_SCALE: libc::c_uint = 395; -pub const GPUREG_018C: libc::c_uint = 396; -pub const GPUREG_018D: libc::c_uint = 397; -pub const GPUREG_018E: libc::c_uint = 398; -pub const GPUREG_018F: libc::c_uint = 399; -pub const GPUREG_LIGHT5_SPECULAR0: libc::c_uint = 400; -pub const GPUREG_LIGHT5_SPECULAR1: libc::c_uint = 401; -pub const GPUREG_LIGHT5_DIFFUSE: libc::c_uint = 402; -pub const GPUREG_LIGHT5_AMBIENT: libc::c_uint = 403; -pub const GPUREG_LIGHT5_XY: libc::c_uint = 404; -pub const GPUREG_LIGHT5_Z: libc::c_uint = 405; -pub const GPUREG_LIGHT5_SPOTDIR_XY: libc::c_uint = 406; -pub const GPUREG_LIGHT5_SPOTDIR_Z: libc::c_uint = 407; -pub const GPUREG_0198: libc::c_uint = 408; -pub const GPUREG_LIGHT5_CONFIG: libc::c_uint = 409; -pub const GPUREG_LIGHT5_ATTENUATION_BIAS: libc::c_uint = 410; -pub const GPUREG_LIGHT5_ATTENUATION_SCALE: libc::c_uint = 411; -pub const GPUREG_019C: libc::c_uint = 412; -pub const GPUREG_019D: libc::c_uint = 413; -pub const GPUREG_019E: libc::c_uint = 414; -pub const GPUREG_019F: libc::c_uint = 415; -pub const GPUREG_LIGHT6_SPECULAR0: libc::c_uint = 416; -pub const GPUREG_LIGHT6_SPECULAR1: libc::c_uint = 417; -pub const GPUREG_LIGHT6_DIFFUSE: libc::c_uint = 418; -pub const GPUREG_LIGHT6_AMBIENT: libc::c_uint = 419; -pub const GPUREG_LIGHT6_XY: libc::c_uint = 420; -pub const GPUREG_LIGHT6_Z: libc::c_uint = 421; -pub const GPUREG_LIGHT6_SPOTDIR_XY: libc::c_uint = 422; -pub const GPUREG_LIGHT6_SPOTDIR_Z: libc::c_uint = 423; -pub const GPUREG_01A8: libc::c_uint = 424; -pub const GPUREG_LIGHT6_CONFIG: libc::c_uint = 425; -pub const GPUREG_LIGHT6_ATTENUATION_BIAS: libc::c_uint = 426; -pub const GPUREG_LIGHT6_ATTENUATION_SCALE: libc::c_uint = 427; -pub const GPUREG_01AC: libc::c_uint = 428; -pub const GPUREG_01AD: libc::c_uint = 429; -pub const GPUREG_01AE: libc::c_uint = 430; -pub const GPUREG_01AF: libc::c_uint = 431; -pub const GPUREG_LIGHT7_SPECULAR0: libc::c_uint = 432; -pub const GPUREG_LIGHT7_SPECULAR1: libc::c_uint = 433; -pub const GPUREG_LIGHT7_DIFFUSE: libc::c_uint = 434; -pub const GPUREG_LIGHT7_AMBIENT: libc::c_uint = 435; -pub const GPUREG_LIGHT7_XY: libc::c_uint = 436; -pub const GPUREG_LIGHT7_Z: libc::c_uint = 437; -pub const GPUREG_LIGHT7_SPOTDIR_XY: libc::c_uint = 438; -pub const GPUREG_LIGHT7_SPOTDIR_Z: libc::c_uint = 439; -pub const GPUREG_01B8: libc::c_uint = 440; -pub const GPUREG_LIGHT7_CONFIG: libc::c_uint = 441; -pub const GPUREG_LIGHT7_ATTENUATION_BIAS: libc::c_uint = 442; -pub const GPUREG_LIGHT7_ATTENUATION_SCALE: libc::c_uint = 443; -pub const GPUREG_01BC: libc::c_uint = 444; -pub const GPUREG_01BD: libc::c_uint = 445; -pub const GPUREG_01BE: libc::c_uint = 446; -pub const GPUREG_01BF: libc::c_uint = 447; -pub const GPUREG_LIGHTING_AMBIENT: libc::c_uint = 448; -pub const GPUREG_01C1: libc::c_uint = 449; -pub const GPUREG_LIGHTING_NUM_LIGHTS: libc::c_uint = 450; -pub const GPUREG_LIGHTING_CONFIG0: libc::c_uint = 451; -pub const GPUREG_LIGHTING_CONFIG1: libc::c_uint = 452; -pub const GPUREG_LIGHTING_LUT_INDEX: libc::c_uint = 453; -pub const GPUREG_LIGHTING_ENABLE1: libc::c_uint = 454; -pub const GPUREG_01C7: libc::c_uint = 455; -pub const GPUREG_LIGHTING_LUT_DATA0: libc::c_uint = 456; -pub const GPUREG_LIGHTING_LUT_DATA1: libc::c_uint = 457; -pub const GPUREG_LIGHTING_LUT_DATA2: libc::c_uint = 458; -pub const GPUREG_LIGHTING_LUT_DATA3: libc::c_uint = 459; -pub const GPUREG_LIGHTING_LUT_DATA4: libc::c_uint = 460; -pub const GPUREG_LIGHTING_LUT_DATA5: libc::c_uint = 461; -pub const GPUREG_LIGHTING_LUT_DATA6: libc::c_uint = 462; -pub const GPUREG_LIGHTING_LUT_DATA7: libc::c_uint = 463; -pub const GPUREG_LIGHTING_LUTINPUT_ABS: libc::c_uint = 464; -pub const GPUREG_LIGHTING_LUTINPUT_SELECT: libc::c_uint = 465; -pub const GPUREG_LIGHTING_LUTINPUT_SCALE: libc::c_uint = 466; -pub const GPUREG_01D3: libc::c_uint = 467; -pub const GPUREG_01D4: libc::c_uint = 468; -pub const GPUREG_01D5: libc::c_uint = 469; -pub const GPUREG_01D6: libc::c_uint = 470; -pub const GPUREG_01D7: libc::c_uint = 471; -pub const GPUREG_01D8: libc::c_uint = 472; -pub const GPUREG_LIGHTING_LIGHT_PERMUTATION: libc::c_uint = 473; -pub const GPUREG_01DA: libc::c_uint = 474; -pub const GPUREG_01DB: libc::c_uint = 475; -pub const GPUREG_01DC: libc::c_uint = 476; -pub const GPUREG_01DD: libc::c_uint = 477; -pub const GPUREG_01DE: libc::c_uint = 478; -pub const GPUREG_01DF: libc::c_uint = 479; -pub const GPUREG_01E0: libc::c_uint = 480; -pub const GPUREG_01E1: libc::c_uint = 481; -pub const GPUREG_01E2: libc::c_uint = 482; -pub const GPUREG_01E3: libc::c_uint = 483; -pub const GPUREG_01E4: libc::c_uint = 484; -pub const GPUREG_01E5: libc::c_uint = 485; -pub const GPUREG_01E6: libc::c_uint = 486; -pub const GPUREG_01E7: libc::c_uint = 487; -pub const GPUREG_01E8: libc::c_uint = 488; -pub const GPUREG_01E9: libc::c_uint = 489; -pub const GPUREG_01EA: libc::c_uint = 490; -pub const GPUREG_01EB: libc::c_uint = 491; -pub const GPUREG_01EC: libc::c_uint = 492; -pub const GPUREG_01ED: libc::c_uint = 493; -pub const GPUREG_01EE: libc::c_uint = 494; -pub const GPUREG_01EF: libc::c_uint = 495; -pub const GPUREG_01F0: libc::c_uint = 496; -pub const GPUREG_01F1: libc::c_uint = 497; -pub const GPUREG_01F2: libc::c_uint = 498; -pub const GPUREG_01F3: libc::c_uint = 499; -pub const GPUREG_01F4: libc::c_uint = 500; -pub const GPUREG_01F5: libc::c_uint = 501; -pub const GPUREG_01F6: libc::c_uint = 502; -pub const GPUREG_01F7: libc::c_uint = 503; -pub const GPUREG_01F8: libc::c_uint = 504; -pub const GPUREG_01F9: libc::c_uint = 505; -pub const GPUREG_01FA: libc::c_uint = 506; -pub const GPUREG_01FB: libc::c_uint = 507; -pub const GPUREG_01FC: libc::c_uint = 508; -pub const GPUREG_01FD: libc::c_uint = 509; -pub const GPUREG_01FE: libc::c_uint = 510; -pub const GPUREG_01FF: libc::c_uint = 511; -pub const GPUREG_ATTRIBBUFFERS_LOC: libc::c_uint = 512; -pub const GPUREG_ATTRIBBUFFERS_FORMAT_LOW: libc::c_uint = 513; -pub const GPUREG_ATTRIBBUFFERS_FORMAT_HIGH: libc::c_uint = 514; -pub const GPUREG_ATTRIBBUFFER0_OFFSET: libc::c_uint = 515; -pub const GPUREG_ATTRIBBUFFER0_CONFIG1: libc::c_uint = 516; -pub const GPUREG_ATTRIBBUFFER0_CONFIG2: libc::c_uint = 517; -pub const GPUREG_ATTRIBBUFFER1_OFFSET: libc::c_uint = 518; -pub const GPUREG_ATTRIBBUFFER1_CONFIG1: libc::c_uint = 519; -pub const GPUREG_ATTRIBBUFFER1_CONFIG2: libc::c_uint = 520; -pub const GPUREG_ATTRIBBUFFER2_OFFSET: libc::c_uint = 521; -pub const GPUREG_ATTRIBBUFFER2_CONFIG1: libc::c_uint = 522; -pub const GPUREG_ATTRIBBUFFER2_CONFIG2: libc::c_uint = 523; -pub const GPUREG_ATTRIBBUFFER3_OFFSET: libc::c_uint = 524; -pub const GPUREG_ATTRIBBUFFER3_CONFIG1: libc::c_uint = 525; -pub const GPUREG_ATTRIBBUFFER3_CONFIG2: libc::c_uint = 526; -pub const GPUREG_ATTRIBBUFFER4_OFFSET: libc::c_uint = 527; -pub const GPUREG_ATTRIBBUFFER4_CONFIG1: libc::c_uint = 528; -pub const GPUREG_ATTRIBBUFFER4_CONFIG2: libc::c_uint = 529; -pub const GPUREG_ATTRIBBUFFER5_OFFSET: libc::c_uint = 530; -pub const GPUREG_ATTRIBBUFFER5_CONFIG1: libc::c_uint = 531; -pub const GPUREG_ATTRIBBUFFER5_CONFIG2: libc::c_uint = 532; -pub const GPUREG_ATTRIBBUFFER6_OFFSET: libc::c_uint = 533; -pub const GPUREG_ATTRIBBUFFER6_CONFIG1: libc::c_uint = 534; -pub const GPUREG_ATTRIBBUFFER6_CONFIG2: libc::c_uint = 535; -pub const GPUREG_ATTRIBBUFFER7_OFFSET: libc::c_uint = 536; -pub const GPUREG_ATTRIBBUFFER7_CONFIG1: libc::c_uint = 537; -pub const GPUREG_ATTRIBBUFFER7_CONFIG2: libc::c_uint = 538; -pub const GPUREG_ATTRIBBUFFER8_OFFSET: libc::c_uint = 539; -pub const GPUREG_ATTRIBBUFFER8_CONFIG1: libc::c_uint = 540; -pub const GPUREG_ATTRIBBUFFER8_CONFIG2: libc::c_uint = 541; -pub const GPUREG_ATTRIBBUFFER9_OFFSET: libc::c_uint = 542; -pub const GPUREG_ATTRIBBUFFER9_CONFIG1: libc::c_uint = 543; -pub const GPUREG_ATTRIBBUFFER9_CONFIG2: libc::c_uint = 544; -pub const GPUREG_ATTRIBBUFFERA_OFFSET: libc::c_uint = 545; -pub const GPUREG_ATTRIBBUFFERA_CONFIG1: libc::c_uint = 546; -pub const GPUREG_ATTRIBBUFFERA_CONFIG2: libc::c_uint = 547; -pub const GPUREG_ATTRIBBUFFERB_OFFSET: libc::c_uint = 548; -pub const GPUREG_ATTRIBBUFFERB_CONFIG1: libc::c_uint = 549; -pub const GPUREG_ATTRIBBUFFERB_CONFIG2: libc::c_uint = 550; -pub const GPUREG_INDEXBUFFER_CONFIG: libc::c_uint = 551; -pub const GPUREG_NUMVERTICES: libc::c_uint = 552; -pub const GPUREG_GEOSTAGE_CONFIG: libc::c_uint = 553; -pub const GPUREG_VERTEX_OFFSET: libc::c_uint = 554; -pub const GPUREG_022B: libc::c_uint = 555; -pub const GPUREG_022C: libc::c_uint = 556; -pub const GPUREG_POST_VERTEX_CACHE_NUM: libc::c_uint = 557; -pub const GPUREG_DRAWARRAYS: libc::c_uint = 558; -pub const GPUREG_DRAWELEMENTS: libc::c_uint = 559; -pub const GPUREG_0230: libc::c_uint = 560; -pub const GPUREG_VTX_FUNC: libc::c_uint = 561; -pub const GPUREG_FIXEDATTRIB_INDEX: libc::c_uint = 562; -pub const GPUREG_FIXEDATTRIB_DATA0: libc::c_uint = 563; -pub const GPUREG_FIXEDATTRIB_DATA1: libc::c_uint = 564; -pub const GPUREG_FIXEDATTRIB_DATA2: libc::c_uint = 565; -pub const GPUREG_0236: libc::c_uint = 566; -pub const GPUREG_0237: libc::c_uint = 567; -pub const GPUREG_CMDBUF_SIZE0: libc::c_uint = 568; -pub const GPUREG_CMDBUF_SIZE1: libc::c_uint = 569; -pub const GPUREG_CMDBUF_ADDR0: libc::c_uint = 570; -pub const GPUREG_CMDBUF_ADDR1: libc::c_uint = 571; -pub const GPUREG_CMDBUF_JUMP0: libc::c_uint = 572; -pub const GPUREG_CMDBUF_JUMP1: libc::c_uint = 573; -pub const GPUREG_023E: libc::c_uint = 574; -pub const GPUREG_023F: libc::c_uint = 575; -pub const GPUREG_0240: libc::c_uint = 576; -pub const GPUREG_0241: libc::c_uint = 577; -pub const GPUREG_VSH_NUM_ATTR: libc::c_uint = 578; -pub const GPUREG_0243: libc::c_uint = 579; -pub const GPUREG_VSH_COM_MODE: libc::c_uint = 580; -pub const GPUREG_START_DRAW_FUNC0: libc::c_uint = 581; -pub const GPUREG_0246: libc::c_uint = 582; -pub const GPUREG_0247: libc::c_uint = 583; -pub const GPUREG_0248: libc::c_uint = 584; -pub const GPUREG_0249: libc::c_uint = 585; -pub const GPUREG_VSH_OUTMAP_TOTAL1: libc::c_uint = 586; -pub const GPUREG_024B: libc::c_uint = 587; -pub const GPUREG_024C: libc::c_uint = 588; -pub const GPUREG_024D: libc::c_uint = 589; -pub const GPUREG_024E: libc::c_uint = 590; -pub const GPUREG_024F: libc::c_uint = 591; -pub const GPUREG_0250: libc::c_uint = 592; -pub const GPUREG_VSH_OUTMAP_TOTAL2: libc::c_uint = 593; -pub const GPUREG_GSH_MISC0: libc::c_uint = 594; -pub const GPUREG_GEOSTAGE_CONFIG2: libc::c_uint = 595; -pub const GPUREG_GSH_MISC1: libc::c_uint = 596; -pub const GPUREG_0255: libc::c_uint = 597; -pub const GPUREG_0256: libc::c_uint = 598; -pub const GPUREG_0257: libc::c_uint = 599; -pub const GPUREG_0258: libc::c_uint = 600; -pub const GPUREG_0259: libc::c_uint = 601; -pub const GPUREG_025A: libc::c_uint = 602; -pub const GPUREG_025B: libc::c_uint = 603; -pub const GPUREG_025C: libc::c_uint = 604; -pub const GPUREG_025D: libc::c_uint = 605; -pub const GPUREG_PRIMITIVE_CONFIG: libc::c_uint = 606; -pub const GPUREG_RESTART_PRIMITIVE: libc::c_uint = 607; -pub const GPUREG_0260: libc::c_uint = 608; -pub const GPUREG_0261: libc::c_uint = 609; -pub const GPUREG_0262: libc::c_uint = 610; -pub const GPUREG_0263: libc::c_uint = 611; -pub const GPUREG_0264: libc::c_uint = 612; -pub const GPUREG_0265: libc::c_uint = 613; -pub const GPUREG_0266: libc::c_uint = 614; -pub const GPUREG_0267: libc::c_uint = 615; -pub const GPUREG_0268: libc::c_uint = 616; -pub const GPUREG_0269: libc::c_uint = 617; -pub const GPUREG_026A: libc::c_uint = 618; -pub const GPUREG_026B: libc::c_uint = 619; -pub const GPUREG_026C: libc::c_uint = 620; -pub const GPUREG_026D: libc::c_uint = 621; -pub const GPUREG_026E: libc::c_uint = 622; -pub const GPUREG_026F: libc::c_uint = 623; -pub const GPUREG_0270: libc::c_uint = 624; -pub const GPUREG_0271: libc::c_uint = 625; -pub const GPUREG_0272: libc::c_uint = 626; -pub const GPUREG_0273: libc::c_uint = 627; -pub const GPUREG_0274: libc::c_uint = 628; -pub const GPUREG_0275: libc::c_uint = 629; -pub const GPUREG_0276: libc::c_uint = 630; -pub const GPUREG_0277: libc::c_uint = 631; -pub const GPUREG_0278: libc::c_uint = 632; -pub const GPUREG_0279: libc::c_uint = 633; -pub const GPUREG_027A: libc::c_uint = 634; -pub const GPUREG_027B: libc::c_uint = 635; -pub const GPUREG_027C: libc::c_uint = 636; -pub const GPUREG_027D: libc::c_uint = 637; -pub const GPUREG_027E: libc::c_uint = 638; -pub const GPUREG_027F: libc::c_uint = 639; -pub const GPUREG_GSH_BOOLUNIFORM: libc::c_uint = 640; -pub const GPUREG_GSH_INTUNIFORM_I0: libc::c_uint = 641; -pub const GPUREG_GSH_INTUNIFORM_I1: libc::c_uint = 642; -pub const GPUREG_GSH_INTUNIFORM_I2: libc::c_uint = 643; -pub const GPUREG_GSH_INTUNIFORM_I3: libc::c_uint = 644; -pub const GPUREG_0285: libc::c_uint = 645; -pub const GPUREG_0286: libc::c_uint = 646; -pub const GPUREG_0287: libc::c_uint = 647; -pub const GPUREG_0288: libc::c_uint = 648; -pub const GPUREG_GSH_INPUTBUFFER_CONFIG: libc::c_uint = 649; -pub const GPUREG_GSH_ENTRYPOINT: libc::c_uint = 650; -pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW: libc::c_uint = 651; -pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH: libc::c_uint = 652; -pub const GPUREG_GSH_OUTMAP_MASK: libc::c_uint = 653; -pub const GPUREG_028E: libc::c_uint = 654; -pub const GPUREG_GSH_CODETRANSFER_END: libc::c_uint = 655; -pub const GPUREG_GSH_FLOATUNIFORM_CONFIG: libc::c_uint = 656; -pub const GPUREG_GSH_FLOATUNIFORM_DATA: libc::c_uint = 657; -pub const GPUREG_0299: libc::c_uint = 665; -pub const GPUREG_029A: libc::c_uint = 666; -pub const GPUREG_GSH_CODETRANSFER_CONFIG: libc::c_uint = 667; -pub const GPUREG_GSH_CODETRANSFER_DATA: libc::c_uint = 668; -pub const GPUREG_02A4: libc::c_uint = 676; -pub const GPUREG_GSH_OPDESCS_CONFIG: libc::c_uint = 677; -pub const GPUREG_GSH_OPDESCS_DATA: libc::c_uint = 678; -pub const GPUREG_02AE: libc::c_uint = 686; -pub const GPUREG_02AF: libc::c_uint = 687; -pub const GPUREG_VSH_BOOLUNIFORM: libc::c_uint = 688; -pub const GPUREG_VSH_INTUNIFORM_I0: libc::c_uint = 689; -pub const GPUREG_VSH_INTUNIFORM_I1: libc::c_uint = 690; -pub const GPUREG_VSH_INTUNIFORM_I2: libc::c_uint = 691; -pub const GPUREG_VSH_INTUNIFORM_I3: libc::c_uint = 692; -pub const GPUREG_02B5: libc::c_uint = 693; -pub const GPUREG_02B6: libc::c_uint = 694; -pub const GPUREG_02B7: libc::c_uint = 695; -pub const GPUREG_02B8: libc::c_uint = 696; -pub const GPUREG_VSH_INPUTBUFFER_CONFIG: libc::c_uint = 697; -pub const GPUREG_VSH_ENTRYPOINT: libc::c_uint = 698; -pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW: libc::c_uint = 699; -pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH: libc::c_uint = 700; -pub const GPUREG_VSH_OUTMAP_MASK: libc::c_uint = 701; -pub const GPUREG_02BE: libc::c_uint = 702; -pub const GPUREG_VSH_CODETRANSFER_END: libc::c_uint = 703; -pub const GPUREG_VSH_FLOATUNIFORM_CONFIG: libc::c_uint = 704; -pub const GPUREG_VSH_FLOATUNIFORM_DATA: libc::c_uint = 705; -pub const GPUREG_02C9: libc::c_uint = 713; -pub const GPUREG_02CA: libc::c_uint = 714; -pub const GPUREG_VSH_CODETRANSFER_CONFIG: libc::c_uint = 715; -pub const GPUREG_VSH_CODETRANSFER_DATA: libc::c_uint = 716; -pub const GPUREG_02D4: libc::c_uint = 724; -pub const GPUREG_VSH_OPDESCS_CONFIG: libc::c_uint = 725; -pub const GPUREG_VSH_OPDESCS_DATA: libc::c_uint = 726; -pub const GPUREG_02DE: libc::c_uint = 734; -pub const GPUREG_02DF: libc::c_uint = 735; -pub const GPUREG_02E0: libc::c_uint = 736; -pub const GPUREG_02E1: libc::c_uint = 737; -pub const GPUREG_02E2: libc::c_uint = 738; -pub const GPUREG_02E3: libc::c_uint = 739; -pub const GPUREG_02E4: libc::c_uint = 740; -pub const GPUREG_02E5: libc::c_uint = 741; -pub const GPUREG_02E6: libc::c_uint = 742; -pub const GPUREG_02E7: libc::c_uint = 743; -pub const GPUREG_02E8: libc::c_uint = 744; -pub const GPUREG_02E9: libc::c_uint = 745; -pub const GPUREG_02EA: libc::c_uint = 746; -pub const GPUREG_02EB: libc::c_uint = 747; -pub const GPUREG_02EC: libc::c_uint = 748; -pub const GPUREG_02ED: libc::c_uint = 749; -pub const GPUREG_02EE: libc::c_uint = 750; -pub const GPUREG_02EF: libc::c_uint = 751; -pub const GPUREG_02F0: libc::c_uint = 752; -pub const GPUREG_02F1: libc::c_uint = 753; -pub const GPUREG_02F2: libc::c_uint = 754; -pub const GPUREG_02F3: libc::c_uint = 755; -pub const GPUREG_02F4: libc::c_uint = 756; -pub const GPUREG_02F5: libc::c_uint = 757; -pub const GPUREG_02F6: libc::c_uint = 758; -pub const GPUREG_02F7: libc::c_uint = 759; -pub const GPUREG_02F8: libc::c_uint = 760; -pub const GPUREG_02F9: libc::c_uint = 761; -pub const GPUREG_02FA: libc::c_uint = 762; -pub const GPUREG_02FB: libc::c_uint = 763; -pub const GPUREG_02FC: libc::c_uint = 764; -pub const GPUREG_02FD: libc::c_uint = 765; -pub const GPUREG_02FE: libc::c_uint = 766; -pub const GPUREG_02FF: libc::c_uint = 767; -pub const SWKBD_MAX_WORD_LEN: libc::c_uint = 40; -pub const SWKBD_MAX_BUTTON_TEXT_LEN: libc::c_uint = 16; -pub const SWKBD_MAX_HINT_TEXT_LEN: libc::c_uint = 64; -pub const SWKBD_MAX_CALLBACK_MSG_LEN: libc::c_uint = 256; -pub const MIISELECTOR_MAGIC: libc::c_uint = 333326543; -pub const MIISELECTOR_TITLE_LEN: libc::c_uint = 64; -pub const MIISELECTOR_GUESTMII_SLOTS: libc::c_uint = 6; -pub const MIISELECTOR_USERMII_SLOTS: libc::c_uint = 100; -pub const MIISELECTOR_MIIDATA_SIZE: libc::c_uint = 92; -pub const MIISELECTOR_GUESTMII_NAME_LEN: libc::c_uint = 12; -pub const SDMC_DIRITER_MAGIC: libc::c_uint = 1935961443; -pub type __int8_t = libc::c_schar; -pub type __uint8_t = libc::c_uchar; -pub type __int16_t = libc::c_short; -pub type __uint16_t = libc::c_ushort; -pub type __int32_t = libc::c_int; -pub type __uint32_t = libc::c_uint; -pub type __int64_t = libc::c_longlong; -pub type __uint64_t = libc::c_ulonglong; -pub type __int_least8_t = libc::c_schar; -pub type __uint_least8_t = libc::c_uchar; -pub type __int_least16_t = libc::c_short; -pub type __uint_least16_t = libc::c_ushort; -pub type __int_least32_t = libc::c_int; -pub type __uint_least32_t = libc::c_uint; -pub type __int_least64_t = libc::c_longlong; -pub type __uint_least64_t = libc::c_ulonglong; -pub type __intmax_t = libc::c_longlong; -pub type __uintmax_t = libc::c_ulonglong; -pub type __intptr_t = libc::c_long; -pub type __uintptr_t = libc::c_ulong; +pub const __int8_t_defined: u32 = 1; +pub const __int16_t_defined: u32 = 1; +pub const __int32_t_defined: u32 = 1; +pub const __int64_t_defined: u32 = 1; +pub const __int_least8_t_defined: u32 = 1; +pub const __int_least16_t_defined: u32 = 1; +pub const __int_least32_t_defined: u32 = 1; +pub const __int_least64_t_defined: u32 = 1; +pub const __int_fast8_t_defined: u32 = 1; +pub const __int_fast16_t_defined: u32 = 1; +pub const __int_fast32_t_defined: u32 = 1; +pub const __int_fast64_t_defined: u32 = 1; +pub const WINT_MIN: u32 = 0; +pub const true_: u32 = 1; +pub const false_: u32 = 0; +pub const __bool_true_false_are_defined: u32 = 1; +pub const CUR_PROCESS_HANDLE: u32 = 4294934529; +pub const ARBITRATION_SIGNAL_ALL: i32 = -1; +pub const CUR_THREAD_HANDLE: u32 = 4294934528; +pub const SYSCLOCK_SOC: u32 = 16756991; +pub const SYSCLOCK_ARM9: u32 = 134055928; +pub const SYSCLOCK_ARM11: u32 = 268111856; +pub const SYSCLOCK_ARM11_NEW: u32 = 804335568; +pub const CPU_TICKS_PER_MSEC: f64 = 268111.856; +pub const CPU_TICKS_PER_USEC: f64 = 268.111856; +pub const __NEWLIB_H__: u32 = 1; +pub const _WANT_IO_C99_FORMATS: u32 = 1; +pub const _WANT_IO_LONG_LONG: u32 = 1; +pub const _WANT_IO_POS_ARGS: u32 = 1; +pub const _MB_CAPABLE: u32 = 1; +pub const _MB_LEN_MAX: u32 = 8; +pub const HAVE_INITFINI_ARRAY: u32 = 1; +pub const _ATEXIT_DYNAMIC_ALLOC: u32 = 1; +pub const _HAVE_LONG_DOUBLE: u32 = 1; +pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL: u32 = 1; +pub const _LDBL_EQ_DBL: u32 = 1; +pub const _FVWRITE_IN_STREAMIO: u32 = 1; +pub const _FSEEK_OPTIMIZATION: u32 = 1; +pub const _UNBUF_STREAM_OPT: u32 = 1; +pub const __OBSOLETE_MATH_DEFAULT: u32 = 0; +pub const __OBSOLETE_MATH: u32 = 0; +pub const __RAND_MAX: u32 = 2147483647; +pub const CONSOLE_COLOR_BOLD: u32 = 1; +pub const CONSOLE_COLOR_FAINT: u32 = 2; +pub const CONSOLE_ITALIC: u32 = 4; +pub const CONSOLE_UNDERLINE: u32 = 8; +pub const CONSOLE_BLINK_SLOW: u32 = 16; +pub const CONSOLE_BLINK_FAST: u32 = 32; +pub const CONSOLE_COLOR_REVERSE: u32 = 64; +pub const CONSOLE_CONCEAL: u32 = 128; +pub const CONSOLE_CROSSED_OUT: u32 = 256; +pub const __GNUCLIKE_ASM: u32 = 3; +pub const __GNUCLIKE___TYPEOF: u32 = 1; +pub const __GNUCLIKE___OFFSETOF: u32 = 1; +pub const __GNUCLIKE___SECTION: u32 = 1; +pub const __GNUCLIKE_CTOR_SECTION_HANDLING: u32 = 1; +pub const __GNUCLIKE_BUILTIN_CONSTANT_P: u32 = 1; +pub const __GNUCLIKE_BUILTIN_VARARGS: u32 = 1; +pub const __GNUCLIKE_BUILTIN_STDARG: u32 = 1; +pub const __GNUCLIKE_BUILTIN_VAALIST: u32 = 1; +pub const __GNUC_VA_LIST_COMPATIBILITY: u32 = 1; +pub const __GNUCLIKE_BUILTIN_NEXT_ARG: u32 = 1; +pub const __GNUCLIKE_BUILTIN_MEMCPY: u32 = 1; +pub const __CC_SUPPORTS_INLINE: u32 = 1; +pub const __CC_SUPPORTS___INLINE: u32 = 1; +pub const __CC_SUPPORTS___INLINE__: u32 = 1; +pub const __CC_SUPPORTS___FUNC__: u32 = 1; +pub const __CC_SUPPORTS_WARNING: u32 = 1; +pub const __CC_SUPPORTS_VARADIC_XXX: u32 = 1; +pub const __CC_SUPPORTS_DYNAMIC_ARRAY_INIT: u32 = 1; +pub const __BIT_TYPES_DEFINED__: u32 = 1; +pub const _LITTLE_ENDIAN: u32 = 1234; +pub const _BIG_ENDIAN: u32 = 4321; +pub const _PDP_ENDIAN: u32 = 3412; +pub const _BYTE_ORDER: u32 = 1234; +pub const _QUAD_HIGHWORD: u32 = 1; +pub const _QUAD_LOWWORD: u32 = 0; +pub const LITTLE_ENDIAN: u32 = 1234; +pub const BIG_ENDIAN: u32 = 4321; +pub const PDP_ENDIAN: u32 = 3412; +pub const BYTE_ORDER: u32 = 1234; +pub const FD_SETSIZE: u32 = 64; +pub const SCHED_OTHER: u32 = 0; +pub const SCHED_FIFO: u32 = 1; +pub const SCHED_RR: u32 = 2; +pub const PTHREAD_SCOPE_PROCESS: u32 = 0; +pub const PTHREAD_SCOPE_SYSTEM: u32 = 1; +pub const PTHREAD_INHERIT_SCHED: u32 = 1; +pub const PTHREAD_EXPLICIT_SCHED: u32 = 2; +pub const PTHREAD_CREATE_DETACHED: u32 = 0; +pub const PTHREAD_CREATE_JOINABLE: u32 = 1; +pub const CSND_NUM_CHANNELS: u32 = 32; +pub const HTTPC_RESULTCODE_DOWNLOADPENDING: u32 = 3628113963; +pub const HTTPC_RESULTCODE_NOTFOUND: u32 = 3628113960; +pub const HTTPC_RESULTCODE_TIMEDOUT: u32 = 3626016873; +pub const UDS_MAXNODES: u32 = 16; +pub const UDS_BROADCAST_NETWORKNODEID: u32 = 65535; +pub const UDS_HOST_NETWORKNODEID: u32 = 1; +pub const UDS_DEFAULT_RECVBUFSIZE: u32 = 11824; +pub const UDS_DATAFRAME_MAXSIZE: u32 = 1478; +pub const DST_NONE: u32 = 0; +pub const DST_USA: u32 = 1; +pub const DST_AUST: u32 = 2; +pub const DST_WET: u32 = 3; +pub const DST_MET: u32 = 4; +pub const DST_EET: u32 = 5; +pub const DST_CAN: u32 = 6; +pub const SBT_MAX: u64 = 9223372036854775807; +pub const ITIMER_REAL: u32 = 0; +pub const ITIMER_VIRTUAL: u32 = 1; +pub const ITIMER_PROF: u32 = 2; +pub const _NULL: u32 = 0; +pub const _ATEXIT_SIZE: u32 = 32; +pub const _RAND48_SEED_0: u32 = 13070; +pub const _RAND48_SEED_1: u32 = 43981; +pub const _RAND48_SEED_2: u32 = 4660; +pub const _RAND48_MULT_0: u32 = 58989; +pub const _RAND48_MULT_1: u32 = 57068; +pub const _RAND48_MULT_2: u32 = 5; +pub const _RAND48_ADD: u32 = 11; +pub const _REENT_EMERGENCY_SIZE: u32 = 25; +pub const _REENT_ASCTIME_SIZE: u32 = 26; +pub const _REENT_SIGNAL_SIZE: u32 = 24; +pub const _N_LISTS: u32 = 30; +pub const _CLOCKS_PER_SEC_: u32 = 100; +pub const CLOCKS_PER_SEC: u32 = 100; +pub const CLK_TCK: u32 = 100; +pub const CLOCK_ENABLED: u32 = 1; +pub const CLOCK_DISABLED: u32 = 0; +pub const CLOCK_ALLOWED: u32 = 1; +pub const CLOCK_DISALLOWED: u32 = 0; +pub const TIMER_ABSTIME: u32 = 4; +pub const SOL_SOCKET: u32 = 65535; +pub const PF_UNSPEC: u32 = 0; +pub const PF_INET: u32 = 2; +pub const PF_INET6: u32 = 23; +pub const AF_UNSPEC: u32 = 0; +pub const AF_INET: u32 = 2; +pub const AF_INET6: u32 = 23; +pub const SOCK_STREAM: u32 = 1; +pub const SOCK_DGRAM: u32 = 2; +pub const MSG_OOB: u32 = 1; +pub const MSG_PEEK: u32 = 2; +pub const MSG_DONTWAIT: u32 = 4; +pub const MSG_DONTROUTE: u32 = 0; +pub const MSG_WAITALL: u32 = 0; +pub const MSG_MORE: u32 = 0; +pub const MSG_NOSIGNAL: u32 = 0; +pub const SHUT_RD: u32 = 0; +pub const SHUT_WR: u32 = 1; +pub const SHUT_RDWR: u32 = 2; +pub const SO_REUSEADDR: u32 = 4; +pub const SO_LINGER: u32 = 128; +pub const SO_OOBINLINE: u32 = 256; +pub const SO_SNDBUF: u32 = 4097; +pub const SO_RCVBUF: u32 = 4098; +pub const SO_SNDLOWAT: u32 = 4099; +pub const SO_RCVLOWAT: u32 = 4100; +pub const SO_TYPE: u32 = 4104; +pub const SO_ERROR: u32 = 4105; +pub const INADDR_LOOPBACK: u32 = 2130706433; +pub const INADDR_ANY: u32 = 0; +pub const INADDR_BROADCAST: u32 = 4294967295; +pub const INADDR_NONE: u32 = 4294967295; +pub const INET_ADDRSTRLEN: u32 = 16; +pub const IPPROTO_IP: u32 = 0; +pub const IPPROTO_UDP: u32 = 17; +pub const IPPROTO_TCP: u32 = 6; +pub const IP_TOS: u32 = 7; +pub const IP_TTL: u32 = 8; +pub const IP_MULTICAST_LOOP: u32 = 9; +pub const IP_MULTICAST_TTL: u32 = 10; +pub const IP_ADD_MEMBERSHIP: u32 = 11; +pub const IP_DROP_MEMBERSHIP: u32 = 12; +pub const SOL_CONFIG: u32 = 65534; +pub const ROUTING_FLAG_G: u32 = 1; +pub const TCP_STATE_CLOSED: u32 = 1; +pub const TCP_STATE_LISTEN: u32 = 2; +pub const TCP_STATE_ESTABLISHED: u32 = 5; +pub const TCP_STATE_FINWAIT1: u32 = 6; +pub const TCP_STATE_FINWAIT2: u32 = 7; +pub const TCP_STATE_CLOSE_WAIT: u32 = 8; +pub const TCP_STATE_LAST_ACK: u32 = 9; +pub const TCP_STATE_TIME_WAIT: u32 = 11; +pub const MVD_STATUS_OK: u32 = 94208; +pub const MVD_STATUS_PARAMSET: u32 = 94209; +pub const MVD_STATUS_BUSY: u32 = 94210; +pub const MVD_STATUS_FRAMEREADY: u32 = 94211; +pub const MVD_STATUS_INCOMPLETEPROCESSING: u32 = 94212; +pub const MVD_STATUS_NALUPROCFLAG: u32 = 94215; +pub const MVD_DEFAULT_WORKBUF_SIZE: u32 = 9438920; +pub const NFC_ERR_INVALID_STATE: u32 = 3366024704; +pub const NFC_ERR_APPDATA_UNINITIALIZED: u32 = 3366024736; +pub const NFC_ERR_AMIIBO_NOTSETUP: u32 = 3366024744; +pub const NFC_ERR_APPID_MISMATCH: u32 = 3366024760; +pub const NFC_ERR_DATACORRUPTION0: u32 = 3368121868; +pub const NFC_ERR_DATACORRUPTION1: u32 = 3366024728; +pub const NFC_STARTSCAN_DEFAULTINPUT: u32 = 0; +pub const GPUREG_0000: u32 = 0; +pub const GPUREG_0001: u32 = 1; +pub const GPUREG_0002: u32 = 2; +pub const GPUREG_0003: u32 = 3; +pub const GPUREG_0004: u32 = 4; +pub const GPUREG_0005: u32 = 5; +pub const GPUREG_0006: u32 = 6; +pub const GPUREG_0007: u32 = 7; +pub const GPUREG_0008: u32 = 8; +pub const GPUREG_0009: u32 = 9; +pub const GPUREG_000A: u32 = 10; +pub const GPUREG_000B: u32 = 11; +pub const GPUREG_000C: u32 = 12; +pub const GPUREG_000D: u32 = 13; +pub const GPUREG_000E: u32 = 14; +pub const GPUREG_000F: u32 = 15; +pub const GPUREG_FINALIZE: u32 = 16; +pub const GPUREG_0011: u32 = 17; +pub const GPUREG_0012: u32 = 18; +pub const GPUREG_0013: u32 = 19; +pub const GPUREG_0014: u32 = 20; +pub const GPUREG_0015: u32 = 21; +pub const GPUREG_0016: u32 = 22; +pub const GPUREG_0017: u32 = 23; +pub const GPUREG_0018: u32 = 24; +pub const GPUREG_0019: u32 = 25; +pub const GPUREG_001A: u32 = 26; +pub const GPUREG_001B: u32 = 27; +pub const GPUREG_001C: u32 = 28; +pub const GPUREG_001D: u32 = 29; +pub const GPUREG_001E: u32 = 30; +pub const GPUREG_001F: u32 = 31; +pub const GPUREG_0020: u32 = 32; +pub const GPUREG_0021: u32 = 33; +pub const GPUREG_0022: u32 = 34; +pub const GPUREG_0023: u32 = 35; +pub const GPUREG_0024: u32 = 36; +pub const GPUREG_0025: u32 = 37; +pub const GPUREG_0026: u32 = 38; +pub const GPUREG_0027: u32 = 39; +pub const GPUREG_0028: u32 = 40; +pub const GPUREG_0029: u32 = 41; +pub const GPUREG_002A: u32 = 42; +pub const GPUREG_002B: u32 = 43; +pub const GPUREG_002C: u32 = 44; +pub const GPUREG_002D: u32 = 45; +pub const GPUREG_002E: u32 = 46; +pub const GPUREG_002F: u32 = 47; +pub const GPUREG_0030: u32 = 48; +pub const GPUREG_0031: u32 = 49; +pub const GPUREG_0032: u32 = 50; +pub const GPUREG_0033: u32 = 51; +pub const GPUREG_0034: u32 = 52; +pub const GPUREG_0035: u32 = 53; +pub const GPUREG_0036: u32 = 54; +pub const GPUREG_0037: u32 = 55; +pub const GPUREG_0038: u32 = 56; +pub const GPUREG_0039: u32 = 57; +pub const GPUREG_003A: u32 = 58; +pub const GPUREG_003B: u32 = 59; +pub const GPUREG_003C: u32 = 60; +pub const GPUREG_003D: u32 = 61; +pub const GPUREG_003E: u32 = 62; +pub const GPUREG_003F: u32 = 63; +pub const GPUREG_FACECULLING_CONFIG: u32 = 64; +pub const GPUREG_VIEWPORT_WIDTH: u32 = 65; +pub const GPUREG_VIEWPORT_INVW: u32 = 66; +pub const GPUREG_VIEWPORT_HEIGHT: u32 = 67; +pub const GPUREG_VIEWPORT_INVH: u32 = 68; +pub const GPUREG_0045: u32 = 69; +pub const GPUREG_0046: u32 = 70; +pub const GPUREG_FRAGOP_CLIP: u32 = 71; +pub const GPUREG_FRAGOP_CLIP_DATA0: u32 = 72; +pub const GPUREG_FRAGOP_CLIP_DATA1: u32 = 73; +pub const GPUREG_FRAGOP_CLIP_DATA2: u32 = 74; +pub const GPUREG_FRAGOP_CLIP_DATA3: u32 = 75; +pub const GPUREG_004C: u32 = 76; +pub const GPUREG_DEPTHMAP_SCALE: u32 = 77; +pub const GPUREG_DEPTHMAP_OFFSET: u32 = 78; +pub const GPUREG_SH_OUTMAP_TOTAL: u32 = 79; +pub const GPUREG_SH_OUTMAP_O0: u32 = 80; +pub const GPUREG_SH_OUTMAP_O1: u32 = 81; +pub const GPUREG_SH_OUTMAP_O2: u32 = 82; +pub const GPUREG_SH_OUTMAP_O3: u32 = 83; +pub const GPUREG_SH_OUTMAP_O4: u32 = 84; +pub const GPUREG_SH_OUTMAP_O5: u32 = 85; +pub const GPUREG_SH_OUTMAP_O6: u32 = 86; +pub const GPUREG_0057: u32 = 87; +pub const GPUREG_0058: u32 = 88; +pub const GPUREG_0059: u32 = 89; +pub const GPUREG_005A: u32 = 90; +pub const GPUREG_005B: u32 = 91; +pub const GPUREG_005C: u32 = 92; +pub const GPUREG_005D: u32 = 93; +pub const GPUREG_005E: u32 = 94; +pub const GPUREG_005F: u32 = 95; +pub const GPUREG_0060: u32 = 96; +pub const GPUREG_EARLYDEPTH_FUNC: u32 = 97; +pub const GPUREG_EARLYDEPTH_TEST1: u32 = 98; +pub const GPUREG_EARLYDEPTH_CLEAR: u32 = 99; +pub const GPUREG_SH_OUTATTR_MODE: u32 = 100; +pub const GPUREG_SCISSORTEST_MODE: u32 = 101; +pub const GPUREG_SCISSORTEST_POS: u32 = 102; +pub const GPUREG_SCISSORTEST_DIM: u32 = 103; +pub const GPUREG_VIEWPORT_XY: u32 = 104; +pub const GPUREG_0069: u32 = 105; +pub const GPUREG_EARLYDEPTH_DATA: u32 = 106; +pub const GPUREG_006B: u32 = 107; +pub const GPUREG_006C: u32 = 108; +pub const GPUREG_DEPTHMAP_ENABLE: u32 = 109; +pub const GPUREG_RENDERBUF_DIM: u32 = 110; +pub const GPUREG_SH_OUTATTR_CLOCK: u32 = 111; +pub const GPUREG_0070: u32 = 112; +pub const GPUREG_0071: u32 = 113; +pub const GPUREG_0072: u32 = 114; +pub const GPUREG_0073: u32 = 115; +pub const GPUREG_0074: u32 = 116; +pub const GPUREG_0075: u32 = 117; +pub const GPUREG_0076: u32 = 118; +pub const GPUREG_0077: u32 = 119; +pub const GPUREG_0078: u32 = 120; +pub const GPUREG_0079: u32 = 121; +pub const GPUREG_007A: u32 = 122; +pub const GPUREG_007B: u32 = 123; +pub const GPUREG_007C: u32 = 124; +pub const GPUREG_007D: u32 = 125; +pub const GPUREG_007E: u32 = 126; +pub const GPUREG_007F: u32 = 127; +pub const GPUREG_TEXUNIT_CONFIG: u32 = 128; +pub const GPUREG_TEXUNIT0_BORDER_COLOR: u32 = 129; +pub const GPUREG_TEXUNIT0_DIM: u32 = 130; +pub const GPUREG_TEXUNIT0_PARAM: u32 = 131; +pub const GPUREG_TEXUNIT0_LOD: u32 = 132; +pub const GPUREG_TEXUNIT0_ADDR1: u32 = 133; +pub const GPUREG_TEXUNIT0_ADDR2: u32 = 134; +pub const GPUREG_TEXUNIT0_ADDR3: u32 = 135; +pub const GPUREG_TEXUNIT0_ADDR4: u32 = 136; +pub const GPUREG_TEXUNIT0_ADDR5: u32 = 137; +pub const GPUREG_TEXUNIT0_ADDR6: u32 = 138; +pub const GPUREG_TEXUNIT0_SHADOW: u32 = 139; +pub const GPUREG_008C: u32 = 140; +pub const GPUREG_008D: u32 = 141; +pub const GPUREG_TEXUNIT0_TYPE: u32 = 142; +pub const GPUREG_LIGHTING_ENABLE0: u32 = 143; +pub const GPUREG_0090: u32 = 144; +pub const GPUREG_TEXUNIT1_BORDER_COLOR: u32 = 145; +pub const GPUREG_TEXUNIT1_DIM: u32 = 146; +pub const GPUREG_TEXUNIT1_PARAM: u32 = 147; +pub const GPUREG_TEXUNIT1_LOD: u32 = 148; +pub const GPUREG_TEXUNIT1_ADDR: u32 = 149; +pub const GPUREG_TEXUNIT1_TYPE: u32 = 150; +pub const GPUREG_0097: u32 = 151; +pub const GPUREG_0098: u32 = 152; +pub const GPUREG_TEXUNIT2_BORDER_COLOR: u32 = 153; +pub const GPUREG_TEXUNIT2_DIM: u32 = 154; +pub const GPUREG_TEXUNIT2_PARAM: u32 = 155; +pub const GPUREG_TEXUNIT2_LOD: u32 = 156; +pub const GPUREG_TEXUNIT2_ADDR: u32 = 157; +pub const GPUREG_TEXUNIT2_TYPE: u32 = 158; +pub const GPUREG_009F: u32 = 159; +pub const GPUREG_00A0: u32 = 160; +pub const GPUREG_00A1: u32 = 161; +pub const GPUREG_00A2: u32 = 162; +pub const GPUREG_00A3: u32 = 163; +pub const GPUREG_00A4: u32 = 164; +pub const GPUREG_00A5: u32 = 165; +pub const GPUREG_00A6: u32 = 166; +pub const GPUREG_00A7: u32 = 167; +pub const GPUREG_TEXUNIT3_PROCTEX0: u32 = 168; +pub const GPUREG_TEXUNIT3_PROCTEX1: u32 = 169; +pub const GPUREG_TEXUNIT3_PROCTEX2: u32 = 170; +pub const GPUREG_TEXUNIT3_PROCTEX3: u32 = 171; +pub const GPUREG_TEXUNIT3_PROCTEX4: u32 = 10; +pub const GPUREG_TEXUNIT3_PROCTEX5: u32 = 13; +pub const GPUREG_00AE: u32 = 174; +pub const GPUREG_PROCTEX_LUT: u32 = 175; +pub const GPUREG_PROCTEX_LUT_DATA0: u32 = 176; +pub const GPUREG_PROCTEX_LUT_DATA1: u32 = 177; +pub const GPUREG_PROCTEX_LUT_DATA2: u32 = 178; +pub const GPUREG_PROCTEX_LUT_DATA3: u32 = 179; +pub const GPUREG_PROCTEX_LUT_DATA4: u32 = 180; +pub const GPUREG_PROCTEX_LUT_DATA5: u32 = 181; +pub const GPUREG_PROCTEX_LUT_DATA6: u32 = 182; +pub const GPUREG_PROCTEX_LUT_DATA7: u32 = 183; +pub const GPUREG_00B8: u32 = 184; +pub const GPUREG_00B9: u32 = 185; +pub const GPUREG_00BA: u32 = 186; +pub const GPUREG_00BB: u32 = 187; +pub const GPUREG_00BC: u32 = 188; +pub const GPUREG_00BD: u32 = 189; +pub const GPUREG_00BE: u32 = 190; +pub const GPUREG_00BF: u32 = 191; +pub const GPUREG_TEXENV0_SOURCE: u32 = 192; +pub const GPUREG_TEXENV0_OPERAND: u32 = 193; +pub const GPUREG_TEXENV0_COMBINER: u32 = 194; +pub const GPUREG_TEXENV0_COLOR: u32 = 195; +pub const GPUREG_TEXENV0_SCALE: u32 = 196; +pub const GPUREG_00C5: u32 = 197; +pub const GPUREG_00C6: u32 = 198; +pub const GPUREG_00C7: u32 = 199; +pub const GPUREG_TEXENV1_SOURCE: u32 = 200; +pub const GPUREG_TEXENV1_OPERAND: u32 = 201; +pub const GPUREG_TEXENV1_COMBINER: u32 = 202; +pub const GPUREG_TEXENV1_COLOR: u32 = 203; +pub const GPUREG_TEXENV1_SCALE: u32 = 204; +pub const GPUREG_00CD: u32 = 205; +pub const GPUREG_00CE: u32 = 206; +pub const GPUREG_00CF: u32 = 207; +pub const GPUREG_TEXENV2_SOURCE: u32 = 208; +pub const GPUREG_TEXENV2_OPERAND: u32 = 209; +pub const GPUREG_TEXENV2_COMBINER: u32 = 210; +pub const GPUREG_TEXENV2_COLOR: u32 = 211; +pub const GPUREG_TEXENV2_SCALE: u32 = 212; +pub const GPUREG_00D5: u32 = 213; +pub const GPUREG_00D6: u32 = 214; +pub const GPUREG_00D7: u32 = 215; +pub const GPUREG_TEXENV3_SOURCE: u32 = 216; +pub const GPUREG_TEXENV3_OPERAND: u32 = 217; +pub const GPUREG_TEXENV3_COMBINER: u32 = 218; +pub const GPUREG_TEXENV3_COLOR: u32 = 219; +pub const GPUREG_TEXENV3_SCALE: u32 = 220; +pub const GPUREG_00DD: u32 = 221; +pub const GPUREG_00DE: u32 = 222; +pub const GPUREG_00DF: u32 = 223; +pub const GPUREG_TEXENV_UPDATE_BUFFER: u32 = 224; +pub const GPUREG_FOG_COLOR: u32 = 225; +pub const GPUREG_00E2: u32 = 226; +pub const GPUREG_00E3: u32 = 227; +pub const GPUREG_GAS_ATTENUATION: u32 = 228; +pub const GPUREG_GAS_ACCMAX: u32 = 229; +pub const GPUREG_FOG_LUT_INDEX: u32 = 230; +pub const GPUREG_00E7: u32 = 231; +pub const GPUREG_FOG_LUT_DATA0: u32 = 232; +pub const GPUREG_FOG_LUT_DATA1: u32 = 233; +pub const GPUREG_FOG_LUT_DATA2: u32 = 234; +pub const GPUREG_FOG_LUT_DATA3: u32 = 235; +pub const GPUREG_FOG_LUT_DATA4: u32 = 236; +pub const GPUREG_FOG_LUT_DATA5: u32 = 237; +pub const GPUREG_FOG_LUT_DATA6: u32 = 238; +pub const GPUREG_FOG_LUT_DATA7: u32 = 239; +pub const GPUREG_TEXENV4_SOURCE: u32 = 240; +pub const GPUREG_TEXENV4_OPERAND: u32 = 241; +pub const GPUREG_TEXENV4_COMBINER: u32 = 242; +pub const GPUREG_TEXENV4_COLOR: u32 = 243; +pub const GPUREG_TEXENV4_SCALE: u32 = 244; +pub const GPUREG_00F5: u32 = 245; +pub const GPUREG_00F6: u32 = 246; +pub const GPUREG_00F7: u32 = 247; +pub const GPUREG_TEXENV5_SOURCE: u32 = 248; +pub const GPUREG_TEXENV5_OPERAND: u32 = 249; +pub const GPUREG_TEXENV5_COMBINER: u32 = 250; +pub const GPUREG_TEXENV5_COLOR: u32 = 251; +pub const GPUREG_TEXENV5_SCALE: u32 = 252; +pub const GPUREG_TEXENV_BUFFER_COLOR: u32 = 253; +pub const GPUREG_00FE: u32 = 254; +pub const GPUREG_00FF: u32 = 255; +pub const GPUREG_COLOR_OPERATION: u32 = 256; +pub const GPUREG_BLEND_FUNC: u32 = 257; +pub const GPUREG_LOGIC_OP: u32 = 258; +pub const GPUREG_BLEND_COLOR: u32 = 259; +pub const GPUREG_FRAGOP_ALPHA_TEST: u32 = 260; +pub const GPUREG_STENCIL_TEST: u32 = 261; +pub const GPUREG_STENCIL_OP: u32 = 262; +pub const GPUREG_DEPTH_COLOR_MASK: u32 = 263; +pub const GPUREG_0108: u32 = 264; +pub const GPUREG_0109: u32 = 265; +pub const GPUREG_010A: u32 = 266; +pub const GPUREG_010B: u32 = 267; +pub const GPUREG_010C: u32 = 268; +pub const GPUREG_010D: u32 = 269; +pub const GPUREG_010E: u32 = 270; +pub const GPUREG_010F: u32 = 271; +pub const GPUREG_FRAMEBUFFER_INVALIDATE: u32 = 272; +pub const GPUREG_FRAMEBUFFER_FLUSH: u32 = 273; +pub const GPUREG_COLORBUFFER_READ: u32 = 274; +pub const GPUREG_COLORBUFFER_WRITE: u32 = 275; +pub const GPUREG_DEPTHBUFFER_READ: u32 = 276; +pub const GPUREG_DEPTHBUFFER_WRITE: u32 = 277; +pub const GPUREG_DEPTHBUFFER_FORMAT: u32 = 278; +pub const GPUREG_COLORBUFFER_FORMAT: u32 = 279; +pub const GPUREG_EARLYDEPTH_TEST2: u32 = 280; +pub const GPUREG_0119: u32 = 281; +pub const GPUREG_011A: u32 = 282; +pub const GPUREG_FRAMEBUFFER_BLOCK32: u32 = 283; +pub const GPUREG_DEPTHBUFFER_LOC: u32 = 284; +pub const GPUREG_COLORBUFFER_LOC: u32 = 285; +pub const GPUREG_FRAMEBUFFER_DIM: u32 = 286; +pub const GPUREG_011F: u32 = 287; +pub const GPUREG_GAS_LIGHT_XY: u32 = 288; +pub const GPUREG_GAS_LIGHT_Z: u32 = 289; +pub const GPUREG_GAS_LIGHT_Z_COLOR: u32 = 290; +pub const GPUREG_GAS_LUT_INDEX: u32 = 291; +pub const GPUREG_GAS_LUT_DATA: u32 = 292; +pub const GPUREG_0125: u32 = 293; +pub const GPUREG_GAS_DELTAZ_DEPTH: u32 = 294; +pub const GPUREG_0127: u32 = 295; +pub const GPUREG_0128: u32 = 296; +pub const GPUREG_0129: u32 = 297; +pub const GPUREG_012A: u32 = 298; +pub const GPUREG_012B: u32 = 299; +pub const GPUREG_012C: u32 = 300; +pub const GPUREG_012D: u32 = 301; +pub const GPUREG_012E: u32 = 302; +pub const GPUREG_012F: u32 = 303; +pub const GPUREG_FRAGOP_SHADOW: u32 = 304; +pub const GPUREG_0131: u32 = 305; +pub const GPUREG_0132: u32 = 306; +pub const GPUREG_0133: u32 = 307; +pub const GPUREG_0134: u32 = 308; +pub const GPUREG_0135: u32 = 309; +pub const GPUREG_0136: u32 = 310; +pub const GPUREG_0137: u32 = 311; +pub const GPUREG_0138: u32 = 312; +pub const GPUREG_0139: u32 = 313; +pub const GPUREG_013A: u32 = 314; +pub const GPUREG_013B: u32 = 315; +pub const GPUREG_013C: u32 = 316; +pub const GPUREG_013D: u32 = 317; +pub const GPUREG_013E: u32 = 318; +pub const GPUREG_013F: u32 = 319; +pub const GPUREG_LIGHT0_SPECULAR0: u32 = 320; +pub const GPUREG_LIGHT0_SPECULAR1: u32 = 321; +pub const GPUREG_LIGHT0_DIFFUSE: u32 = 322; +pub const GPUREG_LIGHT0_AMBIENT: u32 = 323; +pub const GPUREG_LIGHT0_XY: u32 = 324; +pub const GPUREG_LIGHT0_Z: u32 = 325; +pub const GPUREG_LIGHT0_SPOTDIR_XY: u32 = 326; +pub const GPUREG_LIGHT0_SPOTDIR_Z: u32 = 327; +pub const GPUREG_0148: u32 = 328; +pub const GPUREG_LIGHT0_CONFIG: u32 = 329; +pub const GPUREG_LIGHT0_ATTENUATION_BIAS: u32 = 330; +pub const GPUREG_LIGHT0_ATTENUATION_SCALE: u32 = 331; +pub const GPUREG_014C: u32 = 332; +pub const GPUREG_014D: u32 = 333; +pub const GPUREG_014E: u32 = 334; +pub const GPUREG_014F: u32 = 335; +pub const GPUREG_LIGHT1_SPECULAR0: u32 = 336; +pub const GPUREG_LIGHT1_SPECULAR1: u32 = 337; +pub const GPUREG_LIGHT1_DIFFUSE: u32 = 338; +pub const GPUREG_LIGHT1_AMBIENT: u32 = 339; +pub const GPUREG_LIGHT1_XY: u32 = 340; +pub const GPUREG_LIGHT1_Z: u32 = 341; +pub const GPUREG_LIGHT1_SPOTDIR_XY: u32 = 342; +pub const GPUREG_LIGHT1_SPOTDIR_Z: u32 = 343; +pub const GPUREG_0158: u32 = 344; +pub const GPUREG_LIGHT1_CONFIG: u32 = 345; +pub const GPUREG_LIGHT1_ATTENUATION_BIAS: u32 = 346; +pub const GPUREG_LIGHT1_ATTENUATION_SCALE: u32 = 347; +pub const GPUREG_015C: u32 = 348; +pub const GPUREG_015D: u32 = 349; +pub const GPUREG_015E: u32 = 350; +pub const GPUREG_015F: u32 = 351; +pub const GPUREG_LIGHT2_SPECULAR0: u32 = 352; +pub const GPUREG_LIGHT2_SPECULAR1: u32 = 353; +pub const GPUREG_LIGHT2_DIFFUSE: u32 = 354; +pub const GPUREG_LIGHT2_AMBIENT: u32 = 355; +pub const GPUREG_LIGHT2_XY: u32 = 356; +pub const GPUREG_LIGHT2_Z: u32 = 357; +pub const GPUREG_LIGHT2_SPOTDIR_XY: u32 = 358; +pub const GPUREG_LIGHT2_SPOTDIR_Z: u32 = 359; +pub const GPUREG_0168: u32 = 360; +pub const GPUREG_LIGHT2_CONFIG: u32 = 361; +pub const GPUREG_LIGHT2_ATTENUATION_BIAS: u32 = 362; +pub const GPUREG_LIGHT2_ATTENUATION_SCALE: u32 = 363; +pub const GPUREG_016C: u32 = 364; +pub const GPUREG_016D: u32 = 365; +pub const GPUREG_016E: u32 = 366; +pub const GPUREG_016F: u32 = 367; +pub const GPUREG_LIGHT3_SPECULAR0: u32 = 368; +pub const GPUREG_LIGHT3_SPECULAR1: u32 = 369; +pub const GPUREG_LIGHT3_DIFFUSE: u32 = 370; +pub const GPUREG_LIGHT3_AMBIENT: u32 = 371; +pub const GPUREG_LIGHT3_XY: u32 = 372; +pub const GPUREG_LIGHT3_Z: u32 = 373; +pub const GPUREG_LIGHT3_SPOTDIR_XY: u32 = 374; +pub const GPUREG_LIGHT3_SPOTDIR_Z: u32 = 375; +pub const GPUREG_0178: u32 = 376; +pub const GPUREG_LIGHT3_CONFIG: u32 = 377; +pub const GPUREG_LIGHT3_ATTENUATION_BIAS: u32 = 378; +pub const GPUREG_LIGHT3_ATTENUATION_SCALE: u32 = 379; +pub const GPUREG_017C: u32 = 380; +pub const GPUREG_017D: u32 = 381; +pub const GPUREG_017E: u32 = 382; +pub const GPUREG_017F: u32 = 383; +pub const GPUREG_LIGHT4_SPECULAR0: u32 = 384; +pub const GPUREG_LIGHT4_SPECULAR1: u32 = 385; +pub const GPUREG_LIGHT4_DIFFUSE: u32 = 386; +pub const GPUREG_LIGHT4_AMBIENT: u32 = 387; +pub const GPUREG_LIGHT4_XY: u32 = 388; +pub const GPUREG_LIGHT4_Z: u32 = 389; +pub const GPUREG_LIGHT4_SPOTDIR_XY: u32 = 390; +pub const GPUREG_LIGHT4_SPOTDIR_Z: u32 = 391; +pub const GPUREG_0188: u32 = 392; +pub const GPUREG_LIGHT4_CONFIG: u32 = 393; +pub const GPUREG_LIGHT4_ATTENUATION_BIAS: u32 = 394; +pub const GPUREG_LIGHT4_ATTENUATION_SCALE: u32 = 395; +pub const GPUREG_018C: u32 = 396; +pub const GPUREG_018D: u32 = 397; +pub const GPUREG_018E: u32 = 398; +pub const GPUREG_018F: u32 = 399; +pub const GPUREG_LIGHT5_SPECULAR0: u32 = 400; +pub const GPUREG_LIGHT5_SPECULAR1: u32 = 401; +pub const GPUREG_LIGHT5_DIFFUSE: u32 = 402; +pub const GPUREG_LIGHT5_AMBIENT: u32 = 403; +pub const GPUREG_LIGHT5_XY: u32 = 404; +pub const GPUREG_LIGHT5_Z: u32 = 405; +pub const GPUREG_LIGHT5_SPOTDIR_XY: u32 = 406; +pub const GPUREG_LIGHT5_SPOTDIR_Z: u32 = 407; +pub const GPUREG_0198: u32 = 408; +pub const GPUREG_LIGHT5_CONFIG: u32 = 409; +pub const GPUREG_LIGHT5_ATTENUATION_BIAS: u32 = 410; +pub const GPUREG_LIGHT5_ATTENUATION_SCALE: u32 = 411; +pub const GPUREG_019C: u32 = 412; +pub const GPUREG_019D: u32 = 413; +pub const GPUREG_019E: u32 = 414; +pub const GPUREG_019F: u32 = 415; +pub const GPUREG_LIGHT6_SPECULAR0: u32 = 416; +pub const GPUREG_LIGHT6_SPECULAR1: u32 = 417; +pub const GPUREG_LIGHT6_DIFFUSE: u32 = 418; +pub const GPUREG_LIGHT6_AMBIENT: u32 = 419; +pub const GPUREG_LIGHT6_XY: u32 = 420; +pub const GPUREG_LIGHT6_Z: u32 = 421; +pub const GPUREG_LIGHT6_SPOTDIR_XY: u32 = 422; +pub const GPUREG_LIGHT6_SPOTDIR_Z: u32 = 423; +pub const GPUREG_01A8: u32 = 424; +pub const GPUREG_LIGHT6_CONFIG: u32 = 425; +pub const GPUREG_LIGHT6_ATTENUATION_BIAS: u32 = 426; +pub const GPUREG_LIGHT6_ATTENUATION_SCALE: u32 = 427; +pub const GPUREG_01AC: u32 = 428; +pub const GPUREG_01AD: u32 = 429; +pub const GPUREG_01AE: u32 = 430; +pub const GPUREG_01AF: u32 = 431; +pub const GPUREG_LIGHT7_SPECULAR0: u32 = 432; +pub const GPUREG_LIGHT7_SPECULAR1: u32 = 433; +pub const GPUREG_LIGHT7_DIFFUSE: u32 = 434; +pub const GPUREG_LIGHT7_AMBIENT: u32 = 435; +pub const GPUREG_LIGHT7_XY: u32 = 436; +pub const GPUREG_LIGHT7_Z: u32 = 437; +pub const GPUREG_LIGHT7_SPOTDIR_XY: u32 = 438; +pub const GPUREG_LIGHT7_SPOTDIR_Z: u32 = 439; +pub const GPUREG_01B8: u32 = 440; +pub const GPUREG_LIGHT7_CONFIG: u32 = 441; +pub const GPUREG_LIGHT7_ATTENUATION_BIAS: u32 = 442; +pub const GPUREG_LIGHT7_ATTENUATION_SCALE: u32 = 443; +pub const GPUREG_01BC: u32 = 444; +pub const GPUREG_01BD: u32 = 445; +pub const GPUREG_01BE: u32 = 446; +pub const GPUREG_01BF: u32 = 447; +pub const GPUREG_LIGHTING_AMBIENT: u32 = 448; +pub const GPUREG_01C1: u32 = 449; +pub const GPUREG_LIGHTING_NUM_LIGHTS: u32 = 450; +pub const GPUREG_LIGHTING_CONFIG0: u32 = 451; +pub const GPUREG_LIGHTING_CONFIG1: u32 = 452; +pub const GPUREG_LIGHTING_LUT_INDEX: u32 = 453; +pub const GPUREG_LIGHTING_ENABLE1: u32 = 454; +pub const GPUREG_01C7: u32 = 455; +pub const GPUREG_LIGHTING_LUT_DATA0: u32 = 456; +pub const GPUREG_LIGHTING_LUT_DATA1: u32 = 457; +pub const GPUREG_LIGHTING_LUT_DATA2: u32 = 458; +pub const GPUREG_LIGHTING_LUT_DATA3: u32 = 459; +pub const GPUREG_LIGHTING_LUT_DATA4: u32 = 460; +pub const GPUREG_LIGHTING_LUT_DATA5: u32 = 461; +pub const GPUREG_LIGHTING_LUT_DATA6: u32 = 462; +pub const GPUREG_LIGHTING_LUT_DATA7: u32 = 463; +pub const GPUREG_LIGHTING_LUTINPUT_ABS: u32 = 464; +pub const GPUREG_LIGHTING_LUTINPUT_SELECT: u32 = 465; +pub const GPUREG_LIGHTING_LUTINPUT_SCALE: u32 = 466; +pub const GPUREG_01D3: u32 = 467; +pub const GPUREG_01D4: u32 = 468; +pub const GPUREG_01D5: u32 = 469; +pub const GPUREG_01D6: u32 = 470; +pub const GPUREG_01D7: u32 = 471; +pub const GPUREG_01D8: u32 = 472; +pub const GPUREG_LIGHTING_LIGHT_PERMUTATION: u32 = 473; +pub const GPUREG_01DA: u32 = 474; +pub const GPUREG_01DB: u32 = 475; +pub const GPUREG_01DC: u32 = 476; +pub const GPUREG_01DD: u32 = 477; +pub const GPUREG_01DE: u32 = 478; +pub const GPUREG_01DF: u32 = 479; +pub const GPUREG_01E0: u32 = 480; +pub const GPUREG_01E1: u32 = 481; +pub const GPUREG_01E2: u32 = 482; +pub const GPUREG_01E3: u32 = 483; +pub const GPUREG_01E4: u32 = 484; +pub const GPUREG_01E5: u32 = 485; +pub const GPUREG_01E6: u32 = 486; +pub const GPUREG_01E7: u32 = 487; +pub const GPUREG_01E8: u32 = 488; +pub const GPUREG_01E9: u32 = 489; +pub const GPUREG_01EA: u32 = 490; +pub const GPUREG_01EB: u32 = 491; +pub const GPUREG_01EC: u32 = 492; +pub const GPUREG_01ED: u32 = 493; +pub const GPUREG_01EE: u32 = 494; +pub const GPUREG_01EF: u32 = 495; +pub const GPUREG_01F0: u32 = 496; +pub const GPUREG_01F1: u32 = 497; +pub const GPUREG_01F2: u32 = 498; +pub const GPUREG_01F3: u32 = 499; +pub const GPUREG_01F4: u32 = 500; +pub const GPUREG_01F5: u32 = 501; +pub const GPUREG_01F6: u32 = 502; +pub const GPUREG_01F7: u32 = 503; +pub const GPUREG_01F8: u32 = 504; +pub const GPUREG_01F9: u32 = 505; +pub const GPUREG_01FA: u32 = 506; +pub const GPUREG_01FB: u32 = 507; +pub const GPUREG_01FC: u32 = 508; +pub const GPUREG_01FD: u32 = 509; +pub const GPUREG_01FE: u32 = 510; +pub const GPUREG_01FF: u32 = 511; +pub const GPUREG_ATTRIBBUFFERS_LOC: u32 = 512; +pub const GPUREG_ATTRIBBUFFERS_FORMAT_LOW: u32 = 513; +pub const GPUREG_ATTRIBBUFFERS_FORMAT_HIGH: u32 = 514; +pub const GPUREG_ATTRIBBUFFER0_OFFSET: u32 = 515; +pub const GPUREG_ATTRIBBUFFER0_CONFIG1: u32 = 516; +pub const GPUREG_ATTRIBBUFFER0_CONFIG2: u32 = 517; +pub const GPUREG_ATTRIBBUFFER1_OFFSET: u32 = 518; +pub const GPUREG_ATTRIBBUFFER1_CONFIG1: u32 = 519; +pub const GPUREG_ATTRIBBUFFER1_CONFIG2: u32 = 520; +pub const GPUREG_ATTRIBBUFFER2_OFFSET: u32 = 521; +pub const GPUREG_ATTRIBBUFFER2_CONFIG1: u32 = 522; +pub const GPUREG_ATTRIBBUFFER2_CONFIG2: u32 = 523; +pub const GPUREG_ATTRIBBUFFER3_OFFSET: u32 = 524; +pub const GPUREG_ATTRIBBUFFER3_CONFIG1: u32 = 525; +pub const GPUREG_ATTRIBBUFFER3_CONFIG2: u32 = 526; +pub const GPUREG_ATTRIBBUFFER4_OFFSET: u32 = 527; +pub const GPUREG_ATTRIBBUFFER4_CONFIG1: u32 = 528; +pub const GPUREG_ATTRIBBUFFER4_CONFIG2: u32 = 529; +pub const GPUREG_ATTRIBBUFFER5_OFFSET: u32 = 530; +pub const GPUREG_ATTRIBBUFFER5_CONFIG1: u32 = 531; +pub const GPUREG_ATTRIBBUFFER5_CONFIG2: u32 = 532; +pub const GPUREG_ATTRIBBUFFER6_OFFSET: u32 = 533; +pub const GPUREG_ATTRIBBUFFER6_CONFIG1: u32 = 534; +pub const GPUREG_ATTRIBBUFFER6_CONFIG2: u32 = 535; +pub const GPUREG_ATTRIBBUFFER7_OFFSET: u32 = 536; +pub const GPUREG_ATTRIBBUFFER7_CONFIG1: u32 = 537; +pub const GPUREG_ATTRIBBUFFER7_CONFIG2: u32 = 538; +pub const GPUREG_ATTRIBBUFFER8_OFFSET: u32 = 539; +pub const GPUREG_ATTRIBBUFFER8_CONFIG1: u32 = 540; +pub const GPUREG_ATTRIBBUFFER8_CONFIG2: u32 = 541; +pub const GPUREG_ATTRIBBUFFER9_OFFSET: u32 = 542; +pub const GPUREG_ATTRIBBUFFER9_CONFIG1: u32 = 543; +pub const GPUREG_ATTRIBBUFFER9_CONFIG2: u32 = 544; +pub const GPUREG_ATTRIBBUFFERA_OFFSET: u32 = 545; +pub const GPUREG_ATTRIBBUFFERA_CONFIG1: u32 = 546; +pub const GPUREG_ATTRIBBUFFERA_CONFIG2: u32 = 547; +pub const GPUREG_ATTRIBBUFFERB_OFFSET: u32 = 548; +pub const GPUREG_ATTRIBBUFFERB_CONFIG1: u32 = 549; +pub const GPUREG_ATTRIBBUFFERB_CONFIG2: u32 = 550; +pub const GPUREG_INDEXBUFFER_CONFIG: u32 = 551; +pub const GPUREG_NUMVERTICES: u32 = 552; +pub const GPUREG_GEOSTAGE_CONFIG: u32 = 553; +pub const GPUREG_VERTEX_OFFSET: u32 = 554; +pub const GPUREG_022B: u32 = 555; +pub const GPUREG_022C: u32 = 556; +pub const GPUREG_POST_VERTEX_CACHE_NUM: u32 = 557; +pub const GPUREG_DRAWARRAYS: u32 = 558; +pub const GPUREG_DRAWELEMENTS: u32 = 559; +pub const GPUREG_0230: u32 = 560; +pub const GPUREG_VTX_FUNC: u32 = 561; +pub const GPUREG_FIXEDATTRIB_INDEX: u32 = 562; +pub const GPUREG_FIXEDATTRIB_DATA0: u32 = 563; +pub const GPUREG_FIXEDATTRIB_DATA1: u32 = 564; +pub const GPUREG_FIXEDATTRIB_DATA2: u32 = 565; +pub const GPUREG_0236: u32 = 566; +pub const GPUREG_0237: u32 = 567; +pub const GPUREG_CMDBUF_SIZE0: u32 = 568; +pub const GPUREG_CMDBUF_SIZE1: u32 = 569; +pub const GPUREG_CMDBUF_ADDR0: u32 = 570; +pub const GPUREG_CMDBUF_ADDR1: u32 = 571; +pub const GPUREG_CMDBUF_JUMP0: u32 = 572; +pub const GPUREG_CMDBUF_JUMP1: u32 = 573; +pub const GPUREG_023E: u32 = 574; +pub const GPUREG_023F: u32 = 575; +pub const GPUREG_0240: u32 = 576; +pub const GPUREG_0241: u32 = 577; +pub const GPUREG_VSH_NUM_ATTR: u32 = 578; +pub const GPUREG_0243: u32 = 579; +pub const GPUREG_VSH_COM_MODE: u32 = 580; +pub const GPUREG_START_DRAW_FUNC0: u32 = 581; +pub const GPUREG_0246: u32 = 582; +pub const GPUREG_0247: u32 = 583; +pub const GPUREG_0248: u32 = 584; +pub const GPUREG_0249: u32 = 585; +pub const GPUREG_VSH_OUTMAP_TOTAL1: u32 = 586; +pub const GPUREG_024B: u32 = 587; +pub const GPUREG_024C: u32 = 588; +pub const GPUREG_024D: u32 = 589; +pub const GPUREG_024E: u32 = 590; +pub const GPUREG_024F: u32 = 591; +pub const GPUREG_0250: u32 = 592; +pub const GPUREG_VSH_OUTMAP_TOTAL2: u32 = 593; +pub const GPUREG_GSH_MISC0: u32 = 594; +pub const GPUREG_GEOSTAGE_CONFIG2: u32 = 595; +pub const GPUREG_GSH_MISC1: u32 = 596; +pub const GPUREG_0255: u32 = 597; +pub const GPUREG_0256: u32 = 598; +pub const GPUREG_0257: u32 = 599; +pub const GPUREG_0258: u32 = 600; +pub const GPUREG_0259: u32 = 601; +pub const GPUREG_025A: u32 = 602; +pub const GPUREG_025B: u32 = 603; +pub const GPUREG_025C: u32 = 604; +pub const GPUREG_025D: u32 = 605; +pub const GPUREG_PRIMITIVE_CONFIG: u32 = 606; +pub const GPUREG_RESTART_PRIMITIVE: u32 = 607; +pub const GPUREG_0260: u32 = 608; +pub const GPUREG_0261: u32 = 609; +pub const GPUREG_0262: u32 = 610; +pub const GPUREG_0263: u32 = 611; +pub const GPUREG_0264: u32 = 612; +pub const GPUREG_0265: u32 = 613; +pub const GPUREG_0266: u32 = 614; +pub const GPUREG_0267: u32 = 615; +pub const GPUREG_0268: u32 = 616; +pub const GPUREG_0269: u32 = 617; +pub const GPUREG_026A: u32 = 618; +pub const GPUREG_026B: u32 = 619; +pub const GPUREG_026C: u32 = 620; +pub const GPUREG_026D: u32 = 621; +pub const GPUREG_026E: u32 = 622; +pub const GPUREG_026F: u32 = 623; +pub const GPUREG_0270: u32 = 624; +pub const GPUREG_0271: u32 = 625; +pub const GPUREG_0272: u32 = 626; +pub const GPUREG_0273: u32 = 627; +pub const GPUREG_0274: u32 = 628; +pub const GPUREG_0275: u32 = 629; +pub const GPUREG_0276: u32 = 630; +pub const GPUREG_0277: u32 = 631; +pub const GPUREG_0278: u32 = 632; +pub const GPUREG_0279: u32 = 633; +pub const GPUREG_027A: u32 = 634; +pub const GPUREG_027B: u32 = 635; +pub const GPUREG_027C: u32 = 636; +pub const GPUREG_027D: u32 = 637; +pub const GPUREG_027E: u32 = 638; +pub const GPUREG_027F: u32 = 639; +pub const GPUREG_GSH_BOOLUNIFORM: u32 = 640; +pub const GPUREG_GSH_INTUNIFORM_I0: u32 = 641; +pub const GPUREG_GSH_INTUNIFORM_I1: u32 = 642; +pub const GPUREG_GSH_INTUNIFORM_I2: u32 = 643; +pub const GPUREG_GSH_INTUNIFORM_I3: u32 = 644; +pub const GPUREG_0285: u32 = 645; +pub const GPUREG_0286: u32 = 646; +pub const GPUREG_0287: u32 = 647; +pub const GPUREG_0288: u32 = 648; +pub const GPUREG_GSH_INPUTBUFFER_CONFIG: u32 = 649; +pub const GPUREG_GSH_ENTRYPOINT: u32 = 650; +pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW: u32 = 651; +pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH: u32 = 652; +pub const GPUREG_GSH_OUTMAP_MASK: u32 = 653; +pub const GPUREG_028E: u32 = 654; +pub const GPUREG_GSH_CODETRANSFER_END: u32 = 655; +pub const GPUREG_GSH_FLOATUNIFORM_CONFIG: u32 = 656; +pub const GPUREG_GSH_FLOATUNIFORM_DATA: u32 = 657; +pub const GPUREG_0299: u32 = 665; +pub const GPUREG_029A: u32 = 666; +pub const GPUREG_GSH_CODETRANSFER_CONFIG: u32 = 667; +pub const GPUREG_GSH_CODETRANSFER_DATA: u32 = 668; +pub const GPUREG_02A4: u32 = 676; +pub const GPUREG_GSH_OPDESCS_CONFIG: u32 = 677; +pub const GPUREG_GSH_OPDESCS_DATA: u32 = 678; +pub const GPUREG_02AE: u32 = 686; +pub const GPUREG_02AF: u32 = 687; +pub const GPUREG_VSH_BOOLUNIFORM: u32 = 688; +pub const GPUREG_VSH_INTUNIFORM_I0: u32 = 689; +pub const GPUREG_VSH_INTUNIFORM_I1: u32 = 690; +pub const GPUREG_VSH_INTUNIFORM_I2: u32 = 691; +pub const GPUREG_VSH_INTUNIFORM_I3: u32 = 692; +pub const GPUREG_02B5: u32 = 693; +pub const GPUREG_02B6: u32 = 694; +pub const GPUREG_02B7: u32 = 695; +pub const GPUREG_02B8: u32 = 696; +pub const GPUREG_VSH_INPUTBUFFER_CONFIG: u32 = 697; +pub const GPUREG_VSH_ENTRYPOINT: u32 = 698; +pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW: u32 = 699; +pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH: u32 = 700; +pub const GPUREG_VSH_OUTMAP_MASK: u32 = 701; +pub const GPUREG_02BE: u32 = 702; +pub const GPUREG_VSH_CODETRANSFER_END: u32 = 703; +pub const GPUREG_VSH_FLOATUNIFORM_CONFIG: u32 = 704; +pub const GPUREG_VSH_FLOATUNIFORM_DATA: u32 = 705; +pub const GPUREG_02C9: u32 = 713; +pub const GPUREG_02CA: u32 = 714; +pub const GPUREG_VSH_CODETRANSFER_CONFIG: u32 = 715; +pub const GPUREG_VSH_CODETRANSFER_DATA: u32 = 716; +pub const GPUREG_02D4: u32 = 724; +pub const GPUREG_VSH_OPDESCS_CONFIG: u32 = 725; +pub const GPUREG_VSH_OPDESCS_DATA: u32 = 726; +pub const GPUREG_02DE: u32 = 734; +pub const GPUREG_02DF: u32 = 735; +pub const GPUREG_02E0: u32 = 736; +pub const GPUREG_02E1: u32 = 737; +pub const GPUREG_02E2: u32 = 738; +pub const GPUREG_02E3: u32 = 739; +pub const GPUREG_02E4: u32 = 740; +pub const GPUREG_02E5: u32 = 741; +pub const GPUREG_02E6: u32 = 742; +pub const GPUREG_02E7: u32 = 743; +pub const GPUREG_02E8: u32 = 744; +pub const GPUREG_02E9: u32 = 745; +pub const GPUREG_02EA: u32 = 746; +pub const GPUREG_02EB: u32 = 747; +pub const GPUREG_02EC: u32 = 748; +pub const GPUREG_02ED: u32 = 749; +pub const GPUREG_02EE: u32 = 750; +pub const GPUREG_02EF: u32 = 751; +pub const GPUREG_02F0: u32 = 752; +pub const GPUREG_02F1: u32 = 753; +pub const GPUREG_02F2: u32 = 754; +pub const GPUREG_02F3: u32 = 755; +pub const GPUREG_02F4: u32 = 756; +pub const GPUREG_02F5: u32 = 757; +pub const GPUREG_02F6: u32 = 758; +pub const GPUREG_02F7: u32 = 759; +pub const GPUREG_02F8: u32 = 760; +pub const GPUREG_02F9: u32 = 761; +pub const GPUREG_02FA: u32 = 762; +pub const GPUREG_02FB: u32 = 763; +pub const GPUREG_02FC: u32 = 764; +pub const GPUREG_02FD: u32 = 765; +pub const GPUREG_02FE: u32 = 766; +pub const GPUREG_02FF: u32 = 767; +pub const NDSP_SAMPLE_RATE: f64 = 32728.498046875; +pub const SWKBD_MAX_WORD_LEN: u32 = 40; +pub const SWKBD_MAX_BUTTON_TEXT_LEN: u32 = 16; +pub const SWKBD_MAX_HINT_TEXT_LEN: u32 = 64; +pub const SWKBD_MAX_CALLBACK_MSG_LEN: u32 = 256; +pub const MIISELECTOR_MAGIC: u32 = 333326543; +pub const MIISELECTOR_TITLE_LEN: u32 = 64; +pub const MIISELECTOR_GUESTMII_SLOTS: u32 = 6; +pub const MIISELECTOR_USERMII_SLOTS: u32 = 100; +pub const MIISELECTOR_MIIDATA_SIZE: u32 = 92; +pub const MIISELECTOR_GUESTMII_NAME_LEN: u32 = 12; +pub const SDMC_DIRITER_MAGIC: u32 = 1935961443; +pub type __int8_t = ::libc::c_schar; +pub type __uint8_t = ::libc::c_uchar; +pub type __int16_t = ::libc::c_short; +pub type __uint16_t = ::libc::c_ushort; +pub type __int32_t = ::libc::c_int; +pub type __uint32_t = ::libc::c_uint; +pub type __int64_t = ::libc::c_longlong; +pub type __uint64_t = ::libc::c_ulonglong; +pub type __int_least8_t = ::libc::c_schar; +pub type __uint_least8_t = ::libc::c_uchar; +pub type __int_least16_t = ::libc::c_short; +pub type __uint_least16_t = ::libc::c_ushort; +pub type __int_least32_t = ::libc::c_int; +pub type __uint_least32_t = ::libc::c_uint; +pub type __int_least64_t = ::libc::c_longlong; +pub type __uint_least64_t = ::libc::c_ulonglong; +pub type __intmax_t = ::libc::c_longlong; +pub type __uintmax_t = ::libc::c_ulonglong; +pub type __intptr_t = ::libc::c_long; +pub type __uintptr_t = ::libc::c_ulong; pub type intmax_t = __intmax_t; pub type uintmax_t = __uintmax_t; pub type int_least8_t = __int_least8_t; @@ -1066,19 +1164,19 @@ pub type int_least32_t = __int_least32_t; pub type uint_least32_t = __uint_least32_t; pub type int_least64_t = __int_least64_t; pub type uint_least64_t = __uint_least64_t; -pub type int_fast8_t = libc::c_schar; -pub type uint_fast8_t = libc::c_uchar; -pub type int_fast16_t = libc::c_short; -pub type uint_fast16_t = libc::c_ushort; -pub type int_fast32_t = libc::c_int; -pub type uint_fast32_t = libc::c_uint; -pub type int_fast64_t = libc::c_longlong; -pub type uint_fast64_t = libc::c_ulonglong; -pub type wchar_t = libc::c_uint; +pub type int_fast8_t = ::libc::c_schar; +pub type uint_fast8_t = ::libc::c_uchar; +pub type int_fast16_t = ::libc::c_short; +pub type uint_fast16_t = ::libc::c_ushort; +pub type int_fast32_t = ::libc::c_int; +pub type uint_fast32_t = ::libc::c_uint; +pub type int_fast64_t = ::libc::c_longlong; +pub type uint_fast64_t = ::libc::c_ulonglong; +pub type wchar_t = ::libc::c_uint; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct max_align_t { - pub __clang_max_align_nonce1: libc::c_longlong, + pub __clang_max_align_nonce1: ::libc::c_longlong, pub __clang_max_align_nonce2: f64, } pub type s8 = i8; @@ -1095,7 +1193,7 @@ pub type vs32 = s32; pub type vs64 = s64; pub type Handle = u32; pub type Result = s32; -pub type ThreadFunc = ::core::option::Option; +pub type ThreadFunc = ::core::option::Option; pub type voidfn = ::core::option::Option; #[repr(C)] pub struct CpuRegisters { @@ -1119,7 +1217,7 @@ pub union FpuRegisters__bindgen_ty_1 { _bindgen_union_align: [u32; 32usize], } #[repr(C, packed)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 { pub d: [f64; 16usize], } @@ -1132,7 +1230,7 @@ pub const RL_USAGE: _bindgen_ty_1 = 28; pub const RL_PERMANENT: _bindgen_ty_1 = 27; pub const RL_TEMPORARY: _bindgen_ty_1 = 26; pub const RL_STATUS: _bindgen_ty_1 = 25; -pub type _bindgen_ty_1 = libc::c_uint; +pub type _bindgen_ty_1 = u32; pub const RS_SUCCESS: _bindgen_ty_2 = 0; pub const RS_NOP: _bindgen_ty_2 = 1; pub const RS_WOULDBLOCK: _bindgen_ty_2 = 2; @@ -1146,7 +1244,7 @@ pub const RS_CANCELED: _bindgen_ty_2 = 9; pub const RS_STATUSCHANGED: _bindgen_ty_2 = 10; pub const RS_INTERNAL: _bindgen_ty_2 = 11; pub const RS_INVALIDRESVAL: _bindgen_ty_2 = 63; -pub type _bindgen_ty_2 = libc::c_uint; +pub type _bindgen_ty_2 = u32; pub const RM_COMMON: _bindgen_ty_3 = 0; pub const RM_KERNEL: _bindgen_ty_3 = 1; pub const RM_UTIL: _bindgen_ty_3 = 2; @@ -1245,7 +1343,7 @@ pub const RM_QTM: _bindgen_ty_3 = 96; pub const RM_NFP: _bindgen_ty_3 = 97; pub const RM_APPLICATION: _bindgen_ty_3 = 254; pub const RM_INVALIDRESVAL: _bindgen_ty_3 = 255; -pub type _bindgen_ty_3 = libc::c_uint; +pub type _bindgen_ty_3 = u32; pub const RD_SUCCESS: _bindgen_ty_4 = 0; pub const RD_INVALID_RESULT_VALUE: _bindgen_ty_4 = 1023; pub const RD_TIMEOUT: _bindgen_ty_4 = 1022; @@ -1271,11 +1369,11 @@ pub const RD_ALREADY_DONE: _bindgen_ty_4 = 1003; pub const RD_NOT_AUTHORIZED: _bindgen_ty_4 = 1002; pub const RD_TOO_LARGE: _bindgen_ty_4 = 1001; pub const RD_INVALID_SELECTION: _bindgen_ty_4 = 1000; -pub type _bindgen_ty_4 = libc::c_uint; +pub type _bindgen_ty_4 = u32; pub const IPC_BUFFER_R: IPC_BufferRights = 2; pub const IPC_BUFFER_W: IPC_BufferRights = 4; pub const IPC_BUFFER_RW: IPC_BufferRights = 6; -pub type IPC_BufferRights = libc::c_uint; +pub type IPC_BufferRights = u32; pub const MEMOP_FREE: MemOp = 1; pub const MEMOP_RESERVE: MemOp = 2; pub const MEMOP_ALLOC: MemOp = 3; @@ -1289,7 +1387,7 @@ pub const MEMOP_OP_MASK: MemOp = 255; pub const MEMOP_REGION_MASK: MemOp = 3840; pub const MEMOP_LINEAR_FLAG: MemOp = 65536; pub const MEMOP_ALLOC_LINEAR: MemOp = 65539; -pub type MemOp = libc::c_uint; +pub type MemOp = u32; pub const MEMSTATE_FREE: MemState = 0; pub const MEMSTATE_RESERVED: MemState = 1; pub const MEMSTATE_IO: MemState = 2; @@ -1302,12 +1400,12 @@ pub const MEMSTATE_ALIASED: MemState = 8; pub const MEMSTATE_ALIAS: MemState = 9; pub const MEMSTATE_ALIASCODE: MemState = 10; pub const MEMSTATE_LOCKED: MemState = 11; -pub type MemState = libc::c_uint; +pub type MemState = u32; pub const MEMPERM_READ: MemPerm = 1; pub const MEMPERM_WRITE: MemPerm = 2; pub const MEMPERM_EXECUTE: MemPerm = 4; pub const MEMPERM_DONTCARE: MemPerm = 268435456; -pub type MemPerm = libc::c_uint; +pub type MemPerm = u32; #[repr(C)] pub struct MemInfo { pub base_addr: u32, @@ -1324,13 +1422,13 @@ pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1; pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2; pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3; pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4; -pub type ArbitrationType = libc::c_uint; +pub type ArbitrationType = u32; pub const RESET_ONESHOT: ResetType = 0; pub const RESET_STICKY: ResetType = 1; pub const RESET_PULSE: ResetType = 2; -pub type ResetType = libc::c_uint; +pub type ResetType = u32; pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0; -pub type ThreadInfoType = libc::c_uint; +pub type ThreadInfoType = u32; pub const RESLIMIT_PRIORITY: ResourceLimitType = 0; pub const RESLIMIT_COMMIT: ResourceLimitType = 1; pub const RESLIMIT_THREAD: ResourceLimitType = 2; @@ -1342,20 +1440,20 @@ pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7; pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8; pub const RESLIMIT_CPUTIME: ResourceLimitType = 9; pub const RESLIMIT_BIT: ResourceLimitType = 2147483648; -pub type ResourceLimitType = libc::c_uint; +pub type ResourceLimitType = u32; #[repr(C)] pub struct AttachProcessEvent { pub program_id: u64, - pub process_name: [libc::c_char; 8usize], + pub process_name: [::libc::c_char; 8usize], pub process_id: u32, pub other_flags: u32, } pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0; pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1; pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2; -pub type ExitProcessEventReason = libc::c_uint; +pub type ExitProcessEventReason = u32; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct ExitProcessEvent { pub reason: ExitProcessEventReason, } @@ -1369,9 +1467,9 @@ pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0; pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1; pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2; pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3; -pub type ExitThreadEventReason = libc::c_uint; +pub type ExitThreadEventReason = u32; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct ExitThreadEvent { pub reason: ExitThreadEventReason, } @@ -1380,7 +1478,7 @@ pub const USERBREAK_ASSERT: UserBreakType = 1; pub const USERBREAK_USER: UserBreakType = 2; pub const USERBREAK_LOAD_RO: UserBreakType = 3; pub const USERBREAK_UNLOAD_RO: UserBreakType = 4; -pub type UserBreakType = libc::c_uint; +pub type UserBreakType = u32; pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0; pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1; pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2; @@ -1390,7 +1488,7 @@ pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5; pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6; pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7; pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8; -pub type ExceptionEventType = libc::c_uint; +pub type ExceptionEventType = u32; #[repr(C)] pub struct FaultExceptionEvent { pub fault_information: u32, @@ -1398,7 +1496,7 @@ pub struct FaultExceptionEvent { pub const STOPPOINT_SVC_FF: StopPointType = 0; pub const STOPPOINT_BREAKPOINT: StopPointType = 1; pub const STOPPOINT_WATCHPOINT: StopPointType = 2; -pub type StopPointType = libc::c_uint; +pub type StopPointType = u32; #[repr(C)] pub struct StopPointExceptionEvent { pub type_: StopPointType, @@ -1411,7 +1509,7 @@ pub struct UserBreakExceptionEvent { pub croInfoSize: u32, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct DebuggerBreakExceptionEvent { pub thread_ids: [s32; 4usize], } @@ -1463,7 +1561,7 @@ pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9; pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10; pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11; pub const DBGEVENT_MAP: DebugEventType = 12; -pub type DebugEventType = libc::c_uint; +pub type DebugEventType = u32; #[repr(C)] pub struct DebugEventInfo { pub type_: DebugEventType, @@ -1490,7 +1588,7 @@ pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2; pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4; pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8; pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16; -pub type DebugFlags = libc::c_uint; +pub type DebugFlags = u32; #[repr(C)] pub struct ThreadContext { pub cpu_registers: CpuRegisters, @@ -1503,12 +1601,12 @@ pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8; pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3; pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12; pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15; -pub type ThreadContextControlFlags = libc::c_uint; +pub type ThreadContextControlFlags = u32; pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0; pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1; pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2; pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3; -pub type DebugThreadParameter = libc::c_uint; +pub type DebugThreadParameter = u32; #[repr(C)] pub struct CodeSetInfo { pub name: [u8; 8usize], @@ -1529,9 +1627,9 @@ pub struct CodeSetInfo { } #[repr(C)] pub struct StartupInfo { - pub priority: libc::c_int, + pub priority: ::libc::c_int, pub stack_size: u32, - pub argc: libc::c_int, + pub argc: ::libc::c_int, pub argv: *mut u16, pub envp: *mut u16, } @@ -1585,18 +1683,18 @@ extern "C" { pub fn svcStartInterProcessDma( dma: *mut Handle, dstProcess: Handle, - dst: *mut libc::c_void, + dst: *mut ::libc::c_void, srcProcess: Handle, - src: *const libc::c_void, + src: *const ::libc::c_void, size: u32, - dmaConfig: *mut libc::c_void, + dmaConfig: *mut ::libc::c_void, ) -> Result; } extern "C" { pub fn svcStopDma(dma: Handle) -> Result; } extern "C" { - pub fn svcGetDmaState(dmaState: *mut libc::c_void, dma: Handle) -> Result; + pub fn svcGetDmaState(dmaState: *mut ::libc::c_void, dma: Handle) -> Result; } extern "C" { pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32) -> Result; @@ -1612,17 +1710,21 @@ extern "C" { extern "C" { pub fn svcInvalidateProcessDataCache( process: Handle, - addr: *mut libc::c_void, + addr: *mut ::libc::c_void, size: u32, ) -> Result; } extern "C" { - pub fn svcStoreProcessDataCache(process: Handle, addr: *mut libc::c_void, size: u32) -> Result; + pub fn svcStoreProcessDataCache( + process: Handle, + addr: *mut ::libc::c_void, + size: u32, + ) -> Result; } extern "C" { pub fn svcFlushProcessDataCache( process: Handle, - addr: *const libc::c_void, + addr: *const ::libc::c_void, size: u32, ) -> Result; } @@ -1630,7 +1732,7 @@ extern "C" { pub fn svcOpenProcess(process: *mut Handle, processId: u32) -> Result; } extern "C" { - pub fn svcExitProcess() -> !; + pub fn svcExitProcess(); } extern "C" { pub fn svcTerminateProcess(process: Handle) -> Result; @@ -1660,20 +1762,20 @@ extern "C" { pub fn svcCreatePort( portServer: *mut Handle, portClient: *mut Handle, - name: *const libc::c_char, + name: *const ::libc::c_char, maxSessions: s32, ) -> Result; } extern "C" { - pub fn svcConnectToPort(out: *mut Handle, portName: *const libc::c_char) -> Result; + pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result; } extern "C" { pub fn svcCreateCodeSet( out: *mut Handle, info: *const CodeSetInfo, - code_ptr: *mut libc::c_void, - ro_ptr: *mut libc::c_void, - data_ptr: *mut libc::c_void, + code_ptr: *mut ::libc::c_void, + ro_ptr: *mut ::libc::c_void, + data_ptr: *mut ::libc::c_void, ) -> Result; } extern "C" { @@ -1914,10 +2016,10 @@ extern "C" { pub fn svcBreak(breakReason: UserBreakType); } extern "C" { - pub fn svcBreakRO(breakReason: UserBreakType, croInfo: *const libc::c_void, croInfoSize: u32); + pub fn svcBreakRO(breakReason: UserBreakType, croInfo: *const ::libc::c_void, croInfoSize: u32); } extern "C" { - pub fn svcOutputDebugString(str: *const libc::c_char, length: s32) -> Result; + pub fn svcOutputDebugString(str: *const ::libc::c_char, length: s32) -> Result; } extern "C" { pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32) -> Result; @@ -1960,7 +2062,7 @@ extern "C" { } extern "C" { pub fn svcReadProcessMemory( - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, debug: Handle, addr: u32, size: u32, @@ -1969,7 +2071,7 @@ extern "C" { extern "C" { pub fn svcWriteProcessMemory( debug: Handle, - buffer: *const libc::c_void, + buffer: *const ::libc::c_void, addr: u32, size: u32, ) -> Result; @@ -1999,7 +2101,7 @@ pub const ARM9DESC_CREATE_SEED: _bindgen_ty_5 = 64; pub const ARM9DESC_USE_CARD_SPI: _bindgen_ty_5 = 128; pub const ARM9DESC_SD_APPLICATION: _bindgen_ty_5 = 256; pub const ARM9DESC_MOUNT_SDMC_RW: _bindgen_ty_5 = 512; -pub type _bindgen_ty_5 = libc::c_uint; +pub type _bindgen_ty_5 = u32; pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: _bindgen_ty_6 = 1; pub const FSACCESS_CATEGORY_HARDWARE_CHECK: _bindgen_ty_6 = 2; pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: _bindgen_ty_6 = 4; @@ -2022,102 +2124,64 @@ pub const FSACCESS_SHOP: _bindgen_ty_6 = 262144; pub const FSACCESS_SHELL: _bindgen_ty_6 = 524288; pub const FSACCESS_CATEGORY_HOME_MENU: _bindgen_ty_6 = 1048576; pub const FSACCESS_SEEDDB: _bindgen_ty_6 = 2097152; -pub type _bindgen_ty_6 = libc::c_uint; +pub type _bindgen_ty_6 = u32; pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0; pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1; pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2; pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3; -pub type ResourceLimitCategory = libc::c_uint; +pub type ResourceLimitCategory = u32; pub const SYSMODE_O3DS_PROD: SystemMode = 0; pub const SYSMODE_N3DS_PROD: SystemMode = 1; pub const SYSMODE_DEV1: SystemMode = 2; pub const SYSMODE_DEV2: SystemMode = 3; pub const SYSMODE_DEV3: SystemMode = 4; pub const SYSMODE_DEV4: SystemMode = 5; -pub type SystemMode = libc::c_uint; +pub type SystemMode = u32; #[repr(C)] pub struct ExHeader_SystemInfoFlags { pub reserved: [u8; 5usize], - pub _bitfield_1: u8, + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>, pub remaster_version: u16, } impl ExHeader_SystemInfoFlags { #[inline] pub fn compress_exefs_code(&self) -> bool { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x1 as u8; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } } #[inline] pub fn set_compress_exefs_code(&mut self, val: bool) { - let mask = 0x1 as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] pub fn is_sd_application(&self) -> bool { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x2 as u8; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } } #[inline] pub fn set_is_sd_application(&mut self, val: bool) { - let mask = 0x2 as u8; - let val = val as u8 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] - pub const fn new_bitfield_1(compress_exefs_code: bool, is_sd_application: bool) -> u8 { - ((0 | ((compress_exefs_code as u8 as u8) << 0usize) & (0x1 as u8)) - | ((is_sd_application as u8 as u8) << 1usize) & (0x2 as u8)) + pub fn new_bitfield_1( + compress_exefs_code: bool, + is_sd_application: bool, + ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let compress_exefs_code: u8 = unsafe { ::core::mem::transmute(compress_exefs_code) }; + compress_exefs_code as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_sd_application: u8 = unsafe { ::core::mem::transmute(is_sd_application) }; + is_sd_application as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] @@ -2128,7 +2192,7 @@ pub struct ExHeader_CodeSectionInfo { } #[repr(C)] pub struct ExHeader_CodeSetInfo { - pub name: [libc::c_char; 8usize], + pub name: [::libc::c_char; 8usize], pub flags: ExHeader_SystemInfoFlags, pub text: ExHeader_CodeSectionInfo, pub stack_size: u32, @@ -2155,425 +2219,163 @@ pub struct ExHeader_Arm11StorageInfo { pub system_savedata_ids: [u32; 2usize], pub accessible_savedata_ids: u64, pub fs_access_info: u32, - pub _bitfield_1: u32, + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, } impl ExHeader_Arm11StorageInfo { #[inline] pub fn reserved(&self) -> u32 { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xffffff as u32; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } } #[inline] pub fn set_reserved(&mut self, val: u32) { - let mask = 0xffffff as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) } } #[inline] pub fn no_romfs(&self) -> bool { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x1000000 as u32; - let val = (unit_field_val & mask) >> 24usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u8) } } #[inline] pub fn set_no_romfs(&mut self, val: bool) { - let mask = 0x1000000 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 24usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) } } #[inline] pub fn use_extended_savedata_access(&self) -> bool { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x2000000 as u32; - let val = (unit_field_val & mask) >> 25usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u8) } } #[inline] pub fn set_use_extended_savedata_access(&mut self, val: bool) { - let mask = 0x2000000 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 25usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) } } #[inline] - pub const fn new_bitfield_1( + pub fn new_bitfield_1( reserved: u32, no_romfs: bool, use_extended_savedata_access: bool, - ) -> u32 { - (((0 | ((reserved as u32 as u32) << 0usize) & (0xffffff as u32)) - | ((no_romfs as u8 as u32) << 24usize) & (0x1000000 as u32)) - | ((use_extended_savedata_access as u8 as u32) << 25usize) & (0x2000000 as u32)) + ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let reserved: u32 = unsafe { ::core::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let no_romfs: u8 = unsafe { ::core::mem::transmute(no_romfs) }; + no_romfs as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let use_extended_savedata_access: u8 = + unsafe { ::core::mem::transmute(use_extended_savedata_access) }; + use_extended_savedata_access as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] pub struct ExHeader_Arm11CoreInfo { pub core_version: u32, - pub _bitfield_1: [u8; 3usize], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize], u8>, pub priority: u8, } impl ExHeader_Arm11CoreInfo { #[inline] pub fn use_cpu_clockrate_804MHz(&self) -> bool { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x1 as u32; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } } #[inline] pub fn set_use_cpu_clockrate_804MHz(&mut self, val: bool) { - let mask = 0x1 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) } } #[inline] pub fn enable_l2c(&self) -> bool { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x2 as u32; - let val = (unit_field_val & mask) >> 1usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } } #[inline] pub fn set_enable_l2c(&mut self, val: bool) { - let mask = 0x2 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 1usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) } } #[inline] pub fn flag1_unused(&self) -> u8 { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xfc as u32; - let val = (unit_field_val & mask) >> 2usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } } #[inline] pub fn set_flag1_unused(&mut self, val: u8) { - let mask = 0xfc as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 2usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(2usize, 6u8, val as u64) } } #[inline] pub fn n3ds_system_mode(&self) -> SystemMode { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xf00 as u32; - let val = (unit_field_val & mask) >> 8usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) } } #[inline] pub fn set_n3ds_system_mode(&mut self, val: SystemMode) { - let mask = 0xf00 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 8usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 4u8, val as u64) } } #[inline] pub fn flag2_unused(&self) -> u8 { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xf000 as u32; - let val = (unit_field_val & mask) >> 12usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u8) } } #[inline] pub fn set_flag2_unused(&mut self, val: u8) { - let mask = 0xf000 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 12usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(12usize, 4u8, val as u64) } } #[inline] pub fn ideal_processor(&self) -> u8 { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0x30000 as u32; - let val = (unit_field_val & mask) >> 16usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u8) } } #[inline] pub fn set_ideal_processor(&mut self, val: u8) { - let mask = 0x30000 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 16usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(16usize, 2u8, val as u64) } } #[inline] pub fn affinity_mask(&self) -> u8 { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xc0000 as u32; - let val = (unit_field_val & mask) >> 18usize; - unsafe { ::core::mem::transmute(val as u8) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u8) } } #[inline] pub fn set_affinity_mask(&mut self, val: u8) { - let mask = 0xc0000 as u32; - let val = val as u8 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 18usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u8 = ::core::mem::transmute(val); + self._bitfield_1.set(18usize, 2u8, val as u64) } } #[inline] pub fn o3ds_system_mode(&self) -> SystemMode { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xf00000 as u32; - let val = (unit_field_val & mask) >> 20usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u32) } } #[inline] pub fn set_o3ds_system_mode(&mut self, val: SystemMode) { - let mask = 0xf00000 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 20usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(20usize, 4u8, val as u64) } } #[inline] - pub const fn new_bitfield_1( + pub fn new_bitfield_1( use_cpu_clockrate_804MHz: bool, enable_l2c: bool, flag1_unused: u8, @@ -2582,15 +2384,43 @@ impl ExHeader_Arm11CoreInfo { ideal_processor: u8, affinity_mask: u8, o3ds_system_mode: SystemMode, - ) -> u32 { - ((((((((0 | ((use_cpu_clockrate_804MHz as u8 as u32) << 0usize) & (0x1 as u32)) - | ((enable_l2c as u8 as u32) << 1usize) & (0x2 as u32)) - | ((flag1_unused as u8 as u32) << 2usize) & (0xfc as u32)) - | ((n3ds_system_mode as u32 as u32) << 8usize) & (0xf00 as u32)) - | ((flag2_unused as u8 as u32) << 12usize) & (0xf000 as u32)) - | ((ideal_processor as u8 as u32) << 16usize) & (0x30000 as u32)) - | ((affinity_mask as u8 as u32) << 18usize) & (0xc0000 as u32)) - | ((o3ds_system_mode as u32 as u32) << 20usize) & (0xf00000 as u32)) + ) -> __BindgenBitfieldUnit<[u8; 3usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let use_cpu_clockrate_804MHz: u8 = + unsafe { ::core::mem::transmute(use_cpu_clockrate_804MHz) }; + use_cpu_clockrate_804MHz as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let enable_l2c: u8 = unsafe { ::core::mem::transmute(enable_l2c) }; + enable_l2c as u64 + }); + __bindgen_bitfield_unit.set(2usize, 6u8, { + let flag1_unused: u8 = unsafe { ::core::mem::transmute(flag1_unused) }; + flag1_unused as u64 + }); + __bindgen_bitfield_unit.set(8usize, 4u8, { + let n3ds_system_mode: u32 = unsafe { ::core::mem::transmute(n3ds_system_mode) }; + n3ds_system_mode as u64 + }); + __bindgen_bitfield_unit.set(12usize, 4u8, { + let flag2_unused: u8 = unsafe { ::core::mem::transmute(flag2_unused) }; + flag2_unused as u64 + }); + __bindgen_bitfield_unit.set(16usize, 2u8, { + let ideal_processor: u8 = unsafe { ::core::mem::transmute(ideal_processor) }; + ideal_processor as u64 + }); + __bindgen_bitfield_unit.set(18usize, 2u8, { + let affinity_mask: u8 = unsafe { ::core::mem::transmute(affinity_mask) }; + affinity_mask as u64 + }); + __bindgen_bitfield_unit.set(20usize, 4u8, { + let o3ds_system_mode: u32 = unsafe { ::core::mem::transmute(o3ds_system_mode) }; + o3ds_system_mode as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] @@ -2599,7 +2429,7 @@ pub struct ExHeader_Arm11SystemLocalCapabilities { pub core_info: ExHeader_Arm11CoreInfo, pub reslimits: [u16; 16usize], pub storage_info: ExHeader_Arm11StorageInfo, - pub service_access: [[libc::c_char; 8usize]; 34usize], + pub service_access: [[::libc::c_char; 8usize]; 34usize], pub reserved: [u8; 15usize], pub reslimit_category: ResourceLimitCategory, } @@ -2641,11 +2471,14 @@ extern "C" { extern "C" { pub fn srvExit(); } +extern "C" { + pub fn srvSetBlockingPolicy(nonBlocking: bool); +} extern "C" { pub fn srvGetSessionHandle() -> *mut Handle; } extern "C" { - pub fn srvGetServiceHandle(out: *mut Handle, name: *const libc::c_char) -> Result; + pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { pub fn srvRegisterClient() -> Result; @@ -2656,24 +2489,27 @@ extern "C" { extern "C" { pub fn srvRegisterService( out: *mut Handle, - name: *const libc::c_char, - maxSessions: libc::c_int, + name: *const ::libc::c_char, + maxSessions: ::libc::c_int, ) -> Result; } extern "C" { - pub fn srvUnregisterService(name: *const libc::c_char) -> Result; + pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result; } extern "C" { - pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const libc::c_char) -> Result; + pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result; } extern "C" { - pub fn srvRegisterPort(name: *const libc::c_char, clientHandle: Handle) -> Result; + pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result; } extern "C" { - pub fn srvUnregisterPort(name: *const libc::c_char) -> Result; + pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result; } extern "C" { - pub fn srvGetPort(out: *mut Handle, name: *const libc::c_char) -> Result; + pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result; +} +extern "C" { + pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result; } extern "C" { pub fn srvSubscribe(notificationId: u32) -> Result; @@ -2695,7 +2531,10 @@ extern "C" { ) -> Result; } extern "C" { - pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const libc::c_char) -> Result; + pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; +} +extern "C" { + pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result; } pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0; pub const ERRF_ERRTYPE_MEM_CORRUPT: ERRF_ErrType = 1; @@ -2703,12 +2542,12 @@ pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2; pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3; pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4; pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5; -pub type ERRF_ErrType = libc::c_uint; +pub type ERRF_ErrType = u32; pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0; pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1; pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2; pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3; -pub type ERRF_ExceptionType = libc::c_uint; +pub type ERRF_ExceptionType = u32; #[repr(C)] pub struct ERRF_ExceptionInfo { pub type_: ERRF_ExceptionType, @@ -2739,7 +2578,7 @@ pub struct ERRF_FatalErrInfo { #[repr(C)] pub struct ERRF_FatalErrInfo__bindgen_ty_1 { pub exception_data: __BindgenUnionField, - pub failure_mesg: __BindgenUnionField<[libc::c_char; 96usize]>, + pub failure_mesg: __BindgenUnionField<[::libc::c_char; 96usize]>, pub bindgen_union_field: [u32; 24usize], } extern "C" { @@ -2758,7 +2597,7 @@ extern "C" { pub fn ERRF_ThrowResult(failure: Result) -> Result; } extern "C" { - pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const libc::c_char) -> Result; + pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result; } extern "C" { pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters); @@ -2767,7 +2606,7 @@ pub const MEMREGION_ALL: MemRegion = 0; pub const MEMREGION_APPLICATION: MemRegion = 1; pub const MEMREGION_SYSTEM: MemRegion = 2; pub const MEMREGION_BASE: MemRegion = 3; -pub type MemRegion = libc::c_uint; +pub type MemRegion = u32; #[repr(C)] pub struct TickCounter { pub elapsed: u64, @@ -2779,17 +2618,17 @@ pub struct OS_VersionBin { pub minor: u8, pub mainver: u8, pub reserved_x3: u8, - pub region: libc::c_char, + pub region: ::libc::c_char, pub reserved_x5: [u8; 3usize], } extern "C" { - pub fn osConvertVirtToPhys(vaddr: *const libc::c_void) -> u32; + pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32; } extern "C" { - pub fn osConvertOldLINEARMemToNew(vaddr: *const libc::c_void) -> *mut libc::c_void; + pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void; } extern "C" { - pub fn osStrError(error: u32) -> *const libc::c_char; + pub fn osStrError(error: u32) -> *const ::libc::c_char; } extern "C" { pub fn osGetMemRegionUsed(region: MemRegion) -> s64; @@ -2798,7 +2637,7 @@ extern "C" { pub fn osGetTime() -> u64; } extern "C" { - pub fn osTickCounterRead(cnt: *mut TickCounter) -> f64; + pub fn osTickCounterRead(cnt: *const TickCounter) -> f64; } extern "C" { pub fn osSetSpeedupEnable(enable: bool); @@ -2813,13 +2652,13 @@ extern "C" { pub fn osGetSystemVersionDataString( nver_versionbin: *mut OS_VersionBin, cver_versionbin: *mut OS_VersionBin, - sysverstr: *mut libc::c_char, + sysverstr: *mut ::libc::c_char, sysverstr_maxsize: u32, ) -> Result; } pub type _LOCK_T = i32; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __lock_t { pub lock: _LOCK_T, pub thread_tag: u32, @@ -2851,21 +2690,21 @@ extern "C" { pub fn __libc_lock_release_recursive(lock: *mut _LOCK_RECURSIVE_T); } extern "C" { - pub fn __libc_lock_try_acquire(lock: *mut _LOCK_T) -> libc::c_int; + pub fn __libc_lock_try_acquire(lock: *mut _LOCK_T) -> ::libc::c_int; } extern "C" { - pub fn __libc_lock_try_acquire_recursive(lock: *mut _LOCK_RECURSIVE_T) -> libc::c_int; + pub fn __libc_lock_try_acquire_recursive(lock: *mut _LOCK_RECURSIVE_T) -> ::libc::c_int; } pub type LightLock = _LOCK_T; pub type RecursiveLock = _LOCK_RECURSIVE_T; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct LightEvent { pub state: s32, pub lock: LightLock, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct LightSemaphore { pub current_count: s32, pub num_threads_acq: s16, @@ -2881,7 +2720,7 @@ extern "C" { pub fn LightLock_Lock(lock: *mut LightLock); } extern "C" { - pub fn LightLock_TryLock(lock: *mut LightLock) -> libc::c_int; + pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int; } extern "C" { pub fn LightLock_Unlock(lock: *mut LightLock); @@ -2893,7 +2732,7 @@ extern "C" { pub fn RecursiveLock_Lock(lock: *mut RecursiveLock); } extern "C" { - pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> libc::c_int; + pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int; } extern "C" { pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock); @@ -2911,7 +2750,7 @@ extern "C" { pub fn LightEvent_Signal(event: *mut LightEvent); } extern "C" { - pub fn LightEvent_TryWait(event: *mut LightEvent) -> libc::c_int; + pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int; } extern "C" { pub fn LightEvent_Wait(event: *mut LightEvent); @@ -2937,10 +2776,10 @@ pub type ExceptionHandler = ::core::option::Option< extern "C" { pub fn threadCreate( entrypoint: ThreadFunc, - arg: *mut libc::c_void, + arg: *mut ::libc::c_void, stack_size: usize, - prio: libc::c_int, - affinity: libc::c_int, + prio: ::libc::c_int, + affinity: ::libc::c_int, detached: bool, ) -> Thread; } @@ -2948,7 +2787,7 @@ extern "C" { pub fn threadGetHandle(thread: Thread) -> Handle; } extern "C" { - pub fn threadGetExitCode(thread: Thread) -> libc::c_int; + pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int; } extern "C" { pub fn threadFree(thread: Thread); @@ -2963,7 +2802,7 @@ extern "C" { pub fn threadGetCurrent() -> Thread; } extern "C" { - pub fn threadExit(rc: libc::c_int); + pub fn threadExit(rc: ::libc::c_int); } #[repr(C)] pub struct GSPGPU_FramebufferInfo { @@ -2980,7 +2819,7 @@ pub const GSP_BGR8_OES: GSPGPU_FramebufferFormats = 1; pub const GSP_RGB565_OES: GSPGPU_FramebufferFormats = 2; pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormats = 3; pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormats = 4; -pub type GSPGPU_FramebufferFormats = libc::c_uint; +pub type GSPGPU_FramebufferFormats = u32; #[repr(C)] pub struct GSPGPU_CaptureInfoEntry { pub framebuf0_vaddr: *mut u32, @@ -3000,7 +2839,7 @@ pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4; pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5; pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6; pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7; -pub type GSPGPU_Event = libc::c_uint; +pub type GSPGPU_Event = u32; extern "C" { pub fn gspInit() -> Result; } @@ -3011,7 +2850,7 @@ extern "C" { pub fn gspSetEventCallback( id: GSPGPU_Event, cb: ThreadFunc, - data: *mut libc::c_void, + data: *mut ::libc::c_void, oneShot: bool, ); } @@ -3054,10 +2893,10 @@ extern "C" { -> Result; } extern "C" { - pub fn GSPGPU_FlushDataCache(adr: *const libc::c_void, size: u32) -> Result; + pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32) -> Result; } extern "C" { - pub fn GSPGPU_InvalidateDataCache(adr: *const libc::c_void, size: u32) -> Result; + pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32) -> Result; } extern "C" { pub fn GSPGPU_WriteHWRegs(regAddr: u32, data: *mut u32, size: u8) -> Result; @@ -3093,10 +2932,10 @@ extern "C" { } pub const GFX_TOP: gfxScreen_t = 0; pub const GFX_BOTTOM: gfxScreen_t = 1; -pub type gfxScreen_t = libc::c_uint; +pub type gfxScreen_t = u32; pub const GFX_LEFT: gfx3dSide_t = 0; pub const GFX_RIGHT: gfx3dSide_t = 1; -pub type gfx3dSide_t = libc::c_uint; +pub type gfx3dSide_t = u32; extern "C" { pub fn gfxInitDefault(); } @@ -3155,7 +2994,7 @@ extern "C" { pub static mut gfxBottomFramebuffers: [*mut u8; 2usize]; } pub type ConsolePrint = ::core::option::Option< - unsafe extern "C" fn(con: *mut libc::c_void, c: libc::c_int) -> bool, + unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool, >; #[repr(C)] pub struct ConsoleFont { @@ -3167,20 +3006,20 @@ pub struct ConsoleFont { pub struct PrintConsole { pub font: ConsoleFont, pub frameBuffer: *mut u16, - pub cursorX: libc::c_int, - pub cursorY: libc::c_int, - pub prevCursorX: libc::c_int, - pub prevCursorY: libc::c_int, - pub consoleWidth: libc::c_int, - pub consoleHeight: libc::c_int, - pub windowX: libc::c_int, - pub windowY: libc::c_int, - pub windowWidth: libc::c_int, - pub windowHeight: libc::c_int, - pub tabSize: libc::c_int, - pub fg: libc::c_int, - pub bg: libc::c_int, - pub flags: libc::c_int, + pub cursorX: ::libc::c_int, + pub cursorY: ::libc::c_int, + pub prevCursorX: ::libc::c_int, + pub prevCursorY: ::libc::c_int, + pub consoleWidth: ::libc::c_int, + pub consoleHeight: ::libc::c_int, + pub windowX: ::libc::c_int, + pub windowY: ::libc::c_int, + pub windowWidth: ::libc::c_int, + pub windowHeight: ::libc::c_int, + pub tabSize: ::libc::c_int, + pub fg: ::libc::c_int, + pub bg: ::libc::c_int, + pub flags: ::libc::c_int, pub PrintChar: ConsolePrint, pub consoleInitialised: bool, } @@ -3188,17 +3027,17 @@ pub const debugDevice_NULL: debugDevice = 0; pub const debugDevice_SVC: debugDevice = 1; pub const debugDevice_CONSOLE: debugDevice = 2; pub const debugDevice_3DMOO: debugDevice = 1; -pub type debugDevice = libc::c_uint; +pub type debugDevice = u32; extern "C" { pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont); } extern "C" { pub fn consoleSetWindow( console: *mut PrintConsole, - x: libc::c_int, - y: libc::c_int, - width: libc::c_int, - height: libc::c_int, + x: ::libc::c_int, + y: ::libc::c_int, + width: ::libc::c_int, + height: ::libc::c_int, ); } extern "C" { @@ -3219,9 +3058,9 @@ extern "C" { pub const RUNFLAG_APTWORKAROUND: _bindgen_ty_7 = 1; pub const RUNFLAG_APTREINIT: _bindgen_ty_7 = 2; pub const RUNFLAG_APTCHAINLOAD: _bindgen_ty_7 = 4; -pub type _bindgen_ty_7 = libc::c_uint; +pub type _bindgen_ty_7 = u32; extern "C" { - pub fn envGetHandle(name: *const libc::c_char) -> Handle; + pub fn envGetHandle(name: *const ::libc::c_char) -> Handle; } pub type _off_t = __int64_t; pub type _fpos_t = __int64_t; @@ -3231,109 +3070,109 @@ pub type u_int8_t = __uint8_t; pub type u_int16_t = __uint16_t; pub type u_int32_t = __uint32_t; pub type u_int64_t = __uint64_t; -pub type register_t = libc::c_int; -pub type __blkcnt_t = libc::c_long; -pub type __blksize_t = libc::c_long; +pub type register_t = ::libc::c_int; +pub type __blkcnt_t = ::libc::c_long; +pub type __blksize_t = ::libc::c_long; pub type __fsblkcnt_t = __uint64_t; pub type __fsfilcnt_t = __uint32_t; -pub type __pid_t = libc::c_int; -pub type __uid_t = libc::c_ushort; -pub type __gid_t = libc::c_ushort; +pub type __pid_t = ::libc::c_int; +pub type __uid_t = ::libc::c_ushort; +pub type __gid_t = ::libc::c_ushort; pub type __id_t = __uint32_t; pub type __mode_t = __uint32_t; -pub type _off64_t = libc::c_longlong; +pub type _off64_t = ::libc::c_longlong; pub type __off_t = _off_t; pub type __loff_t = _off64_t; -pub type __key_t = libc::c_long; -pub type __size_t = libc::c_uint; -pub type _ssize_t = libc::c_int; +pub type __key_t = ::libc::c_long; +pub type __size_t = ::libc::c_uint; +pub type _ssize_t = ::libc::c_int; pub type __ssize_t = _ssize_t; -pub type wint_t = libc::c_int; +pub type wint_t = ::libc::c_int; #[repr(C)] #[derive(Copy, Clone)] pub struct _mbstate_t { - pub __count: libc::c_int, + pub __count: ::libc::c_int, pub __value: _mbstate_t__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] pub union _mbstate_t__bindgen_ty_1 { pub __wch: wint_t, - pub __wchb: [libc::c_uchar; 4usize], + pub __wchb: [::libc::c_uchar; 4usize], _bindgen_union_align: u32, } pub type _flock_t = _LOCK_RECURSIVE_T; -pub type _iconv_t = *mut libc::c_void; -pub type __clock_t = libc::c_ulong; -pub type __time_t = libc::c_long; -pub type __clockid_t = libc::c_ulong; -pub type __timer_t = libc::c_ulong; +pub type _iconv_t = *mut ::libc::c_void; +pub type __clock_t = ::libc::c_ulong; +pub type __time_t = __int_least64_t; +pub type __clockid_t = ::libc::c_ulong; +pub type __timer_t = ::libc::c_ulong; pub type __sa_family_t = __uint8_t; pub type __socklen_t = __uint32_t; -pub type __nlink_t = libc::c_ushort; -pub type __suseconds_t = libc::c_long; -pub type __useconds_t = libc::c_ulong; -pub type __sigset_t = libc::c_ulong; +pub type __nlink_t = ::libc::c_ushort; +pub type __suseconds_t = ::libc::c_long; +pub type __useconds_t = ::libc::c_ulong; +pub type __sigset_t = ::libc::c_ulong; pub type suseconds_t = __suseconds_t; -pub type time_t = libc::c_long; +pub type time_t = __int_least64_t; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct timeval { pub tv_sec: time_t, pub tv_usec: suseconds_t, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct timespec { pub tv_sec: time_t, - pub tv_nsec: libc::c_long, + pub tv_nsec: ::libc::c_long, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct itimerspec { pub it_interval: timespec, pub it_value: timespec, } pub type sigset_t = __sigset_t; -pub type fd_mask = libc::c_ulong; +pub type fd_mask = ::libc::c_ulong; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _types_fd_set { pub fds_bits: [fd_mask; 2usize], } extern "C" { pub fn select( - __n: libc::c_int, + __n: ::libc::c_int, __readfds: *mut _types_fd_set, __writefds: *mut _types_fd_set, __exceptfds: *mut _types_fd_set, __timeout: *mut timeval, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { pub fn pselect( - __n: libc::c_int, + __n: ::libc::c_int, __readfds: *mut _types_fd_set, __writefds: *mut _types_fd_set, __exceptfds: *mut _types_fd_set, __timeout: *const timespec, __set: *const sigset_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } pub type in_addr_t = __uint32_t; pub type in_port_t = __uint16_t; -pub type u_char = libc::c_uchar; -pub type u_short = libc::c_ushort; -pub type u_int = libc::c_uint; -pub type u_long = libc::c_ulong; -pub type ushort = libc::c_ushort; -pub type uint = libc::c_uint; -pub type ulong = libc::c_ulong; +pub type u_char = ::libc::c_uchar; +pub type u_short = ::libc::c_ushort; +pub type u_int = ::libc::c_uint; +pub type u_long = ::libc::c_ulong; +pub type ushort = ::libc::c_ushort; +pub type uint = ::libc::c_uint; +pub type ulong = ::libc::c_ulong; pub type blkcnt_t = __blkcnt_t; pub type blksize_t = __blksize_t; -pub type clock_t = libc::c_ulong; -pub type daddr_t = libc::c_long; -pub type caddr_t = *mut libc::c_char; +pub type clock_t = ::libc::c_ulong; +pub type daddr_t = ::libc::c_long; +pub type caddr_t = *mut ::libc::c_char; pub type fsblkcnt_t = __fsblkcnt_t; pub type fsfilcnt_t = __fsfilcnt_t; pub type id_t = __id_t; @@ -3350,6 +3189,139 @@ pub type clockid_t = __clockid_t; pub type timer_t = __timer_t; pub type useconds_t = __useconds_t; pub type sbintime_t = __int64_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct sched_param { + pub sched_priority: ::libc::c_int, +} +pub type pthread_t = __uint32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_attr_t { + pub is_initialized: ::libc::c_int, + pub stackaddr: *mut ::libc::c_void, + pub stacksize: ::libc::c_int, + pub contentionscope: ::libc::c_int, + pub inheritsched: ::libc::c_int, + pub schedpolicy: ::libc::c_int, + pub schedparam: sched_param, + pub detachstate: ::libc::c_int, +} +pub type pthread_mutex_t = __uint32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_mutexattr_t { + pub is_initialized: ::libc::c_int, + pub recursive: ::libc::c_int, +} +pub type pthread_cond_t = __uint32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_condattr_t { + pub is_initialized: ::libc::c_int, + pub clock: clock_t, +} +pub type pthread_key_t = __uint32_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_once_t { + pub is_initialized: ::libc::c_int, + pub init_executed: ::libc::c_int, +} +pub const DECOMPRESS_DUMMY: decompressType = 0; +pub const DECOMPRESS_LZSS: decompressType = 16; +pub const DECOMPRESS_LZ10: decompressType = 16; +pub const DECOMPRESS_LZ11: decompressType = 17; +pub const DECOMPRESS_HUFF1: decompressType = 33; +pub const DECOMPRESS_HUFF2: decompressType = 34; +pub const DECOMPRESS_HUFF3: decompressType = 35; +pub const DECOMPRESS_HUFF4: decompressType = 36; +pub const DECOMPRESS_HUFF5: decompressType = 37; +pub const DECOMPRESS_HUFF6: decompressType = 38; +pub const DECOMPRESS_HUFF7: decompressType = 39; +pub const DECOMPRESS_HUFF8: decompressType = 40; +pub const DECOMPRESS_HUFF: decompressType = 40; +pub const DECOMPRESS_RLE: decompressType = 48; +pub type decompressType = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct decompressIOVec { + pub data: *mut ::libc::c_void, + pub size: usize, +} +pub type decompressCallback = ::core::option::Option< + unsafe extern "C" fn(userdata: *mut ::libc::c_void, buffer: *mut ::libc::c_void, size: usize) + -> isize, +>; +extern "C" { + pub fn decompressCallback_FD( + userdata: *mut ::libc::c_void, + buffer: *mut ::libc::c_void, + size: usize, + ) -> isize; +} +extern "C" { + pub fn decompressCallback_Stdio( + userdata: *mut ::libc::c_void, + buffer: *mut ::libc::c_void, + size: usize, + ) -> isize; +} +extern "C" { + pub fn decompressHeader( + type_: *mut decompressType, + size: *mut usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> isize; +} +extern "C" { + pub fn decompressV( + iov: *const decompressIOVec, + iovcnt: usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> bool; +} +extern "C" { + pub fn decompressV_LZSS( + iov: *const decompressIOVec, + iovcnt: usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> bool; +} +extern "C" { + pub fn decompressV_LZ11( + iov: *const decompressIOVec, + iovcnt: usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> bool; +} +extern "C" { + pub fn decompressV_Huff( + bits: usize, + iov: *const decompressIOVec, + iovcnt: usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> bool; +} +extern "C" { + pub fn decompressV_RLE( + iov: *const decompressIOVec, + iovcnt: usize, + callback: decompressCallback, + userdata: *mut ::libc::c_void, + insize: usize, + ) -> bool; +} extern "C" { pub fn decode_utf8(out: *mut u32, in_: *const u8) -> isize; } @@ -3381,53 +3353,62 @@ extern "C" { pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: usize) -> isize; } extern "C" { - pub fn linearAlloc(size: usize) -> *mut libc::c_void; + pub fn linearAlloc(size: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn linearMemAlign(size: usize, alignment: usize) -> *mut libc::c_void; + pub fn linearMemAlign(size: usize, alignment: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn linearRealloc(mem: *mut libc::c_void, size: usize) -> *mut libc::c_void; + pub fn linearRealloc(mem: *mut ::libc::c_void, size: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn linearGetSize(mem: *mut libc::c_void) -> usize; + pub fn linearGetSize(mem: *mut ::libc::c_void) -> usize; } extern "C" { - pub fn linearFree(mem: *mut libc::c_void); + pub fn linearFree(mem: *mut ::libc::c_void); } extern "C" { pub fn linearSpaceFree() -> u32; } extern "C" { - pub fn mappableAlloc(size: usize) -> *mut libc::c_void; + pub fn mappableAlloc(size: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn mappableGetSize(mem: *mut libc::c_void) -> usize; + pub fn mappableGetSize(mem: *mut ::libc::c_void) -> usize; } extern "C" { - pub fn mappableFree(mem: *mut libc::c_void); + pub fn mappableFree(mem: *mut ::libc::c_void); } extern "C" { pub fn mappableSpaceFree() -> u32; } extern "C" { - pub fn vramAlloc(size: usize) -> *mut libc::c_void; + pub fn vramAlloc(size: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn vramMemAlign(size: usize, alignment: usize) -> *mut libc::c_void; + pub fn vramMemAlign(size: usize, alignment: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn vramRealloc(mem: *mut libc::c_void, size: usize) -> *mut libc::c_void; + pub fn vramRealloc(mem: *mut ::libc::c_void, size: usize) -> *mut ::libc::c_void; } extern "C" { - pub fn vramGetSize(mem: *mut libc::c_void) -> usize; + pub fn vramGetSize(mem: *mut ::libc::c_void) -> usize; } extern "C" { - pub fn vramFree(mem: *mut libc::c_void); + pub fn vramFree(mem: *mut ::libc::c_void); } extern "C" { pub fn vramSpaceFree() -> u32; } +pub const AC_OPEN: acSecurityMode = 0; +pub const AC_WEP_40BIT: acSecurityMode = 1; +pub const AC_WEP_104BIT: acSecurityMode = 2; +pub const AC_WEP_128BIT: acSecurityMode = 3; +pub const AC_WPA_TKIP: acSecurityMode = 4; +pub const AC_WPA2_TKIP: acSecurityMode = 5; +pub const AC_WPA_AES: acSecurityMode = 6; +pub const AC_WPA2_AES: acSecurityMode = 7; +pub type acSecurityMode = u32; extern "C" { pub fn acInit() -> Result; } @@ -3440,27 +3421,57 @@ extern "C" { extern "C" { pub fn ACU_GetWifiStatus(out: *mut u32) -> Result; } +extern "C" { + pub fn ACU_GetStatus(out: *mut u32) -> Result; +} +extern "C" { + pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result; +} +extern "C" { + pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result; +} +extern "C" { + pub fn ACU_GetSSIDLength(out: *mut u32) -> Result; +} +extern "C" { + pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result; +} +extern "C" { + pub fn ACU_GetProxyPort(out: *mut u32) -> Result; +} +extern "C" { + pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result; +} +extern "C" { + pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result; +} +extern "C" { + pub fn ACU_GetLastErrorCode(errorCode: *mut u32) -> Result; +} +extern "C" { + pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32) -> Result; +} pub const FS_OPEN_READ: _bindgen_ty_8 = 1; pub const FS_OPEN_WRITE: _bindgen_ty_8 = 2; pub const FS_OPEN_CREATE: _bindgen_ty_8 = 4; -pub type _bindgen_ty_8 = libc::c_uint; +pub type _bindgen_ty_8 = u32; pub const FS_WRITE_FLUSH: _bindgen_ty_9 = 1; pub const FS_WRITE_UPDATE_TIME: _bindgen_ty_9 = 256; -pub type _bindgen_ty_9 = libc::c_uint; +pub type _bindgen_ty_9 = u32; pub const FS_ATTRIBUTE_DIRECTORY: _bindgen_ty_10 = 1; pub const FS_ATTRIBUTE_HIDDEN: _bindgen_ty_10 = 256; pub const FS_ATTRIBUTE_ARCHIVE: _bindgen_ty_10 = 65536; pub const FS_ATTRIBUTE_READ_ONLY: _bindgen_ty_10 = 16777216; -pub type _bindgen_ty_10 = libc::c_uint; +pub type _bindgen_ty_10 = u32; pub const MEDIATYPE_NAND: FS_MediaType = 0; pub const MEDIATYPE_SD: FS_MediaType = 1; pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2; -pub type FS_MediaType = libc::c_uint; +pub type FS_MediaType = u32; pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0; pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1; pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2; pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3; -pub type FS_SystemMediaType = libc::c_uint; +pub type FS_SystemMediaType = u32; pub const ARCHIVE_ROMFS: FS_ArchiveID = 3; pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4; pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6; @@ -3485,49 +3496,49 @@ pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935; pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937; pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938; pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940; -pub type FS_ArchiveID = libc::c_uint; +pub type FS_ArchiveID = u32; pub const PATH_INVALID: FS_PathType = 0; pub const PATH_EMPTY: FS_PathType = 1; pub const PATH_BINARY: FS_PathType = 2; pub const PATH_ASCII: FS_PathType = 3; pub const PATH_UTF16: FS_PathType = 4; -pub type FS_PathType = libc::c_uint; +pub type FS_PathType = u32; pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096; -pub type FS_SecureValueSlot = libc::c_uint; +pub type FS_SecureValueSlot = u32; pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0; pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1; pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2; pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3; pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4; pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5; -pub type FS_CardSpiBaudRate = libc::c_uint; +pub type FS_CardSpiBaudRate = u32; pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0; pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1; -pub type FS_CardSpiBusMode = libc::c_uint; +pub type FS_CardSpiBusMode = u32; pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1; pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2; pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3; -pub type FS_SpecialContentType = libc::c_uint; +pub type FS_SpecialContentType = u32; pub const CARD_CTR: FS_CardType = 0; pub const CARD_TWL: FS_CardType = 1; -pub type FS_CardType = libc::c_uint; +pub type FS_CardType = u32; pub const FS_ACTION_UNKNOWN: FS_Action = 0; -pub type FS_Action = libc::c_uint; +pub type FS_Action = u32; pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0; pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1; -pub type FS_ArchiveAction = libc::c_uint; +pub type FS_ArchiveAction = u32; pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0; pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1; -pub type FS_SecureSaveAction = libc::c_uint; +pub type FS_SecureSaveAction = u32; pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0; -pub type FS_FileAction = libc::c_uint; +pub type FS_FileAction = u32; pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0; -pub type FS_DirectoryAction = libc::c_uint; +pub type FS_DirectoryAction = u32; #[repr(C)] pub struct FS_DirectoryEntry { pub name: [u16; 262usize], - pub shortName: [libc::c_char; 10usize], - pub shortExt: [libc::c_char; 4usize], + pub shortName: [::libc::c_char; 10usize], + pub shortExt: [::libc::c_char; 4usize], pub valid: u8, pub reserved: u8, pub attributes: u32, @@ -3543,55 +3554,36 @@ pub struct FS_ArchiveResource { #[repr(C)] pub struct FS_ProgramInfo { pub programId: u64, - pub _bitfield_1: u8, + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>, pub padding: [u8; 7usize], } impl FS_ProgramInfo { #[inline] pub fn mediaType(&self) -> FS_MediaType { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff as u8; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_mediaType(&mut self, val: FS_MediaType) { - let mask = 0xff as u8; - let val = val as u32 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] - pub const fn new_bitfield_1(mediaType: FS_MediaType) -> u8 { - (0 | ((mediaType as u32 as u8) << 0usize) & (0xff as u8)) + pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) }; + mediaType as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] pub struct FS_ProductInfo { - pub productCode: [libc::c_char; 16usize], - pub companyCode: [libc::c_char; 2usize], + pub productCode: [::libc::c_char; 16usize], + pub companyCode: [::libc::c_char; 2usize], pub remasterVersion: u16, } #[repr(C)] @@ -3601,7 +3593,7 @@ pub struct FS_IntegrityVerificationSeed { } #[repr(C, packed)] pub struct FS_ExtSaveDataInfo { - pub _bitfield_1: u8, + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>, pub unknown: u8, pub reserved1: u16, pub saveId: u64, @@ -3610,48 +3602,29 @@ pub struct FS_ExtSaveDataInfo { impl FS_ExtSaveDataInfo { #[inline] pub fn mediaType(&self) -> FS_MediaType { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff as u8; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_mediaType(&mut self, val: FS_MediaType) { - let mask = 0xff as u8; - let val = val as u32 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] - pub const fn new_bitfield_1(mediaType: FS_MediaType) -> u8 { - (0 | ((mediaType as u32 as u8) << 0usize) & (0xff as u8)) + pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) }; + mediaType as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] pub struct FS_SystemSaveDataInfo { - pub _bitfield_1: u8, + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>, pub unknown: u8, pub reserved: u16, pub saveId: u32, @@ -3659,43 +3632,24 @@ pub struct FS_SystemSaveDataInfo { impl FS_SystemSaveDataInfo { #[inline] pub fn mediaType(&self) -> FS_MediaType { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff as u8; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_mediaType(&mut self, val: FS_MediaType) { - let mask = 0xff as u8; - let val = val as u32 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] - pub const fn new_bitfield_1(mediaType: FS_MediaType) -> u8 { - (0 | ((mediaType as u32 as u8) << 0usize) & (0xff as u8)) + pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) }; + mediaType as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] @@ -3704,11 +3658,11 @@ pub struct FS_DeviceMoveContext { pub encryptParameter: [u8; 16usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct FS_Path { pub type_: FS_PathType, pub size: u32, - pub data: *const libc::c_void, + pub data: *const ::libc::c_void, } pub type FS_Archive = u64; extern "C" { @@ -3730,7 +3684,7 @@ extern "C" { pub fn fsUnexemptFromSession(archive: FS_Archive); } extern "C" { - pub fn fsMakePath(type_: FS_PathType, path: *const libc::c_void) -> FS_Path; + pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path; } extern "C" { pub fn fsGetSessionHandle() -> *mut Handle; @@ -3738,9 +3692,9 @@ extern "C" { extern "C" { pub fn FSUSER_Control( action: FS_Action, - input: *mut libc::c_void, + input: *mut ::libc::c_void, inputSize: u32, - output: *mut libc::c_void, + output: *mut ::libc::c_void, outputSize: u32, ) -> Result; } @@ -3812,9 +3766,9 @@ extern "C" { pub fn FSUSER_ControlArchive( archive: FS_Archive, action: FS_ArchiveAction, - input: *mut libc::c_void, + input: *mut ::libc::c_void, inputSize: u32, - output: *mut libc::c_void, + output: *mut ::libc::c_void, outputSize: u32, ) -> Result; } @@ -4052,7 +4006,7 @@ extern "C" { } extern "C" { pub fn FSUSER_UpdateSha256Context( - data: *const libc::c_void, + data: *const ::libc::c_void, inputSize: u32, hash: *mut u8, ) -> Result; @@ -4179,9 +4133,9 @@ extern "C" { extern "C" { pub fn FSUSER_ControlSecureSave( action: FS_SecureSaveAction, - input: *mut libc::c_void, + input: *mut ::libc::c_void, inputSize: u32, - output: *mut libc::c_void, + output: *mut ::libc::c_void, outputSize: u32, ) -> Result; } @@ -4192,9 +4146,9 @@ extern "C" { pub fn FSFILE_Control( handle: Handle, action: FS_FileAction, - input: *mut libc::c_void, + input: *mut ::libc::c_void, inputSize: u32, - output: *mut libc::c_void, + output: *mut ::libc::c_void, outputSize: u32, ) -> Result; } @@ -4211,7 +4165,7 @@ extern "C" { handle: Handle, bytesRead: *mut u32, offset: u64, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, size: u32, ) -> Result; } @@ -4220,7 +4174,7 @@ extern "C" { handle: Handle, bytesWritten: *mut u32, offset: u64, - buffer: *const libc::c_void, + buffer: *const ::libc::c_void, size: u32, flags: u32, ) -> Result; @@ -4256,9 +4210,9 @@ extern "C" { pub fn FSDIR_Control( handle: Handle, action: FS_DirectoryAction, - input: *mut libc::c_void, + input: *mut ::libc::c_void, inputSize: u32, - output: *mut libc::c_void, + output: *mut ::libc::c_void, outputSize: u32, ) -> Result; } @@ -4288,12 +4242,12 @@ pub struct AM_TitleEntry { } pub const AM_STATUS_MASK_INSTALLING: _bindgen_ty_11 = 1; pub const AM_STATUS_MASK_AWAITING_FINALIZATION: _bindgen_ty_11 = 2; -pub type _bindgen_ty_11 = libc::c_uint; +pub type _bindgen_ty_11 = u32; pub const AM_STATUS_ABORTED: AM_InstallStatus = 2; pub const AM_STATUS_SAVED: AM_InstallStatus = 3; pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050; pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051; -pub type AM_InstallStatus = libc::c_uint; +pub type AM_InstallStatus = u32; #[repr(C)] pub struct AM_PendingTitleEntry { pub titleId: u64, @@ -4304,7 +4258,7 @@ pub struct AM_PendingTitleEntry { } pub const AM_DELETE_PENDING_NON_SYSTEM: _bindgen_ty_12 = 1; pub const AM_DELETE_PENDING_SYSTEM: _bindgen_ty_12 = 2; -pub type _bindgen_ty_12 = libc::c_uint; +pub type _bindgen_ty_12 = u32; #[repr(C)] pub struct AM_TWLPartitionInfo { pub capacity: u64, @@ -4385,27 +4339,27 @@ extern "C" { pub fn AM_ExportTwlBackup( titleID: u64, operation: u8, - workbuf: *mut libc::c_void, + workbuf: *mut ::libc::c_void, workbuf_size: u32, - filepath: *const libc::c_char, + filepath: *const ::libc::c_char, ) -> Result; } extern "C" { pub fn AM_ImportTwlBackup( filehandle: Handle, operation: u8, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, size: u32, ) -> Result; } extern "C" { pub fn AM_ReadTwlBackupInfo( filehandle: Handle, - outinfo: *mut libc::c_void, + outinfo: *mut ::libc::c_void, outinfo_size: u32, - workbuf: *mut libc::c_void, + workbuf: *mut ::libc::c_void, workbuf_size: u32, - banner: *mut libc::c_void, + banner: *mut ::libc::c_void, banner_size: u32, ) -> Result; } @@ -4463,7 +4417,7 @@ extern "C" { pub fn AM_GetTitleProductCode( mediatype: FS_MediaType, titleId: u64, - productCode: *mut libc::c_char, + productCode: *mut ::libc::c_char, ) -> Result; } extern "C" { @@ -4481,7 +4435,7 @@ extern "C" { ) -> Result; } extern "C" { - pub fn AM_GetCiaIcon(icon: *mut libc::c_void, fileHandle: Handle) -> Result; + pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result; } extern "C" { pub fn AM_GetCiaDependencies(dependencies: *mut u64, fileHandle: Handle) -> Result; @@ -4500,7 +4454,8 @@ extern "C" { ) -> Result; } extern "C" { - pub fn AM_GetCiaMetaSection(meta: *mut libc::c_void, size: u32, fileHandle: Handle) -> Result; + pub fn AM_GetCiaMetaSection(meta: *mut ::libc::c_void, size: u32, fileHandle: Handle) + -> Result; } extern "C" { pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result; @@ -4574,17 +4529,17 @@ extern "C" { extern "C" { pub fn AM_ImportCertificates( cert1Size: u32, - cert1: *mut libc::c_void, + cert1: *mut ::libc::c_void, cert2Size: u32, - cert2: *mut libc::c_void, + cert2: *mut ::libc::c_void, cert3Size: u32, - cert3: *mut libc::c_void, + cert3: *mut ::libc::c_void, cert4Size: u32, - cert4: *mut libc::c_void, + cert4: *mut ::libc::c_void, ) -> Result; } extern "C" { - pub fn AM_ImportCertificate(certSize: u32, cert: *mut libc::c_void) -> Result; + pub fn AM_ImportCertificate(certSize: u32, cert: *mut ::libc::c_void) -> Result; } extern "C" { pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto( @@ -4651,19 +4606,19 @@ pub const APPID_ERROR: NS_APPID = 1030; pub const APPID_MINT: NS_APPID = 1031; pub const APPID_EXTRAPAD: NS_APPID = 1032; pub const APPID_MEMOLIB: NS_APPID = 1033; -pub type NS_APPID = libc::c_uint; +pub type NS_APPID = u32; pub const APTPOS_NONE: APT_AppletPos = -1; pub const APTPOS_APP: APT_AppletPos = 0; pub const APTPOS_APPLIB: APT_AppletPos = 1; pub const APTPOS_SYS: APT_AppletPos = 2; pub const APTPOS_SYSLIB: APT_AppletPos = 3; pub const APTPOS_RESIDENT: APT_AppletPos = 4; -pub type APT_AppletPos = libc::c_int; +pub type APT_AppletPos = i32; pub type APT_AppletAttr = u8; pub const APTREPLY_REJECT: APT_QueryReply = 0; pub const APTREPLY_ACCEPT: APT_QueryReply = 1; pub const APTREPLY_LATER: APT_QueryReply = 2; -pub type APT_QueryReply = libc::c_uint; +pub type APT_QueryReply = u32; pub const APTSIGNAL_NONE: APT_Signal = 0; pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1; pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2; @@ -4676,7 +4631,7 @@ pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8; pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9; pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10; pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11; -pub type APT_Signal = libc::c_uint; +pub type APT_Signal = u32; pub const APTCMD_NONE: APT_Command = 0; pub const APTCMD_WAKEUP: APT_Command = 1; pub const APTCMD_REQUEST: APT_Command = 2; @@ -4695,7 +4650,7 @@ pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14; pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15; pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16; pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17; -pub type APT_Command = libc::c_uint; +pub type APT_Command = u32; #[repr(C)] pub struct aptCaptureBufInfo { pub size: u32, @@ -4715,23 +4670,22 @@ pub const APTHOOK_ONSLEEP: APT_HookType = 2; pub const APTHOOK_ONWAKEUP: APT_HookType = 3; pub const APTHOOK_ONEXIT: APT_HookType = 4; pub const APTHOOK_COUNT: APT_HookType = 5; -pub type APT_HookType = libc::c_uint; -pub type aptHookFn = ::core::option::Option< - unsafe extern "C" fn(hook: APT_HookType, param: *mut libc::c_void), ->; +pub type APT_HookType = u32; +pub type aptHookFn = + ::core::option::Option; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct tag_aptHookCookie { pub next: *mut tag_aptHookCookie, pub callback: aptHookFn, - pub param: *mut libc::c_void, + pub param: *mut ::libc::c_void, } pub type aptHookCookie = tag_aptHookCookie; pub type aptMessageCb = ::core::option::Option< unsafe extern "C" fn( - user: *mut libc::c_void, + user: *mut ::libc::c_void, sender: NS_APPID, - msg: *mut libc::c_void, + msg: *mut ::libc::c_void, msgsize: usize, ), >; @@ -4754,18 +4708,18 @@ extern "C" { pub fn aptMainLoop() -> bool; } extern "C" { - pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut libc::c_void); + pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void); } extern "C" { pub fn aptUnhook(cookie: *mut aptHookCookie); } extern "C" { - pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut libc::c_void); + pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void); } extern "C" { pub fn aptLaunchLibraryApplet( appId: NS_APPID, - buf: *mut libc::c_void, + buf: *mut ::libc::c_void, bufsize: usize, handle: Handle, ) -> bool; @@ -4823,7 +4777,7 @@ extern "C" { } extern "C" { pub fn APT_JumpToHomeMenu( - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, handle: Handle, ) -> Result; @@ -4833,7 +4787,7 @@ extern "C" { } extern "C" { pub fn APT_JumpToApplication( - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, handle: Handle, ) -> Result; @@ -4849,10 +4803,10 @@ extern "C" { } extern "C" { pub fn APT_AppletUtility( - id: libc::c_int, - out: *mut libc::c_void, + id: ::libc::c_int, + out: *mut ::libc::c_void, outSize: usize, - in_: *const libc::c_void, + in_: *const ::libc::c_void, inSize: usize, ) -> Result; } @@ -4868,7 +4822,7 @@ extern "C" { extern "C" { pub fn APT_GlanceParameter( appID: NS_APPID, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, bufferSize: usize, sender: *mut NS_APPID, command: *mut APT_Command, @@ -4879,7 +4833,7 @@ extern "C" { extern "C" { pub fn APT_ReceiveParameter( appID: NS_APPID, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, bufferSize: usize, sender: *mut NS_APPID, command: *mut APT_Command, @@ -4892,7 +4846,7 @@ extern "C" { source: NS_APPID, dest: NS_APPID, command: APT_Command, - buffer: *const libc::c_void, + buffer: *const ::libc::c_void, bufferSize: u32, parameter: Handle, ) -> Result; @@ -4914,7 +4868,7 @@ extern "C" { } extern "C" { pub fn APT_CloseApplication( - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, handle: Handle, ) -> Result; @@ -4933,9 +4887,9 @@ extern "C" { } extern "C" { pub fn APT_DoApplicationJump( - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, - hmac: *const libc::c_void, + hmac: *const ::libc::c_void, ) -> Result; } extern "C" { @@ -4944,7 +4898,7 @@ extern "C" { extern "C" { pub fn APT_StartLibraryApplet( appID: NS_APPID, - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, handle: Handle, ) -> Result; @@ -4955,7 +4909,7 @@ extern "C" { extern "C" { pub fn APT_StartSystemApplet( appID: NS_APPID, - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, handle: Handle, ) -> Result; @@ -4965,9 +4919,9 @@ extern "C" { } extern "C" { pub fn APT_ReceiveDeliverArg( - param: *const libc::c_void, + param: *const ::libc::c_void, paramSize: usize, - hmac: *const libc::c_void, + hmac: *const ::libc::c_void, sender: *mut u64, received: *mut bool, ) -> Result; @@ -4975,12 +4929,12 @@ extern "C" { #[repr(C)] pub struct bossContext { pub property: [u32; 7usize], - pub url: [libc::c_char; 512usize], + pub url: [::libc::c_char; 512usize], pub property_x8: u32, pub property_x9: u8, pub property_xa: [u8; 256usize], pub property_xb: [u8; 512usize], - pub property_xd: [libc::c_char; 864usize], + pub property_xd: [::libc::c_char; 864usize], pub property_xe: u32, pub property_xf: [u32; 3usize], pub property_x10: u8, @@ -4995,11 +4949,11 @@ pub struct bossContext { } pub const BOSSTASKSTATUS_STARTED: bossTaskStatus = 2; pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7; -pub type bossTaskStatus = libc::c_uint; +pub type bossTaskStatus = u32; pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3; -pub type bossNsDataHeaderInfoTypes = libc::c_uint; +pub type bossNsDataHeaderInfoTypes = u32; pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4; -pub type bossNsDataHeaderInfoTypeSizes = libc::c_uint; +pub type bossNsDataHeaderInfoTypeSizes = u32; extern "C" { pub fn bossInit(programID: u64, force_user: bool) -> Result; } @@ -5019,10 +4973,10 @@ extern "C" { pub fn bossUnregisterStorage() -> Result; } extern "C" { - pub fn bossRegisterTask(taskID: *const libc::c_char, unk0: u8, unk1: u8) -> Result; + pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8, unk1: u8) -> Result; } extern "C" { - pub fn bossSendProperty(PropertyID: u16, buf: *const libc::c_void, size: u32) -> Result; + pub fn bossSendProperty(PropertyID: u16, buf: *const ::libc::c_void, size: u32) -> Result; } extern "C" { pub fn bossDeleteNsData(NsDataId: u32) -> Result; @@ -5031,7 +4985,7 @@ extern "C" { pub fn bossGetNsDataHeaderInfo( NsDataId: u32, type_: u8, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, size: u32, ) -> Result; } @@ -5039,24 +4993,24 @@ extern "C" { pub fn bossReadNsData( NsDataId: u32, offset: u64, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, size: u32, transfer_total: *mut u32, unk_out: *mut u32, ) -> Result; } extern "C" { - pub fn bossStartTaskImmediate(taskID: *const libc::c_char) -> Result; + pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { - pub fn bossStartBgImmediate(taskID: *const libc::c_char) -> Result; + pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result; } extern "C" { - pub fn bossDeleteTask(taskID: *const libc::c_char, unk: u32) -> Result; + pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32) -> Result; } extern "C" { pub fn bossGetTaskState( - taskID: *const libc::c_char, + taskID: *const ::libc::c_char, inval: s8, status: *mut u8, out1: *mut u32, @@ -5064,13 +5018,13 @@ extern "C" { ) -> Result; } extern "C" { - pub fn bossGetTaskProperty0(taskID: *const libc::c_char, out: *mut u8) -> Result; + pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8) -> Result; } extern "C" { pub fn bossSetupContextDefault( ctx: *mut bossContext, seconds_interval: u32, - url: *const libc::c_char, + url: *const ::libc::c_char, ); } extern "C" { @@ -5081,20 +5035,20 @@ pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1; pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2; pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3; pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4; -pub type Y2RU_InputFormat = libc::c_uint; +pub type Y2RU_InputFormat = u32; pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0; pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1; pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2; pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3; -pub type Y2RU_OutputFormat = libc::c_uint; +pub type Y2RU_OutputFormat = u32; pub const ROTATION_NONE: Y2RU_Rotation = 0; pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1; pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2; pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3; -pub type Y2RU_Rotation = libc::c_uint; +pub type Y2RU_Rotation = u32; pub const BLOCK_LINE: Y2RU_BlockAlignment = 0; pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1; -pub type Y2RU_BlockAlignment = libc::c_uint; +pub type Y2RU_BlockAlignment = u32; #[repr(C)] pub struct Y2RU_ColorCoefficients { pub rgb_Y: u16, @@ -5110,13 +5064,14 @@ pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0; pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1; pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2; pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3; -pub type Y2RU_StandardCoefficient = libc::c_uint; +pub type Y2RU_StandardCoefficient = u32; #[repr(C)] +#[repr(align(4))] pub struct Y2RU_ConversionParams { - pub _bitfield_1: [u8; 4usize], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, pub input_line_width: s16, pub input_lines: s16, - pub _bitfield_2: u8, + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize], u8>, pub unused: u8, pub alpha: u16, pub __bindgen_align: [u32; 0usize], @@ -5124,199 +5079,97 @@ pub struct Y2RU_ConversionParams { impl Y2RU_ConversionParams { #[inline] pub fn input_format(&self) -> Y2RU_InputFormat { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff as u32; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } } #[inline] pub fn set_input_format(&mut self, val: Y2RU_InputFormat) { - let mask = 0xff as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) } } #[inline] pub fn output_format(&self) -> Y2RU_OutputFormat { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff00 as u32; - let val = (unit_field_val & mask) >> 8usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } } #[inline] pub fn set_output_format(&mut self, val: Y2RU_OutputFormat) { - let mask = 0xff00 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 8usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) } } #[inline] pub fn rotation(&self) -> Y2RU_Rotation { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff0000 as u32; - let val = (unit_field_val & mask) >> 16usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } } #[inline] pub fn set_rotation(&mut self, val: Y2RU_Rotation) { - let mask = 0xff0000 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 16usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(16usize, 8u8, val as u64) } } #[inline] pub fn block_alignment(&self) -> Y2RU_BlockAlignment { - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff000000 as u32; - let val = (unit_field_val & mask) >> 24usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } } #[inline] pub fn set_block_alignment(&mut self, val: Y2RU_BlockAlignment) { - let mask = 0xff000000 as u32; - let val = val as u32 as u32; - let mut unit_field_val: u32 = unsafe { ::core::mem::uninitialized() }; unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_1 as *const _ as *const u8, - &mut unit_field_val as *mut u32 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 24usize) & mask; - unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_1 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_1.set(24usize, 8u8, val as u64) } } #[inline] - pub const fn new_bitfield_1( + pub fn new_bitfield_1( input_format: Y2RU_InputFormat, output_format: Y2RU_OutputFormat, rotation: Y2RU_Rotation, block_alignment: Y2RU_BlockAlignment, - ) -> u32 { - ((((0 | ((input_format as u32 as u32) << 0usize) & (0xff as u32)) - | ((output_format as u32 as u32) << 8usize) & (0xff00 as u32)) - | ((rotation as u32 as u32) << 16usize) & (0xff0000 as u32)) - | ((block_alignment as u32 as u32) << 24usize) & (0xff000000 as u32)) + ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let input_format: u32 = unsafe { ::core::mem::transmute(input_format) }; + input_format as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let output_format: u32 = unsafe { ::core::mem::transmute(output_format) }; + output_format as u64 + }); + __bindgen_bitfield_unit.set(16usize, 8u8, { + let rotation: u32 = unsafe { ::core::mem::transmute(rotation) }; + rotation as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let block_alignment: u32 = unsafe { ::core::mem::transmute(block_alignment) }; + block_alignment as u64 + }); + __bindgen_bitfield_unit } #[inline] pub fn standard_coefficient(&self) -> Y2RU_StandardCoefficient { - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_2 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - let mask = 0xff as u8; - let val = (unit_field_val & mask) >> 0usize; - unsafe { ::core::mem::transmute(val as u32) } + unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 8u8) as u32) } } #[inline] pub fn set_standard_coefficient(&mut self, val: Y2RU_StandardCoefficient) { - let mask = 0xff as u8; - let val = val as u32 as u8; - let mut unit_field_val: u8 = unsafe { ::core::mem::uninitialized() }; - unsafe { - ::core::ptr::copy_nonoverlapping( - &self._bitfield_2 as *const _ as *const u8, - &mut unit_field_val as *mut u8 as *mut u8, - ::core::mem::size_of::(), - ) - }; - unit_field_val &= !mask; - unit_field_val |= (val << 0usize) & mask; unsafe { - ::core::ptr::copy_nonoverlapping( - &unit_field_val as *const _ as *const u8, - &mut self._bitfield_2 as *mut _ as *mut u8, - ::core::mem::size_of::(), - ); + let val: u32 = ::core::mem::transmute(val); + self._bitfield_2.set(0usize, 8u8, val as u64) } } #[inline] - pub const fn new_bitfield_2(standard_coefficient: Y2RU_StandardCoefficient) -> u8 { - (0 | ((standard_coefficient as u32 as u8) << 0usize) & (0xff as u8)) + pub fn new_bitfield_2( + standard_coefficient: Y2RU_StandardCoefficient, + ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = + Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let standard_coefficient: u32 = unsafe { ::core::mem::transmute(standard_coefficient) }; + standard_coefficient as u64 + }); + __bindgen_bitfield_unit } } #[repr(C)] @@ -5424,7 +5277,7 @@ extern "C" { } extern "C" { pub fn Y2RU_SetSendingY( - src_buf: *const libc::c_void, + src_buf: *const ::libc::c_void, image_size: u32, transfer_unit: s16, transfer_gap: s16, @@ -5432,7 +5285,7 @@ extern "C" { } extern "C" { pub fn Y2RU_SetSendingU( - src_buf: *const libc::c_void, + src_buf: *const ::libc::c_void, image_size: u32, transfer_unit: s16, transfer_gap: s16, @@ -5440,7 +5293,7 @@ extern "C" { } extern "C" { pub fn Y2RU_SetSendingV( - src_buf: *const libc::c_void, + src_buf: *const ::libc::c_void, image_size: u32, transfer_unit: s16, transfer_gap: s16, @@ -5448,7 +5301,7 @@ extern "C" { } extern "C" { pub fn Y2RU_SetSendingYUYV( - src_buf: *const libc::c_void, + src_buf: *const ::libc::c_void, image_size: u32, transfer_unit: s16, transfer_gap: s16, @@ -5456,7 +5309,7 @@ extern "C" { } extern "C" { pub fn Y2RU_SetReceiving( - dst_buf: *mut libc::c_void, + dst_buf: *mut ::libc::c_void, image_size: u32, transfer_unit: s16, transfer_gap: s16, @@ -5508,7 +5361,7 @@ pub const PORT_NONE: _bindgen_ty_13 = 0; pub const PORT_CAM1: _bindgen_ty_13 = 1; pub const PORT_CAM2: _bindgen_ty_13 = 2; pub const PORT_BOTH: _bindgen_ty_13 = 3; -pub type _bindgen_ty_13 = libc::c_uint; +pub type _bindgen_ty_13 = u32; pub const SELECT_NONE: _bindgen_ty_14 = 0; pub const SELECT_OUT1: _bindgen_ty_14 = 1; pub const SELECT_IN1: _bindgen_ty_14 = 2; @@ -5517,17 +5370,17 @@ pub const SELECT_IN1_OUT1: _bindgen_ty_14 = 3; pub const SELECT_OUT1_OUT2: _bindgen_ty_14 = 5; pub const SELECT_IN1_OUT2: _bindgen_ty_14 = 6; pub const SELECT_ALL: _bindgen_ty_14 = 7; -pub type _bindgen_ty_14 = libc::c_uint; +pub type _bindgen_ty_14 = u32; pub const CONTEXT_NONE: CAMU_Context = 0; pub const CONTEXT_A: CAMU_Context = 1; pub const CONTEXT_B: CAMU_Context = 2; pub const CONTEXT_BOTH: CAMU_Context = 3; -pub type CAMU_Context = libc::c_uint; +pub type CAMU_Context = u32; pub const FLIP_NONE: CAMU_Flip = 0; pub const FLIP_HORIZONTAL: CAMU_Flip = 1; pub const FLIP_VERTICAL: CAMU_Flip = 2; pub const FLIP_REVERSE: CAMU_Flip = 3; -pub type CAMU_Flip = libc::c_uint; +pub type CAMU_Flip = u32; pub const SIZE_VGA: CAMU_Size = 0; pub const SIZE_QVGA: CAMU_Size = 1; pub const SIZE_QQVGA: CAMU_Size = 2; @@ -5537,7 +5390,7 @@ pub const SIZE_DS_LCD: CAMU_Size = 5; pub const SIZE_DS_LCDx4: CAMU_Size = 6; pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7; pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1; -pub type CAMU_Size = libc::c_uint; +pub type CAMU_Size = u32; pub const FRAME_RATE_15: CAMU_FrameRate = 0; pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1; pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2; @@ -5551,7 +5404,7 @@ pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9; pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10; pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11; pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12; -pub type CAMU_FrameRate = libc::c_uint; +pub type CAMU_FrameRate = u32; pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0; pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1; pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2; @@ -5565,20 +5418,20 @@ pub const WHITE_BALANCE_DAYLIGHT: CAMU_WhiteBalance = 3; pub const WHITE_BALANCE_CLOUDY: CAMU_WhiteBalance = 4; pub const WHITE_BALANCE_HORIZON: CAMU_WhiteBalance = 4; pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5; -pub type CAMU_WhiteBalance = libc::c_uint; +pub type CAMU_WhiteBalance = u32; pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0; pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1; pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2; pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3; pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4; -pub type CAMU_PhotoMode = libc::c_uint; +pub type CAMU_PhotoMode = u32; pub const EFFECT_NONE: CAMU_Effect = 0; pub const EFFECT_MONO: CAMU_Effect = 1; pub const EFFECT_SEPIA: CAMU_Effect = 2; pub const EFFECT_NEGATIVE: CAMU_Effect = 3; pub const EFFECT_NEGAFILM: CAMU_Effect = 4; pub const EFFECT_SEPIA01: CAMU_Effect = 5; -pub type CAMU_Effect = libc::c_uint; +pub type CAMU_Effect = u32; pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0; pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1; pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2; @@ -5593,21 +5446,21 @@ pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10; pub const CONTRAST_LOW: CAMU_Contrast = 4; pub const CONTRAST_NORMAL: CAMU_Contrast = 5; pub const CONTRAST_HIGH: CAMU_Contrast = 6; -pub type CAMU_Contrast = libc::c_uint; +pub type CAMU_Contrast = u32; pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0; pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1; pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2; pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0; pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1; pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2; -pub type CAMU_LensCorrection = libc::c_uint; +pub type CAMU_LensCorrection = u32; pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0; pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1; -pub type CAMU_OutputFormat = libc::c_uint; +pub type CAMU_OutputFormat = u32; pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0; pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1; pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2; -pub type CAMU_ShutterSoundType = libc::c_uint; +pub type CAMU_ShutterSoundType = u32; #[repr(C)] pub struct CAMU_ImageQualityCalibrationData { pub aeBaseTarget: s16, @@ -5711,7 +5564,7 @@ extern "C" { extern "C" { pub fn CAMU_SetReceiving( event: *mut Handle, - dst: *mut libc::c_void, + dst: *mut ::libc::c_void, port: u32, imageSize: u32, transferUnit: s16, @@ -5966,7 +5819,7 @@ pub const CFG_REGION_AUS: CFG_Region = 3; pub const CFG_REGION_CHN: CFG_Region = 4; pub const CFG_REGION_KOR: CFG_Region = 5; pub const CFG_REGION_TWN: CFG_Region = 6; -pub type CFG_Region = libc::c_uint; +pub type CFG_Region = u32; pub const CFG_LANGUAGE_JP: CFG_Language = 0; pub const CFG_LANGUAGE_EN: CFG_Language = 1; pub const CFG_LANGUAGE_FR: CFG_Language = 2; @@ -5979,7 +5832,7 @@ pub const CFG_LANGUAGE_NL: CFG_Language = 8; pub const CFG_LANGUAGE_PT: CFG_Language = 9; pub const CFG_LANGUAGE_RU: CFG_Language = 10; pub const CFG_LANGUAGE_TW: CFG_Language = 11; -pub type CFG_Language = libc::c_uint; +pub type CFG_Language = u32; extern "C" { pub fn cfguInit() -> Result; } @@ -6007,6 +5860,9 @@ extern "C" { extern "C" { pub fn CFGU_GetCountryCodeID(string: u16, code: *mut u16) -> Result; } +extern "C" { + pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result; +} extern "C" { pub fn CFGU_GetConfigInfoBlk2(size: u32, blkID: u32, outData: *mut u8) -> Result; } @@ -6049,16 +5905,31 @@ extern "C" { extern "C" { pub fn CFGI_VerifySigSecureInfo() -> Result; } +extern "C" { + pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8) -> Result; +} +extern "C" { + pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8) -> Result; +} +extern "C" { + pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64) -> Result; +} +extern "C" { + pub fn CFGI_GetSecureInfoData(data: *mut u8) -> Result; +} +extern "C" { + pub fn CFGI_GetSecureInfoSignature(data: *mut u8) -> Result; +} pub const CSND_ENCODING_PCM8: _bindgen_ty_15 = 0; pub const CSND_ENCODING_PCM16: _bindgen_ty_15 = 1; pub const CSND_ENCODING_ADPCM: _bindgen_ty_15 = 2; pub const CSND_ENCODING_PSG: _bindgen_ty_15 = 3; -pub type _bindgen_ty_15 = libc::c_uint; +pub type _bindgen_ty_15 = u32; pub const CSND_LOOPMODE_MANUAL: _bindgen_ty_16 = 0; pub const CSND_LOOPMODE_NORMAL: _bindgen_ty_16 = 1; pub const CSND_LOOPMODE_ONESHOT: _bindgen_ty_16 = 2; pub const CSND_LOOPMODE_NORELOAD: _bindgen_ty_16 = 3; -pub type _bindgen_ty_16 = libc::c_uint; +pub type _bindgen_ty_16 = u32; pub const SOUND_LINEAR_INTERP: _bindgen_ty_17 = 64; pub const SOUND_REPEAT: _bindgen_ty_17 = 1024; pub const SOUND_ONE_SHOT: _bindgen_ty_17 = 2048; @@ -6067,13 +5938,13 @@ pub const SOUND_FORMAT_16BIT: _bindgen_ty_17 = 4096; pub const SOUND_FORMAT_ADPCM: _bindgen_ty_17 = 8192; pub const SOUND_FORMAT_PSG: _bindgen_ty_17 = 12288; pub const SOUND_ENABLE: _bindgen_ty_17 = 16384; -pub type _bindgen_ty_17 = libc::c_uint; +pub type _bindgen_ty_17 = u32; pub const CAPTURE_REPEAT: _bindgen_ty_18 = 0; pub const CAPTURE_ONE_SHOT: _bindgen_ty_18 = 1; pub const CAPTURE_FORMAT_16BIT: _bindgen_ty_18 = 0; pub const CAPTURE_FORMAT_8BIT: _bindgen_ty_18 = 2; pub const CAPTURE_ENABLE: _bindgen_ty_18 = 32768; -pub type _bindgen_ty_18 = libc::c_uint; +pub type _bindgen_ty_18 = u32; pub const DutyCycle_0: CSND_DutyCycle = 7; pub const DutyCycle_12: CSND_DutyCycle = 0; pub const DutyCycle_25: CSND_DutyCycle = 1; @@ -6082,7 +5953,7 @@ pub const DutyCycle_50: CSND_DutyCycle = 3; pub const DutyCycle_62: CSND_DutyCycle = 4; pub const DutyCycle_75: CSND_DutyCycle = 5; pub const DutyCycle_87: CSND_DutyCycle = 6; -pub type CSND_DutyCycle = libc::c_uint; +pub type CSND_DutyCycle = u32; #[repr(C)] pub struct CSND_ChnInfo { pub value: __BindgenUnionField<[u32; 3usize]>, @@ -6128,13 +5999,13 @@ extern "C" { pub fn CSND_ReleaseCapUnit(capUnit: u32) -> Result; } extern "C" { - pub fn CSND_FlushDataCache(adr: *const libc::c_void, size: u32) -> Result; + pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32) -> Result; } extern "C" { - pub fn CSND_StoreDataCache(adr: *const libc::c_void, size: u32) -> Result; + pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32) -> Result; } extern "C" { - pub fn CSND_InvalidateDataCache(adr: *const libc::c_void, size: u32) -> Result; + pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32) -> Result; } extern "C" { pub fn CSND_Reset() -> Result; @@ -6146,10 +6017,10 @@ extern "C" { pub fn csndExit(); } extern "C" { - pub fn csndAddCmd(cmdid: libc::c_int) -> *mut u32; + pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32; } extern "C" { - pub fn csndWriteCmd(cmdid: libc::c_int, cmdparams: *mut u8); + pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8); } extern "C" { pub fn csndExecCmds(waitDone: bool) -> Result; @@ -6164,7 +6035,7 @@ extern "C" { pub fn CSND_SetEncoding(channel: u32, value: u32); } extern "C" { - pub fn CSND_SetBlock(channel: u32, block: libc::c_int, physaddr: u32, size: u32); + pub fn CSND_SetBlock(channel: u32, block: ::libc::c_int, physaddr: u32, size: u32); } extern "C" { pub fn CSND_SetLooping(channel: u32, value: u32); @@ -6187,9 +6058,9 @@ extern "C" { extern "C" { pub fn CSND_SetAdpcmState( channel: u32, - block: libc::c_int, - sample: libc::c_int, - index: libc::c_int, + block: ::libc::c_int, + sample: ::libc::c_int, + index: ::libc::c_int, ); } extern "C" { @@ -6240,13 +6111,13 @@ extern "C" { } extern "C" { pub fn csndPlaySound( - chn: libc::c_int, + chn: ::libc::c_int, flags: u32, sampleRate: u32, vol: f32, pan: f32, - data0: *mut libc::c_void, - data1: *mut libc::c_void, + data0: *mut ::libc::c_void, + data1: *mut ::libc::c_void, size: u32, ) -> Result; } @@ -6266,10 +6137,10 @@ extern "C" { pub fn csndIsPlaying(channel: u32, status: *mut u8) -> Result; } pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2; -pub type DSP_InterruptType = libc::c_uint; +pub type DSP_InterruptType = u32; pub const DSP_PIPE_INPUT: DSP_PipeDirection = 0; pub const DSP_PIPE_OUTPUT: DSP_PipeDirection = 1; -pub type DSP_PipeDirection = libc::c_uint; +pub type DSP_PipeDirection = u32; extern "C" { pub fn dspInit() -> Result; } @@ -6280,10 +6151,10 @@ extern "C" { pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result; } extern "C" { - pub fn DSP_FlushDataCache(address: *const libc::c_void, size: u32) -> Result; + pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32) -> Result; } extern "C" { - pub fn DSP_InvalidateDataCache(address: *const libc::c_void, size: u32) -> Result; + pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32) -> Result; } extern "C" { pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result; @@ -6296,7 +6167,7 @@ extern "C" { } extern "C" { pub fn DSP_LoadComponent( - component: *const libc::c_void, + component: *const ::libc::c_void, size: u32, prog_mask: u16, data_mask: u16, @@ -6313,13 +6184,14 @@ extern "C" { pub fn DSP_ReadPipeIfPossible( channel: u32, peer: u32, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, length: u16, length_read: *mut u16, ) -> Result; } extern "C" { - pub fn DSP_WriteProcessPipe(channel: u32, buffer: *const libc::c_void, length: u32) -> Result; + pub fn DSP_WriteProcessPipe(channel: u32, buffer: *const ::libc::c_void, length: u32) + -> Result; } extern "C" { pub fn DSP_ConvertProcessAddressFromDspDram(dsp_address: u32, arm_address: *mut u32) -> Result; @@ -6339,7 +6211,7 @@ extern "C" { pub const GSPLCD_SCREEN_TOP: _bindgen_ty_19 = 1; pub const GSPLCD_SCREEN_BOTTOM: _bindgen_ty_19 = 2; pub const GSPLCD_SCREEN_BOTH: _bindgen_ty_19 = 3; -pub type _bindgen_ty_19 = libc::c_uint; +pub type _bindgen_ty_19 = u32; extern "C" { pub fn gspLcdInit() -> Result; } @@ -6400,27 +6272,27 @@ pub const KEY_UP: _bindgen_ty_20 = 1073741888; pub const KEY_DOWN: _bindgen_ty_20 = 2147483776; pub const KEY_LEFT: _bindgen_ty_20 = 536870944; pub const KEY_RIGHT: _bindgen_ty_20 = 268435472; -pub type _bindgen_ty_20 = libc::c_uint; +pub type _bindgen_ty_20 = u32; #[repr(C)] pub struct touchPosition { pub px: u16, pub py: u16, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct circlePosition { pub dx: s16, pub dy: s16, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct accelVector { pub x: s16, pub y: s16, pub z: s16, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct angularRate { pub x: s16, pub z: s16, @@ -6432,7 +6304,7 @@ pub const HIDEVENT_Accel: HID_Event = 2; pub const HIDEVENT_Gyro: HID_Event = 3; pub const HIDEVENT_DebugPad: HID_Event = 4; pub const HIDEVENT_MAX: HID_Event = 5; -pub type HID_Event = libc::c_uint; +pub type HID_Event = u32; extern "C" { pub static mut hidMemHandle: Handle; } @@ -6550,13 +6422,13 @@ pub const SSLC_DefaultRootCert_AddTrust_External_CA: SSLC_DefaultRootCert = 8; pub const SSLC_DefaultRootCert_COMODO: SSLC_DefaultRootCert = 9; pub const SSLC_DefaultRootCert_USERTrust: SSLC_DefaultRootCert = 10; pub const SSLC_DefaultRootCert_DigiCert_EV: SSLC_DefaultRootCert = 11; -pub type SSLC_DefaultRootCert = libc::c_uint; +pub type SSLC_DefaultRootCert = u32; pub const SSLC_DefaultClientCert_ClCertA: SSLC_DefaultClientCert = 64; -pub type SSLC_DefaultClientCert = libc::c_uint; +pub type SSLC_DefaultClientCert = u32; pub const SSLCOPT_Default: _bindgen_ty_21 = 0; pub const SSLCOPT_DisableVerify: _bindgen_ty_21 = 512; pub const SSLCOPT_TLSv10: _bindgen_ty_21 = 2048; -pub type _bindgen_ty_21 = libc::c_uint; +pub type _bindgen_ty_21 = u32; extern "C" { pub fn sslcInit(session_handle: Handle) -> Result; } @@ -6644,9 +6516,9 @@ extern "C" { extern "C" { pub fn sslcCreateContext( context: *mut sslcContext, - sockfd: libc::c_int, + sockfd: ::libc::c_int, input_opt: u32, - hostname: *const libc::c_char, + hostname: *const ::libc::c_char, ) -> Result; } extern "C" { @@ -6655,20 +6527,20 @@ extern "C" { extern "C" { pub fn sslcStartConnection( context: *mut sslcContext, - internal_retval: *mut libc::c_int, + internal_retval: *mut ::libc::c_int, out: *mut u32, ) -> Result; } extern "C" { pub fn sslcRead( context: *mut sslcContext, - buf: *mut libc::c_void, + buf: *mut ::libc::c_void, len: usize, peek: bool, ) -> Result; } extern "C" { - pub fn sslcWrite(context: *mut sslcContext, buf: *const libc::c_void, len: usize) -> Result; + pub fn sslcWrite(context: *mut sslcContext, buf: *const ::libc::c_void, len: usize) -> Result; } extern "C" { pub fn sslcContextSetRootCertChain(context: *mut sslcContext, handle: u32) -> Result; @@ -6685,9 +6557,9 @@ extern "C" { extern "C" { pub fn sslcContextGetProtocolCipher( context: *mut sslcContext, - outprotocols: *mut libc::c_char, + outprotocols: *mut ::libc::c_char, outprotocols_maxsize: u32, - outcipher: *mut libc::c_char, + outcipher: *mut ::libc::c_char, outcipher_maxsize: u32, ) -> Result; } @@ -6710,13 +6582,13 @@ pub const HTTPC_METHOD_POST: HTTPC_RequestMethod = 2; pub const HTTPC_METHOD_HEAD: HTTPC_RequestMethod = 3; pub const HTTPC_METHOD_PUT: HTTPC_RequestMethod = 4; pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5; -pub type HTTPC_RequestMethod = libc::c_uint; +pub type HTTPC_RequestMethod = u32; pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5; pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7; -pub type HTTPC_RequestStatus = libc::c_uint; +pub type HTTPC_RequestStatus = u32; pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0; pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1; -pub type HTTPC_KeepAlive = libc::c_uint; +pub type HTTPC_KeepAlive = u32; extern "C" { pub fn httpcInit(sharedmem_size: u32) -> Result; } @@ -6727,7 +6599,7 @@ extern "C" { pub fn httpcOpenContext( context: *mut httpcContext, method: HTTPC_RequestMethod, - url: *const libc::c_char, + url: *const ::libc::c_char, use_defaultproxy: u32, ) -> Result; } @@ -6740,21 +6612,21 @@ extern "C" { extern "C" { pub fn httpcAddRequestHeaderField( context: *mut httpcContext, - name: *const libc::c_char, - value: *const libc::c_char, + name: *const ::libc::c_char, + value: *const ::libc::c_char, ) -> Result; } extern "C" { pub fn httpcAddPostDataAscii( context: *mut httpcContext, - name: *const libc::c_char, - value: *const libc::c_char, + name: *const ::libc::c_char, + value: *const ::libc::c_char, ) -> Result; } extern "C" { pub fn httpcAddPostDataBinary( context: *mut httpcContext, - name: *const libc::c_char, + name: *const ::libc::c_char, value: *const u8, len: u32, ) -> Result; @@ -6802,8 +6674,8 @@ extern "C" { extern "C" { pub fn httpcGetResponseHeader( context: *mut httpcContext, - name: *const libc::c_char, - value: *mut libc::c_char, + name: *const ::libc::c_char, + value: *mut ::libc::c_char, valuebuf_maxsize: u32, ) -> Result; } @@ -7003,27 +6875,29 @@ pub const UDSNETATTR_DisableConnectSpectators: _bindgen_ty_22 = 1; pub const UDSNETATTR_DisableConnectClients: _bindgen_ty_22 = 2; pub const UDSNETATTR_x4: _bindgen_ty_22 = 4; pub const UDSNETATTR_Default: _bindgen_ty_22 = 32768; -pub type _bindgen_ty_22 = libc::c_uint; +pub type _bindgen_ty_22 = u32; pub const UDS_SENDFLAG_Default: _bindgen_ty_23 = 1; pub const UDS_SENDFLAG_Broadcast: _bindgen_ty_23 = 2; -pub type _bindgen_ty_23 = libc::c_uint; +pub type _bindgen_ty_23 = u32; pub const UDSCONTYPE_Client: udsConnectionType = 1; pub const UDSCONTYPE_Spectator: udsConnectionType = 2; -pub type udsConnectionType = libc::c_uint; +pub type udsConnectionType = u32; extern "C" { - pub fn udsInit(sharedmem_size: usize, username: *const libc::c_char) -> Result; + pub fn udsInit(sharedmem_size: usize, username: *const ::libc::c_char) -> Result; } extern "C" { pub fn udsExit(); } extern "C" { - pub fn udsGenerateNodeInfo(nodeinfo: *mut udsNodeInfo, username: *const libc::c_char) - -> Result; + pub fn udsGenerateNodeInfo( + nodeinfo: *mut udsNodeInfo, + username: *const ::libc::c_char, + ) -> Result; } extern "C" { pub fn udsGetNodeInfoUsername( nodeinfo: *const udsNodeInfo, - username: *mut libc::c_char, + username: *mut ::libc::c_char, ) -> Result; } extern "C" { @@ -7039,7 +6913,7 @@ extern "C" { } extern "C" { pub fn udsScanBeacons( - outbuf: *mut libc::c_void, + outbuf: *mut ::libc::c_void, maxsize: usize, networks: *mut *mut udsNetworkScanInfo, total_networks: *mut usize, @@ -7050,11 +6924,11 @@ extern "C" { ) -> Result; } extern "C" { - pub fn udsSetApplicationData(buf: *const libc::c_void, size: usize) -> Result; + pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: usize) -> Result; } extern "C" { pub fn udsGetApplicationData( - buf: *mut libc::c_void, + buf: *mut ::libc::c_void, size: usize, actual_size: *mut usize, ) -> Result; @@ -7062,7 +6936,7 @@ extern "C" { extern "C" { pub fn udsGetNetworkStructApplicationData( network: *const udsNetworkStruct, - buf: *mut libc::c_void, + buf: *mut ::libc::c_void, size: usize, actual_size: *mut usize, ) -> Result; @@ -7089,7 +6963,7 @@ extern "C" { extern "C" { pub fn udsPullPacket( bindcontext: *const udsBindContext, - buf: *mut libc::c_void, + buf: *mut ::libc::c_void, size: usize, actual_size: *mut usize, src_NetworkNodeID: *mut u16, @@ -7100,7 +6974,7 @@ extern "C" { dst_NetworkNodeID: u16, data_channel: u8, flags: u8, - buf: *const libc::c_void, + buf: *const ::libc::c_void, size: usize, ) -> Result; } @@ -7110,7 +6984,7 @@ extern "C" { extern "C" { pub fn udsCreateNetwork( network: *const udsNetworkStruct, - passphrase: *const libc::c_void, + passphrase: *const ::libc::c_void, passphrase_size: usize, context: *mut udsBindContext, data_channel: u8, @@ -7120,7 +6994,7 @@ extern "C" { extern "C" { pub fn udsConnectNetwork( network: *const udsNetworkStruct, - passphrase: *const libc::c_void, + passphrase: *const ::libc::c_void, passphrase_size: usize, context: *mut udsBindContext, recv_NetworkNodeID: u16, @@ -7159,12 +7033,43 @@ extern "C" { extern "C" { pub fn udsGetNodeInformation(NetworkNodeID: u16, output: *mut udsNodeInfo) -> Result; } -pub const EXCLUSIVE_STATE_NONE: NDM_ExclusiveState = 0; -pub const EXCLUSIVE_STATE_INFRASTRUCTURE: NDM_ExclusiveState = 1; -pub const EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS: NDM_ExclusiveState = 2; -pub const EXCLUSIVE_STATE_STREETPASS: NDM_ExclusiveState = 3; -pub const EXCLUSIVE_STATE_STREETPASS_DATA: NDM_ExclusiveState = 4; -pub type NDM_ExclusiveState = libc::c_uint; +pub const EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0; +pub const EXCLUSIVE_STATE_INFRASTRUCTURE: ndmExclusiveState = 1; +pub const EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS: ndmExclusiveState = 2; +pub const EXCLUSIVE_STATE_STREETPASS: ndmExclusiveState = 3; +pub const EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4; +pub type ndmExclusiveState = u32; +pub const STATE_INITIAL: ndmState = 0; +pub const STATE_SUSPENDED: ndmState = 1; +pub const STATE_INFRASTRUCTURE_CONNECTING: ndmState = 2; +pub const STATE_INFRASTRUCTURE_CONNECTED: ndmState = 3; +pub const STATE_INFRASTRUCTURE_WORKING: ndmState = 4; +pub const STATE_INFRASTRUCTURE_SUSPENDING: ndmState = 5; +pub const STATE_INFRASTRUCTURE_FORCE_SUSPENDING: ndmState = 6; +pub const STATE_INFRASTRUCTURE_DISCONNECTING: ndmState = 7; +pub const STATE_INFRASTRUCTURE_FORCE_DISCONNECTING: ndmState = 8; +pub const STATE_CEC_WORKING: ndmState = 9; +pub const STATE_CEC_FORCE_SUSPENDING: ndmState = 10; +pub const STATE_CEC_SUSPENDING: ndmState = 11; +pub type ndmState = u32; +pub const DAEMON_CEC: ndmDaemon = 0; +pub const DAEMON_BOSS: ndmDaemon = 1; +pub const DAEMON_NIM: ndmDaemon = 2; +pub const DAEMON_FRIENDS: ndmDaemon = 3; +pub type ndmDaemon = u32; +pub const DAEMON_MASK_CEC: ndmDaemonMask = 1; +pub const DAEMON_MASK_BOSS: ndmDaemonMask = 2; +pub const DAEMON_MASK_NIM: ndmDaemonMask = 4; +pub const DAEMON_MASK_FRIENDS: ndmDaemonMask = 8; +pub const DAEMON_MASK_BACKGROUOND: ndmDaemonMask = 7; +pub const DAEMON_MASK_ALL: ndmDaemonMask = 15; +pub const DAEMON_MASK_DEFAULT: ndmDaemonMask = 9; +pub type ndmDaemonMask = u32; +pub const DAEMON_STATUS_BUSY: ndmDaemonStatus = 0; +pub const DAEMON_STATUS_IDLE: ndmDaemonStatus = 1; +pub const DAEMON_STATUS_SUSPENDING: ndmDaemonStatus = 2; +pub const DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3; +pub type ndmDaemonStatus = u32; extern "C" { pub fn ndmuInit() -> Result; } @@ -7172,16 +7077,61 @@ extern "C" { pub fn ndmuExit(); } extern "C" { - pub fn ndmuEnterExclusiveState(state: NDM_ExclusiveState) -> Result; + pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result; +} +extern "C" { + pub fn NDMU_LeaveExclusiveState() -> Result; +} +extern "C" { + pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result; +} +extern "C" { + pub fn NDMU_LockState() -> Result; +} +extern "C" { + pub fn NDMU_UnlockState() -> Result; +} +extern "C" { + pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result; +} +extern "C" { + pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result; +} +extern "C" { + pub fn NDMU_SuspendScheduler(flag: u32) -> Result; +} +extern "C" { + pub fn NDMU_ResumeScheduler() -> Result; } extern "C" { - pub fn ndmuLeaveExclusiveState() -> Result; + pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result; +} +extern "C" { + pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result; +} +extern "C" { + pub fn NDMU_SetScanInterval(interval: u32) -> Result; +} +extern "C" { + pub fn NDMU_GetScanInterval(interval: *mut u32) -> Result; +} +extern "C" { + pub fn NDMU_GetRetryInterval(interval: *mut u32) -> Result; +} +extern "C" { + pub fn NDMU_ResetDaemons() -> Result; +} +extern "C" { + pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result; +} +extern "C" { + pub fn NDMU_ClearMacFilter() -> Result; } pub const IM_DEFAULT: NIM_InstallationMode = 0; pub const IM_UNKNOWN1: NIM_InstallationMode = 1; pub const IM_UNKNOWN2: NIM_InstallationMode = 2; pub const IM_REINSTALL: NIM_InstallationMode = 3; -pub type NIM_InstallationMode = libc::c_uint; +pub type NIM_InstallationMode = u32; pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0; pub const DS_INITIALIZED: NIM_DownloadState = 1; pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2; @@ -7194,7 +7144,7 @@ pub const DS_VERSION_ERROR: NIM_DownloadState = 8; pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9; pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10; pub const DS_INVALID: NIM_DownloadState = 11; -pub type NIM_DownloadState = libc::c_uint; +pub type NIM_DownloadState = u32; #[repr(C)] pub struct NIM_TitleConfig { pub titleId: u64, @@ -7213,13 +7163,13 @@ pub struct NIM_TitleProgress { pub totalSize: u64, } extern "C" { - pub fn nimsInit(buffer: *mut libc::c_void, buffer_len: usize) -> Result; + pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: usize) -> Result; } extern "C" { pub fn nimsInitWithTIN( - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, buffer_len: usize, - TIN: *const libc::c_char, + TIN: *const ::libc::c_char, ) -> Result; } extern "C" { @@ -7229,7 +7179,7 @@ extern "C" { pub fn nimsGetSessionHandle() -> *mut Handle; } extern "C" { - pub fn NIMS_SetAttribute(attr: *const libc::c_char, val: *const libc::c_char) -> Result; + pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result; } extern "C" { pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result; @@ -7246,8 +7196,8 @@ extern "C" { extern "C" { pub fn NIMS_RegisterTask( cfg: *const NIM_TitleConfig, - name: *const libc::c_char, - maker: *const libc::c_char, + name: *const ::libc::c_char, + maker: *const ::libc::c_char, ) -> Result; } extern "C" { @@ -7340,6 +7290,9 @@ extern "C" { extern "C" { pub fn NS_LaunchTitle(titleid: u64, launch_flags: u32, procid: *mut u32) -> Result; } +extern "C" { + pub fn NS_TerminateTitle() -> Result; +} extern "C" { pub fn NS_LaunchApplicationFIRM(titleid: u64, flags: u32) -> Result; } @@ -7347,7 +7300,10 @@ extern "C" { pub fn NS_RebootToTitle(mediatype: u8, titleid: u64) -> Result; } extern "C" { - pub fn NS_TerminateProcessTID(titleid: u64) -> Result; + pub fn NS_TerminateProcessTID(titleid: u64, timeout: u64) -> Result; +} +extern "C" { + pub fn NS_RebootSystem() -> Result; } extern "C" { pub fn pmInit() -> Result; @@ -7370,13 +7326,22 @@ extern "C" { extern "C" { pub fn PM_LaunchFIRMSetParams(firm_titleid_low: u32, size: u32, in_: *mut u8) -> Result; } +extern "C" { + pub fn PM_TerminateCurrentApplication(timeout: u64) -> Result; +} +extern "C" { + pub fn PM_TerminateProcess(pid: u8, timeout: u64) -> Result; +} +extern "C" { + pub fn PM_UnregisterProcess(tid: u64) -> Result; +} pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0; pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1; pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2; pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3; pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4; pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5; -pub type PS_AESAlgorithm = libc::c_uint; +pub type PS_AESAlgorithm = u32; pub const PS_KEYSLOT_0D: PS_AESKeyType = 0; pub const PS_KEYSLOT_2D: PS_AESKeyType = 1; pub const PS_KEYSLOT_31: PS_AESKeyType = 2; @@ -7387,7 +7352,7 @@ pub const PS_KEYSLOT_2E: PS_AESKeyType = 6; pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7; pub const PS_KEYSLOT_36: PS_AESKeyType = 8; pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9; -pub type PS_AESKeyType = libc::c_uint; +pub type PS_AESKeyType = u32; #[repr(C)] pub struct psRSAContext { pub modulo: [u8; 256usize], @@ -7444,7 +7409,7 @@ extern "C" { pub fn PS_GetDeviceId(device_id: *mut u32) -> Result; } extern "C" { - pub fn PS_GenerateRandomBytes(out: *mut libc::c_void, len: usize) -> Result; + pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: usize) -> Result; } extern "C" { pub fn ptmuInit() -> Result; @@ -7492,14 +7457,14 @@ pub const WAIT_NONE: PXIDEV_WaitType = 0; pub const WAIT_SLEEP: PXIDEV_WaitType = 1; pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2; pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3; -pub type PXIDEV_WaitType = libc::c_uint; +pub type PXIDEV_WaitType = u32; pub const DEASSERT_NONE: PXIDEV_DeassertType = 0; pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1; pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2; -pub type PXIDEV_DeassertType = libc::c_uint; +pub type PXIDEV_DeassertType = u32; #[repr(C)] pub struct PXIDEV_SPIBuffer { - pub ptr: *mut libc::c_void, + pub ptr: *mut ::libc::c_void, pub size: u32, pub transferOption: u8, pub waitOperation: u64, @@ -7529,167 +7494,166 @@ extern "C" { ) -> Result; } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct timezone { - pub tz_minuteswest: libc::c_int, - pub tz_dsttime: libc::c_int, + pub tz_minuteswest: ::libc::c_int, + pub tz_dsttime: ::libc::c_int, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct bintime { pub sec: time_t, pub frac: u64, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct itimerval { pub it_interval: timeval, pub it_value: timeval, } -pub type __ULong = libc::c_ulong; +pub type __ULong = ::libc::c_ulong; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __locale_t { _unused: [u8; 0], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _Bigint { pub _next: *mut _Bigint, - pub _k: libc::c_int, - pub _maxwds: libc::c_int, - pub _sign: libc::c_int, - pub _wds: libc::c_int, + pub _k: ::libc::c_int, + pub _maxwds: ::libc::c_int, + pub _sign: ::libc::c_int, + pub _wds: ::libc::c_int, pub _x: [__ULong; 1usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __tm { - pub __tm_sec: libc::c_int, - pub __tm_min: libc::c_int, - pub __tm_hour: libc::c_int, - pub __tm_mday: libc::c_int, - pub __tm_mon: libc::c_int, - pub __tm_year: libc::c_int, - pub __tm_wday: libc::c_int, - pub __tm_yday: libc::c_int, - pub __tm_isdst: libc::c_int, + pub __tm_sec: ::libc::c_int, + pub __tm_min: ::libc::c_int, + pub __tm_hour: ::libc::c_int, + pub __tm_mday: ::libc::c_int, + pub __tm_mon: ::libc::c_int, + pub __tm_year: ::libc::c_int, + pub __tm_wday: ::libc::c_int, + pub __tm_yday: ::libc::c_int, + pub __tm_isdst: ::libc::c_int, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _on_exit_args { - pub _fnargs: [*mut libc::c_void; 32usize], - pub _dso_handle: [*mut libc::c_void; 32usize], + pub _fnargs: [*mut ::libc::c_void; 32usize], + pub _dso_handle: [*mut ::libc::c_void; 32usize], pub _fntypes: __ULong, pub _is_cxa: __ULong, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _atexit { pub _next: *mut _atexit, - pub _ind: libc::c_int, + pub _ind: ::libc::c_int, pub _fns: [::core::option::Option; 32usize], pub _on_exit_args: _on_exit_args, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __sbuf { - pub _base: *mut libc::c_uchar, - pub _size: libc::c_int, + pub _base: *mut ::libc::c_uchar, + pub _size: ::libc::c_int, } #[repr(C)] #[derive(Copy, Clone)] pub struct __sFILE { - pub _p: *mut libc::c_uchar, - pub _r: libc::c_int, - pub _w: libc::c_int, - pub _flags: libc::c_short, - pub _file: libc::c_short, + pub _p: *mut ::libc::c_uchar, + pub _r: ::libc::c_int, + pub _w: ::libc::c_int, + pub _flags: ::libc::c_short, + pub _file: ::libc::c_short, pub _bf: __sbuf, - pub _lbfsize: libc::c_int, - pub _cookie: *mut libc::c_void, + pub _lbfsize: ::libc::c_int, + pub _cookie: *mut ::libc::c_void, pub _read: ::core::option::Option< unsafe extern "C" fn( arg1: *mut _reent, - arg2: *mut libc::c_void, - arg3: *mut libc::c_char, - arg4: libc::c_int, - ) -> libc::c_int, + arg2: *mut ::libc::c_void, + arg3: *mut ::libc::c_char, + arg4: ::libc::c_int, + ) -> ::libc::c_int, >, pub _write: ::core::option::Option< unsafe extern "C" fn( arg1: *mut _reent, - arg2: *mut libc::c_void, - arg3: *const libc::c_char, - arg4: libc::c_int, - ) -> libc::c_int, + arg2: *mut ::libc::c_void, + arg3: *const ::libc::c_char, + arg4: ::libc::c_int, + ) -> ::libc::c_int, >, pub _seek: ::core::option::Option< unsafe extern "C" fn( arg1: *mut _reent, - arg2: *mut libc::c_void, + arg2: *mut ::libc::c_void, arg3: _fpos_t, - arg4: libc::c_int, + arg4: ::libc::c_int, ) -> _fpos_t, >, pub _close: ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _reent, arg2: *mut libc::c_void) - -> libc::c_int, + unsafe extern "C" fn(arg1: *mut _reent, arg2: *mut ::libc::c_void) -> ::libc::c_int, >, pub _ub: __sbuf, - pub _up: *mut libc::c_uchar, - pub _ur: libc::c_int, - pub _ubuf: [libc::c_uchar; 3usize], - pub _nbuf: [libc::c_uchar; 1usize], + pub _up: *mut ::libc::c_uchar, + pub _ur: ::libc::c_int, + pub _ubuf: [::libc::c_uchar; 3usize], + pub _nbuf: [::libc::c_uchar; 1usize], pub _lb: __sbuf, - pub _blksize: libc::c_int, + pub _blksize: ::libc::c_int, pub _offset: _off_t, pub _data: *mut _reent, pub _lock: _flock_t, pub _mbstate: _mbstate_t, - pub _flags2: libc::c_int, + pub _flags2: ::libc::c_int, } pub type __FILE = __sFILE; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _glue { pub _next: *mut _glue, - pub _niobs: libc::c_int, + pub _niobs: ::libc::c_int, pub _iobs: *mut __FILE, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _rand48 { - pub _seed: [libc::c_ushort; 3usize], - pub _mult: [libc::c_ushort; 3usize], - pub _add: libc::c_ushort, + pub _seed: [::libc::c_ushort; 3usize], + pub _mult: [::libc::c_ushort; 3usize], + pub _add: ::libc::c_ushort, } #[repr(C)] #[derive(Copy, Clone)] pub struct _reent { - pub _errno: libc::c_int, + pub _errno: ::libc::c_int, pub _stdin: *mut __FILE, pub _stdout: *mut __FILE, pub _stderr: *mut __FILE, - pub _inc: libc::c_int, - pub _emergency: [libc::c_char; 25usize], - pub _unspecified_locale_info: libc::c_int, + pub _inc: ::libc::c_int, + pub _emergency: [::libc::c_char; 25usize], + pub _unspecified_locale_info: ::libc::c_int, pub _locale: *mut __locale_t, - pub __sdidinit: libc::c_int, + pub __sdidinit: ::libc::c_int, pub __cleanup: ::core::option::Option, pub _result: *mut _Bigint, - pub _result_k: libc::c_int, + pub _result_k: ::libc::c_int, pub _p5s: *mut _Bigint, pub _freelist: *mut *mut _Bigint, - pub _cvtlen: libc::c_int, - pub _cvtbuf: *mut libc::c_char, + pub _cvtlen: ::libc::c_int, + pub _cvtbuf: *mut ::libc::c_char, pub _new: _reent__bindgen_ty_1, pub _atexit: *mut _atexit, pub _atexit0: _atexit, - pub _sig_func: *mut ::core::option::Option, + pub _sig_func: *mut ::core::option::Option, pub __sglue: _glue, pub __sf: [__FILE; 3usize], - pub deviceData: *mut libc::c_void, + pub deviceData: *mut ::libc::c_void, } #[repr(C)] #[derive(Copy, Clone)] @@ -7701,31 +7665,31 @@ pub union _reent__bindgen_ty_1 { #[repr(C)] #[derive(Copy, Clone)] pub struct _reent__bindgen_ty_1__bindgen_ty_1 { - pub _unused_rand: libc::c_uint, - pub _strtok_last: *mut libc::c_char, - pub _asctime_buf: [libc::c_char; 26usize], + pub _unused_rand: ::libc::c_uint, + pub _strtok_last: *mut ::libc::c_char, + pub _asctime_buf: [::libc::c_char; 26usize], pub _localtime_buf: __tm, - pub _gamma_signgam: libc::c_int, - pub _rand_next: libc::c_ulonglong, + pub _gamma_signgam: ::libc::c_int, + pub _rand_next: ::libc::c_ulonglong, pub _r48: _rand48, pub _mblen_state: _mbstate_t, pub _mbtowc_state: _mbstate_t, pub _wctomb_state: _mbstate_t, - pub _l64a_buf: [libc::c_char; 8usize], - pub _signal_buf: [libc::c_char; 24usize], - pub _getdate_err: libc::c_int, + pub _l64a_buf: [::libc::c_char; 8usize], + pub _signal_buf: [::libc::c_char; 24usize], + pub _getdate_err: ::libc::c_int, pub _mbrlen_state: _mbstate_t, pub _mbrtowc_state: _mbstate_t, pub _mbsrtowcs_state: _mbstate_t, pub _wcrtomb_state: _mbstate_t, pub _wcsrtombs_state: _mbstate_t, - pub _h_errno: libc::c_int, + pub _h_errno: ::libc::c_int, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _reent__bindgen_ty_1__bindgen_ty_2 { - pub _nextf: [*mut libc::c_uchar; 30usize], - pub _nmalloc: [libc::c_uint; 30usize], + pub _nextf: [*mut ::libc::c_uchar; 30usize], + pub _nmalloc: [::libc::c_uint; 30usize], } extern "C" { pub static mut _impure_ptr: *mut _reent; @@ -7741,17 +7705,17 @@ extern "C" { } pub type locale_t = *mut __locale_t; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct tm { - pub tm_sec: libc::c_int, - pub tm_min: libc::c_int, - pub tm_hour: libc::c_int, - pub tm_mday: libc::c_int, - pub tm_mon: libc::c_int, - pub tm_year: libc::c_int, - pub tm_wday: libc::c_int, - pub tm_yday: libc::c_int, - pub tm_isdst: libc::c_int, + pub tm_sec: ::libc::c_int, + pub tm_min: ::libc::c_int, + pub tm_hour: ::libc::c_int, + pub tm_mday: ::libc::c_int, + pub tm_mon: ::libc::c_int, + pub tm_year: ::libc::c_int, + pub tm_wday: ::libc::c_int, + pub tm_yday: ::libc::c_int, + pub tm_isdst: ::libc::c_int, } extern "C" { pub fn clock() -> clock_t; @@ -7766,10 +7730,10 @@ extern "C" { pub fn time(_timer: *mut time_t) -> time_t; } extern "C" { - pub fn asctime(_tblock: *const tm) -> *mut libc::c_char; + pub fn asctime(_tblock: *const tm) -> *mut ::libc::c_char; } extern "C" { - pub fn ctime(_time: *const time_t) -> *mut libc::c_char; + pub fn ctime(_time: *const time_t) -> *mut ::libc::c_char; } extern "C" { pub fn gmtime(_timer: *const time_t) -> *mut tm; @@ -7779,26 +7743,26 @@ extern "C" { } extern "C" { pub fn strftime( - _s: *mut libc::c_char, + _s: *mut ::libc::c_char, _maxsize: usize, - _fmt: *const libc::c_char, + _fmt: *const ::libc::c_char, _t: *const tm, ) -> usize; } extern "C" { pub fn strftime_l( - _s: *mut libc::c_char, + _s: *mut ::libc::c_char, _maxsize: usize, - _fmt: *const libc::c_char, + _fmt: *const ::libc::c_char, _t: *const tm, _l: locale_t, ) -> usize; } extern "C" { - pub fn asctime_r(arg1: *const tm, arg2: *mut libc::c_char) -> *mut libc::c_char; + pub fn asctime_r(arg1: *const tm, arg2: *mut ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { - pub fn ctime_r(arg1: *const time_t, arg2: *mut libc::c_char) -> *mut libc::c_char; + pub fn ctime_r(arg1: *const time_t, arg2: *mut ::libc::c_char) -> *mut ::libc::c_char; } extern "C" { pub fn gmtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm; @@ -7813,22 +7777,22 @@ extern "C" { pub fn _tzset_r(arg1: *mut _reent); } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __tzrule_struct { - pub ch: libc::c_char, - pub m: libc::c_int, - pub n: libc::c_int, - pub d: libc::c_int, - pub s: libc::c_int, + pub ch: ::libc::c_char, + pub m: ::libc::c_int, + pub n: ::libc::c_int, + pub d: ::libc::c_int, + pub s: ::libc::c_int, pub change: time_t, - pub offset: libc::c_long, + pub offset: ::libc::c_long, } pub type __tzrule_type = __tzrule_struct; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __tzinfo_struct { - pub __tznorth: libc::c_int, - pub __tzyear: libc::c_int, + pub __tznorth: ::libc::c_int, + pub __tzyear: ::libc::c_int, pub __tzrule: [__tzrule_type; 2usize], } pub type __tzinfo_type = __tzinfo_struct; @@ -7836,169 +7800,181 @@ extern "C" { pub fn __gettzinfo() -> *mut __tzinfo_type; } extern "C" { - pub static mut _timezone: libc::c_long; + pub static mut _timezone: ::libc::c_long; } extern "C" { - pub static mut _daylight: libc::c_int; + pub static mut _daylight: ::libc::c_int; } extern "C" { - pub static mut _tzname: [*mut libc::c_char; 2usize]; + pub static mut _tzname: [*mut ::libc::c_char; 2usize]; } extern "C" { - pub fn utimes(__path: *const libc::c_char, __tvp: *const timeval) -> libc::c_int; + pub fn utimes(__path: *const ::libc::c_char, __tvp: *const timeval) -> ::libc::c_int; } extern "C" { - pub fn adjtime(arg1: *const timeval, arg2: *mut timeval) -> libc::c_int; + pub fn adjtime(arg1: *const timeval, arg2: *mut timeval) -> ::libc::c_int; } extern "C" { - pub fn futimes(arg1: libc::c_int, arg2: *const timeval) -> libc::c_int; + pub fn futimes(arg1: ::libc::c_int, arg2: *const timeval) -> ::libc::c_int; } extern "C" { - pub fn lutimes(arg1: *const libc::c_char, arg2: *const timeval) -> libc::c_int; + pub fn lutimes(arg1: *const ::libc::c_char, arg2: *const timeval) -> ::libc::c_int; } extern "C" { - pub fn settimeofday(arg1: *const timeval, arg2: *const timezone) -> libc::c_int; + pub fn settimeofday(arg1: *const timeval, arg2: *const timezone) -> ::libc::c_int; } extern "C" { - pub fn getitimer(__which: libc::c_int, __value: *mut itimerval) -> libc::c_int; + pub fn getitimer(__which: ::libc::c_int, __value: *mut itimerval) -> ::libc::c_int; } extern "C" { pub fn setitimer( - __which: libc::c_int, + __which: ::libc::c_int, __value: *const itimerval, __ovalue: *mut itimerval, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { - pub fn gettimeofday(__p: *mut timeval, __tz: *mut libc::c_void) -> libc::c_int; + pub fn gettimeofday(__p: *mut timeval, __tz: *mut ::libc::c_void) -> ::libc::c_int; } pub type socklen_t = u32; pub type sa_family_t = u16; #[repr(C)] +#[derive(Debug)] pub struct sockaddr { pub sa_family: sa_family_t, - pub sa_data: __IncompleteArrayField, + pub sa_data: __IncompleteArrayField<::libc::c_char>, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct sockaddr_storage { pub ss_family: sa_family_t, - pub __ss_padding: [libc::c_char; 26usize], + pub __ss_padding: [::libc::c_char; 26usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct linger { - pub l_onoff: libc::c_int, - pub l_linger: libc::c_int, + pub l_onoff: ::libc::c_int, + pub l_linger: ::libc::c_int, } extern "C" { - pub fn accept(sockfd: libc::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) - -> libc::c_int; + pub fn accept( + sockfd: ::libc::c_int, + addr: *mut sockaddr, + addrlen: *mut socklen_t, + ) -> ::libc::c_int; } extern "C" { - pub fn bind(sockfd: libc::c_int, addr: *const sockaddr, addrlen: socklen_t) -> libc::c_int; + pub fn bind(sockfd: ::libc::c_int, addr: *const sockaddr, addrlen: socklen_t) -> ::libc::c_int; } extern "C" { - pub fn closesocket(sockfd: libc::c_int) -> libc::c_int; + pub fn closesocket(sockfd: ::libc::c_int) -> ::libc::c_int; } extern "C" { - pub fn connect(sockfd: libc::c_int, addr: *const sockaddr, addrlen: socklen_t) -> libc::c_int; + pub fn connect( + sockfd: ::libc::c_int, + addr: *const sockaddr, + addrlen: socklen_t, + ) -> ::libc::c_int; } extern "C" { pub fn getpeername( - sockfd: libc::c_int, + sockfd: ::libc::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { pub fn getsockname( - sockfd: libc::c_int, + sockfd: ::libc::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { pub fn getsockopt( - sockfd: libc::c_int, - level: libc::c_int, - optname: libc::c_int, - optval: *mut libc::c_void, + sockfd: ::libc::c_int, + level: ::libc::c_int, + optname: ::libc::c_int, + optval: *mut ::libc::c_void, optlen: *mut socklen_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { - pub fn listen(sockfd: libc::c_int, backlog: libc::c_int) -> libc::c_int; + pub fn listen(sockfd: ::libc::c_int, backlog: ::libc::c_int) -> ::libc::c_int; } extern "C" { pub fn recv( - sockfd: libc::c_int, - buf: *mut libc::c_void, + sockfd: ::libc::c_int, + buf: *mut ::libc::c_void, len: usize, - flags: libc::c_int, + flags: ::libc::c_int, ) -> isize; } extern "C" { pub fn recvfrom( - sockfd: libc::c_int, - buf: *mut libc::c_void, + sockfd: ::libc::c_int, + buf: *mut ::libc::c_void, len: usize, - flags: libc::c_int, + flags: ::libc::c_int, src_addr: *mut sockaddr, addrlen: *mut socklen_t, ) -> isize; } extern "C" { pub fn send( - sockfd: libc::c_int, - buf: *const libc::c_void, + sockfd: ::libc::c_int, + buf: *const ::libc::c_void, len: usize, - flags: libc::c_int, + flags: ::libc::c_int, ) -> isize; } extern "C" { pub fn sendto( - sockfd: libc::c_int, - buf: *const libc::c_void, + sockfd: ::libc::c_int, + buf: *const ::libc::c_void, len: usize, - flags: libc::c_int, + flags: ::libc::c_int, dest_addr: *const sockaddr, addrlen: socklen_t, ) -> isize; } extern "C" { pub fn setsockopt( - sockfd: libc::c_int, - level: libc::c_int, - optname: libc::c_int, - optval: *const libc::c_void, + sockfd: ::libc::c_int, + level: ::libc::c_int, + optname: ::libc::c_int, + optval: *const ::libc::c_void, optlen: socklen_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { - pub fn shutdown(sockfd: libc::c_int, how: libc::c_int) -> libc::c_int; + pub fn shutdown(sockfd: ::libc::c_int, how: ::libc::c_int) -> ::libc::c_int; } extern "C" { - pub fn socket(domain: libc::c_int, type_: libc::c_int, protocol: libc::c_int) -> libc::c_int; + pub fn socket( + domain: ::libc::c_int, + type_: ::libc::c_int, + protocol: ::libc::c_int, + ) -> ::libc::c_int; } extern "C" { - pub fn sockatmark(sockfd: libc::c_int) -> libc::c_int; + pub fn sockatmark(sockfd: ::libc::c_int) -> ::libc::c_int; } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct in_addr { pub s_addr: in_addr_t, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct sockaddr_in { pub sin_family: sa_family_t, pub sin_port: in_port_t, pub sin_addr: in_addr, - pub sin_zero: [libc::c_uchar; 8usize], + pub sin_zero: [::libc::c_uchar; 8usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct ip_mreq { pub imr_multiaddr: in_addr, pub imr_interface: in_addr, @@ -8014,7 +7990,7 @@ pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866; pub const NETOPT_TCP_TABLE: NetworkOpt = 36867; pub const NETOPT_DNS_TABLE: NetworkOpt = 45059; pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153; -pub type NetworkOpt = libc::c_uint; +pub type NetworkOpt = u32; #[repr(C)] pub struct SOCU_ARPTableEntry { pub unk0: u32, @@ -8023,7 +7999,7 @@ pub struct SOCU_ARPTableEntry { pub padding: [u8; 2usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct SOCU_IPInfo { pub ip: in_addr, pub netmask: in_addr, @@ -8038,7 +8014,7 @@ pub struct SOCU_RoutingTableEntry { pub time: u64, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct SOCU_UDPTableEntry { pub local: sockaddr_storage, pub remote: sockaddr_storage, @@ -8062,45 +8038,45 @@ extern "C" { pub fn socExit() -> Result; } extern "C" { - pub fn gethostid() -> libc::c_long; + pub fn gethostid() -> ::libc::c_long; } extern "C" { - pub fn gethostname(name: *mut libc::c_char, namelen: usize) -> libc::c_int; + pub fn gethostname(name: *mut ::libc::c_char, namelen: usize) -> ::libc::c_int; } extern "C" { - pub fn SOCU_ShutdownSockets() -> libc::c_int; + pub fn SOCU_ShutdownSockets() -> ::libc::c_int; } extern "C" { - pub fn SOCU_CloseSockets() -> libc::c_int; + pub fn SOCU_CloseSockets() -> ::libc::c_int; } extern "C" { pub fn SOCU_GetNetworkOpt( - level: libc::c_int, + level: ::libc::c_int, optname: NetworkOpt, - optval: *mut libc::c_void, + optval: *mut ::libc::c_void, optlen: *mut socklen_t, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { pub fn SOCU_GetIPInfo( ip: *mut in_addr, netmask: *mut in_addr, broadcast: *mut in_addr, - ) -> libc::c_int; + ) -> ::libc::c_int; } extern "C" { - pub fn SOCU_AddGlobalSocket(sockfd: libc::c_int) -> libc::c_int; + pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int; } pub const MICU_ENCODING_PCM8: MICU_Encoding = 0; pub const MICU_ENCODING_PCM16: MICU_Encoding = 1; pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2; pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3; -pub type MICU_Encoding = libc::c_uint; +pub type MICU_Encoding = u32; pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0; pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1; pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2; pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3; -pub type MICU_SampleRate = libc::c_uint; +pub type MICU_SampleRate = u32; extern "C" { pub fn micInit(buffer: *mut u8, bufferSize: u32) -> Result; } @@ -8163,14 +8139,14 @@ extern "C" { } pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0; pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1; -pub type MVDSTD_Mode = libc::c_uint; +pub type MVDSTD_Mode = u32; pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537; pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073; -pub type MVDSTD_InputFormat = libc::c_uint; +pub type MVDSTD_InputFormat = u32; pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537; pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146; pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148; -pub type MVDSTD_OutputFormat = libc::c_uint; +pub type MVDSTD_OutputFormat = u32; #[repr(C)] pub struct MVDSTD_Config { pub input_type: MVDSTD_InputFormat, @@ -8210,10 +8186,10 @@ pub struct MVDSTD_ProcessNALUnitOut { pub remaining_size: u32, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct MVDSTD_OutputBuffersEntry { - pub outdata0: *mut libc::c_void, - pub outdata1: *mut libc::c_void, + pub outdata0: *mut ::libc::c_void, + pub outdata1: *mut ::libc::c_void, } #[repr(C)] pub struct MVDSTD_OutputBuffersEntryList { @@ -8257,7 +8233,7 @@ extern "C" { } extern "C" { pub fn mvdstdProcessVideoFrame( - inbuf_vaddr: *mut libc::c_void, + inbuf_vaddr: *mut ::libc::c_void, size: usize, flag: u32, out: *mut MVDSTD_ProcessNALUnitOut, @@ -8277,26 +8253,26 @@ extern "C" { } extern "C" { pub fn mvdstdOverrideOutputBuffers( - cur_outdata0: *mut libc::c_void, - cur_outdata1: *mut libc::c_void, - new_outdata0: *mut libc::c_void, - new_outdata1: *mut libc::c_void, + cur_outdata0: *mut ::libc::c_void, + cur_outdata1: *mut ::libc::c_void, + new_outdata0: *mut ::libc::c_void, + new_outdata1: *mut ::libc::c_void, ) -> Result; } pub const NFC_OpType_1: NFC_OpType = 1; pub const NFC_OpType_NFCTag: NFC_OpType = 2; pub const NFC_OpType_RawNFC: NFC_OpType = 3; -pub type NFC_OpType = libc::c_uint; +pub type NFC_OpType = u32; pub const NFC_TagState_Uninitialized: NFC_TagState = 0; pub const NFC_TagState_ScanningStopped: NFC_TagState = 1; pub const NFC_TagState_Scanning: NFC_TagState = 2; pub const NFC_TagState_InRange: NFC_TagState = 3; pub const NFC_TagState_OutOfRange: NFC_TagState = 4; pub const NFC_TagState_DataReady: NFC_TagState = 5; -pub type NFC_TagState = libc::c_uint; +pub type NFC_TagState = u32; pub const NFC_amiiboFlag_Setup: _bindgen_ty_24 = 16; pub const NFC_amiiboFlag_AppDataSetup: _bindgen_ty_24 = 32; -pub type _bindgen_ty_24 = libc::c_uint; +pub type _bindgen_ty_24 = u32; #[repr(C)] pub struct NFC_TagInfo { pub id_offset_size: u16, @@ -8376,16 +8352,16 @@ extern "C" { extern "C" { pub fn nfcInitializeWriteAppData( amiibo_appid: u32, - buf: *const libc::c_void, + buf: *const ::libc::c_void, size: usize, ) -> Result; } extern "C" { - pub fn nfcReadAppData(buf: *mut libc::c_void, size: usize) -> Result; + pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: usize) -> Result; } extern "C" { pub fn nfcWriteAppData( - buf: *const libc::c_void, + buf: *const ::libc::c_void, size: usize, taginfo: *mut NFC_TagInfo, ) -> Result; @@ -8401,9 +8377,9 @@ extern "C" { } extern "C" { pub fn nfcSendTagCommand( - inbuf: *const libc::c_void, + inbuf: *const ::libc::c_void, insize: usize, - outbuf: *mut libc::c_void, + outbuf: *mut ::libc::c_void, outsize: usize, actual_transfer_size: *mut usize, microseconds: u64, @@ -8442,7 +8418,7 @@ extern "C" { titleLength: u32, message: *const u16, messageLength: u32, - imageData: *const libc::c_void, + imageData: *const ::libc::c_void, imageSize: u32, jpeg: bool, ) -> Result; @@ -8465,19 +8441,19 @@ extern "C" { extern "C" { pub fn NEWS_SetNotificationImage( news_id: u32, - buffer: *const libc::c_void, + buffer: *const ::libc::c_void, size: u32, ) -> Result; } extern "C" { pub fn NEWS_GetNotificationImage( news_id: u32, - buffer: *mut libc::c_void, + buffer: *mut ::libc::c_void, size: *mut u32, ) -> Result; } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct QTM_HeadTrackingInfoCoord { pub x: f32, pub y: f32, @@ -8533,7 +8509,7 @@ extern "C" { pub fn SRVPM_RegisterProcess( pid: u32, count: u32, - serviceAccessControlList: *mut [libc::c_char; 8usize], + serviceAccessControlList: *const [::libc::c_char; 8usize], ) -> Result; } extern "C" { @@ -8563,6 +8539,13 @@ extern "C" { extern "C" { pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64) -> Result; } +pub const LED_NORMAL: powerLedState = 1; +pub const LED_SLEEP_MODE: powerLedState = 2; +pub const LED_OFF: powerLedState = 3; +pub const LED_RED: powerLedState = 4; +pub const LED_BLUE: powerLedState = 5; +pub const LED_BLINK_RED: powerLedState = 6; +pub type powerLedState = u32; extern "C" { pub fn mcuHwcInit() -> Result; } @@ -8570,19 +8553,34 @@ extern "C" { pub fn mcuHwcExit(); } extern "C" { - pub fn mcuHwcReadRegister(reg: u8, data: *mut libc::c_void, size: u32) -> Result; + pub fn MCUHWC_ReadRegister(reg: u8, data: *mut ::libc::c_void, size: u32) -> Result; +} +extern "C" { + pub fn MCUHWC_WriteRegister(reg: u8, data: *const ::libc::c_void, size: u32) -> Result; } extern "C" { - pub fn mcuHwcWriteRegister(reg: u8, data: *const libc::c_void, size: u32) -> Result; + pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8) -> Result; } extern "C" { - pub fn mcuHwcGetBatteryVoltage(voltage: *mut u8) -> Result; + pub fn MCUHWC_GetBatteryLevel(level: *mut u8) -> Result; } extern "C" { - pub fn mcuHwcGetBatteryLevel(level: *mut u8) -> Result; + pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8) -> Result; } extern "C" { - pub fn mcuHwcGetSoundSliderLevel(level: *mut u8) -> Result; + pub fn MCUHWC_SetWifiLedState(state: bool) -> Result; +} +extern "C" { + pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result; +} +extern "C" { + pub fn MCUHWC_Get3dSliderLevel(level: *mut u8) -> Result; +} +extern "C" { + pub fn MCUHWC_GetFwVerHigh(out: *mut u8) -> Result; +} +extern "C" { + pub fn MCUHWC_GetFwVerLow(out: *mut u8) -> Result; } extern "C" { pub fn hbInit() -> Result; @@ -8595,8 +8593,8 @@ extern "C" { } extern "C" { pub fn HB_GetBootloaderAddresses( - load3dsx: *mut *mut libc::c_void, - setArgv: *mut *mut libc::c_void, + load3dsx: *mut *mut ::libc::c_void, + setArgv: *mut *mut ::libc::c_void, ) -> Result; } extern "C" { @@ -8612,17 +8610,17 @@ pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1; pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2; pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3; pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4; -pub type GX_TRANSFER_FORMAT = libc::c_uint; +pub type GX_TRANSFER_FORMAT = u32; pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0; pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1; pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2; -pub type GX_TRANSFER_SCALE = libc::c_uint; +pub type GX_TRANSFER_SCALE = u32; pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1; pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2; pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0; pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256; pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512; -pub type GX_FILL_CONTROL = libc::c_uint; +pub type GX_FILL_CONTROL = u32; extern "C" { pub static mut gxCmdBuf: *mut u32; } @@ -8648,7 +8646,7 @@ pub struct tag_gxCmdQueue_s { pub curEntry: u16, pub lastEntry: u16, pub callback: ::core::option::Option, - pub user: *mut libc::c_void, + pub user: *mut ::libc::c_void, } pub type gxCmdQueue_s = tag_gxCmdQueue_s; extern "C" { @@ -8718,23 +8716,23 @@ extern "C" { } pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0; pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1; -pub type GPU_TEXTURE_FILTER_PARAM = libc::c_uint; +pub type GPU_TEXTURE_FILTER_PARAM = u32; pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0; pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1; pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2; pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3; -pub type GPU_TEXTURE_WRAP_PARAM = libc::c_uint; +pub type GPU_TEXTURE_WRAP_PARAM = u32; pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0; pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1; pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2; pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3; pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4; pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5; -pub type GPU_TEXTURE_MODE_PARAM = libc::c_uint; +pub type GPU_TEXTURE_MODE_PARAM = u32; pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1; pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2; pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4; -pub type GPU_TEXUNIT = libc::c_uint; +pub type GPU_TEXUNIT = u32; pub const GPU_RGBA8: GPU_TEXCOLOR = 0; pub const GPU_RGB8: GPU_TEXCOLOR = 1; pub const GPU_RGBA5551: GPU_TEXCOLOR = 2; @@ -8749,7 +8747,7 @@ pub const GPU_L4: GPU_TEXCOLOR = 10; pub const GPU_A4: GPU_TEXCOLOR = 11; pub const GPU_ETC1: GPU_TEXCOLOR = 12; pub const GPU_ETC1A4: GPU_TEXCOLOR = 13; -pub type GPU_TEXCOLOR = libc::c_uint; +pub type GPU_TEXCOLOR = u32; pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0; pub const GPU_POSITIVE_X: GPU_TEXFACE = 0; pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1; @@ -8757,13 +8755,13 @@ pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2; pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3; pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4; pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5; -pub type GPU_TEXFACE = libc::c_uint; +pub type GPU_TEXFACE = u32; pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0; pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1; pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2; pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3; pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4; -pub type GPU_PROCTEX_CLAMP = libc::c_uint; +pub type GPU_PROCTEX_CLAMP = u32; pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0; pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1; pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2; @@ -8774,34 +8772,34 @@ pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6; pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7; pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8; pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9; -pub type GPU_PROCTEX_MAPFUNC = libc::c_uint; +pub type GPU_PROCTEX_MAPFUNC = u32; pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0; pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1; pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2; -pub type GPU_PROCTEX_SHIFT = libc::c_uint; +pub type GPU_PROCTEX_SHIFT = u32; pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0; pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1; pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2; pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3; pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4; pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5; -pub type GPU_PROCTEX_FILTER = libc::c_uint; +pub type GPU_PROCTEX_FILTER = u32; pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0; pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2; pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3; pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4; pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5; -pub type GPU_PROCTEX_LUTID = libc::c_uint; +pub type GPU_PROCTEX_LUTID = u32; pub const GPU_RB_RGBA8: GPU_COLORBUF = 0; pub const GPU_RB_RGB8: GPU_COLORBUF = 1; pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2; pub const GPU_RB_RGB565: GPU_COLORBUF = 3; pub const GPU_RB_RGBA4: GPU_COLORBUF = 4; -pub type GPU_COLORBUF = libc::c_uint; +pub type GPU_COLORBUF = u32; pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0; pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2; pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3; -pub type GPU_DEPTHBUF = libc::c_uint; +pub type GPU_DEPTHBUF = u32; pub const GPU_NEVER: GPU_TESTFUNC = 0; pub const GPU_ALWAYS: GPU_TESTFUNC = 1; pub const GPU_EQUAL: GPU_TESTFUNC = 2; @@ -8810,16 +8808,16 @@ pub const GPU_LESS: GPU_TESTFUNC = 4; pub const GPU_LEQUAL: GPU_TESTFUNC = 5; pub const GPU_GREATER: GPU_TESTFUNC = 6; pub const GPU_GEQUAL: GPU_TESTFUNC = 7; -pub type GPU_TESTFUNC = libc::c_uint; +pub type GPU_TESTFUNC = u32; pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0; pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1; pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2; pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3; -pub type GPU_EARLYDEPTHFUNC = libc::c_uint; +pub type GPU_EARLYDEPTHFUNC = u32; pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0; pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1; pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3; -pub type GPU_SCISSORMODE = libc::c_uint; +pub type GPU_SCISSORMODE = u32; pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0; pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1; pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2; @@ -8828,7 +8826,7 @@ pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4; pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5; pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6; pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7; -pub type GPU_STENCILOP = libc::c_uint; +pub type GPU_STENCILOP = u32; pub const GPU_WRITE_RED: GPU_WRITEMASK = 1; pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2; pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4; @@ -8836,13 +8834,13 @@ pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8; pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16; pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15; pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31; -pub type GPU_WRITEMASK = libc::c_uint; +pub type GPU_WRITEMASK = u32; pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0; pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1; pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2; pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3; pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4; -pub type GPU_BLENDEQUATION = libc::c_uint; +pub type GPU_BLENDEQUATION = u32; pub const GPU_ZERO: GPU_BLENDFACTOR = 0; pub const GPU_ONE: GPU_BLENDFACTOR = 1; pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2; @@ -8858,7 +8856,7 @@ pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11; pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12; pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13; pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14; -pub type GPU_BLENDFACTOR = libc::c_uint; +pub type GPU_BLENDFACTOR = u32; pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0; pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1; pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2; @@ -8875,20 +8873,20 @@ pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12; pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13; pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14; pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15; -pub type GPU_LOGICOP = libc::c_uint; +pub type GPU_LOGICOP = u32; pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0; pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1; pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3; -pub type GPU_FRAGOPMODE = libc::c_uint; +pub type GPU_FRAGOPMODE = u32; pub const GPU_BYTE: GPU_FORMATS = 0; pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1; pub const GPU_SHORT: GPU_FORMATS = 2; pub const GPU_FLOAT: GPU_FORMATS = 3; -pub type GPU_FORMATS = libc::c_uint; +pub type GPU_FORMATS = u32; pub const GPU_CULL_NONE: GPU_CULLMODE = 0; pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1; pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2; -pub type GPU_CULLMODE = libc::c_uint; +pub type GPU_CULLMODE = u32; pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0; pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1; pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2; @@ -8899,7 +8897,7 @@ pub const GPU_TEXTURE3: GPU_TEVSRC = 6; pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13; pub const GPU_CONSTANT: GPU_TEVSRC = 14; pub const GPU_PREVIOUS: GPU_TEVSRC = 15; -pub type GPU_TEVSRC = libc::c_uint; +pub type GPU_TEVSRC = u32; pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0; pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1; pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2; @@ -8916,7 +8914,7 @@ pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12; pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13; pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14; pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15; -pub type GPU_TEVOP_RGB = libc::c_uint; +pub type GPU_TEVOP_RGB = u32; pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0; pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1; pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2; @@ -8925,7 +8923,7 @@ pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4; pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5; pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6; pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7; -pub type GPU_TEVOP_A = libc::c_uint; +pub type GPU_TEVOP_A = u32; pub const GPU_REPLACE: GPU_COMBINEFUNC = 0; pub const GPU_MODULATE: GPU_COMBINEFUNC = 1; pub const GPU_ADD: GPU_COMBINEFUNC = 2; @@ -8935,20 +8933,20 @@ pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5; pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6; pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8; pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9; -pub type GPU_COMBINEFUNC = libc::c_uint; +pub type GPU_COMBINEFUNC = u32; pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0; pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1; pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2; -pub type GPU_TEVSCALE = libc::c_uint; +pub type GPU_TEVSCALE = u32; pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0; pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1; pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2; pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3; -pub type GPU_FRESNELSEL = libc::c_uint; +pub type GPU_FRESNELSEL = u32; pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0; pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1; pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2; -pub type GPU_BUMPMODE = libc::c_uint; +pub type GPU_BUMPMODE = u32; pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0; pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1; pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2; @@ -8957,43 +8955,43 @@ pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4; pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5; pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6; pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7; -pub type GPU_LIGHTLUTID = libc::c_uint; +pub type GPU_LIGHTLUTID = u32; pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0; pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1; pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2; pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3; pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4; pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5; -pub type GPU_LIGHTLUTINPUT = libc::c_uint; +pub type GPU_LIGHTLUTINPUT = u32; pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0; pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1; pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2; pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3; pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6; pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7; -pub type GPU_LIGHTLUTSCALER = libc::c_uint; +pub type GPU_LIGHTLUTSCALER = u32; pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0; pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1; pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2; -pub type GPU_LIGHTLUTSELECT = libc::c_uint; +pub type GPU_LIGHTLUTSELECT = u32; pub const GPU_NO_FOG: GPU_FOGMODE = 0; pub const GPU_FOG: GPU_FOGMODE = 5; pub const GPU_GAS: GPU_FOGMODE = 7; -pub type GPU_FOGMODE = libc::c_uint; +pub type GPU_FOGMODE = u32; pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0; pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1; -pub type GPU_GASMODE = libc::c_uint; +pub type GPU_GASMODE = u32; pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0; pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1; -pub type GPU_GASLUTINPUT = libc::c_uint; +pub type GPU_GASLUTINPUT = u32; pub const GPU_TRIANGLES: GPU_Primitive_t = 0; pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256; pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512; pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768; -pub type GPU_Primitive_t = libc::c_uint; +pub type GPU_Primitive_t = u32; pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0; pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1; -pub type GPU_SHADER_TYPE = libc::c_uint; +pub type GPU_SHADER_TYPE = u32; extern "C" { pub static mut gpuCmdBuf: *mut u32; } @@ -9026,11 +9024,11 @@ extern "C" { } pub const VERTEX_SHDR: DVLE_type = 0; pub const GEOMETRY_SHDR: DVLE_type = 1; -pub type DVLE_type = libc::c_uint; +pub type DVLE_type = u32; pub const DVLE_CONST_BOOL: DVLE_constantType = 0; pub const DVLE_CONST_u8: DVLE_constantType = 1; pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2; -pub type DVLE_constantType = libc::c_uint; +pub type DVLE_constantType = u32; pub const RESULT_POSITION: DVLE_outputAttribute_t = 0; pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1; pub const RESULT_COLOR: DVLE_outputAttribute_t = 2; @@ -9040,11 +9038,11 @@ pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5; pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6; pub const RESULT_VIEW: DVLE_outputAttribute_t = 8; pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9; -pub type DVLE_outputAttribute_t = libc::c_uint; +pub type DVLE_outputAttribute_t = u32; pub const GSH_POINT: DVLE_geoShaderMode = 0; pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1; pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2; -pub type DVLE_geoShaderMode = libc::c_uint; +pub type DVLE_geoShaderMode = u32; #[repr(C)] pub struct DVLP_s { pub codeSize: u32, @@ -9088,7 +9086,7 @@ pub struct DVLE_s { pub outTableData: *mut DVLE_outEntry_s, pub uniformTableSize: u32, pub uniformTableData: *mut DVLE_uniformEntry_s, - pub symbolTableData: *mut libc::c_char, + pub symbolTableData: *mut ::libc::c_char, pub outmapMask: u8, pub outmapData: [u32; 8usize], pub outmapMode: u32, @@ -9107,7 +9105,7 @@ extern "C" { pub fn DVLB_Free(dvlb: *mut DVLB_s); } extern "C" { - pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const libc::c_char) -> s8; + pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8; } extern "C" { pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s); @@ -9141,20 +9139,23 @@ extern "C" { pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result; } extern "C" { - pub fn shaderInstanceSetBool(si: *mut shaderInstance_s, id: libc::c_int, value: bool) - -> Result; + pub fn shaderInstanceSetBool( + si: *mut shaderInstance_s, + id: ::libc::c_int, + value: bool, + ) -> Result; } extern "C" { pub fn shaderInstanceGetBool( si: *mut shaderInstance_s, - id: libc::c_int, + id: ::libc::c_int, value: *mut bool, ) -> Result; } extern "C" { pub fn shaderInstanceGetUniformLocation( si: *mut shaderInstance_s, - name: *const libc::c_char, + name: *const ::libc::c_char, ) -> s8; } extern "C" { @@ -9188,14 +9189,14 @@ extern "C" { pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0; pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1; pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2; -pub type ndspOutputMode = libc::c_uint; +pub type ndspOutputMode = u32; pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0; pub const NDSP_CLIP_SOFT: ndspClippingMode = 1; -pub type ndspClippingMode = libc::c_uint; +pub type ndspClippingMode = u32; pub const NDSP_SPKPOS_SQUARE: ndspSpeakerPos = 0; pub const NDSP_SPKPOS_WIDE: ndspSpeakerPos = 1; pub const NDSP_SPKPOS_NUM: ndspSpeakerPos = 2; -pub type ndspSpeakerPos = libc::c_uint; +pub type ndspSpeakerPos = u32; #[repr(C)] pub struct ndspAdpcmData { pub index: u16, @@ -9207,7 +9208,7 @@ pub const NDSP_WBUF_FREE: _bindgen_ty_25 = 0; pub const NDSP_WBUF_QUEUED: _bindgen_ty_25 = 1; pub const NDSP_WBUF_PLAYING: _bindgen_ty_25 = 2; pub const NDSP_WBUF_DONE: _bindgen_ty_25 = 3; -pub type _bindgen_ty_25 = libc::c_uint; +pub type _bindgen_ty_25 = u32; #[repr(C)] pub struct tag_ndspWaveBuf { pub __bindgen_anon_1: tag_ndspWaveBuf__bindgen_ty_1, @@ -9225,19 +9226,19 @@ pub union tag_ndspWaveBuf__bindgen_ty_1 { pub data_pcm8: *mut s8, pub data_pcm16: *mut s16, pub data_adpcm: *mut u8, - pub data_vaddr: *const libc::c_void, + pub data_vaddr: *const ::libc::c_void, _bindgen_union_align: u32, } -pub type ndspCallback = ::core::option::Option; +pub type ndspCallback = ::core::option::Option; pub type ndspAuxCallback = ::core::option::Option< unsafe extern "C" fn( - data: *mut libc::c_void, - nsamples: libc::c_int, - samples: *mut *mut libc::c_void, + data: *mut ::libc::c_void, + nsamples: ::libc::c_int, + samples: *mut *mut ::libc::c_void, ), >; extern "C" { - pub fn ndspUseComponent(binary: *const libc::c_void, size: u32, progMask: u16, dataMask: u16); + pub fn ndspUseComponent(binary: *const ::libc::c_void, size: u32, progMask: u16, dataMask: u16); } extern "C" { pub fn ndspInit() -> Result; @@ -9261,13 +9262,13 @@ extern "C" { pub fn ndspSetClippingMode(mode: ndspClippingMode); } extern "C" { - pub fn ndspSetOutputCount(count: libc::c_int); + pub fn ndspSetOutputCount(count: ::libc::c_int); } extern "C" { pub fn ndspSetCapture(capture: *mut ndspWaveBuf); } extern "C" { - pub fn ndspSetCallback(callback: ndspCallback, data: *mut libc::c_void); + pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void); } extern "C" { pub fn ndspSurroundSetDepth(depth: u16); @@ -9279,21 +9280,25 @@ extern "C" { pub fn ndspSurroundSetRearRatio(ratio: u16); } extern "C" { - pub fn ndspAuxSetEnable(id: libc::c_int, enable: bool); + pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - pub fn ndspAuxSetFrontBypass(id: libc::c_int, bypass: bool); + pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool); } extern "C" { - pub fn ndspAuxSetVolume(id: libc::c_int, volume: f32); + pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32); } extern "C" { - pub fn ndspAuxSetCallback(id: libc::c_int, callback: ndspAuxCallback, data: *mut libc::c_void); + pub fn ndspAuxSetCallback( + id: ::libc::c_int, + callback: ndspAuxCallback, + data: *mut ::libc::c_void, + ); } pub const NDSP_ENCODING_PCM8: _bindgen_ty_26 = 0; pub const NDSP_ENCODING_PCM16: _bindgen_ty_26 = 1; pub const NDSP_ENCODING_ADPCM: _bindgen_ty_26 = 2; -pub type _bindgen_ty_26 = libc::c_uint; +pub type _bindgen_ty_26 = u32; pub const NDSP_FORMAT_MONO_PCM8: _bindgen_ty_27 = 1; pub const NDSP_FORMAT_MONO_PCM16: _bindgen_ty_27 = 5; pub const NDSP_FORMAT_MONO_ADPCM: _bindgen_ty_27 = 9; @@ -9304,71 +9309,76 @@ pub const NDSP_FORMAT_PCM16: _bindgen_ty_27 = 5; pub const NDSP_FORMAT_ADPCM: _bindgen_ty_27 = 9; pub const NDSP_FRONT_BYPASS: _bindgen_ty_27 = 16; pub const NDSP_3D_SURROUND_PREPROCESSED: _bindgen_ty_27 = 64; -pub type _bindgen_ty_27 = libc::c_uint; +pub type _bindgen_ty_27 = u32; pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0; pub const NDSP_INTERP_LINEAR: ndspInterpType = 1; pub const NDSP_INTERP_NONE: ndspInterpType = 2; -pub type ndspInterpType = libc::c_uint; +pub type ndspInterpType = u32; extern "C" { - pub fn ndspChnReset(id: libc::c_int); + pub fn ndspChnReset(id: ::libc::c_int); } extern "C" { - pub fn ndspChnInitParams(id: libc::c_int); + pub fn ndspChnInitParams(id: ::libc::c_int); } extern "C" { - pub fn ndspChnIsPlaying(id: libc::c_int) -> bool; + pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool; } extern "C" { - pub fn ndspChnGetSamplePos(id: libc::c_int) -> u32; + pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32; } extern "C" { - pub fn ndspChnGetWaveBufSeq(id: libc::c_int) -> u16; + pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16; } extern "C" { - pub fn ndspChnIsPaused(id: libc::c_int) -> bool; + pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool; } extern "C" { - pub fn ndspChnSetPaused(id: libc::c_int, paused: bool); + pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool); } extern "C" { - pub fn ndspChnSetFormat(id: libc::c_int, format: u16); + pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16); } extern "C" { - pub fn ndspChnSetInterp(id: libc::c_int, type_: ndspInterpType); + pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType); } extern "C" { - pub fn ndspChnSetRate(id: libc::c_int, rate: f32); + pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32); } extern "C" { - pub fn ndspChnSetMix(id: libc::c_int, mix: *mut f32); + pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32); } extern "C" { - pub fn ndspChnSetAdpcmCoefs(id: libc::c_int, coefs: *mut u16); + pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16); } extern "C" { - pub fn ndspChnWaveBufClear(id: libc::c_int); + pub fn ndspChnWaveBufClear(id: ::libc::c_int); } extern "C" { - pub fn ndspChnWaveBufAdd(id: libc::c_int, buf: *mut ndspWaveBuf); + pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf); } extern "C" { - pub fn ndspChnIirMonoSetEnable(id: libc::c_int, enable: bool); + pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { - pub fn ndspChnIirMonoSetParamsCustomFilter(id: libc::c_int, a0: f32, a1: f32, b0: f32) -> bool; + pub fn ndspChnIirMonoSetParamsCustomFilter( + id: ::libc::c_int, + a0: f32, + a1: f32, + b0: f32, + ) -> bool; } extern "C" { - pub fn ndspChnIirMonoSetParamsLowPassFilter(id: libc::c_int, f0: f32) -> bool; + pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - pub fn ndspChnIirMonoSetParamsHighPassFilter(id: libc::c_int, f0: f32) -> bool; + pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool; } extern "C" { - pub fn ndspChnIirBiquadSetEnable(id: libc::c_int, enable: bool); + pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool); } extern "C" { pub fn ndspChnIirBiquadSetParamsCustomFilter( - id: libc::c_int, + id: ::libc::c_int, a0: f32, a1: f32, a2: f32, @@ -9378,20 +9388,20 @@ extern "C" { ) -> bool; } extern "C" { - pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: libc::c_int, f0: f32, Q: f32) -> bool; + pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: libc::c_int, f0: f32, Q: f32) -> bool; + pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: libc::c_int, f0: f32, Q: f32) -> bool; + pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { - pub fn ndspChnIirBiquadSetParamsNotchFilter(id: libc::c_int, f0: f32, Q: f32) -> bool; + pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool; } extern "C" { pub fn ndspChnIirBiquadSetParamsPeakingEqualizer( - id: libc::c_int, + id: ::libc::c_int, f0: f32, Q: f32, gain: f32, @@ -9401,31 +9411,31 @@ pub const SWKBD_TYPE_NORMAL: SwkbdType = 0; pub const SWKBD_TYPE_QWERTY: SwkbdType = 1; pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2; pub const SWKBD_TYPE_WESTERN: SwkbdType = 3; -pub type SwkbdType = libc::c_uint; +pub type SwkbdType = u32; pub const SWKBD_ANYTHING: SwkbdValidInput = 0; pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1; pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2; pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2; pub const SWKBD_NOTBLANK: SwkbdValidInput = 3; pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4; -pub type SwkbdValidInput = libc::c_uint; +pub type SwkbdValidInput = u32; pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0; pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1; pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2; pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2; pub const SWKBD_BUTTON_NONE: SwkbdButton = 3; -pub type SwkbdButton = libc::c_uint; +pub type SwkbdButton = u32; pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0; pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1; pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2; -pub type SwkbdPasswordMode = libc::c_uint; +pub type SwkbdPasswordMode = u32; pub const SWKBD_FILTER_DIGITS: _bindgen_ty_28 = 1; pub const SWKBD_FILTER_AT: _bindgen_ty_28 = 2; pub const SWKBD_FILTER_PERCENT: _bindgen_ty_28 = 4; pub const SWKBD_FILTER_BACKSLASH: _bindgen_ty_28 = 8; pub const SWKBD_FILTER_PROFANITY: _bindgen_ty_28 = 16; pub const SWKBD_FILTER_CALLBACK: _bindgen_ty_28 = 32; -pub type _bindgen_ty_28 = libc::c_uint; +pub type _bindgen_ty_28 = u32; pub const SWKBD_PARENTAL: _bindgen_ty_29 = 1; pub const SWKBD_DARKEN_TOP_SCREEN: _bindgen_ty_29 = 2; pub const SWKBD_PREDICTIVE_INPUT: _bindgen_ty_29 = 4; @@ -9435,11 +9445,11 @@ pub const SWKBD_ALLOW_HOME: _bindgen_ty_29 = 32; pub const SWKBD_ALLOW_RESET: _bindgen_ty_29 = 64; pub const SWKBD_ALLOW_POWER: _bindgen_ty_29 = 128; pub const SWKBD_DEFAULT_QWERTY: _bindgen_ty_29 = 512; -pub type _bindgen_ty_29 = libc::c_uint; +pub type _bindgen_ty_29 = u32; pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0; pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1; pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2; -pub type SwkbdCallbackResult = libc::c_uint; +pub type SwkbdCallbackResult = u32; pub const SWKBD_NONE: SwkbdResult = -1; pub const SWKBD_INVALID_INPUT: SwkbdResult = -2; pub const SWKBD_OUTOFMEM: SwkbdResult = -3; @@ -9455,7 +9465,7 @@ pub const SWKBD_POWERPRESSED: SwkbdResult = 12; pub const SWKBD_PARENTAL_OK: SwkbdResult = 20; pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21; pub const SWKBD_BANNED_INPUT: SwkbdResult = 30; -pub type SwkbdResult = libc::c_int; +pub type SwkbdResult = i32; #[repr(C)] pub struct SwkbdDictWord { pub reading: [u16; 41usize], @@ -9465,9 +9475,9 @@ pub struct SwkbdDictWord { } pub type SwkbdCallbackFn = ::core::option::Option< unsafe extern "C" fn( - user: *mut libc::c_void, - ppMessage: *mut *const libc::c_char, - text: *const libc::c_char, + user: *mut ::libc::c_void, + ppMessage: *mut *const ::libc::c_char, + text: *const ::libc::c_char, textlen: usize, ) -> SwkbdCallbackResult, >; @@ -9480,23 +9490,23 @@ pub struct SwkbdLearningData { pub data: [u32; 10523usize], } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct SwkbdExtra { - pub initial_text: *const libc::c_char, + pub initial_text: *const ::libc::c_char, pub dict: *const SwkbdDictWord, pub status_data: *mut SwkbdStatusData, pub learning_data: *mut SwkbdLearningData, pub callback: SwkbdCallbackFn, - pub callback_user: *mut libc::c_void, + pub callback_user: *mut ::libc::c_void, } #[repr(C)] pub struct SwkbdState { - pub type_: libc::c_int, - pub num_buttons_m1: libc::c_int, - pub valid_input: libc::c_int, - pub password_mode: libc::c_int, - pub is_parental_screen: libc::c_int, - pub darken_top_screen: libc::c_int, + pub type_: ::libc::c_int, + pub num_buttons_m1: ::libc::c_int, + pub valid_input: ::libc::c_int, + pub password_mode: ::libc::c_int, + pub is_parental_screen: ::libc::c_int, + pub darken_top_screen: ::libc::c_int, pub filter_flags: u32, pub save_state_flags: u32, pub max_text_len: u16, @@ -9515,18 +9525,18 @@ pub struct SwkbdState { pub default_qwerty: bool, pub button_submits_text: [bool; 4usize], pub language: u16, - pub initial_text_offset: libc::c_int, - pub dict_offset: libc::c_int, - pub initial_status_offset: libc::c_int, - pub initial_learning_offset: libc::c_int, + pub initial_text_offset: ::libc::c_int, + pub dict_offset: ::libc::c_int, + pub initial_status_offset: ::libc::c_int, + pub initial_learning_offset: ::libc::c_int, pub shared_memory_size: usize, pub version: u32, pub result: SwkbdResult, - pub status_offset: libc::c_int, - pub learning_offset: libc::c_int, - pub text_offset: libc::c_int, + pub status_offset: ::libc::c_int, + pub learning_offset: ::libc::c_int, + pub text_offset: ::libc::c_int, pub text_length: u16, - pub callback_result: libc::c_int, + pub callback_result: ::libc::c_int, pub callback_msg: [u16; 257usize], pub skip_at_check: bool, pub __bindgen_anon_1: SwkbdState__bindgen_ty_1, @@ -9541,39 +9551,39 @@ extern "C" { pub fn swkbdInit( swkbd: *mut SwkbdState, type_: SwkbdType, - numButtons: libc::c_int, - maxTextLength: libc::c_int, + numButtons: ::libc::c_int, + maxTextLength: ::libc::c_int, ); } extern "C" { pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32); } extern "C" { - pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const libc::c_char); + pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { pub fn swkbdSetButton( swkbd: *mut SwkbdState, button: SwkbdButton, - text: *const libc::c_char, + text: *const ::libc::c_char, submit: bool, ); } extern "C" { - pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const libc::c_char); + pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char); } extern "C" { pub fn swkbdSetDictWord( word: *mut SwkbdDictWord, - reading: *const libc::c_char, - text: *const libc::c_char, + reading: *const ::libc::c_char, + text: *const ::libc::c_char, ); } extern "C" { pub fn swkbdSetDictionary( swkbd: *mut SwkbdState, dict: *const SwkbdDictWord, - wordCount: libc::c_int, + wordCount: ::libc::c_int, ); } extern "C" { @@ -9596,19 +9606,19 @@ extern "C" { pub fn swkbdSetFilterCallback( swkbd: *mut SwkbdState, callback: SwkbdCallbackFn, - user: *mut libc::c_void, + user: *mut ::libc::c_void, ); } extern "C" { pub fn swkbdInputText( swkbd: *mut SwkbdState, - buf: *mut libc::c_char, + buf: *mut ::libc::c_char, bufsize: usize, ) -> SwkbdButton; } pub const ERROR_LANGUAGE_FLAG: _bindgen_ty_30 = 256; pub const ERROR_WORD_WRAP_FLAG: _bindgen_ty_30 = 512; -pub type _bindgen_ty_30 = libc::c_uint; +pub type _bindgen_ty_30 = u32; pub const ERROR_CODE: errorType = 0; pub const ERROR_TEXT: errorType = 1; pub const ERROR_EULA: errorType = 2; @@ -9620,10 +9630,10 @@ pub const ERROR_TEXT_LANGUAGE: errorType = 257; pub const ERROR_EULA_LANGUAGE: errorType = 258; pub const ERROR_TEXT_WORD_WRAP: errorType = 513; pub const ERROR_TEXT_LANGUAGE_WORD_WRAP: errorType = 769; -pub type errorType = libc::c_uint; +pub type errorType = u32; pub const ERROR_NORMAL: errorScreenFlag = 0; pub const ERROR_STEREO: errorScreenFlag = 1; -pub type errorScreenFlag = libc::c_uint; +pub type errorScreenFlag = u32; pub const ERROR_UNKNOWN: errorReturnCode = -1; pub const ERROR_NONE: errorReturnCode = 0; pub const ERROR_SUCCESS: errorReturnCode = 1; @@ -9631,11 +9641,11 @@ pub const ERROR_NOT_SUPPORTED: errorReturnCode = 2; pub const ERROR_HOME_BUTTON: errorReturnCode = 10; pub const ERROR_SOFTWARE_RESET: errorReturnCode = 11; pub const ERROR_POWER_BUTTON: errorReturnCode = 12; -pub type errorReturnCode = libc::c_int; +pub type errorReturnCode = i32; #[repr(C)] pub struct errorConf { pub type_: errorType, - pub errorCode: libc::c_int, + pub errorCode: ::libc::c_int, pub upperScreenFlag: errorScreenFlag, pub useLanguage: u16, pub Text: [u16; 1900usize], @@ -9649,27 +9659,27 @@ extern "C" { pub fn errorInit(err: *mut errorConf, type_: errorType, lang: CFG_Language); } extern "C" { - pub fn errorCode(err: *mut errorConf, error: libc::c_int); + pub fn errorCode(err: *mut errorConf, error: ::libc::c_int); } extern "C" { - pub fn errorText(err: *mut errorConf, text: *const libc::c_char); + pub fn errorText(err: *mut errorConf, text: *const ::libc::c_char); } extern "C" { pub fn errorDisp(err: *mut errorConf); } #[repr(C)] pub struct MiiSelectorConf { - pub enable_cancel_button: libc::c_char, - pub enable_selecting_guests: libc::c_char, - pub show_on_top_screen: libc::c_char, - pub _unk0x3: [libc::c_char; 5usize], + pub enable_cancel_button: ::libc::c_char, + pub enable_selecting_guests: ::libc::c_char, + pub show_on_top_screen: ::libc::c_char, + pub _unk0x3: [::libc::c_char; 5usize], pub title: [u16; 64usize], - pub _unk0x88: [libc::c_char; 4usize], - pub show_guest_page: libc::c_char, - pub _unk0x8D: [libc::c_char; 3usize], + pub _unk0x88: [::libc::c_char; 4usize], + pub show_guest_page: ::libc::c_char, + pub _unk0x8D: [::libc::c_char; 3usize], pub initial_index: u32, - pub mii_guest_whitelist: [libc::c_char; 6usize], - pub mii_whitelist: [libc::c_char; 100usize], + pub mii_guest_whitelist: [::libc::c_char; 6usize], + pub mii_whitelist: [::libc::c_char; 100usize], pub _unk0xFE: u16, pub magic: u32, } @@ -9678,7 +9688,7 @@ pub struct MiiSelectorReturn { pub no_mii_selected: u32, pub guest_mii_was_selected: u32, pub guest_mii_index: u32, - pub mii: [libc::c_char; 92usize], + pub mii: [::libc::c_char; 92usize], pub _pad0x68: u16, pub checksum: u16, pub guest_mii_name: [u16; 12usize], @@ -9710,7 +9720,7 @@ extern "C" { pub fn sdmcExit() -> Result; } extern "C" { - pub fn sdmc_getmtime(name: *const libc::c_char, mtime: *mut u64) -> Result; + pub fn sdmc_getmtime(name: *const ::libc::c_char, mtime: *mut u64) -> Result; } #[repr(C)] pub struct romfs_header { @@ -9794,7 +9804,7 @@ pub struct tag_CWDH_s { pub const CMAP_TYPE_DIRECT: _bindgen_ty_31 = 0; pub const CMAP_TYPE_TABLE: _bindgen_ty_31 = 1; pub const CMAP_TYPE_SCAN: _bindgen_ty_31 = 2; -pub type _bindgen_ty_31 = libc::c_uint; +pub type _bindgen_ty_31 = u32; pub type CMAP_s = tag_CMAP_s; #[repr(C)] pub struct tag_CMAP_s { @@ -9850,9 +9860,9 @@ pub struct CFNT_s { pub finf: FINF_s, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct fontGlyphPos_s { - pub sheetIndex: libc::c_int, + pub sheetIndex: ::libc::c_int, pub xOffset: f32, pub xAdvance: f32, pub width: f32, @@ -9860,7 +9870,7 @@ pub struct fontGlyphPos_s { pub vtxcoord: fontGlyphPos_s__bindgen_ty_2, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_1 { pub left: f32, pub top: f32, @@ -9868,7 +9878,7 @@ pub struct fontGlyphPos_s__bindgen_ty_1 { pub bottom: f32, } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct fontGlyphPos_s__bindgen_ty_2 { pub left: f32, pub top: f32, @@ -9878,20 +9888,20 @@ pub struct fontGlyphPos_s__bindgen_ty_2 { pub const GLYPH_POS_CALC_VTXCOORD: _bindgen_ty_32 = 1; pub const GLYPH_POS_AT_BASELINE: _bindgen_ty_32 = 2; pub const GLYPH_POS_Y_POINTS_UP: _bindgen_ty_32 = 4; -pub type _bindgen_ty_32 = libc::c_uint; +pub type _bindgen_ty_32 = u32; extern "C" { pub fn fontEnsureMapped() -> Result; } extern "C" { - pub fn fontGlyphIndexFromCodePoint(codePoint: u32) -> libc::c_int; + pub fn fontGlyphIndexFromCodePoint(codePoint: u32) -> ::libc::c_int; } extern "C" { - pub fn fontGetCharWidthInfo(glyphIndex: libc::c_int) -> *mut charWidthInfo_s; + pub fn fontGetCharWidthInfo(glyphIndex: ::libc::c_int) -> *mut charWidthInfo_s; } extern "C" { pub fn fontCalcGlyphPos( out: *mut fontGlyphPos_s, - glyphIndex: libc::c_int, + glyphIndex: ::libc::c_int, flags: u32, scaleX: f32, scaleY: f32, diff --git a/ctru-sys/src/lib.rs b/ctru-sys/src/lib.rs index 4b40a5c..274d43b 100644 --- a/ctru-sys/src/lib.rs +++ b/ctru-sys/src/lib.rs @@ -3,7 +3,6 @@ #![allow(non_snake_case)] #![feature(const_fn)] -#![feature(untagged_unions)] #![no_std]