[INFO] fetching crate survex-rs 0.1.7...
[INFO] testing survex-rs-0.1.7 against 1.100.0-beta.1+cargoflags=--release for beta-release-1.100-2
[INFO] extracting crate survex-rs 0.1.7 into /workspace/builds/worker-6-tc2/source
[INFO] started tweaking crates.io crate survex-rs 0.1.7
[INFO] finished tweaking crates.io crate survex-rs 0.1.7
[INFO] tweaked toml for crates.io crate survex-rs 0.1.7 written to /workspace/builds/worker-6-tc2/source/Cargo.toml
[INFO] validating manifest of crates.io crate survex-rs 0.1.7 on toolchain 1.100.0-beta.1
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.100.0-beta.1" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.100.0-beta.1" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]      Locking 70 packages to highest compatible versions
[INFO] [stderr]       Adding bindgen v0.66.1 (available: v0.73.2)
[INFO] [stderr]       Adding petgraph v0.6.5 (available: v0.8.3)
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.100.0-beta.1" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr] warning: `package.homepage` is redundant with `package.repository`
[INFO] [stderr]   --> Cargo.toml:19:12
[INFO] [stderr]    |
[INFO] [stderr] 19 | homepage = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] ...
[INFO] [stderr] 25 | repository = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |              ----------------------------------------
[INFO] [stderr]    |
[INFO] [stderr]    = note: `cargo::redundant_homepage` is set to `warn` by default
[INFO] [stderr] help: consider removing `package.homepage`
[INFO] [stderr] warning: `survex-rs` (manifest) generated 1 warning
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:77db811e55d90add9212f6832c23229e3de5f1c1f9905e8cb07319ea15df73ac" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] 5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96
[INFO] running `Command { std: "docker" "start" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.1" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.1" "build" "--frozen" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr] warning: `package.homepage` is redundant with `package.repository`
[INFO] [stderr]   --> Cargo.toml:19:12
[INFO] [stderr]    |
[INFO] [stderr] 19 | homepage = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] ...
[INFO] [stderr] 25 | repository = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |              ----------------------------------------
[INFO] [stderr]    |
[INFO] [stderr]    = note: `cargo::redundant_homepage` is set to `warn` by default
[INFO] [stderr] help: consider removing `package.homepage`
[INFO] [stderr] warning: `survex-rs` (manifest) generated 1 warning
[INFO] [stderr]    Compiling libc v0.2.191
[INFO] [stderr]    Compiling linux-raw-sys v0.4.15
[INFO] [stderr]    Compiling regex-syntax v0.8.11
[INFO] [stderr]    Compiling bindgen v0.66.1
[INFO] [stderr]    Compiling clang-sys v1.9.1
[INFO] [stderr]    Compiling rustix v0.38.44
[INFO] [stderr]    Compiling home v0.5.12
[INFO] [stderr]    Compiling either v1.19.0
[INFO] [stderr]    Compiling log v0.4.34
[INFO] [stderr]    Compiling syn v2.0.119
[INFO] [stderr]    Compiling fixedbitset v0.4.2
[INFO] [stderr]    Compiling petgraph v0.6.5
[INFO] [stderr]    Compiling getrandom v0.4.3
[INFO] [stderr]    Compiling rand v0.10.3
[INFO] [stderr]    Compiling uuid v1.28.0
[INFO] [stderr]    Compiling which v4.4.2
[INFO] [stderr]    Compiling regex-automata v0.4.18
[INFO] [stderr]    Compiling prettyplease v0.2.37
[INFO] [stderr]    Compiling regex v1.13.1
[INFO] [stderr]    Compiling survex-rs v0.1.7 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11294
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set_...
[INFO] [stdout]   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unnecessary_transmutes)]` on by default
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { u32::cast_signed (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11482
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val ...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = i32::cast_unsigned (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11872
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_uni...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { i32::cast_unsigned (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 23.73s
[INFO] running `Command { std: "docker" "inspect" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.1" "test" "--frozen" "--no-run" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr] warning: `package.homepage` is redundant with `package.repository`
[INFO] [stderr]   --> Cargo.toml:19:12
[INFO] [stderr]    |
[INFO] [stderr] 19 | homepage = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] ...
[INFO] [stderr] 25 | repository = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |              ----------------------------------------
[INFO] [stderr]    |
[INFO] [stderr]    = note: `cargo::redundant_homepage` is set to `warn` by default
[INFO] [stderr] help: consider removing `package.homepage`
[INFO] [stderr] warning: `survex-rs` (manifest) generated 1 warning
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11294
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set_...
[INFO] [stdout]   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unnecessary_transmutes)]` on by default
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { u32::cast_signed (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11482
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val ...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = i32::cast_unsigned (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]    Compiling survex-rs v0.1.7 (/opt/rustwide/workdir)
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11872
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_uni...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { i32::cast_unsigned (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11294
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...:: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set_...
[INFO] [stdout]   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout]   = note: `#[warn(unnecessary_transmutes)]` on by default
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { u32::cast_signed (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11482
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val ...
[INFO] [stdout]   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = i32::cast_unsigned (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] warning: unnecessary transmute
[INFO] [stdout]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11872
[INFO] [stdout]   |
[INFO] [stdout] 3 | ...0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_uni...
[INFO] [stdout]   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]   |
[INFO] [stdout] help: replace this with
[INFO] [stdout]   |
[INFO] [stdout] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { i32::cast_unsigned (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stdout]   |
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 0.83s
[INFO] running `Command { std: "docker" "inspect" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96" "/opt/rustwide/cargo-home/bin/cargo" "+1.100.0-beta.1" "test" "--frozen" "--release", kill_on_drop: false }`
[INFO] [stderr] warning: `package.homepage` is redundant with `package.repository`
[INFO] [stderr]   --> Cargo.toml:19:12
[INFO] [stderr]    |
[INFO] [stderr] 19 | homepage = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] ...
[INFO] [stderr] 25 | repository = "https://github.com/anorthall/survex-rs"
[INFO] [stderr]    |              ----------------------------------------
[INFO] [stderr]    |
[INFO] [stderr]    = note: `cargo::redundant_homepage` is set to `warn` by default
[INFO] [stderr] help: consider removing `package.homepage`
[INFO] [stderr] warning: `survex-rs` (manifest) generated 1 warning
[INFO] [stderr] warning: unnecessary transmute
[INFO] [stderr]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11294
[INFO] [stderr]   |
[INFO] [stderr] 3 | ...:: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set_...
[INFO] [stderr]   |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]   |
[INFO] [stderr]   = note: `#[warn(unnecessary_transmutes)]` on by default
[INFO] [stderr] help: replace this with
[INFO] [stderr]   |
[INFO] [stderr] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { u32::cast_signed (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr]   |
[INFO] [stderr] 
[INFO] [stderr] warning: unnecessary transmute
[INFO] [stderr]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11482
[INFO] [stderr]   |
[INFO] [stderr] 3 | ...: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val ...
[INFO] [stderr]   |                                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]   |
[INFO] [stderr] help: replace this with
[INFO] [stderr]   |
[INFO] [stderr] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = i32::cast_unsigned (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr]   |
[INFO] [stderr] 
[INFO] [stderr] warning: unnecessary transmute
[INFO] [stderr]  --> /opt/rustwide/target/release/build/survex-rs/eab6464508d21121/out/bindings.rs:3:11872
[INFO] [stderr]   |
[INFO] [stderr] 3 | ...0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_uni...
[INFO] [stderr]   |                                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr]   |
[INFO] [stderr] help: replace this with
[INFO] [stderr]   |
[INFO] [stderr] 3 - # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { :: std :: mem :: transmute (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr] 3 + # [repr (C)] # [derive (Copy , Clone , Debug , Default , Eq , Hash , Ord , PartialEq , PartialOrd)] pub struct __BindgenBitfieldUnit < Storage > { storage : Storage , } impl < Storage > __BindgenBitfieldUnit < Storage > { # [inline] pub const fn new (storage : Storage) -> Self { Self { storage } } } impl < Storage > __BindgenBitfieldUnit < Storage > 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] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; byte & mask == mask } # [inline] pub fn set_bit (& mut self , index : usize , val : bool) { debug_assert ! (index / 8 < self . storage . as_ref () . len ()) ; let byte_index = index / 8 ; let byte = & mut self . storage . as_mut () [byte_index] ; let bit_index = if cfg ! (target_endian = "big") { 7 - (index % 8) } else { index % 8 } ; let mask = 1 << bit_index ; if val { * byte |= mask ; } else { * byte &= ! mask ; } } # [inline] pub fn get (& self , bit_offset : usize , bit_width : u8) -> u64 { debug_assert ! (bit_width <= 64) ; debug_assert ! (bit_offset / 8 < self . storage . as_ref () . len ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; let mut val = 0 ; for i in 0 .. (bit_width as usize) { if self . get_bit (i + bit_offset) { 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 ()) ; debug_assert ! ((bit_offset + (bit_width as usize)) / 8 <= self . storage . as_ref () . len ()) ; for i in 0 .. (bit_width as usize) { let mask = 1 << i ; let val_bit_is_set = val & mask == mask ; let index = if cfg ! (target_endian = "big") { bit_width as usize - 1 - i } else { i } ; self . set_bit (index + bit_offset , val_bit_is_set) ; } } } pub type __uint64_t = :: std :: os :: raw :: c_ulong ; pub type __off_t = :: std :: os :: raw :: c_long ; pub type __off64_t = :: std :: os :: raw :: c_long ; pub type __time_t = :: std :: os :: raw :: c_long ; pub type FILE = _IO_FILE ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_marker { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_codecvt { _unused : [u8 ; 0] , } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct _IO_wide_data { _unused : [u8 ; 0] , } pub type _IO_lock_t = :: std :: os :: raw :: c_void ; # [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 _bitfield_align_1 : [u32 ; 0] , pub _bitfield_1 : __BindgenBitfieldUnit < [u8 ; 3usize] > , pub _short_backupbuf : [:: std :: os :: raw :: c_char ; 1usize] , 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 _codecvt : * mut _IO_codecvt , pub _wide_data : * mut _IO_wide_data , pub _freeres_list : * mut _IO_FILE , pub _freeres_buf : * mut :: std :: os :: raw :: c_void , pub _prevchain : * mut * mut _IO_FILE , pub _mode : :: std :: os :: raw :: c_int , pub _unused3 : :: std :: os :: raw :: c_int , pub _total_written : __uint64_t , pub _unused2 : [:: std :: os :: raw :: c_char ; 8usize] , } # [test] fn bindgen_test_layout__IO_FILE () { const UNINIT : :: std :: mem :: MaybeUninit < _IO_FILE > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; 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 :: addr_of ! ((* ptr) . _flags) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_ptr) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_end) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_read_base) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_read_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_base) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_ptr) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_ptr))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_write_end) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_write_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_base) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_buf_end) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_buf_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_base) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_backup_base) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_backup_base))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _IO_save_end) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_IO_save_end))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _markers) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_markers))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _chain) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_chain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _fileno) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_fileno))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _short_backupbuf) as usize - ptr as usize } , 119usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_short_backupbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _old_offset) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_old_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _cur_column) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_cur_column))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _vtable_offset) as usize - ptr as usize } , 130usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_vtable_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _shortbuf) as usize - ptr as usize } , 131usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_shortbuf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _lock) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_lock))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _offset) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_offset))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _codecvt) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_codecvt))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _wide_data) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_wide_data))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_list) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_list))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _freeres_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_freeres_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _prevchain) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_prevchain))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _mode) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_mode))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused3) as usize - ptr as usize } , 196usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused3))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _total_written) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_total_written))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . _unused2) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (_IO_FILE) , "::" , stringify ! (_unused2))) ; } impl _IO_FILE { # [inline] pub fn _flags2 (& self) -> :: std :: os :: raw :: c_int { unsafe { :: std :: mem :: transmute (self . _bitfield_1 . get (0usize , 24u8) as u32) } } # [inline] pub fn set__flags2 (& mut self , val : :: std :: os :: raw :: c_int) { unsafe { let val : u32 = :: std :: mem :: transmute (val) ; self . _bitfield_1 . set (0usize , 24u8 , val as u64) } } # [inline] pub fn new_bitfield_1 (_flags2 : :: std :: os :: raw :: c_int) -> __BindgenBitfieldUnit < [u8 ; 3usize] > { let mut __bindgen_bitfield_unit : __BindgenBitfieldUnit < [u8 ; 3usize] > = Default :: default () ; __bindgen_bitfield_unit . set (0usize , 24u8 , { let _flags2 : u32 = unsafe { i32::cast_unsigned (_flags2) } ; _flags2 as u64 }) ; __bindgen_bitfield_unit } } pub type time_t = __time_t ; # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img_point { pub x : f64 , pub y : f64 , pub z : f64 , } # [test] fn bindgen_test_layout_img_point () { const UNINIT : :: std :: mem :: MaybeUninit < img_point > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img_point > () , 24usize , concat ! ("Size of: " , stringify ! (img_point))) ; assert_eq ! (:: std :: mem :: align_of :: < img_point > () , 8usize , concat ! ("Alignment of " , stringify ! (img_point))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . x) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (x))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . y) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (y))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . z) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img_point) , "::" , stringify ! (z))) ; } # [repr (C)] # [derive (Debug , Copy , Clone)] pub struct img { pub label : * mut :: std :: os :: raw :: c_char , pub flags : :: std :: os :: raw :: c_int , pub title : * mut :: std :: os :: raw :: c_char , pub cs : * mut :: std :: os :: raw :: c_char , pub datestamp : * mut :: std :: os :: raw :: c_char , pub datestamp_numeric : time_t , pub separator : :: std :: os :: raw :: c_char , pub date1 : time_t , pub date2 : time_t , pub l : f64 , pub r : f64 , pub u : f64 , pub d : f64 , pub n_legs : :: std :: os :: raw :: c_int , pub length : f64 , pub E : f64 , pub H : f64 , pub V : f64 , pub filename_opened : * mut :: std :: os :: raw :: c_char , pub is_extended_elevation : :: std :: os :: raw :: c_int , pub style : :: std :: os :: raw :: c_int , pub fh : * mut FILE , pub close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , pub label_buf : * mut :: std :: os :: raw :: c_char , pub buf_len : usize , pub label_len : usize , pub fRead : :: std :: os :: raw :: c_int , pub start : :: std :: os :: raw :: c_long , pub version : :: std :: os :: raw :: c_int , pub survey : * mut :: std :: os :: raw :: c_char , pub survey_len : usize , pub pending : :: std :: os :: raw :: c_int , pub mv : img_point , pub olddate1 : time_t , pub olddate2 : time_t , pub oldstyle : :: std :: os :: raw :: c_int , } # [test] fn bindgen_test_layout_img () { const UNINIT : :: std :: mem :: MaybeUninit < img > = :: std :: mem :: MaybeUninit :: uninit () ; let ptr = UNINIT . as_ptr () ; assert_eq ! (:: std :: mem :: size_of :: < img > () , 296usize , concat ! ("Size of: " , stringify ! (img))) ; assert_eq ! (:: std :: mem :: align_of :: < img > () , 8usize , concat ! ("Alignment of " , stringify ! (img))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label) as usize - ptr as usize } , 0usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . flags) as usize - ptr as usize } , 8usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (flags))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . title) as usize - ptr as usize } , 16usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (title))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . cs) as usize - ptr as usize } , 24usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (cs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp) as usize - ptr as usize } , 32usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . datestamp_numeric) as usize - ptr as usize } , 40usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (datestamp_numeric))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . separator) as usize - ptr as usize } , 48usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (separator))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date1) as usize - ptr as usize } , 56usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . date2) as usize - ptr as usize } , 64usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (date2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . l) as usize - ptr as usize } , 72usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (l))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . r) as usize - ptr as usize } , 80usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (r))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . u) as usize - ptr as usize } , 88usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (u))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . d) as usize - ptr as usize } , 96usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (d))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . n_legs) as usize - ptr as usize } , 104usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (n_legs))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . length) as usize - ptr as usize } , 112usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (length))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . E) as usize - ptr as usize } , 120usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (E))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . H) as usize - ptr as usize } , 128usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (H))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . V) as usize - ptr as usize } , 136usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (V))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . filename_opened) as usize - ptr as usize } , 144usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (filename_opened))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . is_extended_elevation) as usize - ptr as usize } , 152usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (is_extended_elevation))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . style) as usize - ptr as usize } , 156usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (style))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fh) as usize - ptr as usize } , 160usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fh))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . close_func) as usize - ptr as usize } , 168usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (close_func))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_buf) as usize - ptr as usize } , 176usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_buf))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . buf_len) as usize - ptr as usize } , 184usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (buf_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . label_len) as usize - ptr as usize } , 192usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (label_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . fRead) as usize - ptr as usize } , 200usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (fRead))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . start) as usize - ptr as usize } , 208usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (start))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . version) as usize - ptr as usize } , 216usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (version))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey) as usize - ptr as usize } , 224usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . survey_len) as usize - ptr as usize } , 232usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (survey_len))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . pending) as usize - ptr as usize } , 240usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (pending))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . mv) as usize - ptr as usize } , 248usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (mv))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate1) as usize - ptr as usize } , 272usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate1))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . olddate2) as usize - ptr as usize } , 280usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (olddate2))) ; assert_eq ! (unsafe { :: std :: ptr :: addr_of ! ((* ptr) . oldstyle) as usize - ptr as usize } , 288usize , concat ! ("Offset of field: " , stringify ! (img) , "::" , stringify ! (oldstyle))) ; } extern "C" { pub fn img_open_survey (fnm : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_read_stream_survey (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , filename : * const :: std :: os :: raw :: c_char , survey : * const :: std :: os :: raw :: c_char) -> * mut img ; } extern "C" { pub fn img_open_write_cs (fnm : * const :: std :: os :: raw :: c_char , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_write_stream (stream : * mut FILE , close_func : :: std :: option :: Option < unsafe extern "C" fn (arg1 : * mut FILE) -> :: std :: os :: raw :: c_int > , title : * const :: std :: os :: raw :: c_char , cs : * const :: std :: os :: raw :: c_char , flags : :: std :: os :: raw :: c_int) -> * mut img ; } extern "C" { pub fn img_read_item (pimg : * mut img , p : * mut img_point) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_write_item (pimg : * mut img , code : :: std :: os :: raw :: c_int , flags : :: std :: os :: raw :: c_int , s : * const :: std :: os :: raw :: c_char , x : f64 , y : f64 , z : f64) ; } extern "C" { pub fn img_write_errors (pimg : * mut img , n_legs : :: std :: os :: raw :: c_int , length : f64 , E : f64 , H : f64 , V : f64) ; } extern "C" { pub fn img_rewind (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } extern "C" { pub fn img_close (pimg : * mut img) -> :: std :: os :: raw :: c_int ; } pub const img_errcode_IMG_NONE : img_errcode = 0 ; pub const img_errcode_IMG_FILENOTFOUND : img_errcode = 1 ; pub const img_errcode_IMG_OUTOFMEMORY : img_errcode = 2 ; pub const img_errcode_IMG_CANTOPENOUT : img_errcode = 3 ; pub const img_errcode_IMG_BADFORMAT : img_errcode = 4 ; pub const img_errcode_IMG_DIRECTORY : img_errcode = 5 ; pub const img_errcode_IMG_READERROR : img_errcode = 6 ; pub const img_errcode_IMG_WRITEERROR : img_errcode = 7 ; pub const img_errcode_IMG_TOONEW : img_errcode = 8 ; pub type img_errcode = :: std :: os :: raw :: c_uint ; extern "C" { pub fn img_error () -> img_errcode ; }
[INFO] [stderr]   |
[INFO] [stderr] 
[INFO] [stderr] warning: `survex-rs` (lib) generated 3 warnings (run `cargo fix --lib -p survex-rs` to apply 3 suggestions)
[INFO] [stderr] warning: `survex-rs` (lib test) generated 3 warnings (3 duplicates)
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 0.07s
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/release/build/survex-rs/40c465f5aae4c286/out/survex_rs-40c465f5aae4c286)
[INFO] [stdout] 
[INFO] [stdout] running 10 tests
[INFO] [stdout] test survex::bindgen_test_layout_img ... ok
[INFO] [stdout] test survex::bindgen_test_layout__IO_FILE ... ok
[INFO] [stdout] test survex::bindgen_test_layout_img_point ... ok
[INFO] [stdout] test read::tests::check_correct_number_nodes_generated ... FAILED
[INFO] [stdout] test read::tests::load_invalid_file ... ok
[INFO] [stdout] test read::tests::test_absent_lrud_measurements_are_represented_correctly ... FAILED
[INFO] [stdout] test read::tests::test_lrud_measurements_are_represented_correctly ... FAILED
[INFO] [stdout] test read::tests::test_flags_are_set_correctly ... FAILED
[INFO] [stdout] test read::tests::check_correct_number_legs_generated ... FAILED
[INFO] [stdout] test read::tests::load_file ... FAILED
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::check_correct_number_nodes_generated stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::check_correct_number_nodes_generated' (683) panicked at src/read.rs:242:44:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: "Could not open Survex file"
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7032 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f6e2 - core[a373ad73a504971]::result::unwrap_failed
[INFO] [stdout]   12:     0x5f7cc419945f - <survex_rs[22f812fcc630d6c5]::read::tests::check_correct_number_nodes_generated::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::test_absent_lrud_measurements_are_represented_correctly stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::test_absent_lrud_measurements_are_represented_correctly' (686) panicked at src/read.rs:266:44:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: "Could not open Survex file"
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7032 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f6e2 - core[a373ad73a504971]::result::unwrap_failed
[INFO] [stdout]   12:     0x5f7cc4199cce - <survex_rs[22f812fcc630d6c5]::read::tests::test_absent_lrud_measurements_are_represented_correctly::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::test_lrud_measurements_are_represented_correctly stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::test_lrud_measurements_are_represented_correctly' (688) panicked at src/read.rs:280:44:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: "Could not open Survex file"
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7032 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f6e2 - core[a373ad73a504971]::result::unwrap_failed
[INFO] [stdout]   12:     0x5f7cc4199909 - <survex_rs[22f812fcc630d6c5]::read::tests::test_lrud_measurements_are_represented_correctly::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::test_flags_are_set_correctly stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::test_flags_are_set_correctly' (687) panicked at src/read.rs:294:44:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: "Could not open Survex file"
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7032 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f6e2 - core[a373ad73a504971]::result::unwrap_failed
[INFO] [stdout]   12:     0x5f7cc4198866 - <survex_rs[22f812fcc630d6c5]::read::tests::test_flags_are_set_correctly::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::check_correct_number_legs_generated stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::check_correct_number_legs_generated' (682) panicked at src/read.rs:255:44:
[INFO] [stdout] called `Result::unwrap()` on an `Err` value: "Could not open Survex file"
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7032 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f6e2 - core[a373ad73a504971]::result::unwrap_failed
[INFO] [stdout]   12:     0x5f7cc4198fbf - <survex_rs[22f812fcc630d6c5]::read::tests::check_correct_number_legs_generated::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] ---- read::tests::load_file stdout ----
[INFO] [stdout] 
[INFO] [stdout] thread 'read::tests::load_file' (684) panicked at src/read.rs:227:9:
[INFO] [stdout] assertion failed: load_from_path(path).is_ok()
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x5f7cc421ab21 - <<std[617be2ca0a6fd877]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[a373ad73a504971]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x5f7cc422f1aa - core[a373ad73a504971]::fmt::write
[INFO] [stdout]    2:     0x5f7cc421edec - <alloc[2e1b2a31b91974c5]::vec::Vec<u8> as core[a373ad73a504971]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x5f7cc41f6f86 - std[617be2ca0a6fd877]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x5f7cc42131b9 - std[617be2ca0a6fd877]::panicking::default_hook
[INFO] [stdout]    5:     0x5f7cc41ae050 - test[aada8e7e76ba119b]::test_main_inner::{closure#0}
[INFO] [stdout]    6:     0x5f7cc4213372 - std[617be2ca0a6fd877]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x5f7cc41f7064 - std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x5f7cc41efd19 - std[617be2ca0a6fd877]::sys::backtrace::__rust_end_short_backtrace::<std[617be2ca0a6fd877]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x5f7cc41f7c3d - __rustc[ea4f61d10b84890b]::rust_begin_unwind
[INFO] [stdout]   10:     0x5f7cc422f90c - core[a373ad73a504971]::panicking::panic_fmt
[INFO] [stdout]   11:     0x5f7cc422f8d2 - core[a373ad73a504971]::panicking::panic
[INFO] [stdout]   12:     0x5f7cc4199e2d - <survex_rs[22f812fcc630d6c5]::read::tests::load_file::{closure#0} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   13:     0x5f7cc41a149b - test[aada8e7e76ba119b]::__rust_begin_short_backtrace::<core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>, fn() -> core[a373ad73a504971]::result::Result<(), alloc[2e1b2a31b91974c5]::string::String>>
[INFO] [stdout]   14:     0x5f7cc41ae675 - test[aada8e7e76ba119b]::run_test::{closure#0}
[INFO] [stdout]   15:     0x5f7cc41a7f64 - std[617be2ca0a6fd877]::sys::backtrace::__rust_begin_short_backtrace::<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>
[INFO] [stdout]   16:     0x5f7cc41b1702 - <std[617be2ca0a6fd877]::thread::lifecycle::spawn_unchecked<test[aada8e7e76ba119b]::run_test::{closure#1}, ()>::{closure#1} as core[a373ad73a504971]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   17:     0x5f7cc421a37f - <std[617be2ca0a6fd877]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   18:     0x71e5d08bcdfa - <unknown>
[INFO] [stdout]   19:     0x71e5d09503d4 - clone
[INFO] [stdout]   20:                0x0 - <unknown>
[INFO] [stdout] 
[INFO] [stdout] 
[INFO] [stdout] failures:
[INFO] [stdout]     read::tests::check_correct_number_legs_generated
[INFO] [stdout]     read::tests::check_correct_number_nodes_generated
[INFO] [stdout]     read::tests::load_file
[INFO] [stdout]     read::tests::test_absent_lrud_measurements_are_represented_correctly
[INFO] [stdout]     read::tests::test_flags_are_set_correctly
[INFO] [stdout]     read::tests::test_lrud_measurements_are_represented_correctly
[INFO] [stdout] 
[INFO] [stdout] test result: FAILED. 4 passed; 6 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[INFO] [stdout] 
[INFO] [stderr] error: test failed, to rerun pass `--lib`
[INFO] running `Command { std: "docker" "inspect" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96", kill_on_drop: false }`
[INFO] [stdout] 5d23d56bddc1509cc0b52201da11926bc80b831f177ef4876600145bbea1dd96
