libxcoder  5.2.0
ni_getopt.h File Reference

Implementation of getopt() and getopt_long() for Windows environment. More...

Go to the source code of this file.

Data Structures

struct  option
 

Macros

#define no_argument   0
 
#define required_argument   1
 
#define optional_argument   2
 

Functions

LIB_API_GETOPT int getopt (int argc, char *argv[], const char *optstring)
 
LIB_API_GETOPT int getopt_long (int argc, char *argv[], const char *optstring, const struct option *longopts, int *longindex)
 

Variables

LIB_API_GETOPT int optind
 
LIB_API_GETOPT int opterr
 
LIB_API_GETOPT int optopt
 
LIB_API_GETOPT char * optarg
 

Detailed Description

Implementation of getopt() and getopt_long() for Windows environment.


Definition in file ni_getopt.h.

Macro Definition Documentation

◆ no_argument

#define no_argument   0

Definition at line 85 of file ni_getopt.h.

◆ optional_argument

#define optional_argument   2

Definition at line 87 of file ni_getopt.h.

◆ required_argument

#define required_argument   1

Definition at line 86 of file ni_getopt.h.

Function Documentation

◆ getopt()

LIB_API_GETOPT int getopt ( int  argc,
char *  argv[],
const char *  optstring 
)

Definition at line 38 of file ni_getopt.c.

◆ getopt_long()

LIB_API_GETOPT int getopt_long ( int  argc,
char *  argv[],
const char *  optstring,
const struct option longopts,
int *  longindex 
)

Definition at line 99 of file ni_getopt.c.

Variable Documentation

◆ optarg

LIB_API_GETOPT char* optarg

Definition at line 33 of file ni_getopt.c.

◆ opterr

LIB_API_GETOPT int opterr

Definition at line 49 of file ni_getopt.h.

◆ optind

LIB_API_GETOPT int optind

Definition at line 34 of file ni_getopt.c.

◆ optopt

LIB_API_GETOPT int optopt

Definition at line 49 of file ni_getopt.h.