From: Kees van Reeuwijk Date: Fri, 12 Mar 2010 09:58:44 +0000 (+0000) Subject: Let the commands/simple/tr.c understand about '\t', '\r', and '\n'. X-Git-Tag: v3.1.7~238 X-Git-Url: http://zhaoyanbai.com/repos/man.dnssec-dsfromkey.html?a=commitdiff_plain;h=3efbb8f133410eb3e01caf5bd812292d598d190d;p=minix.git Let the commands/simple/tr.c understand about '\t', '\r', and '\n'. --- diff --git a/commands/simple/tr.c b/commands/simple/tr.c index 3f013418a..c7adcb3be 100644 --- a/commands/simple/tr.c +++ b/commands/simple/tr.c @@ -169,6 +169,15 @@ register unsigned char *buffer; i++; } while (i < 4 && *arg >= '0' && *arg <= '7'); *buffer++ = ac; + } else if( *arg == 't' ){ + arg++; + *buffer++ = '\t'; + } else if( *arg == 'r' ){ + arg++; + *buffer++ = '\r'; + } else if( *arg == 'n' ){ + arg++; + *buffer++ = '\n'; } else if (*arg != '\0') *buffer++ = *arg++; } else if (*arg == '[') {