Back to index

glibc  2.9
Classes | Defines | Typedefs | Functions | Variables
argp.h File Reference
#include <stdio.h>
#include <ctype.h>
#include <getopt.h>
#include <limits.h>
#include <errno.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  argp_option
struct  argp
struct  argp_child
struct  argp_state

Defines

#define __need_error_t
#define __const   const
#define __THROW
#define __NTH(fct)   fct __THROW
#define __attribute__(Spec)   /* empty */
#define __format__   format
#define __printf__   printf
#define __restrict
#define __error_t_defined
#define OPTION_ARG_OPTIONAL   0x1
#define OPTION_HIDDEN   0x2
#define OPTION_ALIAS   0x4
#define OPTION_DOC   0x8
#define OPTION_NO_USAGE   0x10
#define ARGP_ERR_UNKNOWN   E2BIG /* Hurd should never need E2BIG. XXX */
#define ARGP_KEY_ARG   0
#define ARGP_KEY_ARGS   0x1000006
#define ARGP_KEY_END   0x1000001
#define ARGP_KEY_NO_ARGS   0x1000002
#define ARGP_KEY_INIT   0x1000003
#define ARGP_KEY_FINI   0x1000007
#define ARGP_KEY_SUCCESS   0x1000004
#define ARGP_KEY_ERROR   0x1000005
#define ARGP_KEY_HELP_PRE_DOC   0x2000001 /* Help text preceeding options. */
#define ARGP_KEY_HELP_POST_DOC   0x2000002 /* Help text following options. */
#define ARGP_KEY_HELP_HEADER   0x2000003 /* Option header string. */
#define ARGP_KEY_HELP_EXTRA
#define ARGP_KEY_HELP_DUP_ARGS_NOTE   0x2000005
#define ARGP_KEY_HELP_ARGS_DOC   0x2000006 /* Argument doc string. */
#define ARGP_PARSE_ARGV0   0x01
#define ARGP_NO_ERRS   0x02
#define ARGP_NO_ARGS   0x04
#define ARGP_IN_ORDER   0x08
#define ARGP_NO_HELP   0x10
#define ARGP_NO_EXIT   0x20
#define ARGP_LONG_ONLY   0x40
#define ARGP_SILENT   (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
#define ARGP_HELP_USAGE   0x01 /* a Usage: message. */
#define ARGP_HELP_SHORT_USAGE   0x02 /* " but don't actually print options. */
#define ARGP_HELP_SEE   0x04 /* a `Try ... for more help' message. */
#define ARGP_HELP_LONG   0x08 /* a long help message. */
#define ARGP_HELP_PRE_DOC   0x10 /* doc string preceding long help. */
#define ARGP_HELP_POST_DOC   0x20 /* doc string following long help. */
#define ARGP_HELP_DOC   (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC)
#define ARGP_HELP_BUG_ADDR   0x40 /* bug report address */
#define ARGP_HELP_LONG_ONLY
#define ARGP_HELP_EXIT_ERR   0x100 /* Call exit(1) instead of returning. */
#define ARGP_HELP_EXIT_OK   0x200 /* Call exit(0) instead of returning. */
#define ARGP_HELP_STD_ERR   (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
#define ARGP_HELP_STD_USAGE   (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR)
#define ARGP_HELP_STD_HELP

Typedefs

typedef int error_t
typedef error_t(* argp_parser_t )(int key, char *arg, struct argp_state *state)

Functions

