aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/log.h12
-rw-r--r--inc/term.h2
2 files changed, 12 insertions, 2 deletions
diff --git a/inc/log.h b/inc/log.h
index 846b4f5..079e189 100644
--- a/inc/log.h
+++ b/inc/log.h
@@ -4,8 +4,18 @@
#ifndef CALM_LOG_H
#define CALM_LOG_H
-void debug(const char *format, ...);
+#define HASH_MASK 0xffff
+
+void _debug(const char *format, ...);
void debug_enable(int enable);
void fatal(const char *format, ...) __attribute__((noreturn));
+/* #define debug(...) \ */
+/* do { \ */
+/* _debug("%s:%d: %s:\n", __FILE__, __LINE__, __func__); \ */
+/* _debug(__VA_ARGS__); \ */
+/* } while (0) */
+
+#define debug(...) _debug(__VA_ARGS__)
+
#endif
diff --git a/inc/term.h b/inc/term.h
index 0e5902d..d8637cc 100644
--- a/inc/term.h
+++ b/inc/term.h
@@ -49,6 +49,6 @@ void term_refer(struct term *term, size_t depth);
char term_deref_head(struct term *term, char destroy_parents);
char term_deref(struct term *term, char destroy_parents);
-void term_print(struct term *term);
+size_t term_print(struct term *term);
#endif