Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/hexdump de-__P, ANSIfy prototypes
details: https://anonhg.NetBSD.org/src/rev/7631f606338d
branches: trunk
changeset: 586848:7631f606338d
user: perry <perry%NetBSD.org@localhost>
date: Wed Jan 04 01:30:21 2006 +0000
description:
de-__P, ANSIfy prototypes
diffstat:
usr.bin/hexdump/conv.c | 12 +++-------
usr.bin/hexdump/display.c | 29 ++++++++++-----------------
usr.bin/hexdump/hexdump.c | 10 +++-----
usr.bin/hexdump/hexdump.h | 46 ++++++++++++++++++++++----------------------
usr.bin/hexdump/hexsyntax.c | 10 +++-----
usr.bin/hexdump/odsyntax.c | 23 ++++++++-------------
usr.bin/hexdump/parse.c | 30 ++++++++++------------------
7 files changed, 66 insertions(+), 94 deletions(-)
diffs (truncated from 438 to 300 lines):
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/conv.c
--- a/usr.bin/hexdump/conv.c Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/conv.c Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conv.c,v 1.11 2003/10/27 00:12:43 lukem Exp $ */
+/* $NetBSD: conv.c,v 1.12 2006/01/04 01:30:21 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)conv.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: conv.c,v 1.11 2003/10/27 00:12:43 lukem Exp $");
+__RCSID("$NetBSD: conv.c,v 1.12 2006/01/04 01:30:21 perry Exp $");
#endif
#endif /* not lint */
@@ -50,9 +50,7 @@
#include "hexdump.h"
void
-conv_c(pr, p)
- PR *pr;
- u_char *p;
+conv_c(PR *pr, u_char *p)
{
char buf[10];
char const *str;
@@ -102,9 +100,7 @@
}
void
-conv_u(pr, p)
- PR *pr;
- u_char *p;
+conv_u(PR *pr, u_char *p)
{
static const char *list[] = {
"nul", "soh", "stx", "etx", "eot", "enq", "ack", "bel",
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/display.c
--- a/usr.bin/hexdump/display.c Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/display.c Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: display.c,v 1.18 2003/10/27 00:12:43 lukem Exp $ */
+/* $NetBSD: display.c,v 1.19 2006/01/04 01:30:21 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: display.c,v 1.18 2003/10/27 00:12:43 lukem Exp $");
+__RCSID("$NetBSD: display.c,v 1.19 2006/01/04 01:30:21 perry Exp $");
#endif
#endif /* not lint */
@@ -61,10 +61,10 @@
static off_t address; /* address/offset in stream */
static off_t eaddress; /* end address */
-static inline void print __P((PR *, u_char *));
+static inline void print(PR *, u_char *);
void
-display()
+display(void)
{
FS *fs;
FU *fu;
@@ -119,9 +119,7 @@
}
static inline void
-print(pr, bp)
- PR *pr;
- u_char *bp;
+print(PR *pr, u_char *bp)
{
double f8;
float f4;
@@ -211,8 +209,7 @@
}
void
-bpad(pr)
- PR *pr;
+bpad(PR *pr)
{
static const char *spec = " -0+#";
char *p1, *p2;
@@ -232,7 +229,7 @@
static char **_argv;
u_char *
-get()
+get(void)
{
static int ateof = 1;
static u_char *curp, *savp;
@@ -299,8 +296,7 @@
}
int
-next(argv)
- char **argv;
+next(char **argv)
{
static int done;
int statok;
@@ -334,9 +330,7 @@
}
void
-doskip(fname, statok)
- const char *fname;
- int statok;
+doskip(const char *fname, int statok)
{
int cnt;
struct stat sb;
@@ -365,8 +359,7 @@
}
void *
-emalloc(allocsize)
- int allocsize;
+emalloc(int allocsize)
{
void *p;
@@ -377,7 +370,7 @@
}
void
-nomem()
+nomem(void)
{
err(1, NULL);
}
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/hexdump.c
--- a/usr.bin/hexdump/hexdump.c Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/hexdump.c Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hexdump.c,v 1.12 2003/10/27 00:12:43 lukem Exp $ */
+/* $NetBSD: hexdump.c,v 1.13 2006/01/04 01:30:21 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -40,7 +40,7 @@
#if 0
static char sccsid[] = "@(#)hexdump.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: hexdump.c,v 1.12 2003/10/27 00:12:43 lukem Exp $");
+__RCSID("$NetBSD: hexdump.c,v 1.13 2006/01/04 01:30:21 perry Exp $");
#endif
#endif /* not lint */
@@ -59,12 +59,10 @@
int exitval; /* final exit value */
int length = -1; /* max bytes to read */
-int main __P((int, char **));
+int main(int, char **);
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FS *tfs;
char *p;
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/hexdump.h
--- a/usr.bin/hexdump/hexdump.h Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/hexdump.h Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hexdump.h,v 1.8 2003/08/07 11:14:04 agc Exp $ */
+/* $NetBSD: hexdump.h,v 1.9 2006/01/04 01:30:21 perry Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -79,25 +79,25 @@
extern off_t skip; /* bytes to skip */
extern enum _vflag vflag;
-void add __P((const char *));
-void addfile __P((char *));
-void badcnt __P((char *));
-void badconv __P((char *));
-void badfmt __P((const char *));
-void badsfmt __P((void));
-void bpad __P((PR *));
-void conv_c __P((PR *, u_char *));
-void conv_u __P((PR *, u_char *));
-void display __P((void));
-void doskip __P((const char *, int));
-/*void err __P((const char *, ...));*/
-void *emalloc __P((int));
-void escape __P((char *));
-u_char *get __P((void));
-void newsyntax __P((int, char ***));
-int next __P((char **));
-void nomem __P((void));
-void oldsyntax __P((int, char ***));
-void rewrite __P((FS *));
-int size __P((FS *));
-void usage __P((void));
+void add(const char *);
+void addfile(char *);
+void badcnt(char *);
+void badconv(char *);
+void badfmt(const char *);
+void badsfmt(void);
+void bpad(PR *);
+void conv_c(PR *, u_char *);
+void conv_u(PR *, u_char *);
+void display(void);
+void doskip(const char *, int);
+/*void err(const char *, ...);*/
+void *emalloc(int);
+void escape(char *);
+u_char *get(void);
+void newsyntax(int, char ***);
+int next(char **);
+void nomem(void);
+void oldsyntax(int, char ***);
+void rewrite(FS *);
+int size(FS *);
+void usage(void);
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/hexsyntax.c
--- a/usr.bin/hexdump/hexsyntax.c Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/hexsyntax.c Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hexsyntax.c,v 1.12 2003/10/27 00:12:43 lukem Exp $ */
+/* $NetBSD: hexsyntax.c,v 1.13 2006/01/04 01:30:21 perry Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)hexsyntax.c 8.2 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: hexsyntax.c,v 1.12 2003/10/27 00:12:43 lukem Exp $");
+__RCSID("$NetBSD: hexsyntax.c,v 1.13 2006/01/04 01:30:21 perry Exp $");
#endif
#endif /* not lint */
@@ -55,9 +55,7 @@
off_t skip; /* bytes to skip */
void
-newsyntax(argc, argvp)
- int argc;
- char ***argvp;
+newsyntax(int argc, char ***argvp)
{
int ch;
char *p, **argv;
@@ -131,7 +129,7 @@
}
void
-usage()
+usage(void)
{
(void)fprintf(stderr,
"hexdump: [-bcCdovx] [-e fmt] [-f fmt_file] [-n length] [-s skip] [file ...]\n"
diff -r 65f60788922c -r 7631f606338d usr.bin/hexdump/odsyntax.c
--- a/usr.bin/hexdump/odsyntax.c Wed Jan 04 01:17:54 2006 +0000
+++ b/usr.bin/hexdump/odsyntax.c Wed Jan 04 01:30:21 2006 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: odsyntax.c,v 1.22 2005/06/02 01:53:01 lukem Exp $ */
+/* $NetBSD: odsyntax.c,v 1.23 2006/01/04 01:30:21 perry Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)odsyntax.c 8.2 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: odsyntax.c,v 1.22 2005/06/02 01:53:01 lukem Exp $");
+__RCSID("$NetBSD: odsyntax.c,v 1.23 2006/01/04 01:30:21 perry Exp $");
#endif
#endif /* not lint */
@@ -67,15 +67,13 @@
int deprecated;
-static void odoffset __P((int, char ***));
-static void posixtypes __P((char const *));
-static void odprecede __P((void));
+static void odoffset(int, char ***);
+static void posixtypes(char const *);
+static void odprecede(void);
void
Home |
Main Index |
Thread Index |
Old Index