Mercurial > hg > fxanalyse
view logging.h @ 268:ec4462c7f8b7
Extensive cleanup of beatnote specific variables
Reorganize the beatnote specific variables in arrays indexed by the
beatnote enum constants LO, HG, SR. Also reorganize DDS frequency
related variables in arrays indexed by the DDS channel number.
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Thu, 09 Jul 2015 23:11:00 +0200 |
parents | d948e3ced2b9 |
children |
line wrap: on
line source
#ifndef __LOGGING_H__ #define __LOGGING_H__ /* required for the user interface defines */ #include "FXAnalyse.h" #include "utils.h" struct logger *__logger; /* an ERROR macro is defined in `WinGDI.h` which is included * by some other header file included before this. to be on * the safe side we define the enum lable to the same value */ #undef ERROR enum loglevel { ERROR = 0, WARNING, INFO, DEBUG, }; struct logger * __logger_init(void(*onerror)(int, const char *)); void __logmessage(struct logger *l, enum loglevel level, const char *frmt, ...); void __logger_panel_visible(struct logger *l, int visible); #define logger_init(onerror) do { __logger = __logger_init(onerror); } while (0) #define logmessage(level, msg, ...) __logmessage(__logger, (level), (msg), ##__VA_ARGS__) #define logmsg(msg, ...) __logmessage(__logger, INFO, msg, ##__VA_ARGS__) #define logger_panel_visible(visible) __logger_panel_visible(__logger, visible) #endif