diff options
author | Sami Kerola | 2013-08-17 20:15:11 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-23 10:58:48 +0200 |
commit | ada6c48f0609edd0c04836370228485a6b1859a0 (patch) | |
tree | d99e85dcb7cce48061f75384ada2eb344bb8b4a8 /term-utils | |
parent | docs: add long options to last.1 manual page (diff) | |
download | kernel-qcow2-util-linux-ada6c48f0609edd0c04836370228485a6b1859a0.tar.gz kernel-qcow2-util-linux-ada6c48f0609edd0c04836370228485a6b1859a0.tar.xz kernel-qcow2-util-linux-ada6c48f0609edd0c04836370228485a6b1859a0.zip |
include: carefulput: print determined char when unprintable char is found
This is done to allow reuse of the functin in last(1).
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/wall.c | 2 | ||||
-rw-r--r-- | term-utils/write.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c index f0940732e..2d87e47db 100644 --- a/term-utils/wall.c +++ b/term-utils/wall.c @@ -286,7 +286,7 @@ static char *makemsg(char *fname, char **mvec, int mvecsz, cnt = 0; } if (ch != '\n') - carefulputc(ch, fp); + carefulputc(ch, fp, '^'); } } } diff --git a/term-utils/write.c b/term-utils/write.c index 83937d3b3..cb3b0444d 100644 --- a/term-utils/write.c +++ b/term-utils/write.c @@ -372,7 +372,7 @@ void wr_fputs(char *s) { char c; -#define PUTC(c) if (carefulputc(c, stdout) == EOF) \ +#define PUTC(c) if (carefulputc(c, stdout, '^') == EOF) \ err(EXIT_FAILURE, _("carefulputc failed")); while (*s) { c = *s++; |