dlvhex
2.5.0
|
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "getopt.h"
Go to the source code of this file.
Defines | |
#define | __P(x) x |
#define | _DIAGASSERT(x) assert(x) |
#define | BADCH (int)'?' |
#define | BADARG (int)':' |
#define | EMSG "" |
Functions | |
static char *__progname | __P ((char *)) |
int getopt_internal | __P ((int, char *const *, const char *)) |
static char * | __progname (char *nargv0) |
int | getopt_internal (int nargc, char *const *nargv, const char *ostr) |
int | getopt_long (int nargc, char **nargv, char *options, struct option *long_options, int *index) |
Variables | |
int | opterr = 0 |
int | optind = 1 |
int | optopt = 0 |
int | optreset = 0 |
char * | optarg |
#define _DIAGASSERT | ( | x | ) | assert(x) |
Definition at line 47 of file getopt.c.
Referenced by __progname(), getopt_internal(), and getopt_long().
#define BADARG (int)':' |
Definition at line 69 of file getopt.c.
Referenced by getopt_internal(), and getopt_long().
#define BADCH (int)'?' |
Definition at line 68 of file getopt.c.
Referenced by getopt_internal(), and getopt_long().
#define EMSG "" |
Definition at line 70 of file getopt.c.
Referenced by getopt_internal().
static char* __progname __P | ( | (char *) | ) | [static] |
int getopt_internal __P | ( | (int, char *const *, const char *) | ) |
static char* __progname | ( | char * | nargv0 | ) | [static] |
Definition at line 53 of file getopt.c.
References _DIAGASSERT.
Referenced by getopt_internal(), and getopt_long().
int getopt_internal | ( | int | nargc, |
char * const * | nargv, | ||
const char * | ostr | ||
) |
int getopt_long | ( | int | nargc, |
char ** | nargv, | ||
char * | options, | ||
struct option * | long_options, | ||
int * | index | ||
) |
Definition at line 163 of file getopt.c.
References __progname(), _DIAGASSERT, BADARG, BADCH, option::flag, getopt_internal(), option::name, optarg, opterr, optind, optional_argument, required_argument, and option::val.