diff options
author | June McEnroe <june@causal.agency> | 2021-01-12 19:00:12 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2021-01-12 19:00:12 -0500 |
commit | 911b4761e465ec084acc7e14ca18dfe5e9b8a00a (patch) | |
tree | daf2217b99257682e651a25bb582d258da95a284 | |
parent | List both Makefile and html.sh under README.7 (diff) | |
download | src-911b4761e465ec084acc7e14ca18dfe5e9b8a00a.tar.gz src-911b4761e465ec084acc7e14ca18dfe5e9b8a00a.zip |
Split fields by tab only
Also don't fail hard on non-forward-search definitions.
-rw-r--r-- | bin/htagml.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/htagml.c b/bin/htagml.c index 6f2de596..670b74dd 100644 --- a/bin/htagml.c +++ b/bin/htagml.c @@ -90,12 +90,13 @@ int main(int argc, char *argv[]) { size_t bufCap = 0; while (0 < getline(&buf, &bufCap, file)) { char *line = buf; - char *tag = strsep(&line, "\t "); - char *file = strsep(&line, "\t "); + char *tag = strsep(&line, "\t"); + char *file = strsep(&line, "\t"); char *search = strsep(&line, "\n"); if (!tag || !file || !search) errx(EX_DATAERR, "malformed tags file"); if (search[0] != '/' || search[strlen(search)-1] != '/') { - errx(EX_DATAERR, "search is not forward regex: %s", search); + warnx("tag %s definition is not a forward search: %s", tag, search); + continue; } search++; search[strlen(search)-1] = '\0'; |