#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "getopt.h"
Go to the source code of this file.
|
static const char * | _getopt_initialize (int argc, char *const *argv, const char *optstring) |
|
int | _getopt_internal (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only) |
|
static void | exchange (char **argv) |
|
int | getopt (int argc, char *const *argv, const char *optstring) |
|
static char * | my_index (const char *str, int chr) |
|
#define _ |
( |
|
msgid | ) |
(msgid) |
◆ _NO_PROTO
◆ GETOPT_INTERFACE_VERSION
#define GETOPT_INTERFACE_VERSION 2 |
◆ NONOPTION_P
#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') |
◆ SWAP_FLAGS
#define SWAP_FLAGS |
( |
|
ch1, |
|
|
|
ch2 |
|
) |
| |
◆ anonymous enum
Enumerator |
---|
REQUIRE_ORDER | |
PERMUTE | |
RETURN_IN_ORDER | |
Definition at line 188 of file getopt.c.
◆ _getopt_initialize()
static const char* _getopt_initialize |
( |
int |
argc, |
|
|
char *const * |
argv, |
|
|
const char * |
optstring |
|
) |
| |
|
static |
◆ _getopt_internal()
int _getopt_internal |
( |
int |
argc, |
|
|
char *const * |
argv, |
|
|
const char * |
optstring, |
|
|
const struct option * |
longopts, |
|
|
int * |
longind, |
|
|
int |
long_only |
|
) |
| |
◆ exchange()
static void exchange |
( |
char ** |
argv | ) |
|
|
static |
◆ getopt()
int getopt |
( |
int |
argc, |
|
|
char *const * |
argv, |
|
|
const char * |
optstring |
|
) |
| |
◆ my_index()
static char* my_index |
( |
const char * |
str, |
|
|
int |
chr |
|
) |
| |
|
static |
◆ __getopt_initialized
int __getopt_initialized = 0 |
◆ first_nonopt
◆ last_nonopt
◆ nextchar
◆ optarg
◆ opterr
◆ optind
◆ optopt
◆ ordering
◆ posixly_correct