]> granicus.if.org Git - gc/commitdiff
tools: Change some functions declaration style from K-R to ANSI C
authorIvan Maidanski <ivmai@mail.ru>
Wed, 29 Feb 2012 04:39:50 +0000 (08:39 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 29 Feb 2012 09:42:03 +0000 (13:42 +0400)
* tools/add_gc_prefix.c (main): Remove unused "envp" argument.
* tools/add_gc_prefix.c (main): Replace the K&R-style function
definition with the ANSI C one.
* tools/gcname.c (main): Likewise.

tools/add_gc_prefix.c
tools/gcname.c

index ecf4ff45a1b3aab8db154f3edc556a66e2d81761..ddc9337142639a9c19c211983afd7cda2fcb1da2 100644 (file)
@@ -1,19 +1,16 @@
 # include <stdio.h>
 # include <gc.h>
 
-int main(argc, argv, envp)
-int argc;
-char ** argv;
-char ** envp;
+int main(int argc, char ** argv)
 {
     int i;
 
     for (i = 1; i < argc; i++) {
       if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
-       printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
+        printf("gc%d.%d/%s ", GC_VERSION_MAJOR, GC_VERSION_MINOR, argv[i]);
       } else {
-       printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
-              GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
+        printf("gc%d.%dalpha%d/%s ", GC_VERSION_MAJOR,
+               GC_VERSION_MINOR, GC_ALPHA_VERSION, argv[i]);
       }
     }
     return(0);
index 55b7c9fb320898e505daffbad6d849597b7007c7..e8188ae2c6737d3e714d0e7645a67ef77ad0ce43 100644 (file)
@@ -1,13 +1,13 @@
 #include <stdio.h>
 #include <gc.h>
 
-int main()
+int main(void)
 {
     if (GC_ALPHA_VERSION == GC_NOT_ALPHA) {
-       printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR);
+        printf("gc%d.%d", GC_VERSION_MAJOR, GC_VERSION_MINOR);
     } else {
-       printf("gc%d.%dalpha%d", GC_VERSION_MAJOR,
-                                GC_VERSION_MINOR, GC_ALPHA_VERSION);
+        printf("gc%d.%dalpha%d", GC_VERSION_MAJOR,
+                                 GC_VERSION_MINOR, GC_ALPHA_VERSION);
     }
     return 0;
 }