Commit Graph

58 Commits

Author SHA1 Message Date
Yann Collet
53c4511234 fixed minor warning under ARM compilation 2016-08-11 01:32:10 +02:00
Yann Collet
fd2e3e8bc6 fixed minor conversion warnings 2016-08-10 09:36:58 +02:00
Yann Collet
0e479116d6 removed date for reproducibility
minor `__inline`
2016-08-10 07:08:10 +02:00
Yann Collet
61c628549f Implemented @stbrumme suggestion in #79 2016-08-06 20:48:24 +02:00
Yann Collet
059f79421e fixed static analyzer warning 2016-06-06 14:25:18 +02:00
Yann Collet
5062cb111b changed XXH_PRIVATE_API to XXH_INCLUDE_BODY
now includes `xxhash.h` instead of `xxhash.c`, which feels more natural
2016-06-06 14:12:27 +02:00
Yann Collet
ad4c45bef1 removed useless inclusions 2016-05-28 02:29:32 +02:00
Yann Collet
4a218171ea created protected section XXH_STATIC_LINKING_ONLY within xxhash.h
expose definition of `XXH32_state_t` and `XXH64_state_t` in the new section
2016-05-28 02:14:28 +02:00
Yann Collet
18e0afee86 code simplification : XXH_round() 2016-04-08 03:57:04 +02:00
Yann Collet
01b8a8bd32 switched timer to <time.h> , clock_t 2016-04-08 01:50:06 +02:00
Yann Collet
4606739e54 Merge branch 'dev' of github.com:Cyan4973/xxHash into dev 2016-04-08 01:19:20 +02:00
Yann Collet
873833c81d modified bracket convention 2016-04-08 01:19:06 +02:00
Takayuki MATSUOKA
d3653a7c83 Add help usage_advanced() message for --version and --help 2016-02-22 22:17:12 +09:00
Takayuki MATSUOKA
45c322c8ac Add --help and --version
--help is alias of -h
--version is alias of -V
2016-02-22 22:12:43 +09:00
Takayuki MATSUOKA
7d17c88dec Add -w (alias of --warn) 2016-02-22 22:10:25 +09:00
Takayuki MATSUOKA
80c3562c60 Reorder operation to avoid warning for unary minus operator for unsigned type
For example, VC++ shows the following warnings:

1>  xxhsum.c
1>..\..\xxhsum.c(620): warning C4146: unary minus operator applied to unsigned type, result still unsigned
1>..\..\xxhsum.c(621): warning C4146: unary minus operator applied to unsigned type, result still unsigned

The folliwing thread is good pointer for unary minus operators behaviour:

C: unary minus operator behavior with unsigned operands
http://stackoverflow.com/questions/8026694/

> 6.2.5c9 says: A computation involving unsigned operands can never overflow,
> because a result that cannot be represented by the resulting unsigned
> integer type is reduced modulo the number that is one greater than the
> largest value that can be represented by the resulting type.
2016-02-19 23:33:22 +09:00
Takayuki MATSUOKA
ecfcc51b38 Add usage messages for usage() and usage_advanced()
All messages are copied from md5sum.c in GNU coreutils.
2016-02-19 23:21:43 +09:00
Takayuki MATSUOKA
9a648f76a8 Fix stdin input for "xxhsum -c -" 2016-01-25 18:59:01 +09:00
Takayuki MATSUOKA
2783350952 Add redundant case for gcc -Wswitch-enum
- gcc -Wswitch-enum warns them.  But this is completely false-positive.

xxhsum.c:956:13: warning: enumeration value ‘GetLine_ok’ not handled in switch [-Wswitch-enum]
             switch (getLineResult)
             ^
2016-01-22 15:06:25 +09:00
Takayuki MATSUOKA
779a60563e Remove unused value 2016-01-22 15:02:46 +09:00
Takayuki MATSUOKA
c93b51c22e Implement variable length line reader.
- Basic logic is same as GNU coreutil's lib/getline.c and lib/getdelim.c
 - Since this implementation fully depends on fgetc(), there is possible performance problem.
