readr

Minimal RSS reader (WIP)
Log | Files | Refs | README | LICENSE

commit 6d8da3f0f639ddbd4d0b5719827447468bbe449e
parent dfe1e326ed425a5c7fa2794d5b757f11f09e065d
Author: citbl <citbl@citbl.org>
Date:   Fri, 10 Oct 2025 21:00:53 +1000

clean up unecessary dependencies, minor refac

Diffstat:
Mdb.c | 1-
Mfeeds.c | 1-
Mkeys.c | 1-
Mrender.c | 1-
Mutils.c | 7+++----
Mutils.h | 3+++
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*);