Yann Collet
22c6d81fc3
update Makefile
...
using multiconf.make
2025-05-03 15:22:30 -07:00
Yann Collet
b1f76e5990
more clearly identify error when there is no input
2025-01-22 09:49:08 -08:00
Walter de Jong
f90089f90b
Revert "help is basically lying about omitting filename"
...
This reverts commit 1c54e8abc3 .
2025-01-02 10:15:56 +01:00
Walter de Jong
1c54e8abc3
help is basically lying about omitting filename
2025-01-02 09:09:38 +01:00
Walter de Jong
6d39e97f25
cleanup newline
2025-01-02 08:56:04 +01:00
Walter de Jong
5920111153
consistency typo
2025-01-02 08:55:26 +01:00
Walter de Jong
540433885f
align help message
2025-01-02 08:54:53 +01:00
Walter de Jong
7d49d13b41
help message shows option --files-from
2025-01-02 08:51:38 +01:00
Yann Collet
33e28c84ec
added --filelist command
...
equivalent to recently committed --files-from .
both commands are available.
2024-11-04 22:51:18 -08:00
Ian-Clowes
40511abc81
Tidy up parameter usage
...
- Use --files-from instead of --generate for new feature
- Remove the need for --quiet when generating hashes from file list
2024-10-09 20:56:33 +01:00
Ian-Clowes
181e065e55
Mainly fixing erroneous whitespace
2024-10-08 19:39:49 +01:00
Ian-Clowes
037e8a7257
Fix test build errors
2024-10-08 18:19:26 +01:00
Ian-Clowes
b9f37d9948
Fix CI bugs
2024-10-08 13:46:29 +01:00
Ian-Clowes
ea8728d557
Add option to generate hashes from list of files
...
Use --generate (-g) option to consume [files] on command line as containers of lists of files to generate hashes for
2024-10-08 12:57:11 +01:00
Yann Collet
cd6879f82a
removed the console line cleaning operation (using stderr)
...
since it's captured by tools redirecting `stderr`.
fixes #968
2024-10-03 15:17:40 -07:00
spaette
989c5005b5
typos
2024-06-19 12:46:10 -05:00
Yann Collet
59b651e386
detail selectable hash algorithms on -h page
...
suggested by @sergeevabc
2023-12-27 21:12:06 -08:00
Yann Collet
d0a58163c3
added xxh3sum symlink
...
dedicated to producing and checking XXH3_* checksums.
2023-07-25 18:46:34 +02:00
Yann Collet
ffb4565b3a
add XXH3 GNU format
...
using XXH3_ prefix.
Can be used both to encode and check.
2023-07-25 03:01:02 +02:00
Yann Collet
0ac3a275c3
Merge pull request #857 from t-mat/fix/ignore-missing-manpages
...
Add --ignore-missing and --binary to --help and xxhsum.1
2023-07-12 15:26:58 -07:00
Takayuki Matsuoka
b6103a46de
add --binary to --help message
2023-07-11 01:55:23 +09:00
Takayuki Matsuoka
17dfca65fc
fix: add --ignore-missing to --help message
2023-07-11 01:17:51 +09:00
Takayuki Matsuoka
e592478eea
add: cli: --ignore-missing
...
- Add `--ignore-missing` option for `xxhsum`.
- Add test script `tests/cli-ignore-missing.sh` and related `Makefile` entries.
- Note that we still don't have CLI test entry in our CI.
`xxhsum` returns failure exit code when
- `--ignore-missing` is presented.
- Checksum file is specified.
- But `XSUM_checkFile()` doesn't read actual file (may) due to `--ignore-missing`
If so, `xxhsum` reports `no file was verified` with failure exit code.
<details><summary>`--ignore-missing` related code in `digest.c`</summary>
- 2f1cffe07a/src/digest.c (L190-L191)
- 2f1cffe07a/src/digest.c (L362)
- 2f1cffe07a/src/digest.c (L380)
- 2f1cffe07a/src/digest.c (L506)
- 2f1cffe07a/src/digest.c (L978-L982)
- 2f1cffe07a/src/digest.c (L1236-L1240)
- 2f1cffe07a/src/digest.c (L1325-L1328)
- 2f1cffe07a/src/digest.c (L1429-L1431)
- 2f1cffe07a/src/digest.c (L1558-L1564)
</details>
2023-07-10 17:43:40 +09:00
Takayuki Matsuoka
d7dce1893b
feature: CLI: --binary
...
Add `--binary` to xxhsum. It's just ignored.
Note that we don't have `--text`.
See also https://github.com/Cyan4973/xxHash/issues/812
2023-07-09 22:36:02 +09:00
Takayuki Matsuoka
4823f56e1f
Fix for compiler warnings
...
Add "case GetLine_comment:" to conform -Werror=switch-enum.
```
cli/xxhsum.c: In function ‘XSUM_parseFile1’:
cli/xxhsum.c:814:17: error: enumeration value ‘GetLine_comment’ not handled in switch [-Werror=switch-enum]
814 | switch (XSUM_getLineResult)
| ^~~~~~
```
2023-06-17 20:48:12 +09:00
Takayuki Matsuoka
2f405e46bb
feature: support # comment lines in --check files
...
This change fixes issue #836 .
Basically, we just follow the following logic in the digest.c of GNU coreutils.
d53190ed46/src/digest.c (L1180-L1182)
Note that we only allow '#' at the beginning of the line.
2023-06-17 20:34:32 +09:00
Dimitri Papadopoulos
82b600a846
Fix typos found by codespell
2022-09-08 23:01:03 +02:00
Takayuki Matsuoka
02dc2abfe3
Introduce new enum AlgoBitmask to fix #724 .
...
main() introduces new variable algoBitmask which represents the algorithm(s)
which will be accepted by the CLI.
main() also sets suitable algoBitmask for exename and passes it to
XSUM_checkFiles().
The default algoBitmask is algo_bitmask_all which accepts all xxh algorithms.
XSUM_checkFiles() passes algoBitmask to XSUM_checkFile().
XSUM_checkFile() sets algoBitmask to XSUM_parseFileArg->algoBitmask and
invokes XSUM_parseFile1().
XSUM_parseFile1() passes algoBitmask to XSUM_parseLine().
XSUM_parseLine() passes algoBitmask to XSUM_parseLine1().
XSUM_parseLine1() calles XSUM_algoBitmask_Accepts() to check
actual xxh algorithm of the line and algoBitmask matches or not.
2022-07-30 04:51:39 +09:00
Takayuki Matsuoka
bd4ded94ee
Introduce md5sum style filename escape convention
...
For details, see issue #695 .
If filename contains special character (\n, 0x0a, LF),
- Put '\' (0x5c) at the beginning of the line.
- Escape special character by '\'.
2022-04-04 19:52:50 +09:00
Yann Collet
8e5afc71b3
fixed minor warnings
2021-12-11 10:28:20 -08:00
Yann Collet
f035303b8a
updated copyright years
2021-12-08 11:04:22 -08:00
Yann Collet
d14507f4ad
updated documentation for -H3
2021-11-28 17:35:46 -08:00
Yann Collet
35cc12401c
more thorough format validation with --check
...
in --tag mode, will detect mismatch between algo name and algo width.
2021-11-28 17:14:34 -08:00
Yann Collet
ca3a9923c4
added XXH3 to the list of possible hashes
...
using command `-H3`.
Specifying `-H3` necessarily triggers BSD-style `--tag` mode,
in order to prevent any possibility of confusion with XXH64.
2021-11-28 16:53:56 -08:00
Yann Collet
29353eb21f
reduce dependencies
2021-11-28 11:42:51 -08:00
Yann Collet
2b8fc59ccd
fix minor conversion warning
2021-11-28 11:01:13 -08:00
Yann Collet
f9ce9c5fd9
separate benchmark functions into xsum_bench.c
2021-11-28 10:44:00 -08:00
Yann Collet
a2d465dadf
added XXH32 + XXH64 streaming variants to benchmark
2021-11-26 16:24:59 -08:00
Yann Collet
cdc182510d
fix minor conversion warning in clang for windows
...
fix #588
2021-11-25 19:59:45 -08:00
Yann Collet
cfb05264c2
removed XXH_ACCEPT_NULL_INPUT_POINTER
...
All variants are now directly compatible with input_ptr==NULL,
with no extra check nor indirection,
though it now *requires* that, in this case, len == 0.
2021-11-25 11:00:45 -08:00
Yann Collet
6e7a7b8679
fix relative include directory
...
`xxhash.h` expected into `../` directory.
This method does not depend on setting `-I` include directory.
However, it relies on source code preserving its original arborescence.
2021-07-12 22:39:40 -07:00
Yann Collet
00b7bd1243
regroup all xxhsum files into cli/
2021-07-12 22:34:34 -07:00