From: Richard Jones Date: Wed, 3 Feb 2010 17:50:51 +0000 (+0000) Subject: hivexsh: Only print final \n when interactive. X-Git-Tag: 1.1.0~36 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=4d71ca54291fedf5fb83370150fc5eb697950667;p=hivex.git hivexsh: Only print final \n when interactive. When hivexsh was called non-interactively, it would print an annoying extra line. Only print this line if we are being used interactively. --- diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index d7d00bb..847954c 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -146,7 +146,8 @@ main (int argc, char *argv[]) char *buf = rl_gets (prompt_string); if (!buf) { quit = 1; - printf ("\n"); + if (is_tty) + printf ("\n"); break; }