From 5e386890b41fe043e2639b25b613831ef8362e7b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 29 Jun 2006 02:50:56 +0000 Subject: Completely removed the old, crappy pproc and replaced it with the new, shiny ParamProc class...it's soooo much better it makes me wanna' throw things... --- src/pproc.h | 65 ------------------------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 src/pproc.h (limited to 'src/pproc.h') diff --git a/src/pproc.h b/src/pproc.h deleted file mode 100644 index 31d7c02..0000000 --- a/src/pproc.h +++ /dev/null @@ -1,65 +0,0 @@ -#ifndef PPROC_H_ -#define PPROC_H_ - -/** - * A mask to discover what the type is even if flags are set. - */ -#define PPROC_TYPE 0x0F - -#define PPROC_BOOL_TRUE 0x01 -#define PPROC_BOOL_FALSE 0x02 -#define PPROC_BOOL_TOGGLE 0x03 -#define PPROC_CHAR 0x04 -#define PPROC_SHORT 0x05 -#define PPROC_LONG 0x06 -#define PPREC_LONG_LONG 0x07 -#define PPROC_UCHAR 0x08 -#define PPROC_USHORT 0x09 -#define PPROC_ULONG 0x0A -#define PPREC_ULONG_LONG 0x0B -#define PPROC_FLOAT 0x0C -#define PPROC_DOUBLE 0x0D -#define PPROC_LONG_DOUBLE 0x0E -#define PPROC_STRING 0x0F - -#define PPROCF_CALLBACK 0x10 -#define PPROCF_ALLOW_EQUALS 0x20 -#define PPROCF_SHORT_TERMINAL 0x40 -#define PPROCF_TERMINATE 0x80 - - -/** - * Contains all required info to handle a single program parameter. - *@author Mike Buland - */ -typedef struct PPROC -{ - const char *lpWord; /**< The full text-word to use as a param. */ - const char cChar; /**< The short char version of the param. */ - - const char cMode; /**< One of the PPROC_* macros, these are not flags. */ - - /** - * Pointer to the function to call when this param is triggered. - *@param argc The number of params after and including the one that - * triggered this call. - *@param argv The array of commandline tokens to use as parameters. - *@returns 0 for everything is ok. A number greater than zero signals that - * this parameter function used n parameters and they should be skipped by - * the processParams function. - */ - int (*proc)( int argc, char *argv[] ); - void *stateVar; /**< A pointer to a variable to set */ - const char *shortHelp; -} PPROC; - -/** - * Process command line parameters based on a null-terminated array of PPROC - * structures. - *@param argc Should come straight from your main function's argc. - *@param argv Should come straight from your main function's argv. - *@param pproc The array of params that this function can respond to. - */ -void processParams( int argc, char *argv[], PPROC *pproc ); - -#endif /*PPROC_H_*/ -- cgit v1.2.3