* and spawn threads.
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: main.c,v 1.84 2001/04/11 14:10:49 ej Exp $
+ * $Id: main.c,v 1.85 2001/04/12 01:52:45 sam Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
#endif
#ifdef SYS_DARWIN1_3
-#include <mach/mach.h> /* Altivec detection */
-#include <mach/mach_error.h> /* some day the header files||compiler *
+# include <mach/mach.h> /* Altivec detection */
+# include <mach/mach_error.h> /* some day the header files||compiler *
will define it for us */
-#include <mach/bootstrap.h>
+# include <mach/bootstrap.h>
#endif
#include <unistd.h>
#include "video_output.h"
#ifdef SYS_BEOS
-#include "beos_specific.h"
+# include "beos_specific.h"
+#endif
+
+#ifdef SYS_DARWIN1_3
+# include "darwin_specific.h"
#endif
#include "netutils.h" /* network_ChannelJoin */
/*****************************************************************************
* Local prototypes
*****************************************************************************/
-static int GetConfiguration ( int *i_argc, char *ppsz_argv[],
+static int GetConfiguration ( int *pi_argc, char *ppsz_argv[],
char *ppsz_env[] );
static int GetFilenames ( int i_argc, char *ppsz_argv[] );
static void Usage ( int i_fashion );
/*
* System specific initialization code
*/
-#ifdef SYS_BEOS
- beos_Create();
+#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
+ system_Create( &i_argc, ppsz_argv, ppsz_env );
#endif
p_main->i_cpu_capabilities = CPUCapabilities();
*/
intf_PlaylistDestroy( p_main->p_playlist );
-#ifdef SYS_BEOS
/*
* System specific cleaning code
*/
- beos_Destroy();
+#if defined( SYS_BEOS ) || defined( SYS_DARWIN1_3 )
+ system_Destroy();
#endif
/*
* stage, but most structures are not allocated, so only environment should
* be used.
*****************************************************************************/
-static int GetConfiguration( int *i_argc, char *ppsz_argv[], char *ppsz_env[] )
+static int GetConfiguration( int *pi_argc, char *ppsz_argv[], char *ppsz_env[] )
{
int i_cmd;
char *p_tmp;
/* Set default configuration and copy arguments */
- p_main->i_argc = *i_argc;
+ p_main->i_argc = *pi_argc;
p_main->ppsz_argv = ppsz_argv;
p_main->ppsz_env = ppsz_env;
}
}
-//when vlc.app is run by double clicking in Mac OS X, the 2nd arg is the PSN - process serial number (a unique PID-ish thingie)
-//still ok for real Darwin & when run from command line
#ifdef SYS_DARWIN1_3
- if ( strncmp( ppsz_argv[ 1 ] , "-psn" , 4) == 0 ) //for example -psn_0_9306113
+ /* When vlc.app is run by double clicking in Mac OS X, the 2nd arg
+ * is the PSN - process serial number (a unique PID-ish thingie)
+ * still ok for real Darwin & when run from command line */
+ if ( strncmp( ppsz_argv[ 1 ] , "-psn" , 4) == 0 )
+ /* for example -psn_0_9306113 */
{
- //ppsz_argv[ 1 ] = NULL; //GDMF!... I can't do this or else the MacOSX window server will not pick up the PSN and not register the app and we crash...hence the following kludge
- //otherwise we'll get confused w/ argv[1] being an input file name
- *i_argc = *i_argc - 1;
- p_main->i_argc--;
+ /* GDMF!... I can't do this or else the MacOSX window server will
+ * not pick up the PSN and not register the app and we crash...
+ * hence the following kludge otherwise we'll get confused w/ argv[1]
+ * being an input file name */
+#if 0
+ ppsz_argv[ 1 ] = NULL;
+#endif
+ *pi_argc = *pi_argc - 1;
+ pi_argc--;
return( 0 );
}
#endif
/* Parse command line options */
opterr = 0;
- while( ( i_cmd = getopt_long( *i_argc, ppsz_argv,
- psz_shortopts, longopts, 0 ) ) != EOF )
+ while( ( i_cmd = getopt_long( *pi_argc, ppsz_argv,
+ psz_shortopts, longopts, 0 ) ) != EOF )
{
switch( i_cmd )
{