From 05ac379f73824945b7fed32d4d53bb38703404e5 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sat, 9 Nov 2002 16:34:53 +0000 Subject: [PATCH] * ./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. --- Makefile.am | 172 +++++++++++++++++---- bootstrap | 7 +- configure.ac.in | 16 +- extras/GNUgetopt/.cvsignore | 1 - include/aout_internal.h | 19 ++- include/input_ext-dec.h | 14 +- share/vlc_win32_rc.rc | 2 +- src/extras/.cvsignore | 2 + {extras/GNUgetopt => src/extras}/COPYING | 0 {extras/Win32_msvc => src/extras}/dirent.c | 4 +- {extras/Win32_msvc => src/extras}/dirent.h | 4 +- {extras/GNUgetopt => src/extras}/getopt.c | 0 {extras/GNUgetopt => src/extras}/getopt.h | 0 {extras/GNUgetopt => src/extras}/getopt1.c | 0 src/{misc/extras.c => extras/strndup.c} | 7 +- src/input/input_info.c | 4 +- src/misc/objects.c | 9 +- 17 files changed, 198 insertions(+), 63 deletions(-) delete mode 100644 extras/GNUgetopt/.cvsignore create mode 100644 src/extras/.cvsignore rename {extras/GNUgetopt => src/extras}/COPYING (100%) rename {extras/Win32_msvc => src/extras}/dirent.c (99%) rename {extras/Win32_msvc => src/extras}/dirent.h (98%) rename {extras/GNUgetopt => src/extras}/getopt.c (100%) rename {extras/GNUgetopt => src/extras}/getopt.h (100%) rename {extras/GNUgetopt => src/extras}/getopt1.c (100%) rename src/{misc/extras.c => extras/strndup.c} (92%) diff --git a/Makefile.am b/Makefile.am index 9525060295..e784d0d2d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/bootstrap b/bootstrap index 657ea7f3dd..513e9f69b7 100755 --- a/bootstrap +++ b/bootstrap @@ -1,7 +1,7 @@ #! /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 @@ -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 ## diff --git a/configure.ac.in b/configure.ac.in index f3fa0ba917..f2bf49357b 100644 --- a/configure.ac.in +++ b/configure.ac.in @@ -1,6 +1,6 @@ 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, diff --git a/extras/GNUgetopt/.cvsignore b/extras/GNUgetopt/.cvsignore deleted file mode 100644 index 39a06683b7..0000000000 --- a/extras/GNUgetopt/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.deps diff --git a/include/aout_internal.h b/include/aout_internal.h index d46c94f398..e94b3cbdc1 100644 --- a/include/aout_internal.h +++ b/include/aout_internal.h @@ -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 * @@ -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) );\ } \ diff --git a/include/input_ext-dec.h b/include/input_ext-dec.h index da3ba0f7c7..22440791ff 100644 --- a/include/input_ext-dec.h +++ b/include/input_ext-dec.h @@ -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 * Michel Kaempf @@ -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 ) { diff --git a/share/vlc_win32_rc.rc b/share/vlc_win32_rc.rc index a179e61fa9..f9cfc0fbe1 100644 --- a/share/vlc_win32_rc.rc +++ b/share/vlc_win32_rc.rc @@ -1 +1 @@ -VLC_ICON ICON "share/vlc48x48.ico" +VLC_ICON ICON "vlc48x48.ico" diff --git a/src/extras/.cvsignore b/src/extras/.cvsignore new file mode 100644 index 0000000000..ec96903b9d --- /dev/null +++ b/src/extras/.cvsignore @@ -0,0 +1,2 @@ +.deps +.dirstamp diff --git a/extras/GNUgetopt/COPYING b/src/extras/COPYING similarity index 100% rename from extras/GNUgetopt/COPYING rename to src/extras/COPYING diff --git a/extras/Win32_msvc/dirent.c b/src/extras/dirent.c similarity index 99% rename from extras/Win32_msvc/dirent.c rename to src/extras/dirent.c index 68a13f9c80..ad3803d394 100644 --- a/extras/Win32_msvc/dirent.c +++ b/src/extras/dirent.c @@ -10,8 +10,8 @@ * Peters * * $Revision: 1.1 $ - * $Author: gbazin $ - * $Date: 2002/05/18 14:03:13 $ + * $Author: sam $ + * $Date: 2002/11/09 16:34:52 $ * */ diff --git a/extras/Win32_msvc/dirent.h b/src/extras/dirent.h similarity index 98% rename from extras/Win32_msvc/dirent.h rename to src/extras/dirent.h index ac86f51c45..b95acc211e 100644 --- a/extras/Win32_msvc/dirent.h +++ b/src/extras/dirent.h @@ -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 $ * */ diff --git a/extras/GNUgetopt/getopt.c b/src/extras/getopt.c similarity index 100% rename from extras/GNUgetopt/getopt.c rename to src/extras/getopt.c diff --git a/extras/GNUgetopt/getopt.h b/src/extras/getopt.h similarity index 100% rename from extras/GNUgetopt/getopt.h rename to src/extras/getopt.h diff --git a/extras/GNUgetopt/getopt1.c b/src/extras/getopt1.c similarity index 100% rename from extras/GNUgetopt/getopt1.c rename to src/extras/getopt1.c diff --git a/src/misc/extras.c b/src/extras/strndup.c similarity index 92% rename from src/misc/extras.c rename to src/extras/strndup.c index b735486c08..5cced1ddf9 100644 --- a/src/misc/extras.c +++ b/src/extras/strndup.c @@ -1,8 +1,8 @@ /***************************************************************************** - * 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 * @@ -25,7 +25,6 @@ #include -#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 */ + diff --git a/src/input/input_info.c b/src/input/input_info.c index 9f166351d5..e795ada082 100644 --- a/src/input/input_info.c +++ b/src/input/input_info.c @@ -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 * @@ -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; diff --git a/src/misc/objects.c b/src/misc/objects.c index c669334549..923ced51d4 100644 --- a/src/misc/objects.c +++ b/src/misc/objects.c @@ -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 * @@ -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; -- 2.39.2