bin/84995: gcc4.x cleanup of usr.bin/window
Divacky Roman
xdivac02 at stud.fit.vutbr.cz
Tue Aug 16 15:00:31 GMT 2005
>Number: 84995
>Category: bin
>Synopsis: gcc4.x cleanup of usr.bin/window
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue Aug 16 15:00:29 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Divacky Roman
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
home
>Environment:
FreeBSD witten 7.0-CURRENT FreeBSD 7.0-CURRENT #55: Tue Aug 16 12:59:09 CEST
2005 root at witten:/usr/obj/usr/src/sys/NEOLOGISM i386
>Description:
gcc4.x (tested with gcc41) cleanup of usr.bin/window
>How-To-Repeat:
apply the patch
>Fix:
Index: wwgets.c
===================================================================
RCS file: /home/ncvs/src/usr.bin/window/wwgets.c,v
retrieving revision 1.5
diff -u -r1.5 wwgets.c
--- wwgets.c 17 May 2001 09:38:49 -0000 1.5
+++ wwgets.c 11 Aug 2005 13:40:05 -0000
@@ -43,15 +43,21 @@
#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 (;;) {
@@ -101,14 +107,4 @@
}
*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);
}
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list