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:06:51 +00:00
parent 5bcf2ac974
commit 19f3b61aa0
76 changed files with 728 additions and 1065 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd.c,v 1.6 1998/08/25 20:59:42 ross Exp $ */
/* $NetBSD: cmd.c,v 1.7 2002/06/14 01:06:51 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd.c,v 1.6 1998/08/25 20:59:42 ross Exp $");
__RCSID("$NetBSD: cmd.c,v 1.7 2002/06/14 01:06:51 wiz Exp $");
#endif
#endif /* not lint */
@ -49,10 +49,10 @@ __RCSID("$NetBSD: cmd.c,v 1.6 1998/08/25 20:59:42 ross Exp $");
#include "defs.h"
#include "char.h"
int checkproc __P((struct ww *));
int checkproc(struct ww *);
void
docmd()
docmd(void)
{
int c;
struct ww *w;
@ -224,7 +224,7 @@ docmd()
}
struct ww *
getwin()
getwin(void)
{
int c;
struct ww *w = 0;
@ -254,8 +254,7 @@ getwin()
}
int
checkproc(w)
struct ww *w;
checkproc(struct ww *w)
{
if (w->ww_state != WWS_HASPROC) {
error("No process in window.");
@ -265,8 +264,7 @@ checkproc(w)
}
void
setcmd(new)
char new;
setcmd(char new)
{
if (new && !incmd) {
if (!terse)
@ -287,8 +285,7 @@ setcmd(new)
}
void
setterse(new)
char new;
setterse(char new)
{
if (incmd) {
if (new && !terse) {
@ -304,8 +301,7 @@ setterse(new)
* Set the current window.
*/
void
setselwin(w)
struct ww *w;
setselwin(struct ww *w)
{
if (selwin == w)
return;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd1.c,v 1.5 1997/11/21 08:35:46 lukem Exp $ */
/* $NetBSD: cmd1.c,v 1.6 2002/06/14 01:06:51 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd1.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd1.c,v 1.5 1997/11/21 08:35:46 lukem Exp $");
__RCSID("$NetBSD: cmd1.c,v 1.6 2002/06/14 01:06:51 wiz Exp $");
#endif
#endif /* not lint */
@ -49,7 +49,7 @@ __RCSID("$NetBSD: cmd1.c,v 1.5 1997/11/21 08:35:46 lukem Exp $");
#include "char.h"
void
c_window()
c_window(void)
{
int col, row, xcol, xrow;
int id;
@ -118,10 +118,7 @@ c_window()
}
int
getpos(row, col, minrow, mincol, maxrow, maxcol)
int *row, *col;
int minrow, mincol;
int maxrow, maxcol;
getpos(int *row, int *col, int minrow, int mincol, int maxrow, int maxcol)
{
static int scount;
int count;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd2.c,v 1.4 1997/11/21 08:35:47 lukem Exp $ */
/* $NetBSD: cmd2.c,v 1.5 2002/06/14 01:06:51 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd2.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd2.c,v 1.4 1997/11/21 08:35:47 lukem Exp $");
__RCSID("$NetBSD: cmd2.c,v 1.5 2002/06/14 01:06:51 wiz Exp $");
#endif
#endif /* not lint */
@ -108,10 +108,10 @@ char *help_longcmd[] = {
0
};
int help_print __P((struct ww *, char *, char **));
int help_print(struct ww *, char *, char **);
void
c_help()
c_help(void)
{
struct ww *w;
@ -127,10 +127,7 @@ c_help()
}
int
help_print(w, name, list)
struct ww *w;
char *name;
char **list;
help_print(struct ww *w, char *name, char **list)
{
wwprintf(w, "%s:\n\n", name);
while (*list)
@ -149,7 +146,7 @@ help_print(w, name, list)
}
void
c_quit()
c_quit(void)
{
char oldterse = terse;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd3.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $ */
/* $NetBSD: cmd3.c,v 1.6 2002/06/14 01:06:51 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd3.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd3.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $");
__RCSID("$NetBSD: cmd3.c,v 1.6 2002/06/14 01:06:51 wiz Exp $");
#endif
#endif /* not lint */
@ -49,8 +49,7 @@ __RCSID("$NetBSD: cmd3.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $");
#include "window_string.h"
void
setescape(esc)
char *esc;
setescape(char *esc)
{
if (*esc == '^') {
if (esc[1] != 0)
@ -62,9 +61,7 @@ setescape(esc)
}
int
setlabel(w, label)
struct ww *w;
char *label;
setlabel(struct ww *w, char *label)
{
if (w->ww_label != 0)
str_free(w->ww_label);

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd4.c,v 1.4 1997/11/21 08:35:50 lukem Exp $ */
/* $NetBSD: cmd4.c,v 1.5 2002/06/14 01:06:51 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,14 +41,14 @@
#if 0
static char sccsid[] = "@(#)cmd4.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd4.c,v 1.4 1997/11/21 08:35:50 lukem Exp $");
__RCSID("$NetBSD: cmd4.c,v 1.5 2002/06/14 01:06:51 wiz Exp $");
#endif
#endif /* not lint */
#include "defs.h"
void
c_colon()
c_colon(void)
{
char oldterse = terse;
char buf[512];

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd5.c,v 1.5 1998/07/09 18:34:39 msaitoh Exp $ */
/* $NetBSD: cmd5.c,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd5.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd5.c,v 1.5 1998/07/09 18:34:39 msaitoh Exp $");
__RCSID("$NetBSD: cmd5.c,v 1.6 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -51,11 +51,10 @@ __RCSID("$NetBSD: cmd5.c,v 1.5 1998/07/09 18:34:39 msaitoh Exp $");
* Window movement.
*/
void getminmax __P((int, int, int, int, int *, int *, int *));
void getminmax(int, int, int, int, int *, int *, int *);
void
c_move(w)
struct ww *w;
c_move(struct ww *w)
{
int col, row;
int mincol, minrow;
@ -99,9 +98,7 @@ c_move(w)
}
void
movewin(w, row, col)
struct ww *w;
int row, col;
movewin(struct ww *w, int row, int col)
{
struct ww *back = w->ww_back;
@ -117,9 +114,7 @@ movewin(w, row, col)
* Weird stufff, don't ask.
*/
void
getminmax(x, n, a, b, curx, minx, maxx)
int x, n, a, b;
int *curx, *minx, *maxx;
getminmax(int x, int n, int a, int b, int *curx, int *minx, int *maxx)
{
if (x < 0)
*curx = x + n - 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd6.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $ */
/* $NetBSD: cmd6.c,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd6.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd6.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $");
__RCSID("$NetBSD: cmd6.c,v 1.6 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -53,10 +53,10 @@ __RCSID("$NetBSD: cmd6.c,v 1.5 1998/10/14 00:58:46 wsanchez Exp $");
* Debugging commands.
*/
void debug_str __P((void));
void debug_str(void);
void
c_debug()
c_debug(void)
{
struct ww *w;
@ -95,7 +95,7 @@ c_debug()
}
void
debug_str()
debug_str(void)
{
#ifdef STR_DEBUG
struct ww *w;

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmd7.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $ */
/* $NetBSD: cmd7.c,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)cmd7.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: cmd7.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $");
__RCSID("$NetBSD: cmd7.c,v 1.6 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -50,17 +50,16 @@ __RCSID("$NetBSD: cmd7.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $");
#include "defs.h"
#include "window_string.h"
void unyank __P((void));
void yank_highlight __P((int, int, int, int));
void yank_highlight_line __P((int, int, int));
void yank_line __P((int, int, int));
void unyank(void);
void yank_highlight(int, int, int, int);
void yank_highlight_line(int, int, int);
void yank_line(int, int, int);
/*
* Window size.
*/
void
c_size(w)
struct ww *w;
c_size(struct ww *w)
{
int col, row;
@ -110,7 +109,7 @@ struct yb {
struct yb *yb_head, *yb_tail;
void
c_yank()
c_yank(void)
{
struct ww *w = selwin;
int col1, row1;
@ -186,8 +185,7 @@ out:
}
void
yank_highlight(row1, col1, row2, col2)
int row1, col1, row2, col2;
yank_highlight(int row1, int col1, int row2, int col2)
{
struct ww *w = selwin;
int r, c;
@ -211,8 +209,7 @@ yank_highlight(row1, col1, row2, col2)
}
void
yank_highlight_line(r, c, cend)
int r, c, cend;
yank_highlight_line(int r, int c, int cend)
{
struct ww *w = selwin;
char *win;
@ -237,7 +234,7 @@ yank_highlight_line(r, c, cend)
}
void
unyank()
unyank(void)
{
struct yb *yp, *yq;
@ -250,8 +247,7 @@ unyank()
}
void
yank_line(r, c, cend)
int r, c, cend;
yank_line(int r, int c, int cend)
{
struct yb *yp;
int nl = 0;
@ -285,7 +281,7 @@ yank_line(r, c, cend)
}
void
c_put()
c_put(void)
{
struct yb *yp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: compress.c,v 1.4 1997/11/21 08:35:56 lukem Exp $ */
/* $NetBSD: compress.c,v 1.5 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)compress.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: compress.c,v 1.4 1997/11/21 08:35:56 lukem Exp $");
__RCSID("$NetBSD: compress.c,v 1.5 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -171,19 +171,19 @@ long cc_time, cc_time0;
char *cc_tt_ob, *cc_tt_obe;
int cc_compress __P((struct cc **, struct cc **, char));
void cc_compress_cleanup __P((struct cc **, int));
void cc_compress_phase __P((struct cc **, int, struct cc **, int));
void cc_compress_phase1 __P((struct cc **, struct cc **, int, int));
void cc_output_phase __P((char *, struct cc **, int));
int cc_sweep __P((char *, int, struct cc **, int));
void cc_sweep0 __P((char *, int, int));
int cc_sweep_phase __P((char *, int, struct cc **));
void cc_sweep_reverse __P((struct cc **, short *));
int cc_token_compare __P((const void *, const void *));
int cc_compress(struct cc **, struct cc **, char);
void cc_compress_cleanup(struct cc **, int);
void cc_compress_phase(struct cc **, int, struct cc **, int);
void cc_compress_phase1(struct cc **, struct cc **, int, int);
void cc_output_phase(char *, struct cc **, int);
int cc_sweep(char *, int, struct cc **, int);
void cc_sweep0(char *, int, int);
int cc_sweep_phase(char *, int, struct cc **);
void cc_sweep_reverse(struct cc **, short *);
int cc_token_compare(const void *, const void *);
int
ccinit()
ccinit(void)
{
int i, j;
struct cc *p;
@ -307,7 +307,7 @@ nomem:
}
void
ccstart()
ccstart(void)
{
ttflush();
tt_obp = tt_ob = cc_buffer;
@ -321,7 +321,7 @@ ccstart()
}
void
ccreset()
ccreset(void)
{
struct cc *p;
@ -333,7 +333,7 @@ ccreset()
}
void
ccend()
ccend(void)
{
ttflush();
@ -347,7 +347,7 @@ ccend()
}
void
ccflush()
ccflush(void)
{
int bufsize = tt_obp - tt_ob;
int n;
@ -380,10 +380,7 @@ out:
}
int
cc_sweep_phase(buffer, bufsize, tokens)
char *buffer;
int bufsize;
struct cc **tokens;
cc_sweep_phase(char *buffer, int bufsize, struct cc **tokens)
{
struct cc **pp = tokens;
int i, n;
@ -439,9 +436,7 @@ cc_sweep_phase(buffer, bufsize, tokens)
}
void
cc_sweep0(buffer, n, length)
char *buffer;
int n, length;
cc_sweep0(char *buffer, int n, int length)
{
char *p;
short *hc;
@ -471,11 +466,7 @@ cc_sweep0(buffer, n, length)
}
int
cc_sweep(buffer, bufsize, tokens, length)
char *buffer;
int bufsize;
struct cc **tokens;
int length;
cc_sweep(char *buffer, int bufsize, struct cc **tokens, int length)
{
struct cc *p;
char *cp;
@ -648,9 +639,7 @@ cc_sweep(buffer, bufsize, tokens, length)
}
void
cc_sweep_reverse(pp, places)
struct cc **pp;
short *places;
cc_sweep_reverse(struct cc **pp, short int *places)
{
struct cc *p;
short front, back, t;
@ -669,11 +658,7 @@ cc_sweep_reverse(pp, places)
}
void
cc_compress_phase(output, bufsize, tokens, ntoken)
struct cc **output;
int bufsize;
struct cc **tokens;
int ntoken;
cc_compress_phase(struct cc **output, int bufsize, struct cc **tokens, int ntoken)
{
int i;
@ -686,10 +671,7 @@ cc_compress_phase(output, bufsize, tokens, ntoken)
}
void
cc_compress_phase1(output, tokens, ntoken, flag)
struct cc **output;
struct cc **tokens;
int ntoken, flag;
cc_compress_phase1(struct cc **output, struct cc **tokens, int ntoken, int flag)
{
struct cc **pp;
#ifdef STATS
@ -739,9 +721,7 @@ cc_compress_phase1(output, tokens, ntoken, flag)
}
void
cc_compress_cleanup(output, bufsize)
struct cc **output;
int bufsize;
cc_compress_cleanup(struct cc **output, int bufsize)
{
struct cc **end;
@ -776,10 +756,7 @@ cc_compress_cleanup(output, bufsize)
}
int
cc_compress(output, tokens, flag)
struct cc **output;
struct cc **tokens;
char flag;
cc_compress(struct cc **output, struct cc **tokens, char flag)
{
struct cc **pp = tokens;
struct cc *p = *pp++;
@ -889,10 +866,7 @@ cc_compress(output, tokens, flag)
}
void
cc_output_phase(buffer, output, bufsize)
char *buffer;
struct cc **output;
int bufsize;
cc_output_phase(char *buffer, struct cc **output, int bufsize)
{
int i;
struct cc *p, *p1;
@ -931,8 +905,7 @@ cc_output_phase(buffer, output, bufsize)
}
int
cc_token_compare(p1, p2)
const void *p1, *p2;
cc_token_compare(const void *p1, const void *p2)
{
const struct cc **vp1 = (void *)p1;
const struct cc **vp2 = (void *)p2;

View File

@ -1,4 +1,4 @@
/* $NetBSD: context.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $ */
/* $NetBSD: context.c,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)context.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: context.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $");
__RCSID("$NetBSD: context.c,v 1.6 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -57,11 +57,11 @@ __RCSID("$NetBSD: context.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $");
/*
* Context push/pop for nested command files.
*/
int cx_alloc __P((void));
void cx_free __P((void));
int cx_alloc(void);
void cx_free(void);
int
cx_alloc()
cx_alloc(void)
{
struct context *xp;
@ -81,7 +81,7 @@ cx_alloc()
}
void
cx_free()
cx_free(void)
{
struct context *xp;
@ -93,8 +93,7 @@ cx_free()
}
int
cx_beginfile(filename)
char *filename;
cx_beginfile(char *filename)
{
if (cx_alloc() < 0)
return -1;
@ -118,10 +117,7 @@ bad:
}
int
cx_beginbuf(buf, arg, narg)
char *buf;
struct value *arg;
int narg;
cx_beginbuf(char *buf, struct value *arg, int narg)
{
if (cx_alloc() < 0)
return -1;
@ -133,7 +129,7 @@ cx_beginbuf(buf, arg, narg)
}
void
cx_end()
cx_end(void)
{
switch (cx.x_type) {
case X_BUF:

View File

@ -1,4 +1,4 @@
/* $NetBSD: defs.h,v 1.5 1998/10/14 00:58:47 wsanchez Exp $ */
/* $NetBSD: defs.h,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -72,60 +72,60 @@ EXTERN char terse; /* terse mode */
EXTERN char debug; /* debug mode */
EXTERN char incmd; /* in command mode */
void addwin __P((struct ww *, char));
int ccinit __P((void));
void ccend __P((void));
void ccflush __P((void));
void ccreset __P((void));
void ccstart __P((void));
void c_colon __P((void));
void c_debug __P((void));
void c_help __P((void));
void c_move __P((struct ww *));
void c_put __P((void));
void c_quit __P((void));
void c_size __P((struct ww *));
void c_window __P((void));
void c_yank __P((void));
void closeiwin __P((struct ww *));
void closewin __P((struct ww *));
void closewin1 __P((struct ww *));
int cx_beginbuf __P((char *, struct value *, int));
int cx_beginfile __P((char *));
void cx_end __P((void));
void deletewin __P((struct ww *));
void docmd __P((void));
int doconfig __P((void));
void dodefault __P((void));
int dolongcmd __P((char *, struct value *, int));
int dosource __P((char *));
void error __P((const char *, ...));
void err_end __P((void));
int findid __P((void));
struct ww *findselwin __P((void));
void front __P((struct ww *, char));
int getpos __P((int *, int *, int, int, int, int));
struct ww *getwin __P((void));
void labelwin __P((struct ww *));
void mloop __P((void));
int more __P((struct ww *, char));
void movewin __P((struct ww *, int, int));
struct ww *openwin __P((int, int, int, int, int, int, char *, int, int,
char *, char **));
struct ww *openiwin __P((int, char *));
void p_memerror __P((void));
void p_start __P((void));
void reframe __P((void));
void setcmd __P((char));
void setescape __P((char *));
int setlabel __P((struct ww *, char *));
void setselwin __P((struct ww *));
void setterse __P((char));
void setvars __P((void));
void sizewin __P((struct ww *, int, int));
void startwin __P((struct ww *));
void stopwin __P((struct ww *));
int s_gettok __P((void));
void verror __P((const char *, va_list));
void waitnl __P((struct ww *));
int waitnl1 __P((struct ww *, char *));
void addwin(struct ww *, char);
int ccinit(void);
void ccend(void);
void ccflush(void);
void ccreset(void);
void ccstart(void);
void c_colon(void);
void c_debug(void);
void c_help(void);
void c_move(struct ww *);
void c_put(void);
void c_quit(void);
void c_size(struct ww *);
void c_window(void);
void c_yank(void);
void closeiwin(struct ww *);
void closewin(struct ww *);
void closewin1(struct ww *);
int cx_beginbuf(char *, struct value *, int);
int cx_beginfile(char *);
void cx_end(void);
void deletewin(struct ww *);
void docmd(void);
int doconfig(void);
void dodefault(void);
int dolongcmd(char *, struct value *, int);
int dosource(char *);
void error(const char *, ...);
void err_end(void);
int findid(void);
struct ww *findselwin(void);
void front(struct ww *, char);
int getpos(int *, int *, int, int, int, int);
struct ww *getwin(void);
void labelwin(struct ww *);
void mloop(void);
int more(struct ww *, char);
void movewin(struct ww *, int, int);
struct ww *openwin(int, int, int, int, int, int, char *, int, int,
char *, char **);
struct ww *openiwin(int, char *);
void p_memerror(void);
void p_start(void);
void reframe(void);
void setcmd(char);
void setescape(char *);
int setlabel(struct ww *, char *);
void setselwin(struct ww *);
void setterse(char);
void setvars(void);
void sizewin(struct ww *, int, int);
void startwin(struct ww *);
void stopwin(struct ww *);
int s_gettok(void);
void verror(const char *, va_list);
void waitnl(struct ww *);
int waitnl1(struct ww *, char *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: error.c,v 1.4 1997/11/21 08:36:00 lukem Exp $ */
/* $NetBSD: error.c,v 1.5 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)error.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: error.c,v 1.4 1997/11/21 08:36:00 lukem Exp $");
__RCSID("$NetBSD: error.c,v 1.5 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -52,28 +52,17 @@ __RCSID("$NetBSD: error.c,v 1.4 1997/11/21 08:36:00 lukem Exp $");
#define ERRLINES 10 /* number of lines for errwin */
void
#if __STDC__
error(const char *fmt, ...)
#else
error(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
verror(fmt, ap);
va_end(ap);
}
void
verror(fmt, ap)
const char *fmt;
va_list ap;
verror(const char *fmt, va_list ap)
{
struct context *x;
struct ww *w;
@ -112,7 +101,7 @@ verror(fmt, ap)
}
void
err_end()
err_end(void)
{
if (cx.x_type == X_FILE && cx.x_errwin != 0) {
if (!cx.x_noerr)

View File

@ -1,4 +1,4 @@
/* $NetBSD: lcmd.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $ */
/* $NetBSD: lcmd.c,v 1.6 2002/06/14 01:06:52 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lcmd.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: lcmd.c,v 1.5 1998/10/14 00:58:47 wsanchez Exp $");
__RCSID("$NetBSD: lcmd.c,v 1.6 2002/06/14 01:06:52 wiz Exp $");
#endif
#endif /* not lint */
@ -101,8 +101,7 @@ struct lcmd_tab lcmd_tab[] = {
};
struct lcmd_tab *
lcmd_lookup(name)
char *name;
lcmd_lookup(char *name)
{
struct lcmd_tab *p;
@ -113,8 +112,7 @@ lcmd_lookup(name)
}
int
dosource(filename)
char *filename;
dosource(char *filename)
{
if (cx_beginfile(filename) < 0)
return -1;
@ -125,10 +123,7 @@ dosource(filename)
}
int
dolongcmd(buffer, arg, narg)
char *buffer;
struct value *arg;
int narg;
dolongcmd(char *buffer, struct value *arg, int narg)
{
if (cx_beginbuf(buffer, arg, narg) < 0)
return -1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lcmd.h,v 1.4 1997/11/21 08:36:02 lukem Exp $ */
/* $NetBSD: lcmd.h,v 1.5 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -43,7 +43,7 @@
struct lcmd_tab {
char *lc_name;
int lc_minlen;
void (*lc_func) __P((struct value *, struct value *));
void (*lc_func)(struct value *, struct value *);
struct lcmd_arg *lc_arg;
};
@ -60,28 +60,28 @@ struct lcmd_arg {
#define ARG_STR 0x02 /* must be a string */
#define ARG_LIST 0x10 /* this arg can be a list */
struct lcmd_tab *lcmd_lookup __P((char *));
void l_alias __P((struct value *, struct value *));
void l_close __P((struct value *, struct value *));
void l_cursormodes __P((struct value *, struct value *));
void l_debug __P((struct value *, struct value *));
void l_def_nline __P((struct value *, struct value *));
void l_def_shell __P((struct value *, struct value *));
void l_def_smooth __P((struct value *, struct value *));
void l_echo __P((struct value *, struct value *));
void l_escape __P((struct value *, struct value *));
void l_foreground __P((struct value *, struct value *));
void l_iostat __P((struct value *, struct value *));
void l_label __P((struct value *, struct value *));
void l_list __P((struct value *, struct value *));
void l_select __P((struct value *, struct value *));
void l_smooth __P((struct value *, struct value *));
void l_source __P((struct value *, struct value *));
void l_terse __P((struct value *, struct value *));
void l_time __P((struct value *, struct value *));
void l_unalias __P((struct value *, struct value *));
void l_unset __P((struct value *, struct value *));
void l_variable __P((struct value *, struct value *));
void l_window __P((struct value *, struct value *));
void l_write __P((struct value *, struct value *));
struct ww *vtowin __P((struct value *, struct ww *));
struct lcmd_tab *lcmd_lookup(char *);
void l_alias(struct value *, struct value *);
void l_close(struct value *, struct value *);
void l_cursormodes(struct value *, struct value *);
void l_debug(struct value *, struct value *);
void l_def_nline(struct value *, struct value *);
void l_def_shell(struct value *, struct value *);
void l_def_smooth(struct value *, struct value *);
void l_echo(struct value *, struct value *);
void l_escape(struct value *, struct value *);
void l_foreground(struct value *, struct value *);
void l_iostat(struct value *, struct value *);
void l_label(struct value *, struct value *);
void l_list(struct value *, struct value *);
void l_select(struct value *, struct value *);
void l_smooth(struct value *, struct value *);
void l_source(struct value *, struct value *);
void l_terse(struct value *, struct value *);
void l_time(struct value *, struct value *);
void l_unalias(struct value *, struct value *);
void l_unset(struct value *, struct value *);
void l_variable(struct value *, struct value *);
void l_window(struct value *, struct value *);
void l_write(struct value *, struct value *);
struct ww *vtowin(struct value *, struct ww *);

View File

@ -1,4 +1,4 @@
/* $NetBSD: lcmd1.c,v 1.8 1998/10/14 00:58:47 wsanchez Exp $ */
/* $NetBSD: lcmd1.c,v 1.9 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lcmd1.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: lcmd1.c,v 1.8 1998/10/14 00:58:47 wsanchez Exp $");
__RCSID("$NetBSD: lcmd1.c,v 1.9 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -52,7 +52,7 @@ __RCSID("$NetBSD: lcmd1.c,v 1.8 1998/10/14 00:58:47 wsanchez Exp $");
#include "lcmd.h"
#include "var.h"
char vtobool __P((struct value *, char, char));
char vtobool(struct value *, char, char);
struct lcmd_arg arg_window[] = {
{ "row", 1, ARG_NUM },
@ -71,9 +71,7 @@ struct lcmd_arg arg_window[] = {
};
void
l_window(v, a)
struct value *v;
struct value *a;
l_window(struct value *v, struct value *a)
{
struct ww *w;
int col, row, ncol, nrow, id, nline;
@ -146,8 +144,7 @@ struct lcmd_arg arg_def_nline[] = {
};
void
l_def_nline(v, a)
struct value *v, *a;
l_def_nline(struct value *v, struct value *a)
{
v->v_num = default_nline;
v->v_type = V_NUM;
@ -162,8 +159,7 @@ struct lcmd_arg arg_smooth[] = {
};
void
l_smooth(v, a)
struct value *v, *a;
l_smooth(struct value *v, struct value *a)
{
struct ww *w;
@ -184,8 +180,7 @@ struct lcmd_arg arg_def_smooth[] = {
};
void
l_def_smooth(v, a)
struct value *v, *a;
l_def_smooth(struct value *v, struct value *a)
{
v->v_type = V_NUM;
v->v_num = default_smooth;
@ -198,8 +193,7 @@ struct lcmd_arg arg_select[] = {
};
void
l_select(v, a)
struct value *v, *a;
l_select(struct value *v, struct value *a)
{
struct ww *w;
@ -218,8 +212,7 @@ struct lcmd_arg arg_debug[] = {
};
void
l_debug(v, a)
struct value *v, *a;
l_debug(struct value *v, struct value *a)
{
v->v_type = V_NUM;
v->v_num = debug;
@ -232,8 +225,7 @@ struct lcmd_arg arg_escape[] = {
};
void
l_escape(v, a)
struct value *v, *a;
l_escape(struct value *v, struct value *a)
{
char buf[2];
@ -255,9 +247,7 @@ struct lcmd_arg arg_label[] = {
};
void
l_label(v, a)
struct value *v;
struct value *a;
l_label(struct value *v, struct value *a)
{
struct ww *w;
@ -275,8 +265,7 @@ struct lcmd_arg arg_foreground[] = {
};
void
l_foreground(v, a)
struct value *v, *a;
l_foreground(struct value *v, struct value *a)
{
struct ww *w;
char flag;
@ -299,8 +288,7 @@ struct lcmd_arg arg_terse[] = {
};
void
l_terse(v, a)
struct value *v, *a;
l_terse(struct value *v, struct value *a)
{
v->v_type = V_NUM;
v->v_num = terse;
@ -313,8 +301,7 @@ struct lcmd_arg arg_source[] = {
};
void
l_source(v, a)
struct value *v, *a;
l_source(struct value *v, struct value *a)
{
v->v_type = V_NUM;
if (a->v_type != V_ERR && dosource(a->v_str) < 0) {
@ -331,9 +318,7 @@ struct lcmd_arg arg_write[] = {
};
void
l_write(v, a)
struct value *v;
struct value *a;
l_write(struct value *v, struct value *a)
{
char buf[20];
struct ww *w;
@ -357,9 +342,7 @@ struct lcmd_arg arg_close[] = {
};
void
l_close(v, a)
struct value *v;
struct value *a;
l_close(struct value *v, struct value *a)
{
struct ww *w;
@ -377,8 +360,7 @@ struct lcmd_arg arg_cursormodes[] = {
};
void
l_cursormodes(v, a)
struct value *v, *a;
l_cursormodes(struct value *v, struct value *a)
{
v->v_type = V_NUM;
@ -393,8 +375,7 @@ struct lcmd_arg arg_unset[] = {
};
void
l_unset(v, a)
struct value *v, *a;
l_unset(struct value *v, struct value *a)
{
v->v_type = V_NUM;
switch (a->v_type) {
@ -414,9 +395,7 @@ l_unset(v, a)
}
struct ww *
vtowin(v, w)
struct value *v;
struct ww *w;
vtowin(struct value *v, struct ww *w)
{
switch (v->v_type) {
case V_ERR:
@ -437,9 +416,7 @@ vtowin(v, w)
}
char
vtobool(v, def, err)
struct value *v;
char def, err;
vtobool(struct value *v, char def, char err)
{
switch (v->v_type) {
case V_NUM:

View File

@ -1,4 +1,4 @@
/* $NetBSD: lcmd2.c,v 1.11 2000/10/11 19:30:04 thorpej Exp $ */
/* $NetBSD: lcmd2.c,v 1.12 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lcmd2.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: lcmd2.c,v 1.11 2000/10/11 19:30:04 thorpej Exp $");
__RCSID("$NetBSD: lcmd2.c,v 1.12 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -55,13 +55,12 @@ __RCSID("$NetBSD: lcmd2.c,v 1.11 2000/10/11 19:30:04 thorpej Exp $");
#include "lcmd.h"
#include "alias.h"
int printalias __P((void *, struct var *));
int printvar __P((void *, struct var *));
char *strtime __P((struct timeval *t));
int printalias(void *, struct var *);
int printvar(void *, struct var *);
char *strtime(struct timeval *t);
void
l_iostat(v, a)
struct value *v, *a;
l_iostat(struct value *v, struct value *a)
{
struct ww *w;
@ -113,8 +112,7 @@ struct lcmd_arg arg_time[] = {
};
void
l_time(v, a)
struct value *v, *a;
l_time(struct value *v, struct value *a)
{
struct ww *w;
struct rusage rusage;
@ -155,8 +153,7 @@ l_time(v, a)
}
char *
strtime(t)
struct timeval *t;
strtime(struct timeval *t)
{
char fill = 0;
static char buf[20];
@ -184,8 +181,7 @@ strtime(t)
}
void
l_list(v, a)
struct value *v, *a;
l_list(struct value *v, struct value *a)
{
struct ww *w, *wp;
int i;
@ -217,8 +213,7 @@ l_list(v, a)
}
void
l_variable(v, a)
struct value *v, *a;
l_variable(struct value *v, struct value *a)
{
struct ww *w;
@ -232,9 +227,7 @@ l_variable(v, a)
}
int
printvar(vw, r)
void *vw;
struct var *r;
printvar(void *vw, struct var *r)
{
struct ww *w = vw;
if (more(w, 0) == 2)
@ -260,8 +253,7 @@ struct lcmd_arg arg_def_shell[] = {
};
void
l_def_shell(v, a)
struct value *v, *a;
l_def_shell(struct value *v, struct value *a)
{
char **pp;
struct value *vp;
@ -303,8 +295,7 @@ struct lcmd_arg arg_alias[] = {
};
void
l_alias(v, a)
struct value *v, *a;
l_alias(struct value *v, struct value *a)
{
if (a->v_type == V_ERR) {
struct ww *w;
@ -355,9 +346,7 @@ l_alias(v, a)
}
int
printalias(vw, a)
void *vw;
struct alias *a;
printalias(void *vw, struct var *a)
{
struct ww *w = vw;
if (more(w, 0) == 2)
@ -372,8 +361,7 @@ struct lcmd_arg arg_unalias[] = {
};
void
l_unalias(v, a)
struct value *v, *a;
l_unalias(struct value *v, struct value *a)
{
if (a->v_type == ARG_STR)
v->v_num = alias_unset(a->v_str);
@ -387,8 +375,7 @@ struct lcmd_arg arg_echo[] = {
};
void
l_echo(v, a)
struct value *v, *a;
l_echo(struct value *v, struct value *a)
{
char buf[20];
struct ww *w;

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.10 2001/02/19 23:03:53 cgd Exp $ */
/* $NetBSD: main.c,v 1.11 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -46,7 +46,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993\n\
#if 0
static char sccsid[] = "@(#)main.c 8.2 (Berkeley) 4/2/94";
#else
__RCSID("$NetBSD: main.c,v 1.10 2001/02/19 23:03:53 cgd Exp $");
__RCSID("$NetBSD: main.c,v 1.11 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -62,13 +62,11 @@ __RCSID("$NetBSD: main.c,v 1.10 2001/02/19 23:03:53 cgd Exp $");
#include "char.h"
#include "local.h"
int main __P((int, char **));
void usage __P((void));
int main(int, char **);
void usage(void);
int
main(argc, argv)
int argc;
char **argv;
main(int argc, char **argv)
{
char *p;
char fflag = 0;
@ -196,7 +194,7 @@ bad:
}
void
usage()
usage(void)
{
(void) fprintf(stderr,
"Usage: %s [-e escape-char] [-c command] [-t] [-f] [-d]\n",

View File

@ -1,4 +1,4 @@
/* $NetBSD: mloop.c,v 1.6 1997/11/21 08:36:08 lukem Exp $ */
/* $NetBSD: mloop.c,v 1.7 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)mloop.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: mloop.c,v 1.6 1997/11/21 08:36:08 lukem Exp $");
__RCSID("$NetBSD: mloop.c,v 1.7 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -50,7 +50,7 @@ __RCSID("$NetBSD: mloop.c,v 1.6 1997/11/21 08:36:08 lukem Exp $");
#include "defs.h"
void
mloop()
mloop(void)
{
while (!quit) {
if (incmd) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser.h,v 1.5 1998/10/14 00:58:48 wsanchez Exp $ */
/* $NetBSD: parser.h,v 1.6 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -47,19 +47,19 @@
#define p_clearerr() (cx.x_erred = cx.x_synerred = 0)
#define p_abort() (cx.x_abort)
int p_assign __P((char *, struct value *, int));
int p_convstr __P((struct value *v));
void p_error __P((const char *msg, ...));
int p_expr __P((struct value *, char));
int p_expr0 __P((struct value *, char));
int p_expr1 __P((struct value *, char));
int p_expr11 __P((struct value *, char));
int p_expr12 __P((struct value *, char));
int p_expr2 __P((struct value *, char));
int p_expr3_10 __P((int, struct value *, char));
int p_expression __P((char));
int p_function __P((char *, struct value *, int));
int p_if __P((char));
int p_statement __P((char));
void p_statementlist __P((char));
void p_synerror __P((void));
int p_assign(char *, struct value *, int);
int p_convstr(struct value *v);
void p_error(const char *msg, ...);
int p_expr(struct value *, char);
int p_expr0(struct value *, char);
int p_expr1(struct value *, char);
int p_expr11(struct value *, char);
int p_expr12(struct value *, char);
int p_expr2(struct value *, char);
int p_expr3_10(int, struct value *, char);
int p_expression(char);
int p_function(char *, struct value *, int);
int p_if(char);
int p_statement(char);
void p_statementlist(char);
void p_synerror(void);

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser1.c,v 1.4 1997/11/21 08:36:11 lukem Exp $ */
/* $NetBSD: parser1.c,v 1.5 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser1.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: parser1.c,v 1.4 1997/11/21 08:36:11 lukem Exp $");
__RCSID("$NetBSD: parser1.c,v 1.5 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -49,7 +49,7 @@ __RCSID("$NetBSD: parser1.c,v 1.4 1997/11/21 08:36:11 lukem Exp $");
#include "parser.h"
void
p_start()
p_start(void)
{
char flag = 1;
@ -72,16 +72,14 @@ p_start()
}
void
p_statementlist(flag)
char flag;
p_statementlist(char flag)
{
for (; p_statement(flag) >= 0; p_clearerr())
;
}
int
p_statement(flag)
char flag;
p_statement(char flag)
{
switch (token) {
case T_EOL:
@ -95,8 +93,7 @@ p_statement(flag)
}
int
p_if(flag)
char flag;
p_if(char flag)
{
struct value t;
char true = 0;
@ -150,8 +147,7 @@ top:
}
int
p_expression(flag)
char flag;
p_expression(char flag)
{
struct value t;
char *cmd;
@ -196,8 +192,7 @@ p_expression(flag)
}
int
p_convstr(v)
struct value *v;
p_convstr(struct value *v)
{
if (v->v_type != V_NUM)
return 0;
@ -211,7 +206,7 @@ p_convstr(v)
}
void
p_synerror()
p_synerror(void)
{
if (!cx.x_synerred) {
cx.x_synerred = cx.x_erred = 1;
@ -220,20 +215,11 @@ p_synerror()
}
void
#if __STDC__
p_error(const char *msg, ...)
#else
p_error(msg, ..)
char *msg;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, msg);
#else
va_start(ap);
#endif
if (!cx.x_erred) {
cx.x_erred = 1;
verror(msg, ap);
@ -242,7 +228,7 @@ p_error(msg, ..)
}
void
p_memerror()
p_memerror(void)
{
cx.x_erred = cx.x_abort = 1;
error("Out of memory.");

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser2.c,v 1.6 1998/10/14 00:58:48 wsanchez Exp $ */
/* $NetBSD: parser2.c,v 1.7 2002/06/14 01:06:53 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser2.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: parser2.c,v 1.6 1998/10/14 00:58:48 wsanchez Exp $");
__RCSID("$NetBSD: parser2.c,v 1.7 2002/06/14 01:06:53 wiz Exp $");
#endif
#endif /* not lint */
@ -59,10 +59,7 @@ __RCSID("$NetBSD: parser2.c,v 1.6 1998/10/14 00:58:48 wsanchez Exp $");
* want to parse the arguments anyway. flag == 0 in this case.
*/
int
p_function(name, v, flag)
char *name;
struct value *v;
int flag;
p_function(char *name, struct value *v, int flag)
{
struct value t;
struct lcmd_tab *c = 0;
@ -222,10 +219,7 @@ abort:
}
int
p_assign(name, v, flag)
char *name;
struct value *v;
char flag;
p_assign(char *name, struct value *v, int flag)
{
(void) s_gettok();

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser3.c,v 1.4 1997/11/21 08:36:14 lukem Exp $ */
/* $NetBSD: parser3.c,v 1.5 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser3.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: parser3.c,v 1.4 1997/11/21 08:36:14 lukem Exp $");
__RCSID("$NetBSD: parser3.c,v 1.5 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -64,9 +64,7 @@ __RCSID("$NetBSD: parser3.c,v 1.4 1997/11/21 08:36:14 lukem Exp $");
* unary - + ~ !
*/
int
p_expr(v, flag)
struct value *v;
char flag;
p_expr(struct value *v, char flag)
{
struct value t;
int ret;
@ -95,9 +93,7 @@ p_expr(v, flag)
* ? :
*/
int
p_expr0(v, flag)
struct value *v;
char flag;
p_expr0(struct value *v, char flag)
{
struct value t;
char true = 0;
@ -135,9 +131,7 @@ p_expr0(v, flag)
* ||
*/
int
p_expr1(v, flag)
struct value *v;
char flag;
p_expr1(struct value *v, char flag)
{
char true = 0;
@ -170,9 +164,7 @@ p_expr1(v, flag)
* &&
*/
int
p_expr2(v, flag)
struct value *v;
char flag;
p_expr2(struct value *v, char flag)
{
char true = 1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser4.c,v 1.6 1997/11/21 08:36:15 lukem Exp $ */
/* $NetBSD: parser4.c,v 1.7 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser4.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: parser4.c,v 1.6 1997/11/21 08:36:15 lukem Exp $");
__RCSID("$NetBSD: parser4.c,v 1.7 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -60,10 +60,7 @@ __RCSID("$NetBSD: parser4.c,v 1.6 1997/11/21 08:36:15 lukem Exp $");
* * / % 10
*/
int
p_expr3_10(level, v, flag)
int level;
struct value *v;
char flag;
p_expr3_10(int level, struct value *v, char flag)
{
struct value l, r;
int op;

View File

@ -1,4 +1,4 @@
/* $NetBSD: parser5.c,v 1.4 1997/11/21 08:36:16 lukem Exp $ */
/* $NetBSD: parser5.c,v 1.5 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)parser5.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: parser5.c,v 1.4 1997/11/21 08:36:16 lukem Exp $");
__RCSID("$NetBSD: parser5.c,v 1.5 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -53,9 +53,7 @@ __RCSID("$NetBSD: parser5.c,v 1.4 1997/11/21 08:36:16 lukem Exp $");
* unary $ $? + - ! ~
*/
int
p_expr11(v, flag)
struct value *v;
char flag;
p_expr11(struct value *v, char flag)
{
int op;
char *opname;
@ -156,9 +154,7 @@ p_expr11(v, flag)
* Always return v_type == V_ERR when flag == 0.
*/
int
p_expr12(v, flag)
struct value *v;
char flag;
p_expr12(struct value *v, char flag)
{
v->v_type = V_ERR;
switch (token) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: scanner.c,v 1.7 2000/07/03 02:51:38 matt Exp $ */
/* $NetBSD: scanner.c,v 1.8 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)scanner.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: scanner.c,v 1.7 2000/07/03 02:51:38 matt Exp $");
__RCSID("$NetBSD: scanner.c,v 1.8 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -52,12 +52,12 @@ __RCSID("$NetBSD: scanner.c,v 1.7 2000/07/03 02:51:38 matt Exp $");
#include "context.h"
#include "window_string.h"
int s_getc __P((void));
int s_gettok1 __P((void));
int s_ungetc __P((int));
int s_getc(void);
int s_gettok1(void);
int s_ungetc(int);
int
s_getc()
s_getc(void)
{
int c;
@ -82,8 +82,7 @@ s_getc()
}
int
s_ungetc(c)
int c;
s_ungetc(int c)
{
if (c == EOF)
return EOF;
@ -102,7 +101,7 @@ s_ungetc(c)
}
int
s_gettok()
s_gettok(void)
{
char buf[100];
char *p = buf;
@ -557,7 +556,7 @@ loop:
}
int
s_gettok1()
s_gettok1(void)
{
int c;
int n;

View File

@ -1,4 +1,4 @@
/* $NetBSD: startup.c,v 1.5 1997/11/21 08:36:19 lukem Exp $ */
/* $NetBSD: startup.c,v 1.6 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)startup.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: startup.c,v 1.5 1997/11/21 08:36:19 lukem Exp $");
__RCSID("$NetBSD: startup.c,v 1.6 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -52,7 +52,7 @@ __RCSID("$NetBSD: startup.c,v 1.5 1997/11/21 08:36:19 lukem Exp $");
#include "local.h"
int
doconfig()
doconfig(void)
{
char buf[100];
char *home;
@ -70,7 +70,7 @@ doconfig()
* The default is two windows of equal size.
*/
void
dodefault()
dodefault(void)
{
struct ww *w;
int r = wwnrow / 2 - 1;
@ -87,7 +87,7 @@ dodefault()
}
void
setvars()
setvars(void)
{
/* try to use a random ordering to balance the tree */
(void) var_setnum("nrow", wwnrow);

View File

@ -1,4 +1,4 @@
/* $NetBSD: string.c,v 1.7 1998/10/14 00:58:48 wsanchez Exp $ */
/* $NetBSD: string.c,v 1.8 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)string.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: string.c,v 1.7 1998/10/14 00:58:48 wsanchez Exp $");
__RCSID("$NetBSD: string.c,v 1.8 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ __RCSID("$NetBSD: string.c,v 1.7 1998/10/14 00:58:48 wsanchez Exp $");
#undef EXTERN
char *
str_cpy(s)
char *s;
str_cpy(char *s)
{
char *str;
char *p;
@ -68,9 +67,7 @@ str_cpy(s)
}
char *
str_ncpy(s, n)
char *s;
int n;
str_ncpy(char *s, int n)
{
int l = strlen(s);
char *str;
@ -88,8 +85,7 @@ str_ncpy(s, n)
}
char *
str_itoa(i)
int i;
str_itoa(int i)
{
char buf[30];
@ -98,8 +94,7 @@ str_itoa(i)
}
char *
str_cat(s1, s2)
char *s1, *s2;
str_cat(char *s1, char *s2)
{
char *str;
char *p, *q;
@ -119,9 +114,7 @@ str_cat(s1, s2)
* s can be a prefix of p with at least min characters.
*/
int
str_match(s, p, min)
char *s, *p;
int min;
str_match(char *s, char *p, int min)
{
for (; *s && *p && *s == *p; s++, p++, min--)
;
@ -130,8 +123,7 @@ str_match(s, p, min)
#ifdef STR_DEBUG
char *
str_alloc(l)
size_t l;
str_alloc(size_t l)
{
struct string *s;
@ -148,8 +140,7 @@ str_alloc(l)
}
void
str_free(str)
char *str;
str_free(char *str)
{
struct string *s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tt.h,v 1.6 1999/10/04 23:31:30 lukem Exp $ */
/* $NetBSD: tt.h,v 1.7 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -49,35 +49,35 @@
*/
struct tt {
/* startup and cleanup */
void (*tt_start) __P((void));
void (*tt_reset) __P((void));
void (*tt_end) __P((void));
void (*tt_start)(void);
void (*tt_reset)(void);
void (*tt_end)(void);
/* terminal functions */
void (*tt_move) __P((int, int));
void (*tt_insline) __P((int));
void (*tt_delline) __P((int));
void (*tt_inschar) __P((char));
void (*tt_insspace) __P((int));
void (*tt_delchar) __P((int));
void (*tt_write) __P((char *, int)); /* write a whole block */
void (*tt_putc) __P((char)); /* write one character */
void (*tt_clreol) __P((void));
void (*tt_clreos) __P((void));
void (*tt_clear) __P((void));
void (*tt_scroll_down) __P((int));
void (*tt_scroll_up) __P((int));
void (*tt_setscroll) __P((int, int));/* set scrolling region */
void (*tt_setmodes) __P((int)); /* set display modes */
void (*tt_set_token) __P((int, char *, int));
void (*tt_move)(int, int);
void (*tt_insline)(int);
void (*tt_delline)(int);
void (*tt_inschar)(char);
void (*tt_insspace)(int);
void (*tt_delchar)(int);
void (*tt_write)(char *, int); /* write a whole block */
void (*tt_putc)(char); /* write one character */
void (*tt_clreol)(void);
void (*tt_clreos)(void);
void (*tt_clear)(void);
void (*tt_scroll_down)(int);
void (*tt_scroll_up)(int);
void (*tt_setscroll)(int, int);/* set scrolling region */
void (*tt_setmodes)(int); /* set display modes */
void (*tt_set_token)(int, char *, int);
/* define a token */
void (*tt_put_token) __P((int, char *, int));
void (*tt_put_token)(int, char *, int);
/* refer to a defined token */
void (*tt_compress) __P((int)); /* begin, end compression */
void (*tt_checksum) __P((char *, int));
void (*tt_compress)(int); /* begin, end compression */
void (*tt_checksum)(char *, int);
/* compute checksum */
void (*tt_checkpoint) __P((void)); /* checkpoint protocol */
int (*tt_rint) __P((char *, int)); /* input processing */
void (*tt_checkpoint)(void); /* checkpoint protocol */
int (*tt_rint)(char *, int); /* input processing */
/* internal variables */
char tt_modes; /* the current display modes */
@ -106,7 +106,7 @@ struct tt {
short *tt_frame;
/* ttflush() hook */
void (*tt_flush) __P((void));
void (*tt_flush)(void);
};
EXTERN struct tt tt;
@ -122,7 +122,7 @@ EXTERN struct tt tt;
struct tt_tab {
char *tt_name;
int tt_len;
int (*tt_func) __P((void));
int (*tt_func)(void);
};
EXTERN struct tt_tab tt_tab[];
@ -138,28 +138,28 @@ struct tt_str {
int ts_n;
};
struct tt_str *tttgetstr __P((char *));
struct tt_str *ttxgetstr __P((char *)); /* tgetstr() and expand delays */
struct tt_str *tttgetstr(char *);
struct tt_str *ttxgetstr(char *); /* tgetstr() and expand delays */
int tt_f100 __P((void));
int tt_generic __P((void));
int tt_h19 __P((void));
int tt_h29 __P((void));
int tt_tvi925 __P((void));
int tt_wyse60 __P((void));
int tt_wyse75 __P((void));
int tt_zapple __P((void));
int tt_zentec __P((void));
void ttflush __P((void));
struct tt_str *tttgetstr __P((char *));
int ttinit __P((void));
void ttpgoto __P((struct tt_str *, int, int, int));
void ttputs __P((char *));
int ttstrcmp __P((struct tt_str *, struct tt_str *));
void tttgoto __P((struct tt_str *, int, int));
int tttputc __P((int));
void ttwrite __P((char *, int));
int ttxputc __P((int));
int tt_f100(void);
int tt_generic(void);
int tt_h19(void);
int tt_h29(void);
int tt_tvi925(void);
int tt_wyse60(void);
int tt_wyse75(void);
int tt_zapple(void);
int tt_zentec(void);
void ttflush(void);
struct tt_str *tttgetstr(char *);
int ttinit(void);
void ttpgoto(struct tt_str *, int, int, int);
void ttputs(char *);
int ttstrcmp(struct tt_str *, struct tt_str *);
void tttgoto(struct tt_str *, int, int);
int tttputc(int);
void ttwrite(char *, int);
int ttxputc(int);
#define tttputs(s, n) tputs((s)->ts_str, (n), tttputc)
#define ttxputs(s) ttwrite((s)->ts_str, (s)->ts_n)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttf100.c,v 1.4 1997/11/21 08:36:27 lukem Exp $ */
/* $NetBSD: ttf100.c,v 1.5 2002/06/14 01:06:54 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttf100.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttf100.c,v 1.4 1997/11/21 08:36:27 lukem Exp $");
__RCSID("$NetBSD: ttf100.c,v 1.5 2002/06/14 01:06:54 wiz Exp $");
#endif
#endif /* not lint */
@ -62,7 +62,7 @@ short f100_frame[16] = {
extern struct tt_str *gen_AE, *gen_AS;
int
tt_f100()
tt_f100(void)
{
static struct tt_str ae = { "\033%", 2 };
static struct tt_str as = { "\033$", 2 };

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttgeneric.c,v 1.5 1998/08/25 20:59:43 ross Exp $ */
/* $NetBSD: ttgeneric.c,v 1.6 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttgeneric.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttgeneric.c,v 1.5 1998/08/25 20:59:43 ross Exp $");
__RCSID("$NetBSD: ttgeneric.c,v 1.6 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -128,28 +128,27 @@ int gen_LI;
int gen_UG;
int gen_SG;
void gen_clear __P((void));
void gen_clreol __P((void));
void gen_clreos __P((void));
void gen_delchar __P((int));
void gen_delline __P((int));
void gen_end __P((void));
void gen_inschar __P((char));
void gen_insline __P((int));
void gen_insspace __P((int));
void gen_move __P((int, int));
void gen_putc __P((char));
void gen_scroll_down __P((int));
void gen_scroll_up __P((int));
void gen_setinsert __P((char));
void gen_setmodes __P((int));
void gen_setscroll __P((int, int));
void gen_start __P((void));
void gen_write __P((char *, int));
void gen_clear(void);
void gen_clreol(void);
void gen_clreos(void);
void gen_delchar(int);
void gen_delline(int);
void gen_end(void);
void gen_inschar(char);
void gen_insline(int);
void gen_insspace(int);
void gen_move(int, int);
void gen_putc(char);
void gen_scroll_down(int);
void gen_scroll_up(int);
void gen_setinsert(char);
void gen_setmodes(int);
void gen_setscroll(int, int);
void gen_start(void);
void gen_write(char *, int);
void
gen_setinsert(new)
char new;
gen_setinsert(char new)
{
if (new) {
if (gen_IM)
@ -161,8 +160,7 @@ gen_setinsert(new)
}
void
gen_setmodes(new)
int new;
gen_setmodes(int new)
{
int diff;
@ -203,8 +201,7 @@ gen_setmodes(new)
}
void
gen_insline(n)
int n;
gen_insline(int n)
{
if (tt.tt_modes) /* for concept 100 */
gen_setmodes(0);
@ -216,8 +213,7 @@ gen_insline(n)
}
void
gen_delline(n)
int n;
gen_delline(int n)
{
if (tt.tt_modes) /* for concept 100 */
gen_setmodes(0);
@ -229,8 +225,7 @@ gen_delline(n)
}
void
gen_putc(c)
char c;
gen_putc(char c)
{
if (tt.tt_insert)
gen_setinsert(0);
@ -248,9 +243,7 @@ gen_putc(c)
}
void
gen_write(p, n)
char *p;
int n;
gen_write(char *p, int n)
{
if (tt.tt_insert)
gen_setinsert(0);
@ -269,8 +262,7 @@ gen_write(p, n)
}
void
gen_move(row, col)
int row, col;
gen_move(int row, int col)
{
if (tt.tt_row == row && tt.tt_col == col)
return;
@ -319,7 +311,7 @@ out:
}
void
gen_start()
gen_start(void)
{
if (gen_VS)
ttxputs(gen_VS);
@ -332,7 +324,7 @@ gen_start()
}
void
gen_end()
gen_end(void)
{
if (tt.tt_insert)
gen_setinsert(0);
@ -343,7 +335,7 @@ gen_end()
}
void
gen_clreol()
gen_clreol(void)
{
if (tt.tt_modes) /* for concept 100 */
gen_setmodes(0);
@ -351,7 +343,7 @@ gen_clreol()
}
void
gen_clreos()
gen_clreos(void)
{
if (tt.tt_modes) /* for concept 100 */
gen_setmodes(0);
@ -359,7 +351,7 @@ gen_clreos()
}
void
gen_clear()
gen_clear(void)
{
if (tt.tt_modes) /* for concept 100 */
gen_setmodes(0);
@ -367,8 +359,7 @@ gen_clear()
}
void
gen_inschar(c)
char c;
gen_inschar(char c)
{
if (!tt.tt_insert)
gen_setinsert(1);
@ -390,8 +381,7 @@ gen_inschar(c)
}
void
gen_insspace(n)
int n;
gen_insspace(int n)
{
if (gen_ICn)
ttpgoto(gen_ICn, 0, n, gen_CO - tt.tt_col);
@ -401,8 +391,7 @@ gen_insspace(n)
}
void
gen_delchar(n)
int n;
gen_delchar(int n)
{
if (gen_DCn)
ttpgoto(gen_DCn, 0, n, gen_CO - tt.tt_col);
@ -412,8 +401,7 @@ gen_delchar(n)
}
void
gen_scroll_down(n)
int n;
gen_scroll_down(int n)
{
gen_move(tt.tt_scroll_bot, 0);
if (gen_SFn)
@ -424,8 +412,7 @@ gen_scroll_down(n)
}
void
gen_scroll_up(n)
int n;
gen_scroll_up(int n)
{
gen_move(tt.tt_scroll_top, 0);
if (gen_SRn)
@ -436,8 +423,7 @@ gen_scroll_up(n)
}
void
gen_setscroll(top, bot)
int top, bot;
gen_setscroll(int top, int bot)
{
tttgoto(gen_CS, bot, top);
tt.tt_scroll_top = top;
@ -446,7 +432,7 @@ gen_setscroll(top, bot)
}
int
tt_generic()
tt_generic(void)
{
gen_PC = tttgetstr("pc");
PC = gen_PC ? *gen_PC->ts_str : 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tth19.c,v 1.4 1997/11/21 08:36:30 lukem Exp $ */
/* $NetBSD: tth19.c,v 1.5 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tth19.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: tth19.c,v 1.4 1997/11/21 08:36:30 lukem Exp $");
__RCSID("$NetBSD: tth19.c,v 1.5 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -87,25 +87,24 @@ int h19_msp10c;
#define H19_SETINSERT(m) ttesc((tt.tt_insert = (m)) ? '@' : 'O')
void h19_clear __P((void));
void h19_clreol __P((void));
void h19_clreos __P((void));
void h19_delchar __P((int));
void h19_delline __P((int));
void h19_end __P((void));
void h19_inschar __P((char));
void h19_insline __P((int));
void h19_move __P((int, int));
void h19_putc __P((char));
void h19_scroll_up __P((int));
void h19_scroll_down __P((int));
void h19_setmodes __P((int));
void h19_start __P((void));
void h19_write __P((char *, int));
void h19_clear(void);
void h19_clreol(void);
void h19_clreos(void);
void h19_delchar(int);
void h19_delline(int);
void h19_end(void);
void h19_inschar(char);
void h19_insline(int);
void h19_move(int, int);
void h19_putc(char);
void h19_scroll_up(int);
void h19_scroll_down(int);
void h19_setmodes(int);
void h19_start(void);
void h19_write(char *, int);
void
h19_setmodes(new)
int new;
h19_setmodes(int new)
{
int diff;
@ -118,8 +117,7 @@ h19_setmodes(new)
}
void
h19_insline(n)
int n;
h19_insline(int n)
{
while (--n >= 0) {
ttesc('L');
@ -128,8 +126,7 @@ h19_insline(n)
}
void
h19_delline(n)
int n;
h19_delline(int n)
{
while (--n >= 0) {
ttesc('M');
@ -138,8 +135,7 @@ h19_delline(n)
}
void
h19_putc(c)
char c;
h19_putc(char c)
{
if (tt.tt_nmodes != tt.tt_modes)
(*tt.tt_setmodes)(tt.tt_nmodes);
@ -151,9 +147,7 @@ h19_putc(c)
}
void
h19_write(p, n)
char *p;
int n;
h19_write(char *p, int n)
{
if (tt.tt_nmodes != tt.tt_modes)
(*tt.tt_setmodes)(tt.tt_nmodes);
@ -166,8 +160,7 @@ h19_write(p, n)
}
void
h19_move(row, col)
int row, col;
h19_move(int row, int col)
{
if (tt.tt_row == row) {
if (tt.tt_col == col)
@ -208,7 +201,7 @@ out:
}
void
h19_start()
h19_start(void)
{
if (gen_VS)
ttxputs(gen_VS);
@ -220,7 +213,7 @@ h19_start()
}
void
h19_end()
h19_end(void)
{
if (tt.tt_insert)
H19_SETINSERT(0);
@ -230,26 +223,25 @@ h19_end()
}
void
h19_clreol()
h19_clreol(void)
{
ttesc('K');
}
void
h19_clreos()
h19_clreos(void)
{
ttesc('J');
}
void
h19_clear()
h19_clear(void)
{
ttesc('E');
}
void
h19_inschar(c)
char c;
h19_inschar(char c)
{
if (tt.tt_nmodes != tt.tt_modes)
(*tt.tt_setmodes)(tt.tt_nmodes);
@ -263,16 +255,14 @@ h19_inschar(c)
}
void
h19_delchar(n)
int n;
h19_delchar(int n)
{
while (--n >= 0)
ttesc('N');
}
void
h19_scroll_down(n)
int n;
h19_scroll_down(int n)
{
h19_move(NROW - 1, 0);
while (--n >= 0)
@ -280,8 +270,7 @@ h19_scroll_down(n)
}
void
h19_scroll_up(n)
int n;
h19_scroll_up(int n)
{
h19_move(0, 0);
while (--n >= 0)
@ -289,7 +278,7 @@ h19_scroll_up(n)
}
int
tt_h19()
tt_h19(void)
{
float cpms = (float) wwbaud / 10000; /* char per ms */

View File

@ -1,4 +1,4 @@
/* $NetBSD: tth29.c,v 1.4 1997/11/21 08:36:31 lukem Exp $ */
/* $NetBSD: tth29.c,v 1.5 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tth29.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: tth29.c,v 1.4 1997/11/21 08:36:31 lukem Exp $");
__RCSID("$NetBSD: tth29.c,v 1.5 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -65,11 +65,10 @@ kC|h29|heath-29|z29|zenith-29:\
*
*/
void h29_setmodes __P((int));
void h29_setmodes(int);
void
h29_setmodes(new)
int new;
h29_setmodes(int new)
{
int modes = '0';
@ -95,7 +94,7 @@ h29_setmodes(new)
}
int
tt_h29()
tt_h29(void)
{
if (tt_h19() < 0)
return -1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttinit.c,v 1.5 1998/10/15 01:49:04 briggs Exp $ */
/* $NetBSD: ttinit.c,v 1.6 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttinit.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttinit.c,v 1.5 1998/10/15 01:49:04 briggs Exp $");
__RCSID("$NetBSD: ttinit.c,v 1.6 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -72,7 +72,7 @@ struct tt_tab tt_tab[] = {
};
int
ttinit()
ttinit(void)
{
int i;
struct tt_tab *tp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttoutput.c,v 1.4 1997/11/21 08:36:34 lukem Exp $ */
/* $NetBSD: ttoutput.c,v 1.5 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttoutput.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttoutput.c,v 1.4 1997/11/21 08:36:34 lukem Exp $");
__RCSID("$NetBSD: ttoutput.c,v 1.5 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -57,7 +57,7 @@ __RCSID("$NetBSD: ttoutput.c,v 1.4 1997/11/21 08:36:34 lukem Exp $");
*/
void
ttflush()
ttflush(void)
{
char *p;
int n = tt_obp - tt_ob;
@ -92,17 +92,14 @@ ttflush()
}
void
ttputs(s)
char *s;
ttputs(char *s)
{
while (*s)
ttputc(*s++);
}
void
ttwrite(s, n)
char *s;
int n;
ttwrite(char *s, int n)
{
switch (n) {
case 0:

View File

@ -1,4 +1,4 @@
/* $NetBSD: tttermcap.c,v 1.6 2000/07/03 02:51:39 matt Exp $ */
/* $NetBSD: tttermcap.c,v 1.7 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tttermcap.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: tttermcap.c,v 1.6 2000/07/03 02:51:39 matt Exp $");
__RCSID("$NetBSD: tttermcap.c,v 1.7 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -51,24 +51,21 @@ __RCSID("$NetBSD: tttermcap.c,v 1.6 2000/07/03 02:51:39 matt Exp $");
#include "tt.h"
int
tttputc(c)
int c;
tttputc(int c)
{
ttputc(c);
return (0);
}
int
ttxputc(c)
int c;
ttxputc(int c)
{
*tt_strp++ = c;
return (0);
}
struct tt_str *
tttgetstr(str)
char *str;
tttgetstr(char *str)
{
struct tt_str *s;
@ -82,8 +79,7 @@ tttgetstr(str)
}
struct tt_str *
ttxgetstr(str)
char *str;
ttxgetstr(char *str)
{
struct tt_str *s;
char buf[100];
@ -101,9 +97,7 @@ ttxgetstr(str)
}
void
tttgoto(s, col, row)
struct tt_str *s;
int col, row;
tttgoto(struct tt_str *s, int col, int row)
{
char *p = s->ts_str;
@ -113,17 +107,14 @@ tttgoto(s, col, row)
}
void
ttpgoto(s, col, row, n)
struct tt_str *s;
int col, row, n;
ttpgoto(struct tt_str *s, int col, int row, int n)
{
tputs(tgoto(s->ts_str, col, row), n, tttputc);
}
int
ttstrcmp(a, b)
struct tt_str *a, *b;
ttstrcmp(struct tt_str *a, struct tt_str *b)
{
int n, r;

View File

@ -1,4 +1,4 @@
/* $NetBSD: tttvi925.c,v 1.4 1997/11/21 08:36:37 lukem Exp $ */
/* $NetBSD: tttvi925.c,v 1.5 2002/06/14 01:06:55 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)tttvi925.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: tttvi925.c,v 1.4 1997/11/21 08:36:37 lukem Exp $");
__RCSID("$NetBSD: tttvi925.c,v 1.5 2002/06/14 01:06:55 wiz Exp $");
#endif
#endif /* not lint */
@ -61,7 +61,7 @@ short tvi925_frame[16] = {
};
int
tt_tvi925()
tt_tvi925(void)
{
if (tt_generic() < 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttwyse60.c,v 1.4 1997/11/21 08:36:39 lukem Exp $ */
/* $NetBSD: ttwyse60.c,v 1.5 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright 1987 by David C. Elliott, MIPS Computer Systems.
@ -48,7 +48,7 @@
#if 0
static char sccsid[] = "@(#)ttwyse60.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttwyse60.c,v 1.4 1997/11/21 08:36:39 lukem Exp $");
__RCSID("$NetBSD: ttwyse60.c,v 1.5 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -67,7 +67,7 @@ extern struct tt_str *gen_AS;
extern struct tt_str *gen_AE;
int
tt_wyse60()
tt_wyse60(void)
{
static struct tt_str ae = { "\033H\003", 3 };
static struct tt_str as = { "\033H\002", 3 };

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttwyse75.c,v 1.4 1997/11/21 08:36:40 lukem Exp $ */
/* $NetBSD: ttwyse75.c,v 1.5 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright 1987 by David C. Elliott, MIPS Computer Systems.
@ -48,7 +48,7 @@
#if 0
static char sccsid[] = "@(#)ttwyse75.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttwyse75.c,v 1.4 1997/11/21 08:36:40 lukem Exp $");
__RCSID("$NetBSD: ttwyse75.c,v 1.5 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -67,7 +67,7 @@ extern struct tt_str *gen_AS;
extern struct tt_str *gen_AE;
int
tt_wyse75()
tt_wyse75(void)
{
static struct tt_str ae = { "\033(B", 3 };
static struct tt_str as = { "\033(0", 3 };

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttzapple.c,v 1.5 1998/12/20 15:01:30 christos Exp $ */
/* $NetBSD: ttzapple.c,v 1.6 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1989, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttzapple.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttzapple.c,v 1.5 1998/12/20 15:01:30 christos Exp $");
__RCSID("$NetBSD: ttzapple.c,v 1.6 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -75,33 +75,32 @@ int zz_lastc;
/* for checkpointing */
int zz_sum;
void zz_checkpoint __P((void));
void zz_checksum __P((char *, int));
void zz_clear __P((void));
void zz_clreol __P((void));
void zz_clreos __P((void));
void zz_compress __P((int));
void zz_delchar __P((int));
void zz_delline __P((int));
void zz_end __P((void));
void zz_insline __P((int));
void zz_insspace __P((int));
void zz_move __P((int, int));
void zz_put_token __P((int, char *, int));
void zz_putc __P((char));
void zz_reset __P((void));
int zz_rint __P((char *, int));
void zz_scroll_down __P((int));
void zz_scroll_up __P((int));
void zz_setmodes __P((int));
void zz_setscroll __P((int, int));
void zz_set_token __P((int, char *, int));
void zz_start __P((void));
void zz_write __P((char *, int));
void zz_checkpoint(void);
void zz_checksum(char *, int);
void zz_clear(void);
void zz_clreol(void);
void zz_clreos(void);
void zz_compress(int);
void zz_delchar(int);
void zz_delline(int);
void zz_end(void);
void zz_insline(int);
void zz_insspace(int);
void zz_move(int, int);
void zz_put_token(int, char *, int);
void zz_putc(char);
void zz_reset(void);
int zz_rint(char *, int);
void zz_scroll_down(int);
void zz_scroll_up(int);
void zz_setmodes(int);
void zz_setscroll(int, int);
void zz_set_token(int, char *, int);
void zz_start(void);
void zz_write(char *, int);
void
zz_setmodes(new)
int new;
zz_setmodes(int new)
{
if (new & WWM_REV) {
if ((tt.tt_modes & WWM_REV) == 0)
@ -113,8 +112,7 @@ zz_setmodes(new)
}
void
zz_insline(n)
int n;
zz_insline(int n)
{
if (n == 1)
ttesc('a');
@ -125,8 +123,7 @@ zz_insline(n)
}
void
zz_delline(n)
int n;
zz_delline(int n)
{
if (n == 1)
ttesc('d');
@ -137,8 +134,7 @@ zz_delline(n)
}
void
zz_putc(c)
char c;
zz_putc(char c)
{
if (tt.tt_nmodes != tt.tt_modes)
zz_setmodes(tt.tt_nmodes);
@ -148,9 +144,7 @@ zz_putc(c)
}
void
zz_write(p, n)
char *p;
int n;
zz_write(char *p, int n)
{
if (tt.tt_nmodes != tt.tt_modes)
zz_setmodes(tt.tt_nmodes);
@ -161,8 +155,7 @@ zz_write(p, n)
}
void
zz_move(row, col)
int row, col;
zz_move(int row, int col)
{
int x;
@ -258,7 +251,7 @@ out:
}
void
zz_start()
zz_start(void)
{
ttesc('T');
ttputc(TOKEN_MAX + ' ');
@ -275,7 +268,7 @@ zz_start()
}
void
zz_reset()
zz_reset(void)
{
zz_setscroll(0, NROW - 1);
tt.tt_modes = WWM_REV;
@ -284,7 +277,7 @@ zz_reset()
}
void
zz_end()
zz_end(void)
{
ttesc('T');
ttputc(' ');
@ -294,27 +287,26 @@ zz_end()
}
void
zz_clreol()
zz_clreol(void)
{
ttesc('2');
}
void
zz_clreos()
zz_clreos(void)
{
ttesc('3');
}
void
zz_clear()
zz_clear(void)
{
ttesc('4');
tt.tt_col = tt.tt_row = 0;
}
void
zz_insspace(n)
int n;
zz_insspace(int n)
{
if (n == 1)
ttesc('i');
@ -325,8 +317,7 @@ zz_insspace(n)
}
void
zz_delchar(n)
int n;
zz_delchar(int n)
{
if (n == 1)
ttesc('c');
@ -337,8 +328,7 @@ zz_delchar(n)
}
void
zz_scroll_down(n)
int n;
zz_scroll_down(int n)
{
if (n == 1) {
if (tt.tt_row == NROW - 1)
@ -352,8 +342,7 @@ zz_scroll_down(n)
}
void
zz_scroll_up(n)
int n;
zz_scroll_up(int n)
{
if (n == 1)
ttesc('r');
@ -364,8 +353,7 @@ zz_scroll_up(n)
}
void
zz_setscroll(top, bot)
int top, bot;
zz_setscroll(int top, int bot)
{
ttesc('?');
ttputc(top + ' ');
@ -377,10 +365,7 @@ zz_setscroll(top, bot)
int zz_debug = 0;
void
zz_set_token(t, s, n)
int t;
char *s;
int n;
zz_set_token(int t, char *s, int n)
{
if (tt.tt_nmodes != tt.tt_modes)
zz_setmodes(tt.tt_nmodes);
@ -399,10 +384,7 @@ zz_set_token(t, s, n)
}
void
zz_put_token(t, s, n)
int t;
char *s;
int n;
zz_put_token(int t, char *s, int n)
{
if (tt.tt_nmodes != tt.tt_modes)
zz_setmodes(tt.tt_nmodes);
@ -417,9 +399,7 @@ zz_put_token(t, s, n)
}
int
zz_rint(p, n)
char *p;
int n;
zz_rint(char *p, int n)
{
int i;
char *q;
@ -475,9 +455,7 @@ zz_rint(p, n)
}
void
zz_checksum(p, n)
char *p;
int n;
zz_checksum(char *p, int n)
{
while (--n >= 0) {
int c = *p++ & 0x7f;
@ -487,8 +465,7 @@ zz_checksum(p, n)
}
void
zz_compress(flag)
int flag;
zz_compress(int flag)
{
if (flag)
tt.tt_checksum = 0;
@ -497,7 +474,7 @@ zz_compress(flag)
}
void
zz_checkpoint()
zz_checkpoint(void)
{
static char x[] = { ctrl('['), 'V', 0, 0 };
@ -510,7 +487,7 @@ zz_checkpoint()
}
int
tt_zapple()
tt_zapple(void)
{
tt.tt_insspace = zz_insspace;
tt.tt_delchar = zz_delchar;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ttzentec.c,v 1.4 1997/11/21 08:36:44 lukem Exp $ */
/* $NetBSD: ttzentec.c,v 1.5 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)ttzentec.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: ttzentec.c,v 1.4 1997/11/21 08:36:44 lukem Exp $");
__RCSID("$NetBSD: ttzentec.c,v 1.5 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -64,7 +64,7 @@ short zentec_frame[16] = {
};
int
tt_zentec()
tt_zentec(void)
{
if (tt_generic() < 0)
return -1;

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.c,v 1.7 2000/07/03 02:51:40 matt Exp $ */
/* $NetBSD: var.c,v 1.8 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: var.c,v 1.7 2000/07/03 02:51:40 matt Exp $");
__RCSID("$NetBSD: var.c,v 1.8 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -54,10 +54,7 @@ __RCSID("$NetBSD: var.c,v 1.7 2000/07/03 02:51:40 matt Exp $");
#include "window_string.h"
struct var *
var_set1(head, name, v)
struct var **head;
char *name;
struct value *v;
var_set1(struct var **head, char *name, struct value *v)
{
struct var **p;
struct var *r;
@ -90,10 +87,7 @@ var_set1(head, name, v)
}
struct var *
var_setstr1(head, name, str)
struct var **head;
char *name;
char *str;
var_setstr1(struct var **head, char *name, char *str)
{
struct value v;
@ -103,10 +97,7 @@ var_setstr1(head, name, str)
}
struct var *
var_setnum1(head, name, num)
struct var **head;
char *name;
int num;
var_setnum1(struct var **head, char *name, int num)
{
struct value v;
@ -116,9 +107,7 @@ var_setnum1(head, name, num)
}
int
var_unset1(head, name)
struct var **head;
char *name;
var_unset1(struct var **head, char *name)
{
struct var **p;
struct var *r;
@ -137,9 +126,7 @@ var_unset1(head, name)
}
struct var **
var_lookup1(p, name)
struct var **p;
char *name;
var_lookup1(struct var **p, char *name)
{
int cmp;
@ -155,10 +142,7 @@ var_lookup1(p, name)
}
int
var_walk1(r, func, a)
struct var *r;
int (*func) __P((void *, struct var *));
void *a;
var_walk1(struct var *r, int (*func) (void *, struct var *), void *a)
{
if (r == 0)
return 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: var.h,v 1.5 1998/10/14 00:58:49 wsanchez Exp $ */
/* $NetBSD: var.h,v 1.6 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -49,13 +49,13 @@ struct var {
struct value r_val;
};
struct var **var_lookup1 __P((struct var **, char *));
struct var *var_set1 __P((struct var **, char *, struct value *));
struct var *var_setnum1 __P((struct var **, char *, int));
struct var *var_setstr1 __P((struct var **, char *, char *));
int var_unset1 __P((struct var **, char *));
int var_walk1 __P((struct var *, int (*func)(void *, struct var *),
void *));
struct var **var_lookup1(struct var **, char *);
struct var *var_set1(struct var **, char *, struct value *);
struct var *var_setnum1(struct var **, char *, int);
struct var *var_setstr1(struct var **, char *, char *);
int var_unset1(struct var **, char *);
int var_walk1(struct var *, int (*func)(void *, struct var *),
void *);
#define var_set(n, v) var_set1(&var_head, n, v)
#define var_setstr(n, s) var_setstr1(&var_head, n, s)

View File

@ -1,4 +1,4 @@
/* $NetBSD: win.c,v 1.11 1998/10/14 00:58:49 wsanchez Exp $ */
/* $NetBSD: win.c,v 1.12 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)win.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: win.c,v 1.11 1998/10/14 00:58:49 wsanchez Exp $");
__RCSID("$NetBSD: win.c,v 1.12 2002/06/14 01:06:56 wiz Exp $");
#endif
#endif /* not lint */
@ -70,11 +70,7 @@ __RCSID("$NetBSD: win.c,v 1.11 1998/10/14 00:58:49 wsanchez Exp $");
* Open a user window.
*/
struct ww *
openwin(id, row, col, nrow, ncol, nline, label, type, uflags, shf, sh)
int id, row, col, nrow, ncol, nline;
char *label;
int type, uflags;
char *shf, **sh;
openwin(int id, int row, int col, int nrow, int ncol, int nline, char *label, int type, int uflags, char *shf, char **sh)
{
struct ww *w;
@ -115,7 +111,7 @@ openwin(id, row, col, nrow, ncol, nline, label, type, uflags, shf, sh)
}
int
findid()
findid(void)
{
int i;
@ -129,7 +125,7 @@ findid()
}
struct ww *
findselwin()
findselwin(void)
{
struct ww *w, *s = 0;
int i;
@ -146,8 +142,7 @@ findselwin()
* Close a user window. Close all if w == 0.
*/
void
closewin(w)
struct ww *w;
closewin(struct ww *w)
{
char didit = 0;
int i;
@ -181,9 +176,7 @@ closewin(w)
* Open an information (display) window.
*/
struct ww *
openiwin(nrow, label)
int nrow;
char *label;
openiwin(int nrow, char *label)
{
struct ww *w;
@ -202,16 +195,14 @@ openiwin(nrow, label)
* Close an information window.
*/
void
closeiwin(w)
struct ww *w;
closeiwin(struct ww *w)
{
closewin1(w);
reframe();
}
void
closewin1(w)
struct ww *w;
closewin1(struct ww *w)
{
if (w == selwin)
selwin = 0;
@ -233,9 +224,7 @@ closewin1(w)
* Always reframe() if doreframe is true.
*/
void
front(w, doreframe)
struct ww *w;
char doreframe;
front(struct ww *w, char doreframe)
{
if (w->ww_back != (isfg(w) ? framewin : fgwin) && !wwvisible(w)) {
deletewin(w);
@ -251,9 +240,7 @@ front(w, doreframe)
* For normal windows, we put it behind the current window.
*/
void
addwin(w, fg)
struct ww *w;
char fg;
addwin(struct ww *w, char fg)
{
if (fg) {
wwadd(w, framewin);
@ -268,8 +255,7 @@ addwin(w, fg)
* Delete a window.
*/
void
deletewin(w)
struct ww *w;
deletewin(struct ww *w)
{
if (fgwin == w)
fgwin = w->ww_back;
@ -277,7 +263,7 @@ deletewin(w)
}
void
reframe()
reframe(void)
{
struct ww *w;
@ -290,8 +276,7 @@ reframe()
}
void
labelwin(w)
struct ww *w;
labelwin(struct ww *w)
{
int mode = w == selwin ? WWM_REV : 0;
@ -317,8 +302,7 @@ labelwin(w)
}
void
stopwin(w)
struct ww *w;
stopwin(struct ww *w)
{
if (w->ww_pty >= 0 && w->ww_type == WWT_PTY && wwstoptty(w->ww_pty) < 0)
error("Can't stop output: %s.", wwerror());
@ -327,8 +311,7 @@ stopwin(w)
}
void
startwin(w)
struct ww *w;
startwin(struct ww *w)
{
if (w->ww_pty >= 0 && w->ww_type == WWT_PTY &&
wwstarttty(w->ww_pty) < 0)
@ -338,9 +321,7 @@ startwin(w)
}
void
sizewin(w, nrow, ncol)
struct ww *w;
int nrow, ncol;
sizewin(struct ww *w, int nrow, int ncol)
{
struct ww *back = w->ww_back;
@ -354,16 +335,13 @@ sizewin(w, nrow, ncol)
}
void
waitnl(w)
struct ww *w;
waitnl(struct ww *w)
{
(void) waitnl1(w, "[Type any key to continue]");
}
int
more(w, always)
struct ww *w;
char always;
more(struct ww *w, char always)
{
int c;
int uc = ISSET(w->ww_wflags, WWW_UNCTRL);
@ -378,9 +356,7 @@ more(w, always)
}
int
waitnl1(w, prompt)
struct ww *w;
char *prompt;
waitnl1(struct ww *w, char *prompt)
{
int uc = ISSET(w->ww_wflags, WWW_UNCTRL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: window_string.h,v 1.5 1998/10/14 00:58:49 wsanchez Exp $ */
/* $NetBSD: window_string.h,v 1.6 2002/06/14 01:06:56 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -49,11 +49,11 @@
#define STR_DEBUG
char *str_cat __P((char *, char *));
char *str_cpy __P((char *));
char *str_itoa __P((int));
int str_match __P((char *, char *, int));
char *str_ncpy __P((char *, int));
char *str_cat(char *, char *);
char *str_cpy(char *);
char *str_itoa(int);
int str_match(char *, char *, int);
char *str_ncpy(char *, int);
#define str_cmp(a, b) strcmp(a, b)
@ -69,8 +69,8 @@ EXTERN struct string str_head;
#define str_offset ((unsigned)str_head.s_data - (unsigned)&str_head)
#define str_stos(s) ((struct string *)((unsigned)(s) - str_offset))
char *str_alloc __P((size_t));
void str_free __P((char *));
char *str_alloc(size_t);
void str_free(char *);
#else
#define str_free(s) free(s)
#define str_alloc(s) malloc(s)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ww.h,v 1.15 2001/01/16 02:50:31 cgd Exp $ */
/* $NetBSD: ww.h,v 1.16 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -48,14 +48,9 @@
#include <termios.h>
#endif
#include <setjmp.h>
#include <unistd.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
#include <unistd.h>
#ifndef EXTERN
#define EXTERN extern
@ -320,76 +315,76 @@ EXTERN char wwwintermcap[1024]; /* terminal-specific but window-independent
EXTERN char wwterminfopath[1024];
#endif
struct ww *wwopen __P((int, int, int, int, int, int, int));
void wwadd __P((struct ww *, struct ww *));
void wwaddcap __P((char *, char **));
void wwaddcap1 __P((char *, char **));
void wwalarm __P((int));
char **wwalloc __P((int, int, int, int, int));
void wwbell __P((void));
void wwbox __P((struct ww *, int, int, int, int));
void wwcheckpoint __P((void));
void wwchild __P((int));
void wwclose __P((struct ww *));
void wwclreol1 __P((struct ww *, int, int, char));
void wwclreos __P((struct ww *, int, int));
void wwcopyscreen __P((union ww_char **s1, union ww_char **s2));
void wwcursor __P((struct ww *, int));
void wwdelchar __P((struct ww *, int, int));
void wwdelete __P((struct ww *));
void wwdelete1 __P((struct ww *, int, int, int, int));
void wwdelline __P((struct ww *, int));
void wwdumpns __P((void));
void wwdumpnvis __P((struct ww *));
void wwdumpos __P((void));
void wwdumpsmap __P((void));
void wwdumpwin __P((struct ww *));
void wwend __P((int));
int wwenviron __P((struct ww *));
struct ww *wwopen(int, int, int, int, int, int, int);
void wwadd(struct ww *, struct ww *);
void wwaddcap(char *, char **);
void wwaddcap1(char *, char **);
void wwalarm(int);
char **wwalloc(int, int, int, int, int);
void wwbell(void);
void wwbox(struct ww *, int, int, int, int);
void wwcheckpoint(void);
void wwchild(int);
void wwclose(struct ww *);
void wwclreol1(struct ww *, int, int, char);
void wwclreos(struct ww *, int, int);
void wwcopyscreen(union ww_char **s1, union ww_char **s2);
void wwcursor(struct ww *, int);
void wwdelchar(struct ww *, int, int);
void wwdelete(struct ww *);
void wwdelete1(struct ww *, int, int, int, int);
void wwdelline(struct ww *, int);
void wwdumpns(void);
void wwdumpnvis(struct ww *);
void wwdumpos(void);
void wwdumpsmap(void);
void wwdumpwin(struct ww *);
void wwend(int);
int wwenviron(struct ww *);
const char *
wwerror __P((void));
void wwflush __P((void));
void wwframe __P((struct ww *, struct ww *));
void wwframec __P((struct ww *, int, int, char));
void wwfree __P((char **, int));
int wwgetpty __P((struct ww *));
int wwgettty __P((int, struct ww_tty *));
int wwgetttysize __P((int, int *, int *));
void wwgets __P((char *, int, struct ww *));
int wwinit __P((void));
void wwinschar __P((struct ww *, int, int, char, char));
void wwinsline __P((struct ww *, int));
void wwiomux __P((void));
void wwlabel __P((struct ww *, struct ww *, int, char *, int));
void wwmove __P((struct ww *, int, int));
void wwprintf __P((struct ww *, const char *, ...));
void wwputc __P((char, struct ww *));
void wwputs __P((char *, struct ww *));
void wwredraw __P((void));
void wwredrawwin1 __P((struct ww *,int, int, int));
void wwquit __P((int));
void wwreset __P((void));
void wwrint __P((void));
void wwscroll __P((struct ww *, int));
int wwscroll1 __P((struct ww *, int, int, int, int));
void wwsetcursormodes __P((int));
int wwsettty __P((int, struct ww_tty *));
int wwsetttysize __P((int, int, int));
int wwsize __P((struct ww *, int, int));
int wwspawn __P((struct ww *, char *, char **));
void wwstart __P((void));
void wwstart1 __P((void));
int wwstarttty __P((int));
int wwstoptty __P((int));
void wwsuspend __P((void));
void wwunframe __P((struct ww *));
void wwupdate1 __P((int, int));
int wwvisible __P((struct ww *));
void wwvprintf __P((struct ww *, const char *, va_list));
int wwwrite __P((struct ww *, char *, int));
wwerror(void);
void wwflush(void);
void wwframe(struct ww *, struct ww *);
void wwframec(struct ww *, int, int, char);
void wwfree(char **, int);
int wwgetpty(struct ww *);
int wwgettty(int, struct ww_tty *);
int wwgetttysize(int, int *, int *);
void wwgets(char *, int, struct ww *);
int wwinit(void);
void wwinschar(struct ww *, int, int, char, char);
void wwinsline(struct ww *, int);
void wwiomux(void);
void wwlabel(struct ww *, struct ww *, int, char *, int);
void wwmove(struct ww *, int, int);
void wwprintf(struct ww *, const char *, ...);
void wwputc(char, struct ww *);
void wwputs(char *, struct ww *);
void wwredraw(void);
void wwredrawwin1(struct ww *,int, int, int);
void wwquit(int);
void wwreset(void);
void wwrint(void);
void wwscroll(struct ww *, int);
int wwscroll1(struct ww *, int, int, int, int);
void wwsetcursormodes(int);
int wwsettty(int, struct ww_tty *);
int wwsetttysize(int, int, int);
int wwsize(struct ww *, int, int);
int wwspawn(struct ww *, char *, char **);
void wwstart(void);
void wwstart1(void);
int wwstarttty(int);
int wwstoptty(int);
void wwsuspend(void);
void wwunframe(struct ww *);
void wwupdate1(int, int);
int wwvisible(struct ww *);
void wwvprintf(struct ww *, const char *, va_list);
int wwwrite(struct ww *, char *, int);
#ifdef TERMINFO
int wwterminfoinit __P((void));
int wwterminfoend __P((void));
int wwterminfoinit(void);
int wwterminfoend(void);
#endif
#undef MIN

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwadd.c,v 1.5 1997/11/21 08:36:54 lukem Exp $ */
/* $NetBSD: wwadd.c,v 1.6 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwadd.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwadd.c,v 1.5 1997/11/21 08:36:54 lukem Exp $");
__RCSID("$NetBSD: wwadd.c,v 1.6 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -51,9 +51,7 @@ __RCSID("$NetBSD: wwadd.c,v 1.5 1997/11/21 08:36:54 lukem Exp $");
* Stick w1 behind w2.
*/
void
wwadd(w1, w2)
struct ww *w1;
struct ww *w2;
wwadd(struct ww *w1, struct ww *w2)
{
int i;
struct ww *w;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwalloc.c,v 1.4 1997/11/21 08:36:57 lukem Exp $ */
/* $NetBSD: wwalloc.c,v 1.5 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwalloc.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwalloc.c,v 1.4 1997/11/21 08:36:57 lukem Exp $");
__RCSID("$NetBSD: wwalloc.c,v 1.5 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -49,8 +49,7 @@ __RCSID("$NetBSD: wwalloc.c,v 1.4 1997/11/21 08:36:57 lukem Exp $");
#include "ww.h"
char **
wwalloc(row, col, nrow, ncol, size)
int row, col, nrow, ncol, size;
wwalloc(int row, int col, int nrow, int ncol, int size)
{
char *p, **pp;
int i;
@ -74,9 +73,7 @@ wwalloc(row, col, nrow, ncol, size)
}
void
wwfree(p, row)
char **p;
int row;
wwfree(char **p, int row)
{
free((char *)(p + row));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwbox.c,v 1.4 1997/11/21 08:36:58 lukem Exp $ */
/* $NetBSD: wwbox.c,v 1.5 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwbox.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwbox.c,v 1.4 1997/11/21 08:36:58 lukem Exp $");
__RCSID("$NetBSD: wwbox.c,v 1.5 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -49,10 +49,7 @@ __RCSID("$NetBSD: wwbox.c,v 1.4 1997/11/21 08:36:58 lukem Exp $");
#include "tt.h"
void
wwbox(w, r, c, nr, nc)
struct ww *w;
int r, c;
int nr, nc;
wwbox(struct ww *w, int r, int c, int nr, int nc)
{
int r1, c1;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwchild.c,v 1.5 1998/12/20 15:02:17 christos Exp $ */
/* $NetBSD: wwchild.c,v 1.6 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwchild.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwchild.c,v 1.5 1998/12/20 15:02:17 christos Exp $");
__RCSID("$NetBSD: wwchild.c,v 1.6 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -51,8 +51,7 @@ __RCSID("$NetBSD: wwchild.c,v 1.5 1998/12/20 15:02:17 christos Exp $");
#include "ww.h"
void
wwchild(dummy)
int dummy;
wwchild(int dummy)
{
int olderrno;
struct ww **wp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwclose.c,v 1.4 1997/11/21 08:37:01 lukem Exp $ */
/* $NetBSD: wwclose.c,v 1.5 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwclose.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwclose.c,v 1.4 1997/11/21 08:37:01 lukem Exp $");
__RCSID("$NetBSD: wwclose.c,v 1.5 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -50,8 +50,7 @@ __RCSID("$NetBSD: wwclose.c,v 1.4 1997/11/21 08:37:01 lukem Exp $");
#include "ww.h"
void
wwclose(w)
struct ww *w;
wwclose(struct ww *w)
{
wwindex[w->ww_index] = 0;
if (w->ww_pty >= 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwclreol.c,v 1.5 1997/11/21 08:37:03 lukem Exp $ */
/* $NetBSD: wwclreol.c,v 1.6 2002/06/14 01:06:57 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwclreol.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwclreol.c,v 1.5 1997/11/21 08:37:03 lukem Exp $");
__RCSID("$NetBSD: wwclreol.c,v 1.6 2002/06/14 01:06:57 wiz Exp $");
#endif
#endif /* not lint */
@ -53,10 +53,7 @@ __RCSID("$NetBSD: wwclreol.c,v 1.5 1997/11/21 08:37:03 lukem Exp $");
* If cleared is true, then the screen line has already been cleared.
*/
void
wwclreol1(w, row, col, cleared)
struct ww *w;
int row, col;
char cleared;
wwclreol1(struct ww *w, int row, int col, char cleared)
{
int i;

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwdelete.c,v 1.5 1997/11/21 08:37:11 lukem Exp $ */
/* $NetBSD: wwdelete.c,v 1.6 2002/06/14 01:06:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwdelete.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwdelete.c,v 1.5 1997/11/21 08:37:11 lukem Exp $");
__RCSID("$NetBSD: wwdelete.c,v 1.6 2002/06/14 01:06:58 wiz Exp $");
#endif
#endif /* not lint */
@ -51,8 +51,7 @@ __RCSID("$NetBSD: wwdelete.c,v 1.5 1997/11/21 08:37:11 lukem Exp $");
* Pull w free from the cover list.
*/
void
wwdelete(w)
struct ww *w;
wwdelete(struct ww *w)
{
int i;
@ -89,9 +88,7 @@ wwdelete(w)
}
void
wwdelete1(w, t, b, l, r)
struct ww *w;
int t, b, l, r;
wwdelete1(struct ww *w, int t, int b, int l, int r)
{
int i;
int tt, bb, ll, rr;

View File

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

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwdump.c,v 1.6 1997/11/21 08:37:14 lukem Exp $ */
/* $NetBSD: wwdump.c,v 1.7 2002/06/14 01:06:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwdump.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwdump.c,v 1.6 1997/11/21 08:37:14 lukem Exp $");
__RCSID("$NetBSD: wwdump.c,v 1.7 2002/06/14 01:06:58 wiz Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ __RCSID("$NetBSD: wwdump.c,v 1.6 1997/11/21 08:37:14 lukem Exp $");
static char cmap[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
void
wwdumpwin(w)
struct ww *w;
wwdumpwin(struct ww *w)
{
int i, j;
@ -68,8 +67,7 @@ wwdumpwin(w)
}
void
wwdumpnvis(w)
struct ww *w;
wwdumpnvis(struct ww *w)
{
int i;
char buf[20];
@ -84,7 +82,7 @@ wwdumpnvis(w)
}
void
wwdumpsmap()
wwdumpsmap(void)
{
int i, j;
@ -98,7 +96,7 @@ wwdumpsmap()
}
void
wwdumpns()
wwdumpns(void)
{
int i, j;
@ -113,7 +111,7 @@ wwdumpns()
}
void
wwdumpos()
wwdumpos(void)
{
int i, j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwend.c,v 1.5 2000/07/03 02:51:41 matt Exp $ */
/* $NetBSD: wwend.c,v 1.6 2002/06/14 01:06:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwend.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwend.c,v 1.5 2000/07/03 02:51:41 matt Exp $");
__RCSID("$NetBSD: wwend.c,v 1.6 2002/06/14 01:06:58 wiz Exp $");
#endif
#endif /* not lint */
@ -52,8 +52,7 @@ __RCSID("$NetBSD: wwend.c,v 1.5 2000/07/03 02:51:41 matt Exp $");
#include "xx.h"
void
wwend(exit)
int exit;
wwend(int quit)
{
if (tt.tt_checkpoint) {
(void) alarm(0);
@ -62,14 +61,13 @@ wwend(exit)
xxend();
(void) wwsettty(0, &wwoldtty);
#ifdef TERMINFO
if (exit)
if (quit)
wwterminfoend();
#endif
}
void
wwquit(dummy)
int dummy;
wwquit(int dummy)
{
wwend(1);
exit(1);

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwenviron.c,v 1.6 1998/12/20 15:02:57 christos Exp $ */
/* $NetBSD: wwenviron.c,v 1.7 2002/06/14 01:06:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwenviron.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwenviron.c,v 1.6 1998/12/20 15:02:57 christos Exp $");
__RCSID("$NetBSD: wwenviron.c,v 1.7 2002/06/14 01:06:58 wiz Exp $");
#endif
#endif /* not lint */
@ -60,8 +60,7 @@ __RCSID("$NetBSD: wwenviron.c,v 1.6 1998/12/20 15:02:57 christos Exp $");
* Set up the environment of this process to run in window 'wp'.
*/
int
wwenviron(wp)
struct ww *wp;
wwenviron(struct ww *wp)
{
int i;
#ifndef TIOCSCTTY

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwerror.c,v 1.5 1998/07/26 15:28:20 mycroft Exp $ */
/* $NetBSD: wwerror.c,v 1.6 2002/06/14 01:06:58 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwerror.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwerror.c,v 1.5 1998/07/26 15:28:20 mycroft Exp $");
__RCSID("$NetBSD: wwerror.c,v 1.6 2002/06/14 01:06:58 wiz Exp $");
#endif
#endif /* not lint */
@ -50,7 +50,7 @@ __RCSID("$NetBSD: wwerror.c,v 1.5 1998/07/26 15:28:20 mycroft Exp $");
#include "ww.h"
const char *
wwerror()
wwerror(void)
{
switch (wwerrno) {
case WWE_NOERR:

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwflush.c,v 1.6 1997/11/21 08:37:21 lukem Exp $ */
/* $NetBSD: wwflush.c,v 1.7 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwflush.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwflush.c,v 1.6 1997/11/21 08:37:21 lukem Exp $");
__RCSID("$NetBSD: wwflush.c,v 1.7 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -53,7 +53,7 @@ __RCSID("$NetBSD: wwflush.c,v 1.6 1997/11/21 08:37:21 lukem Exp $");
#include "xx.h"
void
wwflush()
wwflush(void)
{
int row, col;
@ -74,7 +74,7 @@ wwflush()
}
void
wwcheckpoint()
wwcheckpoint(void)
{
sigset_t sigset, osigset;
@ -109,8 +109,7 @@ wwcheckpoint()
}
void
wwcopyscreen(s1, s2)
union ww_char **s1, **s2;
wwcopyscreen(union ww_char **s1, union ww_char **s2)
{
int i;
int s = wwncol * sizeof **s1;
@ -120,8 +119,7 @@ wwcopyscreen(s1, s2)
}
void
wwalarm(dummy)
int dummy;
wwalarm(int dummy)
{
wwdocheckpoint = 1;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwframe.c,v 1.5 1997/11/21 08:37:22 lukem Exp $ */
/* $NetBSD: wwframe.c,v 1.6 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwframe.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwframe.c,v 1.5 1997/11/21 08:37:22 lukem Exp $");
__RCSID("$NetBSD: wwframe.c,v 1.6 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -52,9 +52,7 @@ __RCSID("$NetBSD: wwframe.c,v 1.5 1997/11/21 08:37:22 lukem Exp $");
w1->ww_fmap || w1->ww_order > (w)->ww_order)
void
wwframe(w, wframe)
struct ww *w;
struct ww *wframe;
wwframe(struct ww *w, struct ww *wframe)
{
int r, c;
char a1, a2, a3;
@ -200,10 +198,7 @@ wwframe(w, wframe)
}
void
wwframec(f, r, c, code)
struct ww *f;
int r, c;
char code;
wwframec(struct ww *f, int r, int c, char code)
{
char oldcode;
unsigned char *smap;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwgets.c,v 1.7 1997/11/21 08:37:24 lukem Exp $ */
/* $NetBSD: wwgets.c,v 1.8 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwgets.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwgets.c,v 1.7 1997/11/21 08:37:24 lukem Exp $");
__RCSID("$NetBSD: wwgets.c,v 1.8 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -49,13 +49,10 @@ __RCSID("$NetBSD: wwgets.c,v 1.7 1997/11/21 08:37:24 lukem Exp $");
#include "ww.h"
#include "char.h"
static void rub __P((int, struct ww *));
static void rub(int, struct ww *);
void
wwgets(buf, n, w)
char *buf;
int n;
struct ww *w;
wwgets(char *buf, int n, struct ww *w)
{
char *p = buf;
int c;
@ -109,9 +106,7 @@ wwgets(buf, n, w)
}
static void
rub(c, w)
int c;
struct ww *w;
rub(int c, struct ww *w)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwinit.c,v 1.14 1999/05/06 07:28:51 mycroft Exp $ */
/* $NetBSD: wwinit.c,v 1.15 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwinit.c 8.2 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: wwinit.c,v 1.14 1999/05/06 07:28:51 mycroft Exp $");
__RCSID("$NetBSD: wwinit.c,v 1.15 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -56,7 +56,7 @@ __RCSID("$NetBSD: wwinit.c,v 1.14 1999/05/06 07:28:51 mycroft Exp $");
#include "char.h"
int
wwinit()
wwinit(void)
{
int i, j;
char *kp;
@ -349,9 +349,7 @@ bad:
}
void
wwaddcap(cap, kp)
char *cap;
char **kp;
wwaddcap(char *cap, char **kp)
{
char tbuf[512];
char *tp = tbuf;
@ -372,9 +370,7 @@ wwaddcap(cap, kp)
}
void
wwaddcap1(cap, kp)
char *cap;
char **kp;
wwaddcap1(char *cap, char **kp)
{
while ((*(*kp)++ = *cap++))
;
@ -382,7 +378,7 @@ wwaddcap1(cap, kp)
}
void
wwstart()
wwstart(void)
{
int i;
@ -393,7 +389,7 @@ wwstart()
}
void
wwstart1()
wwstart1(void)
{
int i, j;
@ -413,7 +409,7 @@ wwstart1()
* Restoring wwos has been taken care of elsewhere.
*/
void
wwreset()
wwreset(void)
{
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwinschar.c,v 1.5 1997/11/21 08:37:27 lukem Exp $ */
/* $NetBSD: wwinschar.c,v 1.6 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwinschar.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwinschar.c,v 1.5 1997/11/21 08:37:27 lukem Exp $");
__RCSID("$NetBSD: wwinschar.c,v 1.6 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -50,10 +50,7 @@ __RCSID("$NetBSD: wwinschar.c,v 1.5 1997/11/21 08:37:27 lukem Exp $");
#include "xx.h"
void
wwinschar(w, row, col, c, m)
struct ww *w;
int row, col;
char c, m;
wwinschar(struct ww *w, int row, int col, char c, char m)
{
int i;
int nvis;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwinsline.c,v 1.4 1997/11/21 08:37:29 lukem Exp $ */
/* $NetBSD: wwinsline.c,v 1.5 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,16 +41,14 @@
#if 0
static char sccsid[] = "@(#)wwinsline.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwinsline.c,v 1.4 1997/11/21 08:37:29 lukem Exp $");
__RCSID("$NetBSD: wwinsline.c,v 1.5 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
#include "ww.h"
void
wwinsline(w, row)
struct ww *w;
int row;
wwinsline(struct ww *w, int row)
{
int i;
union ww_char **cpp, **cqq;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwiomux.c,v 1.6 1997/11/21 08:37:30 lukem Exp $ */
/* $NetBSD: wwiomux.c,v 1.7 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwiomux.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwiomux.c,v 1.6 1997/11/21 08:37:30 lukem Exp $");
__RCSID("$NetBSD: wwiomux.c,v 1.7 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -65,7 +65,7 @@ __RCSID("$NetBSD: wwiomux.c,v 1.6 1997/11/21 08:37:30 lukem Exp $");
* The history of this routine is interesting.
*/
void
wwiomux()
wwiomux(void)
{
struct ww *w;
fd_set imask;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwlabel.c,v 1.5 1997/11/21 08:37:32 lukem Exp $ */
/* $NetBSD: wwlabel.c,v 1.6 2002/06/14 01:06:59 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwlabel.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwlabel.c,v 1.5 1997/11/21 08:37:32 lukem Exp $");
__RCSID("$NetBSD: wwlabel.c,v 1.6 2002/06/14 01:06:59 wiz Exp $");
#endif
#endif /* not lint */
@ -54,12 +54,7 @@ __RCSID("$NetBSD: wwlabel.c,v 1.5 1997/11/21 08:37:32 lukem Exp $");
* Gross, but it works.
*/
void
wwlabel(w, f, where, l, mode)
struct ww *w;
struct ww *f;
int where;
char *l;
int mode;
wwlabel(struct ww *w, struct ww *f, int where, char *l, int mode)
{
int row;
int j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwmisc.c,v 1.5 1997/11/21 08:37:34 lukem Exp $ */
/* $NetBSD: wwmisc.c,v 1.6 2002/06/14 01:07:00 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwmisc.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwmisc.c,v 1.5 1997/11/21 08:37:34 lukem Exp $");
__RCSID("$NetBSD: wwmisc.c,v 1.6 2002/06/14 01:07:00 wiz Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ __RCSID("$NetBSD: wwmisc.c,v 1.5 1997/11/21 08:37:34 lukem Exp $");
* Sufficient but not necessary test for total visibility.
*/
int
wwvisible(w)
struct ww *w;
wwvisible(struct ww *w)
{
int i;
int nvis = 0;
@ -70,7 +69,7 @@ wwvisible(w)
}
void
wwbell()
wwbell(void)
{
ttputc(ctrl('g'));
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwmove.c,v 1.5 1997/11/21 08:37:35 lukem Exp $ */
/* $NetBSD: wwmove.c,v 1.6 2002/06/14 01:07:00 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwmove.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwmove.c,v 1.5 1997/11/21 08:37:35 lukem Exp $");
__RCSID("$NetBSD: wwmove.c,v 1.6 2002/06/14 01:07:00 wiz Exp $");
#endif
#endif /* not lint */
@ -51,9 +51,7 @@ __RCSID("$NetBSD: wwmove.c,v 1.5 1997/11/21 08:37:35 lukem Exp $");
* Move a window. Should be unattached.
*/
void
wwmove(w, row, col)
struct ww *w;
int row, col;
wwmove(struct ww *w, int row, int col)
{
int dr, dc;
int i;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwopen.c,v 1.9 1998/08/25 20:59:43 ross Exp $ */
/* $NetBSD: wwopen.c,v 1.10 2002/06/14 01:07:00 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwopen.c 8.2 (Berkeley) 4/28/95";
#else
__RCSID("$NetBSD: wwopen.c,v 1.9 1998/08/25 20:59:43 ross Exp $");
__RCSID("$NetBSD: wwopen.c,v 1.10 2002/06/14 01:07:00 wiz Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ __RCSID("$NetBSD: wwopen.c,v 1.9 1998/08/25 20:59:43 ross Exp $");
#include "ww.h"
struct ww *
wwopen(type, oflags, nrow, ncol, row, col, nline)
int type, oflags, nrow, ncol, row, col, nline;
wwopen(int type, int oflags, int nrow, int ncol, int row, int col, int nline)
{
struct ww *w;
int i, j;

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwprintf.c,v 1.4 1997/11/21 08:37:38 lukem Exp $ */
/* $NetBSD: wwprintf.c,v 1.5 2002/06/14 01:07:00 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,38 +41,24 @@
#if 0
static char sccsid[] = "@(#)wwprintf.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwprintf.c,v 1.4 1997/11/21 08:37:38 lukem Exp $");
__RCSID("$NetBSD: wwprintf.c,v 1.5 2002/06/14 01:07:00 wiz Exp $");
#endif
#endif /* not lint */
#include "ww.h"
void
#if __STDC__
wwprintf(struct ww *w, const char *fmt, ...)
#else
wwprintf(w, fmt, va_alist)
struct ww *w;
char *fmt;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void) wwvprintf(w, fmt, ap);
va_end(ap);
}
void
wwvprintf(w, fmt, ap)
struct ww *w;
const char *fmt;
va_list ap;
wwvprintf(struct ww *w, const char *fmt, va_list ap)
{
char buf[1024];

View File

@ -1,4 +1,4 @@
/* $NetBSD: wwpty.c,v 1.6 2002/05/30 03:22:58 simonb Exp $ */
/* $NetBSD: wwpty.c,v 1.7 2002/06/14 01:07:00 wiz Exp $ */
/*
* Copyright (c) 1983, 1993
@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)wwpty.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: wwpty.c,v 1.6 2002/05/30 03:22:58 simonb Exp $");
__RCSID("$NetBSD: wwpty.c,v 1.7 2002/06/14 01:07:00 wiz Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,7 @@ __RCSID("$NetBSD: wwpty.c,v 1.6 2002/05/30 03:22:58 simonb Exp $");
#include "ww.h"
int
wwgetpty(w)
struct ww *w;
wwgetpty(struct ww *w)
{
int on = 1;
int result, tty;

View File

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

View File

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

View File

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