Mercurial > hg > xmms-sid
comparison src/xs_support.c @ 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 | 5e33075ed9dd |
children | 000baa9fcd4f |
comparison
equal
deleted
inserted
replaced
878:9d31c1344f26 | 879:2a50d36215c3 |
---|---|
23 -- | 23 -- |
24 Except for the MD5 related functionality at the end of this file. | 24 Except for the MD5 related functionality at the end of this file. |
25 -- | 25 -- |
26 */ | 26 */ |
27 #include "xs_support.h" | 27 #include "xs_support.h" |
28 #include <stdarg.h> | |
28 #include <ctype.h> | 29 #include <ctype.h> |
29 #include <glib.h> | 30 #include <glib.h> |
31 | |
32 | |
33 /* Error messages | |
34 */ | |
35 void xs_error(const char *fmt, ...) | |
36 { | |
37 va_list ap; | |
38 fprintf(stderr, "XMMS-SID: "); | |
39 va_start(ap, fmt); | |
40 vfprintf(stderr, fmt, ap); | |
41 va_end(ap); | |
42 } | |
43 | |
44 #ifndef DEBUG_NP | |
45 void XSDEBUG(const char *fmt, ...) | |
46 { | |
47 #ifdef DEBUG | |
48 va_list ap; | |
49 fprintf(stderr, "XSDEBUG: "); | |
50 va_start(ap, fmt); | |
51 vfprintf(stderr, fmt, ap); | |
52 va_end(ap); | |
53 #endif | |
54 } | |
55 #endif | |
56 | |
30 | 57 |
31 #ifndef __AUDACIOUS_NEWVFS__ | 58 #ifndef __AUDACIOUS_NEWVFS__ |
32 off_t xs_fsize(XSFile *f) | 59 off_t xs_fsize(XSFile *f) |
33 { | 60 { |
34 off_t pos; | 61 off_t pos; |