FILENAME_MAX, runtime unlink(), add progress output - #1
Open
CH-DanReif wants to merge 2 commits into
Open
Conversation
CH-DanReif
commented
Nov 30, 2018
| unsigned short show_progress = 0; // By default, don't show progress | ||
| unsigned short print_only = 1; // By default, print entries, don't unlink | ||
| unsigned long progress_interval_minor = 1000; // Print a ".". | ||
| unsigned long progress_interval_major = 50; // Print the number done so far. |
Author
There was a problem hiding this comment.
Eventually, these should be configurable via the value of DENTLS_PROGRESS.
| exit(1); | ||
| } | ||
|
|
||
| if (argv[1][0] == '-' || argv[1][0] != '/') { |
Author
There was a problem hiding this comment.
I know this is duplicative. It's here to emphasize that, even if we add proper option handling, we should still require absolute paths.
| printf("%s\n", *(char **)node); | ||
| // rc = unlink(*(char **)node); | ||
| if (print_only) { | ||
| printf("%s\n", *(char **)node); |
Author
There was a problem hiding this comment.
As modified, this is the only thing that ever appears on stdout.
FILENAME_MAX instead of hardcoded maxFILENAME_MAX, enable deletes at runtime, add progress output
FILENAME_MAX, enable deletes at runtime, add progress output
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.
No description provided.