Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #724 #730

Merged
merged 3 commits into from
Jul 29, 2022
Merged

Fix issue #724 #730

merged 3 commits into from
Jul 29, 2022

Conversation

t-mat
Copy link
Contributor

@t-mat t-mat commented Jul 29, 2022

This PR fixes #724.

(1) Introduces new enum AlgoBitmask which represents xxh algorithm(s) as a bitmask(s). With this type, each xxhsum symlink variant indicates their acceptance.
(2) Adds all possible 4x4 test matrix to the Makefile. 4 means { xxhsum, xxh32sum, xxh64sum, xxh128sum }.

t-mat added 3 commits July 30, 2022 04:51
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.
@Cyan4973
Copy link
Owner

Thanks @t-mat ! That's a great addition !

@Cyan4973 Cyan4973 merged commit c4359b1 into Cyan4973:dev Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xxh*sum aren't Behaving Like sha*sum on Checking
2 participants