Fixes for gcc 4.x.

PR:             bin/84995
Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
This commit is contained in:
Ollivier Robert 2005-08-25 14:09:35 +00:00
parent 360856f60e
commit 2fa9dad0ef

View File

@ -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);
}