diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 57d0c798a..49bbe9fcc 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -10,51 +10,32 @@ jobs: if: github.repository_owner == 'rust-bio' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 with: submodules: recursive - - - uses: GoogleCloudPlatform/release-please-action@v3 - id: release_sys - with: - release-type: rust - package-name: hts-sys - monorepo-tags: true - path: hts-sys - - uses: GoogleCloudPlatform/release-please-action@v3 id: release_main with: release-type: rust package-name: rust-htslib bump-minor-pre-major: true - monorepo-tags: true - path: "." - name: Install stable toolchain uses: actions-rs/toolchain@v1 - if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }} + if: ${{ steps.release_main.outputs.release_created }} with: toolchain: stable override: true - name: Install system dependencies - if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }} + if: ${{ steps.release_main.outputs.release_created }} run: | - sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev + sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev - uses: Swatinem/rust-cache@v1.3.0 - if: ${{ steps.release_main.outputs.release_created || steps.release_sys.outputs.release_created }} - - - name: Publish hts-sys - if: ${{ steps.release_sys.outputs.release_created }} - uses: actions-rs/cargo@v1 - with: - command: publish - args: --manifest-path hts-sys/Cargo.toml --token ${{ secrets.CRATES_IO_TOKEN }} - + if: ${{ steps.release_main.outputs.release_created }} + - name: Publish rust-htslib if: ${{ steps.release_main.outputs.release_created }} uses: actions-rs/cargo@v1 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9d240cbb8..2a9890772 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,9 +2,9 @@ name: CI on: push: - branches: [ master ] + branches: [master] pull_request: - branches: [ master ] + branches: [master] jobs: Formatting: @@ -19,10 +19,10 @@ jobs: toolchain: stable override: true components: rustfmt - + - name: Check format run: cargo fmt -- --check - + Linting: runs-on: ubuntu-latest steps: @@ -52,29 +52,31 @@ jobs: with: submodules: recursive - - name: Install stable toolchain + - name: Install nightly toolchain uses: actions-rs/toolchain@v1.0.6 with: - toolchain: stable + toolchain: nightly override: true - name: Install system dependencies run: | - sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev + sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev - uses: Swatinem/rust-cache@v1.3.0 - name: Run cargo-tarpaulin uses: actions-rs/tarpaulin@v0.1 with: - args: '--all-features --out Lcov --exclude-files hts-sys/*_prebuilt_bindings.rs -- --test-threads 1' + # TODO: update to latest tarpaulin once artefact download is fixed: https://github.com/actions-rs/tarpaulin/pull/23 + version: "0.22.0" + args: "--all-features --run-types Tests,Doctests --out Lcov -- --test-threads 1" - name: Upload coverage - uses: coverallsapp/github-action@v1.1.1 + uses: coverallsapp/github-action@v1 with: github-token: ${{ secrets.GITHUB_TOKEN }} path-to-lcov: ./lcov.info - + Testing-Features: needs: Formatting runs-on: ubuntu-latest @@ -83,9 +85,6 @@ jobs: target: - no-default-features - all-features - - musl-release-no-default-features - - musl-release-all-features - - musl-all-features include: - target: no-default-features args: --no-default-features @@ -94,19 +93,7 @@ jobs: args: --all-features toolchain_target: x86_64-unknown-linux-musl use_cross: false - - target: musl-release-no-default-features - args: --release --target x86_64-unknown-linux-musl --no-default-features - toolchain_target: x86_64-unknown-linux-musl - use_cross: true - - target: musl-release-all-features - args: --release --target x86_64-unknown-linux-musl --all-features --verbose - toolchain_target: x86_64-unknown-linux-musl - use_cross: true - - target: musl-all-features - args: --target x86_64-unknown-linux-musl --all-features --verbose - toolchain_target: x86_64-unknown-linux-musl - use_cross: true - + steps: - name: Checkout repository uses: actions/checkout@v2 @@ -121,7 +108,7 @@ jobs: - name: Install system dependencies run: | - sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev + sudo apt-get install --yes zlib1g-dev libbz2-dev musl musl-dev musl-tools clang libc6-dev - uses: Swatinem/rust-cache@v1.3.0 @@ -134,33 +121,32 @@ jobs: Testing-MacOS: needs: Formatting - runs-on: macOS-latest + runs-on: macos-latest strategy: matrix: target: - - intel-catalina - - intel-bigsur - - m1-bigsur + - intel-monterey + - intel-ventura + - silicon-sonoma include: - - target: intel-catalina - os: macOS-10.15 + - target: intel-monterey + os: macOS-12.0 toolchain_target: x86_64-apple-darwin toolchain: stable - aux_args: "" - default: false - - target: intel-bigsur - os: macOS-11.0 + aux_args: --target x86_64-apple-darwin + default: true + - target: intel-ventura + os: macOS-13.0 toolchain_target: x86_64-apple-darwin toolchain: stable + aux_args: --target x86_64-apple-darwin + default: true + - target: silicon-sonoma + os: macOS-14.0 + toolchain_target: aarch64-apple-darwin + toolchain: stable aux_args: "" default: false - # TODO enable again and try to find out why this fails - # - target: m1-bigsur - # os: macOS-11.0 - # toolchain_target: aarch64-apple-darwin - # toolchain: nightly - # aux_args: --target aarch64-apple-darwin - # default: true steps: - name: Checkout repository @@ -171,55 +157,49 @@ jobs: - name: Install stable toolchain uses: actions-rs/toolchain@v1.0.6 with: - toolchain: stable + toolchain: ${{ matrix.toolchain }} + target: ${{ matrix.toolchain_target }} override: true + default: ${{ matrix.default }} - name: Install htslib dependencies run: brew install bzip2 zlib xz curl-openssl - #- uses: actions-rs/toolchain@v1.0.6 - # with: - # toolchain: ${{ matrix.toolchain }} - # target: ${{ matrix.toolchain_target }} - # #override: true - # default: ${{ matrix.default }} - - name: Test uses: actions-rs/cargo@v1.0.1 with: - use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017 + use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017 command: test args: --release --all-features --verbose ${{ matrix.aux_args }} - # Testing-OSX-MUSL-BigSur: # needs: Formatting # runs-on: macOS-11.0 # steps: - # Test MUSL builds on OSX - # - # - uses: actions-rs/toolchain@v1.0.6 - # with: - # toolchain: stable - # target: x86_64-unknown-linux-musl - # override: true - - # - name: Install OSX musl-cross - # run: brew install FiloSottile/musl-cross/musl-cross - - # # https://github.com/FiloSottile/homebrew-musl-cross/issues/16 - # - name: Provide musl-gcc symlink for the right musl arch - # run: ln -sf /usr/local/opt/musl-cross/libexec/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc - - # - name: Test musl build without default features - # uses: actions-rs/cargo@v1 - # with: - # use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017 - # command: test - # args: --release --target x86_64-unknown-linux-musl --no-default-features - - # - name: Test musl build with all features and debug symbols (non --release) on OSX - # uses: actions-rs/cargo@v1.0.1 - # with: - # use-cross: false - # command: test - # args: --target x86_64-unknown-linux-musl --all-features --verbose +# Test MUSL builds on OSX +# +# - uses: actions-rs/toolchain@v1.0.6 +# with: +# toolchain: stable +# target: x86_64-unknown-linux-musl +# override: true + +# - name: Install OSX musl-cross +# run: brew install FiloSottile/musl-cross/musl-cross + +# # https://github.com/FiloSottile/homebrew-musl-cross/issues/16 +# - name: Provide musl-gcc symlink for the right musl arch +# run: ln -sf /usr/local/opt/musl-cross/libexec/bin/x86_64-linux-musl-gcc /usr/local/bin/musl-gcc + +# - name: Test musl build without default features +# uses: actions-rs/cargo@v1 +# with: +# use-cross: false # cross is not supported on GHA OSX runner, see: https://github.community/t/why-is-docker-not-installed-on-macos/17017 +# command: test +# args: --release --target x86_64-unknown-linux-musl --no-default-features + +# - name: Test musl build with all features and debug symbols (non --release) on OSX +# uses: actions-rs/cargo@v1.0.1 +# with: +# use-cross: false +# command: test +# args: --target x86_64-unknown-linux-musl --all-features --verbose diff --git a/.gitmodules b/.gitmodules index 2a109d59d..e69de29bb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +0,0 @@ -[submodule "htslib"] - path = hts-sys/htslib - url = https://github.com/samtools/htslib.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f1e7a853..e195e3f1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,110 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [0.46.0](https://github.com/rust-bio/rust-htslib/compare/v0.45.0...v0.46.0) (2024-02-22) + + +### Features + +* making several RecordBuffer methods public ([6757f52](https://github.com/rust-bio/rust-htslib/commit/6757f5219955fd4edba4f61e62978ce1e001068e)) + + +### Bug Fixes + +* fix building libz-sys ([#420](https://github.com/rust-bio/rust-htslib/issues/420)) ([01c8849](https://github.com/rust-bio/rust-htslib/commit/01c884945686e7a6756406b579fde28657f70b36)) + +## [0.45.0](https://github.com/rust-bio/rust-htslib/compare/v0.44.1...v0.45.0) (2024-02-07) + + +### Features + +* adding function to get sequence length to faidx mod ([#410](https://github.com/rust-bio/rust-htslib/issues/410)) ([ae79eba](https://github.com/rust-bio/rust-htslib/commit/ae79eba82ef6929105bdbe08246a8e973660899e)) + + +### Bug Fixes + +* Loosen acceptable types to support current linux build on aarch64 ([#415](https://github.com/rust-bio/rust-htslib/issues/415)) ([1d78d12](https://github.com/rust-bio/rust-htslib/commit/1d78d1251a052461605d28cd8cf832ccad93ef73)) + +## [0.44.1](https://github.com/rust-bio/rust-htslib/compare/v0.44.0...v0.44.1) (2023-06-21) + + +### Bug Fixes + +* use correct return value in bcf_get_format and bcf_get_info_values ([#398](https://github.com/rust-bio/rust-htslib/issues/398)) ([f9a1981](https://github.com/rust-bio/rust-htslib/commit/f9a1981fa84eef39e35f868ddfc773ea265b94b3)) + +## [0.44.0](https://github.com/rust-bio/rust-htslib/compare/v0.43.1...v0.44.0) (2023-06-20) + + +### Features + +* implement Clone for bcf::Record ([#394](https://github.com/rust-bio/rust-htslib/issues/394)) ([e89538d](https://github.com/rust-bio/rust-htslib/commit/e89538d5a9971c6508ac38d92ac468f3d70241aa)) +* implement htslib basemod api ([#385](https://github.com/rust-bio/rust-htslib/issues/385)) ([8beee14](https://github.com/rust-bio/rust-htslib/commit/8beee145a116f7ae936f1b6e36d876116dca18f1)) + + +### Bug Fixes + +* include doctests in test coverage calculations ([#397](https://github.com/rust-bio/rust-htslib/issues/397)) ([8ed0837](https://github.com/rust-bio/rust-htslib/commit/8ed083783fa1dce09535564a090d37f687fc832f)) + +## [0.43.1](https://github.com/rust-bio/rust-htslib/compare/v0.43.0...v0.43.1) (2023-05-16) + + +### Bug Fixes + +* implement Drop for faidx::Reader, destroying the fai handle ([#391](https://github.com/rust-bio/rust-htslib/issues/391)) ([0e6d6ac](https://github.com/rust-bio/rust-htslib/commit/0e6d6acec9a6d24ed6baf810e56f02394737a046)) + +## [0.43.0](https://github.com/rust-bio/rust-htslib/compare/v0.42.0...v0.43.0) (2023-05-12) + + +### Features + +* HeaderRecord::push_tag: Value may be owned ([#388](https://github.com/rust-bio/rust-htslib/issues/388)) ([b64537d](https://github.com/rust-bio/rust-htslib/commit/b64537db011b76e5ace73a5e74c598a62a0a018b)) +* Index for `bam::IndexedReader` ([#387](https://github.com/rust-bio/rust-htslib/issues/387)) ([fb74387](https://github.com/rust-bio/rust-htslib/commit/fb743875182c9232894e07007367f09f05d6e275)) + +## [0.42.0](https://github.com/rust-bio/rust-htslib/compare/v0.41.1...v0.42.0) (2023-03-30) + + +### Features + +* Add ability to fetch number of sequences and I-th sequence from FAI index ([#377](https://github.com/rust-bio/rust-htslib/issues/377)) ([6ecc4bd](https://github.com/rust-bio/rust-htslib/commit/6ecc4bd1f88110da278c7f934453024e4e64ac74)) + +## [0.41.1](https://github.com/rust-bio/rust-htslib/compare/v0.41.0...v0.41.1) (2023-03-03) + +### Features + +* Revised calculation of leading- and trailing-softclips ([#375](https://github.com/rust-bio/rust-htslib/issues/375)) ([b61dd2c](https://github.com/rust-bio/rust-htslib/commit/b61dd2cfb2b74c0180f2d76bbd4ed4eb14fa09b3)) + + +### Performance Improvements + +* update htslib and corresponding bindings to 1.16 ([#366](https://github.com/rust-bio/rust-htslib/issues/366)) ([f597ce0](https://github.com/rust-bio/rust-htslib/commit/f597ce0451e3f3c393166a7291486bbc2bde4c39)) + + +## [0.40.2](https://github.com/rust-bio/rust-htslib/compare/rust-htslib-v0.40.1...rust-htslib-v0.40.2) (2022-10-13) + + +### Performance Improvements + +* update htslib and corresponding bindings to 1.16 ([#366](https://github.com/rust-bio/rust-htslib/issues/366)) ([f597ce0](https://github.com/rust-bio/rust-htslib/commit/f597ce0451e3f3c393166a7291486bbc2bde4c39)) + +## [0.40.1](https://github.com/rust-bio/rust-htslib/compare/rust-htslib-v0.40.0...rust-htslib-v0.40.1) (2022-08-24) + + +### Bug Fixes + +* Header::to_hashmap skips `@CO` tags, add `comments()` method ([#363](https://github.com/rust-bio/rust-htslib/issues/363)) ([c24a7f6](https://github.com/rust-bio/rust-htslib/commit/c24a7f69fbe5d2db4a6f1fbd6eda3922fe7f1c18)) + +## [0.40.0](https://github.com/rust-bio/rust-htslib/compare/rust-htslib-v0.39.5...rust-htslib-v0.40.0) (2022-07-05) + + +### Features + +* Add wrapper of BGZF writer ([#349](https://github.com/rust-bio/rust-htslib/issues/349)) ([965ed88](https://github.com/rust-bio/rust-htslib/commit/965ed886a0c24ee3070e48cc192c0772ac5cbaf4)) + + +### Bug Fixes + +* update to latest release-please ([b130634](https://github.com/rust-bio/rust-htslib/commit/b130634b3d096e620dcfe59acae2200df3e4d847)) + ### [0.39.5](https://www.github.com/rust-bio/rust-htslib/compare/rust-htslib-v0.39.4...rust-htslib-v0.39.5) (2022-05-09) diff --git a/Cargo.toml b/Cargo.toml index c29161e9a..b12df281b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,55 +1,52 @@ [package] -name = "rust-htslib" -version = "0.39.5" authors = ["Christopher Schröder ", "Johannes Köster "] description = "This library provides HTSlib bindings and a high level Rust API for reading and writing BAM files." -readme = "README.md" -keywords = ["htslib", "bam", "bioinformatics", "pileup", "sequencing"] -license = "MIT" -repository = "https://github.com/rust-bio/rust-htslib.git" documentation = "https://docs.rs/rust-htslib" edition = "2018" include = ["src/**/*", "LICENSE.md", "README.md", "CHANGELOG.md"] - -[workspace] -members = ["hts-sys"] +keywords = ["htslib", "bam", "bioinformatics", "pileup", "sequencing"] +license = "MIT" +name = "rust-htslib" +readme = "README.md" +repository = "https://github.com/rust-bio/rust-htslib.git" +version = "0.46.0" [package.metadata.release] pre-release-commit-message = "release version {{version}}" tag-message = "Version {{version}} of Rust-HTSlib." - [dependencies] -libc = "0.2" -newtype_derive = "0.1" +libz-sys = ">=1.1.15" +bio-types = ">=0.9" +byteorder = "1.3" custom_derive = "0.1" -url = "2.1" +derive-new = "0.5" +hts-sys = {version = "2.1.4", default-features = false, features = ["bindgen"]} +ieee754 = "0.2" lazy_static = "1.4" -regex = "1.3" +libc = "0.2" linear-map = "1.2" -serde = { version = "^1", optional = true, features=["derive"] } -serde_bytes = { version = "0.11", optional = true } -bio-types = ">=0.9" +newtype_derive = "0.1" +regex = "1.3" +serde = {version = "^1", optional = true, features = ["derive"]} +serde_bytes = {version = "0.11", optional = true} thiserror = "1" -hts-sys = { version = "2.0.1", path = "hts-sys", default-features = false } -derive-new = "0.5" -ieee754 = "0.2" -byteorder = "1.3" +url = "2.1" [features] -default = ["bzip2", "lzma", "curl"] -bzip2 = ["hts-sys/bzip2"] -lzma = ["hts-sys/lzma"] bindgen = ["hts-sys/bindgen"] +bzip2 = ["hts-sys/bzip2"] curl = ["hts-sys/curl"] +default = ["bzip2", "lzma", "curl"] +gcs = ["hts-sys/gcs"] libdeflate = ["hts-sys/libdeflate"] +lzma = ["hts-sys/lzma"] s3 = ["hts-sys/s3"] -gcs = ["hts-sys/gcs"] -static = ["hts-sys/static"] serde_feature = ["serde", "serde_bytes", "bio-types/serde"] +static = ["hts-sys/static"] [dev-dependencies] -tempfile = "3.1.0" bincode = "1.2" -serde_json = "1.0" pretty_assertions = "0.6" +serde_json = "1.0" +tempfile = "3.1.0" diff --git a/Cross.toml b/Cross.toml deleted file mode 100644 index c6bb51e09..000000000 --- a/Cross.toml +++ /dev/null @@ -1,11 +0,0 @@ -[build.env] -passthrough = [ - "RUST_DEBUG", - "RUST_BACKTRACE", - "CFLAGS" -] - -[target.x86_64-unknown-linux-musl] -image = "brainstorm/cross-x86_64-unknown-linux-musl:1.0.4" -[target.x86_64-unknown-linux-gnu] -image = "brainstorm/cross-x86_64-unknown-linux-gnu:1.0.4" diff --git a/README.md b/README.md index e8e800e74..0662a4cc8 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Crates.io](https://img.shields.io/crates/v/rust-htslib.svg)](https://crates.io/crates/rust-htslib) [![Crates.io](https://img.shields.io/crates/l/rust-htslib.svg)](https://crates.io/crates/rust-htslib) [![docs.rs](https://docs.rs/rust-htslib/badge.svg)](https://docs.rs/rust-htslib) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/rust-bio/rust-htslib/CI/master?label=tests) +![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/rust-bio/rust-htslib/rust.yml?branch=master&label=tests) [![Coverage Status](https://coveralls.io/repos/github/rust-bio/rust-htslib/badge.svg?branch=master)](https://coveralls.io/github/rust-bio/rust-htslib?branch=master) # HTSlib bindings for Rust @@ -22,36 +22,6 @@ If you only want to use the library, there is no need to clone the repository. G rust-htslib comes with pre-built bindings to htslib for Mac and Linux. You will need a C toolchain compatible with the `cc` crate. The build script for this crate will automatically build a link htslib. - -### MUSL build -To compile this for MUSL crate you need docker and cross: - -```shell -$ cargo install cross -$ cross build # will build with GNU GCC or LLVM toolchains -``` - -If you want to run rust-htslib code on AWS lambda, [you'll need to statically compile it with MUSL](https://github.com/awslabs/aws-lambda-rust-runtime/issues/17#issuecomment-577490373) as follows: - -```shell -$ cross build --target x86_64-unknown-linux-musl # will build with MUSL toolchain -``` - -Alternatively, you can also install it locally by installing the development headers of zlib, bzip2 and xz. For instance, in Debian systems one needs the following dependencies: - -```shell -$ sudo apt-get install zlib1g-dev libbz2-dev liblzma-dev clang pkg-config -``` - -We provide Dockerfile bases that provide these dependencies. Refer to the [docker](https://github.com/rust-bio/rust-htslib/tree/master/docker) directory in this repository for the latest instructions, including LLVM installation. - -On OSX: - -```shell -$ brew install FiloSottile/musl-cross/musl-cross -$ brew install bzip2 zlib xz curl-openssl -``` - ## Usage Add this to your `Cargo.toml`: diff --git a/docker/Dockerfile.gnu b/docker/Dockerfile.gnu deleted file mode 100644 index 6c2078bf2..000000000 --- a/docker/Dockerfile.gnu +++ /dev/null @@ -1,7 +0,0 @@ -FROM rustembedded/cross:x86_64-unknown-linux-gnu - -ENV LIBCLANG_PATH /usr/lib/llvm-10/lib -ENV LLVM_CONFIG_PATH /usr/bin -RUN apt-get update -RUN apt-get install -y build-essential wget gnupg lsb-release software-properties-common apt-transport-https ca-certificates # Otherwise LLVM bump below fails -RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" diff --git a/docker/Dockerfile.musl b/docker/Dockerfile.musl deleted file mode 100644 index 4988ab7e4..000000000 --- a/docker/Dockerfile.musl +++ /dev/null @@ -1,16 +0,0 @@ -FROM brainstorm/cross-x86_64-unknown-linux-musl:upstream - -ENV DEBIAN_FRONTEND noninteractive -ENV PKG_CONFIG_ALLOW_CROSS 1 - -ENV LIBCLANG_PATH /usr/lib/llvm-10/lib -ENV LLVM_CONFIG_PATH /usr/bin - -WORKDIR /root - -# Otherwise LLVM bump below fails -RUN apt-get install -y wget gnupg lsb-release software-properties-common apt-transport-https ca-certificates - -# Autodetect and fetch latest LLVM repos for the current distro, avoids LLVM warnings and other issues, might generate slower builds for now though, see: -# https://www.phoronix.com/scan.php?page=news_item&px=Rust-Hurt-On-LLVM-10 -RUN bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" diff --git a/docker/README.md b/docker/README.md deleted file mode 100644 index 8ce0ee1cd..000000000 --- a/docker/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# cross rustembedded containers - -Allows to compile (rust-)htslib in a variety of environments and architectures via [rustembedded cross](https://github.com/rust-embedded/cross). - -## Quickstart - -```shell -$ cd docker -$ docker build -t brainstorm/cross-x86_64-unknown-linux-musl:1.0.0 . -f Dockerfile.musl -$ docker build -t brainstorm/cross-x86_64-unknown-linux-gnu:1.0.0 . -f Dockerfile.gnu -``` - -Then, to build and test rust-htslib with the above containers, proceed as you would with `cargo`, using `cross` instead, i.e: - -```shell -$ cross build --target x86_64-unknown-linux-musl -``` diff --git a/docker/config-musl-cross-make.mak b/docker/config-musl-cross-make.mak deleted file mode 100644 index 424678462..000000000 --- a/docker/config-musl-cross-make.mak +++ /dev/null @@ -1,6 +0,0 @@ -TARGET = x86_64-linux-musl -OUTPUT = /usr/local/musl -GCC_VER = 9.2.0 -BINUTILS_VER = 2.33.1 -MUSL_VER=1.2.0 - diff --git a/hts-sys/CHANGELOG.md b/hts-sys/CHANGELOG.md deleted file mode 100644 index 27177e111..000000000 --- a/hts-sys/CHANGELOG.md +++ /dev/null @@ -1,57 +0,0 @@ -# Changelog - -### [2.0.2](https://www.github.com/rust-bio/rust-htslib/compare/hts-sys-v2.0.1...hts-sys-v2.0.2) (2021-07-17) - - -### Bug Fixes - -* Configuration when cross-compiling. Even when cross-compiling, build.rs runs on the build host. Hence within build.rs `#[cfg(target_os)]` always reflects the host, not the target. Use $CARGO_CFG_TARGET_OS instead to query target properties. ([#329](https://www.github.com/rust-bio/rust-htslib/issues/329)) ([d5198e6](https://www.github.com/rust-bio/rust-htslib/commit/d5198e6c777fdbbfdd9c73a820f1be983a458ce2)) - -### [2.0.1](https://www.github.com/rust-bio/rust-htslib/compare/hts-sys-v2.0.0...hts-sys-v2.0.1) (2021-07-06) - - -### Bug Fixes - -* dummy release ([74d1565](https://www.github.com/rust-bio/rust-htslib/commit/74d1565329fc862f1172c0925c7b66ceb8bcf988)) -* dummy release ([af2f84e](https://www.github.com/rust-bio/rust-htslib/commit/af2f84eb0411507f8866b3cc05e9a6ba9d81d172)) - -## [2.0.0](https://www.github.com/rust-bio/rust-htslib/compare/hts-sys-v1.0.0...hts-sys-v2.0.0) (2021-07-06) - - -### ⚠ BREAKING CHANGES - -* dummy major version bump to move away from previous versions that were following htslib versions. - -### Bug Fixes - -* dummy major version bump to move away from previous versions that were following htslib versions. ([aaa70a8](https://www.github.com/rust-bio/rust-htslib/commit/aaa70a85ef9a908d3b101f23879189e84a15d23f)) - -## [1.0.0](https://www.github.com/rust-bio/rust-htslib/compare/hts-sys-v0.1.0...hts-sys-v1.0.0) (2021-07-06) - - -### ⚠ BREAKING CHANGES - -* bump to new major version (for technical reasons). -* dummy breaking change to increase hts-sys major version. - -### Bug Fixes - -* bump to new major version (for technical reasons). ([9c6db30](https://www.github.com/rust-bio/rust-htslib/commit/9c6db3060818692070db1411d63e113dc7effd64)) -* dummy breaking change to increase hts-sys major version. ([93415cb](https://www.github.com/rust-bio/rust-htslib/commit/93415cbb82e4f11d257a2b2cedba2664f86a034d)) -* dummy changes ([3af5ede](https://www.github.com/rust-bio/rust-htslib/commit/3af5ede13a6b44ce5d1e7f0eb90836a692e711ec)) -* update changelog ([deef08f](https://www.github.com/rust-bio/rust-htslib/commit/deef08feb0b5ba2d8abf98f2cc6d327236da8aef)) - -## [2.0.0](https://www.github.com/rust-bio/rust-htslib/compare/hts-sys-v1.11.1-fix1...hts-sys-v2.0.0) - (2021-07-06) - - -### Bug Fixes - -* dummy release ([b97915f](https://www.github.com/rust-bio/rust-htslib/commit/b97915f2c70da4c914f2e69861bf78eec5979baf)) -* trigger dummy release ([7c5a7de](https://www.github.com/rust-bio/rust-htslib/commit/7c5a7de33e2a92052126e5f44389d421974d1e02)) - - -## 0.1.0 - 2021-07-06 - -### Bug Fixes - -* dummy release diff --git a/hts-sys/Cargo.toml b/hts-sys/Cargo.toml deleted file mode 100644 index ec8fcc75f..000000000 --- a/hts-sys/Cargo.toml +++ /dev/null @@ -1,43 +0,0 @@ -[package] -name = "hts-sys" -version = "2.0.2" -authors = ["Christopher Schröder ", "Johannes Köster "] -build = "build.rs" -links = "hts" -description = "This library provides HTSlib bindings." -readme = "README.md" -keywords = ["htslib", "bam", "bioinformatics", "pileup", "sequencing"] -license = "MIT" -repository = "https://github.com/samtools/htslib.git" -documentation = "https://docs.rs/rust-htslib" -edition = "2018" - -[package.metadata.release] -pre-release-commit-message = "release version {{version}}" -tag-message = "Version {{version}} of Rust-HTSlib." - -[dependencies] -libz-sys = { version = "1.1.0", default-features = false, features = ["zlib-ng", "static"] } -bzip2-sys = { version = "0.1.8", optional = true } -lzma-sys = { version = "0.1.16", optional = true, features = ["static"] } -curl-sys = { version = "0.4.44", optional = true, features = ["static-curl", "static-ssl", "protocol-ftp"] } -libdeflate-sys = { version = "0.7.3", optional = true } - -[target.'cfg(all(unix, not(target_os = "macos")))'.dependencies] -openssl-sys = { version = "0.9.56", optional = true } - -[features] -default = ["bzip2", "lzma", "curl"] -bzip2 = ["bzip2-sys"] -lzma = ["lzma-sys"] -curl = ["curl-sys", "openssl-sys"] -libdeflate = ["libdeflate-sys"] -gcs = ["curl"] # Google Cloud Storage support -s3 = ["curl"] # Amazon S3 support -static = [] # Don't dynamically link to other libraries - -[build-dependencies] -fs-utils = "1.1" -bindgen = { version = "0.53.2", default-features = false, features = ["runtime"], optional = true } -cc = { version = "1.0", features = ["parallel"] } -glob = "0.3.0" diff --git a/hts-sys/README.md b/hts-sys/README.md deleted file mode 100644 index 60c8ee9f2..000000000 --- a/hts-sys/README.md +++ /dev/null @@ -1,6 +0,0 @@ -# HTSlib bindings for Rust - -This sub-crate provides the raw HTSlib bindings, which are used for the high level Rust API for reading and writing BAM files provided by rust-htslib. - -See rust-htslib for details. - diff --git a/hts-sys/build.rs b/hts-sys/build.rs deleted file mode 100644 index dde826bb1..000000000 --- a/hts-sys/build.rs +++ /dev/null @@ -1,282 +0,0 @@ -// Copyright 2014 Johannes Köster. -// Licensed under the MIT license (http://opensource.org/licenses/MIT) -// This file may not be copied, modified, or distributed -// except according to those terms. - -#[cfg(feature = "serde")] -use bindgen; -use fs_utils::copy::copy_directory; -use glob::glob; - -use std::env; -use std::fs; -use std::io::Write; -use std::path::PathBuf; - -// these need to be kept in sync with the htslib Makefile -const FILES: &[&str] = &[ - "kfunc.c", - "kstring.c", - "bcf_sr_sort.c", - "bgzf.c", - "errmod.c", - "faidx.c", - "header.c", - "hfile.c", - "hts.c", - "hts_expr.c", - "hts_os.c", - "md5.c", - "multipart.c", - "probaln.c", - "realn.c", - "regidx.c", - "region.c", - "sam.c", - "synced_bcf_reader.c", - "vcf_sweep.c", - "tbx.c", - "textutils.c", - "thread_pool.c", - "vcf.c", - "vcfutils.c", - "cram/cram_codecs.c", - "cram/cram_decode.c", - "cram/cram_encode.c", - "cram/cram_external.c", - "cram/cram_index.c", - "cram/cram_io.c", - "cram/cram_stats.c", - "cram/mFILE.c", - "cram/open_trace_file.c", - "cram/pooled_alloc.c", - "cram/string_alloc.c", - "htscodecs/htscodecs/arith_dynamic.c", - "htscodecs/htscodecs/fqzcomp_qual.c", - "htscodecs/htscodecs/htscodecs.c", - "htscodecs/htscodecs/pack.c", - "htscodecs/htscodecs/rANS_static4x16pr.c", - "htscodecs/htscodecs/rANS_static.c", - "htscodecs/htscodecs/rle.c", - "htscodecs/htscodecs/tokenise_name3.c", -]; - -fn main() { - let out = PathBuf::from(env::var("OUT_DIR").unwrap()); - let htslib_copy = out.join("htslib"); - - if htslib_copy.exists() { - std::fs::remove_dir_all(htslib_copy).unwrap(); - } - copy_directory("htslib", &out).unwrap(); - - // In build.rs cfg(target_os) does not give the target when cross-compiling; - // instead use the environment variable supplied by cargo, which does. - let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap(); - - let mut cfg = cc::Build::new(); - let mut lib_list = "".to_string(); - - // default files - let out_htslib = out.join("htslib"); - let htslib = PathBuf::from("htslib"); - for f in FILES { - let c_file = out_htslib.join(f); - cfg.file(&c_file); - println!("cargo:rerun-if-changed={}", htslib.join(f).display()); - } - - cfg.include(out.join("htslib")); - - let want_static = cfg!(feature = "static") || env::var("HTS_STATIC").is_ok(); - - if want_static { - cfg.warnings(false).static_flag(true).pic(true); - } else { - cfg.warnings(false).static_flag(false).pic(true); - } - - if let Ok(z_inc) = env::var("DEP_Z_INCLUDE") { - cfg.include(z_inc); - lib_list += " -lz"; - } - - // We build a config.h ourselves, rather than rely on Makefile or ./configure - let mut config_lines = vec![ - "/* Default config.h generated by build.rs */", - "#define HAVE_DRAND48 1", - ]; - - let use_bzip2 = env::var("CARGO_FEATURE_BZIP2").is_ok(); - if use_bzip2 { - if let Ok(inc) = env::var("DEP_BZIP2_ROOT") - .map(PathBuf::from) - .map(|path| path.join("include")) - { - cfg.include(inc); - lib_list += " -lbz2"; - config_lines.push("#define HAVE_LIBBZ2 1"); - } - } - - let use_libdeflate = env::var("CARGO_FEATURE_LIBDEFLATE").is_ok(); - if use_libdeflate { - if let Ok(inc) = env::var("DEP_LIBDEFLATE_INCLUDE").map(PathBuf::from) { - cfg.include(inc); - lib_list += " -ldeflate"; - config_lines.push("#define HAVE_LIBDEFLATE 1"); - } else { - panic!("no DEP_LIBDEFLATE_INCLUDE"); - } - } - - let use_lzma = env::var("CARGO_FEATURE_LZMA").is_ok(); - if use_lzma { - if let Ok(inc) = env::var("DEP_LZMA_INCLUDE").map(PathBuf::from) { - cfg.include(inc); - lib_list += " -llzma"; - config_lines.push("#define HAVE_LIBBZ2 1"); - config_lines.push("#ifndef __APPLE__"); - config_lines.push("#define HAVE_LZMA_H 1"); - config_lines.push("#endif"); - } - } - - let use_curl = env::var("CARGO_FEATURE_CURL").is_ok(); - if use_curl { - if let Ok(inc) = env::var("DEP_CURL_INCLUDE").map(PathBuf::from) { - cfg.include(inc); - lib_list += " -lcurl"; - config_lines.push("#define HAVE_LIBCURL 1"); - cfg.file("htslib/hfile_libcurl.c"); - println!("cargo:rerun-if-changed=htslib/hfile_libcurl.c"); - - if target_os == "macos" { - // Use builtin MacOS CommonCrypto HMAC - config_lines.push("#define HAVE_COMMONCRYPTO 1"); - } else if let Ok(inc) = env::var("DEP_OPENSSL_INCLUDE").map(PathBuf::from) { - // Must use hmac from libcrypto in openssl - cfg.include(inc); - config_lines.push("#define HAVE_HMAC 1"); - } else { - panic!("No OpenSSL dependency -- need OpenSSL includes"); - } - } - } - - let use_gcs = env::var("CARGO_FEATURE_GCS").is_ok(); - if use_gcs { - config_lines.push("#define ENABLE_GCS 1"); - cfg.file("htslib/hfile_gcs.c"); - println!("cargo:rerun-if-changed=htslib/hfile_gcs.c"); - } - - let use_s3 = env::var("CARGO_FEATURE_S3").is_ok(); - if use_s3 { - config_lines.push("#define ENABLE_S3 1"); - cfg.file("htslib/hfile_s3.c"); - println!("cargo:rerun-if-changed=htslib/hfile_s3.c"); - cfg.file("htslib/hfile_s3_write.c"); - println!("cargo:rerun-if-changed=htslib/hfile_s3_write.c"); - } - - // write out config.h which controls the options htslib will use - { - let mut f = std::fs::File::create(out.join("htslib").join("config.h")).unwrap(); - for l in config_lines { - writeln!(&mut f, "{}", l).unwrap(); - } - } - - // write out version.h - { - let version = std::process::Command::new(out.join("htslib").join("version.sh")) - .output() - .expect("failed to execute process"); - let version_str = std::str::from_utf8(&version.stdout).unwrap().trim(); - - let mut f = std::fs::File::create(out.join("htslib").join("version.h")).unwrap(); - writeln!(&mut f, "#define HTS_VERSION_TEXT \"{}\"", version_str).unwrap(); - } - - // write out htscodecs/htscodecs/version.h - { - let mut f = std::fs::File::create( - out.join("htslib") - .join("htscodecs") - .join("htscodecs") - .join("version.h"), - ) - .unwrap(); - // FIXME, using a dummy. Not sure why this should be a separate version from htslib itself. - writeln!(&mut f, "#define HTSCODECS_VERSION_TEXT \"rust-htslib\"").unwrap(); - } - - // write out config_vars.h which is used to expose compiler parameters via - // hts_test_feature() in hts.c. We partially fill in these values. - { - let tool = cfg.get_compiler(); - let mut f = std::fs::File::create(out.join("htslib").join("config_vars.h")).unwrap(); - writeln!(&mut f, "#define HTS_CC {:?}", tool.cc_env()).unwrap(); - writeln!(&mut f, "#define HTS_CPPFLAGS \"\"").unwrap(); - writeln!(&mut f, "#define HTS_CFLAGS {:?}", tool.cflags_env()).unwrap(); - writeln!(&mut f, "#define HTS_LDFLAGS \"\"").unwrap(); - writeln!(&mut f, "#define HTS_LIBS \"{}\"", lib_list).unwrap(); - } - - cfg.file("wrapper.c"); - cfg.compile("hts"); - - // If bindgen is enabled, use it - #[cfg(feature = "bindgen")] - { - bindgen::Builder::default() - .header("wrapper.h") - .generate_comments(false) - .blacklist_function("strtold") - .blacklist_type("max_align_t") - .generate() - .expect("Unable to generate bindings.") - .write_to_file(out.join("bindings.rs")) - .expect("Could not write bindings."); - } - - // If no bindgen, use pre-built bindings - #[cfg(not(feature = "bindgen"))] - if target_os == "macos" { - fs::copy("osx_prebuilt_bindings.rs", out.join("bindings.rs")) - .expect("couldn't copy prebuilt bindings"); - println!("cargo:rerun-if-changed=osx_prebuilt_bindings.rs"); - } else { - fs::copy("linux_prebuilt_bindings.rs", out.join("bindings.rs")) - .expect("couldn't copy prebuilt bindings"); - println!("cargo:rerun-if-changed=linux_prebuilt_bindings.rs"); - } - - let include = out.join("include"); - fs::create_dir_all(&include).unwrap(); - if include.join("htslib").exists() { - fs::remove_dir_all(include.join("htslib")).expect("remove exist include dir"); - } - copy_directory(out.join("htslib").join("htslib"), &include).unwrap(); - - println!("cargo:root={}", out.display()); - println!("cargo:include={}", include.display()); - println!("cargo:libdir={}", out.display()); - println!("cargo:rerun-if-changed=wrapper.c"); - println!("cargo:rerun-if-changed=wrapper.h"); - - let globs = std::iter::empty() - .chain(glob("htslib/*.[h]").unwrap()) - .chain(glob("htslib/cram/*.[h]").unwrap()) - .chain(glob("htslib/htslib/*.h").unwrap()) - .chain(glob("htslib/os/*.[h]").unwrap()) - .filter_map(Result::ok); - for htsfile in globs { - println!("cargo:rerun-if-changed={}", htsfile.display()); - } - - // Note: config.h is a function of the cargo features. Any feature change will - // cause build.rs to re-run, so don't re-run on that change. - //println!("cargo:rerun-if-changed=htslib/config.h"); -} diff --git a/hts-sys/htslib b/hts-sys/htslib deleted file mode 160000 index 911cb8ec8..000000000 --- a/hts-sys/htslib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 911cb8ec8fa33a293c92dcc3c3e214f49b860dbe diff --git a/hts-sys/linux_prebuilt_bindings.rs b/hts-sys/linux_prebuilt_bindings.rs deleted file mode 100644 index 556291c9b..000000000 --- a/hts-sys/linux_prebuilt_bindings.rs +++ /dev/null @@ -1,11600 +0,0 @@ -/* automatically generated by rust-bindgen */ - -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { - storage: Storage, - align: [Align; 0], -} -impl __BindgenBitfieldUnit { - #[inline] - pub const fn new(storage: Storage) -> Self { - Self { storage, align: [] } - } -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - 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 const _STDINT_H: u32 = 1; -pub const _FEATURES_H: u32 = 1; -pub const __USE_ANSI: u32 = 1; -pub const _BSD_SOURCE: u32 = 1; -pub const _SVID_SOURCE: u32 = 1; -pub const __USE_ISOC99: u32 = 1; -pub const __USE_ISOC95: u32 = 1; -pub const _POSIX_SOURCE: u32 = 1; -pub const _POSIX_C_SOURCE: u32 = 200809; -pub const __USE_POSIX_IMPLICITLY: u32 = 1; -pub const __USE_POSIX: u32 = 1; -pub const __USE_POSIX2: u32 = 1; -pub const __USE_POSIX199309: u32 = 1; -pub const __USE_POSIX199506: u32 = 1; -pub const __USE_XOPEN2K: u32 = 1; -pub const __USE_XOPEN2K8: u32 = 1; -pub const _ATFILE_SOURCE: u32 = 1; -pub const __USE_MISC: u32 = 1; -pub const __USE_BSD: u32 = 1; -pub const __USE_SVID: u32 = 1; -pub const __USE_ATFILE: u32 = 1; -pub const __USE_FORTIFY_LEVEL: u32 = 0; -pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_ISO_10646__: u32 = 200009; -pub const __GNU_LIBRARY__: u32 = 6; -pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 12; -pub const __GLIBC_HAVE_LONG_LONG: u32 = 1; -pub const _SYS_CDEFS_H: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_COMPAT32: u32 = 1; -pub const _BITS_WCHAR_H: u32 = 1; -pub const __WCHAR_MIN: i32 = -2147483648; -pub const __WCHAR_MAX: u32 = 2147483647; -pub const INT8_MIN: i32 = -128; -pub const INT16_MIN: i32 = -32768; -pub const INT32_MIN: i32 = -2147483648; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const UINT8_MAX: u32 = 255; -pub const UINT16_MAX: u32 = 65535; -pub const UINT32_MAX: u32 = 4294967295; -pub const INT_LEAST8_MIN: i32 = -128; -pub const INT_LEAST16_MIN: i32 = -32768; -pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST8_MAX: u32 = 127; -pub const INT_LEAST16_MAX: u32 = 32767; -pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const UINT_LEAST8_MAX: u32 = 255; -pub const UINT_LEAST16_MAX: u32 = 65535; -pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i64 = -9223372036854775808; -pub const INT_FAST32_MIN: i64 = -9223372036854775808; -pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u64 = 9223372036854775807; -pub const INT_FAST32_MAX: u64 = 9223372036854775807; -pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: i32 = -1; -pub const UINT_FAST32_MAX: i32 = -1; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const UINTPTR_MAX: i32 = -1; -pub const PTRDIFF_MIN: i64 = -9223372036854775808; -pub const PTRDIFF_MAX: u64 = 9223372036854775807; -pub const SIG_ATOMIC_MIN: i32 = -2147483648; -pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const SIZE_MAX: i32 = -1; -pub const WCHAR_MIN: i32 = -2147483648; -pub const WCHAR_MAX: u32 = 2147483647; -pub const WINT_MIN: u32 = 0; -pub const WINT_MAX: u32 = 4294967295; -pub const _INTTYPES_H: u32 = 1; -pub const ____gwchar_t_defined: u32 = 1; -pub const __PRI64_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const __PRIPTR_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const PRId8: &'static [u8; 2usize] = b"d\0"; -pub const PRId16: &'static [u8; 2usize] = b"d\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRId64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIi8: &'static [u8; 2usize] = b"i\0"; -pub const PRIi16: &'static [u8; 2usize] = b"i\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIi64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIo8: &'static [u8; 2usize] = b"o\0"; -pub const PRIo16: &'static [u8; 2usize] = b"o\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIo64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIu8: &'static [u8; 2usize] = b"u\0"; -pub const PRIu16: &'static [u8; 2usize] = b"u\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIu64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuLEAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST16: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIx8: &'static [u8; 2usize] = b"x\0"; -pub const PRIx16: &'static [u8; 2usize] = b"x\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIx64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxLEAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST16: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIX8: &'static [u8; 2usize] = b"X\0"; -pub const PRIX16: &'static [u8; 2usize] = b"X\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRIX64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXLEAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST16: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"li\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNd64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNi64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNu64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNo64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNx64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"li\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const _STDIO_H: u32 = 1; -pub const _BITS_TYPES_H: u32 = 1; -pub const _BITS_TYPESIZES_H: u32 = 1; -pub const __FD_SETSIZE: u32 = 1024; -pub const __FILE_defined: u32 = 1; -pub const ____FILE_defined: u32 = 1; -pub const _G_config_h: u32 = 1; -pub const __mbstate_t_defined: u32 = 1; -pub const _G_HAVE_BOOL: u32 = 1; -pub const _G_HAVE_ATEXIT: u32 = 1; -pub const _G_HAVE_SYS_CDEFS: u32 = 1; -pub const _G_HAVE_SYS_WAIT: u32 = 1; -pub const _G_NEED_STDARG_H: u32 = 1; -pub const _G_HAVE_PRINTF_FP: u32 = 1; -pub const _G_HAVE_MMAP: u32 = 1; -pub const _G_HAVE_MREMAP: u32 = 1; -pub const _G_HAVE_LONG_DOUBLE_IO: u32 = 1; -pub const _G_HAVE_IO_FILE_OPEN: u32 = 1; -pub const _G_HAVE_IO_GETLINE_INFO: u32 = 1; -pub const _G_IO_IO_FILE_VERSION: u32 = 131073; -pub const _G_BUFSIZ: u32 = 8192; -pub const _G_NAMES_HAVE_UNDERSCORE: u32 = 0; -pub const _G_VTABLE_LABEL_HAS_LENGTH: u32 = 1; -pub const _G_USING_THUNKS: u32 = 1; -pub const _G_VTABLE_LABEL_PREFIX: &'static [u8; 6usize] = b"__vt_\0"; -pub const _IO_HAVE_SYS_WAIT: u32 = 1; -pub const _IO_BUFSIZ: u32 = 8192; -pub const __GNUC_VA_LIST: u32 = 1; -pub const _IO_UNIFIED_JUMPTABLES: u32 = 1; -pub const EOF: i32 = -1; -pub const _IOS_INPUT: u32 = 1; -pub const _IOS_OUTPUT: u32 = 2; -pub const _IOS_ATEND: u32 = 4; -pub const _IOS_APPEND: u32 = 8; -pub const _IOS_TRUNC: u32 = 16; -pub const _IOS_NOCREATE: u32 = 32; -pub const _IOS_NOREPLACE: u32 = 64; -pub const _IOS_BIN: u32 = 128; -pub const _IO_MAGIC: u32 = 4222418944; -pub const _OLD_STDIO_MAGIC: u32 = 4206624768; -pub const _IO_MAGIC_MASK: u32 = 4294901760; -pub const _IO_USER_BUF: u32 = 1; -pub const _IO_UNBUFFERED: u32 = 2; -pub const _IO_NO_READS: u32 = 4; -pub const _IO_NO_WRITES: u32 = 8; -pub const _IO_EOF_SEEN: u32 = 16; -pub const _IO_ERR_SEEN: u32 = 32; -pub const _IO_DELETE_DONT_CLOSE: u32 = 64; -pub const _IO_LINKED: u32 = 128; -pub const _IO_IN_BACKUP: u32 = 256; -pub const _IO_LINE_BUF: u32 = 512; -pub const _IO_TIED_PUT_GET: u32 = 1024; -pub const _IO_CURRENTLY_PUTTING: u32 = 2048; -pub const _IO_IS_APPENDING: u32 = 4096; -pub const _IO_IS_FILEBUF: u32 = 8192; -pub const _IO_BAD_SEEN: u32 = 16384; -pub const _IO_USER_LOCK: u32 = 32768; -pub const _IO_FLAGS2_MMAP: u32 = 1; -pub const _IO_FLAGS2_NOTCANCEL: u32 = 2; -pub const _IO_FLAGS2_USER_WBUF: u32 = 8; -pub const _IO_SKIPWS: u32 = 1; -pub const _IO_LEFT: u32 = 2; -pub const _IO_RIGHT: u32 = 4; -pub const _IO_INTERNAL: u32 = 8; -pub const _IO_DEC: u32 = 16; -pub const _IO_OCT: u32 = 32; -pub const _IO_HEX: u32 = 64; -pub const _IO_SHOWBASE: u32 = 128; -pub const _IO_SHOWPOINT: u32 = 256; -pub const _IO_UPPERCASE: u32 = 512; -pub const _IO_SHOWPOS: u32 = 1024; -pub const _IO_SCIENTIFIC: u32 = 2048; -pub const _IO_FIXED: u32 = 4096; -pub const _IO_UNITBUF: u32 = 8192; -pub const _IO_STDIO: u32 = 16384; -pub const _IO_DONT_CLOSE: u32 = 32768; -pub const _IO_BOOLALPHA: u32 = 65536; -pub const _IOFBF: u32 = 0; -pub const _IOLBF: u32 = 1; -pub const _IONBF: u32 = 2; -pub const BUFSIZ: u32 = 8192; -pub const SEEK_SET: u32 = 0; -pub const SEEK_CUR: u32 = 1; -pub const SEEK_END: u32 = 2; -pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0"; -pub const L_tmpnam: u32 = 20; -pub const TMP_MAX: u32 = 238328; -pub const FILENAME_MAX: u32 = 4096; -pub const L_ctermid: u32 = 9; -pub const FOPEN_MAX: u32 = 16; -pub const HTS_PATH_SEPARATOR_CHAR: u8 = 58u8; -pub const HTS_PATH_SEPARATOR_STR: &'static [u8; 2usize] = b":\0"; -pub const HTS_RESIZE_CLEAR: u32 = 1; -pub const HTS_IDX_DELIM: &'static [u8; 8usize] = b"##idx##\0"; -pub const HTS_VERSION: u32 = 101002; -pub const HTS_IDX_NOCOOR: i32 = -2; -pub const HTS_IDX_START: i32 = -3; -pub const HTS_IDX_REST: i32 = -4; -pub const HTS_IDX_NONE: i32 = -5; -pub const HTS_FMT_CSI: u32 = 0; -pub const HTS_FMT_BAI: u32 = 1; -pub const HTS_FMT_TBI: u32 = 2; -pub const HTS_FMT_CRAI: u32 = 3; -pub const PRIhts_pos: &'static [u8; 3usize] = b"ld\0"; -pub const HTS_IDX_SAVE_REMOTE: u32 = 1; -pub const HTS_IDX_SILENT_FAIL: u32 = 2; -pub const HTS_PARSE_THOUSANDS_SEP: u32 = 1; -pub const HTS_PARSE_ONE_COORD: u32 = 2; -pub const HTS_PARSE_LIST: u32 = 4; -pub const FT_UNKN: u32 = 0; -pub const FT_GZ: u32 = 1; -pub const FT_VCF: u32 = 2; -pub const FT_VCF_GZ: u32 = 3; -pub const FT_BCF: u32 = 4; -pub const FT_BCF_GZ: u32 = 5; -pub const FT_STDIN: u32 = 8; -pub const _LIBC_LIMITS_H_: u32 = 1; -pub const MB_LEN_MAX: u32 = 16; -pub const _BITS_POSIX1_LIM_H: u32 = 1; -pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; -pub const _POSIX_AIO_MAX: u32 = 1; -pub const _POSIX_ARG_MAX: u32 = 4096; -pub const _POSIX_CHILD_MAX: u32 = 25; -pub const _POSIX_DELAYTIMER_MAX: u32 = 32; -pub const _POSIX_HOST_NAME_MAX: u32 = 255; -pub const _POSIX_LINK_MAX: u32 = 8; -pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; -pub const _POSIX_MAX_CANON: u32 = 255; -pub const _POSIX_MAX_INPUT: u32 = 255; -pub const _POSIX_MQ_OPEN_MAX: u32 = 8; -pub const _POSIX_MQ_PRIO_MAX: u32 = 32; -pub const _POSIX_NAME_MAX: u32 = 14; -pub const _POSIX_NGROUPS_MAX: u32 = 8; -pub const _POSIX_OPEN_MAX: u32 = 20; -pub const _POSIX_PATH_MAX: u32 = 256; -pub const _POSIX_PIPE_BUF: u32 = 512; -pub const _POSIX_RE_DUP_MAX: u32 = 255; -pub const _POSIX_RTSIG_MAX: u32 = 8; -pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; -pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; -pub const _POSIX_SIGQUEUE_MAX: u32 = 32; -pub const _POSIX_SSIZE_MAX: u32 = 32767; -pub const _POSIX_STREAM_MAX: u32 = 8; -pub const _POSIX_SYMLINK_MAX: u32 = 255; -pub const _POSIX_SYMLOOP_MAX: u32 = 8; -pub const _POSIX_TIMER_MAX: u32 = 32; -pub const _POSIX_TTY_NAME_MAX: u32 = 9; -pub const _POSIX_TZNAME_MAX: u32 = 6; -pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; -pub const NR_OPEN: u32 = 1024; -pub const NGROUPS_MAX: u32 = 65536; -pub const ARG_MAX: u32 = 131072; -pub const LINK_MAX: u32 = 127; -pub const MAX_CANON: u32 = 255; -pub const MAX_INPUT: u32 = 255; -pub const NAME_MAX: u32 = 255; -pub const PATH_MAX: u32 = 4096; -pub const PIPE_BUF: u32 = 4096; -pub const XATTR_NAME_MAX: u32 = 255; -pub const XATTR_SIZE_MAX: u32 = 65536; -pub const XATTR_LIST_MAX: u32 = 65536; -pub const RTSIG_MAX: u32 = 32; -pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; -pub const PTHREAD_KEYS_MAX: u32 = 1024; -pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; -pub const AIO_PRIO_DELTA_MAX: u32 = 20; -pub const PTHREAD_STACK_MIN: u32 = 16384; -pub const DELAYTIMER_MAX: u32 = 2147483647; -pub const TTY_NAME_MAX: u32 = 32; -pub const LOGIN_NAME_MAX: u32 = 256; -pub const HOST_NAME_MAX: u32 = 64; -pub const MQ_PRIO_MAX: u32 = 32768; -pub const SEM_VALUE_MAX: u32 = 2147483647; -pub const _BITS_POSIX2_LIM_H: u32 = 1; -pub const _POSIX2_BC_BASE_MAX: u32 = 99; -pub const _POSIX2_BC_DIM_MAX: u32 = 2048; -pub const _POSIX2_BC_SCALE_MAX: u32 = 99; -pub const _POSIX2_BC_STRING_MAX: u32 = 1000; -pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; -pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; -pub const _POSIX2_LINE_MAX: u32 = 2048; -pub const _POSIX2_RE_DUP_MAX: u32 = 255; -pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; -pub const BC_BASE_MAX: u32 = 99; -pub const BC_DIM_MAX: u32 = 2048; -pub const BC_SCALE_MAX: u32 = 99; -pub const BC_STRING_MAX: u32 = 1000; -pub const COLL_WEIGHTS_MAX: u32 = 255; -pub const EXPR_NEST_MAX: u32 = 32; -pub const LINE_MAX: u32 = 2048; -pub const CHARCLASS_NAME_MAX: u32 = 2048; -pub const RE_DUP_MAX: u32 = 32767; -pub const _ASSERT_H: u32 = 1; -pub const _ERRNO_H: u32 = 1; -pub const EPERM: u32 = 1; -pub const ENOENT: u32 = 2; -pub const ESRCH: u32 = 3; -pub const EINTR: u32 = 4; -pub const EIO: u32 = 5; -pub const ENXIO: u32 = 6; -pub const E2BIG: u32 = 7; -pub const ENOEXEC: u32 = 8; -pub const EBADF: u32 = 9; -pub const ECHILD: u32 = 10; -pub const EAGAIN: u32 = 11; -pub const ENOMEM: u32 = 12; -pub const EACCES: u32 = 13; -pub const EFAULT: u32 = 14; -pub const ENOTBLK: u32 = 15; -pub const EBUSY: u32 = 16; -pub const EEXIST: u32 = 17; -pub const EXDEV: u32 = 18; -pub const ENODEV: u32 = 19; -pub const ENOTDIR: u32 = 20; -pub const EISDIR: u32 = 21; -pub const EINVAL: u32 = 22; -pub const ENFILE: u32 = 23; -pub const EMFILE: u32 = 24; -pub const ENOTTY: u32 = 25; -pub const ETXTBSY: u32 = 26; -pub const EFBIG: u32 = 27; -pub const ENOSPC: u32 = 28; -pub const ESPIPE: u32 = 29; -pub const EROFS: u32 = 30; -pub const EMLINK: u32 = 31; -pub const EPIPE: u32 = 32; -pub const EDOM: u32 = 33; -pub const ERANGE: u32 = 34; -pub const EDEADLK: u32 = 35; -pub const ENAMETOOLONG: u32 = 36; -pub const ENOLCK: u32 = 37; -pub const ENOSYS: u32 = 38; -pub const ENOTEMPTY: u32 = 39; -pub const ELOOP: u32 = 40; -pub const EWOULDBLOCK: u32 = 11; -pub const ENOMSG: u32 = 42; -pub const EIDRM: u32 = 43; -pub const ECHRNG: u32 = 44; -pub const EL2NSYNC: u32 = 45; -pub const EL3HLT: u32 = 46; -pub const EL3RST: u32 = 47; -pub const ELNRNG: u32 = 48; -pub const EUNATCH: u32 = 49; -pub const ENOCSI: u32 = 50; -pub const EL2HLT: u32 = 51; -pub const EBADE: u32 = 52; -pub const EBADR: u32 = 53; -pub const EXFULL: u32 = 54; -pub const ENOANO: u32 = 55; -pub const EBADRQC: u32 = 56; -pub const EBADSLT: u32 = 57; -pub const EDEADLOCK: u32 = 35; -pub const EBFONT: u32 = 59; -pub const ENOSTR: u32 = 60; -pub const ENODATA: u32 = 61; -pub const ETIME: u32 = 62; -pub const ENOSR: u32 = 63; -pub const ENONET: u32 = 64; -pub const ENOPKG: u32 = 65; -pub const EREMOTE: u32 = 66; -pub const ENOLINK: u32 = 67; -pub const EADV: u32 = 68; -pub const ESRMNT: u32 = 69; -pub const ECOMM: u32 = 70; -pub const EPROTO: u32 = 71; -pub const EMULTIHOP: u32 = 72; -pub const EDOTDOT: u32 = 73; -pub const EBADMSG: u32 = 74; -pub const EOVERFLOW: u32 = 75; -pub const ENOTUNIQ: u32 = 76; -pub const EBADFD: u32 = 77; -pub const EREMCHG: u32 = 78; -pub const ELIBACC: u32 = 79; -pub const ELIBBAD: u32 = 80; -pub const ELIBSCN: u32 = 81; -pub const ELIBMAX: u32 = 82; -pub const ELIBEXEC: u32 = 83; -pub const EILSEQ: u32 = 84; -pub const ERESTART: u32 = 85; -pub const ESTRPIPE: u32 = 86; -pub const EUSERS: u32 = 87; -pub const ENOTSOCK: u32 = 88; -pub const EDESTADDRREQ: u32 = 89; -pub const EMSGSIZE: u32 = 90; -pub const EPROTOTYPE: u32 = 91; -pub const ENOPROTOOPT: u32 = 92; -pub const EPROTONOSUPPORT: u32 = 93; -pub const ESOCKTNOSUPPORT: u32 = 94; -pub const EOPNOTSUPP: u32 = 95; -pub const EPFNOSUPPORT: u32 = 96; -pub const EAFNOSUPPORT: u32 = 97; -pub const EADDRINUSE: u32 = 98; -pub const EADDRNOTAVAIL: u32 = 99; -pub const ENETDOWN: u32 = 100; -pub const ENETUNREACH: u32 = 101; -pub const ENETRESET: u32 = 102; -pub const ECONNABORTED: u32 = 103; -pub const ECONNRESET: u32 = 104; -pub const ENOBUFS: u32 = 105; -pub const EISCONN: u32 = 106; -pub const ENOTCONN: u32 = 107; -pub const ESHUTDOWN: u32 = 108; -pub const ETOOMANYREFS: u32 = 109; -pub const ETIMEDOUT: u32 = 110; -pub const ECONNREFUSED: u32 = 111; -pub const EHOSTDOWN: u32 = 112; -pub const EHOSTUNREACH: u32 = 113; -pub const EALREADY: u32 = 114; -pub const EINPROGRESS: u32 = 115; -pub const ESTALE: u32 = 116; -pub const EUCLEAN: u32 = 117; -pub const ENOTNAM: u32 = 118; -pub const ENAVAIL: u32 = 119; -pub const EISNAM: u32 = 120; -pub const EREMOTEIO: u32 = 121; -pub const EDQUOT: u32 = 122; -pub const ENOMEDIUM: u32 = 123; -pub const EMEDIUMTYPE: u32 = 124; -pub const ECANCELED: u32 = 125; -pub const ENOKEY: u32 = 126; -pub const EKEYEXPIRED: u32 = 127; -pub const EKEYREVOKED: u32 = 128; -pub const EKEYREJECTED: u32 = 129; -pub const EOWNERDEAD: u32 = 130; -pub const ENOTRECOVERABLE: u32 = 131; -pub const ERFKILL: u32 = 132; -pub const ENOTSUP: u32 = 95; -pub const _STDLIB_H: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WSTOPPED: u32 = 2; -pub const WEXITED: u32 = 4; -pub const WCONTINUED: u32 = 8; -pub const WNOWAIT: u32 = 16777216; -pub const __WNOTHREAD: u32 = 536870912; -pub const __WALL: u32 = 1073741824; -pub const __WCLONE: u32 = 2147483648; -pub const __W_CONTINUED: u32 = 65535; -pub const __WCOREFLAG: u32 = 128; -pub const _ENDIAN_H: u32 = 1; -pub const __LITTLE_ENDIAN: u32 = 1234; -pub const __BIG_ENDIAN: u32 = 4321; -pub const __PDP_ENDIAN: u32 = 3412; -pub const __BYTE_ORDER: u32 = 1234; -pub const __FLOAT_WORD_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const _BITS_BYTESWAP_H: u32 = 1; -pub const __ldiv_t_defined: u32 = 1; -pub const __lldiv_t_defined: u32 = 1; -pub const RAND_MAX: u32 = 2147483647; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const _SYS_TYPES_H: u32 = 1; -pub const __clock_t_defined: u32 = 1; -pub const __time_t_defined: u32 = 1; -pub const __clockid_t_defined: u32 = 1; -pub const __timer_t_defined: u32 = 1; -pub const __BIT_TYPES_DEFINED__: u32 = 1; -pub const _SYS_SELECT_H: u32 = 1; -pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; -pub const _SIGSET_H_types: u32 = 1; -pub const __timespec_defined: u32 = 1; -pub const _STRUCT_TIMEVAL: u32 = 1; -pub const FD_SETSIZE: u32 = 1024; -pub const _SYS_SYSMACROS_H: u32 = 1; -pub const _BITS_PTHREADTYPES_H: u32 = 1; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; -pub const _ALLOCA_H: u32 = 1; -pub const _STRING_H: u32 = 1; -pub const _XLOCALE_H: u32 = 1; -pub const HAVE___BUILTIN_CLZ: u32 = 1; -pub const HTS_ALLOW_UNALIGNED: u32 = 1; -pub const BCF_HL_FLT: u32 = 0; -pub const BCF_HL_INFO: u32 = 1; -pub const BCF_HL_FMT: u32 = 2; -pub const BCF_HL_CTG: u32 = 3; -pub const BCF_HL_STR: u32 = 4; -pub const BCF_HL_GEN: u32 = 5; -pub const BCF_HT_FLAG: u32 = 0; -pub const BCF_HT_INT: u32 = 1; -pub const BCF_HT_REAL: u32 = 2; -pub const BCF_HT_STR: u32 = 3; -pub const BCF_HT_LONG: u32 = 257; -pub const BCF_VL_FIXED: u32 = 0; -pub const BCF_VL_VAR: u32 = 1; -pub const BCF_VL_A: u32 = 2; -pub const BCF_VL_G: u32 = 3; -pub const BCF_VL_R: u32 = 4; -pub const BCF_DT_ID: u32 = 0; -pub const BCF_DT_CTG: u32 = 1; -pub const BCF_DT_SAMPLE: u32 = 2; -pub const BCF_BT_NULL: u32 = 0; -pub const BCF_BT_INT8: u32 = 1; -pub const BCF_BT_INT16: u32 = 2; -pub const BCF_BT_INT32: u32 = 3; -pub const BCF_BT_INT64: u32 = 4; -pub const BCF_BT_FLOAT: u32 = 5; -pub const BCF_BT_CHAR: u32 = 7; -pub const VCF_REF: u32 = 0; -pub const VCF_SNP: u32 = 1; -pub const VCF_MNP: u32 = 2; -pub const VCF_INDEL: u32 = 4; -pub const VCF_OTHER: u32 = 8; -pub const VCF_BND: u32 = 16; -pub const VCF_OVERLAP: u32 = 32; -pub const BCF1_DIRTY_ID: u32 = 1; -pub const BCF1_DIRTY_ALS: u32 = 2; -pub const BCF1_DIRTY_FLT: u32 = 4; -pub const BCF1_DIRTY_INF: u32 = 8; -pub const BCF_ERR_CTG_UNDEF: u32 = 1; -pub const BCF_ERR_TAG_UNDEF: u32 = 2; -pub const BCF_ERR_NCOLS: u32 = 4; -pub const BCF_ERR_LIMITS: u32 = 8; -pub const BCF_ERR_CHAR: u32 = 16; -pub const BCF_ERR_CTG_INVALID: u32 = 32; -pub const BCF_ERR_TAG_INVALID: u32 = 64; -pub const BCF_UN_STR: u32 = 1; -pub const BCF_UN_FLT: u32 = 2; -pub const BCF_UN_INFO: u32 = 4; -pub const BCF_UN_SHR: u32 = 7; -pub const BCF_UN_FMT: u32 = 8; -pub const BCF_UN_IND: u32 = 8; -pub const BCF_UN_ALL: u32 = 15; -pub const bcf_gt_missing: u32 = 0; -pub const bcf_int8_vector_end: i32 = -127; -pub const bcf_int16_vector_end: i32 = -32767; -pub const bcf_int32_vector_end: i32 = -2147483647; -pub const bcf_int64_vector_end: i64 = -9223372036854775807; -pub const bcf_str_vector_end: u32 = 0; -pub const bcf_int8_missing: i32 = -128; -pub const bcf_int16_missing: i32 = -32768; -pub const bcf_int32_missing: i32 = -2147483648; -pub const bcf_int64_missing: i64 = -9223372036854775808; -pub const bcf_str_missing: u32 = 7; -pub const BCF_MAX_BT_INT8: u32 = 127; -pub const BCF_MAX_BT_INT16: u32 = 32767; -pub const BCF_MAX_BT_INT32: u32 = 2147483647; -pub const BCF_MIN_BT_INT8: i32 = -120; -pub const BCF_MIN_BT_INT16: i32 = -32760; -pub const BCF_MIN_BT_INT32: i32 = -2147483640; -pub const SAM_FORMAT_VERSION: &'static [u8; 4usize] = b"1.6\0"; -pub const BAM_CMATCH: u32 = 0; -pub const BAM_CINS: u32 = 1; -pub const BAM_CDEL: u32 = 2; -pub const BAM_CREF_SKIP: u32 = 3; -pub const BAM_CSOFT_CLIP: u32 = 4; -pub const BAM_CHARD_CLIP: u32 = 5; -pub const BAM_CPAD: u32 = 6; -pub const BAM_CEQUAL: u32 = 7; -pub const BAM_CDIFF: u32 = 8; -pub const BAM_CBACK: u32 = 9; -pub const BAM_CIGAR_STR: &'static [u8; 11usize] = b"MIDNSHP=XB\0"; -pub const BAM_CIGAR_SHIFT: u32 = 4; -pub const BAM_CIGAR_MASK: u32 = 15; -pub const BAM_CIGAR_TYPE: u32 = 246183; -pub const BAM_FPAIRED: u32 = 1; -pub const BAM_FPROPER_PAIR: u32 = 2; -pub const BAM_FUNMAP: u32 = 4; -pub const BAM_FMUNMAP: u32 = 8; -pub const BAM_FREVERSE: u32 = 16; -pub const BAM_FMREVERSE: u32 = 32; -pub const BAM_FREAD1: u32 = 64; -pub const BAM_FREAD2: u32 = 128; -pub const BAM_FSECONDARY: u32 = 256; -pub const BAM_FQCFAIL: u32 = 512; -pub const BAM_FDUP: u32 = 1024; -pub const BAM_FSUPPLEMENTARY: u32 = 2048; -pub const BAM_USER_OWNS_STRUCT: u32 = 1; -pub const BAM_USER_OWNS_DATA: u32 = 2; -pub const BGZF_BLOCK_SIZE: u32 = 65280; -pub const BGZF_MAX_BLOCK_SIZE: u32 = 65536; -pub const BGZF_ERR_ZLIB: u32 = 1; -pub const BGZF_ERR_HEADER: u32 = 2; -pub const BGZF_ERR_IO: u32 = 4; -pub const BGZF_ERR_MISUSE: u32 = 8; -pub const BGZF_ERR_MT: u32 = 16; -pub const BGZF_ERR_CRC: u32 = 32; -pub const GT_HOM_RR: u32 = 0; -pub const GT_HOM_AA: u32 = 1; -pub const GT_HET_RA: u32 = 2; -pub const GT_HET_AA: u32 = 3; -pub const GT_HAPL_R: u32 = 4; -pub const GT_HAPL_A: u32 = 5; -pub const GT_UNKN: u32 = 6; -pub const TBX_MAX_SHIFT: u32 = 31; -pub const TBX_GENERIC: u32 = 0; -pub const TBX_SAM: u32 = 1; -pub const TBX_VCF: u32 = 2; -pub const TBX_UCSC: u32 = 65536; -pub const COLLAPSE_NONE: u32 = 0; -pub const COLLAPSE_SNPS: u32 = 1; -pub const COLLAPSE_INDELS: u32 = 2; -pub const COLLAPSE_ANY: u32 = 4; -pub const COLLAPSE_SOME: u32 = 8; -pub const COLLAPSE_BOTH: u32 = 3; -pub const BCF_SR_PAIR_SNPS: u32 = 1; -pub const BCF_SR_PAIR_INDELS: u32 = 2; -pub const BCF_SR_PAIR_ANY: u32 = 4; -pub const BCF_SR_PAIR_SOME: u32 = 8; -pub const BCF_SR_PAIR_SNP_REF: u32 = 16; -pub const BCF_SR_PAIR_INDEL_REF: u32 = 32; -pub const BCF_SR_PAIR_EXACT: u32 = 64; -pub const BCF_SR_PAIR_BOTH: u32 = 3; -pub const BCF_SR_PAIR_BOTH_REF: u32 = 51; -pub type size_t = ::std::os::raw::c_ulong; -pub type wchar_t = ::std::os::raw::c_int; -pub type int_least8_t = ::std::os::raw::c_schar; -pub type int_least16_t = ::std::os::raw::c_short; -pub type int_least32_t = ::std::os::raw::c_int; -pub type int_least64_t = ::std::os::raw::c_long; -pub type uint_least8_t = ::std::os::raw::c_uchar; -pub type uint_least16_t = ::std::os::raw::c_ushort; -pub type uint_least32_t = ::std::os::raw::c_uint; -pub type uint_least64_t = ::std::os::raw::c_ulong; -pub type int_fast8_t = ::std::os::raw::c_schar; -pub type int_fast16_t = ::std::os::raw::c_long; -pub type int_fast32_t = ::std::os::raw::c_long; -pub type int_fast64_t = ::std::os::raw::c_long; -pub type uint_fast8_t = ::std::os::raw::c_uchar; -pub type uint_fast16_t = ::std::os::raw::c_ulong; -pub type uint_fast32_t = ::std::os::raw::c_ulong; -pub type uint_fast64_t = ::std::os::raw::c_ulong; -pub type intmax_t = ::std::os::raw::c_long; -pub type uintmax_t = ::std::os::raw::c_ulong; -pub type __gwchar_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct imaxdiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_imaxdiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub fn imaxabs(__n: intmax_t) -> intmax_t; -} -extern "C" { - pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; -} -extern "C" { - pub fn strtoimax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn strtoumax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -extern "C" { - pub fn wcstoimax( - __nptr: *const __gwchar_t, - __endptr: *mut *mut __gwchar_t, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn wcstoumax( - __nptr: *const __gwchar_t, - __endptr: *mut *mut __gwchar_t, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -pub type __u_char = ::std::os::raw::c_uchar; -pub type __u_short = ::std::os::raw::c_ushort; -pub type __u_int = ::std::os::raw::c_uint; -pub type __u_long = ::std::os::raw::c_ulong; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; -pub type __quad_t = ::std::os::raw::c_long; -pub type __u_quad_t = ::std::os::raw::c_ulong; -pub type __dev_t = ::std::os::raw::c_ulong; -pub type __uid_t = ::std::os::raw::c_uint; -pub type __gid_t = ::std::os::raw::c_uint; -pub type __ino_t = ::std::os::raw::c_ulong; -pub type __ino64_t = ::std::os::raw::c_ulong; -pub type __mode_t = ::std::os::raw::c_uint; -pub type __nlink_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 __pid_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __fsid_t { - pub __val: [::std::os::raw::c_int; 2usize], -} -#[test] -fn bindgen_test_layout___fsid_t() { - assert_eq!( - ::std::mem::size_of::<__fsid_t>(), - 8usize, - concat!("Size of: ", stringify!(__fsid_t)) - ); - assert_eq!( - ::std::mem::align_of::<__fsid_t>(), - 4usize, - concat!("Alignment of ", stringify!(__fsid_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__fsid_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__fsid_t), - "::", - stringify!(__val) - ) - ); -} -pub type __clock_t = ::std::os::raw::c_long; -pub type __rlim_t = ::std::os::raw::c_ulong; -pub type __rlim64_t = ::std::os::raw::c_ulong; -pub type __id_t = ::std::os::raw::c_uint; -pub type __time_t = ::std::os::raw::c_long; -pub type __useconds_t = ::std::os::raw::c_uint; -pub type __suseconds_t = ::std::os::raw::c_long; -pub type __daddr_t = ::std::os::raw::c_int; -pub type __swblk_t = ::std::os::raw::c_long; -pub type __key_t = ::std::os::raw::c_int; -pub type __clockid_t = ::std::os::raw::c_int; -pub type __timer_t = *mut ::std::os::raw::c_void; -pub type __blksize_t = ::std::os::raw::c_long; -pub type __blkcnt_t = ::std::os::raw::c_long; -pub type __blkcnt64_t = ::std::os::raw::c_long; -pub type __fsblkcnt_t = ::std::os::raw::c_ulong; -pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; -pub type __ssize_t = ::std::os::raw::c_long; -pub type __loff_t = __off64_t; -pub type __qaddr_t = *mut __quad_t; -pub type __caddr_t = *mut ::std::os::raw::c_char; -pub type __intptr_t = ::std::os::raw::c_long; -pub type __socklen_t = ::std::os::raw::c_uint; -pub type FILE = _IO_FILE; -pub type __FILE = _IO_FILE; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __mbstate_t { - pub __count: ::std::os::raw::c_int, - pub __value: __mbstate_t__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __mbstate_t__bindgen_ty_1 { - pub __wch: ::std::os::raw::c_uint, - pub __wchb: [::std::os::raw::c_char; 4usize], - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout___mbstate_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t__bindgen_ty_1>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wch as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wch) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wchb as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t__bindgen_ty_1), - "::", - stringify!(__wchb) - ) - ); -} -#[test] -fn bindgen_test_layout___mbstate_t() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 8usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 4usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__count as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__value as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__value) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _G_fpos_t { - pub __pos: __off_t, - pub __state: __mbstate_t, -} -#[test] -fn bindgen_test_layout__G_fpos_t() { - assert_eq!( - ::std::mem::size_of::<_G_fpos_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos_t>())).__state as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos_t), - "::", - stringify!(__state) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _G_fpos64_t { - pub __pos: __off64_t, - pub __state: __mbstate_t, -} -#[test] -fn bindgen_test_layout__G_fpos64_t() { - assert_eq!( - ::std::mem::size_of::<_G_fpos64_t>(), - 16usize, - concat!("Size of: ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - ::std::mem::align_of::<_G_fpos64_t>(), - 8usize, - concat!("Alignment of ", stringify!(_G_fpos64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_G_fpos64_t>())).__state as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_G_fpos64_t), - "::", - stringify!(__state) - ) - ); -} -pub type _G_int16_t = ::std::os::raw::c_short; -pub type _G_int32_t = ::std::os::raw::c_int; -pub type _G_uint16_t = ::std::os::raw::c_ushort; -pub type _G_uint32_t = ::std::os::raw::c_uint; -pub type va_list = __builtin_va_list; -pub type __gnuc_va_list = __builtin_va_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_jump_t { - _unused: [u8; 0], -} -pub type _IO_lock_t = ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - pub _next: *mut _IO_marker, - pub _sbuf: *mut _IO_FILE, - pub _pos: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__IO_marker() { - assert_eq!( - ::std::mem::size_of::<_IO_marker>(), - 24usize, - concat!("Size of: ", stringify!(_IO_marker)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_marker>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_marker)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._next as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._sbuf as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_sbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_marker>()))._pos as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_marker), - "::", - stringify!(_pos) - ) - ); -} -pub const __codecvt_result___codecvt_ok: __codecvt_result = 0; -pub const __codecvt_result___codecvt_partial: __codecvt_result = 1; -pub const __codecvt_result___codecvt_error: __codecvt_result = 2; -pub const __codecvt_result___codecvt_noconv: __codecvt_result = 3; -pub type __codecvt_result = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: ::std::os::raw::c_int, - pub _IO_read_ptr: *mut ::std::os::raw::c_char, - pub _IO_read_end: *mut ::std::os::raw::c_char, - pub _IO_read_base: *mut ::std::os::raw::c_char, - pub _IO_write_base: *mut ::std::os::raw::c_char, - pub _IO_write_ptr: *mut ::std::os::raw::c_char, - pub _IO_write_end: *mut ::std::os::raw::c_char, - pub _IO_buf_base: *mut ::std::os::raw::c_char, - pub _IO_buf_end: *mut ::std::os::raw::c_char, - pub _IO_save_base: *mut ::std::os::raw::c_char, - pub _IO_backup_base: *mut ::std::os::raw::c_char, - pub _IO_save_end: *mut ::std::os::raw::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: ::std::os::raw::c_int, - pub _flags2: ::std::os::raw::c_int, - pub _old_offset: __off_t, - pub _cur_column: ::std::os::raw::c_ushort, - pub _vtable_offset: ::std::os::raw::c_schar, - pub _shortbuf: [::std::os::raw::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub __pad1: *mut ::std::os::raw::c_void, - pub __pad2: *mut ::std::os::raw::c_void, - pub __pad3: *mut ::std::os::raw::c_void, - pub __pad4: *mut ::std::os::raw::c_void, - pub __pad5: size_t, - pub _mode: ::std::os::raw::c_int, - pub _unused2: [::std::os::raw::c_char; 20usize], -} -#[test] -fn bindgen_test_layout__IO_FILE() { - assert_eq!( - ::std::mem::size_of::<_IO_FILE>(), - 216usize, - concat!("Size of: ", stringify!(_IO_FILE)) - ); - assert_eq!( - ::std::mem::align_of::<_IO_FILE>(), - 8usize, - concat!("Alignment of ", stringify!(_IO_FILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_read_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_ptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_write_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_buf_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_backup_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_IO_save_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._markers as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_markers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._chain as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_chain) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_fileno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_flags2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_old_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_cur_column) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_vtable_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_shortbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._lock as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_lock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad1 as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad2 as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad3 as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad3) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad4 as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad4) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(__pad5) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._mode as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_mode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize }, - 196usize, - concat!( - "Offset of field: ", - stringify!(_IO_FILE), - "::", - stringify!(_unused2) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE_plus { - _unused: [u8; 0], -} -extern "C" { - pub static mut _IO_2_1_stdin_: _IO_FILE_plus; -} -extern "C" { - pub static mut _IO_2_1_stdout_: _IO_FILE_plus; -} -extern "C" { - pub static mut _IO_2_1_stderr_: _IO_FILE_plus; -} -pub type __io_read_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *mut ::std::os::raw::c_char, - __nbytes: size_t, - ) -> __ssize_t, ->; -pub type __io_write_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *const ::std::os::raw::c_char, - __n: size_t, - ) -> __ssize_t, ->; -pub type __io_seek_fn = ::std::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __pos: *mut __off64_t, - __w: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type __io_close_fn = ::std::option::Option< - unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn __underflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __uflow(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __overflow(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_getc(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_putc(__c: ::std::os::raw::c_int, __fp: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_feof(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_ferror(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_peekc_locked(__fp: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_flockfile(arg1: *mut _IO_FILE); -} -extern "C" { - pub fn _IO_funlockfile(arg1: *mut _IO_FILE); -} -extern "C" { - pub fn _IO_ftrylockfile(arg1: *mut _IO_FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_vfscanf( - arg1: *mut _IO_FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - arg4: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_vfprintf( - arg1: *mut _IO_FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _IO_padn(arg1: *mut _IO_FILE, arg2: ::std::os::raw::c_int, arg3: __ssize_t) - -> __ssize_t; -} -extern "C" { - pub fn _IO_sgetn( - arg1: *mut _IO_FILE, - arg2: *mut ::std::os::raw::c_void, - arg3: size_t, - ) -> size_t; -} -extern "C" { - pub fn _IO_seekoff( - arg1: *mut _IO_FILE, - arg2: __off64_t, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> __off64_t; -} -extern "C" { - pub fn _IO_seekpos( - arg1: *mut _IO_FILE, - arg2: __off64_t, - arg3: ::std::os::raw::c_int, - ) -> __off64_t; -} -extern "C" { - pub fn _IO_free_backup_area(arg1: *mut _IO_FILE); -} -pub type off_t = __off_t; -pub type ssize_t = __ssize_t; -pub type fpos_t = _G_fpos_t; -extern "C" { - pub static mut stdin: *mut _IO_FILE; -} -extern "C" { - pub static mut stdout: *mut _IO_FILE; -} -extern "C" { - pub static mut stderr: *mut _IO_FILE; -} -extern "C" { - pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rename( - __old: *const ::std::os::raw::c_char, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renameat( - __oldfd: ::std::os::raw::c_int, - __old: *const ::std::os::raw::c_char, - __newfd: ::std::os::raw::c_int, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tmpfile() -> *mut FILE; -} -extern "C" { - pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tempnam( - __dir: *const ::std::os::raw::c_char, - __pfx: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn freopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - __stream: *mut FILE, - ) -> *mut FILE; -} -extern "C" { - pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) - -> *mut FILE; -} -extern "C" { - pub fn fmemopen( - __s: *mut ::std::os::raw::c_void, - __len: size_t, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn open_memstream( - __bufloc: *mut *mut ::std::os::raw::c_char, - __sizeloc: *mut size_t, - ) -> *mut FILE; -} -extern "C" { - pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn setvbuf( - __stream: *mut FILE, - __buf: *mut ::std::os::raw::c_char, - __modes: ::std::os::raw::c_int, - __n: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: size_t); -} -extern "C" { - pub fn setlinebuf(__stream: *mut FILE); -} -extern "C" { - pub fn fprintf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfprintf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vprintf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn snprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsnprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vdprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fscanf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_fscanf"] - pub fn fscanf1( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_scanf"] - pub fn scanf1(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_sscanf"] - pub fn sscanf1( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfscanf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vscanf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_vfscanf"] - pub fn vfscanf1( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_vscanf"] - pub fn vscanf1( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__isoc99_vsscanf"] - pub fn vsscanf1( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar_unlocked() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgets( - __s: *mut ::std::os::raw::c_char, - __n: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gets(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn getline( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut size_t, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fread( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __n: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn fwrite( - __ptr: *const ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __n: ::std::os::raw::c_ulong, - __s: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn fread_unlocked( - __ptr: *mut ::std::os::raw::c_void, - __size: size_t, - __n: size_t, - __stream: *mut FILE, - ) -> size_t; -} -extern "C" { - pub fn fwrite_unlocked( - __ptr: *const ::std::os::raw::c_void, - __size: size_t, - __n: size_t, - __stream: *mut FILE, - ) -> size_t; -} -extern "C" { - pub fn fseek( - __stream: *mut FILE, - __off: ::std::os::raw::c_long, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn rewind(__stream: *mut FILE); -} -extern "C" { - pub fn fseeko( - __stream: *mut FILE, - __off: __off_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftello(__stream: *mut FILE) -> __off_t; -} -extern "C" { - pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearerr(__stream: *mut FILE); -} -extern "C" { - pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearerr_unlocked(__stream: *mut FILE); -} -extern "C" { - pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn perror(__s: *const ::std::os::raw::c_char); -} -extern "C" { - pub static mut sys_nerr: ::std::os::raw::c_int; -} -extern "C" { - pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn popen( - __command: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn flockfile(__stream: *mut FILE); -} -extern "C" { - pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn funlockfile(__stream: *mut FILE); -} -pub const htsLogLevel_HTS_LOG_OFF: htsLogLevel = 0; -pub const htsLogLevel_HTS_LOG_ERROR: htsLogLevel = 1; -pub const htsLogLevel_HTS_LOG_WARNING: htsLogLevel = 3; -pub const htsLogLevel_HTS_LOG_INFO: htsLogLevel = 4; -pub const htsLogLevel_HTS_LOG_DEBUG: htsLogLevel = 5; -pub const htsLogLevel_HTS_LOG_TRACE: htsLogLevel = 6; -pub type htsLogLevel = u32; -extern "C" { - pub fn hts_set_log_level(level: htsLogLevel); -} -extern "C" { - pub fn hts_get_log_level() -> htsLogLevel; -} -extern "C" { - pub static mut hts_verbose: ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_log( - severity: htsLogLevel, - context: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ... - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_fd { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hFILE { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kstring_t { - pub l: size_t, - pub m: size_t, - pub s: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_kstring_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kstring_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kstring_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(l) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(s) - ) - ); -} -extern "C" { - pub fn hts_resize_array_( - arg1: size_t, - arg2: size_t, - arg3: size_t, - arg4: *mut ::std::os::raw::c_void, - arg5: *mut *mut ::std::os::raw::c_void, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_free(ptr: *mut ::std::os::raw::c_void); -} -pub const htsFormatCategory_unknown_category: htsFormatCategory = 0; -pub const htsFormatCategory_sequence_data: htsFormatCategory = 1; -pub const htsFormatCategory_variant_data: htsFormatCategory = 2; -pub const htsFormatCategory_index_file: htsFormatCategory = 3; -pub const htsFormatCategory_region_list: htsFormatCategory = 4; -pub const htsFormatCategory_category_maximum: htsFormatCategory = 32767; -pub type htsFormatCategory = u32; -pub const htsExactFormat_unknown_format: htsExactFormat = 0; -pub const htsExactFormat_binary_format: htsExactFormat = 1; -pub const htsExactFormat_text_format: htsExactFormat = 2; -pub const htsExactFormat_sam: htsExactFormat = 3; -pub const htsExactFormat_bam: htsExactFormat = 4; -pub const htsExactFormat_bai: htsExactFormat = 5; -pub const htsExactFormat_cram: htsExactFormat = 6; -pub const htsExactFormat_crai: htsExactFormat = 7; -pub const htsExactFormat_vcf: htsExactFormat = 8; -pub const htsExactFormat_bcf: htsExactFormat = 9; -pub const htsExactFormat_csi: htsExactFormat = 10; -pub const htsExactFormat_gzi: htsExactFormat = 11; -pub const htsExactFormat_tbi: htsExactFormat = 12; -pub const htsExactFormat_bed: htsExactFormat = 13; -pub const htsExactFormat_htsget: htsExactFormat = 14; -pub const htsExactFormat_json: htsExactFormat = 14; -pub const htsExactFormat_empty_format: htsExactFormat = 15; -pub const htsExactFormat_fasta_format: htsExactFormat = 16; -pub const htsExactFormat_fastq_format: htsExactFormat = 17; -pub const htsExactFormat_fai_format: htsExactFormat = 18; -pub const htsExactFormat_fqi_format: htsExactFormat = 19; -pub const htsExactFormat_format_maximum: htsExactFormat = 32767; -pub type htsExactFormat = u32; -pub const htsCompression_no_compression: htsCompression = 0; -pub const htsCompression_gzip: htsCompression = 1; -pub const htsCompression_bgzf: htsCompression = 2; -pub const htsCompression_custom: htsCompression = 3; -pub const htsCompression_bzip2_compression: htsCompression = 4; -pub const htsCompression_compression_maximum: htsCompression = 32767; -pub type htsCompression = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat { - pub category: htsFormatCategory, - pub format: htsExactFormat, - pub version: htsFormat__bindgen_ty_1, - pub compression: htsCompression, - pub compression_level: ::std::os::raw::c_short, - pub specific: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat__bindgen_ty_1 { - pub major: ::std::os::raw::c_short, - pub minor: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_htsFormat__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(minor) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFormat() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(htsFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFormat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).category as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(category) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression_level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression_level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).specific as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(specific) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __hts_idx_t { - _unused: [u8; 0], -} -pub type hts_idx_t = __hts_idx_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct htsFile { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub lineno: i64, - pub line: kstring_t, - pub fn_: *mut ::std::os::raw::c_char, - pub fn_aux: *mut ::std::os::raw::c_char, - pub fp: htsFile__bindgen_ty_1, - pub state: *mut ::std::os::raw::c_void, - pub format: htsFormat, - pub idx: *mut hts_idx_t, - pub fnidx: *const ::std::os::raw::c_char, - pub bam_header: *mut sam_hdr_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union htsFile__bindgen_ty_1 { - pub bgzf: *mut BGZF, - pub cram: *mut cram_fd, - pub hfile: *mut hFILE, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_htsFile__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bgzf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(bgzf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cram as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(cram) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfile as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(hfile) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFile() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(htsFile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lineno as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(lineno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_aux as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_aux) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fnidx as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fnidx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bam_header as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(bam_header) - ) - ); -} -impl htsFile { - #[inline] - pub fn is_bin(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bin(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_write(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_write(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_be(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_be(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_bgzf(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bgzf(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - is_bin: u32, - is_write: u32, - is_be: u32, - is_cram: u32, - is_bgzf: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let is_bin: u32 = unsafe { ::std::mem::transmute(is_bin) }; - is_bin as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; - is_write as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; - is_be as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let is_bgzf: u32 = unsafe { ::std::mem::transmute(is_bgzf) }; - is_bgzf as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsThreadPool { - pub pool: *mut hts_tpool, - pub qsize: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_htsThreadPool() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(htsThreadPool)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsThreadPool)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pool as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(pool) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qsize as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(qsize) - ) - ); -} -pub const sam_fields_SAM_QNAME: sam_fields = 1; -pub const sam_fields_SAM_FLAG: sam_fields = 2; -pub const sam_fields_SAM_RNAME: sam_fields = 4; -pub const sam_fields_SAM_POS: sam_fields = 8; -pub const sam_fields_SAM_MAPQ: sam_fields = 16; -pub const sam_fields_SAM_CIGAR: sam_fields = 32; -pub const sam_fields_SAM_RNEXT: sam_fields = 64; -pub const sam_fields_SAM_PNEXT: sam_fields = 128; -pub const sam_fields_SAM_TLEN: sam_fields = 256; -pub const sam_fields_SAM_SEQ: sam_fields = 512; -pub const sam_fields_SAM_QUAL: sam_fields = 1024; -pub const sam_fields_SAM_AUX: sam_fields = 2048; -pub const sam_fields_SAM_RGAUX: sam_fields = 4096; -pub type sam_fields = u32; -pub const hts_fmt_option_CRAM_OPT_DECODE_MD: hts_fmt_option = 0; -pub const hts_fmt_option_CRAM_OPT_PREFIX: hts_fmt_option = 1; -pub const hts_fmt_option_CRAM_OPT_VERBOSITY: hts_fmt_option = 2; -pub const hts_fmt_option_CRAM_OPT_SEQS_PER_SLICE: hts_fmt_option = 3; -pub const hts_fmt_option_CRAM_OPT_SLICES_PER_CONTAINER: hts_fmt_option = 4; -pub const hts_fmt_option_CRAM_OPT_RANGE: hts_fmt_option = 5; -pub const hts_fmt_option_CRAM_OPT_VERSION: hts_fmt_option = 6; -pub const hts_fmt_option_CRAM_OPT_EMBED_REF: hts_fmt_option = 7; -pub const hts_fmt_option_CRAM_OPT_IGNORE_MD5: hts_fmt_option = 8; -pub const hts_fmt_option_CRAM_OPT_REFERENCE: hts_fmt_option = 9; -pub const hts_fmt_option_CRAM_OPT_MULTI_SEQ_PER_SLICE: hts_fmt_option = 10; -pub const hts_fmt_option_CRAM_OPT_NO_REF: hts_fmt_option = 11; -pub const hts_fmt_option_CRAM_OPT_USE_BZIP2: hts_fmt_option = 12; -pub const hts_fmt_option_CRAM_OPT_SHARED_REF: hts_fmt_option = 13; -pub const hts_fmt_option_CRAM_OPT_NTHREADS: hts_fmt_option = 14; -pub const hts_fmt_option_CRAM_OPT_THREAD_POOL: hts_fmt_option = 15; -pub const hts_fmt_option_CRAM_OPT_USE_LZMA: hts_fmt_option = 16; -pub const hts_fmt_option_CRAM_OPT_USE_RANS: hts_fmt_option = 17; -pub const hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS: hts_fmt_option = 18; -pub const hts_fmt_option_CRAM_OPT_LOSSY_NAMES: hts_fmt_option = 19; -pub const hts_fmt_option_CRAM_OPT_BASES_PER_SLICE: hts_fmt_option = 20; -pub const hts_fmt_option_CRAM_OPT_STORE_MD: hts_fmt_option = 21; -pub const hts_fmt_option_CRAM_OPT_STORE_NM: hts_fmt_option = 22; -pub const hts_fmt_option_HTS_OPT_COMPRESSION_LEVEL: hts_fmt_option = 100; -pub const hts_fmt_option_HTS_OPT_NTHREADS: hts_fmt_option = 101; -pub const hts_fmt_option_HTS_OPT_THREAD_POOL: hts_fmt_option = 102; -pub const hts_fmt_option_HTS_OPT_CACHE_SIZE: hts_fmt_option = 103; -pub const hts_fmt_option_HTS_OPT_BLOCK_SIZE: hts_fmt_option = 104; -pub type hts_fmt_option = u32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct hts_opt { - pub arg: *mut ::std::os::raw::c_char, - pub opt: hts_fmt_option, - pub val: hts_opt__bindgen_ty_1, - pub next: *mut hts_opt, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union hts_opt__bindgen_ty_1 { - pub i: ::std::os::raw::c_int, - pub s: *mut ::std::os::raw::c_char, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_hts_opt__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(s) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_opt() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hts_opt)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(arg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).opt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(opt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(val) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(next) - ) - ); -} -extern "C" { - pub fn hts_opt_add( - opts: *mut *mut hts_opt, - c_arg: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_opt_apply(fp: *mut htsFile, opts: *mut hts_opt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_opt_free(opts: *mut hts_opt); -} -extern "C" { - pub fn hts_parse_format( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_parse_opt_list( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub static seq_nt16_table: [::std::os::raw::c_uchar; 256usize]; -} -extern "C" { - pub static mut seq_nt16_str: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub static mut seq_nt16_int: [::std::os::raw::c_int; 0usize]; -} -extern "C" { - pub fn hts_version() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_detect_format(fp: *mut hFILE, fmt: *mut htsFormat) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_format_description(format: *const htsFormat) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_open( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_open_format( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - fmt: *const htsFormat, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_hopen( - fp: *mut hFILE, - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_close(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_get_format(fp: *mut htsFile) -> *const htsFormat; -} -extern "C" { - pub fn hts_format_file_extension(format: *const htsFormat) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_set_opt(fp: *mut htsFile, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_getline( - fp: *mut htsFile, - delimiter: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_readlines( - fn_: *const ::std::os::raw::c_char, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_readlist( - fn_: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_set_threads(fp: *mut htsFile, n: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_set_thread_pool(fp: *mut htsFile, p: *mut htsThreadPool) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_set_cache_size(fp: *mut htsFile, n: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_set_fai_filename( - fp: *mut htsFile, - fn_aux: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_check_EOF(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -pub type hts_pos_t = i64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair_pos_t { - pub beg: hts_pos_t, - pub end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_hts_pair_pos_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(end) - ) - ); -} -pub type hts_pair32_t = hts_pair_pos_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair64_t { - pub u: u64, - pub v: u64, -} -#[test] -fn bindgen_test_layout_hts_pair64_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(v) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair64_max_t { - pub u: u64, - pub v: u64, - pub max: u64, -} -#[test] -fn bindgen_test_layout_hts_pair64_max_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(v) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(max) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_reglist_t { - pub reg: *const ::std::os::raw::c_char, - pub intervals: *mut hts_pair_pos_t, - pub tid: ::std::os::raw::c_int, - pub count: u32, - pub min_beg: hts_pos_t, - pub max_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_hts_reglist_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(hts_reglist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_reglist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).intervals as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(intervals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(min_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(max_end) - ) - ); -} -pub type hts_readrec_func = ::std::option::Option< - unsafe extern "C" fn( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - r: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int, ->; -pub type hts_seek_func = ::std::option::Option< - unsafe extern "C" fn( - fp: *mut ::std::os::raw::c_void, - offset: i64, - where_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type hts_tell_func = - ::std::option::Option i64>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub tid: ::std::os::raw::c_int, - pub n_off: ::std::os::raw::c_int, - pub i: ::std::os::raw::c_int, - pub n_reg: ::std::os::raw::c_int, - pub beg: hts_pos_t, - pub end: hts_pos_t, - pub reg_list: *mut hts_reglist_t, - pub curr_tid: ::std::os::raw::c_int, - pub curr_reg: ::std::os::raw::c_int, - pub curr_intv: ::std::os::raw::c_int, - pub curr_beg: hts_pos_t, - pub curr_end: hts_pos_t, - pub curr_off: u64, - pub nocoor_off: u64, - pub off: *mut hts_pair64_max_t, - pub readrec: hts_readrec_func, - pub seek: hts_seek_func, - pub tell: hts_tell_func, - pub bins: hts_itr_t__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t__bindgen_ty_1 { - pub n: ::std::os::raw::c_int, - pub m: ::std::os::raw::c_int, - pub a: *mut ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_hts_itr_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(a) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_itr_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(hts_itr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_reg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg_list as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(reg_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_tid as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_reg as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_intv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_intv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_beg as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_end as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_off as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nocoor_off as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(nocoor_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).off as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readrec as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(readrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tell as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tell) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(bins) - ) - ); -} -impl hts_itr_t { - #[inline] - pub fn read_rest(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_read_rest(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn finished(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_finished(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn nocoor(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_nocoor(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn multi(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_multi(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - read_rest: u32, - finished: u32, - is_cram: u32, - nocoor: u32, - multi: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let read_rest: u32 = unsafe { ::std::mem::transmute(read_rest) }; - read_rest as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let finished: u32 = unsafe { ::std::mem::transmute(finished) }; - finished as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let nocoor: u32 = unsafe { ::std::mem::transmute(nocoor) }; - nocoor as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let multi: u32 = unsafe { ::std::mem::transmute(multi) }; - multi as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct aux_key_t { - pub key: ::std::os::raw::c_int, - pub min_off: u64, - pub max_off: u64, -} -#[test] -fn bindgen_test_layout_aux_key_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(aux_key_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(aux_key_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(min_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_off as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(aux_key_t), - "::", - stringify!(max_off) - ) - ); -} -pub type hts_itr_multi_t = hts_itr_t; -extern "C" { - pub fn hts_idx_init( - n: ::std::os::raw::c_int, - fmt: ::std::os::raw::c_int, - offset0: u64, - min_shift: ::std::os::raw::c_int, - n_lvls: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_destroy(idx: *mut hts_idx_t); -} -extern "C" { - pub fn hts_idx_push( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - offset: u64, - is_mapped: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_finish(idx: *mut hts_idx_t, final_offset: u64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_fmt(idx: *mut hts_idx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_tbi_name( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_save( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_save_as( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_load( - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_get_meta(idx: *mut hts_idx_t, l_meta: *mut u32) -> *mut u8; -} -extern "C" { - pub fn hts_idx_set_meta( - idx: *mut hts_idx_t, - l_meta: u32, - meta: *mut u8, - is_copy: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_get_stat( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - mapped: *mut u64, - unmapped: *mut u64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_get_n_no_coor(idx: *const hts_idx_t) -> u64; -} -extern "C" { - pub fn hts_parse_decimal( - str: *const ::std::os::raw::c_char, - strend: *mut *mut ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -pub type hts_name2id_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, ->; -pub type hts_id2name_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char, ->; -extern "C" { - pub fn hts_parse_reg64( - str: *const ::std::os::raw::c_char, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_parse_reg( - str: *const ::std::os::raw::c_char, - beg: *mut ::std::os::raw::c_int, - end: *mut ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_parse_region( - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_itr_query( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_destroy(iter: *mut hts_itr_t); -} -pub type hts_itr_query_func = ::std::option::Option< - unsafe extern "C" fn( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t, ->; -extern "C" { - pub fn hts_itr_querys( - idx: *const hts_idx_t, - reg: *const ::std::os::raw::c_char, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_query: hts_itr_query_func, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_next( - fp: *mut BGZF, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_seqnames( - idx: *const hts_idx_t, - n: *mut ::std::os::raw::c_int, - getid: hts_id2name_f, - hdr: *mut ::std::os::raw::c_void, - ) -> *mut *const ::std::os::raw::c_char; -} -pub type hts_itr_multi_query_func = ::std::option::Option< - unsafe extern "C" fn(idx: *const hts_idx_t, itr: *mut hts_itr_t) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn hts_itr_multi_bam(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_itr_multi_cram(idx: *const hts_idx_t, iter: *mut hts_itr_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_itr_regions( - idx: *const hts_idx_t, - reglist: *mut hts_reglist_t, - count: ::std::os::raw::c_int, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_specific: hts_itr_multi_query_func, - readrec: hts_readrec_func, - seek: hts_seek_func, - tell: hts_tell_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_multi_next( - fd: *mut htsFile, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_reglist_create( - argv: *mut *mut ::std::os::raw::c_char, - argc: ::std::os::raw::c_int, - r_count: *mut ::std::os::raw::c_int, - hdr: *mut ::std::os::raw::c_void, - getid: hts_name2id_f, - ) -> *mut hts_reglist_t; -} -extern "C" { - pub fn hts_reglist_free(reglist: *mut hts_reglist_t, count: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_file_type(fname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct errmod_t { - _unused: [u8; 0], -} -extern "C" { - pub fn errmod_init(depcorr: f64) -> *mut errmod_t; -} -extern "C" { - pub fn errmod_destroy(em: *mut errmod_t); -} -extern "C" { - pub fn errmod_cal( - em: *const errmod_t, - n: ::std::os::raw::c_int, - m: ::std::os::raw::c_int, - bases: *mut u16, - q: *mut f32, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct probaln_par_t { - pub d: f32, - pub e: f32, - pub bw: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_probaln_par_t() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(probaln_par_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(probaln_par_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(e) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bw as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(bw) - ) - ); -} -extern "C" { - pub fn probaln_glocal( - ref_: *const u8, - l_ref: ::std::os::raw::c_int, - query: *const u8, - l_query: ::std::os::raw::c_int, - iqual: *const u8, - c: *const probaln_par_t, - state: *mut ::std::os::raw::c_int, - q: *mut u8, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_md5_context { - _unused: [u8; 0], -} -extern "C" { - pub fn hts_md5_init() -> *mut hts_md5_context; -} -extern "C" { - pub fn hts_md5_update( - ctx: *mut hts_md5_context, - data: *const ::std::os::raw::c_void, - size: ::std::os::raw::c_ulong, - ); -} -extern "C" { - pub fn hts_md5_final(digest: *mut ::std::os::raw::c_uchar, ctx: *mut hts_md5_context); -} -extern "C" { - pub fn hts_md5_reset(ctx: *mut hts_md5_context); -} -extern "C" { - pub fn hts_md5_hex(hex: *mut ::std::os::raw::c_char, digest: *const ::std::os::raw::c_uchar); -} -extern "C" { - pub fn hts_md5_destroy(ctx: *mut hts_md5_context); -} -extern "C" { - pub fn __assert_fail( - __assertion: *const ::std::os::raw::c_char, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_uint, - __function: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn __assert_perror_fail( - __errnum: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_uint, - __function: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn __assert( - __assertion: *const ::std::os::raw::c_char, - __file: *const ::std::os::raw::c_char, - __line: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn __errno_location() -> *mut ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub __wait_terminated: wait__bindgen_ty_1, - pub __wait_stopped: wait__bindgen_ty_2, - _bindgen_union_align: u32, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); -} -impl wait__bindgen_ty_1 { - #[inline] - pub fn __w_termsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set___w_termsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn __w_coredump(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set___w_coredump(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn __w_retcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_retcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __w_termsig: ::std::os::raw::c_uint, - __w_coredump: ::std::os::raw::c_uint, - __w_retcode: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let __w_termsig: u32 = unsafe { ::std::mem::transmute(__w_termsig) }; - __w_termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let __w_coredump: u32 = unsafe { ::std::mem::transmute(__w_coredump) }; - __w_coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let __w_retcode: u32 = unsafe { ::std::mem::transmute(__w_retcode) }; - __w_retcode as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); -} -impl wait__bindgen_ty_2 { - #[inline] - pub fn __w_stopval(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_stopval(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn __w_stopsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set___w_stopsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __w_stopval: ::std::os::raw::c_uint, - __w_stopsig: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let __w_stopval: u32 = unsafe { ::std::mem::transmute(__w_stopval) }; - __w_stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let __w_stopsig: u32 = unsafe { ::std::mem::transmute(__w_stopsig) }; - __w_stopsig as u64 - }); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_wait() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__wait_terminated as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(__wait_terminated) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__wait_stopped as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(__wait_stopped) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __WAIT_STATUS { - pub __uptr: *mut wait, - pub __iptr: *mut ::std::os::raw::c_int, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout___WAIT_STATUS() { - assert_eq!( - ::std::mem::size_of::<__WAIT_STATUS>(), - 8usize, - concat!("Size of: ", stringify!(__WAIT_STATUS)) - ); - assert_eq!( - ::std::mem::align_of::<__WAIT_STATUS>(), - 8usize, - concat!("Alignment of ", stringify!(__WAIT_STATUS)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__WAIT_STATUS>())).__uptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__WAIT_STATUS), - "::", - stringify!(__uptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__WAIT_STATUS>())).__iptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__WAIT_STATUS), - "::", - stringify!(__iptr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_div_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_ldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, -} -#[test] -fn bindgen_test_layout_lldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub fn __ctype_get_mb_cur_max() -> size_t; -} -extern "C" { - pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtod( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtof( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f32; -} -extern "C" { - pub fn strtol( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn strtoul( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtoq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtouq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn strtoll( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoull( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -pub type u_char = __u_char; -pub type u_short = __u_short; -pub type u_int = __u_int; -pub type u_long = __u_long; -pub type quad_t = __quad_t; -pub type u_quad_t = __u_quad_t; -pub type fsid_t = __fsid_t; -pub type loff_t = __loff_t; -pub type ino_t = __ino_t; -pub type dev_t = __dev_t; -pub type gid_t = __gid_t; -pub type mode_t = __mode_t; -pub type nlink_t = __nlink_t; -pub type uid_t = __uid_t; -pub type pid_t = __pid_t; -pub type id_t = __id_t; -pub type daddr_t = __daddr_t; -pub type caddr_t = __caddr_t; -pub type key_t = __key_t; -pub type clock_t = __clock_t; -pub type time_t = __time_t; -pub type clockid_t = __clockid_t; -pub type timer_t = __timer_t; -pub type ulong = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulong; -pub type register_t = ::std::os::raw::c_long; -pub type __sig_atomic_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sigset_t { - pub __val: [::std::os::raw::c_ulong; 16usize], -} -#[test] -fn bindgen_test_layout___sigset_t() { - assert_eq!( - ::std::mem::size_of::<__sigset_t>(), - 128usize, - concat!("Size of: ", stringify!(__sigset_t)) - ); - assert_eq!( - ::std::mem::align_of::<__sigset_t>(), - 8usize, - concat!("Alignment of ", stringify!(__sigset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigset_t), - "::", - stringify!(__val) - ) - ); -} -pub type sigset_t = __sigset_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_timespec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timespec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timespec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_nsec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timespec), - "::", - stringify!(tv_nsec) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __time_t, - pub tv_usec: __suseconds_t, -} -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} -pub type suseconds_t = __suseconds_t; -pub type __fd_mask = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub __fds_bits: [__fd_mask; 16usize], -} -#[test] -fn bindgen_test_layout_fd_set() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__fds_bits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(__fds_bits) - ) - ); -} -pub type fd_mask = __fd_mask; -extern "C" { - pub fn select( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *mut timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pselect( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *const timespec, - __sigmask: *const __sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gnu_dev_major(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn gnu_dev_minor(__dev: ::std::os::raw::c_ulonglong) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn gnu_dev_makedev( - __major: ::std::os::raw::c_uint, - __minor: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_ulonglong; -} -pub type blksize_t = __blksize_t; -pub type blkcnt_t = __blkcnt_t; -pub type fsblkcnt_t = __fsblkcnt_t; -pub type fsfilcnt_t = __fsfilcnt_t; -pub type pthread_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[test] -fn bindgen_test_layout_pthread_attr_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_attr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_attr_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, -} -#[test] -fn bindgen_test_layout___pthread_internal_list() { - assert_eq!( - ::std::mem::size_of::<__pthread_internal_list>(), - 16usize, - concat!("Size of: ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - ::std::mem::align_of::<__pthread_internal_list>(), - 8usize, - concat!("Alignment of ", stringify!(__pthread_internal_list)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__pthread_internal_list), - "::", - stringify!(__next) - ) - ); -} -pub type __pthread_list_t = __pthread_internal_list; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: pthread_mutex_t___pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 5usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pthread_mutex_t___pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_int, - pub __list: __pthread_list_t, -} -#[test] -fn bindgen_test_layout_pthread_mutex_t___pthread_mutex_s() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t___pthread_mutex_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(pthread_mutex_t___pthread_mutex_s) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__count as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__count) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__owner as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__owner) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nusers as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__nusers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__kind as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__kind) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__spins as *const _ - as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__spins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__list as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t___pthread_mutex_s), - "::", - stringify!(__list) - ) - ); -} -#[test] -fn bindgen_test_layout_pthread_mutex_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_mutex_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutex_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_mutexattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_mutexattr_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: pthread_cond_t__bindgen_ty_1, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 6usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pthread_cond_t__bindgen_ty_1 { - pub __lock: ::std::os::raw::c_int, - pub __futex: ::std::os::raw::c_uint, - pub __total_seq: ::std::os::raw::c_ulonglong, - pub __wakeup_seq: ::std::os::raw::c_ulonglong, - pub __woken_seq: ::std::os::raw::c_ulonglong, - pub __mutex: *mut ::std::os::raw::c_void, - pub __nwaiters: ::std::os::raw::c_uint, - pub __broadcast_seq: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_pthread_cond_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__futex as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__futex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__total_seq as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__total_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__wakeup_seq as *const _ - as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__wakeup_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__woken_seq as *const _ - as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__woken_seq) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__mutex as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__mutex) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nwaiters as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__nwaiters) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__broadcast_seq as *const _ - as usize - }, - 44usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t__bindgen_ty_1), - "::", - stringify!(__broadcast_seq) - ) - ); -} -#[test] -fn bindgen_test_layout_pthread_cond_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_cond_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_cond_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_condattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_condattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_condattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type pthread_key_t = ::std::os::raw::c_uint; -pub type pthread_once_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlock_t { - pub __data: pthread_rwlock_t__bindgen_ty_1, - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pthread_rwlock_t__bindgen_ty_1 { - pub __lock: ::std::os::raw::c_int, - pub __nr_readers: ::std::os::raw::c_uint, - pub __readers_wakeup: ::std::os::raw::c_uint, - pub __writer_wakeup: ::std::os::raw::c_uint, - pub __nr_readers_queued: ::std::os::raw::c_uint, - pub __nr_writers_queued: ::std::os::raw::c_uint, - pub __writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __pad1: ::std::os::raw::c_ulong, - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout_pthread_rwlock_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__lock as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__lock) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_readers as *const _ - as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_readers) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__readers_wakeup as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__readers_wakeup) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__writer_wakeup as *const _ - as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__writer_wakeup) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_readers_queued - as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_readers_queued) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__nr_writers_queued - as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__nr_writers_queued) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__writer as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__writer) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__shared as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__shared) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__pad1 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__pad1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__pad2 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__pad2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).__flags as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t__bindgen_ty_1), - "::", - stringify!(__flags) - ) - ); -} -#[test] -fn bindgen_test_layout_pthread_rwlock_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlock_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__data as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlock_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlockattr_t { - pub __size: [::std::os::raw::c_char; 8usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_pthread_rwlockattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_rwlockattr_t), - "::", - stringify!(__align) - ) - ); -} -pub type pthread_spinlock_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 4usize], -} -#[test] -fn bindgen_test_layout_pthread_barrier_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pthread_barrier_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrier_t), - "::", - stringify!(__align) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_pthread_barrierattr_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(pthread_barrierattr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__align as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pthread_barrierattr_t), - "::", - stringify!(__align) - ) - ); -} -extern "C" { - pub fn random() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn srandom(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn initstate( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: size_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct random_data { - pub fptr: *mut i32, - pub rptr: *mut i32, - pub state: *mut i32, - pub rand_type: ::std::os::raw::c_int, - pub rand_deg: ::std::os::raw::c_int, - pub rand_sep: ::std::os::raw::c_int, - pub end_ptr: *mut i32, -} -#[test] -fn bindgen_test_layout_random_data() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(random_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(random_data)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(fptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rptr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_type as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_deg as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_deg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rand_sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(rand_sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end_ptr as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(random_data), - "::", - stringify!(end_ptr) - ) - ); -} -extern "C" { - pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srandom_r( - __seed: ::std::os::raw::c_uint, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initstate_r( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: size_t, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setstate_r( - __statebuf: *mut ::std::os::raw::c_char, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn drand48() -> f64; -} -extern "C" { - pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; -} -extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn srand48(__seedval: ::std::os::raw::c_long); -} -extern "C" { - pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; -} -extern "C" { - pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct drand48_data { - pub __x: [::std::os::raw::c_ushort; 3usize], - pub __old_x: [::std::os::raw::c_ushort; 3usize], - pub __c: ::std::os::raw::c_ushort, - pub __init: ::std::os::raw::c_ushort, - pub __a: ::std::os::raw::c_ulonglong, -} -#[test] -fn bindgen_test_layout_drand48_data() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(drand48_data)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(drand48_data)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__old_x as *const _ as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__old_x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__c as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__c) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__init as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__init) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__a as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(drand48_data), - "::", - stringify!(__a) - ) - ); -} -extern "C" { - pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn erand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn nrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn jrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand48_r( - __seedval: ::std::os::raw::c_long, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn seed48_r( - __seed16v: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lcong48_r( - __param: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn calloc( - __nmemb: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn cfree(__ptr: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn alloca(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn valloc(__size: size_t) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: size_t, - __size: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn abort(); -} -extern "C" { - pub fn atexit(__func: ::std::option::Option) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn on_exit( - __func: ::std::option::Option< - unsafe extern "C" fn( - __status: ::std::os::raw::c_int, - __arg: *mut ::std::os::raw::c_void, - ), - >, - __arg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn _Exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __secure_getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __replace: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearenv() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkstemps( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn realpath( - __name: *const ::std::os::raw::c_char, - __resolved: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -pub type __compar_fn_t = ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nmemb: size_t, - __size: size_t, - __compar: __compar_fn_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nmemb: size_t, - __size: size_t, - __compar: __compar_fn_t, - ); -} -extern "C" { - pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn lldiv( - __numer: ::std::os::raw::c_longlong, - __denom: ::std::os::raw::c_longlong, - ) -> lldiv_t; -} -extern "C" { - pub fn ecvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qecvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qfcvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qgcvt( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ecvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fcvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qecvt_r( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qfcvt_r( - __value: u128, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbtowc( - __pwc: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstowcs( - __pwcs: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: size_t, - ) -> size_t; -} -extern "C" { - pub fn wcstombs( - __s: *mut ::std::os::raw::c_char, - __pwcs: *const wchar_t, - __n: size_t, - ) -> size_t; -} -extern "C" { - pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getsubopt( - __optionp: *mut *mut ::std::os::raw::c_char, - __tokens: *const *mut ::std::os::raw::c_char, - __valuep: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memcpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memmove( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memccpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: size_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset( - __s: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcoll( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strxfrm( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_struct { - pub __locales: [*mut __locale_data; 13usize], - pub __ctype_b: *const ::std::os::raw::c_ushort, - pub __ctype_tolower: *const ::std::os::raw::c_int, - pub __ctype_toupper: *const ::std::os::raw::c_int, - pub __names: [*const ::std::os::raw::c_char; 13usize], -} -#[test] -fn bindgen_test_layout___locale_struct() { - assert_eq!( - ::std::mem::size_of::<__locale_struct>(), - 232usize, - concat!("Size of: ", stringify!(__locale_struct)) - ); - assert_eq!( - ::std::mem::align_of::<__locale_struct>(), - 8usize, - concat!("Alignment of ", stringify!(__locale_struct)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__locales as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__locales) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_b as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_tolower as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_tolower) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__ctype_toupper as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__ctype_toupper) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__locale_struct>())).__names as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__locale_struct), - "::", - stringify!(__names) - ) - ); -} -pub type __locale_t = *mut __locale_struct; -pub type locale_t = __locale_t; -extern "C" { - pub fn strcoll_l( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __l: __locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strxfrm_l( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: size_t, - __l: __locale_t, - ) -> size_t; -} -extern "C" { - pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strndup( - __string: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strrchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __reject: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strspn( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strpbrk( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strstr( - __haystack: *const ::std::os::raw::c_char, - __needle: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: size_t) -> size_t; -} -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}__xpg_strerror_r"] - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __buflen: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strerror_l( - __errnum: ::std::os::raw::c_int, - __l: __locale_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __bzero(__s: *mut ::std::os::raw::c_void, __n: size_t); -} -extern "C" { - pub fn bcopy( - __src: *const ::std::os::raw::c_void, - __dest: *mut ::std::os::raw::c_void, - __n: size_t, - ); -} -extern "C" { - pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: ::std::os::raw::c_ulong); -} -extern "C" { - pub fn bcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn index( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn rindex( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: size_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ks_tokaux_t { - pub tab: [u64; 4usize], - pub sep: ::std::os::raw::c_int, - pub finished: ::std::os::raw::c_int, - pub p: *const ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_ks_tokaux_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tab as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finished as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(finished) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(p) - ) - ); -} -extern "C" { - pub fn kvsprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ap: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ksprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kputd(d: f64, s: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ksplit_core( - s: *mut ::std::os::raw::c_char, - delimiter: ::std::os::raw::c_int, - _max: *mut ::std::os::raw::c_int, - _offsets: *mut *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kstrstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn kstrnstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn kmemmem( - _str: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - _pat: *const ::std::os::raw::c_void, - m: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn kstrtok( - str: *const ::std::os::raw::c_char, - sep: *const ::std::os::raw::c_char, - aux: *mut ks_tokaux_t, - ) -> *mut ::std::os::raw::c_char; -} -pub type kgets_func = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char, ->; -extern "C" { - pub fn kgetline( - s: *mut kstring_t, - fgets: kgets_func, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -pub type kgets_func2 = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: size_t, - arg3: *mut ::std::os::raw::c_void, - ) -> ssize_t, ->; -extern "C" { - pub fn kgetline2( - s: *mut kstring_t, - fgets: kgets_func2, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -pub type uint16_u = u16; -pub type uint32_u = u32; -pub type uint64_u = u64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_hrec_t { - pub type_: ::std::os::raw::c_int, - pub key: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub nkeys: ::std::os::raw::c_int, - pub keys: *mut *mut ::std::os::raw::c_char, - pub vals: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_bcf_hrec_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nkeys as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(nkeys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keys as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(keys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vals as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(vals) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_idinfo_t { - pub info: [u64; 3usize], - pub hrec: [*mut bcf_hrec_t; 3usize], - pub id: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_idinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(id) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_idpair_t { - pub key: *const ::std::os::raw::c_char, - pub val: *const bcf_idinfo_t, -} -#[test] -fn bindgen_test_layout_bcf_idpair_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(val) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_hdr_t { - pub n: [i32; 3usize], - pub id: [*mut bcf_idpair_t; 3usize], - pub dict: [*mut ::std::os::raw::c_void; 3usize], - pub samples: *mut *mut ::std::os::raw::c_char, - pub hrec: *mut *mut bcf_hrec_t, - pub nhrec: ::std::os::raw::c_int, - pub dirty: ::std::os::raw::c_int, - pub ntransl: ::std::os::raw::c_int, - pub transl: [*mut ::std::os::raw::c_int; 2usize], - pub nsamples_ori: ::std::os::raw::c_int, - pub keep_samples: *mut u8, - pub mem: kstring_t, - pub m: [i32; 3usize], -} -#[test] -fn bindgen_test_layout_bcf_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nhrec as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nhrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dirty as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ntransl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(ntransl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).transl as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(transl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nsamples_ori as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nsamples_ori) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keep_samples as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(keep_samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(m) - ) - ); -} -extern "C" { - pub static mut bcf_type_shift: [u8; 0usize]; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct variant_t { - pub type_: ::std::os::raw::c_int, - pub n: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_variant_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(variant_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(variant_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(variant_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(variant_t), - "::", - stringify!(n) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_fmt_t { - pub id: ::std::os::raw::c_int, - pub n: ::std::os::raw::c_int, - pub size: ::std::os::raw::c_int, - pub type_: ::std::os::raw::c_int, - pub p: *mut u8, - pub p_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, -} -#[test] -fn bindgen_test_layout_bcf_fmt_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p_len) - ) - ); -} -impl bcf_fmt_t { - #[inline] - pub fn p_off(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } - } - #[inline] - pub fn set_p_off(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 31u8, val as u64) - } - } - #[inline] - pub fn p_free(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_p_free(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 31u8, { - let p_off: u32 = unsafe { ::std::mem::transmute(p_off) }; - p_off as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let p_free: u32 = unsafe { ::std::mem::transmute(p_free) }; - p_free as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct bcf_info_t { - pub key: ::std::os::raw::c_int, - pub type_: ::std::os::raw::c_int, - pub v1: bcf_info_t__bindgen_ty_1, - pub vptr: *mut u8, - pub vptr_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub len: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union bcf_info_t__bindgen_ty_1 { - pub i: i64, - pub f: f32, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bcf_info_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(f) - ) - ); -} -#[test] -fn bindgen_test_layout_bcf_info_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bcf_info_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(v1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).len as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(len) - ) - ); -} -impl bcf_info_t { - #[inline] - pub fn vptr_off(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } - } - #[inline] - pub fn set_vptr_off(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 31u8, val as u64) - } - } - #[inline] - pub fn vptr_free(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_vptr_free(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - vptr_off: u32, - vptr_free: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 31u8, { - let vptr_off: u32 = unsafe { ::std::mem::transmute(vptr_off) }; - vptr_off as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let vptr_free: u32 = unsafe { ::std::mem::transmute(vptr_free) }; - vptr_free as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_dec_t { - pub m_fmt: ::std::os::raw::c_int, - pub m_info: ::std::os::raw::c_int, - pub m_id: ::std::os::raw::c_int, - pub m_als: ::std::os::raw::c_int, - pub m_allele: ::std::os::raw::c_int, - pub m_flt: ::std::os::raw::c_int, - pub n_flt: ::std::os::raw::c_int, - pub flt: *mut ::std::os::raw::c_int, - pub id: *mut ::std::os::raw::c_char, - pub als: *mut ::std::os::raw::c_char, - pub allele: *mut *mut ::std::os::raw::c_char, - pub info: *mut bcf_info_t, - pub fmt: *mut bcf_fmt_t, - pub var: *mut variant_t, - pub n_var: ::std::os::raw::c_int, - pub var_type: ::std::os::raw::c_int, - pub shared_dirty: ::std::os::raw::c_int, - pub indiv_dirty: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_dec_t() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(bcf_dec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_dec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_fmt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_info as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_als as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_allele as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_flt as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_flt as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flt as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allele as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_var as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var_type as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared_dirty as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(shared_dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv_dirty as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(indiv_dirty) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf1_t { - pub pos: hts_pos_t, - pub rlen: hts_pos_t, - pub rid: i32, - pub qual: f32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u32>, - pub shared: kstring_t, - pub indiv: kstring_t, - pub d: bcf_dec_t, - pub max_unpack: ::std::os::raw::c_int, - pub unpacked: ::std::os::raw::c_int, - pub unpack_size: [::std::os::raw::c_int; 3usize], - pub errcode: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf1_t() { - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(bcf1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlen as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(shared) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(indiv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(bcf1_t), "::", stringify!(d)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpacked as *const _ as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpacked) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpack_size as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpack_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errcode as *const _ as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(errcode) - ) - ); -} -impl bcf1_t { - #[inline] - pub fn n_info(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_n_info(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn n_allele(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_n_allele(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn n_fmt(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } - } - #[inline] - pub fn set_n_fmt(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub fn n_sample(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 24u8) as u32) } - } - #[inline] - pub fn set_n_sample(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(40usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - n_info: u32, - n_allele: u32, - n_fmt: u32, - n_sample: u32, - ) -> __BindgenBitfieldUnit<[u8; 8usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 16u8, { - let n_info: u32 = unsafe { ::std::mem::transmute(n_info) }; - n_info as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let n_allele: u32 = unsafe { ::std::mem::transmute(n_allele) }; - n_allele as u64 - }); - __bindgen_bitfield_unit.set(32usize, 8u8, { - let n_fmt: u32 = unsafe { ::std::mem::transmute(n_fmt) }; - n_fmt as u64 - }); - __bindgen_bitfield_unit.set(40usize, 24u8, { - let n_sample: u32 = unsafe { ::std::mem::transmute(n_sample) }; - n_sample as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn bcf_hdr_init(mode: *const ::std::os::raw::c_char) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_destroy(h: *mut bcf_hdr_t); -} -extern "C" { - pub fn bcf_init() -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_destroy(v: *mut bcf1_t); -} -extern "C" { - pub fn bcf_empty(v: *mut bcf1_t); -} -extern "C" { - pub fn bcf_clear(v: *mut bcf1_t); -} -pub type vcfFile = htsFile; -extern "C" { - pub fn bcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_set_samples( - hdr: *mut bcf_hdr_t, - samples: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_subset_format(hdr: *const bcf_hdr_t, rec: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_write(fp: *mut htsFile, h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_parse( - s: *mut kstring_t, - h: *const bcf_hdr_t, - v: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_format( - h: *const bcf_hdr_t, - v: *const bcf1_t, - s: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_unpack(b: *mut bcf1_t, which: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_dup(src: *mut bcf1_t) -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_copy(dst: *mut bcf1_t, src: *mut bcf1_t) -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_write(fp: *mut htsFile, h: *mut bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn vcf_hdr_write(fp: *mut htsFile, h: *const bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_write( - fp: *mut htsFile, - h: *const bcf_hdr_t, - v: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_readrec( - fp: *mut BGZF, - null: *mut ::std::os::raw::c_void, - v: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_write_line(fp: *mut htsFile, line: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_dup(hdr: *const bcf_hdr_t) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_combine(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_merge(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_add_sample( - hdr: *mut bcf_hdr_t, - sample: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_set( - hdr: *mut bcf_hdr_t, - fname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_format( - hdr: *const bcf_hdr_t, - is_bcf: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_fmt_text( - hdr: *const bcf_hdr_t, - is_bcf: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_append( - h: *mut bcf_hdr_t, - line: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_printf( - h: *mut bcf_hdr_t, - format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_get_version(hdr: *const bcf_hdr_t) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_set_version( - hdr: *mut bcf_hdr_t, - version: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_remove( - h: *mut bcf_hdr_t, - type_: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn bcf_hdr_subset( - h0: *const bcf_hdr_t, - n: ::std::os::raw::c_int, - samples: *const *mut ::std::os::raw::c_char, - imap: *mut ::std::os::raw::c_int, - ) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_seqnames( - h: *const bcf_hdr_t, - nseqs: *mut ::std::os::raw::c_int, - ) -> *mut *const ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_parse( - hdr: *mut bcf_hdr_t, - htxt: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_sync(h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_parse_line( - h: *const bcf_hdr_t, - line: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_add_hrec(hdr: *mut bcf_hdr_t, hrec: *mut bcf_hrec_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_get_hrec( - hdr: *const bcf_hdr_t, - type_: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - str_class: *const ::std::os::raw::c_char, - ) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_dup(hrec: *mut bcf_hrec_t) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_add_key( - hrec: *mut bcf_hrec_t, - str: *const ::std::os::raw::c_char, - len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_set_val( - hrec: *mut bcf_hrec_t, - i: ::std::os::raw::c_int, - str: *const ::std::os::raw::c_char, - len: size_t, - is_quoted: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_find_key( - hrec: *mut bcf_hrec_t, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hrec_add_idx(hrec: *mut bcf_hrec_t, idx: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_destroy(hrec: *mut bcf_hrec_t); -} -extern "C" { - pub fn bcf_subset( - h: *const bcf_hdr_t, - v: *mut bcf1_t, - n: ::std::os::raw::c_int, - imap: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_translate( - dst_hdr: *const bcf_hdr_t, - src_hdr: *mut bcf_hdr_t, - src_line: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_variant_types(rec: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_variant_type( - rec: *mut bcf1_t, - ith_allele: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_is_snp(v: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_ids: *mut ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_add_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_id: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_id: ::std::os::raw::c_int, - pass: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_has_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - filter: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_alleles( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - alleles: *mut *const ::std::os::raw::c_char, - nals: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_alleles_str( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - alleles_string: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_id( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_add_id( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_info( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_format_string( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *mut *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_format( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_fmt( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - ) -> *mut bcf_fmt_t; -} -extern "C" { - pub fn bcf_get_info( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - ) -> *mut bcf_info_t; -} -extern "C" { - pub fn bcf_get_fmt_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_fmt_t; -} -extern "C" { - pub fn bcf_get_info_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_info_t; -} -extern "C" { - pub fn bcf_get_info_values( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut ::std::os::raw::c_void, - ndst: *mut ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_format_string( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut *mut ::std::os::raw::c_char, - ndst: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_format_values( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut ::std::os::raw::c_void, - ndst: *mut ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_id2int( - hdr: *const bcf_hdr_t, - type_: ::std::os::raw::c_int, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_fmt_array( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_fmt_sized_array(s: *mut kstring_t, ptr: *mut u8) -> *mut u8; -} -extern "C" { - pub fn bcf_enc_vchar( - s: *mut kstring_t, - l: ::std::os::raw::c_int, - a: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_enc_vint( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - a: *mut i32, - wsize: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_enc_vfloat( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - a: *mut f32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn bcf_index_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn bcf_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - n_threads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_idx_init( - fp: *mut htsFile, - h: *mut bcf_hdr_t, - min_shift: ::std::os::raw::c_int, - fnidx: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub static mut bcf_float_vector_end: u32; -} -extern "C" { - pub static mut bcf_float_missing: u32; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sam_hrecs_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sam_hdr_t { - pub n_targets: i32, - pub ignore_sam_err: i32, - pub l_text: size_t, - pub target_len: *mut u32, - pub cigar_tab: *const i8, - pub target_name: *mut *mut ::std::os::raw::c_char, - pub text: *mut ::std::os::raw::c_char, - pub sdict: *mut ::std::os::raw::c_void, - pub hrecs: *mut sam_hrecs_t, - pub ref_count: u32, -} -#[test] -fn bindgen_test_layout_sam_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(sam_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sam_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_targets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(n_targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ignore_sam_err as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ignore_sam_err) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_text as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(l_text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_len as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_tab as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(cigar_tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_name as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).text as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdict as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(sdict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrecs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(hrecs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ref_count as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ref_count) - ) - ); -} -pub type bam_hdr_t = sam_hdr_t; -extern "C" { - pub static bam_cigar_table: [i8; 256usize]; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam1_core_t { - pub pos: hts_pos_t, - pub tid: i32, - pub bin: u16, - pub qual: u8, - pub l_extranul: u8, - pub flag: u16, - pub l_qname: u16, - pub n_cigar: u32, - pub l_qseq: i32, - pub mtid: i32, - pub mpos: hts_pos_t, - pub isize: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bam1_core_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bam1_core_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_core_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bin as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_extranul as *const _ as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_extranul) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(flag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qname as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_cigar as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(n_cigar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qseq as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mtid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mtid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mpos as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(isize) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam1_t { - pub core: bam1_core_t, - pub id: u64, - pub data: *mut u8, - pub l_data: ::std::os::raw::c_int, - pub m_data: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, - pub __bindgen_padding_0: u32, -} -#[test] -fn bindgen_test_layout_bam1_t() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(bam1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).core as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(core) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_data as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(l_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_data as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(m_data) - ) - ); -} -impl bam1_t { - #[inline] - pub fn mempolicy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } - } - #[inline] - pub fn set_mempolicy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 2u8, { - let mempolicy: u32 = unsafe { ::std::mem::transmute(mempolicy) }; - mempolicy as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn sam_hdr_init() -> *mut sam_hdr_t; -} -extern "C" { - pub fn bam_hdr_read(fp: *mut BGZF) -> *mut sam_hdr_t; -} -extern "C" { - pub fn bam_hdr_write(fp: *mut BGZF, h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_destroy(h: *mut sam_hdr_t); -} -extern "C" { - pub fn sam_hdr_dup(h0: *const sam_hdr_t) -> *mut sam_hdr_t; -} -pub type samFile = htsFile; -extern "C" { - pub fn sam_hdr_parse(l_text: size_t, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; -} -extern "C" { - pub fn sam_hdr_read(fp: *mut samFile) -> *mut sam_hdr_t; -} -extern "C" { - pub fn sam_hdr_write(fp: *mut samFile, h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_length(h: *mut sam_hdr_t) -> size_t; -} -extern "C" { - pub fn sam_hdr_str(h: *mut sam_hdr_t) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_nref(h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_add_lines( - h: *mut sam_hdr_t, - lines: *const ::std::os::raw::c_char, - len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_add_line( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_line_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_val: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_line_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_line_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_line_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - position: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_update_line( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_except( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_lines( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - id: *const ::std::os::raw::c_char, - rh: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_count_lines( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_line_index( - bh: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_line_name( - bh: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_find_tag_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_tag_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_tag_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_name2tid( - h: *mut sam_hdr_t, - ref_: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_tid2name( - h: *const sam_hdr_t, - tid: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_tid2len(h: *const sam_hdr_t, tid: ::std::os::raw::c_int) -> hts_pos_t; -} -extern "C" { - pub fn sam_hdr_pg_id( - h: *mut sam_hdr_t, - name: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_add_pg( - h: *mut sam_hdr_t, - name: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn stringify_argv( - argc: ::std::os::raw::c_int, - argv: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_incr_ref(h: *mut sam_hdr_t); -} -extern "C" { - pub fn bam_init1() -> *mut bam1_t; -} -extern "C" { - pub fn bam_destroy1(b: *mut bam1_t); -} -extern "C" { - pub fn bam_read1(fp: *mut BGZF, b: *mut bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_write1(fp: *mut BGZF, b: *const bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_copy1(bdst: *mut bam1_t, bsrc: *const bam1_t) -> *mut bam1_t; -} -extern "C" { - pub fn bam_dup1(bsrc: *const bam1_t) -> *mut bam1_t; -} -extern "C" { - pub fn bam_cigar2qlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; -} -extern "C" { - pub fn bam_cigar2rlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; -} -extern "C" { - pub fn bam_endpos(b: *const bam1_t) -> hts_pos_t; -} -extern "C" { - pub fn bam_str2flag(str: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_flag2str(flag: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_set_qname( - b: *mut bam1_t, - qname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_idx_init( - fp: *mut htsFile, - h: *mut sam_hdr_t, - min_shift: ::std::os::raw::c_int, - fnidx: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_load(fp: *mut htsFile, fn_: *const ::std::os::raw::c_char) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_load2( - fp: *mut htsFile, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_load3( - fp: *mut htsFile, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - nthreads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_itr_queryi( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_querys( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - region: *const ::std::os::raw::c_char, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_regions( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - reglist: *mut hts_reglist_t, - regcount: ::std::os::raw::c_uint, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_regarray( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - regarray: *mut *mut ::std::os::raw::c_char, - regcount: ::std::os::raw::c_uint, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_parse_region( - h: *mut sam_hdr_t, - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_open_mode( - mode: *mut ::std::os::raw::c_char, - fn_: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_open_mode_opts( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_change_HD( - h: *mut sam_hdr_t, - key: *const ::std::os::raw::c_char, - val: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_parse1( - s: *mut kstring_t, - h: *mut sam_hdr_t, - b: *mut bam1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_format1( - h: *const sam_hdr_t, - b: *const bam1_t, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_read1(fp: *mut samFile, h: *mut sam_hdr_t, b: *mut bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_write1( - fp: *mut samFile, - h: *const sam_hdr_t, - b: *const bam1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_get(b: *const bam1_t, tag: *const ::std::os::raw::c_char) -> *mut u8; -} -extern "C" { - pub fn bam_aux2i(s: *const u8) -> i64; -} -extern "C" { - pub fn bam_aux2f(s: *const u8) -> f64; -} -extern "C" { - pub fn bam_aux2A(s: *const u8) -> ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_aux2Z(s: *const u8) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_auxB_len(s: *const u8) -> u32; -} -extern "C" { - pub fn bam_auxB2i(s: *const u8, idx: u32) -> i64; -} -extern "C" { - pub fn bam_auxB2f(s: *const u8, idx: u32) -> f64; -} -extern "C" { - pub fn bam_aux_append( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - type_: ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - data: *const u8, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_del(b: *mut bam1_t, s: *mut u8) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_str( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - data: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_int( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - val: i64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_float( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - val: f32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_array( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - type_: u8, - items: u32, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union bam_pileup_cd { - pub p: *mut ::std::os::raw::c_void, - pub i: i64, - pub f: f64, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bam_pileup_cd() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(f) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct bam_pileup1_t { - pub b: *mut bam1_t, - pub qpos: i32, - pub indel: ::std::os::raw::c_int, - pub level: ::std::os::raw::c_int, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub cd: bam_pileup_cd, - pub cigar_ind: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bam_pileup1_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qpos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(qpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indel as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(indel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cd as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_ind as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cigar_ind) - ) - ); -} -impl bam_pileup1_t { - #[inline] - pub fn is_del(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_del(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_head(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_head(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_tail(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_tail(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_refskip(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_refskip(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn aux(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_aux(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - is_del: u32, - is_head: u32, - is_tail: u32, - is_refskip: u32, - aux: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let is_del: u32 = unsafe { ::std::mem::transmute(is_del) }; - is_del as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let is_head: u32 = unsafe { ::std::mem::transmute(is_head) }; - is_head as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_tail: u32 = unsafe { ::std::mem::transmute(is_tail) }; - is_tail as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let is_refskip: u32 = unsafe { ::std::mem::transmute(is_refskip) }; - is_refskip as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let aux: u32 = unsafe { ::std::mem::transmute(aux) }; - aux as u64 - }); - __bindgen_bitfield_unit - } -} -pub type bam_plp_auto_f = ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *mut bam1_t, - ) -> ::std::os::raw::c_int, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __bam_plp_t { - _unused: [u8; 0], -} -pub type bam_plp_t = *mut __bam_plp_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __bam_mplp_t { - _unused: [u8; 0], -} -pub type bam_mplp_t = *mut __bam_mplp_t; -extern "C" { - pub fn bam_plp_init(func: bam_plp_auto_f, data: *mut ::std::os::raw::c_void) -> bam_plp_t; -} -extern "C" { - pub fn bam_plp_destroy(iter: bam_plp_t); -} -extern "C" { - pub fn bam_plp_push(iter: bam_plp_t, b: *const bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_plp_next( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp_auto( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp64_next( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp64_auto( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp_set_maxcnt(iter: bam_plp_t, maxcnt: ::std::os::raw::c_int); -} -extern "C" { - pub fn bam_plp_reset(iter: bam_plp_t); -} -extern "C" { - pub fn bam_plp_constructor( - plp: bam_plp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_plp_destructor( - plp: bam_plp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_plp_insertion( - p: *const bam_pileup1_t, - ins: *mut kstring_t, - del_len: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_init( - n: ::std::os::raw::c_int, - func: bam_plp_auto_f, - data: *mut *mut ::std::os::raw::c_void, - ) -> bam_mplp_t; -} -extern "C" { - pub fn bam_mplp_init_overlaps(iter: bam_mplp_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_destroy(iter: bam_mplp_t); -} -extern "C" { - pub fn bam_mplp_set_maxcnt(iter: bam_mplp_t, maxcnt: ::std::os::raw::c_int); -} -extern "C" { - pub fn bam_mplp_auto( - iter: bam_mplp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - n_plp: *mut ::std::os::raw::c_int, - plp: *mut *const bam_pileup1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp64_auto( - iter: bam_mplp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - n_plp: *mut ::std::os::raw::c_int, - plp: *mut *const bam_pileup1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_reset(iter: bam_mplp_t); -} -extern "C" { - pub fn bam_mplp_constructor( - iter: bam_mplp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_mplp_destructor( - iter: bam_mplp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn sam_cap_mapq( - b: *mut bam1_t, - ref_: *const ::std::os::raw::c_char, - ref_len: hts_pos_t, - thres: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_prob_realn( - b: *mut bam1_t, - ref_: *const ::std::os::raw::c_char, - ref_len: hts_pos_t, - flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub const cram_block_method_BM_ERROR: cram_block_method = -1; -pub const cram_block_method_RAW: cram_block_method = 0; -pub const cram_block_method_GZIP: cram_block_method = 1; -pub const cram_block_method_BZIP2: cram_block_method = 2; -pub const cram_block_method_LZMA: cram_block_method = 3; -pub const cram_block_method_RANS: cram_block_method = 4; -pub const cram_block_method_RANS0: cram_block_method = 4; -pub const cram_block_method_RANS1: cram_block_method = 10; -pub const cram_block_method_GZIP_RLE: cram_block_method = 11; -pub type cram_block_method = i32; -pub const cram_content_type_CT_ERROR: cram_content_type = -1; -pub const cram_content_type_FILE_HEADER: cram_content_type = 0; -pub const cram_content_type_COMPRESSION_HEADER: cram_content_type = 1; -pub const cram_content_type_MAPPED_SLICE: cram_content_type = 2; -pub const cram_content_type_UNMAPPED_SLICE: cram_content_type = 3; -pub const cram_content_type_EXTERNAL: cram_content_type = 4; -pub const cram_content_type_CORE: cram_content_type = 5; -pub type cram_content_type = i32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_file_def { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_container { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_slice { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_metrics { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block_slice_hdr { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block_compression_hdr { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct refs_t { - _unused: [u8; 0], -} -extern "C" { - pub fn cram_fd_get_header(fd: *mut cram_fd) -> *mut sam_hdr_t; -} -extern "C" { - pub fn cram_fd_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t); -} -extern "C" { - pub fn cram_fd_get_version(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_fd_set_version(fd: *mut cram_fd, vers: ::std::os::raw::c_int); -} -extern "C" { - pub fn cram_major_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_minor_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_fd_get_fp(fd: *mut cram_fd) -> *mut hFILE; -} -extern "C" { - pub fn cram_fd_set_fp(fd: *mut cram_fd, fp: *mut hFILE); -} -extern "C" { - pub fn cram_container_get_length(c: *mut cram_container) -> i32; -} -extern "C" { - pub fn cram_container_set_length(c: *mut cram_container, length: i32); -} -extern "C" { - pub fn cram_container_get_num_blocks(c: *mut cram_container) -> i32; -} -extern "C" { - pub fn cram_container_set_num_blocks(c: *mut cram_container, num_blocks: i32); -} -extern "C" { - pub fn cram_container_get_landmarks( - c: *mut cram_container, - num_landmarks: *mut i32, - ) -> *mut i32; -} -extern "C" { - pub fn cram_container_set_landmarks( - c: *mut cram_container, - num_landmarks: i32, - landmarks: *mut i32, - ); -} -extern "C" { - pub fn cram_container_is_empty(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_block_get_content_id(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_comp_size(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_uncomp_size(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_crc32(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_data(b: *mut cram_block) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn cram_block_get_content_type(b: *mut cram_block) -> cram_content_type; -} -extern "C" { - pub fn cram_block_set_content_id(b: *mut cram_block, id: i32); -} -extern "C" { - pub fn cram_block_set_comp_size(b: *mut cram_block, size: i32); -} -extern "C" { - pub fn cram_block_set_uncomp_size(b: *mut cram_block, size: i32); -} -extern "C" { - pub fn cram_block_set_crc32(b: *mut cram_block, crc: i32); -} -extern "C" { - pub fn cram_block_set_data(b: *mut cram_block, data: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn cram_block_append( - b: *mut cram_block, - data: *const ::std::os::raw::c_void, - size: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_block_update_size(b: *mut cram_block); -} -extern "C" { - pub fn cram_block_get_offset(b: *mut cram_block) -> size_t; -} -extern "C" { - pub fn cram_block_set_offset(b: *mut cram_block, offset: size_t); -} -extern "C" { - pub fn cram_block_size(b: *mut cram_block) -> u32; -} -extern "C" { - pub fn cram_transcode_rg( - in_: *mut cram_fd, - out: *mut cram_fd, - c: *mut cram_container, - nrg: ::std::os::raw::c_int, - in_rg: *mut ::std::os::raw::c_int, - out_rg: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_copy_slice( - in_: *mut cram_fd, - out: *mut cram_fd, - num_slice: i32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_new_block( - content_type: cram_content_type, - content_id: ::std::os::raw::c_int, - ) -> *mut cram_block; -} -extern "C" { - pub fn cram_read_block(fd: *mut cram_fd) -> *mut cram_block; -} -extern "C" { - pub fn cram_write_block(fd: *mut cram_fd, b: *mut cram_block) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_free_block(b: *mut cram_block); -} -extern "C" { - pub fn cram_uncompress_block(b: *mut cram_block) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_compress_block( - fd: *mut cram_fd, - b: *mut cram_block, - metrics: *mut cram_metrics, - method: ::std::os::raw::c_int, - level: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_new_container( - nrec: ::std::os::raw::c_int, - nslice: ::std::os::raw::c_int, - ) -> *mut cram_container; -} -extern "C" { - pub fn cram_free_container(c: *mut cram_container); -} -extern "C" { - pub fn cram_read_container(fd: *mut cram_fd) -> *mut cram_container; -} -extern "C" { - pub fn cram_write_container(fd: *mut cram_fd, h: *mut cram_container) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_store_container( - fd: *mut cram_fd, - c: *mut cram_container, - dat: *mut ::std::os::raw::c_char, - size: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_container_size(c: *mut cram_container) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_open( - filename: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut cram_fd; -} -extern "C" { - pub fn cram_dopen( - fp: *mut hFILE, - filename: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut cram_fd; -} -extern "C" { - pub fn cram_close(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_seek( - fd: *mut cram_fd, - offset: off_t, - whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_flush(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_eof(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_option(fd: *mut cram_fd, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_voption( - fd: *mut cram_fd, - opt: hts_fmt_option, - args: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_check_EOF(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn int32_put_blk(b: *mut cram_block, val: i32) -> ::std::os::raw::c_int; -} -pub type SAM_hdr = sam_hdr_t; -extern "C" { - pub fn cram_get_refs(fd: *mut htsFile) -> *mut refs_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgzf_mtaux_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __bgzidx_t { - _unused: [u8; 0], -} -pub type bgzidx_t = __bgzidx_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgzf_cache_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct z_stream_s { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct BGZF { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, - pub cache_size: ::std::os::raw::c_int, - pub block_length: ::std::os::raw::c_int, - pub block_clength: ::std::os::raw::c_int, - pub block_offset: ::std::os::raw::c_int, - pub block_address: i64, - pub uncompressed_address: i64, - pub uncompressed_block: *mut ::std::os::raw::c_void, - pub compressed_block: *mut ::std::os::raw::c_void, - pub cache: *mut bgzf_cache_t, - pub fp: *mut hFILE, - pub mt: *mut bgzf_mtaux_t, - pub idx: *mut bgzidx_t, - pub idx_build_otf: ::std::os::raw::c_int, - pub gz_stream: *mut z_stream_s, - pub seeked: i64, -} -#[test] -fn bindgen_test_layout_BGZF() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(BGZF)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(BGZF)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache_size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_length as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_clength as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_clength) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_offset as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_address as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_address as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_block as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compressed_block as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(compressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 64usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(fp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mt as *const _ as usize }, - 72usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(mt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(idx)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx_build_otf as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(idx_build_otf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gz_stream as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(gz_stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seeked as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(seeked) - ) - ); -} -impl BGZF { - #[inline] - pub fn errcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_errcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn reserved(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_reserved(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_write(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_write(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn no_eof_block(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_no_eof_block(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_be(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_be(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn compress_level(&self) -> ::std::os::raw::c_int { - unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 9u8) as u32) } - } - #[inline] - pub fn set_compress_level(&mut self, val: ::std::os::raw::c_int) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(20usize, 9u8, val as u64) - } - } - #[inline] - pub fn last_block_eof(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_last_block_eof(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_compressed(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_compressed(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_gzip(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_gzip(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - errcode: ::std::os::raw::c_uint, - reserved: ::std::os::raw::c_uint, - is_write: ::std::os::raw::c_uint, - no_eof_block: ::std::os::raw::c_uint, - is_be: ::std::os::raw::c_uint, - compress_level: ::std::os::raw::c_int, - last_block_eof: ::std::os::raw::c_uint, - is_compressed: ::std::os::raw::c_uint, - is_gzip: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 16u8, { - let errcode: u32 = unsafe { ::std::mem::transmute(errcode) }; - errcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 1u8, { - let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; - reserved as u64 - }); - __bindgen_bitfield_unit.set(17usize, 1u8, { - let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; - is_write as u64 - }); - __bindgen_bitfield_unit.set(18usize, 1u8, { - let no_eof_block: u32 = unsafe { ::std::mem::transmute(no_eof_block) }; - no_eof_block as u64 - }); - __bindgen_bitfield_unit.set(19usize, 1u8, { - let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; - is_be as u64 - }); - __bindgen_bitfield_unit.set(20usize, 9u8, { - let compress_level: u32 = unsafe { ::std::mem::transmute(compress_level) }; - compress_level as u64 - }); - __bindgen_bitfield_unit.set(29usize, 1u8, { - let last_block_eof: u32 = unsafe { ::std::mem::transmute(last_block_eof) }; - last_block_eof as u64 - }); - __bindgen_bitfield_unit.set(30usize, 1u8, { - let is_compressed: u32 = unsafe { ::std::mem::transmute(is_compressed) }; - is_compressed as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let is_gzip: u32 = unsafe { ::std::mem::transmute(is_gzip) }; - is_gzip as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn bgzf_dopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_open( - path: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_hopen(fp: *mut hFILE, mode: *const ::std::os::raw::c_char) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_close(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: size_t) -> ssize_t; -} -extern "C" { - pub fn bgzf_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_block_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_peek(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_raw_read( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_raw_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_flush(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_seek(fp: *mut BGZF, pos: i64, whence: ::std::os::raw::c_int) -> i64; -} -extern "C" { - pub fn bgzf_check_EOF(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_compression(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_is_bgzf(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_set_cache_size(fp: *mut BGZF, size: ::std::os::raw::c_int); -} -extern "C" { - pub fn bgzf_flush_try(fp: *mut BGZF, size: ssize_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_getc(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_getline( - fp: *mut BGZF, - delim: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_read_block(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_thread_pool( - fp: *mut BGZF, - pool: *mut hts_tpool, - qsize: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_mt( - fp: *mut BGZF, - n_threads: ::std::os::raw::c_int, - n_sub_blks: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_compress( - dst: *mut ::std::os::raw::c_void, - dlen: *mut size_t, - src: *const ::std::os::raw::c_void, - slen: size_t, - level: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_useek( - fp: *mut BGZF, - uoffset: off_t, - where_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_utell(fp: *mut BGZF) -> off_t; -} -extern "C" { - pub fn bgzf_index_build_init(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_load( - fp: *mut BGZF, - bname: *const ::std::os::raw::c_char, - suffix: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_load_hfile( - fp: *mut BGZF, - idx: *mut hFILE, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_dump( - fp: *mut BGZF, - bname: *const ::std::os::raw::c_char, - suffix: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_dump_hfile( - fp: *mut BGZF, - idx: *mut hFILE, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_trim_alleles(header: *const bcf_hdr_t, line: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_alleles( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - mask: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_allele_set( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - rm_set: *const kbitset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_calc_ac( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - ac: *mut ::std::os::raw::c_int, - which: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_gt_type( - fmt_ptr: *mut bcf_fmt_t, - isample: ::std::os::raw::c_int, - ial: *mut ::std::os::raw::c_int, - jal: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tbx_conf_t { - pub preset: i32, - pub sc: i32, - pub bc: i32, - pub ec: i32, - pub meta_char: i32, - pub line_skip: i32, -} -#[test] -fn bindgen_test_layout_tbx_conf_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(tbx_conf_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tbx_conf_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).preset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(preset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sc as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(sc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(bc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ec as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(ec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta_char as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(meta_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_skip as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(line_skip) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tbx_t { - pub conf: tbx_conf_t, - pub idx: *mut hts_idx_t, - pub dict: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_tbx_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(tbx_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tbx_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(conf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(dict) - ) - ); -} -extern "C" { - pub static tbx_conf_gff: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_bed: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_psltbl: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_sam: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_vcf: tbx_conf_t; -} -extern "C" { - pub fn tbx_name2id(tbx: *mut tbx_t, ss: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_get_bgzfp(fp: *mut htsFile) -> *mut BGZF; -} -extern "C" { - pub fn tbx_readrec( - fp: *mut BGZF, - tbxv: *mut ::std::os::raw::c_void, - sv: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index( - fp: *mut BGZF, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - n_threads: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_load(fn_: *const ::std::os::raw::c_char) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_seqnames( - tbx: *mut tbx_t, - n: *mut ::std::os::raw::c_int, - ) -> *mut *const ::std::os::raw::c_char; -} -extern "C" { - pub fn tbx_destroy(tbx: *mut tbx_t); -} -pub const bcf_sr_opt_t_BCF_SR_REQUIRE_IDX: bcf_sr_opt_t = 0; -pub const bcf_sr_opt_t_BCF_SR_PAIR_LOGIC: bcf_sr_opt_t = 1; -pub type bcf_sr_opt_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _bcf_sr_regions_t { - pub tbx: *mut tbx_t, - pub itr: *mut hts_itr_t, - pub line: kstring_t, - pub file: *mut htsFile, - pub fname: *mut ::std::os::raw::c_char, - pub is_bin: ::std::os::raw::c_int, - pub als: *mut *mut ::std::os::raw::c_char, - pub als_str: kstring_t, - pub nals: ::std::os::raw::c_int, - pub mals: ::std::os::raw::c_int, - pub als_type: ::std::os::raw::c_int, - pub missed_reg_handler: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut _bcf_sr_regions_t, arg2: *mut ::std::os::raw::c_void), - >, - pub missed_reg_data: *mut ::std::os::raw::c_void, - pub regs: *mut _region_t, - pub seq_hash: *mut ::std::os::raw::c_void, - pub seq_names: *mut *mut ::std::os::raw::c_char, - pub nseqs: ::std::os::raw::c_int, - pub iseq: ::std::os::raw::c_int, - pub start: hts_pos_t, - pub end: hts_pos_t, - pub prev_seq: ::std::os::raw::c_int, - pub prev_start: hts_pos_t, - pub prev_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout__bcf_sr_regions_t() { - assert_eq!( - ::std::mem::size_of::<_bcf_sr_regions_t>(), - 200usize, - concat!("Size of: ", stringify!(_bcf_sr_regions_t)) - ); - assert_eq!( - ::std::mem::align_of::<_bcf_sr_regions_t>(), - 8usize, - concat!("Alignment of ", stringify!(_bcf_sr_regions_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).tbx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(tbx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).itr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).file as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).fname as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).is_bin as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(is_bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als_str as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als_str) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).nals as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(nals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).mals as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(mals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).als_type as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(als_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bcf_sr_regions_t>())).missed_reg_handler as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(missed_reg_handler) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_bcf_sr_regions_t>())).missed_reg_data as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(missed_reg_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).regs as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).seq_hash as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(seq_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).seq_names as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(seq_names) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).nseqs as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(nseqs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).iseq as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(iseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).start as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).end as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_seq as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_start as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_bcf_sr_regions_t>())).prev_end as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(_bcf_sr_regions_t), - "::", - stringify!(prev_end) - ) - ); -} -pub type bcf_sr_regions_t = _bcf_sr_regions_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_sr_t { - pub file: *mut htsFile, - pub tbx_idx: *mut tbx_t, - pub bcf_idx: *mut hts_idx_t, - pub header: *mut bcf_hdr_t, - pub itr: *mut hts_itr_t, - pub fname: *mut ::std::os::raw::c_char, - pub buffer: *mut *mut bcf1_t, - pub nbuffer: ::std::os::raw::c_int, - pub mbuffer: ::std::os::raw::c_int, - pub nfilter_ids: ::std::os::raw::c_int, - pub filter_ids: *mut ::std::os::raw::c_int, - pub samples: *mut ::std::os::raw::c_int, - pub n_smpl: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_sr_t() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(bcf_sr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx_idx as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(tbx_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bcf_idx as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(bcf_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).header as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(header) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nbuffer as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbuffer as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(mbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nfilter_ids as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nfilter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filter_ids as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(filter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(n_smpl) - ) - ); -} -pub const bcf_sr_error_open_failed: bcf_sr_error = 0; -pub const bcf_sr_error_not_bgzf: bcf_sr_error = 1; -pub const bcf_sr_error_idx_load_failed: bcf_sr_error = 2; -pub const bcf_sr_error_file_type_error: bcf_sr_error = 3; -pub const bcf_sr_error_api_usage_error: bcf_sr_error = 4; -pub const bcf_sr_error_header_error: bcf_sr_error = 5; -pub const bcf_sr_error_no_eof: bcf_sr_error = 6; -pub const bcf_sr_error_no_memory: bcf_sr_error = 7; -pub const bcf_sr_error_vcf_parse_error: bcf_sr_error = 8; -pub const bcf_sr_error_bcf_read_error: bcf_sr_error = 9; -pub type bcf_sr_error = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_srs_t { - pub collapse: ::std::os::raw::c_int, - pub apply_filters: *mut ::std::os::raw::c_char, - pub require_index: ::std::os::raw::c_int, - pub max_unpack: ::std::os::raw::c_int, - pub has_line: *mut ::std::os::raw::c_int, - pub errnum: bcf_sr_error, - pub readers: *mut bcf_sr_t, - pub nreaders: ::std::os::raw::c_int, - pub streaming: ::std::os::raw::c_int, - pub explicit_regs: ::std::os::raw::c_int, - pub samples: *mut *mut ::std::os::raw::c_char, - pub regions: *mut bcf_sr_regions_t, - pub targets: *mut bcf_sr_regions_t, - pub targets_als: ::std::os::raw::c_int, - pub targets_exclude: ::std::os::raw::c_int, - pub tmps: kstring_t, - pub n_smpl: ::std::os::raw::c_int, - pub n_threads: ::std::os::raw::c_int, - pub p: *mut htsThreadPool, - pub aux: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_bcf_srs_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(bcf_srs_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_srs_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).collapse as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(collapse) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).apply_filters as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(apply_filters) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).require_index as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(require_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_line as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(has_line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errnum as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(errnum) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readers as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(readers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nreaders as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(nreaders) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).streaming as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(streaming) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).explicit_regs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(explicit_regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regions as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(regions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_als as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_exclude as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_exclude) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tmps as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(tmps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_smpl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_threads as *const _ as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_threads) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).aux as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(aux) - ) - ); -} -extern "C" { - pub fn bcf_sr_init() -> *mut bcf_srs_t; -} -extern "C" { - pub fn bcf_sr_destroy(readers: *mut bcf_srs_t); -} -extern "C" { - pub fn bcf_sr_strerror(errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_sr_set_opt(readers: *mut bcf_srs_t, opt: bcf_sr_opt_t, ...) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_threads( - files: *mut bcf_srs_t, - n_threads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_destroy_threads(files: *mut bcf_srs_t); -} -extern "C" { - pub fn bcf_sr_add_reader( - readers: *mut bcf_srs_t, - fname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_remove_reader(files: *mut bcf_srs_t, i: ::std::os::raw::c_int); -} -extern "C" { - pub fn bcf_sr_next_line(readers: *mut bcf_srs_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_seek( - readers: *mut bcf_srs_t, - seq: *const ::std::os::raw::c_char, - pos: hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_samples( - readers: *mut bcf_srs_t, - samples: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_targets( - readers: *mut bcf_srs_t, - targets: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - alleles: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_regions( - readers: *mut bcf_srs_t, - regions: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_init( - regions: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - chr: ::std::os::raw::c_int, - from: ::std::os::raw::c_int, - to: ::std::os::raw::c_int, - ) -> *mut bcf_sr_regions_t; -} -extern "C" { - pub fn bcf_sr_regions_destroy(regions: *mut bcf_sr_regions_t); -} -extern "C" { - pub fn bcf_sr_regions_seek( - regions: *mut bcf_sr_regions_t, - chr: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_next(reg: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_overlap( - reg: *mut bcf_sr_regions_t, - seq: *const ::std::os::raw::c_char, - start: hts_pos_t, - end: hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_flush(regs: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kbitset_t { - pub n: size_t, - pub n_max: size_t, - pub b: [::std::os::raw::c_ulong; 1usize], -} -#[test] -fn bindgen_test_layout_kbitset_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n_max) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(b) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kbitset_iter_t { - pub mask: ::std::os::raw::c_ulong, - pub elt: size_t, - pub i: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_kbitset_iter_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(elt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(i) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __faidx_t { - _unused: [u8; 0], -} -pub type faidx_t = __faidx_t; -pub const fai_format_options_FAI_NONE: fai_format_options = 0; -pub const fai_format_options_FAI_FASTA: fai_format_options = 1; -pub const fai_format_options_FAI_FASTQ: fai_format_options = 2; -pub type fai_format_options = u32; -extern "C" { - pub fn fai_build3( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_build(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_destroy(fai: *mut faidx_t); -} -pub const fai_load_options_FAI_CREATE: fai_load_options = 1; -pub type fai_load_options = u32; -extern "C" { - pub fn fai_load3( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load(fn_: *const ::std::os::raw::c_char) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load3_format( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - format: fai_format_options, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load_format( - fn_: *const ::std::os::raw::c_char, - format: fai_format_options, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_fetch( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetch64( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetchqual( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetchqual64( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_fetch_seq( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: ::std::os::raw::c_int, - p_end_i: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_seq64( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: hts_pos_t, - p_end_i: hts_pos_t, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_qual( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: ::std::os::raw::c_int, - p_end_i: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_qual64( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: hts_pos_t, - p_end_i: hts_pos_t, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_has_seq( - fai: *const faidx_t, - seq: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_iseq( - fai: *const faidx_t, - i: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_seq_len( - fai: *const faidx_t, - seq: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_parse_region( - fai: *const faidx_t, - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_set_cache_size(fai: *mut faidx_t, cache_size: ::std::os::raw::c_int); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool_process { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool_result { - _unused: [u8; 0], -} -extern "C" { - pub fn hts_tpool_init(n: ::std::os::raw::c_int) -> *mut hts_tpool; -} -extern "C" { - pub fn hts_tpool_size(p: *mut hts_tpool) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch2( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - nonblock: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch3( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - exec_func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - job_cleanup: ::std::option::Option, - result_cleanup: ::std::option::Option< - unsafe extern "C" fn(data: *mut ::std::os::raw::c_void), - >, - nonblock: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_wake_dispatch(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_flush(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_reset( - q: *mut hts_tpool_process, - free_results: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_qsize(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_destroy(p: *mut hts_tpool); -} -extern "C" { - pub fn hts_tpool_kill(p: *mut hts_tpool); -} -extern "C" { - pub fn hts_tpool_next_result(q: *mut hts_tpool_process) -> *mut hts_tpool_result; -} -extern "C" { - pub fn hts_tpool_next_result_wait(q: *mut hts_tpool_process) -> *mut hts_tpool_result; -} -extern "C" { - pub fn hts_tpool_delete_result(r: *mut hts_tpool_result, free_data: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_tpool_result_data(r: *mut hts_tpool_result) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn hts_tpool_process_init( - p: *mut hts_tpool, - qsize: ::std::os::raw::c_int, - in_only: ::std::os::raw::c_int, - ) -> *mut hts_tpool_process; -} -extern "C" { - pub fn hts_tpool_process_destroy(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_empty(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_len(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_sz(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_shutdown(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_attach(p: *mut hts_tpool, q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_detach(p: *mut hts_tpool, q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_ref_incr(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_ref_decr(q: *mut hts_tpool_process); -} -extern "C" { - #[link_name = "\u{1}wrap_kbs_init2"] - pub fn kbs_init2(ni: size_t, fill: ::std::os::raw::c_int) -> *mut kbitset_t; -} -extern "C" { - #[link_name = "\u{1}wrap_kbs_init"] - pub fn kbs_init(ni: size_t) -> *mut kbitset_t; -} -extern "C" { - #[link_name = "\u{1}wrap_kbs_insert"] - pub fn kbs_insert(bs: *mut kbitset_t, i: ::std::os::raw::c_int); -} -extern "C" { - #[link_name = "\u{1}wrap_kbs_destroy"] - pub fn kbs_destroy(bs: *mut kbitset_t); -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: ::std::os::raw::c_uint, - pub fp_offset: ::std::os::raw::c_uint, - pub overflow_arg_area: *mut ::std::os::raw::c_void, - pub reg_save_area: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_data { - pub _address: u8, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _region_t { - pub _address: u8, -} diff --git a/hts-sys/osx_prebuilt_bindings.rs b/hts-sys/osx_prebuilt_bindings.rs deleted file mode 100644 index 1c9b53774..000000000 --- a/hts-sys/osx_prebuilt_bindings.rs +++ /dev/null @@ -1,19764 +0,0 @@ -/* automatically generated by rust-bindgen */ - -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit { - storage: Storage, - align: [Align; 0], -} -impl __BindgenBitfieldUnit { - #[inline] - pub const fn new(storage: Storage) -> Self { - Self { storage, align: [] } - } -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - 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 const __WORDSIZE: u32 = 64; -pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; -pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const __DARWIN_UNIX03: u32 = 1; -pub const __DARWIN_64_BIT_INO_T: u32 = 1; -pub const __DARWIN_VERS_1050: u32 = 1; -pub const __DARWIN_NON_CANCELABLE: u32 = 0; -pub const __DARWIN_SUF_64_BIT_INO_T: &'static [u8; 9usize] = b"$INODE64\0"; -pub const __DARWIN_SUF_1050: &'static [u8; 6usize] = b"$1050\0"; -pub const __DARWIN_SUF_EXTSN: &'static [u8; 14usize] = b"$DARWIN_EXTSN\0"; -pub const __DARWIN_C_ANSI: u32 = 4096; -pub const __DARWIN_C_FULL: u32 = 900000; -pub const __DARWIN_C_LEVEL: u32 = 900000; -pub const __STDC_WANT_LIB_EXT1__: u32 = 1; -pub const __DARWIN_NO_LONG_LONG: u32 = 0; -pub const _DARWIN_FEATURE_64_BIT_INODE: u32 = 1; -pub const _DARWIN_FEATURE_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const _DARWIN_FEATURE_UNIX_CONFORMANCE: u32 = 3; -pub const __PTHREAD_SIZE__: u32 = 8176; -pub const __PTHREAD_ATTR_SIZE__: u32 = 56; -pub const __PTHREAD_MUTEXATTR_SIZE__: u32 = 8; -pub const __PTHREAD_MUTEX_SIZE__: u32 = 56; -pub const __PTHREAD_CONDATTR_SIZE__: u32 = 8; -pub const __PTHREAD_COND_SIZE__: u32 = 40; -pub const __PTHREAD_ONCE_SIZE__: u32 = 8; -pub const __PTHREAD_RWLOCK_SIZE__: u32 = 192; -pub const __PTHREAD_RWLOCKATTR_SIZE__: u32 = 16; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const INT64_MAX: u64 = 9223372036854775807; -pub const INT8_MIN: i32 = -128; -pub const INT16_MIN: i32 = -32768; -pub const INT32_MIN: i32 = -2147483648; -pub const INT64_MIN: i64 = -9223372036854775808; -pub const UINT8_MAX: u32 = 255; -pub const UINT16_MAX: u32 = 65535; -pub const UINT32_MAX: u32 = 4294967295; -pub const UINT64_MAX: i32 = -1; -pub const INT_LEAST8_MIN: i32 = -128; -pub const INT_LEAST16_MIN: i32 = -32768; -pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST64_MIN: i64 = -9223372036854775808; -pub const INT_LEAST8_MAX: u32 = 127; -pub const INT_LEAST16_MAX: u32 = 32767; -pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const INT_LEAST64_MAX: u64 = 9223372036854775807; -pub const UINT_LEAST8_MAX: u32 = 255; -pub const UINT_LEAST16_MAX: u32 = 65535; -pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const UINT_LEAST64_MAX: i32 = -1; -pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i32 = -32768; -pub const INT_FAST32_MIN: i32 = -2147483648; -pub const INT_FAST64_MIN: i64 = -9223372036854775808; -pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u32 = 32767; -pub const INT_FAST32_MAX: u32 = 2147483647; -pub const INT_FAST64_MAX: u64 = 9223372036854775807; -pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: u32 = 65535; -pub const UINT_FAST32_MAX: u32 = 4294967295; -pub const UINT_FAST64_MAX: i32 = -1; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const UINTPTR_MAX: i32 = -1; -pub const SIZE_MAX: i32 = -1; -pub const RSIZE_MAX: i32 = -1; -pub const WINT_MIN: i32 = -2147483648; -pub const WINT_MAX: u32 = 2147483647; -pub const SIG_ATOMIC_MIN: i32 = -2147483648; -pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const __PRI_8_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"hh\0"; -pub const __PRI_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __SCN_64_LENGTH_MODIFIER__: &'static [u8; 3usize] = b"ll\0"; -pub const __PRI_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const __SCN_MAX_LENGTH_MODIFIER__: &'static [u8; 2usize] = b"j\0"; -pub const PRId8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIi8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIo8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIu8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIx8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIX8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRId16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIi16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIo16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIu16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIx16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIX16: &'static [u8; 3usize] = b"hX\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRId64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIi64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIo64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIu64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIx64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIX64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXLEAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXLEAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXLEAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const PRIiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const PRIoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const PRIuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const PRIxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const PRIXFAST8: &'static [u8; 4usize] = b"hhX\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"hX\0"; -pub const PRIdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIXFAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const PRIiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const PRIoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const PRIuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const PRIxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const PRIXFAST64: &'static [u8; 4usize] = b"llX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"jx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"jX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNd64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNi64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNo64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNu64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNx64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdLEAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiLEAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoLEAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuLEAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxLEAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNdFAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNiFAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNoFAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNuFAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNxFAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNdFAST64: &'static [u8; 4usize] = b"lld\0"; -pub const SCNiFAST64: &'static [u8; 4usize] = b"lli\0"; -pub const SCNoFAST64: &'static [u8; 4usize] = b"llo\0"; -pub const SCNuFAST64: &'static [u8; 4usize] = b"llu\0"; -pub const SCNxFAST64: &'static [u8; 4usize] = b"llx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"jd\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"ji\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"jo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"ju\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"jx\0"; -pub const __API_TO_BE_DEPRECATED: u32 = 100000; -pub const __MAC_10_0: u32 = 1000; -pub const __MAC_10_1: u32 = 1010; -pub const __MAC_10_2: u32 = 1020; -pub const __MAC_10_3: u32 = 1030; -pub const __MAC_10_4: u32 = 1040; -pub const __MAC_10_5: u32 = 1050; -pub const __MAC_10_6: u32 = 1060; -pub const __MAC_10_7: u32 = 1070; -pub const __MAC_10_8: u32 = 1080; -pub const __MAC_10_9: u32 = 1090; -pub const __MAC_10_10: u32 = 101000; -pub const __MAC_10_10_2: u32 = 101002; -pub const __MAC_10_10_3: u32 = 101003; -pub const __MAC_10_11: u32 = 101100; -pub const __MAC_10_11_2: u32 = 101102; -pub const __MAC_10_11_3: u32 = 101103; -pub const __MAC_10_11_4: u32 = 101104; -pub const __MAC_10_12: u32 = 101200; -pub const __MAC_10_12_1: u32 = 101201; -pub const __MAC_10_12_2: u32 = 101202; -pub const __MAC_10_12_4: u32 = 101204; -pub const __MAC_10_13: u32 = 101300; -pub const __MAC_10_13_1: u32 = 101301; -pub const __MAC_10_13_2: u32 = 101302; -pub const __MAC_10_13_4: u32 = 101304; -pub const __MAC_10_14: u32 = 101400; -pub const __MAC_10_14_1: u32 = 101401; -pub const __MAC_10_14_4: u32 = 101404; -pub const __MAC_10_15: u32 = 101500; -pub const __MAC_10_15_1: u32 = 101501; -pub const __MAC_10_15_4: u32 = 101504; -pub const __IPHONE_2_0: u32 = 20000; -pub const __IPHONE_2_1: u32 = 20100; -pub const __IPHONE_2_2: u32 = 20200; -pub const __IPHONE_3_0: u32 = 30000; -pub const __IPHONE_3_1: u32 = 30100; -pub const __IPHONE_3_2: u32 = 30200; -pub const __IPHONE_4_0: u32 = 40000; -pub const __IPHONE_4_1: u32 = 40100; -pub const __IPHONE_4_2: u32 = 40200; -pub const __IPHONE_4_3: u32 = 40300; -pub const __IPHONE_5_0: u32 = 50000; -pub const __IPHONE_5_1: u32 = 50100; -pub const __IPHONE_6_0: u32 = 60000; -pub const __IPHONE_6_1: u32 = 60100; -pub const __IPHONE_7_0: u32 = 70000; -pub const __IPHONE_7_1: u32 = 70100; -pub const __IPHONE_8_0: u32 = 80000; -pub const __IPHONE_8_1: u32 = 80100; -pub const __IPHONE_8_2: u32 = 80200; -pub const __IPHONE_8_3: u32 = 80300; -pub const __IPHONE_8_4: u32 = 80400; -pub const __IPHONE_9_0: u32 = 90000; -pub const __IPHONE_9_1: u32 = 90100; -pub const __IPHONE_9_2: u32 = 90200; -pub const __IPHONE_9_3: u32 = 90300; -pub const __IPHONE_10_0: u32 = 100000; -pub const __IPHONE_10_1: u32 = 100100; -pub const __IPHONE_10_2: u32 = 100200; -pub const __IPHONE_10_3: u32 = 100300; -pub const __IPHONE_11_0: u32 = 110000; -pub const __IPHONE_11_1: u32 = 110100; -pub const __IPHONE_11_2: u32 = 110200; -pub const __IPHONE_11_3: u32 = 110300; -pub const __IPHONE_11_4: u32 = 110400; -pub const __IPHONE_12_0: u32 = 120000; -pub const __IPHONE_12_1: u32 = 120100; -pub const __IPHONE_12_2: u32 = 120200; -pub const __IPHONE_12_3: u32 = 120300; -pub const __IPHONE_13_0: u32 = 130000; -pub const __IPHONE_13_1: u32 = 130100; -pub const __IPHONE_13_2: u32 = 130200; -pub const __IPHONE_13_3: u32 = 130300; -pub const __IPHONE_13_4: u32 = 130400; -pub const __TVOS_9_0: u32 = 90000; -pub const __TVOS_9_1: u32 = 90100; -pub const __TVOS_9_2: u32 = 90200; -pub const __TVOS_10_0: u32 = 100000; -pub const __TVOS_10_0_1: u32 = 100001; -pub const __TVOS_10_1: u32 = 100100; -pub const __TVOS_10_2: u32 = 100200; -pub const __TVOS_11_0: u32 = 110000; -pub const __TVOS_11_1: u32 = 110100; -pub const __TVOS_11_2: u32 = 110200; -pub const __TVOS_11_3: u32 = 110300; -pub const __TVOS_11_4: u32 = 110400; -pub const __TVOS_12_0: u32 = 120000; -pub const __TVOS_12_1: u32 = 120100; -pub const __TVOS_12_2: u32 = 120200; -pub const __TVOS_12_3: u32 = 120300; -pub const __TVOS_13_0: u32 = 130000; -pub const __TVOS_13_2: u32 = 130200; -pub const __TVOS_13_3: u32 = 130300; -pub const __TVOS_13_4: u32 = 130400; -pub const __WATCHOS_1_0: u32 = 10000; -pub const __WATCHOS_2_0: u32 = 20000; -pub const __WATCHOS_2_1: u32 = 20100; -pub const __WATCHOS_2_2: u32 = 20200; -pub const __WATCHOS_3_0: u32 = 30000; -pub const __WATCHOS_3_1: u32 = 30100; -pub const __WATCHOS_3_1_1: u32 = 30101; -pub const __WATCHOS_3_2: u32 = 30200; -pub const __WATCHOS_4_0: u32 = 40000; -pub const __WATCHOS_4_1: u32 = 40100; -pub const __WATCHOS_4_2: u32 = 40200; -pub const __WATCHOS_4_3: u32 = 40300; -pub const __WATCHOS_5_0: u32 = 50000; -pub const __WATCHOS_5_1: u32 = 50100; -pub const __WATCHOS_5_2: u32 = 50200; -pub const __WATCHOS_6_0: u32 = 60000; -pub const __WATCHOS_6_1: u32 = 60100; -pub const __WATCHOS_6_2: u32 = 60200; -pub const __DRIVERKIT_19_0: u32 = 190000; -pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 101500; -pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1; -pub const __DARWIN_WCHAR_MIN: i32 = -2147483648; -pub const _FORTIFY_SOURCE: u32 = 2; -pub const __DARWIN_NSIG: u32 = 32; -pub const NSIG: u32 = 32; -pub const _I386_SIGNAL_H_: u32 = 1; -pub const SIGHUP: u32 = 1; -pub const SIGINT: u32 = 2; -pub const SIGQUIT: u32 = 3; -pub const SIGILL: u32 = 4; -pub const SIGTRAP: u32 = 5; -pub const SIGABRT: u32 = 6; -pub const SIGIOT: u32 = 6; -pub const SIGEMT: u32 = 7; -pub const SIGFPE: u32 = 8; -pub const SIGKILL: u32 = 9; -pub const SIGBUS: u32 = 10; -pub const SIGSEGV: u32 = 11; -pub const SIGSYS: u32 = 12; -pub const SIGPIPE: u32 = 13; -pub const SIGALRM: u32 = 14; -pub const SIGTERM: u32 = 15; -pub const SIGURG: u32 = 16; -pub const SIGSTOP: u32 = 17; -pub const SIGTSTP: u32 = 18; -pub const SIGCONT: u32 = 19; -pub const SIGCHLD: u32 = 20; -pub const SIGTTIN: u32 = 21; -pub const SIGTTOU: u32 = 22; -pub const SIGIO: u32 = 23; -pub const SIGXCPU: u32 = 24; -pub const SIGXFSZ: u32 = 25; -pub const SIGVTALRM: u32 = 26; -pub const SIGPROF: u32 = 27; -pub const SIGWINCH: u32 = 28; -pub const SIGINFO: u32 = 29; -pub const SIGUSR1: u32 = 30; -pub const SIGUSR2: u32 = 31; -pub const FP_PREC_24B: u32 = 0; -pub const FP_PREC_53B: u32 = 2; -pub const FP_PREC_64B: u32 = 3; -pub const FP_RND_NEAR: u32 = 0; -pub const FP_RND_DOWN: u32 = 1; -pub const FP_RND_UP: u32 = 2; -pub const FP_CHOP: u32 = 3; -pub const FP_STATE_BYTES: u32 = 512; -pub const SIGEV_NONE: u32 = 0; -pub const SIGEV_SIGNAL: u32 = 1; -pub const SIGEV_THREAD: u32 = 3; -pub const ILL_NOOP: u32 = 0; -pub const ILL_ILLOPC: u32 = 1; -pub const ILL_ILLTRP: u32 = 2; -pub const ILL_PRVOPC: u32 = 3; -pub const ILL_ILLOPN: u32 = 4; -pub const ILL_ILLADR: u32 = 5; -pub const ILL_PRVREG: u32 = 6; -pub const ILL_COPROC: u32 = 7; -pub const ILL_BADSTK: u32 = 8; -pub const FPE_NOOP: u32 = 0; -pub const FPE_FLTDIV: u32 = 1; -pub const FPE_FLTOVF: u32 = 2; -pub const FPE_FLTUND: u32 = 3; -pub const FPE_FLTRES: u32 = 4; -pub const FPE_FLTINV: u32 = 5; -pub const FPE_FLTSUB: u32 = 6; -pub const FPE_INTDIV: u32 = 7; -pub const FPE_INTOVF: u32 = 8; -pub const SEGV_NOOP: u32 = 0; -pub const SEGV_MAPERR: u32 = 1; -pub const SEGV_ACCERR: u32 = 2; -pub const BUS_NOOP: u32 = 0; -pub const BUS_ADRALN: u32 = 1; -pub const BUS_ADRERR: u32 = 2; -pub const BUS_OBJERR: u32 = 3; -pub const TRAP_BRKPT: u32 = 1; -pub const TRAP_TRACE: u32 = 2; -pub const CLD_NOOP: u32 = 0; -pub const CLD_EXITED: u32 = 1; -pub const CLD_KILLED: u32 = 2; -pub const CLD_DUMPED: u32 = 3; -pub const CLD_TRAPPED: u32 = 4; -pub const CLD_STOPPED: u32 = 5; -pub const CLD_CONTINUED: u32 = 6; -pub const POLL_IN: u32 = 1; -pub const POLL_OUT: u32 = 2; -pub const POLL_MSG: u32 = 3; -pub const POLL_ERR: u32 = 4; -pub const POLL_PRI: u32 = 5; -pub const POLL_HUP: u32 = 6; -pub const SA_ONSTACK: u32 = 1; -pub const SA_RESTART: u32 = 2; -pub const SA_RESETHAND: u32 = 4; -pub const SA_NOCLDSTOP: u32 = 8; -pub const SA_NODEFER: u32 = 16; -pub const SA_NOCLDWAIT: u32 = 32; -pub const SA_SIGINFO: u32 = 64; -pub const SA_USERTRAMP: u32 = 256; -pub const SA_64REGSET: u32 = 512; -pub const SA_USERSPACE_MASK: u32 = 127; -pub const SIG_BLOCK: u32 = 1; -pub const SIG_UNBLOCK: u32 = 2; -pub const SIG_SETMASK: u32 = 3; -pub const SI_USER: u32 = 65537; -pub const SI_QUEUE: u32 = 65538; -pub const SI_TIMER: u32 = 65539; -pub const SI_ASYNCIO: u32 = 65540; -pub const SI_MESGQ: u32 = 65541; -pub const SS_ONSTACK: u32 = 1; -pub const SS_DISABLE: u32 = 4; -pub const MINSIGSTKSZ: u32 = 32768; -pub const SIGSTKSZ: u32 = 131072; -pub const SV_ONSTACK: u32 = 1; -pub const SV_INTERRUPT: u32 = 2; -pub const SV_RESETHAND: u32 = 4; -pub const SV_NODEFER: u32 = 16; -pub const SV_NOCLDSTOP: u32 = 8; -pub const SV_SIGINFO: u32 = 64; -pub const PRIO_PROCESS: u32 = 0; -pub const PRIO_PGRP: u32 = 1; -pub const PRIO_USER: u32 = 2; -pub const PRIO_DARWIN_THREAD: u32 = 3; -pub const PRIO_DARWIN_PROCESS: u32 = 4; -pub const PRIO_MIN: i32 = -20; -pub const PRIO_MAX: u32 = 20; -pub const PRIO_DARWIN_BG: u32 = 4096; -pub const PRIO_DARWIN_NONUI: u32 = 4097; -pub const RUSAGE_SELF: u32 = 0; -pub const RUSAGE_CHILDREN: i32 = -1; -pub const RUSAGE_INFO_V0: u32 = 0; -pub const RUSAGE_INFO_V1: u32 = 1; -pub const RUSAGE_INFO_V2: u32 = 2; -pub const RUSAGE_INFO_V3: u32 = 3; -pub const RUSAGE_INFO_V4: u32 = 4; -pub const RUSAGE_INFO_CURRENT: u32 = 4; -pub const RLIMIT_CPU: u32 = 0; -pub const RLIMIT_FSIZE: u32 = 1; -pub const RLIMIT_DATA: u32 = 2; -pub const RLIMIT_STACK: u32 = 3; -pub const RLIMIT_CORE: u32 = 4; -pub const RLIMIT_AS: u32 = 5; -pub const RLIMIT_RSS: u32 = 5; -pub const RLIMIT_MEMLOCK: u32 = 6; -pub const RLIMIT_NPROC: u32 = 7; -pub const RLIMIT_NOFILE: u32 = 8; -pub const RLIM_NLIMITS: u32 = 9; -pub const _RLIMIT_POSIX_FLAG: u32 = 4096; -pub const RLIMIT_WAKEUPS_MONITOR: u32 = 1; -pub const RLIMIT_CPU_USAGE_MONITOR: u32 = 2; -pub const RLIMIT_THREAD_CPULIMITS: u32 = 3; -pub const RLIMIT_FOOTPRINT_INTERVAL: u32 = 4; -pub const WAKEMON_ENABLE: u32 = 1; -pub const WAKEMON_DISABLE: u32 = 2; -pub const WAKEMON_GET_PARAMS: u32 = 4; -pub const WAKEMON_SET_DEFAULTS: u32 = 8; -pub const WAKEMON_MAKE_FATAL: u32 = 16; -pub const CPUMON_MAKE_FATAL: u32 = 4096; -pub const FOOTPRINT_INTERVAL_RESET: u32 = 1; -pub const IOPOL_TYPE_DISK: u32 = 0; -pub const IOPOL_TYPE_VFS_ATIME_UPDATES: u32 = 2; -pub const IOPOL_TYPE_VFS_MATERIALIZE_DATALESS_FILES: u32 = 3; -pub const IOPOL_TYPE_VFS_STATFS_NO_DATA_VOLUME: u32 = 4; -pub const IOPOL_SCOPE_PROCESS: u32 = 0; -pub const IOPOL_SCOPE_THREAD: u32 = 1; -pub const IOPOL_SCOPE_DARWIN_BG: u32 = 2; -pub const IOPOL_DEFAULT: u32 = 0; -pub const IOPOL_IMPORTANT: u32 = 1; -pub const IOPOL_PASSIVE: u32 = 2; -pub const IOPOL_THROTTLE: u32 = 3; -pub const IOPOL_UTILITY: u32 = 4; -pub const IOPOL_STANDARD: u32 = 5; -pub const IOPOL_APPLICATION: u32 = 5; -pub const IOPOL_NORMAL: u32 = 1; -pub const IOPOL_ATIME_UPDATES_DEFAULT: u32 = 0; -pub const IOPOL_ATIME_UPDATES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_DEFAULT: u32 = 0; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_OFF: u32 = 1; -pub const IOPOL_MATERIALIZE_DATALESS_FILES_ON: u32 = 2; -pub const IOPOL_VFS_STATFS_NO_DATA_VOLUME_DEFAULT: u32 = 0; -pub const IOPOL_VFS_STATFS_FORCE_NO_DATA_VOLUME: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WCOREFLAG: u32 = 128; -pub const _WSTOPPED: u32 = 127; -pub const WEXITED: u32 = 4; -pub const WSTOPPED: u32 = 8; -pub const WCONTINUED: u32 = 16; -pub const WNOWAIT: u32 = 32; -pub const WAIT_ANY: i32 = -1; -pub const WAIT_MYPGRP: u32 = 0; -pub const _QUAD_HIGHWORD: u32 = 1; -pub const _QUAD_LOWWORD: u32 = 0; -pub const __DARWIN_LITTLE_ENDIAN: u32 = 1234; -pub const __DARWIN_BIG_ENDIAN: u32 = 4321; -pub const __DARWIN_PDP_ENDIAN: u32 = 3412; -pub const __DARWIN_BYTE_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const RAND_MAX: u32 = 2147483647; -pub const _USE_FORTIFY_LEVEL: u32 = 2; -pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; -pub const __GNUC_VA_LIST: u32 = 1; -pub const RENAME_SECLUDE: u32 = 1; -pub const RENAME_SWAP: u32 = 2; -pub const RENAME_EXCL: u32 = 4; -pub const __SLBF: u32 = 1; -pub const __SNBF: u32 = 2; -pub const __SRD: u32 = 4; -pub const __SWR: u32 = 8; -pub const __SRW: u32 = 16; -pub const __SEOF: u32 = 32; -pub const __SERR: u32 = 64; -pub const __SMBF: u32 = 128; -pub const __SAPP: u32 = 256; -pub const __SSTR: u32 = 512; -pub const __SOPT: u32 = 1024; -pub const __SNPT: u32 = 2048; -pub const __SOFF: u32 = 4096; -pub const __SMOD: u32 = 8192; -pub const __SALC: u32 = 16384; -pub const __SIGN: u32 = 32768; -pub const _IOFBF: u32 = 0; -pub const _IOLBF: u32 = 1; -pub const _IONBF: u32 = 2; -pub const BUFSIZ: u32 = 1024; -pub const EOF: i32 = -1; -pub const FOPEN_MAX: u32 = 20; -pub const FILENAME_MAX: u32 = 1024; -pub const P_tmpdir: &'static [u8; 10usize] = b"/var/tmp/\0"; -pub const L_tmpnam: u32 = 1024; -pub const TMP_MAX: u32 = 308915776; -pub const SEEK_SET: u32 = 0; -pub const SEEK_CUR: u32 = 1; -pub const SEEK_END: u32 = 2; -pub const L_ctermid: u32 = 1024; -pub const __DARWIN_CLK_TCK: u32 = 100; -pub const CHAR_BIT: u32 = 8; -pub const MB_LEN_MAX: u32 = 6; -pub const CLK_TCK: u32 = 100; -pub const SCHAR_MAX: u32 = 127; -pub const SCHAR_MIN: i32 = -128; -pub const UCHAR_MAX: u32 = 255; -pub const CHAR_MAX: u32 = 127; -pub const CHAR_MIN: i32 = -128; -pub const USHRT_MAX: u32 = 65535; -pub const SHRT_MAX: u32 = 32767; -pub const SHRT_MIN: i32 = -32768; -pub const UINT_MAX: u32 = 4294967295; -pub const INT_MAX: u32 = 2147483647; -pub const INT_MIN: i32 = -2147483648; -pub const ULONG_MAX: i32 = -1; -pub const LONG_MAX: u64 = 9223372036854775807; -pub const LONG_MIN: i64 = -9223372036854775808; -pub const ULLONG_MAX: i32 = -1; -pub const LLONG_MAX: u64 = 9223372036854775807; -pub const LLONG_MIN: i64 = -9223372036854775808; -pub const LONG_BIT: u32 = 64; -pub const SSIZE_MAX: u64 = 9223372036854775807; -pub const WORD_BIT: u32 = 32; -pub const SIZE_T_MAX: i32 = -1; -pub const UQUAD_MAX: i32 = -1; -pub const QUAD_MAX: u64 = 9223372036854775807; -pub const QUAD_MIN: i64 = -9223372036854775808; -pub const ARG_MAX: u32 = 262144; -pub const CHILD_MAX: u32 = 266; -pub const GID_MAX: u32 = 2147483647; -pub const LINK_MAX: u32 = 32767; -pub const MAX_CANON: u32 = 1024; -pub const MAX_INPUT: u32 = 1024; -pub const NAME_MAX: u32 = 255; -pub const NGROUPS_MAX: u32 = 16; -pub const UID_MAX: u32 = 2147483647; -pub const OPEN_MAX: u32 = 10240; -pub const PATH_MAX: u32 = 1024; -pub const PIPE_BUF: u32 = 512; -pub const BC_BASE_MAX: u32 = 99; -pub const BC_DIM_MAX: u32 = 2048; -pub const BC_SCALE_MAX: u32 = 99; -pub const BC_STRING_MAX: u32 = 1000; -pub const CHARCLASS_NAME_MAX: u32 = 14; -pub const COLL_WEIGHTS_MAX: u32 = 2; -pub const EQUIV_CLASS_MAX: u32 = 2; -pub const EXPR_NEST_MAX: u32 = 32; -pub const LINE_MAX: u32 = 2048; -pub const RE_DUP_MAX: u32 = 255; -pub const NZERO: u32 = 20; -pub const _POSIX_ARG_MAX: u32 = 4096; -pub const _POSIX_CHILD_MAX: u32 = 25; -pub const _POSIX_LINK_MAX: u32 = 8; -pub const _POSIX_MAX_CANON: u32 = 255; -pub const _POSIX_MAX_INPUT: u32 = 255; -pub const _POSIX_NAME_MAX: u32 = 14; -pub const _POSIX_NGROUPS_MAX: u32 = 8; -pub const _POSIX_OPEN_MAX: u32 = 20; -pub const _POSIX_PATH_MAX: u32 = 256; -pub const _POSIX_PIPE_BUF: u32 = 512; -pub const _POSIX_SSIZE_MAX: u32 = 32767; -pub const _POSIX_STREAM_MAX: u32 = 8; -pub const _POSIX_TZNAME_MAX: u32 = 6; -pub const _POSIX2_BC_BASE_MAX: u32 = 99; -pub const _POSIX2_BC_DIM_MAX: u32 = 2048; -pub const _POSIX2_BC_SCALE_MAX: u32 = 99; -pub const _POSIX2_BC_STRING_MAX: u32 = 1000; -pub const _POSIX2_EQUIV_CLASS_MAX: u32 = 2; -pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; -pub const _POSIX2_LINE_MAX: u32 = 2048; -pub const _POSIX2_RE_DUP_MAX: u32 = 255; -pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; -pub const _POSIX_AIO_MAX: u32 = 1; -pub const _POSIX_DELAYTIMER_MAX: u32 = 32; -pub const _POSIX_MQ_OPEN_MAX: u32 = 8; -pub const _POSIX_MQ_PRIO_MAX: u32 = 32; -pub const _POSIX_RTSIG_MAX: u32 = 8; -pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; -pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; -pub const _POSIX_SIGQUEUE_MAX: u32 = 32; -pub const _POSIX_TIMER_MAX: u32 = 32; -pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; -pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; -pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; -pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const PTHREAD_KEYS_MAX: u32 = 512; -pub const PTHREAD_STACK_MIN: u32 = 8192; -pub const _POSIX_HOST_NAME_MAX: u32 = 255; -pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; -pub const _POSIX_SS_REPL_MAX: u32 = 4; -pub const _POSIX_SYMLINK_MAX: u32 = 255; -pub const _POSIX_SYMLOOP_MAX: u32 = 8; -pub const _POSIX_TRACE_EVENT_NAME_MAX: u32 = 30; -pub const _POSIX_TRACE_NAME_MAX: u32 = 8; -pub const _POSIX_TRACE_SYS_MAX: u32 = 8; -pub const _POSIX_TRACE_USER_EVENT_MAX: u32 = 32; -pub const _POSIX_TTY_NAME_MAX: u32 = 9; -pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; -pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; -pub const _POSIX_RE_DUP_MAX: u32 = 255; -pub const OFF_MIN: i64 = -9223372036854775808; -pub const OFF_MAX: u64 = 9223372036854775807; -pub const PASS_MAX: u32 = 128; -pub const NL_ARGMAX: u32 = 9; -pub const NL_LANGMAX: u32 = 14; -pub const NL_MSGMAX: u32 = 32767; -pub const NL_NMAX: u32 = 1; -pub const NL_SETMAX: u32 = 255; -pub const NL_TEXTMAX: u32 = 2048; -pub const _XOPEN_IOV_MAX: u32 = 16; -pub const IOV_MAX: u32 = 1024; -pub const _XOPEN_NAME_MAX: u32 = 255; -pub const _XOPEN_PATH_MAX: u32 = 1024; -pub const EPERM: u32 = 1; -pub const ENOENT: u32 = 2; -pub const ESRCH: u32 = 3; -pub const EINTR: u32 = 4; -pub const EIO: u32 = 5; -pub const ENXIO: u32 = 6; -pub const E2BIG: u32 = 7; -pub const ENOEXEC: u32 = 8; -pub const EBADF: u32 = 9; -pub const ECHILD: u32 = 10; -pub const EDEADLK: u32 = 11; -pub const ENOMEM: u32 = 12; -pub const EACCES: u32 = 13; -pub const EFAULT: u32 = 14; -pub const ENOTBLK: u32 = 15; -pub const EBUSY: u32 = 16; -pub const EEXIST: u32 = 17; -pub const EXDEV: u32 = 18; -pub const ENODEV: u32 = 19; -pub const ENOTDIR: u32 = 20; -pub const EISDIR: u32 = 21; -pub const EINVAL: u32 = 22; -pub const ENFILE: u32 = 23; -pub const EMFILE: u32 = 24; -pub const ENOTTY: u32 = 25; -pub const ETXTBSY: u32 = 26; -pub const EFBIG: u32 = 27; -pub const ENOSPC: u32 = 28; -pub const ESPIPE: u32 = 29; -pub const EROFS: u32 = 30; -pub const EMLINK: u32 = 31; -pub const EPIPE: u32 = 32; -pub const EDOM: u32 = 33; -pub const ERANGE: u32 = 34; -pub const EAGAIN: u32 = 35; -pub const EWOULDBLOCK: u32 = 35; -pub const EINPROGRESS: u32 = 36; -pub const EALREADY: u32 = 37; -pub const ENOTSOCK: u32 = 38; -pub const EDESTADDRREQ: u32 = 39; -pub const EMSGSIZE: u32 = 40; -pub const EPROTOTYPE: u32 = 41; -pub const ENOPROTOOPT: u32 = 42; -pub const EPROTONOSUPPORT: u32 = 43; -pub const ESOCKTNOSUPPORT: u32 = 44; -pub const ENOTSUP: u32 = 45; -pub const EPFNOSUPPORT: u32 = 46; -pub const EAFNOSUPPORT: u32 = 47; -pub const EADDRINUSE: u32 = 48; -pub const EADDRNOTAVAIL: u32 = 49; -pub const ENETDOWN: u32 = 50; -pub const ENETUNREACH: u32 = 51; -pub const ENETRESET: u32 = 52; -pub const ECONNABORTED: u32 = 53; -pub const ECONNRESET: u32 = 54; -pub const ENOBUFS: u32 = 55; -pub const EISCONN: u32 = 56; -pub const ENOTCONN: u32 = 57; -pub const ESHUTDOWN: u32 = 58; -pub const ETOOMANYREFS: u32 = 59; -pub const ETIMEDOUT: u32 = 60; -pub const ECONNREFUSED: u32 = 61; -pub const ELOOP: u32 = 62; -pub const ENAMETOOLONG: u32 = 63; -pub const EHOSTDOWN: u32 = 64; -pub const EHOSTUNREACH: u32 = 65; -pub const ENOTEMPTY: u32 = 66; -pub const EPROCLIM: u32 = 67; -pub const EUSERS: u32 = 68; -pub const EDQUOT: u32 = 69; -pub const ESTALE: u32 = 70; -pub const EREMOTE: u32 = 71; -pub const EBADRPC: u32 = 72; -pub const ERPCMISMATCH: u32 = 73; -pub const EPROGUNAVAIL: u32 = 74; -pub const EPROGMISMATCH: u32 = 75; -pub const EPROCUNAVAIL: u32 = 76; -pub const ENOLCK: u32 = 77; -pub const ENOSYS: u32 = 78; -pub const EFTYPE: u32 = 79; -pub const EAUTH: u32 = 80; -pub const ENEEDAUTH: u32 = 81; -pub const EPWROFF: u32 = 82; -pub const EDEVERR: u32 = 83; -pub const EOVERFLOW: u32 = 84; -pub const EBADEXEC: u32 = 85; -pub const EBADARCH: u32 = 86; -pub const ESHLIBVERS: u32 = 87; -pub const EBADMACHO: u32 = 88; -pub const ECANCELED: u32 = 89; -pub const EIDRM: u32 = 90; -pub const ENOMSG: u32 = 91; -pub const EILSEQ: u32 = 92; -pub const ENOATTR: u32 = 93; -pub const EBADMSG: u32 = 94; -pub const EMULTIHOP: u32 = 95; -pub const ENODATA: u32 = 96; -pub const ENOLINK: u32 = 97; -pub const ENOSR: u32 = 98; -pub const ENOSTR: u32 = 99; -pub const EPROTO: u32 = 100; -pub const ETIME: u32 = 101; -pub const EOPNOTSUPP: u32 = 102; -pub const ENOPOLICY: u32 = 103; -pub const ENOTRECOVERABLE: u32 = 104; -pub const EOWNERDEAD: u32 = 105; -pub const EQFULL: u32 = 106; -pub const ELAST: u32 = 106; -pub const __DARWIN_FD_SETSIZE: u32 = 1024; -pub const __DARWIN_NBBY: u32 = 8; -pub const NBBY: u32 = 8; -pub const FD_SETSIZE: u32 = 1024; -pub const HAVE___BUILTIN_CLZ: u32 = 1; -pub const HTS_PATH_SEPARATOR_CHAR: u8 = 58u8; -pub const HTS_PATH_SEPARATOR_STR: &'static [u8; 2usize] = b":\0"; -pub const HTS_RESIZE_CLEAR: u32 = 1; -pub const HTS_IDX_DELIM: &'static [u8; 8usize] = b"##idx##\0"; -pub const HTS_VERSION: u32 = 101190; -pub const HTS_IDX_NOCOOR: i32 = -2; -pub const HTS_IDX_START: i32 = -3; -pub const HTS_IDX_REST: i32 = -4; -pub const HTS_IDX_NONE: i32 = -5; -pub const HTS_FMT_CSI: u32 = 0; -pub const HTS_FMT_BAI: u32 = 1; -pub const HTS_FMT_TBI: u32 = 2; -pub const HTS_FMT_CRAI: u32 = 3; -pub const HTS_FMT_FAI: u32 = 4; -pub const HTS_POS_MIN: i64 = -9223372036854775808; -pub const PRIhts_pos: &'static [u8; 4usize] = b"lld\0"; -pub const HTS_IDX_SAVE_REMOTE: u32 = 1; -pub const HTS_IDX_SILENT_FAIL: u32 = 2; -pub const HTS_PARSE_THOUSANDS_SEP: u32 = 1; -pub const HTS_PARSE_ONE_COORD: u32 = 2; -pub const HTS_PARSE_LIST: u32 = 4; -pub const FT_UNKN: u32 = 0; -pub const FT_GZ: u32 = 1; -pub const FT_VCF: u32 = 2; -pub const FT_VCF_GZ: u32 = 3; -pub const FT_BCF: u32 = 4; -pub const FT_BCF_GZ: u32 = 5; -pub const FT_STDIN: u32 = 8; -pub const HTS_ALLOW_UNALIGNED: u32 = 1; -pub const BCF_HL_FLT: u32 = 0; -pub const BCF_HL_INFO: u32 = 1; -pub const BCF_HL_FMT: u32 = 2; -pub const BCF_HL_CTG: u32 = 3; -pub const BCF_HL_STR: u32 = 4; -pub const BCF_HL_GEN: u32 = 5; -pub const BCF_HT_FLAG: u32 = 0; -pub const BCF_HT_INT: u32 = 1; -pub const BCF_HT_REAL: u32 = 2; -pub const BCF_HT_STR: u32 = 3; -pub const BCF_HT_LONG: u32 = 257; -pub const BCF_VL_FIXED: u32 = 0; -pub const BCF_VL_VAR: u32 = 1; -pub const BCF_VL_A: u32 = 2; -pub const BCF_VL_G: u32 = 3; -pub const BCF_VL_R: u32 = 4; -pub const BCF_DT_ID: u32 = 0; -pub const BCF_DT_CTG: u32 = 1; -pub const BCF_DT_SAMPLE: u32 = 2; -pub const BCF_BT_NULL: u32 = 0; -pub const BCF_BT_INT8: u32 = 1; -pub const BCF_BT_INT16: u32 = 2; -pub const BCF_BT_INT32: u32 = 3; -pub const BCF_BT_INT64: u32 = 4; -pub const BCF_BT_FLOAT: u32 = 5; -pub const BCF_BT_CHAR: u32 = 7; -pub const VCF_REF: u32 = 0; -pub const VCF_SNP: u32 = 1; -pub const VCF_MNP: u32 = 2; -pub const VCF_INDEL: u32 = 4; -pub const VCF_OTHER: u32 = 8; -pub const VCF_BND: u32 = 16; -pub const VCF_OVERLAP: u32 = 32; -pub const BCF1_DIRTY_ID: u32 = 1; -pub const BCF1_DIRTY_ALS: u32 = 2; -pub const BCF1_DIRTY_FLT: u32 = 4; -pub const BCF1_DIRTY_INF: u32 = 8; -pub const BCF_ERR_CTG_UNDEF: u32 = 1; -pub const BCF_ERR_TAG_UNDEF: u32 = 2; -pub const BCF_ERR_NCOLS: u32 = 4; -pub const BCF_ERR_LIMITS: u32 = 8; -pub const BCF_ERR_CHAR: u32 = 16; -pub const BCF_ERR_CTG_INVALID: u32 = 32; -pub const BCF_ERR_TAG_INVALID: u32 = 64; -pub const BCF_UN_STR: u32 = 1; -pub const BCF_UN_FLT: u32 = 2; -pub const BCF_UN_INFO: u32 = 4; -pub const BCF_UN_SHR: u32 = 7; -pub const BCF_UN_FMT: u32 = 8; -pub const BCF_UN_IND: u32 = 8; -pub const BCF_UN_ALL: u32 = 15; -pub const bcf_gt_missing: u32 = 0; -pub const bcf_int8_vector_end: i32 = -127; -pub const bcf_int16_vector_end: i32 = -32767; -pub const bcf_int32_vector_end: i32 = -2147483647; -pub const bcf_int64_vector_end: i64 = -9223372036854775807; -pub const bcf_str_vector_end: u32 = 0; -pub const bcf_int8_missing: i32 = -128; -pub const bcf_int16_missing: i32 = -32768; -pub const bcf_int32_missing: i32 = -2147483648; -pub const bcf_int64_missing: i64 = -9223372036854775808; -pub const bcf_str_missing: u32 = 7; -pub const BCF_MAX_BT_INT8: u32 = 127; -pub const BCF_MAX_BT_INT16: u32 = 32767; -pub const BCF_MAX_BT_INT32: u32 = 2147483647; -pub const BCF_MIN_BT_INT8: i32 = -120; -pub const BCF_MIN_BT_INT16: i32 = -32760; -pub const BCF_MIN_BT_INT32: i32 = -2147483640; -pub const SAM_FORMAT_VERSION: &'static [u8; 4usize] = b"1.6\0"; -pub const BAM_CMATCH: u32 = 0; -pub const BAM_CINS: u32 = 1; -pub const BAM_CDEL: u32 = 2; -pub const BAM_CREF_SKIP: u32 = 3; -pub const BAM_CSOFT_CLIP: u32 = 4; -pub const BAM_CHARD_CLIP: u32 = 5; -pub const BAM_CPAD: u32 = 6; -pub const BAM_CEQUAL: u32 = 7; -pub const BAM_CDIFF: u32 = 8; -pub const BAM_CBACK: u32 = 9; -pub const BAM_CIGAR_STR: &'static [u8; 11usize] = b"MIDNSHP=XB\0"; -pub const BAM_CIGAR_SHIFT: u32 = 4; -pub const BAM_CIGAR_MASK: u32 = 15; -pub const BAM_CIGAR_TYPE: u32 = 246183; -pub const BAM_FPAIRED: u32 = 1; -pub const BAM_FPROPER_PAIR: u32 = 2; -pub const BAM_FUNMAP: u32 = 4; -pub const BAM_FMUNMAP: u32 = 8; -pub const BAM_FREVERSE: u32 = 16; -pub const BAM_FMREVERSE: u32 = 32; -pub const BAM_FREAD1: u32 = 64; -pub const BAM_FREAD2: u32 = 128; -pub const BAM_FSECONDARY: u32 = 256; -pub const BAM_FQCFAIL: u32 = 512; -pub const BAM_FDUP: u32 = 1024; -pub const BAM_FSUPPLEMENTARY: u32 = 2048; -pub const BAM_USER_OWNS_STRUCT: u32 = 1; -pub const BAM_USER_OWNS_DATA: u32 = 2; -pub const BGZF_BLOCK_SIZE: u32 = 65280; -pub const BGZF_MAX_BLOCK_SIZE: u32 = 65536; -pub const BGZF_ERR_ZLIB: u32 = 1; -pub const BGZF_ERR_HEADER: u32 = 2; -pub const BGZF_ERR_IO: u32 = 4; -pub const BGZF_ERR_MISUSE: u32 = 8; -pub const BGZF_ERR_MT: u32 = 16; -pub const BGZF_ERR_CRC: u32 = 32; -pub const GT_HOM_RR: u32 = 0; -pub const GT_HOM_AA: u32 = 1; -pub const GT_HET_RA: u32 = 2; -pub const GT_HET_AA: u32 = 3; -pub const GT_HAPL_R: u32 = 4; -pub const GT_HAPL_A: u32 = 5; -pub const GT_UNKN: u32 = 6; -pub const TBX_MAX_SHIFT: u32 = 31; -pub const TBX_GENERIC: u32 = 0; -pub const TBX_SAM: u32 = 1; -pub const TBX_VCF: u32 = 2; -pub const TBX_UCSC: u32 = 65536; -pub const COLLAPSE_NONE: u32 = 0; -pub const COLLAPSE_SNPS: u32 = 1; -pub const COLLAPSE_INDELS: u32 = 2; -pub const COLLAPSE_ANY: u32 = 4; -pub const COLLAPSE_SOME: u32 = 8; -pub const COLLAPSE_BOTH: u32 = 3; -pub const BCF_SR_PAIR_SNPS: u32 = 1; -pub const BCF_SR_PAIR_INDELS: u32 = 2; -pub const BCF_SR_PAIR_ANY: u32 = 4; -pub const BCF_SR_PAIR_SOME: u32 = 8; -pub const BCF_SR_PAIR_SNP_REF: u32 = 16; -pub const BCF_SR_PAIR_INDEL_REF: u32 = 32; -pub const BCF_SR_PAIR_EXACT: u32 = 64; -pub const BCF_SR_PAIR_BOTH: u32 = 3; -pub const BCF_SR_PAIR_BOTH_REF: u32 = 51; -pub type size_t = ::std::os::raw::c_ulong; -pub type wchar_t = ::std::os::raw::c_int; -pub type int_least8_t = i8; -pub type int_least16_t = i16; -pub type int_least32_t = i32; -pub type int_least64_t = i64; -pub type uint_least8_t = u8; -pub type uint_least16_t = u16; -pub type uint_least32_t = u32; -pub type uint_least64_t = u64; -pub type int_fast8_t = i8; -pub type int_fast16_t = i16; -pub type int_fast32_t = i32; -pub type int_fast64_t = i64; -pub type uint_fast8_t = u8; -pub type uint_fast16_t = u16; -pub type uint_fast32_t = u32; -pub type uint_fast64_t = u64; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_longlong; -pub type __uint64_t = ::std::os::raw::c_ulonglong; -pub type __darwin_intptr_t = ::std::os::raw::c_long; -pub type __darwin_natural_t = ::std::os::raw::c_uint; -pub type __darwin_ct_rune_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __mbstate_t { - pub __mbstate8: [::std::os::raw::c_char; 128usize], - pub _mbstateL: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 16usize], -} -#[test] -fn bindgen_test_layout___mbstate_t() { - assert_eq!( - ::std::mem::size_of::<__mbstate_t>(), - 128usize, - concat!("Size of: ", stringify!(__mbstate_t)) - ); - assert_eq!( - ::std::mem::align_of::<__mbstate_t>(), - 8usize, - concat!("Alignment of ", stringify!(__mbstate_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>())).__mbstate8 as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(__mbstate8) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__mbstate_t>()))._mbstateL as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__mbstate_t), - "::", - stringify!(_mbstateL) - ) - ); -} -pub type __darwin_mbstate_t = __mbstate_t; -pub type __darwin_ptrdiff_t = ::std::os::raw::c_long; -pub type __darwin_size_t = ::std::os::raw::c_ulong; -pub type __darwin_va_list = __builtin_va_list; -pub type __darwin_wchar_t = ::std::os::raw::c_int; -pub type __darwin_rune_t = __darwin_wchar_t; -pub type __darwin_wint_t = ::std::os::raw::c_int; -pub type __darwin_clock_t = ::std::os::raw::c_ulong; -pub type __darwin_socklen_t = __uint32_t; -pub type __darwin_ssize_t = ::std::os::raw::c_long; -pub type __darwin_time_t = ::std::os::raw::c_long; -pub type __darwin_blkcnt_t = __int64_t; -pub type __darwin_blksize_t = __int32_t; -pub type __darwin_dev_t = __int32_t; -pub type __darwin_fsblkcnt_t = ::std::os::raw::c_uint; -pub type __darwin_fsfilcnt_t = ::std::os::raw::c_uint; -pub type __darwin_gid_t = __uint32_t; -pub type __darwin_id_t = __uint32_t; -pub type __darwin_ino64_t = __uint64_t; -pub type __darwin_ino_t = __darwin_ino64_t; -pub type __darwin_mach_port_name_t = __darwin_natural_t; -pub type __darwin_mach_port_t = __darwin_mach_port_name_t; -pub type __darwin_mode_t = __uint16_t; -pub type __darwin_off_t = __int64_t; -pub type __darwin_pid_t = __int32_t; -pub type __darwin_sigset_t = __uint32_t; -pub type __darwin_suseconds_t = __int32_t; -pub type __darwin_uid_t = __uint32_t; -pub type __darwin_useconds_t = __uint32_t; -pub type __darwin_uuid_t = [::std::os::raw::c_uchar; 16usize]; -pub type __darwin_uuid_string_t = [::std::os::raw::c_char; 37usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_pthread_handler_rec { - pub __routine: ::std::option::Option, - pub __arg: *mut ::std::os::raw::c_void, - pub __next: *mut __darwin_pthread_handler_rec, -} -#[test] -fn bindgen_test_layout___darwin_pthread_handler_rec() { - assert_eq!( - ::std::mem::size_of::<__darwin_pthread_handler_rec>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_pthread_handler_rec>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_pthread_handler_rec)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__routine as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__routine) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__arg as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__arg) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_pthread_handler_rec>())).__next as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_pthread_handler_rec), - "::", - stringify!(__next) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _opaque_pthread_attr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_attr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_attr_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_attr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_attr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_attr_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_attr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _opaque_pthread_cond_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 40usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_cond_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_cond_t>(), - 48usize, - concat!("Size of: ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_cond_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_cond_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_cond_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_cond_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_condattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_condattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_condattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_condattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_condattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_condattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_condattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _opaque_pthread_mutex_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 56usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_mutex_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutex_t>(), - 64usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutex_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutex_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutex_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutex_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_mutexattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_mutexattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_mutexattr_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_mutexattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_mutexattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_mutexattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_mutexattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_once_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_once_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_once_t>(), - 16usize, - concat!("Size of: ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_once_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_once_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_once_t>())).__opaque as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_once_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _opaque_pthread_rwlock_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 192usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_rwlock_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlock_t>(), - 200usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlock_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlock_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlock_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlock_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _opaque_pthread_rwlockattr_t { - pub __sig: ::std::os::raw::c_long, - pub __opaque: [::std::os::raw::c_char; 16usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_rwlockattr_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_rwlockattr_t>(), - 24usize, - concat!("Size of: ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_rwlockattr_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_rwlockattr_t)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__sig as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_rwlockattr_t>())).__opaque as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_rwlockattr_t), - "::", - stringify!(__opaque) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _opaque_pthread_t { - pub __sig: ::std::os::raw::c_long, - pub __cleanup_stack: *mut __darwin_pthread_handler_rec, - pub __opaque: [::std::os::raw::c_char; 8176usize], -} -#[test] -fn bindgen_test_layout__opaque_pthread_t() { - assert_eq!( - ::std::mem::size_of::<_opaque_pthread_t>(), - 8192usize, - concat!("Size of: ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - ::std::mem::align_of::<_opaque_pthread_t>(), - 8usize, - concat!("Alignment of ", stringify!(_opaque_pthread_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__sig as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__sig) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_opaque_pthread_t>())).__cleanup_stack as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__cleanup_stack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_opaque_pthread_t>())).__opaque as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_opaque_pthread_t), - "::", - stringify!(__opaque) - ) - ); -} -pub type __darwin_pthread_attr_t = _opaque_pthread_attr_t; -pub type __darwin_pthread_cond_t = _opaque_pthread_cond_t; -pub type __darwin_pthread_condattr_t = _opaque_pthread_condattr_t; -pub type __darwin_pthread_key_t = ::std::os::raw::c_ulong; -pub type __darwin_pthread_mutex_t = _opaque_pthread_mutex_t; -pub type __darwin_pthread_mutexattr_t = _opaque_pthread_mutexattr_t; -pub type __darwin_pthread_once_t = _opaque_pthread_once_t; -pub type __darwin_pthread_rwlock_t = _opaque_pthread_rwlock_t; -pub type __darwin_pthread_rwlockattr_t = _opaque_pthread_rwlockattr_t; -pub type __darwin_pthread_t = *mut _opaque_pthread_t; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulonglong; -pub type register_t = i64; -pub type user_addr_t = u_int64_t; -pub type user_size_t = u_int64_t; -pub type user_ssize_t = i64; -pub type user_long_t = i64; -pub type user_ulong_t = u_int64_t; -pub type user_time_t = i64; -pub type user_off_t = i64; -pub type syscall_arg_t = u_int64_t; -pub type intmax_t = ::std::os::raw::c_long; -pub type uintmax_t = ::std::os::raw::c_ulong; -pub type __darwin_nl_item = ::std::os::raw::c_int; -pub type __darwin_wctrans_t = ::std::os::raw::c_int; -pub type __darwin_wctype_t = __uint32_t; -extern "C" { - pub fn imaxabs(j: intmax_t) -> intmax_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct imaxdiv_t { - pub quot: intmax_t, - pub rem: intmax_t, -} -#[test] -fn bindgen_test_layout_imaxdiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(imaxdiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(imaxdiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(imaxdiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; -} -extern "C" { - pub fn strtoimax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn strtoumax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -extern "C" { - pub fn wcstoimax( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn wcstoumax( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -pub const htsLogLevel_HTS_LOG_OFF: htsLogLevel = 0; -pub const htsLogLevel_HTS_LOG_ERROR: htsLogLevel = 1; -pub const htsLogLevel_HTS_LOG_WARNING: htsLogLevel = 3; -pub const htsLogLevel_HTS_LOG_INFO: htsLogLevel = 4; -pub const htsLogLevel_HTS_LOG_DEBUG: htsLogLevel = 5; -pub const htsLogLevel_HTS_LOG_TRACE: htsLogLevel = 6; -pub type htsLogLevel = u32; -extern "C" { - pub fn hts_set_log_level(level: htsLogLevel); -} -extern "C" { - pub fn hts_get_log_level() -> htsLogLevel; -} -extern "C" { - pub static mut hts_verbose: ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_log( - severity: htsLogLevel, - context: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ... - ); -} -pub const idtype_t_P_ALL: idtype_t = 0; -pub const idtype_t_P_PID: idtype_t = 1; -pub const idtype_t_P_PGID: idtype_t = 2; -pub type idtype_t = u32; -pub type pid_t = __darwin_pid_t; -pub type id_t = __darwin_id_t; -pub type sig_atomic_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_thread_state { - pub __eax: ::std::os::raw::c_uint, - pub __ebx: ::std::os::raw::c_uint, - pub __ecx: ::std::os::raw::c_uint, - pub __edx: ::std::os::raw::c_uint, - pub __edi: ::std::os::raw::c_uint, - pub __esi: ::std::os::raw::c_uint, - pub __ebp: ::std::os::raw::c_uint, - pub __esp: ::std::os::raw::c_uint, - pub __ss: ::std::os::raw::c_uint, - pub __eflags: ::std::os::raw::c_uint, - pub __eip: ::std::os::raw::c_uint, - pub __cs: ::std::os::raw::c_uint, - pub __ds: ::std::os::raw::c_uint, - pub __es: ::std::os::raw::c_uint, - pub __fs: ::std::os::raw::c_uint, - pub __gs: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___darwin_i386_thread_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_thread_state>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_i386_thread_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_thread_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_thread_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eax as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eax) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebx as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ebx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ecx as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ecx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edx as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__edx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__edi as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__edi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esi as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__esi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ebp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ebp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__esp as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__esp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ss as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eflags as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eflags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__eip as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__eip) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__cs as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__cs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__ds as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__ds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__es as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__fs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__fs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_i386_thread_state>())).__gs as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_thread_state), - "::", - stringify!(__gs) - ) - ); -} -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_fp_control { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>, -} -#[test] -fn bindgen_test_layout___darwin_fp_control() { - assert_eq!( - ::std::mem::size_of::<__darwin_fp_control>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_control)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_fp_control>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_control)) - ); -} -impl __darwin_fp_control { - #[inline] - pub fn __invalid(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set___invalid(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __denorm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set___denorm(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set___zdiv(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set___ovrfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn __undfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set___undfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn __precis(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set___precis(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn __pc(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) } - } - #[inline] - pub fn set___pc(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 2u8, val as u64) - } - } - #[inline] - pub fn __rc(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u16) } - } - #[inline] - pub fn set___rc(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(10usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __invalid: ::std::os::raw::c_ushort, - __denorm: ::std::os::raw::c_ushort, - __zdiv: ::std::os::raw::c_ushort, - __ovrfl: ::std::os::raw::c_ushort, - __undfl: ::std::os::raw::c_ushort, - __precis: ::std::os::raw::c_ushort, - __pc: ::std::os::raw::c_ushort, - __rc: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; - __invalid as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __denorm: u16 = unsafe { ::std::mem::transmute(__denorm) }; - __denorm as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let __zdiv: u16 = unsafe { ::std::mem::transmute(__zdiv) }; - __zdiv as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let __ovrfl: u16 = unsafe { ::std::mem::transmute(__ovrfl) }; - __ovrfl as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let __undfl: u16 = unsafe { ::std::mem::transmute(__undfl) }; - __undfl as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let __precis: u16 = unsafe { ::std::mem::transmute(__precis) }; - __precis as u64 - }); - __bindgen_bitfield_unit.set(8usize, 2u8, { - let __pc: u16 = unsafe { ::std::mem::transmute(__pc) }; - __pc as u64 - }); - __bindgen_bitfield_unit.set(10usize, 2u8, { - let __rc: u16 = unsafe { ::std::mem::transmute(__rc) }; - __rc as u64 - }); - __bindgen_bitfield_unit - } -} -pub type __darwin_fp_control_t = __darwin_fp_control; -#[repr(C)] -#[repr(align(2))] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_fp_status { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>, -} -#[test] -fn bindgen_test_layout___darwin_fp_status() { - assert_eq!( - ::std::mem::size_of::<__darwin_fp_status>(), - 2usize, - concat!("Size of: ", stringify!(__darwin_fp_status)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_fp_status>(), - 2usize, - concat!("Alignment of ", stringify!(__darwin_fp_status)) - ); -} -impl __darwin_fp_status { - #[inline] - pub fn __invalid(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) } - } - #[inline] - pub fn set___invalid(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn __denorm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u16) } - } - #[inline] - pub fn set___denorm(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn __zdiv(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) } - } - #[inline] - pub fn set___zdiv(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn __ovrfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) } - } - #[inline] - pub fn set___ovrfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn __undfl(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } - } - #[inline] - pub fn set___undfl(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn __precis(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) } - } - #[inline] - pub fn set___precis(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn __stkflt(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) } - } - #[inline] - pub fn set___stkflt(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn __errsumm(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set___errsumm(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c0(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u16) } - } - #[inline] - pub fn set___c0(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c1(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u16) } - } - #[inline] - pub fn set___c1(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(9usize, 1u8, val as u64) - } - } - #[inline] - pub fn __c2(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u16) } - } - #[inline] - pub fn set___c2(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(10usize, 1u8, val as u64) - } - } - #[inline] - pub fn __tos(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 3u8) as u16) } - } - #[inline] - pub fn set___tos(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(11usize, 3u8, val as u64) - } - } - #[inline] - pub fn __c3(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } - } - #[inline] - pub fn set___c3(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(14usize, 1u8, val as u64) - } - } - #[inline] - pub fn __busy(&self) -> ::std::os::raw::c_ushort { - unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } - } - #[inline] - pub fn set___busy(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::std::mem::transmute(val); - self._bitfield_1.set(15usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - __invalid: ::std::os::raw::c_ushort, - __denorm: ::std::os::raw::c_ushort, - __zdiv: ::std::os::raw::c_ushort, - __ovrfl: ::std::os::raw::c_ushort, - __undfl: ::std::os::raw::c_ushort, - __precis: ::std::os::raw::c_ushort, - __stkflt: ::std::os::raw::c_ushort, - __errsumm: ::std::os::raw::c_ushort, - __c0: ::std::os::raw::c_ushort, - __c1: ::std::os::raw::c_ushort, - __c2: ::std::os::raw::c_ushort, - __tos: ::std::os::raw::c_ushort, - __c3: ::std::os::raw::c_ushort, - __busy: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let __invalid: u16 = unsafe { ::std::mem::transmute(__invalid) }; - __invalid as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let __denorm: u16 = unsafe { ::std::mem::transmute(__denorm) }; - __denorm as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let __zdiv: u16 = unsafe { ::std::mem::transmute(__zdiv) }; - __zdiv as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let __ovrfl: u16 = unsafe { ::std::mem::transmute(__ovrfl) }; - __ovrfl as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let __undfl: u16 = unsafe { ::std::mem::transmute(__undfl) }; - __undfl as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let __precis: u16 = unsafe { ::std::mem::transmute(__precis) }; - __precis as u64 - }); - __bindgen_bitfield_unit.set(6usize, 1u8, { - let __stkflt: u16 = unsafe { ::std::mem::transmute(__stkflt) }; - __stkflt as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let __errsumm: u16 = unsafe { ::std::mem::transmute(__errsumm) }; - __errsumm as u64 - }); - __bindgen_bitfield_unit.set(8usize, 1u8, { - let __c0: u16 = unsafe { ::std::mem::transmute(__c0) }; - __c0 as u64 - }); - __bindgen_bitfield_unit.set(9usize, 1u8, { - let __c1: u16 = unsafe { ::std::mem::transmute(__c1) }; - __c1 as u64 - }); - __bindgen_bitfield_unit.set(10usize, 1u8, { - let __c2: u16 = unsafe { ::std::mem::transmute(__c2) }; - __c2 as u64 - }); - __bindgen_bitfield_unit.set(11usize, 3u8, { - let __tos: u16 = unsafe { ::std::mem::transmute(__tos) }; - __tos as u64 - }); - __bindgen_bitfield_unit.set(14usize, 1u8, { - let __c3: u16 = unsafe { ::std::mem::transmute(__c3) }; - __c3 as u64 - }); - __bindgen_bitfield_unit.set(15usize, 1u8, { - let __busy: u16 = unsafe { ::std::mem::transmute(__busy) }; - __busy as u64 - }); - __bindgen_bitfield_unit - } -} -pub type __darwin_fp_status_t = __darwin_fp_status; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_mmst_reg { - pub __mmst_reg: [::std::os::raw::c_char; 10usize], - pub __mmst_rsrv: [::std::os::raw::c_char; 6usize], -} -#[test] -fn bindgen_test_layout___darwin_mmst_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_mmst_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mmst_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_mmst_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mmst_reg), - "::", - stringify!(__mmst_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mmst_reg>())).__mmst_rsrv as *const _ as usize }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mmst_reg), - "::", - stringify!(__mmst_rsrv) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_xmm_reg { - pub __xmm_reg: [::std::os::raw::c_char; 16usize], -} -#[test] -fn bindgen_test_layout___darwin_xmm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_xmm_reg>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_xmm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_xmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_xmm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_xmm_reg>())).__xmm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_xmm_reg), - "::", - stringify!(__xmm_reg) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_ymm_reg { - pub __ymm_reg: [::std::os::raw::c_char; 32usize], -} -#[test] -fn bindgen_test_layout___darwin_ymm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_ymm_reg>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_ymm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ymm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_ymm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ymm_reg>())).__ymm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ymm_reg), - "::", - stringify!(__ymm_reg) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_zmm_reg { - pub __zmm_reg: [::std::os::raw::c_char; 64usize], -} -#[test] -fn bindgen_test_layout___darwin_zmm_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_zmm_reg>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_zmm_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_zmm_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_zmm_reg)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_zmm_reg>())).__zmm_reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_zmm_reg), - "::", - stringify!(__zmm_reg) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_opmask_reg { - pub __opmask_reg: [::std::os::raw::c_char; 8usize], -} -#[test] -fn bindgen_test_layout___darwin_opmask_reg() { - assert_eq!( - ::std::mem::size_of::<__darwin_opmask_reg>(), - 8usize, - concat!("Size of: ", stringify!(__darwin_opmask_reg)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_opmask_reg>(), - 1usize, - concat!("Alignment of ", stringify!(__darwin_opmask_reg)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_opmask_reg>())).__opmask_reg as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_opmask_reg), - "::", - stringify!(__opmask_reg) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_i386_float_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_i386_float_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_float_state>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_i386_float_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_float_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_float_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_float_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_float_state), - "::", - stringify!(__fpu_reserved1) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_i386_avx_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_i386_avx_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx_state>(), - 716usize, - concat!("Size of: ", stringify!(__darwin_i386_avx_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_mxcsrmask as *const _ as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_reserved1 as *const _ as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__avx_reserved1 as *const _ as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_i386_avx512_state { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 224usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_k0: __darwin_opmask_reg, - pub __fpu_k1: __darwin_opmask_reg, - pub __fpu_k2: __darwin_opmask_reg, - pub __fpu_k3: __darwin_opmask_reg, - pub __fpu_k4: __darwin_opmask_reg, - pub __fpu_k5: __darwin_opmask_reg, - pub __fpu_k6: __darwin_opmask_reg, - pub __fpu_k7: __darwin_opmask_reg, - pub __fpu_zmmh0: __darwin_ymm_reg, - pub __fpu_zmmh1: __darwin_ymm_reg, - pub __fpu_zmmh2: __darwin_ymm_reg, - pub __fpu_zmmh3: __darwin_ymm_reg, - pub __fpu_zmmh4: __darwin_ymm_reg, - pub __fpu_zmmh5: __darwin_ymm_reg, - pub __fpu_zmmh6: __darwin_ymm_reg, - pub __fpu_zmmh7: __darwin_ymm_reg, -} -#[test] -fn bindgen_test_layout___darwin_i386_avx512_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_avx512_state>(), - 1036usize, - concat!("Size of: ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_avx512_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_avx512_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_rsrv4 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k0 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k1 as *const _ as usize - }, - 724usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k2 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k3 as *const _ as usize - }, - 740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k4 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k5 as *const _ as usize - }, - 756usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k6 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_k7 as *const _ as usize - }, - 772usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh0 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh1 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh2 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh3 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh4 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh5 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh6 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_avx512_state>())).__fpu_zmmh7 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_avx512_state), - "::", - stringify!(__fpu_zmmh7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_i386_exception_state { - pub __trapno: __uint16_t, - pub __cpu: __uint16_t, - pub __err: __uint32_t, - pub __faultvaddr: __uint32_t, -} -#[test] -fn bindgen_test_layout___darwin_i386_exception_state() { - assert_eq!( - ::std::mem::size_of::<__darwin_i386_exception_state>(), - 12usize, - concat!("Size of: ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_i386_exception_state>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_i386_exception_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_i386_exception_state>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_i386_exception_state), - "::", - stringify!(__faultvaddr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_debug_state32 { - pub __dr0: ::std::os::raw::c_uint, - pub __dr1: ::std::os::raw::c_uint, - pub __dr2: ::std::os::raw::c_uint, - pub __dr3: ::std::os::raw::c_uint, - pub __dr4: ::std::os::raw::c_uint, - pub __dr5: ::std::os::raw::c_uint, - pub __dr6: ::std::os::raw::c_uint, - pub __dr7: ::std::os::raw::c_uint, -} -#[test] -fn bindgen_test_layout___darwin_x86_debug_state32() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state32>(), - 32usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state32)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr1 as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr2 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr3 as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr4 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr5 as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr6 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state32>())).__dr7 as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state32), - "::", - stringify!(__dr7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __x86_pagein_state { - pub __pagein_error: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___x86_pagein_state() { - assert_eq!( - ::std::mem::size_of::<__x86_pagein_state>(), - 4usize, - concat!("Size of: ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - ::std::mem::align_of::<__x86_pagein_state>(), - 4usize, - concat!("Alignment of ", stringify!(__x86_pagein_state)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__x86_pagein_state>())).__pagein_error as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__x86_pagein_state), - "::", - stringify!(__pagein_error) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_thread_state64 { - pub __rax: __uint64_t, - pub __rbx: __uint64_t, - pub __rcx: __uint64_t, - pub __rdx: __uint64_t, - pub __rdi: __uint64_t, - pub __rsi: __uint64_t, - pub __rbp: __uint64_t, - pub __rsp: __uint64_t, - pub __r8: __uint64_t, - pub __r9: __uint64_t, - pub __r10: __uint64_t, - pub __r11: __uint64_t, - pub __r12: __uint64_t, - pub __r13: __uint64_t, - pub __r14: __uint64_t, - pub __r15: __uint64_t, - pub __rip: __uint64_t, - pub __rflags: __uint64_t, - pub __cs: __uint64_t, - pub __fs: __uint64_t, - pub __gs: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_thread_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_state64>(), - 168usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_thread_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rax as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rax) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbx as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rcx as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rcx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdx as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdx) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rdi as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rdi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsi as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsi) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rbp as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rbp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rsp as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rsp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r8 as *const _ as usize - }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r9 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r10 as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r11 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r12 as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r13 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r14 as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__r15 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__r15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rip as *const _ as usize - }, - 128usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__rflags as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__rflags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__cs as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__fs as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__fs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_state64>())).__gs as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_state64), - "::", - stringify!(__gs) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_thread_full_state64 { - pub __ss64: __darwin_x86_thread_state64, - pub __ds: __uint64_t, - pub __es: __uint64_t, - pub __ss: __uint64_t, - pub __gsbase: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_thread_full_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_thread_full_state64>(), - 200usize, - concat!("Size of: ", stringify!(__darwin_x86_thread_full_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_thread_full_state64>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_x86_thread_full_state64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss64 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss64) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ds as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__es as *const _ as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__ss as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_thread_full_state64>())).__gsbase as *const _ - as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_thread_full_state64), - "::", - stringify!(__gsbase) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_x86_float_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_x86_float_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_float_state64>(), - 524usize, - concat!("Size of: ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_float_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_float_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_float_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_float_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_x86_avx_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_ymmh8: __darwin_xmm_reg, - pub __fpu_ymmh9: __darwin_xmm_reg, - pub __fpu_ymmh10: __darwin_xmm_reg, - pub __fpu_ymmh11: __darwin_xmm_reg, - pub __fpu_ymmh12: __darwin_xmm_reg, - pub __fpu_ymmh13: __darwin_xmm_reg, - pub __fpu_ymmh14: __darwin_xmm_reg, - pub __fpu_ymmh15: __darwin_xmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_x86_avx_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx_state64>(), - 844usize, - concat!("Size of: ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh10 as *const _ as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh11 as *const _ as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh12 as *const _ as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh13 as *const _ as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh14 as *const _ as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx_state64>())).__fpu_ymmh15 as *const _ as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_x86_avx512_state64 { - pub __fpu_reserved: [::std::os::raw::c_int; 2usize], - pub __fpu_fcw: __darwin_fp_control, - pub __fpu_fsw: __darwin_fp_status, - pub __fpu_ftw: __uint8_t, - pub __fpu_rsrv1: __uint8_t, - pub __fpu_fop: __uint16_t, - pub __fpu_ip: __uint32_t, - pub __fpu_cs: __uint16_t, - pub __fpu_rsrv2: __uint16_t, - pub __fpu_dp: __uint32_t, - pub __fpu_ds: __uint16_t, - pub __fpu_rsrv3: __uint16_t, - pub __fpu_mxcsr: __uint32_t, - pub __fpu_mxcsrmask: __uint32_t, - pub __fpu_stmm0: __darwin_mmst_reg, - pub __fpu_stmm1: __darwin_mmst_reg, - pub __fpu_stmm2: __darwin_mmst_reg, - pub __fpu_stmm3: __darwin_mmst_reg, - pub __fpu_stmm4: __darwin_mmst_reg, - pub __fpu_stmm5: __darwin_mmst_reg, - pub __fpu_stmm6: __darwin_mmst_reg, - pub __fpu_stmm7: __darwin_mmst_reg, - pub __fpu_xmm0: __darwin_xmm_reg, - pub __fpu_xmm1: __darwin_xmm_reg, - pub __fpu_xmm2: __darwin_xmm_reg, - pub __fpu_xmm3: __darwin_xmm_reg, - pub __fpu_xmm4: __darwin_xmm_reg, - pub __fpu_xmm5: __darwin_xmm_reg, - pub __fpu_xmm6: __darwin_xmm_reg, - pub __fpu_xmm7: __darwin_xmm_reg, - pub __fpu_xmm8: __darwin_xmm_reg, - pub __fpu_xmm9: __darwin_xmm_reg, - pub __fpu_xmm10: __darwin_xmm_reg, - pub __fpu_xmm11: __darwin_xmm_reg, - pub __fpu_xmm12: __darwin_xmm_reg, - pub __fpu_xmm13: __darwin_xmm_reg, - pub __fpu_xmm14: __darwin_xmm_reg, - pub __fpu_xmm15: __darwin_xmm_reg, - pub __fpu_rsrv4: [::std::os::raw::c_char; 96usize], - pub __fpu_reserved1: ::std::os::raw::c_int, - pub __avx_reserved1: [::std::os::raw::c_char; 64usize], - pub __fpu_ymmh0: __darwin_xmm_reg, - pub __fpu_ymmh1: __darwin_xmm_reg, - pub __fpu_ymmh2: __darwin_xmm_reg, - pub __fpu_ymmh3: __darwin_xmm_reg, - pub __fpu_ymmh4: __darwin_xmm_reg, - pub __fpu_ymmh5: __darwin_xmm_reg, - pub __fpu_ymmh6: __darwin_xmm_reg, - pub __fpu_ymmh7: __darwin_xmm_reg, - pub __fpu_ymmh8: __darwin_xmm_reg, - pub __fpu_ymmh9: __darwin_xmm_reg, - pub __fpu_ymmh10: __darwin_xmm_reg, - pub __fpu_ymmh11: __darwin_xmm_reg, - pub __fpu_ymmh12: __darwin_xmm_reg, - pub __fpu_ymmh13: __darwin_xmm_reg, - pub __fpu_ymmh14: __darwin_xmm_reg, - pub __fpu_ymmh15: __darwin_xmm_reg, - pub __fpu_k0: __darwin_opmask_reg, - pub __fpu_k1: __darwin_opmask_reg, - pub __fpu_k2: __darwin_opmask_reg, - pub __fpu_k3: __darwin_opmask_reg, - pub __fpu_k4: __darwin_opmask_reg, - pub __fpu_k5: __darwin_opmask_reg, - pub __fpu_k6: __darwin_opmask_reg, - pub __fpu_k7: __darwin_opmask_reg, - pub __fpu_zmmh0: __darwin_ymm_reg, - pub __fpu_zmmh1: __darwin_ymm_reg, - pub __fpu_zmmh2: __darwin_ymm_reg, - pub __fpu_zmmh3: __darwin_ymm_reg, - pub __fpu_zmmh4: __darwin_ymm_reg, - pub __fpu_zmmh5: __darwin_ymm_reg, - pub __fpu_zmmh6: __darwin_ymm_reg, - pub __fpu_zmmh7: __darwin_ymm_reg, - pub __fpu_zmmh8: __darwin_ymm_reg, - pub __fpu_zmmh9: __darwin_ymm_reg, - pub __fpu_zmmh10: __darwin_ymm_reg, - pub __fpu_zmmh11: __darwin_ymm_reg, - pub __fpu_zmmh12: __darwin_ymm_reg, - pub __fpu_zmmh13: __darwin_ymm_reg, - pub __fpu_zmmh14: __darwin_ymm_reg, - pub __fpu_zmmh15: __darwin_ymm_reg, - pub __fpu_zmm16: __darwin_zmm_reg, - pub __fpu_zmm17: __darwin_zmm_reg, - pub __fpu_zmm18: __darwin_zmm_reg, - pub __fpu_zmm19: __darwin_zmm_reg, - pub __fpu_zmm20: __darwin_zmm_reg, - pub __fpu_zmm21: __darwin_zmm_reg, - pub __fpu_zmm22: __darwin_zmm_reg, - pub __fpu_zmm23: __darwin_zmm_reg, - pub __fpu_zmm24: __darwin_zmm_reg, - pub __fpu_zmm25: __darwin_zmm_reg, - pub __fpu_zmm26: __darwin_zmm_reg, - pub __fpu_zmm27: __darwin_zmm_reg, - pub __fpu_zmm28: __darwin_zmm_reg, - pub __fpu_zmm29: __darwin_zmm_reg, - pub __fpu_zmm30: __darwin_zmm_reg, - pub __fpu_zmm31: __darwin_zmm_reg, -} -#[test] -fn bindgen_test_layout___darwin_x86_avx512_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_avx512_state64>(), - 2444usize, - concat!("Size of: ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_avx512_state64>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_x86_avx512_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fcw as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fcw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fsw as *const _ as usize - }, - 10usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fsw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ftw as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ftw) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv1 as *const _ as usize - }, - 13usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_fop as *const _ as usize - }, - 14usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_fop) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ip as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ip) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_cs as *const _ as usize - }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_cs) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv2 as *const _ as usize - }, - 22usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_dp as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_dp) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ds as *const _ as usize - }, - 28usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ds) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv3 as *const _ as usize - }, - 30usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsr as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsr) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_mxcsrmask as *const _ - as usize - }, - 36usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_mxcsrmask) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm0 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm1 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm2 as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm3 as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm4 as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm5 as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm6 as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_stmm7 as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_stmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm0 as *const _ as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm1 as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm2 as *const _ as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm3 as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm4 as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm5 as *const _ as usize - }, - 248usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm6 as *const _ as usize - }, - 264usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm7 as *const _ as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm8 as *const _ as usize - }, - 296usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm9 as *const _ as usize - }, - 312usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm10 as *const _ as usize - }, - 328usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm11 as *const _ as usize - }, - 344usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm12 as *const _ as usize - }, - 360usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm13 as *const _ as usize - }, - 376usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm14 as *const _ as usize - }, - 392usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_xmm15 as *const _ as usize - }, - 408usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_xmm15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_rsrv4 as *const _ as usize - }, - 424usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_rsrv4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_reserved1 as *const _ - as usize - }, - 520usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__avx_reserved1 as *const _ - as usize - }, - 524usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__avx_reserved1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh0 as *const _ as usize - }, - 588usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh1 as *const _ as usize - }, - 604usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh2 as *const _ as usize - }, - 620usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh3 as *const _ as usize - }, - 636usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh4 as *const _ as usize - }, - 652usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh5 as *const _ as usize - }, - 668usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh6 as *const _ as usize - }, - 684usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh7 as *const _ as usize - }, - 700usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh8 as *const _ as usize - }, - 716usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh9 as *const _ as usize - }, - 732usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh10 as *const _ - as usize - }, - 748usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh11 as *const _ - as usize - }, - 764usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh12 as *const _ - as usize - }, - 780usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh13 as *const _ - as usize - }, - 796usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh14 as *const _ - as usize - }, - 812usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_ymmh15 as *const _ - as usize - }, - 828usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_ymmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k0 as *const _ as usize - }, - 844usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k1 as *const _ as usize - }, - 852usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k2 as *const _ as usize - }, - 860usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k3 as *const _ as usize - }, - 868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k4 as *const _ as usize - }, - 876usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k5 as *const _ as usize - }, - 884usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k6 as *const _ as usize - }, - 892usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_k7 as *const _ as usize - }, - 900usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_k7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh0 as *const _ as usize - }, - 908usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh1 as *const _ as usize - }, - 940usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh2 as *const _ as usize - }, - 972usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh3 as *const _ as usize - }, - 1004usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh4 as *const _ as usize - }, - 1036usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh5 as *const _ as usize - }, - 1068usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh6 as *const _ as usize - }, - 1100usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh7 as *const _ as usize - }, - 1132usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh7) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh8 as *const _ as usize - }, - 1164usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh8) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh9 as *const _ as usize - }, - 1196usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh9) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh10 as *const _ - as usize - }, - 1228usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh10) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh11 as *const _ - as usize - }, - 1260usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh11) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh12 as *const _ - as usize - }, - 1292usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh12) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh13 as *const _ - as usize - }, - 1324usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh13) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh14 as *const _ - as usize - }, - 1356usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh14) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmmh15 as *const _ - as usize - }, - 1388usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmmh15) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm16 as *const _ as usize - }, - 1420usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm16) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm17 as *const _ as usize - }, - 1484usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm17) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm18 as *const _ as usize - }, - 1548usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm18) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm19 as *const _ as usize - }, - 1612usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm19) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm20 as *const _ as usize - }, - 1676usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm20) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm21 as *const _ as usize - }, - 1740usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm21) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm22 as *const _ as usize - }, - 1804usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm22) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm23 as *const _ as usize - }, - 1868usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm23) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm24 as *const _ as usize - }, - 1932usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm24) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm25 as *const _ as usize - }, - 1996usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm25) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm26 as *const _ as usize - }, - 2060usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm26) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm27 as *const _ as usize - }, - 2124usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm27) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm28 as *const _ as usize - }, - 2188usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm28) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm29 as *const _ as usize - }, - 2252usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm29) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm30 as *const _ as usize - }, - 2316usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm30) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_avx512_state64>())).__fpu_zmm31 as *const _ as usize - }, - 2380usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_avx512_state64), - "::", - stringify!(__fpu_zmm31) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_exception_state64 { - pub __trapno: __uint16_t, - pub __cpu: __uint16_t, - pub __err: __uint32_t, - pub __faultvaddr: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_exception_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_exception_state64>(), - 16usize, - concat!("Size of: ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_exception_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_exception_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__trapno as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__trapno) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__cpu as *const _ as usize - }, - 2usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__cpu) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__err as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__err) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_exception_state64>())).__faultvaddr as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_exception_state64), - "::", - stringify!(__faultvaddr) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_debug_state64 { - pub __dr0: __uint64_t, - pub __dr1: __uint64_t, - pub __dr2: __uint64_t, - pub __dr3: __uint64_t, - pub __dr4: __uint64_t, - pub __dr5: __uint64_t, - pub __dr6: __uint64_t, - pub __dr7: __uint64_t, -} -#[test] -fn bindgen_test_layout___darwin_x86_debug_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_debug_state64>(), - 64usize, - concat!("Size of: ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_debug_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_debug_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr0 as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr0) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr1 as *const _ as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr2 as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr2) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr3 as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr3) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr4 as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr4) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr5 as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr5) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr6 as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr6) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_debug_state64>())).__dr7 as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_debug_state64), - "::", - stringify!(__dr7) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_x86_cpmu_state64 { - pub __ctrs: [__uint64_t; 16usize], -} -#[test] -fn bindgen_test_layout___darwin_x86_cpmu_state64() { - assert_eq!( - ::std::mem::size_of::<__darwin_x86_cpmu_state64>(), - 128usize, - concat!("Size of: ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_x86_cpmu_state64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_x86_cpmu_state64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_x86_cpmu_state64>())).__ctrs as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_x86_cpmu_state64), - "::", - stringify!(__ctrs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_float_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext32>(), - 600usize, - concat!("Size of: ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_avx_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx32>(), - 792usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx32)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__ss as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx32>())).__fs as *const _ as usize }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx512_32 { - pub __es: __darwin_i386_exception_state, - pub __ss: __darwin_i386_thread_state, - pub __fs: __darwin_i386_avx512_state, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_32() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_32>(), - 1112usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_32>(), - 4usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_32)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__ss as *const _ as usize - }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_32>())).__fs as *const _ as usize - }, - 76usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_32), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_float_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64>(), - 712usize, - concat!("Size of: ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_float_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext64_full>(), - 744usize, - concat!("Size of: ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext64_full)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext64_full>())).__fs as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext64_full), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_avx_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64>(), - 1032usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__es as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__ss as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_mcontext_avx64>())).__fs as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_avx_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx64_full>(), - 1064usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx64_full>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx64_full)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx64_full), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx512_64 { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_state64, - pub __fs: __darwin_x86_avx512_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64>(), - 2632usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_mcontext_avx512_64)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64>())).__fs as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64), - "::", - stringify!(__fs) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __darwin_mcontext_avx512_64_full { - pub __es: __darwin_x86_exception_state64, - pub __ss: __darwin_x86_thread_full_state64, - pub __fs: __darwin_x86_avx512_state64, -} -#[test] -fn bindgen_test_layout___darwin_mcontext_avx512_64_full() { - assert_eq!( - ::std::mem::size_of::<__darwin_mcontext_avx512_64_full>(), - 2664usize, - concat!("Size of: ", stringify!(__darwin_mcontext_avx512_64_full)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_mcontext_avx512_64_full>(), - 8usize, - concat!( - "Alignment of ", - stringify!(__darwin_mcontext_avx512_64_full) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__es as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__es) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__ss as *const _ as usize - }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__ss) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<__darwin_mcontext_avx512_64_full>())).__fs as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(__darwin_mcontext_avx512_64_full), - "::", - stringify!(__fs) - ) - ); -} -pub type mcontext_t = *mut __darwin_mcontext64; -pub type pthread_attr_t = __darwin_pthread_attr_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_sigaltstack { - pub ss_sp: *mut ::std::os::raw::c_void, - pub ss_size: __darwin_size_t, - pub ss_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___darwin_sigaltstack() { - assert_eq!( - ::std::mem::size_of::<__darwin_sigaltstack>(), - 24usize, - concat!("Size of: ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_sigaltstack>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_sigaltstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_sigaltstack>())).ss_flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__darwin_sigaltstack), - "::", - stringify!(ss_flags) - ) - ); -} -pub type stack_t = __darwin_sigaltstack; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __darwin_ucontext { - pub uc_onstack: ::std::os::raw::c_int, - pub uc_sigmask: __darwin_sigset_t, - pub uc_stack: __darwin_sigaltstack, - pub uc_link: *mut __darwin_ucontext, - pub uc_mcsize: __darwin_size_t, - pub uc_mcontext: *mut __darwin_mcontext64, -} -#[test] -fn bindgen_test_layout___darwin_ucontext() { - assert_eq!( - ::std::mem::size_of::<__darwin_ucontext>(), - 56usize, - concat!("Size of: ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - ::std::mem::align_of::<__darwin_ucontext>(), - 8usize, - concat!("Alignment of ", stringify!(__darwin_ucontext)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_onstack as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_onstack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_sigmask as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_sigmask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_stack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_stack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_link as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcsize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__darwin_ucontext>())).uc_mcontext as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__darwin_ucontext), - "::", - stringify!(uc_mcontext) - ) - ); -} -pub type ucontext_t = __darwin_ucontext; -pub type sigset_t = __darwin_sigset_t; -pub type uid_t = __darwin_uid_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigval { - pub sival_int: ::std::os::raw::c_int, - pub sival_ptr: *mut ::std::os::raw::c_void, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_sigval() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(sigval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_int as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_int) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sival_ptr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigval), - "::", - stringify!(sival_ptr) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigevent { - pub sigev_notify: ::std::os::raw::c_int, - pub sigev_signo: ::std::os::raw::c_int, - pub sigev_value: sigval, - pub sigev_notify_function: ::std::option::Option, - pub sigev_notify_attributes: *mut pthread_attr_t, -} -#[test] -fn bindgen_test_layout_sigevent() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(sigevent)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigevent)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_signo as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_value as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sigev_notify_function as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_function) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).sigev_notify_attributes as *const _ as usize - }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sigevent), - "::", - stringify!(sigev_notify_attributes) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __siginfo { - pub si_signo: ::std::os::raw::c_int, - pub si_errno: ::std::os::raw::c_int, - pub si_code: ::std::os::raw::c_int, - pub si_pid: pid_t, - pub si_uid: uid_t, - pub si_status: ::std::os::raw::c_int, - pub si_addr: *mut ::std::os::raw::c_void, - pub si_value: sigval, - pub si_band: ::std::os::raw::c_long, - pub __pad: [::std::os::raw::c_ulong; 7usize], -} -#[test] -fn bindgen_test_layout___siginfo() { - assert_eq!( - ::std::mem::size_of::<__siginfo>(), - 104usize, - concat!("Size of: ", stringify!(__siginfo)) - ); - assert_eq!( - ::std::mem::align_of::<__siginfo>(), - 8usize, - concat!("Alignment of ", stringify!(__siginfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_signo as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_signo) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_errno as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_errno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_code as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_code) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_pid as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_pid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_uid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_uid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_status as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_addr as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_addr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_value as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).si_band as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(si_band) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__siginfo>())).__pad as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__siginfo), - "::", - stringify!(__pad) - ) - ); -} -pub type siginfo_t = __siginfo; -#[repr(C)] -#[derive(Copy, Clone)] -pub union __sigaction_u { - pub __sa_handler: ::std::option::Option, - pub __sa_sigaction: ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: *mut __siginfo, - arg3: *mut ::std::os::raw::c_void, - ), - >, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout___sigaction_u() { - assert_eq!( - ::std::mem::size_of::<__sigaction_u>(), - 8usize, - concat!("Size of: ", stringify!(__sigaction_u)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction_u>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction_u)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction_u>())).__sa_sigaction as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction_u), - "::", - stringify!(__sa_sigaction) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_tramp: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut siginfo_t, - arg5: *mut ::std::os::raw::c_void, - ), - >, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sigaction() { - assert_eq!( - ::std::mem::size_of::<__sigaction>(), - 24usize, - concat!("Size of: ", stringify!(__sigaction)) - ); - assert_eq!( - ::std::mem::align_of::<__sigaction>(), - 8usize, - concat!("Alignment of ", stringify!(__sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_tramp as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_tramp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_mask as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sigaction>())).sa_flags as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(__sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigaction { - pub __sigaction_u: __sigaction_u, - pub sa_mask: sigset_t, - pub sa_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigaction() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigaction)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigaction)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).__sigaction_u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(__sigaction_u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sa_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigaction), - "::", - stringify!(sa_flags) - ) - ); -} -pub type sig_t = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigvec { - pub sv_handler: ::std::option::Option, - pub sv_mask: ::std::os::raw::c_int, - pub sv_flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigvec() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigvec)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigvec)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_handler as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_handler) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_mask as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sv_flags as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(sigvec), - "::", - stringify!(sv_flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigstack { - pub ss_sp: *mut ::std::os::raw::c_char, - pub ss_onstack: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_sigstack() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(sigstack)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sigstack)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_sp as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ss_onstack as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sigstack), - "::", - stringify!(ss_onstack) - ) - ); -} -extern "C" { - pub fn signal( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ) -> ::std::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: ::std::option::Option, - ), - >; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __darwin_time_t, - pub tv_usec: __darwin_suseconds_t, -} -#[test] -fn bindgen_test_layout_timeval() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(timeval)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(timeval)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_sec as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_sec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tv_usec as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(timeval), - "::", - stringify!(tv_usec) - ) - ); -} -pub type rlim_t = __uint64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub ru_maxrss: ::std::os::raw::c_long, - pub ru_ixrss: ::std::os::raw::c_long, - pub ru_idrss: ::std::os::raw::c_long, - pub ru_isrss: ::std::os::raw::c_long, - pub ru_minflt: ::std::os::raw::c_long, - pub ru_majflt: ::std::os::raw::c_long, - pub ru_nswap: ::std::os::raw::c_long, - pub ru_inblock: ::std::os::raw::c_long, - pub ru_oublock: ::std::os::raw::c_long, - pub ru_msgsnd: ::std::os::raw::c_long, - pub ru_msgrcv: ::std::os::raw::c_long, - pub ru_nsignals: ::std::os::raw::c_long, - pub ru_nvcsw: ::std::os::raw::c_long, - pub ru_nivcsw: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_rusage() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_utime as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_utime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_stime as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_stime) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_maxrss as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_maxrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_ixrss as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_ixrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_idrss as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_idrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_isrss as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_isrss) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_minflt as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_minflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_majflt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_majflt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nswap as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nswap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_inblock as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_inblock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_oublock as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_oublock) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgsnd as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgsnd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_msgrcv as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_msgrcv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nsignals as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nsignals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nvcsw as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nvcsw) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ru_nivcsw as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage), - "::", - stringify!(ru_nivcsw) - ) - ); -} -pub type rusage_info_t = *mut ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v0 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v0() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(rusage_info_v0)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v0)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v0), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v1 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v1() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(rusage_info_v1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v1), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v2 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v2() { - assert_eq!( - ::std::mem::size_of::(), - 160usize, - concat!("Size of: ", stringify!(rusage_info_v2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v2), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v3 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v3() { - assert_eq!( - ::std::mem::size_of::(), - 232usize, - concat!("Size of: ", stringify!(rusage_info_v3)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v3)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v3), - "::", - stringify!(ri_serviced_system_time) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rusage_info_v4 { - pub ri_uuid: [u8; 16usize], - pub ri_user_time: u64, - pub ri_system_time: u64, - pub ri_pkg_idle_wkups: u64, - pub ri_interrupt_wkups: u64, - pub ri_pageins: u64, - pub ri_wired_size: u64, - pub ri_resident_size: u64, - pub ri_phys_footprint: u64, - pub ri_proc_start_abstime: u64, - pub ri_proc_exit_abstime: u64, - pub ri_child_user_time: u64, - pub ri_child_system_time: u64, - pub ri_child_pkg_idle_wkups: u64, - pub ri_child_interrupt_wkups: u64, - pub ri_child_pageins: u64, - pub ri_child_elapsed_abstime: u64, - pub ri_diskio_bytesread: u64, - pub ri_diskio_byteswritten: u64, - pub ri_cpu_time_qos_default: u64, - pub ri_cpu_time_qos_maintenance: u64, - pub ri_cpu_time_qos_background: u64, - pub ri_cpu_time_qos_utility: u64, - pub ri_cpu_time_qos_legacy: u64, - pub ri_cpu_time_qos_user_initiated: u64, - pub ri_cpu_time_qos_user_interactive: u64, - pub ri_billed_system_time: u64, - pub ri_serviced_system_time: u64, - pub ri_logical_writes: u64, - pub ri_lifetime_max_phys_footprint: u64, - pub ri_instructions: u64, - pub ri_cycles: u64, - pub ri_billed_energy: u64, - pub ri_serviced_energy: u64, - pub ri_interval_max_phys_footprint: u64, - pub ri_runnable_time: u64, -} -#[test] -fn bindgen_test_layout_rusage_info_v4() { - assert_eq!( - ::std::mem::size_of::(), - 296usize, - concat!("Size of: ", stringify!(rusage_info_v4)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rusage_info_v4)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_uuid as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_uuid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_user_time as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_user_time) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_system_time as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_pkg_idle_wkups as *const _ as usize - }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interrupt_wkups as *const _ as usize - }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_pageins as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_pageins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_wired_size as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_wired_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_resident_size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_resident_size) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_phys_footprint as *const _ as usize - }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_phys_footprint) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_start_abstime as *const _ as usize - }, - 80usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_start_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_proc_exit_abstime as *const _ as usize - }, - 88usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_proc_exit_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_user_time as *const _ as usize - }, - 96usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_user_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_system_time as *const _ as usize - }, - 104usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_pkg_idle_wkups as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pkg_idle_wkups) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_interrupt_wkups as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_interrupt_wkups) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_child_pageins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_pageins) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_child_elapsed_abstime as *const _ as usize - }, - 136usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_child_elapsed_abstime) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_bytesread as *const _ as usize - }, - 144usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_bytesread) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_diskio_byteswritten as *const _ as usize - }, - 152usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_diskio_byteswritten) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_default as *const _ as usize - }, - 160usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_default) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_maintenance as *const _ - as usize - }, - 168usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_maintenance) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_background as *const _ - as usize - }, - 176usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_background) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_utility as *const _ as usize - }, - 184usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_utility) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_legacy as *const _ as usize - }, - 192usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_legacy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_initiated as *const _ - as usize - }, - 200usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_initiated) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_cpu_time_qos_user_interactive as *const _ - as usize - }, - 208usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cpu_time_qos_user_interactive) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_billed_system_time as *const _ as usize - }, - 216usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_system_time as *const _ as usize - }, - 224usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_system_time) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_logical_writes as *const _ as usize - }, - 232usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_logical_writes) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_lifetime_max_phys_footprint as *const _ - as usize - }, - 240usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_lifetime_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_instructions as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_instructions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_cycles as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_cycles) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_billed_energy as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_billed_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_serviced_energy as *const _ as usize - }, - 272usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_serviced_energy) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).ri_interval_max_phys_footprint as *const _ - as usize - }, - 280usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_interval_max_phys_footprint) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ri_runnable_time as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(rusage_info_v4), - "::", - stringify!(ri_runnable_time) - ) - ); -} -pub type rusage_info_current = rusage_info_v4; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, -} -#[test] -fn bindgen_test_layout_rlimit() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(rlimit)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rlimit)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_cur as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_cur) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlim_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(rlimit), - "::", - stringify!(rlim_max) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct proc_rlimit_control_wakeupmon { - pub wm_flags: u32, - pub wm_rate: i32, -} -#[test] -fn bindgen_test_layout_proc_rlimit_control_wakeupmon() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(proc_rlimit_control_wakeupmon)) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_flags as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_flags) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).wm_rate as *const _ as usize - }, - 4usize, - concat!( - "Offset of field: ", - stringify!(proc_rlimit_control_wakeupmon), - "::", - stringify!(wm_rate) - ) - ); -} -extern "C" { - pub fn getpriority(arg1: ::std::os::raw::c_int, arg2: id_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrlimit(arg1: ::std::os::raw::c_int, arg2: *mut rlimit) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrusage(arg1: ::std::os::raw::c_int, arg2: *mut rusage) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setpriority( - arg1: ::std::os::raw::c_int, - arg2: id_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setiopolicy_np( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setrlimit(arg1: ::std::os::raw::c_int, arg2: *const rlimit) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub w_T: wait__bindgen_ty_1, - pub w_S: wait__bindgen_ty_2, - _bindgen_union_align: u32, -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_1)) - ); -} -impl wait__bindgen_ty_1 { - #[inline] - pub fn w_Termsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_w_Termsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn w_Coredump(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_w_Coredump(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn w_Retcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Retcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Termsig: ::std::os::raw::c_uint, - w_Coredump: ::std::os::raw::c_uint, - w_Retcode: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let w_Termsig: u32 = unsafe { ::std::mem::transmute(w_Termsig) }; - w_Termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let w_Coredump: u32 = unsafe { ::std::mem::transmute(w_Coredump) }; - w_Coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Retcode: u32 = unsafe { ::std::mem::transmute(w_Retcode) }; - w_Retcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, -} -#[test] -fn bindgen_test_layout_wait__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait__bindgen_ty_2)) - ); -} -impl wait__bindgen_ty_2 { - #[inline] - pub fn w_Stopval(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopval(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Stopsig(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) } - } - #[inline] - pub fn set_w_Stopsig(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Filler(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_w_Filler(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Stopval: ::std::os::raw::c_uint, - w_Stopsig: ::std::os::raw::c_uint, - w_Filler: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let w_Stopval: u32 = unsafe { ::std::mem::transmute(w_Stopval) }; - w_Stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Stopsig: u32 = unsafe { ::std::mem::transmute(w_Stopsig) }; - w_Stopsig as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Filler: u32 = unsafe { ::std::mem::transmute(w_Filler) }; - w_Filler as u64 - }); - __bindgen_bitfield_unit - } -} -#[test] -fn bindgen_test_layout_wait() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(wait)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(wait)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_status as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(wait), - "::", - stringify!(w_status) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_T as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_T)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w_S as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(wait), "::", stringify!(w_S)) - ); -} -extern "C" { - pub fn wait(arg1: *mut ::std::os::raw::c_int) -> pid_t; -} -extern "C" { - pub fn waitpid( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> pid_t; -} -extern "C" { - pub fn waitid( - arg1: idtype_t, - arg2: id_t, - arg3: *mut siginfo_t, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait3( - arg1: *mut ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn wait4( - arg1: pid_t, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut rusage, - ) -> pid_t; -} -extern "C" { - pub fn alloca(arg1: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -pub type ct_rune_t = __darwin_ct_rune_t; -pub type rune_t = __darwin_rune_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_div_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(div_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(div_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(div_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[test] -fn bindgen_test_layout_ldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(ldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(ldiv_t), - "::", - stringify!(rem) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, -} -#[test] -fn bindgen_test_layout_lldiv_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lldiv_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lldiv_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quot as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(quot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rem as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lldiv_t), - "::", - stringify!(rem) - ) - ); -} -extern "C" { - pub static mut __mb_cur_max: ::std::os::raw::c_int; -} -extern "C" { - pub fn malloc(__size: ::std::os::raw::c_ulong) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn calloc( - __count: ::std::os::raw::c_ulong, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn free(arg1: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn valloc(arg1: size_t) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: size_t, - __size: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn abort(); -} -extern "C" { - pub fn abs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atexit(arg1: ::std::option::Option) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atof(arg1: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn atoi(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atol(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn atoll(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn div(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn getenv(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn labs(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn ldiv(arg1: ::std::os::raw::c_long, arg2: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn llabs(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn lldiv(arg1: ::std::os::raw::c_longlong, arg2: ::std::os::raw::c_longlong) -> lldiv_t; -} -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: size_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstowcs( - arg1: *mut wchar_t, - arg2: *const ::std::os::raw::c_char, - arg3: size_t, - ) -> size_t; -} -extern "C" { - pub fn mbtowc( - arg1: *mut wchar_t, - arg2: *const ::std::os::raw::c_char, - arg3: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn rand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand(arg1: ::std::os::raw::c_uint); -} -extern "C" { - pub fn strtod( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtof( - arg1: *const ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> f32; -} -extern "C" { - pub fn strtol( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn strtoll( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoul( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtoull( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn system(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcstombs( - arg1: *mut ::std::os::raw::c_char, - arg2: *const wchar_t, - arg3: size_t, - ) -> size_t; -} -extern "C" { - pub fn wctomb(arg1: *mut ::std::os::raw::c_char, arg2: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _Exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn a64l(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn drand48() -> f64; -} -extern "C" { - pub fn ecvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn erand48(arg1: *mut ::std::os::raw::c_ushort) -> f64; -} -extern "C" { - pub fn fcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gcvt( - arg1: f64, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getsubopt( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const *mut ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn grantpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initstate( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_char, - arg3: size_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn jrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn l64a(arg1: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn lcong48(arg1: *mut ::std::os::raw::c_ushort); -} -extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn mktemp(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mkstemp(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn nrand48(arg1: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn posix_openpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ptsname(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ptsname_r( - fildes: ::std::os::raw::c_int, - buffer: *mut ::std::os::raw::c_char, - buflen: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putenv(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn random() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn rand_r(arg1: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}_realpath$DARWIN_EXTSN"] - pub fn realpath( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn seed48(arg1: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; -} -extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __overwrite: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setkey(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn setstate(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn srand48(arg1: ::std::os::raw::c_long); -} -extern "C" { - pub fn srandom(arg1: ::std::os::raw::c_uint); -} -extern "C" { - pub fn unlockpt(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unsetenv(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -pub type dev_t = __darwin_dev_t; -pub type mode_t = __darwin_mode_t; -extern "C" { - pub fn arc4random() -> u32; -} -extern "C" { - pub fn arc4random_addrandom(arg1: *mut ::std::os::raw::c_uchar, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn arc4random_buf(__buf: *mut ::std::os::raw::c_void, __nbytes: size_t); -} -extern "C" { - pub fn arc4random_stir(); -} -extern "C" { - pub fn arc4random_uniform(__upper_bound: u32) -> u32; -} -extern "C" { - pub fn atexit_b(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bsearch_b( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn cgetcap( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn cgetclose() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetent( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetfirst( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetmatch( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetnext( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetnum( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetset(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetstr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cgetustr( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}_daemon$1050"] - pub fn daemon( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn devname(arg1: dev_t, arg2: mode_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn devname_r( - arg1: dev_t, - arg2: mode_t, - buf: *mut ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getbsize( - arg1: *mut ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_long, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getloadavg(arg1: *mut f64, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getprogname() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn setprogname(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn heapsort( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn heapsort_b( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mergesort( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mergesort_b( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn psort( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn psort_b( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn psort_r( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn qsort_b( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - __compar: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn qsort_r( - __base: *mut ::std::os::raw::c_void, - __nel: size_t, - __width: size_t, - arg1: *mut ::std::os::raw::c_void, - __compar: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn radixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rpmatch(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sradixsort( - __base: *mut *const ::std::os::raw::c_uchar, - __nel: ::std::os::raw::c_int, - __table: *const ::std::os::raw::c_uchar, - __endbyte: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sranddev(); -} -extern "C" { - pub fn srandomdev(); -} -extern "C" { - pub fn reallocf( - __ptr: *mut ::std::os::raw::c_void, - __size: size_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strtoq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtouq( - __str: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub static mut suboptarg: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memcpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memmove( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset( - __b: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __len: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strcat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcoll( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strncat( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strpbrk( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strrchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strspn( - __s: *const ::std::os::raw::c_char, - __charset: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strxfrm( - __s1: *mut ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtok_r( - __str: *mut ::std::os::raw::c_char, - __sep: *const ::std::os::raw::c_char, - __lasts: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __strerrbuf: *mut ::std::os::raw::c_char, - __buflen: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strdup(__s1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memccpy( - __dst: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn stpcpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpncpy( - __dst: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strndup( - __s1: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strnlen(__s1: *const ::std::os::raw::c_char, __n: size_t) -> size_t; -} -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -pub type rsize_t = __darwin_size_t; -pub type errno_t = ::std::os::raw::c_int; -extern "C" { - pub fn memset_s( - __s: *mut ::std::os::raw::c_void, - __smax: rsize_t, - __c: ::std::os::raw::c_int, - __n: rsize_t, - ) -> errno_t; -} -pub type ssize_t = __darwin_ssize_t; -extern "C" { - pub fn memmem( - __big: *const ::std::os::raw::c_void, - __big_len: size_t, - __little: *const ::std::os::raw::c_void, - __little_len: size_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset_pattern4( - __b: *mut ::std::os::raw::c_void, - __pattern4: *const ::std::os::raw::c_void, - __len: size_t, - ); -} -extern "C" { - pub fn memset_pattern8( - __b: *mut ::std::os::raw::c_void, - __pattern8: *const ::std::os::raw::c_void, - __len: size_t, - ); -} -extern "C" { - pub fn memset_pattern16( - __b: *mut ::std::os::raw::c_void, - __pattern16: *const ::std::os::raw::c_void, - __len: size_t, - ); -} -extern "C" { - pub fn strcasestr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strnstr( - __big: *const ::std::os::raw::c_char, - __little: *const ::std::os::raw::c_char, - __len: size_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strlcat( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strlcpy( - __dst: *mut ::std::os::raw::c_char, - __source: *const ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strmode(__mode: ::std::os::raw::c_int, __bp: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn swab( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: ssize_t, - ); -} -extern "C" { - pub fn timingsafe_bcmp( - __b1: *const ::std::os::raw::c_void, - __b2: *const ::std::os::raw::c_void, - __len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcmp( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcopy( - arg1: *const ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_void, - arg3: size_t, - ); -} -extern "C" { - pub fn bzero(arg1: *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_ulong); -} -extern "C" { - pub fn index( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn rindex( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ffs(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_ulong, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fls(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flsl(arg1: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flsll(arg1: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; -} -pub type va_list = __builtin_va_list; -pub type __gnuc_va_list = __builtin_va_list; -extern "C" { - pub fn renameat( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renamex_np( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renameatx_np( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - arg5: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -pub type fpos_t = __darwin_off_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sbuf { - pub _base: *mut ::std::os::raw::c_uchar, - pub _size: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout___sbuf() { - assert_eq!( - ::std::mem::size_of::<__sbuf>(), - 16usize, - concat!("Size of: ", stringify!(__sbuf)) - ); - assert_eq!( - ::std::mem::align_of::<__sbuf>(), - 8usize, - concat!("Alignment of ", stringify!(__sbuf)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sbuf>()))._size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sbuf), - "::", - stringify!(_size) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sFILEX { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sFILE { - pub _p: *mut ::std::os::raw::c_uchar, - pub _r: ::std::os::raw::c_int, - pub _w: ::std::os::raw::c_int, - pub _flags: ::std::os::raw::c_short, - pub _file: ::std::os::raw::c_short, - pub _bf: __sbuf, - pub _lbfsize: ::std::os::raw::c_int, - pub _cookie: *mut ::std::os::raw::c_void, - pub _close: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - pub _read: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub _seek: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: fpos_t, - arg3: ::std::os::raw::c_int, - ) -> fpos_t, - >, - pub _write: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub _ub: __sbuf, - pub _extra: *mut __sFILEX, - pub _ur: ::std::os::raw::c_int, - pub _ubuf: [::std::os::raw::c_uchar; 3usize], - pub _nbuf: [::std::os::raw::c_uchar; 1usize], - pub _lb: __sbuf, - pub _blksize: ::std::os::raw::c_int, - pub _offset: fpos_t, -} -#[test] -fn bindgen_test_layout___sFILE() { - assert_eq!( - ::std::mem::size_of::<__sFILE>(), - 152usize, - concat!("Size of: ", stringify!(__sFILE)) - ); - assert_eq!( - ::std::mem::align_of::<__sFILE>(), - 8usize, - concat!("Alignment of ", stringify!(__sFILE)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._r as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_r) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._w as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._flags as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._file as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._bf as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_bf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lbfsize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lbfsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._cookie as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_cookie) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._close as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_close) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._read as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_read) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._seek as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._write as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_write) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ub as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ub) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._extra as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_extra) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ur as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ur) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._ubuf as *const _ as usize }, - 116usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_ubuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._nbuf as *const _ as usize }, - 119usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_nbuf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._lb as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_lb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._blksize as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_blksize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__sFILE>()))._offset as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(__sFILE), - "::", - stringify!(_offset) - ) - ); -} -pub type FILE = __sFILE; -extern "C" { - pub static mut __stdinp: *mut FILE; -} -extern "C" { - pub static mut __stdoutp: *mut FILE; -} -extern "C" { - pub static mut __stderrp: *mut FILE; -} -extern "C" { - pub fn clearerr(arg1: *mut FILE); -} -extern "C" { - pub fn fclose(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn feof(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgets( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut FILE, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fopen( - __filename: *const ::std::os::raw::c_char, - __mode: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn fprintf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputs(arg1: *const ::std::os::raw::c_char, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fread( - __ptr: *mut ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __nitems: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn freopen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut FILE, - ) -> *mut FILE; -} -extern "C" { - pub fn fscanf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fseek( - arg1: *mut FILE, - arg2: ::std::os::raw::c_long, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftell(arg1: *mut FILE) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn fwrite( - __ptr: *const ::std::os::raw::c_void, - __size: ::std::os::raw::c_ulong, - __nitems: ::std::os::raw::c_ulong, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn getc(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gets(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn perror(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn printf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn puts(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn remove(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rename( - __old: *const ::std::os::raw::c_char, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rewind(arg1: *mut FILE); -} -extern "C" { - pub fn scanf(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuf(arg1: *mut FILE, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn setvbuf( - arg1: *mut FILE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sprintf( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sscanf( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tmpfile() -> *mut FILE; -} -extern "C" { - pub fn tmpnam(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ungetc(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfprintf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vprintf( - arg1: *const ::std::os::raw::c_char, - arg2: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsprintf( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fdopen(arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char) -> *mut FILE; -} -extern "C" { - pub fn fileno(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pclose(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn popen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn __srget(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __svfscanf( - arg1: *mut FILE, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __swbuf(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flockfile(arg1: *mut FILE); -} -extern "C" { - pub fn ftrylockfile(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn funlockfile(arg1: *mut FILE); -} -extern "C" { - pub fn getc_unlocked(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar_unlocked() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc_unlocked(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar_unlocked(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getw(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putw(arg1: ::std::os::raw::c_int, arg2: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tempnam( - __dir: *const ::std::os::raw::c_char, - __prefix: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -pub type off_t = __darwin_off_t; -extern "C" { - pub fn fseeko( - __stream: *mut FILE, - __offset: off_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftello(__stream: *mut FILE) -> off_t; -} -extern "C" { - pub fn snprintf( - __str: *mut ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfscanf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - arg1: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vscanf( - __format: *const ::std::os::raw::c_char, - arg1: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsnprintf( - __str: *mut ::std::os::raw::c_char, - __size: ::std::os::raw::c_ulong, - __format: *const ::std::os::raw::c_char, - arg1: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsscanf( - __str: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - arg1: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dprintf( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vdprintf( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getdelim( - __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut size_t, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> ssize_t; -} -extern "C" { - pub fn getline( - __linep: *mut *mut ::std::os::raw::c_char, - __linecapp: *mut size_t, - __stream: *mut FILE, - ) -> ssize_t; -} -extern "C" { - pub fn fmemopen( - __buf: *mut ::std::os::raw::c_void, - __size: size_t, - __mode: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn open_memstream( - __bufp: *mut *mut ::std::os::raw::c_char, - __sizep: *mut size_t, - ) -> *mut FILE; -} -extern "C" { - pub static sys_nerr: ::std::os::raw::c_int; -} -extern "C" { - pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn asprintf( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid_r(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fgetln(arg1: *mut FILE, arg2: *mut size_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fmtcheck( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn fpurge(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuffer( - arg1: *mut FILE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn setlinebuf(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vasprintf( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn zopen( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut FILE; -} -extern "C" { - pub fn funopen( - arg1: *const ::std::os::raw::c_void, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg3: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - arg4: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: fpos_t, - arg3: ::std::os::raw::c_int, - ) -> fpos_t, - >, - arg5: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, - ) -> *mut FILE; -} -extern "C" { - pub fn __sprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: size_t, - arg4: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __snprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: size_t, - arg3: ::std::os::raw::c_int, - arg4: size_t, - arg5: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __vsprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: size_t, - arg4: *const ::std::os::raw::c_char, - arg5: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __vsnprintf_chk( - arg1: *mut ::std::os::raw::c_char, - arg2: size_t, - arg3: ::std::os::raw::c_int, - arg4: size_t, - arg5: *const ::std::os::raw::c_char, - arg6: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __error() -> *mut ::std::os::raw::c_int; -} -pub type u_char = ::std::os::raw::c_uchar; -pub type u_short = ::std::os::raw::c_ushort; -pub type u_int = ::std::os::raw::c_uint; -pub type u_long = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_quad_t = u_int64_t; -pub type quad_t = i64; -pub type qaddr_t = *mut quad_t; -pub type caddr_t = *mut ::std::os::raw::c_char; -pub type daddr_t = i32; -pub type fixpt_t = u_int32_t; -pub type blkcnt_t = __darwin_blkcnt_t; -pub type blksize_t = __darwin_blksize_t; -pub type gid_t = __darwin_gid_t; -pub type in_addr_t = __uint32_t; -pub type in_port_t = __uint16_t; -pub type ino_t = __darwin_ino_t; -pub type ino64_t = __darwin_ino64_t; -pub type key_t = __int32_t; -pub type nlink_t = __uint16_t; -pub type segsz_t = i32; -pub type swblk_t = i32; -pub type clock_t = __darwin_clock_t; -pub type time_t = __darwin_time_t; -pub type useconds_t = __darwin_useconds_t; -pub type suseconds_t = __darwin_suseconds_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub fds_bits: [__int32_t; 32usize], -} -#[test] -fn bindgen_test_layout_fd_set() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(fd_set)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(fd_set)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fds_bits as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(fd_set), - "::", - stringify!(fds_bits) - ) - ); -} -extern "C" { - pub fn __darwin_check_fd_set_overflow( - arg1: ::std::os::raw::c_int, - arg2: *const ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub type fd_mask = __int32_t; -pub type pthread_cond_t = __darwin_pthread_cond_t; -pub type pthread_condattr_t = __darwin_pthread_condattr_t; -pub type pthread_mutex_t = __darwin_pthread_mutex_t; -pub type pthread_mutexattr_t = __darwin_pthread_mutexattr_t; -pub type pthread_once_t = __darwin_pthread_once_t; -pub type pthread_rwlock_t = __darwin_pthread_rwlock_t; -pub type pthread_rwlockattr_t = __darwin_pthread_rwlockattr_t; -pub type pthread_t = __darwin_pthread_t; -pub type pthread_key_t = __darwin_pthread_key_t; -pub type fsblkcnt_t = __darwin_fsblkcnt_t; -pub type fsfilcnt_t = __darwin_fsfilcnt_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kstring_t { - pub l: size_t, - pub m: size_t, - pub s: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_kstring_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kstring_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kstring_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(l) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kstring_t), - "::", - stringify!(s) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ks_tokaux_t { - pub tab: [u64; 4usize], - pub sep: ::std::os::raw::c_int, - pub finished: ::std::os::raw::c_int, - pub p: *const ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_ks_tokaux_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(ks_tokaux_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tab as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sep as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(sep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).finished as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(finished) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(ks_tokaux_t), - "::", - stringify!(p) - ) - ); -} -extern "C" { - pub fn kvsprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ap: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ksprintf( - s: *mut kstring_t, - fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kputd(d: f64, s: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ksplit_core( - s: *mut ::std::os::raw::c_char, - delimiter: ::std::os::raw::c_int, - _max: *mut ::std::os::raw::c_int, - _offsets: *mut *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kstrstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn kstrnstr( - str: *const ::std::os::raw::c_char, - pat: *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn kmemmem( - _str: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - _pat: *const ::std::os::raw::c_void, - m: ::std::os::raw::c_int, - _prep: *mut *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn kstrtok( - str: *const ::std::os::raw::c_char, - sep: *const ::std::os::raw::c_char, - aux: *mut ks_tokaux_t, - ) -> *mut ::std::os::raw::c_char; -} -pub type kgets_func = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_char, ->; -extern "C" { - pub fn kgetline( - s: *mut kstring_t, - fgets_fn: kgets_func, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -pub type kgets_func2 = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_char, - arg2: size_t, - arg3: *mut ::std::os::raw::c_void, - ) -> ssize_t, ->; -extern "C" { - pub fn kgetline2( - s: *mut kstring_t, - fgets_fn: kgets_func2, - fp: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_fd { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hFILE { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool { - _unused: [u8; 0], -} -extern "C" { - pub fn hts_resize_array_( - arg1: size_t, - arg2: size_t, - arg3: size_t, - arg4: *mut ::std::os::raw::c_void, - arg5: *mut *mut ::std::os::raw::c_void, - arg6: ::std::os::raw::c_int, - arg7: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_lib_shutdown(); -} -extern "C" { - pub fn hts_free(ptr: *mut ::std::os::raw::c_void); -} -pub const htsFormatCategory_unknown_category: htsFormatCategory = 0; -pub const htsFormatCategory_sequence_data: htsFormatCategory = 1; -pub const htsFormatCategory_variant_data: htsFormatCategory = 2; -pub const htsFormatCategory_index_file: htsFormatCategory = 3; -pub const htsFormatCategory_region_list: htsFormatCategory = 4; -pub const htsFormatCategory_category_maximum: htsFormatCategory = 32767; -pub type htsFormatCategory = u32; -pub const htsExactFormat_unknown_format: htsExactFormat = 0; -pub const htsExactFormat_binary_format: htsExactFormat = 1; -pub const htsExactFormat_text_format: htsExactFormat = 2; -pub const htsExactFormat_sam: htsExactFormat = 3; -pub const htsExactFormat_bam: htsExactFormat = 4; -pub const htsExactFormat_bai: htsExactFormat = 5; -pub const htsExactFormat_cram: htsExactFormat = 6; -pub const htsExactFormat_crai: htsExactFormat = 7; -pub const htsExactFormat_vcf: htsExactFormat = 8; -pub const htsExactFormat_bcf: htsExactFormat = 9; -pub const htsExactFormat_csi: htsExactFormat = 10; -pub const htsExactFormat_gzi: htsExactFormat = 11; -pub const htsExactFormat_tbi: htsExactFormat = 12; -pub const htsExactFormat_bed: htsExactFormat = 13; -pub const htsExactFormat_htsget: htsExactFormat = 14; -pub const htsExactFormat_json: htsExactFormat = 14; -pub const htsExactFormat_empty_format: htsExactFormat = 15; -pub const htsExactFormat_fasta_format: htsExactFormat = 16; -pub const htsExactFormat_fastq_format: htsExactFormat = 17; -pub const htsExactFormat_fai_format: htsExactFormat = 18; -pub const htsExactFormat_fqi_format: htsExactFormat = 19; -pub const htsExactFormat_hts_crypt4gh_format: htsExactFormat = 20; -pub const htsExactFormat_format_maximum: htsExactFormat = 32767; -pub type htsExactFormat = u32; -pub const htsCompression_no_compression: htsCompression = 0; -pub const htsCompression_gzip: htsCompression = 1; -pub const htsCompression_bgzf: htsCompression = 2; -pub const htsCompression_custom: htsCompression = 3; -pub const htsCompression_bzip2_compression: htsCompression = 4; -pub const htsCompression_compression_maximum: htsCompression = 32767; -pub type htsCompression = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat { - pub category: htsFormatCategory, - pub format: htsExactFormat, - pub version: htsFormat__bindgen_ty_1, - pub compression: htsCompression, - pub compression_level: ::std::os::raw::c_short, - pub specific: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsFormat__bindgen_ty_1 { - pub major: ::std::os::raw::c_short, - pub minor: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_htsFormat__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(htsFormat__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).major as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(major) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minor as *const _ as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(htsFormat__bindgen_ty_1), - "::", - stringify!(minor) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFormat() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(htsFormat)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFormat)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).category as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(category) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).version as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(version) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compression_level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(compression_level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).specific as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(htsFormat), - "::", - stringify!(specific) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_idx_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct htsFile { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub lineno: i64, - pub line: kstring_t, - pub fn_: *mut ::std::os::raw::c_char, - pub fn_aux: *mut ::std::os::raw::c_char, - pub fp: htsFile__bindgen_ty_1, - pub state: *mut ::std::os::raw::c_void, - pub format: htsFormat, - pub idx: *mut hts_idx_t, - pub fnidx: *const ::std::os::raw::c_char, - pub bam_header: *mut sam_hdr_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union htsFile__bindgen_ty_1 { - pub bgzf: *mut BGZF, - pub cram: *mut cram_fd, - pub hfile: *mut hFILE, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_htsFile__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bgzf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(bgzf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cram as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(cram) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hfile as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsFile__bindgen_ty_1), - "::", - stringify!(hfile) - ) - ); -} -#[test] -fn bindgen_test_layout_htsFile() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(htsFile)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsFile)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lineno as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(lineno) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fn_aux as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fn_aux) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).format as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(format) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fnidx as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(fnidx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bam_header as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(htsFile), - "::", - stringify!(bam_header) - ) - ); -} -impl htsFile { - #[inline] - pub fn is_bin(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bin(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_write(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_write(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_be(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_be(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_bgzf(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_bgzf(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - is_bin: u32, - is_write: u32, - is_be: u32, - is_cram: u32, - is_bgzf: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let is_bin: u32 = unsafe { ::std::mem::transmute(is_bin) }; - is_bin as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; - is_write as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; - is_be as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let is_bgzf: u32 = unsafe { ::std::mem::transmute(is_bgzf) }; - is_bgzf as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htsThreadPool { - pub pool: *mut hts_tpool, - pub qsize: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_htsThreadPool() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(htsThreadPool)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(htsThreadPool)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pool as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(pool) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qsize as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(htsThreadPool), - "::", - stringify!(qsize) - ) - ); -} -pub const sam_fields_SAM_QNAME: sam_fields = 1; -pub const sam_fields_SAM_FLAG: sam_fields = 2; -pub const sam_fields_SAM_RNAME: sam_fields = 4; -pub const sam_fields_SAM_POS: sam_fields = 8; -pub const sam_fields_SAM_MAPQ: sam_fields = 16; -pub const sam_fields_SAM_CIGAR: sam_fields = 32; -pub const sam_fields_SAM_RNEXT: sam_fields = 64; -pub const sam_fields_SAM_PNEXT: sam_fields = 128; -pub const sam_fields_SAM_TLEN: sam_fields = 256; -pub const sam_fields_SAM_SEQ: sam_fields = 512; -pub const sam_fields_SAM_QUAL: sam_fields = 1024; -pub const sam_fields_SAM_AUX: sam_fields = 2048; -pub const sam_fields_SAM_RGAUX: sam_fields = 4096; -pub type sam_fields = u32; -pub const hts_fmt_option_CRAM_OPT_DECODE_MD: hts_fmt_option = 0; -pub const hts_fmt_option_CRAM_OPT_PREFIX: hts_fmt_option = 1; -pub const hts_fmt_option_CRAM_OPT_VERBOSITY: hts_fmt_option = 2; -pub const hts_fmt_option_CRAM_OPT_SEQS_PER_SLICE: hts_fmt_option = 3; -pub const hts_fmt_option_CRAM_OPT_SLICES_PER_CONTAINER: hts_fmt_option = 4; -pub const hts_fmt_option_CRAM_OPT_RANGE: hts_fmt_option = 5; -pub const hts_fmt_option_CRAM_OPT_VERSION: hts_fmt_option = 6; -pub const hts_fmt_option_CRAM_OPT_EMBED_REF: hts_fmt_option = 7; -pub const hts_fmt_option_CRAM_OPT_IGNORE_MD5: hts_fmt_option = 8; -pub const hts_fmt_option_CRAM_OPT_REFERENCE: hts_fmt_option = 9; -pub const hts_fmt_option_CRAM_OPT_MULTI_SEQ_PER_SLICE: hts_fmt_option = 10; -pub const hts_fmt_option_CRAM_OPT_NO_REF: hts_fmt_option = 11; -pub const hts_fmt_option_CRAM_OPT_USE_BZIP2: hts_fmt_option = 12; -pub const hts_fmt_option_CRAM_OPT_SHARED_REF: hts_fmt_option = 13; -pub const hts_fmt_option_CRAM_OPT_NTHREADS: hts_fmt_option = 14; -pub const hts_fmt_option_CRAM_OPT_THREAD_POOL: hts_fmt_option = 15; -pub const hts_fmt_option_CRAM_OPT_USE_LZMA: hts_fmt_option = 16; -pub const hts_fmt_option_CRAM_OPT_USE_RANS: hts_fmt_option = 17; -pub const hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS: hts_fmt_option = 18; -pub const hts_fmt_option_CRAM_OPT_LOSSY_NAMES: hts_fmt_option = 19; -pub const hts_fmt_option_CRAM_OPT_BASES_PER_SLICE: hts_fmt_option = 20; -pub const hts_fmt_option_CRAM_OPT_STORE_MD: hts_fmt_option = 21; -pub const hts_fmt_option_CRAM_OPT_STORE_NM: hts_fmt_option = 22; -pub const hts_fmt_option_CRAM_OPT_RANGE_NOSEEK: hts_fmt_option = 23; -pub const hts_fmt_option_HTS_OPT_COMPRESSION_LEVEL: hts_fmt_option = 100; -pub const hts_fmt_option_HTS_OPT_NTHREADS: hts_fmt_option = 101; -pub const hts_fmt_option_HTS_OPT_THREAD_POOL: hts_fmt_option = 102; -pub const hts_fmt_option_HTS_OPT_CACHE_SIZE: hts_fmt_option = 103; -pub const hts_fmt_option_HTS_OPT_BLOCK_SIZE: hts_fmt_option = 104; -pub type hts_fmt_option = u32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct hts_opt { - pub arg: *mut ::std::os::raw::c_char, - pub opt: hts_fmt_option, - pub val: hts_opt__bindgen_ty_1, - pub next: *mut hts_opt, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union hts_opt__bindgen_ty_1 { - pub i: ::std::os::raw::c_int, - pub s: *mut ::std::os::raw::c_char, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_hts_opt__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt__bindgen_ty_1), - "::", - stringify!(s) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_opt() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(hts_opt)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_opt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(arg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).opt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(opt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(val) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_opt), - "::", - stringify!(next) - ) - ); -} -extern "C" { - pub fn hts_opt_add( - opts: *mut *mut hts_opt, - c_arg: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_opt_apply(fp: *mut htsFile, opts: *mut hts_opt) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_opt_free(opts: *mut hts_opt); -} -extern "C" { - pub fn hts_parse_format( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_parse_opt_list( - opt: *mut htsFormat, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub static seq_nt16_table: [::std::os::raw::c_uchar; 256usize]; -} -extern "C" { - pub static mut seq_nt16_str: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub static mut seq_nt16_int: [::std::os::raw::c_int; 0usize]; -} -extern "C" { - pub fn hts_version() -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_detect_format(fp: *mut hFILE, fmt: *mut htsFormat) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_format_description(format: *const htsFormat) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_open( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_open_format( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - fmt: *const htsFormat, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_hopen( - fp: *mut hFILE, - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut htsFile; -} -extern "C" { - pub fn hts_close(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_get_format(fp: *mut htsFile) -> *const htsFormat; -} -extern "C" { - pub fn hts_format_file_extension(format: *const htsFormat) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_set_opt(fp: *mut htsFile, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_getline( - fp: *mut htsFile, - delimiter: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_readlines( - fn_: *const ::std::os::raw::c_char, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_readlist( - fn_: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - _n: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_set_threads(fp: *mut htsFile, n: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_set_thread_pool(fp: *mut htsFile, p: *mut htsThreadPool) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_set_cache_size(fp: *mut htsFile, n: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_set_fai_filename( - fp: *mut htsFile, - fn_aux: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_check_EOF(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -pub type hts_pos_t = i64; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair_pos_t { - pub beg: hts_pos_t, - pub end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_hts_pair_pos_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair_pos_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair_pos_t), - "::", - stringify!(end) - ) - ); -} -pub type hts_pair32_t = hts_pair_pos_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair64_t { - pub u: u64, - pub v: u64, -} -#[test] -fn bindgen_test_layout_hts_pair64_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_pair64_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_t), - "::", - stringify!(v) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_pair64_max_t { - pub u: u64, - pub v: u64, - pub max: u64, -} -#[test] -fn bindgen_test_layout_hts_pair64_max_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_pair64_max_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(v) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_pair64_max_t), - "::", - stringify!(max) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_reglist_t { - pub reg: *const ::std::os::raw::c_char, - pub intervals: *mut hts_pair_pos_t, - pub tid: ::std::os::raw::c_int, - pub count: u32, - pub min_beg: hts_pos_t, - pub max_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_hts_reglist_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(hts_reglist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_reglist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).intervals as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(intervals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).min_beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(min_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_reglist_t), - "::", - stringify!(max_end) - ) - ); -} -pub type hts_readrec_func = ::std::option::Option< - unsafe extern "C" fn( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - r: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int, ->; -pub type hts_seek_func = ::std::option::Option< - unsafe extern "C" fn( - fp: *mut ::std::os::raw::c_void, - offset: i64, - where_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type hts_tell_func = - ::std::option::Option i64>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub tid: ::std::os::raw::c_int, - pub n_off: ::std::os::raw::c_int, - pub i: ::std::os::raw::c_int, - pub n_reg: ::std::os::raw::c_int, - pub beg: hts_pos_t, - pub end: hts_pos_t, - pub reg_list: *mut hts_reglist_t, - pub curr_tid: ::std::os::raw::c_int, - pub curr_reg: ::std::os::raw::c_int, - pub curr_intv: ::std::os::raw::c_int, - pub curr_beg: hts_pos_t, - pub curr_end: hts_pos_t, - pub curr_off: u64, - pub nocoor_off: u64, - pub off: *mut hts_pair64_max_t, - pub readrec: hts_readrec_func, - pub seek: hts_seek_func, - pub tell: hts_tell_func, - pub bins: hts_itr_t__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_itr_t__bindgen_ty_1 { - pub n: ::std::os::raw::c_int, - pub m: ::std::os::raw::c_int, - pub a: *mut ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_hts_itr_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(m) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t__bindgen_ty_1), - "::", - stringify!(a) - ) - ); -} -#[test] -fn bindgen_test_layout_hts_itr_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(hts_itr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(hts_itr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_off as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_reg as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(n_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).beg as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).reg_list as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(reg_list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_tid as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_reg as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_reg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_intv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_intv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_beg as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_beg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_end as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).curr_off as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(curr_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nocoor_off as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(nocoor_off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).off as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(off) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readrec as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(readrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seek as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(seek) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tell as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(tell) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bins as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(hts_itr_t), - "::", - stringify!(bins) - ) - ); -} -impl hts_itr_t { - #[inline] - pub fn read_rest(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_read_rest(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn finished(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_finished(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_cram(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_cram(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn nocoor(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_nocoor(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn multi(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_multi(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn dummy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_dummy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - read_rest: u32, - finished: u32, - is_cram: u32, - nocoor: u32, - multi: u32, - dummy: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let read_rest: u32 = unsafe { ::std::mem::transmute(read_rest) }; - read_rest as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let finished: u32 = unsafe { ::std::mem::transmute(finished) }; - finished as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_cram: u32 = unsafe { ::std::mem::transmute(is_cram) }; - is_cram as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let nocoor: u32 = unsafe { ::std::mem::transmute(nocoor) }; - nocoor as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let multi: u32 = unsafe { ::std::mem::transmute(multi) }; - multi as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let dummy: u32 = unsafe { ::std::mem::transmute(dummy) }; - dummy as u64 - }); - __bindgen_bitfield_unit - } -} -pub type hts_itr_multi_t = hts_itr_t; -extern "C" { - pub fn hts_idx_init( - n: ::std::os::raw::c_int, - fmt: ::std::os::raw::c_int, - offset0: u64, - min_shift: ::std::os::raw::c_int, - n_lvls: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_destroy(idx: *mut hts_idx_t); -} -extern "C" { - pub fn hts_idx_push( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - offset: u64, - is_mapped: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_finish(idx: *mut hts_idx_t, final_offset: u64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_fmt(idx: *mut hts_idx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_tbi_name( - idx: *mut hts_idx_t, - tid: ::std::os::raw::c_int, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_save( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_save_as( - idx: *const hts_idx_t, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_load( - fn_: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - fmt: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn hts_idx_get_meta(idx: *mut hts_idx_t, l_meta: *mut u32) -> *mut u8; -} -extern "C" { - pub fn hts_idx_set_meta( - idx: *mut hts_idx_t, - l_meta: u32, - meta: *mut u8, - is_copy: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_get_stat( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - mapped: *mut u64, - unmapped: *mut u64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_get_n_no_coor(idx: *const hts_idx_t) -> u64; -} -extern "C" { - pub fn hts_parse_decimal( - str: *const ::std::os::raw::c_char, - strend: *mut *mut ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -pub type hts_name2id_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, ->; -pub type hts_id2name_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char, ->; -extern "C" { - pub fn hts_parse_reg64( - str: *const ::std::os::raw::c_char, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_parse_reg( - str: *const ::std::os::raw::c_char, - beg: *mut ::std::os::raw::c_int, - end: *mut ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_parse_region( - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn hts_itr_query( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_destroy(iter: *mut hts_itr_t); -} -pub type hts_itr_query_func = ::std::option::Option< - unsafe extern "C" fn( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t, ->; -extern "C" { - pub fn hts_itr_querys( - idx: *const hts_idx_t, - reg: *const ::std::os::raw::c_char, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_query: hts_itr_query_func, - readrec: hts_readrec_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_next( - fp: *mut BGZF, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_idx_seqnames( - idx: *const hts_idx_t, - n: *mut ::std::os::raw::c_int, - getid: hts_id2name_f, - hdr: *mut ::std::os::raw::c_void, - ) -> *mut *const ::std::os::raw::c_char; -} -pub type hts_itr_multi_query_func = ::std::option::Option< - unsafe extern "C" fn(idx: *const hts_idx_t, itr: *mut hts_itr_t) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn hts_itr_multi_bam(idx: *const hts_idx_t, iter: *mut hts_itr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_itr_multi_cram(idx: *const hts_idx_t, iter: *mut hts_itr_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_itr_regions( - idx: *const hts_idx_t, - reglist: *mut hts_reglist_t, - count: ::std::os::raw::c_int, - getid: hts_name2id_f, - hdr: *mut ::std::os::raw::c_void, - itr_specific: hts_itr_multi_query_func, - readrec: hts_readrec_func, - seek: hts_seek_func, - tell: hts_tell_func, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn hts_itr_multi_next( - fd: *mut htsFile, - iter: *mut hts_itr_t, - r: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_reglist_create( - argv: *mut *mut ::std::os::raw::c_char, - argc: ::std::os::raw::c_int, - r_count: *mut ::std::os::raw::c_int, - hdr: *mut ::std::os::raw::c_void, - getid: hts_name2id_f, - ) -> *mut hts_reglist_t; -} -extern "C" { - pub fn hts_reglist_free(reglist: *mut hts_reglist_t, count: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_file_type(fname: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct errmod_t { - _unused: [u8; 0], -} -extern "C" { - pub fn errmod_init(depcorr: f64) -> *mut errmod_t; -} -extern "C" { - pub fn errmod_destroy(em: *mut errmod_t); -} -extern "C" { - pub fn errmod_cal( - em: *const errmod_t, - n: ::std::os::raw::c_int, - m: ::std::os::raw::c_int, - bases: *mut u16, - q: *mut f32, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct probaln_par_t { - pub d: f32, - pub e: f32, - pub bw: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_probaln_par_t() { - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(probaln_par_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(probaln_par_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(d) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(e) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bw as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(probaln_par_t), - "::", - stringify!(bw) - ) - ); -} -extern "C" { - pub fn probaln_glocal( - ref_: *const u8, - l_ref: ::std::os::raw::c_int, - query: *const u8, - l_query: ::std::os::raw::c_int, - iqual: *const u8, - c: *const probaln_par_t, - state: *mut ::std::os::raw::c_int, - q: *mut u8, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_md5_context { - _unused: [u8; 0], -} -extern "C" { - pub fn hts_md5_init() -> *mut hts_md5_context; -} -extern "C" { - pub fn hts_md5_update( - ctx: *mut hts_md5_context, - data: *const ::std::os::raw::c_void, - size: ::std::os::raw::c_ulong, - ); -} -extern "C" { - pub fn hts_md5_final(digest: *mut ::std::os::raw::c_uchar, ctx: *mut hts_md5_context); -} -extern "C" { - pub fn hts_md5_reset(ctx: *mut hts_md5_context); -} -extern "C" { - pub fn hts_md5_hex(hex: *mut ::std::os::raw::c_char, digest: *const ::std::os::raw::c_uchar); -} -extern "C" { - pub fn hts_md5_destroy(ctx: *mut hts_md5_context); -} -pub type uint16_u = u16; -pub type uint32_u = u32; -pub type uint64_u = u64; -extern "C" { - pub fn __assert_rtn( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *const ::std::os::raw::c_char, - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_hrec_t { - pub type_: ::std::os::raw::c_int, - pub key: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub nkeys: ::std::os::raw::c_int, - pub keys: *mut *mut ::std::os::raw::c_char, - pub vals: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_bcf_hrec_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hrec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).value as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(value) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nkeys as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(nkeys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keys as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(keys) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vals as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hrec_t), - "::", - stringify!(vals) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_idinfo_t { - pub info: [u64; 3usize], - pub hrec: [*mut bcf_hrec_t; 3usize], - pub id: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_idinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_idinfo_t), - "::", - stringify!(id) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_idpair_t { - pub key: *const ::std::os::raw::c_char, - pub val: *const bcf_idinfo_t, -} -#[test] -fn bindgen_test_layout_bcf_idpair_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_idpair_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).val as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_idpair_t), - "::", - stringify!(val) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_hdr_t { - pub n: [i32; 3usize], - pub id: [*mut bcf_idpair_t; 3usize], - pub dict: [*mut ::std::os::raw::c_void; 3usize], - pub samples: *mut *mut ::std::os::raw::c_char, - pub hrec: *mut *mut bcf_hrec_t, - pub nhrec: ::std::os::raw::c_int, - pub dirty: ::std::os::raw::c_int, - pub ntransl: ::std::os::raw::c_int, - pub transl: [*mut ::std::os::raw::c_int; 2usize], - pub nsamples_ori: ::std::os::raw::c_int, - pub keep_samples: *mut u8, - pub mem: kstring_t, - pub m: [i32; 3usize], -} -#[test] -fn bindgen_test_layout_bcf_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 168usize, - concat!("Size of: ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrec as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(hrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nhrec as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nhrec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dirty as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ntransl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(ntransl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).transl as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(transl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nsamples_ori as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(nsamples_ori) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).keep_samples as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(keep_samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_hdr_t), - "::", - stringify!(m) - ) - ); -} -extern "C" { - pub static mut bcf_type_shift: [u8; 0usize]; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_variant_t { - pub type_: ::std::os::raw::c_int, - pub n: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_variant_t() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_variant_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(bcf_variant_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_variant_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_variant_t), - "::", - stringify!(n) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_fmt_t { - pub id: ::std::os::raw::c_int, - pub n: ::std::os::raw::c_int, - pub size: ::std::os::raw::c_int, - pub type_: ::std::os::raw::c_int, - pub p: *mut u8, - pub p_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, -} -#[test] -fn bindgen_test_layout_bcf_fmt_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_fmt_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_fmt_t), - "::", - stringify!(p_len) - ) - ); -} -impl bcf_fmt_t { - #[inline] - pub fn p_off(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } - } - #[inline] - pub fn set_p_off(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 31u8, val as u64) - } - } - #[inline] - pub fn p_free(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_p_free(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(p_off: u32, p_free: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 31u8, { - let p_off: u32 = unsafe { ::std::mem::transmute(p_off) }; - p_off as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let p_free: u32 = unsafe { ::std::mem::transmute(p_free) }; - p_free as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct bcf_info_t { - pub key: ::std::os::raw::c_int, - pub type_: ::std::os::raw::c_int, - pub v1: bcf_info_t__bindgen_ty_1, - pub vptr: *mut u8, - pub vptr_len: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub len: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union bcf_info_t__bindgen_ty_1 { - pub i: i64, - pub f: f32, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bcf_info_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t__bindgen_ty_1), - "::", - stringify!(f) - ) - ); -} -#[test] -fn bindgen_test_layout_bcf_info_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bcf_info_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_info_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v1 as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(v1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vptr_len as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(vptr_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).len as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_info_t), - "::", - stringify!(len) - ) - ); -} -impl bcf_info_t { - #[inline] - pub fn vptr_off(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 31u8) as u32) } - } - #[inline] - pub fn set_vptr_off(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 31u8, val as u64) - } - } - #[inline] - pub fn vptr_free(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_vptr_free(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - vptr_off: u32, - vptr_free: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 31u8, { - let vptr_off: u32 = unsafe { ::std::mem::transmute(vptr_off) }; - vptr_off as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let vptr_free: u32 = unsafe { ::std::mem::transmute(vptr_free) }; - vptr_free as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_dec_t { - pub m_fmt: ::std::os::raw::c_int, - pub m_info: ::std::os::raw::c_int, - pub m_id: ::std::os::raw::c_int, - pub m_als: ::std::os::raw::c_int, - pub m_allele: ::std::os::raw::c_int, - pub m_flt: ::std::os::raw::c_int, - pub n_flt: ::std::os::raw::c_int, - pub flt: *mut ::std::os::raw::c_int, - pub id: *mut ::std::os::raw::c_char, - pub als: *mut ::std::os::raw::c_char, - pub allele: *mut *mut ::std::os::raw::c_char, - pub info: *mut bcf_info_t, - pub fmt: *mut bcf_fmt_t, - pub var: *mut bcf_variant_t, - pub n_var: ::std::os::raw::c_int, - pub var_type: ::std::os::raw::c_int, - pub shared_dirty: ::std::os::raw::c_int, - pub indiv_dirty: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_dec_t() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(bcf_dec_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_dec_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_fmt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_info as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_als as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_allele as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_flt as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(m_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_flt as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flt as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(flt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).allele as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(allele) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).info as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fmt as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(fmt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_var as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(n_var) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).var_type as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(var_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared_dirty as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(shared_dirty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv_dirty as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_dec_t), - "::", - stringify!(indiv_dirty) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf1_t { - pub pos: hts_pos_t, - pub rlen: hts_pos_t, - pub rid: i32, - pub qual: f32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u32>, - pub shared: kstring_t, - pub indiv: kstring_t, - pub d: bcf_dec_t, - pub max_unpack: ::std::os::raw::c_int, - pub unpacked: ::std::os::raw::c_int, - pub unpack_size: [::std::os::raw::c_int; 3usize], - pub errcode: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf1_t() { - assert_eq!( - ::std::mem::size_of::(), - 208usize, - concat!("Size of: ", stringify!(bcf1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rlen as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rid as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(rid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shared as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(shared) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indiv as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(indiv) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).d as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(bcf1_t), "::", stringify!(d)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpacked as *const _ as usize }, - 188usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpacked) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).unpack_size as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(unpack_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errcode as *const _ as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(bcf1_t), - "::", - stringify!(errcode) - ) - ); -} -impl bcf1_t { - #[inline] - pub fn n_info(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_n_info(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn n_allele(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } - } - #[inline] - pub fn set_n_allele(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn n_fmt(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } - } - #[inline] - pub fn set_n_fmt(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub fn n_sample(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 24u8) as u32) } - } - #[inline] - pub fn set_n_sample(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(40usize, 24u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - n_info: u32, - n_allele: u32, - n_fmt: u32, - n_sample: u32, - ) -> __BindgenBitfieldUnit<[u8; 8usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 16u8, { - let n_info: u32 = unsafe { ::std::mem::transmute(n_info) }; - n_info as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let n_allele: u32 = unsafe { ::std::mem::transmute(n_allele) }; - n_allele as u64 - }); - __bindgen_bitfield_unit.set(32usize, 8u8, { - let n_fmt: u32 = unsafe { ::std::mem::transmute(n_fmt) }; - n_fmt as u64 - }); - __bindgen_bitfield_unit.set(40usize, 24u8, { - let n_sample: u32 = unsafe { ::std::mem::transmute(n_sample) }; - n_sample as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn bcf_hdr_init(mode: *const ::std::os::raw::c_char) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_destroy(h: *mut bcf_hdr_t); -} -extern "C" { - pub fn bcf_init() -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_destroy(v: *mut bcf1_t); -} -extern "C" { - pub fn bcf_empty(v: *mut bcf1_t); -} -extern "C" { - pub fn bcf_clear(v: *mut bcf1_t); -} -pub type vcfFile = htsFile; -extern "C" { - pub fn bcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_set_samples( - hdr: *mut bcf_hdr_t, - samples: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_subset_format(hdr: *const bcf_hdr_t, rec: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_write(fp: *mut htsFile, h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_parse( - s: *mut kstring_t, - h: *const bcf_hdr_t, - v: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_open_mode( - mode: *mut ::std::os::raw::c_char, - fn_: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_format( - h: *const bcf_hdr_t, - v: *const bcf1_t, - s: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_unpack(b: *mut bcf1_t, which: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_dup(src: *mut bcf1_t) -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_copy(dst: *mut bcf1_t, src: *mut bcf1_t) -> *mut bcf1_t; -} -extern "C" { - pub fn bcf_write(fp: *mut htsFile, h: *mut bcf_hdr_t, v: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_hdr_read(fp: *mut htsFile) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn vcf_hdr_write(fp: *mut htsFile, h: *const bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_read(fp: *mut htsFile, h: *const bcf_hdr_t, v: *mut bcf1_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_write( - fp: *mut htsFile, - h: *const bcf_hdr_t, - v: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_readrec( - fp: *mut BGZF, - null: *mut ::std::os::raw::c_void, - v: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vcf_write_line(fp: *mut htsFile, line: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_dup(hdr: *const bcf_hdr_t) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_combine(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_merge(dst: *mut bcf_hdr_t, src: *const bcf_hdr_t) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_add_sample( - hdr: *mut bcf_hdr_t, - sample: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_set( - hdr: *mut bcf_hdr_t, - fname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_format( - hdr: *const bcf_hdr_t, - is_bcf: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_fmt_text( - hdr: *const bcf_hdr_t, - is_bcf: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_append( - h: *mut bcf_hdr_t, - line: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_printf( - h: *mut bcf_hdr_t, - format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_get_version(hdr: *const bcf_hdr_t) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_set_version( - hdr: *mut bcf_hdr_t, - version: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_remove( - h: *mut bcf_hdr_t, - type_: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn bcf_hdr_subset( - h0: *const bcf_hdr_t, - n: ::std::os::raw::c_int, - samples: *const *mut ::std::os::raw::c_char, - imap: *mut ::std::os::raw::c_int, - ) -> *mut bcf_hdr_t; -} -extern "C" { - pub fn bcf_hdr_seqnames( - h: *const bcf_hdr_t, - nseqs: *mut ::std::os::raw::c_int, - ) -> *mut *const ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_hdr_parse( - hdr: *mut bcf_hdr_t, - htxt: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_sync(h: *mut bcf_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_parse_line( - h: *const bcf_hdr_t, - line: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_format(hrec: *const bcf_hrec_t, str: *mut kstring_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_add_hrec(hdr: *mut bcf_hdr_t, hrec: *mut bcf_hrec_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_get_hrec( - hdr: *const bcf_hdr_t, - type_: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - value: *const ::std::os::raw::c_char, - str_class: *const ::std::os::raw::c_char, - ) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_dup(hrec: *mut bcf_hrec_t) -> *mut bcf_hrec_t; -} -extern "C" { - pub fn bcf_hrec_add_key( - hrec: *mut bcf_hrec_t, - str: *const ::std::os::raw::c_char, - len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_set_val( - hrec: *mut bcf_hrec_t, - i: ::std::os::raw::c_int, - str: *const ::std::os::raw::c_char, - len: size_t, - is_quoted: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_find_key( - hrec: *mut bcf_hrec_t, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hrec_add_idx(hrec: *mut bcf_hrec_t, idx: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hrec_destroy(hrec: *mut bcf_hrec_t); -} -extern "C" { - pub fn bcf_subset( - h: *const bcf_hdr_t, - v: *mut bcf1_t, - n: ::std::os::raw::c_int, - imap: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_translate( - dst_hdr: *const bcf_hdr_t, - src_hdr: *mut bcf_hdr_t, - src_line: *mut bcf1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_variant_types(rec: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_variant_type( - rec: *mut bcf1_t, - ith_allele: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_is_snp(v: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_ids: *mut ::std::os::raw::c_int, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_add_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_id: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - flt_id: ::std::os::raw::c_int, - pass: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_has_filter( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - filter: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_alleles( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - alleles: *mut *const ::std::os::raw::c_char, - nals: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_alleles_str( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - alleles_string: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_id( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_add_id( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_info( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_format_string( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *mut *const ::std::os::raw::c_char, - n: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_update_format( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - values: *const ::std::os::raw::c_void, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_fmt( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - ) -> *mut bcf_fmt_t; -} -extern "C" { - pub fn bcf_get_info( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - key: *const ::std::os::raw::c_char, - ) -> *mut bcf_info_t; -} -extern "C" { - pub fn bcf_get_fmt_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_fmt_t; -} -extern "C" { - pub fn bcf_get_info_id(line: *mut bcf1_t, id: ::std::os::raw::c_int) -> *mut bcf_info_t; -} -extern "C" { - pub fn bcf_get_info_values( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut ::std::os::raw::c_void, - ndst: *mut ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_format_string( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut *mut ::std::os::raw::c_char, - ndst: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_get_format_values( - hdr: *const bcf_hdr_t, - line: *mut bcf1_t, - tag: *const ::std::os::raw::c_char, - dst: *mut *mut ::std::os::raw::c_void, - ndst: *mut ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_hdr_id2int( - hdr: *const bcf_hdr_t, - type_: ::std::os::raw::c_int, - id: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_fmt_array( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - type_: ::std::os::raw::c_int, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_fmt_sized_array(s: *mut kstring_t, ptr: *mut u8) -> *mut u8; -} -extern "C" { - pub fn bcf_enc_vchar( - s: *mut kstring_t, - l: ::std::os::raw::c_int, - a: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_enc_vint( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - a: *mut i32, - wsize: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_enc_vfloat( - s: *mut kstring_t, - n: ::std::os::raw::c_int, - a: *mut f32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn bcf_index_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn bcf_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - n_threads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_idx_init( - fp: *mut htsFile, - h: *mut bcf_hdr_t, - min_shift: ::std::os::raw::c_int, - fnidx: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub static mut bcf_float_vector_end: u32; -} -extern "C" { - pub static mut bcf_float_missing: u32; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sam_hrecs_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sam_hdr_t { - pub n_targets: i32, - pub ignore_sam_err: i32, - pub l_text: size_t, - pub target_len: *mut u32, - pub cigar_tab: *const i8, - pub target_name: *mut *mut ::std::os::raw::c_char, - pub text: *mut ::std::os::raw::c_char, - pub sdict: *mut ::std::os::raw::c_void, - pub hrecs: *mut sam_hrecs_t, - pub ref_count: u32, -} -#[test] -fn bindgen_test_layout_sam_hdr_t() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(sam_hdr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(sam_hdr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_targets as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(n_targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ignore_sam_err as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ignore_sam_err) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_text as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(l_text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_len as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_len) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_tab as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(cigar_tab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).target_name as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(target_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).text as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sdict as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(sdict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hrecs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(hrecs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ref_count as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(sam_hdr_t), - "::", - stringify!(ref_count) - ) - ); -} -pub type bam_hdr_t = sam_hdr_t; -extern "C" { - pub static bam_cigar_table: [i8; 256usize]; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam1_core_t { - pub pos: hts_pos_t, - pub tid: i32, - pub bin: u16, - pub qual: u8, - pub l_extranul: u8, - pub flag: u16, - pub l_qname: u16, - pub n_cigar: u32, - pub l_qseq: i32, - pub mtid: i32, - pub mpos: hts_pos_t, - pub isize: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bam1_core_t() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(bam1_core_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_core_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tid as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(tid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bin as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qual as *const _ as usize }, - 14usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(qual) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_extranul as *const _ as usize }, - 15usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_extranul) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(flag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qname as *const _ as usize }, - 18usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_cigar as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(n_cigar) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_qseq as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(l_qseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mtid as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mtid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mpos as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(mpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isize as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bam1_core_t), - "::", - stringify!(isize) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam1_t { - pub core: bam1_core_t, - pub id: u64, - pub data: *mut u8, - pub l_data: ::std::os::raw::c_int, - pub m_data: u32, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u8>, - pub __bindgen_padding_0: u32, -} -#[test] -fn bindgen_test_layout_bam1_t() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(bam1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).core as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(core) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).l_data as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(l_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).m_data as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(bam1_t), - "::", - stringify!(m_data) - ) - ); -} -impl bam1_t { - #[inline] - pub fn mempolicy(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } - } - #[inline] - pub fn set_mempolicy(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1(mempolicy: u32) -> __BindgenBitfieldUnit<[u8; 4usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 2u8, { - let mempolicy: u32 = unsafe { ::std::mem::transmute(mempolicy) }; - mempolicy as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn sam_hdr_init() -> *mut sam_hdr_t; -} -extern "C" { - pub fn bam_hdr_read(fp: *mut BGZF) -> *mut sam_hdr_t; -} -extern "C" { - pub fn bam_hdr_write(fp: *mut BGZF, h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_destroy(h: *mut sam_hdr_t); -} -extern "C" { - pub fn sam_hdr_dup(h0: *const sam_hdr_t) -> *mut sam_hdr_t; -} -pub type samFile = htsFile; -extern "C" { - pub fn sam_hdr_parse(l_text: size_t, text: *const ::std::os::raw::c_char) -> *mut sam_hdr_t; -} -extern "C" { - pub fn sam_hdr_read(fp: *mut samFile) -> *mut sam_hdr_t; -} -extern "C" { - pub fn sam_hdr_write(fp: *mut samFile, h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_length(h: *mut sam_hdr_t) -> size_t; -} -extern "C" { - pub fn sam_hdr_str(h: *mut sam_hdr_t) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_nref(h: *const sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_add_lines( - h: *mut sam_hdr_t, - lines: *const ::std::os::raw::c_char, - len: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_add_line( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_line_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_val: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_line_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_line_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_line_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - position: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_update_line( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_except( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_lines( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - id: *const ::std::os::raw::c_char, - rh: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_count_lines( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_line_index( - bh: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_line_name( - bh: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_find_tag_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_find_tag_pos( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - pos: ::std::os::raw::c_int, - key: *const ::std::os::raw::c_char, - ks: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_remove_tag_id( - h: *mut sam_hdr_t, - type_: *const ::std::os::raw::c_char, - ID_key: *const ::std::os::raw::c_char, - ID_value: *const ::std::os::raw::c_char, - key: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_name2tid( - h: *mut sam_hdr_t, - ref_: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_hdr_tid2name( - h: *const sam_hdr_t, - tid: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_tid2len(h: *const sam_hdr_t, tid: ::std::os::raw::c_int) -> hts_pos_t; -} -extern "C" { - pub fn sam_hdr_pg_id( - h: *mut sam_hdr_t, - name: *const ::std::os::raw::c_char, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_add_pg( - h: *mut sam_hdr_t, - name: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn stringify_argv( - argc: ::std::os::raw::c_int, - argv: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_incr_ref(h: *mut sam_hdr_t); -} -extern "C" { - pub fn bam_init1() -> *mut bam1_t; -} -extern "C" { - pub fn bam_destroy1(b: *mut bam1_t); -} -extern "C" { - pub fn bam_read1(fp: *mut BGZF, b: *mut bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_write1(fp: *mut BGZF, b: *const bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_copy1(bdst: *mut bam1_t, bsrc: *const bam1_t) -> *mut bam1_t; -} -extern "C" { - pub fn bam_dup1(bsrc: *const bam1_t) -> *mut bam1_t; -} -extern "C" { - pub fn bam_set1( - bam: *mut bam1_t, - l_qname: size_t, - qname: *const ::std::os::raw::c_char, - flag: u16, - tid: i32, - pos: hts_pos_t, - mapq: u8, - n_cigar: size_t, - cigar: *const u32, - mtid: i32, - mpos: hts_pos_t, - isize: hts_pos_t, - l_seq: size_t, - seq: *const ::std::os::raw::c_char, - qual: *const ::std::os::raw::c_char, - l_aux: size_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_cigar2qlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; -} -extern "C" { - pub fn bam_cigar2rlen(n_cigar: ::std::os::raw::c_int, cigar: *const u32) -> hts_pos_t; -} -extern "C" { - pub fn bam_endpos(b: *const bam1_t) -> hts_pos_t; -} -extern "C" { - pub fn bam_str2flag(str: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_flag2str(flag: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_set_qname( - b: *mut bam1_t, - qname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_idx_init( - fp: *mut htsFile, - h: *mut sam_hdr_t, - min_shift: ::std::os::raw::c_int, - fnidx: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_idx_save(fp: *mut htsFile) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_load(fp: *mut htsFile, fn_: *const ::std::os::raw::c_char) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_load2( - fp: *mut htsFile, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_load3( - fp: *mut htsFile, - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut hts_idx_t; -} -extern "C" { - pub fn sam_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - nthreads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_itr_queryi( - idx: *const hts_idx_t, - tid: ::std::os::raw::c_int, - beg: hts_pos_t, - end: hts_pos_t, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_querys( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - region: *const ::std::os::raw::c_char, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_regions( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - reglist: *mut hts_reglist_t, - regcount: ::std::os::raw::c_uint, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_itr_regarray( - idx: *const hts_idx_t, - hdr: *mut sam_hdr_t, - regarray: *mut *mut ::std::os::raw::c_char, - regcount: ::std::os::raw::c_uint, - ) -> *mut hts_itr_t; -} -extern "C" { - pub fn sam_parse_region( - h: *mut sam_hdr_t, - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_open_mode( - mode: *mut ::std::os::raw::c_char, - fn_: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_open_mode_opts( - fn_: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - format: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sam_hdr_change_HD( - h: *mut sam_hdr_t, - key: *const ::std::os::raw::c_char, - val: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_parse1( - s: *mut kstring_t, - h: *mut sam_hdr_t, - b: *mut bam1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_format1( - h: *const sam_hdr_t, - b: *const bam1_t, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_read1(fp: *mut samFile, h: *mut sam_hdr_t, b: *mut bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_write1( - fp: *mut samFile, - h: *const sam_hdr_t, - b: *const bam1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_get(b: *const bam1_t, tag: *const ::std::os::raw::c_char) -> *mut u8; -} -extern "C" { - pub fn bam_aux2i(s: *const u8) -> i64; -} -extern "C" { - pub fn bam_aux2f(s: *const u8) -> f64; -} -extern "C" { - pub fn bam_aux2A(s: *const u8) -> ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_aux2Z(s: *const u8) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bam_auxB_len(s: *const u8) -> u32; -} -extern "C" { - pub fn bam_auxB2i(s: *const u8, idx: u32) -> i64; -} -extern "C" { - pub fn bam_auxB2f(s: *const u8, idx: u32) -> f64; -} -extern "C" { - pub fn bam_aux_append( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - type_: ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - data: *const u8, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_del(b: *mut bam1_t, s: *mut u8) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_str( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - len: ::std::os::raw::c_int, - data: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_int( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - val: i64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_float( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - val: f32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_aux_update_array( - b: *mut bam1_t, - tag: *const ::std::os::raw::c_char, - type_: u8, - items: u32, - data: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union bam_pileup_cd { - pub p: *mut ::std::os::raw::c_void, - pub i: i64, - pub f: f64, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout_bam_pileup_cd() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup_cd)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(i) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup_cd), - "::", - stringify!(f) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct bam_pileup1_t { - pub b: *mut bam1_t, - pub qpos: i32, - pub indel: ::std::os::raw::c_int, - pub level: ::std::os::raw::c_int, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub cd: bam_pileup_cd, - pub cigar_ind: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bam_pileup1_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bam_pileup1_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).qpos as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(qpos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).indel as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(indel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).level as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cd as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cd) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cigar_ind as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bam_pileup1_t), - "::", - stringify!(cigar_ind) - ) - ); -} -impl bam_pileup1_t { - #[inline] - pub fn is_del(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_del(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_head(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_head(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_tail(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_tail(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_refskip(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_refskip(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn aux(&self) -> u32 { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 27u8) as u32) } - } - #[inline] - pub fn set_aux(&mut self, val: u32) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 27u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - is_del: u32, - is_head: u32, - is_tail: u32, - is_refskip: u32, - aux: u32, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let is_del: u32 = unsafe { ::std::mem::transmute(is_del) }; - is_del as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let is_head: u32 = unsafe { ::std::mem::transmute(is_head) }; - is_head as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let is_tail: u32 = unsafe { ::std::mem::transmute(is_tail) }; - is_tail as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let is_refskip: u32 = unsafe { ::std::mem::transmute(is_refskip) }; - is_refskip as u64 - }); - __bindgen_bitfield_unit.set(5usize, 27u8, { - let aux: u32 = unsafe { ::std::mem::transmute(aux) }; - aux as u64 - }); - __bindgen_bitfield_unit - } -} -pub type bam_plp_auto_f = ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *mut bam1_t, - ) -> ::std::os::raw::c_int, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam_plp_s { - _unused: [u8; 0], -} -pub type bam_plp_t = *mut bam_plp_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bam_mplp_s { - _unused: [u8; 0], -} -pub type bam_mplp_t = *mut bam_mplp_s; -extern "C" { - pub fn bam_plp_init(func: bam_plp_auto_f, data: *mut ::std::os::raw::c_void) -> bam_plp_t; -} -extern "C" { - pub fn bam_plp_destroy(iter: bam_plp_t); -} -extern "C" { - pub fn bam_plp_push(iter: bam_plp_t, b: *const bam1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_plp_next( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp_auto( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp64_next( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp64_auto( - iter: bam_plp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - _n_plp: *mut ::std::os::raw::c_int, - ) -> *const bam_pileup1_t; -} -extern "C" { - pub fn bam_plp_set_maxcnt(iter: bam_plp_t, maxcnt: ::std::os::raw::c_int); -} -extern "C" { - pub fn bam_plp_reset(iter: bam_plp_t); -} -extern "C" { - pub fn bam_plp_constructor( - plp: bam_plp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_plp_destructor( - plp: bam_plp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_plp_insertion( - p: *const bam_pileup1_t, - ins: *mut kstring_t, - del_len: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_init( - n: ::std::os::raw::c_int, - func: bam_plp_auto_f, - data: *mut *mut ::std::os::raw::c_void, - ) -> bam_mplp_t; -} -extern "C" { - pub fn bam_mplp_init_overlaps(iter: bam_mplp_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_destroy(iter: bam_mplp_t); -} -extern "C" { - pub fn bam_mplp_set_maxcnt(iter: bam_mplp_t, maxcnt: ::std::os::raw::c_int); -} -extern "C" { - pub fn bam_mplp_auto( - iter: bam_mplp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut ::std::os::raw::c_int, - n_plp: *mut ::std::os::raw::c_int, - plp: *mut *const bam_pileup1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp64_auto( - iter: bam_mplp_t, - _tid: *mut ::std::os::raw::c_int, - _pos: *mut hts_pos_t, - n_plp: *mut ::std::os::raw::c_int, - plp: *mut *const bam_pileup1_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bam_mplp_reset(iter: bam_mplp_t); -} -extern "C" { - pub fn bam_mplp_constructor( - iter: bam_mplp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn bam_mplp_destructor( - iter: bam_mplp_t, - func: ::std::option::Option< - unsafe extern "C" fn( - data: *mut ::std::os::raw::c_void, - b: *const bam1_t, - cd: *mut bam_pileup_cd, - ) -> ::std::os::raw::c_int, - >, - ); -} -extern "C" { - pub fn sam_cap_mapq( - b: *mut bam1_t, - ref_: *const ::std::os::raw::c_char, - ref_len: hts_pos_t, - thres: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sam_prob_realn( - b: *mut bam1_t, - ref_: *const ::std::os::raw::c_char, - ref_len: hts_pos_t, - flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub const cram_block_method_BM_ERROR: cram_block_method = -1; -pub const cram_block_method_RAW: cram_block_method = 0; -pub const cram_block_method_GZIP: cram_block_method = 1; -pub const cram_block_method_BZIP2: cram_block_method = 2; -pub const cram_block_method_LZMA: cram_block_method = 3; -pub const cram_block_method_RANS: cram_block_method = 4; -pub const cram_block_method_RANS0: cram_block_method = 4; -pub const cram_block_method_RANS1: cram_block_method = 10; -pub const cram_block_method_GZIP_RLE: cram_block_method = 11; -pub type cram_block_method = i32; -pub const cram_content_type_CT_ERROR: cram_content_type = -1; -pub const cram_content_type_FILE_HEADER: cram_content_type = 0; -pub const cram_content_type_COMPRESSION_HEADER: cram_content_type = 1; -pub const cram_content_type_MAPPED_SLICE: cram_content_type = 2; -pub const cram_content_type_UNMAPPED_SLICE: cram_content_type = 3; -pub const cram_content_type_EXTERNAL: cram_content_type = 4; -pub const cram_content_type_CORE: cram_content_type = 5; -pub type cram_content_type = i32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_file_def { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_container { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_slice { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_metrics { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block_slice_hdr { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cram_block_compression_hdr { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct refs_t { - _unused: [u8; 0], -} -extern "C" { - pub fn cram_fd_get_header(fd: *mut cram_fd) -> *mut sam_hdr_t; -} -extern "C" { - pub fn cram_fd_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t); -} -extern "C" { - pub fn cram_fd_get_version(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_fd_set_version(fd: *mut cram_fd, vers: ::std::os::raw::c_int); -} -extern "C" { - pub fn cram_major_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_minor_vers(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_fd_get_fp(fd: *mut cram_fd) -> *mut hFILE; -} -extern "C" { - pub fn cram_fd_set_fp(fd: *mut cram_fd, fp: *mut hFILE); -} -extern "C" { - pub fn cram_container_get_length(c: *mut cram_container) -> i32; -} -extern "C" { - pub fn cram_container_set_length(c: *mut cram_container, length: i32); -} -extern "C" { - pub fn cram_container_get_num_blocks(c: *mut cram_container) -> i32; -} -extern "C" { - pub fn cram_container_set_num_blocks(c: *mut cram_container, num_blocks: i32); -} -extern "C" { - pub fn cram_container_get_landmarks( - c: *mut cram_container, - num_landmarks: *mut i32, - ) -> *mut i32; -} -extern "C" { - pub fn cram_container_set_landmarks( - c: *mut cram_container, - num_landmarks: i32, - landmarks: *mut i32, - ); -} -extern "C" { - pub fn cram_container_is_empty(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_block_get_content_id(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_comp_size(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_uncomp_size(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_crc32(b: *mut cram_block) -> i32; -} -extern "C" { - pub fn cram_block_get_data(b: *mut cram_block) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn cram_block_get_content_type(b: *mut cram_block) -> cram_content_type; -} -extern "C" { - pub fn cram_block_set_content_id(b: *mut cram_block, id: i32); -} -extern "C" { - pub fn cram_block_set_comp_size(b: *mut cram_block, size: i32); -} -extern "C" { - pub fn cram_block_set_uncomp_size(b: *mut cram_block, size: i32); -} -extern "C" { - pub fn cram_block_set_crc32(b: *mut cram_block, crc: i32); -} -extern "C" { - pub fn cram_block_set_data(b: *mut cram_block, data: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn cram_block_append( - b: *mut cram_block, - data: *const ::std::os::raw::c_void, - size: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_block_update_size(b: *mut cram_block); -} -extern "C" { - pub fn cram_block_get_offset(b: *mut cram_block) -> size_t; -} -extern "C" { - pub fn cram_block_set_offset(b: *mut cram_block, offset: size_t); -} -extern "C" { - pub fn cram_block_size(b: *mut cram_block) -> u32; -} -extern "C" { - pub fn cram_transcode_rg( - in_: *mut cram_fd, - out: *mut cram_fd, - c: *mut cram_container, - nrg: ::std::os::raw::c_int, - in_rg: *mut ::std::os::raw::c_int, - out_rg: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_copy_slice( - in_: *mut cram_fd, - out: *mut cram_fd, - num_slice: i32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_new_block( - content_type: cram_content_type, - content_id: ::std::os::raw::c_int, - ) -> *mut cram_block; -} -extern "C" { - pub fn cram_read_block(fd: *mut cram_fd) -> *mut cram_block; -} -extern "C" { - pub fn cram_write_block(fd: *mut cram_fd, b: *mut cram_block) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_free_block(b: *mut cram_block); -} -extern "C" { - pub fn cram_uncompress_block(b: *mut cram_block) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_compress_block( - fd: *mut cram_fd, - b: *mut cram_block, - metrics: *mut cram_metrics, - method: ::std::os::raw::c_int, - level: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_new_container( - nrec: ::std::os::raw::c_int, - nslice: ::std::os::raw::c_int, - ) -> *mut cram_container; -} -extern "C" { - pub fn cram_free_container(c: *mut cram_container); -} -extern "C" { - pub fn cram_read_container(fd: *mut cram_fd) -> *mut cram_container; -} -extern "C" { - pub fn cram_write_container(fd: *mut cram_fd, h: *mut cram_container) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_store_container( - fd: *mut cram_fd, - c: *mut cram_container, - dat: *mut ::std::os::raw::c_char, - size: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_container_size(c: *mut cram_container) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_open( - filename: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut cram_fd; -} -extern "C" { - pub fn cram_dopen( - fp: *mut hFILE, - filename: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut cram_fd; -} -extern "C" { - pub fn cram_close(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_seek( - fd: *mut cram_fd, - offset: off_t, - whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_flush(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_eof(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_option(fd: *mut cram_fd, opt: hts_fmt_option, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_voption( - fd: *mut cram_fd, - opt: hts_fmt_option, - args: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_set_header(fd: *mut cram_fd, hdr: *mut sam_hdr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cram_check_EOF(fd: *mut cram_fd) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn int32_put_blk(b: *mut cram_block, val: i32) -> ::std::os::raw::c_int; -} -pub type SAM_hdr = sam_hdr_t; -extern "C" { - pub fn cram_get_refs(fd: *mut htsFile) -> *mut refs_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgzf_mtaux_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgzidx_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgzf_cache_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct z_stream_s { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct BGZF { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, - pub cache_size: ::std::os::raw::c_int, - pub block_length: ::std::os::raw::c_int, - pub block_clength: ::std::os::raw::c_int, - pub block_offset: ::std::os::raw::c_int, - pub block_address: i64, - pub uncompressed_address: i64, - pub uncompressed_block: *mut ::std::os::raw::c_void, - pub compressed_block: *mut ::std::os::raw::c_void, - pub cache: *mut bgzf_cache_t, - pub fp: *mut hFILE, - pub mt: *mut bgzf_mtaux_t, - pub idx: *mut bgzidx_t, - pub idx_build_otf: ::std::os::raw::c_int, - pub gz_stream: *mut z_stream_s, - pub seeked: i64, -} -#[test] -fn bindgen_test_layout_BGZF() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(BGZF)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(BGZF)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache_size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_length as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_length) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_clength as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_clength) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_offset as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).block_address as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(block_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_address as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_address) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).uncompressed_block as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(uncompressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compressed_block as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(compressed_block) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(cache) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fp as *const _ as usize }, - 64usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(fp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mt as *const _ as usize }, - 72usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(mt)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 80usize, - concat!("Offset of field: ", stringify!(BGZF), "::", stringify!(idx)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx_build_otf as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(idx_build_otf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gz_stream as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(gz_stream) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seeked as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(BGZF), - "::", - stringify!(seeked) - ) - ); -} -impl BGZF { - #[inline] - pub fn errcode(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } - } - #[inline] - pub fn set_errcode(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 16u8, val as u64) - } - } - #[inline] - pub fn reserved(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) } - } - #[inline] - pub fn set_reserved(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_write(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_write(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(17usize, 1u8, val as u64) - } - } - #[inline] - pub fn no_eof_block(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) } - } - #[inline] - pub fn set_no_eof_block(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(18usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_be(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_be(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(19usize, 1u8, val as u64) - } - } - #[inline] - pub fn compress_level(&self) -> ::std::os::raw::c_int { - unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 9u8) as u32) } - } - #[inline] - pub fn set_compress_level(&mut self, val: ::std::os::raw::c_int) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(20usize, 9u8, val as u64) - } - } - #[inline] - pub fn last_block_eof(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u32) } - } - #[inline] - pub fn set_last_block_eof(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(29usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_compressed(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_compressed(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(30usize, 1u8, val as u64) - } - } - #[inline] - pub fn is_gzip(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } - } - #[inline] - pub fn set_is_gzip(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(31usize, 1u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - errcode: ::std::os::raw::c_uint, - reserved: ::std::os::raw::c_uint, - is_write: ::std::os::raw::c_uint, - no_eof_block: ::std::os::raw::c_uint, - is_be: ::std::os::raw::c_uint, - compress_level: ::std::os::raw::c_int, - last_block_eof: ::std::os::raw::c_uint, - is_compressed: ::std::os::raw::c_uint, - is_gzip: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 16u8, { - let errcode: u32 = unsafe { ::std::mem::transmute(errcode) }; - errcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 1u8, { - let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; - reserved as u64 - }); - __bindgen_bitfield_unit.set(17usize, 1u8, { - let is_write: u32 = unsafe { ::std::mem::transmute(is_write) }; - is_write as u64 - }); - __bindgen_bitfield_unit.set(18usize, 1u8, { - let no_eof_block: u32 = unsafe { ::std::mem::transmute(no_eof_block) }; - no_eof_block as u64 - }); - __bindgen_bitfield_unit.set(19usize, 1u8, { - let is_be: u32 = unsafe { ::std::mem::transmute(is_be) }; - is_be as u64 - }); - __bindgen_bitfield_unit.set(20usize, 9u8, { - let compress_level: u32 = unsafe { ::std::mem::transmute(compress_level) }; - compress_level as u64 - }); - __bindgen_bitfield_unit.set(29usize, 1u8, { - let last_block_eof: u32 = unsafe { ::std::mem::transmute(last_block_eof) }; - last_block_eof as u64 - }); - __bindgen_bitfield_unit.set(30usize, 1u8, { - let is_compressed: u32 = unsafe { ::std::mem::transmute(is_compressed) }; - is_compressed as u64 - }); - __bindgen_bitfield_unit.set(31usize, 1u8, { - let is_gzip: u32 = unsafe { ::std::mem::transmute(is_gzip) }; - is_gzip as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - pub fn bgzf_dopen(fd: ::std::os::raw::c_int, mode: *const ::std::os::raw::c_char) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_open( - path: *const ::std::os::raw::c_char, - mode: *const ::std::os::raw::c_char, - ) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_hopen(fp: *mut hFILE, mode: *const ::std::os::raw::c_char) -> *mut BGZF; -} -extern "C" { - pub fn bgzf_close(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_read(fp: *mut BGZF, data: *mut ::std::os::raw::c_void, length: size_t) -> ssize_t; -} -extern "C" { - pub fn bgzf_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_block_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_peek(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_raw_read( - fp: *mut BGZF, - data: *mut ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_raw_write( - fp: *mut BGZF, - data: *const ::std::os::raw::c_void, - length: size_t, - ) -> ssize_t; -} -extern "C" { - pub fn bgzf_flush(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_seek(fp: *mut BGZF, pos: i64, whence: ::std::os::raw::c_int) -> i64; -} -extern "C" { - pub fn bgzf_check_EOF(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_compression(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_is_bgzf(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_set_cache_size(fp: *mut BGZF, size: ::std::os::raw::c_int); -} -extern "C" { - pub fn bgzf_flush_try(fp: *mut BGZF, size: ssize_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_getc(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_getline( - fp: *mut BGZF, - delim: ::std::os::raw::c_int, - str: *mut kstring_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_read_block(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_thread_pool( - fp: *mut BGZF, - pool: *mut hts_tpool, - qsize: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_mt( - fp: *mut BGZF, - n_threads: ::std::os::raw::c_int, - n_sub_blks: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_compress( - dst: *mut ::std::os::raw::c_void, - dlen: *mut size_t, - src: *const ::std::os::raw::c_void, - slen: size_t, - level: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_useek( - fp: *mut BGZF, - uoffset: off_t, - where_: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_utell(fp: *mut BGZF) -> off_t; -} -extern "C" { - pub fn bgzf_index_build_init(fp: *mut BGZF) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_load( - fp: *mut BGZF, - bname: *const ::std::os::raw::c_char, - suffix: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_load_hfile( - fp: *mut BGZF, - idx: *mut hFILE, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_dump( - fp: *mut BGZF, - bname: *const ::std::os::raw::c_char, - suffix: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bgzf_index_dump_hfile( - fp: *mut BGZF, - idx: *mut hFILE, - name: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_trim_alleles(header: *const bcf_hdr_t, line: *mut bcf1_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_alleles( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - mask: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_remove_allele_set( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - rm_set: *const kbitset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_calc_ac( - header: *const bcf_hdr_t, - line: *mut bcf1_t, - ac: *mut ::std::os::raw::c_int, - which: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_gt_type( - fmt_ptr: *mut bcf_fmt_t, - isample: ::std::os::raw::c_int, - ial: *mut ::std::os::raw::c_int, - jal: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tbx_conf_t { - pub preset: i32, - pub sc: i32, - pub bc: i32, - pub ec: i32, - pub meta_char: i32, - pub line_skip: i32, -} -#[test] -fn bindgen_test_layout_tbx_conf_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(tbx_conf_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(tbx_conf_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).preset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(preset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sc as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(sc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(bc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ec as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(ec) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).meta_char as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(meta_char) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line_skip as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(tbx_conf_t), - "::", - stringify!(line_skip) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tbx_t { - pub conf: tbx_conf_t, - pub idx: *mut hts_idx_t, - pub dict: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_tbx_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(tbx_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(tbx_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(conf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idx as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(tbx_t), - "::", - stringify!(dict) - ) - ); -} -extern "C" { - pub static tbx_conf_gff: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_bed: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_psltbl: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_sam: tbx_conf_t; -} -extern "C" { - pub static tbx_conf_vcf: tbx_conf_t; -} -extern "C" { - pub fn tbx_name2id(tbx: *mut tbx_t, ss: *const ::std::os::raw::c_char) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_get_bgzfp(fp: *mut htsFile) -> *mut BGZF; -} -extern "C" { - pub fn tbx_readrec( - fp: *mut BGZF, - tbxv: *mut ::std::os::raw::c_void, - sv: *mut ::std::os::raw::c_void, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index( - fp: *mut BGZF, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_build( - fn_: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_build2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_build3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - min_shift: ::std::os::raw::c_int, - n_threads: ::std::os::raw::c_int, - conf: *const tbx_conf_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tbx_index_load(fn_: *const ::std::os::raw::c_char) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_load2( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_index_load3( - fn_: *const ::std::os::raw::c_char, - fnidx: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut tbx_t; -} -extern "C" { - pub fn tbx_seqnames( - tbx: *mut tbx_t, - n: *mut ::std::os::raw::c_int, - ) -> *mut *const ::std::os::raw::c_char; -} -extern "C" { - pub fn tbx_destroy(tbx: *mut tbx_t); -} -pub const bcf_sr_opt_t_BCF_SR_REQUIRE_IDX: bcf_sr_opt_t = 0; -pub const bcf_sr_opt_t_BCF_SR_PAIR_LOGIC: bcf_sr_opt_t = 1; -pub const bcf_sr_opt_t_BCF_SR_ALLOW_NO_IDX: bcf_sr_opt_t = 2; -pub type bcf_sr_opt_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_sr_region_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_sr_regions_t { - pub tbx: *mut tbx_t, - pub itr: *mut hts_itr_t, - pub line: kstring_t, - pub file: *mut htsFile, - pub fname: *mut ::std::os::raw::c_char, - pub is_bin: ::std::os::raw::c_int, - pub als: *mut *mut ::std::os::raw::c_char, - pub als_str: kstring_t, - pub nals: ::std::os::raw::c_int, - pub mals: ::std::os::raw::c_int, - pub als_type: ::std::os::raw::c_int, - pub missed_reg_handler: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut bcf_sr_regions_t, arg2: *mut ::std::os::raw::c_void), - >, - pub missed_reg_data: *mut ::std::os::raw::c_void, - pub regs: *mut bcf_sr_region_t, - pub seq_hash: *mut ::std::os::raw::c_void, - pub seq_names: *mut *mut ::std::os::raw::c_char, - pub nseqs: ::std::os::raw::c_int, - pub iseq: ::std::os::raw::c_int, - pub start: hts_pos_t, - pub end: hts_pos_t, - pub prev_seq: ::std::os::raw::c_int, - pub prev_start: hts_pos_t, - pub prev_end: hts_pos_t, -} -#[test] -fn bindgen_test_layout_bcf_sr_regions_t() { - assert_eq!( - ::std::mem::size_of::(), - 200usize, - concat!("Size of: ", stringify!(bcf_sr_regions_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_regions_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(tbx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).line as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).is_bin as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(is_bin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als_str as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als_str) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nals as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(nals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mals as *const _ as usize }, - 100usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(mals) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).als_type as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(als_type) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).missed_reg_handler as *const _ as usize - }, - 112usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(missed_reg_handler) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).missed_reg_data as *const _ as usize - }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(missed_reg_data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regs as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_hash as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(seq_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_names as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(seq_names) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nseqs as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(nseqs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).iseq as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(iseq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(end) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_seq as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_start as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev_end as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_regions_t), - "::", - stringify!(prev_end) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_sr_t { - pub file: *mut htsFile, - pub tbx_idx: *mut tbx_t, - pub bcf_idx: *mut hts_idx_t, - pub header: *mut bcf_hdr_t, - pub itr: *mut hts_itr_t, - pub fname: *mut ::std::os::raw::c_char, - pub buffer: *mut *mut bcf1_t, - pub nbuffer: ::std::os::raw::c_int, - pub mbuffer: ::std::os::raw::c_int, - pub nfilter_ids: ::std::os::raw::c_int, - pub filter_ids: *mut ::std::os::raw::c_int, - pub samples: *mut ::std::os::raw::c_int, - pub n_smpl: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_bcf_sr_t() { - assert_eq!( - ::std::mem::size_of::(), - 96usize, - concat!("Size of: ", stringify!(bcf_sr_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_sr_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).file as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(file) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tbx_idx as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(tbx_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bcf_idx as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(bcf_idx) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).header as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(header) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).itr as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(itr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fname as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(fname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).buffer as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(buffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nbuffer as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mbuffer as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(mbuffer) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nfilter_ids as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(nfilter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filter_ids as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(filter_ids) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_sr_t), - "::", - stringify!(n_smpl) - ) - ); -} -pub const bcf_sr_error_open_failed: bcf_sr_error = 0; -pub const bcf_sr_error_not_bgzf: bcf_sr_error = 1; -pub const bcf_sr_error_idx_load_failed: bcf_sr_error = 2; -pub const bcf_sr_error_file_type_error: bcf_sr_error = 3; -pub const bcf_sr_error_api_usage_error: bcf_sr_error = 4; -pub const bcf_sr_error_header_error: bcf_sr_error = 5; -pub const bcf_sr_error_no_eof: bcf_sr_error = 6; -pub const bcf_sr_error_no_memory: bcf_sr_error = 7; -pub const bcf_sr_error_vcf_parse_error: bcf_sr_error = 8; -pub const bcf_sr_error_bcf_read_error: bcf_sr_error = 9; -pub const bcf_sr_error_noidx_error: bcf_sr_error = 10; -pub type bcf_sr_error = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bcf_srs_t { - pub collapse: ::std::os::raw::c_int, - pub apply_filters: *mut ::std::os::raw::c_char, - pub require_index: ::std::os::raw::c_int, - pub max_unpack: ::std::os::raw::c_int, - pub has_line: *mut ::std::os::raw::c_int, - pub errnum: bcf_sr_error, - pub readers: *mut bcf_sr_t, - pub nreaders: ::std::os::raw::c_int, - pub streaming: ::std::os::raw::c_int, - pub explicit_regs: ::std::os::raw::c_int, - pub samples: *mut *mut ::std::os::raw::c_char, - pub regions: *mut bcf_sr_regions_t, - pub targets: *mut bcf_sr_regions_t, - pub targets_als: ::std::os::raw::c_int, - pub targets_exclude: ::std::os::raw::c_int, - pub tmps: kstring_t, - pub n_smpl: ::std::os::raw::c_int, - pub n_threads: ::std::os::raw::c_int, - pub p: *mut htsThreadPool, - pub aux: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_bcf_srs_t() { - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(bcf_srs_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bcf_srs_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).collapse as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(collapse) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).apply_filters as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(apply_filters) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).require_index as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(require_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).max_unpack as *const _ as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(max_unpack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_line as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(has_line) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).errnum as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(errnum) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).readers as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(readers) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nreaders as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(nreaders) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).streaming as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(streaming) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).explicit_regs as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(explicit_regs) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).samples as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(samples) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regions as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(regions) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_als as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_als) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).targets_exclude as *const _ as usize }, - 92usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(targets_exclude) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tmps as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(tmps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_smpl as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_smpl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_threads as *const _ as usize }, - 124usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(n_threads) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).aux as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(bcf_srs_t), - "::", - stringify!(aux) - ) - ); -} -extern "C" { - pub fn bcf_sr_init() -> *mut bcf_srs_t; -} -extern "C" { - pub fn bcf_sr_destroy(readers: *mut bcf_srs_t); -} -extern "C" { - pub fn bcf_sr_strerror(errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bcf_sr_set_opt(readers: *mut bcf_srs_t, opt: bcf_sr_opt_t, ...) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_threads( - files: *mut bcf_srs_t, - n_threads: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_destroy_threads(files: *mut bcf_srs_t); -} -extern "C" { - pub fn bcf_sr_add_reader( - readers: *mut bcf_srs_t, - fname: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_remove_reader(files: *mut bcf_srs_t, i: ::std::os::raw::c_int); -} -extern "C" { - pub fn bcf_sr_next_line(readers: *mut bcf_srs_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_seek( - readers: *mut bcf_srs_t, - seq: *const ::std::os::raw::c_char, - pos: hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_samples( - readers: *mut bcf_srs_t, - samples: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_targets( - readers: *mut bcf_srs_t, - targets: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - alleles: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_set_regions( - readers: *mut bcf_srs_t, - regions: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_init( - regions: *const ::std::os::raw::c_char, - is_file: ::std::os::raw::c_int, - chr: ::std::os::raw::c_int, - from: ::std::os::raw::c_int, - to: ::std::os::raw::c_int, - ) -> *mut bcf_sr_regions_t; -} -extern "C" { - pub fn bcf_sr_regions_destroy(regions: *mut bcf_sr_regions_t); -} -extern "C" { - pub fn bcf_sr_regions_seek( - regions: *mut bcf_sr_regions_t, - chr: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_next(reg: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_overlap( - reg: *mut bcf_sr_regions_t, - seq: *const ::std::os::raw::c_char, - start: hts_pos_t, - end: hts_pos_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcf_sr_regions_flush(regs: *mut bcf_sr_regions_t) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kbitset_t { - pub n: size_t, - pub n_max: size_t, - pub b: [::std::os::raw::c_ulong; 1usize], -} -#[test] -fn bindgen_test_layout_kbitset_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_max as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(n_max) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_t), - "::", - stringify!(b) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kbitset_iter_t { - pub mask: ::std::os::raw::c_ulong, - pub elt: size_t, - pub i: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_kbitset_iter_t() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(kbitset_iter_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mask as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(mask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).elt as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(elt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).i as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(kbitset_iter_t), - "::", - stringify!(i) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct faidx_t { - _unused: [u8; 0], -} -pub const fai_format_options_FAI_NONE: fai_format_options = 0; -pub const fai_format_options_FAI_FASTA: fai_format_options = 1; -pub const fai_format_options_FAI_FASTQ: fai_format_options = 2; -pub type fai_format_options = u32; -extern "C" { - pub fn fai_build3( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_build(fn_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_destroy(fai: *mut faidx_t); -} -pub const fai_load_options_FAI_CREATE: fai_load_options = 1; -pub type fai_load_options = u32; -extern "C" { - pub fn fai_load3( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load(fn_: *const ::std::os::raw::c_char) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load3_format( - fn_: *const ::std::os::raw::c_char, - fnfai: *const ::std::os::raw::c_char, - fngzi: *const ::std::os::raw::c_char, - flags: ::std::os::raw::c_int, - format: fai_format_options, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_load_format( - fn_: *const ::std::os::raw::c_char, - format: fai_format_options, - ) -> *mut faidx_t; -} -extern "C" { - pub fn fai_fetch( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetch64( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetchqual( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_fetchqual64( - fai: *const faidx_t, - reg: *const ::std::os::raw::c_char, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_fetch_seq( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: ::std::os::raw::c_int, - p_end_i: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_seq64( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: hts_pos_t, - p_end_i: hts_pos_t, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_qual( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: ::std::os::raw::c_int, - p_end_i: ::std::os::raw::c_int, - len: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_fetch_qual64( - fai: *const faidx_t, - c_name: *const ::std::os::raw::c_char, - p_beg_i: hts_pos_t, - p_end_i: hts_pos_t, - len: *mut hts_pos_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_has_seq( - fai: *const faidx_t, - seq: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_nseq(fai: *const faidx_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faidx_iseq( - fai: *const faidx_t, - i: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn faidx_seq_len( - fai: *const faidx_t, - seq: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fai_parse_region( - fai: *const faidx_t, - s: *const ::std::os::raw::c_char, - tid: *mut ::std::os::raw::c_int, - beg: *mut hts_pos_t, - end: *mut hts_pos_t, - flags: ::std::os::raw::c_int, - ) -> *const ::std::os::raw::c_char; -} -extern "C" { - pub fn fai_set_cache_size(fai: *mut faidx_t, cache_size: ::std::os::raw::c_int); -} -extern "C" { - pub fn fai_path(fa: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool_process { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hts_tpool_result { - _unused: [u8; 0], -} -extern "C" { - pub fn hts_tpool_init(n: ::std::os::raw::c_int) -> *mut hts_tpool; -} -extern "C" { - pub fn hts_tpool_size(p: *mut hts_tpool) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch2( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - nonblock: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_dispatch3( - p: *mut hts_tpool, - q: *mut hts_tpool_process, - exec_func: ::std::option::Option< - unsafe extern "C" fn(arg: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_void, - >, - arg: *mut ::std::os::raw::c_void, - job_cleanup: ::std::option::Option, - result_cleanup: ::std::option::Option< - unsafe extern "C" fn(data: *mut ::std::os::raw::c_void), - >, - nonblock: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_wake_dispatch(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_flush(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_reset( - q: *mut hts_tpool_process, - free_results: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_qsize(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_destroy(p: *mut hts_tpool); -} -extern "C" { - pub fn hts_tpool_kill(p: *mut hts_tpool); -} -extern "C" { - pub fn hts_tpool_next_result(q: *mut hts_tpool_process) -> *mut hts_tpool_result; -} -extern "C" { - pub fn hts_tpool_next_result_wait(q: *mut hts_tpool_process) -> *mut hts_tpool_result; -} -extern "C" { - pub fn hts_tpool_delete_result(r: *mut hts_tpool_result, free_data: ::std::os::raw::c_int); -} -extern "C" { - pub fn hts_tpool_result_data(r: *mut hts_tpool_result) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn hts_tpool_process_init( - p: *mut hts_tpool, - qsize: ::std::os::raw::c_int, - in_only: ::std::os::raw::c_int, - ) -> *mut hts_tpool_process; -} -extern "C" { - pub fn hts_tpool_process_destroy(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_empty(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_len(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_sz(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_shutdown(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_is_shutdown(q: *mut hts_tpool_process) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hts_tpool_process_attach(p: *mut hts_tpool, q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_detach(p: *mut hts_tpool, q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_ref_incr(q: *mut hts_tpool_process); -} -extern "C" { - pub fn hts_tpool_process_ref_decr(q: *mut hts_tpool_process); -} -extern "C" { - #[link_name = "\u{1}_wrap_kbs_init2"] - pub fn kbs_init2(ni: size_t, fill: ::std::os::raw::c_int) -> *mut kbitset_t; -} -extern "C" { - #[link_name = "\u{1}_wrap_kbs_init"] - pub fn kbs_init(ni: size_t) -> *mut kbitset_t; -} -extern "C" { - #[link_name = "\u{1}_wrap_kbs_insert"] - pub fn kbs_insert(bs: *mut kbitset_t, i: ::std::os::raw::c_int); -} -extern "C" { - #[link_name = "\u{1}_wrap_kbs_destroy"] - pub fn kbs_destroy(bs: *mut kbitset_t); -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: ::std::os::raw::c_uint, - pub fp_offset: ::std::os::raw::c_uint, - pub overflow_arg_area: *mut ::std::os::raw::c_void, - pub reg_save_area: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout___va_list_tag() { - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} diff --git a/hts-sys/src/lib.rs b/hts-sys/src/lib.rs deleted file mode 100644 index ca296cd1e..000000000 --- a/hts-sys/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![allow(non_upper_case_globals)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(clippy::all)] -#![allow(improper_ctypes)] -//! This module exposes the raw [HTSlib](https://github.com/samtools/htslib) bindings for reading and writing -//! genomics file formats like SAM, BAM, CRAM, VCF, BCF and tabix. -//! Instead of using this crate directly, it is recommended to use [rust-htslib](https://docs.rs/rust-htslib) -//! instead, which has a more idiomatic and high-level API and builds on top of this crate. - -#[cfg(feature = "bzip2")] -extern crate bzip2_sys; -#[cfg(feature = "curl")] -extern crate curl_sys; -#[cfg(feature = "libdeflate")] -extern crate libdeflate_sys; -extern crate libz_sys; -#[cfg(feature = "lzma")] -extern crate lzma_sys; - -// include on-the-fly generated bindings -include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/hts-sys/wrapper.c b/hts-sys/wrapper.c deleted file mode 100644 index a32af11ce..000000000 --- a/hts-sys/wrapper.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "wrapper.h" - - -kbitset_t *wrap_kbs_init2(size_t ni, int fill) -{ - return kbs_init2(ni, fill); -} - -kbitset_t *wrap_kbs_init(size_t ni) -{ - return wrap_kbs_init2(ni, 0); -} - -void wrap_kbs_insert(kbitset_t *bs, int i) -{ - kbs_insert(bs, i); -} - -void wrap_kbs_destroy(kbitset_t *bs) -{ - kbs_destroy(bs); -} diff --git a/hts-sys/wrapper.h b/hts-sys/wrapper.h deleted file mode 100644 index 1800aa416..000000000 --- a/hts-sys/wrapper.h +++ /dev/null @@ -1,35 +0,0 @@ -#include "htslib/htslib/hts.h" -#include "htslib/htslib/vcf.h" -#include "htslib/htslib/sam.h" -#include "htslib/htslib/cram.h" -#include "htslib/htslib/bgzf.h" -#include "htslib/htslib/vcfutils.h" -#include "htslib/htslib/tbx.h" -#include "htslib/htslib/synced_bcf_reader.h" -#include "htslib/htslib/kbitset.h" -#include "htslib/htslib/faidx.h" -#include "htslib/htslib/thread_pool.h" - -// The following functions have to be wrapped here because they are inline in htslib. - -/** - *
- */ -kbitset_t *wrap_kbs_init2(size_t ni, int fill); - -/** - *
- */ -kbitset_t *wrap_kbs_init(size_t ni); - - -/** - *
- */ -void wrap_kbs_insert(kbitset_t *bs, int i); - - -/** - *
- */ -void wrap_kbs_destroy(kbitset_t *bs); diff --git a/src/bam/buffer.rs b/src/bam/buffer.rs index 0e71fdfa7..2bf41d589 100644 --- a/src/bam/buffer.rs +++ b/src/bam/buffer.rs @@ -11,7 +11,6 @@ use std::str; use crate::bam; use crate::bam::Read; use crate::errors::{Error, Result}; - /// A buffer for BAM records. This allows access regions in a sorted BAM file while iterating /// over it in a single pass. /// The buffer is implemented as a ringbuffer, such that extension or movement to the right has @@ -25,6 +24,7 @@ pub struct RecordBuffer { cache_cigar: bool, min_refetch_distance: u64, buffer_record: Rc, + start_pos: Option, } unsafe impl Sync for RecordBuffer {} @@ -45,6 +45,7 @@ impl RecordBuffer { cache_cigar, min_refetch_distance: 1, buffer_record: Rc::new(bam::Record::new()), + start_pos: Some(0), } } @@ -57,16 +58,16 @@ impl RecordBuffer { } /// Return start position of buffer - fn start(&self) -> Option { + pub fn start(&self) -> Option { self.inner.front().map(|rec| rec.pos() as u64) } /// Return end position of buffer. - fn end(&self) -> Option { + pub fn end(&self) -> Option { self.inner.back().map(|rec| rec.pos() as u64) } - fn tid(&self) -> Option { + pub fn tid(&self) -> Option { self.inner.back().map(|rec| rec.tid()) } @@ -89,7 +90,7 @@ impl RecordBuffer { if self.inner.is_empty() || window_start.saturating_sub(self.end().unwrap()) >= self.min_refetch_distance || self.tid().unwrap() != tid as i32 - || self.start().unwrap() > window_start + || self.start().unwrap() > self.start_pos.unwrap() { let end = self.reader.header.target_len(tid).unwrap(); self.reader.fetch((tid, window_start, end))?; @@ -145,6 +146,7 @@ impl RecordBuffer { added += 1; } } + self.start_pos = Some(self.start().unwrap_or(window_start)); Ok((added, deleted)) } else { diff --git a/src/bam/ext.rs b/src/bam/ext.rs index c113d2920..614498049 100644 --- a/src/bam/ext.rs +++ b/src/bam/ext.rs @@ -434,6 +434,9 @@ impl BamRecordExtensions for bam::Record { fn reference_start(&self) -> i64 { self.pos() } + + /// Calculate the rightmost base position of an alignment on the reference genome. + /// Returns the coordinate of the first base after the alignment (0-based). fn reference_end(&self) -> i64 { unsafe { htslib::bam_endpos(self.inner_ptr()) } } diff --git a/src/bam/header.rs b/src/bam/header.rs index 7e80311bd..b8a6a25e7 100644 --- a/src/bam/header.rs +++ b/src/bam/header.rs @@ -7,6 +7,7 @@ use crate::bam::HeaderView; use lazy_static::lazy_static; use linear_map::LinearMap; use regex::Regex; +use std::borrow::Cow; use std::collections::HashMap; /// A BAM header. @@ -63,12 +64,15 @@ impl Header { self.records.join(&b'\n') } + /// This returns a header as a HashMap. + /// Comment lines starting with "@CO" will NOT be included in the HashMap. + /// Comment lines can be obtained by the `comments` function. pub fn to_hashmap(&self) -> HashMap>> { let mut header_map = HashMap::default(); lazy_static! { static ref REC_TYPE_RE: Regex = Regex::new(r"@([A-Z][A-Z])").unwrap(); - static ref TAG_RE: Regex = Regex::new(r"([A-Za-z][A-Za-z0-9]):([ -~]+)").unwrap(); + static ref TAG_RE: Regex = Regex::new(r"([A-Za-z][A-Za-z0-9]):([ -~]*)").unwrap(); } let header_string = String::from_utf8(self.to_bytes()).unwrap(); @@ -83,6 +87,9 @@ impl Header { .unwrap() .as_str() .to_owned(); + if record_type.eq("CO") { + continue; + } let mut field = LinearMap::default(); for part in parts.iter().skip(1) { let cap = TAG_RE.captures(part).unwrap(); @@ -97,6 +104,15 @@ impl Header { } header_map } + + /// Returns an iterator of comment lines. + pub fn comments(&self) -> impl Iterator> { + self.records.iter().flat_map(|r| { + r.split(|x| x == &b'\n') + .filter(|x| x.starts_with(b"@CO\t")) + .map(|x| String::from_utf8_lossy(&x[4..])) + }) + } } /// Header record. @@ -123,7 +139,7 @@ impl<'a> HeaderRecord<'a> { /// * `tag` - the tag identifier /// * `value` - the value. Can be any type convertible into a string. Preferably numbers or /// strings. - pub fn push_tag(&mut self, tag: &'a [u8], value: &V) -> &mut Self { + pub fn push_tag(&mut self, tag: &'a [u8], value: V) -> &mut Self { self.tags.push((tag, value.to_string().into_bytes())); self } @@ -140,3 +156,22 @@ impl<'a> HeaderRecord<'a> { out } } + +#[cfg(test)] +mod tests { + use super::HeaderRecord; + + #[test] + fn test_push_tag() { + let mut record = HeaderRecord::new(b"HD"); + record.push_tag(b"X1", 0); + record.push_tag(b"X2", &0); + + let x = "x".to_string(); + record.push_tag(b"X3", x.as_str()); + record.push_tag(b"X4", &x); + record.push_tag(b"X5", x); + + assert_eq!(record.to_bytes(), b"@HD\tX1:0\tX2:0\tX3:x\tX4:x\tX5:x"); + } +} diff --git a/src/bam/mod.rs b/src/bam/mod.rs index 0bc71f9c5..ddf1d3221 100644 --- a/src/bam/mod.rs +++ b/src/bam/mod.rs @@ -32,7 +32,9 @@ use crate::utils::path_as_bytes; pub use crate::bam::buffer::RecordBuffer; pub use crate::bam::header::Header; pub use crate::bam::record::Record; -use std::convert::TryInto; +use hts_sys::{hts_fmt_option, sam_fields}; +use std::convert::{TryFrom, TryInto}; +use std::mem::MaybeUninit; /// # Safety /// @@ -106,7 +108,7 @@ pub trait Read: Sized { /// match result { /// Ok(_) => { /// println!("Read sequence: {:?}", record.seq().as_bytes()); - /// }, + /// } /// Err(_) => panic!("BAM parsing failed...") /// } /// } @@ -217,6 +219,31 @@ pub trait Read: Sized { /// /// * `tpool` - thread pool to use for compression work. fn set_thread_pool(&mut self, tpool: &ThreadPool) -> Result<()>; + + /// If the underlying file is in CRAM format, allows modifying CRAM options. + /// Note that this method does *not* check that the underlying file actually is in CRAM format. + /// + /// # Examples + /// + /// Set the required fields to RNAME and FLAG, + /// potentially allowing htslib to skip over the rest, + /// resulting in faster iteration: + /// ``` + /// use rust_htslib::bam::{Read, Reader}; + /// use hts_sys; + /// let mut cram = Reader::from_path(&"test/test_cram.cram").unwrap(); + /// cram.set_cram_options(hts_sys::hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS, + /// hts_sys::sam_fields_SAM_RNAME | hts_sys::sam_fields_SAM_FLAG).unwrap(); + /// ``` + fn set_cram_options(&mut self, fmt_opt: hts_fmt_option, fields: sam_fields) -> Result<()> { + unsafe { + if hts_sys::hts_set_opt(self.htsfile(), fmt_opt, fields) != 0 { + Err(Error::HtsSetOpt) + } else { + Ok(()) + } + } + } } /// A BAM reader. @@ -471,6 +498,7 @@ pub enum FetchDefinition<'a> { /// Only reads with the BAM flag BAM_FUNMAP (which might not be all reads with reference = -1) Unmapped, } + impl<'a, X: Into, Y: Into> From<(i32, X, Y)> for FetchDefinition<'a> { @@ -480,6 +508,7 @@ impl<'a, X: Into, Y: Into> From<(i32, X, Y)> FetchDefinition::Region(tup.0, start.0, stop.0) } } + impl<'a, X: Into, Y: Into> From<(u32, X, Y)> for FetchDefinition<'a> { @@ -563,7 +592,7 @@ impl<'a, T: AsRef<[u8]>, X: Into, Y: Into> Fro pub struct IndexedReader { htsfile: *mut htslib::htsFile, header: Rc, - idx: *mut htslib::hts_idx_t, + idx: Rc, itr: Option<*mut htslib::hts_itr_t>, tpool: Option, } @@ -609,7 +638,7 @@ impl IndexedReader { Ok(IndexedReader { htsfile, header: Rc::new(HeaderView::new(header)), - idx, + idx: Rc::new(IndexView::new(idx)), itr: None, tpool: None, }) @@ -637,7 +666,7 @@ impl IndexedReader { Ok(IndexedReader { htsfile, header: Rc::new(HeaderView::new(header)), - idx, + idx: Rc::new(IndexView::new(idx)), itr: None, tpool: None, }) @@ -648,7 +677,7 @@ impl IndexedReader { /// /// Both iterating (with [.records()](trait.Read.html#tymethod.records)) and looping without allocation (with [.read()](trait.Read.html#tymethod.read) are a two stage process: /// 1. 'fetch' the region of interest - /// 2. iter/loop trough the reads. + /// 2. iter/loop through the reads. /// /// Example: /// ``` @@ -674,6 +703,8 @@ impl IndexedReader { /// coordinates' expansion), i32, u32, and u64 (with a possible panic! if the coordinate /// won't fit an i64). /// + /// `start` and `stop` are zero-based. `start` is inclusive, `stop` is exclusive. + /// /// This replaces the old fetch and fetch_str implementations. pub fn fetch<'a, T: Into>>(&mut self, fetch_definition: T) -> Result<()> { //this 'compile time redirect' safes us @@ -706,12 +737,7 @@ impl IndexedReader { match tid { Some(tid) => { //'large position' spec says target len must will fit into an i64. - let len: i64 = self - .header - .target_len(tid as u32) - .unwrap() - .try_into() - .unwrap(); + let len: i64 = self.header.target_len(tid).unwrap().try_into().unwrap(); self._fetch_by_coord_tuple(tid as i32, 0, len) } None => self._fetch_by_str(s), @@ -726,7 +752,7 @@ impl IndexedReader { if let Some(itr) = self.itr { unsafe { htslib::hts_itr_destroy(itr) } } - let itr = unsafe { htslib::sam_itr_queryi(self.idx, tid as i32, beg as i64, end as i64) }; + let itr = unsafe { htslib::sam_itr_queryi(self.index().inner_ptr(), tid, beg, end) }; if itr.is_null() { self.itr = None; Err(Error::Fetch) @@ -744,7 +770,7 @@ impl IndexedReader { let rptr = rstr.as_ptr(); let itr = unsafe { htslib::sam_itr_querys( - self.idx, + self.index().inner_ptr(), self.header().inner_ptr() as *mut hts_sys::sam_hdr_t, rptr, ) @@ -783,6 +809,163 @@ impl IndexedReader { pub fn set_reference>(&mut self, path: P) -> Result<()> { unsafe { set_fai_filename(self.htsfile, path) } } + + pub fn index(&self) -> &IndexView { + &self.idx + } + + // Analogous to slow_idxstats in samtools, see + // https://github.com/samtools/samtools/blob/556c60fdff977c0e6cadc4c2581661f187098b4d/bam_index.c#L140-L199 + unsafe fn slow_idxstats(&mut self) -> Result> { + self.set_cram_options( + hts_sys::hts_fmt_option_CRAM_OPT_REQUIRED_FIELDS, + hts_sys::sam_fields_SAM_RNAME | hts_sys::sam_fields_SAM_FLAG, + )?; + let header = self.header(); + let h = header.inner; + let mut ret; + let mut last_tid = -2; + let fp = self.htsfile(); + + let nref = + usize::try_from(hts_sys::sam_hdr_nref(h)).map_err(|_| Error::NoSequencesInReference)?; + if nref == 0 { + return Ok(vec![]); + } + let mut counts = vec![vec![0; 2]; nref + 1]; + let mut bb: hts_sys::bam1_t = MaybeUninit::zeroed().assume_init(); + let b = &mut bb as *mut hts_sys::bam1_t; + loop { + ret = hts_sys::sam_read1(fp, h, b); + if ret < 0 { + break; + } + let tid = (*b).core.tid; + if tid >= nref as i32 || tid < -1 { + return Err(Error::InvalidTid { tid }); + } + + if tid != last_tid { + if (last_tid >= -1) && (counts[tid as usize][0] + counts[tid as usize][1]) > 0 { + return Err(Error::BamUnsorted); + } + last_tid = tid; + } + + let idx = if ((*b).core.flag as u32 & hts_sys::BAM_FUNMAP) > 0 { + 1 + } else { + 0 + }; + counts[(*b).core.tid as usize][idx] += 1; + } + + if ret == -1 { + let res = (0..nref) + .map(|i| { + ( + i as i64, + header.target_len(i as u32).unwrap(), + counts[i][0], + counts[i][1], + ) + }) + .chain([(-1, 0, counts[nref][0], counts[nref][1])]) + .collect(); + Ok(res) + } else { + Err(Error::SlowIdxStats) + } + } + + /// Similar to samtools idxstats, this returns a vector of tuples + /// containing the target id, length, number of mapped reads, and number of unmapped reads. + /// The last entry in the vector corresponds to the unmapped reads for the entire file, with + /// the tid set to -1. + pub fn index_stats(&mut self) -> Result> { + let header = self.header(); + let index = self.index(); + if index.inner_ptr().is_null() { + panic!("Index is null"); + } + // the quick index stats method only works for BAM files, not SAM or CRAM + unsafe { + if (*self.htsfile()).format.format != htslib::htsExactFormat_bam { + return self.slow_idxstats(); + } + } + Ok((0..header.target_count()) + .map(|tid| { + let (mapped, unmapped) = index.number_mapped_unmapped(tid); + let tlen = header.target_len(tid).unwrap(); + (tid as i64, tlen, mapped, unmapped) + }) + .chain([(-1, 0, 0, index.number_unmapped())]) + .collect::<_>()) + } +} + +#[derive(Debug)] +pub struct IndexView { + inner: *mut hts_sys::hts_idx_t, + owned: bool, +} + +impl IndexView { + fn new(hts_idx: *mut hts_sys::hts_idx_t) -> Self { + Self { + inner: hts_idx, + owned: true, + } + } + + #[inline] + pub fn inner(&self) -> &hts_sys::hts_idx_t { + unsafe { self.inner.as_ref().unwrap() } + } + + #[inline] + // Pointer to inner hts_idx_t struct + pub fn inner_ptr(&self) -> *const hts_sys::hts_idx_t { + self.inner + } + + #[inline] + pub fn inner_mut(&mut self) -> &mut hts_sys::hts_idx_t { + unsafe { self.inner.as_mut().unwrap() } + } + + #[inline] + // Mutable pointer to hts_idx_t struct + pub fn inner_ptr_mut(&mut self) -> *mut hts_sys::hts_idx_t { + self.inner + } + + /// Get the number of mapped and unmapped reads for a given target id + /// FIXME only valid for BAM, not SAM/CRAM + fn number_mapped_unmapped(&self, tid: u32) -> (u64, u64) { + let (mut mapped, mut unmapped) = (0, 0); + unsafe { + hts_sys::hts_idx_get_stat(self.inner, tid as i32, &mut mapped, &mut unmapped); + } + (mapped, unmapped) + } + + /// Get the total number of unmapped reads in the file + /// FIXME only valid for BAM, not SAM/CRAM + fn number_unmapped(&self) -> u64 { + unsafe { hts_sys::hts_idx_get_n_no_coor(self.inner) } + } +} + +impl Drop for IndexView { + fn drop(&mut self) { + if self.owned { + unsafe { + htslib::hts_idx_destroy(self.inner); + } + } + } } impl Read for IndexedReader { @@ -851,13 +1034,12 @@ impl Drop for IndexedReader { if self.itr.is_some() { htslib::hts_itr_destroy(self.itr.unwrap()); } - htslib::hts_idx_destroy(self.idx); htslib::hts_close(self.htsfile); } } } -#[derive(Debug, Clone, Copy)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Format { Sam, Bam, @@ -945,7 +1127,7 @@ impl Writer { ); (*rec).text = text as *mut c_char; - (*rec).l_text = l_text as u64; + (*rec).l_text = l_text; rec }; @@ -1034,7 +1216,7 @@ impl Writer { /// /// * Uncompressed: No compression, zlib level 0 /// * Fastest: Lowest compression level, zlib level 1 -/// * Maxium: Highest compression level, zlib level 9 +/// * Maximum: Highest compression level, zlib level 9 /// * Level(i): Custom compression level in the range [0, 9] #[derive(Debug, Clone, Copy)] pub enum CompressionLevel { @@ -1210,9 +1392,9 @@ impl HeaderView { header_string.len(), ); - let rec = htslib::sam_hdr_parse((l_text + 1) as u64, text as *const c_char); + let rec = htslib::sam_hdr_parse((l_text + 1), text as *const c_char); (*rec).text = text as *mut c_char; - (*rec).l_text = l_text as u64; + (*rec).l_text = l_text; rec }; @@ -1398,7 +1580,7 @@ CCCCCCCCCCCCCCCCCCC"[..], assert_eq!(c1.inner().core.l_qname, b1.inner().core.l_qname); assert_eq!(c1.inner().core.n_cigar, b1.inner().core.n_cigar); assert_eq!(c1.inner().core.l_qseq, b1.inner().core.l_qseq); - assert_eq!(c1.inner().core.isize, b1.inner().core.isize); + assert_eq!(c1.inner().core.isize_, b1.inner().core.isize_); //... except m_data } } @@ -1615,6 +1797,7 @@ CCCCCCCCCCCCCCCCCCC"[..], let bam = IndexedReader::from_path(&"test/test.bam").expect("Expected valid index."); _test_read_indexed_common(bam); } + #[test] fn test_read_indexed_different_index_name() { let bam = IndexedReader::from_path_and_index( @@ -2870,4 +3053,80 @@ CCCCCCCCCCCCCCCCCCC"[..], assert_eq!(rec.mpos(), -1); } } + + #[test] + fn test_idxstats_bam() { + let mut reader = IndexedReader::from_path("test/test.bam").unwrap(); + let expected = vec![ + (0, 15072423, 6, 0), + (1, 15279345, 0, 0), + (2, 13783700, 0, 0), + (3, 17493793, 0, 0), + (4, 20924149, 0, 0), + (-1, 0, 0, 0), + ]; + let actual = reader.index_stats().unwrap(); + assert_eq!(expected, actual); + } + + #[test] + fn test_number_mapped_and_unmapped_bam() { + let reader = IndexedReader::from_path("test/test.bam").unwrap(); + let expected = (6, 0); + let actual = reader.index().number_mapped_unmapped(0); + assert_eq!(expected, actual); + } + + #[test] + fn test_number_unmapped_global_bam() { + let reader = IndexedReader::from_path("test/test_unmapped.bam").unwrap(); + let expected = 8; + let actual = reader.index().number_unmapped(); + assert_eq!(expected, actual); + } + + #[test] + fn test_idxstats_cram() { + let mut reader = IndexedReader::from_path("test/test_cram.cram").unwrap(); + reader.set_reference("test/test_cram.fa").unwrap(); + let expected = vec![ + (0, 120, 2, 0), + (1, 120, 2, 0), + (2, 120, 2, 0), + (-1, 0, 0, 0), + ]; + let actual = reader.index_stats().unwrap(); + assert_eq!(expected, actual); + } + + #[test] + fn test_slow_idxstats_cram() { + let mut reader = IndexedReader::from_path("test/test_cram.cram").unwrap(); + reader.set_reference("test/test_cram.fa").unwrap(); + let expected = vec![ + (0, 120, 2, 0), + (1, 120, 2, 0), + (2, 120, 2, 0), + (-1, 0, 0, 0), + ]; + let actual = reader.index_stats().unwrap(); + assert_eq!(expected, actual); + } + + // #[test] + // fn test_number_mapped_and_unmapped_cram() { + // let mut reader = IndexedReader::from_path("test/test_cram.cram").unwrap(); + // reader.set_reference("test/test_cram.fa").unwrap(); + // let expected = (2, 0); + // let actual = reader.index().number_mapped_unmapped(0); + // assert_eq!(expected, actual); + // } + // + // #[test] + // fn test_number_unmapped_global_cram() { + // let mut reader = IndexedReader::from_path("test/test_unmapped.cram").unwrap(); + // let expected = 8; + // let actual = reader.index().number_unmapped(); + // assert_eq!(expected, actual); + // } } diff --git a/src/bam/record.rs b/src/bam/record.rs index 13c39e23e..ced3cc8aa 100644 --- a/src/bam/record.rs +++ b/src/bam/record.rs @@ -4,6 +4,7 @@ // except according to those terms. use std::convert::TryFrom; +use std::convert::TryInto; use std::ffi; use std::fmt; use std::marker::PhantomData; @@ -162,8 +163,8 @@ impl Record { let mut sam_string = htslib::kstring_t { s: sam_copy.as_ptr() as *mut c_char, - l: sam_copy.len() as u64, - m: sam_copy.len() as u64, + l: sam_copy.len(), + m: sam_copy.len(), }; let succ = unsafe { @@ -250,7 +251,7 @@ impl Record { } /// Get strand information from record flags. - pub fn strand(&mut self) -> ReqStrand { + pub fn strand(&self) -> ReqStrand { let reverse = self.flags() & 0x10 != 0; if reverse { ReqStrand::Reverse @@ -296,12 +297,12 @@ impl Record { /// Get insert size. pub fn insert_size(&self) -> i64 { - self.inner().core.isize + self.inner().core.isize_ } /// Set insert size. pub fn set_insert_size(&mut self, insert_size: i64) { - self.inner_mut().core.isize = insert_size; + self.inner_mut().core.isize_ = insert_size; } fn qname_capacity(&self) -> usize { @@ -1031,6 +1032,48 @@ impl Record { } } + /// Access the base modifications associated with this Record through the MM tag. + /// Example: + /// ``` + /// use rust_htslib::bam::{Read, Reader, Record}; + /// let mut bam = Reader::from_path(&"test/base_mods/MM-orient.sam").unwrap(); + /// let mut mod_count = 0; + /// for r in bam.records() { + /// let record = r.unwrap(); + /// if let Ok(mods) = record.basemods_iter() { + /// // print metadata for the modifications present in this record + /// for mod_code in mods.recorded() { + /// if let Ok(mod_metadata) = mods.query_type(*mod_code) { + /// println!("mod found with code {}/{} flags: [{} {} {}]", + /// mod_code, *mod_code as u8 as char, + /// mod_metadata.strand, mod_metadata.implicit, mod_metadata.canonical as u8 as char); + /// } + /// } + /// + /// // iterate over the modifications in this record + /// // the modifications are returned as a tuple with the + /// // position within SEQ and an hts_base_mod struct + /// for res in mods { + /// if let Ok( (position, m) ) = res { + /// println!("{} {},{}", position, m.modified_base as u8 as char, m.qual); + /// mod_count += 1; + /// } + /// } + /// }; + /// } + /// assert_eq!(mod_count, 14); + /// ``` + pub fn basemods_iter(&self) -> Result { + BaseModificationsIter::new(self) + } + + /// An iterator that returns all of the modifications for each position as a vector. + /// This is useful for the case where multiple possible modifications can be annotated + /// at a single position (for example a C could be 5-mC or 5-hmC) + pub fn basemods_position_iter(&self) -> Result { + BaseModificationsPositionIter::new(self) + } + /// Infer read pair orientation from record. Returns `SequenceReadPairOrientation::None` if record /// is not paired, mates are not mapping to the same contig, or mates start at the /// same position. @@ -1710,6 +1753,7 @@ custom_derive! { /// ``` #[cfg_attr(feature = "serde_feature", derive(Serialize, Deserialize))] #[derive(NewtypeDeref, + NewtypeDerefMut, NewtypeIndex(usize), NewtypeIndexMut(usize), NewtypeFrom, @@ -1922,7 +1966,7 @@ impl<'a> IntoIterator for &'a CigarString { type IntoIter = ::std::slice::Iter<'a, Cigar>; fn into_iter(self) -> Self::IntoIter { - (&(self.0)).iter() + self.0.iter() } } @@ -1935,6 +1979,16 @@ impl fmt::Display for CigarString { } } +// Get number of leading/trailing softclips if a CigarString taking hardclips into account +fn calc_softclips<'a>(mut cigar: impl DoubleEndedIterator) -> i64 { + match (cigar.next(), cigar.next()) { + (Some(Cigar::HardClip(_)), Some(Cigar::SoftClip(s))) | (Some(Cigar::SoftClip(s)), _) => { + *s as i64 + } + _ => 0, + } +} + #[derive(Eq, PartialEq, Clone, Debug)] pub struct CigarStringView { inner: CigarString, @@ -1964,26 +2018,19 @@ impl CigarStringView { pos } + /// Get the start position of the alignment (0-based). + pub fn pos(&self) -> i64 { + self.pos + } + /// Get number of bases softclipped at the beginning of the alignment. pub fn leading_softclips(&self) -> i64 { - self.first().map_or(0, |cigar| { - if let Cigar::SoftClip(s) = cigar { - *s as i64 - } else { - 0 - } - }) + calc_softclips(self.iter()) } /// Get number of bases softclipped at the end of the alignment. pub fn trailing_softclips(&self) -> i64 { - self.last().map_or(0, |cigar| { - if let Cigar::SoftClip(s) = cigar { - *s as i64 - } else { - 0 - } - }) + calc_softclips(self.iter().rev()) } /// Get number of bases hardclipped at the beginning of the alignment. @@ -2178,6 +2225,242 @@ impl fmt::Display for CigarStringView { } } +pub struct BaseModificationMetadata { + pub strand: i32, + pub implicit: i32, + pub canonical: u8, +} + +/// struct containing the internal state required to access +/// the base modifications for a bam::Record +pub struct BaseModificationState<'a> { + record: &'a Record, + state: *mut htslib::hts_base_mod_state, + buffer: Vec, + buffer_pos: i32, +} + +impl BaseModificationState<'_> { + /// Initialize a new BaseModification struct from a bam::Record + /// This function allocates memory for the state structure + /// and initializes the iterator to the start of the modification + /// records. + fn new<'a>(r: &'a Record) -> Result> { + let mut bm = unsafe { + BaseModificationState { + record: r, + state: hts_sys::hts_base_mod_state_alloc(), + buffer: Vec::new(), + buffer_pos: -1, + } + }; + + if bm.state.is_null() { + panic!("Unable to allocate memory for hts_base_mod_state"); + } + + // parse the MM tag to initialize the state + unsafe { + let ret = hts_sys::bam_parse_basemod(bm.record.inner_ptr(), bm.state); + if ret != 0 { + return Err(Error::BamBaseModificationTagNotFound); + } + } + + let types = bm.recorded(); + bm.buffer.reserve(types.len()); + return Ok(bm); + } + + pub fn buffer_next_mods(&mut self) -> Result { + unsafe { + let ret = hts_sys::bam_next_basemod( + self.record.inner_ptr(), + self.state, + self.buffer.as_mut_ptr(), + self.buffer.capacity() as i32, + &mut self.buffer_pos, + ); + + if ret < 0 { + return Err(Error::BamBaseModificationIterationFailed); + } + + // the htslib API won't write more than buffer.capacity() mods to the output array but it will + // return the actual number of modifications found. We return an error to the caller + // in the case where there was insufficient storage to return all mods. + if ret as usize > self.buffer.capacity() { + return Err(Error::BamBaseModificationTooManyMods); + } + + // we read the modifications directly into the vector, which does + // not update the length so needs to be manually set + self.buffer.set_len(ret as usize); + + return Ok(ret as usize); + } + } + + /// Return an array containing the modification codes listed for this record. + /// Positive values are ascii character codes (eg m), negative values are chEBI codes. + pub fn recorded<'a>(&self) -> &'a [i32] { + unsafe { + let mut n: i32 = 0; + let data_ptr: *const i32 = hts_sys::bam_mods_recorded(self.state, &mut n); + + // htslib should not return a null pointer, even when there are no base mods + if data_ptr.is_null() { + panic!("Unable to obtain pointer to base modifications"); + } + assert!(n >= 0); + return slice::from_raw_parts(data_ptr, n as usize); + } + } + + /// Return metadata for the specified character code indicating the strand + /// the base modification was called on, whether the tag uses implicit mode + /// and the ascii code for the canonical base. + /// If there are multiple modifications with the same code this will return the data + /// for the first mod. See https://github.com/samtools/htslib/issues/1635 + pub fn query_type<'a>(&self, code: i32) -> Result { + unsafe { + let mut strand: i32 = 0; + let mut implicit: i32 = 0; + // This may be i8 or u8 in hts_sys. + let mut canonical: c_char = 0; + + let ret = hts_sys::bam_mods_query_type( + self.state, + code, + &mut strand, + &mut implicit, + &mut canonical, + ); + if ret == -1 { + return Err(Error::BamBaseModificationTypeNotFound); + } else { + return Ok(BaseModificationMetadata { + strand, + implicit, + canonical: canonical.try_into().unwrap(), + }); + } + } + } +} + +impl Drop for BaseModificationState<'_> { + fn drop<'a>(&mut self) { + unsafe { + hts_sys::hts_base_mod_state_free(self.state); + } + } +} + +/// Iterator over the base modifications that returns +/// a vector for all of the mods at each position +pub struct BaseModificationsPositionIter<'a> { + mod_state: BaseModificationState<'a>, +} + +impl BaseModificationsPositionIter<'_> { + fn new<'a>(r: &'a Record) -> Result> { + let state = BaseModificationState::new(r)?; + Ok(BaseModificationsPositionIter { mod_state: state }) + } + + pub fn recorded<'a>(&self) -> &'a [i32] { + return self.mod_state.recorded(); + } + + pub fn query_type<'a>(&self, code: i32) -> Result { + return self.mod_state.query_type(code); + } +} + +impl<'a> Iterator for BaseModificationsPositionIter<'a> { + type Item = Result<(i32, Vec)>; + + fn next(&mut self) -> Option { + let ret = self.mod_state.buffer_next_mods(); + + // Three possible things happened in buffer_next_mods: + // 1. the htslib API call was successful but there are no more mods + // 2. ths htslib API call was successful and we read some mods + // 3. the htslib API call failed, we propogate the error wrapped in an option + match ret { + Ok(num_mods) => { + if num_mods == 0 { + return None; + } else { + let data = (self.mod_state.buffer_pos, self.mod_state.buffer.clone()); + return Some(Ok(data)); + } + } + Err(e) => return Some(Err(e)), + } + } +} + +/// Iterator over the base modifications that returns +/// the next modification found, one by one +pub struct BaseModificationsIter<'a> { + mod_state: BaseModificationState<'a>, + buffer_idx: usize, +} + +impl BaseModificationsIter<'_> { + fn new<'a>(r: &'a Record) -> Result> { + let state = BaseModificationState::new(r)?; + Ok(BaseModificationsIter { + mod_state: state, + buffer_idx: 0, + }) + } + + pub fn recorded<'a>(&self) -> &'a [i32] { + return self.mod_state.recorded(); + } + + pub fn query_type<'a>(&self, code: i32) -> Result { + return self.mod_state.query_type(code); + } +} + +impl<'a> Iterator for BaseModificationsIter<'a> { + type Item = Result<(i32, hts_sys::hts_base_mod)>; + + fn next(&mut self) -> Option { + if self.buffer_idx == self.mod_state.buffer.len() { + // need to use the internal state to read the next + // set of modifications into the buffer + let ret = self.mod_state.buffer_next_mods(); + + match ret { + Ok(num_mods) => { + if num_mods == 0 { + // done iterating + return None; + } else { + // we read some mods, reset the position in the buffer then fall through + self.buffer_idx = 0; + } + } + Err(e) => return Some(Err(e)), + } + } + + // if we got here when there are mods buffered that we haven't emitted yet + assert!(self.buffer_idx < self.mod_state.buffer.len()); + let data = ( + self.mod_state.buffer_pos, + self.mod_state.buffer[self.buffer_idx], + ); + self.buffer_idx += 1; + return Some(Ok(data)); + } +} + #[cfg(test)] mod tests { use super::*; @@ -2193,6 +2476,38 @@ mod tests { } } + #[test] + fn test_cigar_string_view_pos() { + let cigar = CigarString(vec![Cigar::Match(100), Cigar::SoftClip(10)]).into_view(5); + assert_eq!(cigar.pos(), 5); + } + + #[test] + fn test_cigar_string_leading_softclips() { + let cigar = CigarString(vec![Cigar::SoftClip(10), Cigar::Match(100)]).into_view(0); + assert_eq!(cigar.leading_softclips(), 10); + let cigar2 = CigarString(vec![ + Cigar::HardClip(5), + Cigar::SoftClip(10), + Cigar::Match(100), + ]) + .into_view(0); + assert_eq!(cigar2.leading_softclips(), 10); + } + + #[test] + fn test_cigar_string_trailing_softclips() { + let cigar = CigarString(vec![Cigar::Match(100), Cigar::SoftClip(10)]).into_view(0); + assert_eq!(cigar.trailing_softclips(), 10); + let cigar2 = CigarString(vec![ + Cigar::Match(100), + Cigar::SoftClip(10), + Cigar::HardClip(5), + ]) + .into_view(0); + assert_eq!(cigar2.trailing_softclips(), 10); + } + #[test] fn test_cigar_read_pos() { let vpos = 5; // variant position @@ -2591,3 +2906,83 @@ mod alignment_cigar_tests { } } } + +#[cfg(test)] +mod basemod_tests { + use crate::bam::{Read, Reader}; + + #[test] + pub fn test_count_recorded() { + let mut bam = Reader::from_path(&"test/base_mods/MM-double.sam").unwrap(); + + for r in bam.records() { + let record = r.unwrap(); + if let Ok(mods) = record.basemods_iter() { + let n = mods.recorded().len(); + assert_eq!(n, 3); + }; + } + } + + #[test] + pub fn test_query_type() { + let mut bam = Reader::from_path(&"test/base_mods/MM-orient.sam").unwrap(); + + let mut n_fwd = 0; + let mut n_rev = 0; + + for r in bam.records() { + let record = r.unwrap(); + if let Ok(mods) = record.basemods_iter() { + for mod_code in mods.recorded() { + if let Ok(mod_metadata) = mods.query_type(*mod_code) { + if mod_metadata.strand == 0 { + n_fwd += 1; + } + if mod_metadata.strand == 1 { + n_rev += 1; + } + } + } + }; + } + assert_eq!(n_fwd, 2); + assert_eq!(n_rev, 2); + } + + #[test] + pub fn test_mod_iter() { + let mut bam = Reader::from_path(&"test/base_mods/MM-double.sam").unwrap(); + let expected_positions = [1, 7, 12, 13, 13, 22, 30, 31]; + let mut i = 0; + + for r in bam.records() { + let record = r.unwrap(); + for res in record.basemods_iter().unwrap() { + if let Ok((position, _m)) = res { + assert_eq!(position, expected_positions[i]); + i += 1; + } + } + } + } + + #[test] + pub fn test_position_iter() { + let mut bam = Reader::from_path(&"test/base_mods/MM-double.sam").unwrap(); + let expected_positions = [1, 7, 12, 13, 22, 30, 31]; + let expected_counts = [1, 1, 1, 2, 1, 1, 1]; + let mut i = 0; + + for r in bam.records() { + let record = r.unwrap(); + for res in record.basemods_position_iter().unwrap() { + if let Ok((position, elements)) = res { + assert_eq!(position, expected_positions[i]); + assert_eq!(elements.len(), expected_counts[i]); + i += 1; + } + } + } + } +} diff --git a/src/bam/record_serde.rs b/src/bam/record_serde.rs index 7d457c7b7..651867030 100644 --- a/src/bam/record_serde.rs +++ b/src/bam/record_serde.rs @@ -29,7 +29,7 @@ impl Serialize for Record { state.serialize_field("seq_len", &core.l_qseq)?; state.serialize_field("mtid", &core.mtid)?; state.serialize_field("mpos", &core.mpos)?; - state.serialize_field("isize", &core.isize)?; + state.serialize_field("isize", &core.isize_)?; state.serialize_field("data", Bytes::new(self.data()))?; state.end() } @@ -138,7 +138,7 @@ impl<'de> Deserialize<'de> for Record { let mpos = seq .next_element()? .ok_or_else(|| de::Error::invalid_length(0, &self))?; - let isize = seq + let isize_ = seq .next_element()? .ok_or_else(|| de::Error::invalid_length(0, &self))?; let data = seq @@ -159,7 +159,7 @@ impl<'de> Deserialize<'de> for Record { m.l_qseq = seq_len; m.mtid = mtid; m.mpos = mpos; - m.isize = isize; + m.isize_ = isize_; } rec.set_data(&data); @@ -271,7 +271,7 @@ impl<'de> Deserialize<'de> for Record { let seq_len = seq_len.ok_or_else(|| de::Error::missing_field("seq_len"))?; let mtid = mtid.ok_or_else(|| de::Error::missing_field("mtid"))?; let mpos = mpos.ok_or_else(|| de::Error::missing_field("mpos"))?; - let isize = isize.ok_or_else(|| de::Error::missing_field("isize"))?; + let isize_ = isize.ok_or_else(|| de::Error::missing_field("isize"))?; let data = data .ok_or_else(|| de::Error::missing_field("data"))? .into_vec(); @@ -289,7 +289,7 @@ impl<'de> Deserialize<'de> for Record { m.l_qseq = seq_len; m.mtid = mtid; m.mpos = mpos; - m.isize = isize; + m.isize_ = isize_; } rec.set_data(&data); diff --git a/src/bcf/index.rs b/src/bcf/index.rs new file mode 100644 index 000000000..332fa215e --- /dev/null +++ b/src/bcf/index.rs @@ -0,0 +1,100 @@ +use crate::{htslib, utils}; + +#[derive(Debug)] +pub struct BcfBuildError { + pub msg: String, +} + +/// Index type to build. +pub enum Type { + /// Tabix index + Tbx, + /// CSI index, with given minimum shift + Csi(u32), +} + +impl Type { + fn min_shift(&self) -> i32 { + match self { + Self::Tbx => 0, + Self::Csi(x) => *x as i32, + } + } +} + +impl BcfBuildError { + pub fn error_message(error: i32) -> &'static str { + match error { + -1 => "indexing failed", + -2 => "opening @fn failed", + -3 => "format not indexable", + -4 => "failed to create and/or save the index", + _ => "unknown error", + } + } +} +impl std::error::Error for BcfBuildError {} + +impl std::fmt::Display for BcfBuildError { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "BcfBuildError{{msg: {}}}", self.msg) + } +} + +/// Build a bcf or vcf.gz index. +/// Builds tbi or csi depending on index_type. +/// +///``` +/// // Index a sorted bcf file with csi. +/// let bcf_path = concat!(env!("CARGO_MANIFEST_DIR"), "/test/test_multi.bcf"); +/// rust_htslib::bcf::index::build(&bcf_path, Some(&"built_test.csi"), /*n_threads=*/ 4u32, rust_htslib::bcf::index::Type::Csi(14)).expect("Failed to build csi index for bcf file."); +/// assert!(std::path::Path::new(&"built_test.csi").exists()); +/// +/// // Index a bgzip-compresed vcf file with tabix. +/// let vcf_path = concat!(env!("CARGO_MANIFEST_DIR"), "/test/test_left.vcf.gz"); +/// rust_htslib::bcf::index::build(&vcf_path, Some(&"built_test_vcf.tbx"), /*n_threads=*/ 4u32, rust_htslib::bcf::index::Type::Tbx).expect("Failed to build tbx index for vcf file."); +/// assert!(std::path::Path::new(&"built_test_vcf.tbx").exists()); +/// +/// // Cannot build a tbi index for a bcf file: returns an Err(BcfBuildError). +/// assert!(std::panic::catch_unwind(|| rust_htslib::bcf::index::build(bcf_path, Some("built_test.tbi"), 4u32, rust_htslib::bcf::index::Type::Tbx).unwrap()).is_err()); +/// +/// // Cannot built a csi index for a vcf file: returns an Err(BcfBuildError). +/// let vcf_path = concat!(env!("CARGO_MANIFEST_DIR"), "/test/test_various.vcf"); +/// assert!(std::panic::catch_unwind(|| rust_htslib::bcf::index::build(&vcf_path, Some(&"built_test_vcf.csi"), /*n_threads=*/ 4u32, rust_htslib::bcf::index::Type::Csi(14)).expect("Failed to build csi index for vcf file.")).is_err()); +///``` +/// +pub fn build>( + bcf_path: P, + idx_path: Option

, + n_threads: u32, + index_type: Type, +) -> Result<(), BcfBuildError> { + let min_shift = index_type.min_shift(); + let idx_path_cstr = idx_path.and_then(|x| utils::path_to_cstring(&x)); + let bcf_path = utils::path_to_cstring(&bcf_path).ok_or(BcfBuildError { + msg: format!( + "Failed to format bcf_path to cstring: {:?}", + bcf_path.as_ref().display() + ), + })?; + let return_code = unsafe { + htslib::bcf_index_build3( + bcf_path.as_ptr(), + idx_path_cstr + .as_ref() + .map_or(std::ptr::null(), |p| p.as_ptr()), + min_shift, + n_threads as i32, + ) + }; + if return_code == 0 { + Ok(()) + } else { + Err(BcfBuildError { + msg: format!( + "Failed to build bcf index. Error: {return_code:?}/{}", + BcfBuildError::error_message(return_code) + ), + }) + } +} diff --git a/src/bcf/mod.rs b/src/bcf/mod.rs index 3e3b0d6ac..149ddd9a2 100644 --- a/src/bcf/mod.rs +++ b/src/bcf/mod.rs @@ -112,6 +112,7 @@ use url::Url; pub mod buffer; pub mod header; +pub mod index; pub mod record; use crate::bcf::header::{HeaderView, SampleSubset}; @@ -631,7 +632,7 @@ pub mod synced { } } -#[derive(Clone, Copy, Debug)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Format { Vcf, Bcf, @@ -1022,15 +1023,12 @@ mod tests { .expect("Missing tag")[0], format!("string{}", i + 1).as_bytes() ); - println!( - "{}", - String::from_utf8_lossy( - record - .format(b"FS1") - .string() - .expect("Error reading string.")[0] - ) - ); + let fs1_str_vec = record + .format_shared_buffer(b"FS1", &mut buffer) + .string() + .expect("Error reading string."); + assert_eq!(fs1_str_vec.len(), 2); + println!("{}", String::from_utf8_lossy(fs1_str_vec[0])); assert_eq!( record .format(b"FS1") @@ -1551,6 +1549,24 @@ mod tests { ); } + #[test] + fn test_trailing_omitted_format_fields() { + let mut reader = Reader::from_path("test/test_trailing_omitted_format.vcf").unwrap(); + let first_record = reader + .records() + .next() + .unwrap() + .expect("Fail to read record"); + + let expected: Vec<&[u8]> = Vec::new(); + assert_eq!(*first_record.format(b"STR").string().unwrap(), expected,); + assert_eq!( + *first_record.format(b"INT").integer().unwrap(), + vec![&[i32::missing()]], + ); + assert!(first_record.format(b"FLT").float().unwrap()[0][0].is_nan(),); + } + // #[test] // fn test_buffer_lifetime() { // let mut reader = Reader::from_path("test/obs-cornercase.vcf").unwrap(); diff --git a/src/bcf/record.rs b/src/bcf/record.rs index ebca3fac1..c1066cd30 100644 --- a/src/bcf/record.rs +++ b/src/bcf/record.rs @@ -1008,7 +1008,7 @@ impl Record { } pub fn remove_alleles(&mut self, remove: &[bool]) -> Result<()> { - let rm_set = unsafe { htslib::kbs_init(remove.len() as u64) }; + let rm_set = unsafe { htslib::kbs_init(remove.len()) }; for (i, &r) in remove.iter().enumerate() { if r { @@ -1090,6 +1090,19 @@ impl Record { } } +impl Clone for Record { + fn clone(&self) -> Self { + let inner = unsafe { + let inner = htslib::bcf_dup(self.inner); + inner + }; + Record { + inner, + header: self.header.clone(), + } + } +} + impl genome::AbstractLocus for Record { fn contig(&self) -> &str { str::from_utf8( @@ -1238,7 +1251,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { str::from_utf8(self.tag).unwrap().to_owned() } - fn data(&mut self, data_type: u32) -> Result> { + fn data(&mut self, data_type: u32) -> Result> { let mut n: i32 = self.buffer.borrow().len; let c_str = ffi::CString::new(self.tag).unwrap(); let ret = unsafe { @@ -1257,7 +1270,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { -1 => Err(Error::BcfUndefinedTag { tag: self.desc() }), -2 => Err(Error::BcfUnexpectedType { tag: self.desc() }), -3 => Ok(None), - ret => Ok(Some((n as usize, ret))), + ret => Ok(Some(ret)), } } @@ -1271,9 +1284,10 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { /// memory. pub fn integer(mut self) -> Result>> { self.data(htslib::BCF_HT_INT).map(|data| { - data.map(|(n, ret)| { - let values = - unsafe { slice::from_raw_parts(self.buffer.borrow().inner as *const i32, n) }; + data.map(|ret| { + let values = unsafe { + slice::from_raw_parts(self.buffer.borrow().inner as *const i32, ret as usize) + }; BufferBacked::new(&values[..ret as usize], self.buffer) }) }) @@ -1289,9 +1303,10 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { /// memory. pub fn float(mut self) -> Result>> { self.data(htslib::BCF_HT_REAL).map(|data| { - data.map(|(n, ret)| { - let values = - unsafe { slice::from_raw_parts(self.buffer.borrow().inner as *const f32, n) }; + data.map(|ret| { + let values = unsafe { + slice::from_raw_parts(self.buffer.borrow().inner as *const f32, ret as usize) + }; BufferBacked::new(&values[..ret as usize], self.buffer) }) }) @@ -1300,7 +1315,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { /// Get flags from tag. `false` if not set. pub fn flag(&mut self) -> Result { self.data(htslib::BCF_HT_FLAG).map(|data| match data { - Some((_, ret)) => ret == 1, + Some(ret) => ret == 1, None => false, }) } @@ -1313,7 +1328,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Info<'a, B> { /// memory. pub fn string(mut self) -> Result, B>>> { self.data(htslib::BCF_HT_STR).map(|data| { - data.map(|(_, ret)| { + data.map(|ret| { BufferBacked::new( unsafe { slice::from_raw_parts(self.buffer.borrow().inner as *const u8, ret as usize) @@ -1389,7 +1404,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Format<'a, B> { } /// Read and decode format data into a given type. - fn data(&mut self, data_type: u32) -> Result<(usize, i32)> { + fn data(&mut self, data_type: u32) -> Result { let mut n: i32 = self.buffer.borrow().len; let c_str = ffi::CString::new(self.tag).unwrap(); let ret = unsafe { @@ -1410,7 +1425,7 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Format<'a, B> { tag: self.desc(), record: self.record.desc(), }), - ret => Ok((n as usize, ret)), + ret => Ok(ret), } } @@ -1421,12 +1436,17 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Format<'a, B> { /// the BufferBacked object is already dropped, you will access unallocated /// memory. pub fn integer(mut self) -> Result, B>> { - self.data(htslib::BCF_HT_INT).map(|(n, _)| { + self.data(htslib::BCF_HT_INT).map(|ret| { BufferBacked::new( - unsafe { slice::from_raw_parts(self.buffer.borrow_mut().inner as *const i32, n) } - .chunks(self.values_per_sample()) - .map(|s| trim_slice(s)) - .collect(), + unsafe { + slice::from_raw_parts( + self.buffer.borrow_mut().inner as *const i32, + ret as usize, + ) + } + .chunks(self.values_per_sample()) + .map(|s| trim_slice(s)) + .collect(), self.buffer, ) }) @@ -1439,12 +1459,17 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Format<'a, B> { /// the BufferBacked object is already dropped, you will access unallocated /// memory. pub fn float(mut self) -> Result, B>> { - self.data(htslib::BCF_HT_REAL).map(|(n, _)| { + self.data(htslib::BCF_HT_REAL).map(|ret| { BufferBacked::new( - unsafe { slice::from_raw_parts(self.buffer.borrow_mut().inner as *const f32, n) } - .chunks(self.values_per_sample()) - .map(|s| trim_slice(s)) - .collect(), + unsafe { + slice::from_raw_parts( + self.buffer.borrow_mut().inner as *const f32, + ret as usize, + ) + } + .chunks(self.values_per_sample()) + .map(|s| trim_slice(s)) + .collect(), self.buffer, ) }) @@ -1457,17 +1482,22 @@ impl<'a, 'b, B: BorrowMut + Borrow + 'b> Format<'a, B> { /// the BufferBacked object is already dropped, you will access unallocated /// memory. pub fn string(mut self) -> Result, B>> { - self.data(htslib::BCF_HT_STR).map(|(n, _)| { + self.data(htslib::BCF_HT_STR).map(|ret| { + if ret == 0 { + return BufferBacked::new(Vec::new(), self.buffer); + } BufferBacked::new( - unsafe { slice::from_raw_parts(self.buffer.borrow_mut().inner as *const u8, n) } - .chunks(self.values_per_sample()) - .map(|s| { - // stop at zero character - s.split(|c| *c == 0u8) - .next() - .expect("Bug: returned string should not be empty.") - }) - .collect(), + unsafe { + slice::from_raw_parts(self.buffer.borrow_mut().inner as *const u8, ret as usize) + } + .chunks(self.values_per_sample()) + .map(|s| { + // stop at zero character + s.split(|c| *c == 0u8) + .next() + .expect("Bug: returned string should not be empty.") + }) + .collect(), self.buffer, ) }) @@ -1569,6 +1599,26 @@ mod tests { assert_eq!(record.pos(), 0) } + #[test] + fn test_record_clone() { + let tmp = NamedTempFile::new().unwrap(); + let path = tmp.path(); + let header = Header::new(); + let vcf = Writer::from_path(path, &header, true, Format::Vcf).unwrap(); + let mut record = vcf.empty_record(); + let alleles: &[&[u8]] = &[b"AGG", b"TG"]; + record.set_alleles(alleles).expect("Failed to set alleles"); + record.set_pos(6); + + let mut cloned_record = record.clone(); + cloned_record.set_pos(5); + + assert_eq!(record.pos(), 6); + assert_eq!(record.allele_count(), 2); + assert_eq!(cloned_record.pos(), 5); + assert_eq!(cloned_record.allele_count(), 2); + } + #[test] fn test_record_has_filter_pass_is_default() { let tmp = NamedTempFile::new().unwrap(); diff --git a/src/bgzf/mod.rs b/src/bgzf/mod.rs index 30270c940..06d6ee7a1 100644 --- a/src/bgzf/mod.rs +++ b/src/bgzf/mod.rs @@ -112,11 +112,7 @@ impl Reader { impl std::io::Read for Reader { fn read(&mut self, buf: &mut [u8]) -> std::io::Result { let nbytes = unsafe { - htslib::bgzf_read( - self.inner, - buf.as_mut_ptr() as *mut libc::c_void, - buf.len() as u64, - ) + htslib::bgzf_read(self.inner, buf.as_mut_ptr() as *mut libc::c_void, buf.len()) }; if nbytes < 0 { Err(std::io::Error::new( @@ -129,10 +125,172 @@ impl std::io::Read for Reader { } } +/// The CompressionLevel used by the underlying GZIP writer +/// Note that the special level NoCompression will not use the GZIP writer. +/// Compression levels in BGZF files +/// +/// * Uncompressed: No compression, zlib level 0 +/// * Fastest: Lowest compression level, zlib level 1 +/// * Maximum: Highest compression level, zlib level 9 +/// * Default: Default compression level, zlib level 6 +/// * Level(i): Custom compression level in the range [0, 9] +/// * NoCompression: No compression, zlib not used. Output will be identical to input +#[derive(Debug, Clone, Copy)] +pub enum CompressionLevel { + Default, + NoCompression, + Uncompressed, + Fastest, + Maximum, + Level(i8), +} +impl CompressionLevel { + // Convert and check the variants of the `CompressionLevel` enum to a numeric level + fn convert(self) -> Result { + match self { + CompressionLevel::NoCompression => Ok(-2), + CompressionLevel::Default => Ok(-1), + CompressionLevel::Uncompressed => Ok(0), + CompressionLevel::Fastest => Ok(1), + CompressionLevel::Maximum => Ok(9), + CompressionLevel::Level(i @ -2..=9) => Ok(i), + CompressionLevel::Level(i) => Err(Error::BgzfInvalidCompressionLevel { level: i }), + } + } +} + +/// A writer that writes uncompressed, gzip, and bgzip files. +#[derive(Debug)] +pub struct Writer { + inner: *mut htslib::BGZF, + tpool: Option, +} + +impl Writer { + /// Create a new Writer to write to stdout with default compression. + pub fn from_stdout() -> Result { + Self::from_stdout_with_compression(CompressionLevel::Default) + } + + /// Create a new Writer to write to stdout with specific compression + /// + /// # Arguments + /// + /// * `level` the compression level to use + pub fn from_stdout_with_compression(level: CompressionLevel) -> Result { + Self::new(b"-", level) + } + + /// Create a new Writer from a path with default compression. + /// + /// # Arguments + /// + /// * `path` - the path to open. + pub fn from_path>(path: P) -> Result { + Self::from_path_with_level(path, CompressionLevel::Default) + } + + /// Create a new Writer from a path with a specific compression level. + /// + /// # Arguments + /// + /// * `path` - the path to open. + pub fn from_path_with_level>( + path: P, + level: CompressionLevel, + ) -> Result { + Self::new(&path_as_bytes(path, false)?, level) + } + + /// Internal function to create a Writer from a file path + /// + /// # Arguments + /// + /// * `path` - the path or URL to open + fn new(path: &[u8], level: CompressionLevel) -> Result { + let mode = Self::get_open_mode(level)?; + let cpath = ffi::CString::new(path).unwrap(); + let inner = unsafe { htslib::bgzf_open(cpath.as_ptr(), mode.as_ptr()) }; + Ok(Self { inner, tpool: None }) + } + + /// Internal function to convert compression level to "mode" + /// bgzf.c expects mode for writers to be one of: 'w', 'wu', 'w#', where # is 0-9. + /// # Arguments + /// + /// * `level` - the level of compression to use + fn get_open_mode(level: CompressionLevel) -> Result { + let write_string = match level.convert() { + Ok(-2) => "wu".to_string(), + Ok(-1) => "w".to_string(), + Ok(n @ 0..=9) => format!("w{}", n), + Err(e) => return Err(e), + // This should be unreachable + Ok(i) => return Err(Error::BgzfInvalidCompressionLevel { level: i }), + }; + return Ok(ffi::CString::new(write_string).unwrap()); + } + + /// Set the thread pool to use for parallel compression. + /// + /// # Arguments + /// + /// * `tpool` - the thread-pool to use + pub fn set_thread_pool(&mut self, tpool: &ThreadPool) -> Result<()> { + self.tpool = Some(tpool.clone()); + let b = tpool.handle.borrow_mut(); + let r = unsafe { + htslib::bgzf_thread_pool(self.inner, b.inner.pool as *mut _, 0) // let htslib decide on the queue-size + }; + + if r != 0 { + Err(Error::ThreadPool) + } else { + Ok(()) + } + } +} + +impl std::io::Write for Writer { + fn write(&mut self, buf: &[u8]) -> std::io::Result { + let nbytes = + unsafe { htslib::bgzf_write(self.inner, buf.as_ptr() as *mut libc::c_void, buf.len()) }; + if nbytes < 0 { + Err(std::io::Error::new( + std::io::ErrorKind::Other, + "Can not write", + )) + } else { + Ok(nbytes as usize) + } + } + + fn flush(&mut self) -> std::io::Result<()> { + let exit_code: i32 = unsafe { htslib::bgzf_flush(self.inner) }; + if exit_code == 0 { + Ok(()) + } else { + Err(std::io::Error::new( + std::io::ErrorKind::Other, + "Can not flush", + )) + } + } +} + +impl std::ops::Drop for Writer { + fn drop(&mut self) { + unsafe { + htslib::bgzf_close(self.inner); + } + } +} + #[cfg(test)] mod tests { use super::*; use std::io::Read; + use std::io::Write; // Define paths to the test files const FN_PLAIN: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/test/bgzip/plain.vcf"); @@ -248,4 +406,193 @@ mod tests { "Reading bgzip file with correct content using a threadpool" ); } + + #[test] + fn test_write_plain() { + let tmp = tempfile::Builder::new() + .prefix("rust-htslib") + .tempdir() + .expect("Cannot create temp dir"); + let out_path = tmp.path().join("test.vcf"); + println!("{:?}", out_path); + + { + let w_result = Writer::from_path_with_level(&out_path, CompressionLevel::NoCompression); + if let Err(ref e) = w_result { + println!("w_result is {}", e); + } + assert!(w_result.is_ok(), "Create plain file with Bgzip writer"); + assert!(out_path.exists(), "Plain file is created with Bgzip writer"); + let mut w = w_result.unwrap(); + let write_result = w.write_all(CONTENT.as_bytes()); + assert!( + write_result.is_ok(), + "Plain file can write with Bgzip writer" + ); + } // let Writer fall out of scope and implicitly close + assert!( + !is_bgzip(&out_path).unwrap(), + "NoCompression file should not be detected as BGZIP" + ); + let my_content = std::fs::read_to_string(&out_path).unwrap(); + assert_eq!( + my_content, CONTENT, + "Writing bgzip file with no compression" + ); + + tmp.close().expect("Failed to delete temp dir"); + } + + #[test] + fn test_write_default() { + let tmp = tempfile::Builder::new() + .prefix("rust-htslib") + .tempdir() + .expect("Cannot create temp dir"); + let out_path = tmp.path().join("test.vcf.bgzf"); + println!("{:?}", out_path); + { + let w_result = Writer::from_path(&out_path); + if let Err(ref e) = w_result { + println!("w_result is {}", e); + } + assert!(w_result.is_ok(), "Create bgzip file with Bgzip writer"); + assert!( + std::path::Path::new(&out_path).exists(), + "Bgzip file is created with Bgzip writer" + ); + let mut w = w_result.unwrap(); + let write_result = w.write_all(CONTENT.as_bytes()); + assert!( + write_result.is_ok(), + "Bgzip file can write with Bgzip writer" + ); + } // let Writer fall out of scope and implicitly close + + // Read in with bgzip reader + let mut my_content = String::new(); + Reader::from_path(&out_path) + .unwrap() + .read_to_string(&mut my_content) + .unwrap(); + assert_eq!( + my_content, CONTENT, + "Writing bgzip file with default compression" + ); + + assert!( + is_bgzip(&out_path).unwrap(), + "Default BGZIP file detected as BGZIP" + ); + tmp.close().expect("Failed to delete temp dir"); + } + + #[test] + fn test_write_compression_levels() { + let tmp = tempfile::Builder::new() + .prefix("rust-htslib") + .tempdir() + .expect("Cannot create temp dir"); + let out_path = tmp.path().join("test.vcf.bgzf"); + + // Test all levels except NoCompression + let compression_levels = vec![ + CompressionLevel::Fastest, + CompressionLevel::Maximum, + CompressionLevel::Uncompressed, + ] + .into_iter() + .chain((-1..=9_i8).map(|n| CompressionLevel::Level(n))); + + for level in compression_levels { + { + let w_result = Writer::from_path_with_level(&out_path, level); + if let Err(ref e) = w_result { + println!("w_result is {}", e); + } + assert!(w_result.is_ok(), "Create bgzip file with Bgzip writer"); + assert!( + std::path::Path::new(&out_path).exists(), + "Bgzip file is created with Bgzip writer" + ); + let mut w = w_result.unwrap(); + let write_result = w.write_all(CONTENT.as_bytes()); + assert!( + write_result.is_ok(), + "Bgzip file can write with Bgzip writer" + ); + } // let Writer fall out of scope and implicitly close + + // Read in with bgzip reader + let mut my_content = String::new(); + Reader::from_path(&out_path) + .unwrap() + .read_to_string(&mut my_content) + .unwrap(); + assert_eq!( + my_content, CONTENT, + "Writing bgzip file with {:?} compression", + level + ); + + assert!( + is_bgzip(&out_path).unwrap(), + "Writing BGZIP file with {:?} compression detected as BGZIP", + level + ); + } + tmp.close().expect("Failed to delete temp dir"); + } + + #[test] + fn test_write_with_threadpool() { + let tmp = tempfile::Builder::new() + .prefix("rust-htslib") + .tempdir() + .expect("Cannot create temp dir"); + let out_path = tmp.path().join("test.vcf.bgzf"); + + let content = CONTENT.as_bytes(); + println!("{:?}", out_path); + { + let w_result = Writer::from_path(&out_path); + if let Err(ref e) = w_result { + println!("w_result is {}", e); + } + assert!(w_result.is_ok(), "Create bgzip file with Bgzip threadpool"); + assert!( + std::path::Path::new(&out_path).exists(), + "Bgzip file is created with Bgzip threadpool" + ); + + let mut w = w_result.unwrap(); + let tpool_result = ThreadPool::new(5); + assert!(tpool_result.is_ok(), "Creating thread pool"); + let tpool = tpool_result.unwrap(); + + let set_tpool_result = w.set_thread_pool(&tpool); + assert!(set_tpool_result.is_ok(), "Setting thread pool"); + + let write_result = w.write_all(content); + assert!( + write_result.is_ok(), + "Bgzip file can write with Bgzip threadpool" + ); + } // let Writer fall out of scope and implicitly close + + // Read in with bgzip reader + let mut my_content = String::new(); + Reader::from_path(&out_path) + .unwrap() + .read_to_string(&mut my_content) + .unwrap(); + assert_eq!(my_content, CONTENT, "Writing bgzip file with threadpool"); + + assert!( + is_bgzip(&out_path).unwrap(), + "Threadpool BGZIP file detected as BGZIP" + ); + + tmp.close().expect("Failed to delete temp dir"); + } } diff --git a/src/errors.rs b/src/errors.rs index 530e47574..2e89854f0 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -31,6 +31,10 @@ pub enum Error { // Errors for faidx #[error("The given position is too large to be converted to i64")] FaidxPositionTooLarge, + #[error("bad conversion of sequence name")] + FaidxBadSeqName, + #[error("failed to build index for fasta file {path:?}")] + FaidxBuildFailed { path: std::path::PathBuf }, // Errors for Tbx #[error("previous iterator generation failed")] @@ -69,6 +73,8 @@ pub enum Error { BamBuildIndex, #[error("failed to create SAM/BAM/CRAM pileup")] BamPileup, + #[error("file is not sorted by position")] + BamUnsorted, // Errors for BAM auxiliary fields #[error("failed to add aux field (out of memory?)")] @@ -84,6 +90,16 @@ pub enum Error { #[error("failed to add aux field, tag is already present")] BamAuxTagAlreadyPresent, + // Errors for base modification fields + #[error("no base modification tag found for record")] + BamBaseModificationTagNotFound, + #[error("no base modification with the specified code found in record")] + BamBaseModificationTypeNotFound, + #[error("base modification iteration failed")] + BamBaseModificationIterationFailed, + #[error("base modification found too many modifications")] + BamBaseModificationTooManyMods, + // Errors for BCF #[error("error allocating internal data structure for BCF/VCF reader (out of memory?)")] BcfAllocationError, @@ -113,4 +129,15 @@ pub enum Error { BcfSetValues, #[error("failed to remove alleles in BCF/VCF record")] BcfRemoveAlleles, + + #[error("invalid compression level {level}")] + BgzfInvalidCompressionLevel { level: i8 }, + #[error("failed setting hts reading options")] + HtsSetOpt, + #[error("failed calculating slow index statistics")] + SlowIdxStats, + #[error("invalid tid {tid}")] + InvalidTid { tid: i32 }, + #[error("No sequences in the reference")] + NoSequencesInReference, } diff --git a/src/faidx/mod.rs b/src/faidx/mod.rs index 18ac72000..50dd33016 100644 --- a/src/faidx/mod.rs +++ b/src/faidx/mod.rs @@ -22,6 +22,31 @@ pub struct Reader { inner: *mut htslib::faidx_t, } +/// +/// Build a faidx for input path. +/// +/// # Errors +/// If indexing fails. Could be malformatted or file could not be accessible. +/// +///``` +/// use rust_htslib::faidx::build; +/// let path = std::path::PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"),"/test/test_cram.fa")); +/// build(&path).expect("Failed to build fasta index"); +///``` +/// +pub fn build( + path: impl Into, +) -> Result<(), std::boxed::Box> { + let path = path.into(); + let os_path = std::ffi::CString::new(path.display().to_string())?; + let rc = unsafe { htslib::fai_build(os_path.as_ptr()) }; + if rc < 0 { + Err(Error::FaidxBuildFailed { path })? + } else { + Ok(()) + } +} + impl Reader { /// Create a new Reader from a path. /// @@ -99,6 +124,75 @@ impl Reader { let bytes = self.fetch_seq(name, begin, end)?; Ok(std::str::from_utf8(bytes).unwrap().to_owned()) } + + /// Fetches the number of sequences in the fai index + pub fn n_seqs(&self) -> u64 { + let n = unsafe { htslib::faidx_nseq(self.inner) }; + n as u64 + } + + /// Fetches the i-th sequence name + /// + /// # Arguments + /// + /// * `i` - index to query + pub fn seq_name(&self, i: i32) -> Result { + let cname = unsafe { + let ptr = htslib::faidx_iseq(self.inner, i); + ffi::CStr::from_ptr(ptr) + }; + + let out = match cname.to_str() { + Ok(s) => s.to_string(), + Err(_) => { + return Err(Error::FaidxBadSeqName); + } + }; + + Ok(out) + } + + /// Fetches the length of the given sequence name. + /// + /// # Arguments + /// + /// * `name` - the name of the template sequence (e.g., "chr1") + pub fn fetch_seq_len>(&self, name: N) -> u64 { + let cname = ffi::CString::new(name.as_ref().as_bytes()).unwrap(); + let seq_len = unsafe { htslib::faidx_seq_len(self.inner, cname.as_ptr()) }; + seq_len as u64 + } + + /// Returns a Result> for all seq names. + /// # Errors + /// + /// * `errors::Error::FaidxBadSeqName` - missing sequence name for sequence id. + /// + /// If thrown, the index is malformed, and the number of sequences in the index does not match the number of sequence names available. + ///``` + /// use rust_htslib::faidx::build; + /// let path = std::path::PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"),"/test/test_cram.fa")); + /// build(&path).expect("Failed to build fasta index"); + /// let reader = rust_htslib::faidx::Reader::from_path(path).expect("Failed to open faidx"); + /// assert_eq!(reader.seq_names(), Ok(vec!["chr1".to_string(), "chr2".to_string(), "chr3".to_string()])); + ///``` + /// + pub fn seq_names(&self) -> Result> { + let num_seq = self.n_seqs(); + let mut ret = Vec::with_capacity(num_seq as usize); + for seq_id in 0..num_seq { + ret.push(self.seq_name(seq_id as i32)?); + } + Ok(ret) + } +} + +impl Drop for Reader { + fn drop(&mut self) { + unsafe { + htslib::fai_destroy(self.inner); + } + } } #[cfg(test)] @@ -198,4 +292,34 @@ mod tests { let res = r.fetch_seq("chr1", position_too_large, position_too_large + 1); assert_eq!(res, Err(Error::FaidxPositionTooLarge)); } + + #[test] + fn faidx_n_seqs() { + let r = open_reader(); + assert_eq!(r.n_seqs(), 3); + } + + #[test] + fn faidx_seq_name() { + let r = open_reader(); + let n = r.seq_name(1).unwrap(); + assert_eq!(n, "chr2"); + } + + #[test] + fn faidx_get_seq_len() { + let r = open_reader(); + let chr1_len = r.fetch_seq_len("chr1"); + let chr2_len = r.fetch_seq_len("chr2"); + assert_eq!(chr1_len, 120u64); + assert_eq!(chr2_len, 120u64); + } + + #[test] + fn open_many_readers() { + for _ in 0..500_000 { + let reader = open_reader(); + drop(reader); + } + } } diff --git a/src/tbx/mod.rs b/src/tbx/mod.rs index 044ebf6ec..24693dc2c 100644 --- a/src/tbx/mod.rs +++ b/src/tbx/mod.rs @@ -330,6 +330,7 @@ pub struct Records<'a, R: Read> { impl<'a, R: Read> Iterator for Records<'a, R> { type Item = Result>; + #[allow(clippy::read_zero_byte_vec)] fn next(&mut self) -> Option>> { let mut record = Vec::new(); match self.reader.read(&mut record) { diff --git a/test/base_mods/MM-double.sam b/test/base_mods/MM-double.sam new file mode 100644 index 000000000..608516fc1 --- /dev/null +++ b/test/base_mods/MM-double.sam @@ -0,0 +1,3 @@ +@CO Modifications called on both strands of the same record, +@CO including potentially at the same location simultaneously. +* 0 * 0 0 * * 0 0 AGGATCTCTAGCGGATCGGCGGGGGATATGCCATAT * Mm:Z:C+m,1,3,0;G-m,0,2,0,4;G+o,4; Ml:B:C,128,153,179,115,141,166,192,102 diff --git a/test/base_mods/MM-orient.sam b/test/base_mods/MM-orient.sam new file mode 100644 index 000000000..363e7c2be --- /dev/null +++ b/test/base_mods/MM-orient.sam @@ -0,0 +1,6 @@ +@CO Testing mods on top and bottom strand, but also in +@CO original vs reverse-complemented orientation +top-fwd 0 * 0 0 * * 0 0 AGGATCTCTAGCGGATCGGCGGGGGATATGCCATAT * Mm:Z:C+m,1,3,0; Ml:B:C,128,153,179 +top-rev 16 * 0 0 * * 0 0 ATATGGCATATCCCCCGCCGATCCGCTAGAGATCCT * Mm:Z:C+m,1,3,0; Ml:B:C,128,153,179 +bot-fwd 0 * 0 0 * * 0 0 AGGATCTCTAGCGGATCGGCGGGGGATATGCCATAT * Mm:Z:G-m,0,0,4,3; Ml:B:C,115,141,166,192 +bot-rev 16 * 0 0 * * 0 0 ATATGGCATATCCCCCGCCGATCCGCTAGAGATCCT * Mm:Z:G-m,0,0,4,3; Ml:B:C,115,141,166,192 diff --git a/test/test_cram.bam.bai b/test/test_cram.bam.bai new file mode 100644 index 000000000..437840c4f Binary files /dev/null and b/test/test_cram.bam.bai differ diff --git a/test/test_cram.cram.crai b/test/test_cram.cram.crai new file mode 100644 index 000000000..2aa9a3953 Binary files /dev/null and b/test/test_cram.cram.crai differ diff --git a/test/test_trailing_omitted_format.vcf b/test/test_trailing_omitted_format.vcf new file mode 100644 index 000000000..68892198b --- /dev/null +++ b/test/test_trailing_omitted_format.vcf @@ -0,0 +1,9 @@ +##fileformat=VCFv4.3 +##contig= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE1 +chr1 1234 . t a . . FOO=1 GT:STR:FLT:INT . diff --git a/test/test_unmapped.bam b/test/test_unmapped.bam new file mode 100644 index 000000000..aa1ed45d8 Binary files /dev/null and b/test/test_unmapped.bam differ diff --git a/test/test_unmapped.bam.bai b/test/test_unmapped.bam.bai new file mode 100644 index 000000000..3bbdf839e Binary files /dev/null and b/test/test_unmapped.bam.bai differ diff --git a/test/test_unmapped.cram b/test/test_unmapped.cram new file mode 100644 index 000000000..e0e0525e7 Binary files /dev/null and b/test/test_unmapped.cram differ diff --git a/test/test_unmapped.cram.crai b/test/test_unmapped.cram.crai new file mode 100644 index 000000000..ac8c91848 Binary files /dev/null and b/test/test_unmapped.cram.crai differ