2016-01-22 14:53:32 +09:00
Takayuki MATSUOKA
2cfc7a2d6a Fix wrong format specifier (%ul -> %lu) 2016-01-22 14:37:27 +09:00
Takayuki MATSUOKA
5c8aab6e6a Fix line number related definitions
- To keep code simple, now line number is "unsigned long" instead of "size_t".
 - We use "%ul" to print unsigned long.
2016-01-22 13:22:35 +09:00
Takayuki MATSUOKA
80897236f9 Fix return value
- Return value must be 0 for error.
2016-01-22 13:19:19 +09:00
Takayuki MATSUOKA
f47e8e1ff8 Add file check mode "-c" and related switches.
- Add the following command line switches
    - "-c"/"--check" : read XXH32/64 sums from FILEs and check them.
    - "--quiet" : Don't print OK.
    - "--status" : Don't output anything to stdout/stderr.
    - "--strict" : Treat any invalid line as error.
    - "--warn" : Show warning message for invalid line.
 - If all checksum procedure is succeeded, exit code is 0.
    - Otherwise exit code is 1.

All avobe functions basic logics are inherited from md5sum.
2016-01-20 23:45:52 +09:00
Takayuki MATSUOKA
1090f766c2 Split hash generation function for reusing
- Add hash generation function BMK_hashStream() which generates hash value from file stream.
 - First argument void* is not violate strict aliasing, but dedicated union may be good for readability.
2016-01-20 23:06:35 +09:00
Takayuki MATSUOKA
36c1981263 Add default hash seed symbols 2016-01-20 22:18:53 +09:00
Yann Collet
a881289521 new canonical API, suggested by @t-mat (#45) 2016-01-14 03:01:39 +01:00
Yann Collet
b5e9b75d84 added _canonicalDigest() functions, as suggested by Takatuki Matsuoka (#45) 2016-01-11 01:31:04 +01:00
Yann Collet
ac50dc0631 Limit notification size to remain within line budget 2016-01-11 00:30:08 +01:00
Yann Collet
5aabc409d1 Added : --little-endian command 2016-01-10 17:06:34 +01:00
Yann Collet
dcf7bbf17a Clarified display convention as big endian (#45) 2016-01-07 23:54:51 +01:00
Yann Collet
d34eb08294 fixed uninitialized warning (false positive) 2016-01-04 10:58:59 +01:00
Yann Collet
2b1cded67c added PRIVATE_API mode 2016-01-04 08:32:38 +01:00
Yann Collet
44f5038687 introduced semantic versioning 2016-01-03 23:56:13 +01:00
Yann Collet
ebde2748a7 stricter compliance with strict aliasing gcc warnings 2016-01-02 20:18:07 +01:00
Yann Collet
9ffb7e28c6 Compatibility with GCC/ARMv7 2015-08-19 15:11:24 +01:00
Yann Collet
68c1661a02 new test XXH64 unaligned
refactor internal benchmark
2015-08-17 15:17:12 +01:00
Yann Collet
87ef054e66 CPU unaligned load : Better detection for ARM cpus 2015-08-12 18:24:35 +01:00
Yann Collet
26772f1d5c Added : ability to select block size in benchmark mode 2015-08-12 17:10:16 +01:00
Yann Collet
24f017808a Added : wildcard support : can checksum multiple files 2015-08-08 00:22:56 +01:00
Yann Collet
cab86639a5 Added : XXH_NAMESPACE, for namespace emulation in C 2015-06-28 03:20:23 -08:00
Yann Collet
962fd0ab4d restored big-endian display 2015-05-07 15:27:27 +01:00
Yann Collet
76c90f1d0f Added : internal benchmark mode 2015-05-07 13:30:27 +01:00
Yann Collet
3b63fc28ca Added -Wcast-qual compilation flag, as suggested by Isaac Turner 2015-05-05 11:25:28 +01:00
Yann Collet
049aa14e15 added more tests 2015-05-05 01:01:10 +01:00
Yann Collet
57fda00476 sync with lz4 version 2015-05-04 22:56:53 +01:00
Yann Collet
a3f950c24c updated some comments 2015-01-01 17:10:04 +01:00
Yann Collet
edb6d79f51 xxhash.c is C90 compatible 2014-12-17 12:15:03 +01:00
Yann Collet
bdbf0a541a minor comment update 2014-12-09 19:16:15 +01:00