From dd7b17e70491982459c4f40e6123e3e3f246975a Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 21 Jul 2013 18:39:21 +0000 Subject: [PATCH] simplify --- tree.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tree.c b/tree.c index c7ede04..e9adbe8 100644 --- a/tree.c +++ b/tree.c @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.69 2013/05/02 21:59:54 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.70 2013/07/21 18:39:21 tg Exp $"); #define INDENT 8 @@ -259,16 +259,20 @@ pioact(struct shf *shf, struct ioword *iop) switch (type) { case IOREAD: - shf_puts("<", shf); + shf_putc('<', shf); break; case IOHERE: - shf_puts(flag & IOSKIP ? "<<-" : "<<", shf); + shf_puts("<<", shf); + if (flag & IOSKIP) + shf_putc('-', shf); break; case IOCAT: shf_puts(">>", shf); break; case IOWRITE: - shf_puts(flag & IOCLOB ? ">|" : ">", shf); + shf_putc('>', shf); + if (flag & IOCLOB) + shf_putc('|', shf); break; case IORDWR: shf_puts("<>", shf);