summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2022-06-03 11:03:24 -0400
committerJune McEnroe <june@causal.agency>2022-06-03 11:03:24 -0400
commit4d03059127f70e5ef0e8593386649a723c534612 (patch)
treef2b6e7350d670d17d46d8227e37d4741acc1c8de
parentStop polling stdin after EOF (diff)
downloadsrc-4d03059127f70e5ef0e8593386649a723c534612.tar.gz
src-4d03059127f70e5ef0e8593386649a723c534612.zip
Set line number on File lines
-rw-r--r--bin/qf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/qf.c b/bin/qf.c
index aac44fa5..ba20483d 100644
--- a/bin/qf.c
+++ b/bin/qf.c
@@ -68,6 +68,8 @@ static void parse(struct Line line) {
 		push(line);
 		return;
 	}
+	char *rest;
+	line.nr = strtoul(line.text, &rest, 10);
 	struct Line prev = {0};
 	if (lines.len) prev = lines.ptr[lines.len-1];
 	if (!prev.path || strcmp(line.path, prev.path)) {
@@ -75,8 +77,6 @@ static void parse(struct Line line) {
 		line.type = File;
 		push(line);
 	}
-	char *rest;
-	line.nr = strtoul(line.text, &rest, 10);
 	if (rest > line.text && rest[0] == ':') {
 		line.type = Match;
 		line.text = &rest[1];
'2020-02-22 01:48:07 -0500'>2020-02-22Add See Ya LaterJune McEnroe 2020-02-20Remove wiki scriptJune McEnroe 2020-02-19Add The Obelisk GateJune McEnroe 2020-02-17Add Four Tet — HandsJune McEnroe 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe 2020-01-28Change scout sensitivity to 1.4June McEnroe 2020-01-28Import shows.txtJune McEnroe