i_items = 0;
do
{
- if( p_item->i_type == CONFIG_CATEGORY )
- {
-// printf( " #Category %d\n", p_item->i_value );
- }
- else if( p_item->i_type == CONFIG_SUBCATEGORY )
- {
-// printf( " #Subcategory %d\n", p_item->i_value );
- }
- if( p_item->i_type & CONFIG_ITEM )
+ if( CONFIG_ITEM(p_item->i_type) )
ParseOption( p_item, mods, mods2 );
+#if 0
+ else if( p_item->i_type == CONFIG_CATEGORY )
+ printf( " #Category %d\n", p_item->i_value );
+ else if( p_item->i_type == CONFIG_SUBCATEGORY )
+ printf( " #Subcategory %d\n", p_item->i_value );
+#endif
}
while( ++i_items < p_module->confsize && p_item++ );
#define CONFIG_SUBCATEGORY 0x0007 /* Set subcategory */
#define CONFIG_SECTION 0x0008 /* Start of new section */
-#define CONFIG_HINT 0x000F
-
/* Configuration item types */
#define CONFIG_ITEM_STRING 0x0010 /* String option */
/* unused 0x0020 */
#define CONFIG_ITEM_LOADFILE 0x00E0 /* Read file option */
#define CONFIG_ITEM_SAVEFILE 0x00F0 /* Written file option */
-#define CONFIG_ITEM 0x00F0
+#define CONFIG_ITEM(x) (((x) & 0xF0) != 0)
/*******************************************************************
* All predefined categories and subcategories
{
module_config_t *p_item = p_config + i;
- if( (p_item->i_type & CONFIG_ITEM) && p_item->psz_name != NULL
+ if( CONFIG_ITEM(p_item->i_type) && p_item->psz_name != NULL
&& !strncmp( p_item->psz_name , "key-", 4 )
&& !EMPTY_STR( p_item->psz_text ) )
{
}
}
- if( module_is_main( p_module) && (configType & CONFIG_ITEM) )
+ if( module_is_main( p_module) && CONFIG_ITEM(configType) )
{
if( categoryItem && [self isSubCategoryGeneral:lastsubcat] )
{
[[subCategoryItem options] addObject:[[VLCTreeLeafItem alloc] initWithConfigItem:&p_configs[j]]];
}
}
- else if( !module_is_main( p_module) && (configType & CONFIG_ITEM))
+ else if( !module_is_main( p_module) && CONFIG_ITEM(configType))
{
if( ![[subCategoryItem children] containsObject: pluginItem] )
{
{
module_config_t *p_item = p_config + i;
- if( (p_item->i_type & CONFIG_ITEM) && p_item->psz_name != NULL
+ if( CONFIG_ITEM(p_item->i_type) && p_item->psz_name != NULL
&& !strncmp( p_item->psz_name , "key-", 4 )
&& !EMPTY_STR( p_item->psz_text ) )
{
else if( p_item->i_type == CONFIG_SUBCATEGORY )
i_subcategory = p_item->value.i;
- if( p_item->i_type & CONFIG_ITEM )
+ if( CONFIG_ITEM(p_item->i_type) )
b_options = true;
if( b_options && i_category && i_subcategory )
module_config_t *p_item = p_config + i;
/* If we are a (non-global) key option not empty */
- if( (p_item->i_type & CONFIG_ITEM) && p_item->psz_name != NULL
+ if( CONFIG_ITEM(p_item->i_type) && p_item->psz_name != NULL
&& !strncmp( p_item->psz_name , "key-", 4 )
&& !EMPTY_STR( p_item->psz_text ) )
{
continue;
}
- if( (p_item->i_type & CONFIG_ITEM) && p_item->psz_name != NULL
+ if( CONFIG_ITEM(p_item->i_type) && p_item->psz_name != NULL
&& !strncmp( p_item->psz_name , "global-key", 10 )
&& !EMPTY_STR( p_item->psz_text ) )
{
p_item++ )
{
/* Ignore hints */
- if( p_item->i_type & CONFIG_HINT )
+ if( !CONFIG_ITEM(p_item->i_type) )
continue;
/* Add item to long options */
item < end;
item++)
{
- if (item->i_type & CONFIG_HINT)
+ if (!CONFIG_ITEM(item->i_type))
continue; /* ignore hints */
clist[nconf++] = item;
}
p_item < p_end;
p_item++ )
{
- if ((p_item->i_type & CONFIG_HINT) /* ignore hint */
+ if (!CONFIG_ITEM(p_item->i_type) /* ignore hint */
|| p_item->b_removed /* ignore deprecated option */
|| p_item->b_unsaveable) /* ignore volatile option */
continue;
p_item < p_end;
p_item++ )
{
- if( (p_item->i_type & CONFIG_ITEM) &&
+ if( CONFIG_ITEM(p_item->i_type) &&
!p_item->b_advanced && !p_item->b_removed ) break;
}
}
tab[confsize].i_type = type;
- if (type & CONFIG_ITEM)
+ if (CONFIG_ITEM(type))
{
module->i_config_items++;
if (type == CONFIG_ITEM_BOOL)