Author: cwittich
Date: Sat Jan 10 09:17:40 2009
New Revision: 38680
URL:
http://svn.reactos.org/svn/reactos?rev=38680&view=rev
Log:
sync cabinet to wine 1.1.12
Modified:
trunk/reactos/dll/win32/cabinet/cabinet.h
trunk/reactos/dll/win32/cabinet/cabinet_main.c
trunk/reactos/dll/win32/cabinet/fci.c
trunk/reactos/dll/win32/cabinet/fdi.c
Modified: trunk/reactos/dll/win32/cabinet/cabinet.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/cabinet.…
==============================================================================
--- trunk/reactos/dll/win32/cabinet/cabinet.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cabinet/cabinet.h [iso-8859-1] Sat Jan 10 09:17:40 2009
@@ -656,6 +656,5 @@
/* from fdi.c */
void QTMupdatemodel(struct QTMmodel *model, int sym);
int make_decode_table(cab_ULONG nsyms, cab_ULONG nbits, const cab_UBYTE *length,
cab_UWORD *table);
-cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum);
#endif /* __WINE_CABINET_H */
Modified: trunk/reactos/dll/win32/cabinet/cabinet_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/cabinet_…
==============================================================================
--- trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cabinet/cabinet_main.c [iso-8859-1] Sat Jan 10 09:17:40 2009
@@ -237,7 +237,18 @@
/* create the destination directory if it doesn't exist */
if (GetFileAttributesA(szDirectory) == INVALID_FILE_ATTRIBUTES)
+ {
+ char *ptr;
+
+ for(ptr = szDirectory + strlen(pDestination->Destination)+1; *ptr;
ptr++) {
+ if(*ptr == '\\') {
+ *ptr = 0;
+ CreateDirectoryA(szDirectory, NULL);
+ *ptr = '\\';
+ }
+ }
CreateDirectoryA(szDirectory, NULL);
+ }
hFile = CreateFileA(szFullPath, GENERIC_READ | GENERIC_WRITE, 0, NULL,
CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
Modified: trunk/reactos/dll/win32/cabinet/fci.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/fci.c?re…
==============================================================================
--- trunk/reactos/dll/win32/cabinet/fci.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cabinet/fci.c [iso-8859-1] Sat Jan 10 09:17:40 2009
@@ -382,7 +382,7 @@
/* inefficient, but it's harder to forget about freeing the buffer :-). */
/* Reserved areas are used seldom besides that... */
if (cbReserveCFData!=0) {
- if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFData))) {
+ if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFData))) {
fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE );
return FALSE;
}
@@ -852,7 +852,7 @@
/* add optional reserved area */
if (cbReserveCFFolder!=0) {
- if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFFolder))) {
+ if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFFolder))) {
fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE );
return FALSE;
}
@@ -1419,7 +1419,7 @@
/* save size of file CFDATA2 - required for the folder's offset to data */
sizeFileCFDATA2old = p_fci_internal->sizeFileCFDATA2;
- if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFData+sizeof(CFDATA)))) {
+ if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFData+sizeof(CFDATA)))) {
fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE );
PFCI_CLOSE(hfci,handleCFDATA1new,&err,p_fci_internal->pv);
/* TODO error handling of err */
@@ -1753,7 +1753,7 @@
/* add optional reserved area */
if (cbReserveCFHeader!=0) {
- if(!(reserved = (char*)PFCI_ALLOC(hfci, cbReserveCFHeader))) {
+ if(!(reserved = PFCI_ALLOC(hfci, cbReserveCFHeader))) {
fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE );
return FALSE;
}
@@ -2397,7 +2397,7 @@
fci_set_error( FCIERR_NONE, ERROR_GEN_FAILURE, TRUE );
return FALSE;
}
- if(!(p_fci_internal->data_in = (char*)PFCI_ALLOC(hfci,CB_MAX_CHUNK))) {
+ if(!(p_fci_internal->data_in = PFCI_ALLOC(hfci,CB_MAX_CHUNK))) {
fci_set_error( FCIERR_ALLOC_FAIL, ERROR_NOT_ENOUGH_MEMORY, TRUE );
return FALSE;
}
Modified: trunk/reactos/dll/win32/cabinet/fdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cabinet/fdi.c?re…
==============================================================================
--- trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cabinet/fdi.c [iso-8859-1] Sat Jan 10 09:17:40 2009
@@ -293,7 +293,7 @@
/*************************************************************************
* checksum (internal)
*/
-cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) {
+static cab_ULONG checksum(const cab_UBYTE *data, cab_UWORD bytes, cab_ULONG csum) {
int len;
cab_ULONG ul = 0;
@@ -1054,7 +1054,7 @@
l[h] = j; /* set table size in stack */
/* allocate and link in new table */
- if (!(q = (struct Ziphuft *) PFDI_ALLOC(CAB(hfdi), (z + 1)*sizeof(struct
Ziphuft))))
+ if (!(q = PFDI_ALLOC(CAB(hfdi), (z + 1)*sizeof(struct Ziphuft))))
{
if(h)
fdi_Ziphuft_free(CAB(hfdi), ZIP(u)[0]);
@@ -2180,8 +2180,8 @@
if (cab->mii.folder_resv > 0)
PFDI_SEEK(CAB(hfdi), cab->cabhf, cab->mii.folder_resv, SEEK_CUR);
-
- fol = (struct fdi_folder *) PFDI_ALLOC(CAB(hfdi), sizeof(struct
fdi_folder));
+
+ fol = PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_folder));
if (!fol) {
ERR("out of memory!\n");
return DECR_NOMEMORY;
@@ -2202,8 +2202,8 @@
for (i = 0; i < fdici.cFiles; i++) {
if (PFDI_READ(CAB(hfdi), cab->cabhf, buf2, cffile_SIZEOF) !=
cffile_SIZEOF)
return DECR_INPUT;
-
- file = (struct fdi_file *) PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_file));
+
+ file = PFDI_ALLOC(CAB(hfdi), sizeof(struct fdi_file));
if (!file) {
ERR("out of memory!\n");
return DECR_NOMEMORY;
@@ -2592,7 +2592,7 @@
if (CAB(mii).folder_resv > 0)
PFDI_SEEK(hfdi, cabhf, CAB(mii).folder_resv, SEEK_CUR);
- fol = (struct fdi_folder *) PFDI_ALLOC(hfdi, sizeof(struct fdi_folder));
+ fol = PFDI_ALLOC(hfdi, sizeof(struct fdi_folder));
if (!fol) {
ERR("out of memory!\n");
PFDI_INT(hfdi)->perf->erfOper = FDIERROR_ALLOC_FAIL;
@@ -2622,7 +2622,7 @@
goto bail_and_fail;
}
- file = (struct fdi_file *) PFDI_ALLOC(hfdi, sizeof(struct fdi_file));
+ file = PFDI_ALLOC(hfdi, sizeof(struct fdi_file));
if (!file) {
ERR("out of memory!\n");
PFDI_INT(hfdi)->perf->erfOper = FDIERROR_ALLOC_FAIL;