mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Sync to Wine-20050628:
Thomas Weidenmueller <wine-patches@reactsoft.com> - Removed local variables only used in TRACE statements. Gerold Jens Wucherpfennig <gjwucherpfennig@gmx.net> - Some FCI work. svn path=/trunk/; revision=16471
This commit is contained in:
parent
0ddd1be07e
commit
44efc84fb4
4 changed files with 2552 additions and 77 deletions
|
@ -31,6 +31,7 @@
|
|||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
|
@ -2523,13 +2524,8 @@ exit_handler:
|
|||
* print_fileinfo (internal)
|
||||
*/
|
||||
void print_fileinfo(struct cab_file *fi) {
|
||||
int d;
|
||||
int t;
|
||||
char *fname = NULL;
|
||||
|
||||
d = fi->date;
|
||||
t = fi->time;
|
||||
|
||||
if (fi->attribs & cffile_A_NAME_IS_UTF) {
|
||||
fname = malloc(strlen(fi->filename) + 1);
|
||||
if (fname) {
|
||||
|
@ -2540,8 +2536,8 @@ void print_fileinfo(struct cab_file *fi) {
|
|||
|
||||
TRACE("%9u | %02d.%02d.%04d %02d:%02d:%02d | %s\n",
|
||||
fi->length,
|
||||
d & 0x1f, (d>>5) & 0xf, (d>>9) + 1980,
|
||||
t >> 11, (t>>5) & 0x3f, (t << 1) & 0x3e,
|
||||
fi->date & 0x1f, (fi->date>>5) & 0xf, (fi->date>>9) + 1980,
|
||||
fi->time >> 11, (fi->time>>5) & 0x3f, (fi->time << 1) & 0x3e,
|
||||
fname ? fname : fi->filename
|
||||
);
|
||||
|
||||
|
|
|
@ -305,7 +305,41 @@ typedef struct {
|
|||
PFNFCIDELETE pfndelete;
|
||||
PFNFCIGETTEMPFILE pfnfcigtf;
|
||||
PCCAB pccab;
|
||||
void *pv;
|
||||
BOOL fPrevCab;
|
||||
BOOL fNextCab;
|
||||
BOOL fSplitFolder;
|
||||
cab_ULONG statusFolderCopied;
|
||||
cab_ULONG statusFolderTotal;
|
||||
BOOL fGetNextCabInVain;
|
||||
void *pv;
|
||||
char szPrevCab[CB_MAX_CABINET_NAME]; /* previous cabinet name */
|
||||
char szPrevDisk[CB_MAX_DISK_NAME]; /* disk name of previous cabinet */
|
||||
CCAB oldCCAB;
|
||||
char* data_in; /* uncompressed data blocks */
|
||||
cab_UWORD cdata_in;
|
||||
char* data_out; /* compressed data blocks */
|
||||
ULONG cCompressedBytesInFolder;
|
||||
cab_UWORD cFolders;
|
||||
cab_UWORD cFiles;
|
||||
cab_ULONG cDataBlocks;
|
||||
cab_ULONG cbFileRemainer; /* uncompressed, yet to be written data */
|
||||
/* of spanned file of a spanning folder of a spanning cabinet */
|
||||
cab_UBYTE szFileNameCFDATA1[CB_MAX_FILENAME];
|
||||
int handleCFDATA1;
|
||||
cab_UBYTE szFileNameCFFILE1[CB_MAX_FILENAME];
|
||||
int handleCFFILE1;
|
||||
cab_UBYTE szFileNameCFDATA2[CB_MAX_FILENAME];
|
||||
int handleCFDATA2;
|
||||
cab_UBYTE szFileNameCFFILE2[CB_MAX_FILENAME];
|
||||
int handleCFFILE2;
|
||||
cab_UBYTE szFileNameCFFOLDER[CB_MAX_FILENAME];
|
||||
int handleCFFOLDER;
|
||||
cab_ULONG sizeFileCFDATA1;
|
||||
cab_ULONG sizeFileCFFILE1;
|
||||
cab_ULONG sizeFileCFDATA2;
|
||||
cab_ULONG sizeFileCFFILE2;
|
||||
cab_ULONG sizeFileCFFOLDER;
|
||||
BOOL fNewPrevious;
|
||||
} FCI_Int, *PFCI_Int;
|
||||
|
||||
typedef struct {
|
||||
|
@ -326,6 +360,18 @@ typedef struct {
|
|||
/* cast an HFDI into a PFDI_Int */
|
||||
#define PFDI_INT(hfdi) ((PFDI_Int)(hfdi))
|
||||
|
||||
/* quick pfci method invokers */
|
||||
#define PFCI_ALLOC(hfdi, size) ((*PFCI_INT(hfdi)->pfnalloc) (size))
|
||||
#define PFCI_FREE(hfdi, ptr) ((*PFCI_INT(hfdi)->pfnfree) (ptr))
|
||||
#define PFCI_GETTEMPFILE(hfci,name,length) ((*PFCI_INT(hfci)->pfnfcigtf)(name,length,PFCI_INT(hfci)->pv))
|
||||
#define PFCI_DELETE(hfci,name,err,pv) ((*PFCI_INT(hfci)->pfndelete)(name,err,pv))
|
||||
#define PFCI_OPEN(hfci,name,oflag,pmode,err,pv) ((*PFCI_INT(hfci)->pfnopen)(name,oflag,pmode,err,pv))
|
||||
#define PFCI_READ(hfci,hf,memory,cb,err,pv)((*PFCI_INT(hfci)->pfnread)(hf,memory,cb,err,pv))
|
||||
#define PFCI_WRITE(hfci,hf,memory,cb,err,pv) ((*PFCI_INT(hfci)->pfnwrite)(hf,memory,cb,err,pv))
|
||||
#define PFCI_CLOSE(hfci,hf,err,pv) ((*PFCI_INT(hfci)->pfnclose)(hf,err,pv))
|
||||
#define PFCI_SEEK(hfci,hf,dist,seektype,err,pv)((*PFCI_INT(hfci)->pfnseek)(hf,dist,seektype,err,pv))
|
||||
#define PFCI_FILEPLACED(hfci,pccab,name,cb,cont,pv)((*PFCI_INT(hfci)->pfnfiledest)(pccab,name,cb,cont,pv))
|
||||
|
||||
/* quickie pfdi method invokers */
|
||||
#define PFDI_ALLOC(hfdi, size) ((*PFDI_INT(hfdi)->pfnalloc) (size))
|
||||
#define PFDI_FREE(hfdi, ptr) ((*PFDI_INT(hfdi)->pfnfree) (ptr))
|
||||
|
|
|
@ -89,15 +89,14 @@ HRESULT WINAPI CABINET_DllGetVersion (DLLVERSIONINFO *pdvi)
|
|||
HRESULT WINAPI Extract(EXTRACTdest *dest, LPCSTR what)
|
||||
{
|
||||
#define DUMPC(idx) idx >= sizeof(EXTRACTdest) ? ' ' : \
|
||||
ptr[idx] >= 0x20 ? ptr[idx] : '.'
|
||||
((unsigned char*) dest)[idx] >= 0x20 ? \
|
||||
((unsigned char*) dest)[idx] : '.'
|
||||
|
||||
#define DUMPH(idx) idx >= sizeof(EXTRACTdest) ? 0x55 : ptr[idx]
|
||||
#define DUMPH(idx) idx >= sizeof(EXTRACTdest) ? 0x55 : ((unsigned char*) dest)[idx]
|
||||
|
||||
LPSTR dir;
|
||||
unsigned char *ptr;
|
||||
unsigned int i;
|
||||
|
||||
ptr = ((unsigned char*) dest);
|
||||
TRACE("(dest == %0lx, what == %s)\n", (long) dest, debugstr_a(what));
|
||||
|
||||
if (!dest) {
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue