commit 728a3edf800b57d4f944da32d1a2e8865f7c0d4e
parent 82f2d105dc0851215e3cc279330a5a2802ed6d9c
Author: citbl <citbl@citbl.org>
Date: Fri, 10 Oct 2025 21:00:53 +1000
clean up unecessary dependencies, minor refac
Diffstat:
6 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/db.c b/db.c
@@ -3,7 +3,6 @@
#include <stdio.h>
#include <string.h>
#include <sqlite3.h>
-#include <sys/param.h>
#include "db.h"
#include "utils.h"
diff --git a/feeds.c b/feeds.c
@@ -4,7 +4,6 @@
#include <mrss.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/param.h>
#include "config.h"
#include "utils.h"
diff --git a/keys.c b/keys.c
@@ -1,4 +1,3 @@
-#include <sys/param.h>
#include "config.h"
#include "db.h"
diff --git a/render.c b/render.c
@@ -1,4 +1,3 @@
-#include <sys/param.h>
#include "termbox2.h"
#include "tui.h"
diff --git a/utils.c b/utils.c
@@ -1,6 +1,5 @@
#include <stdio.h>
#include <strings.h>
-#include <stdbool.h>
#include <errno.h>
#include <stdarg.h>
@@ -192,15 +191,15 @@ void
remove_all_tags(char* str)
{
char *pr = str, *pw = str;
- bool in_tag = false;
+ int in_tag = 0;
while (*pr) {
if (*pr == '<') {
- in_tag = true;
+ in_tag = 1;
pr++;
continue;
} else if (*pr == '>') {
- in_tag = false;
+ in_tag = 0;
pr++;
continue;
}
diff --git a/utils.h b/utils.h
@@ -2,6 +2,9 @@
#include <stdlib.h>
+#define MIN(A, B) ((A) < (B) ? (A) : (B))
+#define MAX(A, B) ((A) > (B) ? (A) : (B))
+
void panic(const char*, ...);
const char* get_home_dir(void);
const char* expand_tilde(const char*);