summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/input/input_dvd.c19
-rw-r--r--src/input/libdvdnav/dvdnav_internal.h6
-rw-r--r--src/input/libdvdnav/read_cache.c16
3 files changed, 32 insertions, 9 deletions
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index d3674f9fe..a3ba50db4 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,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: input_dvd.c,v 1.101 2002/10/24 13:52:57 jcdutton Exp $
+ * $Id: input_dvd.c,v 1.102 2002/10/24 15:06:55 jkeil Exp $
*
*/
@@ -115,10 +115,18 @@
#define VIDEO_FILL_THROTTLE 5
/* Debugging macros */
-#ifdef INPUT_DEBUG_TRACE
-#define trace_print(s, args...) printf("input_dvd: " __FUNCTION__ ": " s, ##args);
+#ifdef __GNUC__
+# ifdef INPUT_DEBUG_TRACE
+# define trace_print(s, args...) printf("input_dvd: " __func__ ": " s, ##args);
+# else
+# define trace_print(s, args...) /* Nothing */
+# endif
#else
-#define trace_print(s, args...) /* Nothing */
+# ifdef INPUT_DEBUG_TRACE
+# define trace_print(s, ...) printf("input_dvd: " __func__ ": " s, __VA_ARGS_);
+# else
+# define trace_print(s, ...) /* Nothing */
+# endif
#endif
/* Globals */
@@ -1654,6 +1662,9 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.102 2002/10/24 15:06:55 jkeil
+ * C99 version of macro definition with variable number of arguments added
+ *
* Revision 1.101 2002/10/24 13:52:57 jcdutton
* Fix some log messages in audio_alsa_out.c
* Fix input_dvd.c for new config file loading before init_class().
diff --git a/src/input/libdvdnav/dvdnav_internal.h b/src/input/libdvdnav/dvdnav_internal.h
index d3c48a276..cca3a75fa 100644
--- a/src/input/libdvdnav/dvdnav_internal.h
+++ b/src/input/libdvdnav/dvdnav_internal.h
@@ -18,7 +18,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: dvdnav_internal.h,v 1.4 2002/08/27 19:24:33 mroi Exp $
+ * $Id: dvdnav_internal.h,v 1.5 2002/10/24 15:04:41 jkeil Exp $
*
*/
@@ -161,7 +161,11 @@ struct dvdnav_s {
/** USEFUL MACROS **/
+#ifdef __GNUC__
#define printerrf(format, args...) snprintf(this->err_str, MAX_ERR_LEN, format, ## args);
+#else
+#define printerrf(...) snprintf(this->err_str, MAX_ERR_LEN, __VA_ARGS__);
+#endif
#define printerr(str) strncpy(this->err_str, str, MAX_ERR_LEN);
/* Save my typing */
diff --git a/src/input/libdvdnav/read_cache.c b/src/input/libdvdnav/read_cache.c
index 6d3a2e8f1..5a0177128 100644
--- a/src/input/libdvdnav/read_cache.c
+++ b/src/input/libdvdnav/read_cache.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: read_cache.c,v 1.3 2002/08/27 19:24:33 mroi Exp $
+ * $Id: read_cache.c,v 1.4 2002/10/24 15:04:41 jkeil Exp $
*
*/
@@ -95,10 +95,18 @@ struct read_cache_s {
#define READ_CACHE_TRACE 0
-#if READ_CACHE_TRACE
-#define dprintf(fmt, args...) fprintf(MSG_OUT, "libdvdnav: %s: "fmt, __func__ , ## args);
+#ifdef __GNUC__
+# if READ_CACHE_TRACE
+# define dprintf(fmt, args...) fprintf(MSG_OUT, "libdvdnav: %s: "fmt, __func__ , ## args);
+# else
+# define dprintf(fmt, args...) /* Nowt */
+# endif
#else
-#define dprintf(fmt, args...) /* Nowt */
+# if READ_CACHE_TRACE
+# define dprintf(fmt, ...) fprintf(MSG_OUT, "libdvdnav: %s: "fmt, __func__ , __VA_ARGS__);
+# else
+# define dprintf(fmt, ...) /* Nowt */
+# endif
#endif
#if _MULTITHREAD_