diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-10-21 21:13:13 -0300 |
---|---|---|
committer | Harry Jeffery <harry@exec64.co.uk> | 2020-11-16 22:11:32 +0000 |
commit | 6cb2b8495f0da310acf8779db47a3317e9c54707 (patch) | |
tree | d5c6d2be3ea1ebffea3768c4ada3e10f2dac016a /src | |
parent | ac331f12fa85d4a50da17fe263205abb64a6ec69 (diff) | |
download | imv-6cb2b8495f0da310acf8779db47a3317e9c54707.tar.gz |
imv: fix stdin prompt and use fputs.
Add newline to the prompt for reading paths from stdin.
Since string formatting isn't being used, it's possible to use fputs()
directly in the logging callback in imv.c.
Diffstat (limited to 'src')
-rw-r--r-- | src/imv.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -508,7 +508,7 @@ static void log_to_stderr(enum imv_log_level level, const char *text, void *data { (void)data; if (level >= IMV_INFO) { - fprintf(stderr, "%s", text); + fputs(text, stderr); } } @@ -740,7 +740,7 @@ static void *load_paths_from_stdin(void *data) { struct imv *imv = data; - imv_log(IMV_INFO, "Reading paths from stdin..."); + imv_log(IMV_INFO, "Reading paths from stdin...\n"); char buf[PATH_MAX]; while (fgets(buf, sizeof(buf), stdin) != NULL) { |