diff options
| -rw-r--r-- | utils.c | 9 | ||||
| -rw-r--r-- | utils.h | 6 |
2 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,9 @@ +#include "utils.h" + +#include <stdlib.h> +#include <string.h> + +int is_debug() { + char* env = getenv("DEBUG"); + return env && (strcmp(env, "true") == 0 || strcmp(env, "1") == 0); +} @@ -0,0 +1,6 @@ +#ifndef SF_UTILS_H +#define SF_UTILS_H + +int is_debug(); + +#endif /* SF_UTILS_H */ |
