summaryrefslogtreecommitdiffstats
path: root/zcat.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:00 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:19:00 +0000
commit67258f475f17f3824c5715eaa4ebdfee86f20142 (patch)
tree5281744f82f74ad6c3f79007052bb99bbf209b05 /zcat.cc
parentAdding debian version 0.8-1. (diff)
downloadzutils-67258f475f17f3824c5715eaa4ebdfee86f20142.tar.xz
zutils-67258f475f17f3824c5715eaa4ebdfee86f20142.zip
Merging upstream version 0.9~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r--zcat.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/zcat.cc b/zcat.cc
index f813bbe..1ead9f4 100644
--- a/zcat.cc
+++ b/zcat.cc
@@ -45,7 +45,7 @@ public:
str[i] = '0';
}
if( first_digit_pos > 0 ) str[--first_digit_pos] = '1';
- else str.insert( 0, 1, '1' );
+ else str.insert( 0U, 1, '1' );
}
int sprint( uint8_t * const buf )
@@ -116,10 +116,7 @@ int do_cat( const int infd, const int buffer_size,
rd = readblock( infd, inbuf, buffer_size );
if( rd != buffer_size && errno )
{
- if( verbosity >= 0 )
- std::fprintf( stderr, "%s: Error reading file `%s': %s.\n",
- util_name, input_filename.c_str(),
- std::strerror( errno ) );
+ show_error2( "Error reading file", input_filename.c_str() );
return 1;
}
if( rd == 0 )
@@ -206,7 +203,7 @@ int cat( int infd, const std::string & input_filename,
input_filename, cat_options );
if( pid && wait_for_child( pid, "data feeder" ) != 0 ) retval = 1;
if( close( infd ) != 0 )
- { show_error( "Can't close output of data feeder", errno ); retval = 1; }
+ { show_close_error( "data feeder" ); retval = 1; }
}
delete[] inbuf; delete[] outbuf;
return retval;