From 8bb519fe17294e028c9fe93725b3723e3b14e262 Mon Sep 17 00:00:00 2001 From: phyto Date: Tue, 21 May 2019 13:45:22 +0200 Subject: [PATCH] patching again the terminal --- ui/Makefile | 4 ++-- ui/terminal.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/Makefile b/ui/Makefile index 715a043..804c037 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -1,7 +1,7 @@ CC = gcc CCOPT = -Wall -g -DDEBUG_LEVEL=1 -CLIB = core/libdd2m-core.a viz/libdd2m-viz.a +CLIB = ../core/libdd2m-core.a ../viz/libdd2m-viz.a OSERIAL = ../serial/serial.o ../serial/funcs.o @@ -9,4 +9,4 @@ terminal.o: terminal.c Makefile terminal.h $(CC) ${CCOPT} $< -c t: t.c terminal.o - ${CC} ${CCOPT} $< terminal.o ${OSERIAL} -lncurses -o $@ + ${CC} ${CCOPT} $< terminal.o ${OSERIAL} ${CLIB} -lncurses -o $@ diff --git a/ui/terminal.c b/ui/terminal.c index 20c6a14..caf7be0 100644 --- a/ui/terminal.c +++ b/ui/terminal.c @@ -92,8 +92,9 @@ do { received = wgetch(glass); echo(); -#if DEBUG_LEVEL > 1 - sprintf(ligne, " got $%X\n", received); +#if DEBUG_LEVEL + sprintf(ligne, " got $%X '%c'\n", received, + isprint(received) ? received : '?'); waddstr(glass, ligne); wrefresh(glass); #endif