summaryrefslogtreecommitdiffstats
path: root/rc.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-02-03 11:13:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-02-03 11:13:44 +0000
commit50250d834c659e3593397cc6ee691d7efc721643 (patch)
treeb7f3fe28e142413de4866c7a314da8e53827c3f8 /rc.h
parentReleasing debian version 1.10-2. (diff)
downloadzutils-50250d834c659e3593397cc6ee691d7efc721643.tar.xz
zutils-50250d834c659e3593397cc6ee691d7efc721643.zip
Merging upstream version 1.11.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'rc.h')
-rw-r--r--rc.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/rc.h b/rc.h
index 38a737e..37f8552 100644
--- a/rc.h
+++ b/rc.h
@@ -1,5 +1,5 @@
/* Zutils - Utilities dealing with compressed files
- Copyright (C) 2009-2021 Antonio Diaz Diaz.
+ Copyright (C) 2009-2022 Antonio Diaz Diaz.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -15,16 +15,17 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-enum { fmt_bz2, fmt_gz, fmt_lz, fmt_xz, num_formats }; // format_index
-const char * const format_names[num_formats] = { "bz2", "gz", "lz", "xz" };
+enum { fmt_bz2, fmt_gz, fmt_lz, fmt_xz, fmt_zst, num_formats }; // format_index
+const char * const format_names[num_formats] =
+ { "bz2", "gz", "lz", "xz", "zst" };
const char * const simple_extensions[num_formats] =
- { ".bz2", ".gz", ".lz", ".xz" };
+ { ".bz2", ".gz", ".lz", ".xz", ".zst" };
const int format_order[num_formats] =
- { fmt_lz, fmt_bz2, fmt_gz, fmt_xz }; // search order
+ { fmt_lz, fmt_bz2, fmt_gz, fmt_zst, fmt_xz }; // search order
bool enabled_format( const int format_index );
-void parse_format_list( const std::string & arg );
-int parse_format_type( const std::string & arg );
+void parse_format_list( const std::string & arg, const char * const pn );
+int parse_format_type( const std::string & arg, const char * const pn );
int extension_index( const std::string & name ); // -1 if unknown
int extension_format( const int eindex ); // -1 if uncompressed
@@ -46,7 +47,7 @@ const char * get_compressor_name( const int format_index );
const std::vector< std::string > & get_compressor_args( const int format_index );
void show_help_addr();
-void show_version();
+void show_version( const char * const command = 0 );
void show_error( const char * const msg, const int errcode = 0,
const bool help = false );
void show_file_error( const char * const filename, const char * const msg,
@@ -56,7 +57,7 @@ void show_close_error( const char * const prog_name = "data feeder" );
void show_exec_error( const char * const prog_name );
void show_fork_error( const char * const prog_name );
-// Returns exit status of child process 'pid', or 'eretval' in case of error.
+// Return exit status of child process 'pid', or 'eretval' in case of error.
//
int wait_for_child( const pid_t pid, const char * const name,
const int eretval = 2, const bool isgzxz = false );