#include <lib-lib/file.h>
#include <lib-lib/macros.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
#include "lib/rx.h"
-#include "lib/debug.h"
#include "mutt.h"
#include "mutt_idna.h"
# include "config.h"
#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <string.h>
+#include <errno.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "mx.h"
#include <lib-crypt/crypt.h>
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-
int mutt_get_tmp_attachment (BODY * a)
{
char type[STRING];
# include "config.h"
#endif
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <utime.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/file.h>
#include <lib-lib/macros.h>
#include <lib-lib/ascii.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "buffy.h"
#endif
-#include "lib/debug.h"
-
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <utime.h>
-
/* The folder the user last saved to. Used by ci_save_message() */
static char LastSaveFolder[_POSIX_PATH_MAX] = "";
# include "config.h"
#endif
+#include <dirent.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#include <lib-lib/str.h>
+#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
+
#include "mutt.h"
#include "mx.h"
#include <imap/imap.h>
#include "nntp.h"
#endif
-#include <lib-lib/str.h>
-#include <lib-lib/file.h>
-#include "lib/debug.h"
-
-#include <dirent.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-
/* given a partial pathname, this routine fills in as much of the rest of the
* path as is unique.
*
* please see the file GPL in the top level source directory.
*/
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include "mx.h"
#include "mbox.h"
-#include "lib/debug.h"
-
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-
typedef struct {
const char *close; /* close-hook command */
const char *open; /* open-hook command */
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <unistd.h>
+
#include <lib-lib/macros.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/ascii.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h> /* needed for SEEK_SET under SunOS 4.1.4 */
-
static int address_header_decode (char **str);
static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout,
char *date);
# include "config.h"
#endif
+#include <ctype.h>
+#include <string.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <string.h>
-
static const char *next_word(const char *s)
{
while (*s && !ISSPACE(*s))
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "attach.h"
#include "lib.h"
-#include "lib/debug.h"
typedef int handler_f (BODY *, STATE *);
typedef handler_f *handler_t;
#include <lib-lib/mem.h>
#include <lib-hash/hash.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "mx.h"
#include "lib.h"
-#include "lib/debug.h"
-
static struct header_cache {
#if defined(HAVE_QDBM)
VILLA *db;
# include "config.h"
#endif
+#include <sys/stat.h>
+#include <string.h>
+#include <ctype.h>
+
#include <lib-lib/macros.h>
#include <lib-lib/ascii.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
-#include "lib/debug.h"
-
-#include <sys/stat.h>
-#include <string.h>
-#include <ctype.h>
-
void mutt_edit_headers (const char *editor,
const char *body,
HEADER * msg, char *fcc, size_t fcclen)
#endif
#include <lib-lib/mem.h>
+#include <lib-lib/debug.h>
#include <lib-lib/macros.h>
#include <lib-lib/ascii.h>
-#include "lib/debug.h"
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/debug.h>
/* this is basically a stripped-down version of the cram-md5 method. */
imap_auth_res_t imap_auth_anon (IMAP_DATA * idata, const char *method)
#define MD5_DIGEST_LEN 16
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-hash/hash.h>
-#include "lib/debug.h"
/* forward declarations */
static void hmac_md5 (const char *password, char *challenge,
#include "auth.h"
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/debug.h>
#include <netinet/in.h>
#endif
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "imap_private.h"
#include "auth.h"
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/debug.h>
#include <sasl/sasl.h>
#include <sasl/saslutil.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-ui/enter.h>
-#include "lib/debug.h"
#include "mutt.h"
#include "imap_private.h"
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
-#include "lib/debug.h"
#include "mutt.h"
#include "message.h"
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "mx.h"
#include "buffy.h"
#include <lib-lib/macros.h>
-#include "lib/debug.h"
#include <unistd.h>
#include <ctype.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/buffer.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
-#include "lib/debug.h"
#if HAVE_STDINT_H
#include <stdint.h>
#include <lib-network/mutt_ssl.h>
#include <lib-lib/macros.h>
-#include "lib/debug.h"
+#include <lib-lib/debug.h>
#include <stdlib.h>
#include <ctype.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include "lib/rx.h"
#include "lib/list.h"
-#include "lib/debug.h"
#include <ctype.h>
#include <stdlib.h>
# include "sort.h"
#endif
+#include <lib-lib/debug.h>
+
#include "buffy.h"
#include "mutt.h"
#include "version.h"
-#include "lib/debug.h"
#ifndef _MAKEDOC
#define DT_MASK 0x0f
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "recvattach.h"
#include "sort.h"
-#include "lib/debug.h"
#include <sys/wait.h>
#include <string.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/date.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "pgp.h"
#include "charset.h"
-#include "lib/debug.h"
/****************
* Read the GNUPG keys. For now we read the complete keyring by
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-ui/menu.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "handler.h"
#include "copy.h"
#include "attach.h"
-#include "lib/debug.h"
#include <sys/wait.h>
#include <string.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "mutt_idna.h"
#include "pgp.h"
-#include "lib/debug.h"
/*
* The actual command line formatter.
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "pager.h"
#include "sort.h"
-#include "lib/debug.h"
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
-#include "lib/debug.h"
-
static struct {
short id;
const char *name;
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "handler.h"
#include "copy.h"
-#include "lib/debug.h"
#include <sys/wait.h>
#include <string.h>
liblib_a_SOURCES = mem.h str.h ascii.h buffer.h hash.h list.h file.h mapping.h \
str.c ascii.c buffer.c hash.c list.c file.c mapping.c \
\
- date.h \
- date.c
+ date.h debug.h \
+ date.c debug.c
noinst_HEADERS = mem.h str.h ascii.h buffer.h hash.h list.h file.h mapping.h \
date.c
#include "ascii.h"
#include "buffer.h"
#include "file.h"
-
-#include "lib/debug.h"
+#include "debug.h"
#include "mutt.h"
--- /dev/null
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Copyright © 2006 Pierre Habouzit
+ */
+/*
+ * written for mutt-ng by:
+ * Rocco Rutte <pdmef@cs.tu-berlin.de>
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#if DEBUG
+
+#include <stdio.h>
+#include <stdarg.h>
+#include <time.h>
+
+#include "str.h"
+#include "file.h"
+#include "debug.h"
+
+#include "mutt.h"
+#include "globals.h"
+
+short DebugLevel = -1;
+FILE* DebugFile = NULL;
+
+void debug_setlevel(short level) {
+ DebugLevel = level;
+}
+
+void debug_start(const char* basedir) {
+ time_t t;
+ int i;
+ char buf[_POSIX_PATH_MAX];
+ char buf2[_POSIX_PATH_MAX];
+
+ if (DebugLevel < DEBUG_MIN_LEVEL || DebugLevel > DEBUG_MAX_LEVEL
+ || !basedir || !*basedir)
+ return;
+ /* rotate the old debug logs */
+ for (i = 3; i >= 0; i--) {
+ snprintf(buf, sizeof (buf), "%s/.madmuttdebug%d", NONULL(basedir), i);
+ snprintf(buf2, sizeof (buf2), "%s/.madmuttdebug%d", NONULL(basedir), i + 1);
+ rename (buf, buf2);
+ }
+
+ if ((DebugFile = safe_fopen (buf, "w")) != NULL) {
+ t = time (NULL);
+ setbuf(DebugFile, NULL); /* don't buffer the debugging output! */
+ fprintf(DebugFile,
+ "Madmutt %s started at %s\nDebugging at level %d\n\n",
+ MUTT_VERSION, asctime (localtime (&t)), DebugLevel);
+ }
+}
+
+void _debug_print_intro(const char* file, int line, const char *function, int level) {
+ if (!DebugFile || DebugLevel < DEBUG_MIN_LEVEL || DebugLevel > DEBUG_MAX_LEVEL)
+ return;
+ fprintf(DebugFile, "[%d:%s:%d", level, NONULL(file), line);
+ if (function && *function)
+ fprintf(DebugFile, ":%s()", function);
+ fprintf(DebugFile, "] ");
+}
+
+void _debug_print_msg (const char* fmt, ...) {
+ va_list ap;
+
+ if (!DebugFile || DebugLevel < 0)
+ return;
+ va_start(ap, fmt);
+ vfprintf(DebugFile, fmt, ap);
+ va_end(ap);
+}
+
+#endif /* DEBUG */
--- /dev/null
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ *
+ * Copyright © 2006 Pierre Habouzit
+ */
+/*
+ * written for mutt-ng by:
+ * Rocco Rutte <pdmef@cs.tu-berlin.de>
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
+/* generic interface for debug messages */
+
+#ifndef _LIB_DEBUG_H
+#define _LIB_DEBUG_H
+
+#include <stdio.h>
+
+#define DEBUG_MIN_LEVEL 1
+#define DEBUG_MIN_LEVEL_S "1"
+#define DEBUG_MAX_LEVEL 5
+#define DEBUG_MAX_LEVEL_S "5"
+
+#ifdef DEBUG
+
+extern short DebugLevel;
+extern FILE* DebugFile;
+
+void debug_setlevel (short);
+void debug_start (const char*);
+
+void _debug_print_intro (const char*, int, const char*, int);
+void _debug_print_msg (const char*, ...);
+
+/*
+ * the debug_print() macro will (in the end) print debug messages of the
+ * following format:
+ *
+ * (file:line:function:level): message
+ *
+ * for GCC and:
+ *
+ * (file:line:level): message
+ *
+ * otherwise
+ */
+#ifdef __GNUC__
+
+#define debug_print(level,msg) \
+ do { \
+ if (DebugLevel >= level) { \
+ _debug_print_intro (__FILE__,__LINE__,__func__,level); \
+ _debug_print_msg msg; \
+ } \
+ } while(0)
+
+#else /* __GNUC__ */
+
+#define debug_print(level,msg) \
+ do { \
+ if (DebugLevel >= level) { \
+ _debug_print_intro (__FILE__,__LINE__,NULL,level); \
+ _debug_print_msg msg; \
+ } \
+ } while(0)
+
+#endif /* !__GNUC__ */
+
+#else /* DEBUG */
+
+/*
+ * without debug support, we don't need these
+ * (this also kills the dozens of #ifdef for debug...
+ */
+#define debug_start(basedir)
+#define debug_setlevel(level)
+#define debug_print(level,msg)
+
+#endif /* !DEBUG */
+
+#endif /* !_LIB_DEBUG_H */
#include "mem.h"
#include "str.h"
#include "file.h"
-
-#include "../lib/debug.h"
+#include "debug.h"
#ifndef O_NOFOLLOW
# define O_NOFOLLOW 0
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
#include <lib-lib/date.h>
+#include <lib-lib/debug.h>
#include "recvattach.h"
#include "url.h"
-#include "lib/debug.h"
#include "mime.h"
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "globals.h"
#include "mutt_idna.h"
-#include "lib/debug.h"
#include <unistd.h>
#include <netinet/in.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include <lib-ui/menu.h>
#include "mutt_socket.h"
#include "mutt_ssl.h"
-#include "lib/debug.h"
#if OPENSSL_VERSION_NUMBER >= 0x00904000L
#define READ_X509_KEY(fp, key) PEM_read_X509(fp, key, NULL, NULL)
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include "curses.h"
#include "mutt.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
/* globals */
int *ColorQuote;
int ColorQuoteUsed;
# include "config.h"
#endif
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
-
-#include "curses.h"
-#include "menu.h"
-#include "enter.h"
-
-#include "mutt.h"
-#include "pager.h"
-#include "mbyte.h"
-
-#include "lib/debug.h"
-
#include <wchar.h>
#include <termios.h>
#include <sys/types.h>
#include <langinfo.h>
#endif
+#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
+
+#include "curses.h"
+#include "menu.h"
+#include "enter.h"
+
+#include "mutt.h"
+#include "pager.h"
+#include "mbyte.h"
+
/* not possible to unget more than one char under some curses libs, and it
* is impossible to unget function keys in SLang, so roll our own input
* buffering routines.
# include "config.h"
#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/wait.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <errno.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <pop/pop.h>
#include "mutt_sasl.h"
#endif
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <errno.h>
-
static const char *No_mailbox_is_open = N_("No mailbox is open.");
static const char *There_are_no_messages = N_("There are no messages.");
static const char *Mailbox_is_read_only = N_("Mailbox is read-only.");
#include <lib-lib/macros.h>
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
+#include <lib-lib/debug.h>
#include "lib.h"
-#include "lib/debug.h"
static struct sysexits
{
AUTOMAKE_OPTIONS = foreign
noinst_LIBRARIES = libsane.a
-noinst_HEADERS = list.h rx.h debug.h
+noinst_HEADERS = list.h rx.h
-libsane_a_SOURCES = list.c rx.h debug.h \
- list.h rx.c debug.c
+libsane_a_SOURCES = list.c rx.h list.h rx.c
-include ../cflags.mk
+++ /dev/null
-/*
- * written for mutt-ng by:
- * Rocco Rutte <pdmef@cs.tu-berlin.de>
- *
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#if DEBUG
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <time.h>
-
-#include <lib-lib/str.h>
-#include <lib-lib/file.h>
-#include "debug.h"
-
-#include "mutt.h"
-#include "globals.h"
-
-short DebugLevel = -1;
-FILE* DebugFile = NULL;
-
-void debug_setlevel (short level) {
- DebugLevel = level;
-}
-
-void debug_start (const char* basedir) {
- time_t t;
- int i;
- char buf[_POSIX_PATH_MAX];
- char buf2[_POSIX_PATH_MAX];
-
- if (DebugLevel < DEBUG_MIN_LEVEL || DebugLevel > DEBUG_MAX_LEVEL
- || !basedir || !*basedir)
- return;
- /* rotate the old debug logs */
- for (i = 3; i >= 0; i--) {
- snprintf (buf, sizeof (buf), "%s/.madmuttdebug%d", NONULL (basedir), i);
- snprintf (buf2, sizeof (buf2), "%s/.madmuttdebug%d", NONULL (basedir), i + 1);
- rename (buf, buf2);
- }
- if ((DebugFile = safe_fopen (buf, "w")) != NULL) {
- t = time (NULL);
- setbuf (DebugFile, NULL); /* don't buffer the debugging output! */
- fprintf (DebugFile,
- "Madmutt %s started at %s\nDebugging at level %d\n\n",
- MUTT_VERSION, asctime (localtime (&t)), DebugLevel);
- }
-}
-
-void _debug_print_intro (const char* file, int line, const char* function, int level) {
- if (!DebugFile || DebugLevel < DEBUG_MIN_LEVEL || DebugLevel > DEBUG_MAX_LEVEL)
- return;
- fprintf (DebugFile, "[%d:%s:%d", level, NONULL(file), line);
- if (function && *function)
- fprintf (DebugFile, ":%s()", function);
- fprintf (DebugFile, "] ");
-}
-
-void _debug_print_msg (const char* fmt, ...) {
- va_list ap;
-
- if (!DebugFile || DebugLevel < 0)
- return;
- va_start (ap, fmt);
- vfprintf (DebugFile, fmt, ap);
- va_end (ap);
-}
-
-#endif /* DEBUG */
+++ /dev/null
-/*
- * written for mutt-ng by:
- * Rocco Rutte <pdmef@cs.tu-berlin.de>
- *
- * This file is part of mutt-ng, see http://www.muttng.org/.
- * It's licensed under the GNU General Public License,
- * please see the file GPL in the top level source directory.
- */
-
-/* generic interface for debug messages */
-
-#ifndef _LIB_DEBUG_H
-#define _LIB_DEBUG_H
-
-#include <stdio.h>
-
-#define DEBUG_MIN_LEVEL 1
-#define DEBUG_MIN_LEVEL_S "1"
-#define DEBUG_MAX_LEVEL 5
-#define DEBUG_MAX_LEVEL_S "5"
-
-#ifdef DEBUG
-
-extern short DebugLevel;
-extern FILE* DebugFile;
-
-void debug_setlevel (short);
-void debug_start (const char*);
-
-void _debug_print_intro (const char*, int, const char*, int);
-void _debug_print_msg (const char*, ...);
-
-/*
- * the debug_print() macro will (in the end) print debug messages of the
- * following format:
- *
- * (file:line:function:level): message
- *
- * for GCC and:
- *
- * (file:line:level): message
- *
- * otherwise
- */
-#ifdef __GNUC__
-#define debug_print(level,msg) do { \
- if (DebugLevel >= level) { \
- _debug_print_intro (__FILE__,__LINE__,__FUNCTION__,level); \
- _debug_print_msg msg; \
- } \
-} while(0)
-#else /* __GNUC__ */
-#define debug_print(level,msg) do { \
- if (DebugLevel >= level) { \
- _debug_print_intro (__FILE__,__LINE__,NULL,level); \
- _debug_print_msg msg; \
- } \
-} while(0)
-#endif /* !__GNUC__ */
-
-#else /* DEBUG */
-
-/*
- * without debug support, we don't need these
- * (this also kills the dozens of #ifdef for debug...
- */
-#define debug_start(basedir)
-#define debug_setlevel(level)
-#define debug_print(level,msg)
-
-#endif /* !DEBUG */
-
-#endif /* !_LIB_DEBUG_H */
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <locale.h>
+#include <unistd.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/utsname.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include "mutt_idna.h"
#include "xterm.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <locale.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/utsname.h>
-
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#else
# include "config.h"
#endif
+#include <sys/stat.h>
+#include <dirent.h>
+#include <string.h>
+#include <utime.h>
+#include <sys/file.h>
+#include <errno.h>
+#include <unistd.h>
+#include <fcntl.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "mx.h"
#include "copy.h"
#include "compress.h"
-#include "lib/debug.h"
-
-#include <sys/stat.h>
-#include <dirent.h>
-#include <string.h>
-#include <utime.h>
-#include <sys/file.h>
-#include <errno.h>
-#include <unistd.h>
-#include <fcntl.h>
-
/* struct used by mutt_sync_mailbox() to store new offsets */
struct m_update_t {
short valid;
# include "config.h"
#endif
-#include <lib-lib/mem.h>
-#include <lib-lib/str.h>
-#include <lib-lib/macros.h>
-#include <lib-lib/file.h>
-
-#include "mutt.h"
-#include "mx.h"
-#include "mh.h"
-#include "mbox.h"
-#include "copy.h"
-#include "buffy.h"
-#include "sort.h"
-#include "thread.h"
-#include "hcache.h"
-
-#include "lib/debug.h"
-
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/time.h>
#endif
+#include <lib-lib/mem.h>
+#include <lib-lib/str.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
+
+#include "mutt.h"
+#include "mx.h"
+#include "mh.h"
+#include "mbox.h"
+#include "copy.h"
+#include "buffy.h"
+#include "sort.h"
+#include "thread.h"
+#include "hcache.h"
+
struct maildir {
HEADER *h;
char *canon_fname;
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "charset.h"
#include "mutt_idna.h"
-#include "lib/debug.h"
-
/* The low-level interface we use. */
#ifndef HAVE_LIBIDN
# include "config.h"
#endif
+#include <errno.h>
+#include <netdb.h>
+#include <sasl/sasl.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+
#include <lib-lib/mem.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "account.h"
#include "mutt_sasl.h"
#include <lib-network/mutt_socket.h>
-#include "lib/debug.h"
-
-#include <errno.h>
-#include <netdb.h>
-#include <sasl/sasl.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-
static int getnameinfo_err (int ret)
{
int err;
# include "config.h"
#endif
+#include <string.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <time.h>
+#include <sys/types.h>
+#include <utime.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/buffer.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <lib-crypt/crypt.h>
-#include "lib/debug.h"
-
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-#include <sys/types.h>
-#include <utime.h>
-
#define SW (option(OPTMBOXPANE)?SidebarWidth:0)
BODY *mutt_new_body (void)
# include "config.h"
#endif
+#include <dirent.h>
+#include <fcntl.h>
+#include <sys/file.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <utime.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <lib-crypt/crypt.h>
#include "lib/list.h"
-#include "lib/debug.h"
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <sys/file.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <utime.h>
static list2_t* MailboxFormats = NULL;
#define MX_COMMAND(idx,cmd) ((mx_t*) MailboxFormats->data[idx])->cmd
#include <config.h>
#endif
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <libgen.h>
+#include <sys/stat.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "nntp.h"
#include "rfc1524.h"
-#include "lib/debug.h"
-
-#include <unistd.h>
-#include <string.h>
-#include <ctype.h>
-#include <stdlib.h>
-#include <libgen.h>
-#include <sys/stat.h>
-
void nntp_add_to_list (NNTP_SERVER * s, NNTP_DATA * d)
{
LIST *l;
#include <lib-lib/str.h>
#include <lib-lib/file.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <lib-crypt/crypt.h>
-#include "lib/debug.h"
#include <unistd.h>
#include <string.h>
# include "config.h"
#endif
+#include <wchar.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include <lib-ui/enter.h>
#include <lib-crypt/crypt.h>
#include "lib/rx.h"
-#include "lib/debug.h"
-
-#include <wchar.h>
-#include <sys/stat.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
#define ISHEADER(x) ((x) == MT_COLOR_HEADER || (x) == MT_COLOR_HDEFAULT)
# include "config.h"
#endif
+#include <string.h>
+#include <unistd.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/file.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include "pop.h"
#include <lib-crypt/crypt.h>
-#include "lib/debug.h"
-
-#include <string.h>
-#include <unistd.h>
-
/* write line to file */
static int fetch_message (char *line, void *file)
{
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-hash/hash.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "mx.h"
#include "pop.h"
-#include "lib/debug.h"
#include <string.h>
#include <unistd.h>
# include "config.h"
#endif
+#include <string.h>
+#include <unistd.h>
+#include <ctype.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "mx.h"
# include <lib-network/mutt_ssl.h>
#endif
-#include "lib/debug.h"
-
-#include <string.h>
-#include <unistd.h>
-#include <ctype.h>
-
/* given an POP mailbox name, return host, port, username and password */
int pop_parse_path (const char *path, ACCOUNT * acct)
{
# include "config.h"
#endif
+#include <ctype.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/stat.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <imap/imap.h>
#include <imap/mx_imap.h>
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/stat.h>
-
static struct mapping_t PostponeHelp[] = {
{N_("Exit"), OP_EXIT},
{N_("Del"), OP_DELETE},
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
#include <lib-lib/mapping.h>
+#include <lib-lib/debug.h>
#include <lib-ui/menu.h>
#include "mutt_idna.h"
#include "sort.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
typedef struct query {
address_t *addr;
char *name;
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <errno.h>
+#include <unistd.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include "mutt.h"
#include "rfc1524.h"
#include "attach.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <unistd.h>
-
/* The command semantics include the following:
* %s is the filename that contains the mail body data
* %t is the content type, like text/plain
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-ui/curses.h>
#include "state.h"
#include "lib.h"
-#include "lib/debug.h"
-
#define FLOWED_MAX 77
static int get_quote_level (char *line)
# include "config.h"
#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <dirent.h>
+#include <time.h>
+#include <sys/types.h>
+#include <utime.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/str.h>
#include <lib-lib/ascii.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include "url.h"
#include "attach.h"
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <dirent.h>
-#include <time.h>
-#include <sys/types.h>
-#include <utime.h>
-
#ifdef USE_NNTP
#include "nntp.h"
#endif
# include "config.h"
#endif
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <signal.h>
+#include <sys/wait.h>
+#include <fcntl.h>
+#include <sys/utsname.h>
+
#include <lib-lib/mem.h>
#include <lib-lib/ascii.h>
#include <lib-lib/str.h>
#include <lib-lib/macros.h>
#include <lib-lib/file.h>
+#include <lib-lib/debug.h>
#include <lib-mime/mime.h>
#include <lib-crypt/crypt.h>
#include "mutt_idna.h"
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <sys/wait.h>
-#include <fcntl.h>
-#include <sys/utsname.h>
-
#ifdef USE_LIBESMTP
# include "mutt_libesmtp.h"
#endif /* USE_LIBESMTP */
#include <stdlib.h>
#include <stdio.h>
+#include <lib-lib/debug.h>
+
#include "mutt.h"
#include "state.h"
#include "rfc3676.h"
-#include "lib/debug.h"
-
static void state_prefix_put (const char *d, size_t dlen, STATE * s)
{
if (s->prefix)