xapian-core  1.4.27
Macros | Enumerations | Functions | Variables
getopt.cc File Reference
#include "gnu_getopt.h"
#include <cstdio>
#include <cstring>
#include <cstdlib>
+ Include dependency graph for getopt.cc:

Go to the source code of this file.

Macros

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

Enumerations

enum  { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER }
 

Functions

static void exchange (char **argv)
 
static const char * getopt_initialize (int argc, char *const *argv, const char *optstring)
 
int gnu_getopt_internal_ (int argc, char *const *argv, const char *optstring, const struct option *longopts, int *longind, int long_only)
 

Variables

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

Macro Definition Documentation

◆ _

#define _ (   msgid)    (msgid)

Definition at line 54 of file getopt.cc.

Referenced by gnu_getopt_internal_().

◆ NONOPTION_P

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

Referenced by gnu_getopt_internal_().

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
REQUIRE_ORDER 
PERMUTE 
RETURN_IN_ORDER 

Definition at line 152 of file getopt.cc.

Function Documentation

◆ exchange()

static void exchange ( char **  argv)
static

Definition at line 189 of file getopt.cc.

References first_nonopt, last_nonopt, and optind.

Referenced by gnu_getopt_internal_().

◆ getopt_initialize()

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

◆ gnu_getopt_internal_()

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

Variable Documentation

◆ first_nonopt

int first_nonopt
static

Definition at line 176 of file getopt.cc.

Referenced by exchange(), getopt_initialize(), and gnu_getopt_internal_().

◆ getopt_initialized

int getopt_initialized
static

Definition at line 112 of file getopt.cc.

Referenced by gnu_getopt_internal_().

◆ last_nonopt

int last_nonopt
static

Definition at line 177 of file getopt.cc.

Referenced by exchange(), getopt_initialize(), and gnu_getopt_internal_().

◆ nextchar

char* nextchar
static

Definition at line 121 of file getopt.cc.

Referenced by getopt_initialize(), and gnu_getopt_internal_().

◆ optarg

char* optarg

Definition at line 79 of file getopt.cc.

Referenced by gnu_getopt_internal_(), main(), and test_driver::parse_command_line().

◆ opterr

int opterr = 1

Definition at line 99 of file getopt.cc.

Referenced by gnu_getopt_internal_().

◆ optind

int optind = 1

◆ optopt

int optopt = '?'

Definition at line 105 of file getopt.cc.

Referenced by gnu_getopt_internal_().

◆ ordering

enum { ... } ordering

◆ posixly_correct

char* posixly_correct
static

Definition at line 158 of file getopt.cc.

Referenced by getopt_initialize(), and gnu_getopt_internal_().