From ef7141856b222b70b83c8e64c37b99cc0f6475a9 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Mon, 24 Oct 2016 23:36:52 +0100 Subject: [PATCH] Replace putc() with putchar(). Others already existed. Not being a macro probably won't hurt. --- uip/fmtdump.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/uip/fmtdump.c b/uip/fmtdump.c index 594a4614..a3eec405 100644 --- a/uip/fmtdump.c +++ b/uip/fmtdump.c @@ -492,10 +492,10 @@ static void litputs(char *s) { if (s) { - putc('"', stdout); + putchar('"'); while (*s) litputc(*s++); - putc('"', stdout); + putchar('"'); } else fputs("", stdout); } @@ -504,30 +504,30 @@ static void litputc(char c) { if (c & ~ 0177) { - putc('M', stdout); - putc('-', stdout); + putchar('M'); + putchar('-'); c &= 0177; } if (c < 0x20 || c == 0177) { if (c == '\b') { - putc('\\', stdout); - putc('b', stdout); + putchar('\\'); + putchar('b'); } else if (c == '\f') { - putc('\\', stdout); - putc('f', stdout); + putchar('\\'); + putchar('f'); } else if (c == '\n') { - putc('\\', stdout); - putc('n', stdout); + putchar('\\'); + putchar('n'); } else if (c == '\r') { - putc('\\', stdout); - putc('r', stdout); + putchar('\\'); + putchar('r'); } else if (c == '\t') { - putc('\\', stdout); - putc('t', stdout); + putchar('\\'); + putchar('t'); } else { - putc('^', stdout); - putc(c ^ 0x40, stdout); /* DEL to ?, others to alpha */ + putchar('^'); + putchar(c ^ 0x40); /* DEL to ?, others to alpha */ } } else - putc(c, stdout); + putchar(c); } -- 2.56.0