xref: /minix3/external/bsd/top/dist/screen.h (revision b89261ba018da33f0bd8cd05f5a1fe9e7a9c837b)
1*b89261baSDavid van Moolenbroek /*
2*b89261baSDavid van Moolenbroek  * Copyright (c) 1984 through 2008, William LeFebvre
3*b89261baSDavid van Moolenbroek  * All rights reserved.
4*b89261baSDavid van Moolenbroek  *
5*b89261baSDavid van Moolenbroek  * Redistribution and use in source and binary forms, with or without
6*b89261baSDavid van Moolenbroek  * modification, are permitted provided that the following conditions are met:
7*b89261baSDavid van Moolenbroek  *
8*b89261baSDavid van Moolenbroek  *     * Redistributions of source code must retain the above copyright
9*b89261baSDavid van Moolenbroek  * notice, this list of conditions and the following disclaimer.
10*b89261baSDavid van Moolenbroek  *
11*b89261baSDavid van Moolenbroek  *     * Redistributions in binary form must reproduce the above
12*b89261baSDavid van Moolenbroek  * copyright notice, this list of conditions and the following disclaimer
13*b89261baSDavid van Moolenbroek  * in the documentation and/or other materials provided with the
14*b89261baSDavid van Moolenbroek  * distribution.
15*b89261baSDavid van Moolenbroek  *
16*b89261baSDavid van Moolenbroek  *     * Neither the name of William LeFebvre nor the names of other
17*b89261baSDavid van Moolenbroek  * contributors may be used to endorse or promote products derived from
18*b89261baSDavid van Moolenbroek  * this software without specific prior written permission.
19*b89261baSDavid van Moolenbroek  *
20*b89261baSDavid van Moolenbroek  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21*b89261baSDavid van Moolenbroek  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22*b89261baSDavid van Moolenbroek  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23*b89261baSDavid van Moolenbroek  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24*b89261baSDavid van Moolenbroek  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25*b89261baSDavid van Moolenbroek  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26*b89261baSDavid van Moolenbroek  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27*b89261baSDavid van Moolenbroek  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28*b89261baSDavid van Moolenbroek  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29*b89261baSDavid van Moolenbroek  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30*b89261baSDavid van Moolenbroek  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31*b89261baSDavid van Moolenbroek  */
32*b89261baSDavid van Moolenbroek 
33*b89261baSDavid van Moolenbroek /*
34*b89261baSDavid van Moolenbroek  *  top - a top users display for Unix 4.2
35*b89261baSDavid van Moolenbroek  *
36*b89261baSDavid van Moolenbroek  *  This file contains all the definitions necessary to use the hand-written
37*b89261baSDavid van Moolenbroek  *  screen package in "screen.c"
38*b89261baSDavid van Moolenbroek  */
39*b89261baSDavid van Moolenbroek 
40*b89261baSDavid van Moolenbroek #ifndef _SCREEN_H_
41*b89261baSDavid van Moolenbroek #define _SCREEN_H_
42*b89261baSDavid van Moolenbroek 
43*b89261baSDavid van Moolenbroek extern char ch_erase;		/* set to the user's erase character */
44*b89261baSDavid van Moolenbroek extern char ch_kill;		/* set to the user's kill character */
45*b89261baSDavid van Moolenbroek extern char ch_werase;		/* set to the user's werase character */
46*b89261baSDavid van Moolenbroek extern char smart_terminal;     /* set if the terminal has sufficient termcap
47*b89261baSDavid van Moolenbroek 				   capabilities for normal operation */
48*b89261baSDavid van Moolenbroek 
49*b89261baSDavid van Moolenbroek /* rows and columns on the screen according to termcap */
50*b89261baSDavid van Moolenbroek extern int  screen_length;
51*b89261baSDavid van Moolenbroek extern int  screen_width;
52*b89261baSDavid van Moolenbroek 
53*b89261baSDavid van Moolenbroek void screen_getsize(void);
54*b89261baSDavid van Moolenbroek int screen_readtermcap(int interactive);
55*b89261baSDavid van Moolenbroek void screen_init(void);
56*b89261baSDavid van Moolenbroek void screen_end(void);
57*b89261baSDavid van Moolenbroek void screen_reinit(void);
58*b89261baSDavid van Moolenbroek void screen_move(int x, int y);
59*b89261baSDavid van Moolenbroek void screen_standout(const char *msg);
60*b89261baSDavid van Moolenbroek void screen_clear(void);
61*b89261baSDavid van Moolenbroek int screen_cte(void);
62*b89261baSDavid van Moolenbroek void screen_cleareol(int len);
63*b89261baSDavid van Moolenbroek void screen_home(void);
64*b89261baSDavid van Moolenbroek 
65*b89261baSDavid van Moolenbroek #endif /* _SCREEN_H_ */
66