Commit 05ac379f authored by Sam Hocevar's avatar Sam Hocevar

* ./Makefile.am: added a "update-vlc.dsp" rule to create the MSVC project

    file from the makefile.
  * ./msvc/*: moved the MSVC files here.
  * ./src/extras/*: moved the extra code here (used to be in src/misc,
    extras/GNUgetopt and extras/Win32_msvc).
  * ./include/*: a few warning fixes.
parent 3c60cbd6
......@@ -8,7 +8,7 @@
SUBDIRS = po intl m4 share
DIST_SUBDIRS = $(SUBDIRS) modules src debian doc ipkg lib
EXTRA_DIST = BUGS FAQ HACKING MAINTAINERS STATUS \
EXTRA_DIST = BUGS FAQ HACKING MAINTAINERS STATUS src/extras/COPYING \
INSTALL.win32 README.MacOSX.rtf vlc.spec install-win32 \
Modules.am macosx-dmg \
configure.ac.in mkinstalldirs bootstrap
......@@ -134,7 +134,8 @@ OBJCFLAGS_default += $(CFLAGS_optim) $(CFLAGS_nodebug) \
BUILT_SOURCES += \
include/vlc_symbols.h \
src/misc/modules_builtin.h \
src/misc/modules_plugin.h
src/misc/modules_plugin.h \
$(NULL)
pkgincludedir = $(includedir)/vlc
......@@ -145,7 +146,8 @@ dist_pkginclude_HEADERS = \
include/vlc/sout.h \
include/vlc/decoder.h \
include/vlc/input.h \
include/vlc/intf.h
include/vlc/intf.h \
$(NULL)
noinst_HEADERS += $(HEADERS_include) $(HEADERS_include_built)
......@@ -184,10 +186,12 @@ HEADERS_include = \
include/vlc_playlist.h \
include/vlc_threads.h \
include/vlc_threads_funcs.h \
include/win32_specific.h
include/win32_specific.h \
$(NULL)
HEADERS_include_built = \
include/vlc_symbols.h
include/vlc_symbols.h \
$(NULL)
include/vlc_symbols.h: Makefile $(HEADERS_include)
rm -f $@.in
......@@ -228,20 +232,6 @@ endif
$(SOURCES): include/vlc_symbols.h
$(SOURCES_libvlc): src/misc/modules_plugin.h src/misc/modules_builtin.h $(LIB_intl)
###############################################################################
# Optional getopt
###############################################################################
EXTRA_DIST += \
extras/GNUgetopt/COPYING \
extras/GNUgetopt/getopt.c \
extras/GNUgetopt/getopt.h \
extras/GNUgetopt/getopt1.c
if BUILD_GETOPT
SOURCES_libgetopt = extras/GNUgetopt/getopt.c extras/GNUgetopt/getopt1.c
endif
###############################################################################
# Optional libintl - FIXME, bad dependencies
###############################################################################
......@@ -274,7 +264,84 @@ EXTRA_DIST += \
extras/MacOSX/Resources/stop.png \
extras/MacOSX/Resources/stepf.png \
extras/MacOSX/Resources/stepr.png \
extras/MacOSX/vlc.pbproj/project.pbxproj
extras/MacOSX/vlc.pbproj/project.pbxproj \
$(NULL)
###############################################################################
# MS Visual Studio project
###############################################################################
EXTRA_DIST += \
msvc/vlc.dsp \
msvc/vlc.dsw \
msvc/vlc.dsp.in \
msvc/vlc.dsp.out \
msvc/config.h \
msvc/modules_builtin_msvc.h \
$(NULL)
#
# rule to rebuild vlc.dsp - not for the faint of heart
#
update-vlc.dsp: FORCE
# Top of the project file
cat msvc/vlc.dsp.in >| msvc/vlc.dsp
# The source files
echo '# Begin Group "Source Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" ' >> msvc/vlc.dsp
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp
for file in $(vlc_SOURCES) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp
echo '# Begin Group "libvlc" ' >> msvc/vlc.dsp
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep -v "/.*/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
for subdir in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/.*/" | cut -f2 -d/ | sort | uniq` ; do \
echo '# Begin Group "'$$subdir'" ' >> msvc/vlc.dsp ; \
for file in `for i in $(SOURCES_libvlc) $(OPT_SOURCES_libvlc_win32) $(OPT_SOURCES_libvlc_direntt) $(OPT_SOURCES_libvlc_getopt) ; do echo $$i ; done | grep "/$$subdir/"` ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# ADD CPP /D "__VLC__" /D PLUGIN_PATH=\"plugins\" /D DATA_PATH=\"share\" ' >> msvc/vlc.dsp ; \
echo '!IF "$$(CFG)" == "vlc - Win32 Release" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Release\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ELSEIF "$$(CFG)" == "vlc - Win32 Debug" ' >> msvc/vlc.dsp ; \
echo '# PROP Intermediate_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '# PROP Output_Dir "Debug\'$$subdir'"' >> msvc/vlc.dsp ; \
echo '!ENDIF ' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done ; \
echo '# End Group ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# The modules
echo 'no modules yet'
# The headers
echo '# Begin Group "Header Files" ' >> msvc/vlc.dsp
echo '# PROP Default_Filter "h;hpp;hxx;hm;inl" ' >> msvc/vlc.dsp
for file in $(HEADERS_include) $(HEADERS_include_built) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# Begin Group "vlc" ' >> msvc/vlc.dsp
for file in $(dist_pkginclude_HEADERS) ; do \
echo '# Begin Source File ' >> msvc/vlc.dsp ; \
echo $$file | sed -e 's%/%\\%g' -e 's%.*%SOURCE="..\\&" %' >> msvc/vlc.dsp ; \
echo '# End Source File ' >> msvc/vlc.dsp ; \
done
echo '# End Group ' >> msvc/vlc.dsp
echo '# End Group ' >> msvc/vlc.dsp
# Bottom of the project file - handles resource files too
cat msvc/vlc.dsp.out >> msvc/vlc.dsp
###############################################################################
# Building libvlc
......@@ -293,22 +360,62 @@ lib_libvlc_pic_a_CFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CFLAGS_pic) @CFLAGS_vlc@
lib_libvlc_pic_a_CXXFLAGS = $(CPPFLAGS_pic) -D__VLC__ $(CXXFLAGS_pic)
if HAVE_BEOS
SOURCES_libvlc_beos = src/misc/beos_specific.cpp
SOURCES_libvlc_beos = $(OPT_SOURCES_libvlc_beos)
endif
if HAVE_DARWIN
SOURCES_libvlc_darwin = src/misc/darwin_specific.c
SOURCES_libvlc_darwin = $(OPT_SOURCES_libvlc_darwin)
endif
if HAVE_WIN32
SOURCES_libvlc_win32 = src/misc/win32_specific.c
SOURCES_libvlc_win32 = $(OPT_SOURCES_libvlc_win32)
endif
if BUILD_DIRENT
SOURCES_libvlc_dirent = $(OPT_SOURCES_libvlc_dirent)
endif
if BUILD_GETOPT
SOURCES_libvlc_getopt = $(OPT_SOURCES_libvlc_getopt)
endif
if BUILD_STRNDUP
SOURCES_libvlc_strndup = $(OPT_SOURCES_libvlc_strndup)
endif
if BUILD_MOZILLA
LIBRARIES_libvlc_pic = lib/libvlc_pic.a
endif
EXTRA_DIST += \
$(OPT_SOURCES_libvlc_beos) \
$(OPT_SOURCES_libvlc_darwin) \
$(OPT_SOURCES_libvlc_win32) \
$(OPT_SOURCES_libvlc_dirent) \
$(OPT_SOURCES_libvlc_getopt) \
$(OPT_SOURCES_libvlc_strndup) \
$(NULL)
OPT_SOURCES_libvlc_beos = \
src/misc/beos_specific.cpp \
$(NULL)
OPT_SOURCES_libvlc_darwin = \
src/misc/darwin_specific.c \
src/misc/win32_specific.c
$(NULL)
OPT_SOURCES_libvlc_win32 = \
src/misc/win32_specific.c \
$(NULL)
OPT_SOURCES_libvlc_dirent = \
src/extras/dirent.c \
src/extras/dirent.h \
$(NULL)
OPT_SOURCES_libvlc_getopt = \
src/extras/getopt.c \
src/extras/getopt.h \
src/extras/getopt1.c \
$(NULL)
OPT_SOURCES_libvlc_strndup = \
src/extras/strndup.c
$(NULL)
SOURCES_libvlc = \
src/libvlc.c \
......@@ -350,10 +457,13 @@ SOURCES_libvlc = \
src/misc/objects.c \
src/misc/variables.c \
src/misc/error.c \
src/misc/extras.c \
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_beos) \
$(SOURCES_libvlc_darwin)
$(SOURCES_libvlc_darwin) \
$(SOURCES_libvlc_win32) \
$(SOURCES_libvlc_dirent) \
$(SOURCES_libvlc_getopt) \
$(SOURCES_libvlc_strndup) \
$(NULL)
###############################################################################
# Building vlc
......@@ -361,7 +471,7 @@ SOURCES_libvlc = \
bin_PROGRAMS += vlc
vlc_SOURCES = src/vlc.c $(SOURCES_libgetopt)
vlc_SOURCES = src/vlc.c
# @AUTOMAKE_SUCKS@ gets expanded to $(L_builtin) $(LDFLAGS_builtin)
# but we don't write it directly, otherwise automake will go amok and eat all
......@@ -435,7 +545,8 @@ SOURCES_mozilla = \
mozilla/vlcpeer.h \
mozilla/classinfo.h \
$(SOURCES_mozilla_win32) \
$(SOURCES_mozilla_unix)
$(SOURCES_mozilla_unix) \
$(NULL)
# Under Win32, Mozilla plugins need to be named NP******.DLL, but under Unix
# the common naming scheme is lib******plugin.so. Also, we need npwin.cpp
......@@ -454,8 +565,7 @@ if UNTRUE
noinst_LIBRARIES_mozilla = mozilla/libplugin.a
endif
mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla) $(BUILT_SOURCES_mozilla) \
$(SOURCES_libgetopt)
mozilla_libplugin_a_SOURCES = $(SOURCES_mozilla) $(BUILT_SOURCES_mozilla)
mozilla_libplugin_a_CFLAGS = $(CPPFLAGS_pic) $(CFLAGS_pic) \
$(CPPFLAGS_mozilla) $(CFLAGS_mozilla) \
$(CPPFLAGS_mozilla_EXTRA)
......
#! /bin/sh
## bootstrap file for vlc, the VideoLAN Client
## $Id: bootstrap,v 1.23 2002/11/04 18:27:30 sam Exp $
## $Id: bootstrap,v 1.24 2002/11/09 16:34:52 sam Exp $
##
## Authors: Samuel Hocevar <sam@zoy.org>
......@@ -311,6 +311,11 @@ then
mv -f /tmp/$$.$file.bak modules/gui/gtk/$file
fi
##
## Don't update the MSVC project file
##
echo "not updating MSVC project file. run 'make update-vlc.dsp' for this."
##
## Update the potfiles because no one ever does it
##
......
dnl Autoconf settings for vlc
AC_INIT(vlc,0.5.0-cvs-am)
AC_INIT(vlc,0.5.0-cvs)
CONFIGURE_LINE="$0 $*"
CODENAME="Natalya"
......@@ -11,7 +11,7 @@ AC_CANONICAL_SYSTEM
dnl XXX: we don't put any flags here, because automake 1.5 doesn't support
dnl them. And we need the comma otherwize automake will choke on it.
AM_INIT_AUTOMAKE(vlc,0.5.0-cvs-am)
AM_INIT_AUTOMAKE(vlc,0.5.0-cvs)
AM_CONFIG_HEADER(config.h)
dnl
......@@ -214,7 +214,12 @@ dnl The -DSYS_FOO flag
CPPFLAGS_save="${CPPFLAGS_save} -DSYS_`echo ${SYS} | sed -e 's/-.*//' | tr 'abcdefghijklmnopqrstuvwxyz.' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`"; CPPFLAGS="${CPPFLAGS_save}"
dnl Check for system libs needed
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll strndup)
AC_CHECK_FUNCS(gettimeofday select strerror strtod strtol isatty vasprintf swab sigrelse getpwuid memalign posix_memalign gethostbyname2 atoll)
dnl Check for strndup
need_strndup=false
AC_CHECK_FUNC(strndup,,[need_strndup=:])
AM_CONDITIONAL(BUILD_STRNDUP, ${need_strndup})
AC_CHECK_FUNC(connect,,[
AC_CHECK_LIB(socket,connect,
......@@ -320,6 +325,11 @@ AC_CHECK_HEADERS(linux/version.h)
AC_HEADER_TIME
dnl Check for dirent
need_dirent=false
AC_CHECK_HEADER(dirent.h,,[need_dirent=:])
AM_CONDITIONAL(BUILD_DIRENT, ${need_dirent})
dnl Mac OS X and other OSes don't have declaration for nanosleep
AC_EGREP_HEADER(nanosleep,time.h,[
AC_DEFINE(HAVE_DECL_NANOSLEEP, 1,
......
......@@ -2,7 +2,7 @@
* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: aout_internal.h,v 1.27 2002/11/01 15:06:23 gbazin Exp $
* $Id: aout_internal.h,v 1.28 2002/11/09 16:34:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
......@@ -34,6 +34,17 @@ typedef struct aout_alloc_t
#define AOUT_ALLOC_STACK 1
#define AOUT_ALLOC_HEAP 2
#ifdef HAVE_ALLOCA
# define ALLOCA_TEST \
if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK ) \
{ \
(p_new_buffer) = alloca( i_alloc_size + sizeof(aout_buffer_t) );\
} \
else
#else
# define ALLOCA_TEST
#endif
#define aout_BufferAlloc( p_alloc, i_nb_usec, p_previous_buffer, \
p_new_buffer ) \
if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_NONE ) \
......@@ -45,11 +56,7 @@ typedef struct aout_alloc_t
int i_alloc_size; \
i_alloc_size = (u64)(p_alloc)->i_bytes_per_sec \
* (i_nb_usec) / 1000000 + 1; \
if ( (p_alloc)->i_alloc_type == AOUT_ALLOC_STACK ) \
{ \
(p_new_buffer) = alloca( i_alloc_size + sizeof(aout_buffer_t) );\
} \
else \
ALLOCA_TEST \
{ \
(p_new_buffer) = malloc( i_alloc_size + sizeof(aout_buffer_t) );\
} \
......
......@@ -2,7 +2,7 @@
* input_ext-dec.h: structures exported to the VideoLAN decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
* $Id: input_ext-dec.h,v 1.75 2002/10/27 16:58:14 gbazin Exp $
* $Id: input_ext-dec.h,v 1.76 2002/11/09 16:34:52 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Michel Kaempf <maxx@via.ecp.fr>
......@@ -252,7 +252,7 @@ static inline void AlignWord( bit_stream_t * p_bit_stream )
*****************************************************************************/
static inline u32 ShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
{
if( p_bit_stream->fifo.i_available >= i_bits )
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
return( p_bit_stream->fifo.buffer >> (8 * sizeof(WORD_TYPE) - i_bits) );
}
......@@ -275,7 +275,7 @@ static inline u32 ShowBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
static inline s32 ShowSignedBits( bit_stream_t * p_bit_stream,
unsigned int i_bits )
{
if( p_bit_stream->fifo.i_available >= i_bits )
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
return( (WORD_SIGNED)p_bit_stream->fifo.buffer
>> (8 * sizeof(WORD_TYPE) - i_bits) );
......@@ -388,7 +388,7 @@ static inline u32 GetBits( bit_stream_t * p_bit_stream, unsigned int i_bits )
static inline s32 GetSignedBits( bit_stream_t * p_bit_stream,
unsigned int i_bits )
{
if( p_bit_stream->fifo.i_available >= i_bits )
if( (unsigned int)p_bit_stream->fifo.i_available >= i_bits )
{
s32 i_result;
......@@ -479,8 +479,8 @@ static inline void GetChunk( bit_stream_t * p_bit_stream,
p_bit_stream->fifo.i_available -= 8;
}
if( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte)
>= i_buf_len )
i_available = p_bit_stream->p_end - p_bit_stream->p_byte;
if( i_available >= (ptrdiff_t)i_buf_len )
{
p_bit_stream->p_decoder_fifo->p_vlc->pf_memcpy( p_buffer,
p_bit_stream->p_byte, i_buf_len );
......@@ -500,7 +500,7 @@ static inline void GetChunk( bit_stream_t * p_bit_stream,
return;
}
while( (i_available = p_bit_stream->p_end - p_bit_stream->p_byte)
<= i_buf_len );
<= (ptrdiff_t)i_buf_len );
if( i_buf_len )
{
......
VLC_ICON ICON "share/vlc48x48.ico"
VLC_ICON ICON "vlc48x48.ico"
......@@ -10,8 +10,8 @@
* Peters <colin@fu.is.saga-u.ac.jp>
*
* $Revision: 1.1 $
* $Author: gbazin $
* $Date: 2002/05/18 14:03:13 $
* $Author: sam $
* $Date: 2002/11/09 16:34:52 $
*
*/
......
......@@ -16,8 +16,8 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* $Revision: 1.1 $
* $Author: gbazin $
* $Date: 2002/05/18 14:03:13 $
* $Author: sam $
* $Date: 2002/11/09 16:34:52 $
*
*/
......
/*****************************************************************************
* extras.c: Extra libc functions for some systems.
* strndup.c: Extra strndup function for some systems.
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: extras.c,v 1.2 2002/11/06 09:26:25 sam Exp $
* $Id: strndup.c,v 1.1 2002/11/09 16:34:52 sam Exp $
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
*
......@@ -25,7 +25,6 @@
#include <vlc/vlc.h>
#ifndef HAVE_STRNDUP
/*****************************************************************************
* strndup: returns a malloc'd copy of at most n bytes of string
* Does anyone know whether or not it will be present in Jaguar?
......@@ -46,4 +45,4 @@ char *strndup( const char *string, size_t n )
return( psz );
}
#endif /* HAVE_STRNDUP */
......@@ -2,7 +2,7 @@
* input_info.c: Convenient functions to handle the input info structures
*****************************************************************************
* Copyright (C) 1998-2001 VideoLAN
* $Id: input_info.c,v 1.6 2002/10/10 22:46:20 massiot Exp $
* $Id: input_info.c,v 1.7 2002/11/09 16:34:53 sam Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
......@@ -67,7 +67,7 @@ input_info_category_t * input_InfoCategory( input_thread_t * p_input,
if ( !p_category )
{
msg_Err( p_input, "No mem" );
return 0;
return NULL;
}
p_category->psz_name = strdup( psz_name );
p_category->p_next = NULL;
......
......@@ -2,7 +2,7 @@
* objects.c: vlc_object_t handling
*****************************************************************************
* Copyright (C) 2002 VideoLAN
* $Id: objects.c,v 1.27 2002/10/29 13:22:48 sam Exp $
* $Id: objects.c,v 1.28 2002/11/09 16:34:53 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
......@@ -208,12 +208,15 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
if( i_type == VLC_OBJECT_ROOT )
{
vlc_value_t val;
val.p_address = DumpCommand;
vlc_mutex_init( p_new, &structure_lock );
var_Create( p_new, "list", VLC_VAR_COMMAND );
var_Set( p_new, "list", (vlc_value_t)(void*)DumpCommand );
var_Set( p_new, "list", val );
var_Create( p_new, "tree", VLC_VAR_COMMAND );
var_Set( p_new, "tree", (vlc_value_t)(void*)DumpCommand );
var_Set( p_new, "tree", val );
}
return p_new;
......
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