summaryrefslogtreecommitdiff
path: root/usr.bin/top/screen.c
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2003-06-12 22:30:24 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2003-06-12 22:30:24 +0000
commitf578f4296df2db8bc10718f8fb418ac1699f1785 (patch)
tree462a1d5d5e1f317d42a621b8fbffa9584ecad79b /usr.bin/top/screen.c
parent7eb7a31842af2cc30070717c76d62e69a2085d91 (diff)
cleanup; ok deraadt
Diffstat (limited to 'usr.bin/top/screen.c')
-rw-r--r--usr.bin/top/screen.c47
1 files changed, 19 insertions, 28 deletions
diff --git a/usr.bin/top/screen.c b/usr.bin/top/screen.c
index ad3da6f715a..c1f33f09d4f 100644
--- a/usr.bin/top/screen.c
+++ b/usr.bin/top/screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen.c,v 1.8 2002/07/15 17:20:36 deraadt Exp $ */
+/* $OpenBSD: screen.c,v 1.9 2003/06/12 22:30:23 pvalchev Exp $ */
/*
* Top users/processes display for Unix
@@ -77,10 +77,8 @@ static struct termios new_settings;
static char is_a_terminal = No;
-void init_termcap(interactive)
-
-int interactive;
-
+void
+init_termcap(int interactive)
{
char *bufptr;
char *PCptr;
@@ -201,8 +199,8 @@ int interactive;
}
}
-void init_screen()
-
+void
+init_screen(void)
{
/* get the old settings for safe keeping */
if (tcgetattr(STDOUT_FILENO, &old_settings) != -1)
@@ -235,8 +233,8 @@ void init_screen()
}
}
-void end_screen()
-
+void
+end_screen(void)
{
/* move to the lower left, clear the line and send "te" */
if (smart_terminal)
@@ -254,8 +252,8 @@ void end_screen()
}
}
-void reinit_screen()
-
+void
+reinit_screen(void)
{
/* install our settings if it is a terminal */
if (is_a_terminal)
@@ -270,8 +268,8 @@ void reinit_screen()
}
}
-void get_screensize()
-
+void
+get_screensize(void)
{
struct winsize ws;
@@ -292,10 +290,8 @@ void get_screensize()
lower_left[sizeof(lower_left) -1] = 0;
}
-void standout(msg)
-
-char *msg;
-
+void
+standout(char *msg)
{
if (smart_terminal)
{
@@ -320,10 +316,8 @@ void clear()
}
}
-int clear_eol(len)
-
-int len;
-
+int
+clear_eol(int len)
{
if (smart_terminal && !overstrike && len > 0)
{
@@ -345,8 +339,8 @@ int len;
return(-1);
}
-void go_home()
-
+void
+go_home(void)
{
if (smart_terminal)
{
@@ -356,10 +350,8 @@ void go_home()
/* This has to be defined as a subroutine for tputs (instead of a macro) */
-int putstdout(ch)
-
-int ch;
-
+int
+putstdout(int ch)
{
int ret;
@@ -368,4 +360,3 @@ int ch;
exit(1);
return (ret);
}
-