Remove #if __STDC__. De-__P() and ANSIfy, and fix a mismatching prototype

uncovered by this (p_assign).
This commit is contained in:
wiz 2002-06-14 01:07:01 +00:00
parent 65eb0105f4
commit 4953298d90
13 changed files with 77 additions and 116 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwredrawwin.c,v 1.5 1997/11/21 08:37:45 lukem Exp $ */
/* $NetBSD: wwredrawwin.c,v 1.6 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,16 +41,14 @@
#if 0
static char sccsid[] = "@(#)wwredrawwin.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwredrawwin.c,v 1.5 1997/11/21 08:37:45 lukem Exp $");
__RCSID("$NetBSD: wwredrawwin.c,v 1.6 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
#include "ww.h"
void
wwredrawwin1(w, row1, row2, offset)
struct ww *w;
int row1, row2, offset;
wwredrawwin1(struct ww *w, int row1, int row2, int offset)
{
int row;
int col;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwrint.c,v 1.5 1997/11/21 08:37:47 lukem Exp $ */
/* $NetBSD: wwrint.c,v 1.6 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwrint.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwrint.c,v 1.5 1997/11/21 08:37:47 lukem Exp $");
__RCSID("$NetBSD: wwrint.c,v 1.6 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
@ -60,7 +60,7 @@ __RCSID("$NetBSD: wwrint.c,v 1.5 1997/11/21 08:37:47 lukem Exp $");
* It should be completely safe.
*/
void
wwrint()
wwrint(void)
{
int n;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwscroll.c,v 1.5 2000/07/03 02:51:41 matt Exp $ */
/* $NetBSD: wwscroll.c,v 1.6 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwscroll.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwscroll.c,v 1.5 2000/07/03 02:51:41 matt Exp $");
__RCSID("$NetBSD: wwscroll.c,v 1.6 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
@ -52,9 +52,7 @@ __RCSID("$NetBSD: wwscroll.c,v 1.5 2000/07/03 02:51:41 matt Exp $");
#include "xx.h"
void
wwscroll(w, n)
struct ww *w;
int n;
wwscroll(struct ww *w, int n)
{
int dir;
int top;
@ -89,10 +87,7 @@ wwscroll(w, n)
* And don't redraw 'leaveit' lines.
*/
int
wwscroll1(w, row1, row2, dir, leaveit)
struct ww *w;
int row1, row2, dir;
int leaveit;
wwscroll1(struct ww *w, int row1, int row2, int dir, int leaveit)
{
int i;
int row1x, row2x;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwsize.c,v 1.6 1997/11/21 08:37:49 lukem Exp $ */
/* $NetBSD: wwsize.c,v 1.7 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwsize.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwsize.c,v 1.6 1997/11/21 08:37:49 lukem Exp $");
__RCSID("$NetBSD: wwsize.c,v 1.7 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
@ -52,9 +52,7 @@ __RCSID("$NetBSD: wwsize.c,v 1.6 1997/11/21 08:37:49 lukem Exp $");
* Resize a window. Should be unattached.
*/
int
wwsize(w, nrow, ncol)
struct ww *w;
int nrow, ncol;
wwsize(struct ww *w, int nrow, int ncol)
{
int i, j;
int nline = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwspawn.c,v 1.6 1998/04/17 15:56:14 cgd Exp $ */
/* $NetBSD: wwspawn.c,v 1.7 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwspawn.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwspawn.c,v 1.6 1998/04/17 15:56:14 cgd Exp $");
__RCSID("$NetBSD: wwspawn.c,v 1.7 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
@ -54,10 +54,7 @@ __RCSID("$NetBSD: wwspawn.c,v 1.6 1998/04/17 15:56:14 cgd Exp $");
* So we have to be sneaky about error reporting.
*/
int
wwspawn(wp, file, argv)
struct ww *wp;
char *file;
char **argv;
wwspawn(struct ww *wp, char *file, char **argv)
{
int pid;
int ret;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwsuspend.c,v 1.4 1997/11/21 08:37:52 lukem Exp $ */
/* $NetBSD: wwsuspend.c,v 1.5 2002/06/14 01:07:01 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwsuspend.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwsuspend.c,v 1.4 1997/11/21 08:37:52 lukem Exp $");
__RCSID("$NetBSD: wwsuspend.c,v 1.5 2002/06/14 01:07:01 wiz Exp $");
#endif
#endif /* not lint */
@ -50,7 +50,7 @@ __RCSID("$NetBSD: wwsuspend.c,v 1.4 1997/11/21 08:37:52 lukem Exp $");
#include "tt.h"
void
wwsuspend()
wwsuspend(void)
{
sig_t oldsig;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwtty.c,v 1.5 1997/11/21 08:37:56 lukem Exp $ */
/* $NetBSD: wwtty.c,v 1.6 2002/06/14 01:07:02 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwtty.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwtty.c,v 1.5 1997/11/21 08:37:56 lukem Exp $");
__RCSID("$NetBSD: wwtty.c,v 1.6 2002/06/14 01:07:02 wiz Exp $");
#endif
#endif /* not lint */
@ -53,9 +53,7 @@ __RCSID("$NetBSD: wwtty.c,v 1.5 1997/11/21 08:37:56 lukem Exp $");
#include "ww.h"
int
wwgettty(d, t)
int d;
struct ww_tty *t;
wwgettty(int d, struct ww_tty *t)
{
#ifdef OLD_TTY
if (ioctl(d, TIOCGETP, (char *)&t->ww_sgttyb) < 0)
@ -84,9 +82,7 @@ bad:
* it changes, to avoid unnecessary flushing of typeahead.
*/
int
wwsettty(d, t)
int d;
struct ww_tty *t;
wwsettty(int d, struct ww_tty *t)
{
#ifdef OLD_TTY
int i;
@ -127,9 +123,7 @@ bad:
*/
int
wwgetttysize(d, r, c)
int d;
int *r, *c;
wwgetttysize(int d, int *r, int *c)
{
struct winsize winsize;
@ -145,8 +139,7 @@ wwgetttysize(d, r, c)
}
int
wwsetttysize(d, r, c)
int d, r, c;
wwsetttysize(int d, int r, int c)
{
struct winsize winsize;
@ -161,8 +154,7 @@ wwsetttysize(d, r, c)
}
int
wwstoptty(d)
int d;
wwstoptty(int d)
{
#if !defined(OLD_TTY) && defined(TCOOFF)
/* not guaranteed to work on the pty side */
@ -178,8 +170,7 @@ wwstoptty(d)
}
int
wwstarttty(d)
int d;
wwstarttty(int d)
{
#if !defined(OLD_TTY) && defined(TCOON)
/* not guaranteed to work on the pty side */

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwunframe.c,v 1.5 1997/11/21 08:37:58 lukem Exp $ */
/* $NetBSD: wwunframe.c,v 1.6 2002/06/14 01:07:02 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,15 +41,14 @@
#if 0
static char sccsid[] = "@(#)wwunframe.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwunframe.c,v 1.5 1997/11/21 08:37:58 lukem Exp $");
__RCSID("$NetBSD: wwunframe.c,v 1.6 2002/06/14 01:07:02 wiz Exp $");
#endif
#endif /* not lint */
#include "ww.h"
void
wwunframe(w)
struct ww *w;
wwunframe(struct ww *w)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwupdate.c,v 1.4 1997/11/21 08:37:59 lukem Exp $ */
/* $NetBSD: wwupdate.c,v 1.5 2002/06/14 01:07:02 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwupdate.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwupdate.c,v 1.4 1997/11/21 08:37:59 lukem Exp $");
__RCSID("$NetBSD: wwupdate.c,v 1.5 2002/06/14 01:07:02 wiz Exp $");
#endif
#endif /* not lint */
@ -50,8 +50,7 @@ __RCSID("$NetBSD: wwupdate.c,v 1.4 1997/11/21 08:37:59 lukem Exp $");
#include "xx.h"
void
wwupdate1(top, bot)
int top, bot;
wwupdate1(int top, int bot)
{
int i;
int j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwwrite.c,v 1.6 1997/11/21 08:38:00 lukem Exp $ */
/* $NetBSD: wwwrite.c,v 1.7 2002/06/14 01:07:02 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwwrite.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwwrite.c,v 1.6 1997/11/21 08:38:00 lukem Exp $");
__RCSID("$NetBSD: wwwrite.c,v 1.7 2002/06/14 01:07:02 wiz Exp $");
#endif
#endif /* not lint */
@ -65,10 +65,7 @@ __RCSID("$NetBSD: wwwrite.c,v 1.6 1997/11/21 08:38:00 lukem Exp $");
* to avoid recursion, which might be a better idea.
*/
int
wwwrite(w, p, n)
struct ww *w;
char *p;
int n;
wwwrite(struct ww *w, char *p, int n)
{
int hascursor;
char *savep = p;

View File

@ -1,4 +1,4 @@
/* $NetBSD: xx.c,v 1.5 1998/10/14 00:58:49 wsanchez Exp $ */
/* $NetBSD: xx.c,v 1.6 2002/06/14 01:07:03 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)xx.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: xx.c,v 1.5 1998/10/14 00:58:49 wsanchez Exp $");
__RCSID("$NetBSD: xx.c,v 1.6 2002/06/14 01:07:03 wiz Exp $");
#endif
#endif /* not lint */
@ -54,7 +54,7 @@ __RCSID("$NetBSD: xx.c,v 1.5 1998/10/14 00:58:49 wsanchez Exp $");
#include "tt.h"
int
xxinit()
xxinit(void)
{
if (ttinit() < 0)
return -1;
@ -73,7 +73,7 @@ xxinit()
}
void
xxstart()
xxstart(void)
{
(*tt.tt_start)();
if (tt.tt_ntoken > 0)
@ -82,7 +82,7 @@ xxstart()
}
void
xxreset()
xxreset(void)
{
if (tt.tt_ntoken > 0)
ccreset();
@ -91,7 +91,7 @@ xxreset()
}
void
xxreset1()
xxreset1(void)
{
struct xx *xp, *xq;
@ -104,7 +104,7 @@ xxreset1()
}
void
xxend()
xxend(void)
{
if (tt.tt_scroll_top != 0 || tt.tt_scroll_bot != tt.tt_nrow - 1)
/* tt.tt_setscroll is known to be defined */
@ -121,7 +121,7 @@ xxend()
}
struct xx *
xxalloc()
xxalloc(void)
{
struct xx *xp;
@ -142,16 +142,14 @@ xxalloc()
}
void
xxfree(xp)
struct xx *xp;
xxfree(struct xx *xp)
{
xp->link = xx_freelist;
xx_freelist = xp;
}
void
xxmove(row, col)
int row, col;
xxmove(int row, int col)
{
struct xx *xp = xx_tail;
@ -164,8 +162,7 @@ xxmove(row, col)
}
void
xxscroll(dir, top, bot)
int dir, top, bot;
xxscroll(int dir, int top, int bot)
{
struct xx *xp = xx_tail;
@ -183,8 +180,7 @@ xxscroll(dir, top, bot)
}
void
xxinschar(row, col, c, m)
int row, col, c, m;
xxinschar(int row, int col, int c, int m)
{
struct xx *xp;
@ -197,8 +193,7 @@ xxinschar(row, col, c, m)
}
void
xxinsspace(row, col)
int row, col;
xxinsspace(int row, int col)
{
struct xx *xp = xx_tail;
@ -215,8 +210,7 @@ xxinsspace(row, col)
}
void
xxdelchar(row, col)
int row, col;
xxdelchar(int row, int col)
{
struct xx *xp = xx_tail;
@ -233,7 +227,7 @@ xxdelchar(row, col)
}
void
xxclear()
xxclear(void)
{
struct xx *xp;
@ -243,8 +237,7 @@ xxclear()
}
void
xxclreos(row, col)
int row, col;
xxclreos(int row, int col)
{
struct xx *xp = xxalloc();
@ -254,8 +247,7 @@ xxclreos(row, col)
}
void
xxclreol(row, col)
int row, col;
xxclreol(int row, int col)
{
struct xx *xp = xxalloc();
@ -265,10 +257,7 @@ xxclreol(row, col)
}
void
xxwrite(row, col, p, n, m)
int row, col;
char *p;
int n, m;
xxwrite(int row, int col, char *p, int n, int m)
{
struct xx *xp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: xx.h,v 1.5 1998/10/14 00:58:49 wsanchez Exp $ */
/* $NetBSD: xx.h,v 1.6 2002/06/14 01:07:03 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@ -61,21 +61,21 @@ EXTERN int xxbufsize;
#define char_sep '\0'
struct xx *xxalloc __P((void));
void xxclear __P((void));
void xxclreol __P((int, int));
void xxclreos __P((int, int));
void xxdelchar __P((int, int));
void xxend __P((void));
void xxflush __P((int));
void xxflush_scroll __P((struct xx *));
void xxfree __P((struct xx *));
int xxinit __P((void));
void xxinschar __P((int, int, int, int));
void xxinsspace __P((int, int));
void xxmove __P((int, int));
void xxreset __P((void));
void xxreset1 __P((void));
void xxscroll __P((int, int, int));
void xxstart __P((void));
void xxwrite __P((int, int, char *, int, int));
struct xx *xxalloc(void);
void xxclear(void);
void xxclreol(int, int);
void xxclreos(int, int);
void xxdelchar(int, int);
void xxend(void);
void xxflush(int);
void xxflush_scroll(struct xx *);
void xxfree(struct xx *);
int xxinit(void);
void xxinschar(int, int, int, int);
void xxinsspace(int, int);
void xxmove(int, int);
void xxreset(void);
void xxreset1(void);
void xxscroll(int, int, int);
void xxstart(void);
void xxwrite(int, int, char *, int, int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xxflush.c,v 1.4 1997/11/21 08:38:05 lukem Exp $ */
/* $NetBSD: xxflush.c,v 1.5 2002/06/14 01:07:03 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)xxflush.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: xxflush.c,v 1.4 1997/11/21 08:38:05 lukem Exp $");
__RCSID("$NetBSD: xxflush.c,v 1.5 2002/06/14 01:07:03 wiz Exp $");
#endif
#endif /* not lint */
@ -50,8 +50,7 @@ __RCSID("$NetBSD: xxflush.c,v 1.4 1997/11/21 08:38:05 lukem Exp $");
#include "tt.h"
void
xxflush(intr)
int intr;
xxflush(int intr)
{
struct xx *xp, *xq;
@ -105,8 +104,7 @@ xxflush(intr)
}
void
xxflush_scroll(xp)
struct xx *xp;
xxflush_scroll(struct xx *xp)
{
struct xx *xq;