summaryrefslogtreecommitdiffstats
path: root/carg_parser.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 13:15:19 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 13:15:19 +0000
commita9f7e3c05d7a1f40bfbcacc85fe3f785adac1fae (patch)
treefa2f02fdb4580caa0afdd4736ab7ee40251a107d /carg_parser.c
parentAdding debian version 1.0-3. (diff)
downloadlunzip-a9f7e3c05d7a1f40bfbcacc85fe3f785adac1fae.tar.xz
lunzip-a9f7e3c05d7a1f40bfbcacc85fe3f785adac1fae.zip
Merging upstream version 1.1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'carg_parser.c')
-rw-r--r--carg_parser.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/carg_parser.c b/carg_parser.c
index 52c8658..326bd41 100644
--- a/carg_parser.c
+++ b/carg_parser.c
@@ -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
@@ -31,7 +32,7 @@
#include "carg_parser.h"
-/* assure at least a minimum size for buffer `buf' */
+/* assure at least a minimum size for buffer 'buf' */
static void * ap_resize_buffer( void * buf, const int min_size )
{
if( buf ) buf = realloc( buf, min_size );
@@ -108,31 +109,31 @@ static char parse_long_option( struct Arg_parser * const ap,
if( ambig && !exact )
{
- add_error( ap, "option `" ); add_error( ap, opt );
+ add_error( ap, "option '" ); add_error( ap, opt );
add_error( ap, "' is ambiguous" );
return 1;
}
if( index < 0 ) /* nothing found */
{
- add_error( ap, "unrecognized option `" ); add_error( ap, opt );
+ add_error( ap, "unrecognized option '" ); add_error( ap, opt );
add_error( ap, "'" );
return 1;
}
++*argindp;
- if( opt[len+2] ) /* `--<long_option>=<argument>' syntax */
+ if( opt[len+2] ) /* '--<long_option>=<argument>' syntax */
{
if( options[index].has_arg == ap_no )
{
- add_error( ap, "option `--" ); add_error( ap, options[index].name );
+ add_error( ap, "option '--" ); add_error( ap, options[index].name );
add_error( ap, "' doesn't allow an argument" );
return 1;
}
if( options[index].has_arg == ap_yes && !opt[len+3] )
{
- add_error( ap, "option `--" ); add_error( ap, options[index].name );
+ add_error( ap, "option '--" ); add_error( ap, options[index].name );
add_error( ap, "' requires an argument" );
return 1;
}
@@ -143,7 +144,7 @@ static char parse_long_option( struct Arg_parser * const ap,
{
if( !arg || !arg[0] )
{
- add_error( ap, "option `--" ); add_error( ap, options[index].name );
+ add_error( ap, "option '--" ); add_error( ap, options[index].name );
add_error( ap, "' requires an argument" );
return 1;
}