w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

getopt.c File Reference
#include <stdio.h>
#include "getopt.h"
Include dependency graph for getopt.c:

Go to the source code of this file.

Macros

#define _NO_PROTO
 
#define GETOPT_INTERFACE_VERSION   2
 
#define _(msgid)   (msgid)
 
#define NONOPTION_P   (argv[optind][0] != '-' || argv[optind][1] == '\0')
 

Enumerations

enum  { REQUIRE_ORDER , PERMUTE , RETURN_IN_ORDER }
 

Functions

char * getenv ()
 
static char * my_index (const char *str, int chr)
 
static void exchange (char **argv)
 
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)
 
int getopt (int argc, char *const *argv, const char *optstring)
 

Variables

char * optarg = NULL
 
int optind = 1
 
int __getopt_initialized = 0
 
static char * nextchar
 
int opterr = 1
 
int optopt = '?'
 
static enum { ... }  ordering
 
static char * posixly_correct
 
static int first_nonopt
 
static int last_nonopt
 

Macro Definition Documentation

◆ _

#define _ (   msgid)    (msgid)

Definition at line 91 of file getopt.c.

◆ _NO_PROTO

#define _NO_PROTO

Definition at line 29 of file getopt.c.

◆ GETOPT_INTERFACE_VERSION

#define GETOPT_INTERFACE_VERSION   2

Definition at line 49 of file getopt.c.

◆ NONOPTION_P

#define NONOPTION_P   (argv[optind][0] != '-' || argv[optind][1] == '\0')

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 189 of file getopt.c.

Function Documentation

◆ _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

Definition at line 267 of file getopt.c.

References argv, bottom, first_nonopt, i, last_nonopt, len, middle, optind, and top.

Referenced by _getopt_internal().

◆ getenv()

char* getenv ( )

◆ getopt()

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

Definition at line 885 of file getopt.c.

References _getopt_internal(), argc, and argv.

◆ my_index()

static char* my_index ( const char *  str,
int  chr 
)
static

Definition at line 211 of file getopt.c.

References chr, and str.

Referenced by _getopt_internal().

Variable Documentation

◆ __getopt_initialized

int __getopt_initialized = 0

Definition at line 138 of file getopt.c.

◆ first_nonopt

int first_nonopt
static

Definition at line 230 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

◆ last_nonopt

int last_nonopt
static

Definition at line 231 of file getopt.c.

Referenced by _getopt_initialize(), _getopt_internal(), and exchange().

◆ nextchar

char* nextchar
static

Definition at line 147 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().

◆ optarg

char* optarg = NULL

Definition at line 117 of file getopt.c.

Referenced by getOption(), and main().

◆ opterr

int opterr = 1

Definition at line 152 of file getopt.c.

◆ optind

int optind = 1

Definition at line 132 of file getopt.c.

Referenced by getOption(), main(), optionLine(), otfcc_build(), and otfcc_dump().

◆ optopt

int optopt = '?'

Definition at line 158 of file getopt.c.

◆ 

ordering { ... } enum

◆ posixly_correct

char* posixly_correct
static

Definition at line 195 of file getopt.c.

Referenced by _getopt_initialize(), and _getopt_internal().