diff --git a/main.c b/main.c index 82d693f..3b68893 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,6 @@ /* Copyright (C) 2006-2011 Con Kolivas + Copyright (C) 2011 Peter Hyman Copyright (C) 1998-2003 Andrew Tridgell This program is free software; you can redistribute it and/or modify @@ -23,10 +24,10 @@ struct rzip_control control; static void usage(void) { print_output("lrzip version %d.%d%d\n", LRZIP_MAJOR_VERSION, LRZIP_MINOR_VERSION, LRZIP_MINOR_SUBVERSION); - print_output("Copyright (C) Con Kolivas 2006-2011\n\n"); + print_output("Copyright (C) Con Kolivas 2006-2011\n"); print_output("Based on rzip "); - print_output("Copyright (C) Andrew Tridgell 1998-2003\n"); - print_output("usage: lrzip [options] \n"); + print_output("Copyright (C) Andrew Tridgell 1998-2003\n\n"); + print_output("Usage: lrzip [options] \n"); print_output("General options:\n"); print_output(" -c check integrity of file written on decompression\n"); print_output(" -d decompress\n"); diff --git a/rzip.h b/rzip.h index f7474e5..f73b634 100644 --- a/rzip.h +++ b/rzip.h @@ -1,5 +1,6 @@ /* Copyright (C) 2006-2011 Con Kolivas + Copyright (C) 2011 Peter Hyman Copyright (C) 1998 Andrew Tridgell This program is free software; you can redistribute it and/or modify diff --git a/stream.c b/stream.c index af84c57..5efe422 100644 --- a/stream.c +++ b/stream.c @@ -1,5 +1,6 @@ /* Copyright (C) 2006-2011 Con Kolivas + Copyright (C) 2011 Peter Hyman Copyright (C) 1998 Andrew Tridgell This program is free software; you can redistribute it and/or modify diff --git a/util.c b/util.c index 6f2aea1..27b8da6 100644 --- a/util.c +++ b/util.c @@ -1,6 +1,6 @@ /* Copyright (C) 2006-2011 Con Kolivas - Copyright (C) 2008 Peter Hyman + Copyright (C) 2008, 2011 Peter Hyman Copyright (C) 1998 Andrew Tridgell This program is free software; you can redistribute it and/or modify @@ -42,6 +42,13 @@ static void unlink_files(void) unlink(control.infile); } +static void fatal_exit(void) +{ + unlink_files(); + print_output("Fatal error - exiting\n"); + exit(1); +} + /* Failure when there is likely to be a meaningful error in perror */ void fatal(const char *format, ...) { @@ -53,10 +60,8 @@ void fatal(const char *format, ...) va_end(ap); } - unlink_files(); perror(NULL); - print_output("Fatal error - exiting\n"); - exit(1); + fatal_exit(); } void failure(const char *format, ...) @@ -69,9 +74,7 @@ void failure(const char *format, ...) va_end(ap); } - unlink_files(); - print_output("Fatal error - exiting\n"); - exit(1); + fatal_exit(); } void sighandler()