filtersize self-test: portable LLint parse and lock the '>' size operator#432
Merged
Conversation
…e '>' operator Use the portable sscanf(argv[0], LLintP, &sz) idiom the rest of the tree uses to read an LLint, instead of strtoll: LLint is not always long long (MSVC __int64, plus fallbacks) and strtoll is absent on old MSVC. Add two cases so the size-rule scan-time neutrality is pinned for the '>' operator too, not only '<': -*.jpg*[>10] stays neutral at scan time and cancels once the size is known. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up from a review of #431. Two test-only tweaks, no behavior change. The
filtersizeself-test parsed its size argument withstrtoll; switch to thesscanf(argv[0], LLintP, &sz)idiom the rest of the tree uses, sinceLLintis not alwayslong long(MSVC__int64, plus narrower fallbacks) andstrtollis missing on old MSVC. Also add two cases so the scan-time neutrality of size rules is pinned for the>operator, not just<.