Merging upstream version 1.6~rc1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4d14b4402a
commit
b60eef59a3
18 changed files with 954 additions and 870 deletions
|
@ -1,10 +1,18 @@
|
|||
/* Pdlzip - LZMA lossless data compressor
|
||||
Copyright (C) 2010, 2011, 2012, 2013 Antonio Diaz Diaz.
|
||||
/* Arg_parser - POSIX/GNU command line argument parser. (C version)
|
||||
Copyright (C) 2006-2015 Antonio Diaz Diaz.
|
||||
|
||||
This program is free software: you have unlimited permission
|
||||
to copy, distribute and modify it.
|
||||
This library is free software. Redistribution and use in source and
|
||||
binary forms, with or without modification, are permitted provided
|
||||
that the following conditions are met:
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
This library 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.
|
||||
*/
|
||||
|
@ -28,7 +36,7 @@ static char push_back_record( struct Arg_parser * const ap,
|
|||
const int code, const char * const argument )
|
||||
{
|
||||
const int len = strlen( argument );
|
||||
struct ap_Record *p;
|
||||
struct ap_Record * p;
|
||||
void * tmp = ap_resize_buffer( ap->data,
|
||||
( ap->data_size + 1 ) * sizeof (struct ap_Record) );
|
||||
if( !tmp ) return 0;
|
||||
|
@ -159,7 +167,8 @@ static char parse_short_option( struct Arg_parser * const ap,
|
|||
|
||||
if( index < 0 )
|
||||
{
|
||||
add_error( ap, "invalid option -- " ); add_error( ap, code_str );
|
||||
add_error( ap, "invalid option -- '" ); add_error( ap, code_str );
|
||||
add_error( ap, "'" );
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -174,8 +183,8 @@ static char parse_short_option( struct Arg_parser * const ap,
|
|||
{
|
||||
if( !arg || !arg[0] )
|
||||
{
|
||||
add_error( ap, "option requires an argument -- " );
|
||||
add_error( ap, code_str );
|
||||
add_error( ap, "option requires an argument -- '" );
|
||||
add_error( ap, code_str ); add_error( ap, "'" );
|
||||
return 1;
|
||||
}
|
||||
++*argindp; cind = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue