2 * Copyright (c) 1984 through 2008, William LeFebvre
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above
12 * copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the
16 * * Neither the name of William LeFebvre nor the names of other
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 /* interface declaration for display.c */
38 #include "globalstate.h"
43 int display_columns();
44 int display_init(struct statics
*statics
);
45 void i_loadave(int mpid
, double *avenrun
);
46 void u_loadave(int mpid
, double *avenrun
);
47 void i_minibar(int (*formatter
)(char *, int));
48 void u_minibar(int (*formatter
)(char *, int));
49 void i_uptime(time_t *bt
, time_t *tod
);
50 void u_uptime(time_t *bt
, time_t *tod
);
51 void i_timeofday(time_t *tod
);
52 void i_procstates(int total
, int *brkdn
, int threads
);
53 void u_procstates(int total
, int *brkdn
, int threads
);
54 void i_cpustates(int *states
);
55 void u_cpustates(int *states
);
57 void i_kernel(int *stats
);
58 void u_kernel(int *stats
);
59 void i_memory(long *stats
);
60 void u_memory(long *stats
);
61 void i_swap(long *stats
);
62 void u_swap(long *stats
);
63 void i_message(struct timeval
*now
);
64 void u_message(struct timeval
*now
);
65 void i_header(char *text
);
66 void u_header(char *text
);
67 void i_process(int line
, char *thisline
);
68 void u_process(int, char *);
71 void display_header(int t
);
72 void new_message(char *msgfmt
, ...);
73 void message_error(char *msgfmt
, ...);
76 void message_expire();
77 void message_prompt(char *msgfmt
, ...);
78 void message_prompt_plain(char *msgfmt
, ...);
79 int readline(char *buffer
, int size
, int numeric
);
80 void display_pagerstart();
81 void display_pagerend();
82 void display_pager(char *fmt
, ...);