summaryrefslogtreecommitdiffstats
path: root/carg_parser.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 13:15:12 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-06 13:15:12 +0000
commitaf0ac2217d1005ad32420a31414182b14ed54b4f (patch)
tree6387958c45b0614c2d02c0cfdecc1222771403aa /carg_parser.c
parentAdding upstream version 1.0. (diff)
downloadlunzip-af0ac2217d1005ad32420a31414182b14ed54b4f.tar.xz
lunzip-af0ac2217d1005ad32420a31414182b14ed54b4f.zip
Adding upstream version 1.1.upstream/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;
}