projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import upstream version 1.27
[debian/tar]
/
gnu
/
argp-parse.c
diff --git
a/gnu/argp-parse.c
b/gnu/argp-parse.c
index 07b723955957272c50a39be33d9fadea95fca6c3..0e8de131c4778a56210d27d02117c093b13c7f80 100644
(file)
--- a/
gnu/argp-parse.c
+++ b/
gnu/argp-parse.c
@@
-1,7
+1,7
@@
/* -*- buffer-read-only: t -*- vi: set ro: */
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* -*- buffer-read-only: t -*- vi: set ro: */
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
-/* Hierarchial argument parsing, layered over getopt
- Copyright (C) 1995-2000, 2002-2004, 2009-201
1
Free Software Foundation, Inc.
+/* Hierarchi
c
al argument parsing, layered over getopt
+ Copyright (C) 1995-2000, 2002-2004, 2009-201
3
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
This file is part of the GNU C Library.
Written by Miles Bader <miles@gnu.ai.mit.edu>.
@@
-23,6
+23,7
@@
#endif
#include <alloca.h>
#endif
#include <alloca.h>
+#include <stdalign.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@
-44,7
+45,6
@@
#include "argp.h"
#include "argp-namefrob.h"
#include "argp.h"
#include "argp-namefrob.h"
-#define alignof(type) offsetof (struct { char c; type x; }, x)
#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
/* Getopt return values. */
#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
/* Getopt return values. */
@@
-156,8
+156,9
@@
argp_version_parser (int key, char *arg, struct argp_state *state)
else if (argp_program_version)
fprintf (state->out_stream, "%s\n", argp_program_version);
else
else if (argp_program_version)
fprintf (state->out_stream, "%s\n", argp_program_version);
else
- __argp_error (state, dgettext (state->root_argp->argp_domain,
- "(PROGRAM ERROR) No version known!?"));
+ __argp_error (state, "%s",
+ dgettext (state->root_argp->argp_domain,
+ "(PROGRAM ERROR) No version known!?"));
if (! (state->flags & ARGP_NO_EXIT))
exit (0);
break;
if (! (state->flags & ARGP_NO_EXIT))
exit (0);
break;
@@
-189,7
+190,7
@@
find_long_option (struct option *long_options, const char *name)
}
\f
}
\f
-/* The state of a
`group'
during parsing. Each group corresponds to a
+/* The state of a
"group"
during parsing. Each group corresponds to a
particular argp structure from the tree of such descending from the top
level argp passed to argp_parse. */
struct group
particular argp structure from the tree of such descending from the top
level argp passed to argp_parse. */
struct group
@@
-205,7
+206,7
@@
struct group
particular short options is from. */
char *short_end;
particular short options is from. */
char *short_end;
- /* The number of non-option args sucessfully handled by this parser. */
+ /* The number of non-option args suc
c
essfully handled by this parser. */
unsigned args_processed;
/* This group's parser's parent's group. */
unsigned args_processed;
/* This group's parser's parent's group. */
@@
-256,7
+257,7
@@
struct parser
struct group *groups;
/* The end of the GROUPS array. */
struct group *egroup;
struct group *groups;
/* The end of the GROUPS array. */
struct group *egroup;
- /* A
n
vector containing storage for the CHILD_INPUTS field in all groups. */
+ /* A vector containing storage for the CHILD_INPUTS field in all groups. */
void **child_inputs;
/* True if we think using getopt is still useful; if false, then
void **child_inputs;
/* True if we think using getopt is still useful; if false, then
@@
-387,7
+388,7
@@
convert_options (const struct argp *argp,
return group;
}
return group;
}
-/* Find the merged set of getopt options, with keys appropiately prefixed. */
+/* Find the merged set of getopt options, with keys approp
r
iately prefixed. */
static void
parser_convert (struct parser *parser, const struct argp *argp, int flags)
{
static void
parser_convert (struct parser *parser, const struct argp *argp, int flags)
{
@@
-441,7
+442,7
@@
calc_sizes (const struct argp *argp, struct parser_sizes *szs)
int num_opts = 0;
while (!__option_is_end (opt++))
num_opts++;
int num_opts = 0;
while (!__option_is_end (opt++))
num_opts++;
- szs->short_len += num_opts * 3; /* opt + up to 2
`
:'s */
+ szs->short_len += num_opts * 3; /* opt + up to 2
'
:'s */
szs->long_len += num_opts;
}
}
szs->long_len += num_opts;
}
}
@@
-783,7
+784,7
@@
parser_parse_next (struct parser *parser, int *arg_ebadkey)
if (parser->state.quoted && parser->state.next < parser->state.quoted)
/* The next argument pointer has been moved to before the quoted
if (parser->state.quoted && parser->state.next < parser->state.quoted)
/* The next argument pointer has been moved to before the quoted
- region, so pretend we never saw the quoting
`--'
, and give getopt
+ region, so pretend we never saw the quoting
"--"
, and give getopt
another chance. If the user hasn't removed it, getopt will just
process it again. */
parser->state.quoted = 0;
another chance. If the user hasn't removed it, getopt will just
process it again. */
parser->state.quoted = 0;
@@
-815,7
+816,7
@@
parser_parse_next (struct parser *parser, int *arg_ebadkey)
&& strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
== 0)
/* Not only is this the end of the options, but it's a
&& strcmp (parser->state.argv[parser->state.next - 1], QUOTE)
== 0)
/* Not only is this the end of the options, but it's a
-
`quoted'
region, which may have args that *look* like
+
"quoted"
region, which may have args that *look* like
options, so we definitely shouldn't try to use getopt past
here, whatever happens. */
parser->state.quoted = parser->state.next;
options, so we definitely shouldn't try to use getopt past
here, whatever happens. */
parser->state.quoted = parser->state.next;
@@
-881,11
+882,11
@@
__argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags,
#ifndef _LIBC
if (!(flags & ARGP_PARSE_ARGV0))
{
#ifndef _LIBC
if (!(flags & ARGP_PARSE_ARGV0))
{
-#if
def
HAVE_DECL_PROGRAM_INVOCATION_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
if (!program_invocation_name)
program_invocation_name = argv[0];
#endif
if (!program_invocation_name)
program_invocation_name = argv[0];
#endif
-#if
def
HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
if (!program_invocation_short_name)
program_invocation_short_name = __argp_base_name (argv[0]);
#endif
if (!program_invocation_short_name)
program_invocation_short_name = __argp_base_name (argv[0]);
#endif