freebsd-src/contrib/top/screen.h
Enji Cooper 5c014d5fa9 MFC r300395:
Silence top(1) compiler warnings

The contrib/top code is no longer maintained upstream (last pulled 16 years
ago). The K&R-style followed by the code spews -Wimplicit-int and -Wreturn-type
warnings, amongst others. This silences 131 warnings with as little modification
as possible by adding necessary return types, definitions, headers, and header
guards, and missing header includes.

The 5 warnings that remain are due to undeclared ncurses references. I didn't
include curses.h and term.h because there are several local functions and macros
that conflict with those definitions.
2016-06-12 05:57:42 +00:00

42 lines
1.2 KiB
C

/*
* top - a top users display for Unix 4.2
*
* This file contains all the definitions necessary to use the hand-written
* screen package in "screen.c"
*/
#define TCputs(str) tputs(str, 1, putstdout)
#define putcap(str) (void)((str) != NULL ? TCputs(str) : 0)
#define Move_to(x, y) TCputs(tgoto(cursor_motion, x, y))
/* declare return values for termcap functions */
char *tgetstr();
char *tgoto();
extern char ch_erase; /* set to the user's erase character */
extern char ch_kill; /* set to the user's kill character */
extern char smart_terminal; /* set if the terminal has sufficient termcap
capabilities for normal operation */
/* These are some termcap strings for use outside of "screen.c" */
extern char *cursor_motion;
extern char *clear_line;
extern char *clear_to_end;
/* rows and columns on the screen according to termcap */
extern int screen_length;
extern int screen_width;
/* a function that puts a single character on stdout */
void putstdout(char ch);
int clear_eol(int len);
void standout(char *msg);
void clear(void);
void go_home(void);
void reinit_screen(void);
void get_screensize(void);
void init_termcap(int interactive);
void end_screen(void);
void init_screen(void);