summaryrefslogtreecommitdiffstats
path: root/main.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:18:52 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:18:52 +0000
commit6a83373eb86eec673be2d24fe840a9bce97fcaaa (patch)
tree5af649b83e4681c1da7b99fb6f15025d6e04c7a2 /main.cc
parentAdding upstream version 0.8. (diff)
downloadzutils-upstream/0.9_rc1.tar.xz
zutils-upstream/0.9_rc1.zip
Adding upstream version 0.9~rc1.upstream/0.9_rc1
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'main.cc')
-rw-r--r--main.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/main.cc b/main.cc
index bc7c5fb..56cbf06 100644
--- a/main.cc
+++ b/main.cc
@@ -19,7 +19,6 @@
#include <cerrno>
#include <climits>
-#include <csignal>
#include <cstdio>
#include <cstdlib>
#include <cstring>
@@ -100,9 +99,8 @@ int open_instream( std::string & input_filename, const Mode program_mode ) throw
if( infd >= 0 ) { input_filename = name; break; }
}
}
- if( infd < 0 && verbosity >= 0 )
- std::fprintf( stderr, "%s: Can't open input file `%s': %s.\n",
- util_name, input_filename.c_str(), std::strerror( errno ) );
+ if( infd < 0 )
+ show_error2( "Can't open input file", input_filename.c_str() );
}
return infd;
}
@@ -371,9 +369,7 @@ int main( const int argc, const char * const argv[] )
DIR * const dirp = opendir( input_filename.c_str() );
if( !dirp )
{
- if( verbosity >= 0 )
- std::fprintf( stderr, "%s: Can't open directory `%s': %s.\n",
- util_name, input_filename.c_str(), std::strerror( errno ) );
+ show_error2( "Can't open directory", input_filename.c_str() );
if( retval < 1 ) retval = 1; continue;
}
std::list< std::string > tmp_list;