From 9f465a9db201b97c43d69778eabd222d4fc09fd5 Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Thu, 1 Feb 2007 06:15:10 +0000 Subject: Fixes build on Cygwin, some work on -regtest.py --- xdelta3/xdelta3-main.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'xdelta3/xdelta3-main.h') diff --git a/xdelta3/xdelta3-main.h b/xdelta3/xdelta3-main.h index 702b6b6..1f55636 100755 --- a/xdelta3/xdelta3-main.h +++ b/xdelta3/xdelta3-main.h @@ -357,7 +357,7 @@ main_config (void) } static void -reset_defaults() +reset_defaults(void) { option_stdout = 0; option_force = 0; @@ -665,15 +665,6 @@ main_file_init (main_file *xfile) #endif } -static void -main_file_cleanup (main_file *xfile) -{ - if (xfile->filename_copy != NULL) { - main_free(xfile->filename_copy); - xfile->filename_copy = NULL; - } -} - static int main_file_isopen (main_file *xfile) { @@ -717,6 +708,19 @@ main_file_close (main_file *xfile) return ret; } +static void +main_file_cleanup (main_file *xfile) +{ + if (main_file_isopen (xfile)) { + main_file_close (xfile); + } + + if (xfile->filename_copy != NULL) { + main_free(xfile->filename_copy); + xfile->filename_copy = NULL; + } +} + static int main_file_open (main_file *xfile, const char* name, int mode) { -- cgit v1.2.3