diff options
Diffstat (limited to 'zcmp.cc')
-rw-r--r-- | zcmp.cc | 13 |
1 files changed, 4 insertions, 9 deletions
@@ -36,12 +36,8 @@ #endif #include "arg_parser.h" -#include "zutils.h" #include "rc.h" - -#if CHAR_BIT != 8 -#error "Environments where CHAR_BIT != 8 are not supported." -#endif +#include "zutils.h" #ifndef LLONG_MAX #define LLONG_MAX 0x7FFFFFFFFFFFFFFFLL @@ -52,7 +48,6 @@ namespace { #include "zcmpdiff.cc" - void show_help() { std::printf( "Zcmp compares two files (\"-\" means standard input), and if they\n" @@ -301,7 +296,7 @@ int cmp( const long long max_size, const int infd[2], { if( verbosity >= 0 ) std::fprintf( stderr, "%s: EOF on %s\n", - util_name, filenames[rd[1]<rd[0]].c_str() ); + program_name, filenames[rd[1]<rd[0]].c_str() ); return 1; } if( min_rd != buffer_size ) break; @@ -323,7 +318,7 @@ int main( const int argc, const char * const argv[] ) int format_types[2] = { -1, -1 }; bool print_bytes = false; invocation_name = argv[0]; - util_name = "zcmp"; + program_name = "zcmp"; const Arg_parser::Option options[] = { @@ -443,7 +438,7 @@ int main( const int argc, const char * const argv[] ) for( int i = 0; i < 2; ++i ) { if( close( infd[i] ) != 0 ) - { show_close_error( "data feeder" ); retval = 2; } + { show_close_error(); retval = 2; } if( filenames[i] != "-" && close( old_infd[i] ) != 0 ) { show_error2( "Can't close input file", filenames[i].c_str() ); |