#include <stdio.h>
#include "gnu_getopt.h"
#include <cstring>
#include <cstdlib>
Include dependency graph for getopt.cc:
Go to the source code of this file.
Defines | |
#define | GNU_GETOPT_INTERFACE_VERSION 2 |
#define | _(msgid) (msgid) |
#define | NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') |
Enumerations | |
enum | { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } |
Functions | |
static void | exchange (char **argv) |
static const char * | _getopt_initialize (int argc, char *const *argv, const char *optstring) |
int | gnu_getopt_internal_ (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only) |
Variables | |
char * | optarg |
int | optind = 1 |
int | __getopt_initialized |
static char * | nextchar |
int | opterr = 1 |
int | optopt = '?' |
static enum { ... } | ordering |
static char * | posixly_correct |
static int | first_nonopt |
static int | last_nonopt |
Referenced by gnu_getopt_internal_().
anonymous enum |
static void exchange | ( | char ** | argv | ) | [static] |
Definition at line 193 of file getopt.cc.
References first_nonopt, last_nonopt, and optind.
Referenced by gnu_getopt_internal_().
static const char* _getopt_initialize | ( | int | argc, | |
char *const * | argv, | |||
const char * | optstring | |||
) | [static] |
Definition at line 250 of file getopt.cc.
References first_nonopt, last_nonopt, nextchar, optind, ordering, PERMUTE, posixly_correct, REQUIRE_ORDER, and RETURN_IN_ORDER.
Referenced by gnu_getopt_internal_().
int gnu_getopt_internal_ | ( | int | argc, | |
char *const * | argv, | |||
const char * | optstring, | |||
const struct option * | longopts, | |||
int * | longind, | |||
int | long_only | |||
) |
Definition at line 343 of file getopt.cc.
References __getopt_initialized, _getopt_initialize(), exchange(), first_nonopt, if(), last_nonopt, option::name, nextchar, NONOPTION_P, optarg, opterr, optind, ordering, PERMUTE, and REQUIRE_ORDER.
Referenced by gnu_getopt(), gnu_getopt_long(), and gnu_getopt_long_only().
char* optarg |
Definition at line 84 of file getopt.cc.
Referenced by gnu_getopt_internal_(), main(), and test_driver::parse_command_line().
int optind = 1 |
Definition at line 99 of file getopt.cc.
Referenced by _getopt_initialize(), exchange(), gnu_getopt_internal_(), main(), and test_driver::parse_command_line().
char* nextchar [static] |
Definition at line 114 of file getopt.cc.
Referenced by _getopt_initialize(), and gnu_getopt_internal_().
int opterr = 1 |
enum { ... } ordering [static] |
Referenced by _getopt_initialize(), and gnu_getopt_internal_().
char* posixly_correct [static] |
int first_nonopt [static] |
Definition at line 180 of file getopt.cc.
Referenced by _getopt_initialize(), exchange(), and gnu_getopt_internal_().
int last_nonopt [static] |
Definition at line 181 of file getopt.cc.
Referenced by _getopt_initialize(), exchange(), and gnu_getopt_internal_().