Ignore:
Timestamp:
Feb 3, 2017, 2:02:34 PM (8 years ago)
Author:
Silvan Scherrer
Message:

cpio: update vendor to version 2.12

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.
    53   This file is part of the GNU C Library.
    64   Written by Miles Bader <miles@gnu.ai.mit.edu>.
     
    2422
    2523#include <alloca.h>
     24#include <stdalign.h>
    2625#include <stddef.h>
    2726#include <stdlib.h>
     
    4544#include "argp-namefrob.h"
    4645
    47 #define alignof(type) offsetof (struct { char c; type x; }, x)
    4846#define alignto(n, d) ((((n) + (d) - 1) / (d)) * (d))
    4947
     
    159157        fprintf (state->out_stream, "%s\n", argp_program_version);
    160158      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!?"));
    163162      if (! (state->flags & ARGP_NO_EXIT))
    164163        exit (0);
     
    194193
    195194
    196 /* The state of a `group' during parsing.  Each group corresponds to a
     195/* The state of a "group" during parsing.  Each group corresponds to a
    197196   particular argp structure from the tree of such descending from the top
    198197   level argp passed to argp_parse.  */
     
    210209  char *short_end;
    211210
    212   /* The number of non-option args sucessfully handled by this parser.  */
     211  /* The number of non-option args successfully handled by this parser.  */
    213212  unsigned args_processed;
    214213
     
    262261  /* The end of the GROUPS array.  */
    263262  struct group *egroup;
    264   /* An vector containing storage for the CHILD_INPUTS field in all groups.  */
     263  /* A vector containing storage for the CHILD_INPUTS field in all groups.  */
    265264  void **child_inputs;
    266265
     
    394393}
    395394
    396 /* Find the merged set of getopt options, with keys appropiately prefixed. */
     395/* Find the merged set of getopt options, with keys appropriately prefixed. */
    397396static void
    398397parser_convert (struct parser *parser, const struct argp *argp, int flags)
     
    449448          while (!__option_is_end (opt++))
    450449            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 */
    452451          szs->long_len += num_opts;
    453452        }
     
    795794  if (parser->state.quoted && parser->state.next < parser->state.quoted)
    796795    /* The next argument pointer has been moved to before the quoted
    797        region, so pretend we never saw the quoting `--', and give getopt
     796       region, so pretend we never saw the quoting "--", and give getopt
    798797       another chance.  If the user hasn't removed it, getopt will just
    799798       process it again.  */
     
    827826                   == 0)
    828827            /* Not only is this the end of the options, but it's a
    829                `quoted' region, which may have args that *look* like
     828               "quoted" region, which may have args that *look* like
    830829               options, so we definitely shouldn't try to use getopt past
    831830               here, whatever happens.  */
     
    894893  if (!(flags & ARGP_PARSE_ARGV0))
    895894    {
    896 #ifdef HAVE_DECL_PROGRAM_INVOCATION_NAME
     895#if HAVE_DECL_PROGRAM_INVOCATION_NAME
    897896      if (!program_invocation_name)
    898897        program_invocation_name = argv[0];
    899898#endif
    900 #ifdef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
     899#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
    901900      if (!program_invocation_short_name)
    902901        program_invocation_short_name = __argp_base_name (argv[0]);
Note: See TracChangeset for help on using the changeset viewer.