aboutsummaryrefslogtreecommitdiff
path: root/toys/pending
diff options
context:
space:
mode:
Diffstat (limited to 'toys/pending')
-rw-r--r--toys/pending/sed.c7
1 files 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");