diff options
author | Joshua Colp <jcolp@digium.com> | 2017-12-18 14:41:55 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-18 14:41:55 -0600 |
commit | bac31e55bb85ace72cf27155e84e569f6d7f6ada (patch) | |
tree | 08ce0b22b12fd558f535c1dd4ab604ba7b5563b7 /apps/app_skel.c | |
parent | a853b3bcffb3eaa771cf6f52e6e2e8893a2c657e (diff) | |
parent | 957709e1e824e221254599e4ad8445e3839ce535 (diff) |
Merge changes from topic 'faster-aco' into 15
* changes:
aco: Minimize use of regex.
aco: Create ways to minimize use of regex.
Diffstat (limited to 'apps/app_skel.c')
-rw-r--r-- | apps/app_skel.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/apps/app_skel.c b/apps/app_skel.c index b3c887685..68f313fee 100644 --- a/apps/app_skel.c +++ b/apps/app_skel.c @@ -242,8 +242,8 @@ static struct aco_type global_option = { .type = ACO_GLOBAL, .name = "globals", .item_offset = offsetof(struct skel_config, global), - .category_match = ACO_WHITELIST, - .category = "^general$", + .category_match = ACO_WHITELIST_EXACT, + .category = "general", }; struct aco_type *global_options[] = ACO_TYPES(&global_option); @@ -253,18 +253,24 @@ static struct aco_type sound_option = { .type = ACO_GLOBAL, .name = "sounds", .item_offset = offsetof(struct skel_config, global), - .category_match = ACO_WHITELIST, - .category = "^sounds$", + .category_match = ACO_WHITELIST_EXACT, + .category = "sounds", }; struct aco_type *sound_options[] = ACO_TYPES(&sound_option); +static const char *level_categories[] = { + "general", + "sounds", + NULL, +}; + /*! \brief An aco_type structure to link the everything but the "general" and "sounds" categories to the skel_level type */ static struct aco_type level_option = { .type = ACO_ITEM, .name = "level", - .category_match = ACO_BLACKLIST, - .category = "^(general|sounds)$", + .category_match = ACO_BLACKLIST_ARRAY, + .category = (const char *)level_categories, .item_alloc = skel_level_alloc, .item_find = skel_level_find, .item_offset = offsetof(struct skel_config, levels), |