#include "ansidecl.h"#include <stdio.h>#include "getopt.h"

Go to the source code of this file.
Defines | |
| #define | GETOPT_INTERFACE_VERSION 2 |
| #define | _(msgid) (msgid) |
| #define | SWAP_FLAGS(ch1, ch2) |
| #define | NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') |
Enumerations | |
| enum | { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } |
Functions/Subroutines | |
| char * | getenv (const char *) |
| static char * | my_index (const char *str, int chr) |
| static void | exchange (char **argv) |
| static const char * | _getopt_initialize (int argc ATTRIBUTE_UNUSED, char *const *argv ATTRIBUTE_UNUSED, const char *optstring) |
| int | _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only) |
| int | getopt (int argc, char *const *argv, const char *optstring) |
Variables | |
| char * | optarg = NULL |
| int | optind = 1 |
| int | __getopt_initialized = 0 |
| static char * | nextchar |
| int | opterr = 1 |
| int | optopt = '?' |
| static enum { ... } | ordering |
| static char * | posixly_correct |
| static int | first_nonopt |
| static int | last_nonopt |
| anonymous enum |
| static const char* _getopt_initialize | ( | int argc | ATTRIBUTE_UNUSED, | |
| char *const *argv | ATTRIBUTE_UNUSED, | |||
| const char * | optstring | |||
| ) | [static] |
Definition at line 401 of file getopt.c.
References first_nonopt, getenv(), last_nonopt, len, malloc, mempcpy(), memset, nextchar, NULL, optind, ordering, PERMUTE, posixly_correct, REQUIRE_ORDER, RETURN_IN_ORDER, and strlen().
| int _getopt_internal | ( | int | argc, | |
| char *const * | argv, | |||
| const char * | optstring, | |||
| const struct option * | longopts, | |||
| int * | longind, | |||
| int | long_only | |||
| ) |
Definition at line 522 of file getopt.c.
References _, __getopt_initialized, _getopt_initialize(), c, exchange(), first_nonopt, option::flag, fprintf(), option::has_arg, last_nonopt, my_index(), option::name, nextchar, NONOPTION_P, NULL, optarg, opterr, optind, optopt, ordering, p, PERMUTE, posixly_correct, REQUIRE_ORDER, strcmp(), strlen(), strncmp(), and option::val.
| static void exchange | ( | char ** | argv | ) | [static] |
Definition at line 317 of file getopt.c.
References first_nonopt, i, last_nonopt, len, malloc, mempcpy(), memset, NULL, optind, SWAP_FLAGS, and top.
| char* getenv | ( | const char * | ) |
| int getopt | ( | int | argc, | |
| char *const * | argv, | |||
| const char * | optstring | |||
| ) |
| static char* my_index | ( | const char * | str, | |
| int | chr | |||
| ) | [static] |
| int __getopt_initialized = 0 |
int first_nonopt [static] |
int last_nonopt [static] |
| char* optarg = NULL |
Definition at line 116 of file getopt.c.
Referenced by _getopt_internal(), DEFUN(), Dipa_Proc_Options(), main(), parse_args(), parse_options(), process_args(), process_cmd_line(), and set_prog_file_names().
| int opterr = 1 |
Definition at line 151 of file getopt.c.
Referenced by _getopt_internal(), parse_args(), and process_cmd_line().
| int optind = 1 |
Definition at line 131 of file getopt.c.
Referenced by _getopt_initialize(), _getopt_internal(), DEFUN(), Dipa_Proc_Options(), exchange(), fnotice(), main(), parse_args(), parse_options(), process_args(), process_C_option(), process_cmd_line(), process_O_option(), and set_prog_file_names().
| int optopt = '?' |
enum { ... } ordering [static] |
char* posixly_correct [static] |
1.5.6