[USETUP] Use the smaller zlib_solo instead of the full zlib. CORE-14290
[reactos.git] / base / setup / usetup / cabinet.c
index 1d16ac0..8cc35aa 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS text-mode setup
- * FILE:        subsys/system/usetup/cabinet.c
+ * FILE:        base/setup/usetup/cabinet.c
  * PURPOSE:     Cabinet routines
  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
  * REVISIONS:
@@ -10,6 +10,7 @@
 
 #include "usetup.h"
 
+#define Z_SOLO
 #include <zlib.h>
 
 #define NDEBUG
@@ -529,7 +530,7 @@ CabinetOpen(VOID)
 
         if (!NT_SUCCESS(NtStatus))
         {
-            DPRINT("Cannot open file (%S) (%x)\n", CabinetName, NtStatus);
+            DPRINT1("Cannot open file (%S) (%x)\n", CabinetName, NtStatus);
             return CAB_STATUS_CANNOT_OPEN;
         }
 
@@ -544,7 +545,7 @@ CabinetOpen(VOID)
 
         if (!NT_SUCCESS(NtStatus))
         {
-            DPRINT("NtCreateSection failed: %x\n", NtStatus);
+            DPRINT1("NtCreateSection failed for %ls: %x\n", CabinetName, NtStatus);
             return CAB_STATUS_NOMEMORY;
         }
 
@@ -562,7 +563,7 @@ CabinetOpen(VOID)
 
         if (!NT_SUCCESS(NtStatus))
         {
-            DPRINT("NtMapViewOfSection failed: %x\n", NtStatus);
+            DPRINT1("NtMapViewOfSection failed: %x\n", NtStatus);
             return CAB_STATUS_NOMEMORY;
         }
 
@@ -578,7 +579,7 @@ CabinetOpen(VOID)
             PCABHeader->FileTableOffset < sizeof(CFHEADER))
         {
             CloseCabinet();
-            DPRINT("File has invalid header\n");
+            DPRINT1("File has invalid header\n");
             return CAB_STATUS_INVALID_CAB;
         }
 
@@ -804,7 +805,7 @@ CabinetFindNext(PCAB_SEARCH Search)
 
 #if 0
 int
-Validate()
+Validate(VOID)
 {
     return (int)RtlValidateHeap(ProcessHeap, 0, 0);
 }
@@ -932,13 +933,13 @@ CabinetExtractFile(PCAB_SEARCH Search)
 
             if (!NT_SUCCESS(NtStatus))
             {
-                DPRINT("NtCreateFile() failed (%S) (%x)\n", DestName, NtStatus);
+                DPRINT1("NtCreateFile() failed (%S) (%x)\n", DestName, NtStatus);
                 return CAB_STATUS_CANNOT_CREATE;
             }
         }
         else
         {
-            DPRINT("File (%S) exists\n", DestName);
+            DPRINT1("File (%S) exists\n", DestName);
             return CAB_STATUS_FILE_EXISTS;
         }
     }
@@ -954,7 +955,7 @@ CabinetExtractFile(PCAB_SEARCH Search)
 
     if (!NT_SUCCESS(NtStatus))
     {
-        DPRINT("NtCreateSection failed: %x\n", NtStatus);
+        DPRINT1("NtCreateSection failed for %ls, %x\n", DestName, NtStatus);
         Status = CAB_STATUS_NOMEMORY;
         goto CloseDestFile;
     }
@@ -972,7 +973,7 @@ CabinetExtractFile(PCAB_SEARCH Search)
 
     if (!NT_SUCCESS(NtStatus))
     {
-        DPRINT("NtMapViewOfSection failed: %x\n", NtStatus);
+        DPRINT1("NtMapViewOfSection failed: %x\n", NtStatus);
         Status = CAB_STATUS_NOMEMORY;
         goto CloseDestFileSection;
     }
@@ -982,7 +983,7 @@ CabinetExtractFile(PCAB_SEARCH Search)
                                       Search->File->FileTime,
                                       &FileTime))
     {
-        DPRINT("DosDateTimeToFileTime() failed\n");
+        DPRINT1("DosDateTimeToFileTime() failed\n");
         Status = CAB_STATUS_CANNOT_WRITE;
         goto UnmapDestFile;
     }