libxcoder  5.2.0
ni_getopt.c File Reference

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

#include <stdio.h>
#include <string.h>
#include "ni_getopt.h"

Go to the source code of this file.

Functions

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

Variables

char * optarg = NULL
 
int optind = 0
 
int opterr = 1
 
int optopt = 0
 

Detailed Description

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


Definition in file ni_getopt.c.

Function Documentation

◆ getopt()

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

Definition at line 38 of file ni_getopt.c.

◆ getopt_long()

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

char* optarg = NULL

Definition at line 33 of file ni_getopt.c.

◆ opterr

int opterr = 1

Definition at line 35 of file ni_getopt.c.

◆ optind

int optind = 0

Definition at line 34 of file ni_getopt.c.

◆ optopt

int optopt = 0

Definition at line 36 of file ni_getopt.c.