From: Richard Russon Date: Sat, 5 May 2018 17:38:27 +0000 (+0100) Subject: restore LogList X-Git-Tag: neomutt-20180512~7^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb0704e0ee4ba1088b97687ae15001e466ab7860;p=neomutt restore LogList --- diff --git a/mutt/logging.c b/mutt/logging.c index 47fd2cc25..a9f390839 100644 --- a/mutt/logging.c +++ b/mutt/logging.c @@ -59,7 +59,7 @@ char *LogFileVersion = NULL; /**< Program version */ /** * LogQueue - In-memory list of log lines */ -static STAILQ_HEAD(, LogLine) LogQueue = STAILQ_HEAD_INITIALIZER(LogQueue); +static struct LogList LogQueue = STAILQ_HEAD_INITIALIZER(LogQueue); int LogQueueCount = 0; /**< Number of entries currently in the log queue */ int LogQueueMax = 0; /**< Maximum number of entries in the log queue */ diff --git a/mutt/logging.h b/mutt/logging.h index e64efab18..243939808 100644 --- a/mutt/logging.h +++ b/mutt/logging.h @@ -62,6 +62,14 @@ struct LogLine STAILQ_ENTRY(LogLine) entries; }; +/** + * struct LogList - A list of log lines + * + * The Log is stored as a STAILQ. + * This means that insertions are quick at the head and tail of the list. + */ +STAILQ_HEAD(LogList, LogLine); + #define mutt_debug(LEVEL, ...) MuttLogger(0, __FILE__, __LINE__, __func__, LEVEL, __VA_ARGS__) #define mutt_warning(...) MuttLogger(0, __FILE__, __LINE__, __func__, LL_WARNING, __VA_ARGS__) #define mutt_message(...) MuttLogger(0, __FILE__, __LINE__, __func__, LL_MESSAGE, __VA_ARGS__)