COOPY » Guide
version 0.6.5
|
#include "gnulib_getopt/getopt.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "gnulib_getopt/gettext.h"
#include "gnulib_getopt/getopt_int.h"
Go to the source code of this file.
Defines | |
#define | SWAP_FLAGS(ch1, ch2) |
#define | _(x) x |
#define | NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') |
Enumerations | |
enum | { POSIXLY_CORRECT = 1 } |
Functions | |
static void | exchange (char **argv, struct _getopt_data *d) |
static const char * | _getopt_initialize (int argc, char **argv, const char *optstring, struct _getopt_data *d, int posixly_correct) |
int | _getopt_internal_r (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, struct _getopt_data *d, int posixly_correct) |
int | gnulib_getopt_internal (int argc, char **argv, const char *optstring, const struct option *longopts, int *longind, int long_only, int posixly_correct) |
int | getopt (int argc, char *const *argv, const char *optstring) |
Variables | |
char * | optarg |
int | optind = 1 |
int | opterr = 1 |
int | optopt = '?' |
static struct _getopt_data | getopt_data |
#define _ | ( | x | ) | x |
Definition at line 131 of file getopt.c.
Referenced by _getopt_internal_r(), convert(), gnumeric_save(), handle_export_options(), main(), and merge_single().
Referenced by _getopt_internal_r().
#define SWAP_FLAGS | ( | ch1, | |
ch2 | |||
) |
Definition at line 128 of file getopt.c.
Referenced by exchange().
static const char* _getopt_initialize | ( | int | argc, |
char ** | argv, | ||
const char * | optstring, | ||
struct _getopt_data * | d, | ||
int | posixly_correct | ||
) | [static] |
Definition at line 224 of file getopt.c.
References _getopt_data::__first_nonopt, _getopt_data::__last_nonopt, _getopt_data::__nextchar, _getopt_data::__ordering, _getopt_data::__posixly_correct, NULL, _getopt_data::optind, PERMUTE, REQUIRE_ORDER, and RETURN_IN_ORDER.
Referenced by _getopt_internal_r().
int _getopt_internal_r | ( | int | argc, |
char ** | argv, | ||
const char * | optstring, | ||
const struct option * | longopts, | ||
int * | longind, | ||
int | long_only, | ||
struct _getopt_data * | d, | ||
int | posixly_correct | ||
) |
Definition at line 345 of file getopt.c.
References _, _getopt_data::__first_nonopt, _getopt_data::__initialized, _getopt_data::__last_nonopt, _getopt_data::__nextchar, _getopt_data::__ordering, _getopt_initialize(), exchange(), option::flag, option::has_arg, option::name, NONOPTION_P, NULL, _getopt_data::optarg, _getopt_data::opterr, _getopt_data::optind, _getopt_data::optopt, PERMUTE, REQUIRE_ORDER, and option::val.
Referenced by _getopt_long_only_r(), _getopt_long_r(), and gnulib_getopt_internal().
static void exchange | ( | char ** | argv, |
struct _getopt_data * | d | ||
) | [static] |
Definition at line 143 of file getopt.c.
References _getopt_data::__first_nonopt, _getopt_data::__last_nonopt, NULL, _getopt_data::optind, and SWAP_FLAGS.
Referenced by _getopt_internal_r().
int getopt | ( | int | argc, |
char *const * | argv, | ||
const char * | optstring | ||
) |
Definition at line 1156 of file getopt.c.
References gnulib_getopt_internal(), and POSIXLY_CORRECT.
int gnulib_getopt_internal | ( | int | argc, |
char ** | argv, | ||
const char * | optstring, | ||
const struct option * | longopts, | ||
int * | longind, | ||
int | long_only, | ||
int | posixly_correct | ||
) |
Definition at line 1127 of file getopt.c.
References _getopt_internal_r(), getopt_data, _getopt_data::optarg, optarg, opterr, _getopt_data::opterr, optind, _getopt_data::optind, _getopt_data::optopt, and optopt.
Referenced by getopt(), getopt_long_only(), and gnulib_getopt_long().
struct _getopt_data getopt_data [static] |
Definition at line 94 of file getopt.c.
Referenced by gnulib_getopt_internal().
char* optarg |
Definition at line 64 of file getopt.c.
Referenced by coopy::app::Options::apply(), gnulib_getopt_internal(), and main().
int opterr = 1 |
Definition at line 84 of file getopt.c.
Referenced by gnulib_getopt_internal().
int optind = 1 |
Definition at line 79 of file getopt.c.
Referenced by coopy::app::Options::apply(), gnulib_getopt_internal(), and main().
int optopt = '?' |
Definition at line 90 of file getopt.c.
Referenced by gnulib_getopt_internal().