Create experimental new options API, various cleanups

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5171 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2005-03-12 05:37:32 +00:00
parent 5dc4b018a4
commit 2deba424d2
7 changed files with 98 additions and 59 deletions

View File

@@ -65,6 +65,16 @@ struct ast_ivr_menu {
#define AST_IVR_FLAG_AUTORESTART (1 << 0)
struct ast_option {
unsigned int flag;
int argoption;
};
extern int ast_parseoptions(const struct ast_option *options, struct ast_flags *flags, char **args, char *optstr);
#define AST_DECLARE_OPTIONS(holder,args...) \
static struct ast_option holder[128] = args
#define AST_IVR_DECLARE_MENU(holder,title,flags,foo...) \
static struct ast_ivr_option __options_##holder[] = foo;\
static struct ast_ivr_menu holder = { title, flags, __options_##holder }