diff --git a/linux_prebuilt_bindings.rs b/linux_prebuilt_bindings.rs index 8d14f82..18f6c54 100644 --- a/linux_prebuilt_bindings.rs +++ b/linux_prebuilt_bindings.rs @@ -1,26 +1,22 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { +pub struct __BindgenBitfieldUnit { storage: Storage, - align: [Align; 0], } -impl __BindgenBitfieldUnit { +impl __BindgenBitfieldUnit { #[inline] pub const fn new(storage: Storage) -> Self { - Self { storage, align: [] } + Self { storage } } } -impl __BindgenBitfieldUnit +impl __BindgenBitfieldUnit where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[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]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -30,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> 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 byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -41,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !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]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[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()); @@ -65,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + 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()); @@ -80,12 +120,29 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } pub const _STDINT_H: u32 = 1; pub const _FEATURES_H: u32 = 1; pub const __USE_ANSI: u32 = 1; pub const _BSD_SOURCE: u32 = 1; pub const _SVID_SOURCE: u32 = 1; +pub const __USE_ISOC11: u32 = 1; pub const __USE_ISOC99: u32 = 1; pub const __USE_ISOC95: u32 = 1; pub const _POSIX_SOURCE: u32 = 1; @@ -103,16 +160,19 @@ pub const __USE_BSD: u32 = 1; pub const __USE_SVID: u32 = 1; pub const __USE_ATFILE: u32 = 1; pub const __USE_FORTIFY_LEVEL: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; pub const __STDC_IEC_559__: u32 = 1; pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_ISO_10646__: u32 = 200009; +pub const __STDC_ISO_10646__: u32 = 201103; +pub const __STDC_NO_THREADS__: u32 = 1; pub const __GNU_LIBRARY__: u32 = 6; pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 12; +pub const __GLIBC_MINOR__: u32 = 17; pub const __GLIBC_HAVE_LONG_LONG: u32 = 1; pub const _SYS_CDEFS_H: u32 = 1; pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_COMPAT32: u32 = 1; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; pub const _BITS_WCHAR_H: u32 = 1; pub const __WCHAR_MIN: i32 = -2147483648; pub const __WCHAR_MAX: u32 = 2147483647; @@ -157,190 +217,234 @@ pub const WINT_MIN: u32 = 0; pub const WINT_MAX: u32 = 4294967295; pub const _INTTYPES_H: u32 = 1; pub const ____gwchar_t_defined: u32 = 1; -pub const __PRI64_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const __PRIPTR_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const PRId8: &'static [u8; 2usize] = b"d\0"; -pub const PRId16: &'static [u8; 2usize] = b"d\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRId64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIi8: &'static [u8; 2usize] = b"i\0"; -pub const PRIi16: &'static [u8; 2usize] = b"i\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIi64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIo8: &'static [u8; 2usize] = b"o\0"; -pub const PRIo16: &'static [u8; 2usize] = b"o\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIo64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIu8: &'static [u8; 2usize] = b"u\0"; -pub const PRIu16: &'static [u8; 2usize] = b"u\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIu64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuLEAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST16: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIx8: &'static [u8; 2usize] = b"x\0"; -pub const PRIx16: &'static [u8; 2usize] = b"x\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIx64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxLEAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST16: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIX8: &'static [u8; 2usize] = b"X\0"; -pub const PRIX16: &'static [u8; 2usize] = b"X\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRIX64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXLEAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST16: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"li\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNd64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNi64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNu64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNo64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNx64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"li\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const _STDIO_H: u32 = 1; +pub const __PRI64_PREFIX: &[u8; 2] = b"l\0"; +pub const __PRIPTR_PREFIX: &[u8; 2] = b"l\0"; +pub const PRId8: &[u8; 2] = b"d\0"; +pub const PRId16: &[u8; 2] = b"d\0"; +pub const PRId32: &[u8; 2] = b"d\0"; +pub const PRId64: &[u8; 3] = b"ld\0"; +pub const PRIdLEAST8: &[u8; 2] = b"d\0"; +pub const PRIdLEAST16: &[u8; 2] = b"d\0"; +pub const PRIdLEAST32: &[u8; 2] = b"d\0"; +pub const PRIdLEAST64: &[u8; 3] = b"ld\0"; +pub const PRIdFAST8: &[u8; 2] = b"d\0"; +pub const PRIdFAST16: &[u8; 3] = b"ld\0"; +pub const PRIdFAST32: &[u8; 3] = b"ld\0"; +pub const PRIdFAST64: &[u8; 3] = b"ld\0"; +pub const PRIi8: &[u8; 2] = b"i\0"; +pub const PRIi16: &[u8; 2] = b"i\0"; +pub const PRIi32: &[u8; 2] = b"i\0"; +pub const PRIi64: &[u8; 3] = b"li\0"; +pub const PRIiLEAST8: &[u8; 2] = b"i\0"; +pub const PRIiLEAST16: &[u8; 2] = b"i\0"; +pub const PRIiLEAST32: &[u8; 2] = b"i\0"; +pub const PRIiLEAST64: &[u8; 3] = b"li\0"; +pub const PRIiFAST8: &[u8; 2] = b"i\0"; +pub const PRIiFAST16: &[u8; 3] = b"li\0"; +pub const PRIiFAST32: &[u8; 3] = b"li\0"; +pub const PRIiFAST64: &[u8; 3] = b"li\0"; +pub const PRIo8: &[u8; 2] = b"o\0"; +pub const PRIo16: &[u8; 2] = b"o\0"; +pub const PRIo32: &[u8; 2] = b"o\0"; +pub const PRIo64: &[u8; 3] = b"lo\0"; +pub const PRIoLEAST8: &[u8; 2] = b"o\0"; +pub const PRIoLEAST16: &[u8; 2] = b"o\0"; +pub const PRIoLEAST32: &[u8; 2] = b"o\0"; +pub const PRIoLEAST64: &[u8; 3] = b"lo\0"; +pub const PRIoFAST8: &[u8; 2] = b"o\0"; +pub const PRIoFAST16: &[u8; 3] = b"lo\0"; +pub const PRIoFAST32: &[u8; 3] = b"lo\0"; +pub const PRIoFAST64: &[u8; 3] = b"lo\0"; +pub const PRIu8: &[u8; 2] = b"u\0"; +pub const PRIu16: &[u8; 2] = b"u\0"; +pub const PRIu32: &[u8; 2] = b"u\0"; +pub const PRIu64: &[u8; 3] = b"lu\0"; +pub const PRIuLEAST8: &[u8; 2] = b"u\0"; +pub const PRIuLEAST16: &[u8; 2] = b"u\0"; +pub const PRIuLEAST32: &[u8; 2] = b"u\0"; +pub const PRIuLEAST64: &[u8; 3] = b"lu\0"; +pub const PRIuFAST8: &[u8; 2] = b"u\0"; +pub const PRIuFAST16: &[u8; 3] = b"lu\0"; +pub const PRIuFAST32: &[u8; 3] = b"lu\0"; +pub const PRIuFAST64: &[u8; 3] = b"lu\0"; +pub const PRIx8: &[u8; 2] = b"x\0"; +pub const PRIx16: &[u8; 2] = b"x\0"; +pub const PRIx32: &[u8; 2] = b"x\0"; +pub const PRIx64: &[u8; 3] = b"lx\0"; +pub const PRIxLEAST8: &[u8; 2] = b"x\0"; +pub const PRIxLEAST16: &[u8; 2] = b"x\0"; +pub const PRIxLEAST32: &[u8; 2] = b"x\0"; +pub const PRIxLEAST64: &[u8; 3] = b"lx\0"; +pub const PRIxFAST8: &[u8; 2] = b"x\0"; +pub const PRIxFAST16: &[u8; 3] = b"lx\0"; +pub const PRIxFAST32: &[u8; 3] = b"lx\0"; +pub const PRIxFAST64: &[u8; 3] = b"lx\0"; +pub const PRIX8: &[u8; 2] = b"X\0"; +pub const PRIX16: &[u8; 2] = b"X\0"; +pub const PRIX32: &[u8; 2] = b"X\0"; +pub const PRIX64: &[u8; 3] = b"lX\0"; +pub const PRIXLEAST8: &[u8; 2] = b"X\0"; +pub const PRIXLEAST16: &[u8; 2] = b"X\0"; +pub const PRIXLEAST32: &[u8; 2] = b"X\0"; +pub const PRIXLEAST64: &[u8; 3] = b"lX\0"; +pub const PRIXFAST8: &[u8; 2] = b"X\0"; +pub const PRIXFAST16: &[u8; 3] = b"lX\0"; +pub const PRIXFAST32: &[u8; 3] = b"lX\0"; +pub const PRIXFAST64: &[u8; 3] = b"lX\0"; +pub const PRIdMAX: &[u8; 3] = b"ld\0"; +pub const PRIiMAX: &[u8; 3] = b"li\0"; +pub const PRIoMAX: &[u8; 3] = b"lo\0"; +pub const PRIuMAX: &[u8; 3] = b"lu\0"; +pub const PRIxMAX: &[u8; 3] = b"lx\0"; +pub const PRIXMAX: &[u8; 3] = b"lX\0"; +pub const PRIdPTR: &[u8; 3] = b"ld\0"; +pub const PRIiPTR: &[u8; 3] = b"li\0"; +pub const PRIoPTR: &[u8; 3] = b"lo\0"; +pub const PRIuPTR: &[u8; 3] = b"lu\0"; +pub const PRIxPTR: &[u8; 3] = b"lx\0"; +pub const PRIXPTR: &[u8; 3] = b"lX\0"; +pub const SCNd8: &[u8; 4] = b"hhd\0"; +pub const SCNd16: &[u8; 3] = b"hd\0"; +pub const SCNd32: &[u8; 2] = b"d\0"; +pub const SCNd64: &[u8; 3] = b"ld\0"; +pub const SCNdLEAST8: &[u8; 4] = b"hhd\0"; +pub const SCNdLEAST16: &[u8; 3] = b"hd\0"; +pub const SCNdLEAST32: &[u8; 2] = b"d\0"; +pub const SCNdLEAST64: &[u8; 3] = b"ld\0"; +pub const SCNdFAST8: &[u8; 4] = b"hhd\0"; +pub const SCNdFAST16: &[u8; 3] = b"ld\0"; +pub const SCNdFAST32: &[u8; 3] = b"ld\0"; +pub const SCNdFAST64: &[u8; 3] = b"ld\0"; +pub const SCNi8: &[u8; 4] = b"hhi\0"; +pub const SCNi16: &[u8; 3] = b"hi\0"; +pub const SCNi32: &[u8; 2] = b"i\0"; +pub const SCNi64: &[u8; 3] = b"li\0"; +pub const SCNiLEAST8: &[u8; 4] = b"hhi\0"; +pub const SCNiLEAST16: &[u8; 3] = b"hi\0"; +pub const SCNiLEAST32: &[u8; 2] = b"i\0"; +pub const SCNiLEAST64: &[u8; 3] = b"li\0"; +pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; +pub const SCNiFAST16: &[u8; 3] = b"li\0"; +pub const SCNiFAST32: &[u8; 3] = b"li\0"; +pub const SCNiFAST64: &[u8; 3] = b"li\0"; +pub const SCNu8: &[u8; 4] = b"hhu\0"; +pub const SCNu16: &[u8; 3] = b"hu\0"; +pub const SCNu32: &[u8; 2] = b"u\0"; +pub const SCNu64: &[u8; 3] = b"lu\0"; +pub const SCNuLEAST8: &[u8; 4] = b"hhu\0"; +pub const SCNuLEAST16: &[u8; 3] = b"hu\0"; +pub const SCNuLEAST32: &[u8; 2] = b"u\0"; +pub const SCNuLEAST64: &[u8; 3] = b"lu\0"; +pub const SCNuFAST8: &[u8; 4] = b"hhu\0"; +pub const SCNuFAST16: &[u8; 3] = b"lu\0"; +pub const SCNuFAST32: &[u8; 3] = b"lu\0"; +pub const SCNuFAST64: &[u8; 3] = b"lu\0"; +pub const SCNo8: &[u8; 4] = b"hho\0"; +pub const SCNo16: &[u8; 3] = b"ho\0"; +pub const SCNo32: &[u8; 2] = b"o\0"; +pub const SCNo64: &[u8; 3] = b"lo\0"; +pub const SCNoLEAST8: &[u8; 4] = b"hho\0"; +pub const SCNoLEAST16: &[u8; 3] = b"ho\0"; +pub const SCNoLEAST32: &[u8; 2] = b"o\0"; +pub const SCNoLEAST64: &[u8; 3] = b"lo\0"; +pub const SCNoFAST8: &[u8; 4] = b"hho\0"; +pub const SCNoFAST16: &[u8; 3] = b"lo\0"; +pub const SCNoFAST32: &[u8; 3] = b"lo\0"; +pub const SCNoFAST64: &[u8; 3] = b"lo\0"; +pub const SCNx8: &[u8; 4] = b"hhx\0"; +pub const SCNx16: &[u8; 3] = b"hx\0"; +pub const SCNx32: &[u8; 2] = b"x\0"; +pub const SCNx64: &[u8; 3] = b"lx\0"; +pub const SCNxLEAST8: &[u8; 4] = b"hhx\0"; +pub const SCNxLEAST16: &[u8; 3] = b"hx\0"; +pub const SCNxLEAST32: &[u8; 2] = b"x\0"; +pub const SCNxLEAST64: &[u8; 3] = b"lx\0"; +pub const SCNxFAST8: &[u8; 4] = b"hhx\0"; +pub const SCNxFAST16: &[u8; 3] = b"lx\0"; +pub const SCNxFAST32: &[u8; 3] = b"lx\0"; +pub const SCNxFAST64: &[u8; 3] = b"lx\0"; +pub const SCNdMAX: &[u8; 3] = b"ld\0"; +pub const SCNiMAX: &[u8; 3] = b"li\0"; +pub const SCNoMAX: &[u8; 3] = b"lo\0"; +pub const SCNuMAX: &[u8; 3] = b"lu\0"; +pub const SCNxMAX: &[u8; 3] = b"lx\0"; +pub const SCNdPTR: &[u8; 3] = b"ld\0"; +pub const SCNiPTR: &[u8; 3] = b"li\0"; +pub const SCNoPTR: &[u8; 3] = b"lo\0"; +pub const SCNuPTR: &[u8; 3] = b"lu\0"; +pub const SCNxPTR: &[u8; 3] = b"lx\0"; +pub const _STDLIB_H: u32 = 1; +pub const WNOHANG: u32 = 1; +pub const WUNTRACED: u32 = 2; +pub const WSTOPPED: u32 = 2; +pub const WEXITED: u32 = 4; +pub const WCONTINUED: u32 = 8; +pub const WNOWAIT: u32 = 16777216; +pub const __WNOTHREAD: u32 = 536870912; +pub const __WALL: u32 = 1073741824; +pub const __WCLONE: u32 = 2147483648; +pub const __W_CONTINUED: u32 = 65535; +pub const __WCOREFLAG: u32 = 128; +pub const _ENDIAN_H: 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 __FLOAT_WORD_ORDER: u32 = 1234; +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 _BITS_BYTESWAP_H: u32 = 1; pub const _BITS_TYPES_H: u32 = 1; pub const _BITS_TYPESIZES_H: u32 = 1; +pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; +pub const __INO_T_MATCHES_INO64_T: u32 = 1; pub const __FD_SETSIZE: u32 = 1024; +pub const __ldiv_t_defined: u32 = 1; +pub const __lldiv_t_defined: u32 = 1; +pub const RAND_MAX: u32 = 2147483647; +pub const EXIT_FAILURE: u32 = 1; +pub const EXIT_SUCCESS: u32 = 0; +pub const _SYS_TYPES_H: u32 = 1; +pub const __clock_t_defined: u32 = 1; +pub const __time_t_defined: u32 = 1; +pub const __clockid_t_defined: u32 = 1; +pub const __timer_t_defined: u32 = 1; +pub const __BIT_TYPES_DEFINED__: u32 = 1; +pub const _SYS_SELECT_H: u32 = 1; +pub const __FD_ZERO_STOS: &[u8; 6] = b"stosq\0"; +pub const _SIGSET_H_types: u32 = 1; +pub const __timespec_defined: u32 = 1; +pub const _STRUCT_TIMEVAL: u32 = 1; +pub const FD_SETSIZE: u32 = 1024; +pub const _SYS_SYSMACROS_H: u32 = 1; +pub const _BITS_PTHREADTYPES_H: u32 = 1; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; +pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; +pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; +pub const __have_pthread_attr_t: u32 = 1; +pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; +pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1; +pub const _ALLOCA_H: u32 = 1; +pub const _STRING_H: u32 = 1; +pub const _XLOCALE_H: u32 = 1; +pub const _STDIO_H: u32 = 1; pub const __FILE_defined: u32 = 1; pub const ____FILE_defined: u32 = 1; pub const _G_config_h: u32 = 1; -pub const __mbstate_t_defined: u32 = 1; -pub const _G_HAVE_BOOL: u32 = 1; -pub const _G_HAVE_ATEXIT: u32 = 1; -pub const _G_HAVE_SYS_CDEFS: u32 = 1; -pub const _G_HAVE_SYS_WAIT: u32 = 1; -pub const _G_NEED_STDARG_H: u32 = 1; -pub const _G_HAVE_PRINTF_FP: u32 = 1; +pub const ____mbstate_t_defined: u32 = 1; pub const _G_HAVE_MMAP: u32 = 1; pub const _G_HAVE_MREMAP: u32 = 1; -pub const _G_HAVE_LONG_DOUBLE_IO: u32 = 1; -pub const _G_HAVE_IO_FILE_OPEN: u32 = 1; -pub const _G_HAVE_IO_GETLINE_INFO: u32 = 1; pub const _G_IO_IO_FILE_VERSION: u32 = 131073; pub const _G_BUFSIZ: u32 = 8192; -pub const _G_NAMES_HAVE_UNDERSCORE: u32 = 0; -pub const _G_VTABLE_LABEL_HAS_LENGTH: u32 = 1; -pub const _G_USING_THUNKS: u32 = 1; -pub const _G_VTABLE_LABEL_PREFIX: &'static [u8; 6usize] = b"__vt_\0"; -pub const _IO_HAVE_SYS_WAIT: u32 = 1; pub const _IO_BUFSIZ: u32 = 8192; -pub const __GNUC_VA_LIST: u32 = 1; pub const _IO_UNIFIED_JUMPTABLES: u32 = 1; pub const EOF: i32 = -1; pub const _IOS_INPUT: u32 = 1; @@ -397,38 +501,12 @@ pub const BUFSIZ: u32 = 8192; pub const SEEK_SET: u32 = 0; pub const SEEK_CUR: u32 = 1; pub const SEEK_END: u32 = 2; -pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0"; +pub const P_tmpdir: &[u8; 5] = b"/tmp\0"; pub const L_tmpnam: u32 = 20; pub const TMP_MAX: u32 = 238328; pub const FILENAME_MAX: u32 = 4096; pub const L_ctermid: u32 = 9; pub const FOPEN_MAX: u32 = 16; -pub const HTS_PATH_SEPARATOR_CHAR: u8 = 58u8; -pub const HTS_PATH_SEPARATOR_STR: &'static [u8; 2usize] = b":\0"; -pub const HTS_RESIZE_CLEAR: u32 = 1; -pub const HTS_IDX_DELIM: &'static [u8; 8usize] = b"##idx##\0"; -pub const HTS_VERSION: u32 = 101002; -pub const HTS_IDX_NOCOOR: i32 = -2; -pub const HTS_IDX_START: i32 = -3; -pub const HTS_IDX_REST: i32 = -4; -pub const HTS_IDX_NONE: i32 = -5; -pub const HTS_FMT_CSI: u32 = 0; -pub const HTS_FMT_BAI: u32 = 1; -pub const HTS_FMT_TBI: u32 = 2; -pub const HTS_FMT_CRAI: u32 = 3; -pub const PRIhts_pos: &'static [u8; 3usize] = b"ld\0"; -pub const HTS_IDX_SAVE_REMOTE: u32 = 1; -pub const HTS_IDX_SILENT_FAIL: u32 = 2; -pub const HTS_PARSE_THOUSANDS_SEP: u32 = 1; -pub const HTS_PARSE_ONE_COORD: u32 = 2; -pub const HTS_PARSE_LIST: u32 = 4; -pub const FT_UNKN: u32 = 0; -pub const FT_GZ: u32 = 1; -pub const FT_VCF: u32 = 2; -pub const FT_VCF_GZ: u32 = 3; -pub const FT_BCF: u32 = 4; -pub const FT_BCF_GZ: u32 = 5; -pub const FT_STDIN: u32 = 8; pub const _LIBC_LIMITS_H_: u32 = 1; pub const MB_LEN_MAX: u32 = 16; pub const _BITS_POSIX1_LIM_H: u32 = 1; @@ -507,7 +585,6 @@ pub const EXPR_NEST_MAX: u32 = 32; pub const LINE_MAX: u32 = 2048; pub const CHARCLASS_NAME_MAX: u32 = 2048; pub const RE_DUP_MAX: u32 = 32767; -pub const _ASSERT_H: u32 = 1; pub const _ERRNO_H: u32 = 1; pub const EPERM: u32 = 1; pub const ENOENT: u32 = 2; @@ -641,64 +718,51 @@ pub const EKEYREJECTED: u32 = 129; pub const EOWNERDEAD: u32 = 130; pub const ENOTRECOVERABLE: u32 = 131; pub const ERFKILL: u32 = 132; +pub const EHWPOISON: u32 = 133; pub const ENOTSUP: u32 = 95; -pub const _STDLIB_H: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WSTOPPED: u32 = 2; -pub const WEXITED: u32 = 4; -pub const WCONTINUED: u32 = 8; -pub const WNOWAIT: u32 = 16777216; -pub const __WNOTHREAD: u32 = 536870912; -pub const __WALL: u32 = 1073741824; -pub const __WCLONE: u32 = 2147483648; -pub const __W_CONTINUED: u32 = 65535; -pub const __WCOREFLAG: u32 = 128; -pub const _ENDIAN_H: 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 __FLOAT_WORD_ORDER: u32 = 1234; -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 _BITS_BYTESWAP_H: u32 = 1; -pub const __ldiv_t_defined: u32 = 1; -pub const __lldiv_t_defined: u32 = 1; -pub const RAND_MAX: u32 = 2147483647; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const _SYS_TYPES_H: u32 = 1; -pub const __clock_t_defined: u32 = 1; -pub const __time_t_defined: u32 = 1; -pub const __clockid_t_defined: u32 = 1; -pub const __timer_t_defined: u32 = 1; -pub const __BIT_TYPES_DEFINED__: u32 = 1; -pub const _SYS_SELECT_H: u32 = 1; -pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; -pub const _SIGSET_H_types: u32 = 1; -pub const __timespec_defined: u32 = 1; -pub const _STRUCT_TIMEVAL: u32 = 1; -pub const FD_SETSIZE: u32 = 1024; -pub const _SYS_SYSMACROS_H: u32 = 1; -pub const _BITS_PTHREADTYPES_H: u32 = 1; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; -pub const _ALLOCA_H: u32 = 1; -pub const _STRING_H: u32 = 1; -pub const _XLOCALE_H: u32 = 1; pub const HAVE___BUILTIN_CLZ: u32 = 1; +pub const HTS_PATH_SEPARATOR_CHAR: u8 = 58u8; +pub const HTS_PATH_SEPARATOR_STR: &[u8; 2] = b":\0"; +pub const HTS_RESIZE_CLEAR: u32 = 1; +pub const HTS_IDX_DELIM: &[u8; 8] = b"##idx##\0"; +pub const HTS_VERSION: u32 = 101901; +pub const HTS_FEATURE_CONFIGURE: u32 = 1; +pub const HTS_FEATURE_PLUGINS: u32 = 2; +pub const HTS_FEATURE_LIBCURL: u32 = 1024; +pub const HTS_FEATURE_S3: u32 = 2048; +pub const HTS_FEATURE_GCS: u32 = 4096; +pub const HTS_FEATURE_LIBDEFLATE: u32 = 1048576; +pub const HTS_FEATURE_LZMA: u32 = 2097152; +pub const HTS_FEATURE_BZIP2: u32 = 4194304; +pub const HTS_FEATURE_HTSCODECS: u32 = 8388608; +pub const HTS_FEATURE_CC: u32 = 134217728; +pub const HTS_FEATURE_CFLAGS: u32 = 268435456; +pub const HTS_FEATURE_CPPFLAGS: u32 = 536870912; +pub const HTS_FEATURE_LDFLAGS: u32 = 1073741824; +pub const HTS_IDX_NOCOOR: i32 = -2; +pub const HTS_IDX_START: i32 = -3; +pub const HTS_IDX_REST: i32 = -4; +pub const HTS_IDX_NONE: i32 = -5; +pub const HTS_FMT_CSI: u32 = 0; +pub const HTS_FMT_BAI: u32 = 1; +pub const HTS_FMT_TBI: u32 = 2; +pub const HTS_FMT_CRAI: u32 = 3; +pub const HTS_FMT_FAI: u32 = 4; +pub const PRIhts_pos: &[u8; 3] = b"ld\0"; +pub const HTS_IDX_SAVE_REMOTE: u32 = 1; +pub const HTS_IDX_SILENT_FAIL: u32 = 2; +pub const HTS_PARSE_THOUSANDS_SEP: u32 = 1; +pub const HTS_PARSE_ONE_COORD: u32 = 2; +pub const HTS_PARSE_LIST: u32 = 4; +pub const FT_UNKN: u32 = 0; +pub const FT_GZ: u32 = 1; +pub const FT_VCF: u32 = 2; +pub const FT_VCF_GZ: u32 = 3; +pub const FT_BCF: u32 = 4; +pub const FT_BCF_GZ: u32 = 5; +pub const FT_STDIN: u32 = 8; pub const HTS_ALLOW_UNALIGNED: u32 = 1; +pub const _ASSERT_H: u32 = 1; pub const BCF_HL_FLT: u32 = 0; pub const BCF_HL_INFO: u32 = 1; pub const BCF_HL_FMT: u32 = 2; @@ -732,6 +796,9 @@ pub const VCF_INDEL: u32 = 4; pub const VCF_OTHER: u32 = 8; pub const VCF_BND: u32 = 16; pub const VCF_OVERLAP: u32 = 32; +pub const VCF_INS: u32 = 64; +pub const VCF_DEL: u32 = 128; +pub const VCF_ANY: u32 = 255; pub const BCF1_DIRTY_ID: u32 = 1; pub const BCF1_DIRTY_ALS: u32 = 2; pub const BCF1_DIRTY_FLT: u32 = 4; @@ -767,7 +834,7 @@ pub const BCF_MAX_BT_INT32: u32 = 2147483647; pub const BCF_MIN_BT_INT8: i32 = -120; pub const BCF_MIN_BT_INT16: i32 = -32760; pub const BCF_MIN_BT_INT32: i32 = -2147483640; -pub const SAM_FORMAT_VERSION: &'static [u8; 4usize] = b"1.6\0"; +pub const SAM_FORMAT_VERSION: &[u8; 4] = b"1.6\0"; pub const BAM_CMATCH: u32 = 0; pub const BAM_CINS: u32 = 1; pub const BAM_CDEL: u32 = 2; @@ -778,7 +845,7 @@ pub const BAM_CPAD: u32 = 6; pub const BAM_CEQUAL: u32 = 7; pub const BAM_CDIFF: u32 = 8; pub const BAM_CBACK: u32 = 9; -pub const BAM_CIGAR_STR: &'static [u8; 11usize] = b"MIDNSHP=XB\0"; +pub const BAM_CIGAR_STR: &[u8; 11] = b"MIDNSHP=XB\0"; pub const BAM_CIGAR_SHIFT: u32 = 4; pub const BAM_CIGAR_MASK: u32 = 15; pub const BAM_CIGAR_TYPE: u32 = 246183; @@ -796,6 +863,9 @@ pub const BAM_FDUP: u32 = 1024; pub const BAM_FSUPPLEMENTARY: u32 = 2048; pub const BAM_USER_OWNS_STRUCT: u32 = 1; pub const BAM_USER_OWNS_DATA: u32 = 2; +pub const HTS_MOD_UNKNOWN: i32 = -1; +pub const HTS_MOD_UNCHECKED: i32 = -2; +pub const HTS_MOD_REPORT_UNCHECKED: u32 = 1; pub const BGZF_BLOCK_SIZE: u32 = 65280; pub const BGZF_MAX_BLOCK_SIZE: u32 = 65536; pub const BGZF_ERR_ZLIB: u32 = 1; @@ -831,7 +901,6 @@ pub const BCF_SR_PAIR_INDEL_REF: u32 = 32; pub const BCF_SR_PAIR_EXACT: u32 = 64; pub const BCF_SR_PAIR_BOTH: u32 = 3; pub const BCF_SR_PAIR_BOTH_REF: u32 = 51; -pub type size_t = ::std::os::raw::c_ulong; pub type wchar_t = ::std::os::raw::c_int; pub type int_least8_t = ::std::os::raw::c_schar; pub type int_least16_t = ::std::os::raw::c_short; @@ -858,73 +927,71 @@ pub struct imaxdiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; +unsafe extern "C" { pub fn imaxabs(__n: intmax_t) -> intmax_t; } -extern "C" { +unsafe extern "C" { pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; } -extern "C" { +unsafe extern "C" { pub fn strtoimax( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> intmax_t; } -extern "C" { +unsafe extern "C" { pub fn strtoumax( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> uintmax_t; } -extern "C" { +unsafe extern "C" { pub fn wcstoimax( __nptr: *const __gwchar_t, __endptr: *mut *mut __gwchar_t, __base: ::std::os::raw::c_int, ) -> intmax_t; } -extern "C" { +unsafe extern "C" { pub fn wcstoumax( __nptr: *const __gwchar_t, __endptr: *mut *mut __gwchar_t, __base: ::std::os::raw::c_int, ) -> uintmax_t; } +pub const htsLogLevel_HTS_LOG_OFF: htsLogLevel = 0; +pub const htsLogLevel_HTS_LOG_ERROR: htsLogLevel = 1; +pub const htsLogLevel_HTS_LOG_WARNING: htsLogLevel = 3; +pub const htsLogLevel_HTS_LOG_INFO: htsLogLevel = 4; +pub const htsLogLevel_HTS_LOG_DEBUG: htsLogLevel = 5; +pub const htsLogLevel_HTS_LOG_TRACE: htsLogLevel = 6; +pub type htsLogLevel = ::std::os::raw::c_uint; +unsafe extern "C" { + pub fn hts_set_log_level(level: htsLogLevel); +} +unsafe extern "C" { + pub fn hts_get_log_level() -> htsLogLevel; +} +unsafe extern "C" { + pub static mut hts_verbose: ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hts_log( + severity: htsLogLevel, + context: *const ::std::os::raw::c_char, + format: *const ::std::os::raw::c_char, + ... + ); +} pub type __u_char = ::std::os::raw::c_uchar; pub type __u_short = ::std::os::raw::c_ushort; pub type __u_int = ::std::os::raw::c_uint; @@ -954,29 +1021,12 @@ pub type __pid_t = ::std::os::raw::c_int; pub struct __fsid_t { pub __val: [::std::os::raw::c_int; 2usize], } -#[test] -fn bindgen_test_layout___fsid_t() { - assert_eq!( - ::std::mem::size_of::<__fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __fsid_t"][::std::mem::size_of::<__fsid_t>() - 8usize]; + ["Alignment of __fsid_t"][::std::mem::align_of::<__fsid_t>() - 4usize]; + ["Offset of field: __fsid_t::__val"][::std::mem::offset_of!(__fsid_t, __val) - 0usize]; +}; pub type __clock_t = ::std::os::raw::c_long; pub type __rlim_t = ::std::os::raw::c_ulong; pub type __rlim64_t = ::std::os::raw::c_ulong; @@ -985,7 +1035,6 @@ pub type __time_t = ::std::os::raw::c_long; pub type __useconds_t = ::std::os::raw::c_uint; pub type __suseconds_t = ::std::os::raw::c_long; pub type __daddr_t = ::std::os::raw::c_int; -pub type __swblk_t = ::std::os::raw::c_long; pub type __key_t = ::std::os::raw::c_int; pub type __clockid_t = ::std::os::raw::c_int; pub type __timer_t = *mut ::std::os::raw::c_void; @@ -996,5554 +1045,3770 @@ pub type __fsblkcnt_t = ::std::os::raw::c_ulong; pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; pub type __fsfilcnt_t = ::std::os::raw::c_ulong; pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; +pub type __fsword_t = ::std::os::raw::c_long; pub type __ssize_t = ::std::os::raw::c_long; +pub type __syscall_slong_t = ::std::os::raw::c_long; +pub type __syscall_ulong_t = ::std::os::raw::c_ulong; pub type __loff_t = __off64_t; pub type __qaddr_t = *mut __quad_t; pub type __caddr_t = *mut ::std::os::raw::c_char; pub type __intptr_t = ::std::os::raw::c_long; pub type __socklen_t = ::std::os::raw::c_uint; -pub type FILE = _IO_FILE; -pub type __FILE = _IO_FILE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __mbstate_t { - pub __count: ::std::os::raw::c_int, - pub __value: __mbstate_t__bindgen_ty_1, -} #[repr(C)] #[derive(Copy, Clone)] -pub union __mbstate_t__bindgen_ty_1 { - pub __wch: ::std::os::raw::c_uint, - pub __wchb: [::std::os::raw::c_char; 4usize], - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout___mbstate_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wch as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wchb as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wchb) - ) - ); -} -#[test] -fn bindgen_test_layout___mbstate_t() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 8usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__count as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__value as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__value) - ) - ); +pub union wait { + pub w_status: ::std::os::raw::c_int, + pub __wait_terminated: wait__bindgen_ty_1, + pub __wait_stopped: wait__bindgen_ty_2, } #[repr(C)] -#[derive(Copy, Clone)] -pub struct _G_fpos_t { - pub __pos: __off_t, - pub __state: __mbstate_t, +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct wait__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait__bindgen_ty_1"][::std::mem::align_of::() - 4usize]; +}; +impl wait__bindgen_ty_1 { + #[inline] + pub fn __w_termsig(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } + } + #[inline] + pub fn set___w_termsig(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn __w_termsig_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___w_termsig_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn __w_coredump(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set___w_coredump(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __w_coredump_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___w_coredump_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __w_retcode(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + } + #[inline] + pub fn set___w_retcode(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn __w_retcode_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___w_retcode_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + __w_termsig: ::std::os::raw::c_uint, + __w_coredump: ::std::os::raw::c_uint, + __w_retcode: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 7u8, { + let __w_termsig: u32 = unsafe { ::std::mem::transmute(__w_termsig) }; + __w_termsig as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let __w_coredump: u32 = unsafe { ::std::mem::transmute(__w_coredump) }; + __w_coredump as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let __w_retcode: u32 = unsafe { ::std::mem::transmute(__w_retcode) }; + __w_retcode as u64 + }); + __bindgen_bitfield_unit + } } -#[test] -fn bindgen_test_layout__G_fpos_t() { - assert_eq!( - ::std::mem::size_of::<_G_fpos_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__state as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__state) - ) - ); +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Copy, Clone)] +pub struct wait__bindgen_ty_2 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait__bindgen_ty_2"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait__bindgen_ty_2"][::std::mem::align_of::() - 4usize]; +}; +impl wait__bindgen_ty_2 { + #[inline] + pub fn __w_stopval(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set___w_stopval(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn __w_stopval_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___w_stopval_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn __w_stopsig(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } + } + #[inline] + pub fn set___w_stopsig(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn __w_stopsig_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___w_stopsig_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + __w_stopval: ::std::os::raw::c_uint, + __w_stopsig: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let __w_stopval: u32 = unsafe { ::std::mem::transmute(__w_stopval) }; + __w_stopval as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let __w_stopsig: u32 = unsafe { ::std::mem::transmute(__w_stopsig) }; + __w_stopsig as u64 + }); + __bindgen_bitfield_unit + } } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait"][::std::mem::align_of::() - 4usize]; + ["Offset of field: wait::w_status"][::std::mem::offset_of!(wait, w_status) - 0usize]; + ["Offset of field: wait::__wait_terminated"] + [::std::mem::offset_of!(wait, __wait_terminated) - 0usize]; + ["Offset of field: wait::__wait_stopped"] + [::std::mem::offset_of!(wait, __wait_stopped) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] -pub struct _G_fpos64_t { - pub __pos: __off64_t, - pub __state: __mbstate_t, -} -#[test] -fn bindgen_test_layout__G_fpos64_t() { - assert_eq!( - ::std::mem::size_of::<_G_fpos64_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos64_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__state as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__state) - ) - ); +pub union __WAIT_STATUS { + pub __uptr: *mut wait, + pub __iptr: *mut ::std::os::raw::c_int, } -pub type _G_int16_t = ::std::os::raw::c_short; -pub type _G_int32_t = ::std::os::raw::c_int; -pub type _G_uint16_t = ::std::os::raw::c_ushort; -pub type _G_uint32_t = ::std::os::raw::c_uint; -pub type va_list = __builtin_va_list; -pub type __gnuc_va_list = __builtin_va_list; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __WAIT_STATUS"][::std::mem::size_of::<__WAIT_STATUS>() - 8usize]; + ["Alignment of __WAIT_STATUS"][::std::mem::align_of::<__WAIT_STATUS>() - 8usize]; + ["Offset of field: __WAIT_STATUS::__uptr"] + [::std::mem::offset_of!(__WAIT_STATUS, __uptr) - 0usize]; + ["Offset of field: __WAIT_STATUS::__iptr"] + [::std::mem::offset_of!(__WAIT_STATUS, __iptr) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _IO_jump_t { - _unused: [u8; 0], +pub struct div_t { + pub quot: ::std::os::raw::c_int, + pub rem: ::std::os::raw::c_int, } -pub type _IO_lock_t = ::std::os::raw::c_void; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); +pub struct ldiv_t { + pub quot: ::std::os::raw::c_long, + pub rem: ::std::os::raw::c_long, } -pub const __codecvt_result___codecvt_ok: __codecvt_result = 0; -pub const __codecvt_result___codecvt_partial: __codecvt_result = 1; -pub const __codecvt_result___codecvt_error: __codecvt_result = 2; -pub const __codecvt_result___codecvt_noconv: __codecvt_result = 3; -pub type __codecvt_result = u32; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: ::std::os::raw::c_int, - pub _IO_read_ptr: *mut ::std::os::raw::c_char, - pub _IO_read_end: *mut ::std::os::raw::c_char, - pub _IO_read_base: *mut ::std::os::raw::c_char, - pub _IO_write_base: *mut ::std::os::raw::c_char, - pub _IO_write_ptr: *mut ::std::os::raw::c_char, - pub _IO_write_end: *mut ::std::os::raw::c_char, - pub _IO_buf_base: *mut ::std::os::raw::c_char, - pub _IO_buf_end: *mut ::std::os::raw::c_char, - pub _IO_save_base: *mut ::std::os::raw::c_char, - pub _IO_backup_base: *mut ::std::os::raw::c_char, - pub _IO_save_end: *mut ::std::os::raw::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: ::std::os::raw::c_int, - pub _flags2: ::std::os::raw::c_int, - pub _old_offset: __off_t, - pub _cur_column: ::std::os::raw::c_ushort, - pub _vtable_offset: ::std::os::raw::c_schar, - pub _shortbuf: [::std::os::raw::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut ::std::os::raw::c_void, - pub __pad2: *mut ::std::os::raw::c_void, - pub __pad3: *mut ::std::os::raw::c_void, - pub __pad4: *mut ::std::os::raw::c_void, - pub __pad5: size_t, - pub _mode: ::std::os::raw::c_int, - pub _unused2: [::std::os::raw::c_char; 20usize], +pub struct lldiv_t { + pub quot: ::std::os::raw::c_longlong, + pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; +unsafe extern "C" { + pub fn __ctype_get_mb_cur_max() -> usize; +} +unsafe extern "C" { + pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE_plus { - _unused: [u8; 0], +unsafe extern "C" { + pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub static mut _IO_2_1_stdin_: _IO_FILE_plus; +unsafe extern "C" { + pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } -extern "C" { - pub static mut _IO_2_1_stdout_: _IO_FILE_plus; +unsafe extern "C" { + pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; } -extern "C" { - pub static mut _IO_2_1_stderr_: _IO_FILE_plus; +unsafe extern "C" { + pub fn strtod( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> f64; } -pub type __io_read_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *mut ::std::os::raw::c_char, - __nbytes: size_t, - ) -> __ssize_t, ->; -pub type __io_write_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *const ::std::os::raw::c_char, - __n: size_t, - ) -> __ssize_t, ->; -pub type __io_seek_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __pos: *mut __off64_t, - __w: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type __io_close_fn = ::std::option::Option< - unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn __underflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtof( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> f32; } -extern "C" { - pub fn __uflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtol( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_long; } -extern "C" { - pub fn __overflow(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtoul( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn _IO_getc(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtoq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; } -extern "C" { - pub fn _IO_putc(__c: ::std::os::raw::c_int, __fp: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtouq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; } -extern "C" { - pub fn _IO_feof(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtoll( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; } -extern "C" { - pub fn _IO_ferror(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtoull( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; } -extern "C" { - pub fn _IO_peekc_locked(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn _IO_flockfile(arg1: *mut _IO_FILE); +unsafe extern "C" { + pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } -extern "C" { - pub fn _IO_funlockfile(arg1: *mut _IO_FILE); +pub type u_char = __u_char; +pub type u_short = __u_short; +pub type u_int = __u_int; +pub type u_long = __u_long; +pub type quad_t = __quad_t; +pub type u_quad_t = __u_quad_t; +pub type fsid_t = __fsid_t; +pub type loff_t = __loff_t; +pub type ino_t = __ino_t; +pub type dev_t = __dev_t; +pub type gid_t = __gid_t; +pub type mode_t = __mode_t; +pub type nlink_t = __nlink_t; +pub type uid_t = __uid_t; +pub type off_t = __off_t; +pub type pid_t = __pid_t; +pub type id_t = __id_t; +pub type daddr_t = __daddr_t; +pub type caddr_t = __caddr_t; +pub type key_t = __key_t; +pub type clock_t = __clock_t; +pub type time_t = __time_t; +pub type clockid_t = __clockid_t; +pub type timer_t = __timer_t; +pub type ulong = ::std::os::raw::c_ulong; +pub type ushort = ::std::os::raw::c_ushort; +pub type uint = ::std::os::raw::c_uint; +pub type u_int8_t = ::std::os::raw::c_uchar; +pub type u_int16_t = ::std::os::raw::c_ushort; +pub type u_int32_t = ::std::os::raw::c_uint; +pub type u_int64_t = ::std::os::raw::c_ulong; +pub type register_t = ::std::os::raw::c_long; +pub type __sig_atomic_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __sigset_t { + pub __val: [::std::os::raw::c_ulong; 16usize], } -extern "C" { - pub fn _IO_ftrylockfile(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sigset_t"][::std::mem::size_of::<__sigset_t>() - 128usize]; + ["Alignment of __sigset_t"][::std::mem::align_of::<__sigset_t>() - 8usize]; + ["Offset of field: __sigset_t::__val"][::std::mem::offset_of!(__sigset_t, __val) - 0usize]; +}; +pub type sigset_t = __sigset_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timespec { + pub tv_sec: __time_t, + pub tv_nsec: __syscall_slong_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timespec"][::std::mem::size_of::() - 16usize]; + ["Alignment of timespec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize]; + ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct timeval { + pub tv_sec: __time_t, + pub tv_usec: __suseconds_t, } -extern "C" { - pub fn _IO_vfscanf( - arg1: *mut _IO_FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; +pub type suseconds_t = __suseconds_t; +pub type __fd_mask = ::std::os::raw::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct fd_set { + pub __fds_bits: [__fd_mask; 16usize], } -extern "C" { - pub fn _IO_vfprintf( - arg1: *mut _IO_FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 8usize]; + ["Offset of field: fd_set::__fds_bits"][::std::mem::offset_of!(fd_set, __fds_bits) - 0usize]; +}; +pub type fd_mask = __fd_mask; +unsafe extern "C" { + pub fn select( + __nfds: ::std::os::raw::c_int, + __readfds: *mut fd_set, + __writefds: *mut fd_set, + __exceptfds: *mut fd_set, + __timeout: *mut timeval, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn _IO_padn(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int, arg3: __ssize_t) - -> __ssize_t; -} -extern "C" { - pub fn _IO_sgetn( - arg1: *mut _IO_FILE, - arg2: *mut ::std::os::raw::c_void, - arg3: size_t, - ) -> size_t; -} -extern "C" { - pub fn _IO_seekoff( - arg1: *mut _IO_FILE, - arg2: __off64_t, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> __off64_t; +unsafe extern "C" { + pub fn pselect( + __nfds: ::std::os::raw::c_int, + __readfds: *mut fd_set, + __writefds: *mut fd_set, + __exceptfds: *mut fd_set, + __timeout: *const timespec, + __sigmask: *const __sigset_t, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn _IO_seekpos( - arg1: *mut _IO_FILE, - arg2: __off64_t, - arg3: ::std::os::raw::c_int, - ) -> __off64_t; +unsafe extern "C" { + pub fn gnu_dev_major(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; } -extern "C" { - pub fn _IO_free_backup_area(arg1: *mut _IO_FILE); +unsafe extern "C" { + pub fn gnu_dev_minor(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; } -pub type off_t = __off_t; -pub type ssize_t = __ssize_t; -pub type fpos_t = _G_fpos_t; -extern "C" { - pub static mut stdin: *mut _IO_FILE; +unsafe extern "C" { + pub fn gnu_dev_makedev( + __major: ::std::os::raw::c_uint, + __minor: ::std::os::raw::c_uint, + ) -> ::std::os::raw::c_ulonglong; } -extern "C" { - pub static mut stdout: *mut _IO_FILE; +pub type blksize_t = __blksize_t; +pub type blkcnt_t = __blkcnt_t; +pub type fsblkcnt_t = __fsblkcnt_t; +pub type fsfilcnt_t = __fsfilcnt_t; +pub type pthread_t = ::std::os::raw::c_ulong; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_attr_t { + pub __size: [::std::os::raw::c_char; 56usize], + pub __align: ::std::os::raw::c_long, } -extern "C" { - pub static mut stderr: *mut _IO_FILE; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_attr_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_attr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_attr_t::__size"] + [::std::mem::offset_of!(pthread_attr_t, __size) - 0usize]; + ["Offset of field: pthread_attr_t::__align"] + [::std::mem::offset_of!(pthread_attr_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __pthread_internal_list { + pub __prev: *mut __pthread_internal_list, + pub __next: *mut __pthread_internal_list, } -extern "C" { - pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __pthread_internal_list"][::std::mem::size_of::<__pthread_internal_list>() - 16usize]; + ["Alignment of __pthread_internal_list"] + [::std::mem::align_of::<__pthread_internal_list>() - 8usize]; + ["Offset of field: __pthread_internal_list::__prev"] + [::std::mem::offset_of!(__pthread_internal_list, __prev) - 0usize]; + ["Offset of field: __pthread_internal_list::__next"] + [::std::mem::offset_of!(__pthread_internal_list, __next) - 8usize]; +}; +pub type __pthread_list_t = __pthread_internal_list; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_mutex_t { + pub __data: pthread_mutex_t___pthread_mutex_s, + pub __size: [::std::os::raw::c_char; 40usize], + pub __align: ::std::os::raw::c_long, } -extern "C" { - pub fn rename( - __old: *const ::std::os::raw::c_char, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_mutex_t___pthread_mutex_s { + pub __lock: ::std::os::raw::c_int, + pub __count: ::std::os::raw::c_uint, + pub __owner: ::std::os::raw::c_int, + pub __nusers: ::std::os::raw::c_uint, + pub __kind: ::std::os::raw::c_int, + pub __spins: ::std::os::raw::c_int, + pub __list: __pthread_list_t, } -extern "C" { - pub fn renameat( - __oldfd: ::std::os::raw::c_int, - __old: *const ::std::os::raw::c_char, - __newfd: ::std::os::raw::c_int, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t___pthread_mutex_s"] + [::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t___pthread_mutex_s"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__lock"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __lock) - 0usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__count"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __count) - 4usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__owner"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __owner) - 8usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__nusers"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __nusers) - 12usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__kind"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __kind) - 16usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__spins"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __spins) - 20usize]; + ["Offset of field: pthread_mutex_t___pthread_mutex_s::__list"] + [::std::mem::offset_of!(pthread_mutex_t___pthread_mutex_s, __list) - 24usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutex_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of pthread_mutex_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_mutex_t::__data"] + [::std::mem::offset_of!(pthread_mutex_t, __data) - 0usize]; + ["Offset of field: pthread_mutex_t::__size"] + [::std::mem::offset_of!(pthread_mutex_t, __size) - 0usize]; + ["Offset of field: pthread_mutex_t::__align"] + [::std::mem::offset_of!(pthread_mutex_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_mutexattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, } -extern "C" { - pub fn tmpfile() -> *mut FILE; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_mutexattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_mutexattr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_mutexattr_t::__size"] + [::std::mem::offset_of!(pthread_mutexattr_t, __size) - 0usize]; + ["Offset of field: pthread_mutexattr_t::__align"] + [::std::mem::offset_of!(pthread_mutexattr_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_cond_t { + pub __data: pthread_cond_t__bindgen_ty_1, + pub __size: [::std::os::raw::c_char; 48usize], + pub __align: ::std::os::raw::c_longlong, } -extern "C" { - pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_cond_t__bindgen_ty_1 { + pub __lock: ::std::os::raw::c_int, + pub __futex: ::std::os::raw::c_uint, + pub __total_seq: ::std::os::raw::c_ulonglong, + pub __wakeup_seq: ::std::os::raw::c_ulonglong, + pub __woken_seq: ::std::os::raw::c_ulonglong, + pub __mutex: *mut ::std::os::raw::c_void, + pub __nwaiters: ::std::os::raw::c_uint, + pub __broadcast_seq: ::std::os::raw::c_uint, } -extern "C" { - pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t__bindgen_ty_1"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__lock"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __lock) - 0usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__futex"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __futex) - 4usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__total_seq"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __total_seq) - 8usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__wakeup_seq"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __wakeup_seq) - 16usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__woken_seq"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __woken_seq) - 24usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__mutex"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __mutex) - 32usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__nwaiters"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __nwaiters) - 40usize]; + ["Offset of field: pthread_cond_t__bindgen_ty_1::__broadcast_seq"] + [::std::mem::offset_of!(pthread_cond_t__bindgen_ty_1, __broadcast_seq) - 44usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_cond_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of pthread_cond_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_cond_t::__data"] + [::std::mem::offset_of!(pthread_cond_t, __data) - 0usize]; + ["Offset of field: pthread_cond_t::__size"] + [::std::mem::offset_of!(pthread_cond_t, __size) - 0usize]; + ["Offset of field: pthread_cond_t::__align"] + [::std::mem::offset_of!(pthread_cond_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_condattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, } -extern "C" { - pub fn tempnam( - __dir: *const ::std::os::raw::c_char, - __pfx: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_condattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_condattr_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_condattr_t::__size"] + [::std::mem::offset_of!(pthread_condattr_t, __size) - 0usize]; + ["Offset of field: pthread_condattr_t::__align"] + [::std::mem::offset_of!(pthread_condattr_t, __align) - 0usize]; +}; +pub type pthread_key_t = ::std::os::raw::c_uint; +pub type pthread_once_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlock_t { + pub __data: pthread_rwlock_t__bindgen_ty_1, + pub __size: [::std::os::raw::c_char; 56usize], + pub __align: ::std::os::raw::c_long, } -extern "C" { - pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pthread_rwlock_t__bindgen_ty_1 { + pub __lock: ::std::os::raw::c_int, + pub __nr_readers: ::std::os::raw::c_uint, + pub __readers_wakeup: ::std::os::raw::c_uint, + pub __writer_wakeup: ::std::os::raw::c_uint, + pub __nr_readers_queued: ::std::os::raw::c_uint, + pub __nr_writers_queued: ::std::os::raw::c_uint, + pub __writer: ::std::os::raw::c_int, + pub __shared: ::std::os::raw::c_int, + pub __pad1: ::std::os::raw::c_ulong, + pub __pad2: ::std::os::raw::c_ulong, + pub __flags: ::std::os::raw::c_uint, } -extern "C" { - pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t__bindgen_ty_1"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_rwlock_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__lock"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __lock) - 0usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__nr_readers"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __nr_readers) - 4usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__readers_wakeup"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __readers_wakeup) - 8usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__writer_wakeup"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __writer_wakeup) - 12usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__nr_readers_queued"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __nr_readers_queued) - 16usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__nr_writers_queued"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __nr_writers_queued) - 20usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__writer"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __writer) - 24usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__shared"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __shared) - 28usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__pad1"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __pad1) - 32usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__pad2"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __pad2) - 40usize]; + ["Offset of field: pthread_rwlock_t__bindgen_ty_1::__flags"] + [::std::mem::offset_of!(pthread_rwlock_t__bindgen_ty_1, __flags) - 48usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlock_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of pthread_rwlock_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_rwlock_t::__data"] + [::std::mem::offset_of!(pthread_rwlock_t, __data) - 0usize]; + ["Offset of field: pthread_rwlock_t::__size"] + [::std::mem::offset_of!(pthread_rwlock_t, __size) - 0usize]; + ["Offset of field: pthread_rwlock_t::__align"] + [::std::mem::offset_of!(pthread_rwlock_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlockattr_t { + pub __size: [::std::os::raw::c_char; 8usize], + pub __align: ::std::os::raw::c_long, } -extern "C" { - pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_rwlockattr_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of pthread_rwlockattr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_rwlockattr_t::__size"] + [::std::mem::offset_of!(pthread_rwlockattr_t, __size) - 0usize]; + ["Offset of field: pthread_rwlockattr_t::__align"] + [::std::mem::offset_of!(pthread_rwlockattr_t, __align) - 0usize]; +}; +pub type pthread_spinlock_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_barrier_t { + pub __size: [::std::os::raw::c_char; 32usize], + pub __align: ::std::os::raw::c_long, } -extern "C" { - pub fn fopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrier_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of pthread_barrier_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: pthread_barrier_t::__size"] + [::std::mem::offset_of!(pthread_barrier_t, __size) - 0usize]; + ["Offset of field: pthread_barrier_t::__align"] + [::std::mem::offset_of!(pthread_barrier_t, __align) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_barrierattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, } -extern "C" { - pub fn freopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - __stream: *mut FILE, - ) -> *mut FILE; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of pthread_barrierattr_t"][::std::mem::size_of::() - 4usize]; + ["Alignment of pthread_barrierattr_t"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: pthread_barrierattr_t::__size"] + [::std::mem::offset_of!(pthread_barrierattr_t, __size) - 0usize]; + ["Offset of field: pthread_barrierattr_t::__align"] + [::std::mem::offset_of!(pthread_barrierattr_t, __align) - 0usize]; +}; +unsafe extern "C" { + pub fn random() -> ::std::os::raw::c_long; } -extern "C" { - pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) - -> *mut FILE; +unsafe extern "C" { + pub fn srandom(__seed: ::std::os::raw::c_uint); } -extern "C" { - pub fn fmemopen( - __s: *mut ::std::os::raw::c_void, - __len: size_t, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; +unsafe extern "C" { + pub fn initstate( + __seed: ::std::os::raw::c_uint, + __statebuf: *mut ::std::os::raw::c_char, + __statelen: usize, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn open_memstream( - __bufloc: *mut *mut ::std::os::raw::c_char, - __sizeloc: *mut size_t, - ) -> *mut FILE; +unsafe extern "C" { + pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct random_data { + pub fptr: *mut i32, + pub rptr: *mut i32, + pub state: *mut i32, + pub rand_type: ::std::os::raw::c_int, + pub rand_deg: ::std::os::raw::c_int, + pub rand_sep: ::std::os::raw::c_int, + pub end_ptr: *mut i32, } -extern "C" { - pub fn setvbuf( - __stream: *mut FILE, - __buf: *mut ::std::os::raw::c_char, - __modes: ::std::os::raw::c_int, - __n: size_t, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of random_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of random_data"][::std::mem::align_of::() - 8usize]; + ["Offset of field: random_data::fptr"][::std::mem::offset_of!(random_data, fptr) - 0usize]; + ["Offset of field: random_data::rptr"][::std::mem::offset_of!(random_data, rptr) - 8usize]; + ["Offset of field: random_data::state"][::std::mem::offset_of!(random_data, state) - 16usize]; + ["Offset of field: random_data::rand_type"] + [::std::mem::offset_of!(random_data, rand_type) - 24usize]; + ["Offset of field: random_data::rand_deg"] + [::std::mem::offset_of!(random_data, rand_deg) - 28usize]; + ["Offset of field: random_data::rand_sep"] + [::std::mem::offset_of!(random_data, rand_sep) - 32usize]; + ["Offset of field: random_data::end_ptr"] + [::std::mem::offset_of!(random_data, end_ptr) - 40usize]; +}; +unsafe extern "C" { + pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; } -extern "C" { - pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: size_t); +unsafe extern "C" { + pub fn srandom_r( + __seed: ::std::os::raw::c_uint, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn setlinebuf(__stream: *mut FILE); +unsafe extern "C" { + pub fn initstate_r( + __seed: ::std::os::raw::c_uint, + __statebuf: *mut ::std::os::raw::c_char, + __statelen: usize, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fprintf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... +unsafe extern "C" { + pub fn setstate_r( + __statebuf: *mut ::std::os::raw::c_char, + __buf: *mut random_data, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn rand() -> ::std::os::raw::c_int; } -extern "C" { - pub fn sprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn srand(__seed: ::std::os::raw::c_uint); } -extern "C" { - pub fn vfprintf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } -extern "C" { - pub fn vprintf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn drand48() -> f64; } -extern "C" { - pub fn vsprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; } -extern "C" { - pub fn snprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn lrand48() -> ::std::os::raw::c_long; } -extern "C" { - pub fn vsnprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } -extern "C" { - pub fn vdprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn mrand48() -> ::std::os::raw::c_long; } -extern "C" { - pub fn dprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } -extern "C" { - pub fn fscanf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn srand48(__seedval: ::std::os::raw::c_long); } -extern "C" { - pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; } -extern "C" { - pub fn sscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); } -extern "C" { - #[link_name = "\u{1}__isoc99_fscanf"] - pub fn fscanf1( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct drand48_data { + pub __x: [::std::os::raw::c_ushort; 3usize], + pub __old_x: [::std::os::raw::c_ushort; 3usize], + pub __c: ::std::os::raw::c_ushort, + pub __init: ::std::os::raw::c_ushort, + pub __a: ::std::os::raw::c_ulonglong, } -extern "C" { - #[link_name = "\u{1}__isoc99_scanf"] - pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of drand48_data"][::std::mem::size_of::() - 24usize]; + ["Alignment of drand48_data"][::std::mem::align_of::() - 8usize]; + ["Offset of field: drand48_data::__x"][::std::mem::offset_of!(drand48_data, __x) - 0usize]; + ["Offset of field: drand48_data::__old_x"] + [::std::mem::offset_of!(drand48_data, __old_x) - 6usize]; + ["Offset of field: drand48_data::__c"][::std::mem::offset_of!(drand48_data, __c) - 12usize]; + ["Offset of field: drand48_data::__init"] + [::std::mem::offset_of!(drand48_data, __init) - 14usize]; + ["Offset of field: drand48_data::__a"][::std::mem::offset_of!(drand48_data, __a) - 16usize]; +}; +unsafe extern "C" { + pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}__isoc99_sscanf"] - pub fn sscanf1( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... +unsafe extern "C" { + pub fn erand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut f64, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn vfscanf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn lrand48_r( + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn vscanf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn nrand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn vsscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn mrand48_r( + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}__isoc99_vfscanf"] - pub fn vfscanf1( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn jrand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}__isoc99_vscanf"] - pub fn vscanf1( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn srand48_r( + __seedval: ::std::os::raw::c_long, + __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } -extern "C" { - #[link_name = "\u{1}__isoc99_vsscanf"] - pub fn vsscanf1( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, +unsafe extern "C" { + pub fn seed48_r( + __seed16v: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar() -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn lcong48_r( + __param: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn getchar_unlocked() -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn calloc( + __nmemb: ::std::os::raw::c_ulong, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn realloc( + __ptr: *mut ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn free(__ptr: *mut ::std::os::raw::c_void); } -extern "C" { - pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn cfree(__ptr: *mut ::std::os::raw::c_void); } -extern "C" { - pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) - -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn posix_memalign( + __memptr: *mut *mut ::std::os::raw::c_void, + __alignment: usize, + __size: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn aligned_alloc( + __alignment: ::std::os::raw::c_ulong, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn abort() -> !; } -extern "C" { - pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn atexit(__func: ::std::option::Option) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fgets( - __s: *mut ::std::os::raw::c_char, - __n: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn at_quick_exit( + __func: ::std::option::Option, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn gets(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn on_exit( + __func: ::std::option::Option< + unsafe extern "C" fn( + __status: ::std::os::raw::c_int, + __arg: *mut ::std::os::raw::c_void, + ), + >, + __arg: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; +unsafe extern "C" { + pub fn exit(__status: ::std::os::raw::c_int) -> !; } -extern "C" { - pub fn getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; +unsafe extern "C" { + pub fn quick_exit(__status: ::std::os::raw::c_int) -> !; } -extern "C" { - pub fn getline( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __stream: *mut FILE, - ) -> __ssize_t; +unsafe extern "C" { + pub fn _Exit(__status: ::std::os::raw::c_int) -> !; } -extern "C" { - pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn setenv( + __name: *const ::std::os::raw::c_char, + __value: *const ::std::os::raw::c_char, + __replace: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fread( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __n: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; +unsafe extern "C" { + pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fwrite( - __ptr: *const ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __n: ::std::os::raw::c_ulong, - __s: *mut FILE, - ) -> ::std::os::raw::c_ulong; +unsafe extern "C" { + pub fn clearenv() -> ::std::os::raw::c_int; } -extern "C" { - pub fn fread_unlocked( - __ptr: *mut ::std::os::raw::c_void, - __size: size_t, - __n: size_t, - __stream: *mut FILE, - ) -> size_t; +unsafe extern "C" { + pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fwrite_unlocked( - __ptr: *const ::std::os::raw::c_void, - __size: size_t, - __n: size_t, - __stream: *mut FILE, - ) -> size_t; +unsafe extern "C" { + pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fseek( - __stream: *mut FILE, - __off: ::std::os::raw::c_long, - __whence: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn mkstemps( + __template: *mut ::std::os::raw::c_char, + __suffixlen: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn rewind(__stream: *mut FILE); +unsafe extern "C" { + pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fseeko( - __stream: *mut FILE, - __off: __off_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn ftello(__stream: *mut FILE) -> __off_t; +unsafe extern "C" { + pub fn realpath( + __name: *const ::std::os::raw::c_char, + __resolved: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; +pub type __compar_fn_t = ::std::option::Option< + unsafe extern "C" fn( + arg1: *const ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +unsafe extern "C" { + pub fn bsearch( + __key: *const ::std::os::raw::c_void, + __base: *const ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + __compar: __compar_fn_t, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn qsort( + __base: *mut ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + __compar: __compar_fn_t, + ); } -extern "C" { - pub fn clearerr(__stream: *mut FILE); +unsafe extern "C" { + pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { - pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; } -extern "C" { - pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; } -extern "C" { - pub fn clearerr_unlocked(__stream: *mut FILE); +unsafe extern "C" { + pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; } -extern "C" { - pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; } -extern "C" { - pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn lldiv( + __numer: ::std::os::raw::c_longlong, + __denom: ::std::os::raw::c_longlong, + ) -> lldiv_t; } -extern "C" { - pub fn perror(__s: *const ::std::os::raw::c_char); +unsafe extern "C" { + pub fn ecvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub static mut sys_nerr: ::std::os::raw::c_int; +unsafe extern "C" { + pub fn fcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize]; +unsafe extern "C" { + pub fn gcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn qecvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn qfcvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn popen( - __command: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; +unsafe extern "C" { + pub fn qgcvt( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn ecvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn fcvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn flockfile(__stream: *mut FILE); +unsafe extern "C" { + pub fn qecvt_r( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn qfcvt_r( + __value: u128, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn funlockfile(__stream: *mut FILE); +unsafe extern "C" { + pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; } -pub const htsLogLevel_HTS_LOG_OFF: htsLogLevel = 0; -pub const htsLogLevel_HTS_LOG_ERROR: htsLogLevel = 1; -pub const htsLogLevel_HTS_LOG_WARNING: htsLogLevel = 3; -pub const htsLogLevel_HTS_LOG_INFO: htsLogLevel = 4; -pub const htsLogLevel_HTS_LOG_DEBUG: htsLogLevel = 5; -pub const htsLogLevel_HTS_LOG_TRACE: htsLogLevel = 6; -pub type htsLogLevel = u32; -extern "C" { - pub fn hts_set_log_level(level: htsLogLevel); +unsafe extern "C" { + pub fn mbtowc( + __pwc: *mut wchar_t, + __s: *const ::std::os::raw::c_char, + __n: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_get_log_level() -> htsLogLevel; +unsafe extern "C" { + pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; } -extern "C" { - pub static mut hts_verbose: ::std::os::raw::c_int; +unsafe extern "C" { + pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize; } -extern "C" { - pub fn hts_log( - severity: htsLogLevel, - context: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ... - ); +unsafe extern "C" { + pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_fd { - _unused: [u8; 0], +unsafe extern "C" { + pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hFILE { - _unused: [u8; 0], +unsafe extern "C" { + pub fn getsubopt( + __optionp: *mut *mut ::std::os::raw::c_char, + __tokens: *const *mut ::std::os::raw::c_char, + __valuep: *mut *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool { - _unused: [u8; 0], +unsafe extern "C" { + pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) + -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kstring_t { - pub l: size_t, - pub m: size_t, - pub s: *mut ::std::os::raw::c_char, +unsafe extern "C" { + pub fn memcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -#[test] -fn bindgen_test_layout_kstring_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kstring_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kstring_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(l) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(s) - ) - ); +unsafe extern "C" { + pub fn memmove( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn hts_resize_array_( - arg1: size_t, - arg2: size_t, - arg3: size_t, - arg4: *mut ::std::os::raw::c_void, - arg5: *mut *mut ::std::os::raw::c_void, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, +unsafe extern "C" { + pub fn memccpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn memset( + __s: *mut ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn memcmp( + __s1: *const ::std::os::raw::c_void, + __s2: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_free(ptr: *mut ::std::os::raw::c_void); +unsafe extern "C" { + pub fn memchr( + __s: *const ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -pub const htsFormatCategory_unknown_category: htsFormatCategory = 0; -pub const htsFormatCategory_sequence_data: htsFormatCategory = 1; -pub const htsFormatCategory_variant_data: htsFormatCategory = 2; -pub const htsFormatCategory_index_file: htsFormatCategory = 3; -pub const htsFormatCategory_region_list: htsFormatCategory = 4; -pub const htsFormatCategory_category_maximum: htsFormatCategory = 32767; -pub type htsFormatCategory = u32; -pub const htsExactFormat_unknown_format: htsExactFormat = 0; -pub const htsExactFormat_binary_format: htsExactFormat = 1; -pub const htsExactFormat_text_format: htsExactFormat = 2; -pub const htsExactFormat_sam: htsExactFormat = 3; -pub const htsExactFormat_bam: htsExactFormat = 4; -pub const htsExactFormat_bai: htsExactFormat = 5; -pub const htsExactFormat_cram: htsExactFormat = 6; -pub const htsExactFormat_crai: htsExactFormat = 7; -pub const htsExactFormat_vcf: htsExactFormat = 8; -pub const htsExactFormat_bcf: htsExactFormat = 9; -pub const htsExactFormat_csi: htsExactFormat = 10; -pub const htsExactFormat_gzi: htsExactFormat = 11; -pub const htsExactFormat_tbi: htsExactFormat = 12; -pub const htsExactFormat_bed: htsExactFormat = 13; -pub const htsExactFormat_htsget: htsExactFormat = 14; -pub const htsExactFormat_json: htsExactFormat = 14; -pub const htsExactFormat_empty_format: htsExactFormat = 15; -pub const htsExactFormat_fasta_format: htsExactFormat = 16; -pub const htsExactFormat_fastq_format: htsExactFormat = 17; -pub const htsExactFormat_fai_format: htsExactFormat = 18; -pub const htsExactFormat_fqi_format: htsExactFormat = 19; -pub const htsExactFormat_format_maximum: htsExactFormat = 32767; -pub type htsExactFormat = u32; -pub const htsCompression_no_compression: htsCompression = 0; -pub const htsCompression_gzip: htsCompression = 1; -pub const htsCompression_bgzf: htsCompression = 2; -pub const htsCompression_custom: htsCompression = 3; -pub const htsCompression_bzip2_compression: htsCompression = 4; -pub const htsCompression_compression_maximum: htsCompression = 32767; -pub type htsCompression = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat { - pub category: htsFormatCategory, - pub format: htsExactFormat, - pub version: htsFormat__bindgen_ty_1, - pub compression: htsCompression, - pub compression_level: ::std::os::raw::c_short, - pub specific: *mut ::std::os::raw::c_void, +unsafe extern "C" { + pub fn strcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat__bindgen_ty_1 { - pub major: ::std::os::raw::c_short, - pub minor: ::std::os::raw::c_short, +unsafe extern "C" { + pub fn strncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; } -#[test] -fn bindgen_test_layout_htsFormat__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(minor) - ) - ); +unsafe extern "C" { + pub fn strcat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -#[test] -fn bindgen_test_layout_htsFormat() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(htsFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFormat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).category as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(category) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression_level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression_level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).specific as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(specific) - ) - ); +unsafe extern "C" { + pub fn strncat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn strcmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn strncmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn strcoll( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn strxfrm( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> ::std::os::raw::c_ulong; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __hts_idx_t { - _unused: [u8; 0], +pub struct __locale_struct { + pub __locales: [*mut __locale_data; 13usize], + pub __ctype_b: *const ::std::os::raw::c_ushort, + pub __ctype_tolower: *const ::std::os::raw::c_int, + pub __ctype_toupper: *const ::std::os::raw::c_int, + pub __names: [*const ::std::os::raw::c_char; 13usize], } -pub type hts_idx_t = __hts_idx_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct htsFile { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub lineno: i64, - pub line: kstring_t, - pub fn_: *mut ::std::os::raw::c_char, - pub fn_aux: *mut ::std::os::raw::c_char, - pub fp: htsFile__bindgen_ty_1, - pub state: *mut ::std::os::raw::c_void, - pub format: htsFormat, - pub idx: *mut hts_idx_t, - pub fnidx: *const ::std::os::raw::c_char, - pub bam_header: *mut sam_hdr_t, +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __locale_struct"][::std::mem::size_of::<__locale_struct>() - 232usize]; + ["Alignment of __locale_struct"][::std::mem::align_of::<__locale_struct>() - 8usize]; + ["Offset of field: __locale_struct::__locales"] + [::std::mem::offset_of!(__locale_struct, __locales) - 0usize]; + ["Offset of field: __locale_struct::__ctype_b"] + [::std::mem::offset_of!(__locale_struct, __ctype_b) - 104usize]; + ["Offset of field: __locale_struct::__ctype_tolower"] + [::std::mem::offset_of!(__locale_struct, __ctype_tolower) - 112usize]; + ["Offset of field: __locale_struct::__ctype_toupper"] + [::std::mem::offset_of!(__locale_struct, __ctype_toupper) - 120usize]; + ["Offset of field: __locale_struct::__names"] + [::std::mem::offset_of!(__locale_struct, __names) - 128usize]; +}; +pub type __locale_t = *mut __locale_struct; +pub type locale_t = __locale_t; +unsafe extern "C" { + pub fn strcoll_l( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __l: __locale_t, + ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union htsFile__bindgen_ty_1 { - pub bgzf: *mut BGZF, - pub cram: *mut cram_fd, - pub hfile: *mut hFILE, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_htsFile__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bgzf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(bgzf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cram as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(cram) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfile as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(hfile) - ) - ); +unsafe extern "C" { + pub fn strxfrm_l( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + __l: __locale_t, + ) -> usize; } -#[test] -fn bindgen_test_layout_htsFile() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(htsFile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lineno as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(lineno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_aux as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_aux) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fnidx as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fnidx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bam_header as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(bam_header) - ) - ); +unsafe extern "C" { + pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -impl htsFile { - #[inline] - pub fn is_bin(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bin(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_write(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_write(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_be(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_be(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_bgzf(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bgzf(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - is_bin: u32, - is_write: u32, - is_be: u32, - is_cram: u32, - is_bgzf: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let is_bin: u32 = unsafe { ::std::mem::transmute(is_bin) }; - is_bin as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; - is_write as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; - is_be as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let is_bgzf: u32 = unsafe { ::std::mem::transmute(is_bgzf) }; - is_bgzf as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsThreadPool { - pub pool: *mut hts_tpool, - pub qsize: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_htsThreadPool() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(htsThreadPool)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsThreadPool)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pool as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(pool) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qsize as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(qsize) - ) - ); +unsafe extern "C" { + pub fn strndup( + __string: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; } -pub const sam_fields_SAM_QNAME: sam_fields = 1; -pub const sam_fields_SAM_FLAG: sam_fields = 2; -pub const sam_fields_SAM_RNAME: sam_fields = 4; -pub const sam_fields_SAM_POS: sam_fields = 8; -pub const sam_fields_SAM_MAPQ: sam_fields = 16; -pub const sam_fields_SAM_CIGAR: sam_fields = 32; -pub const sam_fields_SAM_RNEXT: sam_fields = 64; -pub const sam_fields_SAM_PNEXT: sam_fields = 128; -pub const sam_fields_SAM_TLEN: sam_fields = 256; -pub const sam_fields_SAM_SEQ: sam_fields = 512; -pub const sam_fields_SAM_QUAL: sam_fields = 1024; -pub const sam_fields_SAM_AUX: sam_fields = 2048; -pub const sam_fields_SAM_RGAUX: sam_fields = 4096; -pub type sam_fields = u32; -pub const hts_fmt_option_CRAM_OPT_DECODE_MD: hts_fmt_option = 0; -pub const hts_fmt_option_CRAM_OPT_PREFIX: hts_fmt_option = 1; -pub const hts_fmt_option_CRAM_OPT_VERBOSITY: hts_fmt_option = 2; -pub const hts_fmt_option_CRAM_OPT_SEQS_PER_SLICE: hts_fmt_option = 3; -pub const hts_fmt_option_CRAM_OPT_SLICES_PER_CONTAINER: hts_fmt_option = 4; -pub const hts_fmt_option_CRAM_OPT_RANGE: hts_fmt_option = 5; -pub const hts_fmt_option_CRAM_OPT_VERSION: hts_fmt_option = 6; -pub const hts_fmt_option_CRAM_OPT_EMBED_REF: hts_fmt_option = 7; -pub const hts_fmt_option_CRAM_OPT_IGNORE_MD5: hts_fmt_option = 8; -pub const hts_fmt_option_CRAM_OPT_REFERENCE: hts_fmt_option = 9; -pub const hts_fmt_option_CRAM_OPT_MULTI_SEQ_PER_SLICE: hts_fmt_option = 10; -pub const hts_fmt_option_CRAM_OPT_NO_REF: hts_fmt_option = 11; -pub const hts_fmt_option_CRAM_OPT_USE_BZIP2: hts_fmt_option = 12; -pub const hts_fmt_option_CRAM_OPT_SHARED_REF: hts_fmt_option = 13; -pub const hts_fmt_option_CRAM_OPT_NTHREADS: hts_fmt_option = 14; -pub const hts_fmt_option_CRAM_OPT_THREAD_POOL: hts_fmt_option = 15; -pub const hts_fmt_option_CRAM_OPT_USE_LZMA: hts_fmt_option = 16; -pub const hts_fmt_option_CRAM_OPT_USE_RANS: hts_fmt_option = 17; -pub const hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS: hts_fmt_option = 18; -pub const hts_fmt_option_CRAM_OPT_LOSSY_NAMES: hts_fmt_option = 19; -pub const hts_fmt_option_CRAM_OPT_BASES_PER_SLICE: hts_fmt_option = 20; -pub const hts_fmt_option_CRAM_OPT_STORE_MD: hts_fmt_option = 21; -pub const hts_fmt_option_CRAM_OPT_STORE_NM: hts_fmt_option = 22; -pub const hts_fmt_option_HTS_OPT_COMPRESSION_LEVEL: hts_fmt_option = 100; -pub const hts_fmt_option_HTS_OPT_NTHREADS: hts_fmt_option = 101; -pub const hts_fmt_option_HTS_OPT_THREAD_POOL: hts_fmt_option = 102; -pub const hts_fmt_option_HTS_OPT_CACHE_SIZE: hts_fmt_option = 103; -pub const hts_fmt_option_HTS_OPT_BLOCK_SIZE: hts_fmt_option = 104; -pub type hts_fmt_option = u32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct hts_opt { - pub arg: *mut ::std::os::raw::c_char, - pub opt: hts_fmt_option, - pub val: hts_opt__bindgen_ty_1, - pub next: *mut hts_opt, +unsafe extern "C" { + pub fn strchr( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union hts_opt__bindgen_ty_1 { - pub i: ::std::os::raw::c_int, - pub s: *mut ::std::os::raw::c_char, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_hts_opt__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(s) - ) - ); +unsafe extern "C" { + pub fn strrchr( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -#[test] -fn bindgen_test_layout_hts_opt() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hts_opt)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(arg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).opt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(opt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(val) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(next) - ) - ); +unsafe extern "C" { + pub fn strcspn( + __s: *const ::std::os::raw::c_char, + __reject: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn hts_opt_add( - opts: *mut *mut hts_opt, - c_arg: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strspn( + __s: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn hts_opt_apply(fp: *mut htsFile, opts: *mut hts_opt) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strpbrk( + __s: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_opt_free(opts: *mut hts_opt); +unsafe extern "C" { + pub fn strstr( + __haystack: *const ::std::os::raw::c_char, + __needle: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_parse_format( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strtok( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_parse_opt_list( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn __strtok_r( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub static seq_nt16_table: [::std::os::raw::c_uchar; 256usize]; +unsafe extern "C" { + pub fn strtok_r( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub static mut seq_nt16_str: [::std::os::raw::c_char; 0usize]; +unsafe extern "C" { + pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } -extern "C" { - pub static mut seq_nt16_int: [::std::os::raw::c_int; 0usize]; +unsafe extern "C" { + pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize; } -extern "C" { - pub fn hts_version() -> *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_detect_format(fp: *mut hFILE, fmt: *mut htsFormat) -> ::std::os::raw::c_int; +unsafe extern "C" { + #[link_name = "\u{1}__xpg_strerror_r"] + pub fn strerror_r( + __errnum: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __buflen: usize, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_format_description(format: *const htsFormat) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn strerror_l( + __errnum: ::std::os::raw::c_int, + __l: __locale_t, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_open( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; +unsafe extern "C" { + pub fn __bzero(__s: *mut ::std::os::raw::c_void, __n: usize); } -extern "C" { - pub fn hts_open_format( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - fmt: *const htsFormat, - ) -> *mut htsFile; +unsafe extern "C" { + pub fn bcopy( + __src: *const ::std::os::raw::c_void, + __dest: *mut ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ); } -extern "C" { - pub fn hts_hopen( - fp: *mut hFILE, - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; +unsafe extern "C" { + pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); } -extern "C" { - pub fn hts_close(fp: *mut htsFile) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bcmp( + __s1: *const ::std::os::raw::c_void, + __s2: *const ::std::os::raw::c_void, + __n: ::std::os::raw::c_ulong, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_get_format(fp: *mut htsFile) -> *const htsFormat; +unsafe extern "C" { + pub fn index( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_format_file_extension(format: *const htsFormat) -> *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn rindex( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_set_opt(fp: *mut htsFile, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_getline( - fp: *mut htsFile, - delimiter: ::std::os::raw::c_int, - str: *mut kstring_t, +unsafe extern "C" { + pub fn strcasecmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_readlines( - fn_: *const ::std::os::raw::c_char, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn strncasecmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_readlist( - fn_: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn strsep( + __stringp: *mut *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_set_threads(fp: *mut htsFile, n: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_set_thread_pool(fp: *mut htsFile, p: *mut htsThreadPool) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn __stpcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_set_cache_size(fp: *mut htsFile, n: ::std::os::raw::c_int); +unsafe extern "C" { + pub fn stpcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_set_fai_filename( - fp: *mut htsFile, - fn_aux: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn __stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_check_EOF(fp: *mut htsFile) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_char; } -pub type hts_pos_t = i64; +pub type __gnuc_va_list = __builtin_va_list; +pub type va_list = __builtin_va_list; +pub type FILE = _IO_FILE; +pub type __FILE = _IO_FILE; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair_pos_t { - pub beg: hts_pos_t, - pub end: hts_pos_t, +#[derive(Copy, Clone)] +pub struct __mbstate_t { + pub __count: ::std::os::raw::c_int, + pub __value: __mbstate_t__bindgen_ty_1, } -#[test] -fn bindgen_test_layout_hts_pair_pos_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(end) - ) - ); +#[repr(C)] +#[derive(Copy, Clone)] +pub union __mbstate_t__bindgen_ty_1 { + pub __wch: ::std::os::raw::c_uint, + pub __wchb: [::std::os::raw::c_char; 4usize], } -pub type hts_pair32_t = hts_pair_pos_t; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t__bindgen_ty_1"] + [::std::mem::size_of::<__mbstate_t__bindgen_ty_1>() - 4usize]; + ["Alignment of __mbstate_t__bindgen_ty_1"] + [::std::mem::align_of::<__mbstate_t__bindgen_ty_1>() - 4usize]; + ["Offset of field: __mbstate_t__bindgen_ty_1::__wch"] + [::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wch) - 0usize]; + ["Offset of field: __mbstate_t__bindgen_ty_1::__wchb"] + [::std::mem::offset_of!(__mbstate_t__bindgen_ty_1, __wchb) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t"][::std::mem::size_of::<__mbstate_t>() - 8usize]; + ["Alignment of __mbstate_t"][::std::mem::align_of::<__mbstate_t>() - 4usize]; + ["Offset of field: __mbstate_t::__count"] + [::std::mem::offset_of!(__mbstate_t, __count) - 0usize]; + ["Offset of field: __mbstate_t::__value"] + [::std::mem::offset_of!(__mbstate_t, __value) - 4usize]; +}; #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair64_t { - pub u: u64, - pub v: u64, +#[derive(Copy, Clone)] +pub struct _G_fpos_t { + pub __pos: __off_t, + pub __state: __mbstate_t, } -#[test] -fn bindgen_test_layout_hts_pair64_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(v) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _G_fpos_t"][::std::mem::size_of::<_G_fpos_t>() - 16usize]; + ["Alignment of _G_fpos_t"][::std::mem::align_of::<_G_fpos_t>() - 8usize]; + ["Offset of field: _G_fpos_t::__pos"][::std::mem::offset_of!(_G_fpos_t, __pos) - 0usize]; + ["Offset of field: _G_fpos_t::__state"][::std::mem::offset_of!(_G_fpos_t, __state) - 8usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct _G_fpos64_t { + pub __pos: __off64_t, + pub __state: __mbstate_t, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _G_fpos64_t"][::std::mem::size_of::<_G_fpos64_t>() - 16usize]; + ["Alignment of _G_fpos64_t"][::std::mem::align_of::<_G_fpos64_t>() - 8usize]; + ["Offset of field: _G_fpos64_t::__pos"][::std::mem::offset_of!(_G_fpos64_t, __pos) - 0usize]; + ["Offset of field: _G_fpos64_t::__state"] + [::std::mem::offset_of!(_G_fpos64_t, __state) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct hts_pair64_max_t { - pub u: u64, - pub v: u64, - pub max: u64, +pub struct _IO_jump_t { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_hts_pair64_max_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(v) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(max) - ) - ); +pub type _IO_lock_t = ::std::os::raw::c_void; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_marker { + pub _next: *mut _IO_marker, + pub _sbuf: *mut _IO_FILE, + pub _pos: ::std::os::raw::c_int, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _IO_marker"][::std::mem::size_of::<_IO_marker>() - 24usize]; + ["Alignment of _IO_marker"][::std::mem::align_of::<_IO_marker>() - 8usize]; + ["Offset of field: _IO_marker::_next"][::std::mem::offset_of!(_IO_marker, _next) - 0usize]; + ["Offset of field: _IO_marker::_sbuf"][::std::mem::offset_of!(_IO_marker, _sbuf) - 8usize]; + ["Offset of field: _IO_marker::_pos"][::std::mem::offset_of!(_IO_marker, _pos) - 16usize]; +}; +pub const __codecvt_result___codecvt_ok: __codecvt_result = 0; +pub const __codecvt_result___codecvt_partial: __codecvt_result = 1; +pub const __codecvt_result___codecvt_error: __codecvt_result = 2; +pub const __codecvt_result___codecvt_noconv: __codecvt_result = 3; +pub type __codecvt_result = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct hts_reglist_t { - pub reg: *const ::std::os::raw::c_char, - pub intervals: *mut hts_pair_pos_t, - pub tid: ::std::os::raw::c_int, - pub count: u32, - pub min_beg: hts_pos_t, - pub max_end: hts_pos_t, +pub struct _IO_FILE { + pub _flags: ::std::os::raw::c_int, + pub _IO_read_ptr: *mut ::std::os::raw::c_char, + pub _IO_read_end: *mut ::std::os::raw::c_char, + pub _IO_read_base: *mut ::std::os::raw::c_char, + pub _IO_write_base: *mut ::std::os::raw::c_char, + pub _IO_write_ptr: *mut ::std::os::raw::c_char, + pub _IO_write_end: *mut ::std::os::raw::c_char, + pub _IO_buf_base: *mut ::std::os::raw::c_char, + pub _IO_buf_end: *mut ::std::os::raw::c_char, + pub _IO_save_base: *mut ::std::os::raw::c_char, + pub _IO_backup_base: *mut ::std::os::raw::c_char, + pub _IO_save_end: *mut ::std::os::raw::c_char, + pub _markers: *mut _IO_marker, + pub _chain: *mut _IO_FILE, + pub _fileno: ::std::os::raw::c_int, + pub _flags2: ::std::os::raw::c_int, + pub _old_offset: __off_t, + pub _cur_column: ::std::os::raw::c_ushort, + pub _vtable_offset: ::std::os::raw::c_schar, + pub _shortbuf: [::std::os::raw::c_char; 1usize], + pub _lock: *mut _IO_lock_t, + pub _offset: __off64_t, + pub __pad1: *mut ::std::os::raw::c_void, + pub __pad2: *mut ::std::os::raw::c_void, + pub __pad3: *mut ::std::os::raw::c_void, + pub __pad4: *mut ::std::os::raw::c_void, + pub __pad5: usize, + pub _mode: ::std::os::raw::c_int, + pub _unused2: [::std::os::raw::c_char; 20usize], } -#[test] -fn bindgen_test_layout_hts_reglist_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(hts_reglist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_reglist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).intervals as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(intervals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(min_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(max_end) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize]; + ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize]; + ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize]; + ["Offset of field: _IO_FILE::_IO_read_ptr"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize]; + ["Offset of field: _IO_FILE::_IO_read_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize]; + ["Offset of field: _IO_FILE::_IO_read_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize]; + ["Offset of field: _IO_FILE::_IO_write_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize]; + ["Offset of field: _IO_FILE::_IO_write_ptr"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize]; + ["Offset of field: _IO_FILE::_IO_write_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize]; + ["Offset of field: _IO_FILE::_IO_buf_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize]; + ["Offset of field: _IO_FILE::_IO_buf_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize]; + ["Offset of field: _IO_FILE::_IO_save_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize]; + ["Offset of field: _IO_FILE::_IO_backup_base"] + [::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize]; + ["Offset of field: _IO_FILE::_IO_save_end"] + [::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize]; + ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize]; + ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize]; + ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize]; + ["Offset of field: _IO_FILE::_flags2"][::std::mem::offset_of!(_IO_FILE, _flags2) - 116usize]; + ["Offset of field: _IO_FILE::_old_offset"] + [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize]; + ["Offset of field: _IO_FILE::_cur_column"] + [::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize]; + ["Offset of field: _IO_FILE::_vtable_offset"] + [::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize]; + ["Offset of field: _IO_FILE::_shortbuf"] + [::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize]; + ["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize]; + ["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize]; + ["Offset of field: _IO_FILE::__pad1"][::std::mem::offset_of!(_IO_FILE, __pad1) - 152usize]; + ["Offset of field: _IO_FILE::__pad2"][::std::mem::offset_of!(_IO_FILE, __pad2) - 160usize]; + ["Offset of field: _IO_FILE::__pad3"][::std::mem::offset_of!(_IO_FILE, __pad3) - 168usize]; + ["Offset of field: _IO_FILE::__pad4"][::std::mem::offset_of!(_IO_FILE, __pad4) - 176usize]; + ["Offset of field: _IO_FILE::__pad5"][::std::mem::offset_of!(_IO_FILE, __pad5) - 184usize]; + ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize]; + ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE_plus { + _unused: [u8; 0], } -pub type hts_readrec_func = ::std::option::Option< +unsafe extern "C" { + pub static mut _IO_2_1_stdin_: _IO_FILE_plus; +} +unsafe extern "C" { + pub static mut _IO_2_1_stdout_: _IO_FILE_plus; +} +unsafe extern "C" { + pub static mut _IO_2_1_stderr_: _IO_FILE_plus; +} +pub type __io_read_fn = ::std::option::Option< unsafe extern "C" fn( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - r: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int, + __cookie: *mut ::std::os::raw::c_void, + __buf: *mut ::std::os::raw::c_char, + __nbytes: usize, + ) -> __ssize_t, >; -pub type hts_seek_func = ::std::option::Option< +pub type __io_write_fn = ::std::option::Option< unsafe extern "C" fn( - fp: *mut ::std::os::raw::c_void, - offset: i64, - where_: ::std::os::raw::c_int, + __cookie: *mut ::std::os::raw::c_void, + __buf: *const ::std::os::raw::c_char, + __n: usize, + ) -> __ssize_t, +>; +pub type __io_seek_fn = ::std::option::Option< + unsafe extern "C" fn( + __cookie: *mut ::std::os::raw::c_void, + __pos: *mut __off64_t, + __w: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int, >; -pub type hts_tell_func = - ::std::option::Option i64>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub tid: ::std::os::raw::c_int, - pub n_off: ::std::os::raw::c_int, - pub i: ::std::os::raw::c_int, - pub n_reg: ::std::os::raw::c_int, - pub beg: hts_pos_t, - pub end: hts_pos_t, - pub reg_list: *mut hts_reglist_t, - pub curr_tid: ::std::os::raw::c_int, - pub curr_reg: ::std::os::raw::c_int, - pub curr_intv: ::std::os::raw::c_int, - pub curr_beg: hts_pos_t, - pub curr_end: hts_pos_t, - pub curr_off: u64, - pub nocoor_off: u64, - pub off: *mut hts_pair64_max_t, - pub readrec: hts_readrec_func, - pub seek: hts_seek_func, - pub tell: hts_tell_func, - pub bins: hts_itr_t__bindgen_ty_1, +pub type __io_close_fn = ::std::option::Option< + unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, +>; +unsafe extern "C" { + pub fn __underflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t__bindgen_ty_1 { - pub n: ::std::os::raw::c_int, - pub m: ::std::os::raw::c_int, - pub a: *mut ::std::os::raw::c_int, +unsafe extern "C" { + pub fn __uflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_hts_itr_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(a) - ) - ); +unsafe extern "C" { + pub fn __overflow(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_hts_itr_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(hts_itr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_reg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg_list as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(reg_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_tid as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_reg as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_intv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_intv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_beg as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_end as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_off as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nocoor_off as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(nocoor_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).off as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readrec as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(readrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tell as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tell) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(bins) - ) - ); +unsafe extern "C" { + pub fn _IO_getc(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; } -impl hts_itr_t { - #[inline] - pub fn read_rest(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_read_rest(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn finished(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_finished(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn nocoor(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_nocoor(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn multi(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_multi(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - read_rest: u32, - finished: u32, - is_cram: u32, - nocoor: u32, - multi: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let read_rest: u32 = unsafe { ::std::mem::transmute(read_rest) }; - read_rest as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let finished: u32 = unsafe { ::std::mem::transmute(finished) }; - finished as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let nocoor: u32 = unsafe { ::std::mem::transmute(nocoor) }; - nocoor as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let multi: u32 = unsafe { ::std::mem::transmute(multi) }; - multi as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } +unsafe extern "C" { + pub fn _IO_putc(__c: ::std::os::raw::c_int, __fp: *mut _IO_FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct aux_key_t { - pub key: ::std::os::raw::c_int, - pub min_off: u64, - pub max_off: u64, -} -#[test] -fn bindgen_test_layout_aux_key_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(aux_key_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(aux_key_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(min_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_off as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(max_off) - ) - ); +unsafe extern "C" { + pub fn _IO_feof(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; } -pub type hts_itr_multi_t = hts_itr_t; -extern "C" { - pub fn hts_idx_init( - n: ::std::os::raw::c_int, - fmt: ::std::os::raw::c_int, - offset0: u64, - min_shift: ::std::os::raw::c_int, - n_lvls: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; +unsafe extern "C" { + pub fn _IO_ferror(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_destroy(idx: *mut hts_idx_t); +unsafe extern "C" { + pub fn _IO_peekc_locked(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_push( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - offset: u64, - is_mapped: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn _IO_flockfile(arg1: *mut _IO_FILE); } -extern "C" { - pub fn hts_idx_finish(idx: *mut hts_idx_t, final_offset: u64) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn _IO_funlockfile(arg1: *mut _IO_FILE); } -extern "C" { - pub fn hts_idx_fmt(idx: *mut hts_idx_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn _IO_ftrylockfile(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_tbi_name( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - name: *const ::std::os::raw::c_char, +unsafe extern "C" { + pub fn _IO_vfscanf( + arg1: *mut _IO_FILE, + arg2: *const ::std::os::raw::c_char, + arg3: *mut __va_list_tag, + arg4: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_save( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn _IO_vfprintf( + arg1: *mut _IO_FILE, + arg2: *const ::std::os::raw::c_char, + arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_save_as( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn _IO_padn(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int, arg3: __ssize_t) + -> __ssize_t; } -extern "C" { - pub fn hts_idx_load( - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; +unsafe extern "C" { + pub fn _IO_sgetn(arg1: *mut _IO_FILE, arg2: *mut ::std::os::raw::c_void, arg3: usize) -> usize; } -extern "C" { - pub fn hts_idx_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; +unsafe extern "C" { + pub fn _IO_seekoff( + arg1: *mut _IO_FILE, + arg2: __off64_t, + arg3: ::std::os::raw::c_int, + arg4: ::std::os::raw::c_int, + ) -> __off64_t; } -extern "C" { - pub fn hts_idx_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; +unsafe extern "C" { + pub fn _IO_seekpos( + arg1: *mut _IO_FILE, + arg2: __off64_t, + arg3: ::std::os::raw::c_int, + ) -> __off64_t; } -extern "C" { - pub fn hts_idx_get_meta(idx: *mut hts_idx_t, l_meta: *mut u32) -> *mut u8; +unsafe extern "C" { + pub fn _IO_free_backup_area(arg1: *mut _IO_FILE); } -extern "C" { - pub fn hts_idx_set_meta( - idx: *mut hts_idx_t, - l_meta: u32, - meta: *mut u8, - is_copy: ::std::os::raw::c_int, +pub type fpos_t = _G_fpos_t; +unsafe extern "C" { + pub static mut stdin: *mut _IO_FILE; +} +unsafe extern "C" { + pub static mut stdout: *mut _IO_FILE; +} +unsafe extern "C" { + pub static mut stderr: *mut _IO_FILE; +} +unsafe extern "C" { + pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn rename( + __old: *const ::std::os::raw::c_char, + __new: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_get_stat( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - mapped: *mut u64, - unmapped: *mut u64, +unsafe extern "C" { + pub fn renameat( + __oldfd: ::std::os::raw::c_int, + __old: *const ::std::os::raw::c_char, + __newfd: ::std::os::raw::c_int, + __new: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_get_n_no_coor(idx: *const hts_idx_t) -> u64; +unsafe extern "C" { + pub fn tmpfile() -> *mut FILE; } -extern "C" { - pub fn hts_parse_decimal( - str: *const ::std::os::raw::c_char, - strend: *mut *mut ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; +unsafe extern "C" { + pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -pub type hts_name2id_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, ->; -pub type hts_id2name_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char, ->; -extern "C" { - pub fn hts_parse_reg64( - str: *const ::std::os::raw::c_char, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_parse_reg( - str: *const ::std::os::raw::c_char, - beg: *mut ::std::os::raw::c_int, - end: *mut ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn tempnam( + __dir: *const ::std::os::raw::c_char, + __pfx: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn hts_parse_region( - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_itr_query( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; +unsafe extern "C" { + pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_itr_destroy(iter: *mut hts_itr_t); +unsafe extern "C" { + pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -pub type hts_itr_query_func = ::std::option::Option< - unsafe extern "C" fn( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t, ->; -extern "C" { - pub fn hts_itr_querys( - idx: *const hts_idx_t, - reg: *const ::std::os::raw::c_char, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_query: hts_itr_query_func, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; +unsafe extern "C" { + pub fn fopen( + __filename: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; } -extern "C" { - pub fn hts_itr_next( - fp: *mut BGZF, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, - data: *mut ::std::os::raw::c_void, +unsafe extern "C" { + pub fn freopen( + __filename: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + __stream: *mut FILE, + ) -> *mut FILE; +} +unsafe extern "C" { + pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) + -> *mut FILE; +} +unsafe extern "C" { + pub fn fmemopen( + __s: *mut ::std::os::raw::c_void, + __len: usize, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; +} +unsafe extern "C" { + pub fn open_memstream( + __bufloc: *mut *mut ::std::os::raw::c_char, + __sizeloc: *mut usize, + ) -> *mut FILE; +} +unsafe extern "C" { + pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); +} +unsafe extern "C" { + pub fn setvbuf( + __stream: *mut FILE, + __buf: *mut ::std::os::raw::c_char, + __modes: ::std::os::raw::c_int, + __n: usize, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_seqnames( - idx: *const hts_idx_t, - n: *mut ::std::os::raw::c_int, - getid: hts_id2name_f, - hdr: *mut ::std::os::raw::c_void, - ) -> *mut *const ::std::os::raw::c_char; +unsafe extern "C" { + pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize); } -pub type hts_itr_multi_query_func = ::std::option::Option< - unsafe extern "C" fn(idx: *const hts_idx_t, itr: *mut hts_itr_t) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn hts_itr_multi_bam(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn setlinebuf(__stream: *mut FILE); } -extern "C" { - pub fn hts_itr_multi_cram(idx: *const hts_idx_t, iter: *mut hts_itr_t) - -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn fprintf( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_itr_regions( - idx: *const hts_idx_t, - reglist: *mut hts_reglist_t, - count: ::std::os::raw::c_int, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_specific: hts_itr_multi_query_func, - readrec: hts_readrec_func, - seek: hts_seek_func, - tell: hts_tell_func, - ) -> *mut hts_itr_t; +unsafe extern "C" { + pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_itr_multi_next( - fd: *mut htsFile, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, +unsafe extern "C" { + pub fn sprintf( + __s: *mut ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_reglist_create( - argv: *mut *mut ::std::os::raw::c_char, - argc: ::std::os::raw::c_int, - r_count: *mut ::std::os::raw::c_int, - hdr: *mut ::std::os::raw::c_void, - getid: hts_name2id_f, - ) -> *mut hts_reglist_t; +unsafe extern "C" { + pub fn vfprintf( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_reglist_free(reglist: *mut hts_reglist_t, count: ::std::os::raw::c_int); +unsafe extern "C" { + pub fn vprintf( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_file_type(fname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn vsprintf( + __s: *mut ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct errmod_t { - _unused: [u8; 0], +unsafe extern "C" { + pub fn snprintf( + __s: *mut ::std::os::raw::c_char, + __maxlen: ::std::os::raw::c_ulong, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn errmod_init(depcorr: f64) -> *mut errmod_t; +unsafe extern "C" { + pub fn vsnprintf( + __s: *mut ::std::os::raw::c_char, + __maxlen: ::std::os::raw::c_ulong, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn errmod_destroy(em: *mut errmod_t); +unsafe extern "C" { + pub fn vdprintf( + __fd: ::std::os::raw::c_int, + __fmt: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn errmod_cal( - em: *const errmod_t, - n: ::std::os::raw::c_int, - m: ::std::os::raw::c_int, - bases: *mut u16, - q: *mut f32, +unsafe extern "C" { + pub fn dprintf( + __fd: ::std::os::raw::c_int, + __fmt: *const ::std::os::raw::c_char, + ... ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct probaln_par_t { - pub d: f32, - pub e: f32, - pub bw: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn fscanf( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_probaln_par_t() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(probaln_par_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(probaln_par_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(e) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bw as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(bw) - ) - ); +unsafe extern "C" { + pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; } -extern "C" { - pub fn probaln_glocal( - ref_: *const u8, - l_ref: ::std::os::raw::c_int, - query: *const u8, - l_query: ::std::os::raw::c_int, - iqual: *const u8, - c: *const probaln_par_t, - state: *mut ::std::os::raw::c_int, - q: *mut u8, +unsafe extern "C" { + pub fn sscanf( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_md5_context { - _unused: [u8; 0], +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_fscanf"] + pub fn fscanf1( + __stream: *mut FILE, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_init() -> *mut hts_md5_context; +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_scanf"] + pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_update( - ctx: *mut hts_md5_context, - data: *const ::std::os::raw::c_void, - size: ::std::os::raw::c_ulong, - ); +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_sscanf"] + pub fn sscanf1( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_final(digest: *mut ::std::os::raw::c_uchar, ctx: *mut hts_md5_context); +unsafe extern "C" { + pub fn vfscanf( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_reset(ctx: *mut hts_md5_context); +unsafe extern "C" { + pub fn vscanf( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_hex(hex: *mut ::std::os::raw::c_char, digest: *const ::std::os::raw::c_uchar); +unsafe extern "C" { + pub fn vsscanf( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_md5_destroy(ctx: *mut hts_md5_context); +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_vfscanf"] + pub fn vfscanf1( + __s: *mut FILE, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __assert_fail( - __assertion: *const ::std::os::raw::c_char, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_uint, - __function: *const ::std::os::raw::c_char, - ); +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_vscanf"] + pub fn vscanf1( + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __assert_perror_fail( - __errnum: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_uint, - __function: *const ::std::os::raw::c_char, - ); +unsafe extern "C" { + #[link_name = "\u{1}__isoc99_vsscanf"] + pub fn vsscanf1( + __s: *const ::std::os::raw::c_char, + __format: *const ::std::os::raw::c_char, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __assert( - __assertion: *const ::std::os::raw::c_char, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_int, - ); +unsafe extern "C" { + pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __errno_location() -> *mut ::std::os::raw::c_int; +unsafe extern "C" { + pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub __wait_terminated: wait__bindgen_ty_1, - pub __wait_stopped: wait__bindgen_ty_2, - _bindgen_union_align: u32, +unsafe extern "C" { + pub fn getchar() -> ::std::os::raw::c_int; } -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); +unsafe extern "C" { + pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -impl wait__bindgen_ty_1 { - #[inline] - pub fn __w_termsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set___w_termsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn __w_coredump(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set___w_coredump(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn __w_retcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_retcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __w_termsig: ::std::os::raw::c_uint, - __w_coredump: ::std::os::raw::c_uint, - __w_retcode: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let __w_termsig: u32 = unsafe { ::std::mem::transmute(__w_termsig) }; - __w_termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let __w_coredump: u32 = unsafe { ::std::mem::transmute(__w_coredump) }; - __w_coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let __w_retcode: u32 = unsafe { ::std::mem::transmute(__w_retcode) }; - __w_retcode as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); +unsafe extern "C" { + pub fn getchar_unlocked() -> ::std::os::raw::c_int; } -impl wait__bindgen_ty_2 { - #[inline] - pub fn __w_stopval(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_stopval(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn __w_stopsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_stopsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __w_stopval: ::std::os::raw::c_uint, - __w_stopsig: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let __w_stopval: u32 = unsafe { ::std::mem::transmute(__w_stopval) }; - __w_stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let __w_stopsig: u32 = unsafe { ::std::mem::transmute(__w_stopsig) }; - __w_stopsig as u64 - }); - __bindgen_bitfield_unit - } +unsafe extern "C" { + pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_wait() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__wait_terminated as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(__wait_terminated) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__wait_stopped as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(__wait_stopped) - ) - ); +unsafe extern "C" { + pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union __WAIT_STATUS { - pub __uptr: *mut wait, - pub __iptr: *mut ::std::os::raw::c_int, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout___WAIT_STATUS() { - assert_eq!( - ::std::mem::size_of::<__WAIT_STATUS>(), - 8usize, - concat!("Size of: ", stringify!(__WAIT_STATUS)) - ); - assert_eq!( - ::std::mem::align_of::<__WAIT_STATUS>(), - 8usize, - concat!("Alignment of ", stringify!(__WAIT_STATUS)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__WAIT_STATUS>())).__uptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__WAIT_STATUS), - "::", - stringify!(__uptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__WAIT_STATUS>())).__iptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__WAIT_STATUS), - "::", - stringify!(__iptr) - ) - ); +unsafe extern "C" { + pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_div_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); +unsafe extern "C" { + pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) + -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, +unsafe extern "C" { + pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_ldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); +unsafe extern "C" { + pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, +unsafe extern "C" { + pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_lldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); +unsafe extern "C" { + pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __ctype_get_mb_cur_max() -> size_t; +unsafe extern "C" { + pub fn fgets( + __s: *mut ::std::os::raw::c_char, + __n: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; +unsafe extern "C" { + pub fn __getdelim( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __delimiter: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> __ssize_t; } -extern "C" { - pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn getdelim( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __delimiter: ::std::os::raw::c_int, + __stream: *mut FILE, + ) -> __ssize_t; } -extern "C" { - pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +unsafe extern "C" { + pub fn getline( + __lineptr: *mut *mut ::std::os::raw::c_char, + __n: *mut usize, + __stream: *mut FILE, + ) -> __ssize_t; } -extern "C" { - pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; +unsafe extern "C" { + pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strtod( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f64; +unsafe extern "C" { + pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strtof( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f32; +unsafe extern "C" { + pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strtol( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; +unsafe extern "C" { + pub fn fread( + __ptr: *mut ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + __n: ::std::os::raw::c_ulong, + __stream: *mut FILE, + ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn strtoul( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn fwrite( + __ptr: *const ::std::os::raw::c_void, + __size: ::std::os::raw::c_ulong, + __n: ::std::os::raw::c_ulong, + __s: *mut FILE, ) -> ::std::os::raw::c_ulong; } -extern "C" { - pub fn strtoq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; +unsafe extern "C" { + pub fn fread_unlocked( + __ptr: *mut ::std::os::raw::c_void, + __size: usize, + __n: usize, + __stream: *mut FILE, + ) -> usize; } -extern "C" { - pub fn strtouq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; +unsafe extern "C" { + pub fn fwrite_unlocked( + __ptr: *const ::std::os::raw::c_void, + __size: usize, + __n: usize, + __stream: *mut FILE, + ) -> usize; } -extern "C" { - pub fn strtoll( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; +unsafe extern "C" { + pub fn fseek( + __stream: *mut FILE, + __off: ::std::os::raw::c_long, + __whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strtoull( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; +unsafe extern "C" { + pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; } -extern "C" { - pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn rewind(__stream: *mut FILE); } -extern "C" { - pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +unsafe extern "C" { + pub fn fseeko( + __stream: *mut FILE, + __off: __off_t, + __whence: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } -pub type u_char = __u_char; -pub type u_short = __u_short; -pub type u_int = __u_int; -pub type u_long = __u_long; -pub type quad_t = __quad_t; -pub type u_quad_t = __u_quad_t; -pub type fsid_t = __fsid_t; -pub type loff_t = __loff_t; -pub type ino_t = __ino_t; -pub type dev_t = __dev_t; -pub type gid_t = __gid_t; -pub type mode_t = __mode_t; -pub type nlink_t = __nlink_t; -pub type uid_t = __uid_t; -pub type pid_t = __pid_t; -pub type id_t = __id_t; -pub type daddr_t = __daddr_t; -pub type caddr_t = __caddr_t; -pub type key_t = __key_t; -pub type clock_t = __clock_t; -pub type time_t = __time_t; -pub type clockid_t = __clockid_t; -pub type timer_t = __timer_t; -pub type ulong = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulong; -pub type register_t = ::std::os::raw::c_long; -pub type __sig_atomic_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sigset_t { - pub __val: [::std::os::raw::c_ulong; 16usize], +unsafe extern "C" { + pub fn ftello(__stream: *mut FILE) -> __off_t; } -#[test] -fn bindgen_test_layout___sigset_t() { - assert_eq!( - ::std::mem::size_of::<__sigset_t>(), - 128usize, - concat!("Size of: ", stringify!(__sigset_t)) - ); - assert_eq!( - ::std::mem::align_of::<__sigset_t>(), - 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) - ); +unsafe extern "C" { + pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; } -pub type sigset_t = __sigset_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); +unsafe extern "C" { + pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __time_t, - pub tv_usec: __suseconds_t, +unsafe extern "C" { + pub fn clearerr(__stream: *mut FILE); } -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); +unsafe extern "C" { + pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; } -pub type suseconds_t = __suseconds_t; -pub type __fd_mask = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub __fds_bits: [__fd_mask; 16usize], +unsafe extern "C" { + pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_fd_set() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) - ); +unsafe extern "C" { + pub fn clearerr_unlocked(__stream: *mut FILE); } -pub type fd_mask = __fd_mask; -extern "C" { - pub fn select( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *mut timeval, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn pselect( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *const timespec, - __sigmask: *const __sigset_t, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { - pub fn gnu_dev_major(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; +unsafe extern "C" { + pub fn perror(__s: *const ::std::os::raw::c_char); } -extern "C" { - pub fn gnu_dev_minor(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; +unsafe extern "C" { + pub static mut sys_nerr: ::std::os::raw::c_int; } -extern "C" { - pub fn gnu_dev_makedev( - __major: ::std::os::raw::c_uint, - __minor: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_ulonglong; +unsafe extern "C" { + pub static sys_errlist: [*const ::std::os::raw::c_char; 0usize]; } -pub type blksize_t = __blksize_t; -pub type blkcnt_t = __blkcnt_t; -pub type fsblkcnt_t = __fsblkcnt_t; -pub type fsfilcnt_t = __fsfilcnt_t; -pub type pthread_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[test] -fn bindgen_test_layout_pthread_attr_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) - ); +unsafe extern "C" { + pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, +unsafe extern "C" { + pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout___pthread_internal_list() { - assert_eq!( - ::std::mem::size_of::<__pthread_internal_list>(), - 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_internal_list>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) - ); +unsafe extern "C" { + pub fn popen( + __command: *const ::std::os::raw::c_char, + __modes: *const ::std::os::raw::c_char, + ) -> *mut FILE; } -pub type __pthread_list_t = __pthread_internal_list; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: pthread_mutex_t___pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 5usize], +unsafe extern "C" { + pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pthread_mutex_t___pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_int, - pub __list: __pthread_list_t, +unsafe extern "C" { + pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -#[test] -fn bindgen_test_layout_pthread_mutex_t___pthread_mutex_s() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t___pthread_mutex_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(pthread_mutex_t___pthread_mutex_s) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__count as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__owner as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__owner) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nusers as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__nusers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__kind as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__kind) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__spins as *const _ - as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__spins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__list as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__list) - ) - ); +unsafe extern "C" { + pub fn flockfile(__stream: *mut FILE); } -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) - ); +unsafe extern "C" { + pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_mutexattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) - ); +unsafe extern "C" { + pub fn funlockfile(__stream: *mut FILE); } -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: pthread_cond_t__bindgen_ty_1, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 6usize], +unsafe extern "C" { + pub fn __errno_location() -> *mut ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct pthread_cond_t__bindgen_ty_1 { - pub __lock: ::std::os::raw::c_int, - pub __futex: ::std::os::raw::c_uint, - pub __total_seq: ::std::os::raw::c_ulonglong, - pub __wakeup_seq: ::std::os::raw::c_ulonglong, - pub __woken_seq: ::std::os::raw::c_ulonglong, - pub __mutex: *mut ::std::os::raw::c_void, - pub __nwaiters: ::std::os::raw::c_uint, - pub __broadcast_seq: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_pthread_cond_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__futex as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__futex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__total_seq as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__total_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__wakeup_seq as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__wakeup_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__woken_seq as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__woken_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__mutex as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__mutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nwaiters as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__nwaiters) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__broadcast_seq as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__broadcast_seq) - ) - ); -} -#[test] -fn bindgen_test_layout_pthread_cond_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) - ); +pub struct kstring_t { + pub l: usize, + pub m: usize, + pub s: *mut ::std::os::raw::c_char, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kstring_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kstring_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kstring_t::l"][::std::mem::offset_of!(kstring_t, l) - 0usize]; + ["Offset of field: kstring_t::m"][::std::mem::offset_of!(kstring_t, m) - 8usize]; + ["Offset of field: kstring_t::s"][::std::mem::offset_of!(kstring_t, s) - 16usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_condattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) - ); +#[derive(Debug, Copy, Clone)] +pub struct ks_tokaux_t { + pub tab: [u64; 4usize], + pub sep: ::std::os::raw::c_int, + pub finished: ::std::os::raw::c_int, + pub p: *const ::std::os::raw::c_char, } -pub type pthread_key_t = ::std::os::raw::c_uint; -pub type pthread_once_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlock_t { - pub __data: pthread_rwlock_t__bindgen_ty_1, - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ks_tokaux_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of ks_tokaux_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ks_tokaux_t::tab"][::std::mem::offset_of!(ks_tokaux_t, tab) - 0usize]; + ["Offset of field: ks_tokaux_t::sep"][::std::mem::offset_of!(ks_tokaux_t, sep) - 32usize]; + ["Offset of field: ks_tokaux_t::finished"] + [::std::mem::offset_of!(ks_tokaux_t, finished) - 36usize]; + ["Offset of field: ks_tokaux_t::p"][::std::mem::offset_of!(ks_tokaux_t, p) - 40usize]; +}; +unsafe extern "C" { + pub fn kvsprintf( + s: *mut kstring_t, + fmt: *const ::std::os::raw::c_char, + ap: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pthread_rwlock_t__bindgen_ty_1 { - pub __lock: ::std::os::raw::c_int, - pub __nr_readers: ::std::os::raw::c_uint, - pub __readers_wakeup: ::std::os::raw::c_uint, - pub __writer_wakeup: ::std::os::raw::c_uint, - pub __nr_readers_queued: ::std::os::raw::c_uint, - pub __nr_writers_queued: ::std::os::raw::c_uint, - pub __writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __pad1: ::std::os::raw::c_ulong, - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, +unsafe extern "C" { + pub fn ksprintf( + s: *mut kstring_t, + fmt: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_pthread_rwlock_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_readers as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_readers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__readers_wakeup as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__readers_wakeup) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__writer_wakeup as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__writer_wakeup) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_readers_queued - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_readers_queued) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_writers_queued - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_writers_queued) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__writer as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__writer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__shared as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__shared) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__pad1 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__pad2 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__flags as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__flags) - ) - ); +unsafe extern "C" { + pub fn kputd(d: f64, s: *mut kstring_t) -> ::std::os::raw::c_int; } -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) - ); +unsafe extern "C" { + pub fn ksplit_core( + s: *mut ::std::os::raw::c_char, + delimiter: ::std::os::raw::c_int, + _max: *mut ::std::os::raw::c_int, + _offsets: *mut *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlockattr_t { - pub __size: [::std::os::raw::c_char; 8usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_pthread_rwlockattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type pthread_spinlock_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 4usize], -} -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_barrierattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) - ); -} -extern "C" { - pub fn random() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn srandom(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn initstate( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: size_t, +unsafe extern "C" { + pub fn kstrstr( + str_: *const ::std::os::raw::c_char, + pat: *const ::std::os::raw::c_char, + _prep: *mut *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct random_data { - pub fptr: *mut i32, - pub rptr: *mut i32, - pub state: *mut i32, - pub rand_type: ::std::os::raw::c_int, - pub rand_deg: ::std::os::raw::c_int, - pub rand_sep: ::std::os::raw::c_int, - pub end_ptr: *mut i32, -} -#[test] -fn bindgen_test_layout_random_data() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(random_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(random_data)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_type as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_deg as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) - ); +unsafe extern "C" { + pub fn kstrnstr( + str_: *const ::std::os::raw::c_char, + pat: *const ::std::os::raw::c_char, + n: ::std::os::raw::c_int, + _prep: *mut *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn kmemmem( + _str: *const ::std::os::raw::c_void, + n: ::std::os::raw::c_int, + _pat: *const ::std::os::raw::c_void, + m: ::std::os::raw::c_int, + _prep: *mut *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn srandom_r( - __seed: ::std::os::raw::c_uint, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn kstrtok( + str_: *const ::std::os::raw::c_char, + sep: *const ::std::os::raw::c_char, + aux: *mut ks_tokaux_t, + ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn initstate_r( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: size_t, - __buf: *mut random_data, +pub type kgets_func = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + arg3: *mut ::std::os::raw::c_void, + ) -> *mut ::std::os::raw::c_char, +>; +unsafe extern "C" { + pub fn kgetline( + s: *mut kstring_t, + fgets_fn: kgets_func, + fp: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn setstate_r( - __statebuf: *mut ::std::os::raw::c_char, - __buf: *mut random_data, +pub type kgets_func2 = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_char, + arg2: usize, + arg3: *mut ::std::os::raw::c_void, + ) -> isize, +>; +unsafe extern "C" { + pub fn kgetline2( + s: *mut kstring_t, + fgets_fn: kgets_func2, + fp: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn rand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn drand48() -> f64; -} -extern "C" { - pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; -} -extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_fd { + _unused: [u8; 0], } -extern "C" { - pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_tpool { + _unused: [u8; 0], } -extern "C" { - pub fn srand48(__seedval: ::std::os::raw::c_long); +unsafe extern "C" { + pub fn hts_resize_array_( + arg1: usize, + arg2: usize, + arg3: usize, + arg4: *mut ::std::os::raw::c_void, + arg5: *mut *mut ::std::os::raw::c_void, + arg6: ::std::os::raw::c_int, + arg7: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; +unsafe extern "C" { + pub fn hts_lib_shutdown(); } -extern "C" { - pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); +unsafe extern "C" { + pub fn hts_free(ptr: *mut ::std::os::raw::c_void); } +pub const htsFormatCategory_unknown_category: htsFormatCategory = 0; +pub const htsFormatCategory_sequence_data: htsFormatCategory = 1; +pub const htsFormatCategory_variant_data: htsFormatCategory = 2; +pub const htsFormatCategory_index_file: htsFormatCategory = 3; +pub const htsFormatCategory_region_list: htsFormatCategory = 4; +pub const htsFormatCategory_category_maximum: htsFormatCategory = 32767; +pub type htsFormatCategory = ::std::os::raw::c_uint; +pub const htsExactFormat_unknown_format: htsExactFormat = 0; +pub const htsExactFormat_binary_format: htsExactFormat = 1; +pub const htsExactFormat_text_format: htsExactFormat = 2; +pub const htsExactFormat_sam: htsExactFormat = 3; +pub const htsExactFormat_bam: htsExactFormat = 4; +pub const htsExactFormat_bai: htsExactFormat = 5; +pub const htsExactFormat_cram: htsExactFormat = 6; +pub const htsExactFormat_crai: htsExactFormat = 7; +pub const htsExactFormat_vcf: htsExactFormat = 8; +pub const htsExactFormat_bcf: htsExactFormat = 9; +pub const htsExactFormat_csi: htsExactFormat = 10; +pub const htsExactFormat_gzi: htsExactFormat = 11; +pub const htsExactFormat_tbi: htsExactFormat = 12; +pub const htsExactFormat_bed: htsExactFormat = 13; +pub const htsExactFormat_htsget: htsExactFormat = 14; +pub const htsExactFormat_json: htsExactFormat = 14; +pub const htsExactFormat_empty_format: htsExactFormat = 15; +pub const htsExactFormat_fasta_format: htsExactFormat = 16; +pub const htsExactFormat_fastq_format: htsExactFormat = 17; +pub const htsExactFormat_fai_format: htsExactFormat = 18; +pub const htsExactFormat_fqi_format: htsExactFormat = 19; +pub const htsExactFormat_hts_crypt4gh_format: htsExactFormat = 20; +pub const htsExactFormat_d4_format: htsExactFormat = 21; +pub const htsExactFormat_format_maximum: htsExactFormat = 32767; +pub type htsExactFormat = ::std::os::raw::c_uint; +pub const htsCompression_no_compression: htsCompression = 0; +pub const htsCompression_gzip: htsCompression = 1; +pub const htsCompression_bgzf: htsCompression = 2; +pub const htsCompression_custom: htsCompression = 3; +pub const htsCompression_bzip2_compression: htsCompression = 4; +pub const htsCompression_razf_compression: htsCompression = 5; +pub const htsCompression_xz_compression: htsCompression = 6; +pub const htsCompression_zstd_compression: htsCompression = 7; +pub const htsCompression_compression_maximum: htsCompression = 32767; +pub type htsCompression = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct drand48_data { - pub __x: [::std::os::raw::c_ushort; 3usize], - pub __old_x: [::std::os::raw::c_ushort; 3usize], - pub __c: ::std::os::raw::c_ushort, - pub __init: ::std::os::raw::c_ushort, - pub __a: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_drand48_data() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(drand48_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(drand48_data)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__old_x as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__c as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__init as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__a as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) - ); -} -extern "C" { - pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; +pub struct htsFormat { + pub category: htsFormatCategory, + pub format: htsExactFormat, + pub version: htsFormat__bindgen_ty_1, + pub compression: htsCompression, + pub compression_level: ::std::os::raw::c_short, + pub specific: *mut ::std::os::raw::c_void, } -extern "C" { - pub fn erand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut f64, - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct htsFormat__bindgen_ty_1 { + pub major: ::std::os::raw::c_short, + pub minor: ::std::os::raw::c_short, } -extern "C" { - pub fn lrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFormat__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of htsFormat__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: htsFormat__bindgen_ty_1::major"] + [::std::mem::offset_of!(htsFormat__bindgen_ty_1, major) - 0usize]; + ["Offset of field: htsFormat__bindgen_ty_1::minor"] + [::std::mem::offset_of!(htsFormat__bindgen_ty_1, minor) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFormat"][::std::mem::size_of::() - 32usize]; + ["Alignment of htsFormat"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFormat::category"][::std::mem::offset_of!(htsFormat, category) - 0usize]; + ["Offset of field: htsFormat::format"][::std::mem::offset_of!(htsFormat, format) - 4usize]; + ["Offset of field: htsFormat::version"][::std::mem::offset_of!(htsFormat, version) - 8usize]; + ["Offset of field: htsFormat::compression"] + [::std::mem::offset_of!(htsFormat, compression) - 12usize]; + ["Offset of field: htsFormat::compression_level"] + [::std::mem::offset_of!(htsFormat, compression_level) - 16usize]; + ["Offset of field: htsFormat::specific"][::std::mem::offset_of!(htsFormat, specific) - 24usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_idx_t { + _unused: [u8; 0], } -extern "C" { - pub fn nrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_filter_t { + _unused: [u8; 0], } -extern "C" { - pub fn mrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct htsFile { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub lineno: i64, + pub line: kstring_t, + pub fn_: *mut ::std::os::raw::c_char, + pub fn_aux: *mut ::std::os::raw::c_char, + pub fp: htsFile__bindgen_ty_1, + pub state: *mut ::std::os::raw::c_void, + pub format: htsFormat, + pub idx: *mut hts_idx_t, + pub fnidx: *const ::std::os::raw::c_char, + pub bam_header: *mut sam_hdr_t, + pub filter: *mut hts_filter_t, } -extern "C" { - pub fn jrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union htsFile__bindgen_ty_1 { + pub bgzf: *mut BGZF, + pub cram: *mut cram_fd, + pub hfile: *mut hFILE, } -extern "C" { - pub fn srand48_r( - __seedval: ::std::os::raw::c_long, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFile__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of htsFile__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFile__bindgen_ty_1::bgzf"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, bgzf) - 0usize]; + ["Offset of field: htsFile__bindgen_ty_1::cram"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, cram) - 0usize]; + ["Offset of field: htsFile__bindgen_ty_1::hfile"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, hfile) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFile"][::std::mem::size_of::() - 136usize]; + ["Alignment of htsFile"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFile::lineno"][::std::mem::offset_of!(htsFile, lineno) - 8usize]; + ["Offset of field: htsFile::line"][::std::mem::offset_of!(htsFile, line) - 16usize]; + ["Offset of field: htsFile::fn_"][::std::mem::offset_of!(htsFile, fn_) - 40usize]; + ["Offset of field: htsFile::fn_aux"][::std::mem::offset_of!(htsFile, fn_aux) - 48usize]; + ["Offset of field: htsFile::fp"][::std::mem::offset_of!(htsFile, fp) - 56usize]; + ["Offset of field: htsFile::state"][::std::mem::offset_of!(htsFile, state) - 64usize]; + ["Offset of field: htsFile::format"][::std::mem::offset_of!(htsFile, format) - 72usize]; + ["Offset of field: htsFile::idx"][::std::mem::offset_of!(htsFile, idx) - 104usize]; + ["Offset of field: htsFile::fnidx"][::std::mem::offset_of!(htsFile, fnidx) - 112usize]; + ["Offset of field: htsFile::bam_header"] + [::std::mem::offset_of!(htsFile, bam_header) - 120usize]; + ["Offset of field: htsFile::filter"][::std::mem::offset_of!(htsFile, filter) - 128usize]; +}; +impl htsFile { + #[inline] + pub fn is_bin(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_bin(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_bin_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_bin_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_write(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_write(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_write_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_write_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_be(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_be(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_be_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_be_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_cram(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_cram(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_cram_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_cram_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_bgzf(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_bgzf(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_bgzf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_bgzf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dummy(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } + } + #[inline] + pub fn set_dummy(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 27u8, val as u64) + } + } + #[inline] + pub unsafe fn dummy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dummy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + is_bin: u32, + is_write: u32, + is_be: u32, + is_cram: u32, + is_bgzf: u32, + dummy: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let is_bin: u32 = unsafe { ::std::mem::transmute(is_bin) }; + is_bin as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; + is_write as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; + is_be as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; + is_cram as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let is_bgzf: u32 = unsafe { ::std::mem::transmute(is_bgzf) }; + is_bgzf as u64 + }); + __bindgen_bitfield_unit.set(5usize, 27u8, { + let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; + dummy as u64 + }); + __bindgen_bitfield_unit + } } -extern "C" { - pub fn seed48_r( - __seed16v: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct htsThreadPool { + pub pool: *mut hts_tpool, + pub qsize: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsThreadPool"][::std::mem::size_of::() - 16usize]; + ["Alignment of htsThreadPool"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsThreadPool::pool"][::std::mem::offset_of!(htsThreadPool, pool) - 0usize]; + ["Offset of field: htsThreadPool::qsize"] + [::std::mem::offset_of!(htsThreadPool, qsize) - 8usize]; +}; +pub const sam_fields_SAM_QNAME: sam_fields = 1; +pub const sam_fields_SAM_FLAG: sam_fields = 2; +pub const sam_fields_SAM_RNAME: sam_fields = 4; +pub const sam_fields_SAM_POS: sam_fields = 8; +pub const sam_fields_SAM_MAPQ: sam_fields = 16; +pub const sam_fields_SAM_CIGAR: sam_fields = 32; +pub const sam_fields_SAM_RNEXT: sam_fields = 64; +pub const sam_fields_SAM_PNEXT: sam_fields = 128; +pub const sam_fields_SAM_TLEN: sam_fields = 256; +pub const sam_fields_SAM_SEQ: sam_fields = 512; +pub const sam_fields_SAM_QUAL: sam_fields = 1024; +pub const sam_fields_SAM_AUX: sam_fields = 2048; +pub const sam_fields_SAM_RGAUX: sam_fields = 4096; +pub type sam_fields = ::std::os::raw::c_uint; +pub const hts_fmt_option_CRAM_OPT_DECODE_MD: hts_fmt_option = 0; +pub const hts_fmt_option_CRAM_OPT_PREFIX: hts_fmt_option = 1; +pub const hts_fmt_option_CRAM_OPT_VERBOSITY: hts_fmt_option = 2; +pub const hts_fmt_option_CRAM_OPT_SEQS_PER_SLICE: hts_fmt_option = 3; +pub const hts_fmt_option_CRAM_OPT_SLICES_PER_CONTAINER: hts_fmt_option = 4; +pub const hts_fmt_option_CRAM_OPT_RANGE: hts_fmt_option = 5; +pub const hts_fmt_option_CRAM_OPT_VERSION: hts_fmt_option = 6; +pub const hts_fmt_option_CRAM_OPT_EMBED_REF: hts_fmt_option = 7; +pub const hts_fmt_option_CRAM_OPT_IGNORE_MD5: hts_fmt_option = 8; +pub const hts_fmt_option_CRAM_OPT_REFERENCE: hts_fmt_option = 9; +pub const hts_fmt_option_CRAM_OPT_MULTI_SEQ_PER_SLICE: hts_fmt_option = 10; +pub const hts_fmt_option_CRAM_OPT_NO_REF: hts_fmt_option = 11; +pub const hts_fmt_option_CRAM_OPT_USE_BZIP2: hts_fmt_option = 12; +pub const hts_fmt_option_CRAM_OPT_SHARED_REF: hts_fmt_option = 13; +pub const hts_fmt_option_CRAM_OPT_NTHREADS: hts_fmt_option = 14; +pub const hts_fmt_option_CRAM_OPT_THREAD_POOL: hts_fmt_option = 15; +pub const hts_fmt_option_CRAM_OPT_USE_LZMA: hts_fmt_option = 16; +pub const hts_fmt_option_CRAM_OPT_USE_RANS: hts_fmt_option = 17; +pub const hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS: hts_fmt_option = 18; +pub const hts_fmt_option_CRAM_OPT_LOSSY_NAMES: hts_fmt_option = 19; +pub const hts_fmt_option_CRAM_OPT_BASES_PER_SLICE: hts_fmt_option = 20; +pub const hts_fmt_option_CRAM_OPT_STORE_MD: hts_fmt_option = 21; +pub const hts_fmt_option_CRAM_OPT_STORE_NM: hts_fmt_option = 22; +pub const hts_fmt_option_CRAM_OPT_RANGE_NOSEEK: hts_fmt_option = 23; +pub const hts_fmt_option_CRAM_OPT_USE_TOK: hts_fmt_option = 24; +pub const hts_fmt_option_CRAM_OPT_USE_FQZ: hts_fmt_option = 25; +pub const hts_fmt_option_CRAM_OPT_USE_ARITH: hts_fmt_option = 26; +pub const hts_fmt_option_CRAM_OPT_POS_DELTA: hts_fmt_option = 27; +pub const hts_fmt_option_HTS_OPT_COMPRESSION_LEVEL: hts_fmt_option = 100; +pub const hts_fmt_option_HTS_OPT_NTHREADS: hts_fmt_option = 101; +pub const hts_fmt_option_HTS_OPT_THREAD_POOL: hts_fmt_option = 102; +pub const hts_fmt_option_HTS_OPT_CACHE_SIZE: hts_fmt_option = 103; +pub const hts_fmt_option_HTS_OPT_BLOCK_SIZE: hts_fmt_option = 104; +pub const hts_fmt_option_HTS_OPT_FILTER: hts_fmt_option = 105; +pub const hts_fmt_option_HTS_OPT_PROFILE: hts_fmt_option = 106; +pub const hts_fmt_option_FASTQ_OPT_CASAVA: hts_fmt_option = 1000; +pub const hts_fmt_option_FASTQ_OPT_AUX: hts_fmt_option = 1001; +pub const hts_fmt_option_FASTQ_OPT_RNUM: hts_fmt_option = 1002; +pub const hts_fmt_option_FASTQ_OPT_BARCODE: hts_fmt_option = 1003; +pub const hts_fmt_option_FASTQ_OPT_NAME2: hts_fmt_option = 1004; +pub type hts_fmt_option = ::std::os::raw::c_uint; +pub const hts_profile_option_HTS_PROFILE_FAST: hts_profile_option = 0; +pub const hts_profile_option_HTS_PROFILE_NORMAL: hts_profile_option = 1; +pub const hts_profile_option_HTS_PROFILE_SMALL: hts_profile_option = 2; +pub const hts_profile_option_HTS_PROFILE_ARCHIVE: hts_profile_option = 3; +pub type hts_profile_option = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hts_opt { + pub arg: *mut ::std::os::raw::c_char, + pub opt: hts_fmt_option, + pub val: hts_opt__bindgen_ty_1, + pub next: *mut hts_opt, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hts_opt__bindgen_ty_1 { + pub i: ::std::os::raw::c_int, + pub s: *mut ::std::os::raw::c_char, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_opt__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of hts_opt__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_opt__bindgen_ty_1::i"] + [::std::mem::offset_of!(hts_opt__bindgen_ty_1, i) - 0usize]; + ["Offset of field: hts_opt__bindgen_ty_1::s"] + [::std::mem::offset_of!(hts_opt__bindgen_ty_1, s) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_opt"][::std::mem::size_of::() - 32usize]; + ["Alignment of hts_opt"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_opt::arg"][::std::mem::offset_of!(hts_opt, arg) - 0usize]; + ["Offset of field: hts_opt::opt"][::std::mem::offset_of!(hts_opt, opt) - 8usize]; + ["Offset of field: hts_opt::val"][::std::mem::offset_of!(hts_opt, val) - 16usize]; + ["Offset of field: hts_opt::next"][::std::mem::offset_of!(hts_opt, next) - 24usize]; +}; +unsafe extern "C" { + pub fn hts_opt_add( + opts: *mut *mut hts_opt, + c_arg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn lcong48_r( - __param: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, +unsafe extern "C" { + pub fn hts_opt_apply(fp: *mut htsFile, opts: *mut hts_opt) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hts_opt_free(opts: *mut hts_opt); +} +unsafe extern "C" { + pub fn hts_parse_format( + opt: *mut htsFormat, + str_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_parse_opt_list( + opt: *mut htsFormat, + str_: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn calloc( - __nmemb: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub static seq_nt16_table: [::std::os::raw::c_uchar; 256usize]; } -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub static seq_nt16_str: [::std::os::raw::c_char; 0usize]; } -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); +unsafe extern "C" { + pub static seq_nt16_int: [::std::os::raw::c_int; 0usize]; } -extern "C" { - pub fn cfree(__ptr: *mut ::std::os::raw::c_void); +unsafe extern "C" { + pub fn hts_version() -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_features() -> ::std::os::raw::c_uint; } -extern "C" { - pub fn valloc(__size: size_t) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_test_feature(id: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: size_t, - __size: size_t, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_feature_string() -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn abort(); +unsafe extern "C" { + pub fn hts_detect_format(fp: *mut hFILE, fmt: *mut htsFormat) -> ::std::os::raw::c_int; } -extern "C" { - pub fn atexit(__func: ::std::option::Option) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_detect_format2( + fp: *mut hFILE, + fname: *const ::std::os::raw::c_char, + fmt: *mut htsFormat, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn on_exit( - __func: ::std::option::Option< - unsafe extern "C" fn( - __status: ::std::os::raw::c_int, - __arg: *mut ::std::os::raw::c_void, - ), - >, - __arg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn _Exit(__status: ::std::os::raw::c_int); +unsafe extern "C" { + pub fn hts_format_description(format: *const htsFormat) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_open( + fn_: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + ) -> *mut htsFile; } -extern "C" { - pub fn __secure_getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_open_format( + fn_: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + fmt: *const htsFormat, + ) -> *mut htsFile; } -extern "C" { - pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_hopen( + fp: *mut hFILE, + fn_: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + ) -> *mut htsFile; } -extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __replace: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_flush(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { - pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_close(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { - pub fn clearenv() -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_get_format(fp: *mut htsFile) -> *const htsFormat; } -extern "C" { - pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_format_file_extension(format: *const htsFormat) -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_set_opt(fp: *mut htsFile, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; } -extern "C" { - pub fn mkstemps( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, +unsafe extern "C" { + pub fn hts_getline( + fp: *mut htsFile, + delimiter: ::std::os::raw::c_int, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn realpath( - __name: *const ::std::os::raw::c_char, - __resolved: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -pub type __compar_fn_t = ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nmemb: size_t, - __size: size_t, - __compar: __compar_fn_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nmemb: size_t, - __size: size_t, - __compar: __compar_fn_t, - ); -} -extern "C" { - pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn lldiv( - __numer: ::std::os::raw::c_longlong, - __denom: ::std::os::raw::c_longlong, - ) -> lldiv_t; -} -extern "C" { - pub fn ecvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_readlines( + fn_: *const ::std::os::raw::c_char, + _n: *mut ::std::os::raw::c_int, + ) -> *mut *mut ::std::os::raw::c_char; } -extern "C" { - pub fn gcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_readlist( + fn_: *const ::std::os::raw::c_char, + is_file: ::std::os::raw::c_int, + _n: *mut ::std::os::raw::c_int, + ) -> *mut *mut ::std::os::raw::c_char; } -extern "C" { - pub fn qecvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_set_threads(fp: *mut htsFile, n: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { - pub fn qfcvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_set_thread_pool(fp: *mut htsFile, p: *mut htsThreadPool) -> ::std::os::raw::c_int; } -extern "C" { - pub fn qgcvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_set_cache_size(fp: *mut htsFile, n: ::std::os::raw::c_int); } -extern "C" { - pub fn ecvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, +unsafe extern "C" { + pub fn hts_set_fai_filename( + fp: *mut htsFile, + fn_aux: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn fcvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, +unsafe extern "C" { + pub fn hts_set_filter_expression( + fp: *mut htsFile, + expr: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn qecvt_r( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_check_EOF(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { - pub fn qfcvt_r( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; +pub type hts_pos_t = i64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_pair_pos_t { + pub beg: hts_pos_t, + pub end: hts_pos_t, } -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair_pos_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_pair_pos_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair_pos_t::beg"][::std::mem::offset_of!(hts_pair_pos_t, beg) - 0usize]; + ["Offset of field: hts_pair_pos_t::end"][::std::mem::offset_of!(hts_pair_pos_t, end) - 8usize]; +}; +pub type hts_pair32_t = hts_pair_pos_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_pair64_t { + pub u: u64, + pub v: u64, } -extern "C" { - pub fn mbtowc( - __pwc: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: size_t, - ) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair64_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_pair64_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair64_t::u"][::std::mem::offset_of!(hts_pair64_t, u) - 0usize]; + ["Offset of field: hts_pair64_t::v"][::std::mem::offset_of!(hts_pair64_t, v) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_pair64_max_t { + pub u: u64, + pub v: u64, + pub max: u64, } -extern "C" { - pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair64_max_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of hts_pair64_max_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair64_max_t::u"][::std::mem::offset_of!(hts_pair64_max_t, u) - 0usize]; + ["Offset of field: hts_pair64_max_t::v"][::std::mem::offset_of!(hts_pair64_max_t, v) - 8usize]; + ["Offset of field: hts_pair64_max_t::max"] + [::std::mem::offset_of!(hts_pair64_max_t, max) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_reglist_t { + pub reg: *const ::std::os::raw::c_char, + pub intervals: *mut hts_pair_pos_t, + pub tid: ::std::os::raw::c_int, + pub count: u32, + pub min_beg: hts_pos_t, + pub max_end: hts_pos_t, } -extern "C" { - pub fn mbstowcs( - __pwcs: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: size_t, - ) -> size_t; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_reglist_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of hts_reglist_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_reglist_t::reg"][::std::mem::offset_of!(hts_reglist_t, reg) - 0usize]; + ["Offset of field: hts_reglist_t::intervals"] + [::std::mem::offset_of!(hts_reglist_t, intervals) - 8usize]; + ["Offset of field: hts_reglist_t::tid"][::std::mem::offset_of!(hts_reglist_t, tid) - 16usize]; + ["Offset of field: hts_reglist_t::count"] + [::std::mem::offset_of!(hts_reglist_t, count) - 20usize]; + ["Offset of field: hts_reglist_t::min_beg"] + [::std::mem::offset_of!(hts_reglist_t, min_beg) - 24usize]; + ["Offset of field: hts_reglist_t::max_end"] + [::std::mem::offset_of!(hts_reglist_t, max_end) - 32usize]; +}; +pub type hts_readrec_func = ::std::option::Option< + unsafe extern "C" fn( + fp: *mut BGZF, + data: *mut ::std::os::raw::c_void, + r: *mut ::std::os::raw::c_void, + tid: *mut ::std::os::raw::c_int, + beg: *mut hts_pos_t, + end: *mut hts_pos_t, + ) -> ::std::os::raw::c_int, +>; +pub type hts_seek_func = ::std::option::Option< + unsafe extern "C" fn( + fp: *mut ::std::os::raw::c_void, + offset: i64, + where_: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type hts_tell_func = + ::std::option::Option i64>; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_itr_t { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub tid: ::std::os::raw::c_int, + pub n_off: ::std::os::raw::c_int, + pub i: ::std::os::raw::c_int, + pub n_reg: ::std::os::raw::c_int, + pub beg: hts_pos_t, + pub end: hts_pos_t, + pub reg_list: *mut hts_reglist_t, + pub curr_tid: ::std::os::raw::c_int, + pub curr_reg: ::std::os::raw::c_int, + pub curr_intv: ::std::os::raw::c_int, + pub curr_beg: hts_pos_t, + pub curr_end: hts_pos_t, + pub curr_off: u64, + pub nocoor_off: u64, + pub off: *mut hts_pair64_max_t, + pub readrec: hts_readrec_func, + pub seek: hts_seek_func, + pub tell: hts_tell_func, + pub bins: hts_itr_t__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_itr_t__bindgen_ty_1 { + pub n: ::std::os::raw::c_int, + pub m: ::std::os::raw::c_int, + pub a: *mut ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_itr_t__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_itr_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::n"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, n) - 0usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::m"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, m) - 4usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::a"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, a) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_itr_t"][::std::mem::size_of::() - 144usize]; + ["Alignment of hts_itr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_itr_t::tid"][::std::mem::offset_of!(hts_itr_t, tid) - 4usize]; + ["Offset of field: hts_itr_t::n_off"][::std::mem::offset_of!(hts_itr_t, n_off) - 8usize]; + ["Offset of field: hts_itr_t::i"][::std::mem::offset_of!(hts_itr_t, i) - 12usize]; + ["Offset of field: hts_itr_t::n_reg"][::std::mem::offset_of!(hts_itr_t, n_reg) - 16usize]; + ["Offset of field: hts_itr_t::beg"][::std::mem::offset_of!(hts_itr_t, beg) - 24usize]; + ["Offset of field: hts_itr_t::end"][::std::mem::offset_of!(hts_itr_t, end) - 32usize]; + ["Offset of field: hts_itr_t::reg_list"][::std::mem::offset_of!(hts_itr_t, reg_list) - 40usize]; + ["Offset of field: hts_itr_t::curr_tid"][::std::mem::offset_of!(hts_itr_t, curr_tid) - 48usize]; + ["Offset of field: hts_itr_t::curr_reg"][::std::mem::offset_of!(hts_itr_t, curr_reg) - 52usize]; + ["Offset of field: hts_itr_t::curr_intv"] + [::std::mem::offset_of!(hts_itr_t, curr_intv) - 56usize]; + ["Offset of field: hts_itr_t::curr_beg"][::std::mem::offset_of!(hts_itr_t, curr_beg) - 64usize]; + ["Offset of field: hts_itr_t::curr_end"][::std::mem::offset_of!(hts_itr_t, curr_end) - 72usize]; + ["Offset of field: hts_itr_t::curr_off"][::std::mem::offset_of!(hts_itr_t, curr_off) - 80usize]; + ["Offset of field: hts_itr_t::nocoor_off"] + [::std::mem::offset_of!(hts_itr_t, nocoor_off) - 88usize]; + ["Offset of field: hts_itr_t::off"][::std::mem::offset_of!(hts_itr_t, off) - 96usize]; + ["Offset of field: hts_itr_t::readrec"][::std::mem::offset_of!(hts_itr_t, readrec) - 104usize]; + ["Offset of field: hts_itr_t::seek"][::std::mem::offset_of!(hts_itr_t, seek) - 112usize]; + ["Offset of field: hts_itr_t::tell"][::std::mem::offset_of!(hts_itr_t, tell) - 120usize]; + ["Offset of field: hts_itr_t::bins"][::std::mem::offset_of!(hts_itr_t, bins) - 128usize]; +}; +impl hts_itr_t { + #[inline] + pub fn read_rest(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_read_rest(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn read_rest_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_read_rest_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn finished(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_finished(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn finished_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_finished_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn is_cram(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_cram(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn is_cram_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_cram_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn nocoor(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_nocoor(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn nocoor_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_nocoor_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn multi(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_multi(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn multi_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn dummy(&self) -> u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } + } + #[inline] + pub fn set_dummy(&mut self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 27u8, val as u64) + } + } + #[inline] + pub unsafe fn dummy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dummy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + read_rest: u32, + finished: u32, + is_cram: u32, + nocoor: u32, + multi: u32, + dummy: u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let read_rest: u32 = unsafe { ::std::mem::transmute(read_rest) }; + read_rest as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let finished: u32 = unsafe { ::std::mem::transmute(finished) }; + finished as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; + is_cram as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let nocoor: u32 = unsafe { ::std::mem::transmute(nocoor) }; + nocoor as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let multi: u32 = unsafe { ::std::mem::transmute(multi) }; + multi as u64 + }); + __bindgen_bitfield_unit.set(5usize, 27u8, { + let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; + dummy as u64 + }); + __bindgen_bitfield_unit + } } -extern "C" { - pub fn wcstombs( - __s: *mut ::std::os::raw::c_char, - __pwcs: *const wchar_t, - __n: size_t, - ) -> size_t; +pub type hts_itr_multi_t = hts_itr_t; +unsafe extern "C" { + pub fn hts_idx_init( + n: ::std::os::raw::c_int, + fmt: ::std::os::raw::c_int, + offset0: u64, + min_shift: ::std::os::raw::c_int, + n_lvls: ::std::os::raw::c_int, + ) -> *mut hts_idx_t; } -extern "C" { - pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_idx_destroy(idx: *mut hts_idx_t); } -extern "C" { - pub fn getsubopt( - __optionp: *mut *mut ::std::os::raw::c_char, - __tokens: *const *mut ::std::os::raw::c_char, - __valuep: *mut *mut ::std::os::raw::c_char, +unsafe extern "C" { + pub fn hts_idx_push( + idx: *mut hts_idx_t, + tid: ::std::os::raw::c_int, + beg: hts_pos_t, + end: hts_pos_t, + offset: u64, + is_mapped: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memcpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memmove( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memccpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: size_t, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_idx_finish(idx: *mut hts_idx_t, final_offset: u64) -> ::std::os::raw::c_int; } -extern "C" { - pub fn memset( - __s: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_idx_fmt(idx: *mut hts_idx_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn memcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, +unsafe extern "C" { + pub fn hts_idx_tbi_name( + idx: *mut hts_idx_t, + tid: ::std::os::raw::c_int, + name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, +unsafe extern "C" { + pub fn hts_idx_save( + idx: *const hts_idx_t, + fn_: *const ::std::os::raw::c_char, + fmt: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strncmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, +unsafe extern "C" { + pub fn hts_idx_save_as( + idx: *const hts_idx_t, + fn_: *const ::std::os::raw::c_char, + fnidx: *const ::std::os::raw::c_char, + fmt: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strcoll( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_idx_load( + fn_: *const ::std::os::raw::c_char, + fmt: ::std::os::raw::c_int, + ) -> *mut hts_idx_t; } -extern "C" { - pub fn strxfrm( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; +unsafe extern "C" { + pub fn hts_idx_load2( + fn_: *const ::std::os::raw::c_char, + fnidx: *const ::std::os::raw::c_char, + ) -> *mut hts_idx_t; } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_struct { - pub __locales: [*mut __locale_data; 13usize], - pub __ctype_b: *const ::std::os::raw::c_ushort, - pub __ctype_tolower: *const ::std::os::raw::c_int, - pub __ctype_toupper: *const ::std::os::raw::c_int, - pub __names: [*const ::std::os::raw::c_char; 13usize], +unsafe extern "C" { + pub fn hts_idx_load3( + fn_: *const ::std::os::raw::c_char, + fnidx: *const ::std::os::raw::c_char, + fmt: ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + ) -> *mut hts_idx_t; } -#[test] -fn bindgen_test_layout___locale_struct() { - assert_eq!( - ::std::mem::size_of::<__locale_struct>(), - 232usize, - concat!("Size of: ", stringify!(__locale_struct)) - ); - assert_eq!( - ::std::mem::align_of::<__locale_struct>(), - 8usize, - concat!("Alignment of ", stringify!(__locale_struct)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__locales as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__locales) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_b as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_tolower as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_tolower) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_toupper as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_toupper) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__names as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__names) - ) - ); +pub type hts_id2name_f = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: ::std::os::raw::c_int, + ) -> *const ::std::os::raw::c_char, +>; +unsafe extern "C" { + pub fn hts_idx_get_meta(idx: *mut hts_idx_t, l_meta: *mut u32) -> *mut u8; } -pub type __locale_t = *mut __locale_struct; -pub type locale_t = __locale_t; -extern "C" { - pub fn strcoll_l( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __l: __locale_t, +unsafe extern "C" { + pub fn hts_idx_set_meta( + idx: *mut hts_idx_t, + l_meta: u32, + meta: *mut u8, + is_copy: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strxfrm_l( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: size_t, - __l: __locale_t, - ) -> size_t; -} -extern "C" { - pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strndup( - __string: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strrchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __reject: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strspn( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strpbrk( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strstr( - __haystack: *const ::std::os::raw::c_char, - __needle: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: size_t) -> size_t; -} -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}__xpg_strerror_r"] - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __buflen: size_t, +unsafe extern "C" { + pub fn hts_idx_get_stat( + idx: *const hts_idx_t, + tid: ::std::os::raw::c_int, + mapped: *mut u64, + unmapped: *mut u64, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strerror_l( - __errnum: ::std::os::raw::c_int, - __l: __locale_t, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_idx_get_n_no_coor(idx: *const hts_idx_t) -> u64; } -extern "C" { - pub fn __bzero(__s: *mut ::std::os::raw::c_void, __n: size_t); +unsafe extern "C" { + pub fn hts_idx_seqnames( + idx: *const hts_idx_t, + n: *mut ::std::os::raw::c_int, + getid: hts_id2name_f, + hdr: *mut ::std::os::raw::c_void, + ) -> *mut *const ::std::os::raw::c_char; } -extern "C" { - pub fn bcopy( - __src: *const ::std::os::raw::c_void, - __dest: *mut ::std::os::raw::c_void, - __n: size_t, - ); +unsafe extern "C" { + pub fn hts_idx_nseq(idx: *const hts_idx_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); +unsafe extern "C" { + pub fn hts_parse_decimal( + str_: *const ::std::os::raw::c_char, + strend: *mut *mut ::std::os::raw::c_char, + flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; } -extern "C" { - pub fn bcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; +pub type hts_name2id_f = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int, +>; +unsafe extern "C" { + pub fn hts_parse_reg64( + str_: *const ::std::os::raw::c_char, + beg: *mut hts_pos_t, + end: *mut hts_pos_t, + ) -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn index( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_parse_reg( + str_: *const ::std::os::raw::c_char, + beg: *mut ::std::os::raw::c_int, + end: *mut ::std::os::raw::c_int, + ) -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn rindex( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_parse_region( + s: *const ::std::os::raw::c_char, + tid: *mut ::std::os::raw::c_int, + beg: *mut hts_pos_t, + end: *mut hts_pos_t, + getid: hts_name2id_f, + hdr: *mut ::std::os::raw::c_void, + flags: ::std::os::raw::c_int, + ) -> *const ::std::os::raw::c_char; } -extern "C" { - pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_itr_query( + idx: *const hts_idx_t, + tid: ::std::os::raw::c_int, + beg: hts_pos_t, + end: hts_pos_t, + readrec: hts_readrec_func, + ) -> *mut hts_itr_t; } -extern "C" { - pub fn strcasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_itr_destroy(iter: *mut hts_itr_t); } -extern "C" { - pub fn strncasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, +pub type hts_itr_query_func = ::std::option::Option< + unsafe extern "C" fn( + idx: *const hts_idx_t, + tid: ::std::os::raw::c_int, + beg: hts_pos_t, + end: hts_pos_t, + readrec: hts_readrec_func, + ) -> *mut hts_itr_t, +>; +unsafe extern "C" { + pub fn hts_itr_querys( + idx: *const hts_idx_t, + reg: *const ::std::os::raw::c_char, + getid: hts_name2id_f, + hdr: *mut ::std::os::raw::c_void, + itr_query: hts_itr_query_func, + readrec: hts_readrec_func, + ) -> *mut hts_itr_t; +} +unsafe extern "C" { + pub fn hts_itr_next( + fp: *mut BGZF, + iter: *mut hts_itr_t, + r: *mut ::std::os::raw::c_void, + data: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +pub type hts_itr_multi_query_func = ::std::option::Option< + unsafe extern "C" fn(idx: *const hts_idx_t, itr: *mut hts_itr_t) -> ::std::os::raw::c_int, +>; +unsafe extern "C" { + pub fn hts_itr_multi_bam(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_itr_multi_cram(idx: *const hts_idx_t, iter: *mut hts_itr_t) + -> ::std::os::raw::c_int; } -extern "C" { - pub fn __stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_itr_regions( + idx: *const hts_idx_t, + reglist: *mut hts_reglist_t, + count: ::std::os::raw::c_int, + getid: hts_name2id_f, + hdr: *mut ::std::os::raw::c_void, + itr_specific: hts_itr_multi_query_func, + readrec: hts_readrec_func, + seek: hts_seek_func, + tell: hts_tell_func, + ) -> *mut hts_itr_t; } -extern "C" { - pub fn stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_itr_multi_next( + fd: *mut htsFile, + iter: *mut hts_itr_t, + r: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn __stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: size_t, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_reglist_create( + argv: *mut *mut ::std::os::raw::c_char, + argc: ::std::os::raw::c_int, + r_count: *mut ::std::os::raw::c_int, + hdr: *mut ::std::os::raw::c_void, + getid: hts_name2id_f, + ) -> *mut hts_reglist_t; } -extern "C" { - pub fn stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_reglist_free(reglist: *mut hts_reglist_t, count: ::std::os::raw::c_int); +} +unsafe extern "C" { + pub fn hts_file_type(fname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct ks_tokaux_t { - pub tab: [u64; 4usize], - pub sep: ::std::os::raw::c_int, - pub finished: ::std::os::raw::c_int, - pub p: *const ::std::os::raw::c_char, +pub struct errmod_t { + _unused: [u8; 0], } -#[test] -fn bindgen_test_layout_ks_tokaux_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tab as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finished as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(finished) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(p) - ) - ); +unsafe extern "C" { + pub fn errmod_init(depcorr: f64) -> *mut errmod_t; } -extern "C" { - pub fn kvsprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ap: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn errmod_destroy(em: *mut errmod_t); } -extern "C" { - pub fn ksprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ... +unsafe extern "C" { + pub fn errmod_cal( + em: *const errmod_t, + n: ::std::os::raw::c_int, + m: ::std::os::raw::c_int, + bases: *mut u16, + q: *mut f32, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn kputd(d: f64, s: *mut kstring_t) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct probaln_par_t { + pub d: f32, + pub e: f32, + pub bw: ::std::os::raw::c_int, } -extern "C" { - pub fn ksplit_core( - s: *mut ::std::os::raw::c_char, - delimiter: ::std::os::raw::c_int, - _max: *mut ::std::os::raw::c_int, - _offsets: *mut *mut ::std::os::raw::c_int, +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of probaln_par_t"][::std::mem::size_of::() - 12usize]; + ["Alignment of probaln_par_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: probaln_par_t::d"][::std::mem::offset_of!(probaln_par_t, d) - 0usize]; + ["Offset of field: probaln_par_t::e"][::std::mem::offset_of!(probaln_par_t, e) - 4usize]; + ["Offset of field: probaln_par_t::bw"][::std::mem::offset_of!(probaln_par_t, bw) - 8usize]; +}; +unsafe extern "C" { + pub fn probaln_glocal( + ref_: *const u8, + l_ref: ::std::os::raw::c_int, + query: *const u8, + l_query: ::std::os::raw::c_int, + iqual: *const u8, + c: *const probaln_par_t, + state: *mut ::std::os::raw::c_int, + q: *mut u8, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn kstrstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_md5_context { + _unused: [u8; 0], } -extern "C" { - pub fn kstrnstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_md5_init() -> *mut hts_md5_context; } -extern "C" { - pub fn kmemmem( - _str: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - _pat: *const ::std::os::raw::c_void, - m: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn hts_md5_update( + ctx: *mut hts_md5_context, + data: *const ::std::os::raw::c_void, + size: ::std::os::raw::c_ulong, + ); } -extern "C" { - pub fn kstrtok( - str: *const ::std::os::raw::c_char, - sep: *const ::std::os::raw::c_char, - aux: *mut ks_tokaux_t, - ) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn hts_md5_final(digest: *mut ::std::os::raw::c_uchar, ctx: *mut hts_md5_context); } -pub type kgets_func = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char, ->; -extern "C" { - pub fn kgetline( - s: *mut kstring_t, - fgets: kgets_func, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_md5_reset(ctx: *mut hts_md5_context); } -pub type kgets_func2 = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: size_t, - arg3: *mut ::std::os::raw::c_void, - ) -> ssize_t, ->; -extern "C" { - pub fn kgetline2( - s: *mut kstring_t, - fgets: kgets_func2, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn hts_md5_hex(hex: *mut ::std::os::raw::c_char, digest: *const ::std::os::raw::c_uchar); +} +unsafe extern "C" { + pub fn hts_md5_destroy(ctx: *mut hts_md5_context); } pub type uint16_u = u16; pub type uint32_u = u32; pub type uint64_u = u64; +unsafe extern "C" { + pub fn __assert_fail( + __assertion: *const ::std::os::raw::c_char, + __file: *const ::std::os::raw::c_char, + __line: ::std::os::raw::c_uint, + __function: *const ::std::os::raw::c_char, + ) -> !; +} +unsafe extern "C" { + pub fn __assert_perror_fail( + __errnum: ::std::os::raw::c_int, + __file: *const ::std::os::raw::c_char, + __line: ::std::os::raw::c_uint, + __function: *const ::std::os::raw::c_char, + ) -> !; +} +unsafe extern "C" { + pub fn __assert( + __assertion: *const ::std::os::raw::c_char, + __file: *const ::std::os::raw::c_char, + __line: ::std::os::raw::c_int, + ) -> !; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_hrec_t { @@ -6554,79 +4819,17 @@ pub struct bcf_hrec_t { pub keys: *mut *mut ::std::os::raw::c_char, pub vals: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_bcf_hrec_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nkeys as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(nkeys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keys as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(keys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vals as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(vals) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_hrec_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of bcf_hrec_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_hrec_t::type_"][::std::mem::offset_of!(bcf_hrec_t, type_) - 0usize]; + ["Offset of field: bcf_hrec_t::key"][::std::mem::offset_of!(bcf_hrec_t, key) - 8usize]; + ["Offset of field: bcf_hrec_t::value"][::std::mem::offset_of!(bcf_hrec_t, value) - 16usize]; + ["Offset of field: bcf_hrec_t::nkeys"][::std::mem::offset_of!(bcf_hrec_t, nkeys) - 24usize]; + ["Offset of field: bcf_hrec_t::keys"][::std::mem::offset_of!(bcf_hrec_t, keys) - 32usize]; + ["Offset of field: bcf_hrec_t::vals"][::std::mem::offset_of!(bcf_hrec_t, vals) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_idinfo_t { @@ -6634,88 +4837,27 @@ pub struct bcf_idinfo_t { pub hrec: [*mut bcf_hrec_t; 3usize], pub id: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_idinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(id) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_idinfo_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of bcf_idinfo_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_idinfo_t::info"][::std::mem::offset_of!(bcf_idinfo_t, info) - 0usize]; + ["Offset of field: bcf_idinfo_t::hrec"][::std::mem::offset_of!(bcf_idinfo_t, hrec) - 24usize]; + ["Offset of field: bcf_idinfo_t::id"][::std::mem::offset_of!(bcf_idinfo_t, id) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_idpair_t { pub key: *const ::std::os::raw::c_char, pub val: *const bcf_idinfo_t, } -#[test] -fn bindgen_test_layout_bcf_idpair_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_idpair_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of bcf_idpair_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_idpair_t::key"][::std::mem::offset_of!(bcf_idpair_t, key) - 0usize]; + ["Offset of field: bcf_idpair_t::val"][::std::mem::offset_of!(bcf_idpair_t, val) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_hdr_t { @@ -6733,191 +4875,43 @@ pub struct bcf_hdr_t { pub mem: kstring_t, pub m: [i32; 3usize], } -#[test] -fn bindgen_test_layout_bcf_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nhrec as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nhrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dirty as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ntransl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(ntransl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).transl as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(transl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nsamples_ori as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nsamples_ori) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keep_samples as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(keep_samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(m) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_hdr_t"][::std::mem::size_of::() - 168usize]; + ["Alignment of bcf_hdr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_hdr_t::n"][::std::mem::offset_of!(bcf_hdr_t, n) - 0usize]; + ["Offset of field: bcf_hdr_t::id"][::std::mem::offset_of!(bcf_hdr_t, id) - 16usize]; + ["Offset of field: bcf_hdr_t::dict"][::std::mem::offset_of!(bcf_hdr_t, dict) - 40usize]; + ["Offset of field: bcf_hdr_t::samples"][::std::mem::offset_of!(bcf_hdr_t, samples) - 64usize]; + ["Offset of field: bcf_hdr_t::hrec"][::std::mem::offset_of!(bcf_hdr_t, hrec) - 72usize]; + ["Offset of field: bcf_hdr_t::nhrec"][::std::mem::offset_of!(bcf_hdr_t, nhrec) - 80usize]; + ["Offset of field: bcf_hdr_t::dirty"][::std::mem::offset_of!(bcf_hdr_t, dirty) - 84usize]; + ["Offset of field: bcf_hdr_t::ntransl"][::std::mem::offset_of!(bcf_hdr_t, ntransl) - 88usize]; + ["Offset of field: bcf_hdr_t::transl"][::std::mem::offset_of!(bcf_hdr_t, transl) - 96usize]; + ["Offset of field: bcf_hdr_t::nsamples_ori"] + [::std::mem::offset_of!(bcf_hdr_t, nsamples_ori) - 112usize]; + ["Offset of field: bcf_hdr_t::keep_samples"] + [::std::mem::offset_of!(bcf_hdr_t, keep_samples) - 120usize]; + ["Offset of field: bcf_hdr_t::mem"][::std::mem::offset_of!(bcf_hdr_t, mem) - 128usize]; + ["Offset of field: bcf_hdr_t::m"][::std::mem::offset_of!(bcf_hdr_t, m) - 152usize]; +}; +unsafe extern "C" { pub static mut bcf_type_shift: [u8; 0usize]; } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct variant_t { +pub struct bcf_variant_t { pub type_: ::std::os::raw::c_int, pub n: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_variant_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(variant_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(variant_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(variant_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(variant_t), - "::", - stringify!(n) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_variant_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of bcf_variant_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: bcf_variant_t::type_"] + [::std::mem::offset_of!(bcf_variant_t, type_) - 0usize]; + ["Offset of field: bcf_variant_t::n"][::std::mem::offset_of!(bcf_variant_t, n) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_fmt_t { @@ -6927,81 +4921,20 @@ pub struct bcf_fmt_t { pub type_: ::std::os::raw::c_int, pub p: *mut u8, pub p_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, -} -#[test] -fn bindgen_test_layout_bcf_fmt_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p_len) - ) - ); -} + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_fmt_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of bcf_fmt_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_fmt_t::id"][::std::mem::offset_of!(bcf_fmt_t, id) - 0usize]; + ["Offset of field: bcf_fmt_t::n"][::std::mem::offset_of!(bcf_fmt_t, n) - 4usize]; + ["Offset of field: bcf_fmt_t::size"][::std::mem::offset_of!(bcf_fmt_t, size) - 8usize]; + ["Offset of field: bcf_fmt_t::type_"][::std::mem::offset_of!(bcf_fmt_t, type_) - 12usize]; + ["Offset of field: bcf_fmt_t::p"][::std::mem::offset_of!(bcf_fmt_t, p) - 16usize]; + ["Offset of field: bcf_fmt_t::p_len"][::std::mem::offset_of!(bcf_fmt_t, p_len) - 24usize]; +}; impl bcf_fmt_t { #[inline] pub fn p_off(&self) -> u32 { @@ -7015,6 +4948,28 @@ impl bcf_fmt_t { } } #[inline] + pub unsafe fn p_off_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_p_off_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 31u8, + val as u64, + ) + } + } + #[inline] pub fn p_free(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -7026,9 +4981,30 @@ impl bcf_fmt_t { } } #[inline] - pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + pub unsafe fn p_free_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_p_free_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 31u8, { let p_off: u32 = unsafe { ::std::mem::transmute(p_off) }; p_off as u64 @@ -7048,7 +5024,8 @@ pub struct bcf_info_t { pub v1: bcf_info_t__bindgen_ty_1, pub vptr: *mut u8, pub vptr_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub len: ::std::os::raw::c_int, } #[repr(C)] @@ -7056,114 +5033,30 @@ pub struct bcf_info_t { pub union bcf_info_t__bindgen_ty_1 { pub i: i64, pub f: f32, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bcf_info_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(f) - ) - ); -} -#[test] -fn bindgen_test_layout_bcf_info_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bcf_info_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(v1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).len as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(len) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_info_t__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of bcf_info_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_info_t__bindgen_ty_1::i"] + [::std::mem::offset_of!(bcf_info_t__bindgen_ty_1, i) - 0usize]; + ["Offset of field: bcf_info_t__bindgen_ty_1::f"] + [::std::mem::offset_of!(bcf_info_t__bindgen_ty_1, f) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_info_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of bcf_info_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_info_t::key"][::std::mem::offset_of!(bcf_info_t, key) - 0usize]; + ["Offset of field: bcf_info_t::type_"][::std::mem::offset_of!(bcf_info_t, type_) - 4usize]; + ["Offset of field: bcf_info_t::v1"][::std::mem::offset_of!(bcf_info_t, v1) - 8usize]; + ["Offset of field: bcf_info_t::vptr"][::std::mem::offset_of!(bcf_info_t, vptr) - 16usize]; + ["Offset of field: bcf_info_t::vptr_len"] + [::std::mem::offset_of!(bcf_info_t, vptr_len) - 24usize]; + ["Offset of field: bcf_info_t::len"][::std::mem::offset_of!(bcf_info_t, len) - 32usize]; +}; impl bcf_info_t { #[inline] pub fn vptr_off(&self) -> u32 { @@ -7177,6 +5070,28 @@ impl bcf_info_t { } } #[inline] + pub unsafe fn vptr_off_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vptr_off_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 31u8, + val as u64, + ) + } + } + #[inline] pub fn vptr_free(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -7188,12 +5103,30 @@ impl bcf_info_t { } } #[inline] - pub fn new_bitfield_1( - vptr_off: u32, - vptr_free: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + pub unsafe fn vptr_free_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vptr_free_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(vptr_off: u32, vptr_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 31u8, { let vptr_off: u32 = unsafe { ::std::mem::transmute(vptr_off) }; vptr_off as u64 @@ -7221,204 +5154,43 @@ pub struct bcf_dec_t { pub allele: *mut *mut ::std::os::raw::c_char, pub info: *mut bcf_info_t, pub fmt: *mut bcf_fmt_t, - pub var: *mut variant_t, + pub var: *mut bcf_variant_t, pub n_var: ::std::os::raw::c_int, pub var_type: ::std::os::raw::c_int, pub shared_dirty: ::std::os::raw::c_int, pub indiv_dirty: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_dec_t() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(bcf_dec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_dec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_fmt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_info as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_als as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_allele as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_flt as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_flt as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flt as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allele as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_var as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var_type as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared_dirty as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(shared_dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv_dirty as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(indiv_dirty) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_dec_t"][::std::mem::size_of::() - 104usize]; + ["Alignment of bcf_dec_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_dec_t::m_fmt"][::std::mem::offset_of!(bcf_dec_t, m_fmt) - 0usize]; + ["Offset of field: bcf_dec_t::m_info"][::std::mem::offset_of!(bcf_dec_t, m_info) - 4usize]; + ["Offset of field: bcf_dec_t::m_id"][::std::mem::offset_of!(bcf_dec_t, m_id) - 8usize]; + ["Offset of field: bcf_dec_t::m_als"][::std::mem::offset_of!(bcf_dec_t, m_als) - 12usize]; + ["Offset of field: bcf_dec_t::m_allele"][::std::mem::offset_of!(bcf_dec_t, m_allele) - 16usize]; + ["Offset of field: bcf_dec_t::m_flt"][::std::mem::offset_of!(bcf_dec_t, m_flt) - 20usize]; + ["Offset of field: bcf_dec_t::n_flt"][::std::mem::offset_of!(bcf_dec_t, n_flt) - 24usize]; + ["Offset of field: bcf_dec_t::flt"][::std::mem::offset_of!(bcf_dec_t, flt) - 32usize]; + ["Offset of field: bcf_dec_t::id"][::std::mem::offset_of!(bcf_dec_t, id) - 40usize]; + ["Offset of field: bcf_dec_t::als"][::std::mem::offset_of!(bcf_dec_t, als) - 48usize]; + ["Offset of field: bcf_dec_t::allele"][::std::mem::offset_of!(bcf_dec_t, allele) - 56usize]; + ["Offset of field: bcf_dec_t::info"][::std::mem::offset_of!(bcf_dec_t, info) - 64usize]; + ["Offset of field: bcf_dec_t::fmt"][::std::mem::offset_of!(bcf_dec_t, fmt) - 72usize]; + ["Offset of field: bcf_dec_t::var"][::std::mem::offset_of!(bcf_dec_t, var) - 80usize]; + ["Offset of field: bcf_dec_t::n_var"][::std::mem::offset_of!(bcf_dec_t, n_var) - 88usize]; + ["Offset of field: bcf_dec_t::var_type"][::std::mem::offset_of!(bcf_dec_t, var_type) - 92usize]; + ["Offset of field: bcf_dec_t::shared_dirty"] + [::std::mem::offset_of!(bcf_dec_t, shared_dirty) - 96usize]; + ["Offset of field: bcf_dec_t::indiv_dirty"] + [::std::mem::offset_of!(bcf_dec_t, indiv_dirty) - 100usize]; +}; +unsafe extern "C" { + pub fn bcf_strerror( + errorcode: ::std::os::raw::c_int, + buffer: *mut ::std::os::raw::c_char, + maxbuffer: usize, + ) -> *const ::std::os::raw::c_char; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -7427,7 +5199,8 @@ pub struct bcf1_t { pub rlen: hts_pos_t, pub rid: i32, pub qual: f32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, pub shared: kstring_t, pub indiv: kstring_t, pub d: bcf_dec_t, @@ -7436,124 +5209,23 @@ pub struct bcf1_t { pub unpack_size: [::std::os::raw::c_int; 3usize], pub errcode: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf1_t() { - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(bcf1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlen as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(shared) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(indiv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(bcf1_t), "::", stringify!(d)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpacked as *const _ as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpacked) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpack_size as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpack_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errcode as *const _ as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(errcode) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf1_t"][::std::mem::size_of::() - 208usize]; + ["Alignment of bcf1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf1_t::pos"][::std::mem::offset_of!(bcf1_t, pos) - 0usize]; + ["Offset of field: bcf1_t::rlen"][::std::mem::offset_of!(bcf1_t, rlen) - 8usize]; + ["Offset of field: bcf1_t::rid"][::std::mem::offset_of!(bcf1_t, rid) - 16usize]; + ["Offset of field: bcf1_t::qual"][::std::mem::offset_of!(bcf1_t, qual) - 20usize]; + ["Offset of field: bcf1_t::shared"][::std::mem::offset_of!(bcf1_t, shared) - 32usize]; + ["Offset of field: bcf1_t::indiv"][::std::mem::offset_of!(bcf1_t, indiv) - 56usize]; + ["Offset of field: bcf1_t::d"][::std::mem::offset_of!(bcf1_t, d) - 80usize]; + ["Offset of field: bcf1_t::max_unpack"][::std::mem::offset_of!(bcf1_t, max_unpack) - 184usize]; + ["Offset of field: bcf1_t::unpacked"][::std::mem::offset_of!(bcf1_t, unpacked) - 188usize]; + ["Offset of field: bcf1_t::unpack_size"] + [::std::mem::offset_of!(bcf1_t, unpack_size) - 192usize]; + ["Offset of field: bcf1_t::errcode"][::std::mem::offset_of!(bcf1_t, errcode) - 204usize]; +}; impl bcf1_t { #[inline] pub fn n_info(&self) -> u32 { @@ -7567,6 +5239,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_info_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_info_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn n_allele(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } } @@ -7578,6 +5272,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_allele_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_allele_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn n_fmt(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } } @@ -7589,6 +5305,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_fmt_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_fmt_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] pub fn n_sample(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 24u8) as u32) } } @@ -7600,14 +5338,35 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_sample_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_sample_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 24u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( n_info: u32, n_allele: u32, n_fmt: u32, n_sample: u32, - ) -> __BindgenBitfieldUnit<[u8; 8usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 16u8, { let n_info: u32 = unsafe { ::std::mem::transmute(n_info) }; n_info as u64 @@ -7627,89 +5386,96 @@ impl bcf1_t { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_init(mode: *const ::std::os::raw::c_char) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_destroy(h: *mut bcf_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_init() -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_destroy(v: *mut bcf1_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_empty(v: *mut bcf1_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_clear(v: *mut bcf1_t); } pub type vcfFile = htsFile; -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set_samples( hdr: *mut bcf_hdr_t, samples: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_subset_format(hdr: *const bcf_hdr_t, rec: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_write(fp: *mut htsFile, h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_parse( s: *mut kstring_t, h: *const bcf_hdr_t, v: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn vcf_open_mode( + mode: *mut ::std::os::raw::c_char, + fn_: *const ::std::os::raw::c_char, + format: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn vcf_format( h: *const bcf_hdr_t, v: *const bcf1_t, s: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_unpack(b: *mut bcf1_t, which: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_dup(src: *mut bcf1_t) -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_copy(dst: *mut bcf1_t, src: *mut bcf1_t) -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_write(fp: *mut htsFile, h: *mut bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn vcf_hdr_write(fp: *mut htsFile, h: *const bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_write( fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_readrec( fp: *mut BGZF, null: *mut ::std::os::raw::c_void, @@ -7719,74 +5485,74 @@ extern "C" { end: *mut hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_write_line(fp: *mut htsFile, line: *mut kstring_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_dup(hdr: *const bcf_hdr_t) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_combine(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_merge(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_add_sample( hdr: *mut bcf_hdr_t, sample: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set( hdr: *mut bcf_hdr_t, fname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_format( hdr: *const bcf_hdr_t, is_bcf: ::std::os::raw::c_int, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_fmt_text( hdr: *const bcf_hdr_t, is_bcf: ::std::os::raw::c_int, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_append( h: *mut bcf_hdr_t, line: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_printf( h: *mut bcf_hdr_t, format: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_get_version(hdr: *const bcf_hdr_t) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set_version( hdr: *mut bcf_hdr_t, version: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_remove( h: *mut bcf_hdr_t, type_: ::std::os::raw::c_int, key: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_subset( h0: *const bcf_hdr_t, n: ::std::os::raw::c_int, @@ -7794,35 +5560,35 @@ extern "C" { imap: *mut ::std::os::raw::c_int, ) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_seqnames( h: *const bcf_hdr_t, nseqs: *mut ::std::os::raw::c_int, ) -> *mut *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_parse( hdr: *mut bcf_hdr_t, htxt: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_sync(h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_parse_line( h: *const bcf_hdr_t, line: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut bcf_hrec_t; } -extern "C" { - pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str: *mut kstring_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str_: *mut kstring_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_add_hrec(hdr: *mut bcf_hdr_t, hrec: *mut bcf_hrec_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_get_hrec( hdr: *const bcf_hdr_t, type_: ::std::os::raw::c_int, @@ -7831,39 +5597,39 @@ extern "C" { str_class: *const ::std::os::raw::c_char, ) -> *mut bcf_hrec_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_dup(hrec: *mut bcf_hrec_t) -> *mut bcf_hrec_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_add_key( hrec: *mut bcf_hrec_t, - str: *const ::std::os::raw::c_char, - len: size_t, + str_: *const ::std::os::raw::c_char, + len: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_set_val( hrec: *mut bcf_hrec_t, i: ::std::os::raw::c_int, - str: *const ::std::os::raw::c_char, - len: size_t, + str_: *const ::std::os::raw::c_char, + len: usize, is_quoted: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_find_key( hrec: *mut bcf_hrec_t, key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hrec_add_idx(hrec: *mut bcf_hrec_t, idx: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_destroy(hrec: *mut bcf_hrec_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_subset( h: *const bcf_hdr_t, v: *mut bcf1_t, @@ -7871,26 +5637,50 @@ extern "C" { imap: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_translate( dst_hdr: *const bcf_hdr_t, src_hdr: *mut bcf_hdr_t, src_line: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_variant_types(rec: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_variant_type( rec: *mut bcf1_t, ith_allele: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +pub const bcf_variant_match_bcf_match_exact: bcf_variant_match = 0; +pub const bcf_variant_match_bcf_match_overlap: bcf_variant_match = 1; +pub const bcf_variant_match_bcf_match_subset: bcf_variant_match = 2; +pub type bcf_variant_match = ::std::os::raw::c_uint; +unsafe extern "C" { + pub fn bcf_has_variant_types( + rec: *mut bcf1_t, + bitmask: u32, + mode: bcf_variant_match, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bcf_has_variant_type( + rec: *mut bcf1_t, + ith_allele: ::std::os::raw::c_int, + bitmask: u32, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bcf_variant_length( + rec: *mut bcf1_t, + ith_allele: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bcf_is_snp(v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7898,14 +5688,14 @@ extern "C" { n: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_add_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, flt_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7913,14 +5703,14 @@ extern "C" { pass: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_has_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, filter: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_alleles( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7928,28 +5718,28 @@ extern "C" { nals: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_alleles_str( hdr: *const bcf_hdr_t, line: *mut bcf1_t, alleles_string: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_id( hdr: *const bcf_hdr_t, line: *mut bcf1_t, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_add_id( hdr: *const bcf_hdr_t, line: *mut bcf1_t, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_info( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7959,7 +5749,7 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_format_string( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7968,7 +5758,7 @@ extern "C" { n: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_format( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -7978,27 +5768,27 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_fmt( hdr: *const bcf_hdr_t, line: *mut bcf1_t, key: *const ::std::os::raw::c_char, ) -> *mut bcf_fmt_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info( hdr: *const bcf_hdr_t, line: *mut bcf1_t, key: *const ::std::os::raw::c_char, ) -> *mut bcf_info_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_fmt_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_fmt_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_info_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info_values( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -8008,7 +5798,7 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_format_string( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -8017,7 +5807,7 @@ extern "C" { ndst: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_format_values( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -8027,14 +5817,14 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_id2int( hdr: *const bcf_hdr_t, type_: ::std::os::raw::c_int, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_fmt_array( s: *mut kstring_t, n: ::std::os::raw::c_int, @@ -8042,17 +5832,17 @@ extern "C" { data: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_fmt_sized_array(s: *mut kstring_t, ptr: *mut u8) -> *mut u8; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vchar( s: *mut kstring_t, l: ::std::os::raw::c_int, a: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vint( s: *mut kstring_t, n: ::std::os::raw::c_int, @@ -8060,40 +5850,40 @@ extern "C" { wsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vfloat( s: *mut kstring_t, n: ::std::os::raw::c_int, a: *mut f32, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_load2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_load3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, flags: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -8101,7 +5891,7 @@ extern "C" { n_threads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_idx_init( fp: *mut htsFile, h: *mut bcf_hdr_t, @@ -8109,13 +5899,13 @@ extern "C" { fnidx: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub static mut bcf_float_vector_end: u32; } -extern "C" { +unsafe extern "C" { pub static mut bcf_float_missing: u32; } #[repr(C)] @@ -8128,7 +5918,7 @@ pub struct sam_hrecs_t { pub struct sam_hdr_t { pub n_targets: i32, pub ignore_sam_err: i32, - pub l_text: size_t, + pub l_text: usize, pub target_len: *mut u32, pub cigar_tab: *const i8, pub target_name: *mut *mut ::std::os::raw::c_char, @@ -8137,121 +5927,29 @@ pub struct sam_hdr_t { pub hrecs: *mut sam_hrecs_t, pub ref_count: u32, } -#[test] -fn bindgen_test_layout_sam_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(sam_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sam_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_targets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(n_targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ignore_sam_err as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ignore_sam_err) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_text as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(l_text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_len as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_tab as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(cigar_tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_name as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).text as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdict as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(sdict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrecs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(hrecs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ref_count as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ref_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sam_hdr_t"][::std::mem::size_of::() - 72usize]; + ["Alignment of sam_hdr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sam_hdr_t::n_targets"] + [::std::mem::offset_of!(sam_hdr_t, n_targets) - 0usize]; + ["Offset of field: sam_hdr_t::ignore_sam_err"] + [::std::mem::offset_of!(sam_hdr_t, ignore_sam_err) - 4usize]; + ["Offset of field: sam_hdr_t::l_text"][::std::mem::offset_of!(sam_hdr_t, l_text) - 8usize]; + ["Offset of field: sam_hdr_t::target_len"] + [::std::mem::offset_of!(sam_hdr_t, target_len) - 16usize]; + ["Offset of field: sam_hdr_t::cigar_tab"] + [::std::mem::offset_of!(sam_hdr_t, cigar_tab) - 24usize]; + ["Offset of field: sam_hdr_t::target_name"] + [::std::mem::offset_of!(sam_hdr_t, target_name) - 32usize]; + ["Offset of field: sam_hdr_t::text"][::std::mem::offset_of!(sam_hdr_t, text) - 40usize]; + ["Offset of field: sam_hdr_t::sdict"][::std::mem::offset_of!(sam_hdr_t, sdict) - 48usize]; + ["Offset of field: sam_hdr_t::hrecs"][::std::mem::offset_of!(sam_hdr_t, hrecs) - 56usize]; + ["Offset of field: sam_hdr_t::ref_count"] + [::std::mem::offset_of!(sam_hdr_t, ref_count) - 64usize]; +}; pub type bam_hdr_t = sam_hdr_t; -extern "C" { +unsafe extern "C" { pub static bam_cigar_table: [i8; 256usize]; } #[repr(C)] @@ -8268,141 +5966,28 @@ pub struct bam1_core_t { pub l_qseq: i32, pub mtid: i32, pub mpos: hts_pos_t, - pub isize: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bam1_core_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bam1_core_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_core_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bin as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_extranul as *const _ as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_extranul) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(flag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qname as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_cigar as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(n_cigar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qseq as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mtid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mtid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mpos as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(isize) - ) - ); -} + pub isize_: hts_pos_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam1_core_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of bam1_core_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam1_core_t::pos"][::std::mem::offset_of!(bam1_core_t, pos) - 0usize]; + ["Offset of field: bam1_core_t::tid"][::std::mem::offset_of!(bam1_core_t, tid) - 8usize]; + ["Offset of field: bam1_core_t::bin"][::std::mem::offset_of!(bam1_core_t, bin) - 12usize]; + ["Offset of field: bam1_core_t::qual"][::std::mem::offset_of!(bam1_core_t, qual) - 14usize]; + ["Offset of field: bam1_core_t::l_extranul"] + [::std::mem::offset_of!(bam1_core_t, l_extranul) - 15usize]; + ["Offset of field: bam1_core_t::flag"][::std::mem::offset_of!(bam1_core_t, flag) - 16usize]; + ["Offset of field: bam1_core_t::l_qname"] + [::std::mem::offset_of!(bam1_core_t, l_qname) - 18usize]; + ["Offset of field: bam1_core_t::n_cigar"] + [::std::mem::offset_of!(bam1_core_t, n_cigar) - 20usize]; + ["Offset of field: bam1_core_t::l_qseq"][::std::mem::offset_of!(bam1_core_t, l_qseq) - 24usize]; + ["Offset of field: bam1_core_t::mtid"][::std::mem::offset_of!(bam1_core_t, mtid) - 28usize]; + ["Offset of field: bam1_core_t::mpos"][::std::mem::offset_of!(bam1_core_t, mpos) - 32usize]; + ["Offset of field: bam1_core_t::isize_"][::std::mem::offset_of!(bam1_core_t, isize_) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bam1_t { @@ -8411,72 +5996,20 @@ pub struct bam1_t { pub data: *mut u8, pub l_data: ::std::os::raw::c_int, pub m_data: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_bam1_t() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(bam1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).core as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(core) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_data as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(l_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_data as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(m_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam1_t"][::std::mem::size_of::() - 80usize]; + ["Alignment of bam1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam1_t::core"][::std::mem::offset_of!(bam1_t, core) - 0usize]; + ["Offset of field: bam1_t::id"][::std::mem::offset_of!(bam1_t, id) - 48usize]; + ["Offset of field: bam1_t::data"][::std::mem::offset_of!(bam1_t, data) - 56usize]; + ["Offset of field: bam1_t::l_data"][::std::mem::offset_of!(bam1_t, l_data) - 64usize]; + ["Offset of field: bam1_t::m_data"][::std::mem::offset_of!(bam1_t, m_data) - 68usize]; +}; impl bam1_t { #[inline] pub fn mempolicy(&self) -> u32 { @@ -8490,9 +6023,30 @@ impl bam1_t { } } #[inline] - pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); + pub unsafe fn mempolicy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mempolicy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let mempolicy: u32 = unsafe { ::std::mem::transmute(mempolicy) }; mempolicy as u64 @@ -8500,55 +6054,55 @@ impl bam1_t { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_init() -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bam_hdr_read(fp: *mut BGZF) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bam_hdr_write(fp: *mut BGZF, h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_destroy(h: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_dup(h0: *const sam_hdr_t) -> *mut sam_hdr_t; } pub type samFile = htsFile; -extern "C" { - pub fn sam_hdr_parse(l_text: size_t, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; +unsafe extern "C" { + pub fn sam_hdr_parse(l_text: usize, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_read(fp: *mut samFile) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_write(fp: *mut samFile, h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn sam_hdr_length(h: *mut sam_hdr_t) -> size_t; +unsafe extern "C" { + pub fn sam_hdr_length(h: *mut sam_hdr_t) -> usize; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_str(h: *mut sam_hdr_t) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_nref(h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_lines( h: *mut sam_hdr_t, lines: *const ::std::os::raw::c_char, - len: size_t, + len: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_line( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_line_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8557,7 +6111,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_line_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8565,7 +6119,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_line_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8573,14 +6127,14 @@ extern "C" { ID_value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_line_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, position: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_update_line( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8589,7 +6143,7 @@ extern "C" { ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_except( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8597,7 +6151,7 @@ extern "C" { ID_value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_lines( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8605,27 +6159,27 @@ extern "C" { rh: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_count_lines( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_line_index( bh: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_line_name( bh: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, pos: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_tag_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8635,7 +6189,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_tag_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8644,7 +6198,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_tag_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -8653,83 +6207,118 @@ extern "C" { key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_name2tid( h: *mut sam_hdr_t, ref_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_tid2name( h: *const sam_hdr_t, tid: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_tid2len(h: *const sam_hdr_t, tid: ::std::os::raw::c_int) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_pg_id( h: *mut sam_hdr_t, name: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_pg( h: *mut sam_hdr_t, name: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn stringify_argv( argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_incr_ref(h: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn bam_init1() -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_destroy1(b: *mut bam1_t); } -extern "C" { +unsafe extern "C" { pub fn bam_read1(fp: *mut BGZF, b: *mut bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_write1(fp: *mut BGZF, b: *const bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_copy1(bdst: *mut bam1_t, bsrc: *const bam1_t) -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_dup1(bsrc: *const bam1_t) -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { + pub fn bam_set1( + bam: *mut bam1_t, + l_qname: usize, + qname: *const ::std::os::raw::c_char, + flag: u16, + tid: i32, + pos: hts_pos_t, + mapq: u8, + n_cigar: usize, + cigar: *const u32, + mtid: i32, + mpos: hts_pos_t, + isize_: hts_pos_t, + l_seq: usize, + seq: *const ::std::os::raw::c_char, + qual: *const ::std::os::raw::c_char, + l_aux: usize, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_cigar2qlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn bam_cigar2rlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn bam_endpos(b: *const bam1_t) -> hts_pos_t; } -extern "C" { - pub fn bam_str2flag(str: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bam_str2flag(str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_flag2str(flag: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_set_qname( b: *mut bam1_t, qname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn sam_parse_cigar( + in_: *const ::std::os::raw::c_char, + end: *mut *mut ::std::os::raw::c_char, + a_cigar: *mut *mut u32, + a_mem: *mut usize, + ) -> isize; +} +unsafe extern "C" { + pub fn bam_parse_cigar( + in_: *const ::std::os::raw::c_char, + end: *mut *mut ::std::os::raw::c_char, + b: *mut bam1_t, + ) -> isize; +} +unsafe extern "C" { pub fn sam_idx_init( fp: *mut htsFile, h: *mut sam_hdr_t, @@ -8737,20 +6326,20 @@ extern "C" { fnidx: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load(fp: *mut htsFile, fn_: *const ::std::os::raw::c_char) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load2( fp: *mut htsFile, fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load3( fp: *mut htsFile, fn_: *const ::std::os::raw::c_char, @@ -8758,20 +6347,20 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -8779,7 +6368,7 @@ extern "C" { nthreads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_queryi( idx: *const hts_idx_t, tid: ::std::os::raw::c_int, @@ -8787,14 +6376,14 @@ extern "C" { end: hts_pos_t, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_querys( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, region: *const ::std::os::raw::c_char, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_regions( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, @@ -8802,7 +6391,7 @@ extern "C" { regcount: ::std::os::raw::c_uint, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_regarray( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, @@ -8810,7 +6399,7 @@ extern "C" { regcount: ::std::os::raw::c_uint, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_parse_region( h: *mut sam_hdr_t, s: *const ::std::os::raw::c_char, @@ -8820,76 +6409,89 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_open_mode( mode: *mut ::std::os::raw::c_char, fn_: *const ::std::os::raw::c_char, format: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_open_mode_opts( fn_: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, format: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_change_HD( h: *mut sam_hdr_t, key: *const ::std::os::raw::c_char, val: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_parse1( s: *mut kstring_t, h: *mut sam_hdr_t, b: *mut bam1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_format1( h: *const sam_hdr_t, b: *const bam1_t, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_read1(fp: *mut samFile, h: *mut sam_hdr_t, b: *mut bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_write1( fp: *mut samFile, h: *const sam_hdr_t, b: *const bam1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn sam_passes_filter( + h: *const sam_hdr_t, + b: *const bam1_t, + filt: *mut hts_filter_t, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bam_aux_first(b: *const bam1_t) -> *mut u8; +} +unsafe extern "C" { + pub fn bam_aux_next(b: *const bam1_t, s: *const u8) -> *mut u8; +} +unsafe extern "C" { pub fn bam_aux_get(b: *const bam1_t, tag: *const ::std::os::raw::c_char) -> *mut u8; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2i(s: *const u8) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2f(s: *const u8) -> f64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2A(s: *const u8) -> ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2Z(s: *const u8) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB_len(s: *const u8) -> u32; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB2i(s: *const u8, idx: u32) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB2f(s: *const u8, idx: u32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_append( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -8898,10 +6500,13 @@ extern "C" { data: *const u8, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_del(b: *mut bam1_t, s: *mut u8) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_aux_remove(b: *mut bam1_t, s: *mut u8) -> *mut u8; +} +unsafe extern "C" { pub fn bam_aux_update_str( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -8909,21 +6514,21 @@ extern "C" { data: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_int( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, val: i64, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_float( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, val: f32, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_array( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -8938,51 +6543,15 @@ pub union bam_pileup_cd { pub p: *mut ::std::os::raw::c_void, pub i: i64, pub f: f64, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bam_pileup_cd() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(f) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam_pileup_cd"][::std::mem::size_of::() - 8usize]; + ["Alignment of bam_pileup_cd"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam_pileup_cd::p"][::std::mem::offset_of!(bam_pileup_cd, p) - 0usize]; + ["Offset of field: bam_pileup_cd::i"][::std::mem::offset_of!(bam_pileup_cd, i) - 0usize]; + ["Offset of field: bam_pileup_cd::f"][::std::mem::offset_of!(bam_pileup_cd, f) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct bam_pileup1_t { @@ -8990,83 +6559,25 @@ pub struct bam_pileup1_t { pub qpos: i32, pub indel: ::std::os::raw::c_int, pub level: ::std::os::raw::c_int, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub cd: bam_pileup_cd, pub cigar_ind: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bam_pileup1_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qpos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(qpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indel as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(indel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cd as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_ind as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cigar_ind) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam_pileup1_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of bam_pileup1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam_pileup1_t::b"][::std::mem::offset_of!(bam_pileup1_t, b) - 0usize]; + ["Offset of field: bam_pileup1_t::qpos"][::std::mem::offset_of!(bam_pileup1_t, qpos) - 8usize]; + ["Offset of field: bam_pileup1_t::indel"] + [::std::mem::offset_of!(bam_pileup1_t, indel) - 12usize]; + ["Offset of field: bam_pileup1_t::level"] + [::std::mem::offset_of!(bam_pileup1_t, level) - 16usize]; + ["Offset of field: bam_pileup1_t::cd"][::std::mem::offset_of!(bam_pileup1_t, cd) - 24usize]; + ["Offset of field: bam_pileup1_t::cigar_ind"] + [::std::mem::offset_of!(bam_pileup1_t, cigar_ind) - 32usize]; +}; impl bam_pileup1_t { #[inline] pub fn is_del(&self) -> u32 { @@ -9080,6 +6591,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_del_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_del_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_head(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -9091,6 +6624,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_head_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_head_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_tail(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -9102,6 +6657,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_tail_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_tail_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_refskip(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -9113,6 +6690,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_refskip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_refskip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -9124,15 +6723,36 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn aux_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_aux_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( is_del: u32, is_head: u32, is_tail: u32, is_refskip: u32, aux: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let is_del: u32 = unsafe { ::std::mem::transmute(is_del) }; is_del as u64 @@ -9164,26 +6784,26 @@ pub type bam_plp_auto_f = ::std::option::Option< >; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __bam_plp_t { +pub struct bam_plp_s { _unused: [u8; 0], } -pub type bam_plp_t = *mut __bam_plp_t; +pub type bam_plp_t = *mut bam_plp_s; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __bam_mplp_t { +pub struct bam_mplp_s { _unused: [u8; 0], } -pub type bam_mplp_t = *mut __bam_mplp_t; -extern "C" { +pub type bam_mplp_t = *mut bam_mplp_s; +unsafe extern "C" { pub fn bam_plp_init(func: bam_plp_auto_f, data: *mut ::std::os::raw::c_void) -> bam_plp_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_destroy(iter: bam_plp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_push(iter: bam_plp_t, b: *const bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_next( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -9191,7 +6811,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_auto( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -9199,7 +6819,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp64_next( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -9207,7 +6827,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp64_auto( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -9215,13 +6835,13 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_set_maxcnt(iter: bam_plp_t, maxcnt: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_reset(iter: bam_plp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_constructor( plp: bam_plp_t, func: ::std::option::Option< @@ -9233,7 +6853,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_destructor( plp: bam_plp_t, func: ::std::option::Option< @@ -9245,30 +6865,43 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_insertion( p: *const bam_pileup1_t, ins: *mut kstring_t, del_len: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_base_mod_state { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn bam_plp_insertion_mod( + p: *const bam_pileup1_t, + m: *mut hts_base_mod_state, + ins: *mut kstring_t, + del_len: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mplp_init( n: ::std::os::raw::c_int, func: bam_plp_auto_f, data: *mut *mut ::std::os::raw::c_void, ) -> bam_mplp_t; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_init_overlaps(iter: bam_mplp_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_destroy(iter: bam_mplp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_set_maxcnt(iter: bam_mplp_t, maxcnt: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_auto( iter: bam_mplp_t, _tid: *mut ::std::os::raw::c_int, @@ -9277,7 +6910,7 @@ extern "C" { plp: *mut *const bam_pileup1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp64_auto( iter: bam_mplp_t, _tid: *mut ::std::os::raw::c_int, @@ -9286,10 +6919,10 @@ extern "C" { plp: *mut *const bam_pileup1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_reset(iter: bam_mplp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_constructor( iter: bam_mplp_t, func: ::std::option::Option< @@ -9301,7 +6934,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_destructor( iter: bam_mplp_t, func: ::std::option::Option< @@ -9313,7 +6946,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn sam_cap_mapq( b: *mut bam1_t, ref_: *const ::std::os::raw::c_char, @@ -9321,7 +6954,17 @@ extern "C" { thres: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +pub const htsRealnFlags_BAQ_APPLY: htsRealnFlags = 1; +pub const htsRealnFlags_BAQ_EXTEND: htsRealnFlags = 2; +pub const htsRealnFlags_BAQ_REDO: htsRealnFlags = 4; +pub const htsRealnFlags_BAQ_AUTO: htsRealnFlags = 0; +pub const htsRealnFlags_BAQ_ILLUMINA: htsRealnFlags = 8; +pub const htsRealnFlags_BAQ_PACBIOCCS: htsRealnFlags = 16; +pub const htsRealnFlags_BAQ_PACBIO: htsRealnFlags = 24; +pub const htsRealnFlags_BAQ_ONT: htsRealnFlags = 32; +pub const htsRealnFlags_BAQ_GENAPSYS: htsRealnFlags = 40; +pub type htsRealnFlags = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn sam_prob_realn( b: *mut bam1_t, ref_: *const ::std::os::raw::c_char, @@ -9329,13 +6972,6 @@ extern "C" { flag: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } - -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_base_mod_state { - _unused: [u8; 0], -} - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_base_mod { @@ -9344,72 +6980,38 @@ pub struct hts_base_mod { pub strand: ::std::os::raw::c_int, pub qual: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_hts_base_mod() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_base_mod)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hts_base_mod)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).modified_base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(modified_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).canonical_base as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(canonical_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).strand as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(strand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(qual) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_base_mod"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_base_mod"][::std::mem::align_of::() - 4usize]; + ["Offset of field: hts_base_mod::modified_base"] + [::std::mem::offset_of!(hts_base_mod, modified_base) - 0usize]; + ["Offset of field: hts_base_mod::canonical_base"] + [::std::mem::offset_of!(hts_base_mod, canonical_base) - 4usize]; + ["Offset of field: hts_base_mod::strand"] + [::std::mem::offset_of!(hts_base_mod, strand) - 8usize]; + ["Offset of field: hts_base_mod::qual"][::std::mem::offset_of!(hts_base_mod, qual) - 12usize]; +}; +unsafe extern "C" { pub fn hts_base_mod_state_alloc() -> *mut hts_base_mod_state; } -extern "C" { +unsafe extern "C" { pub fn hts_base_mod_state_free(state: *mut hts_base_mod_state); } -extern "C" { +unsafe extern "C" { pub fn bam_parse_basemod( b: *const bam1_t, state: *mut hts_base_mod_state, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_parse_basemod2( + b: *const bam1_t, + state: *mut hts_base_mod_state, + flags: u32, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mods_at_next_pos( b: *const bam1_t, state: *mut hts_base_mod_state, @@ -9417,7 +7019,7 @@ extern "C" { n_mods: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_next_basemod( b: *const bam1_t, state: *mut hts_base_mod_state, @@ -9426,7 +7028,7 @@ extern "C" { pos: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mods_at_qpos( b: *const bam1_t, qpos: ::std::os::raw::c_int, @@ -9435,7 +7037,7 @@ extern "C" { n_mods: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mods_query_type( state: *mut hts_base_mod_state, code: ::std::os::raw::c_int, @@ -9444,24 +7046,340 @@ extern "C" { canonical: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_mods_queryi( + state: *mut hts_base_mod_state, + i: ::std::os::raw::c_int, + strand: *mut ::std::os::raw::c_int, + implicit: *mut ::std::os::raw::c_int, + canonical: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mods_recorded( state: *mut hts_base_mod_state, ntype: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_int; } - - -pub const cram_block_method_BM_ERROR: cram_block_method = -1; -pub const cram_block_method_RAW: cram_block_method = 0; -pub const cram_block_method_GZIP: cram_block_method = 1; -pub const cram_block_method_BZIP2: cram_block_method = 2; -pub const cram_block_method_LZMA: cram_block_method = 3; -pub const cram_block_method_RANS: cram_block_method = 4; -pub const cram_block_method_RANS0: cram_block_method = 4; -pub const cram_block_method_RANS1: cram_block_method = 10; -pub const cram_block_method_GZIP_RLE: cram_block_method = 11; -pub type cram_block_method = i32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hFILE_backend { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hFILE { + pub buffer: *mut ::std::os::raw::c_char, + pub begin: *mut ::std::os::raw::c_char, + pub end: *mut ::std::os::raw::c_char, + pub limit: *mut ::std::os::raw::c_char, + pub backend: *const hFILE_backend, + pub offset: off_t, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub has_errno: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hFILE"][::std::mem::size_of::() - 56usize]; + ["Alignment of hFILE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hFILE::buffer"][::std::mem::offset_of!(hFILE, buffer) - 0usize]; + ["Offset of field: hFILE::begin"][::std::mem::offset_of!(hFILE, begin) - 8usize]; + ["Offset of field: hFILE::end"][::std::mem::offset_of!(hFILE, end) - 16usize]; + ["Offset of field: hFILE::limit"][::std::mem::offset_of!(hFILE, limit) - 24usize]; + ["Offset of field: hFILE::backend"][::std::mem::offset_of!(hFILE, backend) - 32usize]; + ["Offset of field: hFILE::offset"][::std::mem::offset_of!(hFILE, offset) - 40usize]; + ["Offset of field: hFILE::has_errno"][::std::mem::offset_of!(hFILE, has_errno) - 52usize]; +}; +impl hFILE { + #[inline] + pub fn at_eof(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_at_eof(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn at_eof_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_at_eof_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mobile(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_mobile(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mobile_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mobile_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn readonly(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_readonly(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn readonly_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_readonly_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn preserve(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_preserve(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn preserve_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_preserve_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + at_eof: ::std::os::raw::c_uint, + mobile: ::std::os::raw::c_uint, + readonly: ::std::os::raw::c_uint, + preserve: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let at_eof: u32 = unsafe { ::std::mem::transmute(at_eof) }; + at_eof as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let mobile: u32 = unsafe { ::std::mem::transmute(mobile) }; + mobile as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let readonly: u32 = unsafe { ::std::mem::transmute(readonly) }; + readonly as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let preserve: u32 = unsafe { ::std::mem::transmute(preserve) }; + preserve as u64 + }); + __bindgen_bitfield_unit + } +} +unsafe extern "C" { + pub fn hopen( + filename: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + ... + ) -> *mut hFILE; +} +unsafe extern "C" { + pub fn hdopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut hFILE; +} +unsafe extern "C" { + pub fn hisremote(filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn haddextension( + buffer: *mut kstring_t, + filename: *const ::std::os::raw::c_char, + replace: ::std::os::raw::c_int, + extension: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hclose(fp: *mut hFILE) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hclose_abruptly(fp: *mut hFILE); +} +unsafe extern "C" { + pub fn hseek(fp: *mut hFILE, offset: off_t, whence: ::std::os::raw::c_int) -> off_t; +} +unsafe extern "C" { + pub fn hgetdelim( + buffer: *mut ::std::os::raw::c_char, + size: usize, + delim: ::std::os::raw::c_int, + fp: *mut hFILE, + ) -> isize; +} +unsafe extern "C" { + pub fn hgets( + buffer: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + fp: *mut hFILE, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hpeek(fp: *mut hFILE, buffer: *mut ::std::os::raw::c_void, nbytes: usize) -> isize; +} +unsafe extern "C" { + pub fn hflush(fp: *mut hFILE) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_mem_get_buffer( + file: *mut hFILE, + length: *mut usize, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hfile_mem_steal_buffer( + file: *mut hFILE, + length: *mut usize, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hfile_list_schemes( + plugin: *const ::std::os::raw::c_char, + sc_list: *mut *const ::std::os::raw::c_char, + nschemes: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_list_plugins( + plist: *mut *const ::std::os::raw::c_char, + nplugins: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_has_plugin(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +pub const cram_block_method_CRAM_COMP_UNKNOWN: cram_block_method = -1; +pub const cram_block_method_CRAM_COMP_RAW: cram_block_method = 0; +pub const cram_block_method_CRAM_COMP_GZIP: cram_block_method = 1; +pub const cram_block_method_CRAM_COMP_BZIP2: cram_block_method = 2; +pub const cram_block_method_CRAM_COMP_LZMA: cram_block_method = 3; +pub const cram_block_method_CRAM_COMP_RANS4x8: cram_block_method = 4; +pub const cram_block_method_CRAM_COMP_RANSNx16: cram_block_method = 5; +pub const cram_block_method_CRAM_COMP_ARITH: cram_block_method = 6; +pub const cram_block_method_CRAM_COMP_FQZ: cram_block_method = 7; +pub const cram_block_method_CRAM_COMP_TOK3: cram_block_method = 8; +pub type cram_block_method = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_method_details { + pub method: cram_block_method, + pub level: ::std::os::raw::c_int, + pub order: ::std::os::raw::c_int, + pub rle: ::std::os::raw::c_int, + pub pack: ::std::os::raw::c_int, + pub stripe: ::std::os::raw::c_int, + pub cat: ::std::os::raw::c_int, + pub nosz: ::std::os::raw::c_int, + pub Nway: ::std::os::raw::c_int, + pub ext: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cram_method_details"][::std::mem::size_of::() - 40usize]; + ["Alignment of cram_method_details"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cram_method_details::method"] + [::std::mem::offset_of!(cram_method_details, method) - 0usize]; + ["Offset of field: cram_method_details::level"] + [::std::mem::offset_of!(cram_method_details, level) - 4usize]; + ["Offset of field: cram_method_details::order"] + [::std::mem::offset_of!(cram_method_details, order) - 8usize]; + ["Offset of field: cram_method_details::rle"] + [::std::mem::offset_of!(cram_method_details, rle) - 12usize]; + ["Offset of field: cram_method_details::pack"] + [::std::mem::offset_of!(cram_method_details, pack) - 16usize]; + ["Offset of field: cram_method_details::stripe"] + [::std::mem::offset_of!(cram_method_details, stripe) - 20usize]; + ["Offset of field: cram_method_details::cat"] + [::std::mem::offset_of!(cram_method_details, cat) - 24usize]; + ["Offset of field: cram_method_details::nosz"] + [::std::mem::offset_of!(cram_method_details, nosz) - 28usize]; + ["Offset of field: cram_method_details::Nway"] + [::std::mem::offset_of!(cram_method_details, Nway) - 32usize]; + ["Offset of field: cram_method_details::ext"] + [::std::mem::offset_of!(cram_method_details, ext) - 36usize]; +}; pub const cram_content_type_CT_ERROR: cram_content_type = -1; pub const cram_content_type_FILE_HEADER: cram_content_type = 0; pub const cram_content_type_COMPRESSION_HEADER: cram_content_type = 1; @@ -9469,7 +7387,7 @@ pub const cram_content_type_MAPPED_SLICE: cram_content_type = 2; pub const cram_content_type_UNMAPPED_SLICE: cram_content_type = 3; pub const cram_content_type_EXTERNAL: cram_content_type = 4; pub const cram_content_type_CORE: cram_content_type = 5; -pub type cram_content_type = i32; +pub type cram_content_type = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cram_file_def { @@ -9507,114 +7425,141 @@ pub struct cram_block_compression_hdr { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct cram_codec { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct refs_t { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_header(fd: *mut cram_fd) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_version(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_version(fd: *mut cram_fd, vers: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn cram_major_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_minor_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_fp(fd: *mut cram_fd) -> *mut hFILE; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_fp(fd: *mut cram_fd, fp: *mut hFILE); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_length(c: *mut cram_container) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_length(c: *mut cram_container, length: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_num_blocks(c: *mut cram_container) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_num_blocks(c: *mut cram_container, num_blocks: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_landmarks( c: *mut cram_container, num_landmarks: *mut i32, ) -> *mut i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_landmarks( c: *mut cram_container, num_landmarks: i32, landmarks: *mut i32, ); } -extern "C" { +unsafe extern "C" { + pub fn cram_container_get_num_records(c: *mut cram_container) -> i32; +} +unsafe extern "C" { + pub fn cram_container_get_num_bases(c: *mut cram_container) -> i64; +} +unsafe extern "C" { pub fn cram_container_is_empty(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_content_id(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_comp_size(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_uncomp_size(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_crc32(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_data(b: *mut cram_block) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_content_type(b: *mut cram_block) -> cram_content_type; } -extern "C" { +unsafe extern "C" { + pub fn cram_block_get_method(b: *mut cram_block) -> cram_block_method; +} +unsafe extern "C" { + pub fn cram_expand_method( + data: *mut u8, + size: i32, + comp: cram_block_method, + ) -> *mut cram_method_details; +} +unsafe extern "C" { pub fn cram_block_set_content_id(b: *mut cram_block, id: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_comp_size(b: *mut cram_block, size: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_uncomp_size(b: *mut cram_block, size: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_crc32(b: *mut cram_block, crc: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_data(b: *mut cram_block, data: *mut ::std::os::raw::c_void); } -extern "C" { +unsafe extern "C" { pub fn cram_block_append( b: *mut cram_block, data: *const ::std::os::raw::c_void, size: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_block_update_size(b: *mut cram_block); } -extern "C" { - pub fn cram_block_get_offset(b: *mut cram_block) -> size_t; +unsafe extern "C" { + pub fn cram_block_get_offset(b: *mut cram_block) -> usize; } -extern "C" { - pub fn cram_block_set_offset(b: *mut cram_block, offset: size_t); +unsafe extern "C" { + pub fn cram_block_set_offset(b: *mut cram_block, offset: usize); } -extern "C" { +unsafe extern "C" { pub fn cram_block_size(b: *mut cram_block) -> u32; } -extern "C" { +unsafe extern "C" { + pub fn cram_codec_get_content_ids(c: *mut cram_codec, ids: *mut ::std::os::raw::c_int); +} +unsafe extern "C" { + pub fn cram_codec_describe(c: *mut cram_codec, ks: *mut kstring_t) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn cram_transcode_rg( in_: *mut cram_fd, out: *mut cram_fd, @@ -9624,32 +7569,91 @@ extern "C" { out_rg: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn cram_copy_slice( - in_: *mut cram_fd, - out: *mut cram_fd, - num_slice: i32, +unsafe extern "C" { + pub fn cram_copy_slice( + in_: *mut cram_fd, + out: *mut cram_fd, + num_slice: i32, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_decode_compression_header( + fd: *mut cram_fd, + b: *mut cram_block, + ) -> *mut cram_block_compression_hdr; +} +unsafe extern "C" { + pub fn cram_free_compression_header(hdr: *mut cram_block_compression_hdr); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_cid2ds_t { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn cram_update_cid2ds_map( + hdr: *mut cram_block_compression_hdr, + cid2ds: *mut cram_cid2ds_t, + ) -> *mut cram_cid2ds_t; +} +unsafe extern "C" { + pub fn cram_cid2ds_query( + c2d: *mut cram_cid2ds_t, + content_id: ::std::os::raw::c_int, + n: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_cid2ds_free(cid2ds: *mut cram_cid2ds_t); +} +unsafe extern "C" { + pub fn cram_describe_encodings( + hdr: *mut cram_block_compression_hdr, + ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn cram_slice_hdr_get_num_blocks(hdr: *mut cram_block_slice_hdr) -> i32; +} +unsafe extern "C" { + pub fn cram_slice_hdr_get_embed_ref_id(h: *mut cram_block_slice_hdr) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_slice_hdr_get_coords( + h: *mut cram_block_slice_hdr, + refid: *mut ::std::os::raw::c_int, + start: *mut hts_pos_t, + span: *mut hts_pos_t, + ); +} +unsafe extern "C" { + pub fn cram_decode_slice_header( + fd: *mut cram_fd, + b: *mut cram_block, + ) -> *mut cram_block_slice_hdr; +} +unsafe extern "C" { + pub fn cram_free_slice_header(hdr: *mut cram_block_slice_hdr); +} +unsafe extern "C" { pub fn cram_new_block( content_type: cram_content_type, content_id: ::std::os::raw::c_int, ) -> *mut cram_block; } -extern "C" { +unsafe extern "C" { pub fn cram_read_block(fd: *mut cram_fd) -> *mut cram_block; } -extern "C" { +unsafe extern "C" { pub fn cram_write_block(fd: *mut cram_fd, b: *mut cram_block) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_free_block(b: *mut cram_block); } -extern "C" { +unsafe extern "C" { pub fn cram_uncompress_block(b: *mut cram_block) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_compress_block( fd: *mut cram_fd, b: *mut cram_block, @@ -9658,22 +7662,32 @@ extern "C" { level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn cram_compress_block2( + fd: *mut cram_fd, + s: *mut cram_slice, + b: *mut cram_block, + metrics: *mut cram_metrics, + method: ::std::os::raw::c_int, + level: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn cram_new_container( nrec: ::std::os::raw::c_int, nslice: ::std::os::raw::c_int, ) -> *mut cram_container; } -extern "C" { +unsafe extern "C" { pub fn cram_free_container(c: *mut cram_container); } -extern "C" { +unsafe extern "C" { pub fn cram_read_container(fd: *mut cram_fd) -> *mut cram_container; } -extern "C" { +unsafe extern "C" { pub fn cram_write_container(fd: *mut cram_fd, h: *mut cram_container) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_store_container( fd: *mut cram_fd, c: *mut cram_container, @@ -9681,59 +7695,59 @@ extern "C" { size: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_container_size(c: *mut cram_container) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_open( filename: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut cram_fd; } -extern "C" { +unsafe extern "C" { pub fn cram_dopen( fp: *mut hFILE, filename: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut cram_fd; } -extern "C" { +unsafe extern "C" { pub fn cram_close(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_seek( fd: *mut cram_fd, offset: off_t, whence: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_flush(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_eof(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_option(fd: *mut cram_fd, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_voption( fd: *mut cram_fd, opt: hts_fmt_option, args: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_check_EOF(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn int32_put_blk(b: *mut cram_block, val: i32) -> ::std::os::raw::c_int; } pub type SAM_hdr = sam_hdr_t; -extern "C" { +unsafe extern "C" { pub fn cram_get_refs(fd: *mut htsFile) -> *mut refs_t; } #[repr(C)] @@ -9743,10 +7757,9 @@ pub struct bgzf_mtaux_t { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __bgzidx_t { +pub struct bgzidx_t { _unused: [u8; 0], } -pub type bgzidx_t = __bgzidx_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bgzf_cache_t { @@ -9760,7 +7773,8 @@ pub struct z_stream_s { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct BGZF { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub cache_size: ::std::os::raw::c_int, pub block_length: ::std::os::raw::c_int, pub block_clength: ::std::os::raw::c_int, @@ -9777,154 +7791,29 @@ pub struct BGZF { pub gz_stream: *mut z_stream_s, pub seeked: i64, } -#[test] -fn bindgen_test_layout_BGZF() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(BGZF)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(BGZF)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache_size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_length as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_clength as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_clength) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_offset as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_address as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_address as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_block as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compressed_block as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(compressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 64usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(fp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mt as *const _ as usize }, - 72usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(mt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(idx)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx_build_otf as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(idx_build_otf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gz_stream as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(gz_stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seeked as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(seeked) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BGZF"][::std::mem::size_of::() - 112usize]; + ["Alignment of BGZF"][::std::mem::align_of::() - 8usize]; + ["Offset of field: BGZF::cache_size"][::std::mem::offset_of!(BGZF, cache_size) - 4usize]; + ["Offset of field: BGZF::block_length"][::std::mem::offset_of!(BGZF, block_length) - 8usize]; + ["Offset of field: BGZF::block_clength"][::std::mem::offset_of!(BGZF, block_clength) - 12usize]; + ["Offset of field: BGZF::block_offset"][::std::mem::offset_of!(BGZF, block_offset) - 16usize]; + ["Offset of field: BGZF::block_address"][::std::mem::offset_of!(BGZF, block_address) - 24usize]; + ["Offset of field: BGZF::uncompressed_address"] + [::std::mem::offset_of!(BGZF, uncompressed_address) - 32usize]; + ["Offset of field: BGZF::uncompressed_block"] + [::std::mem::offset_of!(BGZF, uncompressed_block) - 40usize]; + ["Offset of field: BGZF::compressed_block"] + [::std::mem::offset_of!(BGZF, compressed_block) - 48usize]; + ["Offset of field: BGZF::cache"][::std::mem::offset_of!(BGZF, cache) - 56usize]; + ["Offset of field: BGZF::fp"][::std::mem::offset_of!(BGZF, fp) - 64usize]; + ["Offset of field: BGZF::mt"][::std::mem::offset_of!(BGZF, mt) - 72usize]; + ["Offset of field: BGZF::idx"][::std::mem::offset_of!(BGZF, idx) - 80usize]; + ["Offset of field: BGZF::idx_build_otf"][::std::mem::offset_of!(BGZF, idx_build_otf) - 88usize]; + ["Offset of field: BGZF::gz_stream"][::std::mem::offset_of!(BGZF, gz_stream) - 96usize]; + ["Offset of field: BGZF::seeked"][::std::mem::offset_of!(BGZF, seeked) - 104usize]; +}; impl BGZF { #[inline] pub fn errcode(&self) -> ::std::os::raw::c_uint { @@ -9938,6 +7827,28 @@ impl BGZF { } } #[inline] + pub unsafe fn errcode_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_errcode_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn reserved(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } } @@ -9949,6 +7860,28 @@ impl BGZF { } } #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_write(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } } @@ -9960,6 +7893,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_write_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_write_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn no_eof_block(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } } @@ -9971,6 +7926,28 @@ impl BGZF { } } #[inline] + pub unsafe fn no_eof_block_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_eof_block_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_be(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } } @@ -9982,6 +7959,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_be_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_be_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn compress_level(&self) -> ::std::os::raw::c_int { unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 9u8) as u32) } } @@ -9993,6 +7992,28 @@ impl BGZF { } } #[inline] + pub unsafe fn compress_level_raw(this: *const Self) -> ::std::os::raw::c_int { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 9u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_compress_level_raw(this: *mut Self, val: ::std::os::raw::c_int) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 9u8, + val as u64, + ) + } + } + #[inline] pub fn last_block_eof(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } } @@ -10004,6 +8025,28 @@ impl BGZF { } } #[inline] + pub unsafe fn last_block_eof_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_last_block_eof_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_compressed(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } } @@ -10015,6 +8058,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_compressed_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_compressed_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_gzip(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -10026,6 +8091,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_gzip_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_gzip_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( errcode: ::std::os::raw::c_uint, reserved: ::std::os::raw::c_uint, @@ -10036,9 +8123,8 @@ impl BGZF { last_block_eof: ::std::os::raw::c_uint, is_compressed: ::std::os::raw::c_uint, is_gzip: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 16u8, { let errcode: u32 = unsafe { ::std::mem::transmute(errcode) }; errcode as u64 @@ -10078,171 +8164,163 @@ impl BGZF { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn bgzf_dopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_open( path: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_hopen(fp: *mut hFILE, mode: *const ::std::os::raw::c_char) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_close(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { - pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: size_t) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { - pub fn bgzf_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_write(fp: *mut BGZF, data: *const ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_block_write( fp: *mut BGZF, data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; + length: usize, + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_peek(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { - pub fn bgzf_raw_read( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_raw_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_raw_write( fp: *mut BGZF, data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; + length: usize, + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_flush(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_seek(fp: *mut BGZF, pos: i64, whence: ::std::os::raw::c_int) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bgzf_check_EOF(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_compression(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_is_bgzf(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_set_cache_size(fp: *mut BGZF, size: ::std::os::raw::c_int); } -extern "C" { - pub fn bgzf_flush_try(fp: *mut BGZF, size: ssize_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bgzf_flush_try(fp: *mut BGZF, size: isize) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_getc(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_getline( fp: *mut BGZF, delim: ::std::os::raw::c_int, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_read_block(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_thread_pool( fp: *mut BGZF, pool: *mut hts_tpool, qsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_mt( fp: *mut BGZF, n_threads: ::std::os::raw::c_int, n_sub_blks: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_compress( dst: *mut ::std::os::raw::c_void, - dlen: *mut size_t, + dlen: *mut usize, src: *const ::std::os::raw::c_void, - slen: size_t, + slen: usize, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_useek( fp: *mut BGZF, uoffset: off_t, where_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_utell(fp: *mut BGZF) -> off_t; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_build_init(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_load( fp: *mut BGZF, bname: *const ::std::os::raw::c_char, suffix: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_load_hfile( fp: *mut BGZF, idx: *mut hFILE, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_dump( fp: *mut BGZF, bname: *const ::std::os::raw::c_char, suffix: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_dump_hfile( fp: *mut BGZF, idx: *mut hFILE, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_trim_alleles(header: *const bcf_hdr_t, line: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_alleles( header: *const bcf_hdr_t, line: *mut bcf1_t, mask: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_allele_set( header: *const bcf_hdr_t, line: *mut bcf1_t, rm_set: *const kbitset_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_calc_ac( header: *const bcf_hdr_t, line: *mut bcf1_t, @@ -10250,7 +8328,7 @@ extern "C" { which: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_gt_type( fmt_ptr: *mut bcf_fmt_t, isample: ::std::os::raw::c_int, @@ -10268,79 +8346,19 @@ pub struct tbx_conf_t { pub meta_char: i32, pub line_skip: i32, } -#[test] -fn bindgen_test_layout_tbx_conf_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(tbx_conf_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tbx_conf_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).preset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(preset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sc as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(sc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(bc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ec as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(ec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta_char as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(meta_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_skip as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(line_skip) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tbx_conf_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of tbx_conf_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: tbx_conf_t::preset"][::std::mem::offset_of!(tbx_conf_t, preset) - 0usize]; + ["Offset of field: tbx_conf_t::sc"][::std::mem::offset_of!(tbx_conf_t, sc) - 4usize]; + ["Offset of field: tbx_conf_t::bc"][::std::mem::offset_of!(tbx_conf_t, bc) - 8usize]; + ["Offset of field: tbx_conf_t::ec"][::std::mem::offset_of!(tbx_conf_t, ec) - 12usize]; + ["Offset of field: tbx_conf_t::meta_char"] + [::std::mem::offset_of!(tbx_conf_t, meta_char) - 16usize]; + ["Offset of field: tbx_conf_t::line_skip"] + [::std::mem::offset_of!(tbx_conf_t, line_skip) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tbx_t { @@ -10348,72 +8366,37 @@ pub struct tbx_t { pub idx: *mut hts_idx_t, pub dict: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_tbx_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(tbx_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tbx_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(conf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(dict) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tbx_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of tbx_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tbx_t::conf"][::std::mem::offset_of!(tbx_t, conf) - 0usize]; + ["Offset of field: tbx_t::idx"][::std::mem::offset_of!(tbx_t, idx) - 24usize]; + ["Offset of field: tbx_t::dict"][::std::mem::offset_of!(tbx_t, dict) - 32usize]; +}; +unsafe extern "C" { pub static tbx_conf_gff: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_bed: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_psltbl: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_sam: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_vcf: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_name2id(tbx: *mut tbx_t, ss: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_get_bgzfp(fp: *mut htsFile) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn tbx_readrec( fp: *mut BGZF, tbxv: *mut ::std::os::raw::c_void, @@ -10423,21 +8406,21 @@ extern "C" { end: *mut hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index( fp: *mut BGZF, min_shift: ::std::os::raw::c_int, conf: *const tbx_conf_t, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -10445,7 +8428,7 @@ extern "C" { conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -10454,37 +8437,45 @@ extern "C" { conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load(fn_: *const ::std::os::raw::c_char) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, flags: ::std::os::raw::c_int, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_seqnames( tbx: *mut tbx_t, n: *mut ::std::os::raw::c_int, ) -> *mut *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn tbx_destroy(tbx: *mut tbx_t); } pub const bcf_sr_opt_t_BCF_SR_REQUIRE_IDX: bcf_sr_opt_t = 0; pub const bcf_sr_opt_t_BCF_SR_PAIR_LOGIC: bcf_sr_opt_t = 1; -pub type bcf_sr_opt_t = u32; +pub const bcf_sr_opt_t_BCF_SR_ALLOW_NO_IDX: bcf_sr_opt_t = 2; +pub const bcf_sr_opt_t_BCF_SR_REGIONS_OVERLAP: bcf_sr_opt_t = 3; +pub const bcf_sr_opt_t_BCF_SR_TARGETS_OVERLAP: bcf_sr_opt_t = 4; +pub type bcf_sr_opt_t = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct bcf_sr_region_t { + _unused: [u8; 0], +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct _bcf_sr_regions_t { +pub struct bcf_sr_regions_t { pub tbx: *mut tbx_t, pub itr: *mut hts_itr_t, pub line: kstring_t, @@ -10497,10 +8488,10 @@ pub struct _bcf_sr_regions_t { pub mals: ::std::os::raw::c_int, pub als_type: ::std::os::raw::c_int, pub missed_reg_handler: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut _bcf_sr_regions_t, arg2: *mut ::std::os::raw::c_void), + unsafe extern "C" fn(arg1: *mut bcf_sr_regions_t, arg2: *mut ::std::os::raw::c_void), >, pub missed_reg_data: *mut ::std::os::raw::c_void, - pub regs: *mut _region_t, + pub regs: *mut bcf_sr_region_t, pub seq_hash: *mut ::std::os::raw::c_void, pub seq_names: *mut *mut ::std::os::raw::c_char, pub nseqs: ::std::os::raw::c_int, @@ -10510,255 +8501,61 @@ pub struct _bcf_sr_regions_t { pub prev_seq: ::std::os::raw::c_int, pub prev_start: hts_pos_t, pub prev_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout__bcf_sr_regions_t() { - assert_eq!( - ::std::mem::size_of::<_bcf_sr_regions_t>(), - 200usize, - concat!("Size of: ", stringify!(_bcf_sr_regions_t)) - ); - assert_eq!( - ::std::mem::align_of::<_bcf_sr_regions_t>(), - 8usize, - concat!("Alignment of ", stringify!(_bcf_sr_regions_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).tbx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(tbx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).itr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).file as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).fname as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).is_bin as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(is_bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als_str as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als_str) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).nals as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(nals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).mals as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(mals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als_type as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bcf_sr_regions_t>())).missed_reg_handler as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(missed_reg_handler) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bcf_sr_regions_t>())).missed_reg_data as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(missed_reg_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).regs as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).seq_hash as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(seq_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).seq_names as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(seq_names) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).nseqs as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(nseqs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).iseq as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(iseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).start as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).end as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_seq as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_start as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_end as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_end) - ) - ); -} -pub type bcf_sr_regions_t = _bcf_sr_regions_t; + pub overlap: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_sr_regions_t"][::std::mem::size_of::() - 208usize]; + ["Alignment of bcf_sr_regions_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_sr_regions_t::tbx"] + [::std::mem::offset_of!(bcf_sr_regions_t, tbx) - 0usize]; + ["Offset of field: bcf_sr_regions_t::itr"] + [::std::mem::offset_of!(bcf_sr_regions_t, itr) - 8usize]; + ["Offset of field: bcf_sr_regions_t::line"] + [::std::mem::offset_of!(bcf_sr_regions_t, line) - 16usize]; + ["Offset of field: bcf_sr_regions_t::file"] + [::std::mem::offset_of!(bcf_sr_regions_t, file) - 40usize]; + ["Offset of field: bcf_sr_regions_t::fname"] + [::std::mem::offset_of!(bcf_sr_regions_t, fname) - 48usize]; + ["Offset of field: bcf_sr_regions_t::is_bin"] + [::std::mem::offset_of!(bcf_sr_regions_t, is_bin) - 56usize]; + ["Offset of field: bcf_sr_regions_t::als"] + [::std::mem::offset_of!(bcf_sr_regions_t, als) - 64usize]; + ["Offset of field: bcf_sr_regions_t::als_str"] + [::std::mem::offset_of!(bcf_sr_regions_t, als_str) - 72usize]; + ["Offset of field: bcf_sr_regions_t::nals"] + [::std::mem::offset_of!(bcf_sr_regions_t, nals) - 96usize]; + ["Offset of field: bcf_sr_regions_t::mals"] + [::std::mem::offset_of!(bcf_sr_regions_t, mals) - 100usize]; + ["Offset of field: bcf_sr_regions_t::als_type"] + [::std::mem::offset_of!(bcf_sr_regions_t, als_type) - 104usize]; + ["Offset of field: bcf_sr_regions_t::missed_reg_handler"] + [::std::mem::offset_of!(bcf_sr_regions_t, missed_reg_handler) - 112usize]; + ["Offset of field: bcf_sr_regions_t::missed_reg_data"] + [::std::mem::offset_of!(bcf_sr_regions_t, missed_reg_data) - 120usize]; + ["Offset of field: bcf_sr_regions_t::regs"] + [::std::mem::offset_of!(bcf_sr_regions_t, regs) - 128usize]; + ["Offset of field: bcf_sr_regions_t::seq_hash"] + [::std::mem::offset_of!(bcf_sr_regions_t, seq_hash) - 136usize]; + ["Offset of field: bcf_sr_regions_t::seq_names"] + [::std::mem::offset_of!(bcf_sr_regions_t, seq_names) - 144usize]; + ["Offset of field: bcf_sr_regions_t::nseqs"] + [::std::mem::offset_of!(bcf_sr_regions_t, nseqs) - 152usize]; + ["Offset of field: bcf_sr_regions_t::iseq"] + [::std::mem::offset_of!(bcf_sr_regions_t, iseq) - 156usize]; + ["Offset of field: bcf_sr_regions_t::start"] + [::std::mem::offset_of!(bcf_sr_regions_t, start) - 160usize]; + ["Offset of field: bcf_sr_regions_t::end"] + [::std::mem::offset_of!(bcf_sr_regions_t, end) - 168usize]; + ["Offset of field: bcf_sr_regions_t::prev_seq"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_seq) - 176usize]; + ["Offset of field: bcf_sr_regions_t::prev_start"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_start) - 184usize]; + ["Offset of field: bcf_sr_regions_t::prev_end"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_end) - 192usize]; + ["Offset of field: bcf_sr_regions_t::overlap"] + [::std::mem::offset_of!(bcf_sr_regions_t, overlap) - 200usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_sr_t { @@ -10776,149 +8573,26 @@ pub struct bcf_sr_t { pub samples: *mut ::std::os::raw::c_int, pub n_smpl: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_sr_t() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(bcf_sr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx_idx as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(tbx_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bcf_idx as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(bcf_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).header as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(header) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nbuffer as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbuffer as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(mbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nfilter_ids as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nfilter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filter_ids as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(filter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(n_smpl) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_sr_t"][::std::mem::size_of::() - 96usize]; + ["Alignment of bcf_sr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_sr_t::file"][::std::mem::offset_of!(bcf_sr_t, file) - 0usize]; + ["Offset of field: bcf_sr_t::tbx_idx"][::std::mem::offset_of!(bcf_sr_t, tbx_idx) - 8usize]; + ["Offset of field: bcf_sr_t::bcf_idx"][::std::mem::offset_of!(bcf_sr_t, bcf_idx) - 16usize]; + ["Offset of field: bcf_sr_t::header"][::std::mem::offset_of!(bcf_sr_t, header) - 24usize]; + ["Offset of field: bcf_sr_t::itr"][::std::mem::offset_of!(bcf_sr_t, itr) - 32usize]; + ["Offset of field: bcf_sr_t::fname"][::std::mem::offset_of!(bcf_sr_t, fname) - 40usize]; + ["Offset of field: bcf_sr_t::buffer"][::std::mem::offset_of!(bcf_sr_t, buffer) - 48usize]; + ["Offset of field: bcf_sr_t::nbuffer"][::std::mem::offset_of!(bcf_sr_t, nbuffer) - 56usize]; + ["Offset of field: bcf_sr_t::mbuffer"][::std::mem::offset_of!(bcf_sr_t, mbuffer) - 60usize]; + ["Offset of field: bcf_sr_t::nfilter_ids"] + [::std::mem::offset_of!(bcf_sr_t, nfilter_ids) - 64usize]; + ["Offset of field: bcf_sr_t::filter_ids"] + [::std::mem::offset_of!(bcf_sr_t, filter_ids) - 72usize]; + ["Offset of field: bcf_sr_t::samples"][::std::mem::offset_of!(bcf_sr_t, samples) - 80usize]; + ["Offset of field: bcf_sr_t::n_smpl"][::std::mem::offset_of!(bcf_sr_t, n_smpl) - 88usize]; +}; pub const bcf_sr_error_open_failed: bcf_sr_error = 0; pub const bcf_sr_error_not_bgzf: bcf_sr_error = 1; pub const bcf_sr_error_idx_load_failed: bcf_sr_error = 2; @@ -10929,7 +8603,8 @@ pub const bcf_sr_error_no_eof: bcf_sr_error = 6; pub const bcf_sr_error_no_memory: bcf_sr_error = 7; pub const bcf_sr_error_vcf_parse_error: bcf_sr_error = 8; pub const bcf_sr_error_bcf_read_error: bcf_sr_error = 9; -pub type bcf_sr_error = u32; +pub const bcf_sr_error_noidx_error: bcf_sr_error = 10; +pub type bcf_sr_error = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_srs_t { @@ -10954,268 +8629,88 @@ pub struct bcf_srs_t { pub p: *mut htsThreadPool, pub aux: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_bcf_srs_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(bcf_srs_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_srs_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).collapse as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(collapse) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).apply_filters as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(apply_filters) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).require_index as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(require_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_line as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(has_line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errnum as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(errnum) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readers as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(readers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nreaders as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(nreaders) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).streaming as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(streaming) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).explicit_regs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(explicit_regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regions as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(regions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_als as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_exclude as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_exclude) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tmps as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(tmps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_smpl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_threads as *const _ as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_threads) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).aux as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(aux) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_srs_t"][::std::mem::size_of::() - 144usize]; + ["Alignment of bcf_srs_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_srs_t::collapse"][::std::mem::offset_of!(bcf_srs_t, collapse) - 0usize]; + ["Offset of field: bcf_srs_t::apply_filters"] + [::std::mem::offset_of!(bcf_srs_t, apply_filters) - 8usize]; + ["Offset of field: bcf_srs_t::require_index"] + [::std::mem::offset_of!(bcf_srs_t, require_index) - 16usize]; + ["Offset of field: bcf_srs_t::max_unpack"] + [::std::mem::offset_of!(bcf_srs_t, max_unpack) - 20usize]; + ["Offset of field: bcf_srs_t::has_line"][::std::mem::offset_of!(bcf_srs_t, has_line) - 24usize]; + ["Offset of field: bcf_srs_t::errnum"][::std::mem::offset_of!(bcf_srs_t, errnum) - 32usize]; + ["Offset of field: bcf_srs_t::readers"][::std::mem::offset_of!(bcf_srs_t, readers) - 40usize]; + ["Offset of field: bcf_srs_t::nreaders"][::std::mem::offset_of!(bcf_srs_t, nreaders) - 48usize]; + ["Offset of field: bcf_srs_t::streaming"] + [::std::mem::offset_of!(bcf_srs_t, streaming) - 52usize]; + ["Offset of field: bcf_srs_t::explicit_regs"] + [::std::mem::offset_of!(bcf_srs_t, explicit_regs) - 56usize]; + ["Offset of field: bcf_srs_t::samples"][::std::mem::offset_of!(bcf_srs_t, samples) - 64usize]; + ["Offset of field: bcf_srs_t::regions"][::std::mem::offset_of!(bcf_srs_t, regions) - 72usize]; + ["Offset of field: bcf_srs_t::targets"][::std::mem::offset_of!(bcf_srs_t, targets) - 80usize]; + ["Offset of field: bcf_srs_t::targets_als"] + [::std::mem::offset_of!(bcf_srs_t, targets_als) - 88usize]; + ["Offset of field: bcf_srs_t::targets_exclude"] + [::std::mem::offset_of!(bcf_srs_t, targets_exclude) - 92usize]; + ["Offset of field: bcf_srs_t::tmps"][::std::mem::offset_of!(bcf_srs_t, tmps) - 96usize]; + ["Offset of field: bcf_srs_t::n_smpl"][::std::mem::offset_of!(bcf_srs_t, n_smpl) - 120usize]; + ["Offset of field: bcf_srs_t::n_threads"] + [::std::mem::offset_of!(bcf_srs_t, n_threads) - 124usize]; + ["Offset of field: bcf_srs_t::p"][::std::mem::offset_of!(bcf_srs_t, p) - 128usize]; + ["Offset of field: bcf_srs_t::aux"][::std::mem::offset_of!(bcf_srs_t, aux) - 136usize]; +}; +unsafe extern "C" { pub fn bcf_sr_init() -> *mut bcf_srs_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_destroy(readers: *mut bcf_srs_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_strerror(errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_opt(readers: *mut bcf_srs_t, opt: bcf_sr_opt_t, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_threads( files: *mut bcf_srs_t, n_threads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_destroy_threads(files: *mut bcf_srs_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_add_reader( readers: *mut bcf_srs_t, fname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_remove_reader(files: *mut bcf_srs_t, i: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_next_line(readers: *mut bcf_srs_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_seek( readers: *mut bcf_srs_t, seq: *const ::std::os::raw::c_char, pos: hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_samples( readers: *mut bcf_srs_t, samples: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_targets( readers: *mut bcf_srs_t, targets: *const ::std::os::raw::c_char, @@ -11223,14 +8718,14 @@ extern "C" { alleles: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_regions( readers: *mut bcf_srs_t, regions: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_init( regions: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, @@ -11239,19 +8734,19 @@ extern "C" { to: ::std::os::raw::c_int, ) -> *mut bcf_sr_regions_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_destroy(regions: *mut bcf_sr_regions_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_seek( regions: *mut bcf_sr_regions_t, chr: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_next(reg: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_overlap( reg: *mut bcf_sr_regions_t, seq: *const ::std::os::raw::c_char, @@ -11259,135 +8754,65 @@ extern "C" { end: hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_flush(regs: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct kbitset_t { - pub n: size_t, - pub n_max: size_t, + pub n: usize, + pub n_max: usize, pub b: [::std::os::raw::c_ulong; 1usize], } -#[test] -fn bindgen_test_layout_kbitset_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n_max) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(b) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kbitset_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kbitset_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kbitset_t::n"][::std::mem::offset_of!(kbitset_t, n) - 0usize]; + ["Offset of field: kbitset_t::n_max"][::std::mem::offset_of!(kbitset_t, n_max) - 8usize]; + ["Offset of field: kbitset_t::b"][::std::mem::offset_of!(kbitset_t, b) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct kbitset_iter_t { pub mask: ::std::os::raw::c_ulong, - pub elt: size_t, + pub elt: usize, pub i: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_kbitset_iter_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(elt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(i) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kbitset_iter_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kbitset_iter_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kbitset_iter_t::mask"] + [::std::mem::offset_of!(kbitset_iter_t, mask) - 0usize]; + ["Offset of field: kbitset_iter_t::elt"][::std::mem::offset_of!(kbitset_iter_t, elt) - 8usize]; + ["Offset of field: kbitset_iter_t::i"][::std::mem::offset_of!(kbitset_iter_t, i) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct __faidx_t { +pub struct faidx_t { _unused: [u8; 0], } -pub type faidx_t = __faidx_t; pub const fai_format_options_FAI_NONE: fai_format_options = 0; pub const fai_format_options_FAI_FASTA: fai_format_options = 1; pub const fai_format_options_FAI_FASTQ: fai_format_options = 2; -pub type fai_format_options = u32; -extern "C" { +pub type fai_format_options = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn fai_build3( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, fngzi: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_build(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_destroy(fai: *mut faidx_t); } pub const fai_load_options_FAI_CREATE: fai_load_options = 1; -pub type fai_load_options = u32; -extern "C" { +pub type fai_load_options = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn fai_load3( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, @@ -11395,10 +8820,10 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load(fn_: *const ::std::os::raw::c_char) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load3_format( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, @@ -11407,44 +8832,47 @@ extern "C" { format: fai_format_options, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load_format( fn_: *const ::std::os::raw::c_char, format: fai_format_options, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_fetch( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fai_fetch64( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn fai_line_length(fai: *const faidx_t, reg: *const ::std::os::raw::c_char) -> hts_pos_t; +} +unsafe extern "C" { pub fn fai_fetchqual( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fai_fetchqual64( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_seq( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -11453,7 +8881,7 @@ extern "C" { len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_seq64( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -11462,7 +8890,7 @@ extern "C" { len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_qual( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -11471,7 +8899,7 @@ extern "C" { len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_qual64( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -11480,28 +8908,31 @@ extern "C" { len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_has_seq( fai: *const faidx_t, seq: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_iseq( fai: *const faidx_t, i: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn faidx_seq_len64(fai: *const faidx_t, seq: *const ::std::os::raw::c_char) -> hts_pos_t; +} +unsafe extern "C" { pub fn faidx_seq_len( fai: *const faidx_t, seq: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_parse_region( fai: *const faidx_t, s: *const ::std::os::raw::c_char, @@ -11511,9 +8942,27 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn fai_adjust_region( + fai: *const faidx_t, + tid: ::std::os::raw::c_int, + beg: *mut hts_pos_t, + end: *mut hts_pos_t, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn fai_set_cache_size(fai: *mut faidx_t, cache_size: ::std::os::raw::c_int); } +unsafe extern "C" { + pub fn fai_thread_pool( + fai: *mut faidx_t, + pool: *mut hts_tpool, + qsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn fai_path(fa: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_tpool_process { @@ -11524,13 +8973,13 @@ pub struct hts_tpool_process { pub struct hts_tpool_result { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_init(n: ::std::os::raw::c_int) -> *mut hts_tpool; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_size(p: *mut hts_tpool) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -11540,7 +8989,7 @@ extern "C" { arg: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch2( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -11551,7 +9000,7 @@ extern "C" { nonblock: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch3( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -11566,89 +9015,97 @@ extern "C" { nonblock: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_wake_dispatch(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_flush(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_reset( q: *mut hts_tpool_process, free_results: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_qsize(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_destroy(p: *mut hts_tpool); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_kill(p: *mut hts_tpool); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_next_result(q: *mut hts_tpool_process) -> *mut hts_tpool_result; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_next_result_wait(q: *mut hts_tpool_process) -> *mut hts_tpool_result; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_delete_result(r: *mut hts_tpool_result, free_data: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_result_data(r: *mut hts_tpool_result) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_init( p: *mut hts_tpool, qsize: ::std::os::raw::c_int, in_only: ::std::os::raw::c_int, ) -> *mut hts_tpool_process; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_destroy(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_empty(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_len(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_sz(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_shutdown(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { + pub fn hts_tpool_process_is_shutdown(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn hts_tpool_process_attach(p: *mut hts_tpool, q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_detach(p: *mut hts_tpool, q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_ref_incr(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_ref_decr(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}wrap_kbs_init2"] - pub fn kbs_init2(ni: size_t, fill: ::std::os::raw::c_int) -> *mut kbitset_t; + pub fn kbs_init2(ni: usize, fill: ::std::os::raw::c_int) -> *mut kbitset_t; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}wrap_kbs_init"] - pub fn kbs_init(ni: size_t) -> *mut kbitset_t; + pub fn kbs_init(ni: usize) -> *mut kbitset_t; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}wrap_kbs_insert"] pub fn kbs_insert(bs: *mut kbitset_t, i: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}wrap_kbs_destroy"] pub fn kbs_destroy(bs: *mut kbitset_t); } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __locale_data { + pub _address: u8, +} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -11658,66 +9115,16 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_data { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _region_t { - pub _address: u8, -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; diff --git a/osx_prebuilt_bindings.rs b/osx_prebuilt_bindings.rs index 68a0ec1..827da69 100644 --- a/osx_prebuilt_bindings.rs +++ b/osx_prebuilt_bindings.rs @@ -1,26 +1,22 @@ -/* automatically generated by rust-bindgen */ +/* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { +pub struct __BindgenBitfieldUnit { storage: Storage, - align: [Align; 0], } -impl __BindgenBitfieldUnit { +impl __BindgenBitfieldUnit { #[inline] pub const fn new(storage: Storage) -> Self { - Self { storage, align: [] } + Self { storage } } } -impl __BindgenBitfieldUnit +impl __BindgenBitfieldUnit where Storage: AsRef<[u8]> + AsMut<[u8]>, { #[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]; + fn extract_bit(byte: u8, index: usize) -> bool { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -30,10 +26,21 @@ where byte & mask == mask } #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { + pub fn get_bit(&self, index: usize) -> 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 byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize); + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { let bit_index = if cfg!(target_endian = "big") { 7 - (index % 8) } else { @@ -41,12 +48,27 @@ where }; let mask = 1 << bit_index; if val { - *byte |= mask; + byte | mask } else { - *byte &= !mask; + byte & !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]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize); + *byte = Self::change_bit(*byte, index, val); + } + #[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()); @@ -65,6 +87,24 @@ where val } #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if Self::raw_get_bit(this, i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + 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()); @@ -80,18 +120,35 @@ where self.set_bit(index + bit_offset, val_bit_is_set); } } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + Self::raw_set_bit(this, index + bit_offset, val_bit_is_set); + } + } } pub const __WORDSIZE: u32 = 64; +pub const __has_safe_buffers: u32 = 1; pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; +pub const __DARWIN_ONLY_VERS_1050: u32 = 0; pub const __DARWIN_UNIX03: u32 = 1; pub const __DARWIN_64_BIT_INO_T: u32 = 1; pub const __DARWIN_VERS_1050: u32 = 1; pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_64_BIT_INO_T: &'static [u8; 9usize] = b"$INODE64\0"; -pub const __DARWIN_SUF_1050: &'static [u8; 6usize] = b"$1050\0"; -pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0"; +pub const __DARWIN_SUF_64_BIT_INO_T: &[u8; 9] = b"$INODE64\0"; +pub const __DARWIN_SUF_1050: &[u8; 6] = b"$1050\0"; +pub const __DARWIN_SUF_EXTSN: &[u8; 14] = b"$DARWIN_EXTSN\0"; pub const __DARWIN_C_ANSI: u32 = 4096; pub const __DARWIN_C_FULL: u32 = 900000; pub const __DARWIN_C_LEVEL: u32 = 900000; @@ -100,6 +157,8 @@ pub const __DARWIN_NO_LONG_LONG: u32 = 0; pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1; pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1; pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3; +pub const __has_ptrcheck: u32 = 0; +pub const USE_CLANG_TYPES: u32 = 0; pub const __PTHREAD_SIZE__: u32 = 8176; pub const __PTHREAD_ATTR_SIZE__: u32 = 56; pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8; @@ -154,166 +213,173 @@ pub const WINT_MIN: i32 = -2147483648; pub const WINT_MAX: u32 = 2147483647; pub const SIG_ATOMIC_MIN: i32 = -2147483648; pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const __PRI_8_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"hh\0"; -pub const __PRI_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __SCN_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __PRI_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const __SCN_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const PRId8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIi8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIo8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIu8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIx8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIX8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRId16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIi16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIo16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIu16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIx16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIX16: &'static [u8; 3usize] = b"hX\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRId64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIi64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIo64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIu64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIx64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIX64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXLEAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXLEAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXLEAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXFAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXFAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXFAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"jx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"jX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNd64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNi64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNo64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNu64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNx64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"jx\0"; +pub const __PRI_8_LENGTH_MODIFIER__: &[u8; 3] = b"hh\0"; +pub const __PRI_64_LENGTH_MODIFIER__: &[u8; 3] = b"ll\0"; +pub const __SCN_64_LENGTH_MODIFIER__: &[u8; 3] = b"ll\0"; +pub const __PRI_MAX_LENGTH_MODIFIER__: &[u8; 2] = b"j\0"; +pub const __SCN_MAX_LENGTH_MODIFIER__: &[u8; 2] = b"j\0"; +pub const PRId8: &[u8; 4] = b"hhd\0"; +pub const PRIi8: &[u8; 4] = b"hhi\0"; +pub const PRIo8: &[u8; 4] = b"hho\0"; +pub const PRIu8: &[u8; 4] = b"hhu\0"; +pub const PRIx8: &[u8; 4] = b"hhx\0"; +pub const PRIX8: &[u8; 4] = b"hhX\0"; +pub const PRId16: &[u8; 3] = b"hd\0"; +pub const PRIi16: &[u8; 3] = b"hi\0"; +pub const PRIo16: &[u8; 3] = b"ho\0"; +pub const PRIu16: &[u8; 3] = b"hu\0"; +pub const PRIx16: &[u8; 3] = b"hx\0"; +pub const PRIX16: &[u8; 3] = b"hX\0"; +pub const PRId32: &[u8; 2] = b"d\0"; +pub const PRIi32: &[u8; 2] = b"i\0"; +pub const PRIo32: &[u8; 2] = b"o\0"; +pub const PRIu32: &[u8; 2] = b"u\0"; +pub const PRIx32: &[u8; 2] = b"x\0"; +pub const PRIX32: &[u8; 2] = b"X\0"; +pub const PRId64: &[u8; 4] = b"lld\0"; +pub const PRIi64: &[u8; 4] = b"lli\0"; +pub const PRIo64: &[u8; 4] = b"llo\0"; +pub const PRIu64: &[u8; 4] = b"llu\0"; +pub const PRIx64: &[u8; 4] = b"llx\0"; +pub const PRIX64: &[u8; 4] = b"llX\0"; +pub const PRIdLEAST8: &[u8; 4] = b"hhd\0"; +pub const PRIiLEAST8: &[u8; 4] = b"hhi\0"; +pub const PRIoLEAST8: &[u8; 4] = b"hho\0"; +pub const PRIuLEAST8: &[u8; 4] = b"hhu\0"; +pub const PRIxLEAST8: &[u8; 4] = b"hhx\0"; +pub const PRIXLEAST8: &[u8; 4] = b"hhX\0"; +pub const PRIdLEAST16: &[u8; 3] = b"hd\0"; +pub const PRIiLEAST16: &[u8; 3] = b"hi\0"; +pub const PRIoLEAST16: &[u8; 3] = b"ho\0"; +pub const PRIuLEAST16: &[u8; 3] = b"hu\0"; +pub const PRIxLEAST16: &[u8; 3] = b"hx\0"; +pub const PRIXLEAST16: &[u8; 3] = b"hX\0"; +pub const PRIdLEAST32: &[u8; 2] = b"d\0"; +pub const PRIiLEAST32: &[u8; 2] = b"i\0"; +pub const PRIoLEAST32: &[u8; 2] = b"o\0"; +pub const PRIuLEAST32: &[u8; 2] = b"u\0"; +pub const PRIxLEAST32: &[u8; 2] = b"x\0"; +pub const PRIXLEAST32: &[u8; 2] = b"X\0"; +pub const PRIdLEAST64: &[u8; 4] = b"lld\0"; +pub const PRIiLEAST64: &[u8; 4] = b"lli\0"; +pub const PRIoLEAST64: &[u8; 4] = b"llo\0"; +pub const PRIuLEAST64: &[u8; 4] = b"llu\0"; +pub const PRIxLEAST64: &[u8; 4] = b"llx\0"; +pub const PRIXLEAST64: &[u8; 4] = b"llX\0"; +pub const PRIdFAST8: &[u8; 4] = b"hhd\0"; +pub const PRIiFAST8: &[u8; 4] = b"hhi\0"; +pub const PRIoFAST8: &[u8; 4] = b"hho\0"; +pub const PRIuFAST8: &[u8; 4] = b"hhu\0"; +pub const PRIxFAST8: &[u8; 4] = b"hhx\0"; +pub const PRIXFAST8: &[u8; 4] = b"hhX\0"; +pub const PRIdFAST16: &[u8; 3] = b"hd\0"; +pub const PRIiFAST16: &[u8; 3] = b"hi\0"; +pub const PRIoFAST16: &[u8; 3] = b"ho\0"; +pub const PRIuFAST16: &[u8; 3] = b"hu\0"; +pub const PRIxFAST16: &[u8; 3] = b"hx\0"; +pub const PRIXFAST16: &[u8; 3] = b"hX\0"; +pub const PRIdFAST32: &[u8; 2] = b"d\0"; +pub const PRIiFAST32: &[u8; 2] = b"i\0"; +pub const PRIoFAST32: &[u8; 2] = b"o\0"; +pub const PRIuFAST32: &[u8; 2] = b"u\0"; +pub const PRIxFAST32: &[u8; 2] = b"x\0"; +pub const PRIXFAST32: &[u8; 2] = b"X\0"; +pub const PRIdFAST64: &[u8; 4] = b"lld\0"; +pub const PRIiFAST64: &[u8; 4] = b"lli\0"; +pub const PRIoFAST64: &[u8; 4] = b"llo\0"; +pub const PRIuFAST64: &[u8; 4] = b"llu\0"; +pub const PRIxFAST64: &[u8; 4] = b"llx\0"; +pub const PRIXFAST64: &[u8; 4] = b"llX\0"; +pub const PRIdPTR: &[u8; 3] = b"ld\0"; +pub const PRIiPTR: &[u8; 3] = b"li\0"; +pub const PRIoPTR: &[u8; 3] = b"lo\0"; +pub const PRIuPTR: &[u8; 3] = b"lu\0"; +pub const PRIxPTR: &[u8; 3] = b"lx\0"; +pub const PRIXPTR: &[u8; 3] = b"lX\0"; +pub const PRIdMAX: &[u8; 3] = b"jd\0"; +pub const PRIiMAX: &[u8; 3] = b"ji\0"; +pub const PRIoMAX: &[u8; 3] = b"jo\0"; +pub const PRIuMAX: &[u8; 3] = b"ju\0"; +pub const PRIxMAX: &[u8; 3] = b"jx\0"; +pub const PRIXMAX: &[u8; 3] = b"jX\0"; +pub const SCNd8: &[u8; 4] = b"hhd\0"; +pub const SCNi8: &[u8; 4] = b"hhi\0"; +pub const SCNo8: &[u8; 4] = b"hho\0"; +pub const SCNu8: &[u8; 4] = b"hhu\0"; +pub const SCNx8: &[u8; 4] = b"hhx\0"; +pub const SCNd16: &[u8; 3] = b"hd\0"; +pub const SCNi16: &[u8; 3] = b"hi\0"; +pub const SCNo16: &[u8; 3] = b"ho\0"; +pub const SCNu16: &[u8; 3] = b"hu\0"; +pub const SCNx16: &[u8; 3] = b"hx\0"; +pub const SCNd32: &[u8; 2] = b"d\0"; +pub const SCNi32: &[u8; 2] = b"i\0"; +pub const SCNo32: &[u8; 2] = b"o\0"; +pub const SCNu32: &[u8; 2] = b"u\0"; +pub const SCNx32: &[u8; 2] = b"x\0"; +pub const SCNd64: &[u8; 4] = b"lld\0"; +pub const SCNi64: &[u8; 4] = b"lli\0"; +pub const SCNo64: &[u8; 4] = b"llo\0"; +pub const SCNu64: &[u8; 4] = b"llu\0"; +pub const SCNx64: &[u8; 4] = b"llx\0"; +pub const SCNdLEAST8: &[u8; 4] = b"hhd\0"; +pub const SCNiLEAST8: &[u8; 4] = b"hhi\0"; +pub const SCNoLEAST8: &[u8; 4] = b"hho\0"; +pub const SCNuLEAST8: &[u8; 4] = b"hhu\0"; +pub const SCNxLEAST8: &[u8; 4] = b"hhx\0"; +pub const SCNdLEAST16: &[u8; 3] = b"hd\0"; +pub const SCNiLEAST16: &[u8; 3] = b"hi\0"; +pub const SCNoLEAST16: &[u8; 3] = b"ho\0"; +pub const SCNuLEAST16: &[u8; 3] = b"hu\0"; +pub const SCNxLEAST16: &[u8; 3] = b"hx\0"; +pub const SCNdLEAST32: &[u8; 2] = b"d\0"; +pub const SCNiLEAST32: &[u8; 2] = b"i\0"; +pub const SCNoLEAST32: &[u8; 2] = b"o\0"; +pub const SCNuLEAST32: &[u8; 2] = b"u\0"; +pub const SCNxLEAST32: &[u8; 2] = b"x\0"; +pub const SCNdLEAST64: &[u8; 4] = b"lld\0"; +pub const SCNiLEAST64: &[u8; 4] = b"lli\0"; +pub const SCNoLEAST64: &[u8; 4] = b"llo\0"; +pub const SCNuLEAST64: &[u8; 4] = b"llu\0"; +pub const SCNxLEAST64: &[u8; 4] = b"llx\0"; +pub const SCNdFAST8: &[u8; 4] = b"hhd\0"; +pub const SCNiFAST8: &[u8; 4] = b"hhi\0"; +pub const SCNoFAST8: &[u8; 4] = b"hho\0"; +pub const SCNuFAST8: &[u8; 4] = b"hhu\0"; +pub const SCNxFAST8: &[u8; 4] = b"hhx\0"; +pub const SCNdFAST16: &[u8; 3] = b"hd\0"; +pub const SCNiFAST16: &[u8; 3] = b"hi\0"; +pub const SCNoFAST16: &[u8; 3] = b"ho\0"; +pub const SCNuFAST16: &[u8; 3] = b"hu\0"; +pub const SCNxFAST16: &[u8; 3] = b"hx\0"; +pub const SCNdFAST32: &[u8; 2] = b"d\0"; +pub const SCNiFAST32: &[u8; 2] = b"i\0"; +pub const SCNoFAST32: &[u8; 2] = b"o\0"; +pub const SCNuFAST32: &[u8; 2] = b"u\0"; +pub const SCNxFAST32: &[u8; 2] = b"x\0"; +pub const SCNdFAST64: &[u8; 4] = b"lld\0"; +pub const SCNiFAST64: &[u8; 4] = b"lli\0"; +pub const SCNoFAST64: &[u8; 4] = b"llo\0"; +pub const SCNuFAST64: &[u8; 4] = b"llu\0"; +pub const SCNxFAST64: &[u8; 4] = b"llx\0"; +pub const SCNdPTR: &[u8; 3] = b"ld\0"; +pub const SCNiPTR: &[u8; 3] = b"li\0"; +pub const SCNoPTR: &[u8; 3] = b"lo\0"; +pub const SCNuPTR: &[u8; 3] = b"lu\0"; +pub const SCNxPTR: &[u8; 3] = b"lx\0"; +pub const SCNdMAX: &[u8; 3] = b"jd\0"; +pub const SCNiMAX: &[u8; 3] = b"ji\0"; +pub const SCNoMAX: &[u8; 3] = b"jo\0"; +pub const SCNuMAX: &[u8; 3] = b"ju\0"; +pub const SCNxMAX: &[u8; 3] = b"jx\0"; pub const __API_TO_BE_DEPRECATED: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_MACOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_IOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_MACCATALYST: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_WATCHOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_TVOS: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_DRIVERKIT: u32 = 100000; +pub const __API_TO_BE_DEPRECATED_VISIONOS: u32 = 100000; pub const __MAC_10_0: u32 = 1000; pub const __MAC_10_1: u32 = 1010; pub const __MAC_10_2: u32 = 1020; @@ -342,9 +408,42 @@ pub const __MAC_10_13_4: u32 = 101304; pub const __MAC_10_14: u32 = 101400; pub const __MAC_10_14_1: u32 = 101401; pub const __MAC_10_14_4: u32 = 101404; +pub const __MAC_10_14_5: u32 = 101405; +pub const __MAC_10_14_6: u32 = 101406; pub const __MAC_10_15: u32 = 101500; pub const __MAC_10_15_1: u32 = 101501; pub const __MAC_10_15_4: u32 = 101504; +pub const __MAC_10_16: u32 = 101600; +pub const __MAC_11_0: u32 = 110000; +pub const __MAC_11_1: u32 = 110100; +pub const __MAC_11_3: u32 = 110300; +pub const __MAC_11_4: u32 = 110400; +pub const __MAC_11_5: u32 = 110500; +pub const __MAC_11_6: u32 = 110600; +pub const __MAC_12_0: u32 = 120000; +pub const __MAC_12_1: u32 = 120100; +pub const __MAC_12_2: u32 = 120200; +pub const __MAC_12_3: u32 = 120300; +pub const __MAC_12_4: u32 = 120400; +pub const __MAC_12_5: u32 = 120500; +pub const __MAC_12_6: u32 = 120600; +pub const __MAC_12_7: u32 = 120700; +pub const __MAC_13_0: u32 = 130000; +pub const __MAC_13_1: u32 = 130100; +pub const __MAC_13_2: u32 = 130200; +pub const __MAC_13_3: u32 = 130300; +pub const __MAC_13_4: u32 = 130400; +pub const __MAC_13_5: u32 = 130500; +pub const __MAC_13_6: u32 = 130600; +pub const __MAC_14_0: u32 = 140000; +pub const __MAC_14_1: u32 = 140100; +pub const __MAC_14_2: u32 = 140200; +pub const __MAC_14_3: u32 = 140300; +pub const __MAC_14_4: u32 = 140400; +pub const __MAC_14_5: u32 = 140500; +pub const __MAC_15_0: u32 = 150000; +pub const __MAC_15_1: u32 = 150100; +pub const __MAC_15_2: u32 = 150200; pub const __IPHONE_2_0: u32 = 20000; pub const __IPHONE_2_1: u32 = 20100; pub const __IPHONE_2_2: u32 = 20200; @@ -383,11 +482,100 @@ pub const __IPHONE_12_0: u32 = 120000; pub const __IPHONE_12_1: u32 = 120100; pub const __IPHONE_12_2: u32 = 120200; pub const __IPHONE_12_3: u32 = 120300; +pub const __IPHONE_12_4: u32 = 120400; pub const __IPHONE_13_0: u32 = 130000; pub const __IPHONE_13_1: u32 = 130100; pub const __IPHONE_13_2: u32 = 130200; pub const __IPHONE_13_3: u32 = 130300; pub const __IPHONE_13_4: u32 = 130400; +pub const __IPHONE_13_5: u32 = 130500; +pub const __IPHONE_13_6: u32 = 130600; +pub const __IPHONE_13_7: u32 = 130700; +pub const __IPHONE_14_0: u32 = 140000; +pub const __IPHONE_14_1: u32 = 140100; +pub const __IPHONE_14_2: u32 = 140200; +pub const __IPHONE_14_3: u32 = 140300; +pub const __IPHONE_14_5: u32 = 140500; +pub const __IPHONE_14_4: u32 = 140400; +pub const __IPHONE_14_6: u32 = 140600; +pub const __IPHONE_14_7: u32 = 140700; +pub const __IPHONE_14_8: u32 = 140800; +pub const __IPHONE_15_0: u32 = 150000; +pub const __IPHONE_15_1: u32 = 150100; +pub const __IPHONE_15_2: u32 = 150200; +pub const __IPHONE_15_3: u32 = 150300; +pub const __IPHONE_15_4: u32 = 150400; +pub const __IPHONE_15_5: u32 = 150500; +pub const __IPHONE_15_6: u32 = 150600; +pub const __IPHONE_15_7: u32 = 150700; +pub const __IPHONE_15_8: u32 = 150800; +pub const __IPHONE_16_0: u32 = 160000; +pub const __IPHONE_16_1: u32 = 160100; +pub const __IPHONE_16_2: u32 = 160200; +pub const __IPHONE_16_3: u32 = 160300; +pub const __IPHONE_16_4: u32 = 160400; +pub const __IPHONE_16_5: u32 = 160500; +pub const __IPHONE_16_6: u32 = 160600; +pub const __IPHONE_16_7: u32 = 160700; +pub const __IPHONE_17_0: u32 = 170000; +pub const __IPHONE_17_1: u32 = 170100; +pub const __IPHONE_17_2: u32 = 170200; +pub const __IPHONE_17_3: u32 = 170300; +pub const __IPHONE_17_4: u32 = 170400; +pub const __IPHONE_17_5: u32 = 170500; +pub const __IPHONE_18_0: u32 = 180000; +pub const __IPHONE_18_1: u32 = 180100; +pub const __IPHONE_18_2: u32 = 180200; +pub const __WATCHOS_1_0: u32 = 10000; +pub const __WATCHOS_2_0: u32 = 20000; +pub const __WATCHOS_2_1: u32 = 20100; +pub const __WATCHOS_2_2: u32 = 20200; +pub const __WATCHOS_3_0: u32 = 30000; +pub const __WATCHOS_3_1: u32 = 30100; +pub const __WATCHOS_3_1_1: u32 = 30101; +pub const __WATCHOS_3_2: u32 = 30200; +pub const __WATCHOS_4_0: u32 = 40000; +pub const __WATCHOS_4_1: u32 = 40100; +pub const __WATCHOS_4_2: u32 = 40200; +pub const __WATCHOS_4_3: u32 = 40300; +pub const __WATCHOS_5_0: u32 = 50000; +pub const __WATCHOS_5_1: u32 = 50100; +pub const __WATCHOS_5_2: u32 = 50200; +pub const __WATCHOS_5_3: u32 = 50300; +pub const __WATCHOS_6_0: u32 = 60000; +pub const __WATCHOS_6_1: u32 = 60100; +pub const __WATCHOS_6_2: u32 = 60200; +pub const __WATCHOS_7_0: u32 = 70000; +pub const __WATCHOS_7_1: u32 = 70100; +pub const __WATCHOS_7_2: u32 = 70200; +pub const __WATCHOS_7_3: u32 = 70300; +pub const __WATCHOS_7_4: u32 = 70400; +pub const __WATCHOS_7_5: u32 = 70500; +pub const __WATCHOS_7_6: u32 = 70600; +pub const __WATCHOS_8_0: u32 = 80000; +pub const __WATCHOS_8_1: u32 = 80100; +pub const __WATCHOS_8_3: u32 = 80300; +pub const __WATCHOS_8_4: u32 = 80400; +pub const __WATCHOS_8_5: u32 = 80500; +pub const __WATCHOS_8_6: u32 = 80600; +pub const __WATCHOS_8_7: u32 = 80700; +pub const __WATCHOS_8_8: u32 = 80800; +pub const __WATCHOS_9_0: u32 = 90000; +pub const __WATCHOS_9_1: u32 = 90100; +pub const __WATCHOS_9_2: u32 = 90200; +pub const __WATCHOS_9_3: u32 = 90300; +pub const __WATCHOS_9_4: u32 = 90400; +pub const __WATCHOS_9_5: u32 = 90500; +pub const __WATCHOS_9_6: u32 = 90600; +pub const __WATCHOS_10_0: u32 = 100000; +pub const __WATCHOS_10_1: u32 = 100100; +pub const __WATCHOS_10_2: u32 = 100200; +pub const __WATCHOS_10_3: u32 = 100300; +pub const __WATCHOS_10_4: u32 = 100400; +pub const __WATCHOS_10_5: u32 = 100500; +pub const __WATCHOS_11_0: u32 = 110000; +pub const __WATCHOS_11_1: u32 = 110100; +pub const __WATCHOS_11_2: u32 = 110200; pub const __TVOS_9_0: u32 = 90000; pub const __TVOS_9_1: u32 = 90100; pub const __TVOS_9_2: u32 = 90200; @@ -404,33 +592,161 @@ pub const __TVOS_12_0: u32 = 120000; pub const __TVOS_12_1: u32 = 120100; pub const __TVOS_12_2: u32 = 120200; pub const __TVOS_12_3: u32 = 120300; +pub const __TVOS_12_4: u32 = 120400; pub const __TVOS_13_0: u32 = 130000; pub const __TVOS_13_2: u32 = 130200; pub const __TVOS_13_3: u32 = 130300; pub const __TVOS_13_4: u32 = 130400; -pub const __WATCHOS_1_0: u32 = 10000; -pub const __WATCHOS_2_0: u32 = 20000; -pub const __WATCHOS_2_1: u32 = 20100; -pub const __WATCHOS_2_2: u32 = 20200; -pub const __WATCHOS_3_0: u32 = 30000; -pub const __WATCHOS_3_1: u32 = 30100; -pub const __WATCHOS_3_1_1: u32 = 30101; -pub const __WATCHOS_3_2: u32 = 30200; -pub const __WATCHOS_4_0: u32 = 40000; -pub const __WATCHOS_4_1: u32 = 40100; -pub const __WATCHOS_4_2: u32 = 40200; -pub const __WATCHOS_4_3: u32 = 40300; -pub const __WATCHOS_5_0: u32 = 50000; -pub const __WATCHOS_5_1: u32 = 50100; -pub const __WATCHOS_5_2: u32 = 50200; -pub const __WATCHOS_6_0: u32 = 60000; -pub const __WATCHOS_6_1: u32 = 60100; -pub const __WATCHOS_6_2: u32 = 60200; +pub const __TVOS_14_0: u32 = 140000; +pub const __TVOS_14_1: u32 = 140100; +pub const __TVOS_14_2: u32 = 140200; +pub const __TVOS_14_3: u32 = 140300; +pub const __TVOS_14_5: u32 = 140500; +pub const __TVOS_14_6: u32 = 140600; +pub const __TVOS_14_7: u32 = 140700; +pub const __TVOS_15_0: u32 = 150000; +pub const __TVOS_15_1: u32 = 150100; +pub const __TVOS_15_2: u32 = 150200; +pub const __TVOS_15_3: u32 = 150300; +pub const __TVOS_15_4: u32 = 150400; +pub const __TVOS_15_5: u32 = 150500; +pub const __TVOS_15_6: u32 = 150600; +pub const __TVOS_16_0: u32 = 160000; +pub const __TVOS_16_1: u32 = 160100; +pub const __TVOS_16_2: u32 = 160200; +pub const __TVOS_16_3: u32 = 160300; +pub const __TVOS_16_4: u32 = 160400; +pub const __TVOS_16_5: u32 = 160500; +pub const __TVOS_16_6: u32 = 160600; +pub const __TVOS_17_0: u32 = 170000; +pub const __TVOS_17_1: u32 = 170100; +pub const __TVOS_17_2: u32 = 170200; +pub const __TVOS_17_3: u32 = 170300; +pub const __TVOS_17_4: u32 = 170400; +pub const __TVOS_17_5: u32 = 170500; +pub const __TVOS_18_0: u32 = 180000; +pub const __TVOS_18_1: u32 = 180100; +pub const __TVOS_18_2: u32 = 180200; +pub const __BRIDGEOS_2_0: u32 = 20000; +pub const __BRIDGEOS_3_0: u32 = 30000; +pub const __BRIDGEOS_3_1: u32 = 30100; +pub const __BRIDGEOS_3_4: u32 = 30400; +pub const __BRIDGEOS_4_0: u32 = 40000; +pub const __BRIDGEOS_4_1: u32 = 40100; +pub const __BRIDGEOS_5_0: u32 = 50000; +pub const __BRIDGEOS_5_1: u32 = 50100; +pub const __BRIDGEOS_5_3: u32 = 50300; +pub const __BRIDGEOS_6_0: u32 = 60000; +pub const __BRIDGEOS_6_2: u32 = 60200; +pub const __BRIDGEOS_6_4: u32 = 60400; +pub const __BRIDGEOS_6_5: u32 = 60500; +pub const __BRIDGEOS_6_6: u32 = 60600; +pub const __BRIDGEOS_7_0: u32 = 70000; +pub const __BRIDGEOS_7_1: u32 = 70100; +pub const __BRIDGEOS_7_2: u32 = 70200; +pub const __BRIDGEOS_7_3: u32 = 70300; +pub const __BRIDGEOS_7_4: u32 = 70400; +pub const __BRIDGEOS_7_6: u32 = 70600; +pub const __BRIDGEOS_8_0: u32 = 80000; +pub const __BRIDGEOS_8_1: u32 = 80100; +pub const __BRIDGEOS_8_2: u32 = 80200; +pub const __BRIDGEOS_8_3: u32 = 80300; +pub const __BRIDGEOS_8_4: u32 = 80400; +pub const __BRIDGEOS_8_5: u32 = 80500; +pub const __BRIDGEOS_9_0: u32 = 90000; +pub const __BRIDGEOS_9_1: u32 = 90100; +pub const __BRIDGEOS_9_2: u32 = 90200; pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; +pub const __DRIVERKIT_20_0: u32 = 200000; +pub const __DRIVERKIT_21_0: u32 = 210000; +pub const __DRIVERKIT_22_0: u32 = 220000; +pub const __DRIVERKIT_22_4: u32 = 220400; +pub const __DRIVERKIT_22_5: u32 = 220500; +pub const __DRIVERKIT_22_6: u32 = 220600; +pub const __DRIVERKIT_23_0: u32 = 230000; +pub const __DRIVERKIT_23_1: u32 = 230100; +pub const __DRIVERKIT_23_2: u32 = 230200; +pub const __DRIVERKIT_23_3: u32 = 230300; +pub const __DRIVERKIT_23_4: u32 = 230400; +pub const __DRIVERKIT_23_5: u32 = 230500; +pub const __DRIVERKIT_24_0: u32 = 240000; +pub const __DRIVERKIT_24_1: u32 = 240100; +pub const __DRIVERKIT_24_2: u32 = 240200; +pub const __VISIONOS_1_0: u32 = 10000; +pub const __VISIONOS_1_1: u32 = 10100; +pub const __VISIONOS_1_2: u32 = 10200; +pub const __VISIONOS_2_0: u32 = 20000; +pub const __VISIONOS_2_1: u32 = 20100; +pub const __VISIONOS_2_2: u32 = 20200; +pub const MAC_OS_X_VERSION_10_0: u32 = 1000; +pub const MAC_OS_X_VERSION_10_1: u32 = 1010; +pub const MAC_OS_X_VERSION_10_2: u32 = 1020; +pub const MAC_OS_X_VERSION_10_3: u32 = 1030; +pub const MAC_OS_X_VERSION_10_4: u32 = 1040; +pub const MAC_OS_X_VERSION_10_5: u32 = 1050; +pub const MAC_OS_X_VERSION_10_6: u32 = 1060; +pub const MAC_OS_X_VERSION_10_7: u32 = 1070; +pub const MAC_OS_X_VERSION_10_8: u32 = 1080; +pub const MAC_OS_X_VERSION_10_9: u32 = 1090; +pub const MAC_OS_X_VERSION_10_10: u32 = 101000; +pub const MAC_OS_X_VERSION_10_10_2: u32 = 101002; +pub const MAC_OS_X_VERSION_10_10_3: u32 = 101003; +pub const MAC_OS_X_VERSION_10_11: u32 = 101100; +pub const MAC_OS_X_VERSION_10_11_2: u32 = 101102; +pub const MAC_OS_X_VERSION_10_11_3: u32 = 101103; +pub const MAC_OS_X_VERSION_10_11_4: u32 = 101104; +pub const MAC_OS_X_VERSION_10_12: u32 = 101200; +pub const MAC_OS_X_VERSION_10_12_1: u32 = 101201; +pub const MAC_OS_X_VERSION_10_12_2: u32 = 101202; +pub const MAC_OS_X_VERSION_10_12_4: u32 = 101204; +pub const MAC_OS_X_VERSION_10_13: u32 = 101300; +pub const MAC_OS_X_VERSION_10_13_1: u32 = 101301; +pub const MAC_OS_X_VERSION_10_13_2: u32 = 101302; +pub const MAC_OS_X_VERSION_10_13_4: u32 = 101304; +pub const MAC_OS_X_VERSION_10_14: u32 = 101400; +pub const MAC_OS_X_VERSION_10_14_1: u32 = 101401; +pub const MAC_OS_X_VERSION_10_14_4: u32 = 101404; +pub const MAC_OS_X_VERSION_10_14_5: u32 = 101405; +pub const MAC_OS_X_VERSION_10_14_6: u32 = 101406; +pub const MAC_OS_X_VERSION_10_15: u32 = 101500; +pub const MAC_OS_X_VERSION_10_15_1: u32 = 101501; +pub const MAC_OS_X_VERSION_10_15_4: u32 = 101504; +pub const MAC_OS_X_VERSION_10_16: u32 = 101600; +pub const MAC_OS_VERSION_11_0: u32 = 110000; +pub const MAC_OS_VERSION_11_1: u32 = 110100; +pub const MAC_OS_VERSION_11_3: u32 = 110300; +pub const MAC_OS_VERSION_11_4: u32 = 110400; +pub const MAC_OS_VERSION_11_5: u32 = 110500; +pub const MAC_OS_VERSION_11_6: u32 = 110600; +pub const MAC_OS_VERSION_12_0: u32 = 120000; +pub const MAC_OS_VERSION_12_1: u32 = 120100; +pub const MAC_OS_VERSION_12_2: u32 = 120200; +pub const MAC_OS_VERSION_12_3: u32 = 120300; +pub const MAC_OS_VERSION_12_4: u32 = 120400; +pub const MAC_OS_VERSION_12_5: u32 = 120500; +pub const MAC_OS_VERSION_12_6: u32 = 120600; +pub const MAC_OS_VERSION_12_7: u32 = 120700; +pub const MAC_OS_VERSION_13_0: u32 = 130000; +pub const MAC_OS_VERSION_13_1: u32 = 130100; +pub const MAC_OS_VERSION_13_2: u32 = 130200; +pub const MAC_OS_VERSION_13_3: u32 = 130300; +pub const MAC_OS_VERSION_13_4: u32 = 130400; +pub const MAC_OS_VERSION_13_5: u32 = 130500; +pub const MAC_OS_VERSION_13_6: u32 = 130600; +pub const MAC_OS_VERSION_14_0: u32 = 140000; +pub const MAC_OS_VERSION_14_1: u32 = 140100; +pub const MAC_OS_VERSION_14_2: u32 = 140200; +pub const MAC_OS_VERSION_14_3: u32 = 140300; +pub const MAC_OS_VERSION_14_4: u32 = 140400; +pub const MAC_OS_VERSION_14_5: u32 = 140500; +pub const MAC_OS_VERSION_15_0: u32 = 150000; +pub const MAC_OS_VERSION_15_1: u32 = 150100; +pub const MAC_OS_VERSION_15_2: u32 = 150200; +pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 150200; pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; pub const __DARWIN_WCHAR_MIN: i32 = -2147483648; pub const _FORTIFY_SOURCE: u32 = 2; +pub const USE_CLANG_STDDEF: u32 = 0; pub const __DARWIN_NSIG: u32 = 32; pub const NSIG: u32 = 32; pub const _I386_SIGNAL_H_: u32 = 1; @@ -474,6 +790,9 @@ pub const FP_RND_DOWN: u32 = 1; pub const FP_RND_UP: u32 = 2; pub const FP_CHOP: u32 = 3; pub const FP_STATE_BYTES: u32 = 512; +pub const _X86_INSTRUCTION_STATE_MAX_INSN_BYTES: u32 = 2380; +pub const _X86_INSTRUCTION_STATE_CACHELINE_SIZE: u32 = 64; +pub const __LASTBRANCH_MAX: u32 = 32; pub const SIGEV_NONE: u32 = 0; pub const SIGEV_SIGNAL: u32 = 1; pub const SIGEV_THREAD: u32 = 3; @@ -561,7 +880,10 @@ pub const RUSAGE_INFO_V1: u32 = 1; pub const RUSAGE_INFO_V2: u32 = 2; pub const RUSAGE_INFO_V3: u32 = 3; pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; +pub const RUSAGE_INFO_V5: u32 = 5; +pub const RUSAGE_INFO_V6: u32 = 6; +pub const RUSAGE_INFO_CURRENT: u32 = 6; +pub const RU_PROC_RUNS_RESLIDE: u32 = 1; pub const RLIMIT_CPU: u32 = 0; pub const RLIMIT_FSIZE: u32 = 1; pub const RLIMIT_DATA: u32 = 2; @@ -589,6 +911,12 @@ pub const IOPOL_TYPE_DISK: u32 = 0; pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; +pub const IOPOL_TYPE_VFS_TRIGGER_RESOLVE: u32 = 5; +pub const IOPOL_TYPE_VFS_IGNORE_CONTENT_PROTECTION: u32 = 6; +pub const IOPOL_TYPE_VFS_IGNORE_PERMISSIONS: u32 = 7; +pub const IOPOL_TYPE_VFS_SKIP_MTIME_UPDATE: u32 = 8; +pub const IOPOL_TYPE_VFS_ALLOW_LOW_SPACE_WRITES: u32 = 9; +pub const IOPOL_TYPE_VFS_DISALLOW_RW_FOR_O_EVTONLY: u32 = 10; pub const IOPOL_SCOPE_PROCESS: u32 = 0; pub const IOPOL_SCOPE_THREAD: u32 = 1; pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; @@ -607,6 +935,20 @@ pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; +pub const IOPOL_VFS_TRIGGER_RESOLVE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_TRIGGER_RESOLVE_OFF: u32 = 1; +pub const IOPOL_VFS_CONTENT_PROTECTION_DEFAULT: u32 = 0; +pub const IOPOL_VFS_CONTENT_PROTECTION_IGNORE: u32 = 1; +pub const IOPOL_VFS_IGNORE_PERMISSIONS_OFF: u32 = 0; +pub const IOPOL_VFS_IGNORE_PERMISSIONS_ON: u32 = 1; +pub const IOPOL_VFS_SKIP_MTIME_UPDATE_OFF: u32 = 0; +pub const IOPOL_VFS_SKIP_MTIME_UPDATE_ON: u32 = 1; +pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_OFF: u32 = 0; +pub const IOPOL_VFS_ALLOW_LOW_SPACE_WRITES_ON: u32 = 1; +pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_DEFAULT: u32 = 0; +pub const IOPOL_VFS_DISALLOW_RW_FOR_O_EVTONLY_ON: u32 = 1; +pub const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_DEFAULT: u32 = 0; +pub const IOPOL_VFS_NOCACHE_WRITE_FS_BLKSIZE_ON: u32 = 1; pub const WNOHANG: u32 = 1; pub const WUNTRACED: u32 = 2; pub const WCOREFLAG: u32 = 128; @@ -622,20 +964,27 @@ pub const _QUAD_LOWWORD: u32 = 0; pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234; pub const __DARWIN_BIG_ENDIAN: u32 = 4321; pub const __DARWIN_PDP_ENDIAN: u32 = 3412; -pub const __DARWIN_BYTE_ORDER: u32 = 1234; pub const LITTLE_ENDIAN: u32 = 1234; pub const BIG_ENDIAN: u32 = 4321; pub const PDP_ENDIAN: u32 = 3412; +pub const __DARWIN_BYTE_ORDER: u32 = 1234; pub const BYTE_ORDER: u32 = 1234; pub const EXIT_FAILURE: u32 = 1; pub const EXIT_SUCCESS: u32 = 0; pub const RAND_MAX: u32 = 2147483647; pub const _USE_FORTIFY_LEVEL: u32 = 2; pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; -pub const __GNUC_VA_LIST: u32 = 1; +pub const USE_CLANG_STDARG: u32 = 0; pub const RENAME_SECLUDE: u32 = 1; pub const RENAME_SWAP: u32 = 2; pub const RENAME_EXCL: u32 = 4; +pub const RENAME_RESERVED1: u32 = 8; +pub const RENAME_NOFOLLOW_ANY: u32 = 16; +pub const SEEK_SET: u32 = 0; +pub const SEEK_CUR: u32 = 1; +pub const SEEK_END: u32 = 2; +pub const SEEK_HOLE: u32 = 3; +pub const SEEK_DATA: u32 = 4; pub const __SLBF: u32 = 1; pub const __SNBF: u32 = 2; pub const __SRD: u32 = 4; @@ -659,17 +1008,15 @@ pub const BUFSIZ: u32 = 1024; pub const EOF: i32 = -1; pub const FOPEN_MAX: u32 = 20; pub const FILENAME_MAX: u32 = 1024; -pub const P_tmpdir: &'static [u8; 10usize] = b"/var/tmp/\0"; +pub const P_tmpdir: &[u8; 10] = b"/var/tmp/\0"; pub const L_tmpnam: u32 = 1024; pub const TMP_MAX: u32 = 308915776; -pub const SEEK_SET: u32 = 0; -pub const SEEK_CUR: u32 = 1; -pub const SEEK_END: u32 = 2; pub const L_ctermid: u32 = 1024; pub const __DARWIN_CLK_TCK: u32 = 100; -pub const CHAR_BIT: u32 = 8; +pub const USE_CLANG_LIMITS: u32 = 0; pub const MB_LEN_MAX: u32 = 6; pub const CLK_TCK: u32 = 100; +pub const CHAR_BIT: u32 = 8; pub const SCHAR_MAX: u32 = 127; pub const SCHAR_MIN: i32 = -128; pub const UCHAR_MAX: u32 = 255; @@ -694,7 +1041,7 @@ pub const SIZE_T_MAX: i32 = -1; pub const UQUAD_MAX: i32 = -1; pub const QUAD_MAX: u64 = 9223372036854775807; pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; +pub const ARG_MAX: u32 = 1048576; pub const CHILD_MAX: u32 = 266; pub const GID_MAX: u32 = 2147483647; pub const LINK_MAX: u32 = 32767; @@ -895,10 +1242,23 @@ pub const NBBY: u32 = 8; pub const FD_SETSIZE: u32 = 1024; pub const HAVE___BUILTIN_CLZ: u32 = 1; pub const HTS_PATH_SEPARATOR_CHAR: u8 = 58u8; -pub const HTS_PATH_SEPARATOR_STR: &'static [u8; 2usize] = b":\0"; +pub const HTS_PATH_SEPARATOR_STR: &[u8; 2] = b":\0"; pub const HTS_RESIZE_CLEAR: u32 = 1; -pub const HTS_IDX_DELIM: &'static [u8; 8usize] = b"##idx##\0"; -pub const HTS_VERSION: u32 = 101190; +pub const HTS_IDX_DELIM: &[u8; 8] = b"##idx##\0"; +pub const HTS_VERSION: u32 = 101901; +pub const HTS_FEATURE_CONFIGURE: u32 = 1; +pub const HTS_FEATURE_PLUGINS: u32 = 2; +pub const HTS_FEATURE_LIBCURL: u32 = 1024; +pub const HTS_FEATURE_S3: u32 = 2048; +pub const HTS_FEATURE_GCS: u32 = 4096; +pub const HTS_FEATURE_LIBDEFLATE: u32 = 1048576; +pub const HTS_FEATURE_LZMA: u32 = 2097152; +pub const HTS_FEATURE_BZIP2: u32 = 4194304; +pub const HTS_FEATURE_HTSCODECS: u32 = 8388608; +pub const HTS_FEATURE_CC: u32 = 134217728; +pub const HTS_FEATURE_CFLAGS: u32 = 268435456; +pub const HTS_FEATURE_CPPFLAGS: u32 = 536870912; +pub const HTS_FEATURE_LDFLAGS: u32 = 1073741824; pub const HTS_IDX_NOCOOR: i32 = -2; pub const HTS_IDX_START: i32 = -3; pub const HTS_IDX_REST: i32 = -4; @@ -909,7 +1269,7 @@ pub const HTS_FMT_TBI: u32 = 2; pub const HTS_FMT_CRAI: u32 = 3; pub const HTS_FMT_FAI: u32 = 4; pub const HTS_POS_MIN: i64 = -9223372036854775808; -pub const PRIhts_pos: &'static [u8; 4usize] = b"lld\0"; +pub const PRIhts_pos: &[u8; 4] = b"lld\0"; pub const HTS_IDX_SAVE_REMOTE: u32 = 1; pub const HTS_IDX_SILENT_FAIL: u32 = 2; pub const HTS_PARSE_THOUSANDS_SEP: u32 = 1; @@ -956,6 +1316,9 @@ pub const VCF_INDEL: u32 = 4; pub const VCF_OTHER: u32 = 8; pub const VCF_BND: u32 = 16; pub const VCF_OVERLAP: u32 = 32; +pub const VCF_INS: u32 = 64; +pub const VCF_DEL: u32 = 128; +pub const VCF_ANY: u32 = 255; pub const BCF1_DIRTY_ID: u32 = 1; pub const BCF1_DIRTY_ALS: u32 = 2; pub const BCF1_DIRTY_FLT: u32 = 4; @@ -991,7 +1354,7 @@ pub const BCF_MAX_BT_INT32: u32 = 2147483647; pub const BCF_MIN_BT_INT8: i32 = -120; pub const BCF_MIN_BT_INT16: i32 = -32760; pub const BCF_MIN_BT_INT32: i32 = -2147483640; -pub const SAM_FORMAT_VERSION: &'static [u8; 4usize] = b"1.6\0"; +pub const SAM_FORMAT_VERSION: &[u8; 4] = b"1.6\0"; pub const BAM_CMATCH: u32 = 0; pub const BAM_CINS: u32 = 1; pub const BAM_CDEL: u32 = 2; @@ -1002,7 +1365,7 @@ pub const BAM_CPAD: u32 = 6; pub const BAM_CEQUAL: u32 = 7; pub const BAM_CDIFF: u32 = 8; pub const BAM_CBACK: u32 = 9; -pub const BAM_CIGAR_STR: &'static [u8; 11usize] = b"MIDNSHP=XB\0"; +pub const BAM_CIGAR_STR: &[u8; 11] = b"MIDNSHP=XB\0"; pub const BAM_CIGAR_SHIFT: u32 = 4; pub const BAM_CIGAR_MASK: u32 = 15; pub const BAM_CIGAR_TYPE: u32 = 246183; @@ -1020,6 +1383,9 @@ pub const BAM_FDUP: u32 = 1024; pub const BAM_FSUPPLEMENTARY: u32 = 2048; pub const BAM_USER_OWNS_STRUCT: u32 = 1; pub const BAM_USER_OWNS_DATA: u32 = 2; +pub const HTS_MOD_UNKNOWN: i32 = -1; +pub const HTS_MOD_UNCHECKED: i32 = -2; +pub const HTS_MOD_REPORT_UNCHECKED: u32 = 1; pub const BGZF_BLOCK_SIZE: u32 = 65280; pub const BGZF_MAX_BLOCK_SIZE: u32 = 65536; pub const BGZF_ERR_ZLIB: u32 = 1; @@ -1055,7 +1421,6 @@ pub const BCF_SR_PAIR_INDEL_REF: u32 = 32; pub const BCF_SR_PAIR_EXACT: u32 = 64; pub const BCF_SR_PAIR_BOTH: u32 = 3; pub const BCF_SR_PAIR_BOTH_REF: u32 = 51; -pub type size_t = ::std::os::raw::c_ulong; pub type wchar_t = ::std::os::raw::c_int; pub type int_least8_t = i8; pub type int_least16_t = i16; @@ -1089,41 +1454,16 @@ pub type __darwin_ct_rune_t = ::std::os::raw::c_int; pub union __mbstate_t { pub __mbstate8: [::std::os::raw::c_char; 128usize], pub _mbstateL: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 16usize], -} -#[test] -fn bindgen_test_layout___mbstate_t() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 128usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 8usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__mbstate8) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(_mbstateL) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __mbstate_t"][::std::mem::size_of::<__mbstate_t>() - 128usize]; + ["Alignment of __mbstate_t"][::std::mem::align_of::<__mbstate_t>() - 8usize]; + ["Offset of field: __mbstate_t::__mbstate8"] + [::std::mem::offset_of!(__mbstate_t, __mbstate8) - 0usize]; + ["Offset of field: __mbstate_t::_mbstateL"] + [::std::mem::offset_of!(__mbstate_t, _mbstateL) - 0usize]; +}; pub type __darwin_mbstate_t = __mbstate_t; pub type __darwin_ptrdiff_t = ::std::os::raw::c_long; pub type __darwin_size_t = ::std::os::raw::c_ulong; @@ -1162,435 +1502,169 @@ pub struct __darwin_pthread_handler_rec { pub __arg: *mut ::std::os::raw::c_void, pub __next: *mut __darwin_pthread_handler_rec, } -#[test] -fn bindgen_test_layout___darwin_pthread_handler_rec() { - assert_eq!( - ::std::mem::size_of::<__darwin_pthread_handler_rec>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_pthread_handler_rec>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__routine) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__arg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__next) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_pthread_handler_rec"] + [::std::mem::size_of::<__darwin_pthread_handler_rec>() - 24usize]; + ["Alignment of __darwin_pthread_handler_rec"] + [::std::mem::align_of::<__darwin_pthread_handler_rec>() - 8usize]; + ["Offset of field: __darwin_pthread_handler_rec::__routine"] + [::std::mem::offset_of!(__darwin_pthread_handler_rec, __routine) - 0usize]; + ["Offset of field: __darwin_pthread_handler_rec::__arg"] + [::std::mem::offset_of!(__darwin_pthread_handler_rec, __arg) - 8usize]; + ["Offset of field: __darwin_pthread_handler_rec::__next"] + [::std::mem::offset_of!(__darwin_pthread_handler_rec, __next) - 16usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_attr_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 56usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_attr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_attr_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_attr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_attr_t"][::std::mem::size_of::<_opaque_pthread_attr_t>() - 64usize]; + ["Alignment of _opaque_pthread_attr_t"] + [::std::mem::align_of::<_opaque_pthread_attr_t>() - 8usize]; + ["Offset of field: _opaque_pthread_attr_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_attr_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_attr_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_attr_t, __opaque) - 8usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_cond_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 40usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_cond_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_cond_t>(), - 48usize, - concat!("Size of: ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_cond_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_cond_t"][::std::mem::size_of::<_opaque_pthread_cond_t>() - 48usize]; + ["Alignment of _opaque_pthread_cond_t"] + [::std::mem::align_of::<_opaque_pthread_cond_t>() - 8usize]; + ["Offset of field: _opaque_pthread_cond_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_cond_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_cond_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_cond_t, __opaque) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_condattr_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 8usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_condattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_condattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_condattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_condattr_t"] + [::std::mem::size_of::<_opaque_pthread_condattr_t>() - 16usize]; + ["Alignment of _opaque_pthread_condattr_t"] + [::std::mem::align_of::<_opaque_pthread_condattr_t>() - 8usize]; + ["Offset of field: _opaque_pthread_condattr_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_condattr_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_condattr_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_condattr_t, __opaque) - 8usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_mutex_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 56usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_mutex_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutex_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutex_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_mutex_t"][::std::mem::size_of::<_opaque_pthread_mutex_t>() - 64usize]; + ["Alignment of _opaque_pthread_mutex_t"] + [::std::mem::align_of::<_opaque_pthread_mutex_t>() - 8usize]; + ["Offset of field: _opaque_pthread_mutex_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_mutex_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_mutex_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_mutex_t, __opaque) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_mutexattr_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 8usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_mutexattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutexattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_mutexattr_t"] + [::std::mem::size_of::<_opaque_pthread_mutexattr_t>() - 16usize]; + ["Alignment of _opaque_pthread_mutexattr_t"] + [::std::mem::align_of::<_opaque_pthread_mutexattr_t>() - 8usize]; + ["Offset of field: _opaque_pthread_mutexattr_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_mutexattr_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_mutexattr_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_mutexattr_t, __opaque) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_once_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 8usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_once_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_once_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_once_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_once_t"][::std::mem::size_of::<_opaque_pthread_once_t>() - 16usize]; + ["Alignment of _opaque_pthread_once_t"] + [::std::mem::align_of::<_opaque_pthread_once_t>() - 8usize]; + ["Offset of field: _opaque_pthread_once_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_once_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_once_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_once_t, __opaque) - 8usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_rwlock_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 192usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_rwlock_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), - 200usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlock_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_rwlock_t"] + [::std::mem::size_of::<_opaque_pthread_rwlock_t>() - 200usize]; + ["Alignment of _opaque_pthread_rwlock_t"] + [::std::mem::align_of::<_opaque_pthread_rwlock_t>() - 8usize]; + ["Offset of field: _opaque_pthread_rwlock_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_rwlock_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_rwlock_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_rwlock_t, __opaque) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_rwlockattr_t { pub __sig: ::std::os::raw::c_long, pub __opaque: [::std::os::raw::c_char; 16usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), - 24usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_rwlockattr_t"] + [::std::mem::size_of::<_opaque_pthread_rwlockattr_t>() - 24usize]; + ["Alignment of _opaque_pthread_rwlockattr_t"] + [::std::mem::align_of::<_opaque_pthread_rwlockattr_t>() - 8usize]; + ["Offset of field: _opaque_pthread_rwlockattr_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_rwlockattr_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_rwlockattr_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_rwlockattr_t, __opaque) - 8usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct _opaque_pthread_t { pub __sig: ::std::os::raw::c_long, pub __cleanup_stack: *mut __darwin_pthread_handler_rec, pub __opaque: [::std::os::raw::c_char; 8176usize], } -#[test] -fn bindgen_test_layout__opaque_pthread_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_t>(), - 8192usize, - concat!("Size of: ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__cleanup_stack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__opaque) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of _opaque_pthread_t"][::std::mem::size_of::<_opaque_pthread_t>() - 8192usize]; + ["Alignment of _opaque_pthread_t"][::std::mem::align_of::<_opaque_pthread_t>() - 8usize]; + ["Offset of field: _opaque_pthread_t::__sig"] + [::std::mem::offset_of!(_opaque_pthread_t, __sig) - 0usize]; + ["Offset of field: _opaque_pthread_t::__cleanup_stack"] + [::std::mem::offset_of!(_opaque_pthread_t, __cleanup_stack) - 8usize]; + ["Offset of field: _opaque_pthread_t::__opaque"] + [::std::mem::offset_of!(_opaque_pthread_t, __opaque) - 16usize]; +}; pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t; pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; @@ -1601,25 +1675,12 @@ pub type __darwin_pthread_once_t = _opaque_pthread_once_t; pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; pub type __darwin_pthread_t = *mut _opaque_pthread_t; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulonglong; -pub type register_t = i64; -pub type user_addr_t = u_int64_t; -pub type user_size_t = u_int64_t; -pub type user_ssize_t = i64; -pub type user_long_t = i64; -pub type user_ulong_t = u_int64_t; -pub type user_time_t = i64; -pub type user_off_t = i64; -pub type syscall_arg_t = u_int64_t; pub type intmax_t = ::std::os::raw::c_long; pub type uintmax_t = ::std::os::raw::c_ulong; pub type __darwin_nl_item = ::std::os::raw::c_int; pub type __darwin_wctrans_t = ::std::os::raw::c_int; pub type __darwin_wctype_t = __uint32_t; -extern "C" { +unsafe extern "C" { pub fn imaxabs(j: intmax_t) -> intmax_t; } #[repr(C)] @@ -1628,64 +1689,38 @@ pub struct imaxdiv_t { pub quot: intmax_t, pub rem: intmax_t, } -#[test] -fn bindgen_test_layout_imaxdiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of imaxdiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of imaxdiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: imaxdiv_t::quot"][::std::mem::offset_of!(imaxdiv_t, quot) - 0usize]; + ["Offset of field: imaxdiv_t::rem"][::std::mem::offset_of!(imaxdiv_t, rem) - 8usize]; +}; +unsafe extern "C" { pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; } -extern "C" { +unsafe extern "C" { pub fn strtoimax( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> intmax_t; } -extern "C" { +unsafe extern "C" { pub fn strtoumax( __nptr: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> uintmax_t; } -extern "C" { +unsafe extern "C" { pub fn wcstoimax( __nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __base: ::std::os::raw::c_int, ) -> intmax_t; } -extern "C" { +unsafe extern "C" { pub fn wcstoumax( __nptr: *const wchar_t, __endptr: *mut *mut wchar_t, @@ -1698,17 +1733,17 @@ pub const htsLogLevel_HTS_LOG_WARNING: htsLogLevel = 3; pub const htsLogLevel_HTS_LOG_INFO: htsLogLevel = 4; pub const htsLogLevel_HTS_LOG_DEBUG: htsLogLevel = 5; pub const htsLogLevel_HTS_LOG_TRACE: htsLogLevel = 6; -pub type htsLogLevel = u32; -extern "C" { +pub type htsLogLevel = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn hts_set_log_level(level: htsLogLevel); } -extern "C" { +unsafe extern "C" { pub fn hts_get_log_level() -> htsLogLevel; } -extern "C" { +unsafe extern "C" { pub static mut hts_verbose: ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_log( severity: htsLogLevel, context: *const ::std::os::raw::c_char, @@ -1719,10 +1754,23 @@ extern "C" { pub const idtype_t_P_ALL: idtype_t = 0; pub const idtype_t_P_PID: idtype_t = 1; pub const idtype_t_P_PGID: idtype_t = 2; -pub type idtype_t = u32; +pub type idtype_t = ::std::os::raw::c_uint; pub type pid_t = __darwin_pid_t; pub type id_t = __darwin_id_t; pub type sig_atomic_t = ::std::os::raw::c_int; +pub type u_int8_t = ::std::os::raw::c_uchar; +pub type u_int16_t = ::std::os::raw::c_ushort; +pub type u_int32_t = ::std::os::raw::c_uint; +pub type u_int64_t = ::std::os::raw::c_ulonglong; +pub type register_t = i64; +pub type user_addr_t = u_int64_t; +pub type user_size_t = u_int64_t; +pub type user_ssize_t = i64; +pub type user_long_t = i64; +pub type user_ulong_t = u_int64_t; +pub type user_time_t = i64; +pub type user_off_t = i64; +pub type syscall_arg_t = u_int64_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_i386_thread_state { @@ -1743,218 +1791,57 @@ pub struct __darwin_i386_thread_state { pub __fs: ::std::os::raw::c_uint, pub __gs: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___darwin_i386_thread_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_thread_state>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_i386_thread_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_thread_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_thread_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eax as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eax) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebx as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ebx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ecx as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ecx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edx as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__edx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edi as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__edi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esi as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__esi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ebp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esp as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__esp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ss as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eflags as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eflags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eip as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eip) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__cs as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__cs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ds as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__es as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__fs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__fs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__gs as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__gs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_i386_thread_state"] + [::std::mem::size_of::<__darwin_i386_thread_state>() - 64usize]; + ["Alignment of __darwin_i386_thread_state"] + [::std::mem::align_of::<__darwin_i386_thread_state>() - 4usize]; + ["Offset of field: __darwin_i386_thread_state::__eax"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __eax) - 0usize]; + ["Offset of field: __darwin_i386_thread_state::__ebx"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __ebx) - 4usize]; + ["Offset of field: __darwin_i386_thread_state::__ecx"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __ecx) - 8usize]; + ["Offset of field: __darwin_i386_thread_state::__edx"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __edx) - 12usize]; + ["Offset of field: __darwin_i386_thread_state::__edi"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __edi) - 16usize]; + ["Offset of field: __darwin_i386_thread_state::__esi"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __esi) - 20usize]; + ["Offset of field: __darwin_i386_thread_state::__ebp"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __ebp) - 24usize]; + ["Offset of field: __darwin_i386_thread_state::__esp"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __esp) - 28usize]; + ["Offset of field: __darwin_i386_thread_state::__ss"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __ss) - 32usize]; + ["Offset of field: __darwin_i386_thread_state::__eflags"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __eflags) - 36usize]; + ["Offset of field: __darwin_i386_thread_state::__eip"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __eip) - 40usize]; + ["Offset of field: __darwin_i386_thread_state::__cs"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __cs) - 44usize]; + ["Offset of field: __darwin_i386_thread_state::__ds"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __ds) - 48usize]; + ["Offset of field: __darwin_i386_thread_state::__es"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __es) - 52usize]; + ["Offset of field: __darwin_i386_thread_state::__fs"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __fs) - 56usize]; + ["Offset of field: __darwin_i386_thread_state::__gs"] + [::std::mem::offset_of!(__darwin_i386_thread_state, __gs) - 60usize]; +}; #[repr(C)] #[repr(align(2))] #[derive(Debug, Copy, Clone)] pub struct __darwin_fp_control { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>, -} -#[test] -fn bindgen_test_layout___darwin_fp_control() { - assert_eq!( - ::std::mem::size_of::<__darwin_fp_control>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_control)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_fp_control>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_control)) - ); -} + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_fp_control"][::std::mem::size_of::<__darwin_fp_control>() - 2usize]; + ["Alignment of __darwin_fp_control"][::std::mem::align_of::<__darwin_fp_control>() - 2usize]; +}; impl __darwin_fp_control { #[inline] pub fn __invalid(&self) -> ::std::os::raw::c_ushort { @@ -1968,6 +1855,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __invalid_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___invalid_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __denorm(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -1979,6 +1888,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __denorm_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___denorm_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -1990,7 +1921,29 @@ impl __darwin_fp_control { } } #[inline] - pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { + pub unsafe fn __zdiv_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___zdiv_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } } #[inline] @@ -2001,6 +1954,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __ovrfl_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___ovrfl_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __undfl(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } } @@ -2012,6 +1987,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __undfl_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___undfl_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __precis(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } } @@ -2023,6 +2020,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __precis_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___precis_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __pc(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) } } @@ -2034,6 +2053,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __pc_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___pc_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn __rc(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) } } @@ -2045,6 +2086,28 @@ impl __darwin_fp_control { } } #[inline] + pub unsafe fn __rc_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 2u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___rc_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 2u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( __invalid: ::std::os::raw::c_ushort, __denorm: ::std::os::raw::c_ushort, @@ -2054,9 +2117,8 @@ impl __darwin_fp_control { __precis: ::std::os::raw::c_ushort, __pc: ::std::os::raw::c_ushort, __rc: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; __invalid as u64 @@ -2097,21 +2159,14 @@ pub type __darwin_fp_control_t = __darwin_fp_control; #[repr(align(2))] #[derive(Debug, Copy, Clone)] pub struct __darwin_fp_status { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>, -} -#[test] -fn bindgen_test_layout___darwin_fp_status() { - assert_eq!( - ::std::mem::size_of::<__darwin_fp_status>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_status)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_fp_status>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_status)) - ); -} + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_fp_status"][::std::mem::size_of::<__darwin_fp_status>() - 2usize]; + ["Alignment of __darwin_fp_status"][::std::mem::align_of::<__darwin_fp_status>() - 2usize]; +}; impl __darwin_fp_status { #[inline] pub fn __invalid(&self) -> ::std::os::raw::c_ushort { @@ -2125,6 +2180,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __invalid_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___invalid_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __denorm(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } } @@ -2136,6 +2213,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __denorm_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___denorm_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } } @@ -2147,6 +2246,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __zdiv_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___zdiv_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } } @@ -2158,6 +2279,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __ovrfl_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___ovrfl_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __undfl(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } } @@ -2169,6 +2312,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __undfl_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___undfl_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __precis(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } } @@ -2180,6 +2345,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __precis_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___precis_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __stkflt(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } } @@ -2191,6 +2378,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __stkflt_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___stkflt_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __errsumm(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } } @@ -2202,6 +2411,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __errsumm_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___errsumm_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __c0(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } } @@ -2213,6 +2444,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __c0_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___c0_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __c1(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } } @@ -2224,6 +2477,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __c1_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 9usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___c1_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 9usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __c2(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } } @@ -2235,6 +2510,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __c2_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 10usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___c2_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 10usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __tos(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u16) } } @@ -2246,6 +2543,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __tos_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 11usize, + 3u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___tos_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 11usize, + 3u8, + val as u64, + ) + } + } + #[inline] pub fn __c3(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } } @@ -2257,6 +2576,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __c3_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 14usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___c3_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 14usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn __busy(&self) -> ::std::os::raw::c_ushort { unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } } @@ -2268,6 +2609,28 @@ impl __darwin_fp_status { } } #[inline] + pub unsafe fn __busy_raw(this: *const Self) -> ::std::os::raw::c_ushort { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 15usize, + 1u8, + ) as u16) + } + } + #[inline] + pub unsafe fn set___busy_raw(this: *mut Self, val: ::std::os::raw::c_ushort) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 15usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( __invalid: ::std::os::raw::c_ushort, __denorm: ::std::os::raw::c_ushort, @@ -2283,9 +2646,8 @@ impl __darwin_fp_status { __tos: ::std::os::raw::c_ushort, __c3: ::std::os::raw::c_ushort, __busy: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; __invalid as u64 @@ -2352,155 +2714,65 @@ pub struct __darwin_mmst_reg { pub __mmst_reg: [::std::os::raw::c_char; 10usize], pub __mmst_rsrv: [::std::os::raw::c_char; 6usize], } -#[test] -fn bindgen_test_layout___darwin_mmst_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_mmst_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mmst_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mmst_reg), - "::", - stringify!(__mmst_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_rsrv as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mmst_reg), - "::", - stringify!(__mmst_rsrv) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mmst_reg"][::std::mem::size_of::<__darwin_mmst_reg>() - 16usize]; + ["Alignment of __darwin_mmst_reg"][::std::mem::align_of::<__darwin_mmst_reg>() - 1usize]; + ["Offset of field: __darwin_mmst_reg::__mmst_reg"] + [::std::mem::offset_of!(__darwin_mmst_reg, __mmst_reg) - 0usize]; + ["Offset of field: __darwin_mmst_reg::__mmst_rsrv"] + [::std::mem::offset_of!(__darwin_mmst_reg, __mmst_rsrv) - 10usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_xmm_reg { pub __xmm_reg: [::std::os::raw::c_char; 16usize], } -#[test] -fn bindgen_test_layout___darwin_xmm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_xmm_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_xmm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_xmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_xmm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_xmm_reg>())).__xmm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_xmm_reg), - "::", - stringify!(__xmm_reg) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_xmm_reg"][::std::mem::size_of::<__darwin_xmm_reg>() - 16usize]; + ["Alignment of __darwin_xmm_reg"][::std::mem::align_of::<__darwin_xmm_reg>() - 1usize]; + ["Offset of field: __darwin_xmm_reg::__xmm_reg"] + [::std::mem::offset_of!(__darwin_xmm_reg, __xmm_reg) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_ymm_reg { pub __ymm_reg: [::std::os::raw::c_char; 32usize], } -#[test] -fn bindgen_test_layout___darwin_ymm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_ymm_reg>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_ymm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ymm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_ymm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ymm_reg>())).__ymm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ymm_reg), - "::", - stringify!(__ymm_reg) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_ymm_reg"][::std::mem::size_of::<__darwin_ymm_reg>() - 32usize]; + ["Alignment of __darwin_ymm_reg"][::std::mem::align_of::<__darwin_ymm_reg>() - 1usize]; + ["Offset of field: __darwin_ymm_reg::__ymm_reg"] + [::std::mem::offset_of!(__darwin_ymm_reg, __ymm_reg) - 0usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_zmm_reg { pub __zmm_reg: [::std::os::raw::c_char; 64usize], } -#[test] -fn bindgen_test_layout___darwin_zmm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_zmm_reg>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_zmm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_zmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_zmm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_zmm_reg>())).__zmm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_zmm_reg), - "::", - stringify!(__zmm_reg) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_zmm_reg"][::std::mem::size_of::<__darwin_zmm_reg>() - 64usize]; + ["Alignment of __darwin_zmm_reg"][::std::mem::align_of::<__darwin_zmm_reg>() - 1usize]; + ["Offset of field: __darwin_zmm_reg::__zmm_reg"] + [::std::mem::offset_of!(__darwin_zmm_reg, __zmm_reg) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_opmask_reg { pub __opmask_reg: [::std::os::raw::c_char; 8usize], } -#[test] -fn bindgen_test_layout___darwin_opmask_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_opmask_reg>(), - 8usize, - concat!("Size of: ", stringify!(__darwin_opmask_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_opmask_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_opmask_reg)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_opmask_reg>())).__opmask_reg as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_opmask_reg), - "::", - stringify!(__opmask_reg) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_opmask_reg"][::std::mem::size_of::<__darwin_opmask_reg>() - 8usize]; + ["Alignment of __darwin_opmask_reg"][::std::mem::align_of::<__darwin_opmask_reg>() - 1usize]; + ["Offset of field: __darwin_opmask_reg::__opmask_reg"] + [::std::mem::offset_of!(__darwin_opmask_reg, __opmask_reg) - 0usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_i386_float_state { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -2535,408 +2807,79 @@ pub struct __darwin_i386_float_state { pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], pub __fpu_reserved1: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___darwin_i386_float_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_float_state>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_i386_float_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_float_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_float_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_i386_float_state"] + [::std::mem::size_of::<__darwin_i386_float_state>() - 524usize]; + ["Alignment of __darwin_i386_float_state"] + [::std::mem::align_of::<__darwin_i386_float_state>() - 4usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_fop"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_ip"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_cs"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_dp"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_ds"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_rsrv4) - 296usize]; + ["Offset of field: __darwin_i386_float_state::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_i386_float_state, __fpu_reserved1) - 520usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_i386_avx_state { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -2980,513 +2923,97 @@ pub struct __darwin_i386_avx_state { pub __fpu_ymmh6: __darwin_xmm_reg, pub __fpu_ymmh7: __darwin_xmm_reg, } -#[test] -fn bindgen_test_layout___darwin_i386_avx_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx_state>(), - 716usize, - concat!("Size of: ", stringify!(__darwin_i386_avx_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsrmask as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved1 as *const _ as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__avx_reserved1 as *const _ as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_i386_avx_state"] + [::std::mem::size_of::<__darwin_i386_avx_state>() - 716usize]; + ["Alignment of __darwin_i386_avx_state"] + [::std::mem::align_of::<__darwin_i386_avx_state>() - 4usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_fop"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ip"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_cs"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_dp"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ds"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_rsrv4) - 296usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_reserved1) - 520usize]; + ["Offset of field: __darwin_i386_avx_state::__avx_reserved1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __avx_reserved1) - 524usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh0"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh0) - 588usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh1"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh1) - 604usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh2"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh2) - 620usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh3"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh3) - 636usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh4"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh4) - 652usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh5"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh5) - 668usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh6"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh6) - 684usize]; + ["Offset of field: __darwin_i386_avx_state::__fpu_ymmh7"] + [::std::mem::offset_of!(__darwin_i386_avx_state, __fpu_ymmh7) - 700usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_i386_avx512_state { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -3546,707 +3073,127 @@ pub struct __darwin_i386_avx512_state { pub __fpu_zmmh6: __darwin_ymm_reg, pub __fpu_zmmh7: __darwin_ymm_reg, } -#[test] -fn bindgen_test_layout___darwin_i386_avx512_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx512_state>(), - 1036usize, - concat!("Size of: ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx512_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k0 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k1 as *const _ as usize - }, - 724usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k2 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k3 as *const _ as usize - }, - 740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k4 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k5 as *const _ as usize - }, - 756usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k6 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k7 as *const _ as usize - }, - 772usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh0 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh1 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh2 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh3 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh4 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh5 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh6 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh7 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh7) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_i386_avx512_state"] + [::std::mem::size_of::<__darwin_i386_avx512_state>() - 1036usize]; + ["Alignment of __darwin_i386_avx512_state"] + [::std::mem::align_of::<__darwin_i386_avx512_state>() - 4usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_fop"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ip"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_cs"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_dp"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ds"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_rsrv4) - 296usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_reserved1) - 520usize]; + ["Offset of field: __darwin_i386_avx512_state::__avx_reserved1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __avx_reserved1) - 524usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh0"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh0) - 588usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh1) - 604usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh2) - 620usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh3) - 636usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh4) - 652usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh5"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh5) - 668usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh6"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh6) - 684usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_ymmh7"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_ymmh7) - 700usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k0"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k0) - 716usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k1) - 724usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k2) - 732usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k3) - 740usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k4) - 748usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k5"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k5) - 756usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k6"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k6) - 764usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_k7"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_k7) - 772usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh0"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh0) - 780usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh1"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh1) - 812usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh2"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh2) - 844usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh3"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh3) - 876usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh4"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh4) - 908usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh5"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh5) - 940usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh6"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh6) - 972usize]; + ["Offset of field: __darwin_i386_avx512_state::__fpu_zmmh7"] + [::std::mem::offset_of!(__darwin_i386_avx512_state, __fpu_zmmh7) - 1004usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_i386_exception_state { @@ -4255,68 +3202,21 @@ pub struct __darwin_i386_exception_state { pub __err: __uint32_t, pub __faultvaddr: __uint32_t, } -#[test] -fn bindgen_test_layout___darwin_i386_exception_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_exception_state>(), - 12usize, - concat!("Size of: ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_exception_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__faultvaddr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_i386_exception_state"] + [::std::mem::size_of::<__darwin_i386_exception_state>() - 12usize]; + ["Alignment of __darwin_i386_exception_state"] + [::std::mem::align_of::<__darwin_i386_exception_state>() - 4usize]; + ["Offset of field: __darwin_i386_exception_state::__trapno"] + [::std::mem::offset_of!(__darwin_i386_exception_state, __trapno) - 0usize]; + ["Offset of field: __darwin_i386_exception_state::__cpu"] + [::std::mem::offset_of!(__darwin_i386_exception_state, __cpu) - 2usize]; + ["Offset of field: __darwin_i386_exception_state::__err"] + [::std::mem::offset_of!(__darwin_i386_exception_state, __err) - 4usize]; + ["Offset of field: __darwin_i386_exception_state::__faultvaddr"] + [::std::mem::offset_of!(__darwin_i386_exception_state, __faultvaddr) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_debug_state32 { @@ -4329,145 +3229,423 @@ pub struct __darwin_x86_debug_state32 { pub __dr6: ::std::os::raw::c_uint, pub __dr7: ::std::os::raw::c_uint, } -#[test] -fn bindgen_test_layout___darwin_x86_debug_state32() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state32>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_debug_state32"] + [::std::mem::size_of::<__darwin_x86_debug_state32>() - 32usize]; + ["Alignment of __darwin_x86_debug_state32"] + [::std::mem::align_of::<__darwin_x86_debug_state32>() - 4usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr0"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr0) - 0usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr1"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr1) - 4usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr2"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr2) - 8usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr3"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr3) - 12usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr4"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr4) - 16usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr5"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr5) - 20usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr6"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr6) - 24usize]; + ["Offset of field: __darwin_x86_debug_state32::__dr7"] + [::std::mem::offset_of!(__darwin_x86_debug_state32, __dr7) - 28usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __x86_instruction_state { + pub __insn_stream_valid_bytes: ::std::os::raw::c_int, + pub __insn_offset: ::std::os::raw::c_int, + pub __out_of_synch: ::std::os::raw::c_int, + pub __insn_bytes: [__uint8_t; 2380usize], + pub __insn_cacheline: [__uint8_t; 64usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __x86_instruction_state"] + [::std::mem::size_of::<__x86_instruction_state>() - 2456usize]; + ["Alignment of __x86_instruction_state"] + [::std::mem::align_of::<__x86_instruction_state>() - 4usize]; + ["Offset of field: __x86_instruction_state::__insn_stream_valid_bytes"] + [::std::mem::offset_of!(__x86_instruction_state, __insn_stream_valid_bytes) - 0usize]; + ["Offset of field: __x86_instruction_state::__insn_offset"] + [::std::mem::offset_of!(__x86_instruction_state, __insn_offset) - 4usize]; + ["Offset of field: __x86_instruction_state::__out_of_synch"] + [::std::mem::offset_of!(__x86_instruction_state, __out_of_synch) - 8usize]; + ["Offset of field: __x86_instruction_state::__insn_bytes"] + [::std::mem::offset_of!(__x86_instruction_state, __insn_bytes) - 12usize]; + ["Offset of field: __x86_instruction_state::__insn_cacheline"] + [::std::mem::offset_of!(__x86_instruction_state, __insn_cacheline) - 2392usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __last_branch_record { + pub __from_ip: __uint64_t, + pub __to_ip: __uint64_t, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __bindgen_padding_0: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __last_branch_record"][::std::mem::size_of::<__last_branch_record>() - 24usize]; + ["Alignment of __last_branch_record"][::std::mem::align_of::<__last_branch_record>() - 8usize]; + ["Offset of field: __last_branch_record::__from_ip"] + [::std::mem::offset_of!(__last_branch_record, __from_ip) - 0usize]; + ["Offset of field: __last_branch_record::__to_ip"] + [::std::mem::offset_of!(__last_branch_record, __to_ip) - 8usize]; +}; +impl __last_branch_record { + #[inline] + pub fn __mispredict(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___mispredict(&mut self, val: __uint32_t) { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __mispredict_raw(this: *const Self) -> __uint32_t { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr1 as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___mispredict_raw(this: *mut Self, val: __uint32_t) { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr2 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __tsx_abort(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___tsx_abort(&mut self, val: __uint32_t) { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr3 as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __tsx_abort_raw(this: *const Self) -> __uint32_t { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr4 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___tsx_abort_raw(this: *mut Self, val: __uint32_t) { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr5 as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __in_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set___in_tsx(&mut self, val: __uint32_t) { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr6 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __in_tsx_raw(this: *const Self) -> __uint32_t { unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr7 as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr7) - ) - ); + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___in_tsx_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 16u8) as u32) } + } + #[inline] + pub fn set___cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn __cycle_count_raw(this: *const Self) -> __uint32_t { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___cycle_count_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 13u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 13u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_raw(this: *const Self) -> __uint32_t { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 13u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___reserved_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 13u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + __mispredict: __uint32_t, + __tsx_abort: __uint32_t, + __in_tsx: __uint32_t, + __cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __mispredict: u32 = unsafe { ::std::mem::transmute(__mispredict) }; + __mispredict as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __tsx_abort: u32 = unsafe { ::std::mem::transmute(__tsx_abort) }; + __tsx_abort as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let __in_tsx: u32 = unsafe { ::std::mem::transmute(__in_tsx) }; + __in_tsx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 16u8, { + let __cycle_count: u32 = unsafe { ::std::mem::transmute(__cycle_count) }; + __cycle_count as u64 + }); + __bindgen_bitfield_unit.set(19usize, 13u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __last_branch_state { + pub __lbr_count: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub __lbrs: [__last_branch_record; 32usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __last_branch_state"][::std::mem::size_of::<__last_branch_state>() - 776usize]; + ["Alignment of __last_branch_state"][::std::mem::align_of::<__last_branch_state>() - 8usize]; + ["Offset of field: __last_branch_state::__lbr_count"] + [::std::mem::offset_of!(__last_branch_state, __lbr_count) - 0usize]; + ["Offset of field: __last_branch_state::__lbrs"] + [::std::mem::offset_of!(__last_branch_state, __lbrs) - 8usize]; +}; +impl __last_branch_state { + #[inline] + pub fn __lbr_supported_tsx(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_tsx(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __lbr_supported_tsx_raw(this: *const Self) -> __uint32_t { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___lbr_supported_tsx_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __lbr_supported_cycle_count(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set___lbr_supported_cycle_count(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn __lbr_supported_cycle_count_raw(this: *const Self) -> __uint32_t { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___lbr_supported_cycle_count_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn __reserved(&self) -> __uint32_t { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set___reserved(&mut self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub unsafe fn __reserved_raw(this: *const Self) -> __uint32_t { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 30u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set___reserved_raw(this: *mut Self, val: __uint32_t) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 30u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + __lbr_supported_tsx: __uint32_t, + __lbr_supported_cycle_count: __uint32_t, + __reserved: __uint32_t, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let __lbr_supported_tsx: u32 = unsafe { ::std::mem::transmute(__lbr_supported_tsx) }; + __lbr_supported_tsx as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let __lbr_supported_cycle_count: u32 = + unsafe { ::std::mem::transmute(__lbr_supported_cycle_count) }; + __lbr_supported_cycle_count as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let __reserved: u32 = unsafe { ::std::mem::transmute(__reserved) }; + __reserved as u64 + }); + __bindgen_bitfield_unit + } } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __x86_pagein_state { pub __pagein_error: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___x86_pagein_state() { - assert_eq!( - ::std::mem::size_of::<__x86_pagein_state>(), - 4usize, - concat!("Size of: ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - ::std::mem::align_of::<__x86_pagein_state>(), - 4usize, - concat!("Alignment of ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_pagein_state>())).__pagein_error as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__x86_pagein_state), - "::", - stringify!(__pagein_error) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __x86_pagein_state"][::std::mem::size_of::<__x86_pagein_state>() - 4usize]; + ["Alignment of __x86_pagein_state"][::std::mem::align_of::<__x86_pagein_state>() - 4usize]; + ["Offset of field: __x86_pagein_state::__pagein_error"] + [::std::mem::offset_of!(__x86_pagein_state, __pagein_error) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_thread_state64 { @@ -4493,271 +3671,55 @@ pub struct __darwin_x86_thread_state64 { pub __fs: __uint64_t, pub __gs: __uint64_t, } -#[test] -fn bindgen_test_layout___darwin_x86_thread_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_state64>(), - 168usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rax as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rax) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbx as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rcx as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rcx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdx as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdi as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsi as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbp as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r8 as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r9 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r10 as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r11 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r12 as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r13 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r14 as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r15 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rip as *const _ as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rflags as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rflags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__cs as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__fs as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__fs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__gs as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__gs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_thread_state64"] + [::std::mem::size_of::<__darwin_x86_thread_state64>() - 168usize]; + ["Alignment of __darwin_x86_thread_state64"] + [::std::mem::align_of::<__darwin_x86_thread_state64>() - 8usize]; + ["Offset of field: __darwin_x86_thread_state64::__rax"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rax) - 0usize]; + ["Offset of field: __darwin_x86_thread_state64::__rbx"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rbx) - 8usize]; + ["Offset of field: __darwin_x86_thread_state64::__rcx"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rcx) - 16usize]; + ["Offset of field: __darwin_x86_thread_state64::__rdx"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rdx) - 24usize]; + ["Offset of field: __darwin_x86_thread_state64::__rdi"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rdi) - 32usize]; + ["Offset of field: __darwin_x86_thread_state64::__rsi"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rsi) - 40usize]; + ["Offset of field: __darwin_x86_thread_state64::__rbp"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rbp) - 48usize]; + ["Offset of field: __darwin_x86_thread_state64::__rsp"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rsp) - 56usize]; + ["Offset of field: __darwin_x86_thread_state64::__r8"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r8) - 64usize]; + ["Offset of field: __darwin_x86_thread_state64::__r9"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r9) - 72usize]; + ["Offset of field: __darwin_x86_thread_state64::__r10"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r10) - 80usize]; + ["Offset of field: __darwin_x86_thread_state64::__r11"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r11) - 88usize]; + ["Offset of field: __darwin_x86_thread_state64::__r12"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r12) - 96usize]; + ["Offset of field: __darwin_x86_thread_state64::__r13"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r13) - 104usize]; + ["Offset of field: __darwin_x86_thread_state64::__r14"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r14) - 112usize]; + ["Offset of field: __darwin_x86_thread_state64::__r15"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __r15) - 120usize]; + ["Offset of field: __darwin_x86_thread_state64::__rip"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rip) - 128usize]; + ["Offset of field: __darwin_x86_thread_state64::__rflags"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __rflags) - 136usize]; + ["Offset of field: __darwin_x86_thread_state64::__cs"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __cs) - 144usize]; + ["Offset of field: __darwin_x86_thread_state64::__fs"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __fs) - 152usize]; + ["Offset of field: __darwin_x86_thread_state64::__gs"] + [::std::mem::offset_of!(__darwin_x86_thread_state64, __gs) - 160usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_thread_full_state64 { @@ -4767,85 +3729,25 @@ pub struct __darwin_x86_thread_full_state64 { pub __ss: __uint64_t, pub __gsbase: __uint64_t, } -#[test] -fn bindgen_test_layout___darwin_x86_thread_full_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_full_state64>(), - 200usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_full_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_full_state64>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_x86_thread_full_state64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss64 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ds as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__es as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__gsbase as *const _ - as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__gsbase) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_thread_full_state64"] + [::std::mem::size_of::<__darwin_x86_thread_full_state64>() - 200usize]; + ["Alignment of __darwin_x86_thread_full_state64"] + [::std::mem::align_of::<__darwin_x86_thread_full_state64>() - 8usize]; + ["Offset of field: __darwin_x86_thread_full_state64::__ss64"] + [::std::mem::offset_of!(__darwin_x86_thread_full_state64, __ss64) - 0usize]; + ["Offset of field: __darwin_x86_thread_full_state64::__ds"] + [::std::mem::offset_of!(__darwin_x86_thread_full_state64, __ds) - 168usize]; + ["Offset of field: __darwin_x86_thread_full_state64::__es"] + [::std::mem::offset_of!(__darwin_x86_thread_full_state64, __es) - 176usize]; + ["Offset of field: __darwin_x86_thread_full_state64::__ss"] + [::std::mem::offset_of!(__darwin_x86_thread_full_state64, __ss) - 184usize]; + ["Offset of field: __darwin_x86_thread_full_state64::__gsbase"] + [::std::mem::offset_of!(__darwin_x86_thread_full_state64, __gsbase) - 192usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_x86_float_state64 { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -4888,504 +3790,95 @@ pub struct __darwin_x86_float_state64 { pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], pub __fpu_reserved1: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___darwin_x86_float_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_float_state64>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_float_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_float_state64"] + [::std::mem::size_of::<__darwin_x86_float_state64>() - 524usize]; + ["Alignment of __darwin_x86_float_state64"] + [::std::mem::align_of::<__darwin_x86_float_state64>() - 4usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_fop"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_ip"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_cs"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_dp"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_ds"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm8"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm8) - 296usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm9"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm9) - 312usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm10"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm10) - 328usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm11"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm11) - 344usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm12"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm12) - 360usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm13"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm13) - 376usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm14"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm14) - 392usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_xmm15"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_xmm15) - 408usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_rsrv4) - 424usize]; + ["Offset of field: __darwin_x86_float_state64::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_x86_float_state64, __fpu_reserved1) - 520usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_x86_avx_state64 { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -5445,708 +3938,129 @@ pub struct __darwin_x86_avx_state64 { pub __fpu_ymmh14: __darwin_xmm_reg, pub __fpu_ymmh15: __darwin_xmm_reg, } -#[test] -fn bindgen_test_layout___darwin_x86_avx_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx_state64>(), - 844usize, - concat!("Size of: ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh10 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh11 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh12 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh13 as *const _ as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh14 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh15 as *const _ as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_avx_state64"] + [::std::mem::size_of::<__darwin_x86_avx_state64>() - 844usize]; + ["Alignment of __darwin_x86_avx_state64"] + [::std::mem::align_of::<__darwin_x86_avx_state64>() - 4usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_fop"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ip"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_cs"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_dp"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ds"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm8"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm8) - 296usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm9"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm9) - 312usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm10"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm10) - 328usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm11"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm11) - 344usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm12"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm12) - 360usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm13"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm13) - 376usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm14"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm14) - 392usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_xmm15"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_xmm15) - 408usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_rsrv4) - 424usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_reserved1) - 520usize]; + ["Offset of field: __darwin_x86_avx_state64::__avx_reserved1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __avx_reserved1) - 524usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh0"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh0) - 588usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh1"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh1) - 604usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh2"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh2) - 620usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh3"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh3) - 636usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh4"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh4) - 652usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh5"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh5) - 668usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh6"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh6) - 684usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh7"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh7) - 700usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh8"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh8) - 716usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh9"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh9) - 732usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh10"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh10) - 748usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh11"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh11) - 764usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh12"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh12) - 780usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh13"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh13) - 796usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh14"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh14) - 812usize]; + ["Offset of field: __darwin_x86_avx_state64::__fpu_ymmh15"] + [::std::mem::offset_of!(__darwin_x86_avx_state64, __fpu_ymmh15) - 828usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_x86_avx512_state64 { pub __fpu_reserved: [::std::os::raw::c_int; 2usize], pub __fpu_fcw: __darwin_fp_control, @@ -6163,1282 +4077,290 @@ pub struct __darwin_x86_avx512_state64 { pub __fpu_mxcsr: __uint32_t, pub __fpu_mxcsrmask: __uint32_t, pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_ymmh8: __darwin_xmm_reg, - pub __fpu_ymmh9: __darwin_xmm_reg, - pub __fpu_ymmh10: __darwin_xmm_reg, - pub __fpu_ymmh11: __darwin_xmm_reg, - pub __fpu_ymmh12: __darwin_xmm_reg, - pub __fpu_ymmh13: __darwin_xmm_reg, - pub __fpu_ymmh14: __darwin_xmm_reg, - pub __fpu_ymmh15: __darwin_xmm_reg, - pub __fpu_k0: __darwin_opmask_reg, - pub __fpu_k1: __darwin_opmask_reg, - pub __fpu_k2: __darwin_opmask_reg, - pub __fpu_k3: __darwin_opmask_reg, - pub __fpu_k4: __darwin_opmask_reg, - pub __fpu_k5: __darwin_opmask_reg, - pub __fpu_k6: __darwin_opmask_reg, - pub __fpu_k7: __darwin_opmask_reg, - pub __fpu_zmmh0: __darwin_ymm_reg, - pub __fpu_zmmh1: __darwin_ymm_reg, - pub __fpu_zmmh2: __darwin_ymm_reg, - pub __fpu_zmmh3: __darwin_ymm_reg, - pub __fpu_zmmh4: __darwin_ymm_reg, - pub __fpu_zmmh5: __darwin_ymm_reg, - pub __fpu_zmmh6: __darwin_ymm_reg, - pub __fpu_zmmh7: __darwin_ymm_reg, - pub __fpu_zmmh8: __darwin_ymm_reg, - pub __fpu_zmmh9: __darwin_ymm_reg, - pub __fpu_zmmh10: __darwin_ymm_reg, - pub __fpu_zmmh11: __darwin_ymm_reg, - pub __fpu_zmmh12: __darwin_ymm_reg, - pub __fpu_zmmh13: __darwin_ymm_reg, - pub __fpu_zmmh14: __darwin_ymm_reg, - pub __fpu_zmmh15: __darwin_ymm_reg, - pub __fpu_zmm16: __darwin_zmm_reg, - pub __fpu_zmm17: __darwin_zmm_reg, - pub __fpu_zmm18: __darwin_zmm_reg, - pub __fpu_zmm19: __darwin_zmm_reg, - pub __fpu_zmm20: __darwin_zmm_reg, - pub __fpu_zmm21: __darwin_zmm_reg, - pub __fpu_zmm22: __darwin_zmm_reg, - pub __fpu_zmm23: __darwin_zmm_reg, - pub __fpu_zmm24: __darwin_zmm_reg, - pub __fpu_zmm25: __darwin_zmm_reg, - pub __fpu_zmm26: __darwin_zmm_reg, - pub __fpu_zmm27: __darwin_zmm_reg, - pub __fpu_zmm28: __darwin_zmm_reg, - pub __fpu_zmm29: __darwin_zmm_reg, - pub __fpu_zmm30: __darwin_zmm_reg, - pub __fpu_zmm31: __darwin_zmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_x86_avx512_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx512_state64>(), - 2444usize, - concat!("Size of: ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx512_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh10 as *const _ - as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh11 as *const _ - as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh12 as *const _ - as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh13 as *const _ - as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh14 as *const _ - as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh15 as *const _ - as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k0 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k1 as *const _ as usize - }, - 852usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k2 as *const _ as usize - }, - 860usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k3 as *const _ as usize - }, - 868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k4 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k5 as *const _ as usize - }, - 884usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k6 as *const _ as usize - }, - 892usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k7 as *const _ as usize - }, - 900usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh0 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh1 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh2 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh3 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh4 as *const _ as usize - }, - 1036usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh5 as *const _ as usize - }, - 1068usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh6 as *const _ as usize - }, - 1100usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh7 as *const _ as usize - }, - 1132usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh8 as *const _ as usize - }, - 1164usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh9 as *const _ as usize - }, - 1196usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh10 as *const _ - as usize - }, - 1228usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh11 as *const _ - as usize - }, - 1260usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh12 as *const _ - as usize - }, - 1292usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh13 as *const _ - as usize - }, - 1324usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh14 as *const _ - as usize - }, - 1356usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh15 as *const _ - as usize - }, - 1388usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm16 as *const _ as usize - }, - 1420usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm16) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm17 as *const _ as usize - }, - 1484usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm17) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm18 as *const _ as usize - }, - 1548usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm18) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm19 as *const _ as usize - }, - 1612usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm19) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm20 as *const _ as usize - }, - 1676usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm20) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm21 as *const _ as usize - }, - 1740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm21) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm22 as *const _ as usize - }, - 1804usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm22) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm23 as *const _ as usize - }, - 1868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm23) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm24 as *const _ as usize - }, - 1932usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm24) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm25 as *const _ as usize - }, - 1996usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm25) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm26 as *const _ as usize - }, - 2060usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm27 as *const _ as usize - }, - 2124usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm27) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm28 as *const _ as usize - }, - 2188usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm28) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm29 as *const _ as usize - }, - 2252usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm29) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm30 as *const _ as usize - }, - 2316usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm30) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm31 as *const _ as usize - }, - 2380usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm31) - ) - ); + pub __fpu_stmm1: __darwin_mmst_reg, + pub __fpu_stmm2: __darwin_mmst_reg, + pub __fpu_stmm3: __darwin_mmst_reg, + pub __fpu_stmm4: __darwin_mmst_reg, + pub __fpu_stmm5: __darwin_mmst_reg, + pub __fpu_stmm6: __darwin_mmst_reg, + pub __fpu_stmm7: __darwin_mmst_reg, + pub __fpu_xmm0: __darwin_xmm_reg, + pub __fpu_xmm1: __darwin_xmm_reg, + pub __fpu_xmm2: __darwin_xmm_reg, + pub __fpu_xmm3: __darwin_xmm_reg, + pub __fpu_xmm4: __darwin_xmm_reg, + pub __fpu_xmm5: __darwin_xmm_reg, + pub __fpu_xmm6: __darwin_xmm_reg, + pub __fpu_xmm7: __darwin_xmm_reg, + pub __fpu_xmm8: __darwin_xmm_reg, + pub __fpu_xmm9: __darwin_xmm_reg, + pub __fpu_xmm10: __darwin_xmm_reg, + pub __fpu_xmm11: __darwin_xmm_reg, + pub __fpu_xmm12: __darwin_xmm_reg, + pub __fpu_xmm13: __darwin_xmm_reg, + pub __fpu_xmm14: __darwin_xmm_reg, + pub __fpu_xmm15: __darwin_xmm_reg, + pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], + pub __fpu_reserved1: ::std::os::raw::c_int, + pub __avx_reserved1: [::std::os::raw::c_char; 64usize], + pub __fpu_ymmh0: __darwin_xmm_reg, + pub __fpu_ymmh1: __darwin_xmm_reg, + pub __fpu_ymmh2: __darwin_xmm_reg, + pub __fpu_ymmh3: __darwin_xmm_reg, + pub __fpu_ymmh4: __darwin_xmm_reg, + pub __fpu_ymmh5: __darwin_xmm_reg, + pub __fpu_ymmh6: __darwin_xmm_reg, + pub __fpu_ymmh7: __darwin_xmm_reg, + pub __fpu_ymmh8: __darwin_xmm_reg, + pub __fpu_ymmh9: __darwin_xmm_reg, + pub __fpu_ymmh10: __darwin_xmm_reg, + pub __fpu_ymmh11: __darwin_xmm_reg, + pub __fpu_ymmh12: __darwin_xmm_reg, + pub __fpu_ymmh13: __darwin_xmm_reg, + pub __fpu_ymmh14: __darwin_xmm_reg, + pub __fpu_ymmh15: __darwin_xmm_reg, + pub __fpu_k0: __darwin_opmask_reg, + pub __fpu_k1: __darwin_opmask_reg, + pub __fpu_k2: __darwin_opmask_reg, + pub __fpu_k3: __darwin_opmask_reg, + pub __fpu_k4: __darwin_opmask_reg, + pub __fpu_k5: __darwin_opmask_reg, + pub __fpu_k6: __darwin_opmask_reg, + pub __fpu_k7: __darwin_opmask_reg, + pub __fpu_zmmh0: __darwin_ymm_reg, + pub __fpu_zmmh1: __darwin_ymm_reg, + pub __fpu_zmmh2: __darwin_ymm_reg, + pub __fpu_zmmh3: __darwin_ymm_reg, + pub __fpu_zmmh4: __darwin_ymm_reg, + pub __fpu_zmmh5: __darwin_ymm_reg, + pub __fpu_zmmh6: __darwin_ymm_reg, + pub __fpu_zmmh7: __darwin_ymm_reg, + pub __fpu_zmmh8: __darwin_ymm_reg, + pub __fpu_zmmh9: __darwin_ymm_reg, + pub __fpu_zmmh10: __darwin_ymm_reg, + pub __fpu_zmmh11: __darwin_ymm_reg, + pub __fpu_zmmh12: __darwin_ymm_reg, + pub __fpu_zmmh13: __darwin_ymm_reg, + pub __fpu_zmmh14: __darwin_ymm_reg, + pub __fpu_zmmh15: __darwin_ymm_reg, + pub __fpu_zmm16: __darwin_zmm_reg, + pub __fpu_zmm17: __darwin_zmm_reg, + pub __fpu_zmm18: __darwin_zmm_reg, + pub __fpu_zmm19: __darwin_zmm_reg, + pub __fpu_zmm20: __darwin_zmm_reg, + pub __fpu_zmm21: __darwin_zmm_reg, + pub __fpu_zmm22: __darwin_zmm_reg, + pub __fpu_zmm23: __darwin_zmm_reg, + pub __fpu_zmm24: __darwin_zmm_reg, + pub __fpu_zmm25: __darwin_zmm_reg, + pub __fpu_zmm26: __darwin_zmm_reg, + pub __fpu_zmm27: __darwin_zmm_reg, + pub __fpu_zmm28: __darwin_zmm_reg, + pub __fpu_zmm29: __darwin_zmm_reg, + pub __fpu_zmm30: __darwin_zmm_reg, + pub __fpu_zmm31: __darwin_zmm_reg, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_avx512_state64"] + [::std::mem::size_of::<__darwin_x86_avx512_state64>() - 2444usize]; + ["Alignment of __darwin_x86_avx512_state64"] + [::std::mem::align_of::<__darwin_x86_avx512_state64>() - 4usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_reserved"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_reserved) - 0usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_fcw"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_fcw) - 8usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_fsw"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_fsw) - 10usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ftw"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ftw) - 12usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_rsrv1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_rsrv1) - 13usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_fop"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_fop) - 14usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ip"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ip) - 16usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_cs"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_cs) - 20usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_rsrv2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_rsrv2) - 22usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_dp"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_dp) - 24usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ds"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ds) - 28usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_rsrv3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_rsrv3) - 30usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_mxcsr"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_mxcsr) - 32usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_mxcsrmask"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_mxcsrmask) - 36usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm0"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm0) - 40usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm1) - 56usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm2) - 72usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm3) - 88usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm4) - 104usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm5"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm5) - 120usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm6"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm6) - 136usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_stmm7"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_stmm7) - 152usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm0"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm0) - 168usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm1) - 184usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm2) - 200usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm3) - 216usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm4) - 232usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm5"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm5) - 248usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm6"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm6) - 264usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm7"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm7) - 280usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm8"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm8) - 296usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm9"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm9) - 312usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm10"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm10) - 328usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm11"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm11) - 344usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm12"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm12) - 360usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm13"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm13) - 376usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm14"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm14) - 392usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_xmm15"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_xmm15) - 408usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_rsrv4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_rsrv4) - 424usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_reserved1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_reserved1) - 520usize]; + ["Offset of field: __darwin_x86_avx512_state64::__avx_reserved1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __avx_reserved1) - 524usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh0"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh0) - 588usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh1) - 604usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh2) - 620usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh3) - 636usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh4) - 652usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh5"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh5) - 668usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh6"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh6) - 684usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh7"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh7) - 700usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh8"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh8) - 716usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh9"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh9) - 732usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh10"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh10) - 748usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh11"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh11) - 764usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh12"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh12) - 780usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh13"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh13) - 796usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh14"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh14) - 812usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_ymmh15"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_ymmh15) - 828usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k0"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k0) - 844usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k1) - 852usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k2) - 860usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k3) - 868usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k4) - 876usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k5"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k5) - 884usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k6"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k6) - 892usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_k7"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_k7) - 900usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh0"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh0) - 908usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh1"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh1) - 940usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh2"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh2) - 972usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh3"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh3) - 1004usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh4"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh4) - 1036usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh5"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh5) - 1068usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh6"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh6) - 1100usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh7"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh7) - 1132usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh8"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh8) - 1164usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh9"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh9) - 1196usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh10"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh10) - 1228usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh11"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh11) - 1260usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh12"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh12) - 1292usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh13"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh13) - 1324usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh14"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh14) - 1356usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmmh15"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmmh15) - 1388usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm16"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm16) - 1420usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm17"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm17) - 1484usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm18"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm18) - 1548usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm19"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm19) - 1612usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm20"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm20) - 1676usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm21"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm21) - 1740usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm22"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm22) - 1804usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm23"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm23) - 1868usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm24"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm24) - 1932usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm25"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm25) - 1996usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm26"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm26) - 2060usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm27"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm27) - 2124usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm28"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm28) - 2188usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm29"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm29) - 2252usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm30"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm30) - 2316usize]; + ["Offset of field: __darwin_x86_avx512_state64::__fpu_zmm31"] + [::std::mem::offset_of!(__darwin_x86_avx512_state64, __fpu_zmm31) - 2380usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_exception_state64 { @@ -7447,68 +4369,21 @@ pub struct __darwin_x86_exception_state64 { pub __err: __uint32_t, pub __faultvaddr: __uint64_t, } -#[test] -fn bindgen_test_layout___darwin_x86_exception_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_exception_state64>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_exception_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__faultvaddr) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_exception_state64"] + [::std::mem::size_of::<__darwin_x86_exception_state64>() - 16usize]; + ["Alignment of __darwin_x86_exception_state64"] + [::std::mem::align_of::<__darwin_x86_exception_state64>() - 8usize]; + ["Offset of field: __darwin_x86_exception_state64::__trapno"] + [::std::mem::offset_of!(__darwin_x86_exception_state64, __trapno) - 0usize]; + ["Offset of field: __darwin_x86_exception_state64::__cpu"] + [::std::mem::offset_of!(__darwin_x86_exception_state64, __cpu) - 2usize]; + ["Offset of field: __darwin_x86_exception_state64::__err"] + [::std::mem::offset_of!(__darwin_x86_exception_state64, __err) - 4usize]; + ["Offset of field: __darwin_x86_exception_state64::__faultvaddr"] + [::std::mem::offset_of!(__darwin_x86_exception_state64, __faultvaddr) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_debug_state64 { @@ -7521,622 +4396,219 @@ pub struct __darwin_x86_debug_state64 { pub __dr6: __uint64_t, pub __dr7: __uint64_t, } -#[test] -fn bindgen_test_layout___darwin_x86_debug_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state64>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr1 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr2 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr3 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr4 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr5 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr6 as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr7 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr7) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_debug_state64"] + [::std::mem::size_of::<__darwin_x86_debug_state64>() - 64usize]; + ["Alignment of __darwin_x86_debug_state64"] + [::std::mem::align_of::<__darwin_x86_debug_state64>() - 8usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr0"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr0) - 0usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr1"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr1) - 8usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr2"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr2) - 16usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr3"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr3) - 24usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr4"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr4) - 32usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr5"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr5) - 40usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr6"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr6) - 48usize]; + ["Offset of field: __darwin_x86_debug_state64::__dr7"] + [::std::mem::offset_of!(__darwin_x86_debug_state64, __dr7) - 56usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __darwin_x86_cpmu_state64 { pub __ctrs: [__uint64_t; 16usize], } -#[test] -fn bindgen_test_layout___darwin_x86_cpmu_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_cpmu_state64>(), - 128usize, - concat!("Size of: ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_cpmu_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_cpmu_state64>())).__ctrs as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_cpmu_state64), - "::", - stringify!(__ctrs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_x86_cpmu_state64"] + [::std::mem::size_of::<__darwin_x86_cpmu_state64>() - 128usize]; + ["Alignment of __darwin_x86_cpmu_state64"] + [::std::mem::align_of::<__darwin_x86_cpmu_state64>() - 8usize]; + ["Offset of field: __darwin_x86_cpmu_state64::__ctrs"] + [::std::mem::offset_of!(__darwin_x86_cpmu_state64, __ctrs) - 0usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext32 { pub __es: __darwin_i386_exception_state, pub __ss: __darwin_i386_thread_state, pub __fs: __darwin_i386_float_state, } -#[test] -fn bindgen_test_layout___darwin_mcontext32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext32>(), - 600usize, - concat!("Size of: ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext32"][::std::mem::size_of::<__darwin_mcontext32>() - 600usize]; + ["Alignment of __darwin_mcontext32"][::std::mem::align_of::<__darwin_mcontext32>() - 4usize]; + ["Offset of field: __darwin_mcontext32::__es"] + [::std::mem::offset_of!(__darwin_mcontext32, __es) - 0usize]; + ["Offset of field: __darwin_mcontext32::__ss"] + [::std::mem::offset_of!(__darwin_mcontext32, __ss) - 12usize]; + ["Offset of field: __darwin_mcontext32::__fs"] + [::std::mem::offset_of!(__darwin_mcontext32, __fs) - 76usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx32 { pub __es: __darwin_i386_exception_state, pub __ss: __darwin_i386_thread_state, pub __fs: __darwin_i386_avx_state, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx32>(), - 792usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx32"] + [::std::mem::size_of::<__darwin_mcontext_avx32>() - 792usize]; + ["Alignment of __darwin_mcontext_avx32"] + [::std::mem::align_of::<__darwin_mcontext_avx32>() - 4usize]; + ["Offset of field: __darwin_mcontext_avx32::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx32, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx32::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx32, __ss) - 12usize]; + ["Offset of field: __darwin_mcontext_avx32::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx32, __fs) - 76usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx512_32 { pub __es: __darwin_i386_exception_state, pub __ss: __darwin_i386_thread_state, pub __fs: __darwin_i386_avx512_state, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_32>(), - 1112usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__ss as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__fs as *const _ as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx512_32"] + [::std::mem::size_of::<__darwin_mcontext_avx512_32>() - 1112usize]; + ["Alignment of __darwin_mcontext_avx512_32"] + [::std::mem::align_of::<__darwin_mcontext_avx512_32>() - 4usize]; + ["Offset of field: __darwin_mcontext_avx512_32::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_32, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx512_32::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_32, __ss) - 12usize]; + ["Offset of field: __darwin_mcontext_avx512_32::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_32, __fs) - 76usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext64 { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_state64, pub __fs: __darwin_x86_float_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64>(), - 712usize, - concat!("Size of: ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext64"][::std::mem::size_of::<__darwin_mcontext64>() - 712usize]; + ["Alignment of __darwin_mcontext64"][::std::mem::align_of::<__darwin_mcontext64>() - 8usize]; + ["Offset of field: __darwin_mcontext64::__es"] + [::std::mem::offset_of!(__darwin_mcontext64, __es) - 0usize]; + ["Offset of field: __darwin_mcontext64::__ss"] + [::std::mem::offset_of!(__darwin_mcontext64, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext64::__fs"] + [::std::mem::offset_of!(__darwin_mcontext64, __fs) - 184usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext64_full { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_full_state64, pub __fs: __darwin_x86_float_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64_full>(), - 744usize, - concat!("Size of: ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__fs as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext64_full"] + [::std::mem::size_of::<__darwin_mcontext64_full>() - 744usize]; + ["Alignment of __darwin_mcontext64_full"] + [::std::mem::align_of::<__darwin_mcontext64_full>() - 8usize]; + ["Offset of field: __darwin_mcontext64_full::__es"] + [::std::mem::offset_of!(__darwin_mcontext64_full, __es) - 0usize]; + ["Offset of field: __darwin_mcontext64_full::__ss"] + [::std::mem::offset_of!(__darwin_mcontext64_full, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext64_full::__fs"] + [::std::mem::offset_of!(__darwin_mcontext64_full, __fs) - 216usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx64 { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_state64, pub __fs: __darwin_x86_avx_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64>(), - 1032usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx64"] + [::std::mem::size_of::<__darwin_mcontext_avx64>() - 1032usize]; + ["Alignment of __darwin_mcontext_avx64"] + [::std::mem::align_of::<__darwin_mcontext_avx64>() - 8usize]; + ["Offset of field: __darwin_mcontext_avx64::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx64, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx64::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx64, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext_avx64::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx64, __fs) - 184usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx64_full { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_full_state64, pub __fs: __darwin_x86_avx_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64_full>(), - 1064usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx64_full"] + [::std::mem::size_of::<__darwin_mcontext_avx64_full>() - 1064usize]; + ["Alignment of __darwin_mcontext_avx64_full"] + [::std::mem::align_of::<__darwin_mcontext_avx64_full>() - 8usize]; + ["Offset of field: __darwin_mcontext_avx64_full::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx64_full, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx64_full::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx64_full, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext_avx64_full::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx64_full, __fs) - 216usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx512_64 { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_state64, pub __fs: __darwin_x86_avx512_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64>(), - 2632usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__fs as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx512_64"] + [::std::mem::size_of::<__darwin_mcontext_avx512_64>() - 2632usize]; + ["Alignment of __darwin_mcontext_avx512_64"] + [::std::mem::align_of::<__darwin_mcontext_avx512_64>() - 8usize]; + ["Offset of field: __darwin_mcontext_avx512_64::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx512_64::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext_avx512_64::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64, __fs) - 184usize]; +}; #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct __darwin_mcontext_avx512_64_full { pub __es: __darwin_x86_exception_state64, pub __ss: __darwin_x86_thread_full_state64, pub __fs: __darwin_x86_avx512_state64, } -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64_full>(), - 2664usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64_full>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_mcontext_avx512_64_full) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__fs) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_mcontext_avx512_64_full"] + [::std::mem::size_of::<__darwin_mcontext_avx512_64_full>() - 2664usize]; + ["Alignment of __darwin_mcontext_avx512_64_full"] + [::std::mem::align_of::<__darwin_mcontext_avx512_64_full>() - 8usize]; + ["Offset of field: __darwin_mcontext_avx512_64_full::__es"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64_full, __es) - 0usize]; + ["Offset of field: __darwin_mcontext_avx512_64_full::__ss"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64_full, __ss) - 16usize]; + ["Offset of field: __darwin_mcontext_avx512_64_full::__fs"] + [::std::mem::offset_of!(__darwin_mcontext_avx512_64_full, __fs) - 216usize]; +}; pub type mcontext_t = *mut __darwin_mcontext64; pub type pthread_attr_t = __darwin_pthread_attr_t; #[repr(C)] @@ -8146,49 +4618,17 @@ pub struct __darwin_sigaltstack { pub ss_size: __darwin_size_t, pub ss_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___darwin_sigaltstack() { - assert_eq!( - ::std::mem::size_of::<__darwin_sigaltstack>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_sigaltstack>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_sigaltstack"][::std::mem::size_of::<__darwin_sigaltstack>() - 24usize]; + ["Alignment of __darwin_sigaltstack"][::std::mem::align_of::<__darwin_sigaltstack>() - 8usize]; + ["Offset of field: __darwin_sigaltstack::ss_sp"] + [::std::mem::offset_of!(__darwin_sigaltstack, ss_sp) - 0usize]; + ["Offset of field: __darwin_sigaltstack::ss_size"] + [::std::mem::offset_of!(__darwin_sigaltstack, ss_size) - 8usize]; + ["Offset of field: __darwin_sigaltstack::ss_flags"] + [::std::mem::offset_of!(__darwin_sigaltstack, ss_flags) - 16usize]; +}; pub type stack_t = __darwin_sigaltstack; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8200,79 +4640,23 @@ pub struct __darwin_ucontext { pub uc_mcsize: __darwin_size_t, pub uc_mcontext: *mut __darwin_mcontext64, } -#[test] -fn bindgen_test_layout___darwin_ucontext() { - assert_eq!( - ::std::mem::size_of::<__darwin_ucontext>(), - 56usize, - concat!("Size of: ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ucontext>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_onstack as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_onstack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_sigmask as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_stack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_link as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcsize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcontext as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcontext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __darwin_ucontext"][::std::mem::size_of::<__darwin_ucontext>() - 56usize]; + ["Alignment of __darwin_ucontext"][::std::mem::align_of::<__darwin_ucontext>() - 8usize]; + ["Offset of field: __darwin_ucontext::uc_onstack"] + [::std::mem::offset_of!(__darwin_ucontext, uc_onstack) - 0usize]; + ["Offset of field: __darwin_ucontext::uc_sigmask"] + [::std::mem::offset_of!(__darwin_ucontext, uc_sigmask) - 4usize]; + ["Offset of field: __darwin_ucontext::uc_stack"] + [::std::mem::offset_of!(__darwin_ucontext, uc_stack) - 8usize]; + ["Offset of field: __darwin_ucontext::uc_link"] + [::std::mem::offset_of!(__darwin_ucontext, uc_link) - 32usize]; + ["Offset of field: __darwin_ucontext::uc_mcsize"] + [::std::mem::offset_of!(__darwin_ucontext, uc_mcsize) - 40usize]; + ["Offset of field: __darwin_ucontext::uc_mcontext"] + [::std::mem::offset_of!(__darwin_ucontext, uc_mcontext) - 48usize]; +}; pub type ucontext_t = __darwin_ucontext; pub type sigset_t = __darwin_sigset_t; pub type uid_t = __darwin_uid_t; @@ -8281,41 +4665,14 @@ pub type uid_t = __darwin_uid_t; pub union sigval { pub sival_int: ::std::os::raw::c_int, pub sival_ptr: *mut ::std::os::raw::c_void, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_sigval() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_int as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigval"][::std::mem::size_of::() - 8usize]; + ["Alignment of sigval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigval::sival_int"][::std::mem::offset_of!(sigval, sival_int) - 0usize]; + ["Offset of field: sigval::sival_ptr"][::std::mem::offset_of!(sigval, sival_ptr) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigevent { @@ -8325,71 +4682,21 @@ pub struct sigevent { pub sigev_notify_function: ::std::option::Option, pub sigev_notify_attributes: *mut pthread_attr_t, } -#[test] -fn bindgen_test_layout_sigevent() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_signo as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_value as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify_function as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_function) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sigev_notify_attributes as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_attributes) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigevent"][::std::mem::size_of::() - 32usize]; + ["Alignment of sigevent"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigevent::sigev_notify"] + [::std::mem::offset_of!(sigevent, sigev_notify) - 0usize]; + ["Offset of field: sigevent::sigev_signo"] + [::std::mem::offset_of!(sigevent, sigev_signo) - 4usize]; + ["Offset of field: sigevent::sigev_value"] + [::std::mem::offset_of!(sigevent, sigev_value) - 8usize]; + ["Offset of field: sigevent::sigev_notify_function"] + [::std::mem::offset_of!(sigevent, sigev_notify_function) - 16usize]; + ["Offset of field: sigevent::sigev_notify_attributes"] + [::std::mem::offset_of!(sigevent, sigev_notify_attributes) - 24usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __siginfo { @@ -8404,119 +4711,22 @@ pub struct __siginfo { pub si_band: ::std::os::raw::c_long, pub __pad: [::std::os::raw::c_ulong; 7usize], } -#[test] -fn bindgen_test_layout___siginfo() { - assert_eq!( - ::std::mem::size_of::<__siginfo>(), - 104usize, - concat!("Size of: ", stringify!(__siginfo)) - ); - assert_eq!( - ::std::mem::align_of::<__siginfo>(), - 8usize, - concat!("Alignment of ", stringify!(__siginfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_signo as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_errno as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_code as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_pid as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_pid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_uid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_status as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_addr as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_addr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_value as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_band as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_band) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).__pad as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(__pad) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __siginfo"][::std::mem::size_of::<__siginfo>() - 104usize]; + ["Alignment of __siginfo"][::std::mem::align_of::<__siginfo>() - 8usize]; + ["Offset of field: __siginfo::si_signo"][::std::mem::offset_of!(__siginfo, si_signo) - 0usize]; + ["Offset of field: __siginfo::si_errno"][::std::mem::offset_of!(__siginfo, si_errno) - 4usize]; + ["Offset of field: __siginfo::si_code"][::std::mem::offset_of!(__siginfo, si_code) - 8usize]; + ["Offset of field: __siginfo::si_pid"][::std::mem::offset_of!(__siginfo, si_pid) - 12usize]; + ["Offset of field: __siginfo::si_uid"][::std::mem::offset_of!(__siginfo, si_uid) - 16usize]; + ["Offset of field: __siginfo::si_status"] + [::std::mem::offset_of!(__siginfo, si_status) - 20usize]; + ["Offset of field: __siginfo::si_addr"][::std::mem::offset_of!(__siginfo, si_addr) - 24usize]; + ["Offset of field: __siginfo::si_value"][::std::mem::offset_of!(__siginfo, si_value) - 32usize]; + ["Offset of field: __siginfo::si_band"][::std::mem::offset_of!(__siginfo, si_band) - 40usize]; + ["Offset of field: __siginfo::__pad"][::std::mem::offset_of!(__siginfo, __pad) - 48usize]; +}; pub type siginfo_t = __siginfo; #[repr(C)] #[derive(Copy, Clone)] @@ -8529,41 +4739,16 @@ pub union __sigaction_u { arg3: *mut ::std::os::raw::c_void, ), >, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout___sigaction_u() { - assert_eq!( - ::std::mem::size_of::<__sigaction_u>(), - 8usize, - concat!("Size of: ", stringify!(__sigaction_u)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction_u>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction_u)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_sigaction as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_sigaction) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sigaction_u"][::std::mem::size_of::<__sigaction_u>() - 8usize]; + ["Alignment of __sigaction_u"][::std::mem::align_of::<__sigaction_u>() - 8usize]; + ["Offset of field: __sigaction_u::__sa_handler"] + [::std::mem::offset_of!(__sigaction_u, __sa_handler) - 0usize]; + ["Offset of field: __sigaction_u::__sa_sigaction"] + [::std::mem::offset_of!(__sigaction_u, __sa_sigaction) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct __sigaction { @@ -8576,63 +4761,23 @@ pub struct __sigaction { arg4: *mut siginfo_t, arg5: *mut ::std::os::raw::c_void, ), - >, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sigaction() { - assert_eq!( - ::std::mem::size_of::<__sigaction>(), - 24usize, - concat!("Size of: ", stringify!(__sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_tramp as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_tramp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_mask as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_flags as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_flags) - ) - ); + >, + pub sa_mask: sigset_t, + pub sa_flags: ::std::os::raw::c_int, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sigaction"][::std::mem::size_of::<__sigaction>() - 24usize]; + ["Alignment of __sigaction"][::std::mem::align_of::<__sigaction>() - 8usize]; + ["Offset of field: __sigaction::__sigaction_u"] + [::std::mem::offset_of!(__sigaction, __sigaction_u) - 0usize]; + ["Offset of field: __sigaction::sa_tramp"] + [::std::mem::offset_of!(__sigaction, sa_tramp) - 8usize]; + ["Offset of field: __sigaction::sa_mask"] + [::std::mem::offset_of!(__sigaction, sa_mask) - 16usize]; + ["Offset of field: __sigaction::sa_flags"] + [::std::mem::offset_of!(__sigaction, sa_flags) - 20usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct sigaction { @@ -8640,49 +4785,15 @@ pub struct sigaction { pub sa_mask: sigset_t, pub sa_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_sigaction() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigaction"][::std::mem::size_of::() - 16usize]; + ["Alignment of sigaction"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigaction::__sigaction_u"] + [::std::mem::offset_of!(sigaction, __sigaction_u) - 0usize]; + ["Offset of field: sigaction::sa_mask"][::std::mem::offset_of!(sigaction, sa_mask) - 8usize]; + ["Offset of field: sigaction::sa_flags"][::std::mem::offset_of!(sigaction, sa_flags) - 12usize]; +}; pub type sig_t = ::std::option::Option; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8691,89 +4802,29 @@ pub struct sigvec { pub sv_mask: ::std::os::raw::c_int, pub sv_flags: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_sigvec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigvec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigvec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_flags) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigvec"][::std::mem::size_of::() - 16usize]; + ["Alignment of sigvec"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigvec::sv_handler"][::std::mem::offset_of!(sigvec, sv_handler) - 0usize]; + ["Offset of field: sigvec::sv_mask"][::std::mem::offset_of!(sigvec, sv_mask) - 8usize]; + ["Offset of field: sigvec::sv_flags"][::std::mem::offset_of!(sigvec, sv_flags) - 12usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct sigstack { pub ss_sp: *mut ::std::os::raw::c_char, pub ss_onstack: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_sigstack() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_onstack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_onstack) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sigstack"][::std::mem::size_of::() - 16usize]; + ["Alignment of sigstack"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sigstack::ss_sp"][::std::mem::offset_of!(sigstack, ss_sp) - 0usize]; + ["Offset of field: sigstack::ss_onstack"] + [::std::mem::offset_of!(sigstack, ss_onstack) - 8usize]; +}; +unsafe extern "C" { pub fn signal( arg1: ::std::os::raw::c_int, arg2: ::std::option::Option, @@ -8790,39 +4841,13 @@ pub struct timeval { pub tv_sec: __darwin_time_t, pub tv_usec: __darwin_suseconds_t, } -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of timeval"][::std::mem::size_of::() - 16usize]; + ["Alignment of timeval"][::std::mem::align_of::() - 8usize]; + ["Offset of field: timeval::tv_sec"][::std::mem::offset_of!(timeval, tv_sec) - 0usize]; + ["Offset of field: timeval::tv_usec"][::std::mem::offset_of!(timeval, tv_usec) - 8usize]; +}; pub type rlim_t = __uint64_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -8844,179 +4869,28 @@ pub struct rusage { pub ru_nvcsw: ::std::os::raw::c_long, pub ru_nivcsw: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_rusage() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_utime as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_utime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_stime as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_stime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_maxrss as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_maxrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_ixrss as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_ixrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_idrss as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_idrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_isrss as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_isrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_minflt as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_minflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_majflt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_majflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nswap as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nswap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_inblock as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_inblock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_oublock as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_oublock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgsnd as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgsnd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgrcv as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgrcv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nsignals as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nsignals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nvcsw as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nvcsw) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nivcsw as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nivcsw) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage"][::std::mem::size_of::() - 144usize]; + ["Alignment of rusage"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage::ru_utime"][::std::mem::offset_of!(rusage, ru_utime) - 0usize]; + ["Offset of field: rusage::ru_stime"][::std::mem::offset_of!(rusage, ru_stime) - 16usize]; + ["Offset of field: rusage::ru_maxrss"][::std::mem::offset_of!(rusage, ru_maxrss) - 32usize]; + ["Offset of field: rusage::ru_ixrss"][::std::mem::offset_of!(rusage, ru_ixrss) - 40usize]; + ["Offset of field: rusage::ru_idrss"][::std::mem::offset_of!(rusage, ru_idrss) - 48usize]; + ["Offset of field: rusage::ru_isrss"][::std::mem::offset_of!(rusage, ru_isrss) - 56usize]; + ["Offset of field: rusage::ru_minflt"][::std::mem::offset_of!(rusage, ru_minflt) - 64usize]; + ["Offset of field: rusage::ru_majflt"][::std::mem::offset_of!(rusage, ru_majflt) - 72usize]; + ["Offset of field: rusage::ru_nswap"][::std::mem::offset_of!(rusage, ru_nswap) - 80usize]; + ["Offset of field: rusage::ru_inblock"][::std::mem::offset_of!(rusage, ru_inblock) - 88usize]; + ["Offset of field: rusage::ru_oublock"][::std::mem::offset_of!(rusage, ru_oublock) - 96usize]; + ["Offset of field: rusage::ru_msgsnd"][::std::mem::offset_of!(rusage, ru_msgsnd) - 104usize]; + ["Offset of field: rusage::ru_msgrcv"][::std::mem::offset_of!(rusage, ru_msgrcv) - 112usize]; + ["Offset of field: rusage::ru_nsignals"] + [::std::mem::offset_of!(rusage, ru_nsignals) - 120usize]; + ["Offset of field: rusage::ru_nvcsw"][::std::mem::offset_of!(rusage, ru_nvcsw) - 128usize]; + ["Offset of field: rusage::ru_nivcsw"][::std::mem::offset_of!(rusage, ru_nivcsw) - 136usize]; +}; pub type rusage_info_t = *mut ::std::os::raw::c_void; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -9033,139 +4907,33 @@ pub struct rusage_info_v0 { pub ri_proc_start_abstime: u64, pub ri_proc_exit_abstime: u64, } -#[test] -fn bindgen_test_layout_rusage_info_v0() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(rusage_info_v0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v0)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v0"][::std::mem::size_of::() - 96usize]; + ["Alignment of rusage_info_v0"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v0::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v0, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v0::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v0, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v0::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v0, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v0::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v0, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v0::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v0, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v0::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v0, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v0::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v0, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v0::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v0, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v0::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v0, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v0::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v0, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v0::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v0, ri_proc_exit_abstime) - 88usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rusage_info_v1 { @@ -9187,209 +4955,45 @@ pub struct rusage_info_v1 { pub ri_child_pageins: u64, pub ri_child_elapsed_abstime: u64, } -#[test] -fn bindgen_test_layout_rusage_info_v1() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage_info_v1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v1"][::std::mem::size_of::() - 144usize]; + ["Alignment of rusage_info_v1"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v1::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v1, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v1::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v1, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v1::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v1, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v1::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v1, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v1::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v1, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v1::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v1, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v1::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v1, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v1::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v1, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v1::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v1, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v1::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v1, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v1::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v1, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v1::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v1::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v1::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v1::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v1::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v1::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v1, ri_child_elapsed_abstime) - 136usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rusage_info_v2 { @@ -9413,233 +5017,49 @@ pub struct rusage_info_v2 { pub ri_diskio_bytesread: u64, pub ri_diskio_byteswritten: u64, } -#[test] -fn bindgen_test_layout_rusage_info_v2() { - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(rusage_info_v2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v2"][::std::mem::size_of::() - 160usize]; + ["Alignment of rusage_info_v2"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v2::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v2, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v2::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v2, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v2::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v2, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v2::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v2, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v2::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v2, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v2::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v2, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v2::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v2, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v2::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v2, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v2::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v2, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v2::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v2, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v2::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v2, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v2::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v2::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v2::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v2::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v2::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v2::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v2, ri_child_elapsed_abstime) - 136usize]; + ["Offset of field: rusage_info_v2::ri_diskio_bytesread"] + [::std::mem::offset_of!(rusage_info_v2, ri_diskio_bytesread) - 144usize]; + ["Offset of field: rusage_info_v2::ri_diskio_byteswritten"] + [::std::mem::offset_of!(rusage_info_v2, ri_diskio_byteswritten) - 152usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rusage_info_v3 { @@ -9672,345 +5092,67 @@ pub struct rusage_info_v3 { pub ri_billed_system_time: u64, pub ri_serviced_system_time: u64, } -#[test] -fn bindgen_test_layout_rusage_info_v3() { - assert_eq!( - ::std::mem::size_of::(), - 232usize, - concat!("Size of: ", stringify!(rusage_info_v3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_serviced_system_time) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v3"][::std::mem::size_of::() - 232usize]; + ["Alignment of rusage_info_v3"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v3::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v3, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v3::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v3::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v3::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v3, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v3::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v3, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v3::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v3, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v3::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v3, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v3::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v3, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v3::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v3, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v3::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v3, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v3::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v3, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v3::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v3::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v3::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v3::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v3::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v3::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v3, ri_child_elapsed_abstime) - 136usize]; + ["Offset of field: rusage_info_v3::ri_diskio_bytesread"] + [::std::mem::offset_of!(rusage_info_v3, ri_diskio_bytesread) - 144usize]; + ["Offset of field: rusage_info_v3::ri_diskio_byteswritten"] + [::std::mem::offset_of!(rusage_info_v3, ri_diskio_byteswritten) - 152usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_default"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_default) - 160usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_maintenance"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_maintenance) - 168usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_background"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_background) - 176usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_utility"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_utility) - 184usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_legacy"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_legacy) - 192usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_user_initiated"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_user_initiated) - 200usize]; + ["Offset of field: rusage_info_v3::ri_cpu_time_qos_user_interactive"] + [::std::mem::offset_of!(rusage_info_v3, ri_cpu_time_qos_user_interactive) - 208usize]; + ["Offset of field: rusage_info_v3::ri_billed_system_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_billed_system_time) - 216usize]; + ["Offset of field: rusage_info_v3::ri_serviced_system_time"] + [::std::mem::offset_of!(rusage_info_v3, ri_serviced_system_time) - 224usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rusage_info_v4 { @@ -10050,549 +5192,421 @@ pub struct rusage_info_v4 { pub ri_serviced_energy: u64, pub ri_interval_max_phys_footprint: u64, pub ri_runnable_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v4() { - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(rusage_info_v4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_runnable_time) - ) - ); -} -pub type rusage_info_current = rusage_info_v4; +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v4"][::std::mem::size_of::() - 296usize]; + ["Alignment of rusage_info_v4"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v4::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v4, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v4::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v4::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v4::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v4, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v4::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v4, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v4::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v4, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v4::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v4, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v4::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v4, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v4::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v4, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v4::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v4, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v4::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v4, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v4::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v4::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v4::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v4::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v4::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v4::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v4, ri_child_elapsed_abstime) - 136usize]; + ["Offset of field: rusage_info_v4::ri_diskio_bytesread"] + [::std::mem::offset_of!(rusage_info_v4, ri_diskio_bytesread) - 144usize]; + ["Offset of field: rusage_info_v4::ri_diskio_byteswritten"] + [::std::mem::offset_of!(rusage_info_v4, ri_diskio_byteswritten) - 152usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_default"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_default) - 160usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_maintenance"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_maintenance) - 168usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_background"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_background) - 176usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_utility"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_utility) - 184usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_legacy"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_legacy) - 192usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_user_initiated"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_user_initiated) - 200usize]; + ["Offset of field: rusage_info_v4::ri_cpu_time_qos_user_interactive"] + [::std::mem::offset_of!(rusage_info_v4, ri_cpu_time_qos_user_interactive) - 208usize]; + ["Offset of field: rusage_info_v4::ri_billed_system_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_billed_system_time) - 216usize]; + ["Offset of field: rusage_info_v4::ri_serviced_system_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_serviced_system_time) - 224usize]; + ["Offset of field: rusage_info_v4::ri_logical_writes"] + [::std::mem::offset_of!(rusage_info_v4, ri_logical_writes) - 232usize]; + ["Offset of field: rusage_info_v4::ri_lifetime_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v4, ri_lifetime_max_phys_footprint) - 240usize]; + ["Offset of field: rusage_info_v4::ri_instructions"] + [::std::mem::offset_of!(rusage_info_v4, ri_instructions) - 248usize]; + ["Offset of field: rusage_info_v4::ri_cycles"] + [::std::mem::offset_of!(rusage_info_v4, ri_cycles) - 256usize]; + ["Offset of field: rusage_info_v4::ri_billed_energy"] + [::std::mem::offset_of!(rusage_info_v4, ri_billed_energy) - 264usize]; + ["Offset of field: rusage_info_v4::ri_serviced_energy"] + [::std::mem::offset_of!(rusage_info_v4, ri_serviced_energy) - 272usize]; + ["Offset of field: rusage_info_v4::ri_interval_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v4, ri_interval_max_phys_footprint) - 280usize]; + ["Offset of field: rusage_info_v4::ri_runnable_time"] + [::std::mem::offset_of!(rusage_info_v4, ri_runnable_time) - 288usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rusage_info_v5 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v5"][::std::mem::size_of::() - 304usize]; + ["Alignment of rusage_info_v5"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v5::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v5, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v5::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v5::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v5::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v5, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v5::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v5, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v5::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v5, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v5::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v5, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v5::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v5, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v5::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v5, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v5::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v5, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v5::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v5, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v5::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v5::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v5::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v5::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v5::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v5::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v5, ri_child_elapsed_abstime) - 136usize]; + ["Offset of field: rusage_info_v5::ri_diskio_bytesread"] + [::std::mem::offset_of!(rusage_info_v5, ri_diskio_bytesread) - 144usize]; + ["Offset of field: rusage_info_v5::ri_diskio_byteswritten"] + [::std::mem::offset_of!(rusage_info_v5, ri_diskio_byteswritten) - 152usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_default"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_default) - 160usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_maintenance"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_maintenance) - 168usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_background"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_background) - 176usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_utility"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_utility) - 184usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_legacy"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_legacy) - 192usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_user_initiated"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_user_initiated) - 200usize]; + ["Offset of field: rusage_info_v5::ri_cpu_time_qos_user_interactive"] + [::std::mem::offset_of!(rusage_info_v5, ri_cpu_time_qos_user_interactive) - 208usize]; + ["Offset of field: rusage_info_v5::ri_billed_system_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_billed_system_time) - 216usize]; + ["Offset of field: rusage_info_v5::ri_serviced_system_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_serviced_system_time) - 224usize]; + ["Offset of field: rusage_info_v5::ri_logical_writes"] + [::std::mem::offset_of!(rusage_info_v5, ri_logical_writes) - 232usize]; + ["Offset of field: rusage_info_v5::ri_lifetime_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v5, ri_lifetime_max_phys_footprint) - 240usize]; + ["Offset of field: rusage_info_v5::ri_instructions"] + [::std::mem::offset_of!(rusage_info_v5, ri_instructions) - 248usize]; + ["Offset of field: rusage_info_v5::ri_cycles"] + [::std::mem::offset_of!(rusage_info_v5, ri_cycles) - 256usize]; + ["Offset of field: rusage_info_v5::ri_billed_energy"] + [::std::mem::offset_of!(rusage_info_v5, ri_billed_energy) - 264usize]; + ["Offset of field: rusage_info_v5::ri_serviced_energy"] + [::std::mem::offset_of!(rusage_info_v5, ri_serviced_energy) - 272usize]; + ["Offset of field: rusage_info_v5::ri_interval_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v5, ri_interval_max_phys_footprint) - 280usize]; + ["Offset of field: rusage_info_v5::ri_runnable_time"] + [::std::mem::offset_of!(rusage_info_v5, ri_runnable_time) - 288usize]; + ["Offset of field: rusage_info_v5::ri_flags"] + [::std::mem::offset_of!(rusage_info_v5, ri_flags) - 296usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rusage_info_v6 { + pub ri_uuid: [u8; 16usize], + pub ri_user_time: u64, + pub ri_system_time: u64, + pub ri_pkg_idle_wkups: u64, + pub ri_interrupt_wkups: u64, + pub ri_pageins: u64, + pub ri_wired_size: u64, + pub ri_resident_size: u64, + pub ri_phys_footprint: u64, + pub ri_proc_start_abstime: u64, + pub ri_proc_exit_abstime: u64, + pub ri_child_user_time: u64, + pub ri_child_system_time: u64, + pub ri_child_pkg_idle_wkups: u64, + pub ri_child_interrupt_wkups: u64, + pub ri_child_pageins: u64, + pub ri_child_elapsed_abstime: u64, + pub ri_diskio_bytesread: u64, + pub ri_diskio_byteswritten: u64, + pub ri_cpu_time_qos_default: u64, + pub ri_cpu_time_qos_maintenance: u64, + pub ri_cpu_time_qos_background: u64, + pub ri_cpu_time_qos_utility: u64, + pub ri_cpu_time_qos_legacy: u64, + pub ri_cpu_time_qos_user_initiated: u64, + pub ri_cpu_time_qos_user_interactive: u64, + pub ri_billed_system_time: u64, + pub ri_serviced_system_time: u64, + pub ri_logical_writes: u64, + pub ri_lifetime_max_phys_footprint: u64, + pub ri_instructions: u64, + pub ri_cycles: u64, + pub ri_billed_energy: u64, + pub ri_serviced_energy: u64, + pub ri_interval_max_phys_footprint: u64, + pub ri_runnable_time: u64, + pub ri_flags: u64, + pub ri_user_ptime: u64, + pub ri_system_ptime: u64, + pub ri_pinstructions: u64, + pub ri_pcycles: u64, + pub ri_energy_nj: u64, + pub ri_penergy_nj: u64, + pub ri_secure_time_in_system: u64, + pub ri_secure_ptime_in_system: u64, + pub ri_neural_footprint: u64, + pub ri_lifetime_max_neural_footprint: u64, + pub ri_interval_max_neural_footprint: u64, + pub ri_reserved: [u64; 9usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rusage_info_v6"][::std::mem::size_of::() - 464usize]; + ["Alignment of rusage_info_v6"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rusage_info_v6::ri_uuid"] + [::std::mem::offset_of!(rusage_info_v6, ri_uuid) - 0usize]; + ["Offset of field: rusage_info_v6::ri_user_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_user_time) - 16usize]; + ["Offset of field: rusage_info_v6::ri_system_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_system_time) - 24usize]; + ["Offset of field: rusage_info_v6::ri_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v6, ri_pkg_idle_wkups) - 32usize]; + ["Offset of field: rusage_info_v6::ri_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v6, ri_interrupt_wkups) - 40usize]; + ["Offset of field: rusage_info_v6::ri_pageins"] + [::std::mem::offset_of!(rusage_info_v6, ri_pageins) - 48usize]; + ["Offset of field: rusage_info_v6::ri_wired_size"] + [::std::mem::offset_of!(rusage_info_v6, ri_wired_size) - 56usize]; + ["Offset of field: rusage_info_v6::ri_resident_size"] + [::std::mem::offset_of!(rusage_info_v6, ri_resident_size) - 64usize]; + ["Offset of field: rusage_info_v6::ri_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_phys_footprint) - 72usize]; + ["Offset of field: rusage_info_v6::ri_proc_start_abstime"] + [::std::mem::offset_of!(rusage_info_v6, ri_proc_start_abstime) - 80usize]; + ["Offset of field: rusage_info_v6::ri_proc_exit_abstime"] + [::std::mem::offset_of!(rusage_info_v6, ri_proc_exit_abstime) - 88usize]; + ["Offset of field: rusage_info_v6::ri_child_user_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_user_time) - 96usize]; + ["Offset of field: rusage_info_v6::ri_child_system_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_system_time) - 104usize]; + ["Offset of field: rusage_info_v6::ri_child_pkg_idle_wkups"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_pkg_idle_wkups) - 112usize]; + ["Offset of field: rusage_info_v6::ri_child_interrupt_wkups"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_interrupt_wkups) - 120usize]; + ["Offset of field: rusage_info_v6::ri_child_pageins"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_pageins) - 128usize]; + ["Offset of field: rusage_info_v6::ri_child_elapsed_abstime"] + [::std::mem::offset_of!(rusage_info_v6, ri_child_elapsed_abstime) - 136usize]; + ["Offset of field: rusage_info_v6::ri_diskio_bytesread"] + [::std::mem::offset_of!(rusage_info_v6, ri_diskio_bytesread) - 144usize]; + ["Offset of field: rusage_info_v6::ri_diskio_byteswritten"] + [::std::mem::offset_of!(rusage_info_v6, ri_diskio_byteswritten) - 152usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_default"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_default) - 160usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_maintenance"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_maintenance) - 168usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_background"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_background) - 176usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_utility"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_utility) - 184usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_legacy"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_legacy) - 192usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_user_initiated"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_user_initiated) - 200usize]; + ["Offset of field: rusage_info_v6::ri_cpu_time_qos_user_interactive"] + [::std::mem::offset_of!(rusage_info_v6, ri_cpu_time_qos_user_interactive) - 208usize]; + ["Offset of field: rusage_info_v6::ri_billed_system_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_billed_system_time) - 216usize]; + ["Offset of field: rusage_info_v6::ri_serviced_system_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_serviced_system_time) - 224usize]; + ["Offset of field: rusage_info_v6::ri_logical_writes"] + [::std::mem::offset_of!(rusage_info_v6, ri_logical_writes) - 232usize]; + ["Offset of field: rusage_info_v6::ri_lifetime_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_lifetime_max_phys_footprint) - 240usize]; + ["Offset of field: rusage_info_v6::ri_instructions"] + [::std::mem::offset_of!(rusage_info_v6, ri_instructions) - 248usize]; + ["Offset of field: rusage_info_v6::ri_cycles"] + [::std::mem::offset_of!(rusage_info_v6, ri_cycles) - 256usize]; + ["Offset of field: rusage_info_v6::ri_billed_energy"] + [::std::mem::offset_of!(rusage_info_v6, ri_billed_energy) - 264usize]; + ["Offset of field: rusage_info_v6::ri_serviced_energy"] + [::std::mem::offset_of!(rusage_info_v6, ri_serviced_energy) - 272usize]; + ["Offset of field: rusage_info_v6::ri_interval_max_phys_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_interval_max_phys_footprint) - 280usize]; + ["Offset of field: rusage_info_v6::ri_runnable_time"] + [::std::mem::offset_of!(rusage_info_v6, ri_runnable_time) - 288usize]; + ["Offset of field: rusage_info_v6::ri_flags"] + [::std::mem::offset_of!(rusage_info_v6, ri_flags) - 296usize]; + ["Offset of field: rusage_info_v6::ri_user_ptime"] + [::std::mem::offset_of!(rusage_info_v6, ri_user_ptime) - 304usize]; + ["Offset of field: rusage_info_v6::ri_system_ptime"] + [::std::mem::offset_of!(rusage_info_v6, ri_system_ptime) - 312usize]; + ["Offset of field: rusage_info_v6::ri_pinstructions"] + [::std::mem::offset_of!(rusage_info_v6, ri_pinstructions) - 320usize]; + ["Offset of field: rusage_info_v6::ri_pcycles"] + [::std::mem::offset_of!(rusage_info_v6, ri_pcycles) - 328usize]; + ["Offset of field: rusage_info_v6::ri_energy_nj"] + [::std::mem::offset_of!(rusage_info_v6, ri_energy_nj) - 336usize]; + ["Offset of field: rusage_info_v6::ri_penergy_nj"] + [::std::mem::offset_of!(rusage_info_v6, ri_penergy_nj) - 344usize]; + ["Offset of field: rusage_info_v6::ri_secure_time_in_system"] + [::std::mem::offset_of!(rusage_info_v6, ri_secure_time_in_system) - 352usize]; + ["Offset of field: rusage_info_v6::ri_secure_ptime_in_system"] + [::std::mem::offset_of!(rusage_info_v6, ri_secure_ptime_in_system) - 360usize]; + ["Offset of field: rusage_info_v6::ri_neural_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_neural_footprint) - 368usize]; + ["Offset of field: rusage_info_v6::ri_lifetime_max_neural_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_lifetime_max_neural_footprint) - 376usize]; + ["Offset of field: rusage_info_v6::ri_interval_max_neural_footprint"] + [::std::mem::offset_of!(rusage_info_v6, ri_interval_max_neural_footprint) - 384usize]; + ["Offset of field: rusage_info_v6::ri_reserved"] + [::std::mem::offset_of!(rusage_info_v6, ri_reserved) - 392usize]; +}; +pub type rusage_info_current = rusage_info_v6; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct rlimit { pub rlim_cur: rlim_t, pub rlim_max: rlim_t, } -#[test] -fn bindgen_test_layout_rlimit() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(rlimit)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rlimit)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_cur as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_cur) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_max) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rlimit"][::std::mem::size_of::() - 16usize]; + ["Alignment of rlimit"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rlimit::rlim_cur"][::std::mem::offset_of!(rlimit, rlim_cur) - 0usize]; + ["Offset of field: rlimit::rlim_max"][::std::mem::offset_of!(rlimit, rlim_max) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct proc_rlimit_control_wakeupmon { pub wm_flags: u32, pub wm_rate: i32, } -#[test] -fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_rate as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_rate) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of proc_rlimit_control_wakeupmon"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of proc_rlimit_control_wakeupmon"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: proc_rlimit_control_wakeupmon::wm_flags"] + [::std::mem::offset_of!(proc_rlimit_control_wakeupmon, wm_flags) - 0usize]; + ["Offset of field: proc_rlimit_control_wakeupmon::wm_rate"] + [::std::mem::offset_of!(proc_rlimit_control_wakeupmon, wm_rate) - 4usize]; +}; +unsafe extern "C" { pub fn getpriority(arg1: ::std::os::raw::c_int, arg2: id_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getiopolicy_np( arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getrlimit(arg1: ::std::os::raw::c_int, arg2: *mut rlimit) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getrusage(arg1: ::std::os::raw::c_int, arg2: *mut rusage) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setpriority( arg1: ::std::os::raw::c_int, arg2: id_t, arg3: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setiopolicy_np( arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int, arg3: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setrlimit(arg1: ::std::os::raw::c_int, arg2: *const rlimit) -> ::std::os::raw::c_int; } #[repr(C)] @@ -10601,27 +5615,19 @@ pub union wait { pub w_status: ::std::os::raw::c_int, pub w_T: wait__bindgen_ty_1, pub w_S: wait__bindgen_ty_2, - _bindgen_union_align: u32, } #[repr(C)] #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct wait__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); -} + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait__bindgen_ty_1"][::std::mem::align_of::() - 4usize]; +}; impl wait__bindgen_ty_1 { #[inline] pub fn w_Termsig(&self) -> ::std::os::raw::c_uint { @@ -10635,6 +5641,28 @@ impl wait__bindgen_ty_1 { } } #[inline] + pub unsafe fn w_Termsig_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 7u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Termsig_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 7u8, + val as u64, + ) + } + } + #[inline] pub fn w_Coredump(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } } @@ -10646,6 +5674,28 @@ impl wait__bindgen_ty_1 { } } #[inline] + pub unsafe fn w_Coredump_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 7usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Coredump_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 7usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn w_Retcode(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } } @@ -10657,6 +5707,28 @@ impl wait__bindgen_ty_1 { } } #[inline] + pub unsafe fn w_Retcode_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Retcode_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] pub fn w_Filler(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } } @@ -10668,14 +5740,35 @@ impl wait__bindgen_ty_1 { } } #[inline] + pub unsafe fn w_Filler_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Filler_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( w_Termsig: ::std::os::raw::c_uint, w_Coredump: ::std::os::raw::c_uint, w_Retcode: ::std::os::raw::c_uint, w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 7u8, { let w_Termsig: u32 = unsafe { ::std::mem::transmute(w_Termsig) }; w_Termsig as u64 @@ -10699,21 +5792,14 @@ impl wait__bindgen_ty_1 { #[repr(align(4))] #[derive(Debug, Copy, Clone)] pub struct wait__bindgen_ty_2 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); -} + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait__bindgen_ty_2"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait__bindgen_ty_2"][::std::mem::align_of::() - 4usize]; +}; impl wait__bindgen_ty_2 { #[inline] pub fn w_Stopval(&self) -> ::std::os::raw::c_uint { @@ -10727,6 +5813,28 @@ impl wait__bindgen_ty_2 { } } #[inline] + pub unsafe fn w_Stopval_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Stopval_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 8u8, + val as u64, + ) + } + } + #[inline] pub fn w_Stopsig(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } } @@ -10738,6 +5846,28 @@ impl wait__bindgen_ty_2 { } } #[inline] + pub unsafe fn w_Stopsig_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Stopsig_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] pub fn w_Filler(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } } @@ -10749,13 +5879,34 @@ impl wait__bindgen_ty_2 { } } #[inline] + pub unsafe fn w_Filler_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_w_Filler_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( w_Stopval: ::std::os::raw::c_uint, w_Stopsig: ::std::os::raw::c_uint, w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 8u8, { let w_Stopval: u32 = unsafe { ::std::mem::transmute(w_Stopval) }; w_Stopval as u64 @@ -10771,50 +5922,25 @@ impl wait__bindgen_ty_2 { __bindgen_bitfield_unit } } -#[test] -fn bindgen_test_layout_wait() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_T as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_S as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S)) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of wait"][::std::mem::size_of::() - 4usize]; + ["Alignment of wait"][::std::mem::align_of::() - 4usize]; + ["Offset of field: wait::w_status"][::std::mem::offset_of!(wait, w_status) - 0usize]; + ["Offset of field: wait::w_T"][::std::mem::offset_of!(wait, w_T) - 0usize]; + ["Offset of field: wait::w_S"][::std::mem::offset_of!(wait, w_S) - 0usize]; +}; +unsafe extern "C" { pub fn wait(arg1: *mut ::std::os::raw::c_int) -> pid_t; } -extern "C" { +unsafe extern "C" { pub fn waitpid( arg1: pid_t, arg2: *mut ::std::os::raw::c_int, arg3: ::std::os::raw::c_int, ) -> pid_t; } -extern "C" { +unsafe extern "C" { pub fn waitid( arg1: idtype_t, arg2: id_t, @@ -10822,14 +5948,14 @@ extern "C" { arg4: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn wait3( arg1: *mut ::std::os::raw::c_int, arg2: ::std::os::raw::c_int, arg3: *mut rusage, ) -> pid_t; } -extern "C" { +unsafe extern "C" { pub fn wait4( arg1: pid_t, arg2: *mut ::std::os::raw::c_int, @@ -10837,7 +5963,7 @@ extern "C" { arg4: *mut rusage, ) -> pid_t; } -extern "C" { +unsafe extern "C" { pub fn alloca(arg1: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } pub type ct_rune_t = __darwin_ct_rune_t; @@ -10848,178 +5974,210 @@ pub struct div_t { pub quot: ::std::os::raw::c_int, pub rem: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_div_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of div_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of div_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: div_t::quot"][::std::mem::offset_of!(div_t, quot) - 0usize]; + ["Offset of field: div_t::rem"][::std::mem::offset_of!(div_t, rem) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ldiv_t { pub quot: ::std::os::raw::c_long, pub rem: ::std::os::raw::c_long, } -#[test] -fn bindgen_test_layout_ldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of ldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ldiv_t::quot"][::std::mem::offset_of!(ldiv_t, quot) - 0usize]; + ["Offset of field: ldiv_t::rem"][::std::mem::offset_of!(ldiv_t, rem) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct lldiv_t { pub quot: ::std::os::raw::c_longlong, pub rem: ::std::os::raw::c_longlong, } -#[test] -fn bindgen_test_layout_lldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of lldiv_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of lldiv_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: lldiv_t::quot"][::std::mem::offset_of!(lldiv_t, quot) - 0usize]; + ["Offset of field: lldiv_t::rem"][::std::mem::offset_of!(lldiv_t, rem) - 8usize]; +}; +unsafe extern "C" { + pub static mut __mb_cur_max: ::std::os::raw::c_int; +} +pub type malloc_type_id_t = ::std::os::raw::c_ulonglong; +unsafe extern "C" { + pub fn malloc_type_malloc( + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_calloc( + count: usize, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_free(ptr: *mut ::std::os::raw::c_void, type_id: malloc_type_id_t); +} +unsafe extern "C" { + pub fn malloc_type_realloc( + ptr: *mut ::std::os::raw::c_void, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_valloc( + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_aligned_alloc( + alignment: usize, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_posix_memalign( + memptr: *mut *mut ::std::os::raw::c_void, + alignment: usize, + size: usize, + type_id: malloc_type_id_t, + ) -> ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _malloc_zone_t { + _unused: [u8; 0], +} +pub type malloc_zone_t = _malloc_zone_t; +unsafe extern "C" { + pub fn malloc_type_zone_malloc( + zone: *mut malloc_zone_t, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_zone_calloc( + zone: *mut malloc_zone_t, + count: usize, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_zone_free( + zone: *mut malloc_zone_t, + ptr: *mut ::std::os::raw::c_void, + type_id: malloc_type_id_t, ); } -extern "C" { - pub static mut __mb_cur_max: ::std::os::raw::c_int; +unsafe extern "C" { + pub fn malloc_type_zone_realloc( + zone: *mut malloc_zone_t, + ptr: *mut ::std::os::raw::c_void, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn malloc_type_zone_valloc( + zone: *mut malloc_zone_t, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { + pub fn malloc_type_zone_memalign( + zone: *mut malloc_zone_t, + alignment: usize, + size: usize, + type_id: malloc_type_id_t, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn calloc( __count: ::std::os::raw::c_ulong, __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn free(arg1: *mut ::std::os::raw::c_void); } -extern "C" { +unsafe extern "C" { pub fn realloc( __ptr: *mut ::std::os::raw::c_void, __size: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn valloc(arg1: size_t) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn reallocf( + __ptr: *mut ::std::os::raw::c_void, + __size: usize, + ) -> *mut ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void; } -extern "C" { - pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn aligned_alloc( + __alignment: ::std::os::raw::c_ulong, + __size: ::std::os::raw::c_ulong, + ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn posix_memalign( __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: size_t, - __size: size_t, + __alignment: usize, + __size: usize, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn abort(); +unsafe extern "C" { + pub fn abort() -> !; } -extern "C" { +unsafe extern "C" { pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn atexit(arg1: ::std::option::Option) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn at_quick_exit( + arg1: ::std::option::Option, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn atof(arg1: *const ::std::os::raw::c_char) -> f64; } -extern "C" { +unsafe extern "C" { pub fn atoi(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn atol(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn atoll(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; } -extern "C" { +unsafe extern "C" { pub fn bsearch( __key: *const ::std::os::raw::c_void, __base: *const ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, @@ -11028,49 +6186,45 @@ extern "C" { >, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t; } -extern "C" { - pub fn exit(arg1: ::std::os::raw::c_int); +unsafe extern "C" { + pub fn exit(arg1: ::std::os::raw::c_int) -> !; } -extern "C" { +unsafe extern "C" { pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn labs(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn ldiv(arg1: ::std::os::raw::c_long, arg2: ::std::os::raw::c_long) -> ldiv_t; } -extern "C" { +unsafe extern "C" { pub fn llabs(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; } -extern "C" { +unsafe extern "C" { pub fn lldiv(arg1: ::std::os::raw::c_longlong, arg2: ::std::os::raw::c_longlong) -> lldiv_t; } -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; } -extern "C" { - pub fn mbstowcs( - arg1: *mut wchar_t, - arg2: *const ::std::os::raw::c_char, - arg3: size_t, - ) -> size_t; +unsafe extern "C" { + pub fn mbstowcs(arg1: *mut wchar_t, arg2: *const ::std::os::raw::c_char, arg3: usize) -> usize; } -extern "C" { +unsafe extern "C" { pub fn mbtowc( arg1: *mut wchar_t, arg2: *const ::std::os::raw::c_char, - arg3: size_t, + arg3: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn qsort( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, @@ -11079,75 +6233,74 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { + pub fn quick_exit(arg1: ::std::os::raw::c_int) -> !; +} +unsafe extern "C" { pub fn rand() -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn srand(arg1: ::std::os::raw::c_uint); } -extern "C" { +unsafe extern "C" { pub fn strtod( arg1: *const ::std::os::raw::c_char, arg2: *mut *mut ::std::os::raw::c_char, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn strtof( arg1: *const ::std::os::raw::c_char, arg2: *mut *mut ::std::os::raw::c_char, ) -> f32; } -extern "C" { +unsafe extern "C" { pub fn strtol( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn strtoll( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_longlong; } -extern "C" { +unsafe extern "C" { pub fn strtoul( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strtoull( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulonglong; } -extern "C" { +unsafe extern "C" { pub fn system(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { - pub fn wcstombs( - arg1: *mut ::std::os::raw::c_char, - arg2: *const wchar_t, - arg3: size_t, - ) -> size_t; +unsafe extern "C" { + pub fn wcstombs(arg1: *mut ::std::os::raw::c_char, arg2: *const wchar_t, arg3: usize) -> usize; } -extern "C" { +unsafe extern "C" { pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn _Exit(arg1: ::std::os::raw::c_int); +unsafe extern "C" { + pub fn _Exit(arg1: ::std::os::raw::c_int) -> !; } -extern "C" { +unsafe extern "C" { pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn drand48() -> f64; } -extern "C" { +unsafe extern "C" { pub fn ecvt( arg1: f64, arg2: ::std::os::raw::c_int, @@ -11155,10 +6308,10 @@ extern "C" { arg4: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn erand48(arg1: *mut ::std::os::raw::c_ushort) -> f64; } -extern "C" { +unsafe extern "C" { pub fn fcvt( arg1: f64, arg2: ::std::os::raw::c_int, @@ -11166,210 +6319,210 @@ extern "C" { arg4: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn gcvt( arg1: f64, arg2: ::std::os::raw::c_int, arg3: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn getsubopt( arg1: *mut *mut ::std::os::raw::c_char, arg2: *const *mut ::std::os::raw::c_char, arg3: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn grantpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn initstate( arg1: ::std::os::raw::c_uint, arg2: *mut ::std::os::raw::c_char, - arg3: size_t, + arg3: usize, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn jrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn l64a(arg1: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn lcong48(arg1: *mut ::std::os::raw::c_ushort); } -extern "C" { +unsafe extern "C" { pub fn lrand48() -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn mktemp(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn mkstemp(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn mrand48() -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn nrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn posix_openpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ptsname(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ptsname_r( fildes: ::std::os::raw::c_int, buffer: *mut ::std::os::raw::c_char, - buflen: size_t, + buflen: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn putenv(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn random() -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn rand_r(arg1: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_realpath$DARWIN_EXTSN"] pub fn realpath( arg1: *const ::std::os::raw::c_char, arg2: *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn seed48(arg1: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; } -extern "C" { +unsafe extern "C" { pub fn setenv( __name: *const ::std::os::raw::c_char, __value: *const ::std::os::raw::c_char, __overwrite: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setkey(arg1: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn setstate(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn srand48(arg1: ::std::os::raw::c_long); } -extern "C" { +unsafe extern "C" { pub fn srandom(arg1: ::std::os::raw::c_uint); } -extern "C" { +unsafe extern "C" { pub fn unlockpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn unsetenv(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } pub type dev_t = __darwin_dev_t; pub type mode_t = __darwin_mode_t; -extern "C" { +unsafe extern "C" { pub fn arc4random() -> u32; } -extern "C" { +unsafe extern "C" { pub fn arc4random_addrandom(arg1: *mut ::std::os::raw::c_uchar, arg2: ::std::os::raw::c_int); } -extern "C" { - pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: size_t); +unsafe extern "C" { + pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: usize); } -extern "C" { +unsafe extern "C" { pub fn arc4random_stir(); } -extern "C" { +unsafe extern "C" { pub fn arc4random_uniform(__upper_bound: u32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn atexit_b(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bsearch_b( __key: *const ::std::os::raw::c_void, __base: *const ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: *mut ::std::os::raw::c_void, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn cgetcap( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn cgetclose() -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetent( arg1: *mut *mut ::std::os::raw::c_char, arg2: *mut *mut ::std::os::raw::c_char, arg3: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetfirst( arg1: *mut *mut ::std::os::raw::c_char, arg2: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetmatch( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetnext( arg1: *mut *mut ::std::os::raw::c_char, arg2: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetnum( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut ::std::os::raw::c_long, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetset(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetstr( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cgetustr( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_daemon$1050"] pub fn daemon( arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn devname(arg1: dev_t, arg2: mode_t) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn devname_r( arg1: dev_t, arg2: mode_t, @@ -11377,26 +6530,26 @@ extern "C" { len: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn getbsize( arg1: *mut ::std::os::raw::c_int, arg2: *mut ::std::os::raw::c_long, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn getloadavg(arg1: *mut f64, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getprogname() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn setprogname(arg1: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn heapsort( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, @@ -11405,19 +6558,19 @@ extern "C" { >, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn heapsort_b( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn mergesort( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, @@ -11426,19 +6579,19 @@ extern "C" { >, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn mergesort_b( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn psort( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: ::std::option::Option< unsafe extern "C" fn( arg1: *const ::std::os::raw::c_void, @@ -11447,19 +6600,19 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn psort_b( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: *mut ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn psort_r( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, arg1: *mut ::std::os::raw::c_void, __compar: ::std::option::Option< unsafe extern "C" fn( @@ -11470,19 +6623,19 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn qsort_b( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, __compar: *mut ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn qsort_r( __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, + __nel: usize, + __width: usize, arg1: *mut ::std::os::raw::c_void, __compar: ::std::option::Option< unsafe extern "C" fn( @@ -11493,7 +6646,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn radixsort( __base: *mut *const ::std::os::raw::c_uchar, __nel: ::std::os::raw::c_int, @@ -11501,10 +6654,10 @@ extern "C" { __endbyte: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn rpmatch(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sradixsort( __base: *mut *const ::std::os::raw::c_uchar, __nel: ::std::os::raw::c_int, @@ -11512,188 +6665,190 @@ extern "C" { __endbyte: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sranddev(); } -extern "C" { +unsafe extern "C" { pub fn srandomdev(); } -extern "C" { - pub fn reallocf( - __ptr: *mut ::std::os::raw::c_void, - __size: size_t, - ) -> *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn strtonum( + __numstr: *const ::std::os::raw::c_char, + __minval: ::std::os::raw::c_longlong, + __maxval: ::std::os::raw::c_longlong, + __errstrp: *mut *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_longlong; } -extern "C" { +unsafe extern "C" { pub fn strtoq( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_longlong; } -extern "C" { +unsafe extern "C" { pub fn strtouq( __str: *const ::std::os::raw::c_char, __endptr: *mut *mut ::std::os::raw::c_char, __base: ::std::os::raw::c_int, ) -> ::std::os::raw::c_ulonglong; } -extern "C" { +unsafe extern "C" { pub static mut suboptarg: *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn memchr( __s: *const ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn memcmp( __s1: *const ::std::os::raw::c_void, __s2: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn memcpy( __dst: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn memmove( __dst: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, __len: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn memset( __b: *mut ::std::os::raw::c_void, __c: ::std::os::raw::c_int, __len: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn strcat( __s1: *mut ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strchr( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strcmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strcoll( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strcpy( __dst: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strcspn( __s: *const ::std::os::raw::c_char, __charset: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strncat( __s1: *mut ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strncmp( __s1: *const ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strncpy( __dst: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strpbrk( __s: *const ::std::os::raw::c_char, __charset: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strrchr( __s: *const ::std::os::raw::c_char, __c: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strspn( __s: *const ::std::os::raw::c_char, __charset: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strstr( __big: *const ::std::os::raw::c_char, __little: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strtok( __str: *mut ::std::os::raw::c_char, __sep: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strxfrm( __s1: *mut ::std::os::raw::c_char, __s2: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strtok_r( __str: *mut ::std::os::raw::c_char, __sep: *const ::std::os::raw::c_char, __lasts: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strerror_r( __errnum: ::std::os::raw::c_int, __strerrbuf: *mut ::std::os::raw::c_char, - __buflen: size_t, + __buflen: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strdup(__s1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn memccpy( __dst: *mut ::std::os::raw::c_void, __src: *const ::std::os::raw::c_void, @@ -11701,34 +6856,34 @@ extern "C" { __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn stpcpy( __dst: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn stpncpy( __dst: *mut ::std::os::raw::c_char, __src: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strndup( __s1: *const ::std::os::raw::c_char, __n: ::std::os::raw::c_ulong, ) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn strnlen(__s1: *const ::std::os::raw::c_char, __n: size_t) -> size_t; +unsafe extern "C" { + pub fn strnlen(__s1: *const ::std::os::raw::c_char, __n: usize) -> usize; } -extern "C" { +unsafe extern "C" { pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } pub type rsize_t = __darwin_size_t; pub type errno_t = ::std::os::raw::c_int; -extern "C" { +unsafe extern "C" { pub fn memset_s( __s: *mut ::std::os::raw::c_void, __smax: rsize_t, @@ -11736,149 +6891,155 @@ extern "C" { __n: rsize_t, ) -> errno_t; } -pub type ssize_t = __darwin_ssize_t; -extern "C" { +unsafe extern "C" { pub fn memmem( __big: *const ::std::os::raw::c_void, - __big_len: size_t, + __big_len: usize, __little: *const ::std::os::raw::c_void, - __little_len: size_t, + __little_len: usize, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn memset_pattern4( __b: *mut ::std::os::raw::c_void, __pattern4: *const ::std::os::raw::c_void, - __len: size_t, + __len: usize, ); } -extern "C" { +unsafe extern "C" { pub fn memset_pattern8( __b: *mut ::std::os::raw::c_void, __pattern8: *const ::std::os::raw::c_void, - __len: size_t, + __len: usize, ); } -extern "C" { +unsafe extern "C" { pub fn memset_pattern16( __b: *mut ::std::os::raw::c_void, __pattern16: *const ::std::os::raw::c_void, - __len: size_t, + __len: usize, ); } -extern "C" { +unsafe extern "C" { pub fn strcasestr( __big: *const ::std::os::raw::c_char, __little: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strnstr( __big: *const ::std::os::raw::c_char, __little: *const ::std::os::raw::c_char, - __len: size_t, + __len: usize, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn strlcat( __dst: *mut ::std::os::raw::c_char, __source: *const ::std::os::raw::c_char, __size: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strlcpy( __dst: *mut ::std::os::raw::c_char, __source: *const ::std::os::raw::c_char, __size: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn strmode(__mode: ::std::os::raw::c_int, __bp: *mut ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn strsep( __stringp: *mut *mut ::std::os::raw::c_char, __delim: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn swab( arg1: *const ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_void, - arg3: ssize_t, + arg3: isize, ); } -extern "C" { +unsafe extern "C" { pub fn timingsafe_bcmp( __b1: *const ::std::os::raw::c_void, __b2: *const ::std::os::raw::c_void, - __len: size_t, + __len: usize, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn strsignal_r( + __sig: ::std::os::raw::c_int, + __strsignalbuf: *mut ::std::os::raw::c_char, + __buflen: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcmp( arg1: *const ::std::os::raw::c_void, arg2: *const ::std::os::raw::c_void, arg3: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcopy( arg1: *const ::std::os::raw::c_void, arg2: *mut ::std::os::raw::c_void, - arg3: size_t, + arg3: usize, ); } -extern "C" { +unsafe extern "C" { pub fn bzero(arg1: *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_ulong); } -extern "C" { +unsafe extern "C" { pub fn index( arg1: *const ::std::os::raw::c_char, arg2: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn rindex( arg1: *const ::std::os::raw::c_char, arg2: ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ffs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strcasecmp( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn strncasecmp( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_ulong, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ffsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ffsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fls(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn flsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn flsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; } -pub type va_list = __builtin_va_list; pub type __gnuc_va_list = __builtin_va_list; -extern "C" { +pub type va_list = __builtin_va_list; +unsafe extern "C" { pub fn renameat( arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char, @@ -11886,14 +7047,14 @@ extern "C" { arg4: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn renamex_np( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn renameatx_np( arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char, @@ -11902,6 +7063,9 @@ extern "C" { arg5: ::std::os::raw::c_uint, ) -> ::std::os::raw::c_int; } +unsafe extern "C" { + pub fn printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; +} pub type fpos_t = __darwin_off_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -11909,39 +7073,13 @@ pub struct __sbuf { pub _base: *mut ::std::os::raw::c_uchar, pub _size: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout___sbuf() { - assert_eq!( - ::std::mem::size_of::<__sbuf>(), - 16usize, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_size) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sbuf"][::std::mem::size_of::<__sbuf>() - 16usize]; + ["Alignment of __sbuf"][::std::mem::align_of::<__sbuf>() - 8usize]; + ["Offset of field: __sbuf::_base"][::std::mem::offset_of!(__sbuf, _base) - 0usize]; + ["Offset of field: __sbuf::_size"][::std::mem::offset_of!(__sbuf, _size) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct __sFILEX { @@ -11978,290 +7116,102 @@ pub struct __sFILE { pub _write: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub _ub: __sbuf, - pub _extra: *mut __sFILEX, - pub _ur: ::std::os::raw::c_int, - pub _ubuf: [::std::os::raw::c_uchar; 3usize], - pub _nbuf: [::std::os::raw::c_uchar; 1usize], - pub _lb: __sbuf, - pub _blksize: ::std::os::raw::c_int, - pub _offset: fpos_t, -} -#[test] -fn bindgen_test_layout___sFILE() { - assert_eq!( - ::std::mem::size_of::<__sFILE>(), - 152usize, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._r as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_r) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._file as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._bf as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_bf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lbfsize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lbfsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._cookie as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_cookie) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._close as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_close) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._read as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_read) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._seek as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._write as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_write) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ub as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ub) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._extra as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_extra) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ur as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ur) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ubuf as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ubuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._nbuf as *const _ as usize }, - 119usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_nbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lb as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._blksize as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_offset) - ) - ); + arg2: *const ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub _ub: __sbuf, + pub _extra: *mut __sFILEX, + pub _ur: ::std::os::raw::c_int, + pub _ubuf: [::std::os::raw::c_uchar; 3usize], + pub _nbuf: [::std::os::raw::c_uchar; 1usize], + pub _lb: __sbuf, + pub _blksize: ::std::os::raw::c_int, + pub _offset: fpos_t, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __sFILE"][::std::mem::size_of::<__sFILE>() - 152usize]; + ["Alignment of __sFILE"][::std::mem::align_of::<__sFILE>() - 8usize]; + ["Offset of field: __sFILE::_p"][::std::mem::offset_of!(__sFILE, _p) - 0usize]; + ["Offset of field: __sFILE::_r"][::std::mem::offset_of!(__sFILE, _r) - 8usize]; + ["Offset of field: __sFILE::_w"][::std::mem::offset_of!(__sFILE, _w) - 12usize]; + ["Offset of field: __sFILE::_flags"][::std::mem::offset_of!(__sFILE, _flags) - 16usize]; + ["Offset of field: __sFILE::_file"][::std::mem::offset_of!(__sFILE, _file) - 18usize]; + ["Offset of field: __sFILE::_bf"][::std::mem::offset_of!(__sFILE, _bf) - 24usize]; + ["Offset of field: __sFILE::_lbfsize"][::std::mem::offset_of!(__sFILE, _lbfsize) - 40usize]; + ["Offset of field: __sFILE::_cookie"][::std::mem::offset_of!(__sFILE, _cookie) - 48usize]; + ["Offset of field: __sFILE::_close"][::std::mem::offset_of!(__sFILE, _close) - 56usize]; + ["Offset of field: __sFILE::_read"][::std::mem::offset_of!(__sFILE, _read) - 64usize]; + ["Offset of field: __sFILE::_seek"][::std::mem::offset_of!(__sFILE, _seek) - 72usize]; + ["Offset of field: __sFILE::_write"][::std::mem::offset_of!(__sFILE, _write) - 80usize]; + ["Offset of field: __sFILE::_ub"][::std::mem::offset_of!(__sFILE, _ub) - 88usize]; + ["Offset of field: __sFILE::_extra"][::std::mem::offset_of!(__sFILE, _extra) - 104usize]; + ["Offset of field: __sFILE::_ur"][::std::mem::offset_of!(__sFILE, _ur) - 112usize]; + ["Offset of field: __sFILE::_ubuf"][::std::mem::offset_of!(__sFILE, _ubuf) - 116usize]; + ["Offset of field: __sFILE::_nbuf"][::std::mem::offset_of!(__sFILE, _nbuf) - 119usize]; + ["Offset of field: __sFILE::_lb"][::std::mem::offset_of!(__sFILE, _lb) - 120usize]; + ["Offset of field: __sFILE::_blksize"][::std::mem::offset_of!(__sFILE, _blksize) - 136usize]; + ["Offset of field: __sFILE::_offset"][::std::mem::offset_of!(__sFILE, _offset) - 144usize]; +}; pub type FILE = __sFILE; -extern "C" { +unsafe extern "C" { pub static mut __stdinp: *mut FILE; } -extern "C" { +unsafe extern "C" { pub static mut __stdoutp: *mut FILE; } -extern "C" { +unsafe extern "C" { pub static mut __stderrp: *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn clearerr(arg1: *mut FILE); } -extern "C" { +unsafe extern "C" { pub fn fclose(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn feof(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ferror(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fflush(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fgetc(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fgets( arg1: *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int, arg3: *mut FILE, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fopen( __filename: *const ::std::os::raw::c_char, __mode: *const ::std::os::raw::c_char, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn fprintf( arg1: *mut FILE, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fputc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fputs(arg1: *const ::std::os::raw::c_char, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fread( __ptr: *mut ::std::os::raw::c_void, __size: ::std::os::raw::c_ulong, @@ -12269,34 +7219,34 @@ extern "C" { __stream: *mut FILE, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn freopen( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut FILE, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn fscanf( arg1: *mut FILE, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fseek( arg1: *mut FILE, arg2: ::std::os::raw::c_long, arg3: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ftell(arg1: *mut FILE) -> ::std::os::raw::c_long; } -extern "C" { +unsafe extern "C" { pub fn fwrite( __ptr: *const ::std::os::raw::c_void, __size: ::std::os::raw::c_ulong, @@ -12304,175 +7254,172 @@ extern "C" { __stream: *mut FILE, ) -> ::std::os::raw::c_ulong; } -extern "C" { +unsafe extern "C" { pub fn getc(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getchar() -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn gets(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn perror(arg1: *const ::std::os::raw::c_char); } -extern "C" { - pub fn printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { +unsafe extern "C" { pub fn putc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn putchar(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn puts(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn remove(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn rename( __old: *const ::std::os::raw::c_char, __new: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn rewind(arg1: *mut FILE); } -extern "C" { +unsafe extern "C" { pub fn scanf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setbuf(arg1: *mut FILE, arg2: *mut ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn setvbuf( arg1: *mut FILE, arg2: *mut ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, - arg4: size_t, + arg4: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sprintf( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sscanf( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tmpfile() -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ungetc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vfprintf( arg1: *mut FILE, arg2: *const ::std::os::raw::c_char, arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vprintf( arg1: *const ::std::os::raw::c_char, arg2: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vsprintf( arg1: *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ctermid(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fdopen(arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn fileno(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn pclose(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn popen( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn __srget(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __svfscanf( arg1: *mut FILE, arg2: *const ::std::os::raw::c_char, arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __swbuf(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn flockfile(arg1: *mut FILE); } -extern "C" { +unsafe extern "C" { pub fn ftrylockfile(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn funlockfile(arg1: *mut FILE); } -extern "C" { +unsafe extern "C" { pub fn getc_unlocked(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getchar_unlocked() -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn putc_unlocked(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn putchar_unlocked(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getw(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn putw(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tempnam( __dir: *const ::std::os::raw::c_char, __prefix: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } pub type off_t = __darwin_off_t; -extern "C" { +unsafe extern "C" { pub fn fseeko( __stream: *mut FILE, __offset: off_t, __whence: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ftello(__stream: *mut FILE) -> off_t; } -extern "C" { +unsafe extern "C" { pub fn snprintf( __str: *mut ::std::os::raw::c_char, __size: ::std::os::raw::c_ulong, @@ -12480,20 +7427,20 @@ extern "C" { ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vfscanf( __stream: *mut FILE, __format: *const ::std::os::raw::c_char, arg1: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vscanf( __format: *const ::std::os::raw::c_char, arg1: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vsnprintf( __str: *mut ::std::os::raw::c_char, __size: ::std::os::raw::c_ulong, @@ -12501,108 +7448,101 @@ extern "C" { arg1: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vsscanf( __str: *const ::std::os::raw::c_char, __format: *const ::std::os::raw::c_char, arg1: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn dprintf( arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vdprintf( arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char, arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn getdelim( __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut size_t, + __linecapp: *mut usize, __delimiter: ::std::os::raw::c_int, __stream: *mut FILE, - ) -> ssize_t; + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn getline( __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut size_t, + __linecapp: *mut usize, __stream: *mut FILE, - ) -> ssize_t; + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn fmemopen( __buf: *mut ::std::os::raw::c_void, - __size: size_t, + __size: usize, __mode: *const ::std::os::raw::c_char, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn open_memstream( __bufp: *mut *mut ::std::os::raw::c_char, - __sizep: *mut size_t, + __sizep: *mut usize, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub static sys_nerr: ::std::os::raw::c_int; } -extern "C" { - pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize]; +unsafe extern "C" { + pub static sys_errlist: [*const ::std::os::raw::c_char; 0usize]; } -extern "C" { +unsafe extern "C" { pub fn asprintf( arg1: *mut *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ctermid_r(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } -extern "C" { - pub fn fgetln(arg1: *mut FILE, arg2: *mut size_t) -> *mut ::std::os::raw::c_char; +unsafe extern "C" { + pub fn fgetln(arg1: *mut FILE, arg2: *mut usize) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fmtcheck( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fpurge(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn setbuffer( arg1: *mut FILE, arg2: *mut ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, ); } -extern "C" { +unsafe extern "C" { pub fn setlinebuf(arg1: *mut FILE) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vasprintf( arg1: *mut *mut ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn zopen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut FILE; -} -extern "C" { +unsafe extern "C" { pub fn funopen( arg1: *const ::std::os::raw::c_void, arg2: ::std::option::Option< @@ -12631,45 +7571,45 @@ extern "C" { >, ) -> *mut FILE; } -extern "C" { +unsafe extern "C" { pub fn __sprintf_chk( arg1: *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int, - arg3: size_t, + arg3: usize, arg4: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __snprintf_chk( arg1: *mut ::std::os::raw::c_char, - arg2: size_t, + arg2: usize, arg3: ::std::os::raw::c_int, - arg4: size_t, + arg4: usize, arg5: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __vsprintf_chk( arg1: *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int, - arg3: size_t, + arg3: usize, arg4: *const ::std::os::raw::c_char, arg5: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __vsnprintf_chk( arg1: *mut ::std::os::raw::c_char, - arg2: size_t, + arg2: usize, arg3: ::std::os::raw::c_int, - arg4: size_t, + arg4: usize, arg5: *const ::std::os::raw::c_char, arg6: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn __error() -> *mut ::std::os::raw::c_int; } pub type u_char = ::std::os::raw::c_uchar; @@ -12704,30 +7644,13 @@ pub type suseconds_t = __darwin_suseconds_t; pub struct fd_set { pub fds_bits: [__int32_t; 32usize], } -#[test] -fn bindgen_test_layout_fd_set() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fds_bits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of fd_set"][::std::mem::size_of::() - 128usize]; + ["Alignment of fd_set"][::std::mem::align_of::() - 4usize]; + ["Offset of field: fd_set::fds_bits"][::std::mem::offset_of!(fd_set, fds_bits) - 0usize]; +}; +unsafe extern "C" { pub fn __darwin_check_fd_set_overflow( arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_void, @@ -12749,53 +7672,18 @@ pub type fsfilcnt_t = __darwin_fsfilcnt_t; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct kstring_t { - pub l: size_t, - pub m: size_t, + pub l: usize, + pub m: usize, pub s: *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_kstring_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kstring_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kstring_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(l) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(s) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kstring_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kstring_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kstring_t::l"][::std::mem::offset_of!(kstring_t, l) - 0usize]; + ["Offset of field: kstring_t::m"][::std::mem::offset_of!(kstring_t, m) - 8usize]; + ["Offset of field: kstring_t::s"][::std::mem::offset_of!(kstring_t, s) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ks_tokaux_t { @@ -12804,77 +7692,34 @@ pub struct ks_tokaux_t { pub finished: ::std::os::raw::c_int, pub p: *const ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_ks_tokaux_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tab as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finished as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(finished) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(p) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ks_tokaux_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of ks_tokaux_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ks_tokaux_t::tab"][::std::mem::offset_of!(ks_tokaux_t, tab) - 0usize]; + ["Offset of field: ks_tokaux_t::sep"][::std::mem::offset_of!(ks_tokaux_t, sep) - 32usize]; + ["Offset of field: ks_tokaux_t::finished"] + [::std::mem::offset_of!(ks_tokaux_t, finished) - 36usize]; + ["Offset of field: ks_tokaux_t::p"][::std::mem::offset_of!(ks_tokaux_t, p) - 40usize]; +}; +unsafe extern "C" { pub fn kvsprintf( s: *mut kstring_t, fmt: *const ::std::os::raw::c_char, ap: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ksprintf( s: *mut kstring_t, fmt: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn kputd(d: f64, s: *mut kstring_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ksplit_core( s: *mut ::std::os::raw::c_char, delimiter: ::std::os::raw::c_int, @@ -12882,22 +7727,22 @@ extern "C" { _offsets: *mut *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn kstrstr( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, pat: *const ::std::os::raw::c_char, _prep: *mut *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn kstrnstr( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, pat: *const ::std::os::raw::c_char, n: ::std::os::raw::c_int, _prep: *mut *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn kmemmem( _str: *const ::std::os::raw::c_void, n: ::std::os::raw::c_int, @@ -12906,9 +7751,9 @@ extern "C" { _prep: *mut *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn kstrtok( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, sep: *const ::std::os::raw::c_char, aux: *mut ks_tokaux_t, ) -> *mut ::std::os::raw::c_char; @@ -12920,7 +7765,7 @@ pub type kgets_func = ::std::option::Option< arg3: *mut ::std::os::raw::c_void, ) -> *mut ::std::os::raw::c_char, >; -extern "C" { +unsafe extern "C" { pub fn kgetline( s: *mut kstring_t, fgets_fn: kgets_func, @@ -12930,11 +7775,11 @@ extern "C" { pub type kgets_func2 = ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::std::os::raw::c_char, - arg2: size_t, + arg2: usize, arg3: *mut ::std::os::raw::c_void, - ) -> ssize_t, + ) -> isize, >; -extern "C" { +unsafe extern "C" { pub fn kgetline2( s: *mut kstring_t, fgets_fn: kgets_func2, @@ -12948,29 +7793,24 @@ pub struct cram_fd { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct hFILE { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct hts_tpool { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn hts_resize_array_( - arg1: size_t, - arg2: size_t, - arg3: size_t, + arg1: usize, + arg2: usize, + arg3: usize, arg4: *mut ::std::os::raw::c_void, arg5: *mut *mut ::std::os::raw::c_void, arg6: ::std::os::raw::c_int, arg7: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_lib_shutdown(); } -extern "C" { +unsafe extern "C" { pub fn hts_free(ptr: *mut ::std::os::raw::c_void); } pub const htsFormatCategory_unknown_category: htsFormatCategory = 0; @@ -12979,7 +7819,7 @@ pub const htsFormatCategory_variant_data: htsFormatCategory = 2; pub const htsFormatCategory_index_file: htsFormatCategory = 3; pub const htsFormatCategory_region_list: htsFormatCategory = 4; pub const htsFormatCategory_category_maximum: htsFormatCategory = 32767; -pub type htsFormatCategory = u32; +pub type htsFormatCategory = ::std::os::raw::c_uint; pub const htsExactFormat_unknown_format: htsExactFormat = 0; pub const htsExactFormat_binary_format: htsExactFormat = 1; pub const htsExactFormat_text_format: htsExactFormat = 2; @@ -13002,15 +7842,19 @@ pub const htsExactFormat_fastq_format: htsExactFormat = 17; pub const htsExactFormat_fai_format: htsExactFormat = 18; pub const htsExactFormat_fqi_format: htsExactFormat = 19; pub const htsExactFormat_hts_crypt4gh_format: htsExactFormat = 20; +pub const htsExactFormat_d4_format: htsExactFormat = 21; pub const htsExactFormat_format_maximum: htsExactFormat = 32767; -pub type htsExactFormat = u32; +pub type htsExactFormat = ::std::os::raw::c_uint; pub const htsCompression_no_compression: htsCompression = 0; pub const htsCompression_gzip: htsCompression = 1; pub const htsCompression_bgzf: htsCompression = 2; pub const htsCompression_custom: htsCompression = 3; pub const htsCompression_bzip2_compression: htsCompression = 4; +pub const htsCompression_razf_compression: htsCompression = 5; +pub const htsCompression_xz_compression: htsCompression = 6; +pub const htsCompression_zstd_compression: htsCompression = 7; pub const htsCompression_compression_maximum: htsCompression = 32767; -pub type htsCompression = u32; +pub type htsCompression = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct htsFormat { @@ -13027,121 +7871,44 @@ pub struct htsFormat__bindgen_ty_1 { pub major: ::std::os::raw::c_short, pub minor: ::std::os::raw::c_short, } -#[test] -fn bindgen_test_layout_htsFormat__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(minor) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFormat() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(htsFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFormat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).category as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(category) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression_level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression_level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).specific as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(specific) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFormat__bindgen_ty_1"][::std::mem::size_of::() - 4usize]; + ["Alignment of htsFormat__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: htsFormat__bindgen_ty_1::major"] + [::std::mem::offset_of!(htsFormat__bindgen_ty_1, major) - 0usize]; + ["Offset of field: htsFormat__bindgen_ty_1::minor"] + [::std::mem::offset_of!(htsFormat__bindgen_ty_1, minor) - 2usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFormat"][::std::mem::size_of::() - 32usize]; + ["Alignment of htsFormat"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFormat::category"][::std::mem::offset_of!(htsFormat, category) - 0usize]; + ["Offset of field: htsFormat::format"][::std::mem::offset_of!(htsFormat, format) - 4usize]; + ["Offset of field: htsFormat::version"][::std::mem::offset_of!(htsFormat, version) - 8usize]; + ["Offset of field: htsFormat::compression"] + [::std::mem::offset_of!(htsFormat, compression) - 12usize]; + ["Offset of field: htsFormat::compression_level"] + [::std::mem::offset_of!(htsFormat, compression_level) - 16usize]; + ["Offset of field: htsFormat::specific"][::std::mem::offset_of!(htsFormat, specific) - 24usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_idx_t { _unused: [u8; 0], } #[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_filter_t { + _unused: [u8; 0], +} +#[repr(C)] #[derive(Copy, Clone)] pub struct htsFile { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub lineno: i64, pub line: kstring_t, pub fn_: *mut ::std::os::raw::c_char, @@ -13152,6 +7919,7 @@ pub struct htsFile { pub idx: *mut hts_idx_t, pub fnidx: *const ::std::os::raw::c_char, pub bam_header: *mut sam_hdr_t, + pub filter: *mut hts_filter_t, } #[repr(C)] #[derive(Copy, Clone)] @@ -13159,164 +7927,36 @@ pub union htsFile__bindgen_ty_1 { pub bgzf: *mut BGZF, pub cram: *mut cram_fd, pub hfile: *mut hFILE, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_htsFile__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bgzf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(bgzf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cram as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(cram) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfile as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(hfile) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFile() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(htsFile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lineno as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(lineno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_aux as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_aux) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fnidx as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fnidx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bam_header as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(bam_header) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFile__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of htsFile__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFile__bindgen_ty_1::bgzf"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, bgzf) - 0usize]; + ["Offset of field: htsFile__bindgen_ty_1::cram"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, cram) - 0usize]; + ["Offset of field: htsFile__bindgen_ty_1::hfile"] + [::std::mem::offset_of!(htsFile__bindgen_ty_1, hfile) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsFile"][::std::mem::size_of::() - 136usize]; + ["Alignment of htsFile"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsFile::lineno"][::std::mem::offset_of!(htsFile, lineno) - 8usize]; + ["Offset of field: htsFile::line"][::std::mem::offset_of!(htsFile, line) - 16usize]; + ["Offset of field: htsFile::fn_"][::std::mem::offset_of!(htsFile, fn_) - 40usize]; + ["Offset of field: htsFile::fn_aux"][::std::mem::offset_of!(htsFile, fn_aux) - 48usize]; + ["Offset of field: htsFile::fp"][::std::mem::offset_of!(htsFile, fp) - 56usize]; + ["Offset of field: htsFile::state"][::std::mem::offset_of!(htsFile, state) - 64usize]; + ["Offset of field: htsFile::format"][::std::mem::offset_of!(htsFile, format) - 72usize]; + ["Offset of field: htsFile::idx"][::std::mem::offset_of!(htsFile, idx) - 104usize]; + ["Offset of field: htsFile::fnidx"][::std::mem::offset_of!(htsFile, fnidx) - 112usize]; + ["Offset of field: htsFile::bam_header"] + [::std::mem::offset_of!(htsFile, bam_header) - 120usize]; + ["Offset of field: htsFile::filter"][::std::mem::offset_of!(htsFile, filter) - 128usize]; +}; impl htsFile { #[inline] pub fn is_bin(&self) -> u32 { @@ -13330,6 +7970,28 @@ impl htsFile { } } #[inline] + pub unsafe fn is_bin_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_bin_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_write(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -13341,6 +8003,28 @@ impl htsFile { } } #[inline] + pub unsafe fn is_write_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_write_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_be(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -13352,6 +8036,28 @@ impl htsFile { } } #[inline] + pub unsafe fn is_be_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_be_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_cram(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -13363,6 +8069,28 @@ impl htsFile { } } #[inline] + pub unsafe fn is_cram_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_cram_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_bgzf(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -13374,6 +8102,28 @@ impl htsFile { } } #[inline] + pub unsafe fn is_bgzf_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_bgzf_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn dummy(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -13385,6 +8135,28 @@ impl htsFile { } } #[inline] + pub unsafe fn dummy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dummy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( is_bin: u32, is_write: u32, @@ -13392,9 +8164,8 @@ impl htsFile { is_cram: u32, is_bgzf: u32, dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let is_bin: u32 = unsafe { ::std::mem::transmute(is_bin) }; is_bin as u64 @@ -13428,39 +8199,14 @@ pub struct htsThreadPool { pub pool: *mut hts_tpool, pub qsize: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_htsThreadPool() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(htsThreadPool)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsThreadPool)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pool as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(pool) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qsize as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(qsize) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of htsThreadPool"][::std::mem::size_of::() - 16usize]; + ["Alignment of htsThreadPool"][::std::mem::align_of::() - 8usize]; + ["Offset of field: htsThreadPool::pool"][::std::mem::offset_of!(htsThreadPool, pool) - 0usize]; + ["Offset of field: htsThreadPool::qsize"] + [::std::mem::offset_of!(htsThreadPool, qsize) - 8usize]; +}; pub const sam_fields_SAM_QNAME: sam_fields = 1; pub const sam_fields_SAM_FLAG: sam_fields = 2; pub const sam_fields_SAM_RNAME: sam_fields = 4; @@ -13474,7 +8220,7 @@ pub const sam_fields_SAM_SEQ: sam_fields = 512; pub const sam_fields_SAM_QUAL: sam_fields = 1024; pub const sam_fields_SAM_AUX: sam_fields = 2048; pub const sam_fields_SAM_RGAUX: sam_fields = 4096; -pub type sam_fields = u32; +pub type sam_fields = ::std::os::raw::c_uint; pub const hts_fmt_option_CRAM_OPT_DECODE_MD: hts_fmt_option = 0; pub const hts_fmt_option_CRAM_OPT_PREFIX: hts_fmt_option = 1; pub const hts_fmt_option_CRAM_OPT_VERBOSITY: hts_fmt_option = 2; @@ -13499,12 +8245,28 @@ pub const hts_fmt_option_CRAM_OPT_BASES_PER_SLICE: hts_fmt_option = 20; pub const hts_fmt_option_CRAM_OPT_STORE_MD: hts_fmt_option = 21; pub const hts_fmt_option_CRAM_OPT_STORE_NM: hts_fmt_option = 22; pub const hts_fmt_option_CRAM_OPT_RANGE_NOSEEK: hts_fmt_option = 23; +pub const hts_fmt_option_CRAM_OPT_USE_TOK: hts_fmt_option = 24; +pub const hts_fmt_option_CRAM_OPT_USE_FQZ: hts_fmt_option = 25; +pub const hts_fmt_option_CRAM_OPT_USE_ARITH: hts_fmt_option = 26; +pub const hts_fmt_option_CRAM_OPT_POS_DELTA: hts_fmt_option = 27; pub const hts_fmt_option_HTS_OPT_COMPRESSION_LEVEL: hts_fmt_option = 100; pub const hts_fmt_option_HTS_OPT_NTHREADS: hts_fmt_option = 101; pub const hts_fmt_option_HTS_OPT_THREAD_POOL: hts_fmt_option = 102; pub const hts_fmt_option_HTS_OPT_CACHE_SIZE: hts_fmt_option = 103; pub const hts_fmt_option_HTS_OPT_BLOCK_SIZE: hts_fmt_option = 104; -pub type hts_fmt_option = u32; +pub const hts_fmt_option_HTS_OPT_FILTER: hts_fmt_option = 105; +pub const hts_fmt_option_HTS_OPT_PROFILE: hts_fmt_option = 106; +pub const hts_fmt_option_FASTQ_OPT_CASAVA: hts_fmt_option = 1000; +pub const hts_fmt_option_FASTQ_OPT_AUX: hts_fmt_option = 1001; +pub const hts_fmt_option_FASTQ_OPT_RNUM: hts_fmt_option = 1002; +pub const hts_fmt_option_FASTQ_OPT_BARCODE: hts_fmt_option = 1003; +pub const hts_fmt_option_FASTQ_OPT_NAME2: hts_fmt_option = 1004; +pub type hts_fmt_option = ::std::os::raw::c_uint; +pub const hts_profile_option_HTS_PROFILE_FAST: hts_profile_option = 0; +pub const hts_profile_option_HTS_PROFILE_NORMAL: hts_profile_option = 1; +pub const hts_profile_option_HTS_PROFILE_SMALL: hts_profile_option = 2; +pub const hts_profile_option_HTS_PROFILE_ARCHIVE: hts_profile_option = 3; +pub type hts_profile_option = ::std::os::raw::c_uint; #[repr(C)] #[derive(Copy, Clone)] pub struct hts_opt { @@ -13518,204 +8280,161 @@ pub struct hts_opt { pub union hts_opt__bindgen_ty_1 { pub i: ::std::os::raw::c_int, pub s: *mut ::std::os::raw::c_char, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_hts_opt__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(s) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_opt() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hts_opt)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(arg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).opt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(opt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(val) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(next) - ) - ); } -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_opt__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of hts_opt__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_opt__bindgen_ty_1::i"] + [::std::mem::offset_of!(hts_opt__bindgen_ty_1, i) - 0usize]; + ["Offset of field: hts_opt__bindgen_ty_1::s"] + [::std::mem::offset_of!(hts_opt__bindgen_ty_1, s) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_opt"][::std::mem::size_of::() - 32usize]; + ["Alignment of hts_opt"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_opt::arg"][::std::mem::offset_of!(hts_opt, arg) - 0usize]; + ["Offset of field: hts_opt::opt"][::std::mem::offset_of!(hts_opt, opt) - 8usize]; + ["Offset of field: hts_opt::val"][::std::mem::offset_of!(hts_opt, val) - 16usize]; + ["Offset of field: hts_opt::next"][::std::mem::offset_of!(hts_opt, next) - 24usize]; +}; +unsafe extern "C" { pub fn hts_opt_add( opts: *mut *mut hts_opt, c_arg: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_opt_apply(fp: *mut htsFile, opts: *mut hts_opt) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_opt_free(opts: *mut hts_opt); } -extern "C" { +unsafe extern "C" { pub fn hts_parse_format( opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_parse_opt_list( opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub static seq_nt16_table: [::std::os::raw::c_uchar; 256usize]; } -extern "C" { - pub static mut seq_nt16_str: [::std::os::raw::c_char; 0usize]; +unsafe extern "C" { + pub static seq_nt16_str: [::std::os::raw::c_char; 0usize]; } -extern "C" { - pub static mut seq_nt16_int: [::std::os::raw::c_int; 0usize]; +unsafe extern "C" { + pub static seq_nt16_int: [::std::os::raw::c_int; 0usize]; } -extern "C" { +unsafe extern "C" { pub fn hts_version() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn hts_features() -> ::std::os::raw::c_uint; +} +unsafe extern "C" { + pub fn hts_test_feature(id: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hts_feature_string() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { pub fn hts_detect_format(fp: *mut hFILE, fmt: *mut htsFormat) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn hts_detect_format2( + fp: *mut hFILE, + fname: *const ::std::os::raw::c_char, + fmt: *mut htsFormat, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn hts_format_description(format: *const htsFormat) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_open( fn_: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut htsFile; } -extern "C" { +unsafe extern "C" { pub fn hts_open_format( fn_: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, fmt: *const htsFormat, ) -> *mut htsFile; } -extern "C" { +unsafe extern "C" { pub fn hts_hopen( fp: *mut hFILE, fn_: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut htsFile; } -extern "C" { +unsafe extern "C" { + pub fn hts_flush(fp: *mut htsFile) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn hts_close(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_get_format(fp: *mut htsFile) -> *const htsFormat; } -extern "C" { +unsafe extern "C" { pub fn hts_format_file_extension(format: *const htsFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_set_opt(fp: *mut htsFile, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_getline( fp: *mut htsFile, delimiter: ::std::os::raw::c_int, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_readlines( fn_: *const ::std::os::raw::c_char, _n: *mut ::std::os::raw::c_int, ) -> *mut *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_readlist( fn_: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, _n: *mut ::std::os::raw::c_int, ) -> *mut *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_set_threads(fp: *mut htsFile, n: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_set_thread_pool(fp: *mut htsFile, p: *mut htsThreadPool) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_set_cache_size(fp: *mut htsFile, n: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn hts_set_fai_filename( fp: *mut htsFile, fn_aux: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn hts_set_filter_expression( + fp: *mut htsFile, + expr: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn hts_check_EOF(fp: *mut htsFile) -> ::std::os::raw::c_int; } pub type hts_pos_t = i64; @@ -13725,39 +8444,13 @@ pub struct hts_pair_pos_t { pub beg: hts_pos_t, pub end: hts_pos_t, } -#[test] -fn bindgen_test_layout_hts_pair_pos_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(end) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair_pos_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_pair_pos_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair_pos_t::beg"][::std::mem::offset_of!(hts_pair_pos_t, beg) - 0usize]; + ["Offset of field: hts_pair_pos_t::end"][::std::mem::offset_of!(hts_pair_pos_t, end) - 8usize]; +}; pub type hts_pair32_t = hts_pair_pos_t; #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -13765,39 +8458,13 @@ pub struct hts_pair64_t { pub u: u64, pub v: u64, } -#[test] -fn bindgen_test_layout_hts_pair64_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(v) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair64_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_pair64_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair64_t::u"][::std::mem::offset_of!(hts_pair64_t, u) - 0usize]; + ["Offset of field: hts_pair64_t::v"][::std::mem::offset_of!(hts_pair64_t, v) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_pair64_max_t { @@ -13805,49 +8472,15 @@ pub struct hts_pair64_max_t { pub v: u64, pub max: u64, } -#[test] -fn bindgen_test_layout_hts_pair64_max_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(v) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(max) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_pair64_max_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of hts_pair64_max_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_pair64_max_t::u"][::std::mem::offset_of!(hts_pair64_max_t, u) - 0usize]; + ["Offset of field: hts_pair64_max_t::v"][::std::mem::offset_of!(hts_pair64_max_t, v) - 8usize]; + ["Offset of field: hts_pair64_max_t::max"] + [::std::mem::offset_of!(hts_pair64_max_t, max) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_reglist_t { @@ -13858,79 +8491,21 @@ pub struct hts_reglist_t { pub min_beg: hts_pos_t, pub max_end: hts_pos_t, } -#[test] -fn bindgen_test_layout_hts_reglist_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(hts_reglist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_reglist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).intervals as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(intervals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(min_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(max_end) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_reglist_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of hts_reglist_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_reglist_t::reg"][::std::mem::offset_of!(hts_reglist_t, reg) - 0usize]; + ["Offset of field: hts_reglist_t::intervals"] + [::std::mem::offset_of!(hts_reglist_t, intervals) - 8usize]; + ["Offset of field: hts_reglist_t::tid"][::std::mem::offset_of!(hts_reglist_t, tid) - 16usize]; + ["Offset of field: hts_reglist_t::count"] + [::std::mem::offset_of!(hts_reglist_t, count) - 20usize]; + ["Offset of field: hts_reglist_t::min_beg"] + [::std::mem::offset_of!(hts_reglist_t, min_beg) - 24usize]; + ["Offset of field: hts_reglist_t::max_end"] + [::std::mem::offset_of!(hts_reglist_t, max_end) - 32usize]; +}; pub type hts_readrec_func = ::std::option::Option< unsafe extern "C" fn( fp: *mut BGZF, @@ -13953,7 +8528,8 @@ pub type hts_tell_func = #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_itr_t { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub tid: ::std::os::raw::c_int, pub n_off: ::std::os::raw::c_int, pub i: ::std::os::raw::c_int, @@ -13981,252 +8557,44 @@ pub struct hts_itr_t__bindgen_ty_1 { pub m: ::std::os::raw::c_int, pub a: *mut ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_hts_itr_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(a) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_itr_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(hts_itr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_reg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg_list as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(reg_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_tid as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_reg as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_intv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_intv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_beg as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_end as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_off as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nocoor_off as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(nocoor_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).off as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readrec as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(readrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tell as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tell) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(bins) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_itr_t__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_itr_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::n"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, n) - 0usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::m"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, m) - 4usize]; + ["Offset of field: hts_itr_t__bindgen_ty_1::a"] + [::std::mem::offset_of!(hts_itr_t__bindgen_ty_1, a) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_itr_t"][::std::mem::size_of::() - 144usize]; + ["Alignment of hts_itr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hts_itr_t::tid"][::std::mem::offset_of!(hts_itr_t, tid) - 4usize]; + ["Offset of field: hts_itr_t::n_off"][::std::mem::offset_of!(hts_itr_t, n_off) - 8usize]; + ["Offset of field: hts_itr_t::i"][::std::mem::offset_of!(hts_itr_t, i) - 12usize]; + ["Offset of field: hts_itr_t::n_reg"][::std::mem::offset_of!(hts_itr_t, n_reg) - 16usize]; + ["Offset of field: hts_itr_t::beg"][::std::mem::offset_of!(hts_itr_t, beg) - 24usize]; + ["Offset of field: hts_itr_t::end"][::std::mem::offset_of!(hts_itr_t, end) - 32usize]; + ["Offset of field: hts_itr_t::reg_list"][::std::mem::offset_of!(hts_itr_t, reg_list) - 40usize]; + ["Offset of field: hts_itr_t::curr_tid"][::std::mem::offset_of!(hts_itr_t, curr_tid) - 48usize]; + ["Offset of field: hts_itr_t::curr_reg"][::std::mem::offset_of!(hts_itr_t, curr_reg) - 52usize]; + ["Offset of field: hts_itr_t::curr_intv"] + [::std::mem::offset_of!(hts_itr_t, curr_intv) - 56usize]; + ["Offset of field: hts_itr_t::curr_beg"][::std::mem::offset_of!(hts_itr_t, curr_beg) - 64usize]; + ["Offset of field: hts_itr_t::curr_end"][::std::mem::offset_of!(hts_itr_t, curr_end) - 72usize]; + ["Offset of field: hts_itr_t::curr_off"][::std::mem::offset_of!(hts_itr_t, curr_off) - 80usize]; + ["Offset of field: hts_itr_t::nocoor_off"] + [::std::mem::offset_of!(hts_itr_t, nocoor_off) - 88usize]; + ["Offset of field: hts_itr_t::off"][::std::mem::offset_of!(hts_itr_t, off) - 96usize]; + ["Offset of field: hts_itr_t::readrec"][::std::mem::offset_of!(hts_itr_t, readrec) - 104usize]; + ["Offset of field: hts_itr_t::seek"][::std::mem::offset_of!(hts_itr_t, seek) - 112usize]; + ["Offset of field: hts_itr_t::tell"][::std::mem::offset_of!(hts_itr_t, tell) - 120usize]; + ["Offset of field: hts_itr_t::bins"][::std::mem::offset_of!(hts_itr_t, bins) - 128usize]; +}; impl hts_itr_t { #[inline] pub fn read_rest(&self) -> u32 { @@ -14240,6 +8608,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn read_rest_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_read_rest_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn finished(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -14251,6 +8641,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn finished_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_finished_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_cram(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -14262,6 +8674,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn is_cram_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_cram_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn nocoor(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -14273,6 +8707,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn nocoor_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_nocoor_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn multi(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } @@ -14284,6 +8740,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn multi_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_multi_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn dummy(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -14295,6 +8773,28 @@ impl hts_itr_t { } } #[inline] + pub unsafe fn dummy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_dummy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( read_rest: u32, finished: u32, @@ -14302,9 +8802,8 @@ impl hts_itr_t { nocoor: u32, multi: u32, dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let read_rest: u32 = unsafe { ::std::mem::transmute(read_rest) }; read_rest as u64 @@ -14333,7 +8832,7 @@ impl hts_itr_t { } } pub type hts_itr_multi_t = hts_itr_t; -extern "C" { +unsafe extern "C" { pub fn hts_idx_init( n: ::std::os::raw::c_int, fmt: ::std::os::raw::c_int, @@ -14342,10 +8841,10 @@ extern "C" { n_lvls: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_destroy(idx: *mut hts_idx_t); } -extern "C" { +unsafe extern "C" { pub fn hts_idx_push( idx: *mut hts_idx_t, tid: ::std::os::raw::c_int, @@ -14355,27 +8854,27 @@ extern "C" { is_mapped: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_finish(idx: *mut hts_idx_t, final_offset: u64) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_fmt(idx: *mut hts_idx_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_tbi_name( idx: *mut hts_idx_t, tid: ::std::os::raw::c_int, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_save( idx: *const hts_idx_t, fn_: *const ::std::os::raw::c_char, fmt: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_save_as( idx: *const hts_idx_t, fn_: *const ::std::os::raw::c_char, @@ -14383,19 +8882,19 @@ extern "C" { fmt: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_load( fn_: *const ::std::os::raw::c_char, fmt: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_load2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_load3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -14403,10 +8902,16 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +pub type hts_id2name_f = ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: ::std::os::raw::c_int, + ) -> *const ::std::os::raw::c_char, +>; +unsafe extern "C" { pub fn hts_idx_get_meta(idx: *mut hts_idx_t, l_meta: *mut u32) -> *mut u8; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_set_meta( idx: *mut hts_idx_t, l_meta: u32, @@ -14414,7 +8919,7 @@ extern "C" { is_copy: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_get_stat( idx: *const hts_idx_t, tid: ::std::os::raw::c_int, @@ -14422,12 +8927,23 @@ extern "C" { unmapped: *mut u64, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_idx_get_n_no_coor(idx: *const hts_idx_t) -> u64; } -extern "C" { +unsafe extern "C" { + pub fn hts_idx_seqnames( + idx: *const hts_idx_t, + n: *mut ::std::os::raw::c_int, + getid: hts_id2name_f, + hdr: *mut ::std::os::raw::c_void, + ) -> *mut *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hts_idx_nseq(idx: *const hts_idx_t) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn hts_parse_decimal( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, strend: *mut *mut ::std::os::raw::c_char, flags: ::std::os::raw::c_int, ) -> ::std::os::raw::c_longlong; @@ -14438,27 +8954,21 @@ pub type hts_name2id_f = ::std::option::Option< arg2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int, >; -pub type hts_id2name_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char, ->; -extern "C" { +unsafe extern "C" { pub fn hts_parse_reg64( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, beg: *mut hts_pos_t, end: *mut hts_pos_t, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_parse_reg( - str: *const ::std::os::raw::c_char, + str_: *const ::std::os::raw::c_char, beg: *mut ::std::os::raw::c_int, end: *mut ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_parse_region( s: *const ::std::os::raw::c_char, tid: *mut ::std::os::raw::c_int, @@ -14469,7 +8979,7 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_query( idx: *const hts_idx_t, tid: ::std::os::raw::c_int, @@ -14478,7 +8988,7 @@ extern "C" { readrec: hts_readrec_func, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_destroy(iter: *mut hts_itr_t); } pub type hts_itr_query_func = ::std::option::Option< @@ -14490,7 +9000,7 @@ pub type hts_itr_query_func = ::std::option::Option< readrec: hts_readrec_func, ) -> *mut hts_itr_t, >; -extern "C" { +unsafe extern "C" { pub fn hts_itr_querys( idx: *const hts_idx_t, reg: *const ::std::os::raw::c_char, @@ -14500,7 +9010,7 @@ extern "C" { readrec: hts_readrec_func, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_next( fp: *mut BGZF, iter: *mut hts_itr_t, @@ -14508,25 +9018,17 @@ extern "C" { data: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { - pub fn hts_idx_seqnames( - idx: *const hts_idx_t, - n: *mut ::std::os::raw::c_int, - getid: hts_id2name_f, - hdr: *mut ::std::os::raw::c_void, - ) -> *mut *const ::std::os::raw::c_char; -} pub type hts_itr_multi_query_func = ::std::option::Option< unsafe extern "C" fn(idx: *const hts_idx_t, itr: *mut hts_itr_t) -> ::std::os::raw::c_int, >; -extern "C" { +unsafe extern "C" { pub fn hts_itr_multi_bam(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_multi_cram(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_regions( idx: *const hts_idx_t, reglist: *mut hts_reglist_t, @@ -14539,14 +9041,14 @@ extern "C" { tell: hts_tell_func, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn hts_itr_multi_next( fd: *mut htsFile, iter: *mut hts_itr_t, r: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_reglist_create( argv: *mut *mut ::std::os::raw::c_char, argc: ::std::os::raw::c_int, @@ -14555,10 +9057,10 @@ extern "C" { getid: hts_name2id_f, ) -> *mut hts_reglist_t; } -extern "C" { +unsafe extern "C" { pub fn hts_reglist_free(reglist: *mut hts_reglist_t, count: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn hts_file_type(fname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } #[repr(C)] @@ -14566,13 +9068,13 @@ extern "C" { pub struct errmod_t { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn errmod_init(depcorr: f64) -> *mut errmod_t; } -extern "C" { +unsafe extern "C" { pub fn errmod_destroy(em: *mut errmod_t); } -extern "C" { +unsafe extern "C" { pub fn errmod_cal( em: *const errmod_t, n: ::std::os::raw::c_int, @@ -14588,50 +9090,15 @@ pub struct probaln_par_t { pub e: f32, pub bw: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_probaln_par_t() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(probaln_par_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(probaln_par_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(e) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bw as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(bw) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of probaln_par_t"][::std::mem::size_of::() - 12usize]; + ["Alignment of probaln_par_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: probaln_par_t::d"][::std::mem::offset_of!(probaln_par_t, d) - 0usize]; + ["Offset of field: probaln_par_t::e"][::std::mem::offset_of!(probaln_par_t, e) - 4usize]; + ["Offset of field: probaln_par_t::bw"][::std::mem::offset_of!(probaln_par_t, bw) - 8usize]; +}; +unsafe extern "C" { pub fn probaln_glocal( ref_: *const u8, l_ref: ::std::os::raw::c_int, @@ -14648,38 +9115,38 @@ extern "C" { pub struct hts_md5_context { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn hts_md5_init() -> *mut hts_md5_context; } -extern "C" { +unsafe extern "C" { pub fn hts_md5_update( ctx: *mut hts_md5_context, data: *const ::std::os::raw::c_void, size: ::std::os::raw::c_ulong, ); } -extern "C" { +unsafe extern "C" { pub fn hts_md5_final(digest: *mut ::std::os::raw::c_uchar, ctx: *mut hts_md5_context); } -extern "C" { +unsafe extern "C" { pub fn hts_md5_reset(ctx: *mut hts_md5_context); } -extern "C" { +unsafe extern "C" { pub fn hts_md5_hex(hex: *mut ::std::os::raw::c_char, digest: *const ::std::os::raw::c_uchar); } -extern "C" { +unsafe extern "C" { pub fn hts_md5_destroy(ctx: *mut hts_md5_context); } pub type uint16_u = u16; pub type uint32_u = u32; pub type uint64_u = u64; -extern "C" { +unsafe extern "C" { pub fn __assert_rtn( arg1: *const ::std::os::raw::c_char, arg2: *const ::std::os::raw::c_char, arg3: ::std::os::raw::c_int, arg4: *const ::std::os::raw::c_char, - ); + ) -> !; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -14691,79 +9158,17 @@ pub struct bcf_hrec_t { pub keys: *mut *mut ::std::os::raw::c_char, pub vals: *mut *mut ::std::os::raw::c_char, } -#[test] -fn bindgen_test_layout_bcf_hrec_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nkeys as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(nkeys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keys as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(keys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vals as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(vals) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_hrec_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of bcf_hrec_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_hrec_t::type_"][::std::mem::offset_of!(bcf_hrec_t, type_) - 0usize]; + ["Offset of field: bcf_hrec_t::key"][::std::mem::offset_of!(bcf_hrec_t, key) - 8usize]; + ["Offset of field: bcf_hrec_t::value"][::std::mem::offset_of!(bcf_hrec_t, value) - 16usize]; + ["Offset of field: bcf_hrec_t::nkeys"][::std::mem::offset_of!(bcf_hrec_t, nkeys) - 24usize]; + ["Offset of field: bcf_hrec_t::keys"][::std::mem::offset_of!(bcf_hrec_t, keys) - 32usize]; + ["Offset of field: bcf_hrec_t::vals"][::std::mem::offset_of!(bcf_hrec_t, vals) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_idinfo_t { @@ -14771,88 +9176,27 @@ pub struct bcf_idinfo_t { pub hrec: [*mut bcf_hrec_t; 3usize], pub id: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_idinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(id) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_idinfo_t"][::std::mem::size_of::() - 56usize]; + ["Alignment of bcf_idinfo_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_idinfo_t::info"][::std::mem::offset_of!(bcf_idinfo_t, info) - 0usize]; + ["Offset of field: bcf_idinfo_t::hrec"][::std::mem::offset_of!(bcf_idinfo_t, hrec) - 24usize]; + ["Offset of field: bcf_idinfo_t::id"][::std::mem::offset_of!(bcf_idinfo_t, id) - 48usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_idpair_t { pub key: *const ::std::os::raw::c_char, pub val: *const bcf_idinfo_t, } -#[test] -fn bindgen_test_layout_bcf_idpair_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(val) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_idpair_t"][::std::mem::size_of::() - 16usize]; + ["Alignment of bcf_idpair_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_idpair_t::key"][::std::mem::offset_of!(bcf_idpair_t, key) - 0usize]; + ["Offset of field: bcf_idpair_t::val"][::std::mem::offset_of!(bcf_idpair_t, val) - 8usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_hdr_t { @@ -14870,150 +9214,27 @@ pub struct bcf_hdr_t { pub mem: kstring_t, pub m: [i32; 3usize], } -#[test] -fn bindgen_test_layout_bcf_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nhrec as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nhrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dirty as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ntransl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(ntransl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).transl as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(transl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nsamples_ori as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nsamples_ori) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keep_samples as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(keep_samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(m) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_hdr_t"][::std::mem::size_of::() - 168usize]; + ["Alignment of bcf_hdr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_hdr_t::n"][::std::mem::offset_of!(bcf_hdr_t, n) - 0usize]; + ["Offset of field: bcf_hdr_t::id"][::std::mem::offset_of!(bcf_hdr_t, id) - 16usize]; + ["Offset of field: bcf_hdr_t::dict"][::std::mem::offset_of!(bcf_hdr_t, dict) - 40usize]; + ["Offset of field: bcf_hdr_t::samples"][::std::mem::offset_of!(bcf_hdr_t, samples) - 64usize]; + ["Offset of field: bcf_hdr_t::hrec"][::std::mem::offset_of!(bcf_hdr_t, hrec) - 72usize]; + ["Offset of field: bcf_hdr_t::nhrec"][::std::mem::offset_of!(bcf_hdr_t, nhrec) - 80usize]; + ["Offset of field: bcf_hdr_t::dirty"][::std::mem::offset_of!(bcf_hdr_t, dirty) - 84usize]; + ["Offset of field: bcf_hdr_t::ntransl"][::std::mem::offset_of!(bcf_hdr_t, ntransl) - 88usize]; + ["Offset of field: bcf_hdr_t::transl"][::std::mem::offset_of!(bcf_hdr_t, transl) - 96usize]; + ["Offset of field: bcf_hdr_t::nsamples_ori"] + [::std::mem::offset_of!(bcf_hdr_t, nsamples_ori) - 112usize]; + ["Offset of field: bcf_hdr_t::keep_samples"] + [::std::mem::offset_of!(bcf_hdr_t, keep_samples) - 120usize]; + ["Offset of field: bcf_hdr_t::mem"][::std::mem::offset_of!(bcf_hdr_t, mem) - 128usize]; + ["Offset of field: bcf_hdr_t::m"][::std::mem::offset_of!(bcf_hdr_t, m) - 152usize]; +}; +unsafe extern "C" { pub static mut bcf_type_shift: [u8; 0usize]; } #[repr(C)] @@ -15022,39 +9243,14 @@ pub struct bcf_variant_t { pub type_: ::std::os::raw::c_int, pub n: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_variant_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_variant_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(bcf_variant_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_variant_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_variant_t), - "::", - stringify!(n) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_variant_t"][::std::mem::size_of::() - 8usize]; + ["Alignment of bcf_variant_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: bcf_variant_t::type_"] + [::std::mem::offset_of!(bcf_variant_t, type_) - 0usize]; + ["Offset of field: bcf_variant_t::n"][::std::mem::offset_of!(bcf_variant_t, n) - 4usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_fmt_t { @@ -15064,81 +9260,20 @@ pub struct bcf_fmt_t { pub type_: ::std::os::raw::c_int, pub p: *mut u8, pub p_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, -} -#[test] -fn bindgen_test_layout_bcf_fmt_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p_len) - ) - ); -} + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_fmt_t"][::std::mem::size_of::() - 32usize]; + ["Alignment of bcf_fmt_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_fmt_t::id"][::std::mem::offset_of!(bcf_fmt_t, id) - 0usize]; + ["Offset of field: bcf_fmt_t::n"][::std::mem::offset_of!(bcf_fmt_t, n) - 4usize]; + ["Offset of field: bcf_fmt_t::size"][::std::mem::offset_of!(bcf_fmt_t, size) - 8usize]; + ["Offset of field: bcf_fmt_t::type_"][::std::mem::offset_of!(bcf_fmt_t, type_) - 12usize]; + ["Offset of field: bcf_fmt_t::p"][::std::mem::offset_of!(bcf_fmt_t, p) - 16usize]; + ["Offset of field: bcf_fmt_t::p_len"][::std::mem::offset_of!(bcf_fmt_t, p_len) - 24usize]; +}; impl bcf_fmt_t { #[inline] pub fn p_off(&self) -> u32 { @@ -15152,6 +9287,28 @@ impl bcf_fmt_t { } } #[inline] + pub unsafe fn p_off_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_p_off_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 31u8, + val as u64, + ) + } + } + #[inline] pub fn p_free(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -15163,9 +9320,30 @@ impl bcf_fmt_t { } } #[inline] - pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + pub unsafe fn p_free_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_p_free_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 31u8, { let p_off: u32 = unsafe { ::std::mem::transmute(p_off) }; p_off as u64 @@ -15185,7 +9363,8 @@ pub struct bcf_info_t { pub v1: bcf_info_t__bindgen_ty_1, pub vptr: *mut u8, pub vptr_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub len: ::std::os::raw::c_int, } #[repr(C)] @@ -15193,114 +9372,30 @@ pub struct bcf_info_t { pub union bcf_info_t__bindgen_ty_1 { pub i: i64, pub f: f32, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bcf_info_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(f) - ) - ); -} -#[test] -fn bindgen_test_layout_bcf_info_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bcf_info_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(v1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).len as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(len) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_info_t__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of bcf_info_t__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_info_t__bindgen_ty_1::i"] + [::std::mem::offset_of!(bcf_info_t__bindgen_ty_1, i) - 0usize]; + ["Offset of field: bcf_info_t__bindgen_ty_1::f"] + [::std::mem::offset_of!(bcf_info_t__bindgen_ty_1, f) - 0usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_info_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of bcf_info_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_info_t::key"][::std::mem::offset_of!(bcf_info_t, key) - 0usize]; + ["Offset of field: bcf_info_t::type_"][::std::mem::offset_of!(bcf_info_t, type_) - 4usize]; + ["Offset of field: bcf_info_t::v1"][::std::mem::offset_of!(bcf_info_t, v1) - 8usize]; + ["Offset of field: bcf_info_t::vptr"][::std::mem::offset_of!(bcf_info_t, vptr) - 16usize]; + ["Offset of field: bcf_info_t::vptr_len"] + [::std::mem::offset_of!(bcf_info_t, vptr_len) - 24usize]; + ["Offset of field: bcf_info_t::len"][::std::mem::offset_of!(bcf_info_t, len) - 32usize]; +}; impl bcf_info_t { #[inline] pub fn vptr_off(&self) -> u32 { @@ -15314,6 +9409,28 @@ impl bcf_info_t { } } #[inline] + pub unsafe fn vptr_off_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 31u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vptr_off_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 31u8, + val as u64, + ) + } + } + #[inline] pub fn vptr_free(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -15325,12 +9442,30 @@ impl bcf_info_t { } } #[inline] - pub fn new_bitfield_1( - vptr_off: u32, - vptr_free: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + pub unsafe fn vptr_free_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_vptr_free_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(vptr_off: u32, vptr_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 31u8, { let vptr_off: u32 = unsafe { ::std::mem::transmute(vptr_off) }; vptr_off as u64 @@ -15364,198 +9499,37 @@ pub struct bcf_dec_t { pub shared_dirty: ::std::os::raw::c_int, pub indiv_dirty: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_dec_t() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(bcf_dec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_dec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_fmt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_info as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_als as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_allele as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_flt as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_flt as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flt as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allele as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_var as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var_type as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared_dirty as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(shared_dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv_dirty as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(indiv_dirty) - ) - ); +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_dec_t"][::std::mem::size_of::() - 104usize]; + ["Alignment of bcf_dec_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_dec_t::m_fmt"][::std::mem::offset_of!(bcf_dec_t, m_fmt) - 0usize]; + ["Offset of field: bcf_dec_t::m_info"][::std::mem::offset_of!(bcf_dec_t, m_info) - 4usize]; + ["Offset of field: bcf_dec_t::m_id"][::std::mem::offset_of!(bcf_dec_t, m_id) - 8usize]; + ["Offset of field: bcf_dec_t::m_als"][::std::mem::offset_of!(bcf_dec_t, m_als) - 12usize]; + ["Offset of field: bcf_dec_t::m_allele"][::std::mem::offset_of!(bcf_dec_t, m_allele) - 16usize]; + ["Offset of field: bcf_dec_t::m_flt"][::std::mem::offset_of!(bcf_dec_t, m_flt) - 20usize]; + ["Offset of field: bcf_dec_t::n_flt"][::std::mem::offset_of!(bcf_dec_t, n_flt) - 24usize]; + ["Offset of field: bcf_dec_t::flt"][::std::mem::offset_of!(bcf_dec_t, flt) - 32usize]; + ["Offset of field: bcf_dec_t::id"][::std::mem::offset_of!(bcf_dec_t, id) - 40usize]; + ["Offset of field: bcf_dec_t::als"][::std::mem::offset_of!(bcf_dec_t, als) - 48usize]; + ["Offset of field: bcf_dec_t::allele"][::std::mem::offset_of!(bcf_dec_t, allele) - 56usize]; + ["Offset of field: bcf_dec_t::info"][::std::mem::offset_of!(bcf_dec_t, info) - 64usize]; + ["Offset of field: bcf_dec_t::fmt"][::std::mem::offset_of!(bcf_dec_t, fmt) - 72usize]; + ["Offset of field: bcf_dec_t::var"][::std::mem::offset_of!(bcf_dec_t, var) - 80usize]; + ["Offset of field: bcf_dec_t::n_var"][::std::mem::offset_of!(bcf_dec_t, n_var) - 88usize]; + ["Offset of field: bcf_dec_t::var_type"][::std::mem::offset_of!(bcf_dec_t, var_type) - 92usize]; + ["Offset of field: bcf_dec_t::shared_dirty"] + [::std::mem::offset_of!(bcf_dec_t, shared_dirty) - 96usize]; + ["Offset of field: bcf_dec_t::indiv_dirty"] + [::std::mem::offset_of!(bcf_dec_t, indiv_dirty) - 100usize]; +}; +unsafe extern "C" { + pub fn bcf_strerror( + errorcode: ::std::os::raw::c_int, + buffer: *mut ::std::os::raw::c_char, + maxbuffer: usize, + ) -> *const ::std::os::raw::c_char; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -15564,7 +9538,8 @@ pub struct bcf1_t { pub rlen: hts_pos_t, pub rid: i32, pub qual: f32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, pub shared: kstring_t, pub indiv: kstring_t, pub d: bcf_dec_t, @@ -15573,124 +9548,23 @@ pub struct bcf1_t { pub unpack_size: [::std::os::raw::c_int; 3usize], pub errcode: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf1_t() { - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(bcf1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlen as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(shared) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(indiv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(bcf1_t), "::", stringify!(d)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpacked as *const _ as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpacked) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpack_size as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpack_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errcode as *const _ as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(errcode) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf1_t"][::std::mem::size_of::() - 208usize]; + ["Alignment of bcf1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf1_t::pos"][::std::mem::offset_of!(bcf1_t, pos) - 0usize]; + ["Offset of field: bcf1_t::rlen"][::std::mem::offset_of!(bcf1_t, rlen) - 8usize]; + ["Offset of field: bcf1_t::rid"][::std::mem::offset_of!(bcf1_t, rid) - 16usize]; + ["Offset of field: bcf1_t::qual"][::std::mem::offset_of!(bcf1_t, qual) - 20usize]; + ["Offset of field: bcf1_t::shared"][::std::mem::offset_of!(bcf1_t, shared) - 32usize]; + ["Offset of field: bcf1_t::indiv"][::std::mem::offset_of!(bcf1_t, indiv) - 56usize]; + ["Offset of field: bcf1_t::d"][::std::mem::offset_of!(bcf1_t, d) - 80usize]; + ["Offset of field: bcf1_t::max_unpack"][::std::mem::offset_of!(bcf1_t, max_unpack) - 184usize]; + ["Offset of field: bcf1_t::unpacked"][::std::mem::offset_of!(bcf1_t, unpacked) - 188usize]; + ["Offset of field: bcf1_t::unpack_size"] + [::std::mem::offset_of!(bcf1_t, unpack_size) - 192usize]; + ["Offset of field: bcf1_t::errcode"][::std::mem::offset_of!(bcf1_t, errcode) - 204usize]; +}; impl bcf1_t { #[inline] pub fn n_info(&self) -> u32 { @@ -15704,6 +9578,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_info_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_info_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn n_allele(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } } @@ -15715,6 +9611,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_allele_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_allele_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn n_fmt(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } } @@ -15726,6 +9644,28 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_fmt_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 32usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_fmt_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 32usize, + 8u8, + val as u64, + ) + } + } + #[inline] pub fn n_sample(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 24u8) as u32) } } @@ -15737,14 +9677,35 @@ impl bcf1_t { } } #[inline] + pub unsafe fn n_sample_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 40usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_n_sample_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 40usize, + 24u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( n_info: u32, n_allele: u32, n_fmt: u32, n_sample: u32, - ) -> __BindgenBitfieldUnit<[u8; 8usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 16u8, { let n_info: u32 = unsafe { ::std::mem::transmute(n_info) }; n_info as u64 @@ -15764,96 +9725,96 @@ impl bcf1_t { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_init(mode: *const ::std::os::raw::c_char) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_destroy(h: *mut bcf_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_init() -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_destroy(v: *mut bcf1_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_empty(v: *mut bcf1_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_clear(v: *mut bcf1_t); } pub type vcfFile = htsFile; -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set_samples( hdr: *mut bcf_hdr_t, samples: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_subset_format(hdr: *const bcf_hdr_t, rec: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_write(fp: *mut htsFile, h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_parse( s: *mut kstring_t, h: *const bcf_hdr_t, v: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_open_mode( mode: *mut ::std::os::raw::c_char, fn_: *const ::std::os::raw::c_char, format: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_format( h: *const bcf_hdr_t, v: *const bcf1_t, s: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_unpack(b: *mut bcf1_t, which: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_dup(src: *mut bcf1_t) -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_copy(dst: *mut bcf1_t, src: *mut bcf1_t) -> *mut bcf1_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_write(fp: *mut htsFile, h: *mut bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn vcf_hdr_write(fp: *mut htsFile, h: *const bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_write( fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_readrec( fp: *mut BGZF, null: *mut ::std::os::raw::c_void, @@ -15863,74 +9824,74 @@ extern "C" { end: *mut hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn vcf_write_line(fp: *mut htsFile, line: *mut kstring_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_dup(hdr: *const bcf_hdr_t) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_combine(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_merge(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_add_sample( hdr: *mut bcf_hdr_t, sample: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set( hdr: *mut bcf_hdr_t, fname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_format( hdr: *const bcf_hdr_t, is_bcf: ::std::os::raw::c_int, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_fmt_text( hdr: *const bcf_hdr_t, is_bcf: ::std::os::raw::c_int, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_append( h: *mut bcf_hdr_t, line: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_printf( h: *mut bcf_hdr_t, format: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_get_version(hdr: *const bcf_hdr_t) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_set_version( hdr: *mut bcf_hdr_t, version: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_remove( h: *mut bcf_hdr_t, type_: ::std::os::raw::c_int, key: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_subset( h0: *const bcf_hdr_t, n: ::std::os::raw::c_int, @@ -15938,35 +9899,35 @@ extern "C" { imap: *mut ::std::os::raw::c_int, ) -> *mut bcf_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_seqnames( h: *const bcf_hdr_t, nseqs: *mut ::std::os::raw::c_int, ) -> *mut *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_parse( hdr: *mut bcf_hdr_t, htxt: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_sync(h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_parse_line( h: *const bcf_hdr_t, line: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut bcf_hrec_t; } -extern "C" { - pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str: *mut kstring_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str_: *mut kstring_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_add_hrec(hdr: *mut bcf_hdr_t, hrec: *mut bcf_hrec_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_get_hrec( hdr: *const bcf_hdr_t, type_: ::std::os::raw::c_int, @@ -15975,39 +9936,39 @@ extern "C" { str_class: *const ::std::os::raw::c_char, ) -> *mut bcf_hrec_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_dup(hrec: *mut bcf_hrec_t) -> *mut bcf_hrec_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_add_key( hrec: *mut bcf_hrec_t, - str: *const ::std::os::raw::c_char, - len: size_t, + str_: *const ::std::os::raw::c_char, + len: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_set_val( hrec: *mut bcf_hrec_t, i: ::std::os::raw::c_int, - str: *const ::std::os::raw::c_char, - len: size_t, + str_: *const ::std::os::raw::c_char, + len: usize, is_quoted: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_find_key( hrec: *mut bcf_hrec_t, key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hrec_add_idx(hrec: *mut bcf_hrec_t, idx: ::std::os::raw::c_int) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hrec_destroy(hrec: *mut bcf_hrec_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_subset( h: *const bcf_hdr_t, v: *mut bcf1_t, @@ -16015,26 +9976,50 @@ extern "C" { imap: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_translate( dst_hdr: *const bcf_hdr_t, src_hdr: *mut bcf_hdr_t, src_line: *mut bcf1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_variant_types(rec: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_variant_type( rec: *mut bcf1_t, ith_allele: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +pub const bcf_variant_match_bcf_match_exact: bcf_variant_match = 0; +pub const bcf_variant_match_bcf_match_overlap: bcf_variant_match = 1; +pub const bcf_variant_match_bcf_match_subset: bcf_variant_match = 2; +pub type bcf_variant_match = ::std::os::raw::c_uint; +unsafe extern "C" { + pub fn bcf_has_variant_types( + rec: *mut bcf1_t, + bitmask: u32, + mode: bcf_variant_match, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bcf_has_variant_type( + rec: *mut bcf1_t, + ith_allele: ::std::os::raw::c_int, + bitmask: u32, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bcf_variant_length( + rec: *mut bcf1_t, + ith_allele: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bcf_is_snp(v: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16042,14 +10027,14 @@ extern "C" { n: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_add_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, flt_id: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16057,14 +10042,14 @@ extern "C" { pass: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_has_filter( hdr: *const bcf_hdr_t, line: *mut bcf1_t, filter: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_alleles( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16072,28 +10057,28 @@ extern "C" { nals: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_alleles_str( hdr: *const bcf_hdr_t, line: *mut bcf1_t, alleles_string: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_id( hdr: *const bcf_hdr_t, line: *mut bcf1_t, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_add_id( hdr: *const bcf_hdr_t, line: *mut bcf1_t, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_info( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16103,7 +10088,7 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_format_string( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16112,7 +10097,7 @@ extern "C" { n: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_update_format( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16122,27 +10107,27 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_fmt( hdr: *const bcf_hdr_t, line: *mut bcf1_t, key: *const ::std::os::raw::c_char, ) -> *mut bcf_fmt_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info( hdr: *const bcf_hdr_t, line: *mut bcf1_t, key: *const ::std::os::raw::c_char, ) -> *mut bcf_info_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_fmt_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_fmt_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_info_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_info_values( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16152,7 +10137,7 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_format_string( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16161,7 +10146,7 @@ extern "C" { ndst: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_get_format_values( hdr: *const bcf_hdr_t, line: *mut bcf1_t, @@ -16171,14 +10156,14 @@ extern "C" { type_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_hdr_id2int( hdr: *const bcf_hdr_t, type_: ::std::os::raw::c_int, id: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_fmt_array( s: *mut kstring_t, n: ::std::os::raw::c_int, @@ -16186,17 +10171,17 @@ extern "C" { data: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_fmt_sized_array(s: *mut kstring_t, ptr: *mut u8) -> *mut u8; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vchar( s: *mut kstring_t, l: ::std::os::raw::c_int, a: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vint( s: *mut kstring_t, n: ::std::os::raw::c_int, @@ -16204,40 +10189,40 @@ extern "C" { wsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_enc_vfloat( s: *mut kstring_t, n: ::std::os::raw::c_int, a: *mut f32, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_load2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_load3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, flags: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -16245,7 +10230,7 @@ extern "C" { n_threads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_idx_init( fp: *mut htsFile, h: *mut bcf_hdr_t, @@ -16253,13 +10238,13 @@ extern "C" { fnidx: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub static mut bcf_float_vector_end: u32; } -extern "C" { +unsafe extern "C" { pub static mut bcf_float_missing: u32; } #[repr(C)] @@ -16272,7 +10257,7 @@ pub struct sam_hrecs_t { pub struct sam_hdr_t { pub n_targets: i32, pub ignore_sam_err: i32, - pub l_text: size_t, + pub l_text: usize, pub target_len: *mut u32, pub cigar_tab: *const i8, pub target_name: *mut *mut ::std::os::raw::c_char, @@ -16281,121 +10266,29 @@ pub struct sam_hdr_t { pub hrecs: *mut sam_hrecs_t, pub ref_count: u32, } -#[test] -fn bindgen_test_layout_sam_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(sam_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sam_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_targets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(n_targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ignore_sam_err as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ignore_sam_err) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_text as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(l_text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_len as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_tab as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(cigar_tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_name as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).text as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdict as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(sdict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrecs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(hrecs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ref_count as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ref_count) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of sam_hdr_t"][::std::mem::size_of::() - 72usize]; + ["Alignment of sam_hdr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: sam_hdr_t::n_targets"] + [::std::mem::offset_of!(sam_hdr_t, n_targets) - 0usize]; + ["Offset of field: sam_hdr_t::ignore_sam_err"] + [::std::mem::offset_of!(sam_hdr_t, ignore_sam_err) - 4usize]; + ["Offset of field: sam_hdr_t::l_text"][::std::mem::offset_of!(sam_hdr_t, l_text) - 8usize]; + ["Offset of field: sam_hdr_t::target_len"] + [::std::mem::offset_of!(sam_hdr_t, target_len) - 16usize]; + ["Offset of field: sam_hdr_t::cigar_tab"] + [::std::mem::offset_of!(sam_hdr_t, cigar_tab) - 24usize]; + ["Offset of field: sam_hdr_t::target_name"] + [::std::mem::offset_of!(sam_hdr_t, target_name) - 32usize]; + ["Offset of field: sam_hdr_t::text"][::std::mem::offset_of!(sam_hdr_t, text) - 40usize]; + ["Offset of field: sam_hdr_t::sdict"][::std::mem::offset_of!(sam_hdr_t, sdict) - 48usize]; + ["Offset of field: sam_hdr_t::hrecs"][::std::mem::offset_of!(sam_hdr_t, hrecs) - 56usize]; + ["Offset of field: sam_hdr_t::ref_count"] + [::std::mem::offset_of!(sam_hdr_t, ref_count) - 64usize]; +}; pub type bam_hdr_t = sam_hdr_t; -extern "C" { +unsafe extern "C" { pub static bam_cigar_table: [i8; 256usize]; } #[repr(C)] @@ -16410,143 +10303,30 @@ pub struct bam1_core_t { pub l_qname: u16, pub n_cigar: u32, pub l_qseq: i32, - pub mtid: i32, - pub mpos: hts_pos_t, - pub isize: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bam1_core_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bam1_core_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_core_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bin as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_extranul as *const _ as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_extranul) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(flag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qname as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_cigar as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(n_cigar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qseq as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mtid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mtid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mpos as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(isize) - ) - ); -} + pub mtid: i32, + pub mpos: hts_pos_t, + pub isize_: hts_pos_t, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam1_core_t"][::std::mem::size_of::() - 48usize]; + ["Alignment of bam1_core_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam1_core_t::pos"][::std::mem::offset_of!(bam1_core_t, pos) - 0usize]; + ["Offset of field: bam1_core_t::tid"][::std::mem::offset_of!(bam1_core_t, tid) - 8usize]; + ["Offset of field: bam1_core_t::bin"][::std::mem::offset_of!(bam1_core_t, bin) - 12usize]; + ["Offset of field: bam1_core_t::qual"][::std::mem::offset_of!(bam1_core_t, qual) - 14usize]; + ["Offset of field: bam1_core_t::l_extranul"] + [::std::mem::offset_of!(bam1_core_t, l_extranul) - 15usize]; + ["Offset of field: bam1_core_t::flag"][::std::mem::offset_of!(bam1_core_t, flag) - 16usize]; + ["Offset of field: bam1_core_t::l_qname"] + [::std::mem::offset_of!(bam1_core_t, l_qname) - 18usize]; + ["Offset of field: bam1_core_t::n_cigar"] + [::std::mem::offset_of!(bam1_core_t, n_cigar) - 20usize]; + ["Offset of field: bam1_core_t::l_qseq"][::std::mem::offset_of!(bam1_core_t, l_qseq) - 24usize]; + ["Offset of field: bam1_core_t::mtid"][::std::mem::offset_of!(bam1_core_t, mtid) - 28usize]; + ["Offset of field: bam1_core_t::mpos"][::std::mem::offset_of!(bam1_core_t, mpos) - 32usize]; + ["Offset of field: bam1_core_t::isize_"][::std::mem::offset_of!(bam1_core_t, isize_) - 40usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bam1_t { @@ -16555,72 +10335,20 @@ pub struct bam1_t { pub data: *mut u8, pub l_data: ::std::os::raw::c_int, pub m_data: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub __bindgen_padding_0: u32, } -#[test] -fn bindgen_test_layout_bam1_t() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(bam1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).core as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(core) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_data as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(l_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_data as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(m_data) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam1_t"][::std::mem::size_of::() - 80usize]; + ["Alignment of bam1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam1_t::core"][::std::mem::offset_of!(bam1_t, core) - 0usize]; + ["Offset of field: bam1_t::id"][::std::mem::offset_of!(bam1_t, id) - 48usize]; + ["Offset of field: bam1_t::data"][::std::mem::offset_of!(bam1_t, data) - 56usize]; + ["Offset of field: bam1_t::l_data"][::std::mem::offset_of!(bam1_t, l_data) - 64usize]; + ["Offset of field: bam1_t::m_data"][::std::mem::offset_of!(bam1_t, m_data) - 68usize]; +}; impl bam1_t { #[inline] pub fn mempolicy(&self) -> u32 { @@ -16634,9 +10362,30 @@ impl bam1_t { } } #[inline] - pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); + pub unsafe fn mempolicy_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mempolicy_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 2u8, { let mempolicy: u32 = unsafe { ::std::mem::transmute(mempolicy) }; mempolicy as u64 @@ -16644,55 +10393,55 @@ impl bam1_t { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_init() -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bam_hdr_read(fp: *mut BGZF) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn bam_hdr_write(fp: *mut BGZF, h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_destroy(h: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_dup(h0: *const sam_hdr_t) -> *mut sam_hdr_t; } pub type samFile = htsFile; -extern "C" { - pub fn sam_hdr_parse(l_text: size_t, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; +unsafe extern "C" { + pub fn sam_hdr_parse(l_text: usize, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_read(fp: *mut samFile) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_write(fp: *mut samFile, h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { - pub fn sam_hdr_length(h: *mut sam_hdr_t) -> size_t; +unsafe extern "C" { + pub fn sam_hdr_length(h: *mut sam_hdr_t) -> usize; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_str(h: *mut sam_hdr_t) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_nref(h: *const sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_lines( h: *mut sam_hdr_t, lines: *const ::std::os::raw::c_char, - len: size_t, + len: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_line( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_line_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16701,7 +10450,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_line_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16709,7 +10458,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_line_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16717,14 +10466,14 @@ extern "C" { ID_value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_line_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, position: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_update_line( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16733,7 +10482,7 @@ extern "C" { ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_except( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16741,7 +10490,7 @@ extern "C" { ID_value: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_lines( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16749,27 +10498,27 @@ extern "C" { rh: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_count_lines( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_line_index( bh: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_line_name( bh: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, pos: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_tag_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16779,7 +10528,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_find_tag_pos( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16788,7 +10537,7 @@ extern "C" { ks: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_remove_tag_id( h: *mut sam_hdr_t, type_: *const ::std::os::raw::c_char, @@ -16797,103 +10546,118 @@ extern "C" { key: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_name2tid( h: *mut sam_hdr_t, ref_: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_tid2name( h: *const sam_hdr_t, tid: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_tid2len(h: *const sam_hdr_t, tid: ::std::os::raw::c_int) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_pg_id( h: *mut sam_hdr_t, name: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_add_pg( h: *mut sam_hdr_t, name: *const ::std::os::raw::c_char, ... ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn stringify_argv( argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_incr_ref(h: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn bam_init1() -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_destroy1(b: *mut bam1_t); } -extern "C" { +unsafe extern "C" { pub fn bam_read1(fp: *mut BGZF, b: *mut bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_write1(fp: *mut BGZF, b: *const bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_copy1(bdst: *mut bam1_t, bsrc: *const bam1_t) -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_dup1(bsrc: *const bam1_t) -> *mut bam1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_set1( bam: *mut bam1_t, - l_qname: size_t, + l_qname: usize, qname: *const ::std::os::raw::c_char, flag: u16, tid: i32, pos: hts_pos_t, mapq: u8, - n_cigar: size_t, + n_cigar: usize, cigar: *const u32, mtid: i32, mpos: hts_pos_t, - isize: hts_pos_t, - l_seq: size_t, + isize_: hts_pos_t, + l_seq: usize, seq: *const ::std::os::raw::c_char, qual: *const ::std::os::raw::c_char, - l_aux: size_t, + l_aux: usize, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_cigar2qlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn bam_cigar2rlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; } -extern "C" { +unsafe extern "C" { pub fn bam_endpos(b: *const bam1_t) -> hts_pos_t; } -extern "C" { - pub fn bam_str2flag(str: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bam_str2flag(str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_flag2str(flag: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_set_qname( b: *mut bam1_t, qname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn sam_parse_cigar( + in_: *const ::std::os::raw::c_char, + end: *mut *mut ::std::os::raw::c_char, + a_cigar: *mut *mut u32, + a_mem: *mut usize, + ) -> isize; +} +unsafe extern "C" { + pub fn bam_parse_cigar( + in_: *const ::std::os::raw::c_char, + end: *mut *mut ::std::os::raw::c_char, + b: *mut bam1_t, + ) -> isize; +} +unsafe extern "C" { pub fn sam_idx_init( fp: *mut htsFile, h: *mut sam_hdr_t, @@ -16901,20 +10665,20 @@ extern "C" { fnidx: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load(fp: *mut htsFile, fn_: *const ::std::os::raw::c_char) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load2( fp: *mut htsFile, fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_load3( fp: *mut htsFile, fn_: *const ::std::os::raw::c_char, @@ -16922,20 +10686,20 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *mut hts_idx_t; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -16943,7 +10707,7 @@ extern "C" { nthreads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_queryi( idx: *const hts_idx_t, tid: ::std::os::raw::c_int, @@ -16951,14 +10715,14 @@ extern "C" { end: hts_pos_t, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_querys( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, region: *const ::std::os::raw::c_char, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_regions( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, @@ -16966,7 +10730,7 @@ extern "C" { regcount: ::std::os::raw::c_uint, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_itr_regarray( idx: *const hts_idx_t, hdr: *mut sam_hdr_t, @@ -16974,7 +10738,7 @@ extern "C" { regcount: ::std::os::raw::c_uint, ) -> *mut hts_itr_t; } -extern "C" { +unsafe extern "C" { pub fn sam_parse_region( h: *mut sam_hdr_t, s: *const ::std::os::raw::c_char, @@ -16984,76 +10748,89 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_open_mode( mode: *mut ::std::os::raw::c_char, fn_: *const ::std::os::raw::c_char, format: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_open_mode_opts( fn_: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, format: *const ::std::os::raw::c_char, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn sam_hdr_change_HD( h: *mut sam_hdr_t, key: *const ::std::os::raw::c_char, val: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_parse1( s: *mut kstring_t, h: *mut sam_hdr_t, b: *mut bam1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_format1( h: *const sam_hdr_t, b: *const bam1_t, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_read1(fp: *mut samFile, h: *mut sam_hdr_t, b: *mut bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn sam_write1( fp: *mut samFile, h: *const sam_hdr_t, b: *const bam1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn sam_passes_filter( + h: *const sam_hdr_t, + b: *const bam1_t, + filt: *mut hts_filter_t, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn bam_aux_first(b: *const bam1_t) -> *mut u8; +} +unsafe extern "C" { + pub fn bam_aux_next(b: *const bam1_t, s: *const u8) -> *mut u8; +} +unsafe extern "C" { pub fn bam_aux_get(b: *const bam1_t, tag: *const ::std::os::raw::c_char) -> *mut u8; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2i(s: *const u8) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2f(s: *const u8) -> f64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2A(s: *const u8) -> ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_aux2Z(s: *const u8) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB_len(s: *const u8) -> u32; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB2i(s: *const u8, idx: u32) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bam_auxB2f(s: *const u8, idx: u32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_append( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -17062,10 +10839,13 @@ extern "C" { data: *const u8, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_del(b: *mut bam1_t, s: *mut u8) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_aux_remove(b: *mut bam1_t, s: *mut u8) -> *mut u8; +} +unsafe extern "C" { pub fn bam_aux_update_str( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -17073,21 +10853,21 @@ extern "C" { data: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_int( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, val: i64, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_float( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, val: f32, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_aux_update_array( b: *mut bam1_t, tag: *const ::std::os::raw::c_char, @@ -17102,51 +10882,15 @@ pub union bam_pileup_cd { pub p: *mut ::std::os::raw::c_void, pub i: i64, pub f: f64, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bam_pileup_cd() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(f) - ) - ); } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam_pileup_cd"][::std::mem::size_of::() - 8usize]; + ["Alignment of bam_pileup_cd"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam_pileup_cd::p"][::std::mem::offset_of!(bam_pileup_cd, p) - 0usize]; + ["Offset of field: bam_pileup_cd::i"][::std::mem::offset_of!(bam_pileup_cd, i) - 0usize]; + ["Offset of field: bam_pileup_cd::f"][::std::mem::offset_of!(bam_pileup_cd, f) - 0usize]; +}; #[repr(C)] #[derive(Copy, Clone)] pub struct bam_pileup1_t { @@ -17154,83 +10898,25 @@ pub struct bam_pileup1_t { pub qpos: i32, pub indel: ::std::os::raw::c_int, pub level: ::std::os::raw::c_int, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub cd: bam_pileup_cd, pub cigar_ind: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bam_pileup1_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qpos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(qpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indel as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(indel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cd as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_ind as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cigar_ind) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bam_pileup1_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of bam_pileup1_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bam_pileup1_t::b"][::std::mem::offset_of!(bam_pileup1_t, b) - 0usize]; + ["Offset of field: bam_pileup1_t::qpos"][::std::mem::offset_of!(bam_pileup1_t, qpos) - 8usize]; + ["Offset of field: bam_pileup1_t::indel"] + [::std::mem::offset_of!(bam_pileup1_t, indel) - 12usize]; + ["Offset of field: bam_pileup1_t::level"] + [::std::mem::offset_of!(bam_pileup1_t, level) - 16usize]; + ["Offset of field: bam_pileup1_t::cd"][::std::mem::offset_of!(bam_pileup1_t, cd) - 24usize]; + ["Offset of field: bam_pileup1_t::cigar_ind"] + [::std::mem::offset_of!(bam_pileup1_t, cigar_ind) - 32usize]; +}; impl bam_pileup1_t { #[inline] pub fn is_del(&self) -> u32 { @@ -17244,6 +10930,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_del_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_del_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_head(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } } @@ -17255,6 +10963,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_head_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_head_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_tail(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } } @@ -17266,6 +10996,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_tail_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_tail_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_refskip(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } @@ -17277,6 +11029,28 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn is_refskip_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_refskip_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn aux(&self) -> u32 { unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } } @@ -17288,15 +11062,36 @@ impl bam_pileup1_t { } } #[inline] + pub unsafe fn aux_raw(this: *const Self) -> u32 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 27u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_aux_raw(this: *mut Self, val: u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 27u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( is_del: u32, is_head: u32, is_tail: u32, is_refskip: u32, aux: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 1u8, { let is_del: u32 = unsafe { ::std::mem::transmute(is_del) }; is_del as u64 @@ -17338,16 +11133,16 @@ pub struct bam_mplp_s { _unused: [u8; 0], } pub type bam_mplp_t = *mut bam_mplp_s; -extern "C" { +unsafe extern "C" { pub fn bam_plp_init(func: bam_plp_auto_f, data: *mut ::std::os::raw::c_void) -> bam_plp_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_destroy(iter: bam_plp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_push(iter: bam_plp_t, b: *const bam1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_next( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -17355,7 +11150,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_auto( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -17363,7 +11158,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp64_next( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -17371,7 +11166,7 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp64_auto( iter: bam_plp_t, _tid: *mut ::std::os::raw::c_int, @@ -17379,13 +11174,13 @@ extern "C" { _n_plp: *mut ::std::os::raw::c_int, ) -> *const bam_pileup1_t; } -extern "C" { +unsafe extern "C" { pub fn bam_plp_set_maxcnt(iter: bam_plp_t, maxcnt: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_reset(iter: bam_plp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_constructor( plp: bam_plp_t, func: ::std::option::Option< @@ -17397,7 +11192,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_destructor( plp: bam_plp_t, func: ::std::option::Option< @@ -17409,30 +11204,43 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_plp_insertion( p: *const bam_pileup1_t, ins: *mut kstring_t, del_len: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hts_base_mod_state { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn bam_plp_insertion_mod( + p: *const bam_pileup1_t, + m: *mut hts_base_mod_state, + ins: *mut kstring_t, + del_len: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mplp_init( n: ::std::os::raw::c_int, func: bam_plp_auto_f, data: *mut *mut ::std::os::raw::c_void, ) -> bam_mplp_t; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_init_overlaps(iter: bam_mplp_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_destroy(iter: bam_mplp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_set_maxcnt(iter: bam_mplp_t, maxcnt: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_auto( iter: bam_mplp_t, _tid: *mut ::std::os::raw::c_int, @@ -17441,7 +11249,7 @@ extern "C" { plp: *mut *const bam_pileup1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp64_auto( iter: bam_mplp_t, _tid: *mut ::std::os::raw::c_int, @@ -17450,10 +11258,10 @@ extern "C" { plp: *mut *const bam_pileup1_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_reset(iter: bam_mplp_t); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_constructor( iter: bam_mplp_t, func: ::std::option::Option< @@ -17465,7 +11273,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn bam_mplp_destructor( iter: bam_mplp_t, func: ::std::option::Option< @@ -17477,7 +11285,7 @@ extern "C" { >, ); } -extern "C" { +unsafe extern "C" { pub fn sam_cap_mapq( b: *mut bam1_t, ref_: *const ::std::os::raw::c_char, @@ -17485,7 +11293,17 @@ extern "C" { thres: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +pub const htsRealnFlags_BAQ_APPLY: htsRealnFlags = 1; +pub const htsRealnFlags_BAQ_EXTEND: htsRealnFlags = 2; +pub const htsRealnFlags_BAQ_REDO: htsRealnFlags = 4; +pub const htsRealnFlags_BAQ_AUTO: htsRealnFlags = 0; +pub const htsRealnFlags_BAQ_ILLUMINA: htsRealnFlags = 8; +pub const htsRealnFlags_BAQ_PACBIOCCS: htsRealnFlags = 16; +pub const htsRealnFlags_BAQ_PACBIO: htsRealnFlags = 24; +pub const htsRealnFlags_BAQ_ONT: htsRealnFlags = 32; +pub const htsRealnFlags_BAQ_GENAPSYS: htsRealnFlags = 40; +pub type htsRealnFlags = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn sam_prob_realn( b: *mut bam1_t, ref_: *const ::std::os::raw::c_char, @@ -17493,13 +11311,6 @@ extern "C" { flag: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } - -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_base_mod_state { - _unused: [u8; 0], -} - #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct hts_base_mod { @@ -17508,72 +11319,38 @@ pub struct hts_base_mod { pub strand: ::std::os::raw::c_int, pub qual: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_hts_base_mod() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_base_mod)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(hts_base_mod)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).modified_base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(modified_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).canonical_base as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(canonical_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).strand as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(strand) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_base_mod), - "::", - stringify!(qual) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hts_base_mod"][::std::mem::size_of::() - 16usize]; + ["Alignment of hts_base_mod"][::std::mem::align_of::() - 4usize]; + ["Offset of field: hts_base_mod::modified_base"] + [::std::mem::offset_of!(hts_base_mod, modified_base) - 0usize]; + ["Offset of field: hts_base_mod::canonical_base"] + [::std::mem::offset_of!(hts_base_mod, canonical_base) - 4usize]; + ["Offset of field: hts_base_mod::strand"] + [::std::mem::offset_of!(hts_base_mod, strand) - 8usize]; + ["Offset of field: hts_base_mod::qual"][::std::mem::offset_of!(hts_base_mod, qual) - 12usize]; +}; +unsafe extern "C" { pub fn hts_base_mod_state_alloc() -> *mut hts_base_mod_state; } -extern "C" { +unsafe extern "C" { pub fn hts_base_mod_state_free(state: *mut hts_base_mod_state); } -extern "C" { +unsafe extern "C" { pub fn bam_parse_basemod( b: *const bam1_t, state: *mut hts_base_mod_state, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_parse_basemod2( + b: *const bam1_t, + state: *mut hts_base_mod_state, + flags: u32, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mods_at_next_pos( b: *const bam1_t, state: *mut hts_base_mod_state, @@ -17581,7 +11358,7 @@ extern "C" { n_mods: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_next_basemod( b: *const bam1_t, state: *mut hts_base_mod_state, @@ -17590,7 +11367,7 @@ extern "C" { pos: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mods_at_qpos( b: *const bam1_t, qpos: ::std::os::raw::c_int, @@ -17599,7 +11376,7 @@ extern "C" { n_mods: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bam_mods_query_type( state: *mut hts_base_mod_state, code: ::std::os::raw::c_int, @@ -17608,24 +11385,340 @@ extern "C" { canonical: *mut ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn bam_mods_queryi( + state: *mut hts_base_mod_state, + i: ::std::os::raw::c_int, + strand: *mut ::std::os::raw::c_int, + implicit: *mut ::std::os::raw::c_int, + canonical: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn bam_mods_recorded( state: *mut hts_base_mod_state, ntype: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_int; } - - -pub const cram_block_method_BM_ERROR: cram_block_method = -1; -pub const cram_block_method_RAW: cram_block_method = 0; -pub const cram_block_method_GZIP: cram_block_method = 1; -pub const cram_block_method_BZIP2: cram_block_method = 2; -pub const cram_block_method_LZMA: cram_block_method = 3; -pub const cram_block_method_RANS: cram_block_method = 4; -pub const cram_block_method_RANS0: cram_block_method = 4; -pub const cram_block_method_RANS1: cram_block_method = 10; -pub const cram_block_method_GZIP_RLE: cram_block_method = 11; -pub type cram_block_method = i32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hFILE_backend { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct hFILE { + pub buffer: *mut ::std::os::raw::c_char, + pub begin: *mut ::std::os::raw::c_char, + pub end: *mut ::std::os::raw::c_char, + pub limit: *mut ::std::os::raw::c_char, + pub backend: *const hFILE_backend, + pub offset: off_t, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub has_errno: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of hFILE"][::std::mem::size_of::() - 56usize]; + ["Alignment of hFILE"][::std::mem::align_of::() - 8usize]; + ["Offset of field: hFILE::buffer"][::std::mem::offset_of!(hFILE, buffer) - 0usize]; + ["Offset of field: hFILE::begin"][::std::mem::offset_of!(hFILE, begin) - 8usize]; + ["Offset of field: hFILE::end"][::std::mem::offset_of!(hFILE, end) - 16usize]; + ["Offset of field: hFILE::limit"][::std::mem::offset_of!(hFILE, limit) - 24usize]; + ["Offset of field: hFILE::backend"][::std::mem::offset_of!(hFILE, backend) - 32usize]; + ["Offset of field: hFILE::offset"][::std::mem::offset_of!(hFILE, offset) - 40usize]; + ["Offset of field: hFILE::has_errno"][::std::mem::offset_of!(hFILE, has_errno) - 52usize]; +}; +impl hFILE { + #[inline] + pub fn at_eof(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_at_eof(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn at_eof_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_at_eof_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn mobile(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_mobile(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn mobile_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_mobile_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn readonly(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_readonly(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn readonly_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 2usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_readonly_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 2usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn preserve(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_preserve(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn preserve_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_preserve_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + at_eof: ::std::os::raw::c_uint, + mobile: ::std::os::raw::c_uint, + readonly: ::std::os::raw::c_uint, + preserve: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let at_eof: u32 = unsafe { ::std::mem::transmute(at_eof) }; + at_eof as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let mobile: u32 = unsafe { ::std::mem::transmute(mobile) }; + mobile as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let readonly: u32 = unsafe { ::std::mem::transmute(readonly) }; + readonly as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let preserve: u32 = unsafe { ::std::mem::transmute(preserve) }; + preserve as u64 + }); + __bindgen_bitfield_unit + } +} +unsafe extern "C" { + pub fn hopen( + filename: *const ::std::os::raw::c_char, + mode: *const ::std::os::raw::c_char, + ... + ) -> *mut hFILE; +} +unsafe extern "C" { + pub fn hdopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut hFILE; +} +unsafe extern "C" { + pub fn hisremote(filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn haddextension( + buffer: *mut kstring_t, + filename: *const ::std::os::raw::c_char, + replace: ::std::os::raw::c_int, + extension: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hclose(fp: *mut hFILE) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hclose_abruptly(fp: *mut hFILE); +} +unsafe extern "C" { + pub fn hseek(fp: *mut hFILE, offset: off_t, whence: ::std::os::raw::c_int) -> off_t; +} +unsafe extern "C" { + pub fn hgetdelim( + buffer: *mut ::std::os::raw::c_char, + size: usize, + delim: ::std::os::raw::c_int, + fp: *mut hFILE, + ) -> isize; +} +unsafe extern "C" { + pub fn hgets( + buffer: *mut ::std::os::raw::c_char, + size: ::std::os::raw::c_int, + fp: *mut hFILE, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hpeek(fp: *mut hFILE, buffer: *mut ::std::os::raw::c_void, nbytes: usize) -> isize; +} +unsafe extern "C" { + pub fn hflush(fp: *mut hFILE) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_mem_get_buffer( + file: *mut hFILE, + length: *mut usize, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hfile_mem_steal_buffer( + file: *mut hFILE, + length: *mut usize, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn hfile_list_schemes( + plugin: *const ::std::os::raw::c_char, + sc_list: *mut *const ::std::os::raw::c_char, + nschemes: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_list_plugins( + plist: *mut *const ::std::os::raw::c_char, + nplugins: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn hfile_has_plugin(name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +pub const cram_block_method_CRAM_COMP_UNKNOWN: cram_block_method = -1; +pub const cram_block_method_CRAM_COMP_RAW: cram_block_method = 0; +pub const cram_block_method_CRAM_COMP_GZIP: cram_block_method = 1; +pub const cram_block_method_CRAM_COMP_BZIP2: cram_block_method = 2; +pub const cram_block_method_CRAM_COMP_LZMA: cram_block_method = 3; +pub const cram_block_method_CRAM_COMP_RANS4x8: cram_block_method = 4; +pub const cram_block_method_CRAM_COMP_RANSNx16: cram_block_method = 5; +pub const cram_block_method_CRAM_COMP_ARITH: cram_block_method = 6; +pub const cram_block_method_CRAM_COMP_FQZ: cram_block_method = 7; +pub const cram_block_method_CRAM_COMP_TOK3: cram_block_method = 8; +pub type cram_block_method = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_method_details { + pub method: cram_block_method, + pub level: ::std::os::raw::c_int, + pub order: ::std::os::raw::c_int, + pub rle: ::std::os::raw::c_int, + pub pack: ::std::os::raw::c_int, + pub stripe: ::std::os::raw::c_int, + pub cat: ::std::os::raw::c_int, + pub nosz: ::std::os::raw::c_int, + pub Nway: ::std::os::raw::c_int, + pub ext: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of cram_method_details"][::std::mem::size_of::() - 40usize]; + ["Alignment of cram_method_details"][::std::mem::align_of::() - 4usize]; + ["Offset of field: cram_method_details::method"] + [::std::mem::offset_of!(cram_method_details, method) - 0usize]; + ["Offset of field: cram_method_details::level"] + [::std::mem::offset_of!(cram_method_details, level) - 4usize]; + ["Offset of field: cram_method_details::order"] + [::std::mem::offset_of!(cram_method_details, order) - 8usize]; + ["Offset of field: cram_method_details::rle"] + [::std::mem::offset_of!(cram_method_details, rle) - 12usize]; + ["Offset of field: cram_method_details::pack"] + [::std::mem::offset_of!(cram_method_details, pack) - 16usize]; + ["Offset of field: cram_method_details::stripe"] + [::std::mem::offset_of!(cram_method_details, stripe) - 20usize]; + ["Offset of field: cram_method_details::cat"] + [::std::mem::offset_of!(cram_method_details, cat) - 24usize]; + ["Offset of field: cram_method_details::nosz"] + [::std::mem::offset_of!(cram_method_details, nosz) - 28usize]; + ["Offset of field: cram_method_details::Nway"] + [::std::mem::offset_of!(cram_method_details, Nway) - 32usize]; + ["Offset of field: cram_method_details::ext"] + [::std::mem::offset_of!(cram_method_details, ext) - 36usize]; +}; pub const cram_content_type_CT_ERROR: cram_content_type = -1; pub const cram_content_type_FILE_HEADER: cram_content_type = 0; pub const cram_content_type_COMPRESSION_HEADER: cram_content_type = 1; @@ -17633,7 +11726,7 @@ pub const cram_content_type_MAPPED_SLICE: cram_content_type = 2; pub const cram_content_type_UNMAPPED_SLICE: cram_content_type = 3; pub const cram_content_type_EXTERNAL: cram_content_type = 4; pub const cram_content_type_CORE: cram_content_type = 5; -pub type cram_content_type = i32; +pub type cram_content_type = ::std::os::raw::c_int; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct cram_file_def { @@ -17666,7 +11759,12 @@ pub struct cram_block_slice_hdr { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cram_block_compression_hdr { +pub struct cram_block_compression_hdr { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_codec { _unused: [u8; 0], } #[repr(C)] @@ -17674,111 +11772,133 @@ pub struct cram_block_compression_hdr { pub struct refs_t { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_header(fd: *mut cram_fd) -> *mut sam_hdr_t; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t); } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_version(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_version(fd: *mut cram_fd, vers: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn cram_major_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_minor_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_get_fp(fd: *mut cram_fd) -> *mut hFILE; } -extern "C" { +unsafe extern "C" { pub fn cram_fd_set_fp(fd: *mut cram_fd, fp: *mut hFILE); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_length(c: *mut cram_container) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_length(c: *mut cram_container, length: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_num_blocks(c: *mut cram_container) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_num_blocks(c: *mut cram_container, num_blocks: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_container_get_landmarks( c: *mut cram_container, num_landmarks: *mut i32, ) -> *mut i32; } -extern "C" { +unsafe extern "C" { pub fn cram_container_set_landmarks( c: *mut cram_container, num_landmarks: i32, landmarks: *mut i32, ); } -extern "C" { +unsafe extern "C" { + pub fn cram_container_get_num_records(c: *mut cram_container) -> i32; +} +unsafe extern "C" { + pub fn cram_container_get_num_bases(c: *mut cram_container) -> i64; +} +unsafe extern "C" { pub fn cram_container_is_empty(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_content_id(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_comp_size(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_uncomp_size(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_crc32(b: *mut cram_block) -> i32; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_data(b: *mut cram_block) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn cram_block_get_content_type(b: *mut cram_block) -> cram_content_type; } -extern "C" { +unsafe extern "C" { + pub fn cram_block_get_method(b: *mut cram_block) -> cram_block_method; +} +unsafe extern "C" { + pub fn cram_expand_method( + data: *mut u8, + size: i32, + comp: cram_block_method, + ) -> *mut cram_method_details; +} +unsafe extern "C" { pub fn cram_block_set_content_id(b: *mut cram_block, id: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_comp_size(b: *mut cram_block, size: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_uncomp_size(b: *mut cram_block, size: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_crc32(b: *mut cram_block, crc: i32); } -extern "C" { +unsafe extern "C" { pub fn cram_block_set_data(b: *mut cram_block, data: *mut ::std::os::raw::c_void); } -extern "C" { +unsafe extern "C" { pub fn cram_block_append( b: *mut cram_block, data: *const ::std::os::raw::c_void, size: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_block_update_size(b: *mut cram_block); } -extern "C" { - pub fn cram_block_get_offset(b: *mut cram_block) -> size_t; +unsafe extern "C" { + pub fn cram_block_get_offset(b: *mut cram_block) -> usize; } -extern "C" { - pub fn cram_block_set_offset(b: *mut cram_block, offset: size_t); +unsafe extern "C" { + pub fn cram_block_set_offset(b: *mut cram_block, offset: usize); } -extern "C" { +unsafe extern "C" { pub fn cram_block_size(b: *mut cram_block) -> u32; } -extern "C" { +unsafe extern "C" { + pub fn cram_codec_get_content_ids(c: *mut cram_codec, ids: *mut ::std::os::raw::c_int); +} +unsafe extern "C" { + pub fn cram_codec_describe(c: *mut cram_codec, ks: *mut kstring_t) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn cram_transcode_rg( in_: *mut cram_fd, out: *mut cram_fd, @@ -17788,32 +11908,91 @@ extern "C" { out_rg: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_copy_slice( in_: *mut cram_fd, out: *mut cram_fd, num_slice: i32, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn cram_decode_compression_header( + fd: *mut cram_fd, + b: *mut cram_block, + ) -> *mut cram_block_compression_hdr; +} +unsafe extern "C" { + pub fn cram_free_compression_header(hdr: *mut cram_block_compression_hdr); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct cram_cid2ds_t { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn cram_update_cid2ds_map( + hdr: *mut cram_block_compression_hdr, + cid2ds: *mut cram_cid2ds_t, + ) -> *mut cram_cid2ds_t; +} +unsafe extern "C" { + pub fn cram_cid2ds_query( + c2d: *mut cram_cid2ds_t, + content_id: ::std::os::raw::c_int, + n: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_cid2ds_free(cid2ds: *mut cram_cid2ds_t); +} +unsafe extern "C" { + pub fn cram_describe_encodings( + hdr: *mut cram_block_compression_hdr, + ks: *mut kstring_t, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_slice_hdr_get_num_blocks(hdr: *mut cram_block_slice_hdr) -> i32; +} +unsafe extern "C" { + pub fn cram_slice_hdr_get_embed_ref_id(h: *mut cram_block_slice_hdr) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn cram_slice_hdr_get_coords( + h: *mut cram_block_slice_hdr, + refid: *mut ::std::os::raw::c_int, + start: *mut hts_pos_t, + span: *mut hts_pos_t, + ); +} +unsafe extern "C" { + pub fn cram_decode_slice_header( + fd: *mut cram_fd, + b: *mut cram_block, + ) -> *mut cram_block_slice_hdr; +} +unsafe extern "C" { + pub fn cram_free_slice_header(hdr: *mut cram_block_slice_hdr); +} +unsafe extern "C" { pub fn cram_new_block( content_type: cram_content_type, content_id: ::std::os::raw::c_int, ) -> *mut cram_block; } -extern "C" { +unsafe extern "C" { pub fn cram_read_block(fd: *mut cram_fd) -> *mut cram_block; } -extern "C" { +unsafe extern "C" { pub fn cram_write_block(fd: *mut cram_fd, b: *mut cram_block) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_free_block(b: *mut cram_block); } -extern "C" { +unsafe extern "C" { pub fn cram_uncompress_block(b: *mut cram_block) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_compress_block( fd: *mut cram_fd, b: *mut cram_block, @@ -17822,22 +12001,32 @@ extern "C" { level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { + pub fn cram_compress_block2( + fd: *mut cram_fd, + s: *mut cram_slice, + b: *mut cram_block, + metrics: *mut cram_metrics, + method: ::std::os::raw::c_int, + level: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn cram_new_container( nrec: ::std::os::raw::c_int, nslice: ::std::os::raw::c_int, ) -> *mut cram_container; } -extern "C" { +unsafe extern "C" { pub fn cram_free_container(c: *mut cram_container); } -extern "C" { +unsafe extern "C" { pub fn cram_read_container(fd: *mut cram_fd) -> *mut cram_container; } -extern "C" { +unsafe extern "C" { pub fn cram_write_container(fd: *mut cram_fd, h: *mut cram_container) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_store_container( fd: *mut cram_fd, c: *mut cram_container, @@ -17845,59 +12034,59 @@ extern "C" { size: *mut ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_container_size(c: *mut cram_container) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_open( filename: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut cram_fd; } -extern "C" { +unsafe extern "C" { pub fn cram_dopen( fp: *mut hFILE, filename: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut cram_fd; } -extern "C" { +unsafe extern "C" { pub fn cram_close(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_seek( fd: *mut cram_fd, offset: off_t, whence: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_flush(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_eof(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_option(fd: *mut cram_fd, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_voption( fd: *mut cram_fd, opt: hts_fmt_option, args: *mut __va_list_tag, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn cram_check_EOF(fd: *mut cram_fd) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn int32_put_blk(b: *mut cram_block, val: i32) -> ::std::os::raw::c_int; } pub type SAM_hdr = sam_hdr_t; -extern "C" { +unsafe extern "C" { pub fn cram_get_refs(fd: *mut htsFile) -> *mut refs_t; } #[repr(C)] @@ -17923,7 +12112,8 @@ pub struct z_stream_s { #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct BGZF { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, pub cache_size: ::std::os::raw::c_int, pub block_length: ::std::os::raw::c_int, pub block_clength: ::std::os::raw::c_int, @@ -17940,154 +12130,29 @@ pub struct BGZF { pub gz_stream: *mut z_stream_s, pub seeked: i64, } -#[test] -fn bindgen_test_layout_BGZF() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(BGZF)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(BGZF)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache_size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_length as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_clength as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_clength) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_offset as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_address as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_address as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_block as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compressed_block as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(compressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 64usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(fp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mt as *const _ as usize }, - 72usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(mt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(idx)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx_build_otf as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(idx_build_otf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gz_stream as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(gz_stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seeked as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(seeked) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of BGZF"][::std::mem::size_of::() - 112usize]; + ["Alignment of BGZF"][::std::mem::align_of::() - 8usize]; + ["Offset of field: BGZF::cache_size"][::std::mem::offset_of!(BGZF, cache_size) - 4usize]; + ["Offset of field: BGZF::block_length"][::std::mem::offset_of!(BGZF, block_length) - 8usize]; + ["Offset of field: BGZF::block_clength"][::std::mem::offset_of!(BGZF, block_clength) - 12usize]; + ["Offset of field: BGZF::block_offset"][::std::mem::offset_of!(BGZF, block_offset) - 16usize]; + ["Offset of field: BGZF::block_address"][::std::mem::offset_of!(BGZF, block_address) - 24usize]; + ["Offset of field: BGZF::uncompressed_address"] + [::std::mem::offset_of!(BGZF, uncompressed_address) - 32usize]; + ["Offset of field: BGZF::uncompressed_block"] + [::std::mem::offset_of!(BGZF, uncompressed_block) - 40usize]; + ["Offset of field: BGZF::compressed_block"] + [::std::mem::offset_of!(BGZF, compressed_block) - 48usize]; + ["Offset of field: BGZF::cache"][::std::mem::offset_of!(BGZF, cache) - 56usize]; + ["Offset of field: BGZF::fp"][::std::mem::offset_of!(BGZF, fp) - 64usize]; + ["Offset of field: BGZF::mt"][::std::mem::offset_of!(BGZF, mt) - 72usize]; + ["Offset of field: BGZF::idx"][::std::mem::offset_of!(BGZF, idx) - 80usize]; + ["Offset of field: BGZF::idx_build_otf"][::std::mem::offset_of!(BGZF, idx_build_otf) - 88usize]; + ["Offset of field: BGZF::gz_stream"][::std::mem::offset_of!(BGZF, gz_stream) - 96usize]; + ["Offset of field: BGZF::seeked"][::std::mem::offset_of!(BGZF, seeked) - 104usize]; +}; impl BGZF { #[inline] pub fn errcode(&self) -> ::std::os::raw::c_uint { @@ -18101,6 +12166,28 @@ impl BGZF { } } #[inline] + pub unsafe fn errcode_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_errcode_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 16u8, + val as u64, + ) + } + } + #[inline] pub fn reserved(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } } @@ -18112,6 +12199,28 @@ impl BGZF { } } #[inline] + pub unsafe fn reserved_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 16usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_reserved_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 16usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_write(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } } @@ -18123,6 +12232,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_write_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 17usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_write_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 17usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn no_eof_block(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } } @@ -18134,6 +12265,28 @@ impl BGZF { } } #[inline] + pub unsafe fn no_eof_block_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 18usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_no_eof_block_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 18usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_be(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } } @@ -18145,6 +12298,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_be_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 19usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_be_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 19usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn compress_level(&self) -> ::std::os::raw::c_int { unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 9u8) as u32) } } @@ -18156,6 +12331,28 @@ impl BGZF { } } #[inline] + pub unsafe fn compress_level_raw(this: *const Self) -> ::std::os::raw::c_int { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 20usize, + 9u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_compress_level_raw(this: *mut Self, val: ::std::os::raw::c_int) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 20usize, + 9u8, + val as u64, + ) + } + } + #[inline] pub fn last_block_eof(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } } @@ -18167,6 +12364,28 @@ impl BGZF { } } #[inline] + pub unsafe fn last_block_eof_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 29usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_last_block_eof_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 29usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_compressed(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } } @@ -18178,6 +12397,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_compressed_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 30usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_compressed_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 30usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn is_gzip(&self) -> ::std::os::raw::c_uint { unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } } @@ -18189,6 +12430,28 @@ impl BGZF { } } #[inline] + pub unsafe fn is_gzip_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 31usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_is_gzip_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 31usize, + 1u8, + val as u64, + ) + } + } + #[inline] pub fn new_bitfield_1( errcode: ::std::os::raw::c_uint, reserved: ::std::os::raw::c_uint, @@ -18199,9 +12462,8 @@ impl BGZF { last_block_eof: ::std::os::raw::c_uint, is_compressed: ::std::os::raw::c_uint, is_gzip: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 16u8, { let errcode: u32 = unsafe { ::std::mem::transmute(errcode) }; errcode as u64 @@ -18241,171 +12503,163 @@ impl BGZF { __bindgen_bitfield_unit } } -extern "C" { +unsafe extern "C" { pub fn bgzf_dopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_open( path: *const ::std::os::raw::c_char, mode: *const ::std::os::raw::c_char, ) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_hopen(fp: *mut hFILE, mode: *const ::std::os::raw::c_char) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn bgzf_close(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { - pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: size_t) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { - pub fn bgzf_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_write(fp: *mut BGZF, data: *const ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_block_write( fp: *mut BGZF, data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; + length: usize, + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_peek(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { - pub fn bgzf_raw_read( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; +unsafe extern "C" { + pub fn bgzf_raw_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: usize) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_raw_write( fp: *mut BGZF, data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; + length: usize, + ) -> isize; } -extern "C" { +unsafe extern "C" { pub fn bgzf_flush(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_seek(fp: *mut BGZF, pos: i64, whence: ::std::os::raw::c_int) -> i64; } -extern "C" { +unsafe extern "C" { pub fn bgzf_check_EOF(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_compression(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_is_bgzf(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_set_cache_size(fp: *mut BGZF, size: ::std::os::raw::c_int); } -extern "C" { - pub fn bgzf_flush_try(fp: *mut BGZF, size: ssize_t) -> ::std::os::raw::c_int; +unsafe extern "C" { + pub fn bgzf_flush_try(fp: *mut BGZF, size: isize) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_getc(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_getline( fp: *mut BGZF, delim: ::std::os::raw::c_int, - str: *mut kstring_t, + str_: *mut kstring_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_read_block(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_thread_pool( fp: *mut BGZF, pool: *mut hts_tpool, qsize: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_mt( fp: *mut BGZF, n_threads: ::std::os::raw::c_int, n_sub_blks: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_compress( dst: *mut ::std::os::raw::c_void, - dlen: *mut size_t, + dlen: *mut usize, src: *const ::std::os::raw::c_void, - slen: size_t, + slen: usize, level: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_useek( fp: *mut BGZF, uoffset: off_t, where_: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_utell(fp: *mut BGZF) -> off_t; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_build_init(fp: *mut BGZF) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_load( fp: *mut BGZF, bname: *const ::std::os::raw::c_char, suffix: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_load_hfile( fp: *mut BGZF, idx: *mut hFILE, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_dump( fp: *mut BGZF, bname: *const ::std::os::raw::c_char, suffix: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bgzf_index_dump_hfile( fp: *mut BGZF, idx: *mut hFILE, name: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_trim_alleles(header: *const bcf_hdr_t, line: *mut bcf1_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_alleles( header: *const bcf_hdr_t, line: *mut bcf1_t, mask: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_remove_allele_set( header: *const bcf_hdr_t, line: *mut bcf1_t, rm_set: *const kbitset_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_calc_ac( header: *const bcf_hdr_t, line: *mut bcf1_t, @@ -18413,7 +12667,7 @@ extern "C" { which: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_gt_type( fmt_ptr: *mut bcf_fmt_t, isample: ::std::os::raw::c_int, @@ -18431,79 +12685,19 @@ pub struct tbx_conf_t { pub meta_char: i32, pub line_skip: i32, } -#[test] -fn bindgen_test_layout_tbx_conf_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(tbx_conf_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tbx_conf_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).preset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(preset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sc as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(sc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(bc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ec as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(ec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta_char as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(meta_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_skip as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(line_skip) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tbx_conf_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of tbx_conf_t"][::std::mem::align_of::() - 4usize]; + ["Offset of field: tbx_conf_t::preset"][::std::mem::offset_of!(tbx_conf_t, preset) - 0usize]; + ["Offset of field: tbx_conf_t::sc"][::std::mem::offset_of!(tbx_conf_t, sc) - 4usize]; + ["Offset of field: tbx_conf_t::bc"][::std::mem::offset_of!(tbx_conf_t, bc) - 8usize]; + ["Offset of field: tbx_conf_t::ec"][::std::mem::offset_of!(tbx_conf_t, ec) - 12usize]; + ["Offset of field: tbx_conf_t::meta_char"] + [::std::mem::offset_of!(tbx_conf_t, meta_char) - 16usize]; + ["Offset of field: tbx_conf_t::line_skip"] + [::std::mem::offset_of!(tbx_conf_t, line_skip) - 20usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct tbx_t { @@ -18511,72 +12705,37 @@ pub struct tbx_t { pub idx: *mut hts_idx_t, pub dict: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_tbx_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(tbx_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tbx_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(conf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(dict) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tbx_t"][::std::mem::size_of::() - 40usize]; + ["Alignment of tbx_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tbx_t::conf"][::std::mem::offset_of!(tbx_t, conf) - 0usize]; + ["Offset of field: tbx_t::idx"][::std::mem::offset_of!(tbx_t, idx) - 24usize]; + ["Offset of field: tbx_t::dict"][::std::mem::offset_of!(tbx_t, dict) - 32usize]; +}; +unsafe extern "C" { pub static tbx_conf_gff: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_bed: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_psltbl: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_sam: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub static tbx_conf_vcf: tbx_conf_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_name2id(tbx: *mut tbx_t, ss: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_get_bgzfp(fp: *mut htsFile) -> *mut BGZF; } -extern "C" { +unsafe extern "C" { pub fn tbx_readrec( fp: *mut BGZF, tbxv: *mut ::std::os::raw::c_void, @@ -18586,21 +12745,21 @@ extern "C" { end: *mut hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index( fp: *mut BGZF, min_shift: ::std::os::raw::c_int, conf: *const tbx_conf_t, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build( fn_: *const ::std::os::raw::c_char, min_shift: ::std::os::raw::c_int, conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -18608,7 +12767,7 @@ extern "C" { conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_build3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, @@ -18617,35 +12776,37 @@ extern "C" { conf: *const tbx_conf_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load(fn_: *const ::std::os::raw::c_char) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load2( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_index_load3( fn_: *const ::std::os::raw::c_char, fnidx: *const ::std::os::raw::c_char, flags: ::std::os::raw::c_int, ) -> *mut tbx_t; } -extern "C" { +unsafe extern "C" { pub fn tbx_seqnames( tbx: *mut tbx_t, n: *mut ::std::os::raw::c_int, ) -> *mut *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn tbx_destroy(tbx: *mut tbx_t); } pub const bcf_sr_opt_t_BCF_SR_REQUIRE_IDX: bcf_sr_opt_t = 0; pub const bcf_sr_opt_t_BCF_SR_PAIR_LOGIC: bcf_sr_opt_t = 1; pub const bcf_sr_opt_t_BCF_SR_ALLOW_NO_IDX: bcf_sr_opt_t = 2; -pub type bcf_sr_opt_t = u32; +pub const bcf_sr_opt_t_BCF_SR_REGIONS_OVERLAP: bcf_sr_opt_t = 3; +pub const bcf_sr_opt_t_BCF_SR_TARGETS_OVERLAP: bcf_sr_opt_t = 4; +pub type bcf_sr_opt_t = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_sr_region_t { @@ -18679,254 +12840,61 @@ pub struct bcf_sr_regions_t { pub prev_seq: ::std::os::raw::c_int, pub prev_start: hts_pos_t, pub prev_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bcf_sr_regions_t() { - assert_eq!( - ::std::mem::size_of::(), - 200usize, - concat!("Size of: ", stringify!(bcf_sr_regions_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_regions_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(tbx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).is_bin as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(is_bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als_str as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als_str) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nals as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(nals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mals as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(mals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als_type as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).missed_reg_handler as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(missed_reg_handler) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).missed_reg_data as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(missed_reg_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regs as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_hash as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(seq_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_names as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(seq_names) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nseqs as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(nseqs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).iseq as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(iseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_seq as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_start as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_end as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_end) - ) - ); -} + pub overlap: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_sr_regions_t"][::std::mem::size_of::() - 208usize]; + ["Alignment of bcf_sr_regions_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_sr_regions_t::tbx"] + [::std::mem::offset_of!(bcf_sr_regions_t, tbx) - 0usize]; + ["Offset of field: bcf_sr_regions_t::itr"] + [::std::mem::offset_of!(bcf_sr_regions_t, itr) - 8usize]; + ["Offset of field: bcf_sr_regions_t::line"] + [::std::mem::offset_of!(bcf_sr_regions_t, line) - 16usize]; + ["Offset of field: bcf_sr_regions_t::file"] + [::std::mem::offset_of!(bcf_sr_regions_t, file) - 40usize]; + ["Offset of field: bcf_sr_regions_t::fname"] + [::std::mem::offset_of!(bcf_sr_regions_t, fname) - 48usize]; + ["Offset of field: bcf_sr_regions_t::is_bin"] + [::std::mem::offset_of!(bcf_sr_regions_t, is_bin) - 56usize]; + ["Offset of field: bcf_sr_regions_t::als"] + [::std::mem::offset_of!(bcf_sr_regions_t, als) - 64usize]; + ["Offset of field: bcf_sr_regions_t::als_str"] + [::std::mem::offset_of!(bcf_sr_regions_t, als_str) - 72usize]; + ["Offset of field: bcf_sr_regions_t::nals"] + [::std::mem::offset_of!(bcf_sr_regions_t, nals) - 96usize]; + ["Offset of field: bcf_sr_regions_t::mals"] + [::std::mem::offset_of!(bcf_sr_regions_t, mals) - 100usize]; + ["Offset of field: bcf_sr_regions_t::als_type"] + [::std::mem::offset_of!(bcf_sr_regions_t, als_type) - 104usize]; + ["Offset of field: bcf_sr_regions_t::missed_reg_handler"] + [::std::mem::offset_of!(bcf_sr_regions_t, missed_reg_handler) - 112usize]; + ["Offset of field: bcf_sr_regions_t::missed_reg_data"] + [::std::mem::offset_of!(bcf_sr_regions_t, missed_reg_data) - 120usize]; + ["Offset of field: bcf_sr_regions_t::regs"] + [::std::mem::offset_of!(bcf_sr_regions_t, regs) - 128usize]; + ["Offset of field: bcf_sr_regions_t::seq_hash"] + [::std::mem::offset_of!(bcf_sr_regions_t, seq_hash) - 136usize]; + ["Offset of field: bcf_sr_regions_t::seq_names"] + [::std::mem::offset_of!(bcf_sr_regions_t, seq_names) - 144usize]; + ["Offset of field: bcf_sr_regions_t::nseqs"] + [::std::mem::offset_of!(bcf_sr_regions_t, nseqs) - 152usize]; + ["Offset of field: bcf_sr_regions_t::iseq"] + [::std::mem::offset_of!(bcf_sr_regions_t, iseq) - 156usize]; + ["Offset of field: bcf_sr_regions_t::start"] + [::std::mem::offset_of!(bcf_sr_regions_t, start) - 160usize]; + ["Offset of field: bcf_sr_regions_t::end"] + [::std::mem::offset_of!(bcf_sr_regions_t, end) - 168usize]; + ["Offset of field: bcf_sr_regions_t::prev_seq"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_seq) - 176usize]; + ["Offset of field: bcf_sr_regions_t::prev_start"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_start) - 184usize]; + ["Offset of field: bcf_sr_regions_t::prev_end"] + [::std::mem::offset_of!(bcf_sr_regions_t, prev_end) - 192usize]; + ["Offset of field: bcf_sr_regions_t::overlap"] + [::std::mem::offset_of!(bcf_sr_regions_t, overlap) - 200usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_sr_t { @@ -18944,149 +12912,26 @@ pub struct bcf_sr_t { pub samples: *mut ::std::os::raw::c_int, pub n_smpl: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_bcf_sr_t() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(bcf_sr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx_idx as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(tbx_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bcf_idx as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(bcf_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).header as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(header) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nbuffer as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbuffer as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(mbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nfilter_ids as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nfilter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filter_ids as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(filter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(n_smpl) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_sr_t"][::std::mem::size_of::() - 96usize]; + ["Alignment of bcf_sr_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_sr_t::file"][::std::mem::offset_of!(bcf_sr_t, file) - 0usize]; + ["Offset of field: bcf_sr_t::tbx_idx"][::std::mem::offset_of!(bcf_sr_t, tbx_idx) - 8usize]; + ["Offset of field: bcf_sr_t::bcf_idx"][::std::mem::offset_of!(bcf_sr_t, bcf_idx) - 16usize]; + ["Offset of field: bcf_sr_t::header"][::std::mem::offset_of!(bcf_sr_t, header) - 24usize]; + ["Offset of field: bcf_sr_t::itr"][::std::mem::offset_of!(bcf_sr_t, itr) - 32usize]; + ["Offset of field: bcf_sr_t::fname"][::std::mem::offset_of!(bcf_sr_t, fname) - 40usize]; + ["Offset of field: bcf_sr_t::buffer"][::std::mem::offset_of!(bcf_sr_t, buffer) - 48usize]; + ["Offset of field: bcf_sr_t::nbuffer"][::std::mem::offset_of!(bcf_sr_t, nbuffer) - 56usize]; + ["Offset of field: bcf_sr_t::mbuffer"][::std::mem::offset_of!(bcf_sr_t, mbuffer) - 60usize]; + ["Offset of field: bcf_sr_t::nfilter_ids"] + [::std::mem::offset_of!(bcf_sr_t, nfilter_ids) - 64usize]; + ["Offset of field: bcf_sr_t::filter_ids"] + [::std::mem::offset_of!(bcf_sr_t, filter_ids) - 72usize]; + ["Offset of field: bcf_sr_t::samples"][::std::mem::offset_of!(bcf_sr_t, samples) - 80usize]; + ["Offset of field: bcf_sr_t::n_smpl"][::std::mem::offset_of!(bcf_sr_t, n_smpl) - 88usize]; +}; pub const bcf_sr_error_open_failed: bcf_sr_error = 0; pub const bcf_sr_error_not_bgzf: bcf_sr_error = 1; pub const bcf_sr_error_idx_load_failed: bcf_sr_error = 2; @@ -19098,7 +12943,7 @@ pub const bcf_sr_error_no_memory: bcf_sr_error = 7; pub const bcf_sr_error_vcf_parse_error: bcf_sr_error = 8; pub const bcf_sr_error_bcf_read_error: bcf_sr_error = 9; pub const bcf_sr_error_noidx_error: bcf_sr_error = 10; -pub type bcf_sr_error = u32; +pub type bcf_sr_error = ::std::os::raw::c_uint; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct bcf_srs_t { @@ -19123,268 +12968,88 @@ pub struct bcf_srs_t { pub p: *mut htsThreadPool, pub aux: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout_bcf_srs_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(bcf_srs_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_srs_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).collapse as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(collapse) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).apply_filters as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(apply_filters) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).require_index as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(require_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_line as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(has_line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errnum as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(errnum) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readers as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(readers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nreaders as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(nreaders) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).streaming as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(streaming) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).explicit_regs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(explicit_regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regions as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(regions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_als as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_exclude as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_exclude) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tmps as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(tmps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_smpl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_threads as *const _ as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_threads) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).aux as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(aux) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of bcf_srs_t"][::std::mem::size_of::() - 144usize]; + ["Alignment of bcf_srs_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: bcf_srs_t::collapse"][::std::mem::offset_of!(bcf_srs_t, collapse) - 0usize]; + ["Offset of field: bcf_srs_t::apply_filters"] + [::std::mem::offset_of!(bcf_srs_t, apply_filters) - 8usize]; + ["Offset of field: bcf_srs_t::require_index"] + [::std::mem::offset_of!(bcf_srs_t, require_index) - 16usize]; + ["Offset of field: bcf_srs_t::max_unpack"] + [::std::mem::offset_of!(bcf_srs_t, max_unpack) - 20usize]; + ["Offset of field: bcf_srs_t::has_line"][::std::mem::offset_of!(bcf_srs_t, has_line) - 24usize]; + ["Offset of field: bcf_srs_t::errnum"][::std::mem::offset_of!(bcf_srs_t, errnum) - 32usize]; + ["Offset of field: bcf_srs_t::readers"][::std::mem::offset_of!(bcf_srs_t, readers) - 40usize]; + ["Offset of field: bcf_srs_t::nreaders"][::std::mem::offset_of!(bcf_srs_t, nreaders) - 48usize]; + ["Offset of field: bcf_srs_t::streaming"] + [::std::mem::offset_of!(bcf_srs_t, streaming) - 52usize]; + ["Offset of field: bcf_srs_t::explicit_regs"] + [::std::mem::offset_of!(bcf_srs_t, explicit_regs) - 56usize]; + ["Offset of field: bcf_srs_t::samples"][::std::mem::offset_of!(bcf_srs_t, samples) - 64usize]; + ["Offset of field: bcf_srs_t::regions"][::std::mem::offset_of!(bcf_srs_t, regions) - 72usize]; + ["Offset of field: bcf_srs_t::targets"][::std::mem::offset_of!(bcf_srs_t, targets) - 80usize]; + ["Offset of field: bcf_srs_t::targets_als"] + [::std::mem::offset_of!(bcf_srs_t, targets_als) - 88usize]; + ["Offset of field: bcf_srs_t::targets_exclude"] + [::std::mem::offset_of!(bcf_srs_t, targets_exclude) - 92usize]; + ["Offset of field: bcf_srs_t::tmps"][::std::mem::offset_of!(bcf_srs_t, tmps) - 96usize]; + ["Offset of field: bcf_srs_t::n_smpl"][::std::mem::offset_of!(bcf_srs_t, n_smpl) - 120usize]; + ["Offset of field: bcf_srs_t::n_threads"] + [::std::mem::offset_of!(bcf_srs_t, n_threads) - 124usize]; + ["Offset of field: bcf_srs_t::p"][::std::mem::offset_of!(bcf_srs_t, p) - 128usize]; + ["Offset of field: bcf_srs_t::aux"][::std::mem::offset_of!(bcf_srs_t, aux) - 136usize]; +}; +unsafe extern "C" { pub fn bcf_sr_init() -> *mut bcf_srs_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_destroy(readers: *mut bcf_srs_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_strerror(errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_opt(readers: *mut bcf_srs_t, opt: bcf_sr_opt_t, ...) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_threads( files: *mut bcf_srs_t, n_threads: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_destroy_threads(files: *mut bcf_srs_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_add_reader( readers: *mut bcf_srs_t, fname: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_remove_reader(files: *mut bcf_srs_t, i: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_next_line(readers: *mut bcf_srs_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_seek( readers: *mut bcf_srs_t, seq: *const ::std::os::raw::c_char, pos: hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_samples( readers: *mut bcf_srs_t, samples: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_targets( readers: *mut bcf_srs_t, targets: *const ::std::os::raw::c_char, @@ -19392,14 +13057,14 @@ extern "C" { alleles: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_set_regions( readers: *mut bcf_srs_t, regions: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_init( regions: *const ::std::os::raw::c_char, is_file: ::std::os::raw::c_int, @@ -19408,19 +13073,19 @@ extern "C" { to: ::std::os::raw::c_int, ) -> *mut bcf_sr_regions_t; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_destroy(regions: *mut bcf_sr_regions_t); } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_seek( regions: *mut bcf_sr_regions_t, chr: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_next(reg: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_overlap( reg: *mut bcf_sr_regions_t, seq: *const ::std::os::raw::c_char, @@ -19428,109 +13093,40 @@ extern "C" { end: hts_pos_t, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn bcf_sr_regions_flush(regs: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct kbitset_t { - pub n: size_t, - pub n_max: size_t, + pub n: usize, + pub n_max: usize, pub b: [::std::os::raw::c_ulong; 1usize], } -#[test] -fn bindgen_test_layout_kbitset_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n_max) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(b) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kbitset_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kbitset_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kbitset_t::n"][::std::mem::offset_of!(kbitset_t, n) - 0usize]; + ["Offset of field: kbitset_t::n_max"][::std::mem::offset_of!(kbitset_t, n_max) - 8usize]; + ["Offset of field: kbitset_t::b"][::std::mem::offset_of!(kbitset_t, b) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct kbitset_iter_t { pub mask: ::std::os::raw::c_ulong, - pub elt: size_t, + pub elt: usize, pub i: ::std::os::raw::c_int, } -#[test] -fn bindgen_test_layout_kbitset_iter_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(elt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(i) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kbitset_iter_t"][::std::mem::size_of::() - 24usize]; + ["Alignment of kbitset_iter_t"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kbitset_iter_t::mask"] + [::std::mem::offset_of!(kbitset_iter_t, mask) - 0usize]; + ["Offset of field: kbitset_iter_t::elt"][::std::mem::offset_of!(kbitset_iter_t, elt) - 8usize]; + ["Offset of field: kbitset_iter_t::i"][::std::mem::offset_of!(kbitset_iter_t, i) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct faidx_t { @@ -19539,23 +13135,23 @@ pub struct faidx_t { pub const fai_format_options_FAI_NONE: fai_format_options = 0; pub const fai_format_options_FAI_FASTA: fai_format_options = 1; pub const fai_format_options_FAI_FASTQ: fai_format_options = 2; -pub type fai_format_options = u32; -extern "C" { +pub type fai_format_options = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn fai_build3( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, fngzi: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_build(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_destroy(fai: *mut faidx_t); } pub const fai_load_options_FAI_CREATE: fai_load_options = 1; -pub type fai_load_options = u32; -extern "C" { +pub type fai_load_options = ::std::os::raw::c_uint; +unsafe extern "C" { pub fn fai_load3( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, @@ -19563,10 +13159,10 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load(fn_: *const ::std::os::raw::c_char) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load3_format( fn_: *const ::std::os::raw::c_char, fnfai: *const ::std::os::raw::c_char, @@ -19575,44 +13171,47 @@ extern "C" { format: fai_format_options, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_load_format( fn_: *const ::std::os::raw::c_char, format: fai_format_options, ) -> *mut faidx_t; } -extern "C" { +unsafe extern "C" { pub fn fai_fetch( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fai_fetch64( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn fai_line_length(fai: *const faidx_t, reg: *const ::std::os::raw::c_char) -> hts_pos_t; +} +unsafe extern "C" { pub fn fai_fetchqual( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn fai_fetchqual64( fai: *const faidx_t, reg: *const ::std::os::raw::c_char, len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_seq( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -19621,7 +13220,7 @@ extern "C" { len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_seq64( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -19630,7 +13229,7 @@ extern "C" { len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_qual( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -19639,7 +13238,7 @@ extern "C" { len: *mut ::std::os::raw::c_int, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_fetch_qual64( fai: *const faidx_t, c_name: *const ::std::os::raw::c_char, @@ -19648,28 +13247,31 @@ extern "C" { len: *mut hts_pos_t, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn faidx_has_seq( fai: *const faidx_t, seq: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn faidx_iseq( fai: *const faidx_t, i: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn faidx_seq_len64(fai: *const faidx_t, seq: *const ::std::os::raw::c_char) -> hts_pos_t; +} +unsafe extern "C" { pub fn faidx_seq_len( fai: *const faidx_t, seq: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn fai_parse_region( fai: *const faidx_t, s: *const ::std::os::raw::c_char, @@ -19679,10 +13281,25 @@ extern "C" { flags: ::std::os::raw::c_int, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { + pub fn fai_adjust_region( + fai: *const faidx_t, + tid: ::std::os::raw::c_int, + beg: *mut hts_pos_t, + end: *mut hts_pos_t, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn fai_set_cache_size(fai: *mut faidx_t, cache_size: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { + pub fn fai_thread_pool( + fai: *mut faidx_t, + pool: *mut hts_tpool, + qsize: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { pub fn fai_path(fa: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; } #[repr(C)] @@ -19695,13 +13312,13 @@ pub struct hts_tpool_process { pub struct hts_tpool_result { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_init(n: ::std::os::raw::c_int) -> *mut hts_tpool; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_size(p: *mut hts_tpool) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -19711,7 +13328,7 @@ extern "C" { arg: *mut ::std::os::raw::c_void, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch2( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -19722,7 +13339,7 @@ extern "C" { nonblock: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_dispatch3( p: *mut hts_tpool, q: *mut hts_tpool_process, @@ -19737,89 +13354,89 @@ extern "C" { nonblock: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_wake_dispatch(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_flush(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_reset( q: *mut hts_tpool_process, free_results: ::std::os::raw::c_int, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_qsize(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_destroy(p: *mut hts_tpool); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_kill(p: *mut hts_tpool); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_next_result(q: *mut hts_tpool_process) -> *mut hts_tpool_result; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_next_result_wait(q: *mut hts_tpool_process) -> *mut hts_tpool_result; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_delete_result(r: *mut hts_tpool_result, free_data: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_result_data(r: *mut hts_tpool_result) -> *mut ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_init( p: *mut hts_tpool, qsize: ::std::os::raw::c_int, in_only: ::std::os::raw::c_int, ) -> *mut hts_tpool_process; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_destroy(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_empty(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_len(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_sz(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_shutdown(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_is_shutdown(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_attach(p: *mut hts_tpool, q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_detach(p: *mut hts_tpool, q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_ref_incr(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { pub fn hts_tpool_process_ref_decr(q: *mut hts_tpool_process); } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_wrap_kbs_init2"] - pub fn kbs_init2(ni: size_t, fill: ::std::os::raw::c_int) -> *mut kbitset_t; + pub fn kbs_init2(ni: usize, fill: ::std::os::raw::c_int) -> *mut kbitset_t; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_wrap_kbs_init"] - pub fn kbs_init(ni: size_t) -> *mut kbitset_t; + pub fn kbs_init(ni: usize) -> *mut kbitset_t; } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_wrap_kbs_insert"] pub fn kbs_insert(bs: *mut kbitset_t, i: ::std::os::raw::c_int); } -extern "C" { +unsafe extern "C" { #[link_name = "\u{1}_wrap_kbs_destroy"] pub fn kbs_destroy(bs: *mut kbitset_t); } @@ -19832,56 +13449,16 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +};