Changeset 0babda75f1d5df89261dc5fa4e98f57f3ef9de77

Show
Ignore:
Timestamp:
12/16/07 16:12:51 (9 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1197817971 +0000
git-parent:

[514ab9ef4abf5e361fed91424a3b2cc5ee2e530d]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1197817971 +0000
Message:

Don't use enums. They are cool and all (the compiler even tells when one case is missing in switch), but I don't want the compiler to assume as yet unassigned codepoints will not be used.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc_configuration.h

    r1f9d8d6 r0babda7  
    232232#define config_ExistIntf(a,b) __config_ExistIntf(VLC_OBJECT(a),b) 
    233233 
    234 typedef enum vlc_config_properties 
     234enum vlc_config_properties 
    235235{ 
    236236    /* DO NOT EVER REMOVE, INSERT OR REPLACE ANY ITEM! It would break the ABI! 
     
    269269    VLC_CONFIG_CAPABILITY, 
    270270    /* capability for a module or list thereof (args=const char*) */ 
    271 } vlc_config_t
     271}
    272272 
    273273 
    274274VLC_EXPORT( module_config_t *, vlc_config_create, (module_t *, int type) ); 
    275 VLC_EXPORT( int, vlc_config_set, (module_config_t *, vlc_config_t, ...) ); 
     275VLC_EXPORT( int, vlc_config_set, (module_config_t *, int, ...) ); 
    276276 
    277277/***************************************************************************** 
     
    362362                    (const char *)(psz_caps)) 
    363363 
    364 #define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \ 
    365     add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, p_callback, value ); \ 
    366     p_config[i_config].min.i = i_subcategory /* gruik */ 
    367  
    368364#define add_module_list( name, psz_caps, value, p_callback, text, longtext, advc ) \ 
    369365    add_string_inner( CONFIG_ITEM_MODULE_LIST, name, text, longtext, advc, p_callback, value ); \ 
     
    371367                    (const char *)(psz_caps)) 
    372368 
     369#ifndef __PLUGIN__ 
     370#define add_module_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \ 
     371    add_string_inner( CONFIG_ITEM_MODULE_CAT, name, text, longtext, advc, p_callback, value ); \ 
     372    p_config[i_config].min.i = i_subcategory /* gruik */ 
     373 
    373374#define add_module_list_cat( name, i_subcategory, value, p_callback, text, longtext, advc ) \ 
    374375    add_string_inner( CONFIG_ITEM_MODULE_LIST_CAT, name, text, longtext, advc, p_callback, value ); \ 
    375376    p_config[i_config].min.i = i_subcategory /* gruik */ 
     377#endif 
    376378 
    377379#define add_integer( name, value, p_callback, text, longtext, advc ) \ 
  • include/vlc_modules.h

    rcc4cca2 r0babda7  
    7272    VLC_MODULE_CB_CLOSE, 
    7373    VLC_MODULE_UNLOADABLE, 
    74     VLC_MODULE_NAME 
     74    VLC_MODULE_NAME, 
    7575}; 
    7676 
  • src/modules/entry.c

    reda425f r0babda7  
    133133        case VLC_MODULE_PROGRAM: 
    134134            msg_Warn (module, "deprecated module property %d", propid); 
    135             return 0
     135            break
    136136 
    137137        default: 
     
    162162} 
    163163 
    164 int vlc_config_set (module_config_t *restrict item, vlc_config_t id, ...) 
     164int vlc_config_set (module_config_t *restrict item, int id, ...) 
    165165{ 
    166166    int ret = -1;