From 494f9ebf01251006b1fb8dc5a8363f3dbdcc6b60 Mon Sep 17 00:00:00 2001 From: tTh Date: Sun, 31 Mar 2024 21:46:50 +0200 Subject: [PATCH] cosmetic --- showbuttons.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/showbuttons.c b/showbuttons.c index 8bbcf52..a4d5af2 100644 --- a/showbuttons.c +++ b/showbuttons.c @@ -67,13 +67,15 @@ int display_a_value(int lig, short value, char letter) char buffer[80], symbol; int width, seuil, foo; +width = 60; + sprintf(buffer, "%6d [", value); mvaddstr(lig, 4, buffer); +mvaddch(lig, width+12, ']'); if (value < 0) symbol = '-'; else symbol = '+'; -width = 60; seuil = (abs((int)value) * width) / 32767; #if DEBUG_LEVEL > 1 @@ -141,8 +143,7 @@ int do_animation(int cycles, int speed) (void)initcurses(); animation(cycles, speed); -sleep(2); -exit(0); +sleep(2); exit(0); return 0; } @@ -230,8 +231,8 @@ return 0; /* ----------------------------------------------------------------- */ static void help(int k) { -puts("\t * showbuttons " __DATE__ " *"); -puts("\t-a\tshow animation"); +puts("\t*** showbuttons " __DATE__ " ***"); +puts("\t-a\tshow animation and exit"); puts("\t-p\tlocal udp port ("LOCAL_PORT")"); puts("\t-v\tenhance my verbosity"); exit(0); @@ -300,7 +301,7 @@ fprintf(stderr, "pid %d: osc server thread started\n", getpid()); sprintf(ligne, "process %d on board, captain ", getpid()); blast_error_message(ligne, 0, 0); -sleep(1); +sleep(3); erase_error_message(' '); for (;;) {