Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

parse_argument.h File Reference

#include <string.h>
#include <stdlib.h>

Include dependency graph for parse_argument.h:

Include dependency graph

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

Included by dependency graph


Defines

#define RETURN_OK   1
#define RETURN_NOT_FOUND   0
#define RETURN_ERROR   -1

Functions

int parse_argument_int ( int argNum, char **argVec, char *argname, int *val)
 puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if value after argname wasn't an integer.

int parse_argument_2_int ( int argNum, char **argVec, char *argname, int *val, int *val2)
int parse_argument_3_int ( int argNum, char **argVec, char *argname, int *val1, int *val2, int *val3)
int parse_argument_double ( int argNum, char **argVec, char *argname, double *val)
 puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if value after argname wasn't a double.

int parse_argument_string ( int argNum, char **argVec, char *argname, char **str)
 puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if there was no value after argname.

int parse_argument_flag ( int argNum, char **argVec, char *argname)
 searches for and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found.


Define Documentation

#define RETURN_ERROR   -1
 

#define RETURN_NOT_FOUND   0
 

#define RETURN_OK   1
 


Function Documentation

int parse_argument_2_int ( int argNum,
char ** argVec,
char * argname,
int * val,
int * val2 )
 

See also:
parse_argument_int()

int parse_argument_3_int ( int argNum,
char ** argVec,
char * argname,
int * val1,
int * val2,
int * val3 )
 

See also:
parse_argument_int()

int parse_argument_double ( int argNum,
char ** argVec,
char * argname,
double * val )
 

puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if value after argname wasn't a double.

int parse_argument_flag ( int argNum,
char ** argVec,
char * argname )
 

searches for and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found.

int parse_argument_int ( int argNum,
char ** argVec,
char * argname,
int * val )
 

puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if value after argname wasn't an integer.

int parse_argument_string ( int argNum,
char ** argVec,
char * argname,
char ** str )
 

puts the value after in <val> and returns RETURN_OK if success RETURN_NOT_FOUND if argname wasn't found RETURN_ERROR if there was no value after argname.

generated by doxygen