Commit 9d6920b9 authored by Gildas Bazin's avatar Gildas Bazin

* moved the function definitions from threads.h into threads_funcs.h. This
   allows us to move p_main_sys into p_main (p_main->p_sys).
* fixed the --with-gtk-config-path and --with-sdl-config-path options in
   configure.in
parent 233d20e6
...@@ -6643,9 +6643,9 @@ then ...@@ -6643,9 +6643,9 @@ then
# Check whether --with-sdl-config-path or --without-sdl-config-path was given. # Check whether --with-sdl-config-path or --without-sdl-config-path was given.
if test "${with_sdl_config_path+set}" = set; then if test "${with_sdl_config_path+set}" = set; then
withval="$with_sdl_config_path" withval="$with_sdl_config_path"
if test "x$with_sdl" != "xno" if test "x$with_sdl_config_path" != "xno"
then then
SDL_PATH="$with_sdl:$PATH" SDL_PATH="$with_sdl_config_path:$PATH"
fi fi
fi fi
...@@ -7384,9 +7384,9 @@ then ...@@ -7384,9 +7384,9 @@ then
# Check whether --with-gtk-config-path or --without-gtk-config-path was given. # Check whether --with-gtk-config-path or --without-gtk-config-path was given.
if test "${with_gtk_config_path+set}" = set; then if test "${with_gtk_config_path+set}" = set; then
withval="$with_gtk_config_path" withval="$with_gtk_config_path"
if test "x$with_gtk" != "xno" if test "x$with_gtk_config_path" != "xno"
then then
GTK_PATH="$with_gtk:$PATH" GTK_PATH="$with_gtk_config_path:$PATH"
fi fi
fi fi
......
...@@ -945,9 +945,9 @@ then ...@@ -945,9 +945,9 @@ then
SDL_PATH=$PATH SDL_PATH=$PATH
AC_ARG_WITH(sdl-config-path, AC_ARG_WITH(sdl-config-path,
[ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)], [ --with-sdl-config-path=PATH sdl-config path (default search in \$PATH)],
[ if test "x$with_sdl" != "xno" [ if test "x$with_sdl_config_path" != "xno"
then then
SDL_PATH="$with_sdl:$PATH" SDL_PATH="$with_sdl_config_path:$PATH"
fi ]) fi ])
AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, $SDL_PATH) AC_PATH_PROG(SDL12_CONFIG, sdl12-config, no, $SDL_PATH)
SDL_CONFIG=${SDL12_CONFIG} SDL_CONFIG=${SDL12_CONFIG}
...@@ -1191,9 +1191,9 @@ then ...@@ -1191,9 +1191,9 @@ then
GTK_PATH=$PATH GTK_PATH=$PATH
AC_ARG_WITH(gtk-config-path, AC_ARG_WITH(gtk-config-path,
[ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)], [ --with-gtk-config-path=PATH gtk-config path (default search in \$PATH)],
[ if test "x$with_gtk" != "xno" [ if test "x$with_gtk_config_path" != "xno"
then then
GTK_PATH="$with_gtk:$PATH" GTK_PATH="$with_gtk_config_path:$PATH"
fi ]) fi ])
# look for gtk-config # look for gtk-config
AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, $GTK_PATH) AC_PATH_PROG(GTK12_CONFIG, gtk12-config, no, $GTK_PATH)
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions * Collection of useful common types and macros definitions
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: common.h,v 1.101 2002/04/26 18:12:28 jlj Exp $ * $Id: common.h,v 1.102 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -113,11 +113,6 @@ typedef s64 mtime_t; ...@@ -113,11 +113,6 @@ typedef s64 mtime_t;
* Classes declaration * Classes declaration
*****************************************************************************/ *****************************************************************************/
/* System */
struct main_sys_s;
typedef struct main_sys_s * p_main_sys_t;
/* Plugins */ /* Plugins */
struct plugin_bank_s; struct plugin_bank_s;
struct plugin_info_s; struct plugin_info_s;
...@@ -524,7 +519,6 @@ typedef __int64 off_t; ...@@ -524,7 +519,6 @@ typedef __int64 off_t;
typedef struct module_symbols_s typedef struct module_symbols_s
{ {
struct main_s* p_main; struct main_s* p_main;
struct main_sys_s* p_main_sys;
struct module_bank_s* p_module_bank; struct module_bank_s* p_module_bank;
struct input_bank_s* p_input_bank; struct input_bank_s* p_input_bank;
struct aout_bank_s* p_aout_bank; struct aout_bank_s* p_aout_bank;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* Declaration and extern access to global program object. * Declaration and extern access to global program object.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: main.h,v 1.34 2002/04/24 00:36:24 sam Exp $ * $Id: main.h,v 1.35 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* *
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
typedef struct main_s typedef struct main_s
{ {
/* Private data */
struct main_sys_s* p_sys; /* for system specific properties */
/* Global properties */ /* Global properties */
int i_argc; /* command line arguments count */ int i_argc; /* command line arguments count */
char ** ppsz_argv; /* command line arguments */ char ** ppsz_argv; /* command line arguments */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* os_specific.h: OS specific features * os_specific.h: OS specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: os_specific.h,v 1.3 2002/04/25 21:52:42 sam Exp $ * $Id: os_specific.h,v 1.4 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -45,12 +45,6 @@ extern "C" { ...@@ -45,12 +45,6 @@ extern "C" {
****************************************************************************/ ****************************************************************************/
struct main_sys_s; struct main_sys_s;
#ifndef __PLUGIN__
extern struct main_sys_s *p_main_sys;
#else
# define p_main_sys (p_symbols->p_main_sys)
#endif
/***************************************************************************** /*****************************************************************************
* Prototypes * Prototypes
*****************************************************************************/ *****************************************************************************/
......
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlc.h: global header for vlc * vlc.h: global header for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN * Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc.h,v 1.8 2002/04/25 21:52:42 sam Exp $ * $Id: vlc.h,v 1.9 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@via.ecp.fr> * Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr> * Vincent Seguin <seguin@via.ecp.fr>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
# include "main.h" # include "main.h"
# include "configuration.h" # include "configuration.h"
# include "threads_funcs.h"
#endif #endif
int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] ); int main( int i_argc, char *ppsz_argv[], char *ppsz_env[] );
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* and spawn threads. * and spawn threads.
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2001 VideoLAN * Copyright (C) 1998-2001 VideoLAN
* $Id: main.c,v 1.188 2002/04/25 21:52:42 sam Exp $ * $Id: main.c,v 1.189 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -428,7 +428,6 @@ static module_config_t p_help_config[] = ...@@ -428,7 +428,6 @@ static module_config_t p_help_config[] =
* Global variables - these are the only ones, see main.h and modules.h * Global variables - these are the only ones, see main.h and modules.h
*****************************************************************************/ *****************************************************************************/
main_t *p_main; main_t *p_main;
p_main_sys_t p_main_sys;
module_bank_t *p_module_bank; module_bank_t *p_module_bank;
input_bank_t *p_input_bank; input_bank_t *p_input_bank;
aout_bank_t *p_aout_bank; aout_bank_t *p_aout_bank;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* modules_plugin.h : Plugin management functions used by the core application. * modules_plugin.h : Plugin management functions used by the core application.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: modules_plugin.h,v 1.21 2002/04/25 21:52:42 sam Exp $ * $Id: modules_plugin.h,v 1.22 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -183,7 +183,6 @@ module_error( char *psz_buffer ) ...@@ -183,7 +183,6 @@ module_error( char *psz_buffer )
*****************************************************************************/ *****************************************************************************/
#define STORE_SYMBOLS( p_symbols ) \ #define STORE_SYMBOLS( p_symbols ) \
(p_symbols)->p_main = p_main; \ (p_symbols)->p_main = p_main; \
(p_symbols)->p_main_sys = p_main_sys; \
(p_symbols)->p_module_bank = p_module_bank; \ (p_symbols)->p_module_bank = p_module_bank; \
(p_symbols)->p_input_bank = p_input_bank; \ (p_symbols)->p_input_bank = p_input_bank; \
(p_symbols)->p_aout_bank = p_aout_bank; \ (p_symbols)->p_aout_bank = p_aout_bank; \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* win32_specific.c: Win32 specific features * win32_specific.c: Win32 specific features
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: win32_specific.c,v 1.6 2002/04/02 23:43:57 gbazin Exp $ * $Id: win32_specific.c,v 1.7 2002/04/27 22:11:22 gbazin Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -40,17 +40,17 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) ...@@ -40,17 +40,17 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
HINSTANCE hInstLib; HINSTANCE hInstLib;
/* Allocate structure */ /* Allocate structure */
p_main_sys = malloc( sizeof( main_sys_t ) ); p_main->p_sys = malloc( sizeof( main_sys_t ) );
if( p_main_sys == NULL ) if( p_main->p_sys == NULL )
{ {
intf_ErrMsg( "init error: can't create p_main_sys (%s)", intf_ErrMsg( "init error: can't create p_main->p_sys (%s)",
strerror(ENOMEM) ); strerror(ENOMEM) );
exit(-1); exit(-1);
} }
/* dynamically get the address of SignalObjectAndWait */ /* dynamically get the address of SignalObjectAndWait */
hInstLib = LoadLibrary( "kernel32" ); hInstLib = LoadLibrary( "kernel32" );
p_main_sys->SignalObjectAndWait = p_main->p_sys->SignalObjectAndWait =
(SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, "SignalObjectAndWait" ); (SIGNALOBJECTANDWAIT)GetProcAddress( hInstLib, "SignalObjectAndWait" );
/* WinSock Library Init. */ /* WinSock Library Init. */
...@@ -69,7 +69,7 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] ) ...@@ -69,7 +69,7 @@ void system_Init( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
*****************************************************************************/ *****************************************************************************/
void system_Configure( void ) void system_Configure( void )
{ {
p_main_sys->b_fast_pthread = config_GetIntVariable( "fast_pthread" ); p_main->p_sys->b_fast_pthread = config_GetIntVariable( "fast_pthread" );
} }
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment