aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'common.h')
-rw-r--r--common.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/common.h b/common.h
index ff8c8a8..6b2e92d 100644
--- a/common.h
+++ b/common.h
@@ -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