diff options
author | powwow@askgustav.com <powwow@askgustav.com> | 2020-05-23 09:29:22 (GMT) |
---|---|---|
committer | powwow@askgustav.com <powwow@askgustav.com> | 2020-05-23 09:29:22 (GMT) |
commit | 27595ac18f2c19e4cbfabb4fe2638e72366fd6cb (patch) | |
tree | d40d673421f2b069078d187ea8df8e644c1f079d | |
parent | df019a5895f7dd2d895c9a08503ce15965196e91 (diff) | |
download | powwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.zip powwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.tar.gz powwow-27595ac18f2c19e4cbfabb4fe2638e72366fd6cb.tar.bz2 |
minor beautifications
-rw-r--r-- | src/log.c | 7 | ||||
-rw-r--r-- | src/log.h | 2 |
2 files changed, 4 insertions, 5 deletions
@@ -159,7 +159,7 @@ void log_resize(int newsize) /* * add a single line to the buffer */ -static void log_writeline(char *line, int len, int kind, long msecs) +static void log_writeline(const char *line, int len, int kind, long msecs) { int dst; @@ -193,7 +193,7 @@ static void log_writeline(char *line, int len, int kind, long msecs) /* * write to #capture / #movie buffer */ -void log_write(char *str, int len, int newline) +void log_write(const char *str, int len, int newline) { char *next; long diff; @@ -228,8 +228,7 @@ void log_write(char *str, int len, int newline) if (capturefile) { fwrite(str, 1, i, capturefile); if (newline) { - const char nl[1] = "\n"; - fwrite(nl, 1, 1, capturefile); + fputc('\n', capturefile); newline = 0; } } @@ -12,7 +12,7 @@ void log_clearsleep(void); void log_flush(void); int log_getsize(void); void log_resize(int newsize); -void log_write(char *str, int len, int newline); +void log_write(const char *str, int len, int newline); void reprint_writeline(char *line); char *reprint_getline(void); |