summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--src/xine-engine/input_rip.c3
-rw-r--r--src/xine-utils/utils.c43
-rw-r--r--src/xine-utils/xineutils.h45
-rw-r--r--win32/xineplug_decode_a52.dsp4
-rw-r--r--win32/xineplug_decode_ff.dsp2
-rw-r--r--win32/xineutils.def4
7 files changed, 82 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac
index 0b4199463..1bb9d96cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,8 @@ AC_TYPE_OFF_T
AC_TYPE_SIZE_T
dnl AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_GENERATE_INTTYPES([include])
+AC_CHECK_HEADERS(libgen.h)
+AC_CHECK_FUNCS(basename)
dnl ---------------------------------------------
diff --git a/src/xine-engine/input_rip.c b/src/xine-engine/input_rip.c
index 3365a9ce1..60c6491b2 100644
--- a/src/xine-engine/input_rip.c
+++ b/src/xine-engine/input_rip.c
@@ -29,7 +29,7 @@
* - it's possible speeder saving streams in the xine without playing:
* xine stream_mrl#save:file.raw\;noaudio\;novideo
*
- * $Id: input_rip.c,v 1.10 2003/11/02 14:12:52 valtri Exp $
+ * $Id: input_rip.c,v 1.11 2003/11/04 14:38:26 valtri Exp $
*/
/* TODO:
@@ -46,7 +46,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#include <libgen.h>
#include <stdio.h>
#include <string.h>
diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c
index b3286c11a..be5220231 100644
--- a/src/xine-utils/utils.c
+++ b/src/xine-utils/utils.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: utils.c,v 1.18 2003/09/16 02:11:45 storri Exp $
+ * $Id: utils.c,v 1.19 2003/11/04 14:38:26 valtri Exp $
*
*/
#define _POSIX_PTHREAD_SEMANTICS 1 /* for 5-arg getpwuid_r on solaris */
@@ -200,3 +200,44 @@ void xine_hexdump (char *buf, int length) {
printf("-");
printf("\n");
}
+
+
+#ifndef HAVE_BASENAME
+
+#define FILESYSTEM_PREFIX_LEN(filename) 0
+#define ISSLASH(C) ((C) == '/')
+
+/*
+ * get base name
+ *
+ * (adopted from sh-utils)
+ */
+char *basename (char const *name) {
+ char const *base = name + FILESYSTEM_PREFIX_LEN (name);
+ char const *p;
+
+ for (p = base; *p; p++)
+ {
+ if (ISSLASH (*p))
+ {
+ /* Treat multiple adjacent slashes like a single slash. */
+ do p++;
+ while (ISSLASH (*p));
+
+ /* If the file name ends in slash, use the trailing slash as
+ the basename if no non-slashes have been found. */
+ if (! *p)
+ {
+ if (ISSLASH (*base))
+ base = p - 1;
+ break;
+ }
+
+ /* *P is a non-slash preceded by a slash. */
+ base = p;
+ }
+ }
+
+ return (char *) base;
+}
+#endif
diff --git a/src/xine-utils/xineutils.h b/src/xine-utils/xineutils.h
index 6e4900b30..91e4e0d7a 100644
--- a/src/xine-utils/xineutils.h
+++ b/src/xine-utils/xineutils.h
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xineutils.h,v 1.62 2003/11/01 17:25:49 mroi Exp $
+ * $Id: xineutils.h,v 1.63 2003/11/04 14:38:26 valtri Exp $
*
*/
#ifndef XINEUTILS_H
@@ -33,6 +33,9 @@ extern "C" {
#include <stdarg.h>
#include <inttypes.h>
#include <pthread.h>
+#if HAVE_LIBGEN_H
+# include <libgen.h>
+#endif
#ifdef XINE_COMPILE
# include "attributes.h"
@@ -907,24 +910,18 @@ void xine_print_trace(void);
#endif /* LOG_VERBOSE */
#ifdef LOG
- #ifdef __GNUC__
- #define lprintf(fmt, args...) \
- do{ \
- LONG_LOG_MODULE_STRING \
- printf( fmt, ##args ); \
- }while(0)
- #else
- #define lprintf(...) \
- do{ \
- LONG_LOG_MODULE_STRING \
- printf( __VA_ARGS__ ); \
- }while(0)
- #endif /* __GNUC__ */
+ #define lprintf \
+ LONG_LOG_MODULE_STRING \
+ printf
#else
#ifdef __GNUC__
#define lprintf(fmt, args...) ;
#else
+ #ifdef _MSC_VER
+ #define lprintf
+ #else
#define lprintf(...) ;
+ #endif /* _MSC_VER */
#endif /* __GNUC__ */
#endif /* LOG */
@@ -937,6 +934,15 @@ void xine_print_trace(void);
} \
}while(0)
#else
+#ifdef _MSC_VER
+ #define llprintf(cat, fmtargs) \
+ do{ \
+ if(cat){ \
+ LONG_LOG_MODULE_STRING \
+ printf( "%s", fmtargs ); \
+ } \
+ }while(0)
+#else
#define llprintf(cat, ...) \
do{ \
if(cat){ \
@@ -944,6 +950,7 @@ void xine_print_trace(void);
printf( __VA_ARGS__ ); \
} \
}while(0)
+#endif /* _MSC_VER */
#endif /* __GNUC__ */
#ifdef __GNUC__
@@ -955,6 +962,15 @@ void xine_print_trace(void);
} \
} while(0)
#else
+#ifdef _MSC_VER
+ #define xprintf(xine, verbose, fmtargs) \
+ do { \
+ if((xine)->verbosity >= verbose){ \
+ LOG_MODULE_STRING \
+ printf("%s", fmtargs); \
+ } \
+ } while(0)
+#else
#define xprintf(xine, verbose, ...) \
do { \
if((xine)->verbosity >= verbose){ \
@@ -962,6 +978,7 @@ void xine_print_trace(void);
printf(__VA_ARGS__); \
} \
} while(0)
+#endif /* _MSC_VER */
#endif /* __GNUC__ */
/* time measuring macros for profiling tasks */
diff --git a/win32/xineplug_decode_a52.dsp b/win32/xineplug_decode_a52.dsp
index 151940e39..1d8399cd5 100644
--- a/win32/xineplug_decode_a52.dsp
+++ b/win32/xineplug_decode_a52.dsp
@@ -98,11 +98,11 @@ SOURCE=..\src\liba52\bit_allocate.c
# End Source File
# Begin Source File
-SOURCE=..\src\liba52\crc.c
+SOURCE=..\src\liba52\bitstream.c
# End Source File
# Begin Source File
-SOURCE=..\src\liba52\bitstream.c
+SOURCE=..\src\liba52\crc.c
# End Source File
# Begin Source File
diff --git a/win32/xineplug_decode_ff.dsp b/win32/xineplug_decode_ff.dsp
index afa94c91c..33c319955 100644
--- a/win32/xineplug_decode_ff.dsp
+++ b/win32/xineplug_decode_ff.dsp
@@ -71,7 +71,7 @@ LINK32=link.exe
# PROP Target_Dir ""
LIB32=link.exe
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "include" /I "contrib/pthreads" /I "contrib/timer" /I "../include" /I "../src" /I "../src/xine-engine" /I "../src/xine-utils" /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "." /I "include" /I "contrib/pthreads" /I "contrib/timer" /I "../include" /I "../src" /I "../src/xine-engine" /I "../src/xine-utils" /I ".." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XINEPLUG_DECODE_FF_EXPORTS" /D "XINE_COMPILE" /D "SIMPLE_IDCT" /D "HAVE_AV_CONFIG_H" /D "RUNTIME_CPUDETECT" /D "USE_FASTMEMCPY" /D "CONFIG_RISKY" /D "CONFIG_DECODERS" /D "XINE_MPEG_ENCODER" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
diff --git a/win32/xineutils.def b/win32/xineutils.def
index a5aa4a21d..1acfce199 100644
--- a/win32/xineutils.def
+++ b/win32/xineutils.def
@@ -40,4 +40,6 @@ init_yuv_conversion
xml_parser_free_tree
xml_parser_build_tree
-xml_parser_init \ No newline at end of file
+xml_parser_init
+
+basename