summaryrefslogtreecommitdiff
path: root/web/src/alpined.d/debug.h
diff options
context:
space:
mode:
authorEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
committerEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
commit094ca96844842928810f14844413109fc6cdd890 (patch)
treee60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /web/src/alpined.d/debug.h
downloadalpine-094ca96844842928810f14844413109fc6cdd890.tar.xz
Initial Alpine Version
Diffstat (limited to 'web/src/alpined.d/debug.h')
-rw-r--r--web/src/alpined.d/debug.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/web/src/alpined.d/debug.h b/web/src/alpined.d/debug.h
new file mode 100644
index 00000000..9a44ba81
--- /dev/null
+++ b/web/src/alpined.d/debug.h
@@ -0,0 +1,52 @@
+/*-----------------------------------------------------------------------
+ $Id: debug.h 130 2006-09-22 04:39:36Z mikes@u.washington.edu $
+ -----------------------------------------------------------------------*/
+
+/* ========================================================================
+ * Copyright 2006-2007 University of Washington
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * ========================================================================
+ */
+
+#ifndef _WEB_ALPINE_DEBUG_INCLUDED
+#define _WEB_ALPINE_DEBUG_INCLUDED
+
+
+#ifndef DEBUG
+/*
+ * support dprint regardless so we leave at least a few
+ * footsteps in syslog
+ */
+#undef dprint
+#define dprint(x) { output_debug_msg x ; }
+
+/* alpined-scoped debugging level */
+extern int debug;
+
+void output_debug_msg(int, char *fmt, ...);
+#endif
+
+
+/*
+ * Use these to for dprint() debug level arg to force
+ * debug output (typically to syslog())
+ */
+#define SYSDBG 0x8000
+#define SYSDBG_ALERT SYSDBG+1
+#define SYSDBG_ERR SYSDBG+2
+#define SYSDBG_INFO SYSDBG+3
+#define SYSDBG_DEBUG SYSDBG+4
+
+
+/* exported prototypes */
+void debug_init(void);
+void setup_imap_debug(void);
+
+
+#endif /* _WEB_ALPINE_DEBUG_INCLUDED */