Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin Use C89 function definitions
details: https://anonhg.NetBSD.org/src/rev/45992456a223
branches: trunk
changeset: 778254:45992456a223
user: matt <matt%NetBSD.org@localhost>
date: Tue Mar 20 18:42:28 2012 +0000
description:
Use C89 function definitions
diffstat:
bin/pax/ar_io.c | 14 +++-----------
bin/pax/ftree.c | 6 +++---
bin/pax/options.c | 7 +++----
bin/pax/tar.c | 10 ++++------
bin/ps/print.c | 15 +++++----------
bin/sh/arith.y | 11 ++++-------
bin/sh/arith_lex.l | 6 +++---
bin/sh/exec.c | 10 ++++------
bin/sh/histedit.c | 8 +++-----
bin/sh/nodes.c.pat | 23 ++++++++---------------
bin/sh/options.c | 7 +++----
bin/sh/redir.c | 9 ++++-----
12 files changed, 47 insertions(+), 79 deletions(-)
diffs (truncated from 460 to 300 lines):
diff -r 4241624db494 -r 45992456a223 bin/pax/ar_io.c
--- a/bin/pax/ar_io.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/pax/ar_io.c Tue Mar 20 18:42:28 2012 +0000
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ar_io.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ar_io.c,v 1.53 2011/08/31 16:24:54 plunky Exp $");
+__RCSID("$NetBSD: ar_io.c,v 1.54 2012/03/20 18:42:28 matt Exp $");
#endif
#endif /* not lint */
@@ -1613,12 +1613,7 @@
}
static const char *
-timefmt(buf, size, sz, tm, unitstr)
- char *buf;
- size_t size;
- off_t sz;
- time_t tm;
- const char *unitstr;
+timefmt(char *buf, size_t size, off_t sz, time_t tm, const char *unitstr)
{
(void)snprintf(buf, size, "%lu secs (" OFFT_F " %s/sec)",
(unsigned long)tm, (OFFT_T)(sz / tm), unitstr);
@@ -1626,10 +1621,7 @@
}
static const char *
-sizefmt(buf, size, sz)
- char *buf;
- size_t size;
- off_t sz;
+sizefmt(char *buf, size_t size, off_t sz)
{
(void)snprintf(buf, size, OFFT_F " bytes", (OFFT_T)sz);
return buf;
diff -r 4241624db494 -r 45992456a223 bin/pax/ftree.c
--- a/bin/pax/ftree.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/pax/ftree.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ftree.c,v 1.40 2009/02/14 08:10:06 lukem Exp $ */
+/* $NetBSD: ftree.c,v 1.41 2012/03/20 18:42:28 matt Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -71,7 +71,7 @@
#if 0
static char sccsid[] = "@(#)ftree.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: ftree.c,v 1.40 2009/02/14 08:10:06 lukem Exp $");
+__RCSID("$NetBSD: ftree.c,v 1.41 2012/03/20 18:42:28 matt Exp $");
#endif
#endif /* not lint */
@@ -135,7 +135,7 @@
*/
int
-ftree_start()
+ftree_start(void)
{
#ifndef SMALL
diff -r 4241624db494 -r 45992456a223 bin/pax/options.c
--- a/bin/pax/options.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/pax/options.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: options.c,v 1.112 2011/08/31 16:24:54 plunky Exp $ */
+/* $NetBSD: options.c,v 1.113 2012/03/20 18:42:28 matt Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)options.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: options.c,v 1.112 2011/08/31 16:24:54 plunky Exp $");
+__RCSID("$NetBSD: options.c,v 1.113 2012/03/20 18:42:28 matt Exp $");
#endif
#endif /* not lint */
@@ -1379,8 +1379,7 @@
}
int
-mkpath(path)
- char *path;
+mkpath(char *path)
{
char *slash;
int done = 0;
diff -r 4241624db494 -r 45992456a223 bin/pax/tar.c
--- a/bin/pax/tar.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/pax/tar.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tar.c,v 1.68 2011/11/03 21:59:45 christos Exp $ */
+/* $NetBSD: tar.c,v 1.69 2012/03/20 18:42:28 matt Exp $ */
/*-
* Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)tar.c 8.2 (Berkeley) 4/18/94";
#else
-__RCSID("$NetBSD: tar.c,v 1.68 2011/11/03 21:59:45 christos Exp $");
+__RCSID("$NetBSD: tar.c,v 1.69 2012/03/20 18:42:28 matt Exp $");
#endif
#endif /* not lint */
@@ -1366,8 +1366,7 @@
* named files.
*/
int
-tar_gnutar_minus_minus_exclude(path)
- const char *path;
+tar_gnutar_minus_minus_exclude(const char *path)
{
size_t len = strlen(path);
@@ -1378,8 +1377,7 @@
}
int
-tar_gnutar_X_compat(path)
- const char *path;
+tar_gnutar_X_compat(const char *path)
{
char *line;
FILE *fp;
diff -r 4241624db494 -r 45992456a223 bin/ps/print.c
--- a/bin/ps/print.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/ps/print.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: print.c,v 1.119 2012/02/13 12:55:28 wiz Exp $ */
+/* $NetBSD: print.c,v 1.120 2012/03/20 18:42:28 matt Exp $ */
/*
* Copyright (c) 2000, 2007 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#if 0
static char sccsid[] = "@(#)print.c 8.6 (Berkeley) 4/16/94";
#else
-__RCSID("$NetBSD: print.c,v 1.119 2012/02/13 12:55:28 wiz Exp $");
+__RCSID("$NetBSD: print.c,v 1.120 2012/03/20 18:42:28 matt Exp $");
#endif
#endif /* not lint */
@@ -1067,8 +1067,7 @@
}
double
-getpcpu(k)
- const struct kinfo_proc2 *k;
+getpcpu(const struct kinfo_proc2 *k)
{
static int failure;
@@ -1101,8 +1100,7 @@
}
double
-getpmem(k)
- const struct kinfo_proc2 *k;
+getpmem(const struct kinfo_proc2 *k)
{
static int failure;
double fracmem;
@@ -1169,10 +1167,7 @@
* structures.
*/
static void
-printval(bp, v, mode)
- void *bp;
- VAR *v;
- int mode;
+printval(void *bp, VAR *v, int mode)
{
static char ofmt[32] = "%";
int width, vok, fmtlen;
diff -r 4241624db494 -r 45992456a223 bin/sh/arith.y
--- a/bin/sh/arith.y Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/sh/arith.y Tue Mar 20 18:42:28 2012 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: arith.y,v 1.21 2011/08/29 14:50:27 joerg Exp $ */
+/* $NetBSD: arith.y,v 1.22 2012/03/20 18:42:29 matt Exp $ */
/*-
* Copyright (c) 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)arith.y 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: arith.y,v 1.21 2011/08/29 14:50:27 joerg Exp $");
+__RCSID("$NetBSD: arith.y,v 1.22 2012/03/20 18:42:29 matt Exp $");
#endif
#endif /* not lint */
@@ -123,8 +123,7 @@
;
%%
intmax_t
-arith(s)
- const char *s;
+arith(const char *s)
{
intmax_t result;
@@ -144,9 +143,7 @@
* The exp(1) builtin.
*/
int
-expcmd(argc, argv)
- int argc;
- char **argv;
+expcmd(int argc, char **argv)
{
const char *p;
char *concat;
diff -r 4241624db494 -r 45992456a223 bin/sh/arith_lex.l
--- a/bin/sh/arith_lex.l Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/sh/arith_lex.l Tue Mar 20 18:42:28 2012 +0000
@@ -1,5 +1,5 @@
%{
-/* $NetBSD: arith_lex.l,v 1.15 2009/10/29 14:21:40 christos Exp $ */
+/* $NetBSD: arith_lex.l,v 1.16 2012/03/20 18:42:29 matt Exp $ */
/*-
* Copyright (c) 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)arith_lex.l 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: arith_lex.l,v 1.15 2009/10/29 14:21:40 christos Exp $");
+__RCSID("$NetBSD: arith_lex.l,v 1.16 2012/03/20 18:42:29 matt Exp $");
#endif
#endif /* not lint */
@@ -96,7 +96,7 @@
%%
void
-arith_lex_reset() {
+arith_lex_reset(void) {
#ifdef YY_NEW_FILE
YY_NEW_FILE;
#endif
diff -r 4241624db494 -r 45992456a223 bin/sh/exec.c
--- a/bin/sh/exec.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/sh/exec.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.42 2008/10/16 15:31:05 dholland Exp $ */
+/* $NetBSD: exec.c,v 1.43 2012/03/20 18:42:29 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)exec.c 8.4 (Berkeley) 6/8/95";
#else
-__RCSID("$NetBSD: exec.c,v 1.42 2008/10/16 15:31:05 dholland Exp $");
+__RCSID("$NetBSD: exec.c,v 1.43 2012/03/20 18:42:29 matt Exp $");
#endif
#endif /* not lint */
@@ -624,8 +624,7 @@
*/
int
-(*find_builtin(name))(int, char **)
- char *name;
+(*find_builtin(char *name))(int, char **)
{
const struct builtincmd *bp;
@@ -637,8 +636,7 @@
}
int
-(*find_splbltin(name))(int, char **)
- char *name;
+(*find_splbltin(char *name))(int, char **)
{
const struct builtincmd *bp;
diff -r 4241624db494 -r 45992456a223 bin/sh/histedit.c
--- a/bin/sh/histedit.c Tue Mar 20 18:20:49 2012 +0000
+++ b/bin/sh/histedit.c Tue Mar 20 18:42:28 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: histedit.c,v 1.44 2011/07/12 16:40:41 joerg Exp $ */
+/* $NetBSD: histedit.c,v 1.45 2012/03/20 18:42:29 matt Exp $ */
/*-
* Copyright (c) 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)histedit.c 8.2 (Berkeley) 5/4/95";
#else
Home |
Main Index |
Thread Index |
Old Index