summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorroberto <roberto@FreeBSD.org>2005-08-25 14:09:35 +0000
committerroberto <roberto@FreeBSD.org>2005-08-25 14:09:35 +0000
commitdee5705f2d020e42375c4122af5663a7b9a4fe0c (patch)
tree6029a115b6742c5f1ec6da13585bc336f1514f66 /usr.bin
parent2bb913b9a9a30323dfdfaa4d876fa517b5d1b71c (diff)
downloadFreeBSD-src-dee5705f2d020e42375c4122af5663a7b9a4fe0c.zip
FreeBSD-src-dee5705f2d020e42375c4122af5663a7b9a4fe0c.tar.gz
Fixes for gcc 4.x.
PR: bin/84995 Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/window/wwgets.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/usr.bin/window/wwgets.c b/usr.bin/window/wwgets.c
index c0a14ea..742576c 100644
--- a/usr.bin/window/wwgets.c
+++ b/usr.bin/window/wwgets.c
@@ -43,15 +43,21 @@ static char rcsid[] =
#include "ww.h"
#include "char.h"
-wwgets(buf, n, w)
-char *buf;
-int n;
-register struct ww *w;
+static void
+rub(unsigned char c, struct ww *w)
+{
+ int i;
+
+ for (i = isctrl(c) ? strlen(unctrl(c)) : 1; --i >= 0;)
+ (void) wwwrite(w, "\b \b", 3);
+}
+
+void
+wwgets(char *buf, int n, struct ww *w)
{
register char *p = buf;
register int c;
char uc = w->ww_unctrl;
- static void rub();
w->ww_unctrl = 0;
for (;;) {
@@ -102,13 +108,3 @@ register struct ww *w;
*p = 0;
w->ww_unctrl = uc;
}
-
-static void
-rub(c, w)
-struct ww *w;
-{
- register i;
-
- for (i = isctrl(c) ? strlen(unctrl(c)) : 1; --i >= 0;)
- (void) wwwrite(w, "\b \b", 3);
-}
OpenPOWER on IntegriCloud