1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/* curs.c is part of Statnet */
/* Statnet is protected under the GNU Public License (GPL2). */
/* Author: Jeroen Baekelandt (jeroenb@igwe.vub.ac.be) */
#include "config.h"
#ifdef NEWCURSES_SUPP
#include <ncurses/curses.h>
#else
#ifdef NEWCURSESROOT_SUPP
#include <ncurses.h>
#else
#include <curses.h>
#endif
#endif
#include <string.h>
#include <stdarg.h>
#include "curs.h"
#include "netwatch.h"
extern int colour;
void
init_curses ()
{
initscr ();
nodelay (stdscr, TRUE);
cbreak ();
noecho ();
}
void
cleanup_curses ()
{
echo();
nodelay(stdscr,FALSE);
nocbreak();
endwin ();
}
void
clrportion (int y1, int x1, int y2, int x2)
{
int i, j;
j = x2 - x1;
for (i = y1; i < y2; i++)
mvprintw (i, x1, "%*c", j, ' ');
return;
}
void
clrscr ()
{
int i;
clear ();
attrset (col4);
for (i = 0; i < MLINES; i++)
mvchgat (i, 0, MCOLS, col4, 0, NULL);
/* color_set(col4,NULL); */
border (0, 0, 0, 0, 0, 0, 0, 0);
refresh ();
}
|