main: header I guess
crispy-caesus crispy@crispy-caesus.eu
Thu, 06 Aug 2026 09:09:18 +0200
M
main.c
→
main.c
@@ -1,9 +1,4 @@
-#include <stdint.h> -#include <stdio.h> - -#include <poll.h> -#include <termios.h> -#include <unistd.h> +#include "main.h" void move_cursor(int direction, uint8_t *pos, int len) { if (direction == -1) {@@ -78,7 +73,7 @@ else if (buffer[i] == 'j') {
move_cursor(1, &pos, len); } else if (buffer[i] == 'k') { move_cursor(-1, &pos, len); - } else if (buffer[i] == 'o') { + } else if (buffer[i] == '\n') { return pos; } }
A
main.h
@@ -0,0 +1,6 @@
+#include <stdint.h> +#include <stdio.h> + +#include <poll.h> +#include <termios.h> +#include <unistd.h>