This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] fastjar K&R C
- From: Marcin Dalecki <martin at dalecki dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 31 Jan 2005 12:10:13 +0100
- Subject: [PATCH] fastjar K&R C
The attached patch is removing some remains of K&R C in fastjar. The
rest of the
file is already converted to ANSI C.
diff -urN gcc-4.0-20050123/fastjar/jartool.c
gcc-4.0-20050123-new/fastjar/jartool.c
--- gcc-4.0-20050123/fastjar/jartool.c Fri Sep 24 01:40:33 2004
+++ gcc-4.0-20050123-new/fastjar/jartool.c Wed Jan 26 06:07:38 2005
@@ -335,7 +335,8 @@
{ NULL, no_argument, NULL, 0 }
};
-int main(int argc, char **argv){
+int main(int argc, char **argv)
+{
char *mfile = NULL;
@@ -602,9 +603,7 @@
static char **args_g;
static void
-init_args(args, current)
- char **args;
- int current;
+init_args(char **args, int current)
{
if(!read_names_from_stdin)
{
@@ -674,7 +673,8 @@
}
}
-void init_headers(){
+void init_headers()
+{
/* packing file header */
/* magic number */
file_header[0] = 0x50;
@@ -725,8 +725,8 @@
}
-void add_entry(struct zipentry *ze){
-
+void add_entry(struct zipentry *ze)
+{
if(ziplist == NULL){
ziplist = ze;
ziptail = ziplist;
@@ -2264,8 +2264,7 @@
}
static char *
-jt_strdup(s)
- char *s;
+jt_strdup(char *s)
{
char *result = (char*)malloc(strlen(s) + 1);
if (result == (char*)0)