Date: Tue, 16 Aug 2005 16:54:14 +0200 (CEST) From: Divacky Roman <xdivac02@stud.fit.vutbr.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: bin/84995: gcc4.x cleanup of usr.bin/window Message-ID: <200508161454.j7GEsELq015409@eva.fit.vutbr.cz> Resent-Message-ID: <200508161500.j7GF0Ta5045412@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200508161454.j7GEsELq015409>
