From 824f805ef832f53ce8f5344b67bbf6a3fa67d293 Mon Sep 17 00:00:00 2001 From: phyto Date: Tue, 22 Jan 2019 15:24:49 +0100 Subject: [PATCH] more eyecandy --- viz/curses/ecran.c | 8 ++++++++ viz/curses/ecran.h | 1 + viz/curses/t.c | 13 +++++++++++-- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/viz/curses/ecran.c b/viz/curses/ecran.c index 8807444..43ba848 100644 --- a/viz/curses/ecran.c +++ b/viz/curses/ecran.c @@ -12,6 +12,14 @@ int verbosity; /* ---------------------------------------------------------------- */ +int message(char *txt) +{ +standout(); +mvaddstr(LINES, 2, txt); +standend(); +refresh(); +return 0; +} /* ---------------------------------------------------------------- */ void barre_inverse(char c, int ligne) { diff --git a/viz/curses/ecran.h b/viz/curses/ecran.h index c2ec246..aa45fe5 100644 --- a/viz/curses/ecran.h +++ b/viz/curses/ecran.h @@ -3,6 +3,7 @@ */ int fond_ecran(char *titre); +int message(char *); WINDOW * open_waterfall(char *title, int flags); diff --git a/viz/curses/t.c b/viz/curses/t.c index dd35c56..0f64fb2 100644 --- a/viz/curses/t.c +++ b/viz/curses/t.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include @@ -16,7 +17,10 @@ int loop, foo; char line[100]; WINDOW *water; static float rvals[4]; +struct timespec ts; +ts.tv_sec = 0; +ts.tv_nsec = 133 * 1000 * 1000; water = open_waterfall("premier essai", 0); @@ -28,7 +32,7 @@ for (loop=0; loop 1023.0) { rvals[foo] = (float)(rand() % 25); @@ -37,7 +41,12 @@ for (loop=0; loop