ardour
Macros | Functions | Variables
getopt_long.c File Reference
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define _DIAGASSERT(X)
 
#define IGNORE_FIRST   (*options == '-' || *options == '+')
 
#define PRINT_ERROR
 
#define IS_POSIXLY_CORRECT   (getenv("POSIXLY_CORRECT") != NULL)
 
#define PERMUTE   (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)
 
#define IN_ORDER   (!IS_POSIXLY_CORRECT && *options == '-')
 
#define BADCH   (int)'?'
 
#define BADARG
 
#define INORDER   (int)1
 
#define EMSG   ""
 

Functions

static int getopt_internal (int, char *const *, const char *)
 
static int gcd (int, int)
 
static void permute_args (int, int, int, char *const *)
 
__BEGIN_DECLS GETOPT_API int getopt_long (int nargc, char *const *nargv, const char *options, const struct option *long_options, int *idx)
 

Variables

static char * place = EMSG
 
static int nonopt_start = -1
 
static int nonopt_end = -1
 
static const char recargchar [] = "option requires an argument -- %c"
 
static const char recargstring [] = "option requires an argument -- %s"
 
static const char ambig [] = "ambiguous option -- %.*s"
 
static const char noarg [] = "option doesn't take an argument -- %.*s"
 
static const char illoptchar [] = "unknown option -- %c"
 
static const char illoptstring [] = "unknown option -- %s"
 

Macro Definition Documentation

#define _DIAGASSERT (   X)

Definition at line 81 of file getopt_long.c.

#define BADARG
Value:
((IGNORE_FIRST && options[1] == ':') \
|| (*options == ':') ? (int)':' : (int)'?')
#define IGNORE_FIRST
Definition: getopt_long.c:106

Definition at line 116 of file getopt_long.c.

#define BADCH   (int)'?'

Definition at line 115 of file getopt_long.c.

#define EMSG   ""

Definition at line 120 of file getopt_long.c.

#define IGNORE_FIRST   (*options == '-' || *options == '+')

Definition at line 106 of file getopt_long.c.

#define IN_ORDER   (!IS_POSIXLY_CORRECT && *options == '-')

Definition at line 112 of file getopt_long.c.

#define INORDER   (int)1

Definition at line 118 of file getopt_long.c.

#define IS_POSIXLY_CORRECT   (getenv("POSIXLY_CORRECT") != NULL)

Definition at line 109 of file getopt_long.c.

#define PERMUTE   (!IS_POSIXLY_CORRECT && !IGNORE_FIRST)

Definition at line 110 of file getopt_long.c.

#define PRINT_ERROR
Value:
((opterr) && ((*options != ':') \
|| (IGNORE_FIRST && options[1] != ':')))
__BEGIN_DECLS GETOPT_API int opterr
Definition: getopt.c:48
#define IGNORE_FIRST
Definition: getopt_long.c:106

Definition at line 107 of file getopt_long.c.

Function Documentation

static int gcd ( int  a,
int  b 
)
static

Definition at line 145 of file getopt_long.c.

static int getopt_internal ( int  nargc,
char *const *  nargv,
const char *  options 
)
static

Definition at line 206 of file getopt_long.c.

__BEGIN_DECLS GETOPT_API int getopt_long ( int  nargc,
char *const *  nargv,
const char *  options,
const struct option long_options,
int *  idx 
)

Definition at line 395 of file getopt_long.c.

static void permute_args ( int  panonopt_start,
int  panonopt_end,
int  opt_end,
char *const *  nargv 
)
static

Definition at line 165 of file getopt_long.c.

Variable Documentation

const char ambig[] = "ambiguous option -- %.*s"
static

Definition at line 135 of file getopt_long.c.

const char illoptchar[] = "unknown option -- %c"
static

Definition at line 137 of file getopt_long.c.

const char illoptstring[] = "unknown option -- %s"
static

Definition at line 138 of file getopt_long.c.

const char noarg[] = "option doesn't take an argument -- %.*s"
static

Definition at line 136 of file getopt_long.c.

int nonopt_end = -1
static

Definition at line 130 of file getopt_long.c.

int nonopt_start = -1
static

Definition at line 129 of file getopt_long.c.

char* place = EMSG
static

Definition at line 126 of file getopt_long.c.

const char recargchar[] = "option requires an argument -- %c"
static

Definition at line 133 of file getopt_long.c.

const char recargstring[] = "option requires an argument -- %s"
static

Definition at line 134 of file getopt_long.c.