diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2012-02-29 08:39:50 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2012-02-29 13:42:03 +0400 |
commit | 26aec11628a60a5ac92ba7a55e729b5d0138c85c (patch) | |
tree | 89832257c2dd0b40a8f21375fcfde936428cff17 /tools | |
parent | 9950cc5d68eb566a67fa79a9ce39ac9a06ec9c8d (diff) | |
download | bdwgc-26aec11628a60a5ac92ba7a55e729b5d0138c85c.tar.gz |
tools: Change some functions declaration style from K-R to ANSI C
* 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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/add_gc_prefix.c | 11 | ||||
-rw-r--r-- | tools/gcname.c | 8 |
2 files changed, 8 insertions, 11 deletions
diff --git a/tools/add_gc_prefix.c b/tools/add_gc_prefix.c index ecf4ff45..ddc93371 100644 --- a/tools/add_gc_prefix.c +++ b/tools/add_gc_prefix.c @@ -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); diff --git a/tools/gcname.c b/tools/gcname.c index 55b7c9fb..e8188ae2 100644 --- a/tools/gcname.c +++ b/tools/gcname.c @@ -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; } |