summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-09 17:41:45 +0000
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2006-09-09 17:41:45 +0000
commitab481384d1d547c4f8794489f95b3ddf28c8e17a (patch)
treedd0dc6b7f34f7a9d0617c8a9e803a0ae9557369b /src
parentbcda5705f92fc221ebf07dbd278c0a09b01dbc2f (diff)
downloadxine-lib-ab481384d1d547c4f8794489f95b3ddf28c8e17a.tar.gz
xine-lib-ab481384d1d547c4f8794489f95b3ddf28c8e17a.tar.bz2
Add xine_vlog in xine.c, remove xine_vflog from input_vcd, and do the stdout/stderr output from the two xine_vlog_msg/xine_vlog_err functions that are still local to the input plugin. Centralise log_buffers usage.
CVS patchset: 8211 CVS date: 2006/09/09 17:41:45
Diffstat (limited to 'src')
-rw-r--r--src/input/vcd/xine-extra.c21
-rw-r--r--src/xine-engine/xine.c8
2 files changed, 12 insertions, 17 deletions
diff --git a/src/input/vcd/xine-extra.c b/src/input/vcd/xine-extra.c
index 0b5e01c13..90c729181 100644
--- a/src/input/vcd/xine-extra.c
+++ b/src/input/vcd/xine-extra.c
@@ -1,5 +1,5 @@
/*
- $Id: xine-extra.c,v 1.4 2006/06/29 19:39:10 dgp85 Exp $
+ $Id: xine-extra.c,v 1.5 2006/09/09 17:41:45 dgp85 Exp $
Copyright (C) 2002 Rocky Bernstein <rocky@panix.com>
@@ -35,19 +35,6 @@
static xine_t *my_xine = NULL;
-/* This is modified from xine_log() and should really reside inside
- xine-lib/src/xine-engine/xine.c. It logs a message to "buf" and also
- prints it to stream.
-*/
-
-static void __attribute__((__format__(__printf__,4, 0)))
-xine_vflog(xine_t *this, FILE *stream, int buf, const char *format,
- va_list args)
-{
- this->log_buffers[buf]->scratch_printf(this->log_buffers[buf], format, args);
- vfprintf(stream, format, args);
-}
-
/*!
This routine is like xine_log, except it takes a va_list instead of
a variable number of arguments. It might be useful as a function
@@ -59,7 +46,8 @@ xine_vflog(xine_t *this, FILE *stream, int buf, const char *format,
void
xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args)
{
- xine_vflog(this, stdout, buf, format, args);
+ xine_vlog(this, buf, format, args);
+ vfprintf(stdout, format, args);
}
/*! This routine is like xine_log, except it takes a va_list instead
@@ -72,7 +60,8 @@ xine_vlog_msg(xine_t *this, int buf, const char *format, va_list args)
void
xine_vlog_err(xine_t *this, int buf, const char *format, va_list args)
{
- xine_vflog(this, stderr, buf, format, args);
+ xine_vlog(this, buf, format, args);
+ vfprintf(stderr, format, args);
}
/*! Call this before calling any of the xine_log_msg or xine_log_err
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index a4e31aba6..432fca579 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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: xine.c,v 1.327 2006/09/08 21:11:29 miguelfreitas Exp $
+ * $Id: xine.c,v 1.328 2006/09/09 17:41:45 dgp85 Exp $
*/
/*
@@ -1957,6 +1957,12 @@ void xine_log (xine_t *this, int buf, const char *format, ...) {
}
}
+void xine_vlog(xine_t *this, int buf, const char *format,
+ va_list args)
+{
+ this->log_buffers[buf]->scratch_printf(this->log_buffers[buf], format, args);
+}
+
const char *const *xine_get_log (xine_t *this, int buf) {
if(buf >= XINE_LOG_NUM)