* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.55 2003/02/28 04:31:24 ipkiss Exp $
+ * $Id: vlc_common.h,v 1.56 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
# define off_t unsigned __int64
# endif
+# ifdef lseek
+# undef lseek
+# define lseek _lseeki64
+# endif
+
# ifndef O_NONBLOCK
# define O_NONBLOCK 0
+# endif
+
+# ifndef alloca
+# define alloca _alloca
# endif
/* These two are not defined in mingw32 (bug?) */
* dec_dummy.c: dummy decoder plugin for vlc.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: decoder.c,v 1.4 2002/11/18 18:05:13 sam Exp $
+ * $Id: decoder.c,v 1.5 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
#ifdef HAVE_UNISTD_H
# include <unistd.h> /* write(), close() */
+#elif defined( WIN32 ) && !defined( UNDER_CE )
+# include <io.h>
#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h> /* open() */
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:console /machine:I386\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 /entry:mainCRTStartup\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:windows /machine:I386 /entry:mainCRTStartup\r
\r
!ELSEIF "$(CFG)" == "vlc - Win32 Debug"\r
\r
# ADD BASE BSC32 /nologo\r
# ADD BSC32 /nologo\r
LINK32=link.exe\r
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept\r
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /entry:mainCRTStartup\r
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib netapi32.lib winmm.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /entry:mainCRTStartup\r
# SUBTRACT LINK32 /pdb:none\r
\r
!ENDIF \r
* modules.c : Builtin and plugin modules management functions
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.114 2003/02/18 22:40:39 ipkiss Exp $
+ * $Id: modules.c,v 1.115 2003/03/03 16:49:14 gbazin Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
* Ethan C. Baldridge <BaldridgeE@cadmus.com>
path[ sizeof(path)/sizeof(char*) - 2 ] = config_GetPsz( p_this,
"plugin-path" );
-#if defined( WIN32 ) && !defined( UNDER_CE )
+#if defined( WIN32 ) && !defined( UNDER_CE ) && !defined( _MSC_VER )
/* If there is no 'plugins' nor 'modules' subdirectory, the user may have
* screwed up the unzipping stage, so we look into '.' instead */
if( !opendir( "plugins" ) && !opendir( "modules" )
static void AllocatePluginDir( vlc_object_t *p_this, const MYCHAR *psz_dir,
int i_maxdepth )
{
+#if defined( UNDER_CE ) || defined( _MSC_VER )
#ifdef UNDER_CE
MYCHAR psz_path[MAX_PATH + 256];
+#else
+ char psz_path[MAX_PATH + 256];
+#endif
WIN32_FIND_DATA finddata;
HANDLE handle;
unsigned int rc;
return;
}
-#ifdef UNDER_CE
+#if defined( UNDER_CE ) || defined( _MSC_VER )
rc = GetFileAttributes( psz_dir );
if( !(rc & FILE_ATTRIBUTE_DIRECTORY) )
{
}
/* Parse all files in the directory */
+#ifdef UNDER_CE
swprintf( psz_path, L"%s\\*.*", psz_dir );
+#else
+ sprintf( psz_path, "%s\\*.*", psz_dir );
+#endif
handle = FindFirstFile( psz_path, &finddata );
if( handle == INVALID_HANDLE_VALUE )
{
/* Parse the directory and try to load all files it contains. */
do
{
+#ifdef UNDER_CE
unsigned int i_len = wcslen( finddata.cFileName );
-
swprintf( psz_path, L"%s\\%s", psz_dir, finddata.cFileName );
+#else
+ unsigned int i_len = strlen( finddata.cFileName );
+ /* Skip ".", ".." and anything starting with "." */
+ if( !*finddata.cFileName || *finddata.cFileName == '.' )
+ {
+ if( !FindNextFile( handle, &finddata ) ) break;
+ continue;
+ }
+ sprintf( psz_path, "%s\\%s", psz_dir, finddata.cFileName );
+#endif
if( GetFileAttributes( psz_path ) & FILE_ATTRIBUTE_DIRECTORY )
{
AllocatePluginDir( p_this, psz_path, i_maxdepth - 1 );
}
- else if( i_len > strlen( LIBEXT ) )
+ else if( i_len > strlen( LIBEXT )
+#ifdef UNDER_CE
+ )
+#else
+ /* We only load files ending with LIBEXT */
+ && !strncasecmp( psz_path + strlen( psz_path)
+ - strlen( LIBEXT ),
+ LIBEXT, strlen( LIBEXT ) ) )
+#endif
{
AllocatePluginFile( p_this, psz_path );
}
#! /bin/sh
## toolbox for the VLC media player
-## $Id: toolbox,v 1.10 2003/03/01 19:25:13 gbazin Exp $
+## $Id: toolbox,v 1.11 2003/03/03 16:49:14 gbazin Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
# End Source File${M}
EOF
done
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 (WCE MIPS) Release"${M}
# PROP Output_Dir "MIPSRel\\${subdir}"${M}
# PROP Intermediate_Dir "MIPSRel\\${subdir}"${M}
cat >> ${target} << EOF
# Begin Source File${M}
SOURCE="..\\`echo $file | sed -e 's%/%\\\\%g'`"${M}
-# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\"plugins\\" /D DATA_PATH=\\"share\\"${M}
+# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\\".\\" /D DATA_PATH=\\"share\\"${M}
!IF "\$(CFG)" == "libvlc - Win32 Release"${M}
# PROP Output_Dir "Release\\${subdir}"${M}
# PROP Intermediate_Dir "Release\\${subdir}"${M}