pcre2-sys-0.2.9/.cargo_vcs_info.json0000644000000001470000000000100126750ustar { "git": { "sha1": "9f9bee6cc08015264774aa6a973cef6cb80138b4" }, "path_in_vcs": "pcre2-sys" }pcre2-sys-0.2.9/.gitignore000064400000000000000000000000051046102023000134460ustar 00000000000000/tmp pcre2-sys-0.2.9/COPYING000064400000000000000000000001761046102023000125220ustar 00000000000000This project is dual-licensed under the Unlicense and MIT licenses. You may use this code under the terms of either license. pcre2-sys-0.2.9/Cargo.toml0000644000000021050000000000100106670ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2021" name = "pcre2-sys" version = "0.2.9" authors = ["Andrew Gallant "] description = "Low level bindings to PCRE2." homepage = "https://github.com/BurntSushi/rust-pcre2" documentation = "https://docs.rs/pcre2-sys" readme = "README.md" keywords = [ "pcre", "pcre2", "regex", "jit", ] categories = ["external-ffi-bindings"] license = "Unlicense OR MIT" repository = "https://github.com/BurntSushi/rust-pcre2" [dependencies.libc] version = "0.2.146" [build-dependencies.cc] version = "1.0.73" features = ["parallel"] [build-dependencies.pkg-config] version = "0.3.27" pcre2-sys-0.2.9/Cargo.toml.orig0000644000000011130000000000100116240ustar [package] name = "pcre2-sys" version = "0.2.9" #:version authors = ["Andrew Gallant "] description = "Low level bindings to PCRE2." documentation = "https://docs.rs/pcre2-sys" homepage = "https://github.com/BurntSushi/rust-pcre2" repository = "https://github.com/BurntSushi/rust-pcre2" readme = "README.md" keywords = ["pcre", "pcre2", "regex", "jit"] license = "Unlicense OR MIT" categories = ["external-ffi-bindings"] edition = "2021" [dependencies] libc = "0.2.146" [build-dependencies] cc = { version = "1.0.73", features = ["parallel"] } pkg-config = "0.3.27" pcre2-sys-0.2.9/Cargo.toml.orig000064400000000000000000000011131046102023000143460ustar 00000000000000[package] name = "pcre2-sys" version = "0.2.9" #:version authors = ["Andrew Gallant "] description = "Low level bindings to PCRE2." documentation = "https://docs.rs/pcre2-sys" homepage = "https://github.com/BurntSushi/rust-pcre2" repository = "https://github.com/BurntSushi/rust-pcre2" readme = "README.md" keywords = ["pcre", "pcre2", "regex", "jit"] license = "Unlicense OR MIT" categories = ["external-ffi-bindings"] edition = "2021" [dependencies] libc = "0.2.146" [build-dependencies] cc = { version = "1.0.73", features = ["parallel"] } pkg-config = "0.3.27" pcre2-sys-0.2.9/LICENSE-MIT000064400000000000000000000020711046102023000131170ustar 00000000000000The MIT License (MIT) Copyright (c) 2017 Andrew Gallant Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pcre2-sys-0.2.9/README.md000064400000000000000000000034471046102023000127520ustar 00000000000000pcre2-sys ========= Bindings for [PCRE2](https://www.pcre.org/). [![Build status](https://github.com/BurntSushi/rust-pcre2/workflows/ci/badge.svg)](https://github.com/BurntSushi/rust-pcre2/actions) [![crates.io](https://img.shields.io/crates/v/pcre2-sys.svg)](https://crates.io/crates/pcre2-sys) Dual-licensed under MIT or the [UNLICENSE](https://unlicense.org/). ### Documentation https://docs.rs/pcre2-sys ### Usage Run `cargo add pcre2-sys` to add this crate to your `Cargo.toml` file. ### Notes As a `-sys` crate, this exposes only the bindings to PCRE2 based on the header file. The PCRE2 documentation itself should be consulted in order to use this crate. The bindings for this crate were generated for PCRE **10.42**. This crate intends to track the current release of PCRE2. The build script for this crate prefers dynamically linking with the host's PCRE2 system library. If that isn't available or if static linking is desired, then PCRE2 is built from source and statically linked. Static linking will automatically happen for MUSL targets, but can be forced by setting the `PCRE2_SYS_STATIC` environment variable to `1`. Similarly, if `PCRE2_SYS_STATIC` is set to `0`, then static linking will be forcefully disabled, even for MUSL targets. Currently, this crate only supports `libpcre-8` where `PCRE2_CODE_UNIT_WIDTH=8`. This crate has been tested to work on Windows, Linux and macOS. Other platforms may work, and PRs to support them are welcome. If you're compiling this crate on Windows with the GNU toolchain, then you'll need to make sure you have a compatible C compiler installed, such as the one provided by the [MinGW-w64](https://www.mingw-w64.org/) project. Set the `PCRE2_SYS_DEBUG` flag to forcefully enable debug symbols when doing a static build, even when compiling in release mode. pcre2-sys-0.2.9/UNLICENSE000064400000000000000000000022731046102023000127370ustar 00000000000000This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to pcre2-sys-0.2.9/build.rs000064400000000000000000000125431046102023000131350ustar 00000000000000// The build for pcre2-sys currently does roughly the following: // // 1. Use the PCRE2 system library as reported by pkg-config if it exists // and only if we don't explicitly want a static build. // 2. Otherwise, statically build PCRE2 by hand. // // For step 1, we permit opting out of using the system library via either // explicitly setting the PCRE2_SYS_STATIC environment variable or if we // otherwise believe we want a static build (e.g., when building with MUSL). // // For step 2, we roughly follow the directions as laid out in // pcre2/NON-AUTOTOOLS-BUILD. It's pretty straight-forward: copy a few files, // set a few defines and then build it. We can get away with a pretty stripped // down setup here since the PCRE2 build setup also handles various command // line tools (like pcre2grep) and its test infrastructure, and we needn't // concern ourselves with that. // // It is plausible that this build script will need to evolve to do better // platform detection for the various PCRE2 settings, but this should work // as-is on Windows, Linux and macOS. use std::path::PathBuf; fn main() { println!("cargo:rerun-if-env-changed=PCRE2_SYS_STATIC"); let target = std::env::var("TARGET").unwrap(); // let out = PathBuf::from(std::env::var_os("OUT_DIR").unwrap()); let upstream = PathBuf::from("upstream"); // Don't link to a system library if we want a static build. let want_static = pcre2_sys_static().unwrap_or(target.contains("musl")); if !want_static && pkg_config::probe_library("libpcre2-8").is_ok() { return; } // Set some config options. We mostly just use the default values. We do // this in lieu of patching config.h since it's easier. let mut builder = cc::Build::new(); builder .define("PCRE2_CODE_UNIT_WIDTH", "8") .define("HAVE_STDLIB_H", "1") .define("HAVE_MEMMOVE", "1") .define("HAVE_CONFIG_H", "1") .define("PCRE2_STATIC", "1") .define("STDC_HEADERS", "1") .define("SUPPORT_PCRE2_8", "1") .define("SUPPORT_UNICODE", "1"); if target.contains("windows") { builder.define("HAVE_WINDOWS_H", "1"); } enable_jit(&target, &mut builder); builder.include(upstream.join("src")).include(upstream.join("include")); for result in std::fs::read_dir(upstream.join("src")).unwrap() { let dent = result.unwrap(); let path = dent.path(); if path.extension().map_or(true, |ext| ext != "c") { continue; } // Apparently PCRE2 doesn't want to compile these directly, but only as // included from pcre2_jit_compile.c. // // ... and also pcre2_ucptables.c, which is included by pcre2_tables.c. // This is despite NON-AUTOTOOLS-BUILD instructions saying that // pcre2_ucptables.c should be compiled directly. if path.ends_with("pcre2_jit_match.c") || path.ends_with("pcre2_jit_misc.c") || path.ends_with("pcre2_ucptables.c") { continue; } builder.file(path); } if std::env::var("PCRE2_SYS_DEBUG").unwrap_or(String::new()) == "1" || std::env::var("DEBUG").unwrap_or(String::new()) == "1" { builder.debug(true); } builder.compile("libpcre2.a"); } fn pcre2_sys_static() -> Option { match std::env::var("PCRE2_SYS_STATIC") { Err(_) => None, Ok(s) => { if s == "1" { Some(true) } else if s == "0" { Some(false) } else { None } } } } // On `aarch64-apple-ios` clang fails with the following error. // // Undefined symbols for architecture arm64: // "___clear_cache", referenced from: // _sljit_generate_code in libforeign.a(pcre2_jit_compile.o) // ld: symbol(s) not found for architecture arm64 // // aarch64-apple-tvos https://bugreports.qt.io/browse/QTBUG-62993?gerritReviewStatus=All // aarch64-apple-darwin https://github.com/Homebrew/homebrew-core/pull/57419 // x86_64-apple-ios disabled for device–simulator consistency (not tested) // x86_64-apple-tvos disabled for device–simulator consistency (not tested) // armv7-apple-ios assumed equivalent to aarch64-apple-ios (not tested) // armv7s-apple-ios assumed equivalent to aarch64-apple-ios (not tested) // i386-apple-ios assumed equivalent to aarch64-apple-ios (not tested) // x86_64-apple-ios-macabi disabled out of caution (not tested) (needs attention) // aarch64-linux-android does not build // armv7-linux-androideabi does not build // aarch64-unknown-linux-musl does not build // *-*-*-musleabi* does not build // // We may want to monitor developments on the `aarch64-apple-darwin` front as // they may end up propagating to all `aarch64`-based targets and the `x86_64` // equivalents. fn enable_jit(target: &str, builder: &mut cc::Build) { if target.starts_with("aarch64-apple") { return; } if target == "aarch64-linux-android" { return; } if target == "armv7-linux-androideabi" { return; } if target == "aarch64-unknown-linux-musl" { return; } if target.contains("musleabi") { return; } if target.contains("apple-ios") || target.contains("apple-tvos") { return; } builder.define("SUPPORT_JIT", "1"); } pcre2-sys-0.2.9/generate-bindings000075500000000000000000000013751046102023000150040ustar 00000000000000#!/bin/bash : "${PCRE2SYS_HEADER:=/usr/include/pcre2.h}" : "${PCRE2SYS_BINDINGS:=./src/bindings.rs}" if ! command -V bindgen > /dev/null 2>&1; then echo "bindgen must be installed" >&2 echo "to install: cargo install bindgen" >&2 exit 1 fi if ! [ -f "$PCRE2SYS_HEADER" ]; then echo "PCRE2 header file at $PCRE2SYS_HEADER does not exist" >&2 echo "Use the PCRE2SYS_HEADER environment variable to override path" >&2 exit 1 fi bindgen \ "$PCRE2SYS_HEADER" \ --ctypes-prefix '::libc' \ --allowlist-function '^pcre2_.*' \ --allowlist-type '^pcre2_.*' \ --allowlist-var '^PCRE2_.*' \ --blocklist-function '^.*_callout_.*' \ --blocklist-type '^.*_callout_.*' \ -- -DPCRE2_CODE_UNIT_WIDTH=8 > "$PCRE2SYS_BINDINGS" pcre2-sys-0.2.9/src/bindings.rs000064400000000000000000001512151046102023000144220ustar 00000000000000/* automatically generated by rust-bindgen 0.69.4 */ pub const PCRE2_MAJOR: u32 = 10; pub const PCRE2_MINOR: u32 = 43; pub const PCRE2_DATE: u32 = 2006; pub const PCRE2_ANCHORED: u32 = 2147483648; pub const PCRE2_NO_UTF_CHECK: u32 = 1073741824; pub const PCRE2_ENDANCHORED: u32 = 536870912; pub const PCRE2_ALLOW_EMPTY_CLASS: u32 = 1; pub const PCRE2_ALT_BSUX: u32 = 2; pub const PCRE2_AUTO_CALLOUT: u32 = 4; pub const PCRE2_CASELESS: u32 = 8; pub const PCRE2_DOLLAR_ENDONLY: u32 = 16; pub const PCRE2_DOTALL: u32 = 32; pub const PCRE2_DUPNAMES: u32 = 64; pub const PCRE2_EXTENDED: u32 = 128; pub const PCRE2_FIRSTLINE: u32 = 256; pub const PCRE2_MATCH_UNSET_BACKREF: u32 = 512; pub const PCRE2_MULTILINE: u32 = 1024; pub const PCRE2_NEVER_UCP: u32 = 2048; pub const PCRE2_NEVER_UTF: u32 = 4096; pub const PCRE2_NO_AUTO_CAPTURE: u32 = 8192; pub const PCRE2_NO_AUTO_POSSESS: u32 = 16384; pub const PCRE2_NO_DOTSTAR_ANCHOR: u32 = 32768; pub const PCRE2_NO_START_OPTIMIZE: u32 = 65536; pub const PCRE2_UCP: u32 = 131072; pub const PCRE2_UNGREEDY: u32 = 262144; pub const PCRE2_UTF: u32 = 524288; pub const PCRE2_NEVER_BACKSLASH_C: u32 = 1048576; pub const PCRE2_ALT_CIRCUMFLEX: u32 = 2097152; pub const PCRE2_ALT_VERBNAMES: u32 = 4194304; pub const PCRE2_USE_OFFSET_LIMIT: u32 = 8388608; pub const PCRE2_EXTENDED_MORE: u32 = 16777216; pub const PCRE2_LITERAL: u32 = 33554432; pub const PCRE2_MATCH_INVALID_UTF: u32 = 67108864; pub const PCRE2_EXTRA_ALLOW_SURROGATE_ESCAPES: u32 = 1; pub const PCRE2_EXTRA_BAD_ESCAPE_IS_LITERAL: u32 = 2; pub const PCRE2_EXTRA_MATCH_WORD: u32 = 4; pub const PCRE2_EXTRA_MATCH_LINE: u32 = 8; pub const PCRE2_EXTRA_ESCAPED_CR_IS_LF: u32 = 16; pub const PCRE2_EXTRA_ALT_BSUX: u32 = 32; pub const PCRE2_EXTRA_ALLOW_LOOKAROUND_BSK: u32 = 64; pub const PCRE2_EXTRA_CASELESS_RESTRICT: u32 = 128; pub const PCRE2_EXTRA_ASCII_BSD: u32 = 256; pub const PCRE2_EXTRA_ASCII_BSS: u32 = 512; pub const PCRE2_EXTRA_ASCII_BSW: u32 = 1024; pub const PCRE2_EXTRA_ASCII_POSIX: u32 = 2048; pub const PCRE2_EXTRA_ASCII_DIGIT: u32 = 4096; pub const PCRE2_JIT_COMPLETE: u32 = 1; pub const PCRE2_JIT_PARTIAL_SOFT: u32 = 2; pub const PCRE2_JIT_PARTIAL_HARD: u32 = 4; pub const PCRE2_JIT_INVALID_UTF: u32 = 256; pub const PCRE2_NOTBOL: u32 = 1; pub const PCRE2_NOTEOL: u32 = 2; pub const PCRE2_NOTEMPTY: u32 = 4; pub const PCRE2_NOTEMPTY_ATSTART: u32 = 8; pub const PCRE2_PARTIAL_SOFT: u32 = 16; pub const PCRE2_PARTIAL_HARD: u32 = 32; pub const PCRE2_DFA_RESTART: u32 = 64; pub const PCRE2_DFA_SHORTEST: u32 = 128; pub const PCRE2_SUBSTITUTE_GLOBAL: u32 = 256; pub const PCRE2_SUBSTITUTE_EXTENDED: u32 = 512; pub const PCRE2_SUBSTITUTE_UNSET_EMPTY: u32 = 1024; pub const PCRE2_SUBSTITUTE_UNKNOWN_UNSET: u32 = 2048; pub const PCRE2_SUBSTITUTE_OVERFLOW_LENGTH: u32 = 4096; pub const PCRE2_NO_JIT: u32 = 8192; pub const PCRE2_COPY_MATCHED_SUBJECT: u32 = 16384; pub const PCRE2_SUBSTITUTE_LITERAL: u32 = 32768; pub const PCRE2_SUBSTITUTE_MATCHED: u32 = 65536; pub const PCRE2_SUBSTITUTE_REPLACEMENT_ONLY: u32 = 131072; pub const PCRE2_DISABLE_RECURSELOOP_CHECK: u32 = 262144; pub const PCRE2_CONVERT_UTF: u32 = 1; pub const PCRE2_CONVERT_NO_UTF_CHECK: u32 = 2; pub const PCRE2_CONVERT_POSIX_BASIC: u32 = 4; pub const PCRE2_CONVERT_POSIX_EXTENDED: u32 = 8; pub const PCRE2_CONVERT_GLOB: u32 = 16; pub const PCRE2_CONVERT_GLOB_NO_WILD_SEPARATOR: u32 = 48; pub const PCRE2_CONVERT_GLOB_NO_STARSTAR: u32 = 80; pub const PCRE2_NEWLINE_CR: u32 = 1; pub const PCRE2_NEWLINE_LF: u32 = 2; pub const PCRE2_NEWLINE_CRLF: u32 = 3; pub const PCRE2_NEWLINE_ANY: u32 = 4; pub const PCRE2_NEWLINE_ANYCRLF: u32 = 5; pub const PCRE2_NEWLINE_NUL: u32 = 6; pub const PCRE2_BSR_UNICODE: u32 = 1; pub const PCRE2_BSR_ANYCRLF: u32 = 2; pub const PCRE2_ERROR_END_BACKSLASH: u32 = 101; pub const PCRE2_ERROR_END_BACKSLASH_C: u32 = 102; pub const PCRE2_ERROR_UNKNOWN_ESCAPE: u32 = 103; pub const PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER: u32 = 104; pub const PCRE2_ERROR_QUANTIFIER_TOO_BIG: u32 = 105; pub const PCRE2_ERROR_MISSING_SQUARE_BRACKET: u32 = 106; pub const PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS: u32 = 107; pub const PCRE2_ERROR_CLASS_RANGE_ORDER: u32 = 108; pub const PCRE2_ERROR_QUANTIFIER_INVALID: u32 = 109; pub const PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT: u32 = 110; pub const PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY: u32 = 111; pub const PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS: u32 = 112; pub const PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING: u32 = 113; pub const PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS: u32 = 114; pub const PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE: u32 = 115; pub const PCRE2_ERROR_NULL_PATTERN: u32 = 116; pub const PCRE2_ERROR_BAD_OPTIONS: u32 = 117; pub const PCRE2_ERROR_MISSING_COMMENT_CLOSING: u32 = 118; pub const PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP: u32 = 119; pub const PCRE2_ERROR_PATTERN_TOO_LARGE: u32 = 120; pub const PCRE2_ERROR_HEAP_FAILED: u32 = 121; pub const PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS: u32 = 122; pub const PCRE2_ERROR_INTERNAL_CODE_OVERFLOW: u32 = 123; pub const PCRE2_ERROR_MISSING_CONDITION_CLOSING: u32 = 124; pub const PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH: u32 = 125; pub const PCRE2_ERROR_ZERO_RELATIVE_REFERENCE: u32 = 126; pub const PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES: u32 = 127; pub const PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED: u32 = 128; pub const PCRE2_ERROR_BAD_RELATIVE_REFERENCE: u32 = 129; pub const PCRE2_ERROR_UNKNOWN_POSIX_CLASS: u32 = 130; pub const PCRE2_ERROR_INTERNAL_STUDY_ERROR: u32 = 131; pub const PCRE2_ERROR_UNICODE_NOT_SUPPORTED: u32 = 132; pub const PCRE2_ERROR_PARENTHESES_STACK_CHECK: u32 = 133; pub const PCRE2_ERROR_CODE_POINT_TOO_BIG: u32 = 134; pub const PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED: u32 = 135; pub const PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C: u32 = 136; pub const PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE: u32 = 137; pub const PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG: u32 = 138; pub const PCRE2_ERROR_MISSING_CALLOUT_CLOSING: u32 = 139; pub const PCRE2_ERROR_ESCAPE_INVALID_IN_VERB: u32 = 140; pub const PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P: u32 = 141; pub const PCRE2_ERROR_MISSING_NAME_TERMINATOR: u32 = 142; pub const PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME: u32 = 143; pub const PCRE2_ERROR_INVALID_SUBPATTERN_NAME: u32 = 144; pub const PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE: u32 = 145; pub const PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY: u32 = 146; pub const PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY: u32 = 147; pub const PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG: u32 = 148; pub const PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS: u32 = 149; pub const PCRE2_ERROR_CLASS_INVALID_RANGE: u32 = 150; pub const PCRE2_ERROR_OCTAL_BYTE_TOO_BIG: u32 = 151; pub const PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE: u32 = 152; pub const PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN: u32 = 153; pub const PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES: u32 = 154; pub const PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE: u32 = 155; pub const PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE: u32 = 156; pub const PCRE2_ERROR_BACKSLASH_G_SYNTAX: u32 = 157; pub const PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING: u32 = 158; pub const PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED: u32 = 159; pub const PCRE2_ERROR_VERB_UNKNOWN: u32 = 160; pub const PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG: u32 = 161; pub const PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED: u32 = 162; pub const PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW: u32 = 163; pub const PCRE2_ERROR_INVALID_OCTAL: u32 = 164; pub const PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH: u32 = 165; pub const PCRE2_ERROR_MARK_MISSING_ARGUMENT: u32 = 166; pub const PCRE2_ERROR_INVALID_HEXADECIMAL: u32 = 167; pub const PCRE2_ERROR_BACKSLASH_C_SYNTAX: u32 = 168; pub const PCRE2_ERROR_BACKSLASH_K_SYNTAX: u32 = 169; pub const PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS: u32 = 170; pub const PCRE2_ERROR_BACKSLASH_N_IN_CLASS: u32 = 171; pub const PCRE2_ERROR_CALLOUT_STRING_TOO_LONG: u32 = 172; pub const PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT: u32 = 173; pub const PCRE2_ERROR_UTF_IS_DISABLED: u32 = 174; pub const PCRE2_ERROR_UCP_IS_DISABLED: u32 = 175; pub const PCRE2_ERROR_VERB_NAME_TOO_LONG: u32 = 176; pub const PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG: u32 = 177; pub const PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS: u32 = 178; pub const PCRE2_ERROR_VERSION_CONDITION_SYNTAX: u32 = 179; pub const PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS: u32 = 180; pub const PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER: u32 = 181; pub const PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER: u32 = 182; pub const PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED: u32 = 183; pub const PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP: u32 = 184; pub const PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED: u32 = 185; pub const PCRE2_ERROR_PATTERN_TOO_COMPLICATED: u32 = 186; pub const PCRE2_ERROR_LOOKBEHIND_TOO_LONG: u32 = 187; pub const PCRE2_ERROR_PATTERN_STRING_TOO_LONG: u32 = 188; pub const PCRE2_ERROR_INTERNAL_BAD_CODE: u32 = 189; pub const PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP: u32 = 190; pub const PCRE2_ERROR_NO_SURROGATES_IN_UTF16: u32 = 191; pub const PCRE2_ERROR_BAD_LITERAL_OPTIONS: u32 = 192; pub const PCRE2_ERROR_SUPPORTED_ONLY_IN_UNICODE: u32 = 193; pub const PCRE2_ERROR_INVALID_HYPHEN_IN_OPTIONS: u32 = 194; pub const PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN: u32 = 195; pub const PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE: u32 = 196; pub const PCRE2_ERROR_TOO_MANY_CAPTURES: u32 = 197; pub const PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED: u32 = 198; pub const PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND: u32 = 199; pub const PCRE2_ERROR_NOMATCH: i32 = -1; pub const PCRE2_ERROR_PARTIAL: i32 = -2; pub const PCRE2_ERROR_UTF8_ERR1: i32 = -3; pub const PCRE2_ERROR_UTF8_ERR2: i32 = -4; pub const PCRE2_ERROR_UTF8_ERR3: i32 = -5; pub const PCRE2_ERROR_UTF8_ERR4: i32 = -6; pub const PCRE2_ERROR_UTF8_ERR5: i32 = -7; pub const PCRE2_ERROR_UTF8_ERR6: i32 = -8; pub const PCRE2_ERROR_UTF8_ERR7: i32 = -9; pub const PCRE2_ERROR_UTF8_ERR8: i32 = -10; pub const PCRE2_ERROR_UTF8_ERR9: i32 = -11; pub const PCRE2_ERROR_UTF8_ERR10: i32 = -12; pub const PCRE2_ERROR_UTF8_ERR11: i32 = -13; pub const PCRE2_ERROR_UTF8_ERR12: i32 = -14; pub const PCRE2_ERROR_UTF8_ERR13: i32 = -15; pub const PCRE2_ERROR_UTF8_ERR14: i32 = -16; pub const PCRE2_ERROR_UTF8_ERR15: i32 = -17; pub const PCRE2_ERROR_UTF8_ERR16: i32 = -18; pub const PCRE2_ERROR_UTF8_ERR17: i32 = -19; pub const PCRE2_ERROR_UTF8_ERR18: i32 = -20; pub const PCRE2_ERROR_UTF8_ERR19: i32 = -21; pub const PCRE2_ERROR_UTF8_ERR20: i32 = -22; pub const PCRE2_ERROR_UTF8_ERR21: i32 = -23; pub const PCRE2_ERROR_UTF16_ERR1: i32 = -24; pub const PCRE2_ERROR_UTF16_ERR2: i32 = -25; pub const PCRE2_ERROR_UTF16_ERR3: i32 = -26; pub const PCRE2_ERROR_UTF32_ERR1: i32 = -27; pub const PCRE2_ERROR_UTF32_ERR2: i32 = -28; pub const PCRE2_ERROR_BADDATA: i32 = -29; pub const PCRE2_ERROR_MIXEDTABLES: i32 = -30; pub const PCRE2_ERROR_BADMAGIC: i32 = -31; pub const PCRE2_ERROR_BADMODE: i32 = -32; pub const PCRE2_ERROR_BADOFFSET: i32 = -33; pub const PCRE2_ERROR_BADOPTION: i32 = -34; pub const PCRE2_ERROR_BADREPLACEMENT: i32 = -35; pub const PCRE2_ERROR_BADUTFOFFSET: i32 = -36; pub const PCRE2_ERROR_CALLOUT: i32 = -37; pub const PCRE2_ERROR_DFA_BADRESTART: i32 = -38; pub const PCRE2_ERROR_DFA_RECURSE: i32 = -39; pub const PCRE2_ERROR_DFA_UCOND: i32 = -40; pub const PCRE2_ERROR_DFA_UFUNC: i32 = -41; pub const PCRE2_ERROR_DFA_UITEM: i32 = -42; pub const PCRE2_ERROR_DFA_WSSIZE: i32 = -43; pub const PCRE2_ERROR_INTERNAL: i32 = -44; pub const PCRE2_ERROR_JIT_BADOPTION: i32 = -45; pub const PCRE2_ERROR_JIT_STACKLIMIT: i32 = -46; pub const PCRE2_ERROR_MATCHLIMIT: i32 = -47; pub const PCRE2_ERROR_NOMEMORY: i32 = -48; pub const PCRE2_ERROR_NOSUBSTRING: i32 = -49; pub const PCRE2_ERROR_NOUNIQUESUBSTRING: i32 = -50; pub const PCRE2_ERROR_NULL: i32 = -51; pub const PCRE2_ERROR_RECURSELOOP: i32 = -52; pub const PCRE2_ERROR_DEPTHLIMIT: i32 = -53; pub const PCRE2_ERROR_RECURSIONLIMIT: i32 = -53; pub const PCRE2_ERROR_UNAVAILABLE: i32 = -54; pub const PCRE2_ERROR_UNSET: i32 = -55; pub const PCRE2_ERROR_BADOFFSETLIMIT: i32 = -56; pub const PCRE2_ERROR_BADREPESCAPE: i32 = -57; pub const PCRE2_ERROR_REPMISSINGBRACE: i32 = -58; pub const PCRE2_ERROR_BADSUBSTITUTION: i32 = -59; pub const PCRE2_ERROR_BADSUBSPATTERN: i32 = -60; pub const PCRE2_ERROR_TOOMANYREPLACE: i32 = -61; pub const PCRE2_ERROR_BADSERIALIZEDDATA: i32 = -62; pub const PCRE2_ERROR_HEAPLIMIT: i32 = -63; pub const PCRE2_ERROR_CONVERT_SYNTAX: i32 = -64; pub const PCRE2_ERROR_INTERNAL_DUPMATCH: i32 = -65; pub const PCRE2_ERROR_DFA_UINVALID_UTF: i32 = -66; pub const PCRE2_ERROR_INVALIDOFFSET: i32 = -67; pub const PCRE2_INFO_ALLOPTIONS: u32 = 0; pub const PCRE2_INFO_ARGOPTIONS: u32 = 1; pub const PCRE2_INFO_BACKREFMAX: u32 = 2; pub const PCRE2_INFO_BSR: u32 = 3; pub const PCRE2_INFO_CAPTURECOUNT: u32 = 4; pub const PCRE2_INFO_FIRSTCODEUNIT: u32 = 5; pub const PCRE2_INFO_FIRSTCODETYPE: u32 = 6; pub const PCRE2_INFO_FIRSTBITMAP: u32 = 7; pub const PCRE2_INFO_HASCRORLF: u32 = 8; pub const PCRE2_INFO_JCHANGED: u32 = 9; pub const PCRE2_INFO_JITSIZE: u32 = 10; pub const PCRE2_INFO_LASTCODEUNIT: u32 = 11; pub const PCRE2_INFO_LASTCODETYPE: u32 = 12; pub const PCRE2_INFO_MATCHEMPTY: u32 = 13; pub const PCRE2_INFO_MATCHLIMIT: u32 = 14; pub const PCRE2_INFO_MAXLOOKBEHIND: u32 = 15; pub const PCRE2_INFO_MINLENGTH: u32 = 16; pub const PCRE2_INFO_NAMECOUNT: u32 = 17; pub const PCRE2_INFO_NAMEENTRYSIZE: u32 = 18; pub const PCRE2_INFO_NAMETABLE: u32 = 19; pub const PCRE2_INFO_NEWLINE: u32 = 20; pub const PCRE2_INFO_DEPTHLIMIT: u32 = 21; pub const PCRE2_INFO_RECURSIONLIMIT: u32 = 21; pub const PCRE2_INFO_SIZE: u32 = 22; pub const PCRE2_INFO_HASBACKSLASHC: u32 = 23; pub const PCRE2_INFO_FRAMESIZE: u32 = 24; pub const PCRE2_INFO_HEAPLIMIT: u32 = 25; pub const PCRE2_INFO_EXTRAOPTIONS: u32 = 26; pub const PCRE2_CONFIG_BSR: u32 = 0; pub const PCRE2_CONFIG_JIT: u32 = 1; pub const PCRE2_CONFIG_JITTARGET: u32 = 2; pub const PCRE2_CONFIG_LINKSIZE: u32 = 3; pub const PCRE2_CONFIG_MATCHLIMIT: u32 = 4; pub const PCRE2_CONFIG_NEWLINE: u32 = 5; pub const PCRE2_CONFIG_PARENSLIMIT: u32 = 6; pub const PCRE2_CONFIG_DEPTHLIMIT: u32 = 7; pub const PCRE2_CONFIG_RECURSIONLIMIT: u32 = 7; pub const PCRE2_CONFIG_STACKRECURSE: u32 = 8; pub const PCRE2_CONFIG_UNICODE: u32 = 9; pub const PCRE2_CONFIG_UNICODE_VERSION: u32 = 10; pub const PCRE2_CONFIG_VERSION: u32 = 11; pub const PCRE2_CONFIG_HEAPLIMIT: u32 = 12; pub const PCRE2_CONFIG_NEVER_BACKSLASH_C: u32 = 13; pub const PCRE2_CONFIG_COMPILED_WIDTHS: u32 = 14; pub const PCRE2_CONFIG_TABLES_LENGTH: u32 = 15; pub const PCRE2_SIZE_MAX: i32 = -1; pub const PCRE2_CALLOUT_STARTMATCH: u32 = 1; pub const PCRE2_CALLOUT_BACKTRACK: u32 = 2; pub const PCRE2_LOCAL_WIDTH: u32 = 8; pub type PCRE2_UCHAR8 = u8; pub type PCRE2_UCHAR16 = u16; pub type PCRE2_UCHAR32 = u32; pub type PCRE2_SPTR8 = *const PCRE2_UCHAR8; pub type PCRE2_SPTR16 = *const PCRE2_UCHAR16; pub type PCRE2_SPTR32 = *const PCRE2_UCHAR32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_general_context_8 { _unused: [u8; 0], } pub type pcre2_general_context_8 = pcre2_real_general_context_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_compile_context_8 { _unused: [u8; 0], } pub type pcre2_compile_context_8 = pcre2_real_compile_context_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_context_8 { _unused: [u8; 0], } pub type pcre2_match_context_8 = pcre2_real_match_context_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_convert_context_8 { _unused: [u8; 0], } pub type pcre2_convert_context_8 = pcre2_real_convert_context_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_code_8 { _unused: [u8; 0], } pub type pcre2_code_8 = pcre2_real_code_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_data_8 { _unused: [u8; 0], } pub type pcre2_match_data_8 = pcre2_real_match_data_8; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_jit_stack_8 { _unused: [u8; 0], } pub type pcre2_jit_stack_8 = pcre2_real_jit_stack_8; pub type pcre2_jit_callback_8 = ::std::option::Option< unsafe extern "C" fn(arg1: *mut ::libc::c_void) -> *mut pcre2_jit_stack_8, >; extern "C" { pub fn pcre2_config_8( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_general_context_copy_8( arg1: *mut pcre2_general_context_8, ) -> *mut pcre2_general_context_8; } extern "C" { pub fn pcre2_general_context_create_8( arg1: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg3: *mut ::libc::c_void, ) -> *mut pcre2_general_context_8; } extern "C" { pub fn pcre2_general_context_free_8(arg1: *mut pcre2_general_context_8); } extern "C" { pub fn pcre2_compile_context_copy_8( arg1: *mut pcre2_compile_context_8, ) -> *mut pcre2_compile_context_8; } extern "C" { pub fn pcre2_compile_context_create_8( arg1: *mut pcre2_general_context_8, ) -> *mut pcre2_compile_context_8; } extern "C" { pub fn pcre2_compile_context_free_8(arg1: *mut pcre2_compile_context_8); } extern "C" { pub fn pcre2_set_bsr_8( arg1: *mut pcre2_compile_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_character_tables_8( arg1: *mut pcre2_compile_context_8, arg2: *const u8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_extra_options_8( arg1: *mut pcre2_compile_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_pattern_length_8( arg1: *mut pcre2_compile_context_8, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_varlookbehind_8( arg1: *mut pcre2_compile_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_newline_8( arg1: *mut pcre2_compile_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_parens_nest_limit_8( arg1: *mut pcre2_compile_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_recursion_guard_8( arg1: *mut pcre2_compile_context_8, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int, >, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_convert_context_copy_8( arg1: *mut pcre2_convert_context_8, ) -> *mut pcre2_convert_context_8; } extern "C" { pub fn pcre2_convert_context_create_8( arg1: *mut pcre2_general_context_8, ) -> *mut pcre2_convert_context_8; } extern "C" { pub fn pcre2_convert_context_free_8(arg1: *mut pcre2_convert_context_8); } extern "C" { pub fn pcre2_set_glob_escape_8( arg1: *mut pcre2_convert_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_glob_separator_8( arg1: *mut pcre2_convert_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_pattern_convert_8( arg1: PCRE2_SPTR8, arg2: usize, arg3: u32, arg4: *mut *mut PCRE2_UCHAR8, arg5: *mut usize, arg6: *mut pcre2_convert_context_8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_converted_pattern_free_8(arg1: *mut PCRE2_UCHAR8); } extern "C" { pub fn pcre2_match_context_copy_8( arg1: *mut pcre2_match_context_8, ) -> *mut pcre2_match_context_8; } extern "C" { pub fn pcre2_match_context_create_8( arg1: *mut pcre2_general_context_8, ) -> *mut pcre2_match_context_8; } extern "C" { pub fn pcre2_match_context_free_8(arg1: *mut pcre2_match_context_8); } extern "C" { pub fn pcre2_set_depth_limit_8( arg1: *mut pcre2_match_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_heap_limit_8( arg1: *mut pcre2_match_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_match_limit_8( arg1: *mut pcre2_match_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_offset_limit_8( arg1: *mut pcre2_match_context_8, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_limit_8( arg1: *mut pcre2_match_context_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_memory_management_8( arg1: *mut pcre2_match_context_8, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg3: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg4: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_compile_8( arg1: PCRE2_SPTR8, arg2: usize, arg3: u32, arg4: *mut ::libc::c_int, arg5: *mut usize, arg6: *mut pcre2_compile_context_8, ) -> *mut pcre2_code_8; } extern "C" { pub fn pcre2_code_free_8(arg1: *mut pcre2_code_8); } extern "C" { pub fn pcre2_code_copy_8(arg1: *const pcre2_code_8) -> *mut pcre2_code_8; } extern "C" { pub fn pcre2_code_copy_with_tables_8( arg1: *const pcre2_code_8, ) -> *mut pcre2_code_8; } extern "C" { pub fn pcre2_pattern_info_8( arg1: *const pcre2_code_8, arg2: u32, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_create_8( arg1: u32, arg2: *mut pcre2_general_context_8, ) -> *mut pcre2_match_data_8; } extern "C" { pub fn pcre2_match_data_create_from_pattern_8( arg1: *const pcre2_code_8, arg2: *mut pcre2_general_context_8, ) -> *mut pcre2_match_data_8; } extern "C" { pub fn pcre2_dfa_match_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_8, arg7: *mut pcre2_match_context_8, arg8: *mut ::libc::c_int, arg9: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_8, arg7: *mut pcre2_match_context_8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_free_8(arg1: *mut pcre2_match_data_8); } extern "C" { pub fn pcre2_get_mark_8(arg1: *mut pcre2_match_data_8) -> PCRE2_SPTR8; } extern "C" { pub fn pcre2_get_match_data_size_8(arg1: *mut pcre2_match_data_8) -> usize; } extern "C" { pub fn pcre2_get_match_data_heapframes_size_8( arg1: *mut pcre2_match_data_8, ) -> usize; } extern "C" { pub fn pcre2_get_ovector_count_8(arg1: *mut pcre2_match_data_8) -> u32; } extern "C" { pub fn pcre2_get_ovector_pointer_8( arg1: *mut pcre2_match_data_8, ) -> *mut usize; } extern "C" { pub fn pcre2_get_startchar_8(arg1: *mut pcre2_match_data_8) -> usize; } extern "C" { pub fn pcre2_substring_copy_byname_8( arg1: *mut pcre2_match_data_8, arg2: PCRE2_SPTR8, arg3: *mut PCRE2_UCHAR8, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_copy_bynumber_8( arg1: *mut pcre2_match_data_8, arg2: u32, arg3: *mut PCRE2_UCHAR8, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_free_8(arg1: *mut PCRE2_UCHAR8); } extern "C" { pub fn pcre2_substring_get_byname_8( arg1: *mut pcre2_match_data_8, arg2: PCRE2_SPTR8, arg3: *mut *mut PCRE2_UCHAR8, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_get_bynumber_8( arg1: *mut pcre2_match_data_8, arg2: u32, arg3: *mut *mut PCRE2_UCHAR8, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_byname_8( arg1: *mut pcre2_match_data_8, arg2: PCRE2_SPTR8, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_bynumber_8( arg1: *mut pcre2_match_data_8, arg2: u32, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_nametable_scan_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, arg3: *mut PCRE2_SPTR8, arg4: *mut PCRE2_SPTR8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_number_from_name_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_list_free_8(arg1: *mut *mut PCRE2_UCHAR8); } extern "C" { pub fn pcre2_substring_list_get_8( arg1: *mut pcre2_match_data_8, arg2: *mut *mut *mut PCRE2_UCHAR8, arg3: *mut *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_serialize_encode_8( arg1: *mut *const pcre2_code_8, arg2: i32, arg3: *mut *mut u8, arg4: *mut usize, arg5: *mut pcre2_general_context_8, ) -> i32; } extern "C" { pub fn pcre2_serialize_decode_8( arg1: *mut *mut pcre2_code_8, arg2: i32, arg3: *const u8, arg4: *mut pcre2_general_context_8, ) -> i32; } extern "C" { pub fn pcre2_serialize_get_number_of_codes_8(arg1: *const u8) -> i32; } extern "C" { pub fn pcre2_serialize_free_8(arg1: *mut u8); } extern "C" { pub fn pcre2_substitute_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_8, arg7: *mut pcre2_match_context_8, arg8: PCRE2_SPTR8, arg9: usize, arg10: *mut PCRE2_UCHAR8, arg11: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_compile_8( arg1: *mut pcre2_code_8, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_match_8( arg1: *const pcre2_code_8, arg2: PCRE2_SPTR8, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_8, arg7: *mut pcre2_match_context_8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_free_unused_memory_8(arg1: *mut pcre2_general_context_8); } extern "C" { pub fn pcre2_jit_stack_create_8( arg1: usize, arg2: usize, arg3: *mut pcre2_general_context_8, ) -> *mut pcre2_jit_stack_8; } extern "C" { pub fn pcre2_jit_stack_assign_8( arg1: *mut pcre2_match_context_8, arg2: pcre2_jit_callback_8, arg3: *mut ::libc::c_void, ); } extern "C" { pub fn pcre2_jit_stack_free_8(arg1: *mut pcre2_jit_stack_8); } extern "C" { pub fn pcre2_get_error_message_8( arg1: ::libc::c_int, arg2: *mut PCRE2_UCHAR8, arg3: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_maketables_8(arg1: *mut pcre2_general_context_8) -> *const u8; } extern "C" { pub fn pcre2_maketables_free_8( arg1: *mut pcre2_general_context_8, arg2: *const u8, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_general_context_16 { _unused: [u8; 0], } pub type pcre2_general_context_16 = pcre2_real_general_context_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_compile_context_16 { _unused: [u8; 0], } pub type pcre2_compile_context_16 = pcre2_real_compile_context_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_context_16 { _unused: [u8; 0], } pub type pcre2_match_context_16 = pcre2_real_match_context_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_convert_context_16 { _unused: [u8; 0], } pub type pcre2_convert_context_16 = pcre2_real_convert_context_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_code_16 { _unused: [u8; 0], } pub type pcre2_code_16 = pcre2_real_code_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_data_16 { _unused: [u8; 0], } pub type pcre2_match_data_16 = pcre2_real_match_data_16; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_jit_stack_16 { _unused: [u8; 0], } pub type pcre2_jit_stack_16 = pcre2_real_jit_stack_16; pub type pcre2_jit_callback_16 = ::std::option::Option< unsafe extern "C" fn(arg1: *mut ::libc::c_void) -> *mut pcre2_jit_stack_16, >; extern "C" { pub fn pcre2_config_16( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_general_context_copy_16( arg1: *mut pcre2_general_context_16, ) -> *mut pcre2_general_context_16; } extern "C" { pub fn pcre2_general_context_create_16( arg1: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg3: *mut ::libc::c_void, ) -> *mut pcre2_general_context_16; } extern "C" { pub fn pcre2_general_context_free_16(arg1: *mut pcre2_general_context_16); } extern "C" { pub fn pcre2_compile_context_copy_16( arg1: *mut pcre2_compile_context_16, ) -> *mut pcre2_compile_context_16; } extern "C" { pub fn pcre2_compile_context_create_16( arg1: *mut pcre2_general_context_16, ) -> *mut pcre2_compile_context_16; } extern "C" { pub fn pcre2_compile_context_free_16(arg1: *mut pcre2_compile_context_16); } extern "C" { pub fn pcre2_set_bsr_16( arg1: *mut pcre2_compile_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_character_tables_16( arg1: *mut pcre2_compile_context_16, arg2: *const u8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_extra_options_16( arg1: *mut pcre2_compile_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_pattern_length_16( arg1: *mut pcre2_compile_context_16, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_varlookbehind_16( arg1: *mut pcre2_compile_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_newline_16( arg1: *mut pcre2_compile_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_parens_nest_limit_16( arg1: *mut pcre2_compile_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_recursion_guard_16( arg1: *mut pcre2_compile_context_16, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int, >, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_convert_context_copy_16( arg1: *mut pcre2_convert_context_16, ) -> *mut pcre2_convert_context_16; } extern "C" { pub fn pcre2_convert_context_create_16( arg1: *mut pcre2_general_context_16, ) -> *mut pcre2_convert_context_16; } extern "C" { pub fn pcre2_convert_context_free_16(arg1: *mut pcre2_convert_context_16); } extern "C" { pub fn pcre2_set_glob_escape_16( arg1: *mut pcre2_convert_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_glob_separator_16( arg1: *mut pcre2_convert_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_pattern_convert_16( arg1: PCRE2_SPTR16, arg2: usize, arg3: u32, arg4: *mut *mut PCRE2_UCHAR16, arg5: *mut usize, arg6: *mut pcre2_convert_context_16, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_converted_pattern_free_16(arg1: *mut PCRE2_UCHAR16); } extern "C" { pub fn pcre2_match_context_copy_16( arg1: *mut pcre2_match_context_16, ) -> *mut pcre2_match_context_16; } extern "C" { pub fn pcre2_match_context_create_16( arg1: *mut pcre2_general_context_16, ) -> *mut pcre2_match_context_16; } extern "C" { pub fn pcre2_match_context_free_16(arg1: *mut pcre2_match_context_16); } extern "C" { pub fn pcre2_set_depth_limit_16( arg1: *mut pcre2_match_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_heap_limit_16( arg1: *mut pcre2_match_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_match_limit_16( arg1: *mut pcre2_match_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_offset_limit_16( arg1: *mut pcre2_match_context_16, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_limit_16( arg1: *mut pcre2_match_context_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_memory_management_16( arg1: *mut pcre2_match_context_16, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg3: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg4: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_compile_16( arg1: PCRE2_SPTR16, arg2: usize, arg3: u32, arg4: *mut ::libc::c_int, arg5: *mut usize, arg6: *mut pcre2_compile_context_16, ) -> *mut pcre2_code_16; } extern "C" { pub fn pcre2_code_free_16(arg1: *mut pcre2_code_16); } extern "C" { pub fn pcre2_code_copy_16( arg1: *const pcre2_code_16, ) -> *mut pcre2_code_16; } extern "C" { pub fn pcre2_code_copy_with_tables_16( arg1: *const pcre2_code_16, ) -> *mut pcre2_code_16; } extern "C" { pub fn pcre2_pattern_info_16( arg1: *const pcre2_code_16, arg2: u32, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_create_16( arg1: u32, arg2: *mut pcre2_general_context_16, ) -> *mut pcre2_match_data_16; } extern "C" { pub fn pcre2_match_data_create_from_pattern_16( arg1: *const pcre2_code_16, arg2: *mut pcre2_general_context_16, ) -> *mut pcre2_match_data_16; } extern "C" { pub fn pcre2_dfa_match_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_16, arg7: *mut pcre2_match_context_16, arg8: *mut ::libc::c_int, arg9: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_16, arg7: *mut pcre2_match_context_16, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_free_16(arg1: *mut pcre2_match_data_16); } extern "C" { pub fn pcre2_get_mark_16(arg1: *mut pcre2_match_data_16) -> PCRE2_SPTR16; } extern "C" { pub fn pcre2_get_match_data_size_16( arg1: *mut pcre2_match_data_16, ) -> usize; } extern "C" { pub fn pcre2_get_match_data_heapframes_size_16( arg1: *mut pcre2_match_data_16, ) -> usize; } extern "C" { pub fn pcre2_get_ovector_count_16(arg1: *mut pcre2_match_data_16) -> u32; } extern "C" { pub fn pcre2_get_ovector_pointer_16( arg1: *mut pcre2_match_data_16, ) -> *mut usize; } extern "C" { pub fn pcre2_get_startchar_16(arg1: *mut pcre2_match_data_16) -> usize; } extern "C" { pub fn pcre2_substring_copy_byname_16( arg1: *mut pcre2_match_data_16, arg2: PCRE2_SPTR16, arg3: *mut PCRE2_UCHAR16, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_copy_bynumber_16( arg1: *mut pcre2_match_data_16, arg2: u32, arg3: *mut PCRE2_UCHAR16, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_free_16(arg1: *mut PCRE2_UCHAR16); } extern "C" { pub fn pcre2_substring_get_byname_16( arg1: *mut pcre2_match_data_16, arg2: PCRE2_SPTR16, arg3: *mut *mut PCRE2_UCHAR16, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_get_bynumber_16( arg1: *mut pcre2_match_data_16, arg2: u32, arg3: *mut *mut PCRE2_UCHAR16, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_byname_16( arg1: *mut pcre2_match_data_16, arg2: PCRE2_SPTR16, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_bynumber_16( arg1: *mut pcre2_match_data_16, arg2: u32, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_nametable_scan_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, arg3: *mut PCRE2_SPTR16, arg4: *mut PCRE2_SPTR16, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_number_from_name_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_list_free_16(arg1: *mut *mut PCRE2_UCHAR16); } extern "C" { pub fn pcre2_substring_list_get_16( arg1: *mut pcre2_match_data_16, arg2: *mut *mut *mut PCRE2_UCHAR16, arg3: *mut *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_serialize_encode_16( arg1: *mut *const pcre2_code_16, arg2: i32, arg3: *mut *mut u8, arg4: *mut usize, arg5: *mut pcre2_general_context_16, ) -> i32; } extern "C" { pub fn pcre2_serialize_decode_16( arg1: *mut *mut pcre2_code_16, arg2: i32, arg3: *const u8, arg4: *mut pcre2_general_context_16, ) -> i32; } extern "C" { pub fn pcre2_serialize_get_number_of_codes_16(arg1: *const u8) -> i32; } extern "C" { pub fn pcre2_serialize_free_16(arg1: *mut u8); } extern "C" { pub fn pcre2_substitute_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_16, arg7: *mut pcre2_match_context_16, arg8: PCRE2_SPTR16, arg9: usize, arg10: *mut PCRE2_UCHAR16, arg11: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_compile_16( arg1: *mut pcre2_code_16, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_match_16( arg1: *const pcre2_code_16, arg2: PCRE2_SPTR16, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_16, arg7: *mut pcre2_match_context_16, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_free_unused_memory_16( arg1: *mut pcre2_general_context_16, ); } extern "C" { pub fn pcre2_jit_stack_create_16( arg1: usize, arg2: usize, arg3: *mut pcre2_general_context_16, ) -> *mut pcre2_jit_stack_16; } extern "C" { pub fn pcre2_jit_stack_assign_16( arg1: *mut pcre2_match_context_16, arg2: pcre2_jit_callback_16, arg3: *mut ::libc::c_void, ); } extern "C" { pub fn pcre2_jit_stack_free_16(arg1: *mut pcre2_jit_stack_16); } extern "C" { pub fn pcre2_get_error_message_16( arg1: ::libc::c_int, arg2: *mut PCRE2_UCHAR16, arg3: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_maketables_16( arg1: *mut pcre2_general_context_16, ) -> *const u8; } extern "C" { pub fn pcre2_maketables_free_16( arg1: *mut pcre2_general_context_16, arg2: *const u8, ); } #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_general_context_32 { _unused: [u8; 0], } pub type pcre2_general_context_32 = pcre2_real_general_context_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_compile_context_32 { _unused: [u8; 0], } pub type pcre2_compile_context_32 = pcre2_real_compile_context_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_context_32 { _unused: [u8; 0], } pub type pcre2_match_context_32 = pcre2_real_match_context_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_convert_context_32 { _unused: [u8; 0], } pub type pcre2_convert_context_32 = pcre2_real_convert_context_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_code_32 { _unused: [u8; 0], } pub type pcre2_code_32 = pcre2_real_code_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_match_data_32 { _unused: [u8; 0], } pub type pcre2_match_data_32 = pcre2_real_match_data_32; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct pcre2_real_jit_stack_32 { _unused: [u8; 0], } pub type pcre2_jit_stack_32 = pcre2_real_jit_stack_32; pub type pcre2_jit_callback_32 = ::std::option::Option< unsafe extern "C" fn(arg1: *mut ::libc::c_void) -> *mut pcre2_jit_stack_32, >; extern "C" { pub fn pcre2_config_32( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_general_context_copy_32( arg1: *mut pcre2_general_context_32, ) -> *mut pcre2_general_context_32; } extern "C" { pub fn pcre2_general_context_create_32( arg1: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg3: *mut ::libc::c_void, ) -> *mut pcre2_general_context_32; } extern "C" { pub fn pcre2_general_context_free_32(arg1: *mut pcre2_general_context_32); } extern "C" { pub fn pcre2_compile_context_copy_32( arg1: *mut pcre2_compile_context_32, ) -> *mut pcre2_compile_context_32; } extern "C" { pub fn pcre2_compile_context_create_32( arg1: *mut pcre2_general_context_32, ) -> *mut pcre2_compile_context_32; } extern "C" { pub fn pcre2_compile_context_free_32(arg1: *mut pcre2_compile_context_32); } extern "C" { pub fn pcre2_set_bsr_32( arg1: *mut pcre2_compile_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_character_tables_32( arg1: *mut pcre2_compile_context_32, arg2: *const u8, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_extra_options_32( arg1: *mut pcre2_compile_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_pattern_length_32( arg1: *mut pcre2_compile_context_32, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_max_varlookbehind_32( arg1: *mut pcre2_compile_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_newline_32( arg1: *mut pcre2_compile_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_parens_nest_limit_32( arg1: *mut pcre2_compile_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_compile_recursion_guard_32( arg1: *mut pcre2_compile_context_32, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: u32, arg2: *mut ::libc::c_void, ) -> ::libc::c_int, >, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_convert_context_copy_32( arg1: *mut pcre2_convert_context_32, ) -> *mut pcre2_convert_context_32; } extern "C" { pub fn pcre2_convert_context_create_32( arg1: *mut pcre2_general_context_32, ) -> *mut pcre2_convert_context_32; } extern "C" { pub fn pcre2_convert_context_free_32(arg1: *mut pcre2_convert_context_32); } extern "C" { pub fn pcre2_set_glob_escape_32( arg1: *mut pcre2_convert_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_glob_separator_32( arg1: *mut pcre2_convert_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_pattern_convert_32( arg1: PCRE2_SPTR32, arg2: usize, arg3: u32, arg4: *mut *mut PCRE2_UCHAR32, arg5: *mut usize, arg6: *mut pcre2_convert_context_32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_converted_pattern_free_32(arg1: *mut PCRE2_UCHAR32); } extern "C" { pub fn pcre2_match_context_copy_32( arg1: *mut pcre2_match_context_32, ) -> *mut pcre2_match_context_32; } extern "C" { pub fn pcre2_match_context_create_32( arg1: *mut pcre2_general_context_32, ) -> *mut pcre2_match_context_32; } extern "C" { pub fn pcre2_match_context_free_32(arg1: *mut pcre2_match_context_32); } extern "C" { pub fn pcre2_set_depth_limit_32( arg1: *mut pcre2_match_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_heap_limit_32( arg1: *mut pcre2_match_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_match_limit_32( arg1: *mut pcre2_match_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_offset_limit_32( arg1: *mut pcre2_match_context_32, arg2: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_limit_32( arg1: *mut pcre2_match_context_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_set_recursion_memory_management_32( arg1: *mut pcre2_match_context_32, arg2: ::std::option::Option< unsafe extern "C" fn( arg1: usize, arg2: *mut ::libc::c_void, ) -> *mut ::libc::c_void, >, arg3: ::std::option::Option< unsafe extern "C" fn( arg1: *mut ::libc::c_void, arg2: *mut ::libc::c_void, ), >, arg4: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_compile_32( arg1: PCRE2_SPTR32, arg2: usize, arg3: u32, arg4: *mut ::libc::c_int, arg5: *mut usize, arg6: *mut pcre2_compile_context_32, ) -> *mut pcre2_code_32; } extern "C" { pub fn pcre2_code_free_32(arg1: *mut pcre2_code_32); } extern "C" { pub fn pcre2_code_copy_32( arg1: *const pcre2_code_32, ) -> *mut pcre2_code_32; } extern "C" { pub fn pcre2_code_copy_with_tables_32( arg1: *const pcre2_code_32, ) -> *mut pcre2_code_32; } extern "C" { pub fn pcre2_pattern_info_32( arg1: *const pcre2_code_32, arg2: u32, arg3: *mut ::libc::c_void, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_create_32( arg1: u32, arg2: *mut pcre2_general_context_32, ) -> *mut pcre2_match_data_32; } extern "C" { pub fn pcre2_match_data_create_from_pattern_32( arg1: *const pcre2_code_32, arg2: *mut pcre2_general_context_32, ) -> *mut pcre2_match_data_32; } extern "C" { pub fn pcre2_dfa_match_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_32, arg7: *mut pcre2_match_context_32, arg8: *mut ::libc::c_int, arg9: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_32, arg7: *mut pcre2_match_context_32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_match_data_free_32(arg1: *mut pcre2_match_data_32); } extern "C" { pub fn pcre2_get_mark_32(arg1: *mut pcre2_match_data_32) -> PCRE2_SPTR32; } extern "C" { pub fn pcre2_get_match_data_size_32( arg1: *mut pcre2_match_data_32, ) -> usize; } extern "C" { pub fn pcre2_get_match_data_heapframes_size_32( arg1: *mut pcre2_match_data_32, ) -> usize; } extern "C" { pub fn pcre2_get_ovector_count_32(arg1: *mut pcre2_match_data_32) -> u32; } extern "C" { pub fn pcre2_get_ovector_pointer_32( arg1: *mut pcre2_match_data_32, ) -> *mut usize; } extern "C" { pub fn pcre2_get_startchar_32(arg1: *mut pcre2_match_data_32) -> usize; } extern "C" { pub fn pcre2_substring_copy_byname_32( arg1: *mut pcre2_match_data_32, arg2: PCRE2_SPTR32, arg3: *mut PCRE2_UCHAR32, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_copy_bynumber_32( arg1: *mut pcre2_match_data_32, arg2: u32, arg3: *mut PCRE2_UCHAR32, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_free_32(arg1: *mut PCRE2_UCHAR32); } extern "C" { pub fn pcre2_substring_get_byname_32( arg1: *mut pcre2_match_data_32, arg2: PCRE2_SPTR32, arg3: *mut *mut PCRE2_UCHAR32, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_get_bynumber_32( arg1: *mut pcre2_match_data_32, arg2: u32, arg3: *mut *mut PCRE2_UCHAR32, arg4: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_byname_32( arg1: *mut pcre2_match_data_32, arg2: PCRE2_SPTR32, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_length_bynumber_32( arg1: *mut pcre2_match_data_32, arg2: u32, arg3: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_nametable_scan_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, arg3: *mut PCRE2_SPTR32, arg4: *mut PCRE2_SPTR32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_number_from_name_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_substring_list_free_32(arg1: *mut *mut PCRE2_UCHAR32); } extern "C" { pub fn pcre2_substring_list_get_32( arg1: *mut pcre2_match_data_32, arg2: *mut *mut *mut PCRE2_UCHAR32, arg3: *mut *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_serialize_encode_32( arg1: *mut *const pcre2_code_32, arg2: i32, arg3: *mut *mut u8, arg4: *mut usize, arg5: *mut pcre2_general_context_32, ) -> i32; } extern "C" { pub fn pcre2_serialize_decode_32( arg1: *mut *mut pcre2_code_32, arg2: i32, arg3: *const u8, arg4: *mut pcre2_general_context_32, ) -> i32; } extern "C" { pub fn pcre2_serialize_get_number_of_codes_32(arg1: *const u8) -> i32; } extern "C" { pub fn pcre2_serialize_free_32(arg1: *mut u8); } extern "C" { pub fn pcre2_substitute_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_32, arg7: *mut pcre2_match_context_32, arg8: PCRE2_SPTR32, arg9: usize, arg10: *mut PCRE2_UCHAR32, arg11: *mut usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_compile_32( arg1: *mut pcre2_code_32, arg2: u32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_match_32( arg1: *const pcre2_code_32, arg2: PCRE2_SPTR32, arg3: usize, arg4: usize, arg5: u32, arg6: *mut pcre2_match_data_32, arg7: *mut pcre2_match_context_32, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_jit_free_unused_memory_32( arg1: *mut pcre2_general_context_32, ); } extern "C" { pub fn pcre2_jit_stack_create_32( arg1: usize, arg2: usize, arg3: *mut pcre2_general_context_32, ) -> *mut pcre2_jit_stack_32; } extern "C" { pub fn pcre2_jit_stack_assign_32( arg1: *mut pcre2_match_context_32, arg2: pcre2_jit_callback_32, arg3: *mut ::libc::c_void, ); } extern "C" { pub fn pcre2_jit_stack_free_32(arg1: *mut pcre2_jit_stack_32); } extern "C" { pub fn pcre2_get_error_message_32( arg1: ::libc::c_int, arg2: *mut PCRE2_UCHAR32, arg3: usize, ) -> ::libc::c_int; } extern "C" { pub fn pcre2_maketables_32( arg1: *mut pcre2_general_context_32, ) -> *const u8; } extern "C" { pub fn pcre2_maketables_free_32( arg1: *mut pcre2_general_context_32, arg2: *const u8, ); } pcre2-sys-0.2.9/src/lib.rs000064400000000000000000000003741046102023000133720ustar 00000000000000#![allow(non_camel_case_types, non_snake_case, non_upper_case_globals)] pub use crate::bindings::*; mod bindings; #[cfg(test)] mod tests; // It is weird that this isn't caught by bindgen. Dunno why. pub const PCRE2_UNSET: usize = ::std::usize::MAX; pcre2-sys-0.2.9/src/tests.rs000064400000000000000000000032641046102023000137670ustar 00000000000000use std::ptr; use crate::bindings::*; #[test] fn itworks() { let mut error_code = 0; let mut error_offset = 0; let pattern = r"\w+"; let code = unsafe { pcre2_compile_8( pattern.as_ptr(), pattern.len(), PCRE2_UCP | PCRE2_UTF, &mut error_code, &mut error_offset, ptr::null_mut(), ) }; if code.is_null() { panic!( "compilation failed; error code: {:?}, offset: {:?}", error_code, error_offset ); } let match_data = unsafe { pcre2_match_data_create_from_pattern_8(code, ptr::null_mut()) }; if match_data.is_null() { unsafe { pcre2_code_free_8(code); } panic!("could not allocate match_data"); } let ovector = unsafe { pcre2_get_ovector_pointer_8(match_data) }; if ovector.is_null() { unsafe { pcre2_match_data_free_8(match_data); pcre2_code_free_8(code); } panic!("could not get ovector"); } let subject = " βabcβ foo"; let rc = unsafe { pcre2_match_8( code, subject.as_ptr(), subject.len(), 0, 0, match_data, ptr::null_mut(), ) }; if rc <= 0 { unsafe { pcre2_match_data_free_8(match_data); pcre2_code_free_8(code); } panic!("error executing match"); } let (s, e) = unsafe { (*ovector.offset(0), *ovector.offset(1)) }; unsafe { pcre2_match_data_free_8(match_data); pcre2_code_free_8(code); } assert_eq!("βabcβ", &subject[s..e]); } pcre2-sys-0.2.9/update-pcre2000075500000000000000000000035201046102023000137040ustar 00000000000000#!/bin/bash # This script downloads a specific release of PCRE2, extracts it and copies # the necessary files to $dest. The actual compilation of PCRE2 happens in # build.rs. Note that a new release of PCRE2 may require more changes than # simply updating the version. Namely, we exhaustively enumerate the files that # need to be copied below. This way, we only vendor into source control what is # actually necessary for building PCRE2. pcre2_sys_dir="$(dirname "$0")" cd "$pcre2_sys_dir" dest="upstream" version="10.43" dir="pcre2-$version" archive="$dir.tar.gz" url="https://github.com/PCRE2Project/pcre2/releases/download/pcre2-$version/$archive" work="tmp/updates/pcre2-$version" mkdir -p "$work" curl -L "$url" > "$work/$archive" (cd "$work" && tar xf "$archive") upstream="$work/$dir" rm -rf "$dest"/{src,include} mkdir -p "$dest"/{src,include} needed=( pcre2_auto_possess.c pcre2_chkdint.c pcre2_compile.c pcre2_config.c pcre2_context.c pcre2_convert.c pcre2_dfa_match.c pcre2_error.c pcre2_extuni.c pcre2_find_bracket.c pcre2_jit_compile.c pcre2_jit_match.c pcre2_jit_misc.c pcre2_maketables.c pcre2_match.c pcre2_match_data.c pcre2_newline.c pcre2_ord2utf.c pcre2_pattern_info.c pcre2_script_run.c pcre2_serialize.c pcre2_string_utils.c pcre2_study.c pcre2_substitute.c pcre2_substring.c pcre2_tables.c pcre2_ucd.c pcre2_ucptables.c pcre2_valid_utf.c pcre2_xclass.c pcre2_internal.h pcre2_intmodedep.h pcre2_jit_neon_inc.h pcre2_jit_simd_inc.h pcre2posix.h pcre2_ucp.h ) for name in "${needed[@]}"; do cp "$upstream/src/$name" "$dest/src/" done cp "$upstream/src/pcre2_chartables.c.dist" "$dest/src/pcre2_chartables.c" cp -a "$upstream/src/sljit" "$dest/src/" cp "$upstream/src/config.h.generic" "$dest/include/config.h" cp "$upstream/src/pcre2.h.generic" "$dest/include/pcre2.h"