common/gnu_getopt.h File Reference

Wrappers to allow GNU getopt to be used cleanly from C++ code. More...

#include <cctype>

Include dependency graph for gnu_getopt.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  option

Defines

#define GNU_GETOPT_INTERFACE_VERSION   2
#define no_argument   0
#define required_argument   1
#define optional_argument   2

Functions

int gnu_getopt_internal_ (int, char *const *, const char *, const struct option *, int *, int)
int gnu_getopt (int argc_, char *const *argv_, const char *shortopts_)
int gnu_getopt_long (int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_)
int gnu_getopt_long_only (int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_)

Variables

char * optarg
int optind
int opterr
int optopt


Detailed Description

Wrappers to allow GNU getopt to be used cleanly from C++ code.

Definition in file gnu_getopt.h.


Define Documentation

#define GNU_GETOPT_INTERFACE_VERSION   2

Definition at line 29 of file gnu_getopt.h.

#define no_argument   0

Definition at line 79 of file gnu_getopt.h.

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

#define optional_argument   2

Definition at line 81 of file gnu_getopt.h.

#define required_argument   1

Definition at line 80 of file gnu_getopt.h.

Referenced by main().


Function Documentation

int gnu_getopt ( int  argc_,
char *const *  argv_,
const char *  shortopts_ 
) [inline]

Definition at line 90 of file gnu_getopt.h.

References gnu_getopt_internal_().

Referenced by main().

int gnu_getopt_internal_ ( int  ,
char *const *  ,
const char *  ,
const struct option ,
int *  ,
int   
)

int gnu_getopt_long ( int  argc_,
char *const *  argv_,
const char *  shortopts_,
const struct option longopts_,
int *  optind_ 
) [inline]

Definition at line 97 of file gnu_getopt.h.

References gnu_getopt_internal_().

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

int gnu_getopt_long_only ( int  argc_,
char *const *  argv_,
const char *  shortopts_,
const struct option longopts_,
int *  optind_ 
) [inline]

Definition at line 103 of file gnu_getopt.h.

References gnu_getopt_internal_().


Variable Documentation

char* optarg

Definition at line 79 of file getopt.cc.

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

int opterr

Definition at line 99 of file getopt.cc.

Referenced by gnu_getopt_internal_().

int optind

int optopt

Definition at line 105 of file getopt.cc.

Referenced by gnu_getopt_internal_().


Documentation for Xapian (version 1.2.8).
Generated on 14 Dec 2011 by Doxygen 1.5.9.