]> Zhao Yanbai Git Server - minix.git/commitdiff
. make sed understand \t
authorBen Gras <ben@minix3.org>
Tue, 22 Jun 2010 15:28:07 +0000 (15:28 +0000)
committerBen Gras <ben@minix3.org>
Tue, 22 Jun 2010 15:28:07 +0000 (15:28 +0000)
 . install it in /bin, where minix rc expects it

commands/sed/Makefile
commands/sed/compile.c

index 53b7bf42e7ec163bb403de119fa41075595f6005..0addb8171f862c1451a9ffac0990947ce5a8f4dd 100644 (file)
@@ -6,4 +6,6 @@
 PROG=  sed
 SRCS=  compile.c main.c misc.c process.c
 
+BINDIR=/bin
+
 .include <minix.prog.mk>
index e41be08560153b2dc4820de25ef5ce0bfdf4bbf2..6c8aad65ba81650326aefc2fb408a1ca08325572 100644 (file)
@@ -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) {