summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuergen Keil <jkeil@users.sourceforge.net>2002-10-24 15:04:41 +0000
committerJuergen Keil <jkeil@users.sourceforge.net>2002-10-24 15:04:41 +0000
commitb30e43b28b3d17b1c92fa72fae938c7ed8ac4755 (patch)
treed957d141f0ff58db8784cd9acc51e93d2211f9af /src
parentad33c28890e76c2293a0f7c33331eb8abfff8999 (diff)
downloadxine-lib-b30e43b28b3d17b1c92fa72fae938c7ed8ac4755.tar.gz
xine-lib-b30e43b28b3d17b1c92fa72fae938c7ed8ac4755.tar.bz2
C99 version of macro definition with variable number of arguments added
CVS patchset: 2985 CVS date: 2002/10/24 15:04:41
Diffstat (limited to 'src')
-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_