index — thing @ c22bd9162458c266000fdaaeb09a716dde1bac92

A little something I'm working on

wip
crispy-caesus crispy@crispy-caesus.eu
Wed, 09 Sep 2026 22:14:35 +0200
commit

c22bd9162458c266000fdaaeb09a716dde1bac92

parent

5cfe7bd91b206d1f023d0bbcf40490d1fe3ead9f

1 files changed, 5 insertions(+), 5 deletions(-)

jump to
M thing/src/thing.cthing/src/thing.c

@@ -1,10 +1,10 @@

-#include <stdio.h> -#include <termios.h> - #include <libthingterm/menu.h> #include <libthingterm/term.h> -int main() { +#include <stdio.h> +#include <termios.h> + +int main(void) { uint8_t ret = 0; struct termios old_term; setup_term(&old_term);

@@ -13,7 +13,7 @@ static char *elements[] = {"hi", "hello", "what's up", "dang",

"this is cool"}; int seli = menu(elements, 5); - if (seli < 0) { + if (seli < -1) { // -1 means program was quit printf("ERROR: menu failed"); ret = 1; }