]> wimlib.net Git - wimlib/blobdiff - src/wim.c
Fix UNIX build; rename functions; comments
[wimlib] / src / wim.c
index abf3bc44880b482130f2062ef876858505d4a0db..70e8e73bcfde117136bf56aa8f5f75781a145b26 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -3,7 +3,7 @@
  */
 
 /*
- * Copyright (C) 2012, 2013 Biggers
+ * Copyright (C) 2012, 2013 Eric Biggers
  *
  * wimlib - Library for working with WIM files
  *
  */
 
 #include "config.h"
+
+#include <errno.h>
+#include <fcntl.h>
 #include <limits.h>
-#include <stdlib.h>
 #include <stdarg.h>
-#include <errno.h>
-
-#include "dentry.h"
+#include <stdlib.h>
 #include <unistd.h>
-#include <fcntl.h>
 
 #ifdef WITH_NTFS_3G
-#include <time.h>
-#include <ntfs-3g/volume.h>
+#  include <time.h>
+#  include <ntfs-3g/volume.h>
+#endif
+
+#ifdef __WIN32__
+#  include "win32.h"
 #endif
 
-#include "wimlib_internal.h"
 #include "buffer_io.h"
+#include "dentry.h"
 #include "lookup_table.h"
+#include "wimlib_internal.h"
 #include "xml.h"
 
 static int image_print_metadata(WIMStruct *w)
@@ -599,7 +603,7 @@ void destroy_image_metadata(struct wim_image_metadata *imd,
  * closes all files associated with the WIMStruct.  */
 WIMLIBAPI void wimlib_free(WIMStruct *w)
 {
-       DEBUG2("Freeing WIMStruct");
+       DEBUG("Freeing WIMStruct");
 
        if (!w)
                return;
@@ -635,6 +639,7 @@ WIMLIBAPI void wimlib_free(WIMStruct *w)
        }
 #endif
        FREE(w);
+       DEBUG("Freed WIMStruct");
 }
 
 /* Get global memory allocations out of the way.  Not strictly necessary in