toolbox pour des tui - retour accueil
git clone git://bebou.netlib.re/tuit
Log | Files | Refs |
commit e73a3002c5aa3e7ee2aaacff5902f50c9a2c90d6 parent f2c5ab71f2bf7e97fefd8d187d94e44db3807beb Auteurice: Arthur Pons <arthur.pons@unistra.fr> Date: Wed, 11 Jun 2025 15:34:16 +0200 Boucle infinie, retrait de stdbool Diffstat:
M | choose.c | | | 6 | +----- |
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/choose.c b/choose.c @@ -2,7 +2,6 @@ #include "termbox2.h" #include <stdio.h> #include <stdlib.h> -#include <stdbool.h> /* Le chiffre c'est des octets. Les caractères sont encodés sur un octet chacun ? * Donc si on met 5 la taille max serait 4 caractères ? */ @@ -23,14 +22,12 @@ int main(int argc, char **argv) { count++; } - bool quit=false; - tb_init(); tb_hide_cursor(); tb_set_input_mode(TB_INPUT_ESC | TB_INPUT_MOUSE); struct tb_event ev; - while(!quit) { + while(1) { tb_clear(); for (int i=0;i<min(tb_height(),count);i++) { if (i+start==curelem) tb_printf(0, i, TB_BLACK, TB_WHITE, list[i+start]); @@ -107,6 +104,5 @@ int main(int argc, char **argv) { } } } - tb_shutdown(); return 0; }