summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb2b7a6)
raw | patch | inline | side by side (parent: bb2b7a6)
author | Kalle Wallin <kaw@linux.se> | |
Sat, 3 Jul 2004 13:21:26 +0000 (13:21 +0000) | ||
committer | Kalle Wallin <kaw@linux.se> | |
Sat, 3 Jul 2004 13:21:26 +0000 (13:21 +0000) |
configure.ac | patch | blob | history | |
src/main.c | patch | blob | history | |
src/ncmpc.h | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 4782abb6494271ae1ce6e60bac372ace18b5b398..9a6b8e303a16ca9f3d04f423f6a822b298d312ec 100644 (file)
--- a/configure.ac
+++ b/configure.ac
AC_INIT
AC_CONFIG_SRCDIR([src/main.c])
-AM_INIT_AUTOMAKE(ncmpc, 0.11.0-svn-20040630)
+AM_INIT_AUTOMAKE(ncmpc, 0.11.0-svn)
AM_CONFIG_HEADER([config.h])
dnl Check for programs
diff --git a/src/main.c b/src/main.c
index 2ace29740e3ac2e5708e1058808685799f1e3a6f..abe60bf152ecd9951d23fc2bdb781fd0ed0a6d01 100644 (file)
--- a/src/main.c
+++ b/src/main.c
exit(EXIT_SUCCESS);
}
+#ifdef DEBUG
+void
+D(char *format, ...)
+{
+ if( options.debug )
+ {
+ gchar *msg;
+ va_list ap;
+
+ va_start(ap,format);
+ msg = g_strdup_vprintf(format,ap);
+ va_end(ap);
+ fprintf(stderr, "%s", msg);
+ g_free(msg);
+ }
+}
+#endif
+
int
main(int argc, const char *argv[])
{
diff --git a/src/ncmpc.h b/src/ncmpc.h
index 029498f03469549b8d3a4a406ca935a97605402f..4118456a13ceea3fd0a4d5a2c4a48831c24da300 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
#endif
#ifdef DEBUG
-#define D(format, args...) fprintf(stderr, format, ##args)
+void D(char *format, ...);
#else
#define D(...)
#endif