Macros | Enumerations | Functions | Variables
getopt.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "getopt.h"
Include dependency graph for getopt.c:

Go to the source code of this file.

Macros

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

Enumerations

enum  { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }
 

Functions

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

Variables

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

Macro Definition Documentation

#define _ (   msgid)    (msgid)

Definition at line 90 of file getopt.c.

#define _NO_PROTO

Definition at line 30 of file getopt.c.

#define GETOPT_INTERFACE_VERSION   2

Definition at line 49 of file getopt.c.

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

Definition at line 277 of file getopt.c.

Enumeration Type Documentation

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 188 of file getopt.c.

Function Documentation

static const char* _getopt_initialize ( int  argc,
char *const *  argv,
const char *  optstring 
)
static

Definition at line 378 of file getopt.c.

int _getopt_internal ( int  argc,
char *const *  argv,
const char *  optstring,
const struct option longopts,
int *  longind,
int  long_only 
)

Definition at line 500 of file getopt.c.

static void exchange ( char **  argv)
static

Definition at line 294 of file getopt.c.

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

Definition at line 949 of file getopt.c.

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

Definition at line 206 of file getopt.c.

Variable Documentation

int __getopt_initialized = 0

Definition at line 137 of file getopt.c.

int first_nonopt
static

Definition at line 237 of file getopt.c.

int last_nonopt
static

Definition at line 238 of file getopt.c.

char* nextchar
static

Definition at line 146 of file getopt.c.

char* optarg = NULL

Definition at line 116 of file getopt.c.

int opterr = 1

Definition at line 151 of file getopt.c.

int optind = 1

Definition at line 131 of file getopt.c.

int optopt = '?'

Definition at line 157 of file getopt.c.

enum { ... } ordering
char* posixly_correct
static

Definition at line 194 of file getopt.c.



sdhlibrary_cpp
Author(s): Dirk Osswald
autogenerated on Sun Aug 18 2019 03:42:20