]> git.sesse.net Git - vlc/blobdiff - include/modules_inner.h
Updating slider status uses no longer FPU calculations when compiled for strongarm1100.
[vlc] / include / modules_inner.h
index d9cc19362291830b3f4e34f262bbcdebedb345b9..21d8888b4e8f281b7b7c9d2644d08220efc5db97 100644 (file)
@@ -2,7 +2,7 @@
  * modules_inner.h : Macros used from within a module.
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules_inner.h,v 1.27 2002/08/04 08:45:35 sam Exp $
+ * $Id: modules_inner.h,v 1.35 2002/12/10 12:46:35 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
 #if defined( __BUILTIN__ )
 #   define E_( function )          CONCATENATE( function, MODULE_NAME )
 #   define __VLC_SYMBOL( symbol )  CONCATENATE( symbol, MODULE_NAME )
-#   define DECLARE_SYMBOLS         ;
-#   define STORE_SYMBOLS           ;
+#   define DECLARE_SYMBOLS         struct _u_n_u_s_e_d_
+#   define STORE_SYMBOLS           struct _u_n_u_s_e_d_
 #elif defined( __PLUGIN__ )
 #   define E_( function )          function
 #   define __VLC_SYMBOL( symbol  ) CONCATENATE( symbol, MODULE_SYMBOL )
-#   define DECLARE_SYMBOLS         module_symbols_t* p_symbols;
-#   define STORE_SYMBOLS           p_symbols = p_module->p_symbols;
+#   define DECLARE_SYMBOLS         module_symbols_t* p_symbols
+#   define STORE_SYMBOLS           p_symbols = p_module->p_symbols
+#endif
+
+#if defined( __PLUGIN__ ) && ( defined( WIN32 ) || defined( UNDER_CE ) )
+#   define DLL_SYMBOL              __declspec(dllexport)
+#   define CDECL_SYMBOL            __cdecl
+#else
+#   define DLL_SYMBOL
+#   define CDECL_SYMBOL
 #endif
 
 #if defined( __cplusplus )
  */
 #define vlc_module_begin( )                                                   \
     DECLARE_SYMBOLS;                                                          \
-    EXTERN_SYMBOL int __VLC_SYMBOL(vlc_entry) ( module_t *p_module )          \
+    EXTERN_SYMBOL DLL_SYMBOL int CDECL_SYMBOL                                 \
+    __VLC_SYMBOL(vlc_entry) ( module_t *p_module )                            \
     {                                                                         \
         int i_shortcut = 1, i_config = 0;                                     \
         module_config_t p_config[ 100 ];                                      \
         STORE_SYMBOLS;                                                        \
         p_module->b_submodule = VLC_FALSE;                                    \
+        p_module->b_unloadable = VLC_TRUE;                                    \
+        p_module->b_reentrant = VLC_TRUE;                                     \
         p_module->psz_object_name = MODULE_STRING;                            \
         p_module->psz_longname = MODULE_STRING;                               \
         p_module->pp_shortcuts[ 0 ] = MODULE_STRING;                          \
             p_submodule->pp_shortcuts[ i_shortcut ] = NULL;                   \
         }                                                                     \
         {                                                                     \
-           module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0' };      \
+           static module_config_t tmp = { CONFIG_HINT_END, NULL, NULL, '\0', \
+                                           NULL, NULL, NULL, 0, 0.0, NULL,    \
+                                           NULL, NULL, VLC_FALSE };           \
             p_config[ i_config ] = tmp;                                       \
         }                                                                     \
         config_Duplicate( p_module, p_config );                               \
         }                                                                     \
         return 0 && i_shortcut;                                               \
     }                                                                         \
-    int __VLC_SYMBOL(vlc_entry) ( module_t * ) /* the ; gets added */
+    struct _u_n_u_s_e_d_ /* the ; gets added */
 
 
 #define add_submodule( )                                                      \
                                 p_module->pp_shortcuts[ i_shortcut ];         \
     }                                                                         \
     p_submodule->psz_object_name = p_module->psz_object_name;                 \
+    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;                                 \
     i_shortcut++
 
 #define set_description( desc )                                               \
-    p_module->psz_longname = desc
+    p_submodule->psz_longname = desc
 
 #define set_capability( cap, score )                                          \
     p_submodule->psz_capability = cap;                                        \
     p_submodule->pf_activate = activate;                                      \
     p_submodule->pf_deactivate = deactivate
 
-/*
- * module_activate: this function is called before functions can be accessed,
- * we do allocation tasks here, and maybe additional stuff such as large
- * table allocation. Once ActivateModule is called we are almost sure the
- * module will be used.
- */
-#define module_activate( prototype )                                          \
-    __module_activate( prototype );                                           \
-    int __VLC_SYMBOL( module_activate ) ( module_t *p_module )                \
-    {                                                                         \
-        STORE_SYMBOLS;                                                        \
-        config_SetCallbacks( p_module->p_config, p_config );                  \
-        return __module_activate( p_module );                                 \
-    }                                                                         \
-                                                                              \
-    static int __module_activate( prototype )
-
-/*
- * DeactivateModule: this function is called after we are finished with the
- * module. Everything that has been done in ActivateModule needs to be undone
- * here.
- */
-#define module_deactivate( prototype )                                        \
-    __module_deactivate( prototype );                                         \
-    int __VLC_SYMBOL( module_deactivate )( module_t *p_module )               \
-    {                                                                         \
-        int i_ret = __module_deactivate( p_module );                          \
-        config_UnsetCallbacks( p_module->p_config );                          \
-        return i_ret;                                                         \
-    }                                                                         \
-                                                                              \
-    static int __module_deactivate( prototype )
+#define linked_with_a_crap_library_which_uses_atexit( )                       \
+    p_module->b_unloadable = VLC_FALSE