c'est l'heure de l'apero
This commit is contained in:
parent
bc7e6379e6
commit
7b168e26bd
@ -14,7 +14,10 @@ int verbosity;
|
||||
/* ---------------------------------------------------------------- */
|
||||
int message(char *txt)
|
||||
{
|
||||
static int pass = 0;
|
||||
|
||||
standout();
|
||||
mvaddch(LINES-1, 0, "\\|/-"[(pass++)%4]);
|
||||
mvaddstr(LINES-1, 2, txt);
|
||||
standend();
|
||||
refresh();
|
||||
@ -36,10 +39,7 @@ int fond_ecran(char *title)
|
||||
char *tp;
|
||||
struct utsname utsn;
|
||||
int foo;
|
||||
|
||||
#if TRACE
|
||||
char buffer[200];
|
||||
#endif
|
||||
|
||||
tp = " DD2 MONITORING by tTh 2019 ";
|
||||
if (NULL != title) tp = title;
|
||||
@ -47,11 +47,12 @@ if (NULL != title) tp = title;
|
||||
barre_inverse(' ', 0);
|
||||
standout();
|
||||
mvaddstr(0, 2, tp);
|
||||
#if TRACE
|
||||
|
||||
if (verbosity) {
|
||||
sprintf(buffer, " ecran %dx%d ", COLS, LINES);
|
||||
foo = strlen(buffer);
|
||||
mvaddstr(0, COLS-2-foo, buffer);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* get and display hostname */
|
||||
foo = uname(&utsn);
|
||||
|
@ -20,20 +20,25 @@ char ligne[100];
|
||||
for (idx=0; idx<10; idx++) {
|
||||
c = '0'+idx;
|
||||
p = 1+(idx*9);
|
||||
aff7segs_digit(stdscr, 17, p, c);
|
||||
mvaddch(16, p, c);
|
||||
aff7segs_digit(stdscr, 4, p, c);
|
||||
mvaddch(3, p, c);
|
||||
}
|
||||
|
||||
for (loop=0; loop<nbl; loop++) {
|
||||
sprintf(ligne, "%5d", loop);
|
||||
mvaddstr(15, 1, ligne);
|
||||
for (idx=0; idx<strlen(ligne); idx++) {
|
||||
aff7segs_digit(stdscr, 5, 1+(idx*9), ligne[idx]);
|
||||
aff7segs_digit(stdscr, 16, 8+(idx*9), ligne[idx]);
|
||||
}
|
||||
|
||||
mvaddstr(3, 2, ligne);
|
||||
refresh();
|
||||
usleep(200*1000);
|
||||
sprintf(ligne, "%.3f", drand48());
|
||||
mvaddstr(26, 1, ligne);
|
||||
for (idx=0; idx<strlen(ligne); idx++) {
|
||||
aff7segs_digit(stdscr, 27, 8+(idx*9), ligne[idx]);
|
||||
}
|
||||
|
||||
refresh();
|
||||
usleep(400*1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user