From 76ea44a623ba186a3c4662d54b71b60b358ae0ad Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 13 Dec 2014 12:27:51 -0600 Subject: Last sed bugfix broke 'b', fix it. --- toys/pending/sed.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toys/pending/sed.c b/toys/pending/sed.c index 623307cc..0b8c272a 100644 --- a/toys/pending/sed.c +++ b/toys/pending/sed.c @@ -588,7 +588,7 @@ writenow: } else if (c=='=') { sprintf(toybuf, "%ld", TT.count); emit(toybuf, strlen(toybuf), 1); - } else if (!strchr(":{}", c)) error_exit("todo: %c", c); + } logrus = logrus->next; } @@ -895,7 +895,10 @@ writenow: // Trim whitespace from "b ;" and ": blah " but only first space in "w x " - while (isspace(*line) && !*line == '\n') line++; + while (isspace(*line)) { + if (!strchr("btT", c) || *line != '\n') line++; + else break; + } append: class = !strchr("btT:", c); end = strcspn(line, class ? "\n" : "; \t\r\n\v\f"); -- cgit v1.2.3