From: Ben Gras Date: Tue, 22 Jun 2010 15:28:07 +0000 (+0000) Subject: . make sed understand \t X-Git-Tag: v3.1.8~401 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/style.css?a=commitdiff_plain;h=ac6e455f16099031f630cb5754f4594c6aeec950;p=minix.git . make sed understand \t . install it in /bin, where minix rc expects it --- diff --git a/commands/sed/Makefile b/commands/sed/Makefile index 53b7bf42e..0addb8171 100644 --- a/commands/sed/Makefile +++ b/commands/sed/Makefile @@ -6,4 +6,6 @@ PROG= sed SRCS= compile.c main.c misc.c process.c +BINDIR=/bin + .include diff --git a/commands/sed/compile.c b/commands/sed/compile.c index e41be0856..6c8aad65b 100644 --- a/commands/sed/compile.c +++ b/commands/sed/compile.c @@ -404,6 +404,10 @@ compile_delimited(char *p, char *d) *d++ = '\n'; p += 2; continue; + } else if (*p == '\\' && p[1] == 't') { + *d++ = '\t'; + p += 2; + continue; } else if (*p == '\\' && p[1] == '\\') *d++ = *p++; else if (*p == c) {