diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:30:25 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:30:25 +0000 |
commit | b4e85477b84918c0fb9da281cebe4eff2a50f002 (patch) | |
tree | 545a8391c25b7e98c76f8deb43c3df7919e00111 /rc.h | |
parent | Adding debian version 1.2~pre2-1. (diff) | |
download | zutils-b4e85477b84918c0fb9da281cebe4eff2a50f002.tar.xz zutils-b4e85477b84918c0fb9da281cebe4eff2a50f002.zip |
Merging upstream version 1.2~pre3.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | rc.h | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -15,6 +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 }; +const char * const format_names[num_formats] = { "bz2", "gz", "lz", "xz" }; +const char * const simple_extensions[num_formats] = + { ".bz2", ".gz", ".lz", ".xz" }; +const int format_order[num_formats] = + { fmt_lz, fmt_bz2, fmt_gz, fmt_xz }; // search order + +extern const char * invocation_name; +extern const char * program_name; +extern int verbosity; + class Arg_parser; void maybe_process_config_file( const Arg_parser & parser ); @@ -23,5 +34,19 @@ void parse_compressor( const std::string & arg, const int format_index, const int eretval = 2 ); 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( const char * const Program_name ); +void show_error( const char * const msg, const int errcode = 0, + const bool help = false ); +void show_error2( const char * const msg, const char * const name ); +void internal_error( const char * const msg ); +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. +// +int wait_for_child( const pid_t pid, const char * const name, + const int eretval = 2, const bool isgzxz = false ); |