diff --git a/Cargo.lock b/Cargo.lock index f88ae3b8..3cb58499 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3,3914 +3,598 @@ version = 3 [[package]] -name = "actix" -version = "0.10.0" +name = "aho-corasick" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be241f88f3b1e7e9a3fbe3b5a8a0f6915b5a1d7ee0d9a248d3376d01068cc60" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ - "actix-rt", - "actix_derive", - "bitflags", - "bytes 0.5.6", - "crossbeam-channel 0.4.4", - "derive_more", - "futures-channel", - "futures-util", - "log", - "once_cell", - "parking_lot", - "pin-project 0.4.28", - "smallvec", - "tokio", - "tokio-util", - "trust-dns-proto", - "trust-dns-resolver", + "memchr", ] [[package]] -name = "actix-codec" -version = "0.3.0" +name = "ansi_term" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d1833b3838dbe990df0f1f87baf640cf6146e898166afe401839d1b001e570" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "bitflags", - "bytes 0.5.6", - "futures-core", - "futures-sink", - "log", - "pin-project 0.4.28", - "tokio", - "tokio-util", + "winapi", ] [[package]] -name = "actix-connect" -version = "2.0.0" +name = "ansi_term" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177837a10863f15ba8d3ae3ec12fac1099099529ed20083a27fdfe247381d0dc" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "derive_more", - "either", - "futures-util", - "http", - "log", - "trust-dns-proto", - "trust-dns-resolver", + "winapi", ] [[package]] -name = "actix-files" -version = "0.5.0" +name = "assert_approx_eq" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51e8a9146c12fce92a6e4c24b8c4d9b05268130bfd8d61bc587e822c32ce689" -dependencies = [ - "actix-service", - "actix-web", - "bitflags", - "bytes 0.5.6", - "derive_more", - "futures-core", - "futures-util", - "log", - "mime", - "mime_guess", - "percent-encoding", - "v_htmlescape", -] +checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd" [[package]] -name = "actix-http" -version = "2.2.1" +name = "atty" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb8958da437716f3f31b0e76f8daf36554128517d7df37ceba7df00f09622ee" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "actix-codec", - "actix-connect", - "actix-rt", - "actix-service", - "actix-threadpool", - "actix-utils", - "base64", - "bitflags", - "brotli2", - "bytes 0.5.6", - "cookie", - "copyless", - "derive_more", - "either", - "encoding_rs", - "flate2", - "futures-channel", - "futures-core", - "futures-util", - "fxhash", - "h2", - "http", - "httparse", - "indexmap", - "itoa", - "language-tags", - "lazy_static", - "log", - "mime", - "percent-encoding", - "pin-project 1.0.8", - "rand 0.7.3", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "sha-1", - "slab", - "time 0.2.27", + "hermit-abi", + "libc", + "winapi", ] [[package]] -name = "actix-macros" -version = "0.1.3" +name = "autocfg" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ca8ce00b267af8ccebbd647de0d61e0674b6e61185cc7a592ff88772bed655" -dependencies = [ - "quote", - "syn", -] +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] -name = "actix-router" -version = "0.2.7" +name = "bitflags" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad299af73649e1fc893e333ccf86f377751eb95ff875d095131574c6f43452c" -dependencies = [ - "bytestring", - "http", - "log", - "regex", - "serde", -] +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "actix-rt" -version = "1.1.1" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143fcc2912e0d1de2bcf4e2f720d2a60c28652ab4179685a1ee159e0fb3db227" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "colored" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" dependencies = [ - "actix-macros", - "actix-threadpool", - "copyless", - "futures-channel", - "futures-util", - "smallvec", - "tokio", + "atty", + "lazy_static", + "winapi", ] [[package]] -name = "actix-server" -version = "1.0.4" +name = "crc" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45407e6e672ca24784baa667c5d32ef109ccdd8d5e0b5ebb9ef8a67f4dfb708e" +checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "actix-utils", - "futures-channel", - "futures-util", - "log", - "mio", - "mio-uds", - "num_cpus", - "slab", - "socket2 0.3.19", + "crc-catalog", ] [[package]] -name = "actix-service" -version = "1.0.6" +name = "crc-catalog" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" + +[[package]] +name = "crossbeam-channel" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0052435d581b5be835d11f4eb3bce417c8af18d87ddf8ace99f8e67e595882bb" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ - "futures-util", - "pin-project 0.4.28", + "cfg-if", + "crossbeam-utils", ] [[package]] -name = "actix-session" -version = "0.4.1" +name = "crossbeam-deque" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "559b815f2b3ad84f8a17256069d7df16c3ee8069635c86758729521d62ca891d" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ - "actix-service", - "actix-web", - "derive_more", - "futures-util", - "serde", - "serde_json", - "time 0.2.27", + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", ] [[package]] -name = "actix-testing" -version = "1.0.1" +name = "crossbeam-epoch" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47239ca38799ab74ee6a8a94d1ce857014b2ac36f242f70f3f75a66f691e791c" +checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" dependencies = [ - "actix-macros", - "actix-rt", - "actix-server", - "actix-service", - "log", - "socket2 0.3.19", + "cfg-if", + "crossbeam-utils", + "lazy_static", + "memoffset", + "scopeguard", ] [[package]] -name = "actix-threadpool" -version = "0.3.3" +name = "crossbeam-utils" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d209f04d002854b9afd3743032a27b066158817965bf5d036824d19ac2cc0e30" +checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" dependencies = [ - "derive_more", - "futures-channel", + "cfg-if", "lazy_static", - "log", - "num_cpus", - "parking_lot", - "threadpool", ] [[package]] -name = "actix-tls" -version = "2.0.0" +name = "ctor" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24789b7d7361cf5503a504ebe1c10806896f61e96eca9a7350e23001aca715fb" +checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ - "actix-codec", - "actix-service", - "actix-utils", - "futures-util", + "quote", + "syn", ] [[package]] -name = "actix-utils" +name = "diff" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" + +[[package]] +name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9022dec56632d1d7979e59af14f0597a28a830a9c1c7fec8b2327eb9f16b5a" -dependencies = [ - "actix-codec", - "actix-rt", - "actix-service", - "bitflags", - "bytes 0.5.6", - "either", - "futures-channel", - "futures-sink", - "futures-util", - "log", - "pin-project 0.4.28", - "slab", -] +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" + +[[package]] +name = "either" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] -name = "actix-web" -version = "3.3.2" +name = "env_logger" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e641d4a172e7faa0862241a20ff4f1f5ab0ab7c279f00c2d4587b77483477b86" +checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" dependencies = [ - "actix-codec", - "actix-http", - "actix-macros", - "actix-router", - "actix-rt", - "actix-server", - "actix-service", - "actix-testing", - "actix-threadpool", - "actix-tls", - "actix-utils", - "actix-web-codegen", - "awc", - "bytes 0.5.6", - "derive_more", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "fxhash", + "atty", + "humantime", "log", - "mime", - "pin-project 1.0.8", "regex", - "serde", - "serde_json", - "serde_urlencoded", - "socket2 0.3.19", - "time 0.2.27", - "tinyvec", - "url", + "termcolor", ] [[package]] -name = "actix-web-actors" -version = "3.0.0" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6edf3c2693e2a8c422800c87ee89a6a4eac7dd01109bc172a1093ce1f4f001" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "actix", - "actix-codec", - "actix-http", - "actix-web", - "bytes 0.5.6", - "futures-channel", - "futures-core", - "pin-project 0.4.28", + "cfg-if", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] -name = "actix-web-codegen" -version = "0.4.0" +name = "getrandom" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad26f77093333e0e7c6ffe54ebe3582d908a104e448723eec6d43d08b07143fb" +checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "proc-macro2", - "quote", - "syn", + "cfg-if", + "libc", + "wasi 0.10.0+wasi-snapshot-preview1", ] [[package]] -name = "actix_derive" -version = "0.5.0" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95aceadaf327f18f0df5962fedc1bde2f870566a0b9f65c89508a3b1f79334c" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "proc-macro2", - "quote", - "syn", + "libc", ] [[package]] -name = "addr2line" -version = "0.15.2" +name = "humantime" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a2e47a1fbe209ee101dd6d61285226744c6c8d3c21c8dc878ba6cb9f467f3a" -dependencies = [ - "gimli", -] +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "adler" -version = "1.0.2" +name = "itoa" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] -name = "adler32" -version = "1.2.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "aead" -version = "0.3.2" +name = "libc" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fc95d1bdb8e6666b2b217308eeeb09f2d6728d104be3e31916cc74d15420331" -dependencies = [ - "generic-array", -] +checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673" [[package]] -name = "aes" -version = "0.6.0" +name = "log" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "884391ef1066acaa41e766ba8f596341b96e93ce34f9a43e7d24bf0a0eaf0561" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "aes-soft", - "aesni", - "cipher", + "cfg-if", ] [[package]] -name = "aes-gcm" -version = "0.8.0" +name = "md5" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] -name = "aes-soft" -version = "0.6.4" +name = "memchr" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be14c7498ea50828a38d0e24a765ed2effe92a705885b57d029cd67d45744072" -dependencies = [ - "cipher", - "opaque-debug", -] +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" [[package]] -name = "aesni" -version = "0.10.0" +name = "memoffset" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2e11f5e94c2f7d386164cc2aa1f97823fed6f259e486940a71c174dd01b0ce" +checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ - "cipher", - "opaque-debug", + "autocfg", ] [[package]] -name = "aho-corasick" -version = "0.7.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +name = "nes" +version = "0.1.0" dependencies = [ - "memchr", + "bitflags", + "colored", + "crc", + "env_logger", + "log", + "md5", + "rand 0.8.4", ] [[package]] -name = "ansi_term" -version = "0.11.0" +name = "num_cpus" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" dependencies = [ - "winapi 0.3.9", + "hermit-abi", + "libc", ] [[package]] -name = "ansi_term" -version = "0.12.1" +name = "output_vt100" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] -name = "anyhow" -version = "1.0.44" +name = "paste" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" +checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" [[package]] -name = "arrayvec" -version = "0.5.2" +name = "ppv-lite86" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] -name = "askama" -version = "0.10.5" +name = "pretty_assertions" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d298738b6e47e1034e560e5afe63aa488fea34e25ec11b855a76f0d7b8e73134" +checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" dependencies = [ - "askama_derive", - "askama_escape", - "askama_shared", + "ansi_term 0.11.0", + "ctor", + "difference", + "output_vt100", ] [[package]] -name = "askama_derive" -version = "0.10.5" +name = "pretty_assertions" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2925c4c290382f9d2fa3d1c1b6a63fa1427099721ecca4749b154cc9c25522" +checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b" dependencies = [ - "askama_shared", - "proc-macro2", - "syn", + "ansi_term 0.12.1", + "ctor", + "diff", + "output_vt100", ] [[package]] -name = "askama_escape" -version = "0.10.1" +name = "proc-macro2" +version = "1.0.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c108c1a94380c89d2215d0ac54ce09796823cca0fd91b299cfff3b33e346fb" +checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" +dependencies = [ + "unicode-xid", +] [[package]] -name = "askama_shared" -version = "0.11.1" +name = "quote" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2582b77e0f3c506ec4838a25fa8a5f97b9bed72bb6d3d272ea1c031d8bd373bc" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ - "askama_escape", - "humansize", - "nom 6.2.1", - "num-traits", - "percent-encoding", "proc-macro2", - "quote", - "serde", - "syn", - "toml", ] [[package]] -name = "assert_approx_eq" -version = "1.1.0" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c07dab4369547dbe5114677b33fbbf724971019f3818172d59a97a61c774ffd" - -[[package]] -name = "async-trait" -version = "0.1.51" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "autocfg" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" - -[[package]] -name = "awc" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b381e490e7b0cfc37ebc54079b0413d8093ef43d14a4e4747083f7fa47a9e691" -dependencies = [ - "actix-codec", - "actix-http", - "actix-rt", - "actix-service", - "base64", - "bytes 0.5.6", - "cfg-if 1.0.0", - "derive_more", - "futures-core", - "log", - "mime", - "percent-encoding", - "rand 0.7.3", - "serde", - "serde_json", - "serde_urlencoded", -] - -[[package]] -name = "backtrace" -version = "0.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4717cfcbfaa661a0fd48f8453951837ae7e8f81e481fbb136e3202d72805a744" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base-x" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" - -[[package]] -name = "base64" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bit-set" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitvec" -version = "0.19.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8942c8d352ae1838c9dda0b0ca2ab657696ef2232a20147cf1b30ae1a9cb4321" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli-sys" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4445dea95f4c2b41cde57cc9fee236ae4dbae88d8fcbdb4750fc1bb5d86aaecd" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "brotli2" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cb036c3eade309815c15ddbacec5b22c4d1f3983a774ab2eac2e3e9ea85568e" -dependencies = [ - "brotli-sys", - "libc", -] - -[[package]] -name = "buf-min" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa17aa1cf56bdd6bb30518767d00e58019d326f3f05d8c3e0730b549d332ea83" -dependencies = [ - "bytes 0.5.6", -] - -[[package]] -name = "bumpalo" -version = "3.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f1e260c3a9040a7c19a12468758f4c16f31a81a1fe087482be9570ec864bb6c" - -[[package]] -name = "byteorder" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" - -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - -[[package]] -name = "bytes" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" - -[[package]] -name = "bytestring" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90706ba19e97b90786e19dc0d5e2abd80008d99d4c0c5d1ad0b5e72cec7c494d" -dependencies = [ - "bytes 1.1.0", -] - -[[package]] -name = "cc" -version = "1.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd" - -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time 0.1.44", - "winapi 0.3.9", -] - -[[package]] -name = "cipher" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12f8e7987cbd042a63249497f41aed09f8e65add917ea6566effbc56578d6801" -dependencies = [ - "generic-array", -] - -[[package]] -name = "colored" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" -dependencies = [ - "atty", - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen", -] - -[[package]] -name = "const_fn" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92cfa0fd5690b3cf8c1ef2cabbd9b7ef22fa53cf5e1f92b05103f6d5d1cf6e7" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "cookie" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a5d7b21829bc7b4bf4754a978a241ae54ea55a40f92bb20216e54096f4b951" -dependencies = [ - "aes-gcm", - "base64", - "hkdf", - "hmac", - "percent-encoding", - "rand 0.8.4", - "sha2", - "time 0.2.27", - "version_check 0.9.3", -] - -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - -[[package]] -name = "core-foundation" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" - -[[package]] -name = "cpufeatures" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" -dependencies = [ - "libc", -] - -[[package]] -name = "cpuid-bool" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba" - -[[package]] -name = "crc" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" - -[[package]] -name = "crc32fast" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils 0.8.5", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec02e091aa634e2c3ada4a392989e7c3116673ef0ac5b72232439094d73b7fd" -dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", - "lazy_static", - "memoffset", - "scopeguard", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" -dependencies = [ - "cfg-if 1.0.0", - "lazy_static", -] - -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctor" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ctr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f" -dependencies = [ - "cipher", -] - -[[package]] -name = "curl" -version = "0.4.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaa3b8db7f3341ddef15786d250106334d4a6c4b0ae4a46cd77082777d9849b9" -dependencies = [ - "curl-sys", - "libc", - "openssl-probe", - "openssl-sys", - "schannel", - "socket2 0.4.2", - "winapi 0.3.9", -] - -[[package]] -name = "curl-sys" -version = "0.4.49+curl-7.79.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f44960aea24a786a46907b8824ebc0e66ca06bf4e4978408c7499620343483" -dependencies = [ - "cc", - "libc", - "libz-sys", - "openssl-sys", - "pkg-config", - "vcpkg", - "winapi 0.3.9", -] - -[[package]] -name = "data-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" - -[[package]] -name = "deflate" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f95bf05dffba6e6cce8dfbb30def788154949ccd9aed761b472119c21e01c70" -dependencies = [ - "adler32", -] - -[[package]] -name = "derive-new" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40eebddd2156ce1bb37b20bbe5151340a31828b1f2d22ba4141f3531710e38df" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version 0.3.3", - "syn", -] - -[[package]] -name = "diesel" -version = "1.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28135ecf6b7d446b43e27e225622a038cc4e2930a1022f51cdb97ada19b8e4d" -dependencies = [ - "byteorder", - "chrono", - "diesel_derives", - "libsqlite3-sys", - "r2d2", - "uuid", -] - -[[package]] -name = "diesel_derives" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45f5098f628d02a7a0f68ddba586fb61e80edec3bdc1be3b921f4ceec60858d3" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "diff" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499" - -[[package]] -name = "difference" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "discard" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" - -[[package]] -name = "dtoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "encoding" -version = "0.2.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" -dependencies = [ - "encoding-index-japanese", - "encoding-index-korean", - "encoding-index-simpchinese", - "encoding-index-singlebyte", - "encoding-index-tradchinese", -] - -[[package]] -name = "encoding-index-japanese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-korean" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-simpchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-singlebyte" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding-index-tradchinese" -version = "1.20141219.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" -dependencies = [ - "encoding_index_tests", -] - -[[package]] -name = "encoding_index_tests" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" - -[[package]] -name = "encoding_rs" -version = "0.8.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a74ea89a0a1b98f6332de42c95baff457ada66d1cb4030f9ff151b2041a1c746" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enum-as-inner" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c5f0096a91d210159eceb2ff5e1c4da18388a170e1e3ce948aac9c8fdbbf595" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "env_logger" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "env_logger" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", -] - -[[package]] -name = "fancy-regex" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae91abf6555234338687bb47913978d275539235fcb77ba9863b779090b42b14" -dependencies = [ - "bit-set", - "regex", -] - -[[package]] -name = "filetime" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "winapi 0.3.9", -] - -[[package]] -name = "flate2" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" -dependencies = [ - "cfg-if 1.0.0", - "crc32fast", - "libc", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" -dependencies = [ - "matches", - "percent-encoding", -] - -[[package]] -name = "fsevent" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ab7d1bd1bd33cc98b0889831b72da23c0aa4df9cec7e0702f46ecea04b35db6" -dependencies = [ - "bitflags", - "fsevent-sys", -] - -[[package]] -name = "fsevent-sys" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41b048a94555da0f42f1d632e2e19510084fb8e303b0daa2816e733fb3644a0" -dependencies = [ - "libc", -] - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - -[[package]] -name = "futf" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" -dependencies = [ - "mac", - "new_debug_unreachable", -] - -[[package]] -name = "futures" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da6ba8c3bb3c165d3c7319fc1cc8304facf1fb8db99c5de877183c08a273888" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1c26957f23603395cd326b0ffe64124b818f4449552f960d815cfba83a53d" - -[[package]] -name = "futures-executor" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "522de2a0fe3e380f1bc577ba0474108faf3f6b18321dbf60b3b9c39a75073377" - -[[package]] -name = "futures-macro" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" -dependencies = [ - "autocfg", - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "futures-sink" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36ea153c13024fe480590b3e3d4cad89a0cfacecc24577b68f86c6ced9c2bc11" - -[[package]] -name = "futures-task" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" - -[[package]] -name = "futures-util" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" -dependencies = [ - "autocfg", - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite 0.2.7", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" -dependencies = [ - "typenum", - "version_check 0.9.3", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "ghash" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "gimli" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4075386626662786ddb0ec9081e7c7eeb1ba31951f447ca780ef9f5d568189" - -[[package]] -name = "h2" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e4728fd124914ad25e99e3d15a9361a879f6620f63cb56bbb08f95abb97a535" -dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", - "tracing-futures", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hkdf" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51ab2f639c231793c5f6114bdb9bbe50a7dbbfcd7c7c6bd8475dec2d991e964f" -dependencies = [ - "digest", - "hmac", -] - -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac", - "digest", -] - -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi 0.3.9", -] - -[[package]] -name = "html2text" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26379dcb715e237b96102a12b505c553e2bffa74bae2e54658748d298660ef1" -dependencies = [ - "html5ever", - "markup5ever_rcdom", - "unicode-width", -] - -[[package]] -name = "html5ever" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aafcf38a1a36118242d29b92e1b08ef84e67e4a5ed06e0a80be20e6a32bfed6b" -dependencies = [ - "log", - "mac", - "markup5ever", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "http" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" -dependencies = [ - "bytes 1.1.0", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes 0.5.6", - "http", -] - -[[package]] -name = "httparse" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" - -[[package]] -name = "httpdate" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" - -[[package]] -name = "humansize" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02296996cb8796d7c6e3bc2d9211b7802812d36999a51bb754123ead7d37d026" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.13.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a6f157065790a3ed2f88679250419b5cdd96e714a0d65f7797fd337186e96bb" -dependencies = [ - "bytes 0.5.6", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project 1.0.8", - "socket2 0.3.19", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d979acc56dcb5b8dddba3917601745e877576475aa046df3226eabdecef78eed" -dependencies = [ - "bytes 0.5.6", - "hyper", - "native-tls", - "tokio", - "tokio-tls", -] - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" -dependencies = [ - "autocfg", - "hashbrown", -] - -[[package]] -name = "inotify" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4816c66d2c8ae673df83366c18341538f234a26d65a9ecea5c348b453ac1d02f" -dependencies = [ - "bitflags", - "inotify-sys", - "libc", -] - -[[package]] -name = "inotify-sys" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" -dependencies = [ - "libc", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - -[[package]] -name = "ipconfig" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e2f18aece9709094573a9f24f483c4f65caa4298e2f7ae1b71cc65d853fad7" -dependencies = [ - "socket2 0.3.19", - "widestring", - "winapi 0.3.9", - "winreg 0.6.2", -] - -[[package]] -name = "ipnet" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" - -[[package]] -name = "itoa" -version = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "js-sys" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc9ffccd38c451a86bf13657df244e9c3f37493cce8e5e21e940963777acc84" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "language-tags" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" -dependencies = [ - "arrayvec", - "bitflags", - "cfg-if 1.0.0", - "ryu", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.106" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a60553f9a9e039a333b4e9b20573b9e9b9c0bb3a11e201ccc48ef4283456d673" - -[[package]] -name = "libsqlite3-sys" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e9eb7b8e152b6a01be6a4a2917248381875758250dc3df5d46caf9250341dda" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "libz-sys" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linked-hash-map" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" - -[[package]] -name = "lock_api" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" -dependencies = [ - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "lru-cache" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c" -dependencies = [ - "linked-hash-map", -] - -[[package]] -name = "mac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" - -[[package]] -name = "markup5ever" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" -dependencies = [ - "log", - "phf", - "phf_codegen", - "string_cache", - "string_cache_codegen", - "tendril", -] - -[[package]] -name = "markup5ever_rcdom" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f015da43bcd8d4f144559a3423f4591d69b8ce0652c905374da7205df336ae2b" -dependencies = [ - "html5ever", - "markup5ever", - "tendril", - "xml5ever", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "md5" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" - -[[package]] -name = "memchr" -version = "2.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" - -[[package]] -name = "memoffset" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" -dependencies = [ - "autocfg", -] - -[[package]] -name = "mime" -version = "0.3.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" - -[[package]] -name = "mime_guess" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" -dependencies = [ - "mime", - "unicase", -] - -[[package]] -name = "miniz_oxide" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" -dependencies = [ - "adler", - "autocfg", -] - -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log", - "miow 0.2.2", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "mio-extras" -version = "2.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" -dependencies = [ - "lazycell", - "log", - "mio", - "slab", -] - -[[package]] -name = "mio-named-pipes" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0840c1c50fd55e521b247f949c241c9997709f23bd7f023b9762cd561e935656" -dependencies = [ - "log", - "mio", - "miow 0.3.7", - "winapi 0.3.9", -] - -[[package]] -name = "mio-uds" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "native-tls" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nes" -version = "0.1.0" -dependencies = [ - "bitflags", - "colored", - "crc", - "env_logger 0.9.0", - "log", - "md5", - "rand 0.8.4", -] - -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "new_debug_unreachable" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" - -[[package]] -name = "nom" -version = "4.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" -dependencies = [ - "memchr", - "version_check 0.1.5", -] - -[[package]] -name = "nom" -version = "6.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6" -dependencies = [ - "bitvec", - "funty", - "lexical-core", - "memchr", - "version_check 0.9.3", -] - -[[package]] -name = "notify" -version = "4.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae03c8c853dba7bfd23e571ff0cff7bc9dceb40a4cd684cd1681824183f45257" -dependencies = [ - "bitflags", - "filetime", - "fsevent", - "fsevent-sys", - "inotify", - "libc", - "mio", - "mio-extras", - "walkdir", - "winapi 0.3.9", -] - -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a5b3dd1c072ee7963717671d1ca129f1048fda25edea6b752bfc71ac8854170" - -[[package]] -name = "once_cell" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" - -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - -[[package]] -name = "openssl" -version = "0.10.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" - -[[package]] -name = "openssl-src" -version = "111.20.0+1.1.1o" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92892c4f87d56e376e469ace79f1128fdaded07646ddf73aa0be4706ff712dec" -dependencies = [ - "cc", -] - -[[package]] -name = "openssl-sys" -version = "0.9.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" -dependencies = [ - "autocfg", - "cc", - "libc", - "openssl-src", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "openvgdb" -version = "0.1.0" -dependencies = [ - "diesel", - "md5", - "rustgym-consts", - "rustgym-schema", -] - -[[package]] -name = "output_vt100" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if 1.0.0", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi 0.3.9", -] - -[[package]] -name = "paste" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" - -[[package]] -name = "percent-encoding" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" - -[[package]] -name = "pest" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" -dependencies = [ - "ucd-trie", -] - -[[package]] -name = "phf" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbffee61585b0411840d3ece935cce9cb6321f01c45477d30066498cd5e1a815" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17367f0cc86f2d25802b2c26ee58a7b23faeccf78a396094c13dced0d0182526" -dependencies = [ - "phf_shared", - "rand 0.7.3", -] - -[[package]] -name = "phf_shared" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "918192b5c59119d51e0cd221f4d49dde9112824ba717369e903c97d076083d0f" -dependencies = [ - "pin-project-internal 0.4.28", -] - -[[package]] -name = "pin-project" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576bc800220cc65dac09e99e97b08b358cfab6e17078de8dc5fee223bd2d0c08" -dependencies = [ - "pin-project-internal 1.0.8", -] - -[[package]] -name = "pin-project-internal" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be26700300be6d9d23264c73211d8190e755b6b5ca7a1b28230025511b52a5e" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-internal" -version = "1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - -[[package]] -name = "pin-project-lite" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12295df4f294471248581bc09bef3c38a5e46f1e36d6a37353621a0c6c357e1f" - -[[package]] -name = "png" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c845088517daa61e8a57eee40309347cea13f273694d1385c553e7a57127763b" -dependencies = [ - "bitflags", - "crc32fast", - "deflate", - "encoding", - "miniz_oxide", -] - -[[package]] -name = "polyval" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd" -dependencies = [ - "cpuid-bool", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" - -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "pretty_assertions" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" -dependencies = [ - "ansi_term 0.11.0", - "ctor", - "difference", - "output_vt100", -] - -[[package]] -name = "pretty_assertions" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cab0e7c02cf376875e9335e0ba1da535775beb5450d21e1dffca068818ed98b" -dependencies = [ - "ansi_term 0.12.1", - "ctor", - "diff", - "output_vt100", -] - -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - -[[package]] -name = "proc-macro2" -version = "1.0.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba508cc11742c0dc5c1659771673afbab7a0efab23aa17e854cbab0837ed0b43" -dependencies = [ - "unicode-xid", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r2d2" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "545c5bc2b880973c9c10e4067418407a0ccaa3091781d1671d46eb35107cb26f" -dependencies = [ - "log", - "parking_lot", - "scheduled-thread-pool", -] - -[[package]] -name = "radium" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941ba9d78d8e2f7ce474c015eea4d9c6d25b6a3327f9832ee29a4de27f91bbb8" - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc 0.2.0", - "rand_pcg", -] - -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.3", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - -[[package]] -name = "rand_pcg" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rayon" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" -dependencies = [ - "crossbeam-channel 0.5.1", - "crossbeam-deque", - "crossbeam-utils 0.8.5", - "lazy_static", - "num_cpus", -] - -[[package]] -name = "redox_syscall" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" -dependencies = [ - "bitflags", -] - -[[package]] -name = "regex" -version = "1.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.6.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" - -[[package]] -name = "remove_dir_all" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "reqwest" -version = "0.10.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0718f81a8e14c4dbb3b34cf23dc6aaf9ab8a0dfec160c534b3dbca1aaa21f47c" -dependencies = [ - "base64", - "bytes 0.5.6", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "native-tls", - "percent-encoding", - "pin-project-lite 0.2.7", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg 0.7.0", -] - -[[package]] -name = "resolv-conf" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" -dependencies = [ - "hostname", - "quick-error", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin", - "untrusted", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" - -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver 0.9.0", -] - -[[package]] -name = "rustc_version" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" -dependencies = [ - "semver 0.11.0", -] - -[[package]] -name = "rustgym" -version = "0.2.0" -dependencies = [ - "assert_approx_eq", - "pretty_assertions 0.6.1", - "rand 0.7.3", - "rustgym-util", -] - -[[package]] -name = "rustgym-adventofcode" -version = "0.1.0" -dependencies = [ - "md5", - "paste", - "rayon", - "rustgym-util", - "serde_json", -] - -[[package]] -name = "rustgym-characters" -version = "0.1.0" - -[[package]] -name = "rustgym-consts" -version = "0.1.0" -dependencies = [ - "log", -] - -[[package]] -name = "rustgym-google" -version = "0.1.0" -dependencies = [ - "rustgym-util", -] - -[[package]] -name = "rustgym-hackerrank" -version = "0.1.0" -dependencies = [ - "rustgym-util", -] - -[[package]] -name = "rustgym-ingest" -version = "0.1.0" -dependencies = [ - "anyhow", - "diesel", - "html2text", - "rustgym-consts", - "rustgym-schema", - "sonic-channel", -] - -[[package]] -name = "rustgym-leetcode" -version = "0.1.0" -dependencies = [ - "assert_approx_eq", - "paste", - "pretty_assertions 0.7.2", - "rand 0.7.3", - "rustgym-util", - "threadpool", -] - -[[package]] -name = "rustgym-mnist-data" -version = "0.1.0" -dependencies = [ - "bincode", - "curl", - "flate2", - "serde", -] - -[[package]] -name = "rustgym-msg" -version = "0.1.0" -dependencies = [ - "bytes 1.1.0", - "derive-new", - "js-sys", - "serde", - "serde_json", - "uaparser", - "uuid", - "web-sys", -] - -[[package]] -name = "rustgym-readme" -version = "0.1.0" -dependencies = [ - "anyhow", - "askama", - "derive-new", - "diesel", - "regex", - "reqwest", - "rustgym-consts", - "rustgym-schema", - "rustgym-util", - "serde_json", - "walkdir", -] - -[[package]] -name = "rustgym-schema" -version = "0.1.0" -dependencies = [ - "derive-new", - "diesel", - "regex", - "rustgym-consts", - "serde", -] - -[[package]] -name = "rustgym-server" -version = "0.1.0" -dependencies = [ - "actix", - "actix-files", - "actix-service", - "actix-session", - "actix-web", - "actix-web-actors", - "anyhow", - "askama", - "bincode", - "chrono", - "data-encoding", - "derive-new", - "diesel", - "env_logger 0.8.4", - "failure", - "futures", - "futures-util", - "lazy_static", - "libsqlite3-sys", - "log", - "notify", - "openssl", - "r2d2", - "rand 0.8.4", - "ring", - "rustgym-characters", - "rustgym-consts", - "rustgym-msg", - "rustgym-schema", - "serde", - "serde_json", - "sonic-channel", - "tokio", - "uaparser", - "uuid", -] - -[[package]] -name = "rustgym-util" -version = "0.2.4" - -[[package]] -name = "rustgym-wasm" -version = "0.1.0" -dependencies = [ - "anyhow", - "bincode", - "console_error_panic_hook", - "derive-new", - "js-sys", - "lazy_static", - "log", - "md5", - "nes", - "png", - "rand 0.8.4", - "rustgym-consts", - "rustgym-msg", - "serde", - "serde_json", - "uuid", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", - "webrtc-sdp", -] - -[[package]] -name = "ryu" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.9", -] - -[[package]] -name = "scheduled-thread-pool" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f74fd1204073fa02d5d5d68bec8021be4c38690b61264b2fdb48083d0e7d7" -dependencies = [ - "parking_lot", -] - -[[package]] -name = "scoped-tls" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea6a9290e3c9cf0f18145ef7ffa62d68ee0bf5fcd651017e586dc7fd5da448c2" - -[[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "security-framework" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - -[[package]] -name = "semver" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" -dependencies = [ - "semver-parser 0.10.2", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "semver-parser" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" -dependencies = [ - "pest", -] - -[[package]] -name = "serde" -version = "1.0.130" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.130" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "serde_json" -version = "1.0.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8c608a35705a5d3cdc9fbe403147647ff34b921f8e833e49306df898f9b20af" -dependencies = [ - "dtoa", - "indexmap", - "serde", - "yaml-rust", -] - -[[package]] -name = "sha-1" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" -dependencies = [ - "block-buffer", - "cfg-if 1.0.0", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "sha1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" - -[[package]] -name = "sha2" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69f9a4c9740d74c5baa3fd2e547f9525fa8088a8a958e0ca2409a514e33f5fa" -dependencies = [ - "block-buffer", - "cfg-if 1.0.0", - "cpufeatures", - "digest", - "opaque-debug", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" -dependencies = [ - "libc", -] - -[[package]] -name = "siphasher" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "533494a8f9b724d33625ab53c6c4800f7cc445895924a8ef649222dcb76e938b" - -[[package]] -name = "slab" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" - -[[package]] -name = "smallvec" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" - -[[package]] -name = "socket2" -version = "0.3.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "socket2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" -dependencies = [ - "libc", - "winapi 0.3.9", -] - -[[package]] -name = "sonic-channel" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f7d12f8414b37be2353ff2ce8589726df9304e0922c9441ed6a8030174aba7" -dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "standback" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" -dependencies = [ - "version_check 0.9.3", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "stdweb" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" -dependencies = [ - "discard", - "rustc_version 0.2.3", - "stdweb-derive", - "stdweb-internal-macros", - "stdweb-internal-runtime", - "wasm-bindgen", -] - -[[package]] -name = "stdweb-derive" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "serde_derive", - "syn", -] - -[[package]] -name = "stdweb-internal-macros" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" -dependencies = [ - "base-x", - "proc-macro2", - "quote", - "serde", - "serde_derive", - "serde_json", - "sha1", - "syn", -] - -[[package]] -name = "stdweb-internal-runtime" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" - -[[package]] -name = "string_cache" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "923f0f39b6267d37d23ce71ae7235602134b250ace715dd2c90421998ddac0c6" -dependencies = [ - "lazy_static", - "new_debug_unreachable", - "parking_lot", - "phf_shared", - "precomputed-hash", - "serde", -] - -[[package]] -name = "string_cache_codegen" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f24c8e5e19d22a726626f1a5e16fe15b132dcf21d10177fa5a45ce7962996b97" -dependencies = [ - "phf_generator", - "phf_shared", - "proc-macro2", - "quote", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" -dependencies = [ - "proc-macro2", - "quote", - "unicode-xid", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "rand 0.8.4", - "redox_syscall", - "remove_dir_all", - "winapi 0.3.9", -] - -[[package]] -name = "tendril" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ef557cb397a4f0a5a3a628f06515f78563f2209e64d47055d9dc6052bf5e33" -dependencies = [ - "futf", - "mac", - "utf-8", -] - -[[package]] -name = "termcolor" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "threadpool" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" -dependencies = [ - "num_cpus", -] - -[[package]] -name = "time" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", -] - -[[package]] -name = "time" -version = "0.2.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" -dependencies = [ - "const_fn", - "libc", - "standback", - "stdweb", - "time-macros", - "version_check 0.9.3", - "winapi 0.3.9", -] - -[[package]] -name = "time-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" -dependencies = [ - "proc-macro-hack", - "time-macros-impl", -] - -[[package]] -name = "time-macros-impl" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "standback", - "syn", -] - -[[package]] -name = "tinyvec" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83b2a3d4d9091d0abd7eba4dc2710b1718583bd4d8992e2190720ea38f391f7" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" - -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "bytes 0.5.6", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "getrandom 0.1.16", "libc", - "memchr", - "mio", - "mio-named-pipes", - "mio-uds", - "num_cpus", - "pin-project-lite 0.1.12", - "signal-hook-registry", - "slab", - "tokio-macros", - "winapi 0.3.9", -] - -[[package]] -name = "tokio-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" -dependencies = [ - "bytes 0.5.6", - "futures-core", - "futures-io", - "futures-sink", - "log", - "pin-project-lite 0.1.12", - "tokio", -] - -[[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "tower-service" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" - -[[package]] -name = "tracing" -version = "0.1.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" -dependencies = [ - "cfg-if 1.0.0", - "log", - "pin-project-lite 0.2.7", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" -dependencies = [ - "lazy_static", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", ] [[package]] -name = "tracing-futures" -version = "0.2.5" +name = "rand" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ - "pin-project 1.0.8", - "tracing", + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.3", + "rand_hc 0.3.1", ] [[package]] -name = "trust-dns-proto" -version = "0.19.7" +name = "rand_chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cad71a0c0d68ab9941d2fb6e82f8fb2e86d9945b94e1661dd0aaea2b88215a9" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "async-trait", - "cfg-if 1.0.0", - "enum-as-inner", - "futures", - "idna", - "lazy_static", - "log", - "rand 0.7.3", - "smallvec", - "thiserror", - "tokio", - "url", + "ppv-lite86", + "rand_core 0.5.1", ] [[package]] -name = "trust-dns-resolver" -version = "0.19.7" +name = "rand_chacha" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "710f593b371175db53a26d0b38ed2978fafb9e9e8d3868b1acd753ea18df0ceb" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ - "cfg-if 0.1.10", - "futures", - "ipconfig", - "lazy_static", - "log", - "lru-cache", - "resolv-conf", - "smallvec", - "thiserror", - "tokio", - "trust-dns-proto", + "ppv-lite86", + "rand_core 0.6.3", ] [[package]] -name = "try-lock" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" - -[[package]] -name = "typenum" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b63708a265f51345575b27fe43f9500ad611579e764c79edbc2037b1121959ec" - -[[package]] -name = "uaparser" -version = "0.4.0" +name = "rand_core" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f36c3f6f1893391ac4db205cd54226c69957f0b78ecd61ce503e38d447e5de7" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "derive_more", - "fancy-regex", - "serde", - "serde_derive", - "serde_yaml", + "getrandom 0.1.16", ] [[package]] -name = "ucd-trie" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" - -[[package]] -name = "unicase" -version = "2.6.0" +name = "rand_core" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "version_check 0.9.3", + "getrandom 0.2.3", ] [[package]] -name = "unicode-bidi" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" - -[[package]] -name = "unicode-normalization" -version = "0.1.19" +name = "rand_hc" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "tinyvec", + "rand_core 0.5.1", ] [[package]] -name = "unicode-segmentation" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" - -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - -[[package]] -name = "unicode-xid" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" - -[[package]] -name = "universal-hash" -version = "0.4.1" +name = "rand_hc" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" dependencies = [ - "generic-array", - "subtle", + "rand_core 0.6.3", ] [[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "url" -version = "2.2.2" +name = "rayon" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "c06aca804d41dbc8ba42dfd964f0d01334eceb64314b9ecf7c5fad5188a06d90" dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", + "autocfg", + "crossbeam-deque", + "either", + "rayon-core", ] [[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - -[[package]] -name = "uuid" -version = "0.8.2" +name = "rayon-core" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ - "getrandom 0.2.3", - "serde", + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "lazy_static", + "num_cpus", ] [[package]] -name = "v_escape" -version = "0.15.0" +name = "regex" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e0ab5fab1db278a9413d2ea794cb66f471f898c5b020c3c394f6447625d9d4" +checksum = "2a26af418b574bd56588335b3a3659a65725d4e636eb1016c2f9e3b38c7cc759" dependencies = [ - "buf-min", - "v_escape_derive", + "aho-corasick", + "memchr", + "regex-syntax", ] [[package]] -name = "v_escape_derive" -version = "0.8.5" +name = "regex-syntax" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29769400af8b264944b851c961a4a6930e76604f59b1fcd51246bab6a296c8c" -dependencies = [ - "nom 4.2.3", - "proc-macro2", - "quote", - "syn", -] +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] -name = "v_htmlescape" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f9a8af610ad6f7fc9989c9d2590d9764bc61f294884e9ee93baa58795174572" +name = "rustgym" +version = "0.2.0" dependencies = [ - "cfg-if 1.0.0", - "v_escape", + "assert_approx_eq", + "pretty_assertions 0.6.1", + "rand 0.7.3", + "rustgym-util", ] [[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - -[[package]] -name = "version_check" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" - -[[package]] -name = "walkdir" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" +name = "rustgym-adventofcode" +version = "0.1.0" dependencies = [ - "same-file", - "winapi 0.3.9", - "winapi-util", + "md5", + "paste", + "rayon", + "rustgym-util", + "serde_json", ] [[package]] -name = "want" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +name = "rustgym-google" +version = "0.1.0" dependencies = [ - "log", - "try-lock", + "rustgym-util", ] [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - -[[package]] -name = "wasm-bindgen" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "632f73e236b219150ea279196e54e610f5dbafa5d61786303d4da54f84e47fce" +name = "rustgym-hackerrank" +version = "0.1.0" dependencies = [ - "cfg-if 1.0.0", - "serde", - "serde_json", - "wasm-bindgen-macro", + "rustgym-util", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a317bf8f9fba2476b4b2c85ef4c4af8ff39c3c7f0cdfeed4f82c34a880aa837b" +name = "rustgym-leetcode" +version = "0.1.0" dependencies = [ - "bumpalo", - "lazy_static", - "log", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", + "assert_approx_eq", + "paste", + "pretty_assertions 0.7.2", + "rand 0.7.3", + "rustgym-util", + "threadpool", ] [[package]] -name = "wasm-bindgen-futures" -version = "0.4.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d7523cb1f2a4c96c1317ca690031b714a51cc14e05f712446691f413f5d39" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] +name = "rustgym-util" +version = "0.2.4" [[package]] -name = "wasm-bindgen-macro" -version = "0.2.78" +name = "ryu" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.78" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "wasm-bindgen-shared" -version = "0.2.78" +name = "serde" +version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" +checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" [[package]] -name = "wasm-bindgen-test" -version = "0.3.28" +name = "serde_json" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96f1aa7971fdf61ef0f353602102dbea75a56e225ed036c1e3740564b91e6b7e" +checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ - "console_error_panic_hook", - "js-sys", - "scoped-tls", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test-macro", + "itoa", + "ryu", + "serde", ] [[package]] -name = "wasm-bindgen-test-macro" -version = "0.3.28" +name = "syn" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6006f79628dfeb96a86d4db51fbf1344cd7fd8408f06fc9aa3c84913a4789688" +checksum = "f2afee18b8beb5a596ecb4a2dce128c719b4ba399d34126b9e4396e3f9860966" dependencies = [ "proc-macro2", "quote", + "unicode-xid", ] [[package]] -name = "web-sys" -version = "0.3.55" +name = "termcolor" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38eb105f1c59d9eaa6b5cdc92b859d85b926e82cb2e0945cd0c9259faa6fe9fb" +checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" dependencies = [ - "js-sys", - "wasm-bindgen", + "winapi-util", ] [[package]] -name = "webrtc-sdp" -version = "0.3.8" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98db6ff463a94d727ee7c1188bab33146468add6dfb94df30a1f4a3495a700d9" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "log", - "url", + "num_cpus", ] [[package]] -name = "widestring" -version = "0.4.3" +name = "unicode-xid" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c168940144dd21fd8046987c16a46a33d5fc84eec29ef9dcddc2ac9e31526b7c" +checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] -name = "winapi" -version = "0.2.8" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "winapi" @@ -3922,12 +606,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -3940,7 +618,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3948,58 +626,3 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "winreg" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.9", -] - -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - -[[package]] -name = "xml5ever" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9234163818fd8e2418fcde330655e757900d4236acd8cc70fef345ef91f6d865" -dependencies = [ - "log", - "mac", - "markup5ever", - "time 0.1.44", -] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] diff --git a/Cargo.toml b/Cargo.toml index 5376c6cb..e915df3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,19 +2,9 @@ members = [ "rustgym", "util", - "readme", - "server", - "schema", - "consts", - "characters", - "wasm", - "msg", - "ingest", "leetcode", "adventofcode", "google", "hackerrank", - "mnist-data", "nes", - "openvgdb", ] diff --git a/bundle.txt b/bundle.txt deleted file mode 100644 index 61defe85..00000000 --- a/bundle.txt +++ /dev/null @@ -1,9 +0,0 @@ -target/x86_64-unknown-linux-musl/release/openvgdb -target/x86_64-unknown-linux-musl/release/rustgym-server -target/x86_64-unknown-linux-musl/release/rustgym-readme -target/x86_64-unknown-linux-musl/release/rustgym-ingest -config/ -scripts/ -pkg/ -data/ -static/ \ No newline at end of file diff --git a/characters/Cargo.toml b/characters/Cargo.toml deleted file mode 100644 index d60fe4bf..00000000 --- a/characters/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "rustgym-characters" -version = "0.1.0" -authors = ["Larry Fantasy "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] diff --git a/characters/src/lib.rs b/characters/src/lib.rs deleted file mode 100644 index 0556dc0e..00000000 --- a/characters/src/lib.rs +++ /dev/null @@ -1,31 +0,0 @@ -pub const CHARACTERS: &[&str] = &[ - "Banjo", - "Bowser", - "Ciri", - "Diddy Kong", - "Donkey Kong", - "Geralt of Rivia", - "Kratos", - "Lara Croft", - "Link", - "Mario", - "Megaman", - "Pacman", - "Pikachu", - "Princess Zelda", - "Princess Peach", - "Rayman", - "Sonic", - "Spyro", - "Yennefer", - "Yoshi", -]; - -#[cfg(test)] -mod tests { - use super::CHARACTERS; - #[test] - fn characters() { - assert_eq!(CHARACTERS.len(), 20); - } -} diff --git a/clippy.toml b/clippy.toml deleted file mode 100644 index d663f76d..00000000 --- a/clippy.toml +++ /dev/null @@ -1 +0,0 @@ -single-char-binding-names-threshold = 10 \ No newline at end of file diff --git a/config/envoy.yaml b/config/envoy.yaml deleted file mode 100644 index 674b6be2..00000000 --- a/config/envoy.yaml +++ /dev/null @@ -1,55 +0,0 @@ -admin: - address: - socket_address: { address: 127.0.0.1, port_value: 9901 } - -static_resources: - listeners: - - name: listener_0 - address: - socket_address: { address: 0.0.0.0, port_value: 443 } - filter_chains: - - filters: - - name: envoy.filters.network.http_connection_manager - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager - stat_prefix: ingress_http - codec_type: AUTO - route_config: - name: local_route - virtual_hosts: - - name: local_service - domains: ["*"] - routes: - - match: { prefix: "/" } - route: { cluster: some_service } - http_filters: - - name: envoy.filters.http.router - typed_config: - "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router - upgrade_configs: - - upgrade_type: websocket - transport_socket: - name: envoy.transport_sockets.tls - typed_config: - "@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext - common_tls_context: - tls_certificates: - - certificate_chain: - filename: /etc/letsencrypt/live/rustgym.com/fullchain.pem - private_key: - filename: /etc/letsencrypt/live/rustgym.com/privkey.pem - - clusters: - - name: some_service - connect_timeout: 0.25s - type: STATIC - lb_policy: ROUND_ROBIN - load_assignment: - cluster_name: some_service - endpoints: - - lb_endpoints: - - endpoint: - address: - socket_address: - address: 127.0.0.1 - port_value: 8080 diff --git a/config/sonic.cfg b/config/sonic.cfg deleted file mode 100644 index 515e855b..00000000 --- a/config/sonic.cfg +++ /dev/null @@ -1,66 +0,0 @@ -# Sonic -# Fast, lightweight and schema-less search backend -# Configuration file -# Example: https://github.com/valeriansaliou/sonic/blob/master/config.cfg - - -[server] - -log_level = "error" - - -[channel] - -inet = "[::1]:1491" -tcp_timeout = 300 - -auth_password = "SecretPassword" - -[channel.search] - -query_limit_default = 10 -query_limit_maximum = 100 -query_alternates_try = 4 - -suggest_limit_default = 5 -suggest_limit_maximum = 20 - - -[store] - -[store.kv] - -path = "./data/store/kv/" - -retain_word_objects = 1000 - -[store.kv.pool] - -inactive_after = 1800 - -[store.kv.database] - -flush_after = 900 - -compress = true -parallelism = 2 -max_files = 100 -max_compactions = 1 -max_flushes = 1 -write_buffer = 16384 -write_ahead_log = true - -[store.fst] - -path = "./data/store/fst/" - -[store.fst.pool] - -inactive_after = 300 - -[store.fst.graph] - -consolidate_after = 180 - -max_size = 2048 -max_words = 250000 diff --git a/consts/Cargo.toml b/consts/Cargo.toml deleted file mode 100644 index c91c857b..00000000 --- a/consts/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "rustgym-consts" -version = "0.1.0" -authors = ["Yinchu Xia "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -log = "0.4.14" diff --git a/consts/src/lib.rs b/consts/src/lib.rs deleted file mode 100644 index 6af659d4..00000000 --- a/consts/src/lib.rs +++ /dev/null @@ -1,36 +0,0 @@ -use log::Level; -use log::LevelFilter; -use std::time::Duration; - -pub const LEETCODE_ALGORITHMS_URL: &str = "https://leetcode.com/api/problems/algorithms/"; -pub const LEETCODE_CONCURRENCY_URL: &str = "https://leetcode.com/api/problems/concurrency/"; -pub const LEETCODE_TAG_URL: &str = "https://leetcode.com/problems/api/tags/"; -pub const LEETCODE_QUESTION_URL: &str = "https://leetcode.com/problems/"; -pub const CARGO_MANIFEST_DIR: &str = "CARGO_MANIFEST_DIR"; -pub const README_MD: &str = "README.md"; -pub const LEETCODE_SRC: &str = "leetcode/src/"; -pub const LEETCODE_DESC: &str = "leetcode/desc/"; -pub const ADVENTOFCODE_SRC: &str = "adventofcode/src/"; -pub const ADVENTOFCODE_DESC: &str = "adventofcode/desc/"; -pub const GOOGLE_SRC: &str = "google/src/"; -// pub const HACKERRANK_SRC: &str = "rustgym/src/hackerrank"; -// pub const HACKERRANK_DESC: &str = "rustgym/desc/hackerrank"; - -pub const DATABASE_URL: &str = "./data/sqlite/rustgym.sqlite"; -pub const OPENVGDB_URL: &str = "./data/sqlite/openvgdb.sqlite"; -pub const HEARTBEAT_INTERVAL: Duration = Duration::from_secs(5); -pub const CLIENT_TIMEOUT: Duration = Duration::from_secs(10); -pub const SONIC_URL: &str = "localhost:1491"; -pub const SONIC_PASS: &str = "SecretPassword"; -pub const SONIC_COLLECTION: &str = "collection"; -pub const SONIC_BUCKET: &str = "bucket"; - -pub const SEARCH_PLACEHOLDER: &str = "Search Rust Solutions"; - -pub const TIME_SLICE: i32 = 100; -pub const MIME_TYPE: &str = "video/webm;codecs=vp9,opus"; -pub const STREAM_DIR: &str = "./stream"; -pub const DATA_DIR: &str = "./data"; - -pub const LOG_LEVEL: Level = Level::Info; -pub const LOG_LEVEL_FILTER: LevelFilter = LevelFilter::Info; diff --git a/diesel.toml b/diesel.toml deleted file mode 100644 index 46ef6adb..00000000 --- a/diesel.toml +++ /dev/null @@ -1,4 +0,0 @@ -# For documentation on how to configure this file, -# see diesel.rs/guides/configuring-diesel-cli -[print_schema] -file = "schema/src/schema.rs" diff --git a/gvc-sys/Cargo.toml b/gvc-sys/Cargo.toml deleted file mode 100644 index 0fd9ee11..00000000 --- a/gvc-sys/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "gvc-sys" -version = "0.1.1" -authors = ["Yinchu Xia "] -edition = "2018" -license = "MIT OR Apache-2.0" -description = "graphviz rust bindings" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -lazy_static = "1.4.0" - -[build-dependencies] -cc = "1.0.52" -glob = "0.3.0" -pkg-config = "0.3.17" -bindgen = "0.53.2" -regex = "1.3.7" - diff --git a/gvc-sys/build.rs b/gvc-sys/build.rs deleted file mode 100644 index 3bc624bc..00000000 --- a/gvc-sys/build.rs +++ /dev/null @@ -1,20 +0,0 @@ -extern crate pkg_config; - -fn main() { - pkg_config::probe_library("libgvc").unwrap(); - // let library = pkg_config::probe_library("libgvc").unwrap(); - // let include_path = library.include_paths[0].to_str().unwrap(); - // let gvc_path: String = format!("{}/gvc.h", include_path); - // let bindings = bindgen::Builder::default() - // .header(gvc_path) - // .blacklist_function("*l") - // .blacklist_function("nexttoward") - // .blacklist_function("nexttowardf") - // .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - // .generate() - // .expect("Unable to generate bindings"); - - // bindings - // .write_to_file("src/bindings.rs") - // .expect("Couldn't write bindings!"); -} diff --git a/gvc-sys/src/bindings.rs b/gvc-sys/src/bindings.rs deleted file mode 100644 index 9d866fd5..00000000 --- a/gvc-sys/src/bindings.rs +++ /dev/null @@ -1,17657 +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 WITH_CGRAPH: u32 = 1; -pub const __DARWIN_ONLY_64_BIT_INO_T: u32 = 0; -pub const __DARWIN_ONLY_VERS_1050: u32 = 0; -pub const __DARWIN_ONLY_UNIX_CONFORMANCE: u32 = 1; -pub const __DARWIN_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 __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 __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 __DARWIN_WCHAR_MIN: i32 = -2147483648; -pub const _FORTIFY_SOURCE: u32 = 2; -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 _USE_FORTIFY_LEVEL: 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 FALSE: u32 = 0; -pub const _GNU_SOURCE: u32 = 1; -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 FP_NAN: u32 = 1; -pub const FP_INFINITE: u32 = 2; -pub const FP_ZERO: u32 = 3; -pub const FP_NORMAL: u32 = 4; -pub const FP_SUBNORMAL: u32 = 5; -pub const FP_SUPERNORMAL: u32 = 6; -pub const FP_ILOGB0: i32 = -2147483648; -pub const FP_ILOGBNAN: i32 = -2147483648; -pub const MATH_ERRNO: u32 = 1; -pub const MATH_ERREXCEPT: u32 = 2; -pub const M_E: f64 = 2.718281828459045; -pub const M_LOG2E: f64 = 1.4426950408889634; -pub const M_LOG10E: f64 = 0.4342944819032518; -pub const M_LN2: f64 = 0.6931471805599453; -pub const M_LN10: f64 = 2.302585092994046; -pub const M_PI: f64 = 3.141592653589793; -pub const M_PI_2: f64 = 1.5707963267948966; -pub const M_PI_4: f64 = 0.7853981633974483; -pub const M_1_PI: f64 = 0.3183098861837907; -pub const M_2_PI: f64 = 0.6366197723675814; -pub const M_2_SQRTPI: f64 = 1.1283791670955126; -pub const M_SQRT2: f64 = 1.4142135623730951; -pub const M_SQRT1_2: f64 = 0.7071067811865476; -pub const FP_SNAN: u32 = 1; -pub const FP_QNAN: u32 = 1; -pub const DOMAIN: u32 = 1; -pub const SING: u32 = 2; -pub const OVERFLOW: u32 = 3; -pub const UNDERFLOW: u32 = 4; -pub const TLOSS: u32 = 5; -pub const PLOSS: u32 = 6; -pub const MAXSHORT: u32 = 32767; -pub const SQRT2: f64 = 1.4142135623730951; -pub const POINTS_PER_INCH: u32 = 72; -pub const MILLIPOINT: f64 = 0.001; -pub const MICROPOINT: f64 = 0.000001; -pub const HTML_BF: u32 = 1; -pub const HTML_IF: u32 = 2; -pub const HTML_UL: u32 = 4; -pub const HTML_SUP: u32 = 8; -pub const HTML_SUB: u32 = 16; -pub const HTML_S: u32 = 32; -pub const HTML_OL: u32 = 64; -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 __WORDSIZE: u32 = 64; -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 _CDT_H: u32 = 1; -pub const CDT_VERSION: u32 = 20050420; -pub const __HAS_FIXED_CHK_PROTOTYPES: u32 = 1; -pub const DT_FOUND: u32 = 32768; -pub const DT_SET: u32 = 1; -pub const DT_BAG: u32 = 2; -pub const DT_OSET: u32 = 4; -pub const DT_OBAG: u32 = 8; -pub const DT_LIST: u32 = 16; -pub const DT_STACK: u32 = 32; -pub const DT_QUEUE: u32 = 64; -pub const DT_DEQUE: u32 = 128; -pub const DT_METHODS: u32 = 255; -pub const DT_SAMECMP: u32 = 1; -pub const DT_SAMEHASH: u32 = 2; -pub const DT_INSERT: u32 = 1; -pub const DT_DELETE: u32 = 2; -pub const DT_SEARCH: u32 = 4; -pub const DT_NEXT: u32 = 8; -pub const DT_PREV: u32 = 16; -pub const DT_RENEW: u32 = 32; -pub const DT_CLEAR: u32 = 64; -pub const DT_FIRST: u32 = 128; -pub const DT_LAST: u32 = 256; -pub const DT_MATCH: u32 = 512; -pub const DT_VSEARCH: u32 = 1024; -pub const DT_ATTACH: u32 = 2048; -pub const DT_DETACH: u32 = 4096; -pub const DT_APPEND: u32 = 8192; -pub const DT_OPEN: u32 = 1; -pub const DT_CLOSE: u32 = 2; -pub const DT_DISC: u32 = 3; -pub const DT_METH: u32 = 4; -pub const DT_ENDOPEN: u32 = 5; -pub const DT_ENDCLOSE: u32 = 6; -pub const DT_HASHSIZE: u32 = 7; -pub const DT_PRIME: u32 = 17109811; -pub const AGRAPH: u32 = 0; -pub const AGNODE: u32 = 1; -pub const AGOUTEDGE: u32 = 2; -pub const AGINEDGE: u32 = 3; -pub const AGEDGE: u32 = 2; -pub const TAILPORT_ID: &'static [u8; 9usize] = b"tailport\0"; -pub const HEADPORT_ID: &'static [u8; 9usize] = b"headport\0"; -pub const TAIL_ID: &'static [u8; 9usize] = b"tailport\0"; -pub const HEAD_ID: &'static [u8; 9usize] = b"headport\0"; -pub const STROKE_CLOSED: u32 = 1; -pub const STROKE_FILLED: u32 = 2; -pub const STROKE_PENDOWN: u32 = 4; -pub const STROKE_VERTICES_ALLOCATED: u32 = 8; -pub const GUI_STATE_ACTIVE: u32 = 1; -pub const GUI_STATE_SELECTED: u32 = 2; -pub const GUI_STATE_VISITED: u32 = 4; -pub const GUI_STATE_DELETED: u32 = 8; -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 __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; -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 va_list = __darwin_va_list; -pub type size_t = __darwin_size_t; -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 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; -} -pub type ssize_t = __darwin_ssize_t; -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 __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, - ); -} -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 pid_t = __darwin_pid_t; -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) - ) - ); -} -pub type pthread_t = __darwin_pthread_t; -extern "C" { - pub static sys_signame: [*const ::std::os::raw::c_char; 32usize]; -} -extern "C" { - pub static sys_siglist: [*const ::std::os::raw::c_char; 32usize]; -} -extern "C" { - pub fn raise(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn killpg(arg1: pid_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pthread_sigmask( - arg1: ::std::os::raw::c_int, - arg2: *const sigset_t, - arg3: *mut sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigaction( - arg1: ::std::os::raw::c_int, - arg2: *const sigaction, - arg3: *mut sigaction, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigaddset(arg1: *mut sigset_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigaltstack(arg1: *const stack_t, arg2: *mut stack_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigdelset(arg1: *mut sigset_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigemptyset(arg1: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigfillset(arg1: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sighold(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigignore(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn siginterrupt( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigismember(arg1: *const sigset_t, arg2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigpause(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigpending(arg1: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigprocmask( - arg1: ::std::os::raw::c_int, - arg2: *const sigset_t, - arg3: *mut sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigrelse(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigset( - 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, - ), - >; -} -extern "C" { - pub fn sigsuspend(arg1: *const sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigwait( - arg1: *const sigset_t, - arg2: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigblock(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigsetmask(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigvec( - arg1: ::std::os::raw::c_int, - arg2: *mut sigvec, - arg3: *mut sigvec, - ) -> ::std::os::raw::c_int; -} -pub type boolean = ::std::os::raw::c_uchar; -pub type float_t = f32; -pub type double_t = f64; -extern "C" { - pub fn __math_errhandling() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fpclassifyf(arg1: f32) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fpclassifyd(arg1: f64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn acosf(arg1: f32) -> f32; -} -extern "C" { - pub fn acos(arg1: f64) -> f64; -} -extern "C" { - pub fn asinf(arg1: f32) -> f32; -} -extern "C" { - pub fn asin(arg1: f64) -> f64; -} -extern "C" { - pub fn atanf(arg1: f32) -> f32; -} -extern "C" { - pub fn atan(arg1: f64) -> f64; -} -extern "C" { - pub fn atan2f(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn atan2(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn cosf(arg1: f32) -> f32; -} -extern "C" { - pub fn cos(arg1: f64) -> f64; -} -extern "C" { - pub fn sinf(arg1: f32) -> f32; -} -extern "C" { - pub fn sin(arg1: f64) -> f64; -} -extern "C" { - pub fn tanf(arg1: f32) -> f32; -} -extern "C" { - pub fn tan(arg1: f64) -> f64; -} -extern "C" { - pub fn acoshf(arg1: f32) -> f32; -} -extern "C" { - pub fn acosh(arg1: f64) -> f64; -} -extern "C" { - pub fn asinhf(arg1: f32) -> f32; -} -extern "C" { - pub fn asinh(arg1: f64) -> f64; -} -extern "C" { - pub fn atanhf(arg1: f32) -> f32; -} -extern "C" { - pub fn atanh(arg1: f64) -> f64; -} -extern "C" { - pub fn coshf(arg1: f32) -> f32; -} -extern "C" { - pub fn cosh(arg1: f64) -> f64; -} -extern "C" { - pub fn sinhf(arg1: f32) -> f32; -} -extern "C" { - pub fn sinh(arg1: f64) -> f64; -} -extern "C" { - pub fn tanhf(arg1: f32) -> f32; -} -extern "C" { - pub fn tanh(arg1: f64) -> f64; -} -extern "C" { - pub fn expf(arg1: f32) -> f32; -} -extern "C" { - pub fn exp(arg1: f64) -> f64; -} -extern "C" { - pub fn exp2f(arg1: f32) -> f32; -} -extern "C" { - pub fn exp2(arg1: f64) -> f64; -} -extern "C" { - pub fn expm1f(arg1: f32) -> f32; -} -extern "C" { - pub fn expm1(arg1: f64) -> f64; -} -extern "C" { - pub fn logf(arg1: f32) -> f32; -} -extern "C" { - pub fn log(arg1: f64) -> f64; -} -extern "C" { - pub fn log10f(arg1: f32) -> f32; -} -extern "C" { - pub fn log10(arg1: f64) -> f64; -} -extern "C" { - pub fn log2f(arg1: f32) -> f32; -} -extern "C" { - pub fn log2(arg1: f64) -> f64; -} -extern "C" { - pub fn log1pf(arg1: f32) -> f32; -} -extern "C" { - pub fn log1p(arg1: f64) -> f64; -} -extern "C" { - pub fn logbf(arg1: f32) -> f32; -} -extern "C" { - pub fn logb(arg1: f64) -> f64; -} -extern "C" { - pub fn modff(arg1: f32, arg2: *mut f32) -> f32; -} -extern "C" { - pub fn modf(arg1: f64, arg2: *mut f64) -> f64; -} -extern "C" { - pub fn ldexpf(arg1: f32, arg2: ::std::os::raw::c_int) -> f32; -} -extern "C" { - pub fn ldexp(arg1: f64, arg2: ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn frexpf(arg1: f32, arg2: *mut ::std::os::raw::c_int) -> f32; -} -extern "C" { - pub fn frexp(arg1: f64, arg2: *mut ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn ilogbf(arg1: f32) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ilogb(arg1: f64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scalbnf(arg1: f32, arg2: ::std::os::raw::c_int) -> f32; -} -extern "C" { - pub fn scalbn(arg1: f64, arg2: ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn scalblnf(arg1: f32, arg2: ::std::os::raw::c_long) -> f32; -} -extern "C" { - pub fn scalbln(arg1: f64, arg2: ::std::os::raw::c_long) -> f64; -} -extern "C" { - pub fn fabsf(arg1: f32) -> f32; -} -extern "C" { - pub fn fabs(arg1: f64) -> f64; -} -extern "C" { - pub fn cbrtf(arg1: f32) -> f32; -} -extern "C" { - pub fn cbrt(arg1: f64) -> f64; -} -extern "C" { - pub fn hypotf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn hypot(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn powf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn pow(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn sqrtf(arg1: f32) -> f32; -} -extern "C" { - pub fn sqrt(arg1: f64) -> f64; -} -extern "C" { - pub fn erff(arg1: f32) -> f32; -} -extern "C" { - pub fn erf(arg1: f64) -> f64; -} -extern "C" { - pub fn erfcf(arg1: f32) -> f32; -} -extern "C" { - pub fn erfc(arg1: f64) -> f64; -} -extern "C" { - pub fn lgammaf(arg1: f32) -> f32; -} -extern "C" { - pub fn lgamma(arg1: f64) -> f64; -} -extern "C" { - pub fn tgammaf(arg1: f32) -> f32; -} -extern "C" { - pub fn tgamma(arg1: f64) -> f64; -} -extern "C" { - pub fn ceilf(arg1: f32) -> f32; -} -extern "C" { - pub fn floorf(arg1: f32) -> f32; -} -extern "C" { - pub fn floor(arg1: f64) -> f64; -} -extern "C" { - pub fn nearbyintf(arg1: f32) -> f32; -} -extern "C" { - pub fn nearbyint(arg1: f64) -> f64; -} -extern "C" { - pub fn rintf(arg1: f32) -> f32; -} -extern "C" { - pub fn rint(arg1: f64) -> f64; -} -extern "C" { - pub fn lrintf(arg1: f32) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn lrint(arg1: f64) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn roundf(arg1: f32) -> f32; -} -extern "C" { - pub fn round(arg1: f64) -> f64; -} -extern "C" { - pub fn lroundf(arg1: f32) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn lround(arg1: f64) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn llrintf(arg1: f32) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn llrint(arg1: f64) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn llroundf(arg1: f32) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn llround(arg1: f64) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn truncf(arg1: f32) -> f32; -} -extern "C" { - pub fn trunc(arg1: f64) -> f64; -} -extern "C" { - pub fn fmodf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn fmod(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn remainderf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn remainder(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn remquof(arg1: f32, arg2: f32, arg3: *mut ::std::os::raw::c_int) -> f32; -} -extern "C" { - pub fn remquo(arg1: f64, arg2: f64, arg3: *mut ::std::os::raw::c_int) -> f64; -} -extern "C" { - pub fn copysignf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn copysign(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn nanf(arg1: *const ::std::os::raw::c_char) -> f32; -} -extern "C" { - pub fn nan(arg1: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn nextafterf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn nextafter(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn fdimf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn fdim(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn fmaxf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn fmax(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn fminf(arg1: f32, arg2: f32) -> f32; -} -extern "C" { - pub fn fmin(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn fmaf(arg1: f32, arg2: f32, arg3: f32) -> f32; -} -extern "C" { - pub fn fma(arg1: f64, arg2: f64, arg3: f64) -> f64; -} -extern "C" { - pub fn __inff() -> f32; -} -extern "C" { - pub fn __inf() -> f64; -} -extern "C" { - pub fn __nan() -> f32; -} -extern "C" { - pub fn __exp10f(arg1: f32) -> f32; -} -extern "C" { - pub fn __exp10(arg1: f64) -> f64; -} -extern "C" { - pub fn __cospif(arg1: f32) -> f32; -} -extern "C" { - pub fn __cospi(arg1: f64) -> f64; -} -extern "C" { - pub fn __sinpif(arg1: f32) -> f32; -} -extern "C" { - pub fn __sinpi(arg1: f64) -> f64; -} -extern "C" { - pub fn __tanpif(arg1: f32) -> f32; -} -extern "C" { - pub fn __tanpi(arg1: f64) -> f64; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __float2 { - pub __sinval: f32, - pub __cosval: f32, -} -#[test] -fn bindgen_test_layout___float2() { - assert_eq!( - ::std::mem::size_of::<__float2>(), - 8usize, - concat!("Size of: ", stringify!(__float2)) - ); - assert_eq!( - ::std::mem::align_of::<__float2>(), - 4usize, - concat!("Alignment of ", stringify!(__float2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__float2>())).__sinval as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__float2), - "::", - stringify!(__sinval) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__float2>())).__cosval as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__float2), - "::", - stringify!(__cosval) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __double2 { - pub __sinval: f64, - pub __cosval: f64, -} -#[test] -fn bindgen_test_layout___double2() { - assert_eq!( - ::std::mem::size_of::<__double2>(), - 16usize, - concat!("Size of: ", stringify!(__double2)) - ); - assert_eq!( - ::std::mem::align_of::<__double2>(), - 8usize, - concat!("Alignment of ", stringify!(__double2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__double2>())).__sinval as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__double2), - "::", - stringify!(__sinval) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<__double2>())).__cosval as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__double2), - "::", - stringify!(__cosval) - ) - ); -} -extern "C" { - pub fn __sincosf_stret(arg1: f32) -> __float2; -} -extern "C" { - pub fn __sincos_stret(arg1: f64) -> __double2; -} -extern "C" { - pub fn __sincospif_stret(arg1: f32) -> __float2; -} -extern "C" { - pub fn __sincospi_stret(arg1: f64) -> __double2; -} -extern "C" { - pub fn j0(arg1: f64) -> f64; -} -extern "C" { - pub fn j1(arg1: f64) -> f64; -} -extern "C" { - pub fn jn(arg1: ::std::os::raw::c_int, arg2: f64) -> f64; -} -extern "C" { - pub fn y0(arg1: f64) -> f64; -} -extern "C" { - pub fn y1(arg1: f64) -> f64; -} -extern "C" { - pub fn yn(arg1: ::std::os::raw::c_int, arg2: f64) -> f64; -} -extern "C" { - pub fn scalb(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub static mut signgam: ::std::os::raw::c_int; -} -extern "C" { - pub fn drem(arg1: f64, arg2: f64) -> f64; -} -extern "C" { - pub fn finite(arg1: f64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gamma(arg1: f64) -> f64; -} -extern "C" { - pub fn significand(arg1: f64) -> f64; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct exception { - pub type_: ::std::os::raw::c_int, - pub name: *mut ::std::os::raw::c_char, - pub arg1: f64, - pub arg2: f64, - pub retval: f64, -} -#[test] -fn bindgen_test_layout_exception() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(exception)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(exception)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(exception), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(exception), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg1 as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(exception), - "::", - stringify!(arg1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).arg2 as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(exception), - "::", - stringify!(arg2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).retval as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(exception), - "::", - stringify!(retval) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct point { - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_point() { - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(point)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(point)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(point), "::", stringify!(x)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 4usize, - concat!("Offset of field: ", stringify!(point), "::", stringify!(y)) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pointf_s { - pub x: f64, - pub y: f64, -} -#[test] -fn bindgen_test_layout_pointf_s() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(pointf_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pointf_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pointf_s), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(pointf_s), - "::", - stringify!(y) - ) - ); -} -pub type pointf = pointf_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct box_ { - pub LL: point, - pub UR: point, -} -#[test] -fn bindgen_test_layout_box_() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(box_)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(box_)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).LL as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(box_), "::", stringify!(LL)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).UR as *const _ as usize }, - 8usize, - concat!("Offset of field: ", stringify!(box_), "::", stringify!(UR)) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct boxf { - pub LL: pointf, - pub UR: pointf, -} -#[test] -fn bindgen_test_layout_boxf() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(boxf)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(boxf)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).LL as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(boxf), "::", stringify!(LL)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).UR as *const _ as usize }, - 16usize, - concat!("Offset of field: ", stringify!(boxf), "::", stringify!(UR)) - ); -} -pub const api_t_API_render: api_t = 0; -pub const api_t_API_layout: api_t = 1; -pub const api_t_API_textlayout: api_t = 2; -pub const api_t_API_device: api_t = 3; -pub const api_t_API_loadimage: api_t = 4; -pub const api_t__DUMMY_ELEM_: api_t = 0; -pub type api_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GVJ_s { - _unused: [u8; 0], -} -pub type GVJ_t = GVJ_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GVG_s { - _unused: [u8; 0], -} -pub type GVG_t = GVG_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct GVC_s { - _unused: [u8; 0], -} -pub type GVC_t = GVC_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lt_symlist_t { - pub name: *const ::std::os::raw::c_char, - pub address: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_lt_symlist_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(lt_symlist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(lt_symlist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(lt_symlist_t), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).address as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(lt_symlist_t), - "::", - stringify!(address) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct gvplugin_available_s { - _unused: [u8; 0], -} -pub type gvplugin_available_t = gvplugin_available_s; -extern "C" { - pub static mut lt_preloaded_symbols: [lt_symlist_t; 0usize]; -} -pub type Ppoint_t = pointf_s; -pub type Pvector_t = pointf_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Ppoly_t { - pub ps: *mut Ppoint_t, - pub pn: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_Ppoly_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Ppoly_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Ppoly_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ps as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Ppoly_t), - "::", - stringify!(ps) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pn as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Ppoly_t), - "::", - stringify!(pn) - ) - ); -} -pub type Ppolyline_t = Ppoly_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Pedge_t { - pub a: Ppoint_t, - pub b: Ppoint_t, -} -#[test] -fn bindgen_test_layout_Pedge_t() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(Pedge_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Pedge_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Pedge_t), - "::", - stringify!(a) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Pedge_t), - "::", - stringify!(b) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct vconfig_s { - _unused: [u8; 0], -} -pub type vconfig_t = vconfig_s; -extern "C" { - pub fn freePath(p: *mut Ppolyline_t); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _PostscriptAlias { - pub name: *mut ::std::os::raw::c_char, - pub family: *mut ::std::os::raw::c_char, - pub weight: *mut ::std::os::raw::c_char, - pub stretch: *mut ::std::os::raw::c_char, - pub style: *mut ::std::os::raw::c_char, - pub xfig_code: ::std::os::raw::c_int, - pub svg_font_family: *mut ::std::os::raw::c_char, - pub svg_font_weight: *mut ::std::os::raw::c_char, - pub svg_font_style: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout__PostscriptAlias() { - assert_eq!( - ::std::mem::size_of::<_PostscriptAlias>(), - 72usize, - concat!("Size of: ", stringify!(_PostscriptAlias)) - ); - assert_eq!( - ::std::mem::align_of::<_PostscriptAlias>(), - 8usize, - concat!("Alignment of ", stringify!(_PostscriptAlias)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).family as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(family) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).weight as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(weight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).stretch as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(stretch) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).style as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(style) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).xfig_code as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(xfig_code) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_PostscriptAlias>())).svg_font_family as *const _ as usize - }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(svg_font_family) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::<_PostscriptAlias>())).svg_font_weight as *const _ as usize - }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(svg_font_weight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_PostscriptAlias>())).svg_font_style as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_PostscriptAlias), - "::", - stringify!(svg_font_style) - ) - ); -} -pub type PostscriptAlias = _PostscriptAlias; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct textfont_t { - pub name: *mut ::std::os::raw::c_char, - pub color: *mut ::std::os::raw::c_char, - pub postscript_alias: *mut PostscriptAlias, - pub size: f64, - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub __bindgen_padding_0: u32, -} -#[test] -fn bindgen_test_layout_textfont_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(textfont_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(textfont_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textfont_t), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).color as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textfont_t), - "::", - stringify!(color) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).postscript_alias as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(textfont_t), - "::", - stringify!(postscript_alias) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(textfont_t), - "::", - stringify!(size) - ) - ); -} -impl textfont_t { - #[inline] - pub fn flags(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u32) } - } - #[inline] - pub fn set_flags(&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 cnt(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) } - } - #[inline] - pub fn set_cnt(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(7usize, 25u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - flags: ::std::os::raw::c_uint, - cnt: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let flags: u32 = unsafe { ::std::mem::transmute(flags) }; - flags as u64 - }); - __bindgen_bitfield_unit.set(7usize, 25u8, { - let cnt: u32 = unsafe { ::std::mem::transmute(cnt) }; - cnt as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct textspan_t { - pub str: *mut ::std::os::raw::c_char, - pub font: *mut textfont_t, - pub layout: *mut ::std::os::raw::c_void, - pub free_layout: - ::std::option::Option, - pub yoffset_layout: f64, - pub yoffset_centerline: f64, - pub size: pointf, - pub just: ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_textspan_t() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(textspan_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(textspan_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).str as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(str) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).font as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(font) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).layout as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(layout) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).free_layout as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(free_layout) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yoffset_layout as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(yoffset_layout) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).yoffset_centerline as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(yoffset_centerline) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).just as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(textspan_t), - "::", - stringify!(just) - ) - ); -} -pub type wchar_t = __darwin_wchar_t; -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 intmax_t = ::std::os::raw::c_long; -pub type uintmax_t = ::std::os::raw::c_ulong; -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 type rsize_t = ::std::os::raw::c_ulong; -pub type max_align_t = u128; -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 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; -} -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; -} -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 fls(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -pub type Dtlink_t = _dtlink_s; -pub type Dthold_t = _dthold_s; -pub type Dtdisc_t = _dtdisc_s; -pub type Dtmethod_t = _dtmethod_s; -pub type Dtdata_t = _dtdata_s; -pub type Dt_t = _dt_s; -pub type Dict_t = _dt_s; -pub type Dtstat_t = _dtstat_s; -pub type Dtmemory_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: size_t, - arg4: *mut Dtdisc_t, - ) -> *mut ::std::os::raw::c_void, ->; -pub type Dtsearch_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void, ->; -pub type Dtmake_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut Dtdisc_t, - ) -> *mut ::std::os::raw::c_void, ->; -pub type Dtfree_f = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Dt_t, arg2: *mut ::std::os::raw::c_void, arg3: *mut Dtdisc_t), ->; -pub type Dtcompar_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - arg4: *mut Dtdisc_t, - ) -> ::std::os::raw::c_int, ->; -pub type Dthash_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut Dtdisc_t, - ) -> ::std::os::raw::c_uint, ->; -pub type Dtevent_f = ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_void, - arg4: *mut Dtdisc_t, - ) -> ::std::os::raw::c_int, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _dtlink_s { - pub right: *mut Dtlink_t, - pub hl: _dtlink_s__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _dtlink_s__bindgen_ty_1 { - pub _hash: ::std::os::raw::c_uint, - pub _left: *mut Dtlink_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout__dtlink_s__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_dtlink_s__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_dtlink_s__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_dtlink_s__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_dtlink_s__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtlink_s__bindgen_ty_1>()))._hash as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtlink_s__bindgen_ty_1), - "::", - stringify!(_hash) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtlink_s__bindgen_ty_1>()))._left as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtlink_s__bindgen_ty_1), - "::", - stringify!(_left) - ) - ); -} -#[test] -fn bindgen_test_layout__dtlink_s() { - assert_eq!( - ::std::mem::size_of::<_dtlink_s>(), - 16usize, - concat!("Size of: ", stringify!(_dtlink_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dtlink_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dtlink_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtlink_s>())).right as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtlink_s), - "::", - stringify!(right) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtlink_s>())).hl as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dtlink_s), - "::", - stringify!(hl) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _dthold_s { - pub hdr: Dtlink_t, - pub obj: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout__dthold_s() { - assert_eq!( - ::std::mem::size_of::<_dthold_s>(), - 24usize, - concat!("Size of: ", stringify!(_dthold_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dthold_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dthold_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dthold_s>())).hdr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dthold_s), - "::", - stringify!(hdr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dthold_s>())).obj as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_dthold_s), - "::", - stringify!(obj) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _dtmethod_s { - pub searchf: Dtsearch_f, - pub type_: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__dtmethod_s() { - assert_eq!( - ::std::mem::size_of::<_dtmethod_s>(), - 16usize, - concat!("Size of: ", stringify!(_dtmethod_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dtmethod_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dtmethod_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtmethod_s>())).searchf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtmethod_s), - "::", - stringify!(searchf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtmethod_s>())).type_ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dtmethod_s), - "::", - stringify!(type_) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _dtdata_s { - pub type_: ::std::os::raw::c_int, - pub here: *mut Dtlink_t, - pub hh: _dtdata_s__bindgen_ty_1, - pub ntab: ::std::os::raw::c_int, - pub size: ::std::os::raw::c_int, - pub loop_: ::std::os::raw::c_int, - pub minp: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union _dtdata_s__bindgen_ty_1 { - pub _htab: *mut *mut Dtlink_t, - pub _head: *mut Dtlink_t, - _bindgen_union_align: u64, -} -#[test] -fn bindgen_test_layout__dtdata_s__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::<_dtdata_s__bindgen_ty_1>(), - 8usize, - concat!("Size of: ", stringify!(_dtdata_s__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::<_dtdata_s__bindgen_ty_1>(), - 8usize, - concat!("Alignment of ", stringify!(_dtdata_s__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s__bindgen_ty_1>()))._htab as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s__bindgen_ty_1), - "::", - stringify!(_htab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s__bindgen_ty_1>()))._head as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s__bindgen_ty_1), - "::", - stringify!(_head) - ) - ); -} -#[test] -fn bindgen_test_layout__dtdata_s() { - assert_eq!( - ::std::mem::size_of::<_dtdata_s>(), - 40usize, - concat!("Size of: ", stringify!(_dtdata_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dtdata_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dtdata_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).type_ as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).here as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(here) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).hh as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(hh) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).ntab as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(ntab) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).size as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).loop_ as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(loop_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdata_s>())).minp as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(_dtdata_s), - "::", - stringify!(minp) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _dtdisc_s { - pub key: ::std::os::raw::c_int, - pub size: ::std::os::raw::c_int, - pub link: ::std::os::raw::c_int, - pub makef: Dtmake_f, - pub freef: Dtfree_f, - pub comparf: Dtcompar_f, - pub hashf: Dthash_f, - pub memoryf: Dtmemory_f, - pub eventf: Dtevent_f, -} -#[test] -fn bindgen_test_layout__dtdisc_s() { - assert_eq!( - ::std::mem::size_of::<_dtdisc_s>(), - 64usize, - concat!("Size of: ", stringify!(_dtdisc_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dtdisc_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dtdisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).key as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(key) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).link as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).makef as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(makef) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).freef as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(freef) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).comparf as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(comparf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).hashf as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(hashf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).memoryf as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(memoryf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtdisc_s>())).eventf as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_dtdisc_s), - "::", - stringify!(eventf) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _dt_s { - pub searchf: Dtsearch_f, - pub disc: *mut Dtdisc_t, - pub data: *mut Dtdata_t, - pub memoryf: Dtmemory_f, - pub meth: *mut Dtmethod_t, - pub type_: ::std::os::raw::c_int, - pub nview: ::std::os::raw::c_int, - pub view: *mut Dt_t, - pub walk: *mut Dt_t, - pub user: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout__dt_s() { - assert_eq!( - ::std::mem::size_of::<_dt_s>(), - 72usize, - concat!("Size of: ", stringify!(_dt_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dt_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dt_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).searchf as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(searchf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).disc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(disc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).data as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).memoryf as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(memoryf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).meth as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(meth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).type_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).nview as *const _ as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(nview) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).view as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(view) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).walk as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(walk) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dt_s>())).user as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(_dt_s), - "::", - stringify!(user) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _dtstat_s { - pub dt_meth: ::std::os::raw::c_int, - pub dt_size: ::std::os::raw::c_int, - pub dt_n: ::std::os::raw::c_int, - pub dt_max: ::std::os::raw::c_int, - pub dt_count: *mut ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout__dtstat_s() { - assert_eq!( - ::std::mem::size_of::<_dtstat_s>(), - 24usize, - concat!("Size of: ", stringify!(_dtstat_s)) - ); - assert_eq!( - ::std::mem::align_of::<_dtstat_s>(), - 8usize, - concat!("Alignment of ", stringify!(_dtstat_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtstat_s>())).dt_meth as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(_dtstat_s), - "::", - stringify!(dt_meth) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtstat_s>())).dt_size as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(_dtstat_s), - "::", - stringify!(dt_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtstat_s>())).dt_n as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(_dtstat_s), - "::", - stringify!(dt_n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtstat_s>())).dt_max as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(_dtstat_s), - "::", - stringify!(dt_max) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::<_dtstat_s>())).dt_count as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(_dtstat_s), - "::", - stringify!(dt_count) - ) - ); -} -extern "C" { - pub static mut Dtset: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtbag: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtoset: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtobag: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtlist: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtstack: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtqueue: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtdeque: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dtorder: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dttree: *mut Dtmethod_t; -} -extern "C" { - pub static mut Dthash: *mut Dtmethod_t; -} -extern "C" { - pub static mut _Dttree: Dtmethod_t; -} -extern "C" { - pub static mut _Dthash: Dtmethod_t; -} -extern "C" { - pub static mut _Dtlist: Dtmethod_t; -} -extern "C" { - pub static mut _Dtqueue: Dtmethod_t; -} -extern "C" { - pub static mut _Dtstack: Dtmethod_t; -} -extern "C" { - pub fn dtopen(arg1: *mut Dtdisc_t, arg2: *mut Dtmethod_t) -> *mut Dt_t; -} -extern "C" { - pub fn dtclose(arg1: *mut Dt_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dtview(arg1: *mut Dt_t, arg2: *mut Dt_t) -> *mut Dt_t; -} -extern "C" { - pub fn dtdisc(dt: *mut Dt_t, arg1: *mut Dtdisc_t, arg2: ::std::os::raw::c_int) - -> *mut Dtdisc_t; -} -extern "C" { - pub fn dtmethod(arg1: *mut Dt_t, arg2: *mut Dtmethod_t) -> *mut Dtmethod_t; -} -extern "C" { - pub fn dtflatten(arg1: *mut Dt_t) -> *mut Dtlink_t; -} -extern "C" { - pub fn dtextract(arg1: *mut Dt_t) -> *mut Dtlink_t; -} -extern "C" { - pub fn dtrestore(arg1: *mut Dt_t, arg2: *mut Dtlink_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dtwalk( - arg1: *mut Dt_t, - arg2: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, - >, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dtrenew( - arg1: *mut Dt_t, - arg2: *mut ::std::os::raw::c_void, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn dtsize(arg1: *mut Dt_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dtstat( - arg1: *mut Dt_t, - arg2: *mut Dtstat_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dtstrhash( - arg1: ::std::os::raw::c_uint, - arg2: *mut ::std::os::raw::c_void, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_uint; -} -pub type IDTYPE = u64; -pub type Agtag_t = Agtag_s; -pub type Agobj_t = Agobj_s; -pub type Agraph_t = Agraph_s; -pub type Agnode_t = Agnode_s; -pub type Agedge_t = Agedge_s; -pub type Agdesc_t = Agdesc_s; -pub type Agmemdisc_t = Agmemdisc_s; -pub type Agiddisc_t = Agiddisc_s; -pub type Agiodisc_t = Agiodisc_s; -pub type Agdisc_t = Agdisc_s; -pub type Agdstate_t = Agdstate_s; -pub type Agsym_t = Agsym_s; -pub type Agattr_t = Agattr_s; -pub type Agcbdisc_t = Agcbdisc_s; -pub type Agcbstack_t = Agcbstack_s; -pub type Agclos_t = Agclos_s; -pub type Agrec_t = Agrec_s; -pub type Agdatadict_t = Agdatadict_s; -pub type Agedgepair_t = Agedgepair_s; -pub type Agsubnode_t = Agsubnode_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agrec_s { - pub name: *mut ::std::os::raw::c_char, - pub next: *mut Agrec_t, -} -#[test] -fn bindgen_test_layout_Agrec_s() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Agrec_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agrec_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agrec_s), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agrec_s), - "::", - stringify!(next) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agtag_s { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u32>, - pub id: IDTYPE, -} -#[test] -fn bindgen_test_layout_Agtag_s() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Agtag_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agtag_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agtag_s), - "::", - stringify!(id) - ) - ); -} -impl Agtag_s { - #[inline] - pub fn objtype(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } - } - #[inline] - pub fn set_objtype(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 2u8, val as u64) - } - } - #[inline] - pub fn mtflock(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_mtflock(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn attrwf(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_attrwf(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn seq(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } - } - #[inline] - pub fn set_seq(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 28u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - objtype: ::std::os::raw::c_uint, - mtflock: ::std::os::raw::c_uint, - attrwf: ::std::os::raw::c_uint, - seq: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u32> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u32> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 2u8, { - let objtype: u32 = unsafe { ::std::mem::transmute(objtype) }; - objtype as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let mtflock: u32 = unsafe { ::std::mem::transmute(mtflock) }; - mtflock as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let attrwf: u32 = unsafe { ::std::mem::transmute(attrwf) }; - attrwf as u64 - }); - __bindgen_bitfield_unit.set(4usize, 28u8, { - let seq: u32 = unsafe { ::std::mem::transmute(seq) }; - seq as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agobj_s { - pub tag: Agtag_t, - pub data: *mut Agrec_t, -} -#[test] -fn bindgen_test_layout_Agobj_s() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agobj_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agobj_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tag as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agobj_s), - "::", - stringify!(tag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agobj_s), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agsubnode_s { - pub seq_link: Dtlink_t, - pub id_link: Dtlink_t, - pub node: *mut Agnode_t, - pub in_id: *mut Dtlink_t, - pub out_id: *mut Dtlink_t, - pub in_seq: *mut Dtlink_t, - pub out_seq: *mut Dtlink_t, -} -#[test] -fn bindgen_test_layout_Agsubnode_s() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(Agsubnode_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agsubnode_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_link as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(seq_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id_link as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(id_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).node as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(node) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).in_id as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(in_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).out_id as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(out_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).in_seq as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(in_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).out_seq as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Agsubnode_s), - "::", - stringify!(out_seq) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agnode_s { - pub base: Agobj_t, - pub root: *mut Agraph_t, - pub mainsub: Agsubnode_t, -} -#[test] -fn bindgen_test_layout_Agnode_s() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(Agnode_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agnode_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agnode_s), - "::", - stringify!(base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agnode_s), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mainsub as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agnode_s), - "::", - stringify!(mainsub) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agedge_s { - pub base: Agobj_t, - pub id_link: Dtlink_t, - pub seq_link: Dtlink_t, - pub node: *mut Agnode_t, -} -#[test] -fn bindgen_test_layout_Agedge_s() { - assert_eq!( - ::std::mem::size_of::(), - 64usize, - concat!("Size of: ", stringify!(Agedge_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agedge_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agedge_s), - "::", - stringify!(base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id_link as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agedge_s), - "::", - stringify!(id_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq_link as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Agedge_s), - "::", - stringify!(seq_link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).node as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Agedge_s), - "::", - stringify!(node) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agedgepair_s { - pub out: Agedge_t, - pub in_: Agedge_t, -} -#[test] -fn bindgen_test_layout_Agedgepair_s() { - assert_eq!( - ::std::mem::size_of::(), - 128usize, - concat!("Size of: ", stringify!(Agedgepair_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agedgepair_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).out as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agedgepair_s), - "::", - stringify!(out) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).in_ as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Agedgepair_s), - "::", - stringify!(in_) - ) - ); -} -#[repr(C)] -#[repr(align(4))] -#[derive(Debug, Copy, Clone)] -pub struct Agdesc_s { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize], u8>, - pub __bindgen_padding_0: [u8; 3usize], -} -#[test] -fn bindgen_test_layout_Agdesc_s() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(Agdesc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(Agdesc_s)) - ); -} -impl Agdesc_s { - #[inline] - pub fn directed(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_directed(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub fn strict(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_strict(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub fn no_loop(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } - } - #[inline] - pub fn set_no_loop(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 1u8, val as u64) - } - } - #[inline] - pub fn maingraph(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } - } - #[inline] - pub fn set_maingraph(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(3usize, 1u8, val as u64) - } - } - #[inline] - pub fn flatlock(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_flatlock(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub fn no_write(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_no_write(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub fn has_attrs(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } - } - #[inline] - pub fn set_has_attrs(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 1u8, val as u64) - } - } - #[inline] - pub fn has_cmpnd(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } - } - #[inline] - pub fn set_has_cmpnd(&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 new_bitfield_1( - directed: ::std::os::raw::c_uint, - strict: ::std::os::raw::c_uint, - no_loop: ::std::os::raw::c_uint, - maingraph: ::std::os::raw::c_uint, - flatlock: ::std::os::raw::c_uint, - no_write: ::std::os::raw::c_uint, - has_attrs: ::std::os::raw::c_uint, - has_cmpnd: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 1usize], u8> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize], u8> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let directed: u32 = unsafe { ::std::mem::transmute(directed) }; - directed as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let strict: u32 = unsafe { ::std::mem::transmute(strict) }; - strict as u64 - }); - __bindgen_bitfield_unit.set(2usize, 1u8, { - let no_loop: u32 = unsafe { ::std::mem::transmute(no_loop) }; - no_loop as u64 - }); - __bindgen_bitfield_unit.set(3usize, 1u8, { - let maingraph: u32 = unsafe { ::std::mem::transmute(maingraph) }; - maingraph as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let flatlock: u32 = unsafe { ::std::mem::transmute(flatlock) }; - flatlock as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let no_write: u32 = unsafe { ::std::mem::transmute(no_write) }; - no_write as u64 - }); - __bindgen_bitfield_unit.set(6usize, 1u8, { - let has_attrs: u32 = unsafe { ::std::mem::transmute(has_attrs) }; - has_attrs as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let has_cmpnd: u32 = unsafe { ::std::mem::transmute(has_cmpnd) }; - has_cmpnd as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agmemdisc_s { - pub open: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut Agdisc_t) -> *mut ::std::os::raw::c_void, - >, - pub alloc: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - req: size_t, - ) -> *mut ::std::os::raw::c_void, - >, - pub resize: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - ptr: *mut ::std::os::raw::c_void, - old: size_t, - req: size_t, - ) -> *mut ::std::os::raw::c_void, - >, - pub free: ::std::option::Option< - unsafe extern "C" fn(state: *mut ::std::os::raw::c_void, ptr: *mut ::std::os::raw::c_void), - >, - pub close: ::std::option::Option, -} -#[test] -fn bindgen_test_layout_Agmemdisc_s() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(Agmemdisc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agmemdisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).open as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agmemdisc_s), - "::", - stringify!(open) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alloc as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agmemdisc_s), - "::", - stringify!(alloc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).resize as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agmemdisc_s), - "::", - stringify!(resize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).free as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agmemdisc_s), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).close as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agmemdisc_s), - "::", - stringify!(close) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agiddisc_s { - pub open: ::std::option::Option< - unsafe extern "C" fn(g: *mut Agraph_t, arg1: *mut Agdisc_t) -> *mut ::std::os::raw::c_void, - >, - pub map: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - objtype: ::std::os::raw::c_int, - str: *mut ::std::os::raw::c_char, - id: *mut IDTYPE, - createflag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long, - >, - pub alloc: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - objtype: ::std::os::raw::c_int, - id: IDTYPE, - ) -> ::std::os::raw::c_long, - >, - pub free: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - objtype: ::std::os::raw::c_int, - id: IDTYPE, - ), - >, - pub print: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - objtype: ::std::os::raw::c_int, - id: IDTYPE, - ) -> *mut ::std::os::raw::c_char, - >, - pub close: ::std::option::Option, - pub idregister: ::std::option::Option< - unsafe extern "C" fn( - state: *mut ::std::os::raw::c_void, - objtype: ::std::os::raw::c_int, - obj: *mut ::std::os::raw::c_void, - ), - >, -} -#[test] -fn bindgen_test_layout_Agiddisc_s() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(Agiddisc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agiddisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).open as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(open) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).map as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(map) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alloc as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(alloc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).free as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(free) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).print as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(print) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).close as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).idregister as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agiddisc_s), - "::", - stringify!(idregister) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agiodisc_s { - pub afread: ::std::option::Option< - unsafe extern "C" fn( - chan: *mut ::std::os::raw::c_void, - buf: *mut ::std::os::raw::c_char, - bufsize: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub putstr: ::std::option::Option< - unsafe extern "C" fn( - chan: *mut ::std::os::raw::c_void, - str: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int, - >, - pub flush: ::std::option::Option< - unsafe extern "C" fn(chan: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, - >, -} -#[test] -fn bindgen_test_layout_Agiodisc_s() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agiodisc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agiodisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).afread as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agiodisc_s), - "::", - stringify!(afread) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).putstr as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agiodisc_s), - "::", - stringify!(putstr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flush as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agiodisc_s), - "::", - stringify!(flush) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agdisc_s { - pub mem: *mut Agmemdisc_t, - pub id: *mut Agiddisc_t, - pub io: *mut Agiodisc_t, -} -#[test] -fn bindgen_test_layout_Agdisc_s() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agdisc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agdisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agdisc_s), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agdisc_s), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).io as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agdisc_s), - "::", - stringify!(io) - ) - ); -} -extern "C" { - pub static mut AgMemDisc: Agmemdisc_t; -} -extern "C" { - pub static mut AgIdDisc: Agiddisc_t; -} -extern "C" { - pub static mut AgIoDisc: Agiodisc_t; -} -extern "C" { - pub static mut AgDefaultDisc: Agdisc_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agdstate_s { - pub mem: *mut ::std::os::raw::c_void, - pub id: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_Agdstate_s() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(Agdstate_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agdstate_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mem as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agdstate_s), - "::", - stringify!(mem) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agdstate_s), - "::", - stringify!(id) - ) - ); -} -pub type agobjfn_t = ::std::option::Option< - unsafe extern "C" fn(g: *mut Agraph_t, obj: *mut Agobj_t, arg: *mut ::std::os::raw::c_void), ->; -pub type agobjupdfn_t = ::std::option::Option< - unsafe extern "C" fn( - g: *mut Agraph_t, - obj: *mut Agobj_t, - arg: *mut ::std::os::raw::c_void, - sym: *mut Agsym_t, - ), ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agcbdisc_s { - pub graph: Agcbdisc_s__bindgen_ty_1, - pub node: Agcbdisc_s__bindgen_ty_1, - pub edge: Agcbdisc_s__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agcbdisc_s__bindgen_ty_1 { - pub ins: agobjfn_t, - pub mod_: agobjupdfn_t, - pub del: agobjfn_t, -} -#[test] -fn bindgen_test_layout_Agcbdisc_s__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agcbdisc_s__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agcbdisc_s__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ins as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s__bindgen_ty_1), - "::", - stringify!(ins) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mod_ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s__bindgen_ty_1), - "::", - stringify!(mod_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).del as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s__bindgen_ty_1), - "::", - stringify!(del) - ) - ); -} -#[test] -fn bindgen_test_layout_Agcbdisc_s() { - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(Agcbdisc_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agcbdisc_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).graph as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s), - "::", - stringify!(graph) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).node as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s), - "::", - stringify!(node) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).edge as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agcbdisc_s), - "::", - stringify!(edge) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agcbstack_s { - pub f: *mut Agcbdisc_t, - pub state: *mut ::std::os::raw::c_void, - pub prev: *mut Agcbstack_t, -} -#[test] -fn bindgen_test_layout_Agcbstack_s() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agcbstack_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agcbstack_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agcbstack_s), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agcbstack_s), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agcbstack_s), - "::", - stringify!(prev) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agclos_s { - pub disc: Agdisc_t, - pub state: Agdstate_t, - pub strdict: *mut Dict_t, - pub seq: [u64; 3usize], - pub cb: *mut Agcbstack_t, - pub callbacks_enabled: ::std::os::raw::c_uchar, - pub lookup_by_name: [*mut Dict_t; 3usize], - pub lookup_by_id: [*mut Dict_t; 3usize], -} -#[test] -fn bindgen_test_layout_Agclos_s() { - assert_eq!( - ::std::mem::size_of::(), - 136usize, - concat!("Size of: ", stringify!(Agclos_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agclos_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).disc as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(disc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).strdict as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(strdict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).seq as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cb as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(cb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).callbacks_enabled as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(callbacks_enabled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lookup_by_name as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(lookup_by_name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lookup_by_id as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(Agclos_s), - "::", - stringify!(lookup_by_id) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agraph_s { - pub base: Agobj_t, - pub desc: Agdesc_t, - pub link: Dtlink_t, - pub n_seq: *mut Dict_t, - pub n_id: *mut Dict_t, - pub e_seq: *mut Dict_t, - pub e_id: *mut Dict_t, - pub g_dict: *mut Dict_t, - pub parent: *mut Agraph_t, - pub root: *mut Agraph_t, - pub clos: *mut Agclos_t, -} -#[test] -fn bindgen_test_layout_Agraph_s() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(Agraph_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agraph_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).base as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(base) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).desc as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(desc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).link as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_seq as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(n_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_id as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(n_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e_seq as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(e_seq) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e_id as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(e_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).g_dict as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(g_dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).root as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(root) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clos as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(Agraph_s), - "::", - stringify!(clos) - ) - ); -} -extern "C" { - pub fn agpushdisc(g: *mut Agraph_t, disc: *mut Agcbdisc_t, state: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn agpopdisc(g: *mut Agraph_t, disc: *mut Agcbdisc_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agcallbacks(g: *mut Agraph_t, flag: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agopen( - name: *mut ::std::os::raw::c_char, - desc: Agdesc_t, - disc: *mut Agdisc_t, - ) -> *mut Agraph_t; -} -extern "C" { - pub fn agclose(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agread(chan: *mut ::std::os::raw::c_void, disc: *mut Agdisc_t) -> *mut Agraph_t; -} -extern "C" { - pub fn agmemread(cp: *const ::std::os::raw::c_char) -> *mut Agraph_t; -} -extern "C" { - pub fn agmemconcat(g: *mut Agraph_t, cp: *const ::std::os::raw::c_char) -> *mut Agraph_t; -} -extern "C" { - pub fn agreadline(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn agsetfile(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn agconcat( - g: *mut Agraph_t, - chan: *mut ::std::os::raw::c_void, - disc: *mut Agdisc_t, - ) -> *mut Agraph_t; -} -extern "C" { - pub fn agwrite(g: *mut Agraph_t, chan: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agisdirected(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agisundirected(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agisstrict(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agissimple(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agnode( - g: *mut Agraph_t, - name: *mut ::std::os::raw::c_char, - createflag: ::std::os::raw::c_int, - ) -> *mut Agnode_t; -} -extern "C" { - pub fn agidnode( - g: *mut Agraph_t, - id: IDTYPE, - createflag: ::std::os::raw::c_int, - ) -> *mut Agnode_t; -} -extern "C" { - pub fn agsubnode( - g: *mut Agraph_t, - n: *mut Agnode_t, - createflag: ::std::os::raw::c_int, - ) -> *mut Agnode_t; -} -extern "C" { - pub fn agfstnode(g: *mut Agraph_t) -> *mut Agnode_t; -} -extern "C" { - pub fn agnxtnode(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agnode_t; -} -extern "C" { - pub fn aglstnode(g: *mut Agraph_t) -> *mut Agnode_t; -} -extern "C" { - pub fn agprvnode(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agnode_t; -} -extern "C" { - pub fn agsubrep(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agsubnode_t; -} -extern "C" { - pub fn agnodebefore(u: *mut Agnode_t, v: *mut Agnode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agedge( - g: *mut Agraph_t, - t: *mut Agnode_t, - h: *mut Agnode_t, - name: *mut ::std::os::raw::c_char, - createflag: ::std::os::raw::c_int, - ) -> *mut Agedge_t; -} -extern "C" { - pub fn agidedge( - g: *mut Agraph_t, - t: *mut Agnode_t, - h: *mut Agnode_t, - id: IDTYPE, - createflag: ::std::os::raw::c_int, - ) -> *mut Agedge_t; -} -extern "C" { - pub fn agsubedge( - g: *mut Agraph_t, - e: *mut Agedge_t, - createflag: ::std::os::raw::c_int, - ) -> *mut Agedge_t; -} -extern "C" { - pub fn agfstin(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agnxtin(g: *mut Agraph_t, e: *mut Agedge_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agfstout(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agnxtout(g: *mut Agraph_t, e: *mut Agedge_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agfstedge(g: *mut Agraph_t, n: *mut Agnode_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agnxtedge(g: *mut Agraph_t, e: *mut Agedge_t, n: *mut Agnode_t) -> *mut Agedge_t; -} -extern "C" { - pub fn agraphof(obj: *mut ::std::os::raw::c_void) -> *mut Agraph_t; -} -extern "C" { - pub fn agroot(obj: *mut ::std::os::raw::c_void) -> *mut Agraph_t; -} -extern "C" { - pub fn agcontains( - arg1: *mut Agraph_t, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agnameof(arg1: *mut ::std::os::raw::c_void) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agrelabel_node( - n: *mut Agnode_t, - newname: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agdelete(g: *mut Agraph_t, obj: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agdelsubg(g: *mut Agraph_t, sub: *mut Agraph_t) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn agdelnode(g: *mut Agraph_t, arg_n: *mut Agnode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agdeledge(g: *mut Agraph_t, arg_e: *mut Agedge_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agobjkind(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agstrdup( - arg1: *mut Agraph_t, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn aghtmlstr(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agstrbind( - g: *mut Agraph_t, - arg1: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agstrfree( - arg1: *mut Agraph_t, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agcanon( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agstrcanon( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agcanonStr(str: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agattr_s { - pub h: Agrec_t, - pub dict: *mut Dict_t, - pub str: *mut *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_Agattr_s() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(Agattr_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agattr_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agattr_s), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agattr_s), - "::", - stringify!(dict) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).str as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agattr_s), - "::", - stringify!(str) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Agsym_s { - pub link: Dtlink_t, - pub name: *mut ::std::os::raw::c_char, - pub defval: *mut ::std::os::raw::c_char, - pub id: ::std::os::raw::c_int, - pub kind: ::std::os::raw::c_uchar, - pub fixed: ::std::os::raw::c_uchar, - pub print: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_Agsym_s() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(Agsym_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agsym_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).link as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).defval as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(defval) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).kind as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(kind) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fixed as *const _ as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(fixed) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).print as *const _ as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(Agsym_s), - "::", - stringify!(print) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agdatadict_s { - pub h: Agrec_t, - pub dict: Agdatadict_s__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agdatadict_s__bindgen_ty_1 { - pub n: *mut Dict_t, - pub e: *mut Dict_t, - pub g: *mut Dict_t, -} -#[test] -fn bindgen_test_layout_Agdatadict_s__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(Agdatadict_s__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agdatadict_s__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agdatadict_s__bindgen_ty_1), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).e as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(Agdatadict_s__bindgen_ty_1), - "::", - stringify!(e) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).g as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agdatadict_s__bindgen_ty_1), - "::", - stringify!(g) - ) - ); -} -#[test] -fn bindgen_test_layout_Agdatadict_s() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(Agdatadict_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agdatadict_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agdatadict_s), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dict as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agdatadict_s), - "::", - stringify!(dict) - ) - ); -} -extern "C" { - pub fn agattr( - g: *mut Agraph_t, - kind: ::std::os::raw::c_int, - name: *mut ::std::os::raw::c_char, - value: *mut ::std::os::raw::c_char, - ) -> *mut Agsym_t; -} -extern "C" { - pub fn agattrsym( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - ) -> *mut Agsym_t; -} -extern "C" { - pub fn agnxtattr( - g: *mut Agraph_t, - kind: ::std::os::raw::c_int, - attr: *mut Agsym_t, - ) -> *mut Agsym_t; -} -extern "C" { - pub fn agcopyattr( - oldobj: *mut ::std::os::raw::c_void, - newobj: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agbindrec( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - size: ::std::os::raw::c_uint, - move_to_front: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn aggetrec( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - move_to_front: ::std::os::raw::c_int, - ) -> *mut Agrec_t; -} -extern "C" { - pub fn agdelrec( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn aginit( - g: *mut Agraph_t, - kind: ::std::os::raw::c_int, - rec_name: *mut ::std::os::raw::c_char, - rec_size: ::std::os::raw::c_int, - move_to_front: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn agclean( - g: *mut Agraph_t, - kind: ::std::os::raw::c_int, - rec_name: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn agget( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agxget( - obj: *mut ::std::os::raw::c_void, - sym: *mut Agsym_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agset( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - value: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agxset( - obj: *mut ::std::os::raw::c_void, - sym: *mut Agsym_t, - value: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agsafeset( - obj: *mut ::std::os::raw::c_void, - name: *mut ::std::os::raw::c_char, - value: *mut ::std::os::raw::c_char, - def: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agsubg( - g: *mut Agraph_t, - name: *mut ::std::os::raw::c_char, - cflag: ::std::os::raw::c_int, - ) -> *mut Agraph_t; -} -extern "C" { - pub fn agidsubg(g: *mut Agraph_t, id: IDTYPE, cflag: ::std::os::raw::c_int) -> *mut Agraph_t; -} -extern "C" { - pub fn agfstsubg(g: *mut Agraph_t) -> *mut Agraph_t; -} -extern "C" { - pub fn agnxtsubg(subg: *mut Agraph_t) -> *mut Agraph_t; -} -extern "C" { - pub fn agparent(g: *mut Agraph_t) -> *mut Agraph_t; -} -extern "C" { - pub fn agnnodes(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agnedges(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agnsubg(g: *mut Agraph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agdegree( - g: *mut Agraph_t, - n: *mut Agnode_t, - in_: ::std::os::raw::c_int, - out: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agcountuniqedges( - g: *mut Agraph_t, - n: *mut Agnode_t, - in_: ::std::os::raw::c_int, - out: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agalloc(g: *mut Agraph_t, size: size_t) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn agrealloc( - g: *mut Agraph_t, - ptr: *mut ::std::os::raw::c_void, - oldsize: size_t, - size: size_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn agfree(g: *mut Agraph_t, ptr: *mut ::std::os::raw::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _vmalloc_s { - _unused: [u8; 0], -} -extern "C" { - pub fn agheap(g: *mut Agraph_t) -> *mut _vmalloc_s; -} -extern "C" { - pub fn aginternalmapclearlocalnames(g: *mut Agraph_t); -} -pub const agerrlevel_t_AGWARN: agerrlevel_t = 0; -pub const agerrlevel_t_AGERR: agerrlevel_t = 1; -pub const agerrlevel_t_AGMAX: agerrlevel_t = 2; -pub const agerrlevel_t_AGPREV: agerrlevel_t = 3; -pub type agerrlevel_t = u32; -pub type agusererrf = ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn agseterr(arg1: agerrlevel_t) -> agerrlevel_t; -} -extern "C" { - pub fn aglasterr() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn agerr( - level: agerrlevel_t, - fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agerrorf(fmt: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn agwarningf(fmt: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn agerrors() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agreseterrors() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn agseterrf(arg1: agusererrf) -> agusererrf; -} -extern "C" { - pub static mut Agdirected: Agdesc_t; -} -extern "C" { - pub static mut Agstrictdirected: Agdesc_t; -} -extern "C" { - pub static mut Agundirected: Agdesc_t; -} -extern "C" { - pub static mut Agstrictundirected: Agdesc_t; -} -extern "C" { - pub fn agflatten(g: *mut Agraph_t, flag: ::std::os::raw::c_int); -} -pub type Agnoderef_t = Agsubnode_t; -pub type Agedgeref_t = Dtlink_t; -pub type qsort_cmpf = ::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, ->; -pub type bsearch_cmpf = ::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, ->; -pub type graph_t = Agraph_s; -pub type node_t = Agnode_s; -pub type edge_t = Agedge_s; -pub type attrsym_t = Agsym_s; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct htmllabel_t { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union inside_t { - pub a: inside_t__bindgen_ty_1, - pub s: inside_t__bindgen_ty_2, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct inside_t__bindgen_ty_1 { - pub p: *mut pointf, - pub r: *mut f64, -} -#[test] -fn bindgen_test_layout_inside_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(inside_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(inside_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(inside_t__bindgen_ty_1), - "::", - stringify!(p) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).r as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(inside_t__bindgen_ty_1), - "::", - stringify!(r) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct inside_t__bindgen_ty_2 { - pub n: *mut node_t, - pub bp: *mut boxf, -} -#[test] -fn bindgen_test_layout_inside_t__bindgen_ty_2() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(inside_t__bindgen_ty_2)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(inside_t__bindgen_ty_2)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(inside_t__bindgen_ty_2), - "::", - stringify!(n) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bp as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(inside_t__bindgen_ty_2), - "::", - stringify!(bp) - ) - ); -} -#[test] -fn bindgen_test_layout_inside_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(inside_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(inside_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).a as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(inside_t), - "::", - stringify!(a) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).s as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(inside_t), - "::", - stringify!(s) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct port { - pub p: pointf, - pub theta: f64, - pub bp: *mut boxf, - pub defined: boolean, - pub constrained: boolean, - pub clip: boolean, - pub dyna: boolean, - pub order: ::std::os::raw::c_uchar, - pub side: ::std::os::raw::c_uchar, - pub name: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_port() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(port)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(port)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).p as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(port), "::", stringify!(p)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).theta as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(theta) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bp as *const _ as usize }, - 24usize, - concat!("Offset of field: ", stringify!(port), "::", stringify!(bp)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).defined as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(defined) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).constrained as *const _ as usize }, - 33usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(constrained) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clip as *const _ as usize }, - 34usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(clip) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dyna as *const _ as usize }, - 35usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(dyna) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).order as *const _ as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).side as *const _ as usize }, - 37usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(side) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(port), - "::", - stringify!(name) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct splineInfo { - pub swapEnds: ::std::option::Option boolean>, - pub splineMerge: ::std::option::Option boolean>, - pub ignoreSwap: boolean, - pub isOrtho: boolean, -} -#[test] -fn bindgen_test_layout_splineInfo() { - assert_eq!( - ::std::mem::size_of::(), - 24usize, - concat!("Size of: ", stringify!(splineInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(splineInfo)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).swapEnds as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(splineInfo), - "::", - stringify!(swapEnds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).splineMerge as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(splineInfo), - "::", - stringify!(splineMerge) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ignoreSwap as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(splineInfo), - "::", - stringify!(ignoreSwap) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).isOrtho as *const _ as usize }, - 17usize, - concat!( - "Offset of field: ", - stringify!(splineInfo), - "::", - stringify!(isOrtho) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pathend_t { - pub nb: boxf, - pub np: pointf, - pub sidemask: ::std::os::raw::c_int, - pub boxn: ::std::os::raw::c_int, - pub boxes: [boxf; 20usize], -} -#[test] -fn bindgen_test_layout_pathend_t() { - assert_eq!( - ::std::mem::size_of::(), - 696usize, - concat!("Size of: ", stringify!(pathend_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(pathend_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nb as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(pathend_t), - "::", - stringify!(nb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).np as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(pathend_t), - "::", - stringify!(np) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sidemask as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(pathend_t), - "::", - stringify!(sidemask) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).boxn as *const _ as usize }, - 52usize, - concat!( - "Offset of field: ", - stringify!(pathend_t), - "::", - stringify!(boxn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).boxes as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(pathend_t), - "::", - stringify!(boxes) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct path { - pub start: port, - pub end: port, - pub nbox: ::std::os::raw::c_int, - pub boxes: *mut boxf, - pub data: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_path() { - assert_eq!( - ::std::mem::size_of::(), - 120usize, - concat!("Size of: ", stringify!(path)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(path)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).start as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(path), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).end as *const _ as usize }, - 48usize, - concat!("Offset of field: ", stringify!(path), "::", stringify!(end)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nbox as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(path), - "::", - stringify!(nbox) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).boxes as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(path), - "::", - stringify!(boxes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(path), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bezier { - pub list: *mut pointf, - pub size: ::std::os::raw::c_int, - pub sflag: ::std::os::raw::c_int, - pub eflag: ::std::os::raw::c_int, - pub sp: pointf, - pub ep: pointf, -} -#[test] -fn bindgen_test_layout_bezier() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(bezier)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(bezier)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).list as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sflag as *const _ as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(sflag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).eflag as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(eflag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sp as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(sp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ep as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(bezier), - "::", - stringify!(ep) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct splines { - pub list: *mut bezier, - pub size: ::std::os::raw::c_int, - pub bb: boxf, -} -#[test] -fn bindgen_test_layout_splines() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(splines)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(splines)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).list as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(splines), - "::", - stringify!(list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(splines), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bb as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(splines), - "::", - stringify!(bb) - ) - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct textlabel_t { - pub text: *mut ::std::os::raw::c_char, - pub fontname: *mut ::std::os::raw::c_char, - pub fontcolor: *mut ::std::os::raw::c_char, - pub charset: ::std::os::raw::c_int, - pub fontsize: f64, - pub dimen: pointf, - pub space: pointf, - pub pos: pointf, - pub u: textlabel_t__bindgen_ty_1, - pub valign: ::std::os::raw::c_char, - pub set: boolean, - pub html: boolean, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union textlabel_t__bindgen_ty_1 { - pub txt: textlabel_t__bindgen_ty_1__bindgen_ty_1, - pub html: *mut htmllabel_t, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct textlabel_t__bindgen_ty_1__bindgen_ty_1 { - pub span: *mut textspan_t, - pub nspans: ::std::os::raw::c_short, -} -#[test] -fn bindgen_test_layout_textlabel_t__bindgen_ty_1__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!( - "Size of: ", - stringify!(textlabel_t__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!( - "Alignment of ", - stringify!(textlabel_t__bindgen_ty_1__bindgen_ty_1) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).span as *const _ - as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(span) - ) - ); - assert_eq!( - unsafe { - &(*(::std::ptr::null::())).nspans as *const _ - as usize - }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t__bindgen_ty_1__bindgen_ty_1), - "::", - stringify!(nspans) - ) - ); -} -#[test] -fn bindgen_test_layout_textlabel_t__bindgen_ty_1() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(textlabel_t__bindgen_ty_1)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(textlabel_t__bindgen_ty_1)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).txt as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t__bindgen_ty_1), - "::", - stringify!(txt) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).html as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t__bindgen_ty_1), - "::", - stringify!(html) - ) - ); -} -#[test] -fn bindgen_test_layout_textlabel_t() { - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(textlabel_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(textlabel_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).text as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(text) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fontname as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(fontname) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fontcolor as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(fontcolor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charset as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(charset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fontsize as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(fontsize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dimen as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(dimen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).space as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(space) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).u as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(u) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).valign as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(valign) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).set as *const _ as usize }, - 105usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).html as *const _ as usize }, - 106usize, - concat!( - "Offset of field: ", - stringify!(textlabel_t), - "::", - stringify!(html) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct polygon_t { - pub regular: ::std::os::raw::c_int, - pub peripheries: ::std::os::raw::c_int, - pub sides: ::std::os::raw::c_int, - pub orientation: f64, - pub distortion: f64, - pub skew: f64, - pub option: ::std::os::raw::c_int, - pub vertices: *mut pointf, -} -#[test] -fn bindgen_test_layout_polygon_t() { - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(polygon_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(polygon_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).regular as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(regular) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).peripheries as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(peripheries) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sides as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(sides) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).orientation as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(orientation) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).distortion as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(distortion) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).skew as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(skew) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).option as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(option) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertices as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(polygon_t), - "::", - stringify!(vertices) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stroke_t { - pub nvertices: ::std::os::raw::c_int, - pub flags: ::std::os::raw::c_int, - pub vertices: *mut pointf, -} -#[test] -fn bindgen_test_layout_stroke_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(stroke_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(stroke_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nvertices as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(stroke_t), - "::", - stringify!(nvertices) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(stroke_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).vertices as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(stroke_t), - "::", - stringify!(vertices) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct shape_t { - pub nstrokes: ::std::os::raw::c_int, - pub strokes: *mut stroke_t, -} -#[test] -fn bindgen_test_layout_shape_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(shape_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(shape_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nstrokes as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(shape_t), - "::", - stringify!(nstrokes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).strokes as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(shape_t), - "::", - stringify!(strokes) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct shape_functions { - pub initfn: ::std::option::Option, - pub freefn: ::std::option::Option, - pub portfn: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut node_t, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - ) -> port, - >, - pub insidefn: ::std::option::Option< - unsafe extern "C" fn(inside_context: *mut inside_t, arg1: pointf) -> boolean, - >, - pub pboxfn: ::std::option::Option< - unsafe extern "C" fn( - n: *mut node_t, - p: *mut port, - side: ::std::os::raw::c_int, - rv: *mut boxf, - kptr: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub codefn: ::std::option::Option, -} -#[test] -fn bindgen_test_layout_shape_functions() { - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(shape_functions)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(shape_functions)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).initfn as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(initfn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).freefn as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(freefn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).portfn as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(portfn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).insidefn as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(insidefn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pboxfn as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(pboxfn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).codefn as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(shape_functions), - "::", - stringify!(codefn) - ) - ); -} -pub const shape_kind_SH_UNSET: shape_kind = 0; -pub const shape_kind_SH_POLY: shape_kind = 1; -pub const shape_kind_SH_RECORD: shape_kind = 2; -pub const shape_kind_SH_POINT: shape_kind = 3; -pub const shape_kind_SH_EPSF: shape_kind = 4; -pub type shape_kind = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct shape_desc { - pub name: *mut ::std::os::raw::c_char, - pub fns: *mut shape_functions, - pub polygon: *mut polygon_t, - pub usershape: boolean, -} -#[test] -fn bindgen_test_layout_shape_desc() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(shape_desc)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(shape_desc)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(shape_desc), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fns as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(shape_desc), - "::", - stringify!(fns) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).polygon as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(shape_desc), - "::", - stringify!(polygon) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).usershape as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(shape_desc), - "::", - stringify!(usershape) - ) - ); -} -pub const imagetype_t_FT_NULL: imagetype_t = 0; -pub const imagetype_t_FT_BMP: imagetype_t = 1; -pub const imagetype_t_FT_GIF: imagetype_t = 2; -pub const imagetype_t_FT_PNG: imagetype_t = 3; -pub const imagetype_t_FT_JPEG: imagetype_t = 4; -pub const imagetype_t_FT_PDF: imagetype_t = 5; -pub const imagetype_t_FT_PS: imagetype_t = 6; -pub const imagetype_t_FT_EPS: imagetype_t = 7; -pub const imagetype_t_FT_SVG: imagetype_t = 8; -pub const imagetype_t_FT_XML: imagetype_t = 9; -pub const imagetype_t_FT_RIFF: imagetype_t = 10; -pub const imagetype_t_FT_WEBP: imagetype_t = 11; -pub const imagetype_t_FT_ICO: imagetype_t = 12; -pub const imagetype_t_FT_TIFF: imagetype_t = 13; -pub type imagetype_t = u32; -pub const imagescale_t_IMAGESCALE_FALSE: imagescale_t = 0; -pub const imagescale_t_IMAGESCALE_TRUE: imagescale_t = 1; -pub const imagescale_t_IMAGESCALE_WIDTH: imagescale_t = 2; -pub const imagescale_t_IMAGESCALE_HEIGHT: imagescale_t = 3; -pub const imagescale_t_IMAGESCALE_BOTH: imagescale_t = 4; -pub type imagescale_t = u32; -pub const imagepos_t_IMAGEPOS_TOP_LEFT: imagepos_t = 0; -pub const imagepos_t_IMAGEPOS_TOP_CENTER: imagepos_t = 1; -pub const imagepos_t_IMAGEPOS_TOP_RIGHT: imagepos_t = 2; -pub const imagepos_t_IMAGEPOS_MIDDLE_LEFT: imagepos_t = 3; -pub const imagepos_t_IMAGEPOS_MIDDLE_CENTER: imagepos_t = 4; -pub const imagepos_t_IMAGEPOS_MIDDLE_RIGHT: imagepos_t = 5; -pub const imagepos_t_IMAGEPOS_BOTTOM_LEFT: imagepos_t = 6; -pub const imagepos_t_IMAGEPOS_BOTTOM_CENTER: imagepos_t = 7; -pub const imagepos_t_IMAGEPOS_BOTTOM_RIGHT: imagepos_t = 8; -pub type imagepos_t = u32; -pub type usershape_t = usershape_s; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct usershape_s { - pub link: Dtlink_t, - pub name: *const ::std::os::raw::c_char, - pub macro_id: ::std::os::raw::c_int, - pub must_inline: boolean, - pub nocache: boolean, - pub f: *mut FILE, - pub type_: imagetype_t, - pub stringtype: *mut ::std::os::raw::c_char, - pub x: ::std::os::raw::c_int, - pub y: ::std::os::raw::c_int, - pub w: ::std::os::raw::c_int, - pub h: ::std::os::raw::c_int, - pub dpi: ::std::os::raw::c_int, - pub data: *mut ::std::os::raw::c_void, - pub datasize: size_t, - pub datafree: ::std::option::Option, -} -#[test] -fn bindgen_test_layout_usershape_s() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(usershape_s)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(usershape_s)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).link as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(link) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).name as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(name) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).macro_id as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(macro_id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).must_inline as *const _ as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(must_inline) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nocache as *const _ as usize }, - 29usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(nocache) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).f as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(f) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).stringtype as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(stringtype) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).x as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).y as *const _ as usize }, - 60usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(y) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).w as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(w) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).h as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(h) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dpi as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(dpi) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).datasize as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(datasize) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).datafree as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(usershape_s), - "::", - stringify!(datafree) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nodequeue { - pub store: *mut *mut node_t, - pub limit: *mut *mut node_t, - pub head: *mut *mut node_t, - pub tail: *mut *mut node_t, -} -#[test] -fn bindgen_test_layout_nodequeue() { - assert_eq!( - ::std::mem::size_of::(), - 32usize, - concat!("Size of: ", stringify!(nodequeue)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(nodequeue)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).store as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nodequeue), - "::", - stringify!(store) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).limit as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nodequeue), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).head as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(nodequeue), - "::", - stringify!(head) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tail as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(nodequeue), - "::", - stringify!(tail) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct adjmatrix_t { - pub nrows: ::std::os::raw::c_int, - pub ncols: ::std::os::raw::c_int, - pub data: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_adjmatrix_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(adjmatrix_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(adjmatrix_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nrows as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(adjmatrix_t), - "::", - stringify!(nrows) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ncols as *const _ as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(adjmatrix_t), - "::", - stringify!(ncols) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).data as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(adjmatrix_t), - "::", - stringify!(data) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rank_t { - pub n: ::std::os::raw::c_int, - pub v: *mut *mut node_t, - pub an: ::std::os::raw::c_int, - pub av: *mut *mut node_t, - pub ht1: f64, - pub ht2: f64, - pub pht1: f64, - pub pht2: f64, - pub candidate: boolean, - pub valid: boolean, - pub cache_nc: ::std::os::raw::c_int, - pub flat: *mut adjmatrix_t, -} -#[test] -fn bindgen_test_layout_rank_t() { - assert_eq!( - ::std::mem::size_of::(), - 80usize, - concat!("Size of: ", stringify!(rank_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(rank_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n as *const _ as usize }, - 0usize, - concat!("Offset of field: ", stringify!(rank_t), "::", stringify!(n)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).v as *const _ as usize }, - 8usize, - concat!("Offset of field: ", stringify!(rank_t), "::", stringify!(v)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).an as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(an) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).av as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(av) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ht1 as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(ht1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ht2 as *const _ as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(ht2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pht1 as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(pht1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pht2 as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(pht2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).candidate as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(candidate) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).valid as *const _ as usize }, - 65usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(valid) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cache_nc as *const _ as usize }, - 68usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(cache_nc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flat as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(rank_t), - "::", - stringify!(flat) - ) - ); -} -pub const ratio_t_R_NONE: ratio_t = 0; -pub const ratio_t_R_VALUE: ratio_t = 1; -pub const ratio_t_R_FILL: ratio_t = 2; -pub const ratio_t_R_COMPRESS: ratio_t = 3; -pub const ratio_t_R_AUTO: ratio_t = 4; -pub const ratio_t_R_EXPAND: ratio_t = 5; -pub type ratio_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct layout_t { - pub quantum: f64, - pub scale: f64, - pub ratio: f64, - pub dpi: f64, - pub margin: pointf, - pub page: pointf, - pub size: pointf, - pub filled: boolean, - pub landscape: boolean, - pub centered: boolean, - pub ratio_kind: ratio_t, - pub xdots: *mut ::std::os::raw::c_void, - pub id: *mut ::std::os::raw::c_char, -} -#[test] -fn bindgen_test_layout_layout_t() { - assert_eq!( - ::std::mem::size_of::(), - 104usize, - concat!("Size of: ", stringify!(layout_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(layout_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quantum as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(quantum) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).scale as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(scale) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ratio as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(ratio) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dpi as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(dpi) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).margin as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(margin) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).page as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(page) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).filled as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(filled) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).landscape as *const _ as usize }, - 81usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(landscape) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).centered as *const _ as usize }, - 82usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(centered) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ratio_kind as *const _ as usize }, - 84usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(ratio_kind) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xdots as *const _ as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(xdots) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(layout_t), - "::", - stringify!(id) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct field_t { - pub size: pointf, - pub b: boxf, - pub n_flds: ::std::os::raw::c_int, - pub lp: *mut textlabel_t, - pub fld: *mut *mut field_t, - pub id: *mut ::std::os::raw::c_char, - pub LR: ::std::os::raw::c_uchar, - pub sides: ::std::os::raw::c_uchar, -} -#[test] -fn bindgen_test_layout_field_t() { - assert_eq!( - ::std::mem::size_of::(), - 88usize, - concat!("Size of: ", stringify!(field_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(field_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).b as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(b) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_flds as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(n_flds) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lp as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(lp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fld as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(fld) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).LR as *const _ as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(LR) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sides as *const _ as usize }, - 81usize, - concat!( - "Offset of field: ", - stringify!(field_t), - "::", - stringify!(sides) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct nlist_t { - pub list: *mut *mut node_t, - pub size: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_nlist_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(nlist_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(nlist_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).list as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(nlist_t), - "::", - stringify!(list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(nlist_t), - "::", - stringify!(size) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct elist { - pub list: *mut *mut edge_t, - pub size: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_elist() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(elist)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(elist)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).list as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(elist), - "::", - stringify!(list) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).size as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(elist), - "::", - stringify!(size) - ) - ); -} -pub const fontname_kind_NATIVEFONTS: fontname_kind = 0; -pub const fontname_kind_PSFONTS: fontname_kind = 1; -pub const fontname_kind_SVGFONTS: fontname_kind = 2; -pub type fontname_kind = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agraphinfo_t { - pub hdr: Agrec_t, - pub drawing: *mut layout_t, - pub label: *mut textlabel_t, - pub bb: boxf, - pub border: [pointf; 4usize], - pub gui_state: ::std::os::raw::c_uchar, - pub has_labels: ::std::os::raw::c_uchar, - pub has_images: boolean, - pub charset: ::std::os::raw::c_uchar, - pub rankdir: ::std::os::raw::c_int, - pub ht1: f64, - pub ht2: f64, - pub flags: ::std::os::raw::c_ushort, - pub alg: *mut ::std::os::raw::c_void, - pub gvc: *mut GVC_t, - pub cleanup: ::std::option::Option, - pub neato_nlist: *mut *mut node_t, - pub move_: ::std::os::raw::c_int, - pub dist: *mut *mut f64, - pub spring: *mut *mut f64, - pub sum_t: *mut *mut f64, - pub t: *mut *mut *mut f64, - pub ndim: ::std::os::raw::c_ushort, - pub odim: ::std::os::raw::c_ushort, - pub n_cluster: ::std::os::raw::c_int, - pub clust: *mut *mut graph_t, - pub dotroot: *mut graph_t, - pub nlist: *mut node_t, - pub rank: *mut rank_t, - pub parent: *mut graph_t, - pub level: ::std::os::raw::c_int, - pub minrep: *mut node_t, - pub maxrep: *mut node_t, - pub comp: nlist_t, - pub minset: *mut node_t, - pub maxset: *mut node_t, - pub n_nodes: ::std::os::raw::c_long, - pub minrank: ::std::os::raw::c_short, - pub maxrank: ::std::os::raw::c_short, - pub has_flat_edges: boolean, - pub has_sourcerank: boolean, - pub has_sinkrank: boolean, - pub showboxes: ::std::os::raw::c_uchar, - pub fontnames: fontname_kind, - pub nodesep: ::std::os::raw::c_int, - pub ranksep: ::std::os::raw::c_int, - pub ln: *mut node_t, - pub rn: *mut node_t, - pub leader: *mut node_t, - pub rankleader: *mut *mut node_t, - pub expanded: boolean, - pub installed: ::std::os::raw::c_char, - pub set_type: ::std::os::raw::c_char, - pub label_pos: ::std::os::raw::c_char, - pub exact_ranksep: boolean, -} -#[test] -fn bindgen_test_layout_Agraphinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 408usize, - concat!("Size of: ", stringify!(Agraphinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agraphinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hdr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(hdr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).drawing as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(drawing) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).label as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bb as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(bb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).border as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(border) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gui_state as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(gui_state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_labels as *const _ as usize }, - 129usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(has_labels) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_images as *const _ as usize }, - 130usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(has_images) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).charset as *const _ as usize }, - 131usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(charset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rankdir as *const _ as usize }, - 132usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(rankdir) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ht1 as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(ht1) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ht2 as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(ht2) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alg as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(alg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gvc as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(gvc) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cleanup as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(cleanup) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).neato_nlist as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(neato_nlist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).move_ as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dist as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(dist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).spring as *const _ as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(spring) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).sum_t as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(sum_t) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).t as *const _ as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(t) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ndim as *const _ as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(ndim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).odim as *const _ as usize }, - 234usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(odim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_cluster as *const _ as usize }, - 236usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(n_cluster) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clust as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(clust) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dotroot as *const _ as usize }, - 248usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(dotroot) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nlist as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(nlist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rank as *const _ as usize }, - 264usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(rank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).parent as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).level as *const _ as usize }, - 280usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(level) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minrep as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(minrep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxrep as *const _ as usize }, - 296usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(maxrep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).comp as *const _ as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(comp) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minset as *const _ as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(minset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxset as *const _ as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(maxset) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).n_nodes as *const _ as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(n_nodes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minrank as *const _ as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(minrank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).maxrank as *const _ as usize }, - 346usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(maxrank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_flat_edges as *const _ as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(has_flat_edges) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_sourcerank as *const _ as usize }, - 349usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(has_sourcerank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_sinkrank as *const _ as usize }, - 350usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(has_sinkrank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).showboxes as *const _ as usize }, - 351usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(showboxes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).fontnames as *const _ as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(fontnames) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).nodesep as *const _ as usize }, - 356usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(nodesep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ranksep as *const _ as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(ranksep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ln as *const _ as usize }, - 368usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(ln) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rn as *const _ as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(rn) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).leader as *const _ as usize }, - 384usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(leader) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rankleader as *const _ as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(rankleader) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).expanded as *const _ as usize }, - 400usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(expanded) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).installed as *const _ as usize }, - 401usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(installed) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).set_type as *const _ as usize }, - 402usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(set_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).label_pos as *const _ as usize }, - 403usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(label_pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).exact_ranksep as *const _ as usize }, - 404usize, - concat!( - "Offset of field: ", - stringify!(Agraphinfo_t), - "::", - stringify!(exact_ranksep) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agnodeinfo_t { - pub hdr: Agrec_t, - pub shape: *mut shape_desc, - pub shape_info: *mut ::std::os::raw::c_void, - pub coord: pointf, - pub width: f64, - pub height: f64, - pub bb: boxf, - pub ht: f64, - pub lw: f64, - pub rw: f64, - pub label: *mut textlabel_t, - pub xlabel: *mut textlabel_t, - pub alg: *mut ::std::os::raw::c_void, - pub state: ::std::os::raw::c_char, - pub gui_state: ::std::os::raw::c_uchar, - pub clustnode: boolean, - pub pinned: ::std::os::raw::c_uchar, - pub id: ::std::os::raw::c_int, - pub heapindex: ::std::os::raw::c_int, - pub hops: ::std::os::raw::c_int, - pub pos: *mut f64, - pub dist: f64, - pub showboxes: ::std::os::raw::c_uchar, - pub has_port: boolean, - pub rep: *mut node_t, - pub set: *mut node_t, - pub node_type: ::std::os::raw::c_char, - pub mark: ::std::os::raw::c_char, - pub onstack: ::std::os::raw::c_char, - pub ranktype: ::std::os::raw::c_char, - pub weight_class: ::std::os::raw::c_char, - pub next: *mut node_t, - pub prev: *mut node_t, - pub in_: elist, - pub out: elist, - pub flat_out: elist, - pub flat_in: elist, - pub other: elist, - pub clust: *mut graph_t, - pub UF_size: ::std::os::raw::c_int, - pub UF_parent: *mut node_t, - pub inleaf: *mut node_t, - pub outleaf: *mut node_t, - pub rank: ::std::os::raw::c_int, - pub order: ::std::os::raw::c_int, - pub mval: f64, - pub save_in: elist, - pub save_out: elist, - pub tree_in: elist, - pub tree_out: elist, - pub par: *mut edge_t, - pub low: ::std::os::raw::c_int, - pub lim: ::std::os::raw::c_int, - pub priority: ::std::os::raw::c_int, - pub pad: [f64; 1usize], -} -#[test] -fn bindgen_test_layout_Agnodeinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 456usize, - concat!("Size of: ", stringify!(Agnodeinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agnodeinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hdr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(hdr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shape as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(shape) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).shape_info as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(shape_info) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).coord as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(coord) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).width as *const _ as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(width) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).height as *const _ as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(height) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).bb as *const _ as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(bb) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ht as *const _ as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(ht) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lw as *const _ as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(lw) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rw as *const _ as usize }, - 112usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(rw) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).label as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xlabel as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(xlabel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alg as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(alg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).state as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gui_state as *const _ as usize }, - 145usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(gui_state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clustnode as *const _ as usize }, - 146usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(clustnode) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pinned as *const _ as usize }, - 147usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(pinned) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 148usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).heapindex as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(heapindex) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hops as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(hops) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pos as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(pos) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dist as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(dist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).showboxes as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(showboxes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).has_port as *const _ as usize }, - 177usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(has_port) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rep as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(rep) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).set as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(set) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).node_type as *const _ as usize }, - 200usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(node_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mark as *const _ as usize }, - 201usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(mark) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).onstack as *const _ as usize }, - 202usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(onstack) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).ranktype as *const _ as usize }, - 203usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(ranktype) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).weight_class as *const _ as usize }, - 204usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(weight_class) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).next as *const _ as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).prev as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(prev) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).in_ as *const _ as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(in_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).out as *const _ as usize }, - 240usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(out) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flat_out as *const _ as usize }, - 256usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(flat_out) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flat_in as *const _ as usize }, - 272usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(flat_in) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).other as *const _ as usize }, - 288usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(other) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).clust as *const _ as usize }, - 304usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(clust) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).UF_size as *const _ as usize }, - 312usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(UF_size) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).UF_parent as *const _ as usize }, - 320usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(UF_parent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).inleaf as *const _ as usize }, - 328usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(inleaf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).outleaf as *const _ as usize }, - 336usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(outleaf) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).rank as *const _ as usize }, - 344usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(rank) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).order as *const _ as usize }, - 348usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(order) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).mval as *const _ as usize }, - 352usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(mval) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).save_in as *const _ as usize }, - 360usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(save_in) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).save_out as *const _ as usize }, - 376usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(save_out) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tree_in as *const _ as usize }, - 392usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(tree_in) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tree_out as *const _ as usize }, - 408usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(tree_out) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).par as *const _ as usize }, - 424usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(par) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).low as *const _ as usize }, - 432usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(low) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).lim as *const _ as usize }, - 436usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(lim) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).priority as *const _ as usize }, - 440usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(priority) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).pad as *const _ as usize }, - 448usize, - concat!( - "Offset of field: ", - stringify!(Agnodeinfo_t), - "::", - stringify!(pad) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Agedgeinfo_t { - pub hdr: Agrec_t, - pub spl: *mut splines, - pub tail_port: port, - pub head_port: port, - pub label: *mut textlabel_t, - pub head_label: *mut textlabel_t, - pub tail_label: *mut textlabel_t, - pub xlabel: *mut textlabel_t, - pub edge_type: ::std::os::raw::c_char, - pub compound: ::std::os::raw::c_char, - pub adjacent: ::std::os::raw::c_char, - pub label_ontop: ::std::os::raw::c_char, - pub gui_state: ::std::os::raw::c_uchar, - pub to_orig: *mut edge_t, - pub alg: *mut ::std::os::raw::c_void, - pub factor: f64, - pub dist: f64, - pub path: Ppolyline_t, - pub showboxes: ::std::os::raw::c_uchar, - pub conc_opp_flag: boolean, - pub xpenalty: ::std::os::raw::c_short, - pub weight: ::std::os::raw::c_int, - pub cutvalue: ::std::os::raw::c_int, - pub tree_index: ::std::os::raw::c_int, - pub count: ::std::os::raw::c_short, - pub minlen: ::std::os::raw::c_ushort, - pub to_virt: *mut edge_t, -} -#[test] -fn bindgen_test_layout_Agedgeinfo_t() { - assert_eq!( - ::std::mem::size_of::(), - 240usize, - concat!("Size of: ", stringify!(Agedgeinfo_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(Agedgeinfo_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).hdr as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(hdr) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).spl as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(spl) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tail_port as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(tail_port) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).head_port as *const _ as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(head_port) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).label as *const _ as usize }, - 120usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(label) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).head_label as *const _ as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(head_label) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tail_label as *const _ as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(tail_label) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xlabel as *const _ as usize }, - 144usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(xlabel) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).edge_type as *const _ as usize }, - 152usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(edge_type) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).compound as *const _ as usize }, - 153usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(compound) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).adjacent as *const _ as usize }, - 154usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(adjacent) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).label_ontop as *const _ as usize }, - 155usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(label_ontop) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).gui_state as *const _ as usize }, - 156usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(gui_state) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).to_orig as *const _ as usize }, - 160usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(to_orig) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).alg as *const _ as usize }, - 168usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(alg) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).factor as *const _ as usize }, - 176usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(factor) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).dist as *const _ as usize }, - 184usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(dist) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).path as *const _ as usize }, - 192usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(path) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).showboxes as *const _ as usize }, - 208usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(showboxes) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).conc_opp_flag as *const _ as usize }, - 209usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(conc_opp_flag) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).xpenalty as *const _ as usize }, - 210usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(xpenalty) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).weight as *const _ as usize }, - 212usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(weight) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).cutvalue as *const _ as usize }, - 216usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(cutvalue) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).tree_index as *const _ as usize }, - 220usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(tree_index) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).count as *const _ as usize }, - 224usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(count) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).minlen as *const _ as usize }, - 226usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(minlen) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).to_virt as *const _ as usize }, - 232usize, - concat!( - "Offset of field: ", - stringify!(Agedgeinfo_t), - "::", - stringify!(to_virt) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct gvlayout_features_t { - pub flags: ::std::os::raw::c_int, -} -#[test] -fn bindgen_test_layout_gvlayout_features_t() { - assert_eq!( - ::std::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(gvlayout_features_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(gvlayout_features_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).flags as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(gvlayout_features_t), - "::", - stringify!(flags) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct gvplugin_installed_t { - pub id: ::std::os::raw::c_int, - pub type_: *const ::std::os::raw::c_char, - pub quality: ::std::os::raw::c_int, - pub engine: *mut ::std::os::raw::c_void, - pub features: *mut ::std::os::raw::c_void, -} -#[test] -fn bindgen_test_layout_gvplugin_installed_t() { - assert_eq!( - ::std::mem::size_of::(), - 40usize, - concat!("Size of: ", stringify!(gvplugin_installed_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(gvplugin_installed_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).id as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_installed_t), - "::", - stringify!(id) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).type_ as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_installed_t), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).quality as *const _ as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_installed_t), - "::", - stringify!(quality) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).engine as *const _ as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_installed_t), - "::", - stringify!(engine) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).features as *const _ as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_installed_t), - "::", - stringify!(features) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct gvplugin_api_t { - pub api: api_t, - pub types: *mut gvplugin_installed_t, -} -#[test] -fn bindgen_test_layout_gvplugin_api_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(gvplugin_api_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(gvplugin_api_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).api as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_api_t), - "::", - stringify!(api) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).types as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_api_t), - "::", - stringify!(types) - ) - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct gvplugin_library_t { - pub packagename: *mut ::std::os::raw::c_char, - pub apis: *mut gvplugin_api_t, -} -#[test] -fn bindgen_test_layout_gvplugin_library_t() { - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(gvplugin_library_t)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(gvplugin_library_t)) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).packagename as *const _ as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_library_t), - "::", - stringify!(packagename) - ) - ); - assert_eq!( - unsafe { &(*(::std::ptr::null::())).apis as *const _ as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(gvplugin_library_t), - "::", - stringify!(apis) - ) - ); -} -extern "C" { - pub fn gvToggle(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn gvNEWcontext( - builtins: *const lt_symlist_t, - demand_loading: ::std::os::raw::c_int, - ) -> *mut GVC_t; -} -extern "C" { - pub fn gvContext() -> *mut GVC_t; -} -extern "C" { - pub fn gvContextPlugins( - builtins: *const lt_symlist_t, - demand_loading: ::std::os::raw::c_int, - ) -> *mut GVC_t; -} -extern "C" { - pub fn gvcInfo(arg1: *mut GVC_t) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gvcVersion(arg1: *mut GVC_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gvcBuildDate(arg1: *mut GVC_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gvParseArgs( - gvc: *mut GVC_t, - argc: ::std::os::raw::c_int, - argv: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvNextInputGraph(gvc: *mut GVC_t) -> *mut graph_t; -} -extern "C" { - pub fn gvPluginsGraph(gvc: *mut GVC_t) -> *mut graph_t; -} -extern "C" { - pub fn gvLayout( - gvc: *mut GVC_t, - g: *mut graph_t, - engine: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvLayoutJobs(gvc: *mut GVC_t, g: *mut graph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn attach_attrs(g: *mut graph_t); -} -extern "C" { - pub fn gvRender( - gvc: *mut GVC_t, - g: *mut graph_t, - format: *const ::std::os::raw::c_char, - out: *mut FILE, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvRenderFilename( - gvc: *mut GVC_t, - g: *mut graph_t, - format: *const ::std::os::raw::c_char, - filename: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvRenderContext( - gvc: *mut GVC_t, - g: *mut graph_t, - format: *const ::std::os::raw::c_char, - context: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvRenderData( - gvc: *mut GVC_t, - g: *mut graph_t, - format: *const ::std::os::raw::c_char, - result: *mut *mut ::std::os::raw::c_char, - length: *mut ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvFreeRenderData(data: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn gvRenderJobs(gvc: *mut GVC_t, g: *mut graph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvFreeLayout(gvc: *mut GVC_t, g: *mut graph_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvFinalize(gvc: *mut GVC_t); -} -extern "C" { - pub fn gvFreeContext(gvc: *mut GVC_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gvPluginList( - gvc: *mut GVC_t, - kind: *const ::std::os::raw::c_char, - sz: *mut ::std::os::raw::c_int, - arg1: *mut ::std::os::raw::c_char, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[doc = " Add a library from your user application"] - #[doc = " @param gvc Graphviz context to add library to"] - #[doc = " @param lib library to add"] - pub fn gvAddLibrary(gvc: *mut GVC_t, lib: *mut gvplugin_library_t); -} -extern "C" { - #[doc = " Perform a Transitive Reduction on a graph"] - #[doc = " @param g graph to be transformed."] - pub fn gvToolTred(g: *mut graph_t) -> ::std::os::raw::c_int; -} -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/gvc-sys/src/csvg.cpp b/gvc-sys/src/csvg.cpp deleted file mode 100644 index 6e2bbcdb..00000000 --- a/gvc-sys/src/csvg.cpp +++ /dev/null @@ -1,980 +0,0 @@ -#include - -#include -#include -#include - -extern "C" -{ - extern void gv_string_writer_init(GVC_t *gvc); - extern void gv_channel_writer_init(GVC_t *gvc); - extern void gv_writer_reset(GVC_t *gvc); -} - -#define agfindattr(x, s) agattrsym(x, s) -#define agraphattr(g, n, s) agattr(g, AGRAPH, n, s) -#define agnodeattr(g, n, s) agattr(g, AGNODE, n, s) -#define agedgeattr(g, n, s) agattr(g, AGEDGE, n, s) - -static char emptystring[] = {'\0'}; - -static GVC_t *gvc; - -static void gv_init(void) -{ - gvc = gvContext(); -} - -Agraph_t *graph(char *name) -{ - if (!gvc) - gv_init(); - return agopen(name, Agundirected, 0); -} - -Agraph_t *digraph(char *name) -{ - if (!gvc) - gv_init(); - return agopen(name, Agdirected, 0); -} - -Agraph_t *strictgraph(char *name) -{ - if (!gvc) - gv_init(); - return agopen(name, Agstrictundirected, 0); -} - -Agraph_t *strictdigraph(char *name) -{ - if (!gvc) - gv_init(); - return agopen(name, Agstrictdirected, 0); -} - -Agraph_t *readstring(char *string) -{ - if (!gvc) - gv_init(); - return agmemread(string); -} - -Agraph_t *read(FILE *f) -{ - if (!gvc) - gv_init(); - return agread(f, NULL); -} - -Agraph_t *read(const char *filename) -{ - FILE *f; - Agraph_t *g; - - f = fopen(filename, "r"); - if (!f) - return NULL; - if (!gvc) - gv_init(); - g = agread(f, NULL); - fclose(f); - return g; -} - -//------------------------------------------------- -Agraph_t *graph(Agraph_t *g, char *name) -{ - if (!gvc) - gv_init(); - return agsubg(g, name, 1); -} - -Agnode_t *node(Agraph_t *g, char *name) -{ - if (!gvc) - return NULL; - return agnode(g, name, 1); -} - -Agedge_t *edge(Agraph_t *g, Agnode_t *t, Agnode_t *h) -{ - if (!gvc || !t || !h || !g) - return NULL; - // edges from/to the protonode are not permitted - if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH) - return NULL; - return agedge(g, t, h, NULL, 1); -} - -Agedge_t *edge(Agnode_t *t, Agnode_t *h) -{ - return edge(agraphof(t), t, h); -} - -// induce tail if necessary -Agedge_t *edge(char *tname, Agnode_t *h) -{ - return edge(node(agraphof(h), tname), h); -} - -// induce head if necessary -Agedge_t *edge(Agnode_t *t, char *hname) -{ - return edge(t, node(agraphof(t), hname)); -} - -// induce tail/head if necessary -Agedge_t *edge(Agraph_t *g, char *tname, char *hname) -{ - return edge(g, node(g, tname), node(g, hname)); -} - -//------------------------------------------------- -static char *myagxget(void *obj, Agsym_t *a) -{ - int len; - char *val, *hs; - - if (!obj || !a) - return emptystring; - val = agxget(obj, a); - if (!val) - return emptystring; - if (a->name[0] == 'l' && strcmp(a->name, "label") == 0 && aghtmlstr(val)) - { - len = strlen(val); - hs = (char *)malloc(len + 3); - hs[0] = '<'; - strcpy(hs + 1, val); - hs[len + 1] = '>'; - hs[len + 2] = '\0'; - return hs; - } - return val; -} -char *getv(Agraph_t *g, Agsym_t *a) -{ - return myagxget(g, a); -} -char *getv(Agraph_t *g, char *attr) -{ - Agsym_t *a; - - if (!g || !attr) - return NULL; - a = agfindattr(agroot(g), attr); - return myagxget(g, a); -} -static void myagxset(void *obj, Agsym_t *a, char *val) -{ - int len; - char *hs; - - if (a->name[0] == 'l' && val[0] == '<' && strcmp(a->name, "label") == 0) - { - len = strlen(val); - if (val[len - 1] == '>') - { - hs = strdup(val + 1); - *(hs + len - 2) = '\0'; - val = agstrdup_html(agraphof(obj), hs); - free(hs); - } - } - agxset(obj, a, val); -} -char *setv(Agraph_t *g, Agsym_t *a, char *val) -{ - if (!g || !a || !val) - return NULL; - myagxset(g, a, val); - return val; -} -char *setv(Agraph_t *g, char *attr, char *val) -{ - Agsym_t *a; - - if (!g || !attr || !val) - return NULL; - a = agfindattr(agroot(g), attr); - if (!a) - a = agraphattr(g->root, attr, emptystring); - myagxset(g, a, val); - return val; -} -//------------------------------------------------- -char *getv(Agnode_t *n, Agsym_t *a) -{ - if (!n || !a) - return NULL; - if (AGTYPE(n) == AGRAPH) // protonode - return NULL; // FIXME ?? - return myagxget(n, a); -} -char *getv(Agnode_t *n, char *attr) -{ - Agraph_t *g; - Agsym_t *a; - - if (!n || !attr) - return NULL; - if (AGTYPE(n) == AGRAPH) // protonode - return NULL; // FIXME ?? - g = agroot(agraphof(n)); - a = agattr(g, AGNODE, attr, NULL); - return myagxget(n, a); -} -char *setv(Agnode_t *n, Agsym_t *a, char *val) -{ - if (!n || !a || !val) - return NULL; - if (AGTYPE(n) == AGRAPH) // protonode - return NULL; // FIXME ?? - myagxset(n, a, val); - return val; -} -char *setv(Agnode_t *n, char *attr, char *val) -{ - Agraph_t *g; - Agsym_t *a; - - if (!n || !attr || !val) - return NULL; - if (AGTYPE(n) == AGRAPH) - { // protonode - g = (Agraph_t *)n; - a = agattr(g, AGNODE, attr, val); // create default attribute in psuodo protonode - // FIXME? - deal with html in "label" attributes - return val; - } - g = agroot(agraphof(n)); - a = agattr(g, AGNODE, attr, NULL); - if (!a) - a = agnodeattr(g, attr, emptystring); - myagxset(n, a, val); - return val; -} -//------------------------------------------------- -char *getv(Agedge_t *e, Agsym_t *a) -{ - if (!e || !a) - return NULL; - if (AGTYPE(e) == AGRAPH) // protoedge - return NULL; // FIXME ?? - return myagxget(e, a); -} -char *getv(Agedge_t *e, char *attr) -{ - Agraph_t *g; - Agsym_t *a; - - if (!e || !attr) - return NULL; - if (AGTYPE(e) == AGRAPH) // protoedge - return NULL; // FIXME ?? - g = agraphof(agtail(e)); - a = agattr(g, AGEDGE, attr, NULL); - return myagxget(e, a); -} -char *setv(Agedge_t *e, Agsym_t *a, char *val) -{ - if (!e || !a || !val) - return NULL; - if (AGTYPE(e) == AGRAPH) // protoedge - return NULL; // FIXME ?? - myagxset(e, a, val); - return val; -} -char *setv(Agedge_t *e, char *attr, char *val) -{ - Agraph_t *g; - Agsym_t *a; - - if (!e || !attr || !val) - return NULL; - if (AGTYPE(e) == AGRAPH) - { // protoedge - g = (Agraph_t *)e; - a = agattr(g, AGEDGE, attr, val); // create default attribute in pseudo protoedge - // FIXME? - deal with html in "label" attributes - return val; - } - g = agroot(agraphof(agtail(e))); - a = agattr(g, AGEDGE, attr, NULL); - if (!a) - a = agattr(g, AGEDGE, attr, emptystring); - myagxset(e, a, val); - return val; -} -//------------------------------------------------- -Agraph_t *findsubg(Agraph_t *g, char *name) -{ - if (!g || !name) - return NULL; - return agsubg(g, name, 0); -} - -Agnode_t *findnode(Agraph_t *g, char *name) -{ - if (!g || !name) - return NULL; - return agnode(g, name, 0); -} - -Agedge_t *findedge(Agnode_t *t, Agnode_t *h) -{ - if (!t || !h) - return NULL; - if (AGTYPE(t) == AGRAPH || AGTYPE(h) == AGRAPH) - return NULL; - return agfindedge(agraphof(t), t, h); -} - -Agsym_t *findattr(Agraph_t *g, char *name) -{ - if (!g || !name) - return NULL; - return agfindattr(g, name); -} - -Agsym_t *findattr(Agnode_t *n, char *name) -{ - if (!n || !name) - return NULL; - return agfindattr(n, name); -} - -Agsym_t *findattr(Agedge_t *e, char *name) -{ - if (!e || !name) - return NULL; - return agfindattr(e, name); -} - -//------------------------------------------------- - -Agnode_t *headof(Agedge_t *e) -{ - if (!e) - return NULL; - if (AGTYPE(e) == AGRAPH) - return NULL; - return aghead(e); -} - -Agnode_t *tailof(Agedge_t *e) -{ - if (!e) - return NULL; - if (AGTYPE(e) == AGRAPH) - return NULL; - return agtail(e); -} - -Agraph_t *graphof(Agraph_t *g) -{ - if (!g || g == g->root) - return NULL; - return agroot(g); -} - -Agraph_t *graphof(Agedge_t *e) -{ - if (!e) - return NULL; - if (AGTYPE(e) == AGRAPH) - return (Agraph_t *)e; /* graph of protoedge is itself recast */ - return agraphof(agtail(e)); -} - -Agraph_t *graphof(Agnode_t *n) -{ - if (!n) - return NULL; - if (AGTYPE(n) == AGRAPH) - return (Agraph_t *)n; /* graph of protonode is itself recast */ - return agraphof(n); -} - -Agraph_t *rootof(Agraph_t *g) -{ - if (!g) - return NULL; - return agroot(g); -} - -//------------------------------------------------- -Agnode_t *protonode(Agraph_t *g) -{ - if (!g) - return NULL; - return (Agnode_t *)g; // gross abuse of the type system! -} - -Agedge_t *protoedge(Agraph_t *g) -{ - if (!g) - return NULL; - return (Agedge_t *)g; // gross abuse of the type system! -} - -//------------------------------------------------- -char *nameof(Agraph_t *g) -{ - if (!g) - return NULL; - return agnameof(g); -} -char *nameof(Agnode_t *n) -{ - if (!n) - return NULL; - if (AGTYPE(n) == AGRAPH) - return NULL; - return agnameof(n); -} -//char *nameof(Agedge_t *e) -//{ -// if (!e) -// return NULL; -// if (AGTYPE(e) == AGRAPH) -// return NULL; -// return agnameof(e); -//} -char *nameof(Agsym_t *a) -{ - if (!a) - return NULL; - return a->name; -} - -//------------------------------------------------- -bool ok(Agraph_t *g) -{ - if (!g) - return false; - return true; -} -bool ok(Agnode_t *n) -{ - if (!n) - return false; - return true; -} -bool ok(Agedge_t *e) -{ - if (!e) - return false; - return true; -} -bool ok(Agsym_t *a) -{ - if (!a) - return false; - return true; -} -//------------------------------------------------- -Agraph_t *firstsubg(Agraph_t *g) -{ - if (!g) - return NULL; - return agfstsubg(g); -} - -Agraph_t *nextsubg(Agraph_t *g, Agraph_t *sg) -{ - - if (!g || !sg) - return NULL; - return agnxtsubg(sg); -} - -Agraph_t *firstsupg(Agraph_t *g) -{ - return g->parent; -} - -// Agraph_t *nextsupg(Agraph_t *g, Agraph_t *sg) -// { -// return NULL; -// } - -Agedge_t *firstout(Agraph_t *g) -{ - Agnode_t *n; - Agedge_t *e; - - if (!g) - return NULL; - for (n = agfstnode(g); n; n = agnxtnode(g, n)) - { - e = agfstout(g, n); - if (e) - return e; - } - return NULL; -} - -Agedge_t *nextout(Agraph_t *g, Agedge_t *e) -{ - Agnode_t *n; - Agedge_t *ne; - - if (!g || !e) - return NULL; - ne = agnxtout(g, e); - if (ne) - return (ne); - for (n = agnxtnode(g, agtail(e)); n; n = agnxtnode(g, n)) - { - ne = agfstout(g, n); - if (ne) - return ne; - } - return NULL; -} - -Agedge_t *firstedge(Agraph_t *g) -{ - return firstout(g); -} - -Agedge_t *nextedge(Agraph_t *g, Agedge_t *e) -{ - return nextout(g, e); -} - -Agedge_t *firstout(Agnode_t *n) -{ - if (!n) - return NULL; - return agfstout(agraphof(n), n); -} - -Agedge_t *nextout(Agnode_t *n, Agedge_t *e) -{ - if (!n || !e) - return NULL; - return agnxtout(agraphof(n), e); -} - -Agnode_t *firsthead(Agnode_t *n) -{ - Agedge_t *e; - - if (!n) - return NULL; - e = agfstout(agraphof(n), n); - if (!e) - return NULL; - return aghead(e); -} - -Agnode_t *nexthead(Agnode_t *n, Agnode_t *h) -{ - Agedge_t *e; - Agraph_t *g; - - if (!n || !h) - return NULL; - g = agraphof(n); - e = agfindedge(g, n, h); - if (!e) - return NULL; - do - { - e = agnxtout(g, AGMKOUT(e)); - if (!e) - return NULL; - } while (aghead(e) == h); - return aghead(e); -} - -Agedge_t *firstedge(Agnode_t *n) -{ - if (!n) - return NULL; - return agfstedge(agraphof(n), n); -} - -Agedge_t *nextedge(Agnode_t *n, Agedge_t *e) -{ - if (!n || !e) - return NULL; - return agnxtedge(agraphof(n), e, n); -} - -Agedge_t *firstin(Agraph_t *g) -{ - Agnode_t *n; - - if (!g) - return NULL; - n = agfstnode(g); - if (!n) - return NULL; - return agfstin(g, n); -} - -Agedge_t *nextin(Agraph_t *g, Agedge_t *e) -{ - Agnode_t *n; - Agedge_t *ne; - - if (!g || !e) - return NULL; - ne = agnxtin(g, e); - if (ne) - return (ne); - n = agnxtnode(g, aghead(e)); - if (!n) - return NULL; - return agfstin(g, n); -} - -Agedge_t *firstin(Agnode_t *n) -{ - if (!n) - return NULL; - return agfstin(agraphof(n), n); -} - -Agedge_t *nextin(Agnode_t *n, Agedge_t *e) -{ - if (!n || !e) - return NULL; - return agnxtin(agraphof(n), e); -} - -Agnode_t *firsttail(Agnode_t *n) -{ - Agedge_t *e; - - if (!n) - return NULL; - e = agfstin(agraphof(n), n); - if (!e) - return NULL; - return agtail(e); -} - -Agnode_t *nexttail(Agnode_t *n, Agnode_t *t) -{ - Agedge_t *e; - Agraph_t *g; - - if (!n || !t) - return NULL; - g = agraphof(n); - e = agfindedge(g, t, n); - if (!e) - return NULL; - do - { - e = agnxtin(g, AGMKIN(e)); - if (!e) - return NULL; - } while (agtail(e) == t); - return agtail(e); -} - -Agnode_t *firstnode(Agraph_t *g) -{ - if (!g) - return NULL; - return agfstnode(g); -} - -Agnode_t *nextnode(Agraph_t *g, Agnode_t *n) -{ - if (!g || !n) - return NULL; - return agnxtnode(g, n); -} - -Agnode_t *firstnode(Agedge_t *e) -{ - if (!e) - return NULL; - return agtail(e); -} - -Agnode_t *nextnode(Agedge_t *e, Agnode_t *n) -{ - if (!e || n != agtail(e)) - return NULL; - return aghead(e); -} - -Agsym_t *firstattr(Agraph_t *g) -{ - if (!g) - return NULL; - g = agroot(g); - return agnxtattr(g, AGRAPH, NULL); -} - -Agsym_t *nextattr(Agraph_t *g, Agsym_t *a) -{ - if (!g || !a) - return NULL; - g = agroot(g); - return agnxtattr(g, AGRAPH, a); -} - -Agsym_t *firstattr(Agnode_t *n) -{ - Agraph_t *g; - - if (!n) - return NULL; - g = agraphof(n); - return agnxtattr(g, AGNODE, NULL); -} - -Agsym_t *nextattr(Agnode_t *n, Agsym_t *a) -{ - Agraph_t *g; - - if (!n || !a) - return NULL; - g = agraphof(n); - return agnxtattr(g, AGNODE, a); -} - -Agsym_t *firstattr(Agedge_t *e) -{ - Agraph_t *g; - - if (!e) - return NULL; - g = agraphof(agtail(e)); - return agnxtattr(g, AGEDGE, NULL); -} - -Agsym_t *nextattr(Agedge_t *e, Agsym_t *a) -{ - Agraph_t *g; - - if (!e || !a) - return NULL; - g = agraphof(agtail(e)); - return agnxtattr(g, AGEDGE, a); -} - -bool rm(Agraph_t *g) -{ - if (!g) - return false; -#if 0 - Agraph_t* sg; - for (sg = agfstsubg (g); sg; sg = agnxtsubg (sg)) - rm(sg); - if (g == agroot(g)) - agclose(g); - else - agdelete(agparent(g), g); -#endif - /* The rm function appears to have the semantics of agclose, so - * we should just do that, and let cgraph take care of all the - * details. - */ - agclose(g); - return true; -} - -bool rm(Agnode_t *n) -{ - if (!n) - return false; - // removal of the protonode is not permitted - if (agnameof(n)[0] == '\001' && strcmp(agnameof(n), "\001proto") == 0) - return false; - agdelete(agraphof(n), n); - return true; -} - -bool rm(Agedge_t *e) -{ - if (!e) - return false; - // removal of the protoedge is not permitted - if ((agnameof(aghead(e))[0] == '\001' && strcmp(agnameof(aghead(e)), "\001proto") == 0) || (agnameof(agtail(e))[0] == '\001' && strcmp(agnameof(agtail(e)), "\001proto") == 0)) - return false; - agdelete(agroot(agraphof(aghead(e))), e); - return true; -} - -bool layout(Agraph_t *g, const char *engine) -{ - int err; - - if (!g) - return false; - err = gvFreeLayout(gvc, g); /* ignore errors */ - err = gvLayout(gvc, g, engine); - return (!err); -} - -// annotate the graph with layout information -bool render(Agraph_t *g) -{ - if (!g) - return false; - attach_attrs(g); - return true; -} - -// render to stdout -bool render(Agraph_t *g, const char *format) -{ - int err; - - if (!g) - return false; - err = gvRender(gvc, g, format, stdout); - return (!err); -} - -// render to an open FILE -bool render(Agraph_t *g, const char *format, FILE *f) -{ - int err; - - if (!g) - return false; - err = gvRender(gvc, g, format, f); - return (!err); -} - -// render to an open channel -bool renderchannel(Agraph_t *g, const char *format, const char *channelname) -{ - int err; - - if (!g) - return false; - gv_channel_writer_init(gvc); - err = gvRender(gvc, g, format, (FILE *)channelname); - gv_writer_reset(gvc); /* Reset to default */ - return (!err); -} - -// render to a filename -bool render(Agraph_t *g, const char *format, const char *filename) -{ - int err; - - if (!g) - return false; - err = gvRenderFilename(gvc, g, format, filename); - return (!err); -} - -typedef struct -{ - char *data; - int sz; /* buffer size */ - int len; /* length of array */ -} BA; - -// render to string result, using binding-dependent gv_string_writer() -char *renderresult(Agraph_t *g, const char *format) -{ - BA ba; - - if (!g) - return NULL; - if (!GD_alg(g)) - return NULL; - ba.sz = BUFSIZ; - ba.data = (char *)malloc(ba.sz * sizeof(char)); /* must be freed by wrapper code */ - ba.len = 0; - gv_string_writer_init(gvc); - (void)gvRender(gvc, g, format, (FILE *)&ba); - gv_writer_reset(gvc); /* Reset to default */ - *((int *)GD_alg(g)) = ba.len; - return ba.data; -} - -// render to string result, using binding-dependent gv_string_writer() -void renderresult(Agraph_t *g, const char *format, char *outdata) -{ - if (!g) - return; - gv_string_writer_init(gvc); - (void)gvRender(gvc, g, format, (FILE *)outdata); - gv_writer_reset(gvc); /* Reset to default */ -} - -// render to a malloc'ed data string, to be free'd by caller. -char *renderdata(Agraph_t *g, const char *format) -{ - int err; - char *data; - unsigned int length; - - if (!g) - return NULL; - err = gvRenderData(gvc, g, format, &data, &length); - if (err) - return NULL; - data = (char *)realloc(data, length + 1); - return data; -} - -bool write(Agraph_t *g, FILE *f) -{ - int err; - - if (!g) - return false; - err = agwrite(g, f); - return (!err); -} - -bool write(Agraph_t *g, const char *filename) -{ - FILE *f; - int err; - - if (!g) - return false; - f = fopen(filename, "w"); - if (!f) - return false; - err = agwrite(g, f); - fclose(f); - return (!err); -} - -#include -#include -using namespace std; - -extern "C" -{ - char *csvg() - { - Agraph_t *g = graph((char *)"graph"); - vector nodes; - for (int i = 0; i < 10; i++) - { - nodes.push_back(node(g, (char *)std::to_string(i).c_str())); - } - vector edges; - edge(g, nodes[0], nodes[1]); - edge(g, nodes[0], nodes[2]); - edge(g, nodes[1], nodes[3]); - edge(g, nodes[1], nodes[4]); - edge(g, nodes[2], nodes[5]); - edge(g, nodes[2], nodes[6]); - edge(g, nodes[3], nodes[7]); - edge(g, nodes[3], nodes[8]); - edge(g, nodes[4], nodes[9]); - - layout(g, (char *)"dot"); - return renderdata(g, (char *)"svg"); - } -} diff --git a/gvc-sys/src/lib.rs b/gvc-sys/src/lib.rs deleted file mode 100644 index 5c86b81e..00000000 --- a/gvc-sys/src/lib.rs +++ /dev/null @@ -1,9 +0,0 @@ -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(clippy::all)] - -#[allow(dead_code)] -pub mod bindings; - -pub use bindings::*; diff --git a/gvc/Cargo.toml b/gvc/Cargo.toml deleted file mode 100644 index 0089ce9b..00000000 --- a/gvc/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "rustgym-gvc" -version = "0.1.0" -authors = ["Yinchu Xia "] -edition = "2018" -license = "MIT OR Apache-2.0" -description = "generate svg for some data structure in rustgym" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -gvc-sys = {path='../gvc-sys', version = '0.1.0'} -rustgym-util = {path='../util', version = '0.1.0'} diff --git a/gvc/src/lib.rs b/gvc/src/lib.rs deleted file mode 100644 index fd31e4eb..00000000 --- a/gvc/src/lib.rs +++ /dev/null @@ -1,219 +0,0 @@ -use gvc_sys::*; -use rustgym_util::*; -use std::collections::HashMap; -use std::ffi::c_void; -use std::ffi::CString; - -type Attrs = Vec<(CString, CString, CString)>; - -fn make_attrs(pairs: Vec<(&str, &str)>) -> Attrs { - pairs - .into_iter() - .map(|p| { - ( - CString::new(p.0.to_string()).expect("key"), - CString::new(p.1.to_string()).expect("value"), - CString::new("").expect("default"), - ) - }) - .collect() -} - -fn set_attrs(obj: *mut c_void, attrs: Attrs) { - unsafe { - for (k, v, d) in attrs { - agsafeset(obj as *mut c_void, k.into_raw(), v.into_raw(), d.into_raw()); - } - } -} - -pub struct GSVG { - gvc: *mut GVC_t, - graph: *mut Agraph_t, - nodes: Vec<*mut Agnode_t>, - edges: Vec<*mut Agedge_t>, -} - -impl GSVG { - pub fn new(name: &str) -> Self { - let g_attrs = make_attrs(vec![("label", name), ("rankdir", "TB")]); - unsafe { - let graph = agopen( - g_attrs[0].clone().1.into_raw(), - Agundirected, - std::ptr::null_mut::(), - ); - set_attrs(graph as *mut c_void, g_attrs); - GSVG { - gvc: gvContext(), - graph, - nodes: vec![], - edges: vec![], - } - } - } - - pub fn node(&mut self, val: i32) { - let n_attrs = make_attrs(vec![ - ("id", &self.nodes.len().to_string()), - ("label", &val.to_string()), - ("shape", "circle"), - ("style", "filled"), - ]); - unsafe { - let node = agnode(self.graph, n_attrs[0].clone().1.into_raw(), 1); - set_attrs(node as *mut c_void, n_attrs); - self.nodes.push(node); - } - } - - pub fn edge(&mut self, t: usize, h: usize, forward: bool, dotted: bool) { - let e_attrs = make_attrs(vec![ - ("id", &self.edges.len().to_string()), - ("dir", if forward { "forward" } else { "none" }), - ("style", if dotted { "dotted" } else { "filled" }), - ]); - unsafe { - let e = agedge( - self.graph, - self.nodes[t], - self.nodes[h], - e_attrs[0].clone().1.into_raw(), - 1, - ); - set_attrs(e as *mut c_void, e_attrs); - self.edges.push(e); - } - } - - pub fn update_nodes(&self, n_attrs: Vec>) { - assert_eq!(self.nodes.len(), n_attrs.len()); - for (i, attrs) in n_attrs.into_iter().enumerate() { - for (key, value) in attrs { - let key: CString = CString::new(key).expect("key"); - let value: CString = CString::new(value).expect("value"); - unsafe { - agsafeset( - self.nodes[i] as *mut c_void, - key.into_raw(), - value.into_raw(), - CString::new("").expect("default").into_raw(), - ); - } - } - } - } - - pub fn render(&self, filename: &str) { - unsafe { - gvLayout( - self.gvc, - self.graph, - CString::new("dot").expect("dot").into_raw(), - ); - gvRenderFilename( - self.gvc, - self.graph, - CString::new("svg").expect("svg").into_raw(), - CString::new(filename).expect("svg").into_raw(), - ); - gvFreeLayout(self.gvc, self.graph); /* ignore errors */ - } - } -} - -impl Drop for GSVG { - fn drop(&mut self) { - unsafe { - agclose(self.graph); - gvFreeContext(self.gvc); - } - } -} - -pub trait Draw { - fn draw(&self, caption: &str) -> GSVG; -} - -pub trait DrawTree { - fn draw_r(&self, parent_id: Option, id: &mut usize, gsvg: &mut GSVG); -} - -impl DrawTree for TreeLink { - fn draw_r(&self, parent_id: Option, id: &mut usize, gsvg: &mut GSVG) { - if let Some(node) = self { - let node = node.borrow(); - let nid = *id; - let val = node.val; - gsvg.node(val); - if let Some(pid) = parent_id { - gsvg.edge(pid, nid, false, false); - } - *id += 1; - let left = &node.left; - let right = &node.right; - left.draw_r(Some(nid), id, gsvg); - right.draw_r(Some(nid), id, gsvg); - } - } -} - -impl Draw for TreeLink { - fn draw(&self, caption: &str) -> GSVG { - let mut gsvg = GSVG::new(caption); - let mut id = 0; - self.draw_r(None, &mut id, &mut gsvg); - gsvg - } -} - -impl Draw for Vec> { - fn draw(&self, caption: &str) -> GSVG { - let mut gsvg = GSVG::new(caption); - let n = self.len(); - for i in 0..n { - gsvg.node(i as i32); - } - for (u, vs) in self.iter().enumerate() { - for &v in vs { - gsvg.edge(u, v, false, false); - } - } - gsvg - } -} - -impl Draw for Graph { - fn draw(&self, caption: &str) -> GSVG { - let mut gsvg = GSVG::new(caption); - let n = self.n; - for i in 0..n { - gsvg.node(i as i32); - } - for e in self.edges.iter() { - match e.kind { - EdgeKind::TreeEdge => gsvg.edge(e.tail, e.head, true, false), - _ => gsvg.edge(e.tail, e.head, true, true), - } - } - gsvg - } -} - -// #[test] -// fn test_tree() { -// let root: TreeLink = tree!(1, tree!(2, tree!(3), None), tree!(4)); -// let gsvg = root.draw("Test Tree"); -// gsvg.render("test_tree.svg"); -// } - -// #[test] -// fn test_graph() { -// let n = 5; -// let mut graph: Graph = Graph::new(n); -// let edges = vec_vec_i32![[1, 0], [2, 0], [3, 0], [4, 1], [4, 2], [4, 0]]; -// graph.init_with_edges(edges, false); -// graph.travase(); -// let gsvg = graph.draw("Test Graph"); -// gsvg.render("test_graph.svg"); -// } diff --git a/ingest/Cargo.toml b/ingest/Cargo.toml deleted file mode 100644 index c94fc728..00000000 --- a/ingest/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "rustgym-ingest" -version = "0.1.0" -authors = ["Larry Fantasy "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -sonic-channel = { version = "0.4.0", features = ["ingest", "control"] } -anyhow = "1.0.38" -diesel = { version = "1.4.8", features = [ - "sqlite", - "r2d2", - "chrono", - "uuidv07" -] } -rustgym-schema = { path = "../schema" } -rustgym-consts = { path = "../consts" } -html2text = "0.2.1" diff --git a/ingest/src/main.rs b/ingest/src/main.rs deleted file mode 100644 index 313a999a..00000000 --- a/ingest/src/main.rs +++ /dev/null @@ -1,62 +0,0 @@ -use anyhow::Result; -use diesel::prelude::*; -use diesel::sqlite::SqliteConnection; -use rustgym_consts::*; -use rustgym_schema::AdventOfCodeDescription; -use rustgym_schema::GoogleProblem; -use rustgym_schema::LeetcodeDescription; -use rustgym_schema::LeetcodeQuestion; -use sonic_channel::*; - -fn cleanup(html: String) -> String { - let text = html2text::from_read(html.as_bytes(), html.len()); - let text: String = text - .chars() - .map(|c| if c.is_ascii_alphabetic() { c } else { ' ' }) - .collect(); - text -} - -fn main() -> Result<()> { - use rustgym_schema::schema::adventofcode_description::dsl::*; - use rustgym_schema::schema::google_problem::dsl::*; - use rustgym_schema::schema::leetcode_description::dsl::*; - use rustgym_schema::schema::leetcode_question::dsl::*; - - let channel = IngestChannel::start(SONIC_URL, SONIC_PASS)?; - let conn = SqliteConnection::establish(DATABASE_URL)?; - - let leetcode_questions: Vec = leetcode_question.load(&conn)?; - for item in leetcode_questions { - let object = format!("leetcode_{}", item.id); - let text = cleanup(item.title); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - } - - let leetcode_descriptions: Vec = leetcode_description.load(&conn)?; - for item in leetcode_descriptions { - let object = format!("leetcode_{}", item.id); - let text = cleanup(item.html); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - } - - let adventofcode_descriptions: Vec = - adventofcode_description.load(&conn)?; - for item in adventofcode_descriptions { - let object = format!("adventofcode_{}", item.id); - let text = cleanup(item.title); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - let text = cleanup(item.html); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - } - - let google_problems: Vec = google_problem.load(&conn)?; - for item in google_problems { - let object = format!("google_{}", item.id); - let text = cleanup(item.title); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - let text = cleanup(item.problem); - channel.push(SONIC_COLLECTION, SONIC_BUCKET, &object, &text)?; - } - Ok(()) -} diff --git a/metaldnn-sys/Cargo.toml b/metaldnn-sys/Cargo.toml deleted file mode 100644 index 136f693a..00000000 --- a/metaldnn-sys/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "metaldnn-sys" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -block = "0.1.6" -objc = { version = "0.2.7", features = ["objc_exception"] } - -[build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -bindgen = "0.59.1" diff --git a/metaldnn-sys/build.rs b/metaldnn-sys/build.rs deleted file mode 100644 index e0de4225..00000000 --- a/metaldnn-sys/build.rs +++ /dev/null @@ -1,52 +0,0 @@ -extern crate bindgen; - -use std::env; -use std::path::PathBuf; - -const IOS_ROOT: &str = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.0.sdk"; - -const MACOS_ROOT: &str = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"; - -fn get_clang_args() -> Vec<&'static str> { - let target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS is set by cargo."); - if target_os.contains("macos") { - return vec!["-x", "objective-c", "-fblocks", "-isysroot", MACOS_ROOT]; - } - if target_os.contains("ios") { - return vec!["-x", "objective-c", "-fblocks", "-isysroot", IOS_ROOT]; - } - panic!(); -} - -fn main() { - println!("cargo:rustc-link-lib=framework=Foundation"); - println!("cargo:rustc-link-lib=framework=Metal"); - println!("cargo:rustc-link-lib=framework=CoreGraphics"); - println!("cargo:rustc-link-lib=framework=MetalPerformanceShaders"); - println!("cargo:rustc-link-lib=framework=QuartzCore"); - let clang_args = get_clang_args(); - let bindings = bindgen::Builder::default() - .clang_args(&clang_args) - .objc_extern_crate(true) - .block_extern_crate(true) - .generate_block(true) - .rustfmt_bindings(true) - .size_t_is_usize(true) - .blocklist_item("timezone") - .blocklist_item("id") - .blocklist_item("FndrOpaqueInfo") - .blocklist_item("HFSCatalogFolder") - .blocklist_item("HFSPlusCatalogFolder") - .blocklist_item("HFSCatalogFile") - .blocklist_item("HFSPlusCatalogFile") - .no_copy("objc_object") - .no_debug("objc_object") - .header("src/wrapper.h") - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) - .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("Couldn't write bindings!"); -} diff --git a/metaldnn-sys/src/lib.rs b/metaldnn-sys/src/lib.rs deleted file mode 100644 index d5e36e01..00000000 --- a/metaldnn-sys/src/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(improper_ctypes)] -#![allow(unaligned_references)] -include!(concat!(env!("OUT_DIR"), "/bindings.rs")); diff --git a/metaldnn-sys/src/wrapper.h b/metaldnn-sys/src/wrapper.h deleted file mode 100644 index 751bb084..00000000 --- a/metaldnn-sys/src/wrapper.h +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/metaldnn/Cargo.toml b/metaldnn/Cargo.toml deleted file mode 100644 index f80b9599..00000000 --- a/metaldnn/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "metaldnn" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -once_cell = "1.8.0" -metaldnn-sys = { path = "../metaldnn-sys" } -derivative = "2.2.0" -objc = { version = "0.2.7", features = ["objc_exception"] } - -[build-dependencies] -cc = { version = "1.0", features = ["parallel"] } -bindgen = "0.59.1" diff --git a/metaldnn/build.rs b/metaldnn/build.rs deleted file mode 100644 index 0fe0483b..00000000 --- a/metaldnn/build.rs +++ /dev/null @@ -1,72 +0,0 @@ -use std::env; -use std::path::PathBuf; -use std::process::Command; - -struct TargetArgs { - file: String, - sdk: String, -} - -fn get_target_args() -> TargetArgs { - let target_os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS is set by cargo."); - if target_os.contains("macos") { - return TargetArgs { - file: "src/macos.m".to_string(), - sdk: "macosx".to_string(), - }; - } - if target_os.contains("ios") { - return TargetArgs { - file: "src/ios.m".to_string(), - sdk: "iphoneos".to_string(), - }; - } - panic!(); -} - -fn main() { - println!("cargo:rerun-if-changed=shaders.metal"); - println!("cargo:rerun-if-changed=metaldnn.m"); - - let target_args = get_target_args(); - cc::Build::new() - .file("src/metaldnn.m") - .file(target_args.file.as_str()) - .compile("metaldnn"); - - let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); - let out_air = out_dir.join("shaders.air"); - let out_lib = out_dir.join("shaders.metallib"); - - let output = Command::new("xcrun") - .arg("--sdk") - .arg(target_args.sdk.as_str()) - .arg("metal") - .args(&["-c", "src/shaders.metal"]) - .args(&["-o", &format!("{}", out_air.display())]) - .spawn() - .unwrap() - .wait_with_output() - .unwrap(); - if !output.status.success() { - panic!( - r#" -stdout: {} -stderr: {} -"#, - String::from_utf8(output.stdout).unwrap(), - String::from_utf8(output.stderr).unwrap() - ); - } - - Command::new("xcrun") - .arg("--sdk") - .arg(target_args.sdk.as_str()) - .arg("metallib") - .arg(out_air) - .args(&["-o", &format!("{}", out_lib.display())]) - .spawn() - .unwrap() - .wait() - .unwrap(); -} diff --git a/metaldnn/src/dnn.rs b/metaldnn/src/dnn.rs deleted file mode 100644 index 02e0e714..00000000 --- a/metaldnn/src/dnn.rs +++ /dev/null @@ -1,25 +0,0 @@ -// use crate::layer::*; - -#[derive(Debug)] -pub struct Dnn { - // #[derivative(Debug = "ignore")] -// device: StrongPtr, -// #[derivative(Debug = "ignore")] -// layers: Vec>, -} - -impl Dnn { - pub fn new() -> Self { - // let layers = vec![]; - Dnn { - // layers, - } - } - - // pub fn sequential_model(&mut self, layers: Vec>) { - // for mut layer in layers { - // // layer.init_with_device(self.device); - // self.layers.push(layer); - // } - // } -} diff --git a/metaldnn/src/ios.m b/metaldnn/src/ios.m deleted file mode 100644 index 3755cbfb..00000000 --- a/metaldnn/src/ios.m +++ /dev/null @@ -1,19 +0,0 @@ -#import -#import -#import - -@interface MyView : UIView - -@end - -@implementation MyView -+ (Class)layerClass { - return [CAMetalLayer class]; -} -@end - -CAMetalLayer *layer_init(void *window_view, id device) { - UIView *view = (UIView *)window_view; - CAMetalLayer *metal_layer = (CAMetalLayer *)view.layer; - return metal_layer; -} diff --git a/metaldnn/src/layer.rs b/metaldnn/src/layer.rs deleted file mode 100644 index 95e03870..00000000 --- a/metaldnn/src/layer.rs +++ /dev/null @@ -1,68 +0,0 @@ -// use crate::*; -// use std::fmt; - -// pub trait Layer { -// fn name(&self) -> &str; -// fn init_with_device(&mut self, device: id); -// } - -// pub struct Dense { -// name: String, -// } - -// impl Layer for Dense { -// fn name(&self) -> &str { -// self.name.as_ref() -// } - -// fn init_with_device(&mut self, device: id) { -// println!("{:?}", device); -// } -// } - -// impl Drop for Dense { -// fn drop(&mut self) {} -// } - -// pub struct Input { -// name: String, -// batch: usize, -// width: usize, -// height: usize, -// } - -// impl Input { -// pub fn new(name: &str, batch: usize, width: usize, height: usize) -> Box { -// Box::new(Input { -// name: name.to_string(), -// batch, -// width, -// height, -// }) -// } -// } - -// impl Layer for Input { -// fn name(&self) -> &str { -// self.name.as_ref() -// } -// fn init_with_device(&mut self, device: id) { -// unsafe { -// // self.image_batch = input_init(device, self.batch, self.width, self.height); -// } -// } -// } - -// impl fmt::Debug for dyn Layer { -// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -// write!(f, "{}", self.name()) -// } -// } - -// impl Drop for Input { -// fn drop(&mut self) { -// unsafe { -// // input_release(self.image_batch); -// } -// } -// } diff --git a/metaldnn/src/lib.rs b/metaldnn/src/lib.rs deleted file mode 100644 index 8448a583..00000000 --- a/metaldnn/src/lib.rs +++ /dev/null @@ -1,11 +0,0 @@ -#[macro_use] -extern crate objc; - -mod dnn; -mod layer; -mod metaldnn; - -pub use dnn::*; -pub use layer::*; -pub use metaldnn::*; -pub use metaldnn_sys::*; diff --git a/metaldnn/src/macos.m b/metaldnn/src/macos.m deleted file mode 100644 index f73991d5..00000000 --- a/metaldnn/src/macos.m +++ /dev/null @@ -1,12 +0,0 @@ -#import -#import - -CAMetalLayer *layer_init(void *window_view, id device) { - NSView *view = (NSView *)window_view; - view.wantsLayer = YES; - view.layer = [CAMetalLayer layer]; - CAMetalLayer *metal_layer = (CAMetalLayer *)view.layer; - metal_layer.device = device; - NSLog(@"CAMetalLayer %@", metal_layer); - return metal_layer; -} \ No newline at end of file diff --git a/metaldnn/src/metaldnn.m b/metaldnn/src/metaldnn.m deleted file mode 100644 index e59a3915..00000000 --- a/metaldnn/src/metaldnn.m +++ /dev/null @@ -1,198 +0,0 @@ -#import -#import -#import -#import -#import - -typedef struct { - vector_float4 position; - vector_float2 texture_coord; -} Vertex; - -id device_init() { - id device = MTLCreateSystemDefaultDevice(); - NSLog(@"MTLDevice %@", device); - return device; -} - -id library_init(id device, const void *buffer, - size_t size) { - dispatch_queue_main_t queue = dispatch_get_main_queue(); - dispatch_data_t data = dispatch_data_create(buffer, size, queue, - DISPATCH_DATA_DESTRUCTOR_DEFAULT); - NSError *error; - id library = [device newLibraryWithData:data error:&error]; - if (error) { - NSLog(@"%@", error); - } - NSLog(@"MTLLibrary %@", library); - return library; -} - -id vertex_buffer_init(id device) { - static const Vertex vertices[] = { - {.position = {-100.0, 100.0, 0, 1}, .texture_coord = {0.0, 0.0}}, - {.position = {100.0, 100.0, 0, 1}, .texture_coord = {1.0, 0.0}}, - {.position = {-100.0, -100.0, 0, 1}, .texture_coord = {0.0, 1.0}}, - {.position = {100.0, -100.0, 0, 1}, .texture_coord = {1.0, 1.0}}}; - id vertex_buffer = - [device newBufferWithBytes:vertices - length:sizeof(vertices) - options:MTLResourceOptionCPUCacheModeDefault]; - NSLog(@"MTLBuffer %@", vertex_buffer); - return vertex_buffer; -} - -id viewport_buffer_init(id device) { - static const vector_float2 viewport[] = {{800.0, 600.0}}; - id viewport_buffer = - [device newBufferWithBytes:viewport - length:sizeof(viewport) - options:MTLResourceOptionCPUCacheModeDefault]; - NSLog(@"MTLBuffer %@", viewport_buffer); - return viewport_buffer; -} - -id texture_init(id device, size_t width, size_t height, - BOOL grayscale) { - MTLPixelFormat format = MTLPixelFormatRGBA8Unorm; - if (grayscale) { - format = MTLPixelFormatR8Unorm; - } - MTLTextureDescriptor *texture_desc = - [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:format - width:width - height:height - mipmapped:NO]; - id texture = [device newTextureWithDescriptor:texture_desc]; - NSLog(@"MTLTexture %@", texture); - return texture; -} - -void texture_update(id texture, size_t width, size_t height, - const void *buffer, size_t pixel_size) { - MTLRegion region = MTLRegionMake2D(0, 0, width, height); - [texture replaceRegion:region - mipmapLevel:0 - withBytes:buffer - bytesPerRow:width * pixel_size]; -} - -id pipeline_init(id device, - id library) { - id vert_fn = [library newFunctionWithName:@"quad_vertex"]; - id frag_fn = [library newFunctionWithName:@"sampling_shader"]; - MTLRenderPipelineDescriptor *pl_desc = - [[MTLRenderPipelineDescriptor alloc] init]; - pl_desc.colorAttachments[0].pixelFormat = MTLPixelFormatBGRA8Unorm; - pl_desc.vertexFunction = vert_fn; - pl_desc.fragmentFunction = frag_fn; - NSError *error = nil; - id pipeline = - [device newRenderPipelineStateWithDescriptor:pl_desc error:&error]; - if (error) { - NSLog(@"%@", error); - } - [pl_desc release]; - NSLog(@"MTLRenderPipelineState %@", pipeline); - return pipeline; -} - -id command_queue_init(id device) { - id command_queue = [device newCommandQueue]; - NSLog(@"MTLCommandQueue %@", command_queue); - return command_queue; -} - -void redraw(CAMetalLayer *layer, id pipeline, - id command_queue, id vertex_buffer, - id viewport_buffer, id texture) { - id drawable = [layer nextDrawable]; - if (drawable) { - MTLRenderPassDescriptor *pass_desc = - [MTLRenderPassDescriptor renderPassDescriptor]; - pass_desc.colorAttachments[0].texture = drawable.texture; - pass_desc.colorAttachments[0].clearColor = - MTLClearColorMake(0.85, 0.85, 0.85, 1); - pass_desc.colorAttachments[0].storeAction = MTLStoreActionStore; - pass_desc.colorAttachments[0].loadAction = MTLLoadActionClear; - id command_buffer = [command_queue commandBuffer]; - id command_encoder = - [command_buffer renderCommandEncoderWithDescriptor:pass_desc]; - [command_encoder setRenderPipelineState:pipeline]; - [command_encoder setVertexBuffer:vertex_buffer offset:0 atIndex:0]; - [command_encoder setVertexBuffer:viewport_buffer offset:0 atIndex:1]; - [command_encoder setFragmentTexture:texture atIndex:0]; - [command_encoder drawPrimitives:MTLPrimitiveTypeTriangleStrip - vertexStart:0 - vertexCount:4]; - [command_encoder endEncoding]; - [command_buffer presentDrawable:drawable]; - [command_buffer commit]; - } -} - -/////////////////////////////////////////////////// - -bool device_available(id device) { - return MPSSupportsMTLDevice(device); -} - -void metaldnn_device_release(id device) { - NSLog(@"device_release %@", device); - [device release]; -} - -MPSImageBatch *input_init(id device, size_t batch, size_t width, - size_t height) { - MPSImageDescriptor *image_descriptor = [MPSImageDescriptor - imageDescriptorWithChannelFormat:MPSImageFeatureChannelFormatUnorm8 - width:width - height:height - featureChannels:1 - numberOfImages:1 - usage:MTLTextureUsageShaderWrite | - MTLTextureUsageShaderRead]; - NSMutableArray *image_batch = [[NSMutableArray alloc] init]; - for (size_t i = 0; i < batch; i++) { - MPSImage *image = [[MPSImage alloc] initWithDevice:device - imageDescriptor:image_descriptor]; - [image_batch addObject:image]; - } - NSLog(@"input_init %@", image_batch); - return image_batch; -} - -void metaldnn_input_release(NSMutableArray *image_batch) { - NSLog(@"input_release %@", image_batch); - [image_batch release]; -} - -@interface MetaldnnPerson : NSObject { - NSString *firstName; - NSString *lastName; -} - -@property(assign) NSString *firstName; -@property(assign) NSString *lastName; - -- (void)dealloc; - -@end - -@implementation MetaldnnPerson -@synthesize firstName; -@synthesize lastName; - -- (void)dealloc { - NSLog(@"dealloc"); - [super dealloc]; -} -@end - -MetaldnnPerson *metaldnn_person(NSString *first, NSString *last) { - MetaldnnPerson *p = [[MetaldnnPerson alloc] init]; - p.firstName = first; - p.lastName = last; - return p; -} diff --git a/metaldnn/src/metaldnn.rs b/metaldnn/src/metaldnn.rs deleted file mode 100644 index 9a436b64..00000000 --- a/metaldnn/src/metaldnn.rs +++ /dev/null @@ -1,138 +0,0 @@ -use metaldnn_sys::*; -use std::ffi::c_void; - -#[cfg(target_os = "macos")] -const LIB_SIZE: usize = 7158; - -#[cfg(target_os = "ios")] -const LIB_SIZE: usize = 7142; - -const LIB_PTR: &[u8; LIB_SIZE] = include_bytes!(concat!(env!("OUT_DIR"), "/shaders.metallib")); - -extern "C" { - fn device_init() -> id; - fn layer_init(view: id, device: id) -> id; - fn library_init(device: id, buffer: *const c_void, size: usize) -> id; - fn vertex_buffer_init(device: id) -> id; - fn viewport_buffer_init(device: id) -> id; - fn texture_init(device: id, width: usize, height: usize, grayscale: bool) -> id; - fn texture_update( - texture: id, - width: usize, - height: usize, - buffer: *const c_void, - pixel_size: usize, - ); - fn pipeline_init(device: id, library: id) -> id; - fn command_queue_init(device: id) -> id; - fn redraw( - layer: id, - pipeline: id, - command_queue: id, - vertex_buffer: id, - viewport_buffer: id, - texture: id, - ); -} - -#[no_mangle] -pub fn metaldnn_device_init() -> id { - unsafe { device_init() } -} - -#[no_mangle] -pub fn metaldnn_layer_init(view: id, device: id) -> id { - unsafe { layer_init(view, device) } -} - -#[no_mangle] -pub fn metaldnn_library_init(device: id) -> id { - unsafe { library_init(device, LIB_PTR.as_ptr() as *const c_void, LIB_SIZE) } -} - -#[no_mangle] -pub fn metaldnn_vertex_buffer_init(device: id) -> id { - unsafe { vertex_buffer_init(device) } -} - -#[no_mangle] -pub fn metaldnn_viewport_buffer_init(device: id) -> id { - unsafe { viewport_buffer_init(device) } -} - -#[no_mangle] -pub fn metaldnn_texture_init(device: id, width: usize, height: usize, grayscale: bool) -> id { - unsafe { texture_init(device, width, height, grayscale) } -} - -#[no_mangle] -pub fn metaldnn_texture_update( - texture: id, - width: usize, - height: usize, - buffer: *const c_void, - pixel_size: usize, -) { - unsafe { texture_update(texture, width, height, buffer, pixel_size) } -} - -#[no_mangle] -pub fn metaldnn_pipeline_init(device: id, library: id) -> id { - unsafe { pipeline_init(device, library) } -} - -#[no_mangle] -pub fn metaldnn_command_queue_init(device: id) -> id { - unsafe { command_queue_init(device) } -} - -#[no_mangle] -pub fn metaldnn_redraw( - layer: id, - pipeline: id, - command_queue: id, - vertex_buffer: id, - viewport_buffer: id, - texture: id, -) { - unsafe { - redraw( - layer, - pipeline, - command_queue, - vertex_buffer, - viewport_buffer, - texture, - ) - } -} - -pub fn nsstring_as_str(nsstr: &objc::runtime::Object) -> &str { - let bytes = unsafe { - let bytes: *const std::os::raw::c_char = msg_send![nsstr, UTF8String]; - bytes as *const u8 - }; - let len: NSUInteger = unsafe { msg_send![nsstr, length] }; - unsafe { - let bytes = std::slice::from_raw_parts(bytes, len as usize); - std::str::from_utf8(bytes).unwrap() - } -} - -pub fn nsstring_from_str(string: &str) -> NSString { - const UTF8_ENCODING: usize = 4; - - let cls = class!(NSString); - let bytes = string.as_ptr() as *const c_void; - unsafe { - let obj: *mut objc::runtime::Object = msg_send![cls, alloc]; - let obj: *mut objc::runtime::Object = msg_send![ - obj, - initWithBytes:bytes - length:string.len() - encoding:UTF8_ENCODING - ]; - let _: *mut c_void = msg_send![obj, autorelease]; - NSString(obj) - } -} diff --git a/metaldnn/src/shaders.metal b/metaldnn/src/shaders.metal deleted file mode 100644 index 60179f0b..00000000 --- a/metaldnn/src/shaders.metal +++ /dev/null @@ -1,34 +0,0 @@ -#include -#include -using namespace metal; - -typedef struct { - float4 position [[position]]; - float2 texture_coord; -} Vertex; - -vertex Vertex quad_vertex(uint vertex_id [[vertex_id]], - constant Vertex *vert_array [[buffer(0)]], - constant float2 *viewport_size_ptr [[buffer(1)]]) { - Vertex out; - - float2 pixel_space_pos = vert_array[vertex_id].position.xy; - float2 viewport_size = *viewport_size_ptr; - - float2 clip_space_pos = (pixel_space_pos / viewport_size) * 2.0; - - out.position = float4(clip_space_pos, 0.0, 1.0); - out.texture_coord = vert_array[vertex_id].texture_coord; - - return out; -} - -fragment float4 sampling_shader(Vertex in [[stage_in]], - texture2d color_texture [[texture(0)]]) { - constexpr sampler texture_sampler(mag_filter::linear, min_filter::linear); - - const half4 color_sample = - color_texture.sample(texture_sampler, in.texture_coord); - - return float4(color_sample); -} diff --git a/migrations/.gitkeep b/migrations/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/migrations/2020-12-13-194959_create_leetcode_question/down.sql b/migrations/2020-12-13-194959_create_leetcode_question/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2020-12-13-194959_create_leetcode_question/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2020-12-13-194959_create_leetcode_question/up.sql b/migrations/2020-12-13-194959_create_leetcode_question/up.sql deleted file mode 100644 index 14d0d9ff..00000000 --- a/migrations/2020-12-13-194959_create_leetcode_question/up.sql +++ /dev/null @@ -1,6 +0,0 @@ -CREATE TABLE leetcode_question ( - id INTEGER NOT NULL PRIMARY KEY, - title TEXT NOT NULL, - slug TEXT NOT NULL, - level INTEGER NOT NULL -); diff --git a/migrations/2020-12-15-091647_create_leetcode_description/down.sql b/migrations/2020-12-15-091647_create_leetcode_description/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2020-12-15-091647_create_leetcode_description/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2020-12-15-091647_create_leetcode_description/up.sql b/migrations/2020-12-15-091647_create_leetcode_description/up.sql deleted file mode 100644 index 23b00e9d..00000000 --- a/migrations/2020-12-15-091647_create_leetcode_description/up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE leetcode_description ( - id INTEGER PRIMARY KEY - NOT NULL - REFERENCES leetcode_question (id), - filename TEXT NOT NULL, - html TEXT NOT NULL -); diff --git a/migrations/2020-12-16-011639_create_leetcode_solution/down.sql b/migrations/2020-12-16-011639_create_leetcode_solution/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2020-12-16-011639_create_leetcode_solution/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2020-12-16-011639_create_leetcode_solution/up.sql b/migrations/2020-12-16-011639_create_leetcode_solution/up.sql deleted file mode 100644 index 8e2403fb..00000000 --- a/migrations/2020-12-16-011639_create_leetcode_solution/up.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE leetcode_solution ( - question_id INTEGER NOT NULL - REFERENCES leetcode_question (id), - filename TEXT NOT NULL - PRIMARY KEY, - source TEXT NOT NULL -); diff --git a/migrations/2020-12-19-071746_create_adventofcode_description/down.sql b/migrations/2020-12-19-071746_create_adventofcode_description/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2020-12-19-071746_create_adventofcode_description/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2020-12-19-071746_create_adventofcode_description/up.sql b/migrations/2020-12-19-071746_create_adventofcode_description/up.sql deleted file mode 100644 index 81c9c072..00000000 --- a/migrations/2020-12-19-071746_create_adventofcode_description/up.sql +++ /dev/null @@ -1,9 +0,0 @@ -CREATE TABLE adventofcode_description ( - id INTEGER PRIMARY KEY - NOT NULL, - year INTEGER NOT NULL, - day INTEGER NOT NULL, - title TEXT NOT NULL, - filename TEXT NOT NULL, - html TEXT NOT NULL -); diff --git a/migrations/2020-12-19-081420_create_adventofcode_solution/down.sql b/migrations/2020-12-19-081420_create_adventofcode_solution/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2020-12-19-081420_create_adventofcode_solution/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2020-12-19-081420_create_adventofcode_solution/up.sql b/migrations/2020-12-19-081420_create_adventofcode_solution/up.sql deleted file mode 100644 index 31e4aefb..00000000 --- a/migrations/2020-12-19-081420_create_adventofcode_solution/up.sql +++ /dev/null @@ -1,8 +0,0 @@ -CREATE TABLE adventofcode_solution ( - id INTEGER PRIMARY KEY - NOT NULL, - year INTEGER NOT NULL, - day INTEGER NOT NULL, - filename TEXT NOT NULL, - source TEXT NOT NULL -); diff --git a/migrations/2021-03-16-194853_create_google_problem/down.sql b/migrations/2021-03-16-194853_create_google_problem/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2021-03-16-194853_create_google_problem/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2021-03-16-194853_create_google_problem/up.sql b/migrations/2021-03-16-194853_create_google_problem/up.sql deleted file mode 100644 index 58e9e9e1..00000000 --- a/migrations/2021-03-16-194853_create_google_problem/up.sql +++ /dev/null @@ -1,14 +0,0 @@ -CREATE TABLE google_problem ( - id INTEGER PRIMARY KEY - NOT NULL, - division INTEGER NOT NULL, - year INTEGER NOT NULL, - round INTEGER NOT NULL, - number INTEGER NOT NULL, - title TEXT NOT NULL, - problem TEXT NOT NULL, - input TEXT NOT NULL, - output TEXT NOT NULL, - solution TEXT NOT NULL, - analysis TEXT NOT NULL -); diff --git a/migrations/2021-12-20-232817_create-nes-rom/down.sql b/migrations/2021-12-20-232817_create-nes-rom/down.sql deleted file mode 100644 index 291a97c5..00000000 --- a/migrations/2021-12-20-232817_create-nes-rom/down.sql +++ /dev/null @@ -1 +0,0 @@ --- This file should undo anything in `up.sql` \ No newline at end of file diff --git a/migrations/2021-12-20-232817_create-nes-rom/up.sql b/migrations/2021-12-20-232817_create-nes-rom/up.sql deleted file mode 100644 index 59e5d62c..00000000 --- a/migrations/2021-12-20-232817_create-nes-rom/up.sql +++ /dev/null @@ -1,10 +0,0 @@ -CREATE TABLE nes_rom ( - id INTEGER PRIMARY KEY - NOT NULL, - title TEXT NOT NULL, - description TEXT NOT NULL, - filename TEXT NOT NULL, - image TEXT NOT NULL, - size INTEGER NOT NULL, - md5 TEXT NOT NULL -); diff --git a/mnist-data/Cargo.toml b/mnist-data/Cargo.toml deleted file mode 100644 index 81f4320c..00000000 --- a/mnist-data/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "rustgym-mnist-data" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -serde = { version = "1.0.130", features = ["derive"] } -bincode = "1.3.3" - -[build-dependencies] -bincode = "1.3.3" -curl = "0.4.38" -flate2 = "1.0.22" -serde = { version = "1.0.130", features = ["derive"] } diff --git a/mnist-data/build.rs b/mnist-data/build.rs deleted file mode 100644 index 8f76035b..00000000 --- a/mnist-data/build.rs +++ /dev/null @@ -1,139 +0,0 @@ -use curl::easy::Easy; -use flate2::bufread::GzDecoder; -use serde::{Deserialize, Serialize}; -use std::env; -use std::fs; -use std::fs::File; -use std::io; -use std::io::prelude::*; -use std::io::Write; - -const N_TRING: usize = 60000; -const N_TEST: usize = 10000; - -const FILES: [&str; 4] = [ - "train-images-idx3-ubyte.gz", - "train-labels-idx1-ubyte.gz", - "t10k-images-idx3-ubyte.gz", - "t10k-labels-idx1-ubyte.gz", -]; - -const URL: &str = "http://yann.lecun.com/exdb/mnist"; - -#[derive(Serialize, Deserialize, PartialEq, Debug)] -struct MNIST { - pub train_images: Vec>, - pub test_images: Vec>, - pub train_labels: Vec, - pub test_labels: Vec, -} - -fn download_mnist(out_dir: &str) -> Result<(), io::Error> { - let mut handle = Easy::new(); - for filename in FILES { - let file_url = format!("{}/{}", URL, filename); - let file_path = format!("{}/{}", out_dir, filename); - let mut file = File::create(file_path)?; - handle.url(&file_url).unwrap(); - handle.write_function(move |data| { - file.write_all(data).unwrap(); - Ok(data.len()) - })?; - handle.perform()?; - } - Ok(()) -} - -fn decode_mnist(out_dir: &str) -> Result { - let train_images_gz = fs::read(format!("{}/{}", out_dir, FILES[0]))?; - assert_eq!(train_images_gz.len(), 9912422); - let train_labels_gz = fs::read(format!("{}/{}", out_dir, FILES[1]))?; - assert_eq!(train_labels_gz.len(), 28881); - let test_images_gz = fs::read(format!("{}/{}", out_dir, FILES[2]))?; - assert_eq!(test_images_gz.len(), 1648877); - let test_labels_gz = fs::read(format!("{}/{}", out_dir, FILES[3]))?; - assert_eq!(test_labels_gz.len(), 4542); - let train_images = decode_images(&train_images_gz, N_TRING as u32)?; - assert_eq!(train_images.len(), N_TRING); - let test_images = decode_images(&test_images_gz, N_TEST as u32)?; - assert_eq!(test_images.len(), N_TEST); - let train_labels = decode_labels(&train_labels_gz, N_TRING as u32)?; - assert_eq!(train_labels.len(), N_TRING); - let test_labels = decode_labels(&test_labels_gz, N_TEST as u32)?; - assert_eq!(test_labels.len(), N_TEST); - Ok(MNIST { - train_images, - test_images, - train_labels, - test_labels, - }) -} - -fn decode_labels(bytes: &[u8], n: u32) -> Result, io::Error> { - let mut decoder = GzDecoder::new(bytes); - let mut buf: [u8; 4] = [0; 4]; - - decoder.read_exact(&mut buf)?; - let magic = as_u32_be(&buf); - assert_eq!(magic, 2049); - - decoder.read_exact(&mut buf)?; - let n_labels = as_u32_be(&buf); - assert_eq!(n_labels, n); - - let mut res = vec![0; n_labels as usize]; - decoder.read_exact(&mut res)?; - Ok(res) -} - -fn decode_images(bytes: &[u8], n: u32) -> Result>, io::Error> { - let mut decoder = GzDecoder::new(bytes); - let mut buf: [u8; 4] = [0; 4]; - - decoder.read_exact(&mut buf)?; - let magic = as_u32_be(&buf); - assert_eq!(magic, 2051); - - decoder.read_exact(&mut buf)?; - let n_images = as_u32_be(&buf); - assert_eq!(n_images, n); - - decoder.read_exact(&mut buf)?; - let n_rows = as_u32_be(&buf); - assert_eq!(n_rows, 28); - - decoder.read_exact(&mut buf)?; - let n_cols = as_u32_be(&buf); - assert_eq!(n_cols, 28); - - let image_size = (n_rows * n_cols) as usize; - let mut res = vec![]; - for _ in 0..n_images { - let mut image = vec![0; image_size]; - decoder.read_exact(&mut image)?; - res.push(image); - } - Ok(res) -} - -fn as_u32_be(array: &[u8; 4]) -> u32 { - ((array[0] as u32) << 24) - + ((array[1] as u32) << 16) - + ((array[2] as u32) << 8) - + ((array[3] as u32) << 0) -} - -fn create_mnist(out_dir: &str, mnist: MNIST) -> Result<(), io::Error> { - let bytes = bincode::serialize(&mnist).unwrap(); - let output_file = format!("{}/{}", out_dir, "mnist.bin"); - fs::write(output_file, bytes)?; - Ok(()) -} - -fn main() -> Result<(), io::Error> { - let out_dir = env::var("OUT_DIR").unwrap(); - download_mnist(&out_dir)?; - let mnist = decode_mnist(&out_dir)?; - create_mnist(&out_dir, mnist)?; - Ok(()) -} diff --git a/mnist-data/src/lib.rs b/mnist-data/src/lib.rs deleted file mode 100644 index 2cfe0978..00000000 --- a/mnist-data/src/lib.rs +++ /dev/null @@ -1,28 +0,0 @@ -use serde::{Deserialize, Serialize}; -use std::env; -use std::io; - -const BYTES: &[u8; 55510032] = include_bytes!(concat!(env!("OUT_DIR"), "/mnist.bin")); - -#[derive(Serialize, Deserialize, PartialEq, Debug)] -pub struct MnistData { - pub train_images: Vec>, - pub test_images: Vec>, - pub train_labels: Vec, - pub test_labels: Vec, -} - -pub fn load_mnist_data() -> Result { - let mnist = bincode::deserialize(BYTES).unwrap(); - Ok(mnist) -} - -#[cfg(test)] -mod tests { - #[test] - fn it_works() { - use crate::*; - let mnist = load_mnist_data().unwrap(); - assert_eq!(mnist.train_images.len(), 60000); - } -} diff --git a/mnist/Cargo.toml b/mnist/Cargo.toml deleted file mode 100644 index d8b39ca2..00000000 --- a/mnist/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "mnist" -version = "0.1.0" -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -metaldnn = { path = "../metaldnn" } -rustgym-mnist-data = { path = "../mnist-data" } -winit = "0.25.0" -objc = { version = "0.2.7", features = ["objc_exception"] } -gilrs = "0.8.1" -png = "0.17.2" - -[lib] -name = "mnist" -crate-type = ["staticlib"] diff --git a/mnist/gfx-rs.png b/mnist/gfx-rs.png deleted file mode 100644 index 84158106..00000000 Binary files a/mnist/gfx-rs.png and /dev/null differ diff --git a/mnist/src/lib.rs b/mnist/src/lib.rs deleted file mode 100644 index ed23f489..00000000 --- a/mnist/src/lib.rs +++ /dev/null @@ -1,174 +0,0 @@ -#[macro_use] -use objc::*; - -use gilrs::ev::filter::{Filter, Repeat}; -use gilrs::GilrsBuilder; -use metaldnn::*; -use rustgym_mnist_data::*; -use std::ffi::c_void; -use winit::{ - dpi::LogicalSize, - event::{ElementState, Event, TouchPhase, WindowEvent}, - event_loop::{ControlFlow, EventLoop}, - window::{Window, WindowBuilder}, -}; - -#[cfg(target_os = "macos")] -use winit::platform::macos::WindowExtMacOS; - -#[cfg(target_os = "ios")] -use winit::platform::ios::WindowBuilderExtIOS; -#[cfg(target_os = "ios")] -use winit::platform::ios::WindowExtIOS; - -#[cfg(target_os = "macos")] -fn get_view(window: &Window) -> id { - window.ns_view() as id -} - -#[cfg(target_os = "ios")] -fn get_view(window: &Window) -> id { - window.ui_view() as id -} - -struct GameState { - pub index: usize, -} - -#[no_mangle] -pub fn mainloop() { - let mnist_data = load_mnist_data().unwrap(); - let MnistData { - train_images, - test_images, - train_labels, - test_labels, - } = mnist_data; - - let mut gilrs = match GilrsBuilder::new().set_update_state(false).build() { - Ok(g) => g, - Err(gilrs::Error::NotImplemented(g)) => { - eprintln!("Current platform is not supported"); - - g - } - Err(e) => { - eprintln!("Failed to create gilrs context: {}", e); - std::process::exit(-1); - } - }; - - let mut game_state = GameState { index: 0 }; - - let repeat_filter = Repeat::new(); - - let event_loop = EventLoop::new(); - let window = init_window(&event_loop, 1024, 768); - let device = metaldnn_device_init() as id; - let layer = metaldnn_layer_init(get_view(&window), device); - let library = metaldnn_library_init(device); - let vertex_buffer = metaldnn_vertex_buffer_init(device); - let viewport_buffer = metaldnn_viewport_buffer_init(device); - let texture = metaldnn_texture_init(device, 28, 28, true); - metaldnn_texture_update( - texture, - 28, - 28, - train_images[game_state.index].as_ptr() as *const c_void, - 1, - ); - let pipeline = metaldnn_pipeline_init(device, library); - let command_queue = metaldnn_command_queue_init(device); - - event_loop.run(move |event, _, control_flow| { - *control_flow = ControlFlow::Poll; - - match event { - Event::WindowEvent { event, .. } => { - handle_window_event(event, control_flow, &mut game_state); - } - Event::MainEventsCleared => { - window.request_redraw(); - } - Event::RedrawRequested(_) => { - while let Some(ev) = gilrs.next_event().filter_ev(&repeat_filter, &mut gilrs) { - let gilrs::Event { event, .. } = ev; - gilrs.update(&ev); - println!("{:?}", event); - } - metaldnn_texture_update( - texture, - 28, - 28, - train_images[game_state.index].as_ptr() as *const c_void, - 1, - ); - metaldnn_redraw( - layer, - pipeline, - command_queue, - vertex_buffer, - viewport_buffer, - texture, - ); - } - _ => {} - } - }); -} - -#[cfg(target_os = "macos")] -fn init_window(event_loop: &EventLoop<()>, width: u32, height: u32) -> Window { - let window_size = LogicalSize::new(width, height); - let window = WindowBuilder::new() - .with_inner_size(window_size) - .with_title("Rustgym Mnist") - .with_resizable(false) - .build(&event_loop) - .unwrap(); - return window; -} - -#[cfg(target_os = "ios")] -fn init_window(event_loop: &EventLoop<()>, width: u32, height: u32) -> Window { - let window_size = LogicalSize::new(width, height); - let window = WindowBuilder::new() - .with_inner_size(window_size) - .with_root_view_class((unsafe { class!(MyView) as *const _ as *const _ })) - .with_title("Rustgym Mnist") - .with_resizable(false) - .build(&event_loop) - .unwrap(); - return window; -} - -fn handle_window_event( - event: WindowEvent, - control_flow: &mut ControlFlow, - game_state: &mut GameState, -) { - match event { - WindowEvent::CloseRequested => *control_flow = ControlFlow::Exit, - WindowEvent::MouseInput { - device_id, - state, - button, - modifiers, - } => { - if state == ElementState::Pressed { - println!("Pressed"); - game_state.index += 1; - game_state.index %= 60000; - } - } - WindowEvent::Touch(touch) => match touch.phase { - TouchPhase::Ended => { - println!("Touched"); - game_state.index += 1; - game_state.index %= 60000; - } - _ => {} - }, - _ => {} - } -} diff --git a/mnist/src/main.rs b/mnist/src/main.rs deleted file mode 100644 index c79283a1..00000000 --- a/mnist/src/main.rs +++ /dev/null @@ -1,6 +0,0 @@ -mod lib; -use lib::mainloop; - -fn main() { - mainloop(); -} diff --git a/msg/Cargo.toml b/msg/Cargo.toml deleted file mode 100644 index 58d105b6..00000000 --- a/msg/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "rustgym-msg" -version = "0.1.0" -authors = ["Larry Fantasy "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -serde = { version = "1.0.119", features = ["derive"] } -serde_json = "1.0.61" -uuid = { version = "0.8", features = ["serde", "v4"] } -derive-new = "0.5.8" -uaparser = "0.4.0" -bytes = "1.0.1" -js-sys = "0.3.51" -web-sys = { version = "0.3.51", features = ["RtcIceCandidateInit"] } diff --git a/msg/src/lib.rs b/msg/src/lib.rs deleted file mode 100644 index 4388b0ae..00000000 --- a/msg/src/lib.rs +++ /dev/null @@ -1,109 +0,0 @@ -#[macro_use] -extern crate derive_new; - -use serde::{Deserialize, Serialize}; -use uuid::Uuid; - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum Msg { - In(MsgIn), - Out(MsgOut), -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MsgIn { - Ping, - Pong, - SearchText(String), - QueryText(String), - StreamStart { - client_uuid: Uuid, - }, - Offer { - caller: Uuid, - callee: Uuid, - offer_sdp: String, - }, - Answer { - caller: Uuid, - callee: Uuid, - answer_sdp: String, - }, - IceCandidate { - local: Uuid, - remote: Uuid, - candidate: String, - sdp_mid: String, - sdp_m_line_index: u16, - }, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub enum MsgOut { - Ping, - Pong, - SearchSuggestions(Vec), - QueryResults(Vec), - RegistorClient(ClientInfo), - UnRegistorClient(ClientInfo), - StreamStart { - client_uuid: Uuid, - }, - Offer { - caller: Uuid, - callee: Uuid, - offer_sdp: String, - }, - Answer { - caller: Uuid, - callee: Uuid, - answer_sdp: String, - }, - IceCandidate { - local: Uuid, - remote: Uuid, - candidate: String, - sdp_mid: String, - sdp_m_line_index: u16, - }, - SessionClients(Vec), - AllClients(Vec), -} - -#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, new)] -pub struct UserAgent { - pub family: String, - pub major: Option, - pub minor: Option, - pub patch: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, new)] -pub struct ClientInfo { - pub session_uuid: Uuid, - pub client_uuid: Uuid, - pub name: String, - pub user_agent: Option, - pub ice_servers: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, new)] -pub struct QueryResult { - pub id: String, - pub title: String, - pub href: String, - pub from: String, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, new)] -pub struct MsgBin { - pub uuid: Uuid, - pub bytes: Vec, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Hash, Eq, PartialEq, new)] -pub struct IceServer { - urls: String, - username: String, - credential: String, -} diff --git a/openvgdb/Cargo.toml b/openvgdb/Cargo.toml deleted file mode 100644 index 1c88eb77..00000000 --- a/openvgdb/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "openvgdb" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -md5 = "0.7.0" -diesel = { version = "1.4.8", features = [ - "sqlite", - "r2d2", - "chrono", - "uuidv07" -] } -rustgym-consts = { path = "../consts" } -rustgym-schema = { path = "../schema" } diff --git a/openvgdb/src/lib.rs b/openvgdb/src/lib.rs deleted file mode 100644 index c31f6ba6..00000000 --- a/openvgdb/src/lib.rs +++ /dev/null @@ -1,58 +0,0 @@ -#[macro_use] -extern crate diesel; -use diesel::prelude::*; -use diesel::sqlite::SqliteConnection; -use md5; -use rustgym_consts::*; -use std::fs::*; -#[allow(non_snake_case)] -mod rom; -#[allow(non_snake_case)] -mod schema; -use rom::RomData; -use rustgym_schema::*; -use std::path::PathBuf; - -pub fn rom_md5(header_size: usize, data: &[u8]) -> String { - let digest = md5::compute(&data[header_size..]); - format!("{:X}", digest) -} - -pub fn get_nes_roms() -> Vec { - let mut res = vec![]; - let dir = read_dir("./data/nes").unwrap(); - let conn = SqliteConnection::establish(OPENVGDB_URL).unwrap(); - for path in dir { - let path: PathBuf = path.unwrap().path(); - let rom_data = read(&path).unwrap(); - let hash = rom_md5(16, &rom_data); - use schema::ROMs::dsl::*; - use schema::RELEASES::dsl::*; - let rom_data: RomData = ROMs - .inner_join(schema::RELEASES::dsl::RELEASES) - .filter(romHashMD5.eq(hash)) - .select(( - schema::ROMs::dsl::romID, - releaseTitleName, - releaseDescription, - romHashMD5, - romFileName, - releaseCoverFront, - romSize, - )) - .first(&conn) - .unwrap(); - - let id: i32 = rom_data.romID.unwrap(); - let title: String = rom_data.releaseTitleName.unwrap(); - let description: String = rom_data.releaseDescription.unwrap(); - let filename: String = path.file_name().unwrap().to_str().unwrap().into(); - let image: String = rom_data.releaseCoverFront.unwrap(); - let size: i32 = rom_data.romSize.unwrap(); - let md5: String = rom_data.romHashMD5.unwrap(); - - let nes_rom = NesRom::new(id, title, description, filename, image, size, md5); - res.push(nes_rom) - } - res -} diff --git a/openvgdb/src/main.rs b/openvgdb/src/main.rs deleted file mode 100644 index e302cf26..00000000 --- a/openvgdb/src/main.rs +++ /dev/null @@ -1,14 +0,0 @@ -use diesel::insert_into; -use diesel::prelude::*; -use diesel::sqlite::SqliteConnection; -use openvgdb::get_nes_roms; -use rustgym_consts::*; -use rustgym_schema::*; - -fn main() { - let conn = SqliteConnection::establish(DATABASE_URL).unwrap(); - use schema::nes_rom::dsl::*; - let roms = get_nes_roms(); - let n = insert_into(nes_rom).values(&roms).execute(&conn).unwrap(); - assert_eq!(n, roms.len()); -} diff --git a/openvgdb/src/rom.rs b/openvgdb/src/rom.rs deleted file mode 100644 index b57a4e1b..00000000 --- a/openvgdb/src/rom.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[derive(Debug, Queryable)] -pub struct RomData { - pub romID: Option, - pub releaseTitleName: Option, - pub releaseDescription: Option, - pub romHashMD5: Option, - pub romFileName: Option, - pub releaseCoverFront: Option, - pub romSize: Option, -} diff --git a/openvgdb/src/schema.rs b/openvgdb/src/schema.rs deleted file mode 100644 index 505075d2..00000000 --- a/openvgdb/src/schema.rs +++ /dev/null @@ -1,66 +0,0 @@ -table! { - REGIONS (regionID) { - regionID -> Nullable, - regionName -> Nullable, - } -} - -table! { - RELEASES (releaseID) { - releaseID -> Nullable, - romID -> Nullable, - releaseTitleName -> Nullable, - regionLocalizedID -> Nullable, - TEMPregionLocalizedName -> Nullable, - TEMPsystemShortName -> Nullable, - TEMPsystemName -> Nullable, - releaseCoverFront -> Nullable, - releaseCoverBack -> Nullable, - releaseCoverCart -> Nullable, - releaseCoverDisc -> Nullable, - releaseDescription -> Nullable, - releaseDeveloper -> Nullable, - releasePublisher -> Nullable, - releaseGenre -> Nullable, - releaseDate -> Nullable, - releaseReferenceURL -> Nullable, - releaseReferenceImageURL -> Nullable, - } -} - -table! { - ROMs (romID) { - romID -> Nullable, - systemID -> Nullable, - regionID -> Nullable, - romHashCRC -> Nullable, - romHashMD5 -> Nullable, - romHashSHA1 -> Nullable, - romSize -> Nullable, - romFileName -> Nullable, - romExtensionlessFileName -> Nullable, - romParent -> Nullable, - romSerial -> Nullable, - romHeader -> Nullable, - romLanguage -> Nullable, - TEMPromRegion -> Nullable, - romDumpSource -> Nullable, - } -} - -table! { - SYSTEMS (systemID) { - systemID -> Nullable, - systemName -> Nullable, - systemShortName -> Nullable, - systemHeaderSizeBytes -> Nullable, - systemHashless -> Nullable, - systemHeader -> Nullable, - systemSerial -> Nullable, - systemOEID -> Nullable, - } -} - -allow_tables_to_appear_in_same_query!(REGIONS, RELEASES, ROMs, SYSTEMS,); - -joinable!(RELEASES -> ROMs (romID)); diff --git a/readme/Cargo.toml b/readme/Cargo.toml deleted file mode 100644 index f027bae5..00000000 --- a/readme/Cargo.toml +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "rustgym-readme" -version = "0.1.0" -authors = ["Yinchu Xia "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -anyhow = "1.0.35" -askama = "0.10.5" -derive-new = "0.5.8" -regex = "1.4.2" -reqwest = { version = "0.10.7", features = ["blocking", "json"] } -rustgym-consts = { path = "../consts" } -rustgym-schema = { path = "../schema" } -rustgym-util = { path = "../util" } -serde_json = "1.0.60" -walkdir = "2.3.1" -diesel = { version = "1.4.8", features = [ - "sqlite", - "r2d2", - "chrono", - "uuidv07" -] } diff --git a/readme/src/description.rs b/readme/src/description.rs deleted file mode 100644 index 5f9c27a0..00000000 --- a/readme/src/description.rs +++ /dev/null @@ -1,51 +0,0 @@ -use super::*; -use fs::File; -use regex::Regex; -use rustgym_schema::AdventOfCodeDescription; -use rustgym_schema::LeetcodeDescription; -use std::io::Read; -use std::path::Path; -use walkdir::WalkDir; - -pub fn all_leetcode_descriptions(src_dir: &Path) -> Vec { - let mut descriptions: Vec = vec![]; - for entry in WalkDir::new(src_dir) { - let entry = entry.unwrap(); - if entry.file_type().is_file() { - let filename = entry.file_name().to_str().unwrap().to_string(); - let n = filename.len(); - let id = filename[..n - 3].parse::().unwrap(); - let mut file = File::open(entry.path()).unwrap(); - let mut html = "".to_string(); - file.read_to_string(&mut html).unwrap(); - let description = LeetcodeDescription::new(id, filename, html); - descriptions.push(description); - } - } - descriptions -} - -pub fn all_adventofcode_descriptions(src_dir: &Path) -> Vec { - let mut descriptions: Vec = vec![]; - let re_year_day = Regex::new(r"(\d+)/day(\d+).md").unwrap(); - let re_title = Regex::new(r": (.*) ---").unwrap(); - for entry in WalkDir::new(src_dir) { - let entry = entry.unwrap(); - if entry.file_type().is_file() { - let filename = entry.file_name().to_str().unwrap().to_string(); - let path = entry.path(); - let caps = re_year_day.captures(path.to_str().unwrap()).unwrap(); - let year = caps[1].parse::().unwrap(); - let day = caps[2].parse::().unwrap(); - let mut file = File::open(path).unwrap(); - let mut html = "".to_string(); - file.read_to_string(&mut html).unwrap(); - let caps = re_title.captures(&html).unwrap(); - let title = caps[1].to_string(); - let id = year * 100 + day; - let description = AdventOfCodeDescription::new(id, year, day, title, filename, html); - descriptions.push(description); - } - } - descriptions -} diff --git a/readme/src/google.rs b/readme/src/google.rs deleted file mode 100644 index fb8c0861..00000000 --- a/readme/src/google.rs +++ /dev/null @@ -1,66 +0,0 @@ -use rustgym_schema::GoogleProblem; -use std::collections::HashMap; -use std::fs::read_to_string; -use std::path::Path; -use walkdir::WalkDir; - -pub fn all_google_problems(path: &Path) -> Vec { - let mut hm: HashMap = HashMap::new(); - for entry in WalkDir::new(path) { - let entry = entry.unwrap(); - if entry.file_type().is_file() { - let filename = entry.file_name().to_str().unwrap().to_string(); - let path: &Path = entry.path(); - if let Some(google_problem) = GoogleProblem::with_path(path) { - match filename.as_str() { - "analysis.md" => { - hm.entry(google_problem.id) - .or_insert(google_problem) - .analysis = read_file(path); - } - "problem.md" => { - hm.entry(google_problem.id) - .or_insert(google_problem) - .problem = read_file(path); - } - "mod.rs" => { - hm.entry(google_problem.id) - .or_insert(google_problem) - .solution = read_file(path); - } - "input.txt" => { - hm.entry(google_problem.id).or_insert(google_problem).input = - read_file(path); - } - "output.txt" => { - hm.entry(google_problem.id).or_insert(google_problem).output = - read_file(path); - } - _ => {} - } - } - } - } - hm.into_iter().map(|(_, v)| v).collect() -} - -fn read_file(path: &Path) -> String { - let s = read_to_string(path).unwrap(); - let mut res = "".to_string(); - for c in s.chars() { - match c { - '≤' => { - res.push('<'); - res.push('='); - } - '≥' => { - res.push('>'); - res.push('='); - } - _ => { - res.push(c); - } - } - } - res -} diff --git a/readme/src/leetcode.rs b/readme/src/leetcode.rs deleted file mode 100644 index 82827ba6..00000000 --- a/readme/src/leetcode.rs +++ /dev/null @@ -1,69 +0,0 @@ -use rustgym_schema::LeetcodeQuestion; - -// type Tags = HashMap>; -// type Tag = (String, String); - -pub struct LeetcodeData { - list_url: &'static str, - // tag_url: &'static str, -} - -impl LeetcodeData { - pub fn new( - list_url: &'static str, - // tag_url: &'static str - ) -> Self { - LeetcodeData { - list_url, - // tag_url - } - } - - fn get_list_text(&self) -> Result> { - let resp = reqwest::blocking::get(self.list_url)?.text()?; - Ok(resp) - } - - pub fn get_questions(&self) -> Result, Box> { - let json_string = self.get_list_text()?; - let value: serde_json::Value = serde_json::from_str(&json_string).unwrap(); - let pairs = value["stat_status_pairs"].as_array().unwrap(); - let mut questions = vec![]; - for pair in pairs { - let stat = pair["stat"].as_object().unwrap(); - let id = stat["frontend_question_id"].as_i64().unwrap(); - let title = stat["question__title"].as_str().unwrap(); - let slug = stat["question__title_slug"].as_str().unwrap(); - let difficulty = pair["difficulty"].as_object().unwrap(); - let level = difficulty["level"].as_i64().unwrap(); - let question = - LeetcodeQuestion::new(id as i32, title.to_string(), slug.to_string(), level as i32); - questions.push(question); - } - Ok(questions) - } - - // fn get_tag_text(&self) -> Result> { - // let resp = reqwest::blocking::get(self.tag_url)?.text()?; - // Ok(resp) - // } - - // pub fn get_tags(&self) -> Result> { - // let json_string = self.get_tag_text()?; - // let value: serde_json::Value = serde_json::from_str(&json_string).unwrap(); - // let topics = value["topics"].as_array().unwrap(); - // let mut hm: Tags = HashMap::new(); - // for topic in topics { - // let slug = topic["slug"].as_str().unwrap(); - // let name = topic["name"].as_str().unwrap(); - // let questions = topic["questions"].as_array().unwrap(); - // for question in questions { - // let id = question.as_i64().unwrap(); - // hm.entry(id as i32) - // .or_default() - // .push((slug.to_string(), name.to_string())); - // } - // } - // Ok(hm) - // } -} diff --git a/readme/src/main.rs b/readme/src/main.rs deleted file mode 100644 index 2af3c922..00000000 --- a/readme/src/main.rs +++ /dev/null @@ -1,121 +0,0 @@ -mod description; -mod google; -mod leetcode; -mod solution; - -#[macro_use] -extern crate derive_new; - -use anyhow::Result; -use askama::Template; -use description::*; -use diesel::prelude::*; -use diesel::sqlite::SqliteConnection; -use google::*; -use leetcode::*; -use rustgym_consts::*; -use rustgym_schema::AdventOfCodeDescription; -use rustgym_schema::GoogleProblem; -use rustgym_schema::LeetcodeQuestion; -use solution::*; -use std::fs; -use std::path::Path; - -#[derive(Template, new)] -#[template(path = "readme.j2")] -struct ReadmeContext { - leetcode_questions: Vec, - adventofcode_descriptions: Vec, - google_problems: Vec, -} - -// type Tags = HashMap>; -// type Tag = (String, String); - -fn main() -> Result<()> { - use rustgym_schema::schema::adventofcode_description::dsl::*; - use rustgym_schema::schema::adventofcode_solution::dsl::*; - use rustgym_schema::schema::google_problem::dsl::*; - use rustgym_schema::schema::leetcode_description::dsl::*; - use rustgym_schema::schema::leetcode_question::dsl::*; - use rustgym_schema::schema::leetcode_solution::dsl::*; - - let conn = SqliteConnection::establish(DATABASE_URL)?; - - let leetcode_algorithms_json = LeetcodeData::new(LEETCODE_ALGORITHMS_URL); - let leetcode_concurrency_json = LeetcodeData::new(LEETCODE_CONCURRENCY_URL); - - let leetcode_algorithms_questions = - leetcode_algorithms_json.get_questions().unwrap_or_default(); - let leetcode_concurrency_questions = leetcode_concurrency_json - .get_questions() - .unwrap_or_default(); - - diesel::insert_into(leetcode_question) - .values(&leetcode_algorithms_questions) - .execute(&conn)?; - - diesel::insert_into(leetcode_question) - .values(&leetcode_concurrency_questions) - .execute(&conn)?; - - let src_dir = Path::new(LEETCODE_SRC); - - let leetcode_solutions = all_leetcode_solutions(src_dir); - diesel::insert_into(leetcode_solution) - .values(&leetcode_solutions) - .execute(&conn)?; - - let leetcode_desc_dir = Path::new(LEETCODE_DESC); - let leetcode_descriptions = all_leetcode_descriptions(leetcode_desc_dir); - for description in leetcode_descriptions { - println!("{}", description); - diesel::insert_into(leetcode_description) - .values(&description) - .execute(&conn)?; - } - - let adventofcode_desc_dir = Path::new(ADVENTOFCODE_DESC); - let adventofcode_descriptions = all_adventofcode_descriptions(adventofcode_desc_dir); - diesel::insert_into(adventofcode_description) - .values(&adventofcode_descriptions) - .execute(&conn)?; - - let adventofcode_src_dir = Path::new(ADVENTOFCODE_SRC); - let adventofcode_solutions = all_adventofcode_solutions(adventofcode_src_dir); - diesel::insert_into(adventofcode_solution) - .values(&adventofcode_solutions) - .execute(&conn)?; - - let google_src_dir = Path::new(GOOGLE_SRC); - let google_problems: Vec = all_google_problems(google_src_dir); - diesel::insert_into(google_problem) - .values(google_problems) - .execute(&conn)?; - - let leetcode_questions: Vec = leetcode_question - .order(( - rustgym_schema::schema::leetcode_question::dsl::level, - rustgym_schema::schema::leetcode_question::dsl::id, - )) - .load(&conn)?; - - let adventofcode_descriptions = adventofcode_description - .order(( - rustgym_schema::schema::adventofcode_description::year, - rustgym_schema::schema::adventofcode_description::day, - )) - .load(&conn)?; - - let google_problems = google_problem.load(&conn)?; - - let readme_text: String = ReadmeContext::new( - leetcode_questions, - adventofcode_descriptions, - google_problems, - ) - .render()?; - let readme_md = Path::new(README_MD); - fs::write(&readme_md, readme_text).unwrap(); - Ok(()) -} diff --git a/readme/src/solution.rs b/readme/src/solution.rs deleted file mode 100644 index a51b904a..00000000 --- a/readme/src/solution.rs +++ /dev/null @@ -1,53 +0,0 @@ -use super::*; -use fs::File; -use regex::Regex; -use rustgym_schema::AdventOfCodeSolution; -use rustgym_schema::LeetcodeSolution; -use std::io::Read; -use std::path::Path; -use walkdir::WalkDir; - -pub fn all_leetcode_solutions(src_dir: &Path) -> Vec { - let mut solutions: Vec = vec![]; - for entry in WalkDir::new(src_dir) { - let entry = entry.unwrap(); - if entry.file_type().is_file() { - let filename = entry.file_name().to_str().unwrap().to_string(); - if let Some(0) = filename.find('_') { - let s: Vec = filename.split('_').map(|s| s.to_string()).collect(); - let id = s[1].clone().parse::().unwrap(); - let mut file = File::open(entry.path()).unwrap(); - let mut source = "".to_string(); - file.read_to_string(&mut source).unwrap(); - let problem = LeetcodeSolution::new(id, filename, source); - solutions.push(problem); - } - } - } - solutions.sort_by_key(|x| x.question_id); - solutions -} - -pub fn all_adventofcode_solutions(src_dir: &Path) -> Vec { - let mut solutions: Vec = vec![]; - let re_year_day = Regex::new(r"(\d+)/day(\d+)/mod.rs").unwrap(); - for entry in WalkDir::new(src_dir) { - let entry = entry.unwrap(); - if entry.file_type().is_file() { - let filename = entry.file_name().to_str().unwrap().to_string(); - let path = entry.path(); - let path_str = path.to_str().unwrap(); - if let Some(caps) = re_year_day.captures(path_str) { - let year = caps[1].parse::().unwrap(); - let day = caps[2].parse::().unwrap(); - let mut file = File::open(path).unwrap(); - let mut source = "".to_string(); - file.read_to_string(&mut source).unwrap(); - let id = year * 100 + day; - let solution = AdventOfCodeSolution::new(id, year, day, filename, source); - solutions.push(solution); - } - } - } - solutions -} diff --git a/readme/templates/readme.j2 b/readme/templates/readme.j2 deleted file mode 100644 index d2c54a1d..00000000 --- a/readme/templates/readme.j2 +++ /dev/null @@ -1,139 +0,0 @@ -# [RUST GYM](http://rustgym.com) Rust Solutions [![Docs Status](https://docs.rs/rustgym/badge.svg)](https://docs.rs/rustgym) [![Rust](https://github.com/warycat/rustgym/workflows/Rust/badge.svg)](https://github.com/warycat/rustgym/actions) - -## [Leetcode Solutions in Rust](#leetcode) -## [AdventOfCode Solutions in Rust](#adventofcode) -## [Google Solutions in Rust](#google) - -This project demonstrates how to create **Data Structures** and to implement **Algorithms** using programming language **Rust** -All the solutions here are crafted with love and their performance beats 99% of other solutions on the leetcode website. Tutorial videos will be added later. - -### Please subscribe to our [RUST GYM Youtube Channel](https://www.youtube.com/channel/UCV9HzRLPKjI8SttaIYOygsw) for future videos. - -
Data Structures - -- Stack & Queue ( Vec, VecDeque ) -- Linked List ( Option> ) -- Hash Tables ( HashMap, HashSet ) -- Tree Tables ( BTreeMap, BTreeSet ) -- Binary Search Tree ( Option>> ) -- Binary Heaps & Priority Queue ( BinaryHeap ) -- Graphs ( Vec> ) -- Union Find ( UnionFind ) -- Trie ( Trie ) -
- -
Algorithms - -- Bit Manipulation & Numbers -- Stability in Sorting -- Heapsort -- Binary Search -- Kth Smallest Elements -- Permutations -- Subsets -- BFS Graph -- DFS Graph -- Dijkstra’s Algorithm -- Tree Traversals - - BFS - - DFS - - in-order - - pre-order - - post-order -- Topological Sort -- Detect cycle in an undirected graph -- Detect a cycle in a directed graph -- Count connected components in a graph -- Find strongly connected components in a graph -
- - - - - - - - - - - {%- for question in leetcode_questions %} - - - - - - {%- endfor -%} - -
idLeetcodeLevel
- {{question.id}} - - {{question.title}} - - {%- if question.level == 1 -%} - Easy - {%- else if question.level == 2 -%} - Medium - {%- else if question.level == 3 -%} - Hard - {%- endif -%} -
- - - - - - - - - - - {%- for row in adventofcode_descriptions %} - - - - - - {%- endfor -%} - -
YearDayAdventOfCode
- {{row.year}} - - {{row.day}} - - {{row.title}} -
- - - - - - - - - - - - {%- for row in google_problems %} - - - - - - - {%- endfor -%} - -
DivisionYearRoundGoogle
- {%- if row.division == 1 -%} - CodeJam - {%- else if row.division == 2 -%} - KickStart - {%- else -%} - Unknown - {%- endif -%} - - {{row.year}} - - {{row.round}} - - {{row.title}} -
diff --git a/schema/Cargo.toml b/schema/Cargo.toml deleted file mode 100644 index 61dbaadf..00000000 --- a/schema/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "rustgym-schema" -version = "0.1.0" -authors = ["Yinchu Xia "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -diesel = { version = "1.4.8", features = [ - "sqlite", - "r2d2", - "chrono", - "uuidv07" -] } -rustgym-consts = { path = "../consts" } -serde = "1.0.118" -derive-new = "0.5.8" -regex = "1.4.2" diff --git a/schema/schema.rs b/schema/schema.rs deleted file mode 100644 index 4ca21274..00000000 --- a/schema/schema.rs +++ /dev/null @@ -1,86 +0,0 @@ -table! { - adventofcode_description (id) { - id -> Integer, - year -> Integer, - day -> Integer, - title -> Text, - filename -> Text, - html -> Text, - } -} - -table! { - adventofcode_solution (id) { - id -> Integer, - year -> Integer, - day -> Integer, - filename -> Text, - source -> Text, - } -} - -table! { - google_problem (id) { - id -> Integer, - division -> Integer, - year -> Integer, - round -> Integer, - number -> Integer, - title -> Text, - problem -> Text, - input -> Text, - output -> Text, - solution -> Text, - analysis -> Text, - } -} - -table! { - leetcode_description (id) { - id -> Integer, - filename -> Text, - html -> Text, - } -} - -table! { - leetcode_question (id) { - id -> Integer, - title -> Text, - slug -> Text, - level -> Integer, - } -} - -table! { - leetcode_solution (filename) { - question_id -> Integer, - filename -> Text, - source -> Text, - } -} - -table! { - nes_rom (id) { - id -> Integer, - title -> Text, - description -> Text, - filename -> Text, - image -> Text, - size -> Integer, - md5 -> Text, - } -} - -joinable!(leetcode_description -> leetcode_question (id)); -joinable!(leetcode_solution -> leetcode_question (question_id)); - -allow_tables_to_appear_in_same_query!( - adventofcode_description, - adventofcode_solution, - google_problem, - leetcode_description, - leetcode_question, - leetcode_solution, - nes_rom, -); diff --git a/schema/src/adventofcode_description.rs b/schema/src/adventofcode_description.rs deleted file mode 100644 index 1e82a885..00000000 --- a/schema/src/adventofcode_description.rs +++ /dev/null @@ -1,26 +0,0 @@ -use crate::schema::adventofcode_description; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "adventofcode_description"] -pub struct AdventOfCodeDescription { - pub id: i32, - pub year: i32, - pub day: i32, - pub title: String, - filename: String, - pub html: String, -} - -impl AdventOfCodeDescription { - pub fn href(&self) -> String { - format!("/adventofcode/{}", self.id) - } - - pub fn from(&self) -> String { - format!("AdventOfCode {}", self.year) - } - - pub fn practice_url(&self) -> String { - format!("https://adventofcode.com/{}/day/{}", self.year, self.day) - } -} diff --git a/schema/src/adventofcode_solution.rs b/schema/src/adventofcode_solution.rs deleted file mode 100644 index cb012f55..00000000 --- a/schema/src/adventofcode_solution.rs +++ /dev/null @@ -1,11 +0,0 @@ -use crate::schema::adventofcode_solution; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "adventofcode_solution"] -pub struct AdventOfCodeSolution { - pub id: i32, - pub year: i32, - pub day: i32, - filename: String, - pub source: String, -} diff --git a/schema/src/google_problem.rs b/schema/src/google_problem.rs deleted file mode 100644 index 06c68041..00000000 --- a/schema/src/google_problem.rs +++ /dev/null @@ -1,98 +0,0 @@ -use crate::schema::google_problem; -use regex::Regex; -use std::path::Path; - -#[derive(Debug, Queryable, Insertable)] -#[table_name = "google_problem"] -pub struct GoogleProblem { - pub id: i32, - pub division: i32, - pub year: i32, - pub round: i32, - pub number: i32, - pub title: String, - pub problem: String, - pub input: String, - pub output: String, - pub solution: String, - pub analysis: String, -} - -impl GoogleProblem { - pub fn new(division: i32, year: i32, round: i32, number: i32, title: String) -> Self { - let id = ((division * 10000 + year) * 100 + round) * 100 + number; - let problem = "".to_string(); - let input = "".to_string(); - let output = "".to_string(); - let solution = "".to_string(); - let analysis = "".to_string(); - GoogleProblem { - id, - division, - year, - round, - number, - title, - problem, - input, - output, - solution, - analysis, - } - } - - pub fn with_path(path: &Path) -> Option { - let re = Regex::new(r".*(codejam|kickstart).*year(\d+).*round(\d+).*_(\d+)_([a-z_]+).*") - .unwrap(); - if let Some(caps) = re.captures(path.to_str().unwrap()) { - let division = match &caps[1] { - "codejam" => 1, - "kickstart" => 2, - _ => 0, - }; - let year = caps[2].parse::().unwrap(); - let round = caps[3].parse::().unwrap(); - let number = caps[4].parse::().unwrap(); - let title = caps - .get(5) - .unwrap() - .as_str() - .chars() - .map(|c| if c == '_' { ' ' } else { c }) - .collect(); - Some(GoogleProblem::new(division, year, round, number, title)) - } else { - None - } - } - - pub fn division(&self) -> String { - match self.division { - 1 => "CodeJam".to_string(), - 2 => "KickStart".to_string(), - _ => "".to_string(), - } - } - - pub fn href(&self) -> String { - format!("/google/{}", self.id) - } - - pub fn from(&self) -> String { - format!("Google {} {}", self.division(), self.year) - } - - pub fn practice_url(&self) -> String { - match self.division { - 1 => format!( - "https://codingcompetitions.withgoogle.com/codejam/archive/{}", - self.year - ), - 2 => format!( - "https://codingcompetitions.withgoogle.com/kickstart/archive/{}", - self.year - ), - _ => "".to_string(), - } - } -} diff --git a/schema/src/leetcode_description.rs b/schema/src/leetcode_description.rs deleted file mode 100644 index e7ea5434..00000000 --- a/schema/src/leetcode_description.rs +++ /dev/null @@ -1,17 +0,0 @@ -use crate::schema::leetcode_description; -use rustgym_consts::*; -use std::fmt; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "leetcode_description"] -pub struct LeetcodeDescription { - pub id: i32, - filename: String, - pub html: String, -} - -impl fmt::Display for LeetcodeDescription { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "[{}]({}/{})", self.id, LEETCODE_DESC, self.filename) - } -} diff --git a/schema/src/leetcode_question.rs b/schema/src/leetcode_question.rs deleted file mode 100644 index 4bcf88fc..00000000 --- a/schema/src/leetcode_question.rs +++ /dev/null @@ -1,45 +0,0 @@ -use crate::schema::leetcode_question; -use rustgym_consts::*; -use std::fmt; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "leetcode_question"] -pub struct LeetcodeQuestion { - pub id: i32, - pub title: String, - pub slug: String, - pub level: i32, -} - -impl fmt::Display for LeetcodeQuestion { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!( - f, - "[{}]({}{})", - self.title, LEETCODE_QUESTION_URL, self.slug - ) - } -} - -impl LeetcodeQuestion { - pub fn level_str(&self) -> &str { - match self.level { - 1 => "Easy", - 2 => "Medium", - 3 => "Hard", - _ => "", - } - } - - pub fn href(&self) -> String { - format!("/leetcode/{}", self.id) - } - - pub fn from(&self) -> String { - format!("Leetcode {}", self.level_str()) - } - - pub fn practice_url(&self) -> String { - format!("https://leetcode.com/problems/{}/", self.slug) - } -} diff --git a/schema/src/leetcode_solution.rs b/schema/src/leetcode_solution.rs deleted file mode 100644 index 72940ca0..00000000 --- a/schema/src/leetcode_solution.rs +++ /dev/null @@ -1,17 +0,0 @@ -use crate::schema::leetcode_solution; -use rustgym_consts::*; -use std::fmt; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "leetcode_solution"] -pub struct LeetcodeSolution { - pub question_id: i32, - filename: String, - pub source: String, -} - -impl fmt::Display for LeetcodeSolution { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "[Rust]({}/{})", LEETCODE_SRC, self.filename) - } -} diff --git a/schema/src/lib.rs b/schema/src/lib.rs deleted file mode 100644 index dd6afa02..00000000 --- a/schema/src/lib.rs +++ /dev/null @@ -1,22 +0,0 @@ -#[macro_use] -extern crate diesel; - -#[macro_use] -extern crate derive_new; - -mod adventofcode_description; -mod adventofcode_solution; -mod google_problem; -mod leetcode_description; -mod leetcode_question; -mod leetcode_solution; -mod nes_rom; -pub mod schema; - -pub use adventofcode_description::*; -pub use adventofcode_solution::*; -pub use google_problem::*; -pub use leetcode_description::*; -pub use leetcode_question::*; -pub use leetcode_solution::*; -pub use nes_rom::*; diff --git a/schema/src/nes_rom.rs b/schema/src/nes_rom.rs deleted file mode 100644 index ac5155ed..00000000 --- a/schema/src/nes_rom.rs +++ /dev/null @@ -1,21 +0,0 @@ -use crate::schema::nes_rom; -use rustgym_consts::*; -use std::fmt; - -#[derive(Debug, Queryable, Insertable, new)] -#[table_name = "nes_rom"] -pub struct NesRom { - pub id: i32, - pub title: String, - pub description: String, - pub filename: String, - pub image: String, - pub size: i32, - pub md5: String, -} - -impl fmt::Display for NesRom { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "[Rust]({}/{})", LEETCODE_SRC, self.filename) - } -} diff --git a/schema/src/schema.rs b/schema/src/schema.rs deleted file mode 100644 index 4ca21274..00000000 --- a/schema/src/schema.rs +++ /dev/null @@ -1,86 +0,0 @@ -table! { - adventofcode_description (id) { - id -> Integer, - year -> Integer, - day -> Integer, - title -> Text, - filename -> Text, - html -> Text, - } -} - -table! { - adventofcode_solution (id) { - id -> Integer, - year -> Integer, - day -> Integer, - filename -> Text, - source -> Text, - } -} - -table! { - google_problem (id) { - id -> Integer, - division -> Integer, - year -> Integer, - round -> Integer, - number -> Integer, - title -> Text, - problem -> Text, - input -> Text, - output -> Text, - solution -> Text, - analysis -> Text, - } -} - -table! { - leetcode_description (id) { - id -> Integer, - filename -> Text, - html -> Text, - } -} - -table! { - leetcode_question (id) { - id -> Integer, - title -> Text, - slug -> Text, - level -> Integer, - } -} - -table! { - leetcode_solution (filename) { - question_id -> Integer, - filename -> Text, - source -> Text, - } -} - -table! { - nes_rom (id) { - id -> Integer, - title -> Text, - description -> Text, - filename -> Text, - image -> Text, - size -> Integer, - md5 -> Text, - } -} - -joinable!(leetcode_description -> leetcode_question (id)); -joinable!(leetcode_solution -> leetcode_question (question_id)); - -allow_tables_to_appear_in_same_query!( - adventofcode_description, - adventofcode_solution, - google_problem, - leetcode_description, - leetcode_question, - leetcode_solution, - nes_rom, -); diff --git a/scripts/.gitignore b/scripts/.gitignore deleted file mode 100644 index c594acf9..00000000 --- a/scripts/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -ignore.env - diff --git a/scripts/certbot.sh b/scripts/certbot.sh deleted file mode 100755 index 1c414c41..00000000 --- a/scripts/certbot.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -certbot certonly --register-unsafely-without-email --standalone \ No newline at end of file diff --git a/scripts/const.env b/scripts/const.env deleted file mode 100755 index 749074b7..00000000 --- a/scripts/const.env +++ /dev/null @@ -1,22 +0,0 @@ -SERVER_NAME=rustgym.com -EMAIL=larry.fantasy@gmail.com -RUSTGYM_DOWNLOAD=https://github.com/warycat/rustgym/releases/download -SONIC_DOWNLOAD=https://github.com/valeriansaliou/sonic/releases/download -OPENVGDB_DOWNLOAD_ZIP=https://github.com/OpenVGDB/OpenVGDB/releases/download/v29.0/openvgdb.zip -RUSTGYM_SQLITE=data/sqlite/rustgym.sqlite -OPENVGDB_SQLITE=data/sqlite/openvgdb.sqlite -SONIC_TAG=v1.3.0 -IMAGE=debian-10-buster-v20201216 -IMAGE_FAMILY=debian-10 -MACHINE_TYPE=e2-micro -ZONE=us-central1-a -PROJECT=rustgym - -TURN_EXTERNAL_IP=35.188.52.69 -TURN_LISTENING_PORT=3478 -TURN_TLS_LISTENING_PORT=5349 -TURN_MIN_PORT=49152 -TURN_MAX_PORT=65535 -TURN_REALM=rustgym.com -TURN_CERT=/etc/letsencrypt/live/rustgym.com/cert.pem -TURN_PKEY=/etc/letsencrypt/live/rustgym.com/privkey.pem \ No newline at end of file diff --git a/scripts/coturn.sh b/scripts/coturn.sh deleted file mode 100755 index 43738c95..00000000 --- a/scripts/coturn.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -turnserver -n --verbose --use-auth-secret --fingerprint \ - --static-auth-secret=$TURN_STATIC_AUTH_SECRET \ - --realm=$TURN_REALM \ - --external-ip=$TURN_EXTERNAL_IP \ - --cert=$TURN_CERT \ - --pkey=$TURN_PKEY \ - --cli-password=$TURN_CLI_PASSWORD \ - 2>&1 >> log/turnserver.log & \ No newline at end of file diff --git a/scripts/create_stun_firewall_rule.sh b/scripts/create_stun_firewall_rule.sh deleted file mode 100755 index 513a926f..00000000 --- a/scripts/create_stun_firewall_rule.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -source infra/const.env - -gcloud compute firewall-rules create allow-stun \ - --allow tcp:$TURN_LISTENING_PORT,udp:$TURN_LISTENING_PORT,tcp:$TURN_TLS_LISTENING_PORT,udp:$TURN_TLS_LISTENING_PORT,tcp:$TURN_MIN_PORT-$TURN_MAX_PORT,udp:$TURN_MIN_PORT-$TURN_MAX_PORT \ - --target-tags stun-server \ diff --git a/scripts/envoy.sh b/scripts/envoy.sh deleted file mode 100755 index 41f43d35..00000000 --- a/scripts/envoy.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -envoy -c config/envoy.yaml 2>&1 >> log/envoy.log & \ No newline at end of file diff --git a/scripts/ingest.sh b/scripts/ingest.sh deleted file mode 100755 index 118d0955..00000000 --- a/scripts/ingest.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -./rustgym-ingest 2>&1 >> log/ingest.log & diff --git a/scripts/server.sh b/scripts/server.sh deleted file mode 100755 index c428de22..00000000 --- a/scripts/server.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "starting rustgym server" -TAG=$TAG TURN_STATIC_AUTH_SECRET=$TURN_STATIC_AUTH_SECRET RUST_LOG=INFO ./rustgym-server 2>&1 >> log/server.log & diff --git a/scripts/sonic.sh b/scripts/sonic.sh deleted file mode 100755 index 86ab5652..00000000 --- a/scripts/sonic.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -echo "starting sonic server" -./sonic-server -c config/sonic.cfg 2>&1 >> log/sonic.log & \ No newline at end of file diff --git a/scripts/startup.sh b/scripts/startup.sh deleted file mode 100755 index 09a01aeb..00000000 --- a/scripts/startup.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -source scripts/ignore.env -source scripts/const.env - -apt update -apt install -y screen git telnet certbot coturn debian-keyring debian-archive-keyring apt-transport-https curl lsb-release -if [ ! -f /usr/share/keyrings/getenvoy-keyring.gpg ] -then - curl -sL 'https://deb.dl.getenvoy.io/public/gpg.8115BA8E629CC074.key' | sudo gpg --dearmor -o /usr/share/keyrings/getenvoy-keyring.gpg -fi -echo a077cb587a1b622e03aa4bf2f3689de14658a9497a9af2c427bba5f4cc3c4723 /usr/share/keyrings/getenvoy-keyring.gpg | sha256sum --check -echo "deb [arch=amd64 signed-by=/usr/share/keyrings/getenvoy-keyring.gpg] https://deb.dl.getenvoy.io/public/deb/debian $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/getenvoy.list -apt update -apt install -y getenvoy-envoy - -curl -LJO $SONIC_DOWNLOAD/$SONIC_TAG/$SONIC_TAG-x86_64.tar.gz -tar -xzf $SONIC_TAG-x86_64.tar.gz -mv sonic/sonic sonic-server -rm $SONIC_TAG-x86_64.tar.gz -rmdir sonic - -mkdir -p data/store/kv -mkdir -p data/store/fst -mkdir -p log -mv ./target/x86_64-unknown-linux-musl/release/* . - -git clone https://github.com/ua-parser/uap-core.git - -source scripts/sonic.sh -source scripts/ingest.sh -source scripts/coturn.sh -source scripts/server.sh diff --git a/server/Cargo.toml b/server/Cargo.toml deleted file mode 100644 index 99b9a0c3..00000000 --- a/server/Cargo.toml +++ /dev/null @@ -1,48 +0,0 @@ -[package] -name = "rustgym-server" -version = "0.1.0" -authors = ["Yinchu Xia "] -edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html -[dependencies] -actix = "0.10.0" -actix-files = "0.5.0" -actix-service = "1.0.6" -actix-session = "0.4.0" -actix-web = "3" -actix-web-actors = "3.0.0" -anyhow = "1.0.38" -askama = "0.10.5" -chrono = "0.4.19" -derive-new = "0.5.8" -env_logger = "0.8.2" -failure = "0.1.8" -futures = "0.3.8" -futures-util = "0.3.12" -lazy_static = "1.4.0" -log = "0.4.13" -r2d2 = "0.8.9" -rand = "0.8.1" -rustgym-characters = { path = "../characters" } -rustgym-consts = { path = "../consts" } -rustgym-msg = { path = "../msg" } -rustgym-schema = { path = "../schema" } -serde = "1.0.118" -serde_json = "1.0.61" -sonic-channel = "0.4.0" -uuid = { version = "0.8", features = ["serde", "v4"] } -tokio = { version = "0.2", features = ["full"] } -uaparser = "0.4.0" -notify = "4.0.16" -bincode = "1.3.3" -ring = "0.16.20" -data-encoding = "2.3.2" -openssl = { version = "0.10.40", features = ["vendored"] } -libsqlite3-sys = { version = "0.9.1", features = ["bundled"] } -diesel = { version = "1.4.8", features = [ - "sqlite", - "r2d2", - "chrono", - "uuidv07" -] } diff --git a/server/src/agents/envelope.rs b/server/src/agents/envelope.rs deleted file mode 100644 index da38b995..00000000 --- a/server/src/agents/envelope.rs +++ /dev/null @@ -1,42 +0,0 @@ -use crate::agents::websocket::SocketClient; -use actix::prelude::*; -use rustgym_msg::*; -use std::fmt; -use uuid::Uuid; - -#[derive(Message, Debug, Clone, new)] -#[rtype(result = "()")] -pub struct Envelope { - pub client_addr: Addr, - pub client_uuid: Uuid, - pub msg: Msg, -} - -impl Envelope { - pub fn from_msg_in(client_addr: Addr, client_uuid: Uuid, msg_in: MsgIn) -> Self { - let msg = Msg::In(msg_in); - Envelope { - client_addr, - client_uuid, - msg, - } - } - pub fn from_msg_out( - client_addr: Addr, - client_uuid: Uuid, - msg_out: MsgOut, - ) -> Self { - let msg = Msg::Out(msg_out); - Envelope { - client_addr, - client_uuid, - msg, - } - } -} - -impl fmt::Debug for SocketClient { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "") - } -} diff --git a/server/src/agents/mod.rs b/server/src/agents/mod.rs deleted file mode 100644 index 267057c6..00000000 --- a/server/src/agents/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod envelope; -pub mod registry; -pub mod search; -pub mod uap; -pub mod websocket; diff --git a/server/src/agents/registry.rs b/server/src/agents/registry.rs deleted file mode 100644 index e625bc1b..00000000 --- a/server/src/agents/registry.rs +++ /dev/null @@ -1,141 +0,0 @@ -use crate::agents::envelope::Envelope; -use crate::agents::search::SearchAgent; -use crate::agents::websocket::SocketClient; -use actix::prelude::*; -use log::error; -use rustgym_msg::ClientInfo; -use rustgym_msg::*; -use std::collections::HashMap; -use uuid::Uuid; - -#[derive(Clone)] -pub struct RegistryAgent { - search_addr: Addr, - all_clients: HashMap, - all_sockets: HashMap>, -} - -impl RegistryAgent { - pub fn new(search_addr: Addr) -> Self { - let all_clients = HashMap::new(); - let all_sockets = HashMap::new(); - - RegistryAgent { - search_addr, - all_sockets, - all_clients, - } - } - - fn update_all_clients(&self, msg_out: MsgOut) { - for client_info in self.all_clients.values() { - if let Some(client_addr) = self.all_sockets.get(&client_info.client_uuid) { - let msg_out = msg_out.clone(); - let client_addr_clone = client_addr.clone(); - let envelope = - Envelope::from_msg_out(client_addr_clone, client_info.client_uuid, msg_out); - client_addr.do_send(envelope); - } else { - error!("{} recipient not found", client_info.client_uuid); - } - } - } - - fn update_client(&self, client_uuid: Uuid, msg_out: MsgOut) { - if let Some(client_addr) = self.all_sockets.get(&client_uuid) { - let envelope = Envelope::from_msg_out(client_addr.clone(), client_uuid, msg_out); - client_addr.do_send(envelope); - } else { - error!("{} recipient not found", client_uuid); - } - } -} - -impl Actor for RegistryAgent { - type Context = Context; -} - -impl Handler for RegistryAgent { - type Result = (); - - fn handle(&mut self, envelope: Envelope, _ctx: &mut Context) { - let Envelope { - client_addr, - client_uuid, - msg, - } = envelope.clone(); - - match msg { - Msg::In(msg_in) => match msg_in { - MsgIn::SearchText(_) => { - self.search_addr.do_send(envelope); - } - MsgIn::QueryText(_) => { - self.search_addr.do_send(envelope); - } - MsgIn::StreamStart { client_uuid } => { - let msg_out = MsgOut::StreamStart { client_uuid }; - self.update_all_clients(msg_out); - } - MsgIn::Offer { - caller, - callee, - offer_sdp, - } => { - let msg_out = MsgOut::Offer { - caller, - callee, - offer_sdp, - }; - self.update_client(callee, msg_out); - } - MsgIn::Answer { - caller, - callee, - answer_sdp, - } => { - let msg_out = MsgOut::Answer { - caller, - callee, - answer_sdp, - }; - self.update_client(caller, msg_out); - } - MsgIn::IceCandidate { - local, - remote, - candidate, - sdp_mid, - sdp_m_line_index, - } => { - let msg_out = MsgOut::IceCandidate { - local: remote, - remote: local, - candidate, - sdp_mid, - sdp_m_line_index, - }; - self.update_client(remote, msg_out); - } - _ => { - error!("{:?}", msg_in); - } - }, - Msg::Out(msg_out) => match msg_out.clone() { - MsgOut::RegistorClient(client_info) => { - self.all_sockets.entry(client_uuid).or_insert(client_addr); - self.all_clients.entry(client_uuid).or_insert(client_info); - self.update_all_clients(msg_out); - } - MsgOut::UnRegistorClient(_) => { - self.all_sockets.remove(&client_uuid); - self.all_clients.remove(&client_uuid); - self.update_all_clients(msg_out); - } - _ => { - error!("{:?}", msg_out); - } - }, - } - } -} diff --git a/server/src/agents/search.rs b/server/src/agents/search.rs deleted file mode 100644 index c7a4b80b..00000000 --- a/server/src/agents/search.rs +++ /dev/null @@ -1,174 +0,0 @@ -use crate::agents::envelope::Envelope; -use crate::db::*; -use actix::prelude::*; -use anyhow::Result; -use diesel::prelude::*; -use log::error; -use log::info; -use rustgym_consts::*; -use rustgym_msg::QueryResult; -use rustgym_msg::*; -use rustgym_schema::AdventOfCodeDescription; -use rustgym_schema::GoogleProblem; -use rustgym_schema::LeetcodeQuestion; -use sonic_channel::*; - -pub struct SearchAgent { - pool: SqlitePool, - search_channel: SearchChannel, -} - -impl SearchAgent { - pub fn new(pool: SqlitePool) -> Self { - let search_channel = SearchChannel::start(SONIC_URL, SONIC_PASS).expect("channel"); - SearchAgent { - pool, - search_channel, - } - } - - pub fn reconnect(&mut self) { - self.search_channel = SearchChannel::start(SONIC_URL, SONIC_PASS).expect("channel"); - } -} - -impl Actor for SearchAgent { - type Context = Context; -} - -impl Handler for SearchAgent { - type Result = (); - fn handle(&mut self, envelope: Envelope, _ctx: &mut Context) { - let Envelope { - client_addr, - client_uuid, - msg, - } = envelope; - - match msg { - Msg::In(msg_in) => match msg_in { - MsgIn::SearchText(text) => { - let text: String = cleanup(text); - let search_words: Vec = - text.split_whitespace().map(|s| s.to_string()).collect(); - let mut suggestions = vec![]; - if let Some(last) = search_words.last() { - info!("{}", last); - match self - .search_channel - .suggest(SONIC_COLLECTION, SONIC_BUCKET, last) - { - Ok(words) => { - info!("{:?}", words); - for word in words { - let mut words = search_words.to_vec(); - words.pop(); - words.push(word); - let suggestion: String = words.join(" "); - suggestions.push(suggestion); - } - } - Err(err) => { - info!("reconnect {:?}", err); - self.reconnect(); - } - } - } - let msg_out = MsgOut::SearchSuggestions(suggestions); - let envelope = - Envelope::from_msg_out(client_addr.clone(), client_uuid, msg_out); - client_addr.do_send(envelope); - } - MsgIn::QueryText(text) => { - let text: String = cleanup(text); - let mut query_results: Vec = vec![]; - match self - .search_channel - .query(SONIC_COLLECTION, SONIC_BUCKET, &text) - { - Ok(objects) => { - if let Ok(results) = get_results(objects, &self.pool) { - query_results = results; - } - } - Err(err) => { - info!("reconnect {:?}", err); - self.reconnect(); - } - } - let msg_out = MsgOut::QueryResults(query_results); - let envelope = - Envelope::from_msg_out(client_addr.clone(), client_uuid, msg_out); - client_addr.do_send(envelope); - } - _ => { - error!("{:?}", msg_in); - } - }, - Msg::Out(msg_out) => { - error!("{:?}", msg_out); - } - } - } -} - -fn cleanup(text: String) -> String { - text.chars() - .map(|c| if c.is_ascii_alphabetic() { c } else { ' ' }) - .collect() -} - -fn get_results(objects: Vec, pool: &SqlitePool) -> Result> { - use rustgym_schema::schema::adventofcode_description::dsl::*; - use rustgym_schema::schema::google_problem::dsl::*; - use rustgym_schema::schema::leetcode_question::dsl::*; - let mut res = vec![]; - let conn = pool.get()?; - for object in objects { - let parts: Vec<&str> = object.split('_').collect(); - match parts[0] { - "leetcode" => { - let id_ = parts[1].parse::()?; - let question: LeetcodeQuestion = leetcode_question - .filter(rustgym_schema::schema::leetcode_question::dsl::id.eq(id_)) - .first(&conn)?; - let query_result = QueryResult::new( - parts[1].to_string(), - question.title.to_string(), - question.href(), - question.from(), - ); - res.push(query_result); - } - "adventofcode" => { - let id_ = parts[1].parse::()?; - let description: AdventOfCodeDescription = adventofcode_description - .filter(rustgym_schema::schema::adventofcode_description::dsl::id.eq(id_)) - .first(&conn)?; - let query_result = QueryResult::new( - parts[1].to_string(), - description.title.to_string(), - description.href(), - description.from(), - ); - res.push(query_result); - } - "google" => { - let id_ = parts[1].parse::()?; - let item: GoogleProblem = google_problem - .filter(rustgym_schema::schema::google_problem::dsl::id.eq(id_)) - .first(&conn)?; - let query_result = QueryResult::new( - parts[1].to_string(), - item.title.to_string(), - item.href(), - item.from(), - ); - res.push(query_result); - } - _ => {} - } - } - - Ok(res) -} diff --git a/server/src/agents/uap.rs b/server/src/agents/uap.rs deleted file mode 100644 index 201852e6..00000000 --- a/server/src/agents/uap.rs +++ /dev/null @@ -1,48 +0,0 @@ -use actix::prelude::*; -use actix_web::web::HttpRequest; - -use actix_web::error::ErrorBadRequest; -use actix_web::Error; -use uaparser::{Parser, UserAgent, UserAgentParser}; - -#[derive(Message, Clone)] -#[rtype(result = "Option")] -pub struct UserAgentRequest { - uah: String, -} - -impl UserAgentRequest { - pub fn from_request(req: &HttpRequest) -> Result { - let header = req - .headers() - .get("User-Agent") - .ok_or(1) - .map_err(ErrorBadRequest)?; - let uah = header.to_str().map_err(ErrorBadRequest)?.to_string(); - Ok(UserAgentRequest { uah }) - } -} - -pub struct UapAgent { - parser: UserAgentParser, -} - -impl UapAgent { - pub fn new() -> Self { - let parser = UserAgentParser::from_yaml("uap-core/regexes.yaml").expect("Uap"); - UapAgent { parser } - } -} - -impl Actor for UapAgent { - type Context = Context; -} - -impl Handler for UapAgent { - type Result = Option; - - fn handle(&mut self, req: UserAgentRequest, _ctx: &mut Context) -> Self::Result { - let ua = self.parser.parse_user_agent(&req.uah); - Some(ua) - } -} diff --git a/server/src/agents/websocket.rs b/server/src/agents/websocket.rs deleted file mode 100644 index 689c65a0..00000000 --- a/server/src/agents/websocket.rs +++ /dev/null @@ -1,188 +0,0 @@ -use crate::agents::envelope::Envelope; -use crate::agents::registry::RegistryAgent; -use crate::agents::uap::{UapAgent, UserAgentRequest}; -use crate::app_data::AppData; -use crate::session_data::update_session; -use actix::prelude::*; -use actix_session::Session; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use actix_web_actors::ws; -use chrono::Utc; -use data_encoding::BASE64; -use log::debug; -use log::error; -use log::info; -use ring::hmac; -use rustgym_consts::*; -use rustgym_msg::ClientInfo; -use rustgym_msg::*; -use std::time::Instant; -use uuid::Uuid; - -pub fn generate_turn_rest_api_cred( - name: &str, - turn_static_auth_secret: &str, - ttl: i64, -) -> (String, String) { - let now = Utc::now(); - let timestamp = now.timestamp() + ttl; - let usercombo = format!("{}:{}", timestamp, name); - let signed_key = hmac::Key::new( - hmac::HMAC_SHA1_FOR_LEGACY_USE_ONLY, - turn_static_auth_secret.as_bytes(), - ); - let signature = hmac::sign(&signed_key, usercombo.as_bytes()); - let credential = BASE64.encode(signature.as_ref()); - (usercombo, credential) -} - -pub async fn ws_index( - data: web::Data, - req: HttpRequest, - stream: web::Payload, - session: Session, - registry_addr: web::Data>, - uap_addr: web::Data>, -) -> Result { - let uaq = UserAgentRequest::from_request(&req)?; - let user_agent = if let Ok(Some(ua)) = uap_addr.get_ref().send(uaq).await { - let family = ua.family; - let major = ua.major; - let minor = ua.minor; - let patch = ua.patch; - Some(rustgym_msg::UserAgent::new(family, major, minor, patch)) - } else { - None - }; - let session_data = update_session(session)?; - let session_uuid = session_data.uuid; - let name = session_data.name; - let client_uuid = Uuid::new_v4(); - let (usercombo, credential) = generate_turn_rest_api_cred( - &name, - &data.turn_static_auth_secret.borrow().to_string(), - 3600 * 24, - ); - let stun_server = IceServer::new( - "stun:rustgym.com".to_string(), - usercombo.clone(), - credential.clone(), - ); - let turn_server = IceServer::new( - "turn:rustgym.com".to_string(), - usercombo.clone(), - credential.clone(), - ); - let turns_server = IceServer::new("turns:rustgym.com".to_string(), usercombo, credential); - let ice_servers = vec![stun_server, turn_server, turns_server]; - let client_info = ClientInfo { - client_uuid, - session_uuid, - name, - user_agent, - ice_servers, - }; - let socket_client = SocketClient::new(client_info, registry_addr.get_ref().clone()); - ws::start(socket_client, &req, stream) -} - -#[derive(Clone)] -pub struct SocketClient { - hb: Instant, - client_info: ClientInfo, - registry_addr: Addr, -} - -impl SocketClient { - fn new(client_info: ClientInfo, registry_addr: Addr) -> Self { - let hb = Instant::now(); - Self { - hb, - client_info, - registry_addr, - } - } - - fn hb(&self, ctx: &mut ::Context) { - ctx.run_interval(HEARTBEAT_INTERVAL, |act, ctx| { - if Instant::now().duration_since(act.hb) > CLIENT_TIMEOUT { - info!("Websocket Client heartbeat failed, disconnecting!"); - ctx.stop(); - return; - } - ctx.ping(act.client_info.client_uuid.as_bytes()); - }); - } -} - -impl Actor for SocketClient { - type Context = ws::WebsocketContext; - - fn started(&mut self, ctx: &mut Self::Context) { - let msg_out = MsgOut::RegistorClient(self.client_info.clone()); - let address = ctx.address(); - let envelop = Envelope::from_msg_out(address, self.client_info.client_uuid, msg_out); - self.registry_addr.do_send(envelop); - self.hb(ctx); - } - - fn stopping(&mut self, ctx: &mut Self::Context) -> actix::Running { - let msg_out = MsgOut::UnRegistorClient(self.client_info.clone()); - let address = ctx.address(); - let envelop = Envelope::from_msg_out(address, self.client_info.client_uuid, msg_out); - self.registry_addr.do_send(envelop); - actix::Running::Stop - } -} - -impl Handler for SocketClient { - type Result = (); - - fn handle(&mut self, envelope: Envelope, ctx: &mut Self::Context) { - match envelope.msg { - Msg::In(msg_in) => { - error!("{:?}", msg_in); - } - Msg::Out(msg_out) => { - let json = serde_json::to_string(&msg_out).expect("json"); - ctx.text(json); - } - } - } -} - -impl StreamHandler> for SocketClient { - fn handle(&mut self, msg: Result, ctx: &mut Self::Context) { - debug!("WS: {:?}", msg); - match msg { - Ok(ws::Message::Ping(msg)) => { - self.hb = Instant::now(); - ctx.pong(&msg); - } - Ok(ws::Message::Pong(_)) => { - self.hb = Instant::now(); - } - Ok(ws::Message::Text(text)) => { - if let Ok(msg_in) = serde_json::from_str::(&text) { - info!("{:?}", msg_in); - let address = ctx.address(); - let envelope = - Envelope::from_msg_in(address, self.client_info.client_uuid, msg_in); - self.registry_addr.do_send(envelope); - } else { - info!("{:?}", text); - ctx.text(text) - } - } - Ok(ws::Message::Binary(_)) => {} - Ok(ws::Message::Close(reason)) => { - ctx.close(reason); - ctx.stop(); - } - _ => ctx.stop(), - } - } -} diff --git a/server/src/app_data.rs b/server/src/app_data.rs deleted file mode 100644 index 8b7fa6bb..00000000 --- a/server/src/app_data.rs +++ /dev/null @@ -1,23 +0,0 @@ -use std::cell::RefCell; -use std::collections::HashMap; -use std::sync::Arc; -use std::sync::Mutex; - -#[derive(Clone)] -pub struct AppData { - pub tag: RefCell, - pub title: RefCell, - pub turn_static_auth_secret: RefCell, - pub sessions: Arc>>, -} - -impl AppData { - pub fn new(tag: String, title: String, turn_static_auth_secret: String) -> AppData { - AppData { - tag: RefCell::new(tag), - title: RefCell::new(title), - turn_static_auth_secret: RefCell::new(turn_static_auth_secret), - sessions: Arc::new(Mutex::new(HashMap::new())), - } - } -} diff --git a/server/src/context/adventofcode.rs b/server/src/context/adventofcode.rs deleted file mode 100644 index c6f1287c..00000000 --- a/server/src/context/adventofcode.rs +++ /dev/null @@ -1,34 +0,0 @@ -use crate::context::*; - -#[derive(Queryable)] -pub struct AdventOfCodeIndexRow { - pub id: i32, - pub year: i32, - pub day: i32, - pub title: String, -} - -#[derive(Template, new)] -#[template(path = "adventofcode-index.j2")] -pub struct AdventOfCodeIndexContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub rows: Vec, -} - -impl AdventOfCodeIndexRow { - pub fn href(&self) -> String { - format!("/adventofcode/{}", self.id) - } -} - -#[derive(Template, new)] -#[template(path = "adventofcode-detail.j2")] -pub struct AdventOfCodeDetailContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub description: AdventOfCodeDescription, - pub solution: AdventOfCodeSolution, -} diff --git a/server/src/context/app.rs b/server/src/context/app.rs deleted file mode 100644 index c9e4cd80..00000000 --- a/server/src/context/app.rs +++ /dev/null @@ -1,14 +0,0 @@ -use crate::context::*; - -pub struct AppContext { - pub title: String, - pub tag: String, -} - -impl AppContext { - pub fn new(data: Data) -> Self { - let title = data.title.borrow().to_string(); - let tag = data.tag.borrow().to_string(); - AppContext { title, tag } - } -} diff --git a/server/src/context/find.rs b/server/src/context/find.rs deleted file mode 100644 index 33b7072a..00000000 --- a/server/src/context/find.rs +++ /dev/null @@ -1,9 +0,0 @@ -use crate::context::*; - -#[derive(Template, new)] -#[template(path = "find.j2")] -pub struct FindContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, -} diff --git a/server/src/context/google.rs b/server/src/context/google.rs deleted file mode 100644 index a9a4dd50..00000000 --- a/server/src/context/google.rs +++ /dev/null @@ -1,35 +0,0 @@ -use crate::context::*; - -#[derive(Queryable, Clone)] -pub struct GoogleIndexRow { - pub id: i32, - pub division: i32, - pub year: i32, - pub round: i32, - pub title: String, -} - -impl GoogleIndexRow { - pub fn href(&self) -> String { - format!("/google/{}", self.id) - } -} - -#[derive(Template, new)] -#[template(path = "google-index.j2")] -pub struct GoogleIndexContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub rows_codejam: Vec, - pub rows_kickstart: Vec, -} - -#[derive(Template, new)] -#[template(path = "google-detail.j2")] -pub struct GoogleDetailContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub item: GoogleProblem, -} diff --git a/server/src/context/home.rs b/server/src/context/home.rs deleted file mode 100644 index 0a7b36ea..00000000 --- a/server/src/context/home.rs +++ /dev/null @@ -1,9 +0,0 @@ -use crate::context::*; - -#[derive(Template, new)] -#[template(path = "home.j2")] -pub struct HomeContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, -} diff --git a/server/src/context/leetcode.rs b/server/src/context/leetcode.rs deleted file mode 100644 index ef2a98e4..00000000 --- a/server/src/context/leetcode.rs +++ /dev/null @@ -1,45 +0,0 @@ -use crate::context::*; - -#[derive(Queryable)] -pub struct LeetcodeIndexRow { - pub id: i32, - pub title: String, - pub level: i32, -} - -impl LeetcodeIndexRow { - pub fn level_str(&self) -> &str { - match self.level { - 1 => "Easy", - 2 => "Medium", - 3 => "Hard", - _ => "", - } - } - - pub fn href(&self) -> String { - format!("/leetcode/{}", self.id) - } -} - -#[derive(Template, new)] -#[template(path = "leetcode-index.j2")] -pub struct LeetcodeIndexContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub rows_easy: Vec, - pub rows_medium: Vec, - pub rows_hard: Vec, -} - -#[derive(Template, new)] -#[template(path = "leetcode-detail.j2")] -pub struct LeetcodeDetailContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub question: LeetcodeQuestion, - pub description: LeetcodeDescription, - pub solutions: Vec, -} diff --git a/server/src/context/mod.rs b/server/src/context/mod.rs deleted file mode 100644 index b2f62480..00000000 --- a/server/src/context/mod.rs +++ /dev/null @@ -1,62 +0,0 @@ -mod adventofcode; -mod app; -mod find; -mod google; -mod home; -mod leetcode; -mod nes; -mod sitemap; - -pub use adventofcode::*; -pub use app::*; -pub use find::*; -pub use google::*; -pub use home::*; -pub use leetcode::*; -pub use nes::*; -pub use sitemap::*; - -use crate::session_data::SessionData; -use crate::AppData; -use actix_web::error::ErrorInternalServerError; -use actix_web::web::Data; -use actix_web::Error; -use actix_web::HttpResponse; -use askama::Template; -use rustgym_schema::*; - -macro_rules! impl_render_wrapper { - ($type: ty) => { - impl $type { - pub fn render_wrapper(&self) -> Result { - let body = self.render().map_err(ErrorInternalServerError)?; - Ok(HttpResponse::Ok().content_type("text/html").body(body)) - } - } - }; -} - -macro_rules! impl_txt_render_wrapper { - ($type: ty) => { - impl $type { - pub fn render_wrapper(&self) -> Result { - let body = self.render().map_err(ErrorInternalServerError)?; - Ok(HttpResponse::Ok().content_type("text/txt").body(body)) - } - } - }; -} - -impl_render_wrapper!(HomeContext); -impl_render_wrapper!(LeetcodeIndexContext); -impl_render_wrapper!(AdventOfCodeIndexContext); -impl_render_wrapper!(LeetcodeDetailContext); -impl_render_wrapper!(AdventOfCodeDetailContext); -impl_render_wrapper!(GoogleIndexContext); -impl_render_wrapper!(GoogleDetailContext); -impl_render_wrapper!(NesIndexContext); -impl_render_wrapper!(NesDetailContext); -impl_render_wrapper!(FindContext); - -impl_txt_render_wrapper!(SitemapContext); -impl_txt_render_wrapper!(RobotsContext); diff --git a/server/src/context/nes.rs b/server/src/context/nes.rs deleted file mode 100644 index e8f612ab..00000000 --- a/server/src/context/nes.rs +++ /dev/null @@ -1,33 +0,0 @@ -use crate::context::*; - -#[derive(Queryable)] -pub struct NesIndexRow { - pub id: i32, - pub title: String, - pub description: String, - pub image: String, -} - -#[derive(Template, new)] -#[template(path = "nes-index.j2")] -pub struct NesIndexContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub rows: Vec, -} - -impl NesIndexRow { - pub fn href(&self) -> String { - format!("/nes/{}", self.id) - } -} - -#[derive(Template, new)] -#[template(path = "nes-detail.j2")] -pub struct NesDetailContext { - pub app: AppContext, - pub session: SessionData, - pub path: String, - pub rom: NesRom, -} diff --git a/server/src/context/sitemap.rs b/server/src/context/sitemap.rs deleted file mode 100644 index bb348021..00000000 --- a/server/src/context/sitemap.rs +++ /dev/null @@ -1,14 +0,0 @@ -use askama::Template; -use rustgym_schema::*; - -#[derive(Template, new)] -#[template(path = "sitemap.j2")] -pub struct SitemapContext { - pub leetcode_rows: Vec, - pub adventofcode_rows: Vec, - pub google_rows: Vec, -} - -#[derive(Template, new)] -#[template(path = "robots.j2")] -pub struct RobotsContext {} diff --git a/server/src/db.rs b/server/src/db.rs deleted file mode 100644 index e143f041..00000000 --- a/server/src/db.rs +++ /dev/null @@ -1,20 +0,0 @@ -use actix_web::error::ErrorInternalServerError; -use actix_web::web; -use actix_web::Error; -use diesel::r2d2::ConnectionManager; -use diesel::r2d2::Pool; -use diesel::r2d2::PoolError; -use diesel::r2d2::PooledConnection; -use diesel::sqlite::SqliteConnection; - -pub type SqlitePool = Pool>; -pub type SqlitePooledConnection = PooledConnection>; - -pub fn init_pool(database_url: &str) -> Result { - let manager = ConnectionManager::::new(database_url); - Pool::builder().build(manager) -} - -pub fn conn(pool: web::Data) -> Result { - pool.get().map_err(ErrorInternalServerError) -} diff --git a/server/src/files.rs b/server/src/files.rs deleted file mode 100644 index 75529886..00000000 --- a/server/src/files.rs +++ /dev/null @@ -1,32 +0,0 @@ -use actix_files::NamedFile; -use actix_web::get; -use actix_web::HttpRequest; -use actix_web::Result; -use std::path::PathBuf; - -#[get("/pkg/{filename:.*}")] -async fn client_files(req: HttpRequest) -> Result { - let filename = req.match_info().query("filename"); - let path: PathBuf = ["pkg", filename].iter().collect(); - Ok(NamedFile::open(path)?) -} - -#[get("/static/{filename:.*}")] -async fn static_files(req: HttpRequest) -> Result { - let filename = req.match_info().query("filename"); - let path: PathBuf = ["static", filename].iter().collect(); - Ok(NamedFile::open(path)?) -} - -#[get("/data/{filename:.*}")] -async fn data_files(req: HttpRequest) -> Result { - let filename = req.match_info().query("filename"); - let path: PathBuf = ["data", filename].iter().collect(); - Ok(NamedFile::open(path)?) -} - -#[get("/favicon.ico")] -async fn favicon_file(_req: HttpRequest) -> Result { - let path: PathBuf = ["static", "ico", "windows.ico"].iter().collect(); - Ok(NamedFile::open(path)?) -} diff --git a/server/src/main.rs b/server/src/main.rs deleted file mode 100644 index a51ba391..00000000 --- a/server/src/main.rs +++ /dev/null @@ -1,77 +0,0 @@ -#[macro_use] -extern crate diesel; -#[macro_use] -extern crate derive_new; - -mod agents; -mod app_data; -mod context; -mod db; -mod files; -mod routes; -mod session_data; - -use actix::prelude::*; -use actix_session::CookieSession; -use actix_web::middleware::Logger; -use actix_web::web; -use actix_web::App; -use actix_web::HttpServer; -use agents::registry::RegistryAgent; -use agents::search::SearchAgent; -use agents::uap::UapAgent; -use app_data::AppData; -use db::*; -use log::info; -use rustgym_consts::*; -use std::env; -use std::process::Command; - -#[actix_web::main] -async fn main() -> std::io::Result<()> { - std::env::set_var("RUST_LOG", "info"); - env_logger::init(); - let pool: SqlitePool = db::init_pool(DATABASE_URL).expect("Failed to create pool"); - let tag = env::var("TAG").expect("TAG"); - let turn_static_auth_secret = - env::var("TURN_STATIC_AUTH_SECRET").expect("TURN_STATIC_AUTH_SECRET"); - let title = "Rust Gym".to_string(); - info!("{} {}", title, tag); - let app_data = AppData::new(tag, title, turn_static_auth_secret); - let search_addr = SearchAgent::new(pool.clone()).start(); - let registry_addr = RegistryAgent::new(search_addr).start(); - let uap_addr = UapAgent::new().start(); - Command::new("mkdir") - .arg(STREAM_DIR) - .output() - .expect("Create Stream Dir"); - HttpServer::new(move || { - App::new() - .wrap(Logger::default()) - .wrap(CookieSession::signed(&[0; 32]).secure(false)) - .data(app_data.clone()) - .data(pool.clone()) - .data(registry_addr.clone()) - .data(uap_addr.clone()) - .service(routes::home::home) - .service(routes::find::find) - .service(routes::nes_index::nes_index) - .service(routes::nes_detail::nes_detail) - .service(routes::leetcode_index::leetcode_index) - .service(routes::adventofcode_index::adventofcode_index) - .service(routes::google_index::google_index) - .service(routes::leetcode_detail::leetcode_detail) - .service(routes::adventofcode_detail::adventofcode_detail) - .service(routes::google_detail::google_detail) - .service(routes::robots::robots_txt) - .service(routes::sitemap::sitemap_txt) - .service(files::client_files) - .service(files::static_files) - .service(files::data_files) - .service(files::favicon_file) - .service(web::resource("/ws/").to(agents::websocket::ws_index)) - }) - .bind("127.0.0.1:8080")? - .run() - .await -} diff --git a/server/src/routes/adventofcode_detail.rs b/server/src/routes/adventofcode_detail.rs deleted file mode 100644 index dd4c30bc..00000000 --- a/server/src/routes/adventofcode_detail.rs +++ /dev/null @@ -1,43 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/adventofcode/{id}")] -async fn adventofcode_detail( - data: web::Data, - req: HttpRequest, - web::Path(id_): web::Path, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::adventofcode_description::dsl::*; - use schema::adventofcode_solution::dsl::*; - let conn = conn(pool)?; - let description = adventofcode_description - .find(id_) - .first(&conn) - .map_err(ErrorNotFound)?; - let solution = adventofcode_solution - .find(id_) - .first(&conn) - .map_err(ErrorNotFound)?; - AdventOfCodeDetailContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - description, - solution, - ) - .render_wrapper() -} diff --git a/server/src/routes/adventofcode_index.rs b/server/src/routes/adventofcode_index.rs deleted file mode 100644 index 576cdf9f..00000000 --- a/server/src/routes/adventofcode_index.rs +++ /dev/null @@ -1,36 +0,0 @@ -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use crate::AppData; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/adventofcode")] -pub async fn adventofcode_index( - data: web::Data, - req: HttpRequest, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::adventofcode_description::dsl::*; - let conn = conn(pool)?; - let rows: Vec = adventofcode_description - .select((id, year, day, title)) - .load(&conn) - .map_err(ErrorNotFound)?; - AdventOfCodeIndexContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - rows, - ) - .render_wrapper() -} diff --git a/server/src/routes/find.rs b/server/src/routes/find.rs deleted file mode 100644 index 77e10fdd..00000000 --- a/server/src/routes/find.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; - -#[get("/find")] -pub async fn find( - req: HttpRequest, - data: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - FindContext::new(AppContext::new(data), session_data, req.path().to_string()).render_wrapper() -} diff --git a/server/src/routes/google_detail.rs b/server/src/routes/google_detail.rs deleted file mode 100644 index 0f8eecf9..00000000 --- a/server/src/routes/google_detail.rs +++ /dev/null @@ -1,37 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/google/{id}")] -async fn google_detail( - data: web::Data, - req: HttpRequest, - web::Path(id_): web::Path, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::google_problem::dsl::*; - let conn = conn(pool)?; - let item: GoogleProblem = google_problem - .find(id_) - .first(&conn) - .map_err(ErrorNotFound)?; - GoogleDetailContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - item, - ) - .render_wrapper() -} diff --git a/server/src/routes/google_index.rs b/server/src/routes/google_index.rs deleted file mode 100644 index 934252ec..00000000 --- a/server/src/routes/google_index.rs +++ /dev/null @@ -1,47 +0,0 @@ -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use crate::AppData; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/google")] -pub async fn google_index( - data: web::Data, - req: HttpRequest, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::google_problem::dsl::*; - let conn = conn(pool)?; - let all_rows: Vec = google_problem - .select((id, division, year, round, title)) - .load(&conn) - .map_err(ErrorNotFound)?; - let codejam_rows: Vec = all_rows - .iter() - .filter(|r| r.division == 1) - .cloned() - .collect(); - let kickstart_rows: Vec = all_rows - .iter() - .filter(|r| r.division == 2) - .cloned() - .collect(); - GoogleIndexContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - codejam_rows, - kickstart_rows, - ) - .render_wrapper() -} diff --git a/server/src/routes/home.rs b/server/src/routes/home.rs deleted file mode 100644 index 1013febe..00000000 --- a/server/src/routes/home.rs +++ /dev/null @@ -1,19 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; - -#[get("/")] -pub async fn home( - req: HttpRequest, - data: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - HomeContext::new(AppContext::new(data), session_data, req.path().to_string()).render_wrapper() -} diff --git a/server/src/routes/leetcode_detail.rs b/server/src/routes/leetcode_detail.rs deleted file mode 100644 index 358b4f26..00000000 --- a/server/src/routes/leetcode_detail.rs +++ /dev/null @@ -1,51 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/leetcode/{id}")] -async fn leetcode_detail( - data: web::Data, - req: HttpRequest, - web::Path(id_): web::Path, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::leetcode_description::dsl::*; - use schema::leetcode_question::dsl::*; - use schema::leetcode_solution::dsl::*; - let conn = conn(pool)?; - let description = leetcode_description - .find(id_) - .first(&conn) - .map_err(ErrorNotFound) - // remove after most descriptions are added. - .unwrap_or_else(|_| LeetcodeDescription::new(id_, "".to_string(), "".to_string())); - let question: LeetcodeQuestion = leetcode_question - .filter(rustgym_schema::schema::leetcode_question::dsl::id.eq(id_)) - .first(&conn) - .map_err(ErrorNotFound)?; - let solutions: Vec = leetcode_solution - .filter(question_id.eq(id_)) - .load(&conn) - .map_err(ErrorNotFound)?; - LeetcodeDetailContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - question, - description, - solutions, - ) - .render_wrapper() -} diff --git a/server/src/routes/leetcode_index.rs b/server/src/routes/leetcode_index.rs deleted file mode 100644 index c48e3288..00000000 --- a/server/src/routes/leetcode_index.rs +++ /dev/null @@ -1,61 +0,0 @@ -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use crate::AppData; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/leetcode")] -pub async fn leetcode_index( - data: web::Data, - req: HttpRequest, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::leetcode_description::dsl::*; - use schema::leetcode_question::dsl::*; - let conn = conn(pool)?; - let rows: Vec = leetcode_question - .select((schema::leetcode_question::dsl::id, title, level)) - .inner_join(leetcode_description) - .order(schema::leetcode_question::dsl::id) - .load(&conn) - .map_err(ErrorNotFound)?; - - let mut rows_easy = vec![]; - let mut rows_medium = vec![]; - let mut rows_hard = vec![]; - for row in rows { - match row.level { - 1 => { - rows_easy.push(row); - } - 2 => { - rows_medium.push(row); - } - 3 => { - rows_hard.push(row); - } - _ => { - panic!(); - } - } - } - LeetcodeIndexContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - rows_easy, - rows_medium, - rows_hard, - ) - .render_wrapper() -} diff --git a/server/src/routes/mod.rs b/server/src/routes/mod.rs deleted file mode 100644 index d01ac3f0..00000000 --- a/server/src/routes/mod.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub mod adventofcode_detail; -pub mod adventofcode_index; -pub mod find; -pub mod google_detail; -pub mod google_index; -pub mod home; -pub mod leetcode_detail; -pub mod leetcode_index; -pub mod nes_detail; -pub mod nes_index; -pub mod robots; -pub mod sitemap; diff --git a/server/src/routes/nes_detail.rs b/server/src/routes/nes_detail.rs deleted file mode 100644 index f84c038a..00000000 --- a/server/src/routes/nes_detail.rs +++ /dev/null @@ -1,33 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/nes/{id}")] -async fn nes_detail( - data: web::Data, - req: HttpRequest, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::nes_rom::dsl::*; - let conn = conn(pool)?; - let rom: NesRom = nes_rom.find(id).first(&conn).map_err(ErrorNotFound)?; - NesDetailContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - rom, - ) - .render_wrapper() -} diff --git a/server/src/routes/nes_index.rs b/server/src/routes/nes_index.rs deleted file mode 100644 index 4535870d..00000000 --- a/server/src/routes/nes_index.rs +++ /dev/null @@ -1,36 +0,0 @@ -use crate::app_data::AppData; -use crate::context::*; -use crate::db::*; -use crate::session_data::update_session; -use actix_session::Session; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpRequest; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::schema; - -#[get("/nes")] -pub async fn nes_index( - data: web::Data, - req: HttpRequest, - pool: web::Data, - session: Session, -) -> Result { - let session_data = update_session(session)?; - use schema::nes_rom::dsl::*; - let conn = conn(pool)?; - let rows: Vec = nes_rom - .select((id, title, description, image)) - .load(&conn) - .map_err(ErrorNotFound)?; - NesIndexContext::new( - AppContext::new(data), - session_data, - req.path().to_string(), - rows, - ) - .render_wrapper() -} diff --git a/server/src/routes/robots.rs b/server/src/routes/robots.rs deleted file mode 100644 index 4f16a936..00000000 --- a/server/src/routes/robots.rs +++ /dev/null @@ -1,9 +0,0 @@ -use crate::context::*; -use actix_web::get; -use actix_web::Error; -use actix_web::HttpResponse; - -#[get("/robots.txt")] -pub async fn robots_txt() -> Result { - RobotsContext::new().render_wrapper() -} diff --git a/server/src/routes/sitemap.rs b/server/src/routes/sitemap.rs deleted file mode 100644 index 9e5ef25c..00000000 --- a/server/src/routes/sitemap.rs +++ /dev/null @@ -1,23 +0,0 @@ -use crate::context::*; -use crate::db::*; -use actix_web::error::ErrorNotFound; -use actix_web::get; -use actix_web::web; -use actix_web::Error; -use actix_web::HttpResponse; -use diesel::prelude::*; -use rustgym_schema::*; - -#[get("/sitemap.txt")] -pub async fn sitemap_txt(pool: web::Data) -> Result { - use schema::adventofcode_description::dsl::*; - use schema::google_problem::dsl::*; - use schema::leetcode_description::dsl::*; - let conn = conn(pool)?; - let leetcode_rows = leetcode_description.load(&conn).map_err(ErrorNotFound)?; - let adventofcode_rows = adventofcode_description - .load(&conn) - .map_err(ErrorNotFound)?; - let google_rows = google_problem.load(&conn).map_err(ErrorNotFound)?; - SitemapContext::new(leetcode_rows, adventofcode_rows, google_rows).render_wrapper() -} diff --git a/server/src/session_data.rs b/server/src/session_data.rs deleted file mode 100644 index 157b7193..00000000 --- a/server/src/session_data.rs +++ /dev/null @@ -1,42 +0,0 @@ -use actix_session::Session; -use actix_web::Error; -use rand::thread_rng; -use rand::Rng; -use rustgym_characters::CHARACTERS; -use uuid::Uuid; - -#[derive(Debug)] -pub struct SessionData { - pub count: i32, - pub name: String, - pub uuid: Uuid, -} - -pub fn update_session(session: Session) -> Result { - let count = if let Some(count) = session.get::("count")? { - count + 1 - } else { - 1 - }; - session.set("count", count)?; - - let name = if let Some(name) = session.get::("name")? { - name - } else { - let n = CHARACTERS.len(); - let k = thread_rng().gen::(); - let name = CHARACTERS[k % n]; - name.to_string() - }; - session.set("name", name.to_string())?; - - let uuid = if let Some(uuid) = session.get::("uuid")? { - uuid - } else { - Uuid::new_v4() - }; - session.set("uuid", uuid)?; - - let session_data = SessionData { count, name, uuid }; - Ok(session_data) -} diff --git a/server/templates/adventofcode-detail.j2 b/server/templates/adventofcode-detail.j2 deleted file mode 100644 index d537a1c2..00000000 --- a/server/templates/adventofcode-detail.j2 +++ /dev/null @@ -1,53 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} AdventOfCode {{description.year}} Day {{description.day}} {{description.title}} Rust Solution -{% endblock %} - -{% block content %} -
-
-
-
{{description.title}}
-
- - - -
-
-
-
{{description.html|safe}}
-
- - - - - - - - - - - - -
-
-
- -
-
-
{{description.title}}
-
- - - -
-
-
-
{{solution.source}}
-
-
- -
-{% endblock %} - diff --git a/server/templates/adventofcode-index.j2 b/server/templates/adventofcode-index.j2 deleted file mode 100644 index 254d6800..00000000 --- a/server/templates/adventofcode-index.j2 +++ /dev/null @@ -1,47 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} AdventOfCode Rust Solutions -{% endblock %} - -{% block content %} -
-
-
-
AdventOfCode Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows %} - - - - - - {% endfor %} - -
YearDayAdventOfCode {{rows.len()}} Rust Solutions
- {{row.year}} - - {{row.day}} - - {{row.title}} -
-
-
-
-{% endblock %} - diff --git a/server/templates/desktop.j2 b/server/templates/desktop.j2 deleted file mode 100644 index 6f8b98e3..00000000 --- a/server/templates/desktop.j2 +++ /dev/null @@ -1,204 +0,0 @@ - - - - {% block title %}RUST GYM{% endblock %} - - - - - - - - - - {% block head %}{% endblock %} - - - - {% block content %}{% endblock %} - - - - - - - - diff --git a/server/templates/find.j2 b/server/templates/find.j2 deleted file mode 100644 index 4f096b44..00000000 --- a/server/templates/find.j2 +++ /dev/null @@ -1,48 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{ app.title }} Find -{% endblock %} - -{% block content %} -
-
-
-
Find
-
- - - -
-
-
- -
-
-
-{% endblock %} - -{% block script %} - await start_find(); -{% endblock %} \ No newline at end of file diff --git a/server/templates/google-detail.j2 b/server/templates/google-detail.j2 deleted file mode 100644 index 64476a8d..00000000 --- a/server/templates/google-detail.j2 +++ /dev/null @@ -1,72 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} Google {{item.division()}} Year {{item.year}} Round {{item.round}} {{item.title}} Rust Solution -{% endblock %} - -{% block content %} -
-
-
-
{{item.title}}
-
- - - -
-
-
-
{{item.problem|safe}}
-

Input

-
{{item.input}}
-

Output

-
{{item.output}}
-
- - - - - - - - - - - - -
-
-
- - {% if !item.analysis.is_empty() %} -
-
-
{{item.title}}
-
- - - -
-
-
- {{item.analysis|safe}} -
-
- {% endif %} - -
-
-
{{item.title}}
-
- - - -
-
-
-
{{item.solution}}
-
-
- -
-{% endblock %} diff --git a/server/templates/google-index.j2 b/server/templates/google-index.j2 deleted file mode 100644 index 99da6c23..00000000 --- a/server/templates/google-index.j2 +++ /dev/null @@ -1,83 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} Google Coding Competitions Rust Solutions -{% endblock %} - -{% block content %} -
-
-
-
CodeJam Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows_codejam %} - - - - - - {% endfor %} - -
YearRoundCodeJam {{rows_codejam.len()}} Rust Solutions
- {{row.year}} - - {{row.round}} - - {{row.title}} -
-
-
-
-
-
KickStart Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows_kickstart %} - - - - - - {% endfor %} - -
YearRoundKickStart {{rows_kickstart.len()}} Rust Solutions
- {{row.year}} - - {{row.round}} - - {{row.title}} -
-
-
-
-{% endblock %} - diff --git a/server/templates/home.j2 b/server/templates/home.j2 deleted file mode 100644 index a1db258e..00000000 --- a/server/templates/home.j2 +++ /dev/null @@ -1,35 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{ app.title }} Home -{% endblock %} - -{% block content %} -
-
- - - -
Leetcode Solutions
-
-
- - - -
Google Solutions
-
-
- - - -
AoC Solutions
-
-
- - - -
Nes Games
-
-
-{% endblock %} - diff --git a/server/templates/leetcode-detail.j2 b/server/templates/leetcode-detail.j2 deleted file mode 100644 index 7dd607da..00000000 --- a/server/templates/leetcode-detail.j2 +++ /dev/null @@ -1,54 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} Leetcode {{question.id}} {{question.title}} Rust Solution -{% endblock %} - -{% block content %} -
-
-
-
{{question.id}}. {{question.title}}
-
- - - -
-
-
-

{{description.html|safe}}

-
- - - - - - - - - - - - -
-
-
- -
-
-
{{question.id}}. {{question.title}}
-
- - - -
-
-
- {% for solution in solutions %} -
{{solution.source}}
- {% endfor %} -
-
- -
-{% endblock %} \ No newline at end of file diff --git a/server/templates/leetcode-index.j2 b/server/templates/leetcode-index.j2 deleted file mode 100644 index 18da38f2..00000000 --- a/server/templates/leetcode-index.j2 +++ /dev/null @@ -1,123 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} -{{app.title}} Leetcode Rust Solutions -{% endblock %} - - -{% block content %} -
- -
-
-
Leetcode Easy Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows_easy %} - - - - - - {% endfor %} - -
idLeetcode {{rows_easy.len()}} Easy SolutionsLevel
- {{row.id}} - - {{row.title}} - - {{row.level_str()}} -
-
-
- -
-
-
Leetcode Medium Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows_medium %} - - - - - - {% endfor %} - -
idLeetcode {{rows_medium.len()}} Medium SolutionsLevel
- {{row.id}} - - {{row.title}} - - {{row.level_str()}} -
-
-
- -
-
-
Leetcode Hard Solutions
-
- - - -
-
-
- - - - - - - - - - {% for row in rows_hard %} - - - - - - {% endfor %} - -
idLeetcode {{rows_hard.len()}} Hard SolutionsLevel
- {{row.id}} - - {{row.title}} - - {{row.level_str()}} -
-
-
- -
-{% endblock %} diff --git a/server/templates/nes-detail.j2 b/server/templates/nes-detail.j2 deleted file mode 100644 index be0047fc..00000000 --- a/server/templates/nes-detail.j2 +++ /dev/null @@ -1,38 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} Nes Emulator {{rom.title}} -{% endblock %} - - -{% block content %} -
-
-
-
{{rom.title}}
-
- - - -
-
-
- - -
-
-

FPS: 60

-
-
-
- -{% endblock %} - -{% block script %} - await start_nes("{{rom.filename}}", "{{rom.md5}}"); -{% endblock %} \ No newline at end of file diff --git a/server/templates/nes-index.j2 b/server/templates/nes-index.j2 deleted file mode 100644 index 026264bf..00000000 --- a/server/templates/nes-index.j2 +++ /dev/null @@ -1,36 +0,0 @@ -{% extends "desktop.j2" %} - -{% block title %} - {{app.title}} Nes Games -{% endblock %} - - -{% block content %} -
-
-
-
Nes Games
-
- - - -
-
-
- {% for row in rows %} -
-
- - {{row.title}} - -
-
-

{{ row.title }}

-
{{ row.description }}
-
-
- {% endfor %} -
-
-
-{% endblock %} diff --git a/server/templates/robots.j2 b/server/templates/robots.j2 deleted file mode 100644 index e4c64493..00000000 --- a/server/templates/robots.j2 +++ /dev/null @@ -1,4 +0,0 @@ -User-agent: * -Allow: / - -Sitemap: https://rustgym.com/sitemap.txt diff --git a/server/templates/sitemap.j2 b/server/templates/sitemap.j2 deleted file mode 100644 index 0bd5b16b..00000000 --- a/server/templates/sitemap.j2 +++ /dev/null @@ -1,13 +0,0 @@ -https://rustgym.com -https://rustgym.com/leetcode -{%- for row in leetcode_rows %} -https://rustgym.com/leetcode/{{row.id}} -{%- endfor %} -https://rustgym.com/adventofcode -{%- for row in adventofcode_rows %} -https://rustgym.com{{row.href()|safe}} -{%- endfor %} -https://rustgym.com/google -{%- for row in google_rows %} -https://rustgym.com{{row.href()|safe}} -{%- endfor %} diff --git a/static/css/98.css b/static/css/98.css deleted file mode 100644 index ef550d3d..00000000 --- a/static/css/98.css +++ /dev/null @@ -1,696 +0,0 @@ -/*! 98.css v0.1.17 - https://github.com/jdan/98.css */ - -@font-face { - font-family: "Pixelated MS Sans Serif"; - src: url(ms_sans_serif.woff) format("woff"); - src: url(ms_sans_serif.woff2) format("woff2"); - font-weight: 400; - font-style: normal -} - -@font-face { - font-family: "Pixelated MS Sans Serif"; - src: url(ms_sans_serif_bold.woff) format("woff"); - src: url(ms_sans_serif_bold.woff2) format("woff2"); - font-weight: 700; - font-style: normal -} - -body { - font-family: Arial; - font-size: 12px; - color: #222 -} - -.title-bar, -.window, -button, -input, -label, -option, -select, -textarea, -ul.tree-view { - font-family: "Pixelated MS Sans Serif", Arial; - -webkit-font-smoothing: none; - font-size: 11px -} - -h1 { - font-size: 5rem -} - -h2 { - font-size: 2.5rem -} - -h3 { - font-size: 2rem -} - -h4 { - font-size: 1.5rem -} - -u { - text-decoration: none; - border-bottom: .5px solid #222 -} - -button { - box-sizing: border-box; - border: none; - border-radius: 0; - min-width: 75px; - min-height: 23px; - padding: 0 12px -} - -.vertical-bar, -button { - background: silver; - box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf -} - -.vertical-bar { - width: 4px; - height: 20px -} - -button:not(:disabled):active { - box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey; - padding: 2px 11px 0 13px -} - -@media (not(hover)) { - button:not(:disabled):hover { - box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px grey - } -} - -button:focus { - outline: 1px dotted #000; - outline-offset: -4px -} - -button::-moz-focus-inner { - border: 0 -} - -:disabled, -:disabled+label { - color: grey -} - -:disabled+label, -button:disabled { - text-shadow: 1px 1px 0 #fff -} - -.window { - box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px grey, inset 2px 2px #fff; - background: silver; - padding: 3px -} - -.title-bar { - background: linear-gradient(90deg, navy, #1084d0); - padding: 3px 2px 3px 3px; - display: flex; - justify-content: space-between; - align-items: center -} - -.title-bar.inactive { - background: linear-gradient(90deg, grey, #b5b5b5) -} - -.title-bar-text { - font-weight: 700; - color: #fff; - letter-spacing: 0; - margin-right: 24px -} - -.title-bar-controls { - display: flex -} - -.title-bar-controls button { - padding: 0; - display: block; - min-width: 16px; - min-height: 14px -} - -.title-bar-controls button:active { - padding: 0 -} - -.title-bar-controls button:focus { - outline: none -} - -.title-bar-controls button[aria-label=Minimize] { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='6' height='2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M0 0h6v2H0z'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: bottom 3px left 4px -} - -.title-bar-controls button[aria-label=Maximize] { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='9' height='9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 0H0v9h9V0zM8 2H1v6h7V2z' fill='%23000'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: top 2px left 3px -} - -.title-bar-controls button[aria-label=Restore] { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M2 0h6v2H2zM7 2h1v4H7zM2 2h1v1H2zM6 5h1v1H6zM0 3h6v2H0zM5 5h1v4H5zM0 5h1v4H0zM1 8h4v1H1z'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: top 2px left 3px -} - -.title-bar-controls button[aria-label=Help] { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='6' height='9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' d='M0 1h2v2H0zM1 0h4v1H1zM4 1h2v2H4zM3 3h2v1H3zM2 4h2v2H2zM2 7h2v2H2z'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: top 2px left 5px -} - -.title-bar-controls button[aria-label=Close] { - margin-left: 2px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='8' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0h2v1h1v1h2V1h1V0h2v1H7v1H6v1H5v1h1v1h1v1h1v1H6V6H5V5H3v1H2v1H0V6h1V5h1V4h1V3H2V2H1V1H0V0z' fill='%23000'/%3E%3C/svg%3E"); - background-repeat: no-repeat; - background-position: top 3px left 4px -} - -.status-bar { - margin: 0 1px; - display: flex; - gap: 1px -} - -.status-bar-field { - box-shadow: inset -1px -1px #dfdfdf, inset 1px 1px grey; - flex-grow: 1; - padding: 2px 3px; - margin: 0 -} - -.window-body { - margin: 8px -} - -fieldset { - border: none; - box-shadow: inset -1px -1px #fff, inset -2px 1px grey, inset 1px -2px grey, inset 2px 2px #fff; - padding: 10px; - padding-block-start: 8px; - margin: 0 -} - -legend { - background: silver -} - -.field-row { - display: flex; - align-items: center -} - -[class^=field-row]+[class^=field-row] { - margin-top: 6px -} - -.field-row>*+* { - margin-left: 6px -} - -.field-row-stacked { - display: flex; - flex-direction: column -} - -.field-row-stacked *+* { - margin-top: 6px -} - -label { - display: inline-flex; - align-items: center -} - -input[type=checkbox], -input[type=radio] { - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - margin: 0; - background: 0; - position: fixed; - opacity: 0; - border: none -} - -input[type=checkbox]+label, -input[type=radio]+label { - line-height: 13px -} - -input[type=radio]+label { - position: relative; - margin-left: 18px -} - -input[type=radio]+label:before { - content: ""; - position: absolute; - top: 0; - left: -18px; - display: inline-block; - width: 12px; - height: 12px; - margin-right: 6px; - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0H4v1H2v1H1v2H0v4h1v2h1V8H1V4h1V2h2V1h4v1h2V1H8V0z' fill='gray'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 1H4v1H2v2H1v4h1v1h1V8H2V4h1V3h1V2h4v1h2V2H8V1z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 3h1v1H9V3zm1 5V4h1v4h-1zm-2 2V9h1V8h1v2H8zm-4 0v1h4v-1H4zm0 0V9H2v1h2z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2h-1v2h1v4h-1v2H8v1H4v-1H2v1h2v1h4v-1h2v-1h1V8h1V4h-1V2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2h4v1h1v1h1v4H9v1H8v1H4V9H3V8H2V4h1V3h1V2z' fill='%23fff'/%3E%3C/svg%3E") -} - -input[type=radio]:active+label:before { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0H4v1H2v1H1v2H0v4h1v2h1V8H1V4h1V2h2V1h4v1h2V1H8V0z' fill='gray'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 1H4v1H2v2H1v4h1v1h1V8H2V4h1V3h1V2h4v1h2V2H8V1z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 3h1v1H9V3zm1 5V4h1v4h-1zm-2 2V9h1V8h1v2H8zm-4 0v1h4v-1H4zm0 0V9H2v1h2z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2h-1v2h1v4h-1v2H8v1H4v-1H2v1h2v1h4v-1h2v-1h1V8h1V4h-1V2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2h4v1h1v1h1v4H9v1H8v1H4V9H3V8H2V4h1V3h1V2z' fill='silver'/%3E%3C/svg%3E") -} - -input[type=radio]:checked+label:after { - content: ""; - display: block; - width: 4px; - height: 4px; - top: 4px; - left: -14px; - position: absolute; - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 0H1v1H0v2h1v1h2V3h1V1H3V0z' fill='%23000'/%3E%3C/svg%3E") -} - -input[type=checkbox]:focus+label, -input[type=radio]:focus+label { - outline: 1px dotted #000 -} - -input[type=radio][disabled]+label:before { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='12' height='12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 0H4v1H2v1H1v2H0v4h1v2h1V8H1V4h1V2h2V1h4v1h2V1H8V0z' fill='gray'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 1H4v1H2v2H1v4h1v1h1V8H2V4h1V3h1V2h4v1h2V2H8V1z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 3h1v1H9V3zm1 5V4h1v4h-1zm-2 2V9h1V8h1v2H8zm-4 0v1h4v-1H4zm0 0V9H2v1h2z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 2h-1v2h1v4h-1v2H8v1H4v-1H2v1h2v1h4v-1h2v-1h1V8h1V4h-1V2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 2h4v1h1v1h1v4H9v1H8v1H4V9H3V8H2V4h1V3h1V2z' fill='silver'/%3E%3C/svg%3E") -} - -input[type=radio][disabled]:checked+label:after { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='4' height='4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M3 0H1v1H0v2h1v1h2V3h1V1H3V0z' fill='gray'/%3E%3C/svg%3E") -} - -input[type=checkbox]+label { - position: relative; - margin-left: 19px -} - -input[type=checkbox]+label:before { - content: ""; - position: absolute; - left: -19px; - display: inline-block; - width: 13px; - height: 13px; - background: #fff; - box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; - margin-right: 6px -} - -input[type=checkbox]:active+label:before { - background: silver -} - -input[type=checkbox]:checked+label:after { - content: ""; - display: block; - width: 7px; - height: 7px; - position: absolute; - top: 3px; - left: -16px; - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 0H6v1H5v1H4v1H3v1H2V3H1V2H0v3h1v1h1v1h1V6h1V5h1V4h1V3h1V0z' fill='%23000'/%3E%3C/svg%3E") -} - -input[type=checkbox][disabled]+label:before { - background: silver -} - -input[type=checkbox][disabled]:checked+label:after { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='7' height='7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 0H6v1H5v1H4v1H3v1H2V3H1V2H0v3h1v1h1v1h1V6h1V5h1V4h1V3h1V0z' fill='gray'/%3E%3C/svg%3E") -} - -input[type=email], -input[type=password], -input[type=text] { - border: none; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - border-radius: 0 -} - -input[type=email], -input[type=password], -input[type=text], -select { - padding: 3px 4px; - box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; - background-color: #fff; - box-sizing: border-box -} - -select, -textarea { - border: none -} - -textarea { - padding: 3px 4px; - box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; - background-color: #fff; - box-sizing: border-box; - -webkit-appearance: none; - -moz-appearance: none; - appearance: none; - border-radius: 0 -} - -input[type=email], -input[type=password], -input[type=text], -select { - height: 21px -} - -input[type=email], -input[type=password], -input[type=text] { - line-height: 2 -} - -input[type=email]:disabled, -input[type=password]:disabled, -input[type=text]:disabled, -textarea:disabled { - background-color: silver -} - -select { - appearance: none; - -webkit-appearance: none; - -moz-appearance: none; - position: relative; - padding-right: 32px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4v1h1v1h1v1h1v1h1V9h1V8h1V7h1V6z' fill='%23000'/%3E%3C/svg%3E"); - background-position: top 2px right 2px; - background-repeat: no-repeat; - border-radius: 0 -} - -input[type=email]:focus, -input[type=password]:focus, -input[type=text]:focus, -select:focus, -textarea:focus { - outline: none -} - -input[type=range] { - -webkit-appearance: none; - width: 100%; - background: transparent -} - -input[type=range]:focus { - outline: none -} - -input[type=range]::-webkit-slider-thumb { - -webkit-appearance: none; - height: 21px; - width: 11px; - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0v16h2v2h2v2h1v-1H3v-2H1V1h9V0z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 1v15h1v1h1v1h1v1h2v-1h1v-1h1v-1h1V1z' fill='%23C0C7C8'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 1h1v15H8v2H6v2H5v-1h2v-2h2z' fill='%2387888F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 0h1v16H9v2H7v2H5v1h1v-2h2v-2h2z' fill='%23000'/%3E%3C/svg%3E"); - transform: translateY(-8px) -} - -input[type=range].has-box-indicator::-webkit-slider-thumb { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0v20h1V1h9V0z' fill='%23fff'/%3E%3Cpath fill='%23C0C7C8' d='M1 1h8v18H1z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 1h1v19H1v-1h8z' fill='%2387888F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 0h1v21H0v-1h10z' fill='%23000'/%3E%3C/svg%3E"); - transform: translateY(-10px) -} - -input[type=range]::-moz-range-thumb { - height: 21px; - width: 11px; - border: 0; - border-radius: 0; - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0v16h2v2h2v2h1v-1H3v-2H1V1h9V0z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 1v15h1v1h1v1h1v1h2v-1h1v-1h1v-1h1V1z' fill='%23C0C7C8'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 1h1v15H8v2H6v2H5v-1h2v-2h2z' fill='%2387888F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 0h1v16H9v2H7v2H5v1h1v-2h2v-2h2z' fill='%23000'/%3E%3C/svg%3E"); - transform: translateY(2px) -} - -input[type=range].has-box-indicator::-moz-range-thumb { - background: url("data:image/svg+xml;charset=utf-8,%3Csvg width='11' height='21' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0v20h1V1h9V0z' fill='%23fff'/%3E%3Cpath fill='%23C0C7C8' d='M1 1h8v18H1z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 1h1v19H1v-1h8z' fill='%2387888F'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M10 0h1v21H0v-1h10z' fill='%23000'/%3E%3C/svg%3E"); - transform: translateY(0) -} - -input[type=range]::-webkit-slider-runnable-track { - width: 100%; - height: 2px; - box-sizing: border-box; - background: #000; - border-right: 1px solid grey; - border-bottom: 1px solid grey; - box-shadow: 1px 0 0 #fff, 1px 1px 0 #fff, 0 1px 0 #fff, -1px 0 0 #a9a9a9, -1px -1px 0 #a9a9a9, 0 -1px 0 #a9a9a9, -1px 1px 0 #fff, 1px -1px #a9a9a9 -} - -input[type=range]::-moz-range-track { - width: 100%; - height: 2px; - box-sizing: border-box; - background: #000; - border-right: 1px solid grey; - border-bottom: 1px solid grey; - box-shadow: 1px 0 0 #fff, 1px 1px 0 #fff, 0 1px 0 #fff, -1px 0 0 #a9a9a9, -1px -1px 0 #a9a9a9, 0 -1px 0 #a9a9a9, -1px 1px 0 #fff, 1px -1px #a9a9a9 -} - -.is-vertical { - display: inline-block; - width: 4px; - height: 150px; - transform: translateY(50%) -} - -.is-vertical>input[type=range] { - width: 150px; - height: 4px; - margin: 0 16px 0 10px; - transform-origin: left; - transform: rotate(270deg) translateX(calc(-50% + 8px)) -} - -.is-vertical>input[type=range]::-webkit-slider-runnable-track { - border-left: 1px solid grey; - border-right: 0; - border-bottom: 1px solid grey; - box-shadow: -1px 0 0 #fff, -1px 1px 0 #fff, 0 1px 0 #fff, 1px 0 0 #a9a9a9, 1px -1px 0 #a9a9a9, 0 -1px 0 #a9a9a9, 1px 1px 0 #fff, -1px -1px #a9a9a9 -} - -.is-vertical>input[type=range]::-moz-range-track { - border-left: 1px solid grey; - border-right: 0; - border-bottom: 1px solid grey; - box-shadow: -1px 0 0 #fff, -1px 1px 0 #fff, 0 1px 0 #fff, 1px 0 0 #a9a9a9, 1px -1px 0 #a9a9a9, 0 -1px 0 #a9a9a9, 1px 1px 0 #fff, -1px -1px #a9a9a9 -} - -.is-vertical>input[type=range]::-webkit-slider-thumb { - transform: translateY(-8px) scaleX(-1) -} - -.is-vertical>input[type=range].has-box-indicator::-webkit-slider-thumb { - transform: translateY(-10px) scaleX(-1) -} - -.is-vertical>input[type=range]::-moz-range-thumb { - transform: translateY(2px) scaleX(-1) -} - -.is-vertical>input[type=range].has-box-indicator::-moz-range-thumb { - transform: translateY(0) scaleX(-1) -} - -select:focus { - color: #fff; - background-color: navy -} - -select:focus option { - color: #000; - background-color: #fff -} - -select:active { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M0 0h16v17H0V0zm1 16h14V1H1v15z' fill='gray'/%3E%3Cpath fill='silver' d='M1 1h14v15H1z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M12 7H5v1h1v1h1v1h1v1h1v-1h1V9h1V8h1V7z' fill='%23000'/%3E%3C/svg%3E") -} - -a { - color: #00f -} - -a:focus { - outline: 1px dotted #00f -} - -ul.tree-view { - display: block; - background: #fff; - box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; - padding: 6px; - margin: 0 -} - -ul.tree-view li { - list-style-type: none -} - -ul.tree-view a { - text-decoration: none; - color: #000 -} - -ul.tree-view a:focus { - background-color: navy; - color: #fff -} - -ul.tree-view li, -ul.tree-view ul { - margin-top: 3px -} - -ul.tree-view ul { - margin-left: 16px; - padding-left: 16px; - border-left: 1px dotted grey -} - -ul.tree-view ul>li { - position: relative -} - -ul.tree-view ul>li:before { - content: ""; - display: block; - position: absolute; - left: -16px; - top: 6px; - width: 12px; - border-bottom: 1px dotted grey -} - -ul.tree-view ul>li:last-child:after { - content: ""; - display: block; - position: absolute; - left: -20px; - top: 7px; - bottom: 0; - width: 8px; - background: #fff -} - -ul.tree-view details { - margin-top: 0 -} - -ul.tree-view details[open] summary { - margin-bottom: 0 -} - -ul.tree-view ul details>summary:before { - margin-left: -22px; - position: relative; - z-index: 1 -} - -ul.tree-view details>summary:before { - text-align: center; - display: block; - float: left; - content: "+"; - border: 1px solid grey; - width: 8px; - height: 9px; - line-height: 8px; - margin-right: 5px; - padding-left: 1px; - background-color: #fff -} - -ul.tree-view details[open]>summary:before { - content: "-" -} - -pre { - display: block; - background: #fff; - box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; - padding: 12px 8px; - margin: 0 -} - -code, -code * { - font-family: monospace -} - -summary:focus { - outline: 1px dotted #000 -} - -::-webkit-scrollbar { - width: 16px -} - -::-webkit-scrollbar:horizontal { - height: 17px -} - -::-webkit-scrollbar-corner { - background: #dfdfdf -} - -::-webkit-scrollbar-track { - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='2' height='2' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1 0H0v1h1v1h1V1H1V0z' fill='silver'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 0H1v1H0v1h1V1h1V0z' fill='%23fff'/%3E%3C/svg%3E") -} - -::-webkit-scrollbar-thumb { - background-color: #dfdfdf; - box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px grey, inset 2px 2px #dfdfdf -} - -::-webkit-scrollbar-button:horizontal:end:increment, -::-webkit-scrollbar-button:horizontal:start:decrement, -::-webkit-scrollbar-button:vertical:end:increment, -::-webkit-scrollbar-button:vertical:start:decrement { - display: block -} - -::-webkit-scrollbar-button:vertical:start { - height: 17px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M8 6H7v1H6v1H5v1H4v1h7V9h-1V8H9V7H8V6z' fill='%23000'/%3E%3C/svg%3E") -} - -::-webkit-scrollbar-button:vertical:end { - height: 17px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M11 6H4v1h1v1h1v1h1v1h1V9h1V8h1V7h1V6z' fill='%23000'/%3E%3C/svg%3E") -} - -::-webkit-scrollbar-button:horizontal:start { - width: 16px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M9 4H8v1H7v1H6v1H5v1h1v1h1v1h1v1h1V4z' fill='%23000'/%3E%3C/svg%3E") -} - -::-webkit-scrollbar-button:horizontal:end { - width: 16px; - background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='17' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 0H0v16h1V1h14V0z' fill='%23DFDFDF'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2 1H1v14h1V2h12V1H2z' fill='%23fff'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M16 17H0v-1h15V0h1v17z' fill='%23000'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M15 1h-1v14H1v1h14V1z' fill='gray'/%3E%3Cpath fill='silver' d='M2 2h12v13H2z'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M7 4H6v7h1v-1h1V9h1V8h1V7H9V6H8V5H7V4z' fill='%23000'/%3E%3C/svg%3E") -} diff --git a/static/css/desktop.css b/static/css/desktop.css deleted file mode 100644 index ea7ba834..00000000 --- a/static/css/desktop.css +++ /dev/null @@ -1,329 +0,0 @@ -:root { - --surface: #c0c0c0; - --button-highlight: #ffffff; - --button-face: #dfdfdf; - --button-shadow: #808080; - --window-frame: #0a0a0a; - --dialog-blue: #000080; - --dialog-blue-light: #1084d0; - --dialog-gray: #808080; - --dialog-gray-light: #b5b5b5; - --link-blue: #0000ff; -} - -body { - margin: 0; - padding: 0; - background-color: #008080; -} - -.hidden { - display: none; -} - -.component { - display: flex; - margin: 36px; - align-items: flex-start; -} - -.component .window { - margin: 10px; -} - -.rom-body { - display: flex; - width: 800px; -} - -.rom-image { - margin: 10px; - flex: 0 0 200px; -} - -.rom-image a img { - width: 200px; -} - -.rom-detail { - margin: 10px; - flex: 1 0 300px; -} - - -.taskbar { - outline: 1px solid var(--surface); - border-top: 1px solid var(--button-highlight); - background: var(--surface); - color: var(--window-frame); - position: fixed; - z-index: 2; - bottom: 0; - left: 0; - right: 0; - height: 27px; - display: flex; - flex: 1; -} - -.taskbar button { - line-height: 14px; - display: flex; - align-items: center; - padding: 10px; -} - - -.taskbar button img { - height: 20px; -} - -.taskbar button span { - font-size: 1.5em; - font-weight: bold; -} - -.win98 { - position: fixed; - left: 0px; - bottom: 30px; - width: 400px; -} - -.win98 .menu { - background: #bfbfbf; - border: 1px solid; - border-top-color: #dfdfdf; - border-left-color: #dfdfdf; - border-right-color: gray; - border-bottom-color: gray; - box-shadow: 1px 1px 0 0 #000; - zoom: 1; - width: 195px; - font-size: 13px; - padding: 1px; - position: relative; -} - -.win98 .menu:before, -.win98 .menu:after { - content: ""; - display: table; -} - -.win98 .menu:after { - clear: both; -} - -.win98 .menu>.menu-content { - float: right; -} - -.win98 .menu .menu-sidebar { - background: -webkit-linear-gradient(top, #000080, #1084d0); - background: linear-gradient(to bottom, #000080, #1084d0); - position: absolute; - width: 25px; - height: 100%; -} - -.win98 .menu .menu-sidebar .headline { - -webkit-transform: rotate(270deg); - -ms-transform: rotate(270deg); - transform: rotate(270deg); - position: absolute; - bottom: 40px; - left: -32px; - width: 100px; - height: 30px; - font-size: 16px; - color: #fff; -} - -.win98 .menu .menu-content { - margin: 0; - padding: 0; - border: 0; - outline: 0; - color: #000; - list-style: none; - margin: 2px 0; - width: 170px; -} - -.win98 .menu .menu-content .divider { - margin: 7px 6px; - border-top: 1px solid gray; - border-bottom: 1px solid #dfdfdf; -} - -.win98 .menu .menu-content .item { - cursor: pointer; - padding: 10px; -} - -.win98 .menu .menu-content .item:hover { - color: #fff; - background: navy; -} - -.win98 .menu .menu-content .item.folder { - position: relative; -} - -.win98 .menu .menu-content .item.folder:after { - content: '\25B6'; - float: right; - font-size: 10px; -} - -.win98 .menu .menu-content .item .icon { - float: left; - margin-right: 7px; - margin-top: -4px; -} - -.win98 .menu .menu-content .item:hover .menu-content, -.win98 .menu .menu-content .item:focus .menu-content { - display: block; -} - -.win98 .menu .menu-content .menu-content { - background: #bfbfbf; - border: 1px solid; - border-top-color: #dfdfdf; - border-left-color: #dfdfdf; - border-right-color: gray; - border-bottom-color: gray; - box-shadow: 1px 1px 0 0 #000; - display: none; - position: absolute; - left: 165px; - top: -4px; -} - -.win98 .menu .menu-content .menu-content .item { - padding: 3px 10px; -} - -.win98 .menu .menu-content .menu-content .icon { - width: 18px; - height: 18px; - margin-top: -2px; -} - -.taskbar-divider { - border-left: 1px solid var(--button-shadow); - border-right: 1px solid var(--button-highlight); -} - -.taskbar-time { - font-size: 12px; -} - -.taskbar button, -.taskbar-divider, -.tray { - border-style: solid; - border-width: 1px; - border-color: var(--button-shadow) var(--button-highlight) var(--button-highlight) var(--button-shadow); - margin: 2px; -} - -.taskbar-divider { - margin-right: 0px; - margin-left: 0px; -} - -.tray { - display: flex; - flex-direction: row; - /* align-items: center; */ - /* align-content: center; */ - /* justify-content: center; */ - line-height: 22px; - box-sizing: border-box; - vertical-align: middle; -} - -.tray-icons { - display: flex; - align-items: center; - margin-left: 2px; -} - -.tray-icon { - height: 20px; - margin-left: 1px; -} - -.taskbar-time { - width: 60px; - text-align: center; -} - -.tasks { - display: flex; - flex: 1; - height: 100%; - min-width: 0; -} - -.task { - max-width: 200px; - width: 50%; - text-align: left; -} - -.task img { - padding-right: 4px; - flex: 0 0 auto; -} - -.remote-videos { - position: fixed; - bottom: 0px; - right: 0px; - flex-direction: row-reverse; -} - -.apps { - display: flex; - flex-direction: column; -} - -.app { - padding: 10px; - display: flex; - align-items: center; - flex-direction: column; - width: 80px; - height: 80px; -} - -.app a { - margin: 10px; - width: 32px; -} - -.app div { - text-align: center; - color: white; -} - -.searchbar { - display: flex; - flex-direction: column; - min-width: 400px; -} - -.search-row:hover { - color: #fff; - background: navy; - cursor: pointer; -} - -.video { - width: 336px; - height: 274px; -} \ No newline at end of file diff --git a/static/css/ms_sans_serif.woff2 b/static/css/ms_sans_serif.woff2 deleted file mode 100644 index 83ea8060..00000000 Binary files a/static/css/ms_sans_serif.woff2 and /dev/null differ diff --git a/static/css/ms_sans_serif_bold.woff2 b/static/css/ms_sans_serif_bold.woff2 deleted file mode 100644 index 610c0911..00000000 Binary files a/static/css/ms_sans_serif_bold.woff2 and /dev/null differ diff --git a/static/css/vs.css b/static/css/vs.css deleted file mode 100644 index a1ed6da8..00000000 --- a/static/css/vs.css +++ /dev/null @@ -1,65 +0,0 @@ -/* - -Visual Studio-like style based on original C# coloring by Jason Diamond - -*/ -.hljs { - background: white; - color: black; -} - -.hljs-comment, -.hljs-quote, -.hljs-variable { - color: #008000; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-built_in, -.hljs-name, -.hljs-tag { - color: #00f; -} - -.hljs-string, -.hljs-title, -.hljs-section, -.hljs-attribute, -.hljs-literal, -.hljs-template-tag, -.hljs-template-variable, -.hljs-type, -.hljs-addition { - color: #a31515; -} - -.hljs-deletion, -.hljs-selector-attr, -.hljs-selector-pseudo, -.hljs-meta { - color: #2b91af; -} - -.hljs-doctag { - color: #808080; -} - -.hljs-attr { - color: #f00; -} - -.hljs-symbol, -.hljs-bullet, -.hljs-link { - color: #00b0e8; -} - - -.hljs-emphasis { - font-style: italic; -} - -.hljs-strong { - font-weight: bold; -} diff --git a/static/gif/documents.gif b/static/gif/documents.gif deleted file mode 100644 index 9f95c686..00000000 Binary files a/static/gif/documents.gif and /dev/null differ diff --git a/static/gif/exe.gif b/static/gif/exe.gif deleted file mode 100644 index 561edeef..00000000 Binary files a/static/gif/exe.gif and /dev/null differ diff --git a/static/gif/favourites.gif b/static/gif/favourites.gif deleted file mode 100644 index f888430b..00000000 Binary files a/static/gif/favourites.gif and /dev/null differ diff --git a/static/gif/find.gif b/static/gif/find.gif deleted file mode 100644 index 2e70697e..00000000 Binary files a/static/gif/find.gif and /dev/null differ diff --git a/static/gif/help.gif b/static/gif/help.gif deleted file mode 100644 index 26b95f6f..00000000 Binary files a/static/gif/help.gif and /dev/null differ diff --git a/static/gif/logoff.gif b/static/gif/logoff.gif deleted file mode 100644 index 7b75c2ec..00000000 Binary files a/static/gif/logoff.gif and /dev/null differ diff --git a/static/gif/programs.gif b/static/gif/programs.gif deleted file mode 100644 index 8874736f..00000000 Binary files a/static/gif/programs.gif and /dev/null differ diff --git a/static/gif/run.gif b/static/gif/run.gif deleted file mode 100644 index 226cb01a..00000000 Binary files a/static/gif/run.gif and /dev/null differ diff --git a/static/gif/settings.gif b/static/gif/settings.gif deleted file mode 100644 index 1a9956b4..00000000 Binary files a/static/gif/settings.gif and /dev/null differ diff --git a/static/gif/shutdown.gif b/static/gif/shutdown.gif deleted file mode 100644 index fd9ecfdb..00000000 Binary files a/static/gif/shutdown.gif and /dev/null differ diff --git a/static/gif/txt.gif b/static/gif/txt.gif deleted file mode 100644 index 7c0ad1d5..00000000 Binary files a/static/gif/txt.gif and /dev/null differ diff --git a/static/highlight.min.js b/static/highlight.min.js deleted file mode 100644 index 4e060cf3..00000000 --- a/static/highlight.min.js +++ /dev/null @@ -1,1190 +0,0 @@ -/* - Highlight.js 10.4.1 (e96b915a) - License: BSD-3-Clause - Copyright (c) 2006-2020, Ivan Sagalaev -*/ -var hljs=function(){"use strict";function e(t){ -return t instanceof Map?t.clear=t.delete=t.set=()=>{ -throw Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=()=>{ -throw Error("set is read-only") -}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach((n=>{var s=t[n] -;"object"!=typeof s||Object.isFrozen(s)||e(s)})),t}var t=e,n=e;t.default=n -;class s{constructor(e){void 0===e.data&&(e.data={}),this.data=e.data} -ignoreMatch(){this.ignore=!0}}function r(e){ -return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'") -}function a(e,...t){const n=Object.create(null);for(const t in e)n[t]=e[t] -;return t.forEach((e=>{for(const t in e)n[t]=e[t]})),n}function i(e){ -return e.nodeName.toLowerCase()}var o=Object.freeze({__proto__:null, -escapeHTML:r,inherit:a,nodeStream:e=>{const t=[];return function e(n,s){ -for(let r=n.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(t.push({ -event:"start",offset:s,node:r}),s=e(r,s),i(r).match(/br|hr|img|input/)||t.push({ -event:"stop",offset:s,node:r}));return s}(e,0),t},mergeStreams:(e,t,n)=>{ -let s=0,a="";const o=[];function l(){ -return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset" "+e.nodeName+'="'+r(e.value)+'"')).join("")+">" -}function u(e){a+=""}function g(e){("start"===e.event?c:u)(e.node)} -for(;e.length||t.length;){let t=l() -;if(a+=r(n.substring(s,t[0].offset)),s=t[0].offset,t===e){o.reverse().forEach(u) -;do{g(t.splice(0,1)[0]),t=l()}while(t===e&&t.length&&t[0].offset===s) -;o.reverse().forEach(c) -}else"start"===t[0].event?o.push(t[0].node):o.pop(),g(t.splice(0,1)[0])} -return a+r(n.substr(s))}});const l=e=>!!e.kind;class c{constructor(e,t){ -this.buffer="",this.classPrefix=t.classPrefix,e.walk(this)}addText(e){ -this.buffer+=r(e)}openNode(e){if(!l(e))return;let t=e.kind -;e.sublanguage||(t=`${this.classPrefix}${t}`),this.span(t)}closeNode(e){ -l(e)&&(this.buffer+="")}value(){return this.buffer}span(e){ -this.buffer+=``}}class u{constructor(){this.rootNode={ -children:[]},this.stack=[this.rootNode]}get top(){ -return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){ -this.top.children.push(e)}openNode(e){const t={kind:e,children:[]} -;this.add(t),this.stack.push(t)}closeNode(){ -if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){ -for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)} -walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){ -return"string"==typeof t?e.addText(t):t.children&&(e.openNode(t), -t.children.forEach((t=>this._walk(e,t))),e.closeNode(t)),e}static _collapse(e){ -"string"!=typeof e&&e.children&&(e.children.every((e=>"string"==typeof e))?e.children=[e.children.join("")]:e.children.forEach((e=>{ -u._collapse(e)})))}}class g extends u{constructor(e){super(),this.options=e} -addKeyword(e,t){""!==e&&(this.openNode(t),this.addText(e),this.closeNode())} -addText(e){""!==e&&this.add(e)}addSublanguage(e,t){const n=e.root -;n.kind=t,n.sublanguage=!0,this.add(n)}toHTML(){ -return new c(this,this.options).value()}finalize(){return!0}}function d(e){ -return e?"string"==typeof e?e:e.source:null} -const h="[a-zA-Z]\\w*",f="[a-zA-Z_]\\w*",p="\\b\\d+(\\.\\d+)?",m="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",b="\\b(0b[01]+)",x={ -begin:"\\\\[\\s\\S]",relevance:0},E={className:"string",begin:"'",end:"'", -illegal:"\\n",contains:[x]},v={className:"string",begin:'"',end:'"', -illegal:"\\n",contains:[x]},_={ -begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/ -},w=(e,t,n={})=>{const s=a({className:"comment",begin:e,end:t,contains:[]},n) -;return s.contains.push(_),s.contains.push({className:"doctag", -begin:"(?:TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):",relevance:0}),s -},N=w("//","$"),y=w("/\\*","\\*/"),R=w("#","$");var k=Object.freeze({ -__proto__:null,IDENT_RE:h,UNDERSCORE_IDENT_RE:f,NUMBER_RE:p,C_NUMBER_RE:m, -BINARY_NUMBER_RE:b, -RE_STARTERS_RE:"!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~", -SHEBANG:(e={})=>{const t=/^#![ ]*\// -;return e.binary&&(e.begin=((...e)=>e.map((e=>d(e))).join(""))(t,/.*\b/,e.binary,/\b.*/)), -a({className:"meta",begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{ -0!==e.index&&t.ignoreMatch()}},e)},BACKSLASH_ESCAPE:x,APOS_STRING_MODE:E, -QUOTE_STRING_MODE:v,PHRASAL_WORDS_MODE:_,COMMENT:w,C_LINE_COMMENT_MODE:N, -C_BLOCK_COMMENT_MODE:y,HASH_COMMENT_MODE:R,NUMBER_MODE:{className:"number", -begin:p,relevance:0},C_NUMBER_MODE:{className:"number",begin:m,relevance:0}, -BINARY_NUMBER_MODE:{className:"number",begin:b,relevance:0},CSS_NUMBER_MODE:{ -className:"number", -begin:p+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?", -relevance:0},REGEXP_MODE:{begin:/(?=\/[^/\n]*\/)/,contains:[{className:"regexp", -begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[x,{begin:/\[/,end:/\]/, -relevance:0,contains:[x]}]}]},TITLE_MODE:{className:"title",begin:h,relevance:0 -},UNDERSCORE_TITLE_MODE:{className:"title",begin:f,relevance:0},METHOD_GUARD:{ -begin:"\\.\\s*[a-zA-Z_]\\w*",relevance:0},END_SAME_AS_BEGIN:e=>Object.assign(e,{ -"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{ -t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}) -;const M=["of","and","for","in","not","or","if","then","parent","list","value"] -;function O(e){function t(t,n){ -return RegExp(d(t),"m"+(e.case_insensitive?"i":"")+(n?"g":""))}class n{ -constructor(){ -this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0} -addRule(e,t){ -t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]), -this.matchAt+=(e=>RegExp(e.toString()+"|").exec("").length-1)(e)+1}compile(){ -0===this.regexes.length&&(this.exec=()=>null) -;const e=this.regexes.map((e=>e[1]));this.matcherRe=t(((e,t="|")=>{ -const n=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;let s=0,r="" -;for(let a=0;a0&&(r+=t),r+="(";o.length>0;){const e=n.exec(o);if(null==e){r+=o;break} -r+=o.substring(0,e.index), -o=o.substring(e.index+e[0].length),"\\"===e[0][0]&&e[1]?r+="\\"+(Number(e[1])+i):(r+=e[0], -"("===e[0]&&s++)}r+=")"}return r})(e),!0),this.lastIndex=0}exec(e){ -this.matcherRe.lastIndex=this.lastIndex;const t=this.matcherRe.exec(e) -;if(!t)return null -;const n=t.findIndex(((e,t)=>t>0&&void 0!==e)),s=this.matchIndexes[n] -;return t.splice(0,n),Object.assign(t,s)}}class s{constructor(){ -this.rules=[],this.multiRegexes=[], -this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){ -if(this.multiRegexes[e])return this.multiRegexes[e];const t=new n -;return this.rules.slice(e).forEach((([e,n])=>t.addRule(e,n))), -t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){ -return 0!==this.regexIndex}considerAll(){this.regexIndex=0}addRule(e,t){ -this.rules.push([e,t]),"begin"===t.type&&this.count++}exec(e){ -const t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex -;let n=t.exec(e) -;if(this.resumingScanAtSamePosition())if(n&&n.index===this.lastIndex);else{ -const t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)} -return n&&(this.regexIndex+=n.position+1, -this.regexIndex===this.count&&this.considerAll()),n}}function r(e,t){ -"."===e.input[e.index-1]&&t.ignoreMatch()} -if(e.contains&&e.contains.includes("self"))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.") -;return e.classNameAliases=a(e.classNameAliases||{}),function n(i,o){const l=i -;if(i.compiled)return l -;i.compiled=!0,i.__beforeBegin=null,i.keywords=i.keywords||i.beginKeywords -;let c=null -;if("object"==typeof i.keywords&&(c=i.keywords.$pattern,delete i.keywords.$pattern), -i.keywords&&(i.keywords=((e,t)=>{const n={} -;return"string"==typeof e?s("keyword",e):Object.keys(e).forEach((t=>{s(t,e[t]) -})),n;function s(e,s){t&&(s=s.toLowerCase()),s.split(" ").forEach((t=>{ -const s=t.split("|");n[s[0]]=[e,A(s[0],s[1])]}))} -})(i.keywords,e.case_insensitive)), -i.lexemes&&c)throw Error("ERR: Prefer `keywords.$pattern` to `mode.lexemes`, BOTH are not allowed. (see mode reference) ") -;return l.keywordPatternRe=t(i.lexemes||c||/\w+/,!0), -o&&(i.beginKeywords&&(i.begin="\\b("+i.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)", -i.__beforeBegin=r), -i.begin||(i.begin=/\B|\b/),l.beginRe=t(i.begin),i.endSameAsBegin&&(i.end=i.begin), -i.end||i.endsWithParent||(i.end=/\B|\b/), -i.end&&(l.endRe=t(i.end)),l.terminator_end=d(i.end)||"", -i.endsWithParent&&o.terminator_end&&(l.terminator_end+=(i.end?"|":"")+o.terminator_end)), -i.illegal&&(l.illegalRe=t(i.illegal)), -void 0===i.relevance&&(i.relevance=1),i.contains||(i.contains=[]), -i.contains=[].concat(...i.contains.map((e=>(e=>(e.variants&&!e.cached_variants&&(e.cached_variants=e.variants.map((t=>a(e,{ -variants:null},t)))),e.cached_variants?e.cached_variants:L(e)?a(e,{ -starts:e.starts?a(e.starts):null -}):Object.isFrozen(e)?a(e):e))("self"===e?i:e)))),i.contains.forEach((e=>{n(e,l) -})),i.starts&&n(i.starts,o),l.matcher=(e=>{const t=new s -;return e.contains.forEach((e=>t.addRule(e.begin,{rule:e,type:"begin" -}))),e.terminator_end&&t.addRule(e.terminator_end,{type:"end" -}),e.illegal&&t.addRule(e.illegal,{type:"illegal"}),t})(l),l}(e)}function L(e){ -return!!e&&(e.endsWithParent||L(e.starts))}function A(e,t){ -return t?Number(t):(e=>M.includes(e.toLowerCase()))(e)?0:1}function j(e){ -const t={props:["language","code","autodetect"],data:()=>({detectedLanguage:"", -unknownLanguage:!1}),computed:{className(){ -return this.unknownLanguage?"":"hljs "+this.detectedLanguage},highlighted(){ -if(!this.autoDetect&&!e.getLanguage(this.language))return console.warn(`The language "${this.language}" you specified could not be found.`), -this.unknownLanguage=!0,r(this.code);let t -;return this.autoDetect?(t=e.highlightAuto(this.code), -this.detectedLanguage=t.language):(t=e.highlight(this.language,this.code,this.ignoreIllegals), -this.detectedLanguage=this.language),t.value},autoDetect(){ -return!(this.language&&(e=this.autodetect,!e&&""!==e));var e}, -ignoreIllegals:()=>!0},render(e){return e("pre",{},[e("code",{ -class:this.className,domProps:{innerHTML:this.highlighted}})])}};return{ -Component:t,VuePlugin:{install(e){e.component("highlightjs",t)}}}} -const I=r,S=a,{nodeStream:T,mergeStreams:B}=o,P=Symbol("nomatch");return(e=>{ -const n=[],r=Object.create(null),a=Object.create(null),i=[];let o=!0 -;const l=/(^(<[^>]+>|\t|)+|\n)/gm,c="Could not find the language '{}', did you forget to load/include a language module?",u={ -disableAutodetect:!0,name:"Plain text",contains:[]};let d={ -noHighlightRe:/^(no-?highlight)$/i, -languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-", -tabReplace:null,useBR:!1,languages:null,__emitter:g};function h(e){ -return d.noHighlightRe.test(e)}function f(e,t,n,s){const r={code:t,language:e} -;N("before:highlight",r);const a=r.result?r.result:p(r.language,r.code,n,s) -;return a.code=r.code,N("after:highlight",a),a}function p(e,t,n,a){const i=t -;function l(e,t){const n=_.case_insensitive?t[0].toLowerCase():t[0] -;return Object.prototype.hasOwnProperty.call(e.keywords,n)&&e.keywords[n]} -function u(){null!=y.subLanguage?(()=>{if(""===M)return;let e=null -;if("string"==typeof y.subLanguage){ -if(!r[y.subLanguage])return void k.addText(M) -;e=p(y.subLanguage,M,!0,R[y.subLanguage]),R[y.subLanguage]=e.top -}else e=m(M,y.subLanguage.length?y.subLanguage:null) -;y.relevance>0&&(L+=e.relevance),k.addSublanguage(e.emitter,e.language) -})():(()=>{if(!y.keywords)return void k.addText(M);let e=0 -;y.keywordPatternRe.lastIndex=0;let t=y.keywordPatternRe.exec(M),n="";for(;t;){ -n+=M.substring(e,t.index);const s=l(y,t);if(s){const[e,r]=s -;k.addText(n),n="",L+=r;const a=_.classNameAliases[e]||e;k.addKeyword(t[0],a) -}else n+=t[0];e=y.keywordPatternRe.lastIndex,t=y.keywordPatternRe.exec(M)} -n+=M.substr(e),k.addText(n)})(),M=""}function g(e){ -return e.className&&k.openNode(_.classNameAliases[e.className]||e.className), -y=Object.create(e,{parent:{value:y}}),y}function h(e,t,n){let r=((e,t)=>{ -const n=e&&e.exec(t);return n&&0===n.index})(e.endRe,n);if(r){if(e["on:end"]){ -const n=new s(e);e["on:end"](t,n),n.ignore&&(r=!1)}if(r){ -for(;e.endsParent&&e.parent;)e=e.parent;return e}} -if(e.endsWithParent)return h(e.parent,t,n)}function f(e){ -return 0===y.matcher.regexIndex?(M+=e[0],1):(S=!0,0)}function b(e){ -const t=e[0],n=i.substr(e.index),s=h(y,e,n);if(!s)return P;const r=y -;r.skip?M+=t:(r.returnEnd||r.excludeEnd||(M+=t),u(),r.excludeEnd&&(M=t));do{ -y.className&&k.closeNode(),y.skip||y.subLanguage||(L+=y.relevance),y=y.parent -}while(y!==s.parent) -;return s.starts&&(s.endSameAsBegin&&(s.starts.endRe=s.endRe), -g(s.starts)),r.returnEnd?0:t.length}let x={};function E(t,r){const a=r&&r[0] -;if(M+=t,null==a)return u(),0 -;if("begin"===x.type&&"end"===r.type&&x.index===r.index&&""===a){ -if(M+=i.slice(r.index,r.index+1),!o){const t=Error("0 width match regex") -;throw t.languageName=e,t.badRule=x.rule,t}return 1} -if(x=r,"begin"===r.type)return function(e){ -const t=e[0],n=e.rule,r=new s(n),a=[n.__beforeBegin,n["on:begin"]] -;for(const n of a)if(n&&(n(e,r),r.ignore))return f(t) -;return n&&n.endSameAsBegin&&(n.endRe=RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")), -n.skip?M+=t:(n.excludeBegin&&(M+=t), -u(),n.returnBegin||n.excludeBegin||(M=t)),g(n),n.returnBegin?0:t.length}(r) -;if("illegal"===r.type&&!n){ -const e=Error('Illegal lexeme "'+a+'" for mode "'+(y.className||"")+'"') -;throw e.mode=y,e}if("end"===r.type){const e=b(r);if(e!==P)return e} -if("illegal"===r.type&&""===a)return 1 -;if(j>1e5&&j>3*r.index)throw Error("potential infinite loop, way more iterations than matches") -;return M+=a,a.length}const _=v(e);if(!_)throw console.error(c.replace("{}",e)), -Error('Unknown language: "'+e+'"');const w=O(_);let N="",y=a||w -;const R={},k=new d.__emitter(d);(()=>{const e=[] -;for(let t=y;t!==_;t=t.parent)t.className&&e.unshift(t.className) -;e.forEach((e=>k.openNode(e)))})();let M="",L=0,A=0,j=0,S=!1;try{ -for(y.matcher.considerAll();;){ -j++,S?S=!1:y.matcher.considerAll(),y.matcher.lastIndex=A -;const e=y.matcher.exec(i);if(!e)break;const t=E(i.substring(A,e.index),e) -;A=e.index+t}return E(i.substr(A)),k.closeAllNodes(),k.finalize(),N=k.toHTML(),{ -relevance:L,value:N,language:e,illegal:!1,emitter:k,top:y}}catch(t){ -if(t.message&&t.message.includes("Illegal"))return{illegal:!0,illegalBy:{ -msg:t.message,context:i.slice(A-100,A+100),mode:t.mode},sofar:N,relevance:0, -value:I(i),emitter:k};if(o)return{illegal:!1,relevance:0,value:I(i),emitter:k, -language:e,top:y,errorRaised:t};throw t}}function m(e,t){ -t=t||d.languages||Object.keys(r);const n=(e=>{const t={relevance:0, -emitter:new d.__emitter(d),value:I(e),illegal:!1,top:u} -;return t.emitter.addText(e),t})(e),s=t.filter(v).filter(w).map((t=>p(t,e,!1))) -;s.unshift(n);const a=s.sort(((e,t)=>{ -if(e.relevance!==t.relevance)return t.relevance-e.relevance -;if(e.language&&t.language){if(v(e.language).supersetOf===t.language)return 1 -;if(v(t.language).supersetOf===e.language)return-1}return 0})),[i,o]=a,l=i -;return l.second_best=o,l}function b(e){ -return d.tabReplace||d.useBR?e.replace(l,(e=>"\n"===e?d.useBR?"
":e:d.tabReplace?e.replace(/\t/g,d.tabReplace):e)):e -}function x(e){let t=null;const n=(e=>{let t=e.className+" " -;t+=e.parentNode?e.parentNode.className:"";const n=d.languageDetectRe.exec(t) -;if(n){const t=v(n[1]) -;return t||(console.warn(c.replace("{}",n[1])),console.warn("Falling back to no-highlight mode for this block.",e)), -t?n[1]:"no-highlight"}return t.split(/\s+/).find((e=>h(e)||v(e)))})(e) -;if(h(n))return;N("before:highlightBlock",{block:e,language:n -}),d.useBR?(t=document.createElement("div"), -t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):t=e -;const s=t.textContent,r=n?f(n,s,!0):m(s),i=T(t);if(i.length){ -const e=document.createElement("div");e.innerHTML=r.value,r.value=B(i,T(e),s)} -r.value=b(r.value),N("after:highlightBlock",{block:e,result:r -}),e.innerHTML=r.value,e.className=((e,t,n)=>{const s=t?a[t]:n,r=[e.trim()] -;return e.match(/\bhljs\b/)||r.push("hljs"), -e.includes(s)||r.push(s),r.join(" ").trim() -})(e.className,n,r.language),e.result={language:r.language,re:r.relevance, -relavance:r.relevance},r.second_best&&(e.second_best={ -language:r.second_best.language,re:r.second_best.relevance, -relavance:r.second_best.relevance})}const E=()=>{if(E.called)return;E.called=!0 -;const e=document.querySelectorAll("pre code");n.forEach.call(e,x)} -;function v(e){return e=(e||"").toLowerCase(),r[e]||r[a[e]]} -function _(e,{languageName:t}){"string"==typeof e&&(e=[e]),e.forEach((e=>{a[e]=t -}))}function w(e){const t=v(e);return t&&!t.disableAutodetect}function N(e,t){ -const n=e;i.forEach((e=>{e[n]&&e[n](t)}))}Object.assign(e,{highlight:f, -highlightAuto:m, -fixMarkup:e=>(console.warn("fixMarkup is deprecated and will be removed entirely in v11.0"), -console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2534"), -b(e)),highlightBlock:x,configure:e=>{ -e.useBR&&(console.warn("'useBR' option is deprecated and will be removed entirely in v11.0"), -console.warn("Please see https://github.com/highlightjs/highlight.js/issues/2559")), -d=S(d,e)},initHighlighting:E,initHighlightingOnLoad:()=>{ -window.addEventListener("DOMContentLoaded",E,!1)},registerLanguage:(t,n)=>{ -let s=null;try{s=n(e)}catch(e){ -if(console.error("Language definition for '{}' could not be registered.".replace("{}",t)), -!o)throw e;console.error(e),s=u} -s.name||(s.name=t),r[t]=s,s.rawDefinition=n.bind(null,e), -s.aliases&&_(s.aliases,{languageName:t})},listLanguages:()=>Object.keys(r), -getLanguage:v,registerAliases:_,requireLanguage:e=>{ -console.warn("requireLanguage is deprecated and will be removed entirely in the future."), -console.warn("Please see https://github.com/highlightjs/highlight.js/pull/2844") -;const t=v(e);if(t)return t -;throw Error("The '{}' language is required, but not loaded.".replace("{}",e))}, -autoDetection:w,inherit:S,addPlugin:e=>{i.push(e)},vuePlugin:j(e).VuePlugin -}),e.debugMode=()=>{o=!1},e.safeMode=()=>{o=!0},e.versionString="10.4.1" -;for(const e in k)"object"==typeof k[e]&&t(k[e]);return Object.assign(e,k),e -})({})}() -;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs); -hljs.registerLanguage("apache",(()=>{"use strict";return e=>{const n={ -className:"number",begin:"\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?" -};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0, -contains:[e.HASH_COMMENT_MODE,{className:"section",begin:"", -contains:[n,{className:"number",begin:":\\d{1,5}" -},e.inherit(e.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute", -begin:/\w+/,relevance:0,keywords:{ -nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername" -},starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"}, -contains:[{className:"meta",begin:"\\s\\[",end:"\\]$"},{className:"variable", -begin:"[\\$%]\\{",end:"\\}",contains:["self",{className:"number", -begin:"[\\$%]\\d+"}]},n,{className:"number",begin:"\\d+"},e.QUOTE_STRING_MODE]} -}],illegal:/\S/}}})()); -hljs.registerLanguage("bash",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(s=e)?"string"==typeof s?s:s.source:null;var s -})).join("")}return s=>{const n={},t={begin:/\$\{/,end:/\}/,contains:["self",{ -begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{ -begin:e(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},t]});const a={ -className:"subst",begin:/\$\(/,end:/\)/,contains:[s.BACKSLASH_ESCAPE]},i={ -begin:/<<-?\s*(?=\w+)/,starts:{contains:[s.END_SAME_AS_BEGIN({begin:/(\w+)/, -end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, -contains:[s.BACKSLASH_ESCAPE,n,a]};a.contains.push(c);const o={begin:/\$\(\(/, -end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},s.NUMBER_MODE,n] -},r=s.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 -}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, -contains:[s.inherit(s.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ -name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z._-]+\b/, -keyword:"if then else elif fi for while in do done case esac function", -literal:"true false", -built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp" -},contains:[r,s.SHEBANG(),l,o,s.HASH_COMMENT_MODE,i,c,{className:"",begin:/\\"/ -},{className:"string",begin:/'/,end:/'/},n]}}})()); -hljs.registerLanguage("c",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},o={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},c={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},m=[c,s,n,t.C_BLOCK_COMMENT_MODE,o,i],p={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:m.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:m.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,o,s,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,o,s]}] -},s,n,t.C_BLOCK_COMMENT_MODE,c]};return{ -aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:c,strings:i,keywords:u}}})(t) -;return n.name="C",n.aliases=["c","h"],n}})()); -hljs.registerLanguage("coffeescript",(()=>{"use strict" -;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;return r=>{const t={ -keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], -e=>!i.includes(e))).join(" "), -literal:n.concat(["yes","no","on","off"]).join(" "), -built_in:a.concat(["npm","print"]).join(" ")};var i -;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={className:"subst",begin:/#\{/,end:/\}/, -keywords:t},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{ -end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/, -end:/'''/,contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/, -contains:[r.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/, -contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, -contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", -end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", -relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s -},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ -begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c -;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ -className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, -end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", -aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, -contains:c.concat([r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{ -className:"function",begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0, -contains:[l,g]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function", -begin:d,end:"[-=]>",returnBegin:!0,contains:[g]}]},{className:"class", -beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{ -beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[l]},l] -},{begin:s+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}})()); -hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ -return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") -}return t=>{const n=(t=>{const n=t.COMMENT("//","$",{contains:[{begin:/\\\n/}] -}),r="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+e(r)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",s={ -className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},i={className:"string", -variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n", -contains:[t.BACKSLASH_ESCAPE]},{ -begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", -end:"'",illegal:"."},t.END_SAME_AS_BEGIN({ -begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},c={ -className:"number",variants:[{begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ -"meta-keyword":"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" -},contains:[{begin:/\\\n/,relevance:0},t.inherit(i,{className:"meta-string"}),{ -className:"meta-string",begin:/<.*?>/,end:/$/,illegal:"\\n" -},n,t.C_BLOCK_COMMENT_MODE]},l={className:"title",begin:e(r)+t.IDENT_RE, -relevance:0},d=e(r)+t.IDENT_RE+"\\s*\\(",u={ -keyword:"int float while private char char8_t char16_t char32_t catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid wchar_t short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignas alignof constexpr consteval constinit decltype concept co_await co_return co_yield requires noexcept static_assert thread_local restrict final override atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and and_eq bitand bitor compl not not_eq or or_eq xor xor_eq", -built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr _Bool complex _Complex imaginary _Imaginary", -literal:"true false nullptr NULL"},p=[o,s,n,t.C_BLOCK_COMMENT_MODE,c,i],m={ -variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{ -beginKeywords:"new throw return else",end:/;/}],keywords:u,contains:p.concat([{ -begin:/\(/,end:/\)/,keywords:u,contains:p.concat(["self"]),relevance:0}]), -relevance:0},_={className:"function",begin:"("+a+"[\\*&\\s]+)+"+d, -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:u,illegal:/[^\w\s\*&:<>]/, -contains:[{begin:"decltype\\(auto\\)",keywords:u,relevance:0},{begin:d, -returnBegin:!0,contains:[l],relevance:0},{className:"params",begin:/\(/, -end:/\)/,keywords:u,relevance:0,contains:[n,t.C_BLOCK_COMMENT_MODE,i,c,s,{ -begin:/\(/,end:/\)/,keywords:u,relevance:0, -contains:["self",n,t.C_BLOCK_COMMENT_MODE,i,c,s]}] -},s,n,t.C_BLOCK_COMMENT_MODE,o]};return{ -aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],keywords:u, -disableAutodetect:!0,illegal:"",keywords:u,contains:["self",s]},{begin:t.IDENT_RE+"::",keywords:u},{ -className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/, -contains:[{beginKeywords:"final class struct"},t.TITLE_MODE]}]),exports:{ -preprocessor:o,strings:i,keywords:u}}})(t) -;return n.disableAutodetect=!1,n.name="C++", -n.aliases=["cc","c++","h++","hpp","hh","hxx","cxx"],n}})()); -hljs.registerLanguage("csharp",(()=>{"use strict";return e=>{var n={ -keyword:["abstract","as","base","break","case","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"].concat(["add","alias","and","ascending","async","await","by","descending","equals","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","remove","select","set","unmanaged","value|0","var","when","where","with","yield"]).join(" "), -built_in:"bool byte char decimal delegate double dynamic enum float int long nint nuint object sbyte short string ulong unit ushort", -literal:"default false null true"},a=e.inherit(e.TITLE_MODE,{ -begin:"[a-zA-Z](\\.?\\w)*"}),i={className:"number",variants:[{ -begin:"\\b(0b[01']+)"},{ -begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{ -begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" -}],relevance:0},s={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}] -},t=e.inherit(s,{illegal:/\n/}),r={className:"subst",begin:/\{/,end:/\}/, -keywords:n},l=e.inherit(r,{illegal:/\n/}),c={className:"string",begin:/\$"/, -end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/ -},e.BACKSLASH_ESCAPE,l]},o={className:"string",begin:/\$@"/,end:'"',contains:[{ -begin:/\{\{/},{begin:/\}\}/},{begin:'""'},r]},d=e.inherit(o,{illegal:/\n/, -contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},l]}) -;r.contains=[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.C_BLOCK_COMMENT_MODE], -l.contains=[d,c,t,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i,e.inherit(e.C_BLOCK_COMMENT_MODE,{ -illegal:/\n/})];var g={variants:[o,c,s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},E={begin:"<",end:">",contains:[{beginKeywords:"in out"},a] -},_=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",b={ -begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"], -keywords:n,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0, -contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{ -begin:"\x3c!--|--\x3e"},{begin:""}]}] -}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#", -end:"$",keywords:{ -"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum" -}},g,i,{beginKeywords:"class interface",relevance:0,end:/[{;=]/, -illegal:/[^\s:,]/,contains:[{beginKeywords:"where class" -},a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace", -relevance:0,end:/[{;=]/,illegal:/[^\s:]/, -contains:[a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ -beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/, -contains:[a,E,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta", -begin:"^\\s*\\[",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{ -className:"meta-string",begin:/"/,end:/"/}]},{ -beginKeywords:"new return throw await else",relevance:0},{className:"function", -begin:"("+_+"\\s+)+"+e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, -end:/\s*[{;=]/,excludeEnd:!0,keywords:n,contains:[{ -beginKeywords:"public private protected static internal protected abstract async extern override unsafe virtual new sealed partial", -relevance:0},{begin:e.IDENT_RE+"\\s*(<.+>\\s*)?\\(",returnBegin:!0, -contains:[e.TITLE_MODE,E],relevance:0},{className:"params",begin:/\(/,end:/\)/, -excludeBegin:!0,excludeEnd:!0,keywords:n,relevance:0, -contains:[g,i,e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},b]}}})()); -hljs.registerLanguage("css",(()=>{"use strict";return e=>{ -var n="[a-zA-Z-][a-zA-Z0-9_-]*",a={ -begin:/([*]\s?)?(?:[A-Z_.\-\\]+|--[a-zA-Z0-9_-]+)\s*(\/\*\*\/)?:/, -returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute", -begin:/\S/,end:":",excludeEnd:!0,starts:{endsWithParent:!0,excludeEnd:!0, -contains:[{begin:/[\w-]+\(/,returnBegin:!0,contains:[{className:"built_in", -begin:/[\w-]+/},{begin:/\(/,end:/\)/, -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}] -},e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{ -className:"number",begin:"#[0-9A-Fa-f]+"},{className:"meta",begin:"!important"}] -}}]};return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/, -contains:[e.C_BLOCK_COMMENT_MODE,{className:"selector-id", -begin:/#[A-Za-z0-9_-]+/},{className:"selector-class",begin:"\\."+n},{ -className:"selector-attr",begin:/\[/,end:/\]/,illegal:"$", -contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"selector-pseudo", -begin:/:(:)?[a-zA-Z0-9_+()"'.-]+/},{begin:"@(page|font-face)", -lexemes:"@[a-z-]+",keywords:"@page @font-face"},{begin:"@",end:"[{;]", -illegal:/:/,returnBegin:!0,contains:[{className:"keyword", -begin:/@-?\w[\w]*(-\w+)*/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0, -relevance:0,keywords:"and or not only",contains:[{begin:/[a-z-]+:/, -className:"attribute"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE] -}]},{className:"selector-tag",begin:n,relevance:0},{begin:/\{/,end:/\}/, -illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,{begin:/;/},a]}]}}})()); -hljs.registerLanguage("diff",(()=>{"use strict";return e=>({name:"Diff", -aliases:["patch"],contains:[{className:"meta",relevance:10,variants:[{ -begin:/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{ -begin:/^--- +\d+,\d+ +----$/}]},{className:"comment",variants:[{begin:/Index: /, -end:/$/},{begin:/^index/,end:/$/},{begin:/={3,}/,end:/$/},{begin:/^-{3}/,end:/$/ -},{begin:/^\*{3} /,end:/$/},{begin:/^\+{3}/,end:/$/},{begin:/^\*{15}$/},{ -begin:/^diff --git/,end:/$/}]},{className:"addition",begin:/^\+/,end:/$/},{ -className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/, -end:/$/}]})})()); -hljs.registerLanguage("go",(()=>{"use strict";return e=>{const n={ -keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune", -literal:"true false iota nil", -built_in:"append cap close complex copy imag len make new panic print println real recover delete" -};return{name:"Go",aliases:["golang"],keywords:n,illegal:"{"use strict";return e=>{ -var n="HTTP/[0-9\\.]+";return{name:"HTTP",aliases:["https"],illegal:"\\S", -contains:[{begin:"^"+n,end:"$",contains:[{className:"number", -begin:"\\b\\d{3}\\b"}]},{begin:"^[A-Z]+ (.*?) "+n+"$",returnBegin:!0,end:"$", -contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{ -begin:n},{className:"keyword",begin:"[A-Z]+"}]},{className:"attribute", -begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{end:"$", -relevance:0}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}} -})()); -hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(...n){ -return n.map((n=>e(n))).join("")}return s=>{const a={className:"number", -relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] -},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ -className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ -}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ -className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", -end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' -},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], -relevance:0 -},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" -;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, -contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ -begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", -starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})()); -hljs.registerLanguage("java",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{ -var n="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={ -className:"meta",begin:"@[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*", -contains:[{begin:/\(/,end:/\)/,contains:["self"]}]};const r=a;return{ -name:"Java",aliases:["jsp"],keywords:n,illegal:/<\/|#/, -contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/, -relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{ -begin:/import java\.[a-z]+\./,keywords:"import",relevance:2 -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{ -className:"class",beginKeywords:"class interface enum",end:/[{;=]/, -excludeEnd:!0,keywords:"class interface enum",illegal:/[:"\[\]]/,contains:[{ -beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{ -beginKeywords:"new throw return else",relevance:0},{className:"class", -begin:"record\\s+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,excludeEnd:!0, -end:/[{;=]/,keywords:n,contains:[{beginKeywords:"record"},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"function", -begin:"([\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(<[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*(\\s*,\\s*[\xc0-\u02b8a-zA-Z_$][\xc0-\u02b8a-zA-Z_$0-9]*)*>)?\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(", -returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/, -keywords:n,relevance:0, -contains:[s,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,r,e.C_BLOCK_COMMENT_MODE] -},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,s]}}})()); -hljs.registerLanguage("javascript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;function r(e){return i("(?=",e,")")}function i(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return t=>{ -const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, -isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] -;"<"!==s?">"===s&&(((e,{after:n})=>{const a="", -returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ -begin:t.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 -},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:A}]}] -},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ -variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, -end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, -contains:["self"]}]}],relevance:0},{className:"function", -beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, -contains:["self",t.inherit(t.TITLE_MODE,{begin:c}),p],illegal:/%/},{ -beginKeywords:"while if switch catch for"},{className:"function", -begin:t.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,contains:[p,t.inherit(t.TITLE_MODE,{begin:c})]},{variants:[{ -begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", -beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ -beginKeywords:"extends"},t.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, -end:/[{;]/,excludeEnd:!0,contains:[t.inherit(t.TITLE_MODE,{begin:c}),"self",p] -},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", -contains:[t.inherit(t.TITLE_MODE,{begin:c}),{begin:/\(\)/},p]},{begin:/\$[(.]/}] -}}})()); -hljs.registerLanguage("json",(()=>{"use strict";return n=>{const e={ -literal:"true false null" -},i=[n.C_LINE_COMMENT_MODE,n.C_BLOCK_COMMENT_MODE],a=[n.QUOTE_STRING_MODE,n.C_NUMBER_MODE],l={ -end:",",endsWithParent:!0,excludeEnd:!0,contains:a,keywords:e},t={begin:/\{/, -end:/\}/,contains:[{className:"attr",begin:/"/,end:/"/, -contains:[n.BACKSLASH_ESCAPE],illegal:"\\n"},n.inherit(l,{begin:/:/ -})].concat(i),illegal:"\\S"},s={begin:"\\[",end:"\\]",contains:[n.inherit(l)], -illegal:"\\S"};return a.push(t,s),i.forEach((n=>{a.push(n)})),{name:"JSON", -contains:a,keywords:e,illegal:"\\S"}}})()); -hljs.registerLanguage("kotlin",(()=>{"use strict" -;var e="\\.([0-9](_*[0-9])*)",n="[0-9a-fA-F](_*[0-9a-fA-F])*",a={ -className:"number",variants:[{ -begin:`(\\b([0-9](_*[0-9])*)((${e})|\\.)?|(${e}))[eE][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:`\\b([0-9](_*[0-9])*)((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{ -begin:`(${e})[fFdD]?\\b`},{begin:"\\b([0-9](_*[0-9])*)[fFdD]\\b"},{ -begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?([0-9](_*[0-9])*)[fFdD]?\\b` -},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{ -begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}], -relevance:0};return e=>{const n={ -keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual", -built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing", -literal:"true false null"},i={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@" -},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},t={ -className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},r={className:"string", -variants:[{begin:'"""',end:'"""(?=[^"])',contains:[t,s]},{begin:"'",end:"'", -illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/, -contains:[e.BACKSLASH_ESCAPE,t,s]}]};s.contains.push(r);const l={ -className:"meta", -begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?" -},c={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/, -end:/\)/,contains:[e.inherit(r,{className:"meta-string"})]}] -},o=a,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),E={ -variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/, -contains:[]}]},d=E;return d.variants[1].contains=[E],E.variants[1].contains=[d], -{name:"Kotlin",aliases:["kt"],keywords:n,contains:[e.COMMENT("/\\*\\*","\\*/",{ -relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}] -}),e.C_LINE_COMMENT_MODE,b,{className:"keyword", -begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol", -begin:/@\w+/}]}},i,l,c,{className:"function",beginKeywords:"fun",end:"[(]|$", -returnBegin:!0,excludeEnd:!0,keywords:n,relevance:5,contains:[{ -begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0, -contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin://, -keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/, -endsParent:!0,keywords:n,relevance:0,contains:[{begin:/:/,end:/[=,\/]/, -endsWithParent:!0,contains:[E,e.C_LINE_COMMENT_MODE,b],relevance:0 -},e.C_LINE_COMMENT_MODE,b,l,c,r,e.C_NUMBER_MODE]},b]},{className:"class", -beginKeywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0, -illegal:"extends implements",contains:[{ -beginKeywords:"public protected internal private constructor" -},e.UNDERSCORE_TITLE_MODE,{className:"type",begin://,excludeBegin:!0, -excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,]|$/, -excludeBegin:!0,returnEnd:!0},l,c]},r,{className:"meta",begin:"^#!/usr/bin/env", -end:"$",illegal:"\n"},o]}}})()); -hljs.registerLanguage("less",(()=>{"use strict";return e=>{ -var n="([\\w-]+|@\\{[\\w-]+\\})",a=[],s=[],t=e=>({className:"string", -begin:"~?"+e+".*?"+e}),r=(e,n,a)=>({className:e,begin:n,relevance:a}),i={ -begin:"\\(",end:"\\)",contains:s,relevance:0} -;s.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t("'"),t('"'),e.CSS_NUMBER_MODE,{ -begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]", -excludeEnd:!0} -},r("number","#[0-9A-Fa-f]+\\b"),i,r("variable","@@?[\\w-]+",10),r("variable","@\\{[\\w-]+\\}"),r("built_in","~?`[^`]*?`"),{ -className:"attribute",begin:"[\\w-]+\\s*:",end:":",returnBegin:!0,excludeEnd:!0 -},{className:"meta",begin:"!important"});var c=s.concat({begin:/\{/,end:/\}/, -contains:a}),l={beginKeywords:"when",endsWithParent:!0,contains:[{ -beginKeywords:"and not"}].concat(s)},g={begin:n+"\\s*:",returnBegin:!0, -end:"[;}]",relevance:0,contains:[{className:"attribute",begin:n,end:":", -excludeEnd:!0,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:s} -}]},d={className:"keyword", -begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b", -starts:{end:"[;{}]",returnEnd:!0,contains:s,relevance:0}},o={ -className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{ -begin:"@[\\w-]+"}],starts:{end:"[;}]",returnEnd:!0,contains:c}},b={variants:[{ -begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:n,end:/\{/}],returnBegin:!0, -returnEnd:!0,illegal:"[<='$\"]",relevance:0, -contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,l,r("keyword","all\\b"),r("variable","@\\{[\\w-]+\\}"),r("selector-tag",n+"%?",0),r("selector-id","#"+n),r("selector-class","\\."+n,0),r("selector-tag","&",0),{ -className:"selector-attr",begin:"\\[",end:"\\]"},{className:"selector-pseudo", -begin:/:(:)?[a-zA-Z0-9_\-+()"'.]+/},{begin:"\\(",end:"\\)",contains:c},{ -begin:"!important"}]} -;return a.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,d,o,g,b),{ -name:"Less",case_insensitive:!0,illegal:"[=>'/<($\"]",contains:a}}})()); -hljs.registerLanguage("lua",(()=>{"use strict";return e=>{ -const t="\\[=*\\[",a="\\]=*\\]",n={begin:t,end:a,contains:["self"] -},o=[e.COMMENT("--(?!\\[=*\\[)","$"),e.COMMENT("--\\[=*\\[",a,{contains:[n], -relevance:10})];return{name:"Lua",keywords:{$pattern:e.UNDERSCORE_IDENT_RE, -literal:"true false nil", -keyword:"and break do else elseif end for goto if in local not or repeat return then until while", -built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove" -},contains:o.concat([{className:"function",beginKeywords:"function",end:"\\)", -contains:[e.inherit(e.TITLE_MODE,{ -begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params", -begin:"\\(",endsWithParent:!0,contains:o}].concat(o) -},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string", -begin:t,end:a,contains:[n],relevance:5}])}}})()); -hljs.registerLanguage("makefile",(()=>{"use strict";return e=>{const i={ -className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)", -contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%{"use strict";function e(e){ -return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} -function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ -return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ -const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]+:/,")?"),/[A-Z0-9_.-]*/),i={ -className:"symbol",begin:"&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;"},c={begin:"\\s", -contains:[{className:"meta-keyword",begin:"#?[a-z_][a-z1-9_-]+",illegal:"\\n"}] -},r=e.inherit(c,{begin:"\\(",end:"\\)"}),l=e.inherit(e.APOS_STRING_MODE,{ -className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ -className:"meta-string"}),m={endsWithParent:!0,illegal:/`]+/}]}]}]};return{name:"HTML, XML", -aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"], -case_insensitive:!0,contains:[{className:"meta",begin:"", -relevance:10,contains:[c,g,l,r,{begin:"\\[",end:"\\]",contains:[{ -className:"meta",begin:"",contains:[c,r,g,l]}]}] -},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{begin:"",relevance:10},i,{className:"meta",begin:/<\?xml/,end:/\?>/, -relevance:10},{className:"tag",begin:")",end:">",keywords:{ -name:"style"},contains:[m],starts:{end:"",returnEnd:!0, -subLanguage:["css","xml"]}},{className:"tag",begin:")",end:">", -keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0, -subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/ -},{className:"tag",begin:a(//,/>/,/\s/)))),end:/\/?>/,contains:[{ -className:"name",begin:t,relevance:0,starts:m}]},{className:"tag", -begin:a(/<\//,n(a(t,/>/))),contains:[{className:"name",begin:t,relevance:0},{ -begin:/>/,relevance:0}]}]}}})()); -hljs.registerLanguage("markdown",(()=>{"use strict";function n(...n){ -return n.map((n=>{return(e=n)?"string"==typeof e?e:e.source:null;var e -})).join("")}return e=>{const a={begin:/<\/?[A-Za-z_]/,end:">", -subLanguage:"xml",relevance:0},i={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0 -},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/, -relevance:2},{begin:n(/\[.+?\]\(/,/[A-Za-z][A-Za-z0-9+.-]*/,/:\/\/.*?\)/), -relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{ -begin:/\[.+?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{ -className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0, -returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)", -excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[", -end:"\\]",excludeBegin:!0,excludeEnd:!0}]},s={className:"strong",contains:[], -variants:[{begin:/_{2}/,end:/_{2}/},{begin:/\*{2}/,end:/\*{2}/}]},c={ -className:"emphasis",contains:[],variants:[{begin:/\*(?!\*)/,end:/\*/},{ -begin:/_(?!_)/,end:/_/,relevance:0}]};s.contains.push(c),c.contains.push(s) -;let t=[a,i] -;return s.contains=s.contains.concat(t),c.contains=c.contains.concat(t), -t=t.concat(s,c),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{ -className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:t},{ -begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n", -contains:t}]}]},a,{className:"bullet",begin:"^[ \t]*([*+-]|(\\d+\\.))(?=\\s+)", -end:"\\s+",excludeEnd:!0},s,c,{className:"quote",begin:"^>\\s+",contains:t, -end:"$"},{className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{ -begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{ -begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))", -contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ -begin:"^[-\\*]{3,}",end:"$"},i,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ -className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ -className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})()); -hljs.registerLanguage("nginx",(()=>{"use strict";return e=>{const n={ -className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/\}/},{ -begin:/[$@]/+e.UNDERSCORE_IDENT_RE}]},a={endsWithParent:!0,keywords:{ -$pattern:"[a-z/_]+", -literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll" -},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string", -contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/ -}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[n] -},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:"\\s\\^", -end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{ -begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number", -begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{ -className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},n]};return{ -name:"Nginx config",aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{ -begin:e.UNDERSCORE_IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\{/,contains:[{ -className:"section",begin:e.UNDERSCORE_IDENT_RE}],relevance:0},{ -begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|\\{",returnBegin:!0,contains:[{ -className:"attribute",begin:e.UNDERSCORE_IDENT_RE,starts:a}],relevance:0}], -illegal:"[^\\s\\}]"}}})()); -hljs.registerLanguage("objectivec",(()=>{"use strict";return e=>{ -const n=/[a-zA-Z@][a-zA-Z0-9_]*/,_={$pattern:n, -keyword:"@interface @class @protocol @implementation"};return{ -name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"], -keywords:{$pattern:n, -keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN", -literal:"false true FALSE TRUE nil YES NO NULL", -built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once" -},illegal:"/,end:/$/, -illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{ -className:"class",begin:"("+_.keyword.split(" ").join("|")+")\\b",end:/(\{|$)/, -excludeEnd:!0,keywords:_,contains:[e.UNDERSCORE_TITLE_MODE]},{ -begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}})()); -hljs.registerLanguage("perl",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{const t=/[dualxmsipn]{0,12}/,s={$pattern:/[\w.]+/, -keyword:"getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qq fileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmget sub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedir ioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when" -},r={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},i={begin:/->\{/, -end:/\}/},a={variants:[{begin:/\$\d/},{ -begin:e(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])") -},{begin:/[$%@][^\s\w{]/,relevance:0}] -},o=[n.BACKSLASH_ESCAPE,r,a],c=[a,n.HASH_COMMENT_MODE,n.COMMENT(/^=\w/,/=cut/,{ -endsWithParent:!0}),i,{className:"string",contains:o,variants:[{ -begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[", -end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{ -begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">", -relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'", -contains:[n.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`", -contains:[n.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,contains:[],relevance:0},{ -begin:"-?\\w+\\s*=>",contains:[],relevance:0}]},{className:"number", -begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b", -relevance:0},{ -begin:"(\\/\\/|"+n.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*", -keywords:"split return print reverse grep",relevance:0, -contains:[n.HASH_COMMENT_MODE,{className:"regexp", -begin:e(/(s|tr|y)/,/\//,/(\\.|[^\\\/])*/,/\//,/(\\.|[^\\\/])*/,/\//,t), -relevance:10},{className:"regexp",begin:/(m|qr)?\//,end:e(/\//,t), -contains:[n.BACKSLASH_ESCAPE],relevance:0}]},{className:"function", -beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5, -contains:[n.TITLE_MODE]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$", -end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$", -className:"comment"}]}];return r.contains=c,i.contains=c,{name:"Perl", -aliases:["pl","pm"],keywords:s,contains:c}}})()); -hljs.registerLanguage("php",(()=>{"use strict";return e=>{const r={ -className:"variable", -begin:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*(?![A-Za-z0-9])(?![$])"},t={ -className:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?[=]?/},{ -begin:/\?>/}]},a={className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/, -end:/\}/}]},n=e.inherit(e.APOS_STRING_MODE,{illegal:null -}),i=e.inherit(e.QUOTE_STRING_MODE,{illegal:null, -contains:e.QUOTE_STRING_MODE.contains.concat(a)}),o=e.END_SAME_AS_BEGIN({ -begin:/<<<[ \t]*(\w+)\n/,end:/[ \t]*(\w+)\b/, -contains:e.QUOTE_STRING_MODE.contains.concat(a)}),l={className:"string", -contains:[e.BACKSLASH_ESCAPE,t],variants:[e.inherit(n,{begin:"b'",end:"'" -}),e.inherit(i,{begin:'b"',end:'"'}),i,n,o]},c={ -variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]},s={ -keyword:"__CLASS__ __DIR__ __FILE__ __FUNCTION__ __LINE__ __METHOD__ __NAMESPACE__ __TRAIT__ die echo exit include include_once print require require_once array abstract and as binary bool boolean break callable case catch class clone const continue declare default do double else elseif empty enddeclare endfor endforeach endif endswitch endwhile eval extends final finally float for foreach from global goto if implements instanceof insteadof int integer interface isset iterable list match|0 new object or private protected public real return string switch throw trait try unset use var void while xor yield", -literal:"false null true", -built_in:"Error|0 AppendIterator ArgumentCountError ArithmeticError ArrayIterator ArrayObject AssertionError BadFunctionCallException BadMethodCallException CachingIterator CallbackFilterIterator CompileError Countable DirectoryIterator DivisionByZeroError DomainException EmptyIterator ErrorException Exception FilesystemIterator FilterIterator GlobIterator InfiniteIterator InvalidArgumentException IteratorIterator LengthException LimitIterator LogicException MultipleIterator NoRewindIterator OutOfBoundsException OutOfRangeException OuterIterator OverflowException ParentIterator ParseError RangeException RecursiveArrayIterator RecursiveCachingIterator RecursiveCallbackFilterIterator RecursiveDirectoryIterator RecursiveFilterIterator RecursiveIterator RecursiveIteratorIterator RecursiveRegexIterator RecursiveTreeIterator RegexIterator RuntimeException SeekableIterator SplDoublyLinkedList SplFileInfo SplFileObject SplFixedArray SplHeap SplMaxHeap SplMinHeap SplObjectStorage SplObserver SplObserver SplPriorityQueue SplQueue SplStack SplSubject SplSubject SplTempFileObject TypeError UnderflowException UnexpectedValueException ArrayAccess Closure Generator Iterator IteratorAggregate Serializable Throwable Traversable WeakReference Directory __PHP_Incomplete_Class parent php_user_filter self static stdClass" -};return{aliases:["php","php3","php4","php5","php6","php7","php8"], -case_insensitive:!0,keywords:s, -contains:[e.HASH_COMMENT_MODE,e.COMMENT("//","$",{contains:[t] -}),e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}] -}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0, -keywords:"__halt_compiler"}),t,{className:"keyword",begin:/\$this\b/},r,{ -begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function", -relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0, -illegal:"[$%\\[]",contains:[e.UNDERSCORE_TITLE_MODE,{begin:"=>"},{ -className:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0, -keywords:s,contains:["self",r,e.C_BLOCK_COMMENT_MODE,l,c]}]},{className:"class", -beginKeywords:"class interface",relevance:0,end:/\{/,excludeEnd:!0, -illegal:/[:($"]/,contains:[{beginKeywords:"extends implements" -},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";", -illegal:/[.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use", -relevance:0,end:";",contains:[e.UNDERSCORE_TITLE_MODE]},l,c]}}})()); -hljs.registerLanguage("php-template",(()=>{"use strict";return n=>({ -name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/, -subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"', -end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},n.inherit(n.APOS_STRING_MODE,{ -illegal:null,className:null,contains:null,skip:!0 -}),n.inherit(n.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null, -skip:!0})]}]})})()); -hljs.registerLanguage("plaintext",(()=>{"use strict";return t=>({ -name:"Plain text",aliases:["text","txt"],disableAutodetect:!0})})()); -hljs.registerLanguage("properties",(()=>{"use strict";return e=>{ -var n="[ \\t\\f]*",a=n+"[:=]"+n,t="("+a+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",s="([^\\\\:= \\t\\f\\n]|\\\\.)+",i={ -end:t,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{ -begin:"\\\\\\n"}]}};return{name:".properties",case_insensitive:!0,illegal:/\S/, -contains:[e.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:r+a, -relevance:1},{begin:r+"[ \\t\\f]+",relevance:0}],contains:[{className:"attr", -begin:r,endsParent:!0,relevance:0}],starts:i},{begin:s+t,returnBegin:!0, -relevance:0,contains:[{className:"meta",begin:s,endsParent:!0,relevance:0}], -starts:i},{className:"attr",relevance:0,begin:s+n+"$"}]}}})()); -hljs.registerLanguage("python",(()=>{"use strict";return e=>{const n={ -keyword:"and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal|10 not or pass raise return try while with yield", -built_in:"__import__ abs all any ascii bin bool breakpoint bytearray bytes callable chr classmethod compile complex delattr dict dir divmod enumerate eval exec filter float format frozenset getattr globals hasattr hash help hex id input int isinstance issubclass iter len list locals map max memoryview min next object oct open ord pow print property range repr reversed round set setattr slice sorted staticmethod str sum super tuple type vars zip", -literal:"__debug__ Ellipsis False None NotImplemented True"},a={ -className:"meta",begin:/^(>>>|\.\.\.) /},s={className:"subst",begin:/\{/, -end:/\}/,keywords:n,illegal:/#/},i={begin:/\{\{/,relevance:0},r={ -className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, -contains:[e.BACKSLASH_ESCAPE,a],relevance:10},{ -begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, -end:/"""/,contains:[e.BACKSLASH_ESCAPE,a,i,s]},{begin:/([uU]|[rR])'/,end:/'/, -relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ -begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, -end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, -contains:[e.BACKSLASH_ESCAPE,i,s]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, -contains:[e.BACKSLASH_ESCAPE,i,s]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},t="[0-9](_?[0-9])*",l=`(\\b(${t}))?\\.(${t})|\\b(${t})\\.`,b={ -className:"number",relevance:0,variants:[{ -begin:`(\\b(${t})|(${l}))[eE][+-]?(${t})[jJ]?\\b`},{begin:`(${l})[jJ]?`},{ -begin:"\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?\\b"},{ -begin:"\\b0[bB](_?[01])+[lL]?\\b"},{begin:"\\b0[oO](_?[0-7])+[lL]?\\b"},{ -begin:"\\b0[xX](_?[0-9a-fA-F])+[lL]?\\b"},{begin:`\\b(${t})[jJ]\\b`}]},o={ -className:"params",variants:[{begin:/\(\s*\)/,skip:!0,className:null},{ -begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:n, -contains:["self",a,b,r,e.HASH_COMMENT_MODE]}]};return s.contains=[r,b,a],{ -name:"Python",aliases:["py","gyp","ipython"],keywords:n, -illegal:/(<\/|->|\?)|=>/,contains:[a,b,{begin:/\bself\b/},{beginKeywords:"if", -relevance:0},r,e.HASH_COMMENT_MODE,{variants:[{className:"function", -beginKeywords:"def"},{className:"class",beginKeywords:"class"}],end:/:/, -illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,o,{begin:/->/, -endsWithParent:!0,keywords:"None"}]},{className:"meta",begin:/^[\t ]*@/, -end:/(?=#)|$/,contains:[b,o,r]},{begin:/\b(print|exec)\(/}]}}})()); -hljs.registerLanguage("python-repl",(()=>{"use strict";return s=>({ -aliases:["pycon"],contains:[{className:"meta",starts:{end:/ |$/,starts:{end:"$", -subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{ -begin:/^\.\.\.(?=[ ]|$)/}]}]})})()); -hljs.registerLanguage("ruby",(()=>{"use strict";function e(...e){ -return e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n -})).join("")}return n=>{ -var a,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s={ -keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor __FILE__", -built_in:"proc lambda",literal:"true false nil"},r={className:"doctag", -begin:"@[A-Za-z]+"},b={begin:"#<",end:">"},t=[n.COMMENT("#","$",{contains:[r] -}),n.COMMENT("^=begin","^=end",{contains:[r],relevance:10 -}),n.COMMENT("^__END__","\\n$")],c={className:"subst",begin:/#\{/,end:/\}/, -keywords:s},d={className:"string",contains:[n.BACKSLASH_ESCAPE,c],variants:[{ -begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/, -end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{ -begin:/%[qQwWx]?/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/, -end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{ -begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{ -begin:/<<[-~]?'?(\w+)\n(?:[^\n]*\n)*?\s*\1\b/,returnBegin:!0,contains:[{ -begin:/<<[-~]?'?/},n.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/, -contains:[n.BACKSLASH_ESCAPE,c]})]}]},g="[0-9](_?[0-9])*",l={className:"number", -relevance:0,variants:[{ -begin:`\\b([1-9](_?[0-9])*|0)(\\.(${g}))?([eE][+-]?(${g})|r)?i?\\b`},{ -begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b" -},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{ -begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{ -begin:"\\b0(_?[0-7])+r?i?\\b"}]},o={className:"params",begin:"\\(",end:"\\)", -endsParent:!0,keywords:s},_=[d,{className:"class",beginKeywords:"class module", -end:"$|;",illegal:/=/,contains:[n.inherit(n.TITLE_MODE,{ -begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|!)?"}),{begin:"<\\s*",contains:[{ -begin:"("+n.IDENT_RE+"::)?"+n.IDENT_RE}]}].concat(t)},{className:"function", -begin:e(/def\s*/,(a=i+"\\s*(\\(|;|$)",e("(?=",a,")"))),keywords:"def",end:"$|;", -contains:[n.inherit(n.TITLE_MODE,{begin:i}),o].concat(t)},{begin:n.IDENT_RE+"::" -},{className:"symbol",begin:n.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{ -className:"symbol",begin:":(?!\\s)",contains:[d,{begin:i}],relevance:0},l,{ -className:"variable", -begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{ -className:"params",begin:/\|/,end:/\|/,relevance:0,keywords:s},{ -begin:"("+n.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{ -className:"regexp",contains:[n.BACKSLASH_ESCAPE,c],illegal:/\n/,variants:[{ -begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(", -end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}] -}].concat(b,t),relevance:0}].concat(b,t);c.contains=_,o.contains=_;var E=[{ -begin:/^\s*=>/,starts:{end:"$",contains:_}},{className:"meta", -begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>)(?=[ ])", -starts:{end:"$",contains:_}}];return t.unshift(b),{name:"Ruby", -aliases:["rb","gemspec","podspec","thor","irb"],keywords:s,illegal:/\/\*/, -contains:[n.SHEBANG({binary:"ruby"})].concat(E).concat(t).concat(_)}}})()); -hljs.registerLanguage("rust",(()=>{"use strict";return e=>{ -const n="([ui](8|16|32|64|128|size)|f(32|64))?",t="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!" -;return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?", -keyword:"abstract as async await become box break const continue crate do dyn else enum extern false final fn for if impl in let loop macro match mod move mut override priv pub ref return self Self static struct super trait true try type typeof unsafe unsized use virtual where while yield", -literal:"true false Some None Ok Err",built_in:t},illegal:""}]}}})()); -hljs.registerLanguage("scss",(()=>{"use strict";return e=>{var t="@[a-z-]+",i={ -className:"variable",begin:"(\\$[a-zA-Z-][a-zA-Z0-9_-]*)\\b"},r={ -className:"number",begin:"#[0-9A-Fa-f]+"} -;return e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE, -e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{name:"SCSS",case_insensitive:!0, -illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{ -className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{ -className:"selector-attr",begin:"\\[",end:"\\]",illegal:"$"},{ -className:"selector-tag", -begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b", -relevance:0},{className:"selector-pseudo", -begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)" -},{className:"selector-pseudo", -begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)" -},i,{className:"attribute", -begin:"\\b(src|z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b", -illegal:"[^\\s]"},{ -begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b" -},{begin:":",end:";", -contains:[i,r,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{ -className:"meta",begin:"!important"}]},{begin:"@(page|font-face)",lexemes:t, -keywords:"@page @font-face"},{begin:"@",end:"[{;]",returnBegin:!0, -keywords:"and or not only",contains:[{begin:t,className:"keyword" -},i,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,r,e.CSS_NUMBER_MODE]}]}}})()); -hljs.registerLanguage("shell",(()=>{"use strict";return s=>({ -name:"Shell Session",aliases:["console"],contains:[{className:"meta", -begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#]/,starts:{end:/[^\\](?=\s*$)/, -subLanguage:"bash"}}]})})()); -hljs.registerLanguage("sql",(()=>{"use strict";return e=>{ -var t=e.COMMENT("--","$");return{name:"SQL",case_insensitive:!0, -illegal:/[<>{}*]/,contains:[{ -beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with", -end:/;/,endsWithParent:!0,keywords:{$pattern:/[\w\.]+/, -keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek", -literal:"true false null unknown", -built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varchar2 varying void" -},contains:[{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{ -className:"string",begin:'"',end:'"',contains:[{begin:'""'}]},{ -className:"string",begin:"`",end:"`" -},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE] -},e.C_BLOCK_COMMENT_MODE,t,e.HASH_COMMENT_MODE]}}})()); -hljs.registerLanguage("swift",(()=>{"use strict";return e=>{var i={ -$pattern:/[\w#]+/, -keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set some static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet", -literal:"true false nil", -built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c compactMap contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip" -},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),t={className:"subst", -begin:/\\\(/,end:"\\)",keywords:i,contains:[]},a={className:"string", -contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"""/,end:/"""/},{begin:/"/, -end:/"/}]},r="([0-9a-fA-F]_*)+",s={className:"number",relevance:0,variants:[{ -begin:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{ -begin:`\\b0x(${r})(\\.(${r}))?([pP][+-]?(([0-9]_*)+))?\\b`},{ -begin:/\b0o([0-7]_*)+\b/},{begin:/\b0b([01]_*)+\b/}]};return t.contains=[s],{ -name:"Swift",keywords:i,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type", -begin:"\\b[A-Z][\\w\xc0-\u02b8']*[!?]"},{className:"type", -begin:"\\b[A-Z][\\w\xc0-\u02b8']*",relevance:0},s,{className:"function", -beginKeywords:"func",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{ -begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{begin://},{className:"params", -begin:/\(/,end:/\)/,endsParent:!0,keywords:i, -contains:["self",s,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}], -illegal:/\[|%/},{className:"class", -beginKeywords:"struct protocol class extension enum",keywords:i,end:"\\{", -excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{ -begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{className:"meta", -begin:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain|@dynamicMemberLookup|@propertyWrapper|@main)\\b" -},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n],relevance:0 -}]}}})()); -hljs.registerLanguage("typescript",(()=>{"use strict" -;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) -;function t(e){return i("(?=",e,")")}function i(...e){return e.map((e=>{ -return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return r=>{ -const c={$pattern:e, -keyword:n.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]).join(" "), -literal:a.join(" "), -built_in:s.concat(["any","void","number","boolean","string","object","never","enum"]).join(" ") -},o={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},l=(e,n,a)=>{ -const s=e.contains.findIndex((e=>e.label===n)) -;if(-1===s)throw Error("can not find mode to replace");e.contains.splice(s,1,a) -},b=(r=>{const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/, -end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ -const a=e[0].length+e.index,s=e.input[a];"<"!==s?">"===s&&(((e,{after:n})=>{ -const a="", -returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ -begin:r.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 -},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f}]}] -},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ -variants:[{begin:"<>",end:""},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, -end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, -contains:["self"]}]}],relevance:0},{className:"function", -beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, -contains:["self",r.inherit(r.TITLE_MODE,{begin:c}),A],illegal:/%/},{ -beginKeywords:"while if switch catch for"},{className:"function", -begin:r.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", -returnBegin:!0,contains:[A,r.inherit(r.TITLE_MODE,{begin:c})]},{variants:[{ -begin:"\\."+c},{begin:"\\$"+c}],relevance:0},{className:"class", -beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"[\]]/,contains:[{ -beginKeywords:"extends"},r.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/, -end:/[{;]/,excludeEnd:!0,contains:[r.inherit(r.TITLE_MODE,{begin:c}),"self",A] -},{begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", -contains:[r.inherit(r.TITLE_MODE,{begin:c}),{begin:/\(\)/},A]},{begin:/\$[(.]/}] -}})(r) -;return Object.assign(b.keywords,c),b.exports.PARAMS_CONTAINS.push(o),b.contains=b.contains.concat([o,{ -beginKeywords:"namespace",end:/\{/,excludeEnd:!0},{beginKeywords:"interface", -end:/\{/,excludeEnd:!0,keywords:"interface extends" -}]),l(b,"shebang",r.SHEBANG()),l(b,"use_strict",{className:"meta",relevance:10, -begin:/^\s*['"]use strict['"]/ -}),b.contains.find((e=>"function"===e.className)).relevance=0,Object.assign(b,{ -name:"TypeScript",aliases:["ts"]}),b}})()); -hljs.registerLanguage("yaml",(()=>{"use strict";return e=>{ -var n="true false yes no null",a="[\\w#;/?:@&=+$,.~*'()[\\]]+",s={ -className:"string",relevance:0,variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/ -},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,{className:"template-variable", -variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]}]},i=e.inherit(s,{ -variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),l={ -end:",",endsWithParent:!0,excludeEnd:!0,contains:[],keywords:n,relevance:0},t={ -begin:/\{/,end:/\}/,contains:[l],illegal:"\\n",relevance:0},g={begin:"\\[", -end:"\\]",contains:[l],illegal:"\\n",relevance:0},b=[{className:"attr", -variants:[{begin:"\\w[\\w :\\/.-]*:(?=[ \t]|$)"},{ -begin:'"\\w[\\w :\\/.-]*":(?=[ \t]|$)'},{begin:"'\\w[\\w :\\/.-]*':(?=[ \t]|$)" -}]},{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string", -begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{ -begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0, -relevance:0},{className:"type",begin:"!\\w+!"+a},{className:"type", -begin:"!<"+a+">"},{className:"type",begin:"!"+a},{className:"type",begin:"!!"+a -},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta", -begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)", -relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},{ -className:"number", -begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0-9]*)?([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?\\b" -},{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},t,g,s],r=[...b] -;return r.pop(),r.push(i),l.contains=r,{name:"YAML",case_insensitive:!0, -aliases:["yml","YAML"],contains:b}}})()); \ No newline at end of file diff --git a/static/ico/executable.ico b/static/ico/executable.ico deleted file mode 100755 index 227c96d4..00000000 Binary files a/static/ico/executable.ico and /dev/null differ diff --git a/static/ico/loudspeaker_rays.ico b/static/ico/loudspeaker_rays.ico deleted file mode 100755 index 5ad2433c..00000000 Binary files a/static/ico/loudspeaker_rays.ico and /dev/null differ diff --git a/static/ico/user_world.ico b/static/ico/user_world.ico deleted file mode 100755 index d76a5ec2..00000000 Binary files a/static/ico/user_world.ico and /dev/null differ diff --git a/static/ico/windows.ico b/static/ico/windows.ico deleted file mode 100755 index 296d4cf3..00000000 Binary files a/static/ico/windows.ico and /dev/null differ diff --git a/uap-core b/uap-core deleted file mode 160000 index bbd43aed..00000000 --- a/uap-core +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bbd43aed9a623486191a33c3af9e463e89c85f7a diff --git a/wasm/.gitignore b/wasm/.gitignore deleted file mode 100644 index 4e301317..00000000 --- a/wasm/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/target -**/*.rs.bk -Cargo.lock -bin/ -pkg/ -wasm-pack.log diff --git a/wasm/Cargo.toml b/wasm/Cargo.toml deleted file mode 100644 index e64c5989..00000000 --- a/wasm/Cargo.toml +++ /dev/null @@ -1,126 +0,0 @@ -[package] -authors = ["Larry Fantasy "] -edition = "2018" -name = "rustgym-wasm" -version = "0.1.0" - -[lib] -crate-type = ["cdylib", "rlib"] - -[features] -default = ["console_error_panic_hook"] - -[dependencies] -nes = { path = "../nes" } -anyhow = "1.0.41" -bincode = "1.3.3" -console_error_panic_hook = { version = "0.1.6", optional = true } -derive-new = "0.5.8" -js-sys = "0.3.51" -lazy_static = "1.4.0" -log = "0.4.14" -md5 = "0.7.0" -rustgym-consts = { path = "../consts" } -rustgym-msg = { path = "../msg" } -serde = { version = "1.0.119", features = ["derive"] } -serde_json = "1.0.61" -uuid = { version = "0.8.2", features = ["serde", "v4", "wasm-bindgen"] } -wasm-bindgen = { version = "0.2.74", features = ["serde-serialize"] } -wasm-bindgen-futures = "0.4.24" -wasm-bindgen-test = "0.3.24" -web-sys = { version = "0.3.51", features = [ - "BinaryType", - "Blob", - "BlobEvent", - "CanvasRenderingContext2d", - "ConstrainLongRange", - "CssStyleDeclaration", - "Document", - "DomTokenList", - "Element", - "EventListener", - "ErrorEvent", - "FileReader", - "Gamepad", - "GamepadButton", - "GamepadMappingType", - "HtmlAnchorElement", - "HtmlButtonElement", - "HtmlCanvasElement", - "HtmlCollection", - "HtmlDivElement", - "HtmlInputElement", - "HtmlLiElement", - "HtmlParagraphElement", - "HtmlTableCellElement", - "HtmlTableElement", - "HtmlTableRowElement", - "HtmlTableSectionElement", - "HtmlUListElement", - "HtmlVideoElement", - "InputEvent", - "KeyboardEvent", - "Location", - "MediaCapabilities", - "MediaDevices", - "MediaRecorder", - "MediaRecorderOptions", - "MediaSource", - "MediaStream", - "MediaStreamConstraints", - "MediaStreamTrack", - "MediaTrackConstraints", - "MediaTrackSupportedConstraints", - "MessageEvent", - "MouseEvent", - "Navigator", - "Node", - "Performance", - "ProgressEvent", - "RecordingState", - "Request", - "RequestInit", - "RequestMode", - "Response", - "RtcConfiguration", - "RtcDataChannel", - "RtcDataChannelEvent", - "RtcIceCandidate", - "RtcIceCandidateInit", - "RtcIceConnectionState", - "RtcIceGatheringState", - "RtcIceServer", - "RtcIceTransportPolicy", - "RtcPeerConnection", - "RtcPeerConnectionIceEvent", - "RtcRtpEncodingParameters", - "RtcRtpReceiver", - "RtcRtpSender", - "RtcRtpTransceiver", - "RtcSdpType", - "RtcSessionDescription", - "RtcSessionDescriptionInit", - "RtcSignalingState", - "RtcSignalingState", - "RtcStatsReport", - "RtcTrackEvent", - "SourceBuffer", - "SourceBufferAppendMode", - "WebGl2RenderingContext", - "WebGlBuffer", - "WebGlContextAttributes", - "WebGlProgram", - "WebGlRenderingContext", - "WebGlShader", - "WebGlTexture", - "WebGlUniformLocation", - "WebGlVertexArrayObject", - "WebSocket", - "Window", -] } -webrtc-sdp = "0.3.8" -png = "0.17.2" -rand = "0.8.4" - -[dev-dependencies] -wasm-bindgen-test = "0.3.24" diff --git a/wasm/cubetexture.png b/wasm/cubetexture.png deleted file mode 100644 index 078b19a5..00000000 Binary files a/wasm/cubetexture.png and /dev/null differ diff --git a/wasm/helper.js b/wasm/helper.js deleted file mode 100644 index f2b6a1ac..00000000 --- a/wasm/helper.js +++ /dev/null @@ -1,9 +0,0 @@ -export function constraints() { - return { - video: { - width: {ideal: 320}, - height: {ideal: 240} - }, - audio: true, - }; -} diff --git a/wasm/shaders/nes.frag b/wasm/shaders/nes.frag deleted file mode 100644 index 0e818f0d..00000000 --- a/wasm/shaders/nes.frag +++ /dev/null @@ -1,14 +0,0 @@ -#version 300 es -precision highp float; - -in vec2 v_tex_coord; -out vec4 FragColor; -uniform sampler2D u_texture; - -void main() { - // uvec2 coord = uvec2(v_tex_coord); - // uint i = coord[1] * 8u + coord[0]; - // vec4 i_color = vec4(u_rgbav[i * 4u], u_rgbav[i * 4u + 1u], - // u_rgbav[i * 4u + 2u], u_rgbav[i * 4u + 3u]); - FragColor = texture(u_texture, v_tex_coord); -} diff --git a/wasm/shaders/nes.vert b/wasm/shaders/nes.vert deleted file mode 100644 index ccd3fb28..00000000 --- a/wasm/shaders/nes.vert +++ /dev/null @@ -1,14 +0,0 @@ -#version 300 es - -in uvec2 a_position; -const vec2 u_resolution = vec2(256.0, 256.0); -out vec2 v_tex_coord; - -void main() { - vec2 a_position_f = vec2(a_position); - vec2 zero_to_one = a_position_f / u_resolution; - vec2 zero_to_two = zero_to_one * 2.0; - vec2 clip_space = zero_to_two - 1.0; - v_tex_coord = vec2(a_position_f) / u_resolution; - gl_Position = vec4(clip_space * vec2(1, -1), 0, 1); -} \ No newline at end of file diff --git a/wasm/src/client.rs b/wasm/src/client.rs deleted file mode 100644 index 2b2e7e2f..00000000 --- a/wasm/src/client.rs +++ /dev/null @@ -1,390 +0,0 @@ -use crate::desktop::Desktop; -use crate::media::MediaClient; -use crate::pc::PeerConnection; -use crate::searchbar::*; -use crate::utils::*; -use js_sys::JsString; -use js_sys::Reflect; -use log::info; -use rustgym_msg::*; -use std::cell::RefCell; -use std::collections::HashMap; -use uuid::Uuid; -use wasm_bindgen::prelude::*; -use wasm_bindgen::*; -use wasm_bindgen_futures::*; -use web_sys::{ - MediaStream, MediaStreamTrack, MessageEvent, RtcIceCandidate, RtcIceCandidateInit, RtcSdpType, - RtcSessionDescriptionInit, WebSocket, -}; - -#[derive(Debug, Clone)] -pub struct Client { - client_info: Option, - ws: WebSocket, - _desktop: Desktop, - searchbar: Option, - media_client: Option, - media_stream: Option, - pcs: HashMap, -} - -impl Client { - pub fn new() -> Self { - let client_info = None; - let media_client = None; - let searchbar = None; - let media_stream = None; - let pcs = HashMap::new(); - let _desktop = Desktop::new(start_menu(), start_button()); - - let ws = WebSocket::new(&wsurl()).expect("WebSocket"); - let onmessage_cb = Closure::wrap(Box::new(move |e: MessageEvent| { - let js_json: JsString = e.data().dyn_into().unwrap(); - let rust_json: String = js_json.into(); - match serde_json::from_str::(&rust_json) { - Ok(msg) => { - process(msg); - } - Err(err) => { - info!("{}", err); - } - } - }) as Box); - ws.set_onmessage(Some(onmessage_cb.as_ref().unchecked_ref())); - onmessage_cb.forget(); - - Client { - ws, - client_info, - media_client, - media_stream, - _desktop, - searchbar, - pcs, - } - } - - fn on_stream_start(&self, client_uuid: Uuid) -> Result<(), JsValue> { - self.send_json(MsgIn::StreamStart { client_uuid }) - } - - fn on_offer(&self, caller: Uuid, callee: Uuid, offer_sdp: String) -> Result<(), JsValue> { - self.send_json(MsgIn::Offer { - caller, - callee, - offer_sdp, - }) - } - - fn on_answer(&self, caller: Uuid, callee: Uuid, answer_sdp: String) -> Result<(), JsValue> { - self.send_json(MsgIn::Answer { - caller, - callee, - answer_sdp, - }) - } - - pub fn on_ice_candidate( - &self, - local: Uuid, - remote: Uuid, - candidate: String, - sdp_mid: String, - sdp_m_line_index: u16, - ) -> Result<(), JsValue> { - self.send_json(MsgIn::IceCandidate { - local, - remote, - candidate, - sdp_mid, - sdp_m_line_index, - }) - } - - pub fn on_search_text_change(&self, search_text: String) -> Result<(), JsValue> { - self.send_json(MsgIn::SearchText(search_text)) - } - - pub fn on_query_text(&self, query_text: String) -> Result<(), JsValue> { - let searchbar = self.searchbar.as_ref().expect("searchbar"); - searchbar.update_search_input(&query_text); - searchbar.close_search_suggestions()?; - self.send_json(MsgIn::QueryText(query_text))?; - Ok(()) - } - - fn send_json(&self, msg: MsgIn) -> Result<(), JsValue> { - let str = serde_json::to_string(&msg).expect("to_string"); - self.ws.send_with_str(&str) - } -} - -pub fn process(message: MsgOut) { - spawn_local(async move { - use MsgOut::*; - let res: Result<(), JsValue> = match message { - Ping => Ok(()), - Pong => Ok(()), - SearchSuggestions(suggestions) => render_search_suggestions(suggestions), - QueryResults(results) => render_query_results(results), - RegistorClient(client_info) => process_register_client(client_info).await, - UnRegistorClient(_) => Ok(()), - StreamStart { client_uuid } => start_call(client_uuid).await, - Offer { - caller, - callee, - offer_sdp, - } => process_offer(caller, callee, offer_sdp).await, - Answer { - caller, - callee, - answer_sdp, - } => process_answer(caller, callee, answer_sdp).await, - IceCandidate { - local, - remote, - candidate, - sdp_mid, - sdp_m_line_index, - } => process_ice_candidate(local, remote, candidate, sdp_mid, sdp_m_line_index).await, - SessionClients(_) => Ok(()), - AllClients(_) => Ok(()), - }; - match res { - Ok(_) => {} - Err(err) => { - info!("{:?}", err); - } - } - }); -} - -async fn process_ice_candidate( - _local: Uuid, - remote: Uuid, - candidate: String, - sdp_mid: String, - sdp_m_line_index: u16, -) -> Result<(), JsValue> { - if let Some(pc) = get_client().pcs.get(&remote) { - info!("ice {} {}", remote, candidate); - let mut candidate_init = RtcIceCandidateInit::new(&candidate); - candidate_init.sdp_mid(Some(&sdp_mid)); - candidate_init.sdp_m_line_index(Some(sdp_m_line_index)); - let candidate_obj = RtcIceCandidate::new(&candidate_init)?; - let promise = pc.add_ice_candidate_with_opt_rtc_ice_candidate(Some(&candidate_obj)); - JsFuture::from(promise).await?; - } - Ok(()) -} - -async fn process_offer(caller: Uuid, callee: Uuid, offer_sdp: String) -> Result<(), JsValue> { - info!("process_offer"); - let media_stream = get_client().media_stream.expect("media_stream"); - let (pc, answer_sdp) = create_answer(caller, callee, &media_stream, offer_sdp).await?; - set_peerconnection(caller, pc); - get_client().on_answer(caller, callee, answer_sdp)?; - Ok(()) -} - -async fn process_answer(_caller: Uuid, callee: Uuid, answer_sdp: String) -> Result<(), JsValue> { - info!("process_answer"); - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - answer_obj.sdp(&answer_sdp); - let srd_promise = get_client() - .pcs - .get(&callee) - .expect("pc") - .set_remote_description(&answer_obj); - JsFuture::from(srd_promise).await?; - Ok(()) -} - -async fn process_register_client(client_info: ClientInfo) -> Result<(), JsValue> { - if get_client().client_info.is_none() { - info!("set local {}", client_info.client_uuid); - info!( - "{:?}", - client_info.user_agent.as_ref().expect("useragent").family - ); - let client_uuid = client_info.client_uuid; - if client_info.is_media_supported() { - let media_stream = get_media_stream().await?; - let media_client = get_client().media_client.expect("media_client"); - media_client.init_local_video(&media_stream)?; - set_media_stream(media_stream); - get_client().on_stream_start(client_uuid)?; - } - set_client_info(client_info); - } - Ok(()) -} - -async fn start_call(client_uuid: Uuid) -> Result<(), JsValue> { - let local_client_info = get_client().client_info.expect("local_client_info"); - let caller = local_client_info.client_uuid; - let callee = client_uuid; - if callee != caller { - info!("start_call"); - let (pc, offer_sdp) = create_offer( - caller, - callee, - &get_client().media_stream.expect("media_stream"), - ) - .await?; - set_peerconnection(callee, pc); - get_client().on_offer(caller, callee, offer_sdp) - } else { - Ok(()) - } -} - -async fn create_offer( - caller: Uuid, - callee: Uuid, - media_stream: &MediaStream, -) -> Result<(PeerConnection, String), JsValue> { - let local_client_info = get_client().client_info.expect("local_client_info"); - let pc = PeerConnection::new(caller, callee, local_client_info.ice_servers)?; - let tracks = media_stream.get_tracks().to_vec(); - for item in tracks { - let media_stream_track: MediaStreamTrack = item.dyn_into().unwrap(); - pc.add_track_0(&media_stream_track, media_stream); - } - - let offer = JsFuture::from(pc.create_offer()).await?; - let offer_sdp = Reflect::get(&offer, &JsValue::from_str("sdp"))? - .as_string() - .unwrap(); - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); - let sld_promise = pc.set_local_description(&offer_obj); - JsFuture::from(sld_promise).await?; - Ok((pc, offer_sdp)) -} - -async fn create_answer( - caller: Uuid, - callee: Uuid, - media_stream: &MediaStream, - offer_sdp: String, -) -> Result<(PeerConnection, String), JsValue> { - info!("create_answer"); - let local_client_info = get_client().client_info.expect("local_client_info"); - let pc = PeerConnection::new(callee, caller, local_client_info.ice_servers)?; - let mut offer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Offer); - offer_obj.sdp(&offer_sdp); - let srd_promise = pc.set_remote_description(&offer_obj); - JsFuture::from(srd_promise).await?; - - let tracks = media_stream.get_tracks().to_vec(); - for item in tracks { - let media_stream_track: MediaStreamTrack = item.dyn_into().unwrap(); - pc.add_track_0(&media_stream_track, media_stream); - } - - let answer = JsFuture::from(pc.create_answer()).await?; - let mut answer_obj = RtcSessionDescriptionInit::new(RtcSdpType::Answer); - let answer_sdp = Reflect::get(&answer, &JsValue::from_str("sdp"))? - .as_string() - .unwrap(); - answer_obj.sdp(&answer_sdp); - let sld_promise = pc.set_local_description(&answer_obj); - JsFuture::from(sld_promise).await?; - Ok((pc, answer_sdp)) -} - -fn render_search_suggestions(search_suggestions: Vec) -> Result<(), JsValue> { - info!("{:?}", search_suggestions); - get_client() - .searchbar - .expect("searchbar") - .update_search_suggestions(search_suggestions) -} - -fn render_query_results(query_results: Vec) -> Result<(), JsValue> { - info!("{:?}", query_results); - get_client() - .searchbar - .expect("searchbar") - .update_query_results(query_results) -} - -thread_local! { - pub static CLIENT: RefCell = RefCell::new(Client::new()); -} - -pub fn get_client() -> Client { - CLIENT.with(|client| client.borrow_mut().clone()) -} - -pub fn set_client_info(client_info: ClientInfo) { - CLIENT.with(|client| client.borrow_mut().client_info = Some(client_info)); -} - -pub fn set_searchbar(searchbar: SearchBar) { - CLIENT.with(|client| client.borrow_mut().searchbar = Some(searchbar)); -} - -pub fn set_media_client(media_client: MediaClient) { - CLIENT.with(|client| client.borrow_mut().media_client = Some(media_client)); -} - -pub fn add_remote_video(remote: Uuid) { - CLIENT.with(|client| { - client - .borrow_mut() - .media_client - .as_mut() - .expect("media_client") - .add_remote_video(remote) - .expect("add_remote_video"); - }); -} - -pub fn remove_remote_video(remote: Uuid) { - CLIENT.with(|client| { - client - .borrow_mut() - .media_client - .as_mut() - .expect("media_client") - .remove_remote_video(remote) - .expect("remove_remote_video"); - }); -} - -pub fn add_remote_track(remote: Uuid, track: MediaStreamTrack) { - CLIENT.with(|client| match track.kind().as_ref() { - "video" => { - client - .borrow_mut() - .media_client - .as_mut() - .expect("media_client") - .add_remote_video_track(remote, track) - .expect("add_remote_video_track"); - } - "audio" => { - client - .borrow_mut() - .media_client - .as_mut() - .expect("media_client") - .add_remote_audio_track(remote, track) - .expect("add_remote_audio_track"); - } - _ => { - info!("{:?} {}", track, track.kind()); - } - }); -} - -fn set_media_stream(media_stream: MediaStream) { - CLIENT.with(|client| client.borrow_mut().media_stream = Some(media_stream)); -} - -fn set_peerconnection(remote_uuid: Uuid, pc: PeerConnection) { - CLIENT.with(|client| client.borrow_mut().pcs.insert(remote_uuid, pc)); -} diff --git a/wasm/src/desktop.rs b/wasm/src/desktop.rs deleted file mode 100644 index 87b88655..00000000 --- a/wasm/src/desktop.rs +++ /dev/null @@ -1,26 +0,0 @@ -use std::boxed::Box; -use wasm_bindgen::prelude::*; -use wasm_bindgen::*; -use web_sys::{HtmlButtonElement, HtmlDivElement, MouseEvent}; - -#[derive(Debug, Clone)] -pub struct Desktop { - _start_menu: HtmlDivElement, - _start_button: HtmlButtonElement, -} - -impl Desktop { - pub fn new(_start_menu: HtmlDivElement, _start_button: HtmlButtonElement) -> Desktop { - let start_menu_clone = _start_menu.clone(); - let click_cb = Closure::wrap(Box::new(move |_e: MouseEvent| { - let class_list = start_menu_clone.class_list(); - class_list.toggle("hidden").unwrap(); - }) as Box); - _start_button.set_onclick(Some(click_cb.as_ref().unchecked_ref())); - click_cb.forget(); - Desktop { - _start_menu, - _start_button, - } - } -} diff --git a/wasm/src/lib.rs b/wasm/src/lib.rs deleted file mode 100644 index b918e392..00000000 --- a/wasm/src/lib.rs +++ /dev/null @@ -1,74 +0,0 @@ -#[macro_use] -extern crate derive_new; - -mod client; -mod desktop; -mod logger; -mod media; -mod nes_emulator; -mod pc; -mod searchbar; -mod shaders; -mod utils; - -pub use client::*; -pub use media::*; -pub use nes_emulator::*; -pub use searchbar::*; -pub use shaders::*; -pub use utils::*; - -use log::info; -use std::cell::RefCell; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; -use web_sys::{window, KeyboardEvent, Window}; - -#[wasm_bindgen] -pub async fn start() -> Result<(), JsValue> { - logger::init()?; - set_panic_hook(); - get_client(); - let media_client = MediaClient::new(local_video(), remote_videos()); - set_media_client(media_client); - Ok(()) -} - -#[wasm_bindgen] -pub async fn start_find() -> Result<(), JsValue> { - info!("start_find"); - let searchbar = SearchBar::new( - search_input(), - search_suggestions(), - search_suggestions_parent(), - search_table(), - search_results(), - ); - set_searchbar(searchbar); - Ok(()) -} - -thread_local! { - pub static PAUSED: RefCell = RefCell::new(false); -} - -#[wasm_bindgen] -pub async fn start_nes(filename: String, md5: String) -> Result<(), JsValue> { - info!("start_nes {:?} {:?}", filename, md5); - let window: Window = window().expect("window"); - let closure = Closure::wrap(Box::new(move |event: KeyboardEvent| { - info!("{:?}", event.key()); - if event.key() == " " { - PAUSED.with(|paused| { - let value = *paused.borrow(); - *paused.borrow_mut() = !value; - }); - } - }) as Box); - window.add_event_listener_with_callback("keydown", closure.as_ref().unchecked_ref())?; - closure.forget(); - let mut nes_emulator = NesEmulator::new(nes_canvas(), filename, md5); - nes_emulator.load_rom().await?; - nes_emulator.run(); - Ok(()) -} diff --git a/wasm/src/logger.rs b/wasm/src/logger.rs deleted file mode 100644 index f95c143a..00000000 --- a/wasm/src/logger.rs +++ /dev/null @@ -1,49 +0,0 @@ -use log::Level::*; -use log::{Metadata, Record}; -use rustgym_consts::*; -use wasm_bindgen::prelude::*; - -#[wasm_bindgen] -extern "C" { - #[wasm_bindgen(js_namespace = console)] - fn log(msg: &str, level: &str, message: &str); -} - -static LOGGER: Logger = Logger; - -struct Logger; - -impl log::Log for Logger { - fn enabled(&self, metadata: &Metadata) -> bool { - metadata.level() <= LOG_LEVEL - } - fn log(&self, record: &Record) { - if self.enabled(record.metadata()) { - log( - &format!( - "%c{}%c - {}::{} >> {}", - record.level(), - record.file_static().unwrap(), - record.line().unwrap(), - record.args(), - ), - match record.level() { - Error => "color: red;", - Warn => "color: yellow;", - Info => "color: green;", - Debug => "color: blue;", - Trace => "color: magenta;", - }, - "color: none;", - ); - } - } - - fn flush(&self) {} -} - -pub fn init() -> Result<(), JsValue> { - log::set_logger(&LOGGER) - .map(|_| log::set_max_level(LOG_LEVEL_FILTER)) - .map_err(|e| JsValue::from_str(&e.to_string())) -} diff --git a/wasm/src/media.rs b/wasm/src/media.rs deleted file mode 100644 index 1f7f33c1..00000000 --- a/wasm/src/media.rs +++ /dev/null @@ -1,93 +0,0 @@ -use crate::utils::*; -use log::info; -use std::collections::HashMap; -use uuid::Uuid; -use wasm_bindgen::*; -use web_sys::{HtmlDivElement, HtmlVideoElement, MediaStream, MediaStreamTrack}; - -#[derive(Debug, Clone)] -pub struct MediaClient { - local_video: HtmlVideoElement, - remote_videos: HtmlDivElement, - video_elements: HashMap, - media_streams: HashMap, - video_tracks: HashMap, - audio_tracks: HashMap, -} - -impl MediaClient { - pub fn new(local_video: HtmlVideoElement, remote_videos: HtmlDivElement) -> Self { - let video_elements = HashMap::new(); - let video_tracks = HashMap::new(); - let audio_tracks = HashMap::new(); - let media_streams = HashMap::new(); - MediaClient { - local_video, - remote_videos, - video_elements, - media_streams, - video_tracks, - audio_tracks, - } - } - - pub fn init_local_video(&self, cam_media_stream: &MediaStream) -> Result<(), JsValue> { - let video_only = MediaStream::new()?; - let video_track: MediaStreamTrack = - cam_media_stream.get_video_tracks().get(0).dyn_into()?; - video_only.add_track(&video_track); - self.local_video.set_src_object(Some(&video_only)); - Ok(()) - } - - pub fn add_remote_video(&mut self, remote: Uuid) -> Result<(), JsValue> { - if self.video_elements.get(&remote).is_none() { - let video = video(); - video.set_id(&remote.to_string()); - video.set_autoplay(true); - let media_stream = MediaStream::new()?; - if let Some(video_track) = self.video_tracks.get(&remote) { - media_stream.add_track(video_track); - } - if let Some(audio_track) = self.audio_tracks.get(&remote) { - media_stream.add_track(audio_track); - } - video.set_src_object(Some(&media_stream)); - let video_window = video_window(&remote.to_string(), &remote.to_string(), video); - self.media_streams.insert(remote, media_stream); - self.remote_videos.append_with_node_1(&video_window)?; - self.video_elements.insert(remote, video_window); - } - Ok(()) - } - - pub fn remove_remote_video(&mut self, remote: Uuid) -> Result<(), JsValue> { - self.video_tracks.remove(&remote); - self.audio_tracks.remove(&remote); - self.media_streams.remove(&remote); - if let Some(el) = self.video_elements.remove(&remote) { - self.remote_videos.remove_child(&el)?; - } else { - info!("else {}", remote); - } - Ok(()) - } - - pub fn add_remote_video_track( - &mut self, - remote: Uuid, - video_track: MediaStreamTrack, - ) -> Result<(), JsValue> { - self.video_tracks.insert(remote, video_track); - Ok(()) - } - - pub fn add_remote_audio_track( - &mut self, - remote: Uuid, - audio_track: MediaStreamTrack, - ) -> Result<(), JsValue> { - self.audio_tracks.insert(remote, audio_track); - Ok(()) - } -} diff --git a/wasm/src/nes_emulator.rs b/wasm/src/nes_emulator.rs deleted file mode 100644 index a6de56e3..00000000 --- a/wasm/src/nes_emulator.rs +++ /dev/null @@ -1,162 +0,0 @@ -use crate::*; -use log::{error, info}; -use nes::*; -use rand::prelude::*; -use std::cell::RefCell; -use std::collections::VecDeque; -use std::rc::Rc; -use wasm_bindgen::prelude::*; -use wasm_bindgen::JsCast; - -use web_sys::{ - HtmlCanvasElement, Request, RequestInit, WebGl2RenderingContext, WebGlContextAttributes, - WebGlProgram, WebGlTexture, WebGlUniformLocation, -}; - -struct Program { - shader_program: WebGlProgram, - a_position: u32, -} - -fn init(canvas: &HtmlCanvasElement) -> Result<(WebGl2RenderingContext, Program), JsValue> { - let mut attributes: WebGlContextAttributes = WebGlContextAttributes::default(); - attributes.antialias(false); - let ctx: WebGl2RenderingContext = canvas - .get_context_with_context_options("webgl2", &attributes)? - .unwrap() - .dyn_into()?; - let attributes = ctx.get_context_attributes().unwrap(); - info!("{:?}", attributes); - let nes_vert_shader = compile_shader(&ctx, VERTEX_SHADER, include_str!("../shaders/nes.vert"))?; - let nes_frag_shader = - compile_shader(&ctx, FRAGMENT_SHADER, include_str!("../shaders/nes.frag"))?; - let shader_program = link_program(&ctx, &nes_vert_shader, &nes_frag_shader)?; - let a_position = ctx.get_attrib_location(&shader_program, "a_position") as u32; - - let texture: WebGlTexture = ctx.create_texture().unwrap(); - ctx.bind_texture(TEXTURE_2D, Some(&texture)); - ctx.tex_parameteri(TEXTURE_2D, TEXTURE_MAG_FILTER, NEAREST as i32); - ctx.tex_parameteri(TEXTURE_2D, TEXTURE_MIN_FILTER, NEAREST as i32); - ctx.active_texture(TEXTURE0); - - let program = Program { - shader_program, - a_position, - }; - - Ok((ctx, program)) -} - -fn draw(ctx: &WebGl2RenderingContext, program: &Program, pixels: &[u8; 256 * 256 * 4]) { - ctx.use_program(Some(&program.shader_program)); - let buffer = ctx.create_buffer().unwrap(); - ctx.bind_buffer(ARRAY_BUFFER, Some(&buffer)); - ctx.vertex_attrib_i_pointer_with_i32(program.a_position, 2, UNSIGNED_INT, 8, 0); - ctx.enable_vertex_attrib_array(program.a_position); - let positions = [0, 0, 256, 0, 0, 256, 256, 256]; - let (_, bytes, _) = unsafe { positions.align_to::() }; - ctx.buffer_data_with_u8_array(ARRAY_BUFFER, bytes, STATIC_DRAW); - ctx.tex_image_2d_with_i32_and_i32_and_i32_and_format_and_type_and_opt_u8_array( - TEXTURE_2D, - 0, - RGBA as i32, - 256, - 256, - 0, - RGBA, - UNSIGNED_BYTE, - Some(pixels), - ) - .unwrap(); - ctx.draw_arrays(TRIANGLE_STRIP, 0, 4); -} - -pub struct NesEmulator { - ctx: WebGl2RenderingContext, - program: Program, - filename: String, - md5: String, - console: Option, -} - -impl NesEmulator { - pub fn new(canvas: HtmlCanvasElement, filename: String, md5: String) -> NesEmulator { - let (ctx, program) = init(&canvas).unwrap(); - info!("{:?}", ctx.get_parameter(MAX_VERTEX_UNIFORM_COMPONENTS)); - info!("{:?}", ctx.get_parameter(MAX_TEXTURE_IMAGE_UNITS)); - let console = None; - NesEmulator { - ctx, - program, - filename, - md5, - console, - } - } - - pub async fn load_rom(&mut self) -> Result<(), JsValue> { - let mut opts = RequestInit::new(); - opts.method("GET"); - let url = format!("/data/nes/{}", self.filename); - let request = Request::new_with_str_and_init(&url, &opts)?; - let bytes = fetch_bytes_with_request(&request).await?; - let digest = md5::compute(&bytes[16..]); - if self.md5 != format!("{:X}", digest) { - error!("md5"); - } - let rom = VirtualFile::new(&self.filename, &bytes); - let console = Console::new(&rom, Box::new(BaseRenderer::default())); - self.console = Some(console); - Ok(()) - } - - pub fn run(mut self) { - let f = Rc::new(RefCell::new(None)); - let g = f.clone(); - let ctx = self.ctx.clone(); - let mut last: f64 = 0.0; - let mut queue: VecDeque = VecDeque::new(); - let mut sum: f64 = 0.0; - let queue_size = 100; - - let mut console = self.console.take().unwrap(); - console.control_manager = ControlManager::new(EmulationFlags::default(), || get_gamepads()); - let mut bytes = [0; 256 * 256 * 4]; - *g.borrow_mut() = Some(Closure::wrap(Box::new(move || { - PAUSED.with(|value| { - let paused = *value.borrow(); - if !paused { - console.run_single_frame(); - randomize_rgbav(&mut bytes); - } - }); - let now = now(); - let delta = now - last; - let fps = 1000.0 / delta; - queue.push_back(fps); - sum += fps; - if queue.len() > queue_size { - sum -= queue.pop_front().unwrap(); - } - let average = sum / queue.len() as f64; - let status = format!("FPS: {:.1}", average); - fps_p().set_text_content(Some(&status)); - last = now; - ctx.clear_color(0.0, 0.0, 0.0, 1.0); - ctx.clear(COLOR_BUFFER_BIT); - draw(&ctx, &self.program, &bytes); - request_animation_frame(f.borrow().as_ref().unwrap()); - }) as Box)); - request_animation_frame(g.borrow().as_ref().unwrap()); - } -} - -fn randomize_rgbav(rgbav: &mut [u8]) { - let n = rgbav.len() / 4; - for i in 0..n { - rgbav[i * 4] = random::(); - rgbav[i * 4 + 1] = random::(); - rgbav[i * 4 + 2] = random::(); - rgbav[i * 4 + 3] = 255; - } -} diff --git a/wasm/src/pc.rs b/wasm/src/pc.rs deleted file mode 100644 index 61e935d1..00000000 --- a/wasm/src/pc.rs +++ /dev/null @@ -1,114 +0,0 @@ -use crate::client::*; -use log::info; -use rustgym_msg::*; -use std::ops::Deref; -use uuid::Uuid; -use wasm_bindgen::prelude::*; -use wasm_bindgen::*; -use web_sys::{ - Event, RtcConfiguration, RtcIceConnectionState, RtcPeerConnection, RtcPeerConnectionIceEvent, - RtcTrackEvent, -}; - -#[derive(Debug, Clone)] -pub struct PeerConnection { - _local: Uuid, - _remote: Uuid, - pc: RtcPeerConnection, -} - -impl PeerConnection { - pub fn new(local: Uuid, remote: Uuid, ice_servers: Vec) -> Result { - let mut config = RtcConfiguration::new(); - info!("{:?}", ice_servers); - let ice_servers = JsValue::from_serde(&ice_servers) - .map_err(|e| JsValue::from_str(&format!("{:?}", e)))?; - config.ice_servers(&ice_servers); - let pc = RtcPeerConnection::new_with_configuration(&config)?; - let onicecandidate_cb = Closure::wrap(Box::new(move |e: RtcPeerConnectionIceEvent| { - if let Some(candidate_obj) = e.candidate() { - let candidate: String = candidate_obj.candidate(); - info!("{}", candidate); - let sdp_mid: String = candidate_obj.sdp_mid().expect("sdp_mid"); - let sdp_m_line_index: u16 = - candidate_obj.sdp_m_line_index().expect("sdp_m_line_index"); - get_client() - .on_ice_candidate(local, remote, candidate, sdp_mid, sdp_m_line_index) - .expect("on_ice_candidate"); - } - }) as Box); - pc.set_onicecandidate(Some(onicecandidate_cb.as_ref().unchecked_ref())); - onicecandidate_cb.forget(); - - let pc_clone = pc.clone(); - let oniceconnectionstatechange_cb = Closure::wrap(Box::new(move |_e: Event| { - use RtcIceConnectionState::*; - let state = match pc_clone.ice_connection_state() { - New => "new", - Checking => "checking", - Connected => { - add_remote_video(remote); - "connected" - } - Completed => "completed", - Failed => "failed", - Disconnected => { - remove_remote_video(remote); - "disconnected" - } - Closed => "closed", - _ => "", - }; - info!("{} {:?}", remote, state); - }) as Box); - pc.set_oniceconnectionstatechange(Some( - oniceconnectionstatechange_cb.as_ref().unchecked_ref(), - )); - oniceconnectionstatechange_cb.forget(); - - let pc_clone = pc.clone(); - let onicegatheringstatechange_cb = Closure::wrap(Box::new(move |_e: Event| { - info!("{:?}", pc_clone.ice_gathering_state()); - }) as Box); - pc.set_onicegatheringstatechange(Some( - onicegatheringstatechange_cb.as_ref().unchecked_ref(), - )); - onicegatheringstatechange_cb.forget(); - - let pc_clone = pc.clone(); - let onsignalingstatechange_cb = Closure::wrap(Box::new(move |_e: Event| { - info!("{:?}", pc_clone.signaling_state()); - }) as Box); - pc.set_onsignalingstatechange(Some(onsignalingstatechange_cb.as_ref().unchecked_ref())); - onsignalingstatechange_cb.forget(); - - let pc_clone = pc.clone(); - let onnegotiationneeded_cb = Closure::wrap(Box::new(move |_e: Event| { - info!("{:?}", pc_clone.signaling_state()); - }) as Box); - pc.set_onnegotiationneeded(Some(onnegotiationneeded_cb.as_ref().unchecked_ref())); - onnegotiationneeded_cb.forget(); - - let ontrack_cb = Closure::wrap(Box::new(move |e: RtcTrackEvent| { - let track = e.track(); - info!("{:?} {}", track, track.kind()); - add_remote_track(remote, track); - }) as Box); - pc.set_ontrack(Some(ontrack_cb.as_ref().unchecked_ref())); - ontrack_cb.forget(); - - Ok(PeerConnection { - _local: local, - _remote: remote, - pc, - }) - } -} - -impl Deref for PeerConnection { - type Target = RtcPeerConnection; - - fn deref(&self) -> &Self::Target { - &self.pc - } -} diff --git a/wasm/src/searchbar.rs b/wasm/src/searchbar.rs deleted file mode 100644 index e399a42f..00000000 --- a/wasm/src/searchbar.rs +++ /dev/null @@ -1,142 +0,0 @@ -use crate::client::*; -use crate::utils::*; -use rustgym_msg::*; -use std::boxed::Box; -use wasm_bindgen::prelude::*; -use wasm_bindgen::*; -use web_sys::{ - HtmlDivElement, HtmlInputElement, HtmlLiElement, HtmlTableElement, HtmlTableRowElement, - HtmlTableSectionElement, HtmlUListElement, InputEvent, KeyboardEvent, MouseEvent, -}; - -#[derive(Debug, Clone)] -pub struct SearchRow { - li: HtmlLiElement, -} - -impl SearchRow { - fn new(li: HtmlLiElement, text: String) -> Self { - let li_clone = li.clone(); - li.set_text_content(Some(&text)); - li.set_class_name("search-row"); - let click_cb = Closure::wrap(Box::new(move |_e: MouseEvent| { - let text = li_clone.text_content().expect("text"); - get_client().on_query_text(text).expect("on_query_text"); - }) as Box); - li.set_onclick(Some(click_cb.as_ref().unchecked_ref())); - click_cb.forget(); - SearchRow { li } - } -} - -#[derive(Debug, Clone)] -pub struct ResultRow { - tr: HtmlTableRowElement, -} - -impl ResultRow { - fn new(query_result: QueryResult) -> Result { - let tr = tr(); - let id = tr.insert_cell()?; - id.set_inner_text(&query_result.id); - let title = tr.insert_cell()?; - let link = a(); - link.set_href(&query_result.href); - link.set_text(&query_result.title)?; - title.append_with_node_1(&link)?; - let from = tr.insert_cell()?; - from.set_inner_text(&query_result.from); - Ok(ResultRow { tr }) - } -} - -#[derive(Debug, Clone)] -pub struct SearchBar { - search_input: HtmlInputElement, - search_suggestions: HtmlUListElement, - search_suggestions_parent: HtmlDivElement, - search_table: HtmlTableElement, - search_results: HtmlTableSectionElement, -} - -impl SearchBar { - pub fn new( - search_input: HtmlInputElement, - search_suggestions: HtmlUListElement, - search_suggestions_parent: HtmlDivElement, - search_table: HtmlTableElement, - search_results: HtmlTableSectionElement, - ) -> Self { - let search_input_clone = search_input.clone(); - let input_cb = Closure::wrap(Box::new(move |_e: InputEvent| { - let search_text = search_input_clone.value(); - get_client() - .on_search_text_change(search_text) - .expect("on_search_text_change"); - }) as Box); - search_input.set_oninput(Some(input_cb.as_ref().unchecked_ref())); - input_cb.forget(); - - let search_input_clone = search_input.clone(); - let keydown_cb = Closure::wrap(Box::new(move |e: KeyboardEvent| { - let search_text = search_input_clone.value(); - if e.key_code() == 13 { - get_client() - .on_query_text(search_text) - .expect("on_query_text"); - } - }) as Box); - search_input.set_onkeydown(Some(keydown_cb.as_ref().unchecked_ref())); - keydown_cb.forget(); - - SearchBar { - search_input, - search_suggestions, - search_suggestions_parent, - search_table, - search_results, - } - } - - pub fn close_search_suggestions(&self) -> Result<(), JsValue> { - self.search_suggestions.class_list().add_1("hidden") - } - - pub fn update_search_input(&self, text: &str) { - self.search_input.set_value(text); - } - - pub fn update_search_suggestions( - &self, - search_suggestions: Vec, - ) -> Result<(), JsValue> { - remove_children(&self.search_suggestions)?; - if search_suggestions.is_empty() { - self.search_suggestions_parent - .class_list() - .add_1("hidden")?; - } else { - self.search_suggestions_parent - .class_list() - .remove_1("hidden")?; - for suggestion in search_suggestions { - let row = SearchRow::new(li(), suggestion); - self.search_suggestions.append_with_node_1(&row.li)?; - } - } - Ok(()) - } - - pub fn update_query_results(&self, query_results: Vec) -> Result<(), JsValue> { - if query_results.is_empty() { - self.search_table.class_list().add_1("hidden")?; - } else { - self.search_table.class_list().remove_1("hidden")?; - for query_result in query_results { - let row = ResultRow::new(query_result)?; - self.search_results.append_with_node_1(&row.tr)?; - } - } - Ok(()) - } -} diff --git a/wasm/src/shaders.rs b/wasm/src/shaders.rs deleted file mode 100644 index 7122318b..00000000 --- a/wasm/src/shaders.rs +++ /dev/null @@ -1,72 +0,0 @@ -use log::{error, info}; -use web_sys::{ - HtmlCanvasElement, Request, RequestInit, WebGl2RenderingContext, WebGlContextAttributes, - WebGlProgram, WebGlRenderingContext, WebGlShader, WebGlTexture, WebGlUniformLocation, -}; - -pub const VERTEX_SHADER: u32 = WebGlRenderingContext::VERTEX_SHADER; -pub const FRAGMENT_SHADER: u32 = WebGlRenderingContext::FRAGMENT_SHADER; -pub const ARRAY_BUFFER: u32 = WebGlRenderingContext::ARRAY_BUFFER; -pub const STATIC_DRAW: u32 = WebGlRenderingContext::STATIC_DRAW; -pub const UNSIGNED_BYTE: u32 = WebGlRenderingContext::UNSIGNED_BYTE; -pub const FLOAT: u32 = WebGlRenderingContext::FLOAT; -pub const UNSIGNED_INT: u32 = WebGlRenderingContext::UNSIGNED_INT; -pub const COLOR_BUFFER_BIT: u32 = WebGlRenderingContext::COLOR_BUFFER_BIT; -pub const LINK_STATUS: u32 = WebGlRenderingContext::LINK_STATUS; -pub const COMPILE_STATUS: u32 = WebGlRenderingContext::COMPILE_STATUS; -pub const TRIANGLE_STRIP: u32 = WebGlRenderingContext::TRIANGLE_STRIP; -pub const TEXTURE_2D: u32 = WebGlRenderingContext::TEXTURE_2D; -pub const _AUDIO_SAMPLE_RATE: u32 = 44100; -pub const RGBA: u32 = WebGlRenderingContext::RGBA; -pub const TEXTURE0: u32 = WebGlRenderingContext::TEXTURE0; -pub const TEXTURE_MAG_FILTER: u32 = WebGlRenderingContext::TEXTURE_MAG_FILTER; -pub const LINEAR: u32 = WebGlRenderingContext::LINEAR; -pub const NEAREST: u32 = WebGlRenderingContext::NEAREST; -pub const TEXTURE_MIN_FILTER: u32 = WebGlRenderingContext::TEXTURE_MIN_FILTER; -pub const TEXTURE_WRAP_S: u32 = WebGlRenderingContext::TEXTURE_WRAP_S; -pub const CLAMP_TO_EDGE: u32 = WebGlRenderingContext::CLAMP_TO_EDGE; -pub const TEXTURE_WRAP_T: u32 = WebGlRenderingContext::TEXTURE_WRAP_T; -pub const MAX_VERTEX_UNIFORM_COMPONENTS: u32 = - WebGl2RenderingContext::MAX_VERTEX_UNIFORM_COMPONENTS; -pub const MAX_TEXTURE_IMAGE_UNITS: u32 = WebGlRenderingContext::MAX_TEXTURE_IMAGE_UNITS; - -pub fn compile_shader( - ctx: &WebGl2RenderingContext, - shader_type: u32, - source: &str, -) -> Result { - let shader = ctx.create_shader(shader_type).unwrap(); - ctx.shader_source(&shader, source); - ctx.compile_shader(&shader); - let compile_status = ctx - .get_shader_parameter(&shader, COMPILE_STATUS) - .as_bool() - .unwrap(); - if compile_status { - Ok(shader) - } else { - error!("{}", source); - error!("{}", ctx.get_shader_info_log(&shader).unwrap()); - Err(ctx.get_shader_info_log(&shader).unwrap()) - } -} - -pub fn link_program( - ctx: &WebGl2RenderingContext, - vert_shader: &WebGlShader, - frag_shader: &WebGlShader, -) -> Result { - let program = ctx.create_program().unwrap(); - ctx.attach_shader(&program, vert_shader); - ctx.attach_shader(&program, frag_shader); - ctx.link_program(&program); - let link_status = ctx - .get_program_parameter(&program, LINK_STATUS) - .as_bool() - .unwrap(); - if link_status { - Ok(program) - } else { - Err(ctx.get_program_info_log(&program).unwrap()) - } -} diff --git a/wasm/src/utils.rs b/wasm/src/utils.rs deleted file mode 100644 index c7d833a4..00000000 --- a/wasm/src/utils.rs +++ /dev/null @@ -1,311 +0,0 @@ -use js_sys::Uint8Array; -use rustgym_msg::ClientInfo; -use wasm_bindgen::prelude::*; -use wasm_bindgen::*; -use wasm_bindgen_futures::JsFuture; -use wasm_bindgen_test::*; -use web_sys::{ - window, Blob, ConstrainLongRange, Document, GamepadButton, HtmlAnchorElement, - HtmlButtonElement, HtmlCanvasElement, HtmlDivElement, HtmlElement, HtmlInputElement, - HtmlLiElement, HtmlParagraphElement, HtmlTableElement, HtmlTableRowElement, - HtmlTableSectionElement, HtmlUListElement, HtmlVideoElement, Location, MediaDevices, - MediaStream, MediaStreamConstraints, MediaTrackConstraints, Navigator, Request, Response, - Window, -}; - -pub fn set_panic_hook() { - #[cfg(feature = "console_error_panic_hook")] - console_error_panic_hook::set_once(); -} - -pub fn document() -> Document { - let window: Window = window().expect("window"); - window.document().expect("document") -} - -pub fn navigator() -> Navigator { - let window: Window = window().expect("window"); - window.navigator() -} - -pub fn now() -> f64 { - let window: Window = window().expect("window"); - let performance = window.performance().expect("performace"); - performance.now() -} - -pub fn wsurl() -> String { - let window: Window = window().expect("window"); - let location: Location = window.location(); - let protocol: String = location.protocol().expect("protocol"); - let host: String = location.host().expect("host"); - let ws_protocol = if protocol == "https:" { - "wss://" - } else { - "ws://" - }; - format!("{}{}/ws/", ws_protocol, host) -} - -pub fn start_button() -> HtmlButtonElement { - document() - .get_element_by_id("start_button") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlButtonElement") -} - -pub fn start_menu() -> HtmlDivElement { - document() - .get_element_by_id("start_menu") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlDivElement") -} - -pub fn search_input() -> HtmlInputElement { - document() - .get_element_by_id("search_input") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlInputElement") -} - -pub fn search_suggestions() -> HtmlUListElement { - document() - .get_element_by_id("search_suggestions") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlUListElement") -} - -pub fn search_suggestions_parent() -> HtmlDivElement { - document() - .get_element_by_id("search_suggestions_parent") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlDivElement") -} - -pub fn div_class(class_name: &str) -> HtmlDivElement { - let div: HtmlDivElement = document() - .create_element("div") - .expect("create_element") - .dyn_into() - .expect("HtmlDivElement"); - div.set_class_name(class_name); - div -} - -pub fn button_label(label: &str) -> HtmlButtonElement { - let button: HtmlButtonElement = document() - .create_element("button") - .expect("create_element") - .dyn_into() - .expect("HtmlButtonElement"); - button.set_attribute("aria-label", label).unwrap(); - button -} - -pub fn li() -> HtmlLiElement { - document() - .create_element("li") - .expect("create_element") - .dyn_into() - .expect("HtmlLiElement") -} - -pub fn search_table() -> HtmlTableElement { - document() - .get_element_by_id("search_table") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlTableElement") -} - -pub fn search_results() -> HtmlTableSectionElement { - document() - .get_element_by_id("search_results") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlTableSectionElement") -} - -pub fn remove_children(node: &HtmlElement) -> Result<(), JsValue> { - while let Some(child) = node.first_child() { - node.remove_child(&child)?; - } - Ok(()) -} - -pub fn tr() -> HtmlTableRowElement { - document() - .create_element("tr") - .expect("create_element") - .dyn_into() - .expect("HtmlTableRowElement") -} - -pub fn a() -> HtmlAnchorElement { - document() - .create_element("a") - .expect("create_element") - .dyn_into() - .expect("HtmlAnchorElement") -} - -pub fn video() -> HtmlVideoElement { - document() - .create_element("video") - .expect("create_element") - .dyn_into() - .expect("HtmlVideoElement") -} - -pub fn video_window(_id: &str, name: &str, video: HtmlVideoElement) -> HtmlDivElement { - let title_bar_text = div_class("title-bar-text"); - title_bar_text.set_text_content(Some(name)); - let title_bar_controls = div_class("title-bar-controls"); - let minimize = button_label("Minimize"); - let maximize = button_label("Maximize"); - let close = button_label("Close"); - title_bar_controls - .append_with_node_3(&minimize, &maximize, &close) - .expect("title_bar_controls"); - let title_bar = div_class("title-bar"); - title_bar - .append_with_node_2(&title_bar_text, &title_bar_controls) - .expect("title_bar"); - let window_body = div_class("window-body"); - window_body.append_with_node_1(&video).expect("window_body"); - let root = div_class("window video"); - root.append_with_node_2(&title_bar, &window_body) - .expect("root"); - root -} - -pub fn local_video() -> HtmlVideoElement { - document() - .get_element_by_id("local_video") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlVideoElement") -} - -pub fn remote_videos() -> HtmlDivElement { - document() - .get_element_by_id("remote_videos") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlDivElement") -} - -pub fn nes_canvas() -> HtmlCanvasElement { - document() - .get_element_by_id("nes_canvas") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlDivElement") -} - -pub fn fps_p() -> HtmlParagraphElement { - document() - .get_element_by_id("fps") - .expect("get_element_by_id") - .dyn_into() - .expect("HtmlParagraphElement") -} - -fn media_constraints() -> MediaStreamConstraints { - let mut width = ConstrainLongRange::new(); - width.ideal(320); - let mut height = ConstrainLongRange::new(); - height.ideal(240); - let mut video_constraints = MediaTrackConstraints::new(); - video_constraints.width(&width); - video_constraints.height(&height); - let mut media_constraints = MediaStreamConstraints::new(); - media_constraints.audio(&JsValue::from_bool(true)); - media_constraints.video(&video_constraints); - media_constraints -} - -pub async fn get_media_stream() -> Result { - let navigator = navigator(); - let media_devices: MediaDevices = navigator.media_devices()?; - let get_user_media_promise = - media_devices.get_user_media_with_constraints(&media_constraints())?; - let media_stream: MediaStream = JsFuture::from(get_user_media_promise).await?.dyn_into()?; - Ok(media_stream) -} - -pub async fn fetch_bytes_with_request(request: &Request) -> Result, JsValue> { - let window: Window = window().expect("window"); - let resp_value = JsFuture::from(window.fetch_with_request(request)).await?; - let resp: Response = resp_value.dyn_into().expect("response"); - let blob_value = JsFuture::from(resp.blob()?).await?; - let blob: Blob = blob_value.dyn_into().expect("blob"); - let array_value = JsFuture::from(blob.array_buffer()).await?; - let uint8_array = Uint8Array::new(&array_value); - let bytes = uint8_array.to_vec(); - Ok(bytes) -} - -fn new_gamepad(gamepad: web_sys::Gamepad) -> nes::Gamepad { - let id = gamepad.id(); - let index = gamepad.index(); - let axes = gamepad.axes().to_vec(); - let axes = axes.into_iter().map(|v| v.as_f64().unwrap()).collect(); - let buttons = gamepad.buttons().to_vec(); - let buttons: Vec = buttons.into_iter().map(|b| b.dyn_into().unwrap()).collect(); - let pressed = buttons.iter().map(|b| b.pressed()).collect(); - let touched = buttons.iter().map(|b| b.touched()).collect(); - let value = buttons.iter().map(|b| b.value()).collect(); - let timestamp = gamepad.timestamp(); - nes::Gamepad { - id, - index, - pressed, - touched, - value, - axes, - timestamp, - } -} - -pub fn get_gamepads() -> Vec { - let navigator = navigator(); - let gamepads = navigator.get_gamepads().unwrap(); - let gamepads = gamepads.to_vec(); - let mut res: Vec = vec![]; - for gamepad in gamepads { - if let Ok(gamepad) = gamepad.dyn_into::() { - let gamepad: nes::Gamepad = new_gamepad(gamepad); - res.push(gamepad); - } - } - res -} - -pub fn request_animation_frame(f: &Closure) { - let window: Window = window().expect("window"); - window - .request_animation_frame(f.as_ref().unchecked_ref()) - .expect("should register `requestAnimationFrame` OK"); -} - -pub trait MediaSupport { - fn is_media_supported(&self) -> bool; -} - -impl MediaSupport for ClientInfo { - fn is_media_supported(&self) -> bool { - let family: &str = self.user_agent.as_ref().expect("useragent").family.as_ref(); - family == "Chrome" || family == "Safari" || family == "Firefox" || family == "Edge" - } -} - -#[wasm_bindgen_test] -async fn test() { - assert!(get_media_stream().await.is_ok()); -} diff --git a/wasm/webdriver.json b/wasm/webdriver.json deleted file mode 100644 index 035b45de..00000000 --- a/wasm/webdriver.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "moz:firefoxOptions": { - "prefs": { - "media.navigator.streams.fake": true, - "media.navigator.permission.disabled": true - }, - "args": [] - }, - "goog:chromeOptions": { - "args": [ - "--use-fake-device-for-media-stream", - "--use-fake-ui-for-media-stream" - ] - } -} \ No newline at end of file