spBase
Loading...
Searching...
No Matches
spOption.h File Reference
#include <stdarg.h>
#include <sp/spDefs.h>
Include dependency graph for spOption.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  spOption
 

Macros

#define spGetOptions(argc, argv, option, file_label)   _spGetOptions(argc, argv, spArraySize(option), option, spArraySize(file_label), file_label)
 
#define spStrToBool(value)   (((*(value) == 'T') || spStrEq(value, "1") || spStrEq(value, "ON") || spStrEq(value, "On")) ? SP_TRUE : SP_FALSE)
 
#define spBoolToStr(value)   (((value) == SP_TRUE) ? "True" : "False")
 

Typedefs

typedef void(* spExitCallbackFunc) (void *)
 
typedef unsigned short spOptionType
 
typedef struct _spOptions * spOptions
 

Functions

spBool spEqType (spOptionType type1, spOptionType type2)
 
void spIgnoreUnknownOption (spOptions options, spBool flag)
 
void spSetSection (spOptions options, int section)
 
void spSetSetup (const char *filename)
 
spBool spWriteGlobalSetup (void)
 
spBool spAddExitCallback (spExitCallbackFunc callback, void *data)
 
spBool spRemoveExitCallback (spExitCallbackFunc callback, void *data)
 
void spExit (int status)
 
char * spGetOptionValue (int argc, char **argv, spOptions options)
 
void spGetOptionsValue (int argc, char **argv, spOptions options)
 
void spCheckNumFile (spOptions options)
 
const char * spGetFile (spOptions options)
 
void spSetHelpMessage (spBool *flag, const char *format,...)
 
void spPrintHelp (const char *format,...)
 
void spPrintError (const char *format,...)
 
void spPrintMan (spOptions options, const char *description, const char *author)
 
spBool spReadSetup (const char *filename, spOptions options)
 
spBool spWriteSetup (const char *filename, spOptions options)
 
void spUsage (void)