Merge Wine-20041201
Added: trunk/reactos/lib/cabinet/
Modified: trunk/reactos/lib/cabinet/cabextract.c
Modified: trunk/reactos/lib/cabinet/fdi.c

Copied: trunk/reactos/lib/cabinet (from rev 12433, vendor/wine/dlls/cabinet/current)

Modified: trunk/reactos/lib/cabinet/cabextract.c
--- vendor/wine/dlls/cabinet/current/cabextract.c	2004-12-31 13:58:48 UTC (rev 12433)
+++ trunk/reactos/lib/cabinet/cabextract.c	2004-12-31 14:01:01 UTC (rev 12436)
@@ -2515,7 +2515,7 @@
       cabname = (fi->folder->cab[0]->filename);
     }
 
-    ERR(errmsg, cabname);
+    ERR((char *)errmsg, cabname);
   }
 }
 

Modified: trunk/reactos/lib/cabinet/fdi.c
--- vendor/wine/dlls/cabinet/current/fdi.c	2004-12-31 13:58:48 UTC (rev 12433)
+++ trunk/reactos/lib/cabinet/fdi.c	2004-12-31 14:01:01 UTC (rev 12436)
@@ -2696,14 +2696,20 @@
   }
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;
@@ -2738,14 +2744,20 @@
   bail_and_fail: /* here we free ram before error returns */
 
   /* free decompression temps */
-  if (LZX(window)) {
-    PFDI_FREE(hfdi, LZX(window));
-    LZX(window) = NULL;
+  switch (fol->comp_type & cffoldCOMPTYPE_MASK) {
+  case cffoldCOMPTYPE_LZX:
+    if (LZX(window)) {
+      PFDI_FREE(hfdi, LZX(window));
+      LZX(window) = NULL;
+    }
+    break;
+  case cffoldCOMPTYPE_QUANTUM:
+    if (QTM(window)) {
+      PFDI_FREE(hfdi, QTM(window));
+      QTM(window) = NULL;
+    }
+    break;
   }
-  if (QTM(window)) {
-    PFDI_FREE(hfdi, QTM(window));
-    QTM(window) = NULL;
-  }
 
   while (decomp_state) {
     fdi_decomp_state *prev_fds;