# HG changeset patch # User reimar # Date 1104505032 0 # Node ID 6c3241503d9b585a1113c97250f791fb41927d6c # Parent 08399423fe30a0f944c5dd4fa499774dab649f3d Add a type name for the test function diff -r 08399423fe30 -r 6c3241503d9b subopt-helper.h --- a/subopt-helper.h Fri Dec 31 14:54:58 2004 +0000 +++ b/subopt-helper.h Fri Dec 31 14:57:12 2004 +0000 @@ -13,13 +13,15 @@ #define OPT_ARG_INT 1 #define OPT_ARG_STR 2 +typedef int (*opt_test_f)(void *); + /** simple structure for defining the option name, type and storage location */ typedef struct opt_s { char * name; ///< string that identifies the option int type; ///< option type as defined in subopt-helper.h void * valp; ///< pointer to the mem where the value should be stored - int (* test)(void *); ///< argument test func ( optional ) + opt_test_f test; ///< argument test func ( optional ) int set; ///< Is set internally by the parser if the option was found. ///< Don't use it at initialization of your opts, it will be ///< overriden anyway!