de-__P, ANSIfy prototypes

This commit is contained in:
perry 2006-01-04 01:44:06 +00:00
parent d310ebb16a
commit 10e955c2f8
2 changed files with 37 additions and 58 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: join.c,v 1.25 2004/07/13 11:53:57 wiz Exp $ */
/* $NetBSD: join.c,v 1.26 2006/01/04 01:44:06 perry Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -44,7 +44,7 @@ __COPYRIGHT(
#if 0
static char sccsid[] = "from: @(#)join.c 5.1 (Berkeley) 11/18/91";
#else
__RCSID("$NetBSD: join.c,v 1.25 2004/07/13 11:53:57 wiz Exp $");
__RCSID("$NetBSD: join.c,v 1.26 2006/01/04 01:44:06 perry Exp $");
#endif
#endif /* not lint */
@ -101,22 +101,20 @@ int spans = 1; /* span multiple delimiters (-t) */
char *empty; /* empty field replacement string (-e) */
char *tabchar = " \t"; /* delimiter characters (-t) */
int cmp __P((LINE *, u_long, LINE *, u_long));
void enomem __P((void));
void fieldarg __P((char *));
void joinlines __P((INPUT *, INPUT *));
int main __P((int, char **));
void obsolete __P((char **));
void outfield __P((LINE *, u_long));
void outoneline __P((INPUT *, LINE *));
void outtwoline __P((INPUT *, LINE *, INPUT *, LINE *));
void slurp __P((INPUT *));
void usage __P((void));
int cmp(LINE *, u_long, LINE *, u_long);
void enomem(void);
void fieldarg(char *);
void joinlines(INPUT *, INPUT *);
int main(int, char **);
void obsolete(char **);
void outfield(LINE *, u_long);
void outoneline(INPUT *, LINE *);
void outtwoline(INPUT *, LINE *, INPUT *, LINE *);
void slurp(INPUT *);
void usage(void);
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
INPUT *F1, *F2;
int aflag, ch, cval, vflag;
@ -288,8 +286,7 @@ main(argc, argv)
}
void
slurp(F)
INPUT *F;
slurp(INPUT *F)
{
LINE *lp;
LINE tmp;
@ -395,9 +392,7 @@ slurp(F)
}
int
cmp(lp1, fieldno1, lp2, fieldno2)
LINE *lp1, *lp2;
u_long fieldno1, fieldno2;
cmp(LINE *lp1, u_long fieldno1, LINE *lp2, u_long fieldno2)
{
if (lp1->fieldcnt <= fieldno1)
@ -408,8 +403,7 @@ cmp(lp1, fieldno1, lp2, fieldno2)
}
void
joinlines(F1, F2)
INPUT *F1, *F2;
joinlines(INPUT *F1, INPUT *F2)
{
int cnt1, cnt2;
@ -429,9 +423,7 @@ joinlines(F1, F2)
}
void
outoneline(F, lp)
INPUT *F;
LINE *lp;
outoneline(INPUT *F, LINE *lp)
{
int cnt;
@ -457,9 +449,7 @@ outoneline(F, lp)
}
void
outtwoline(F1, lp1, F2, lp2)
INPUT *F1, *F2;
LINE *lp1, *lp2;
outtwoline(INPUT *F1, LINE *lp1, INPUT *F2, LINE *lp2)
{
int cnt;
@ -490,9 +480,7 @@ outtwoline(F1, lp1, F2, lp2)
}
void
outfield(lp, fieldno)
LINE *lp;
u_long fieldno;
outfield(LINE *lp, u_long fieldno)
{
if (needsep++)
(void)printf("%c", *tabchar);
@ -515,8 +503,7 @@ outfield(lp, fieldno)
* fields.
*/
void
fieldarg(option)
char *option;
fieldarg(char *option)
{
u_long fieldno;
char *end, *token;
@ -546,8 +533,7 @@ fieldarg(option)
}
void
obsolete(argv)
char **argv;
obsolete(char **argv)
{
int len;
char **p, *ap, *t;
@ -624,13 +610,13 @@ jbad: errx(1, "illegal option -- %s", ap);
}
void
enomem()
enomem(void)
{
errx(1, "no memory");
}
void
usage()
usage(void)
{
(void)fprintf(stderr,
"usage: %s [-a fileno | -v fileno] [-e string] [-j fileno field]\n"

View File

@ -1,4 +1,4 @@
/* $NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $ */
/* $NetBSD: jot.c,v 1.13 2006/01/04 01:52:17 perry Exp $ */
/*-
* Copyright (c) 1993
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\n\
#if 0
static char sccsid[] = "@(#)jot.c 8.1 (Berkeley) 6/6/93";
#endif
__RCSID("$NetBSD: jot.c,v 1.12 2004/11/22 17:34:24 peter Exp $");
__RCSID("$NetBSD: jot.c,v 1.13 2006/01/04 01:52:17 perry Exp $");
#endif /* not lint */
/*
@ -78,17 +78,15 @@ int nofinalnl;
char sepstring[BUFSIZ] = "\n";
char format[BUFSIZ];
void getargs __P((int, char *[]));
void getformat __P((void));
int getprec __P((char *));
int main __P((int, char **));
void putdata __P((double, long));
static void usage __P((void));
void getargs(int, char *[]);
void getformat(void);
int getprec(char *);
int main(int, char **);
void putdata(double, long);
static void usage(void);
int
main(argc, argv)
int argc;
char *argv[];
main(int argc, char *argv[])
{
double xd, yd;
long id;
@ -114,9 +112,7 @@ main(argc, argv)
}
void
getargs(argc, argv)
int argc;
char *argv[];
getargs(int argc, char *argv[])
{
unsigned int mask = 0;
int n = 0;
@ -306,9 +302,7 @@ getargs(argc, argv)
}
void
putdata(x, notlast)
double x;
long notlast;
putdata(double x, long notlast)
{
long d = x;
long *dp = &d;
@ -332,8 +326,7 @@ usage(void)
}
int
getprec(s)
char *s;
getprec(char *s)
{
char *p;
char *q;
@ -350,7 +343,7 @@ getprec(s)
}
void
getformat()
getformat(void)
{
char *p;
size_t sz;