summaryrefslogtreecommitdiffstats
path: root/rc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'rc.cc')
-rw-r--r--rc.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/rc.cc b/rc.cc
index 308cf0c..7ad51f4 100644
--- a/rc.cc
+++ b/rc.cc
@@ -1,18 +1,18 @@
-/* Zutils - Utilities dealing with compressed files
- Copyright (C) 2009-2019 Antonio Diaz Diaz.
+/* Zutils - Utilities dealing with compressed files
+ Copyright (C) 2009-2020 Antonio Diaz Diaz.
- 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 2 of the License, or
- (at your option) any later version.
+ 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 2 of the License, or
+ (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#define _FILE_OFFSET_BITS 64
@@ -37,12 +37,12 @@ int verbosity = 0;
namespace {
const char * const config_file_name = "zutilsrc";
-const char * const program_year = "2019";
+const char * const program_year = "2020";
std::string compressor_names[num_formats] =
{ "bzip2", "gzip", "lzip", "xz" }; // default compressor names
-// args to compressors, maybe empty
+// args to compressors read from rc or from options --[bglx]z, maybe empty
std::vector< std::string > compressor_args[num_formats];
// vector of enabled formats plus [num_formats] for uncompressed.
@@ -93,10 +93,10 @@ bool trailing_escape( const std::string & s )
}
-// Read a line discarding comments, leading whitespace and blank lines.
-// Escaped newlines are discarded.
-// Returns the empty string if at EOF.
-//
+/* Read a line discarding comments, leading whitespace, and blank lines.
+ Escaped newlines are discarded.
+ Returns the empty string if at EOF.
+*/
const std::string & my_fgets( FILE * const f, int & linenum )
{
static std::string s;
@@ -237,7 +237,7 @@ void parse_format_list( const std::string & arg )
enabled_formats[format_index] = true;
}
if( error )
- { show_error( "Bad argument for '--format' option." ); std::exit( 1 ); }
+ { show_error( "Bad argument for option '--format'." ); std::exit( 1 ); }
}
@@ -246,7 +246,7 @@ int parse_format_type( const std::string & arg )
for( int i = 0; i < num_formats; ++i )
if( arg == format_names[i] )
return i;
- show_error( "Bad argument for '--force-format' option." );
+ show_error( "Bad argument for option '--force-format'." );
std::exit( 1 );
}