~ubuntu-branches/ubuntu/utopic/coreutils/utopic-proposed

« back to all changes in this revision

Viewing changes to lib/argmatch.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-11-28 03:03:42 UTC
  • mfrom: (8.3.4 sid)
  • Revision ID: package-import@ubuntu.com-20121128030342-21zanj8354gas5gr
Tags: 8.20-3ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Make 'uname -i -p' return the real processor/hardware, instead of
    unknown.
  - Build-depend on gettext:any instead of on gettext, so that apt-get can
    properly resolve build-dependencies on the tool when cross-building.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* argmatch.h -- definitions and prototypes for argmatch.c
2
2
 
3
 
   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2011 Free Software
 
3
   Copyright (C) 1990, 1998-1999, 2001-2002, 2004-2005, 2009-2012 Free Software
4
4
   Foundation, Inc.
5
5
 
6
6
   This program is free software: you can redistribute it and/or modify
40
40
   to the same values in VALLIST).  */
41
41
 
42
42
ptrdiff_t argmatch (char const *arg, char const *const *arglist,
43
 
                    char const *vallist, size_t valsize);
 
43
                    char const *vallist, size_t valsize) _GL_ATTRIBUTE_PURE;
44
44
 
45
45
# define ARGMATCH(Arg, Arglist, Vallist) \
46
46
  argmatch (Arg, Arglist, (char const *) (Vallist), sizeof *(Vallist))
47
47
 
48
48
/* xargmatch calls this function when it fails.  This function should not
49
49
   return.  By default, this is a function that calls ARGMATCH_DIE which
50
 
   in turn defaults to `exit (exit_failure)'.  */
 
50
   in turn defaults to 'exit (exit_failure)'.  */
51
51
typedef void (*argmatch_exit_fn) (void);
52
52
extern argmatch_exit_fn argmatch_die;
53
53
 
93
93
 
94
94
char const *argmatch_to_argument (char const *value,
95
95
                                  char const *const *arglist,
96
 
                                  char const *vallist, size_t valsize);
 
96
                                  char const *vallist, size_t valsize)
 
97
  _GL_ATTRIBUTE_PURE;
97
98
 
98
99
# define ARGMATCH_TO_ARGUMENT(Value, Arglist, Vallist)                  \
99
100
  argmatch_to_argument (Value, Arglist,                                 \