diff options
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 ); |