summaryrefslogtreecommitdiff
path: root/json-c/src/debug.c
diff options
context:
space:
mode:
authorMichał Cichoń <michcic@gmail.com>2015-08-25 19:58:37 +0200
committerMichał Cichoń <michcic@gmail.com>2015-08-25 19:58:37 +0200
commita68df043bfbc7f8f38332143577877846631eca4 (patch)
treebf0e892f6e6df291111536e5db14982c834efe13 /json-c/src/debug.c
parent62c78119f83d76661ded8c852ac42c3b9330d211 (diff)
downloadpianobar-windows-build-a68df043bfbc7f8f38332143577877846631eca4.tar.gz
pianobar-windows-build-a68df043bfbc7f8f38332143577877846631eca4.tar.bz2
pianobar-windows-build-a68df043bfbc7f8f38332143577877846631eca4.zip
Update build environment
- remove faad2 - remove mad - remove polarssl - remove pthreads - add libcurl - add vtparse with UTF8 support - update project to use Visual Studio 2015
Diffstat (limited to 'json-c/src/debug.c')
-rw-r--r--json-c/src/debug.c181
1 files changed, 83 insertions, 98 deletions
diff --git a/json-c/src/debug.c b/json-c/src/debug.c
index e0294ca..e6a8fec 100644
--- a/json-c/src/debug.c
+++ b/json-c/src/debug.c
@@ -1,98 +1,83 @@
-/*
- * $Id: debug.c,v 1.5 2006/01/26 02:16:28 mclark Exp $
- *
- * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
- * Michael Clark <michael@metaparadigm.com>
- *
- * This library is free software; you can redistribute it and/or modify
- * it under the terms of the MIT license. See COPYING for details.
- *
- */
-
-#include "config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-
-#if HAVE_SYSLOG_H
-# include <syslog.h>
-#endif /* HAVE_SYSLOG_H */
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif /* HAVE_UNISTD_H */
-
-#if HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif /* HAVE_SYS_PARAM_H */
-
-#include "debug.h"
-
-static int _syslog = 0;
-static int _debug = 0;
-
-void mc_set_debug(int debug) { _debug = debug; }
-int mc_get_debug(void) { return _debug; }
-
-extern void mc_set_syslog(int syslog)
-{
- _syslog = syslog;
-}
-
-void mc_abort(const char *msg, ...)
-{
- va_list ap;
- va_start(ap, msg);
-#if HAVE_VSYSLOG
- if(_syslog) {
- vsyslog(LOG_ERR, msg, ap);
- } else
-#endif
- vprintf(msg, ap);
- va_end(ap);
- exit(1);
-}
-
-
-void mc_debug(const char *msg, ...)
-{
- va_list ap;
- if(_debug) {
- va_start(ap, msg);
-#if HAVE_VSYSLOG
- if(_syslog) {
- vsyslog(LOG_DEBUG, msg, ap);
- } else
-#endif
- vprintf(msg, ap);
- va_end(ap);
- }
-}
-
-void mc_error(const char *msg, ...)
-{
- va_list ap;
- va_start(ap, msg);
-#if HAVE_VSYSLOG
- if(_syslog) {
- vsyslog(LOG_ERR, msg, ap);
- } else
-#endif
- vfprintf(stderr, msg, ap);
- va_end(ap);
-}
-
-void mc_info(const char *msg, ...)
-{
- va_list ap;
- va_start(ap, msg);
-#if HAVE_VSYSLOG
- if(_syslog) {
- vsyslog(LOG_INFO, msg, ap);
- } else
-#endif
- vfprintf(stderr, msg, ap);
- va_end(ap);
-}
+/*
+ * $Id: debug.c,v 1.5 2006/01/26 02:16:28 mclark Exp $
+ *
+ * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd.
+ * Michael Clark <michael@metaparadigm.com>
+ *
+ * This library is free software; you can redistribute it and/or modify
+ * it under the terms of the MIT license. See COPYING for details.
+ *
+ */
+
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+
+#if HAVE_SYSLOG_H
+# include <syslog.h>
+#endif /* HAVE_SYSLOG_H */
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif /* HAVE_SYS_PARAM_H */
+
+#include "debug.h"
+
+static int _syslog = 0;
+static int _debug = 0;
+
+void mc_set_debug(int debug) { _debug = debug; }
+int mc_get_debug(void) { return _debug; }
+
+extern void mc_set_syslog(int syslog)
+{
+ _syslog = syslog;
+}
+
+void mc_debug(const char *msg, ...)
+{
+ va_list ap;
+ if(_debug) {
+ va_start(ap, msg);
+#if HAVE_VSYSLOG
+ if(_syslog) {
+ vsyslog(LOG_DEBUG, msg, ap);
+ } else
+#endif
+ vprintf(msg, ap);
+ va_end(ap);
+ }
+}
+
+void mc_error(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+#if HAVE_VSYSLOG
+ if(_syslog) {
+ vsyslog(LOG_ERR, msg, ap);
+ } else
+#endif
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+}
+
+void mc_info(const char *msg, ...)
+{
+ va_list ap;
+ va_start(ap, msg);
+#if HAVE_VSYSLOG
+ if(_syslog) {
+ vsyslog(LOG_INFO, msg, ap);
+ } else
+#endif
+ vfprintf(stderr, msg, ap);
+ va_end(ap);
+}