summary refs log tree commit diff
path: root/events.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-12 14:12:53 -0400
committerJune McEnroe <june@causal.agency>2020-07-12 14:12:53 -0400
commit858d2cd9be35a5f6c051b37bfb2a02e920a888b4 (patch)
tree001cc4d79cd13a1f73fd79c9744719303d8b0662 /events.c
parentAlways show later messages link when using before query (diff)
downloadscooper-858d2cd9be35a5f6c051b37bfb2a02e920a888b4.tar.gz
scooper-858d2cd9be35a5f6c051b37bfb2a02e920a888b4.zip
Use X macro for statements
Diffstat (limited to '')
-rw-r--r--events.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/events.c b/events.c
index 0604d21..423ce1e 100644
--- a/events.c
+++ b/events.c
@@ -159,13 +159,13 @@ enum kcgi_err eventsPage(struct kreq *req) {
 		|| khtml_elem(&html, KELEM_TABLE);
 	if (error) return error;
 
-	sqlite3_reset(stmt.eventsTopic);
-	dbBindText(stmt.eventsTopic, ":network", scope.network);
-	dbBindText(stmt.eventsTopic, ":context", scope.context);
-	dbBindText(stmt.eventsTopic, ":time", time);
-	dbBindInt(stmt.eventsTopic, ":public", contextsPublic);
+	sqlite3_reset(stmt.topic);
+	dbBindText(stmt.topic, ":network", scope.network);
+	dbBindText(stmt.topic, ":context", scope.context);
+	dbBindText(stmt.topic, ":time", time);
+	dbBindInt(stmt.topic, ":public", contextsPublic);
 
-	int result = sqlite3_step(stmt.eventsTopic);
+	int result = sqlite3_step(stmt.topic);
 	if (result == SQLITE_ROW) {
 		error = 0
 			|| khtml_elem(&html, KELEM_THEAD)
@@ -176,10 +176,10 @@ enum kcgi_err eventsPage(struct kreq *req) {
 				KATTR_COLSPAN, "3",
 				KATTR__MAX
 			)
-			|| khtml_puts(&html, sqlite3_column_text(stmt.eventsTopic, 0))
+			|| khtml_puts(&html, sqlite3_column_text(stmt.topic, 0))
 			|| khtml_closeelem(&html, 3);
 		if (error) return error;
-		result = sqlite3_step(stmt.eventsTopic);
+		result = sqlite3_step(stmt.topic);
 	}
 	if (result != SQLITE_DONE) errx(EX_SOFTWARE, "%s", sqlite3_errmsg(db));
 
niper.cfg?id=2ea748d390bb6884ef12e57d45013ed7f39757ed&follow=1'>Use sensitivity aliases in TF2June McEnroe 2019-09-16Add The Just CityJune McEnroe 2019-09-12Only GET the final redirect locationJune McEnroe 2019-09-12Consume entire bodyJune McEnroe Aborting the request and leaving data around may be causing intermittent errors. Just discard the rest of the data. 2019-09-10Add title -v flagJune McEnroe 2019-09-10Use curl error bufferJune McEnroe 2019-09-10Set Accept-Encoding in titleJune McEnroe Because apparently it's fine for servers to respond with Content-Encoding you didn't ask for, and curl won't decode it if you didn't ask for it. 2019-09-08Set title User-AgentJune McEnroe Some things don't like you if you don't send one. 2019-09-07Add -x flag to titleJune McEnroe 2019-09-07Ignore SIGPIPE in relayJune McEnroe Allows restarting consumers safely. 2019-09-07Add A Memory Called EmpireJune McEnroe 2019-09-05Handle lack of Content-TypeJune McEnroe 2019-09-05Use CURLINFO_CONTENT_TYPEJune McEnroe Oops, didn't see this. 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