<commit_before>extern crate bindgen;
extern crate gcc;

use bindgen::RustTarget;
use gcc::Build;
use std::env;
use std::path::PathBuf;

fn main() {
	let mut c = Build::new();

	c.flag("-std=c99");
	c.file("src/c/YGEnums.c");
	c.file("src/c/YGNodeList.c");
	c.file("src/c/Yoga.c");
	c.compile("libyoga.a");

	let bindings = bindgen::Builder::default()
		.rust_target(RustTarget::Stable_1_21)
		.blacklist_type("max_align_t") // This fails `cargo test` so disable for now
		.rustfmt_bindings(false)
		.rustified_enum("YG.*")
		.header("src/c/wrapper.h")
		.generate()
		.expect("Unable to generate bindings");

	let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());

	bindings
		.write_to_file(out_path.join("bindings.rs"))
		.expect("Unable to write bindings!");
}
<commit_msg>Fix `FP_` types binding errors<commit_after>extern crate bindgen;
extern crate gcc;

use bindgen::RustTarget;
use gcc::Build;
use std::env;
use std::path::PathBuf;

fn main() {
	let mut c = Build::new();

	c.flag("-std=c99");
	c.file("src/c/YGEnums.c");
	c.file("src/c/YGNodeList.c");
	c.file("src/c/Yoga.c");
	c.compile("libyoga.a");

	let bindings = bindgen::Builder::default()
		.rust_target(RustTarget::Stable_1_21)
		.blacklist_type("max_align_t") // This fails `cargo test` so disable for now
		.blacklist_type("FP_INFINITE")
		.blacklist_type("FP_NAN")
		.blacklist_type("FP_NORMAL")
		.blacklist_type("FP_SUBNORMAL")
		.blacklist_type("FP_ZERO")
		.rustfmt_bindings(false)
		.rustified_enum("YG.*")
		.header("src/c/wrapper.h")
		.generate()
		.expect("Unable to generate bindings");

	let out_path = PathBuf::from(env::var("OUT_DIR").unwrap());

	bindings
		.write_to_file(out_path.join("bindings.rs"))
		.expect("Unable to write bindings!");
}

{'fraction_non_alphanumeric': 0.18836405529953917, 'fraction_numerical': 0.00576036866359447, 'mean_word_length': 5.181494661921708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1280677', 'n_tokens_mistral': 728, 'n_tokens_neox': 685, 'n_words': 119}