From 6a23dd6667cba9e8cff7f27e7fd02a2a8752cf2b Mon Sep 17 00:00:00 2001 From: Sheldon Lee Date: Mon, 6 Jul 2020 00:56:29 +0100 Subject: [PATCH] Can now log without new line. --- log.c | 6 ++++++ log.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/log.c b/log.c index e5b3885..9efa131 100644 --- a/log.c +++ b/log.c @@ -9,6 +9,12 @@ void startLog(char* filename) file = fopen(filename, "w"); } +void logString(char* string) +{ + if (!file) return; + fputs(string, file); +} + void logLine(char* string) { if (!file) return; diff --git a/log.h b/log.h index 1ad1339..e6e9d64 100644 --- a/log.h +++ b/log.h @@ -3,6 +3,8 @@ void startLog(char* filename); +void logString(char* string); + void logLine(char* string); void endLog();