changeset 879:2a50d36215c3

Move error printing function to xs_support.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 09 Nov 2012 05:18:36 +0200
parents 9d31c1344f26
children 000baa9fcd4f
files src/xmms-sid.c src/xmms-sid.h src/xs_support.c src/xs_support.h
diffstat 4 files changed, 32 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/src/xmms-sid.c	Fri Nov 09 05:14:41 2012 +0200
+++ b/src/xmms-sid.c	Fri Nov 09 05:18:36 2012 +0200
@@ -26,7 +26,6 @@
 #include <stdlib.h>
 #endif
 
-#include <stdarg.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
 
@@ -55,31 +54,6 @@
 void        xs_subctrl_update(void);
 
 
-/* Error messages
- */
-void xs_error(const char *fmt, ...)
-{
-    va_list ap;
-    fprintf(stderr, "XMMS-SID: ");
-    va_start(ap, fmt);
-    vfprintf(stderr, fmt, ap);
-    va_end(ap);
-}
-
-#ifndef DEBUG_NP
-void XSDEBUG(const char *fmt, ...)
-{
-#ifdef DEBUG
-    va_list ap;
-    fprintf(stderr, "XSDEBUG: ");
-    va_start(ap, fmt);
-    vfprintf(stderr, fmt, ap);
-    va_end(ap);
-#endif
-}
-#endif
-
-
 /*
  * Initialization functions
  */
--- a/src/xmms-sid.h	Fri Nov 09 05:14:41 2012 +0200
+++ b/src/xmms-sid.h	Fri Nov 09 05:18:36 2012 +0200
@@ -160,11 +160,7 @@
 void    xs_get_song_info(gchar *, gchar **, gint *);
 void    xs_about(void);
 
-void    xs_error(const char *, ...);
 
-
-/* Debugging
- */
 #ifndef DEBUG_NP
 void    XSDEBUG(const char *, ...);
 #else
--- a/src/xs_support.c	Fri Nov 09 05:14:41 2012 +0200
+++ b/src/xs_support.c	Fri Nov 09 05:18:36 2012 +0200
@@ -25,9 +25,36 @@
    --
 */
 #include "xs_support.h"
+#include <stdarg.h>
 #include <ctype.h>
 #include <glib.h>
 
+
+/* Error messages
+ */
+void xs_error(const char *fmt, ...)
+{
+    va_list ap;
+    fprintf(stderr, "XMMS-SID: ");
+    va_start(ap, fmt);
+    vfprintf(stderr, fmt, ap);
+    va_end(ap);
+}
+
+#ifndef DEBUG_NP
+void XSDEBUG(const char *fmt, ...)
+{
+#ifdef DEBUG
+    va_list ap;
+    fprintf(stderr, "XSDEBUG: ");
+    va_start(ap, fmt);
+    vfprintf(stderr, fmt, ap);
+    va_end(ap);
+#endif
+}
+#endif
+
+
 #ifndef __AUDACIOUS_NEWVFS__
 off_t xs_fsize(XSFile *f)
 {
--- a/src/xs_support.h	Fri Nov 09 05:14:41 2012 +0200
+++ b/src/xs_support.h	Fri Nov 09 05:18:36 2012 +0200
@@ -124,6 +124,11 @@
     guint8 **pbuf, size_t *bufSize, const size_t maxSize, gboolean failMaxSize);
 
 
+/* Error messages and debugging
+ */
+void    xs_error(const char *, ...);
+
+
 /* Misc functions
  */
 gint    xs_pstrcpy(gchar **, const gchar *);