summaryrefslogtreecommitdiffstats
path: root/subopt-helper.h
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-12-31 14:57:12 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-12-31 14:57:12 +0000
commit1f74d67f879c2b12fe3102a7f530f981b800510b (patch)
treefe00f701786d1055ebd6e1a05ec9f6edcd3ea2be /subopt-helper.h
parentd0b713ad246b557e916e29d77700b8ee59e4fcd8 (diff)
downloadmpv-1f74d67f879c2b12fe3102a7f530f981b800510b.tar.bz2
mpv-1f74d67f879c2b12fe3102a7f530f981b800510b.tar.xz
Add a type name for the test function
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14286 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'subopt-helper.h')
-rw-r--r--subopt-helper.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/subopt-helper.h b/subopt-helper.h
index 529801697f..6479f3894e 100644
--- a/subopt-helper.h
+++ b/subopt-helper.h
@@ -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!