patch 7.4.1215
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index c18ad31..8cd760b 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -234,7 +234,7 @@
static char *pname;
static void
-exit_with_usage()
+exit_with_usage(void)
{
fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname);
fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname);
@@ -264,8 +264,7 @@
}
static void
-die(ret)
- int ret;
+die(int ret)
{
fprintf(stderr, "%s: ", pname);
perror(NULL);
@@ -280,10 +279,13 @@
* The name is historic and came from 'undo type opt h'.
*/
static int
-huntype(fpi, fpo, fperr, cols, hextype, base_off)
- FILE *fpi, *fpo, *fperr;
- int cols, hextype;
- long base_off;
+huntype(
+ FILE *fpi,
+ FILE *fpo,
+ FILE *fperr,
+ int cols,
+ int hextype,
+ long base_off)
{
int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols;
long have_off = 0, want_off = 0;
@@ -409,10 +411,7 @@
* If nz is always positive, lines are never suppressed.
*/
static void
-xxdline(fp, l, nz)
- FILE *fp;
- char *l;
- int nz;
+xxdline(FILE *fp, char *l, int nz)
{
static char z[LLEN+1];
static int zero_seen = 0;
@@ -472,9 +471,7 @@
};
int
-main(argc, argv)
- int argc;
- char *argv[];
+main(int argc, char *argv[])
{
FILE *fp, *fpo;
int c, e, p = 0, relseek = 1, negseek = 0, revert = 0;