From 094ca96844842928810f14844413109fc6cdd890 Mon Sep 17 00:00:00 2001 From: Eduardo Chappa Date: Sun, 3 Feb 2013 00:59:38 -0700 Subject: Initial Alpine Version --- web/src/alpined.d/debug.h | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 web/src/alpined.d/debug.h (limited to 'web/src/alpined.d/debug.h') 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 */ -- cgit v1.2.3-54-g00ecf