From 4bd6bb0f36f1e234a6aa8f1cd3d2660c9888b838 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Tue, 12 Jan 2021 19:00:12 -0500 Subject: Split fields by tab only Also don't fail hard on non-forward-search definitions. --- bin/htagml.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/htagml.c b/bin/htagml.c index 22d921a4..8cc2272c 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'; -- cgit 1.4.1 main.c?follow=1'>log tree commit diff
path: root/bin/1sh/main.c (unfollow)
Commit message (Expand)Author
2019-09-12Only GET the final redirect locationJune McEnroe
2019-09-12Consume entire bodyJune McEnroe
2019-09-10Add title -v flagJune McEnroe
2019-09-10Use curl error bufferJune McEnroe
2019-09-10Set Accept-Encoding in titleJune McEnroe
2019-09-08Set title User-AgentJune McEnroe
2019-09-07Add -x flag to titleJune McEnroe
2019-09-07Ignore SIGPIPE in relayJune McEnroe
2019-09-07Add A Memory Called EmpireJune McEnroe
2019-09-05Handle lack of Content-TypeJune McEnroe
2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe
2019-09-05Decode entities in titlesJune McEnroe
2019-09-05Print title as soon as it's availableJune McEnroe
2019-09-05Use CURL_PREFIX to set flagsJune McEnroe
2019-09-05Add titleJune McEnroe
2019-09-04Add Avorter n'est pas tuerJune McEnroe
2019-08-29Unset executable on shell scriptsJune McEnroe
2019-08-29Add long-missing setopt to bin.7June McEnroe
2019-08-29Add editJune McEnroe