summaryrefslogtreecommitdiffstats
path: root/zcmp.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:30:18 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:30:18 +0000
commite2010b31ef4137540c264f2fb69f8f2660a6f7fc (patch)
treef6dc13301edd0ff87720cbb52123d6b0832b293b /zcmp.cc
parentAdding upstream version 1.2~pre2. (diff)
downloadzutils-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 'zcmp.cc')
-rw-r--r--zcmp.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/zcmp.cc b/zcmp.cc
index 3522329..761e48e 100644
--- a/zcmp.cc
+++ b/zcmp.cc
@@ -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() );