diff options
Diffstat (limited to 'src/log.c')
| -rw-r--r-- | src/log.c | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -4,8 +4,8 @@ #include <stdbool.h> #include <stdlib.h> -int log_active; -FILE *log_file; +static int log_active; +static FILE *log_file; void log_init(void) @@ -24,6 +24,15 @@ log_init(void) } void +log_deinit(void) +{ + if (!log_active) return; + + fclose(log_file); + log_active = 0; +} + +void log_info(const char *fmtstr, ...) { va_list ap; @@ -37,12 +46,3 @@ log_info(const char *fmtstr, ...) fflush(log_file); } -void -log_end(void) -{ - if (!log_active) return; - - fclose(log_file); - log_active = 0; -} - |
