- Simulate GNU gzip(1) behavior where full filename is
being output in verbose mode when doing recursive[1]. - Use better representation of S: PR: bin/114470 Submitted by: Ighighi <ighighi gmail com> [1] Approved by: re (hrs)
This commit is contained in:
parent
5684929e38
commit
78b8781ab1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171389
@ -143,7 +143,7 @@ static suffixes_t suffixes[] = {
|
|||||||
};
|
};
|
||||||
#define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
|
#define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
|
||||||
|
|
||||||
static const char gzip_version[] = "FreeBSD gzip 20070528";
|
static const char gzip_version[] = "FreeBSD gzip 20070711";
|
||||||
|
|
||||||
#ifndef SMALL
|
#ifndef SMALL
|
||||||
static const char gzip_copyright[] = \
|
static const char gzip_copyright[] = \
|
||||||
@ -1806,7 +1806,7 @@ handle_dir(char *dir)
|
|||||||
|
|
||||||
path_argv[0] = dir;
|
path_argv[0] = dir;
|
||||||
path_argv[1] = 0;
|
path_argv[1] = 0;
|
||||||
fts = fts_open(path_argv, FTS_PHYSICAL, NULL);
|
fts = fts_open(path_argv, FTS_PHYSICAL | FTS_NOCHDIR, NULL);
|
||||||
if (fts == NULL) {
|
if (fts == NULL) {
|
||||||
warn("couldn't fts_open %s", dir);
|
warn("couldn't fts_open %s", dir);
|
||||||
return;
|
return;
|
||||||
@ -1824,7 +1824,7 @@ handle_dir(char *dir)
|
|||||||
maybe_warn("%s", entry->fts_path);
|
maybe_warn("%s", entry->fts_path);
|
||||||
continue;
|
continue;
|
||||||
case FTS_F:
|
case FTS_F:
|
||||||
handle_file(entry->fts_name, entry->fts_statp);
|
handle_file(entry->fts_path, entry->fts_statp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
(void)fts_close(fts);
|
(void)fts_close(fts);
|
||||||
@ -1981,8 +1981,10 @@ usage(void)
|
|||||||
|
|
||||||
fprintf(stderr, "%s\n", gzip_version);
|
fprintf(stderr, "%s\n", gzip_version);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage: %s [-" OPT_LIST "] [<file> [<file> ...]]\n"
|
#ifdef SMALL
|
||||||
#ifndef SMALL
|
"usage: %s [-" OPT_LIST "] [<file> [<file> ...]]\n",
|
||||||
|
#else
|
||||||
|
"usage: %s [-123456789acdfhklLNnqrtVv] [-S .suffix] [<file> [<file> ...]]\n"
|
||||||
" -1 --fast fastest (worst) compression\n"
|
" -1 --fast fastest (worst) compression\n"
|
||||||
" -2 .. -8 set compression level\n"
|
" -2 .. -8 set compression level\n"
|
||||||
" -9 --best best (slowest) compression\n"
|
" -9 --best best (slowest) compression\n"
|
||||||
@ -2003,8 +2005,6 @@ usage(void)
|
|||||||
" -t --test test compressed file\n"
|
" -t --test test compressed file\n"
|
||||||
" -V --version display program version\n"
|
" -V --version display program version\n"
|
||||||
" -v --verbose print extra statistics\n",
|
" -v --verbose print extra statistics\n",
|
||||||
#else
|
|
||||||
,
|
|
||||||
#endif
|
#endif
|
||||||
getprogname());
|
getprogname());
|
||||||
exit(0);
|
exit(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user