commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
ca1fdb42cc5531ad3b915ee66bad69283d2f0c5d
Andrew Gallant
2014-03-11T20:51:58
Fixing some config issues.
diff --git a/src/lib.rs b/src/lib.rs index 9ad67bb..8c4d546 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,28 +13,28 @@ extern crate collections; pub use arbitrary::{Arbitrary, Gen, StdGen, gen}; pub use shrink::{ObjIter, Shrink}; -pub use tester::{Testable, TestResult}; +pub use tester::{Testable, TestResult, Con...
1
62
44
aa7ec286348ba5d3c10362ff195016a1e2d412ac
Andrew Gallant
2014-03-11T19:10:25
Removing a few convenience functions from arbitrary module. They could be badly abused.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index c12583a..85415ca 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,4 +1,4 @@ -use std::rand::{Rng, TaskRng, task_rng}; +use std::rand::Rng; use std::vec; /// Gen wraps a `rand::Rng` with parameters to control the distribution of @@ -152,18 +152,6 @@ im...
2
28
20
d006c83ad80548940023a2c9dcdc66fdeec62386
Andrew Gallant
2014-03-11T04:57:52
hide StdGen fields
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 6f17a61..c12583a 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -9,8 +9,8 @@ pub trait Gen : Rng { /// StdGen is the default implementation of `Gen`. pub struct StdGen<R> { - rng: R, - size: uint, + priv rng: R, + priv size: uint, } imp...
1
2
2
5cc4a0c0c05e7d4706f197d76462c7588c9e988f
Andrew Gallant
2014-03-11T04:55:08
Hide Status type.
diff --git a/src/lib.rs b/src/lib.rs index df1b4a2..49d8e52 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -13,7 +13,7 @@ extern crate collections; pub use arbitrary::{Arbitrary, Gen, StdGen, arbitrary, default_gen, gen}; pub use shrink::{ObjIter, Shrink}; -pub use tester::{Testable, TestResult, Status}; +pub use test...
1
2
2
1a09cd2255bcb135dfe4ef981d4ae1ae75d8dc92
Andrew Gallant
2014-03-11T04:54:00
Make the TestResult struct opaque.
diff --git a/src/lib.rs b/src/lib.rs index 4061548..df1b4a2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,8 +27,8 @@ mod tester { #[deriving(Clone, Show)] pub struct TestResult { - status: Status, - arguments: ~[~str], + priv status: Status, + priv arguments: ~[~str], } ...
1
2
2
66dd927c994b1940fa89b4b88a6877914230b7ab
Andrew Gallant
2014-03-11T02:52:13
Added more Arbitrary implementations.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 6a3f820..f172525 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,11 +1,14 @@ -use std::rand; -use std::rand::{Rand, Rng}; +use std::rand::{Rng, TaskRng, task_rng}; +use std::vec; +/// Gen wraps a `rand::Rng` with parameters to control the distribution ...
3
328
147
6bece6abd7fdaec3a7af35052f624af1f3fc9ea8
Andrew Gallant
2014-03-10T04:09:46
Rename SizedRng to Gen and use the Gen for any configuration needed for arbitrary generation. (Currently the only parameter is a size hint for random values.)
diff --git a/src/arbitrary.rs b/src/arbitrary.rs index fe69bfc..6a3f820 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -1,45 +1,45 @@ use std::rand; use std::rand::{Rand, Rng}; -pub fn arbitrary<A: Arbitrary>() -> A { - Arbitrary::arbitrary(&mut sized_rng(rand::rng(), 20)) -} - -pub fn sized_rng<R: Rng>...
1
16
16
ff63a78965cec0e53b8b7a5ce36a672c105fec96
Andrew Gallant
2014-03-09T17:40:07
Starting on sized Rngs for Arbitrary.
diff --git a/src/arbitrary.rs b/src/arbitrary.rs new file mode 100644 index 0000000..fe69bfc --- /dev/null +++ b/src/arbitrary.rs @@ -0,0 +1,51 @@ +use std::rand; +use std::rand::{Rand, Rng}; + +pub fn arbitrary<A: Arbitrary>() -> A { + Arbitrary::arbitrary(&mut sized_rng(rand::rng(), 20)) +} + +pub fn sized_rng<R: ...
2
53
0
2387ea772c040511811adef2f87843509f3d7803
Andrew Gallant
2014-03-09T17:09:25
String shrinking. No char shrinking yet.
diff --git a/src/shrink.rs b/src/shrink.rs index f952c90..bd5e8fc 100644 --- a/src/shrink.rs +++ b/src/shrink.rs @@ -1,5 +1,6 @@ use std::iter::{Map, Unfold}; use std::num::{one, zero}; +use std::str::from_chars; use std::vec; pub trait Shrink<T: Iterator<Self>> { @@ -110,7 +111,9 @@ impl<A: Shrink<Ia> + Clone, B...
1
31
1
c9eb2884d6a620b90b9986c65916eebc57084e89
Andrew Gallant
2014-03-08T07:34:05
Shrinking appears to be working.
diff --git a/qc.rs b/qc.rs new file mode 100644 index 0000000..cf545a1 --- /dev/null +++ b/qc.rs @@ -0,0 +1,95 @@ +use std::iter::Unfold; +use std::rand; +use std::vec; + +trait Arbitrary { + fn arbitrary<R: rand::Rng>(rng: &mut R) -> Self; +} + +trait Shrink<T: Iterator<Self>> { + fn shrink(&self) -> T; +} + +im...
1
95
0
03e717b9ce267700a6f2b9cf46e6d62773877260
Andrew Gallant
2024-12-31T13:49:04
test: tweak snappy-cpp tests Originally, when initially building `snap`, I wrote tests that ensured this crate was byte-for-byte identical with its compression when compared to `snappy-cpp`. This was obviously brittle and very ambitious of me. The idea was I wanted to make sure I was doing at least as good as `snappy-...
diff --git a/test/tests.rs b/test/tests.rs index e23dafa..c3641d9 100644 --- a/test/tests.rs +++ b/test/tests.rs @@ -87,37 +87,75 @@ macro_rules! testtrip { assert_eq!(read_frame_press(d), write_frame_press(d)); } + // Tests that snappy-cpp can decompress data compressed by Ru...
1
78
14
cda9838d145d30528ac3f75af948372b3c8d450b
Ian McCormack
2023-12-05T13:10:39
impl: fix tree borrow violation This commit fixes an instance of undefined behavior under the Tree Borrows model. Specifically, in this code: let mut dstp = self.dst.as_mut_ptr().add(self.d); let mut srcp = dstp.sub(offset); loop { debug_assert!(dstp >= srcp); let diff = (dstp as us...
diff --git a/src/decompress.rs b/src/decompress.rs index 07ab16b..2f4add2 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -296,6 +296,11 @@ impl<'s, 'd> Decompress<'s, 'd> { // to [0, 0]. But the last copy wrote to [9, 24], which is 24 // extra bytes in dst *beyond* the end o...
1
6
1
d7a2c9d1380af30d371f21d817f63248a9835aa8
Jake Goulding
2022-11-19T17:50:39
api: allow getting the underlying decoder reader by value PR #53 Closes #53
diff --git a/src/read.rs b/src/read.rs index a924bf9..b78939c 100644 --- a/src/read.rs +++ b/src/read.rs @@ -94,6 +94,11 @@ impl<R: io::Read> FrameDecoder<R> { pub fn get_mut(&mut self) -> &mut R { &mut self.r } + + /// Gets the underlying reader of this decoder. + pub fn into_inner(self) -> R ...
1
5
0
7feccac221ef605544a1aad41d6faba4404e9548
Jake Goulding
2022-11-19T17:46:16
api: allow getting the underlying error by value PR #53
diff --git a/src/error.rs b/src/error.rs index 8f0b400..99073aa 100644 --- a/src/error.rs +++ b/src/error.rs @@ -29,6 +29,13 @@ impl<W> IntoInnerError<W> { &self.err } + /// Returns the error which caused the call to `into_inner` to fail. + /// + /// This error was returned when attempting to f...
1
7
0
6e68f498061cf7abeda6a984e8744b7169407263
Andrew Gallant
2021-06-05T10:48:51
test: bump quickcheck test count
diff --git a/test/tests.rs b/test/tests.rs index 2cdda5b..e23dafa 100644 --- a/test/tests.rs +++ b/test/tests.rs @@ -514,7 +514,7 @@ fn qc_cmpcpp() { } QuickCheck::new() .gen(StdGen::new(rand::thread_rng(), 10_000)) - .tests(1_000) + .tests(10_000) .quickcheck(p as fn(_) -> _);...
1
1
1
c391f5d0617851b7bf29b7e2834058f9bdd8b0e8
Arthur Silva
2021-04-30T12:37:37
bug: fix incorrect EOF return For input sizes less than the frame header, the frame decoder would return EOF as if everything were OK. But it should return an error. This PR makes that happen. Fixes #43
diff --git a/src/read.rs b/src/read.rs index 89dd832..a924bf9 100644 --- a/src/read.rs +++ b/src/read.rs @@ -427,18 +427,24 @@ impl<R: fmt::Debug + io::Read> fmt::Debug for Inner<R> { } } -// read_exact_eof is like Read::read_exact, except it converts an UnexpectedEof -// error to a bool of false. +// read_exac...
2
25
8
e109c035353376a0804bdd647427763835838ad7
Aaron Hill
2021-02-09T19:56:11
Remove trailing semicolon from fail! macro If the semicolon_in_expressions_from_macros lint is ever turned into a hard error, your crate will stop compiling. This commit ensures that your crate will compile on both current and future versions of Rust. See rust-lang/rust#79813 for more details
diff --git a/src/read.rs b/src/read.rs index 362c2d7..89dd832 100644 --- a/src/read.rs +++ b/src/read.rs @@ -100,7 +100,7 @@ impl<R: io::Read> io::Read for FrameDecoder<R> { fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> { macro_rules! fail { ($err:expr) => { - return ...
1
1
1
35d752d4664fad99e758a4b0cc463fdf8005bc9b
Andrew Gallant
2020-11-20T00:50:59
crate: remove data directory from crate We used to need these to run tests, but tests are now in a separate crate. So there's no sense in including these in the crate itself as it otherwise greatly inflates its size. Fixes #37
diff --git a/Cargo.toml b/Cargo.toml index 245acbe..f477f82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,6 +13,7 @@ readme = "README.md" keywords = ["snappy", "compress", "compression", "decompress", "decompression"] license = "BSD-3-Clause" edition = "2018" +exclude = ["data/*"] [workspace] exclude = ["snapp...
1
1
0
5cbabc800362ea9614485f79a36c9a347edb9b08
Bruce Guenter
2020-11-18T22:59:47
api: implement Clone for Error snap::Error doesn't embed io::Error, and is otherwise pure data. I don't see any reason why that would change in the future, so implementing Clone seems okay. Closes #35
diff --git a/src/error.rs b/src/error.rs index be23d79..8f0b400 100644 --- a/src/error.rs +++ b/src/error.rs @@ -61,7 +61,7 @@ impl<W> fmt::Debug for IntoInnerError<W> { /// `From<snap::Error> for std::io::Error` is provided so that any Snappy /// errors will be converted to a `std::io::Error` automatically when usin...
1
1
1
ee2497cd80ef3926dff36f4105b99b160f85d30e
Andrew Gallant
2020-07-06T21:54:48
doc: fix internal code docs I believe the code is correct. Fixes #31
diff --git a/src/decompress.rs b/src/decompress.rs index aea62ef..07ab16b 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -414,7 +414,7 @@ impl TagEntry { self.0 >> 11 } - /// Return the total copy length, capped at 64. + /// Return the total copy length, capped at 255. fn len(&self...
1
1
1
f07f547e4c45946e69d10892210991ea79cf7569
Shadlock0133
2020-07-06T21:51:25
typo: the missing one is a decoder, not an encoder PR #32
diff --git a/src/write.rs b/src/write.rs index a1064dc..7975bd1 100644 --- a/src/write.rs +++ b/src/write.rs @@ -5,7 +5,7 @@ This module provides a `std::io::Write` implementation: compresses data encoded using the Snappy frame format. Use this if you have uncompressed data source and wish to write it as compress...
1
1
1
332294d711adfbf0d6afc8bba5dc325370282055
pawanjay176
2020-05-06T20:13:49
fix unsafe subtraction in FrameDecoder
diff --git a/src/error.rs b/src/error.rs index e2b2c6f..be23d79 100644 --- a/src/error.rs +++ b/src/error.rs @@ -153,9 +153,8 @@ pub enum Error { /// The chunk type byte that was read. byte: u8, }, - /// This error occurs when trying to read a chunk with length greater than - /// that suppo...
2
14
3
4bc048b014ad6de63d4232d2b204323e422fe5d4
Andrew Gallant
2020-02-14T18:49:31
release: 1.0 of snap and szip
diff --git a/Cargo.toml b/Cargo.toml index 1e26012..6fcfa94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snap" -version = "0.2.5" #:version +version = "1.0.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A pure Rust implementation of the Snappy compre...
2
3
3
4977afe01000856f3ec1ef632a150e2d9b7bc53d
Andrew Gallant
2020-02-14T00:13:03
api: add get_mut to all streamers I still don't quite grok the use for these methods, but I can see how they could be useful in some circumstances. Closes #24
diff --git a/src/read.rs b/src/read.rs index a8286ec..565595b 100644 --- a/src/read.rs +++ b/src/read.rs @@ -86,6 +86,14 @@ impl<R: io::Read> FrameDecoder<R> { pub fn get_ref(&self) -> &R { &self.r } + + /// Gets a mutable reference to the underlying reader in this decoder. + /// + /// Note ...
2
24
0
22c217f3b68091fa7fd5f4bb3cd485db8644a1b2
Andrew Gallant
2020-02-12T02:22:58
perf: accelerate CRC32C with SSE4.2 when possible We avoid bring in another crate since the code to do this is so small and reasonably simple. Surprisingly, this results in fairly marginal performance gains. Closes #19, Closes #20
diff --git a/build.rs b/build.rs index b8eb459..283164f 100644 --- a/build.rs +++ b/build.rs @@ -73,8 +73,6 @@ fn write_crc_tables(out_dir: &Path) -> Result<()> { let table = make_table(CASTAGNOLI_POLY); let table16 = make_table16(CASTAGNOLI_POLY); - writeln!(out, "pub const CASTAGNOLI_POLY: u32 = {};\n"...
5
108
101
1ccaf4e81a03ac177ce04d76a03fa79d58765863
Andrew Gallant
2020-02-11T01:16:55
polish: clean up raw pointer ops Mostly this just starts using some of the newer convenience methods on raw pointers and centralized our unaligned load helper functions. These changes don't actually add any additional safety however.
diff --git a/src/bytes.rs b/src/bytes.rs index 5caf4b4..4f198c6 100644 --- a/src/bytes.rs +++ b/src/bytes.rs @@ -93,5 +93,26 @@ pub fn read_varu64(data: &[u8]) -> (u64, usize) { /// /// This is unsafe because `data` must point to some memory of size at least 4. pub unsafe fn loadu_u32_le(data: *const u8) -> u32 { - ...
3
57
56
dd7e8774687e02f56f52c27292778675a3baec92
Andrew Gallant
2020-02-11T00:53:37
deps: bump quickcheck and rand
diff --git a/Cargo.toml b/Cargo.toml index 2dd9507..33fbbf9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,8 +25,8 @@ bench = false snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] -quickcheck = { version = "0.7", default-features = false } -rand = "0.5" +quickcheck = { ver...
2
5
5
954c6fd991d8f9ccc1edbaeb813a221ee1dbf7c6
Andrew Gallant
2020-02-10T17:26:30
deps: remove byteorder dependency This makes snap completely dependency free. This does require a little bit of extra code, but only in the form of perfectly safe one-liner-ish helper functions. Happily paid to trim that tree.
diff --git a/Cargo.toml b/Cargo.toml index d7786ac..2dd9507 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,6 @@ members = ["bench", "szip"] bench = false [dependencies] -byteorder = "1" snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] diff --git a/src/bytes.rs b/s...
8
120
40
ba4b493adfe11f71cb03fa90ceccb4f5046b7518
Andrew Gallant
2020-02-10T14:30:32
deps: remove lazy_static dependency It wasn't really carrying its weight. We can avoid using it for constants by just hard-coding some numbers. And we can avoid using it for the CRC32 tables by just generating them in a build.rs.
diff --git a/Cargo.toml b/Cargo.toml index 789207e..d7786ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,6 @@ bench = false [dependencies] byteorder = "1" -lazy_static = "1" snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] diff --git a/build.rs b/build.rs new fi...
8
136
100
21d2ec4d274548d27a484a021eb9ecab9dadd152
Andrew Gallant
2020-02-09T18:07:09
api: polish things up This polishes up the public API. In particular, the big change here is to demphasize the raw Decoder and Encoder types, since they are very rarely what one wants. They are now put in their own 'raw' sub-module. The top-level API now only consists of the Error type and the Result type alias. We ...
diff --git a/benches/bench.rs b/benches/bench.rs index fd38caf..e3554da 100644 --- a/benches/bench.rs +++ b/benches/bench.rs @@ -19,7 +19,7 @@ macro_rules! compress { src.to_owned() }; }; - let mut dst = vec![0; snap::max_compress_len(SRC.len())]; + ...
10
184
91
153c36530b2824d7720ff1a03c9f68ad0ea98430
Andrew Gallant
2020-02-09T16:07:21
style: replace try! with ?
diff --git a/src/compress.rs b/src/compress.rs index 6f01c19..1bb44e8 100644 --- a/src/compress.rs +++ b/src/compress.rs @@ -155,7 +155,7 @@ impl Encoder { /// `compress` does. pub fn compress_vec(&mut self, input: &[u8]) -> Result<Vec<u8>> { let mut buf = vec![0; max_compress_len(input.len())]; - ...
6
55
56
d485cb6a59014e557332d1879ebb0541e1251ae3
Eric Kidd
2018-02-21T21:31:16
api: add new `snap::read::FrameEncoder` type We factor out some of the code from `snap::write::FrameEncoder`. We provide test cases to make sure that we encode all the same files the same way that the original code does. Closes #17, Closes #18
diff --git a/src/frame.rs b/src/frame.rs index cfd0730..1eae67e 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -1,5 +1,8 @@ -use compress::max_compress_len; +use byteorder::{ByteOrder, LittleEndian as LE}; + +use compress::{Encoder, max_compress_len}; use crc32::crc32c; +use error::Error; use MAX_BLOCK_SIZE; lazy...
4
264
36
8cab86f6863bc9763d409abd57e26c009d4dfb5f
Zverev Konstantin
2018-01-04T19:50:21
add get_ref method
diff --git a/src/frame.rs b/src/frame.rs index 8f16855..a9d9587 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -115,6 +115,11 @@ impl<W: Write> Writer<W> { Err(err) => Err(new_into_inner_error(self, err)), } } + + /// Gets a reference to the underlying writer in this encoder. + pub fn ...
1
10
0
9196ae45bb3bf7015f57bf1857c9630f6e22281f
Andrew Gallant
2018-01-05T14:32:35
deps: bump lazy_static, quickcheck and rand
diff --git a/Cargo.toml b/Cargo.toml index e9cf52d..d62193d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,12 +18,12 @@ bench = false [dependencies] byteorder = "1" -lazy_static = "0.2" +lazy_static = "1" snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] -quickcheck = "0...
1
3
3
4996823a9403f446f65f840f4c9f05bc63c98ba1
Rikard Falkeborn
2017-08-31T20:26:06
Fix out of bounds write In read_copy(), when copying data when the pointers still may overlap, the worst case scenario is when the diff is 3. To see this, the following copies will be made: [-3, 12] -> [0, 15] [-3, 12] -> [3, 18] [-3, 12] -> [9, 24] That is, the copy may write 24 bytes past the current p...
diff --git a/src/decompress.rs b/src/decompress.rs index 4e6b068..0eaf800 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -281,29 +281,28 @@ impl<'s, 'd> Decompress<'s, 'd> { } // If we have some wiggle room, try to decompress the copy 16 bytes // at a time with 128 bit unaligne...
2
29
8
03bee178d61356a3bf06609241264a06acbc4631
Rikard Falkeborn
2017-08-19T20:48:13
Remove unnecessary mut This fixes a warning when building with nighty rust: warning: variable does not need to be mutable --> src/compress.rs:502:13 | 502 | let mut table: &mut [u16] = | ^^^^^^^^^ | = note: #[warn(unused_mut)] on by default
diff --git a/src/compress.rs b/src/compress.rs index fe82601..0ad1e31 100644 --- a/src/compress.rs +++ b/src/compress.rs @@ -499,7 +499,7 @@ impl Encoder { // instead of putting a bigger one on the heap. This particular // optimization is important if the caller is using Snappy to compress //...
1
1
1
ab302b1f3a326def8dd917532e05ea720be2ed5c
Aleksey Kladov
2017-07-17T10:42:27
Use conventional layout for benchmarks
diff --git a/Cargo.toml b/Cargo.toml index fd43ea6..91f7c28 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,6 @@ license = "BSD-3-Clause" [lib] bench = false -[[bench]] -name = "bench" - [dependencies] byteorder = "1" lazy_static = "0.2" diff --git a/src/bench.rs b/benches/bench.rs similarity index 100% re...
2
0
3
8f18801f7d66924dfab73c7c2c4e79de2783fabe
Eric Kidd
2017-03-20T17:35:48
szip: Fix application name and crates.io links I think these were missed in a earlier rename, and I keep noticing them, so I figure I should submit a PR which fixes them.
diff --git a/szip/Cargo.toml b/szip/Cargo.toml index af0a5e6..c1209d2 100644 --- a/szip/Cargo.toml +++ b/szip/Cargo.toml @@ -6,8 +6,8 @@ description = """ A fast command line tool for snappy compression and decompression. """ documentation = "https://docs.rs/snap" -homepage = "https://github.com/BurntSushi/snap" -re...
2
5
5
d142c56804121d0a7fdc57e09cb45ea93e1d80f0
Andrew Gallant
2016-12-30T19:31:31
szip-0.1.1
diff --git a/szip/Cargo.toml b/szip/Cargo.toml index ade157b..af0a5e6 100644 --- a/szip/Cargo.toml +++ b/szip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "szip" -version = "0.1.0" #:version +version = "0.1.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast command line tool fo...
1
1
1
cb679426bbda1c75b3258e039fd582da61310ab6
Andrew Gallant
2016-12-30T19:31:29
add :version tag
diff --git a/szip/Cargo.toml b/szip/Cargo.toml index 6d0994b..ade157b 100644 --- a/szip/Cargo.toml +++ b/szip/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "szip" -version = "0.1.0" +version = "0.1.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A fast command line tool for snappy co...
1
1
1
b5e822d97831b67f38ce2666c6f354ac855822b3
Andrew Gallant
2016-08-16T23:34:36
Fixes an overflow bug. On a 32 bit system, given the right values for a literal length, it was possible to overflow the bounds check and cause an unsafe use of ptr::copy_overlapping. We avoid the unsafety by moving more of the calculations to 64 bits. Fixes #3.
diff --git a/src/decompress.rs b/src/decompress.rs index c409653..4e6b068 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -165,9 +165,10 @@ impl<'s, 'd> Decompress<'s, 'd> { #[inline(always)] fn read_literal( &mut self, - mut len: usize, + len: usize, ) -> Result<()> { ...
2
32
11
5214ae9b2955e9387e86bc029811606ca0cc3efa
Andre Bogus
2016-08-02T21:36:04
fixed some clippy warnings
diff --git a/src/compress.rs b/src/compress.rs index 9069f4f..fe82601 100644 --- a/src/compress.rs +++ b/src/compress.rs @@ -344,7 +344,7 @@ impl<'s, 'd> Block<'s, 'd> { } // If we can squeeze the last copy into a copy 1 operation, do it. if len <= 11 && offset <= 2047 { - self.dst...
4
24
24
44882d91a837b3f57b05fa8797650343ad492252
Andrew Gallant
2016-08-02T14:25:34
Fix links in Cargo.toml Fixes #1.
diff --git a/Cargo.toml b/Cargo.toml index 02f737a..7f7cf05 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,8 +7,8 @@ A pure Rust implementation of the Snappy compression algorithm. Includes streaming compression and decompression. """ documentation = "http://burntsushi.net/rustdoc/snap/" -homepage = "https://github....
1
2
2
cbb1ab5ab3a9967dc283ea97374b4e5eaaceb65e
Andrew Gallant
2016-08-02T03:07:09
snappy-cpp 0.1.1
diff --git a/snappy-cpp/Cargo.toml b/snappy-cpp/Cargo.toml index 7824532..330c2c3 100644 --- a/snappy-cpp/Cargo.toml +++ b/snappy-cpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snappy-cpp" -version = "0.1.0" +version = "0.1.1" authors = ["Andrew Gallant <jamslam@gmail.com>"] license = "BSD-3-Clause" repository =...
1
1
1
8abfd36ef6003526b548b8d88d15c187d8ef7d29
Andrew Gallant
2016-08-02T03:06:52
fix license
diff --git a/snappy-cpp/Cargo.toml b/snappy-cpp/Cargo.toml index 8ca69fb..7824532 100644 --- a/snappy-cpp/Cargo.toml +++ b/snappy-cpp/Cargo.toml @@ -2,7 +2,7 @@ name = "snappy-cpp" version = "0.1.0" authors = ["Andrew Gallant <jamslam@gmail.com>"] -license = "Unlicense/MIT" +license = "BSD-3-Clause" repository = "h...
2
2
2
b61ad388f0dc7f26479a22ed7be78fdeb47491b8
Andrew Gallant
2016-08-02T03:04:46
allow snappy-cpp to be published
diff --git a/snappy-cpp/Cargo.toml b/snappy-cpp/Cargo.toml index 9c65f76..8ca69fb 100644 --- a/snappy-cpp/Cargo.toml +++ b/snappy-cpp/Cargo.toml @@ -1,5 +1,4 @@ [package] -publish = false name = "snappy-cpp" version = "0.1.0" authors = ["Andrew Gallant <jamslam@gmail.com>"]
1
0
1
64f054a845f9345fef92657b1d7d301d4a88386a
Andrew Gallant
2016-08-02T03:02:59
pre 0.1.0
diff --git a/Cargo.toml b/Cargo.toml index 02f737a..dfd36ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "snap" -version = "0.1.0" #:version +version = "0.0.9" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A pure Rust implementation of the Snappy compre...
1
1
1
f74673c30a360d980294e6538ec4e20d2a574457
Andrew Gallant
2016-08-02T02:58:40
fix macro
diff --git a/src/tests.rs b/src/tests.rs index 4aca4e1..3a48ed7 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -8,10 +8,10 @@ use {Encoder, Decoder, Error, decompress_len}; // and compares it with the original input. If they are not equal, then the // test fails. macro_rules! roundtrip { - ($data:expr) => { + ...
1
4
4
39d4456ec7d4ec03597b7a0cace809dbdc00e6fe
Andrew Gallant
2016-08-01T22:58:07
add stdin/stdout compression/decompression
diff --git a/szip/src/main.rs b/szip/src/main.rs index fcdae54..9fbfd07 100644 --- a/szip/src/main.rs +++ b/szip/src/main.rs @@ -15,8 +15,8 @@ use filetime::{FileTime, set_file_times}; const USAGE: &'static str = " szip works similarly to gzip. It takes files as parameters, compresses them to -a new file with a .sz...
1
37
32
de29e64dead46245507488f50657f6f94001470e
Andrew Gallant
2016-08-01T22:50:06
rename snappy CLI tool to szip
diff --git a/snap-bin/Cargo.toml b/szip/Cargo.toml similarity index 94% rename from snap-bin/Cargo.toml rename to szip/Cargo.toml index 86015d6..ac7b855 100644 --- a/snap-bin/Cargo.toml +++ b/szip/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "snap-bin" +name = "szip" version = "0.1.0" authors = ["Andrew Gallant <jam...
2
2
2
113356e55aa5b0164a6611afe67016fb1c0b7be8
Andrew Gallant
2016-08-01T22:39:53
completing snappy CLI tool
diff --git a/snap-bin/Cargo.toml b/snap-bin/Cargo.toml index 6663396..86015d6 100644 --- a/snap-bin/Cargo.toml +++ b/snap-bin/Cargo.toml @@ -16,6 +16,7 @@ name = "snappy" [dependencies] docopt = "0.6" +filetime = "0.1" rustc-serialize = "0.3" snap = { path = "..", version = "0.1" } diff --git a/snap-bin/src/mai...
2
147
4
4f3449630984de008105b2fd535b42bf1bc94df3
Andrew Gallant
2016-07-28T01:19:16
polish, bugs, tests
diff --git a/examples/compress-escaped.rs b/examples/compress-escaped.rs index 5f4a556..bbfc449 100644 --- a/examples/compress-escaped.rs +++ b/examples/compress-escaped.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + /// compress-escaped is a utility program that accepts a single command line /// parameter, compresses it...
10
530
408
4a19ef2a5dd0f6685cefc2e9b68c04e6ffb59bfa
Andrew Gallant
2016-07-27T00:46:40
Snappy stream reading is done. We're very close to feature complete. All that's left is docs, polish and tests.
diff --git a/snap-bin/src/main.rs b/snap-bin/src/main.rs index a8cd901..c3fc02d 100644 --- a/snap-bin/src/main.rs +++ b/snap-bin/src/main.rs @@ -38,9 +38,6 @@ impl Args { if !self.arg_file.is_empty() { unimplemented!() } - if self.flag_decompress { - unimplemented!() - ...
4
376
37
5f5830f3793893fd70997bfd57157dd585fea5ae
Andrew Gallant
2016-07-26T01:34:19
Throw out the crc crate and implement crc32 ourselves.
diff --git a/Cargo.toml b/Cargo.toml index 238e47a..02f737a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,6 @@ name = "bench" [dependencies] byteorder = "0.5.3" -crc = "1.3" lazy_static = "0.2" snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } diff --git a/src/crc32.rs b/src/crc32.r...
4
162
6
7b6dfb31509ef67c79002dff2ea054470483e6c2
Andrew Gallant
2016-07-25T00:10:13
initial cut at the snappy frame format (compression only)
diff --git a/Cargo.toml b/Cargo.toml index effba11..238e47a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,10 +21,11 @@ name = "bench" [dependencies] byteorder = "0.5.3" +crc = "1.3" +lazy_static = "0.2" snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] -lazy_static = "0...
5
195
17
794bbae2a29addd0293df35746552a1e800639a1
Andrew Gallant
2016-07-24T02:46:07
more polish
diff --git a/src/compress.rs b/src/compress.rs index 72bab3e..967a16a 100644 --- a/src/compress.rs +++ b/src/compress.rs @@ -194,7 +194,7 @@ impl<'s, 'd> Block<'s, 'd> { let mut next_hash = table.hash(LE::read_u32(&self.src[self.s..])); loop { let mut skip = 32; - let mut candi...
4
15
26
dd8db74ac0ff2357c0536764007e57caabb7d0a4
Andrew Gallant
2016-07-24T02:40:39
Polish and refactor compression.
diff --git a/examples/compress-escaped.rs b/examples/compress-escaped.rs index 8de9c1c..5f4a556 100644 --- a/examples/compress-escaped.rs +++ b/examples/compress-escaped.rs @@ -16,9 +16,8 @@ fn main() { } Some(arg) => arg.into_bytes(), }; - let mut compressed = vec![0; snap::max_compressed_len...
6
493
234
f8514eb4e4439c1d8e432e84a02a3665caecf83f
Andrew Gallant
2016-07-23T04:13:10
Decompression commenting, polish.
diff --git a/src/decompress.rs b/src/decompress.rs index 45fd425..d27864a 100644 --- a/src/decompress.rs +++ b/src/decompress.rs @@ -9,6 +9,8 @@ use { read_varu64, }; +/// A lookup table for quickly computing the various attributes derived from a +/// tag byte. const TAG_LOOKUP_TABLE: TagLookupTable = TagLooku...
1
212
140
680f15b629b105395e76464c2085f345e358586e
Andrew Gallant
2016-07-21T00:32:37
begin polishing
diff --git a/examples/compress-escaped.rs b/examples/compress-escaped.rs new file mode 100644 index 0000000..8de9c1c --- /dev/null +++ b/examples/compress-escaped.rs @@ -0,0 +1,27 @@ +/// compress-escaped is a utility program that accepts a single command line +/// parameter, compresses it and prints it to stdout after...
4
168
29
0d03776d38fad9c1408c4698962306d6d13274bf
Andrew Gallant
2016-07-20T01:27:10
progress
diff --git a/benches/src/bench.rs b/benches/src/bench.rs index 5dc78c1..de00634 100644 --- a/benches/src/bench.rs +++ b/benches/src/bench.rs @@ -8,10 +8,16 @@ extern crate snappy_cpp; extern crate test; #[cfg(feature = "rust")] -use snap::{compress, decompress}; +use snap::{Result, compress, Decoder}; #[cfg(featur...
4
258
128
8344ed366c299b1c3691806d631ea24767a8fe8b
Andrew Gallant
2016-07-19T00:18:47
Add and improve tests. This makes snappy-cpp an optional dependency, which can be used to enhance tests with `cargo test --features cpp`.
diff --git a/Cargo.toml b/Cargo.toml index 3e77339..441f277 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,11 +18,14 @@ bench = false [dependencies] byteorder = "0.5.3" +snappy-cpp = { path = "snappy-cpp", version = "0.1", optional = true } [dev-dependencies] quickcheck = "0.2" rand = "0.3" -snappy-cpp = { pa...
4
183
70
5abeba772aa0830585faec70013920b3a16618c4
Andrew Gallant
2016-07-15T01:38:06
progress
diff --git a/Cargo.toml b/Cargo.toml index 59d8a2b..3a3dba1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,3 +12,6 @@ repository = "https://github.com/BurntSushi/snap" readme = "README.md" keywords = ["snappy", "compress", "compression", "decompress", "decompression"] license = "Unlicense/MIT" + +[dependencies] +by...
2
190
0
c8be68013603174e850f36277f177eb25d6602e4
Andrew Gallant
2022-04-04T18:55:53
style: replace 'unsafe' with a safe API This was just code that was older than 'from_ref', which was stabilized in Rust 1.28.
diff --git a/src/lib.rs b/src/lib.rs index efbd737..aa36bc4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -152,7 +152,7 @@ impl Utf8Sequence { pub fn as_slice(&self) -> &[Utf8Range] { use self::Utf8Sequence::*; match *self { - One(ref r) => unsafe { slice::from_raw_parts(r, 1) }, + ...
1
1
1
2c114111199a472aad143e1aefb31c24bcdb7fb1
Andrew Gallant
2022-04-04T18:54:45
deps: bump to quickcheck 1.0
diff --git a/Cargo.toml b/Cargo.toml index e90cfda..638105d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,4 +15,4 @@ exclude = ["/ci/*", "/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] -quickcheck = { version = "0.8", default-fea...
1
1
1
ca7efe8f68da3228217ec8cc62288d630e85f43a
Andrew Gallant
2022-04-04T18:54:10
deps: remove doc-comment It's not really carrying its weight for this crate.
diff --git a/Cargo.toml b/Cargo.toml index 813c8b5..e90cfda 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,3 @@ travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] quickcheck = { version = "0.8", default-features = false } -doc-comment = "0.3" diff --git a/src/lib.rs b/src/lib.rs index c...
2
1
9
2b0ed414c97e6a7b553ce93fefba60c5e20e7f12
Andrew Gallant
2022-04-04T18:51:24
tests: remove use of transmute This is obviously UB, as I was cast a u32 surrogate to a char. I'm not sure why I wrote this code. I did write it before char::from_u32_unchecked was stabilized, and maybe the story around UB and type validity invariants wasn't as clear to me back then. Either way, we work around it by ...
diff --git a/src/lib.rs b/src/lib.rs index 53019b6..c595c6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -459,16 +459,16 @@ mod tests { } fn never_accepts_surrogate_codepoints(start: char, end: char) { - let mut buf = [0; MAX_UTF8_BYTES]; for cp in 0xD800..0xE000 { - let c = unsafe...
1
18
13
d5f16831f6defa087d63ee92453077cbe6969353
Igor Gnatenko
2019-06-09T13:30:59
deps: update quickcheck to 0.8 PR #12
diff --git a/Cargo.toml b/Cargo.toml index f0b42ac..06ba5ee 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,5 +15,5 @@ exclude = ["/ci/*", "/.travis.yml", "/Makefile", "/ctags.rust", "/session.vim"] travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] -quickcheck = { version = "0.7", default-fea...
1
1
1
280a26f920dd05ffa354a4f21b61ab774c6fb38d
Igor Gnatenko
2018-10-27T20:56:03
exclude CI files
diff --git a/Cargo.toml b/Cargo.toml index 5771453..bd9be68 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/BurntSushi/utf8-ranges" readme = "README.md" keywords = ["codepoint", "utf8", "automaton", "range"] license = "Unlicense/MIT" +exclude = ["/ci/*", "/.travis.yml", "/Ma...
1
1
0
b9b0294b43293bd3388a076a3a866a655eac99fb
Andrew Gallant
2018-08-25T14:20:42
deps: update quickcheck to 0.7
diff --git a/Cargo.toml b/Cargo.toml index 5b5f5f7..13d0e98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ license = "Unlicense/MIT" travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] -quickcheck = "0.6" +quickcheck = { version = "0.7", default-features = false }
1
1
1
8cfab5969abc2dfc2fc4e2f323f42b2974bf88d8
Igor Gnatenko
2018-01-01T11:38:43
bump quickcheck to 0.6
diff --git a/Cargo.toml b/Cargo.toml index 02f42e8..5b5f5f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ license = "Unlicense/MIT" travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] -quickcheck = "0.5" +quickcheck = "0.6"
1
1
1
bd9f1eafa9b0c1aaa35ced16ab5ffb721e54dabf
Igor Gnatenko
2017-11-29T10:02:43
bump quickcheck to 0.5
diff --git a/Cargo.toml b/Cargo.toml index dff1574..02f42e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ license = "Unlicense/MIT" travis-ci = { repository = "BurntSushi/utf8-ranges" } [dev-dependencies] -quickcheck = "0.4.1" +quickcheck = "0.5"
1
1
1
9e0414dbe7e31807264eb652d54f57e2f901ec9e
Martin Geisler
2017-07-24T22:27:27
Add CI badge
diff --git a/Cargo.toml b/Cargo.toml index 750e096..dff1574 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,5 +10,8 @@ readme = "README.md" keywords = ["codepoint", "utf8", "automaton", "range"] license = "Unlicense/MIT" +[badges] +travis-ci = { repository = "BurntSushi/utf8-ranges" } + [dev-dependencies] quickch...
1
3
0
db56e244a29859477a79969291868de7497f4957
Jeff Smits
2016-05-16T18:51:53
Update dead links in documentation Latest archive.org version of Russ Cox article and a permalink to the Lucene file as I could find on the master branch just now. Tip: GitHub has this keyboard shortcut `y` that changes a relative link (usually includes the branch or tag name) to a permalink using the commit hash :)
diff --git a/src/lib.rs b/src/lib.rs index 3f440bf..962622a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -80,10 +80,10 @@ regular expressions). # Lineage I got the idea and general implementation strategy from Russ Cox in his -[article on regexps](https://swtch.com/~rsc/regexp/regexp3.html) and RE2. +[article on reg...
1
2
2
5b186f19822691621928b137c872667ea84e2ffe
Andrew Gallant
2015-11-07T23:43:00
another test
diff --git a/src/lib.rs b/src/lib.rs index 95c4ee2..3f440bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -440,6 +440,8 @@ fn max_scalar_value(nbytes: usize) -> u32 { #[cfg(test)] mod tests { + use std::char; + use quickcheck::{TestResult, quickcheck}; use char_utf8::encode_utf8; @@ -474,6 +476,20 @@ m...
1
16
0
ce26695f2f23541871d6041039fe28837eb9d4c6
Andrew Gallant
2015-10-17T05:49:39
cite inspiration
diff --git a/src/lib.rs b/src/lib.rs index 4c64ee5..3b39c21 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,12 +70,20 @@ Unicode scalar values. # Why would I ever use this? -You probably don't. In 99% of cases, you just decode the byte sequence into -a Unicode scalar value and compare scalar values directly. Howev...
1
14
6
d2efe1d62c9f8922d92e195c3ef6b6fd38c2d440
Andrew Gallant
2015-10-17T05:36:05
Polished, docs, tests, benchmarks.
diff --git a/Cargo.toml b/Cargo.toml index 052f972..45ea0ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,6 @@ repository = "https://github.com/BurntSushi/utf8-ranges" readme = "README.md" keywords = ["codepoint", "utf8", "automaton", "range"] license = "Unlicense/MIT" + +[dev-dependencies] +quickcheck = "0.2"...
3
462
128
89108ddd24ef0e00b5ac50a37256897fb049be01
Andrew Gallant
2015-10-16T01:24:12
fix doc link
diff --git a/Cargo.toml b/Cargo.toml index 476d101..cc0ce0a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ name = "utf8-ranges" version = "0.1.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "Convert ranges of Unicode codepoints to UTF-8 byte ranges." -documentation = "http://b...
1
1
1
7db549d53b92bf1be68224dbfa836c7bd5dba1f9
Pedro Mendes
2021-09-21T06:27:38
Add XSetEventQueueOwner (#124)
diff --git a/src/xlib_xcb.rs b/src/xlib_xcb.rs index 78d1a3e..1cb3f59 100644 --- a/src/xlib_xcb.rs +++ b/src/xlib_xcb.rs @@ -1,10 +1,16 @@ use super::xlib::Display; use std::os::raw::c_void; -x11_link! { Xlib_xcb, xlib_xcb, ["libX11-xcb.so.1", "libX11-xcb.so"], 1, +x11_link! { Xlib_xcb, xlib_xcb, ["libX11-xcb.so.1"...
1
7
1
a01f4dd7b9eb651481e089857a4f8133baa6c7b0
est31
2021-09-21T06:26:43
Remove maybe-uninit dependency (#138) This removes the dependency on the maybe-uninit crate as it's not needed any more.
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index 21a0e5f..cb5cfa9 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -17,7 +17,6 @@ edition = "2018" [dependencies] lazy_static = "1" libc = "0.2" -maybe-uninit = "2.0.0" [build-dependencies] pkg-config = "0.3.8" diff --git a/x11-dl/src/lib.rs b/x11-...
3
1
3
9c77174786caac5917836998359457c4dbf64bc6
AltF2
2021-09-20T21:23:16
xtest: add c_int (#136)
diff --git a/src/xtest.rs b/src/xtest.rs index 5ce426a..36413a8 100644 --- a/src/xtest.rs +++ b/src/xtest.rs @@ -22,7 +22,7 @@ x11_link! { Xf86vmode, xtst, ["libXtst.so.6", "libXtst.so"], 15, pub fn XTestFakeKeyEvent (_4: *mut Display, _3: c_uint, _2: c_int, _1: c_ulong) -> c_int, pub fn XTestFakeMotionEvent (_5:...
1
1
1
67dd798def820ce0c09c9215494ba54afaaecb69
mahkoh
2021-09-20T20:50:02
Add XkbStateNotify event detail masks (#133) https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#id2589934
diff --git a/src/xlib.rs b/src/xlib.rs index 20ae989..4042c71 100644 --- a/src/xlib.rs +++ b/src/xlib.rs @@ -3465,6 +3465,22 @@ pub const XkbAccessXNotifyMask: c_ulong = 1 << 10; pub const XkbExtensionDeviceNotifyMask: c_ulong = 1 << 11; pub const XkbAllEventsMask: c_ulong = 0xfff; +pub const XkbModifierStateMask: ...
1
16
0
eadc0518336fbfcfe901a8a5cdad15ff30496132
AltF2
2021-09-20T16:54:38
Remove deprecated call of mem::uninitialized (#132) * Fix deprecated call * Fix double semicolon
diff --git a/x11-dl/examples/hello-world-dl.rs b/x11-dl/examples/hello-world-dl.rs index aa06095..67db85f 100644 --- a/x11-dl/examples/hello-world-dl.rs +++ b/x11-dl/examples/hello-world-dl.rs @@ -27,7 +27,7 @@ fn main() { let screen = (xlib.XDefaultScreen)(display); let root = (xlib.XRootWindow)(disp...
2
4
4
202989dfbaf5cb0cc8f9525a7522a99e81314209
Jokler
2021-09-19T14:28:07
Add xfixes bindings (#118) * Fix warnings * Add xfixes bindings Co-authored-by: Matthew Bakhtiari <dev@mtbk.me>
diff --git a/src/xfixes.rs b/src/xfixes.rs index dc8540d..90f867c 100644 --- a/src/xfixes.rs +++ b/src/xfixes.rs @@ -2,10 +2,104 @@ // The X11 libraries are available under the MIT license. // These bindings are public domain. -use super::xlib::XID; +use libc::{c_char, c_int, c_short, c_uint, c_ulong, c_ushort}; +u...
1
95
1
47187242263e6add8efd1eb3c2d059ba4a4feeb9
Matthew Bakhtiari
2021-09-19T09:47:51
Add as maintainer and update repo
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index 07ac875..30d61f5 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -4,10 +4,11 @@ version = "2.18.5" authors = [ "daggerbot <daggerbot@gmail.com>", "Erle Pereira <erle@erlepereira.com>", + "AltF02 <contact@altf2.dev>", ] description = "X11...
2
4
2
2f6b921dde851c86aa3e2a6838de3efad150c3a8
Erle Pereira
2020-07-28T09:58:01
replaced deprecated try with ? operator, & other linter cleanups
diff --git a/src/xinput2.rs b/src/xinput2.rs index b78cd37..fd9a76d 100644 --- a/src/xinput2.rs +++ b/src/xinput2.rs @@ -116,14 +116,14 @@ pub const XIAcceptTouch: i32 = 6; pub const XIRejectTouch: i32 = 7; pub const XISlaveSwitch: i32 = 1; pub const XIDeviceChange: i32 = 2; -pub const XIMasterAdded: i32 = (1 << 0);...
3
50
49
f530b0c8fef2c6c0f1deb016fbff98260cedba38
Erle Pereira
2020-06-26T01:20:18
Just some linter cleanups as I dive deeper into this codebase, finally (my MBA studies are over whoo-hoo!).
diff --git a/src/xlib.rs b/src/xlib.rs index b06a20c..d1b739f 100644 --- a/src/xlib.rs +++ b/src/xlib.rs @@ -2913,12 +2913,12 @@ pub const Mod4MapIndex: c_int = 6; pub const Mod5MapIndex: c_int = 7; // button masks -pub const Button1Mask: c_uint = (1<<8); -pub const Button2Mask: c_uint = (1<<9); -pub const Button3M...
1
44
44
f0cb757e872a5a2013f438c8ee684a9aaa5278ed
Erle Pereira
2020-02-19T00:20:53
removed unnecessary trailing semicolon
diff --git a/x11-dl/src/link.rs b/x11-dl/src/link.rs index 6a8613c..f769f2f 100644 --- a/x11-dl/src/link.rs +++ b/x11-dl/src/link.rs @@ -154,7 +154,7 @@ impl DynamicLibrary { } let cmsg = CStr::from_ptr(msg as *const c_char); - let detail = format!("{} - {}", name, cmsg.to_string_lossy().into...
1
1
1
9c0b9e5a097515f7b8eccec7d71c5fb749100784
Erle Pereira
2020-01-26T08:18:48
version bump, merged PR #107, #104
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index e9e38e8..4271fa0 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "x11-dl" -version = "2.18.4" +version = "2.18.5" authors = [ "daggerbot <daggerbot@gmail.com>", "Erle Pereira <erle@erlepereira.com>", diff --git...
2
2
2
857212ca874dfe3805ece7c9143d79a18cc7f44e
takumi
2020-01-24T05:59:03
reverse draw and caret
diff --git a/src/xlib.rs b/src/xlib.rs index 9616a22..b06a20c 100644 --- a/src/xlib.rs +++ b/src/xlib.rs @@ -2538,7 +2538,7 @@ pub type XIMFeedback = c_ulong; #[derive(Debug, Clone, Copy, PartialEq)] #[repr(C)] -pub struct XIMPreeditCaretCallbackStruct { +pub struct XIMPreeditDrawCallbackStruct { pub caret: c_...
1
2
2
f81043f737158db206f01351cb532f920b238c74
takumi
2020-01-10T07:30:51
add definitions for xim preedit callback added `XIMPreeditCaretCallback`, `XIMPreeditDrawCallback`, and its related type definition `XIMTextString` type doesn't exist in x11 library itself, but it is necessary to define `string` field in `XIMText` struct
diff --git a/src/xlib.rs b/src/xlib.rs index 4bc5cbe..9616a22 100644 --- a/src/xlib.rs +++ b/src/xlib.rs @@ -2509,6 +2509,66 @@ pub struct XIMCallback { pub callback: XIMProc, } +#[derive(Debug, Clone, Copy, PartialEq)] +#[repr(C)] +pub enum XIMCaretDirection { + XIMForwardChar, + XIMBackwardChar, + XI...
1
60
0
bf736445072addc611fe8fa45c2cfead5b811240
Christian Duerr
2019-08-27T23:39:27
Add XkbStateRec struct definition This adds type and field name information to the _XkbStateRec struct for the XkbGetState request. The fields have been taken from my local /usr/include/X11/extensions/XKBstr.h file, since online documentation turned out to be incorrect/outdated, leading to struct layout issues.
diff --git a/src/xlib.rs b/src/xlib.rs index 62d4585..4bc5cbe 100644 --- a/src/xlib.rs +++ b/src/xlib.rs @@ -885,7 +885,6 @@ pub enum _XrmHashBucketRec {} #[repr(C)] pub struct _XkbSection; #[repr(C)] pub struct _XkbServerMapRec; #[repr(C)] pub struct _XkbShape; -#[repr(C)] pub struct _XkbStateRec; #[repr(C)] pub s...
1
19
1
cb4c70fb5903aa55f420c645ce9e7237627e7b1d
Erle Pereira
2019-08-14T10:04:46
version bump for x11-dl
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index 550c7c1..67c8a6b 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "x11-dl" -version = "2.18.3" +version = "2.18.4" authors = [ "daggerbot <daggerbot@gmail.com>", "Erle Pereira <erle@erlepereira.com>",
1
1
1
e9cc5bbf311c6dbd0295b18cd413efbfa0d9d695
Tatsuyuki Ishi
2019-07-22T08:47:07
Swtich to maybe-uninit for backward compatibility
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index fd11faa..550c7c1 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -15,6 +15,7 @@ workspace = ".." [dependencies] lazy_static = "1" libc = "0.2" +maybe-uninit = "2.0.0" [build-dependencies] pkg-config = "0.3.8" diff --git a/x11-dl/src/lib.rs b/x11-...
3
3
1
c41da74d1e501a63434f9db90f065dd563c4a609
Tatsuyuki Ishi
2019-07-19T01:49:55
Fix SIGILL on nightly rustc
diff --git a/x11-dl/src/link.rs b/x11-dl/src/link.rs index bf1c89e..c3213e7 100644 --- a/x11-dl/src/link.rs +++ b/x11-dl/src/link.rs @@ -55,12 +55,11 @@ macro_rules! x11_link { unsafe { let libdir = $crate::link::config::libdir::$pkg_name; let lib = try!($crate::link::DynamicLibrary::open...
1
3
4
217feff2681d74b4c212a6c3671be6338999c5c5
O01eg
2019-07-16T18:39:58
Fix examples name.
diff --git a/x11-dl/examples/hello-world.rs b/x11-dl/examples/hello-world-dl.rs similarity index 100% rename from x11-dl/examples/hello-world.rs rename to x11-dl/examples/hello-world-dl.rs
1
0
0
be79dff2cfb39ede2fd91e0e693f2b3c63117eff
Rukai
2019-05-22T13:16:48
bool -> Bool
diff --git a/src/xf86vmode.rs b/src/xf86vmode.rs index da9df7f..393344b 100644 --- a/src/xf86vmode.rs +++ b/src/xf86vmode.rs @@ -137,7 +137,7 @@ pub struct XF86VidModeNotifyEvent { pub root: Window, pub state: c_int, pub kind: c_int, - pub forced: bool, + pub forced: Bool, pub time: Time, }
1
1
1
8fb54869045a026dbe14f3c9710b86401eb3e2ef
daggerbot
2018-08-04T23:03:53
Cowboy style fix because of an unacceptable regression in rustc.
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index 2404433..fd11faa 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "x11-dl" -version = "2.18.2" +version = "2.18.3" authors = [ "daggerbot <daggerbot@gmail.com>", "Erle Pereira <erle@erlepereira.com>", diff --git...
2
2
2
d49f4a4c06b6fca6f16dc851a5dd513f5b5e04ba
daggerbot
2018-07-22T03:40:43
Update manifests for new maintainer and version bump to 2.18.1.
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index e03eb39..7816f54 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -1,10 +1,13 @@ [package] name = "x11-dl" -version = "2.18.0" -authors = ["Daggerbot <daggerbot@gmail.com>"] +version = "2.18.1" +authors = [ + "daggerbot <daggerbot@gmail.com>", + ...
2
12
6
96ed95e33c8d9aadaf3e0f9cb3221e37a4570c98
Daniel Goertzen
2018-07-13T13:20:05
fix issue #1 xlib_xcb pkgconfig never found - xlib_xcb module now uses pkgconfig name "x11-xcb"
diff --git a/x11-dl/build.rs b/x11-dl/build.rs index a7999bc..2ee4f1e 100644 --- a/x11-dl/build.rs +++ b/x11-dl/build.rs @@ -10,25 +10,28 @@ use std::io::Write; use std::path::Path; fn main() { - let libraries = ["xext", - "gl", - "xcursor", - "xxf86vm"...
1
20
17
77f57afc09d3cfb7018a13c844e2704fed9224fc
daggerbot
2018-06-05T00:18:25
Update repository URL to GitLab.
diff --git a/x11-dl/Cargo.toml b/x11-dl/Cargo.toml index 18a3a3c..e03eb39 100644 --- a/x11-dl/Cargo.toml +++ b/x11-dl/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "x11-dl" -version = "2.17.4" +version = "2.18.0" authors = ["Daggerbot <daggerbot@gmail.com>"] description = "X11 library bindings for Rust" license = ...
2
4
4