diff options
Diffstat (limited to 'inc')
-rw-r--r-- | inc/log.h | 12 | ||||
-rw-r--r-- | inc/term.h | 2 |
2 files changed, 12 insertions, 2 deletions
@@ -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 @@ -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 |