diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:18:52 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2015-11-08 04:18:52 +0000 |
commit | 6a83373eb86eec673be2d24fe840a9bce97fcaaa (patch) | |
tree | 5af649b83e4681c1da7b99fb6f15025d6e04c7a2 /zcat.cc | |
parent | Adding upstream version 0.8. (diff) | |
download | zutils-6a83373eb86eec673be2d24fe840a9bce97fcaaa.tar.xz zutils-6a83373eb86eec673be2d24fe840a9bce97fcaaa.zip |
Adding upstream version 0.9~rc1.upstream/0.9_rc1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to '')
-rw-r--r-- | zcat.cc | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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; |