#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
|
int | getopt (int argc, char *const argv[], const char *optstring) |
|
static int | getopt_internal (int argc, char *const argv[], const char *shortopts, const struct option *longopts, int *longind, int only) |
|
int | getopt_long (int argc, char *const argv[], const char *shortopts, const struct option *longopts, int *longind) |
|
int | getopt_long_only (int argc, char *const argv[], const char *shortopts, const struct option *longopts, int *longind) |
|
static int | is_option (char *argv_element, int only) |
|
static void | permute (char *const argv[], int len1, int len2) |
|
static void | reverse_argv_elements (char **argv, int num) |
|
Enumerator |
---|
PERMUTE |
|
RETURN_IN_ORDER |
|
REQUIRE_ORDER |
|
int getopt |
( |
int |
argc, |
|
|
char *const |
argv[], |
|
|
const char * |
optstring |
|
) |
| |
static int getopt_internal |
( |
int |
argc, |
|
|
char *const |
argv[], |
|
|
const char * |
shortopts, |
|
|
const struct option * |
longopts, |
|
|
int * |
longind, |
|
|
int |
only |
|
) |
| |
|
static |
References is_option(), NULL, optarg, opterr, optind, optopt, PERMUTE, permute(), REQUIRE_ORDER, RETURN_IN_ORDER, and val.
Referenced by getopt(), getopt_long(), and getopt_long_only().
int getopt_long |
( |
int |
argc, |
|
|
char *const |
argv[], |
|
|
const char * |
shortopts, |
|
|
const struct option * |
longopts, |
|
|
int * |
longind |
|
) |
| |
int getopt_long_only |
( |
int |
argc, |
|
|
char *const |
argv[], |
|
|
const char * |
shortopts, |
|
|
const struct option * |
longopts, |
|
|
int * |
longind |
|
) |
| |
static int is_option |
( |
char * |
argv_element, |
|
|
int |
only |
|
) |
| |
|
static |
static void permute |
( |
char *const |
argv[], |
|
|
int |
len1, |
|
|
int |
len2 |
|
) |
| |
|
static |
static void reverse_argv_elements |
( |
char ** |
argv, |
|
|
int |
num |
|
) |
| |
|
static |