GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
opt.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GnoOption

Macros

#define GNO_FLG_SWITCH   0x01
#define True   1
#define False   0
#define GNO_BEGIN   GnoOption_s _aopt[] = {
#define GNO_OPTION(pszsopt, pszlopt, pszdef, ppszv, pszdescr)   { 0, 0, 0, pszdef, pszsopt, pszlopt, NULL, ppszv, pszdescr },
#define GNO_SWITCH(pszsopt, pszlopt, fdef, pfv, pszdescr)
#define GNO_PARSE(argc, argv)   GnoParse( (argc), (argv), _aopt )
#define GNO_END   { 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL } };
#define GNO_HELP(pszhead)   GnoHelp( pszhead , _aopt )
#define GNO_FREE()   GnoFree( _aopt )

Typedefs

typedef int Boolean
typedef struct GnoOption GnoOption_s

Functions

int GnoParse (int argc, char **argv, GnoOption_s *pOpt)
void GnoFree (GnoOption_s *pOpt)
void GnoHelp (char *pszHead, GnoOption_s *pOpt)

Macro Definition Documentation

#define False   0

Definition at line 127 of file opt.h.

Referenced by GnoParse(), and main().

#define GNO_BEGIN   GnoOption_s _aopt[] = {

Definition at line 204 of file opt.h.

Referenced by main().

#define GNO_END   { 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL } };

Definition at line 259 of file opt.h.

Referenced by main().

#define GNO_FLG_SWITCH   0x01

Definition at line 119 of file opt.h.

Referenced by GnoHelp(), and GnoParse().

#define GNO_FREE ( )    GnoFree( _aopt )

Definition at line 280 of file opt.h.

#define GNO_HELP (   pszhead)    GnoHelp( pszhead , _aopt )

Definition at line 270 of file opt.h.

Referenced by main().

#define GNO_OPTION (   pszsopt,
  pszlopt,
  pszdef,
  ppszv,
  pszdescr 
)    { 0, 0, 0, pszdef, pszsopt, pszlopt, NULL, ppszv, pszdescr },

Definition at line 218 of file opt.h.

Referenced by main().

#define GNO_PARSE (   argc,
  argv 
)    GnoParse( (argc), (argv), _aopt )

Definition at line 251 of file opt.h.

Referenced by main().

#define GNO_SWITCH (   pszsopt,
  pszlopt,
  fdef,
  pfv,
  pszdescr 
)
Value:
{ \
0, \
GNO_FLG_SWITCH, \
fdef, NULL, \
pszsopt, pszlopt, \
pfv, NULL, \
pszdescr \
},

Definition at line 232 of file opt.h.

Referenced by main().

#define True   1

Definition at line 126 of file opt.h.

Referenced by GnoParse(), and main().


Typedef Documentation

typedef int Boolean

Definition at line 136 of file opt.h.

typedef struct GnoOption GnoOption_s

Function Documentation

void GnoFree ( GnoOption_s pOpt)

Definition at line 320 of file opt.c.

References NULL, GnoOption::ppszValue, GnoOption::pszLong, and GnoOption::pszShort.

void GnoHelp ( char *  pszHead,
GnoOption_s pOpt 
)

Definition at line 346 of file opt.c.

References GNO_FLG_SWITCH, GnoOption::pszLong, and GnoOption::pszShort.

int GnoParse ( int  argc,
char **  argv,
GnoOption_s pOpt 
)