diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:30:18 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:30:18 +0000 |
commit | e2010b31ef4137540c264f2fb69f8f2660a6f7fc (patch) | |
tree | f6dc13301edd0ff87720cbb52123d6b0832b293b /rc.h | |
parent | Adding upstream version 1.2~pre2. (diff) | |
download | zutils-e2010b31ef4137540c264f2fb69f8f2660a6f7fc.tar.xz zutils-e2010b31ef4137540c264f2fb69f8f2660a6f7fc.zip |
Adding upstream version 1.2~pre3.upstream/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 ); |