. make sed understand \t

. install it in /bin, where minix rc expects it
This commit is contained in:
Ben Gras 2010-06-22 15:28:07 +00:00
parent ad1f2f2d78
commit ac6e455f16
2 changed files with 6 additions and 0 deletions

View file

@ -6,4 +6,6 @@
PROG= sed PROG= sed
SRCS= compile.c main.c misc.c process.c SRCS= compile.c main.c misc.c process.c
BINDIR=/bin
.include <minix.prog.mk> .include <minix.prog.mk>

View file

@ -404,6 +404,10 @@ compile_delimited(char *p, char *d)
*d++ = '\n'; *d++ = '\n';
p += 2; p += 2;
continue; continue;
} else if (*p == '\\' && p[1] == 't') {
*d++ = '\t';
p += 2;
continue;
} else if (*p == '\\' && p[1] == '\\') } else if (*p == '\\' && p[1] == '\\')
*d++ = *p++; *d++ = *p++;
else if (*p == c) { else if (*p == c) {