summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--chat.h1
-rw-r--r--term.c2
-rw-r--r--ui.c9
3 files changed, 7 insertions, 5 deletions
diff --git a/chat.h b/chat.h
index eaecb50..1deb693 100644
--- a/chat.h
+++ b/chat.h
@@ -30,6 +30,7 @@
 #define err(...) do { uiHide(); err(__VA_ARGS__); } while (0)
 #define errx(...) do { uiHide(); errx(__VA_ARGS__); } while (0)
 
+typedef unsigned uint;
 typedef unsigned char byte;
 
 struct {
diff --git a/term.c b/term.c
index 2be9c16..75380ea 100644
--- a/term.c
+++ b/term.c
@@ -51,7 +51,7 @@ void termMode(enum TermMode mode, bool set) {
 enum { Esc = '\33' };
 
 enum TermEvent termEvent(char ch) {
-	static int state = 0;
+	static uint state = 0;
 	switch (T(state, ch)) {
 		case T(0, Esc): state = 1; return 0;
 		case T(1, '['): state = 2; return 0;
diff --git a/ui.c b/ui.c
index 9ffe8ad..e437ef9 100644
--- a/ui.c
+++ b/ui.c
@@ -68,8 +68,9 @@ static short pair8(short pair) {
 struct View {
 	struct Tag tag;
 	WINDOW *log;
-	int scroll, unread;
+	int scroll;
 	bool hot, mark;
+	uint unread;
 	struct View *prev;
 	struct View *next;
 };
@@ -227,7 +228,7 @@ static void uiTitle(const struct View *view) {
 	int unread;
 	char *str;
 	int len = asprintf(
-		&str, "%s%n (%d)", view->tag.name, &unread, view->unread
+		&str, "%s%n (%u)", view->tag.name, &unread, view->unread
 	);
 	if (len < 0) err(EX_OSERR, "asprintf");
 	if (!view->unread) str[unread] = '\0';
@@ -244,7 +245,7 @@ static void uiStatus(void) {
 		int unread;
 		wchar_t *str;
 		int len = aswprintf(
-			&str, L"%c %d %s %n(\3%02d%d\3) ",
+			&str, L"%c %d %s %n(\3%02d%u\3) ",
 			(view == ui.view ? IRCReverse : IRCReset),
 			num, view->tag.name,
 			&unread, (view->hot ? IRCYellow : IRCDefault), view->unread
@@ -274,7 +275,7 @@ static void viewRemove(struct View *view) {
 	views.tags[view->tag.id] = NULL;
 }
 
-static const int LogLines = 256;
+static const int LogLines = 512;
 
 static struct View *viewTag(struct Tag tag) {
 	struct View *view = views.tags[tag.id];
> 2024-09-19Add photos from September 5June McEnroe Had to prefix the folder number onto these file names manually because they must have come out of a different scanner or something. 2024-09-15Add some more film stocks to the listJune McEnroe 2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe This seems easier to visually scan. The only other thing I'd like is a nicer date rendering but JavaScript is useless for that. 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe