Changeset 1964 for cpio/vendor/current/gnu/argp-parse.c
- Timestamp:
- Feb 3, 2017, 2:02:34 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified cpio/vendor/current/gnu/argp-parse.c ¶
r118 r1964 1 /* -*- buffer-read-only: t -*- vi: set ro: */ 2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 3 /* Hierarchial argument parsing, layered over getopt 4 Copyright (C) 1995-2000, 2002-2004, 2009-2010 Free Software Foundation, Inc. 1 /* Hierarchical argument parsing, layered over getopt 2 Copyright (C) 1995-2000, 2002-2004, 2009-2015 Free Software Foundation, Inc. 5 3 This file is part of the GNU C Library. 6 4 Written by Miles Bader <miles@gnu.ai.mit.edu>. … … 24 22 25 23 #include <alloca.h> 24 #include <stdalign.h> 26 25 #include <stddef.h> 27 26 #include <stdlib.h> … … 45 44 #include "argp-namefrob.h" 46 45 47 #define alignof(type) offsetof (struct { char c; type x; }, x)48 46 #define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d)) 49 47 … … 159 157 fprintf (state->out_stream, "%s\n", argp_program_version); 160 158 else 161 __argp_error (state, dgettext (state->root_argp->argp_domain, 162 "(PROGRAM ERROR) No version known!?")); 159 __argp_error (state, "%s", 160 dgettext (state->root_argp->argp_domain, 161 "(PROGRAM ERROR) No version known!?")); 163 162 if (! (state->flags & ARGP_NO_EXIT)) 164 163 exit (0); … … 194 193 195 194 196 /* The state of a `group'during parsing. Each group corresponds to a195 /* The state of a "group" during parsing. Each group corresponds to a 197 196 particular argp structure from the tree of such descending from the top 198 197 level argp passed to argp_parse. */ … … 210 209 char *short_end; 211 210 212 /* The number of non-option args suc essfully handled by this parser. */211 /* The number of non-option args successfully handled by this parser. */ 213 212 unsigned args_processed; 214 213 … … 262 261 /* The end of the GROUPS array. */ 263 262 struct group *egroup; 264 /* A nvector containing storage for the CHILD_INPUTS field in all groups. */263 /* A vector containing storage for the CHILD_INPUTS field in all groups. */ 265 264 void **child_inputs; 266 265 … … 394 393 } 395 394 396 /* Find the merged set of getopt options, with keys approp iately prefixed. */395 /* Find the merged set of getopt options, with keys appropriately prefixed. */ 397 396 static void 398 397 parser_convert (struct parser *parser, const struct argp *argp, int flags) … … 449 448 while (!__option_is_end (opt++)) 450 449 num_opts++; 451 szs->short_len += num_opts * 3; /* opt + up to 2 `:'s */450 szs->short_len += num_opts * 3; /* opt + up to 2 ':'s */ 452 451 szs->long_len += num_opts; 453 452 } … … 795 794 if (parser->state.quoted && parser->state.next < parser->state.quoted) 796 795 /* The next argument pointer has been moved to before the quoted 797 region, so pretend we never saw the quoting `--', and give getopt796 region, so pretend we never saw the quoting "--", and give getopt 798 797 another chance. If the user hasn't removed it, getopt will just 799 798 process it again. */ … … 827 826 == 0) 828 827 /* Not only is this the end of the options, but it's a 829 `quoted'region, which may have args that *look* like828 "quoted" region, which may have args that *look* like 830 829 options, so we definitely shouldn't try to use getopt past 831 830 here, whatever happens. */ … … 894 893 if (!(flags & ARGP_PARSE_ARGV0)) 895 894 { 896 #if defHAVE_DECL_PROGRAM_INVOCATION_NAME895 #if HAVE_DECL_PROGRAM_INVOCATION_NAME 897 896 if (!program_invocation_name) 898 897 program_invocation_name = argv[0]; 899 898 #endif 900 #if defHAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME899 #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 901 900 if (!program_invocation_short_name) 902 901 program_invocation_short_name = __argp_base_name (argv[0]);
Note:
See TracChangeset
for help on using the changeset viewer.