diff src/xxd/xxd.c @ 7837:33ba2adb6065

commit https://github.com/vim/vim/commit/b638a7be952544ceb03052c25b84224577a6494b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 30 21:29:58 2016 +0100 patch 7.4.1215 Problem: Using old style function declarations. Solution: Change to new style function declarations. (script by Hirohito Higashi)
author Christian Brabandt <cb@256bit.org>
date Sat, 30 Jan 2016 21:30:04 +0100
parents 7b35ee02b3c5
children b2aada04d84e
line wrap: on
line diff
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -234,7 +234,7 @@ char hexxa[] = "0123456789abcdef01234567
 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 @@ exit_with_usage()
 }
 
   static void
-die(ret)
-  int ret;
+die(int ret)
 {
   fprintf(stderr, "%s: ", pname);
   perror(NULL);
@@ -280,10 +279,13 @@ die(ret)
  * 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 @@ huntype(fpi, fpo, fperr, cols, hextype, 
  * 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 @@ static unsigned char etoa64[] =
 };
 
   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;