xref: /freebsd/usr.bin/top/screen.h (revision 525fe93dc7487a1e63a90f6a2b956abc601963c1)
1 /*
2  *  top - a top users display for Unix 4.2
3  *
4  *  This file contains all the definitions necessary to use the hand-written
5  *  screen package in "screen.c"
6  */
7 
8 #define TCputs(str)	tputs(str, 1, putchar)
9 #define putcap(str)	(void)((str) != NULL ? TCputs(str) : 0)
10 #define Move_to(x, y)	TCputs(tgoto(cursor_motion, x, y))
11 
12 extern char ch_erase;		/* set to the user's erase character */
13 extern char ch_kill;		/* set to the user's kill  character */
14 extern char smart_terminal;     /* set if the terminal has sufficient termcap
15 				   capabilities for normal operation */
16 
17 /* These are some termcap strings for use outside of "screen.c" */
18 extern char *cursor_motion;
19 extern char *clear_line;
20 extern char *clear_to_end;
21 
22 /* rows and columns on the screen according to termcap */
23 extern int  screen_length;
24 extern int  screen_width;
25 
26 int		clear_eol(int len);
27 void	top_standout(const char *msg);
28 void	top_clear(void);
29 void	reinit_screen(void);
30 void	get_screensize(void);
31 void	init_termcap(bool interactive);
32 void	end_screen(void);
33 void	init_screen(void);
34 
35