summaryrefslogtreecommitdiffstats
path: root/arg_parser.h
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:33:57 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 15:33:57 +0000
commit86d8a187c1da626287cc436debbb5658b1884f03 (patch)
treea6de2c2105c0f6b78ec2b3a3d234636cb664da01 /arg_parser.h
parentAdding debian version 0.9-4. (diff)
downloadplzip-86d8a187c1da626287cc436debbb5658b1884f03.tar.xz
plzip-86d8a187c1da626287cc436debbb5658b1884f03.zip
Merging upstream version 1.0~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'arg_parser.h')
-rw-r--r--arg_parser.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/arg_parser.h b/arg_parser.h
index 5d036ab..5248cb1 100644
--- a/arg_parser.h
+++ b/arg_parser.h
@@ -1,5 +1,5 @@
/* Arg_parser - POSIX/GNU command line argument parser. (C++ version)
- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012
+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
Antonio Diaz Diaz.
This library is free software: you can redistribute it and/or modify
@@ -26,12 +26,12 @@
Public License.
*/
-/* Arg_parser reads the arguments in `argv' and creates a number of
+/* Arg_parser reads the arguments in 'argv' and creates a number of
option codes, option arguments and non-option arguments.
- In case of error, `error' returns a non-empty error message.
+ In case of error, 'error' returns a non-empty error message.
- `options' is an array of `struct Option' terminated by an element
+ 'options' is an array of 'struct Option' terminated by an element
containing a code which is zero. A null name means a short-only
option. A code value outside the unsigned char range means a
long-only option.
@@ -40,13 +40,13 @@
were specified before all the non-option arguments for the purposes
of parsing, even if the user of your program intermixed option and
non-option arguments. If you want the arguments in the exact order
- the user typed them, call `Arg_parser' with `in_order' = true.
+ the user typed them, call 'Arg_parser' with 'in_order' = true.
- The argument `--' terminates all options; any following arguments are
+ The argument '--' terminates all options; any following arguments are
treated as non-option arguments, even if they begin with a hyphen.
- The syntax for optional option arguments is `-<short_option><argument>'
- (without whitespace), or `--<long_option>=<argument>'.
+ The syntax for optional option arguments is '-<short_option><argument>'
+ (without whitespace), or '--<long_option>=<argument>'.
*/
class Arg_parser
@@ -85,20 +85,20 @@ public:
Arg_parser( const char * const opt, const char * const arg,
const Option options[] );
- const std::string & error() const throw() { return error_; }
+ const std::string & error() const { return error_; }
// The number of arguments parsed (may be different from argc)
- int arguments() const throw() { return data.size(); }
+ int arguments() const { return data.size(); }
// If code( i ) is 0, argument( i ) is a non-option.
// Else argument( i ) is the option's argument (or empty).
- int code( const int i ) const throw()
+ int code( const int i ) const
{
if( i >= 0 && i < arguments() ) return data[i].code;
else return 0;
}
- const std::string & argument( const int i ) const throw()
+ const std::string & argument( const int i ) const
{
if( i >= 0 && i < arguments() ) return data[i].argument;
else return error_;