diff options
author | David Phillips <david@sighup.nz> | 2019-03-03 16:40:09 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-03-03 16:40:09 +1300 |
commit | b3ece5a5554a242522799864ef4714513d4bcf97 (patch) | |
tree | 985c0f38e0566637eaa07f1fb010fb6da142d5d9 /common.h | |
parent | 179b04f1d6c46d27747dfb857dbaec6ed8342ca2 (diff) | |
download | paramano-b3ece5a5554a242522799864ef4714513d4bcf97.tar.xz |
Re-add debug macro, short circuit icon logic
Diffstat (limited to 'common.h')
-rw-r--r-- | common.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -12,5 +12,17 @@ int get_int(const char* string); #define STR_LINE STRING(__LINE__) /* </ew> */ -#define info(...) printf("INFO: "__FILE__":"STR_LINE" --- "__VA_ARGS__) +#define info(format, ...) printf("INFO : "__FILE__"@%s():"STR_LINE": "format, __func__ __VA_OPT__(,) __VA_ARGS__) + +#ifdef DEBUG +#define debug(format, ...) fprintf(stderr, "DEBUG: "__FILE__"@%s():"STR_LINE": "format, __func__ __VA_OPT__(,) __VA_ARGS__) +#else +#define debug(...) +#endif + +#define debug_entry() debug("entry\n") +#define debug_exit() debug("exit\n") + #define FILE_PATH_SIZE 2048 +#define CPU_TRAY_UPDATE_INTERVAL 2000 +#define BAT_TRAY_UPDATE_INTERVAL 10000 |