aboutsummaryrefslogtreecommitdiff
path: root/src/log.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/log.h')
-rw-r--r--src/log.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/log.h b/src/log.h
index 2e8167b..88c12a2 100644
--- a/src/log.h
+++ b/src/log.h
@@ -1,9 +1,12 @@
#ifndef SKHD_LOG_H
#define SKHD_LOG_H
-static bool verbose;
+#define internal static
+#define global static
-static inline void
+global bool verbose;
+
+internal inline void
debug(const char *format, ...)
{
if (!verbose) return;
@@ -14,7 +17,7 @@ debug(const char *format, ...)
va_end(args);
}
-static inline void
+internal inline void
warn(const char *format, ...)
{
va_list args;
@@ -23,7 +26,7 @@ warn(const char *format, ...)
va_end(args);
}
-static inline void
+internal inline void
error(const char *format, ...)
{
va_list args;
@@ -33,4 +36,7 @@ error(const char *format, ...)
exit(EXIT_FAILURE);
}
+#undef internal
+#undef global
+
#endif