- STORE_SYMBOLS; \
- p_module->p_functions = \
- ( module_functions_t * )malloc( sizeof( module_functions_t ) ); \
- if( p_module->p_functions == NULL ) \
- { \
- return( -1 ); \
- } \
- STORE_SYMBOLS; \
- config_SetCallbacks( p_module->p_config, p_config ); \
- do {
+ p_submodule->pp_shortcuts[ i_shortcut ] = \
+ p_module->pp_shortcuts[ i_shortcut ]; \
+ } \
+ p_submodule->psz_object_name = p_module->psz_object_name; \
+ p_submodule->psz_shortname = p_module->psz_shortname; \
+ p_submodule->psz_longname = p_module->psz_longname; \
+ p_submodule->psz_program = p_module->psz_program; \
+ p_submodule->psz_capability = p_module->psz_capability; \
+ p_submodule->i_score = p_module->i_score; \
+ p_submodule->i_cpu = p_module->i_cpu; \
+ p_submodule->pf_activate = NULL; \
+ p_submodule->pf_deactivate = NULL
+
+#define add_requirement( cap ) \
+ p_module->i_cpu |= CPU_CAPABILITY_##cap
+
+#define add_shortcut( shortcut ) \
+ p_submodule->pp_shortcuts[ i_shortcut ] = shortcut; \
+ i_shortcut++
+
+#define set_shortname( desc ) \
+ p_submodule->psz_shortname = desc
+
+#define set_description( desc ) \
+ p_submodule->psz_longname = desc
+
+#define set_capability( cap, score ) \
+ p_submodule->psz_capability = cap; \
+ p_submodule->i_score = score
+
+#define set_program( program ) \
+ p_submodule->psz_program = program
+
+#define set_callbacks( activate, deactivate ) \
+ p_submodule->pf_activate = activate; \
+ p_submodule->pf_deactivate = deactivate
+
+#define linked_with_a_crap_library_which_uses_atexit( ) \
+ p_module->b_unloadable = VLC_FALSE