diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/bltin/printf.c | 11 |
2 files changed, 3 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog index ece6518..a8def74 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2005-11-13 Herbert Xu <herbert@gondor.apana.org.au> * Remove unnecessary truncation in _STPUTC. + * Always call conv_escape_str in echocmd. 2005-11-04 Herbert Xu <herbert@gondor.apana.org.au> diff --git a/src/bltin/printf.c b/src/bltin/printf.c index fc73dfb..ef9b2b4 100644 --- a/src/bltin/printf.c +++ b/src/bltin/printf.c @@ -445,16 +445,10 @@ echocmd(int argc, char **argv) do { char c; - c = *(*argv)++; - if (!c) - goto next; - if (c != '\\') - goto print; - - outstr(conv_escape_str(*argv - 1), outs); + outstr(conv_escape_str(*argv), outs); if (rval & 0x100) break; -next: + c = ' '; if (!*++argv) { end: @@ -463,7 +457,6 @@ end: } c = '\n'; } -print: outc(c, outs); } while (*argv); return 0; |