[BACK]Return to display.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / top

Annotation of src/usr.bin/top/display.h, Revision 1.17

1.17    ! jsg         1: /*     $OpenBSD: display.h,v 1.16 2022/09/10 16:58:51 cheloha Exp $    */
1.4       deraadt     2:
                      3: /*
                      4:  *  Top users/processes display for Unix
                      5:  *  Version 3
                      6:  *
                      7:  * Copyright (c) 1984, 1989, William LeFebvre, Rice University
                      8:  * Copyright (c) 1989, 1990, 1992, William LeFebvre, Northwestern University
                      9:  *
                     10:  * Redistribution and use in source and binary forms, with or without
                     11:  * modification, are permitted provided that the following conditions
                     12:  * are met:
                     13:  * 1. Redistributions of source code must retain the above copyright
                     14:  *    notice, this list of conditions and the following disclaimer.
                     15:  * 2. Redistributions in binary form must reproduce the above copyright
                     16:  *    notice, this list of conditions and the following disclaimer in the
                     17:  *    documentation and/or other materials provided with the distribution.
                     18:  *
                     19:  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     20:  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
                     21:  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
                     22:  * IN NO EVENT SHALL THE AUTHOR OR HIS EMPLOYER BE LIABLE FOR ANY DIRECT, INDIRECT,
                     23:  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
                     24:  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
                     25:  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
                     26:  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     27:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
                     28:  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
                     29:  */
1.1       downsj     30:
                     31: /* constants needed for display.c */
                     32:
                     33: #define  MT_standout  1
                     34: #define  MT_delayed   2
                     35:
1.2       downsj     36: /* prototypes */
1.9       otto       37: int display_resize(void);
1.16      cheloha    38: void i_loadave(double *);
1.9       otto       39: void i_timeofday(time_t *);
1.12      guenther   40: void i_procstates(int, int *, int);
1.15      cheloha    41: void i_cpustates(int64_t *, int *);
1.9       otto       42: void i_memory(int *);
                     43: void i_message(void);
                     44: void i_header(char *);
                     45: void i_process(int, char *, int);
1.10      deraadt    46: void u_endscreen(void);
1.9       otto       47: void display_header(int);
                     48: void new_message(int, const char *, ...);
                     49: void clear_message(void);
1.11      otto       50: int readline(char *, int);
1.9       otto       51: char *printable(char *);
                     52: void show_help(void);
                     53: void anykey(void);
                     54:
                     55: #define putr() do { if (!smart_terminal) if (putchar('\r') == EOF) exit(1); } \
                     56:        while (0)
                     57: #define putn() do { if (!smart_terminal) if (putchar('\n') == EOF) exit(1); } \
                     58:        while (0)