#include <crtdefs.h>
#include <errno.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
Go to the source code of this file.
|
| static int | getopt_internal (int, char *const *, const char *, const struct option *, int *, int) |
| |
| static int | parse_long_options (char *const *, const char *, const struct option *, int *, int) |
| |
| static int | gcd (int, int) |
| |
| static void | permute_args (int, int, int, char *const *) |
| |
| static void | _vwarnx (const char *fmt, va_list ap) |
| |
| static void | warnx (const char *fmt,...) |
| |
| int | getopt (int nargc, char *const *nargv, const char *options) |
| |
| int | getopt_long (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx) |
| |
| int | getopt_long_only (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx) |
| |
◆ __GETOPT_H__
DISCLAIMER This file is part of the mingw-w64 runtime package.
The mingw-w64 runtime package and its code is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESSED OR IMPLIED ARE HEREBY DISCLAIMED. This includes but is not limited to warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Definition at line 62 of file getopt.h.
◆ __GETOPT_LONG_H__
| #define __GETOPT_LONG_H__ |
◆ __progname
| #define __progname __argv[0] |
◆ BADARG
| #define BADARG ((*options == ':') ? (int)':' : (int)'?') |
◆ BADCH
◆ EMSG
◆ FLAG_ALLARGS
| #define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ |
◆ FLAG_LONGONLY
◆ FLAG_PERMUTE
| #define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ |
◆ HAVE_DECL_GETOPT
| #define HAVE_DECL_GETOPT 1 |
◆ IDENTICAL_INTERPRETATION
| #define IDENTICAL_INTERPRETATION |
( |
| _x, |
|
|
| _y ) |
Value: (long_options[(_x)].has_arg == long_options[(_y)].has_arg && \
long_options[(_x)].flag == long_options[(_y)].flag && \
long_options[(_x)].val == long_options[(_y)].val)
◆ INORDER
◆ optreset
| #define optreset __mingw_optreset |
◆ PRINT_ERROR
| #define PRINT_ERROR ((opterr) && (*options != ':')) |
◆ REPLACE_GETOPT
| #define REPLACE_GETOPT /* use this getopt as the system getopt(3) */ |
◆ anonymous enum
| Enumerator |
|---|
| no_argument | |
| required_argument | |
| optional_argument | |
Definition at line 260 of file getopt.h.
◆ _vwarnx()
| static void _vwarnx |
( |
const char * | fmt, |
|
|
va_list | ap ) |
|
static |
◆ gcd()
| static int gcd |
( |
int | a, |
|
|
int | b ) |
|
static |
◆ getopt()
| int getopt |
( |
int | nargc, |
|
|
char *const * | nargv, |
|
|
const char * | options ) |
◆ getopt_internal()
| static int getopt_internal |
( |
int | nargc, |
|
|
char *const * | nargv, |
|
|
const char * | options, |
|
|
const struct option * | long_options, |
|
|
int * | idx, |
|
|
int | flags ) |
|
static |
◆ getopt_long()
| int getopt_long |
( |
int | nargc, |
|
|
char *const * | nargv, |
|
|
const char * | options, |
|
|
const struct option * | long_options, |
|
|
int * | idx ) |
◆ getopt_long_only()
| int getopt_long_only |
( |
int | nargc, |
|
|
char *const * | nargv, |
|
|
const char * | options, |
|
|
const struct option * | long_options, |
|
|
int * | idx ) |
◆ parse_long_options()
| static int parse_long_options |
( |
char *const * | nargv, |
|
|
const char * | options, |
|
|
const struct option * | long_options, |
|
|
int * | idx, |
|
|
int | short_too ) |
|
static |
◆ permute_args()
| static void permute_args |
( |
int | panonopt_start, |
|
|
int | panonopt_end, |
|
|
int | opt_end, |
|
|
char *const * | nargv ) |
|
static |
◆ warnx()
| static void warnx |
( |
const char * | fmt, |
|
|
| ... ) |
|
static |
◆ ambig
| const char ambig[] = "ambiguous option -- %.*s" |
|
static |
◆ illoptchar
| const char illoptchar[] = "unknown option -- %c" |
|
static |
◆ illoptstring
| const char illoptstring[] = "unknown option -- %s" |
|
static |
◆ noarg
| const char noarg[] = "option doesn't take an argument -- %.*s" |
|
static |
◆ nonopt_end
◆ nonopt_start
◆ optarg
◆ opterr
◆ optind
◆ optopt
◆ optreset
◆ place
◆ recargchar
| const char recargchar[] = "option requires an argument -- %c" |
|
static |
◆ recargstring
| const char recargstring[] = "option requires an argument -- %s" |
|
static |