error_t argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input)
error_t __argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input)
void argp_help (__const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__restrict __name)
void __argp_help (__const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__name)
void argp_state_help (__const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags)
void __argp_state_help (__const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags)
void argp_usage (__const struct argp_state *__state)
void __argp_usage (__const struct argp_state *__state)
void argp_error (__const struct argp_state *__restrict __state, __const char *__restrict __fmt,...) __attribute__((__format__(__printf__
void void __argp_error (__const struct argp_state *__restrict __state, __const char *__restrict __fmt,...) __attribute__((__format__(__printf__
void void void argp_failure (__const struct argp_state *__restrict __state, int __status, int __errnum, __const char *__restrict __fmt,...) __attribute__((__format__(__printf__
void void void void __argp_failure (__const struct argp_state *__restrict __state, int __status, int __errnum, __const char *__restrict __fmt,...) __attribute__((__format__(__printf__
void void void void int _option_is_short (__const struct argp_option *__opt) __THROW
int __option_is_short (__const struct argp_option *__opt) __THROW
int _option_is_end (__const struct argp_option *__opt) __THROW
int __option_is_end (__const struct argp_option *__opt) __THROW
void * _argp_input (__const struct argp *__restrict __argp, __const struct argp_state *__restrict __state) __THROW
void * __argp_input (__const struct argp *__restrict __argp, __const struct argp_state *__restrict __state) __THROW

Variables

__const char * argp_program_version
void(* argp_program_version_hook )(FILE *__restrict __stream, struct argp_state *__restrict __state)
__const char * argp_program_bug_address
error_t argp_err_exit_status

Class Documentation

struct argp_option

Definition at line 83 of file argp.h.

Class Members
__const char * arg
__const char * doc
int flags
int group
int key
__const char * name
struct argp_child

Definition at line 287 of file argp.h.

Collaboration diagram for argp_child:
Class Members
__const struct argp * argp
int flags
int group
__const char * header
struct argp_state

Definition at line 312 of file argp.h.

Collaboration diagram for argp_state:
Class Members
unsigned arg_num
int argc
char ** argv
void ** child_inputs
FILE * err_stream
unsigned flags
void * hook
void * input
char * name
int next
FILE * out_stream
void * pstate
int quoted
__const struct argp * root_argp

Define Documentation

#define __attribute__ (   Spec)    /* empty */

Definition at line 47 of file argp.h.

#define __const   const

Definition at line 34 of file argp.h.

Definition at line 71 of file argp.h.

#define __format__   format

Definition at line 52 of file argp.h.

#define __need_error_t

Definition at line 30 of file argp.h.

#define __NTH (   fct)    fct __THROW

Definition at line 41 of file argp.h.

#define __printf__   printf

Definition at line 53 of file argp.h.

#define __restrict

Definition at line 64 of file argp.h.

#define __THROW

Definition at line 38 of file argp.h.

#define ARGP_ERR_UNKNOWN   E2BIG /* Hurd should never need E2BIG. XXX */

Definition at line 161 of file argp.h.

#define ARGP_HELP_BUG_ADDR   0x40 /* bug report address */

Definition at line 455 of file argp.h.

Definition at line 454 of file argp.h.

#define ARGP_HELP_EXIT_ERR   0x100 /* Call exit(1) instead of returning. */

Definition at line 459 of file argp.h.

#define ARGP_HELP_EXIT_OK   0x200 /* Call exit(0) instead of returning. */

Definition at line 460 of file argp.h.

#define ARGP_HELP_LONG   0x08 /* a long help message. */

Definition at line 451 of file argp.h.

Value:
0x80 /* modify output appropriately to
                                   reflect ARGP_LONG_ONLY mode.  */

Definition at line 456 of file argp.h.

#define ARGP_HELP_POST_DOC   0x20 /* doc string following long help. */

Definition at line 453 of file argp.h.

#define ARGP_HELP_PRE_DOC   0x10 /* doc string preceding long help. */

Definition at line 452 of file argp.h.

#define ARGP_HELP_SEE   0x04 /* a `Try ... for more help' message. */

Definition at line 450 of file argp.h.

#define ARGP_HELP_SHORT_USAGE   0x02 /* " but don't actually print options. */

Definition at line 449 of file argp.h.

Definition at line 464 of file argp.h.

Definition at line 468 of file argp.h.

#define ARGP_HELP_USAGE   0x01 /* a Usage: message. */

Definition at line 448 of file argp.h.

#define ARGP_IN_ORDER   0x08

Definition at line 387 of file argp.h.

#define ARGP_KEY_ARG   0

Definition at line 189 of file argp.h.

#define ARGP_KEY_ARGS   0x1000006

Definition at line 195 of file argp.h.

#define ARGP_KEY_END   0x1000001

Definition at line 197 of file argp.h.

#define ARGP_KEY_ERROR   0x1000005

Definition at line 214 of file argp.h.

#define ARGP_KEY_FINI   0x1000007

Definition at line 209 of file argp.h.

#define ARGP_KEY_HELP_ARGS_DOC   0x2000006 /* Argument doc string. */

Definition at line 283 of file argp.h.

#define ARGP_KEY_HELP_DUP_ARGS_NOTE   0x2000005

Definition at line 282 of file argp.h.

Value:
0x2000004 /* After all other documentation;
                                        TEXT is NULL for this key.  */

Definition at line 279 of file argp.h.

#define ARGP_KEY_HELP_HEADER   0x2000003 /* Option header string. */

Definition at line 278 of file argp.h.

#define ARGP_KEY_HELP_POST_DOC   0x2000002 /* Help text following options. */

Definition at line 277 of file argp.h.

#define ARGP_KEY_HELP_PRE_DOC   0x2000001 /* Help text preceeding options. */

Definition at line 276 of file argp.h.

#define ARGP_KEY_INIT   0x1000003

Definition at line 207 of file argp.h.

#define ARGP_KEY_NO_ARGS   0x1000002

Definition at line 203 of file argp.h.

#define ARGP_KEY_SUCCESS   0x1000004

Definition at line 212 of file argp.h.

#define ARGP_LONG_ONLY   0x40

Definition at line 397 of file argp.h.

#define ARGP_NO_ARGS   0x04

Definition at line 383 of file argp.h.

#define ARGP_NO_ERRS   0x02

Definition at line 371 of file argp.h.

#define ARGP_NO_EXIT   0x20

Definition at line 394 of file argp.h.

#define ARGP_NO_HELP   0x10

Definition at line 391 of file argp.h.

#define ARGP_PARSE_ARGV0   0x01

Definition at line 365 of file argp.h.

Definition at line 400 of file argp.h.

#define OPTION_ALIAS   0x4

Definition at line 125 of file argp.h.

#define OPTION_ARG_OPTIONAL   0x1

Definition at line 117 of file argp.h.

#define OPTION_DOC   0x8

Definition at line 137 of file argp.h.

#define OPTION_HIDDEN   0x2

Definition at line 120 of file argp.h.

#define OPTION_NO_USAGE   0x10

Definition at line 146 of file argp.h.


Typedef Documentation

typedef error_t(* argp_parser_t)(int key, char *arg, struct argp_state *state)

Definition at line 153 of file argp.h.

typedef int error_t

Definition at line 70 of file argp.h.


Function Documentation

void void __argp_error ( __const struct argp_state *__restrict  __state,
__const char *__restrict  __fmt,
  ... 
)
void void void void __argp_failure ( __const struct argp_state *__restrict  __state,
int  __status,
int  __errnum,
__const char *__restrict  __fmt,
  ... 
)
void __argp_help ( __const struct argp *__restrict  __argp,
FILE *__restrict  __stream,
unsigned  __flags,
char *  __name 
)
void* __argp_input ( __const struct argp *__restrict  __argp,
__const struct argp_state *__restrict  __state 
)
error_t __argp_parse ( __const struct argp *__restrict  __argp,
int  __argc,
char **__restrict  __argv,
unsigned  __flags,
int *__restrict  __arg_index,
void *__restrict  __input 
)
void __argp_state_help ( __const struct argp_state *__restrict  __state,
FILE *__restrict  __stream,
unsigned int  __flags 
)
void __argp_usage ( __const struct argp_state __state)
int __option_is_end ( __const struct argp_option __opt)

Here is the caller graph for this function:

Here is the caller graph for this function:

void* _argp_input ( __const struct argp *__restrict  __argp,
__const struct argp_state *__restrict  __state 
)
int _option_is_end ( __const struct argp_option __opt)
void void void void int _option_is_short ( __const struct argp_option __opt)
void argp_error ( __const struct argp_state *__restrict  __state,
__const char *__restrict  __fmt,
  ... 
)
void void void argp_failure ( __const struct argp_state *__restrict  __state,
int  __status,
int  __errnum,
__const char *__restrict  __fmt,
  ... 
)
void argp_help ( __const struct argp *__restrict  __argp,
FILE *__restrict  __stream,
unsigned  __flags,
char *__restrict  __name 
)

Here is the caller graph for this function:

error_t argp_parse ( __const struct argp *__restrict  __argp,
int  __argc,
char **__restrict  __argv,
unsigned  __flags,
int *__restrict  __arg_index,
void *__restrict  __input 
)

Here is the caller graph for this function:

void argp_state_help ( __const struct argp_state *__restrict  __state,
FILE *__restrict  __stream,
unsigned int  __flags 
)
void argp_usage ( __const struct argp_state __state)

Here is the caller graph for this function:


Variable Documentation

Definition at line 32 of file argp-eexst.c.

Definition at line 26 of file argp-ba.c.

Definition at line 25 of file argp-pv.c.

void(* argp_program_version_hook)(FILE *__restrict __stream, struct argp_state *__restrict __state)

Definition at line 32 of file argp-pvh.c.