DD2-monitor/viz/curses/ecran.c

51 lines
1.1 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <getopt.h>
#include <ncurses.h>
#include "ecran.h"
int verbosity;
/* ---------------------------------------------------------------- */
/* ---------------------------------------------------------------- */
void barre_inverse(char c, int ligne)
{
int foo;
standout();
for (foo=0; foo<COLS; foo++)
mvaddch(ligne, foo, c);
standend();
/* refresh(); */
}
/* ---------------------------------------------------------------- */
int fond_ecran(void)
{
#if TRACE
int foo;
char buffer[200];
#endif
barre_inverse('+', 0);
standout();
mvaddstr(0, 2, " DD2 MONITORING by tTh 2019 ");
#if TRACE
sprintf(buffer, " ecran %dx%d ", COLS, LINES);
foo = strlen(buffer);
mvaddstr(0, COLS-2-foo, buffer);
#endif
standend();
refresh();
#if TRACE
fprintf(stderr, "HAUT %3d\n", HAUT);
fprintf(stderr, "HAUT_1 %3d BARRE_1 %3d\n", HAUT_1, BARRE_1);
fprintf(stderr, "HAUT_2 %3d BARRE_2 %3d\n", HAUT_2, BARRE_2);
#endif
return 0;
}
/* ---------------------------------------------------------------- */