summaryrefslogtreecommitdiffstats
path: root/contrib/top/display.h
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-22 04:17:00 +0000
committerngie <ngie@FreeBSD.org>2016-05-22 04:17:00 +0000
commit037853325081b53767df0c034cda3c14ea99dc0d (patch)
treeedc1bed49b9926d9d2251f491e147e952a6a94ca /contrib/top/display.h
parent4a090513b10515af596208573b533bf6bc54bff9 (diff)
downloadFreeBSD-src-037853325081b53767df0c034cda3c14ea99dc0d.zip
FreeBSD-src-037853325081b53767df0c034cda3c14ea99dc0d.tar.gz
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. MFC after: 3 weeks Reviewed by: cem, ngie Submitted by: Randy Westlund <rwestlun@gmail.com> Differential Revision: https://reviews.freebsd.org/D6468
Diffstat (limited to 'contrib/top/display.h')
-rw-r--r--contrib/top/display.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/contrib/top/display.h b/contrib/top/display.h
index 4bd7ce7..5d5a07a 100644
--- a/contrib/top/display.h
+++ b/contrib/top/display.h
@@ -5,3 +5,37 @@
#define MT_standout 1
#define MT_delayed 2
+#include "machine.h"
+
+int display_updatecpus(struct statics *statics);
+void clear_message(void);
+int display_resize(void);
+void i_header(char *text);
+char *printable(char *string);
+char *cpustates_tag(void);
+void display_header(int t);
+int display_init(struct statics *statics);
+void i_arc(int *stats);
+void i_cpustates(int *states);
+void i_loadave(int mpid, double *avenrun);
+void i_memory(int *stats);
+void i_message(void);
+void i_process(int line, char *thisline);
+void i_procstates(int total, int *brkdn);
+void i_swap(int *stats);
+void i_timeofday(time_t *tod);
+void i_uptime(struct timeval *bt, time_t *tod);
+void new_message();
+int readline(char *buffer, int size, int numeric);
+char *trim_header(char *text);
+void u_arc(int *stats);
+void u_cpustates(int *states);
+void u_endscreen(int hi);
+void u_header(char *text);
+void u_loadave(int mpid, double *avenrun);
+void u_memory(int *stats);
+void u_message(void);
+void u_process(int line, char *newline);
+void u_procstates(int total, int *brkdn);
+void u_swap(int *stats);
+void z_cpustates(void);
OpenPOWER on IntegriCloud