Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin Kill __P(), use ANSI function declarations, constify...
details: https://anonhg.NetBSD.org/src/rev/0bf049ca46a6
branches: trunk
changeset: 573980:0bf049ca46a6
user: xtraeme <xtraeme%NetBSD.org@localhost>
date: Thu Feb 17 17:17:25 2005 +0000
description:
Kill __P(), use ANSI function declarations, constify; WARNS=3.
diffstat:
usr.bin/colcrt/Makefile | 3 ++-
usr.bin/colcrt/colcrt.c | 24 +++++++++---------------
usr.bin/colrm/Makefile | 3 ++-
usr.bin/colrm/colrm.c | 16 ++++++----------
usr.bin/column/Makefile | 3 ++-
usr.bin/column/column.c | 41 ++++++++++++++++++-----------------------
6 files changed, 39 insertions(+), 51 deletions(-)
diffs (270 lines):
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/colcrt/Makefile
--- a/usr.bin/colcrt/Makefile Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/colcrt/Makefile Thu Feb 17 17:17:25 2005 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 1995/03/26 05:30:58 glass Exp $
+# $NetBSD: Makefile,v 1.4 2005/02/17 17:17:25 xtraeme Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= colcrt
+WARNS= 3
.include <bsd.prog.mk>
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/colcrt/colcrt.c
--- a/usr.bin/colcrt/colcrt.c Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/colcrt/colcrt.c Thu Feb 17 17:17:25 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: colcrt.c,v 1.6 2003/08/07 11:13:24 agc Exp $ */
+/* $NetBSD: colcrt.c,v 1.7 2005/02/17 17:17:25 xtraeme Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: colcrt.c,v 1.6 2003/08/07 11:13:24 agc Exp $");
+__RCSID("$NetBSD: colcrt.c,v 1.7 2005/02/17 17:17:25 xtraeme Exp $");
#endif
#endif /* not lint */
@@ -73,15 +73,12 @@
char *progname;
FILE *f;
-int main __P((int, char **));
-void move __P((int, int));
-void pflush __P((int));
-int plus __P((char, char));
+void move(int, int);
+void pflush(int);
+int plus(char, char);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
int c;
char *cp, *dp;
@@ -193,8 +190,7 @@
}
int
-plus(c, d)
- char c, d;
+plus(char c, char d)
{
return ((c == '|' && d == '-') || d == '_');
@@ -203,8 +199,7 @@
int first;
void
-pflush(ol)
- int ol;
+pflush(int ol)
{
int i;
char *cp;
@@ -238,8 +233,7 @@
}
void
-move(l, m)
- int l, m;
+move(int l, int m)
{
char *cp, *dp;
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/colrm/Makefile
--- a/usr.bin/colrm/Makefile Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/colrm/Makefile Thu Feb 17 17:17:25 2005 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 1995/03/26 09:03:59 glass Exp $
+# $NetBSD: Makefile,v 1.4 2005/02/17 17:17:25 xtraeme Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= colrm
+WARNS= 3
.include <bsd.prog.mk>
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/colrm/colrm.c
--- a/usr.bin/colrm/colrm.c Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/colrm/colrm.c Thu Feb 17 17:17:25 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: colrm.c,v 1.6 2003/08/07 11:13:25 agc Exp $ */
+/* $NetBSD: colrm.c,v 1.7 2005/02/17 17:17:25 xtraeme Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)colrm.c 8.2 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: colrm.c,v 1.6 2003/08/07 11:13:25 agc Exp $");
+__RCSID("$NetBSD: colrm.c,v 1.7 2005/02/17 17:17:25 xtraeme Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -54,14 +54,11 @@
#define TAB 8
-void check __P((FILE *));
-int main __P((int, char **));
-void usage __P((void));
+void check(FILE *);
+void usage(void);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
u_long column, start, stop;
int ch;
@@ -124,8 +121,7 @@
}
void
-check(stream)
- FILE *stream;
+check(FILE *stream)
{
if (feof(stream))
exit(0);
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/column/Makefile
--- a/usr.bin/column/Makefile Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/column/Makefile Thu Feb 17 17:17:25 2005 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.3 1995/03/26 09:08:27 glass Exp $
+# $NetBSD: Makefile,v 1.4 2005/02/17 17:17:25 xtraeme Exp $
# @(#)Makefile 8.1 (Berkeley) 6/6/93
PROG= column
+WARNS= 3
.include <bsd.prog.mk>
diff -r d1d2279f2841 -r 0bf049ca46a6 usr.bin/column/column.c
--- a/usr.bin/column/column.c Thu Feb 17 17:12:42 2005 +0000
+++ b/usr.bin/column/column.c Thu Feb 17 17:17:25 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: column.c,v 1.11 2003/10/16 06:46:46 itojun Exp $ */
+/* $NetBSD: column.c,v 1.12 2005/02/17 17:17:25 xtraeme Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)column.c 8.4 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: column.c,v 1.11 2003/10/16 06:46:46 itojun Exp $");
+__RCSID("$NetBSD: column.c,v 1.12 2005/02/17 17:17:25 xtraeme Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -54,14 +54,13 @@
#include <string.h>
#include <unistd.h>
-void c_columnate __P((void));
-void *emalloc __P((int));
-void input __P((FILE *));
-void maketbl __P((void));
-int main __P((int, char **));
-void print __P((void));
-void r_columnate __P((void));
-void usage __P((void));
+void c_columnate(void);
+void *emalloc(int);
+void input(FILE *);
+void maketbl(void);
+void print(void);
+void r_columnate(void);
+void usage(void);
int termwidth = 80; /* default terminal width */
@@ -69,12 +68,10 @@
int eval; /* exit value */
int maxlength; /* longest record */
char **list; /* array of pointers to records */
-char *separator = "\t "; /* field separator for table option */
+const char *separator = "\t "; /* field separator for table option */
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char **argv)
{
struct winsize win;
FILE *fp;
@@ -136,7 +133,7 @@
#define TAB 8
void
-c_columnate()
+c_columnate(void)
{
int chcnt, col, cnt, endcol, numcols;
char **lp;
@@ -165,7 +162,7 @@
}
void
-r_columnate()
+r_columnate(void)
{
int base, chcnt, cnt, col, endcol, numcols, numrows, row;
@@ -192,7 +189,7 @@
}
void
-print()
+print(void)
{
int cnt;
char **lp;
@@ -208,7 +205,7 @@
#define DEFCOLS 25
void
-maketbl()
+maketbl(void)
{
TBL *t;
int coloff, cnt;
@@ -257,8 +254,7 @@
#define MAXLINELEN (LINE_MAX + 1)
void
-input(fp)
- FILE *fp;
+input(FILE *fp)
{
static int maxentry;
int len;
@@ -292,8 +288,7 @@
}
void *
-emalloc(size)
- int size;
+emalloc(int size)
{
char *p;
@@ -304,7 +299,7 @@
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr,
Home |
Main Index |
Thread Index |
Old Index