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

Go to the source code of this file.

Macros

#define _(msgid)   (msgid)
 
#define _NO_PROTO
 
#define const
 
#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)
 
char * getenv ()
 
int getopt (int argc, char *const *argv, const char *optstring)
 
static char * my_index (char *str, int chr) const
 

Variables

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

Macro Definition Documentation

◆ _

#define _ (   msgid)    (msgid)

Definition at line 92 of file getopt.c.

◆ _NO_PROTO

#define _NO_PROTO

Definition at line 28 of file getopt.c.

◆ const

#define const

Definition at line 43 of file getopt.c.

◆ GETOPT_INTERFACE_VERSION

#define GETOPT_INTERFACE_VERSION   2

Definition at line 57 of file getopt.c.

◆ NONOPTION_P

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

◆ SWAP_FLAGS

#define SWAP_FLAGS (   ch1,
  ch2 
)

Definition at line 287 of file getopt.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 190 of file getopt.c.

Function Documentation

◆ _getopt_initialize()

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

Definition at line 389 of file getopt.c.

◆ _getopt_internal()

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

Definition at line 511 of file getopt.c.

◆ exchange()

static void exchange ( char **  argv)
static

Definition at line 304 of file getopt.c.

◆ getenv()

char* getenv ( )

◆ getopt()

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

Definition at line 977 of file getopt.c.

◆ my_index()

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

Definition at line 221 of file getopt.c.

Variable Documentation

◆ __getopt_initialized

int __getopt_initialized

Definition at line 139 of file getopt.c.

◆ first_nonopt

int first_nonopt
static

Definition at line 254 of file getopt.c.

◆ last_nonopt

int last_nonopt
static

Definition at line 255 of file getopt.c.

◆ nextchar

char* nextchar
static

Definition at line 148 of file getopt.c.

◆ optarg

char* optarg

Definition at line 118 of file getopt.c.

◆ opterr

int opterr = 1

Definition at line 153 of file getopt.c.

◆ optind

int optind = 1

Definition at line 133 of file getopt.c.

◆ optopt

int optopt = '?'

Definition at line 159 of file getopt.c.

◆ ordering

enum { ... } ordering

◆ posixly_correct

char* posixly_correct
static

Definition at line 196 of file getopt.c.



gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:42