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

Go to the source code of this file.

Macros

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

Enumerations

enum  { REQUIRE_ORDER , PERMUTE , RETURN_IN_ORDER }

Functions

char * getenv ()
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)
int getopt_long (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longindex)
int getopt_long_only (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longindex)

Variables

char * optarg = NULL
int optind = 1
int __getopt_initialized = 0
int opterr = 1
int optopt = '?'

Macro Definition Documentation

◆ _

#define _ ( msgid)
Value:
(msgid)

Definition at line 94 of file getopt_long_only.c.

Referenced by _getopt_internal().

◆ _NO_PROTO

#define _NO_PROTO

Definition at line 27 of file getopt_long_only.c.

◆ const

#define const

◆ GETOPT_INTERFACE_VERSION

#define GETOPT_INTERFACE_VERSION   2

Definition at line 52 of file getopt_long_only.c.

◆ NONOPTION_P

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

Referenced by _getopt_internal().

◆ SWAP_FLAGS

#define SWAP_FLAGS ( ch1,
ch2 )

Definition at line 288 of file getopt_long_only.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 192 of file getopt_long_only.c.

Function Documentation

◆ _getopt_internal()

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

◆ getenv()

char * getenv ( )

◆ getopt()

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

Definition at line 968 of file getopt_long_only.c.

References _getopt_internal().

Here is the call graph for this function:

◆ getopt_long()

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

Definition at line 980 of file getopt_long_only.c.

References _getopt_internal().

Here is the call graph for this function:

◆ getopt_long_only()

int getopt_long_only ( int argc,
char *const * argv,
const char * optstring,
const struct option * longopts,
int * longindex )

Definition at line 995 of file getopt_long_only.c.

References _getopt_internal().

Here is the call graph for this function:

Variable Documentation

◆ __getopt_initialized

int __getopt_initialized = 0

Definition at line 141 of file getopt_long_only.c.

Referenced by _getopt_internal().

◆ optarg

char* optarg = NULL

Definition at line 120 of file getopt_long_only.c.

Referenced by _getopt_internal(), and main().

◆ opterr

int opterr = 1

Definition at line 155 of file getopt_long_only.c.

Referenced by _getopt_internal().

◆ optind

int optind = 1

Definition at line 135 of file getopt_long_only.c.

Referenced by _getopt_internal(), and main().

◆ optopt

int optopt = '?'

Definition at line 161 of file getopt_long_only.c.

Referenced by _getopt_internal().