summaryrefslogtreecommitdiffstats
path: root/arg_parser.cc
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:41 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 10:16:41 +0000
commitd909f71ac50b6f45f5b91f35fd801d66d31898cd (patch)
tree7de62fc69cf3bbb88f2ab67d7be742c4d21a9e3a /arg_parser.cc
parentAdding debian version 1.13~rc2-1. (diff)
downloadlziprecover-d909f71ac50b6f45f5b91f35fd801d66d31898cd.tar.xz
lziprecover-d909f71ac50b6f45f5b91f35fd801d66d31898cd.zip
Merging upstream version 1.13.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'arg_parser.cc')
-rw-r--r--arg_parser.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/arg_parser.cc b/arg_parser.cc
index bc4b4a3..b3fd48d 100644
--- a/arg_parser.cc
+++ b/arg_parser.cc
@@ -1,5 +1,6 @@
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Antonio Diaz Diaz.
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Antonio Diaz Diaz.
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,30 +56,30 @@ bool Arg_parser::parse_long_option( const char * const opt, const char * const a
if( ambig && !exact )
{
- error_ = "option `"; error_ += opt; error_ += "' is ambiguous";
+ error_ = "option '"; error_ += opt; error_ += "' is ambiguous";
return false;
}
if( index < 0 ) // nothing found
{
- error_ = "unrecognized option `"; error_ += opt; error_ += '\'';
+ error_ = "unrecognized option '"; error_ += opt; error_ += '\'';
return false;
}
++argind;
data.push_back( Record( options[index].code ) );
- if( opt[len+2] ) // `--<long_option>=<argument>' syntax
+ if( opt[len+2] ) // '--<long_option>=<argument>' syntax
{
if( options[index].has_arg == no )
{
- error_ = "option `--"; error_ += options[index].name;
+ error_ = "option '--"; error_ += options[index].name;
error_ += "' doesn't allow an argument";
return false;
}
if( options[index].has_arg == yes && !opt[len+3] )
{
- error_ = "option `--"; error_ += options[index].name;
+ error_ = "option '--"; error_ += options[index].name;
error_ += "' requires an argument";
return false;
}
@@ -90,7 +91,7 @@ bool Arg_parser::parse_long_option( const char * const opt, const char * const a
{
if( !arg || !arg[0] )
{
- error_ = "option `--"; error_ += options[index].name;
+ error_ = "option '--"; error_ += options[index].name;
error_ += "' requires an argument";
return false;
}