summaryrefslogtreecommitdiffstats
path: root/rc.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:37:28 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-08 04:37:28 +0000
commit28aeb43eee402f13bec56cd16c1e075a26211260 (patch)
tree64bf759e5198aa7286899e4c0c6fda02c69ae972 /rc.cc
parentAdding debian version 1.2-2. (diff)
downloadzutils-28aeb43eee402f13bec56cd16c1e075a26211260.tar.xz
zutils-28aeb43eee402f13bec56cd16c1e075a26211260.zip
Merging upstream version 1.3~pre1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'rc.cc')
-rw-r--r--rc.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/rc.cc b/rc.cc
index 0c6f2d4..3b78f2b 100644
--- a/rc.cc
+++ b/rc.cc
@@ -3,7 +3,7 @@
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
+ the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@@ -170,7 +170,7 @@ int process_rcfile( const std::string & name )
while( true )
{
const std::string & line = my_fgets( f, linenum );
- if( line.size() == 0 ) break; // EOF
+ if( line.empty() ) break; // EOF
if( !parse_rc_line( line, name.c_str(), linenum ) )
{ retval = 2; break; }
}
@@ -245,11 +245,11 @@ void show_help_addr()
}
-void show_version( const char * const Program_name )
+void show_version()
{
- std::printf( "%s (zutils) %s\n", Program_name, PROGVERSION );
+ std::printf( "%s (zutils) %s\n", program_name, PROGVERSION );
std::printf( "Copyright (C) %s Antonio Diaz Diaz.\n", program_year );
- std::printf( "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
+ std::printf( "License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>\n"
"This is free software: you are free to change and redistribute it.\n"
"There is NO WARRANTY, to the extent permitted by law.\n" );
}
@@ -263,7 +263,7 @@ void show_error( const char * const msg, const int errcode, const bool help )
{
std::fprintf( stderr, "%s: %s", program_name, msg );
if( errcode > 0 )
- std::fprintf( stderr, ": %s", std::strerror( errcode ) );
+ std::fprintf( stderr, ": %s.", std::strerror( errcode ) );
std::fprintf( stderr, "\n" );
}
if( help )
@@ -284,7 +284,7 @@ void show_error2( const char * const msg, const char * const name )
void internal_error( const char * const msg )
{
if( verbosity >= 0 )
- std::fprintf( stderr, "%s: internal error: %s.\n", program_name, msg );
+ std::fprintf( stderr, "%s: internal error: %s\n", program_name, msg );
std::exit( 3 );
}