diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-28 18:14:00 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-28 18:14:00 +0000 |
commit | ab911bb76339ad762d203a970fddd7d5c75e1ca0 (patch) | |
tree | 8931c05388b35a6649f32b57c2ae33ba33536901 /fastjar | |
parent | 0bd5e4e1816012bed3310ee7ac99fff97364a890 (diff) | |
download | gcc-ab911bb76339ad762d203a970fddd7d5c75e1ca0.tar.gz |
2005-03-28 Marcin Dalecki <martin@dalecki.de>
* jartool.c (main): Indentation fixlet.
(add_entry): Likewise.
(init_args): Don't use K&R style.
(jt_strdup): Likewise.
(get_next_arg): Add explicit '(void)'.
(init_headers): Likewise.
(version): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97135 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fastjar')
-rw-r--r-- | fastjar/ChangeLog | 10 | ||||
-rw-r--r-- | fastjar/jartool.c | 25 |
2 files changed, 23 insertions, 12 deletions
diff --git a/fastjar/ChangeLog b/fastjar/ChangeLog index 2adedb2af45..bd3c4ca270b 100644 --- a/fastjar/ChangeLog +++ b/fastjar/ChangeLog @@ -1,3 +1,13 @@ +2005-03-28 Marcin Dalecki <martin@dalecki.de> + + * jartool.c (main): Indentation fixlet. + (add_entry): Likewise. + (init_args): Don't use K&R style. + (jt_strdup): Likewise. + (get_next_arg): Add explicit '(void)'. + (init_headers): Likewise. + (version): Likewise. + 2005-03-15 Zack Weinberg <zack@codesourcery.com> * Makefile.am (fastjar_TEXINFOS): Add gcc-vers.texi. diff --git a/fastjar/jartool.c b/fastjar/jartool.c index 9431bb5e0a2..09f5dbcb787 100644 --- a/fastjar/jartool.c +++ b/fastjar/jartool.c @@ -1,6 +1,6 @@ /* jartool.c - main functions for fastjar utility - Copyright (C) 2002, 2004 Free Software Foundation + Copyright (C) 2002, 2004, 2005 Free Software Foundation Copyright (C) 1999, 2000, 2001 Bryan Burns This program is free software; you can redistribute it and/or @@ -335,7 +335,8 @@ static const struct option options[] = { 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 int args_current_g; 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) { @@ -614,7 +613,7 @@ init_args(args, current) } static char * -get_next_arg () +get_next_arg (void) { static int reached_end = 0; @@ -674,7 +673,8 @@ get_next_arg () } } -void init_headers(){ +void init_headers(void) +{ /* packing file header */ /* magic number */ file_header[0] = 0x50; @@ -725,7 +725,8 @@ void init_headers(){ } -void add_entry(struct zipentry *ze){ +void add_entry(struct zipentry *ze) +{ if(ziplist == NULL){ ziplist = ze; @@ -906,7 +907,8 @@ int read_entries (int fd) return 0; } -int make_manifest(int jfd, const char *mf_name, int updating){ +int make_manifest(int jfd, const char *mf_name, int updating) +{ time_t current_time; int nlen; /* length of file name */ int mod_time; /* file modification time */ @@ -2212,7 +2214,7 @@ void usage(const char *filename){ exit (1); } -void version () +void version (void) { printf("jar (%s) %s\n\n", PACKAGE, VERSION); printf("Copyright 1999, 2000, 2001 Bryan Burns\n"); @@ -2264,8 +2266,7 @@ Example 2: use an existing manifest file 'mymanifest' and archive all the\n\ } static char * -jt_strdup(s) - char *s; +jt_strdup(char *s) { char *result = (char*)malloc(strlen(s) + 1); if (result == (char*)0) |