Wine-20050725 vendor drop
Modified: vendor/wine/dlls/cabinet/current/cabextract.c
Modified: vendor/wine/dlls/cabinet/current/fci.c
Modified: vendor/wine/dlls/cabinet/current/fdi.c
Modified: vendor/wine/dlls/comctl32/current/Makefile.in
Modified: vendor/wine/dlls/comctl32/current/comctl32undoc.c
Modified: vendor/wine/dlls/comctl32/current/comctl_Cn.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Cs.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_De.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_En.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Es.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Fr.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_It.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Ja.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Ko.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Nl.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Pl.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Pt.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Ru.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Si.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Sv.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Th.rc
Modified: vendor/wine/dlls/comctl32/current/comctl_Uk.rc
Added: vendor/wine/dlls/comctl32/current/dpa.c
Added: vendor/wine/dlls/comctl32/current/dsa.c
Modified: vendor/wine/dlls/comctl32/current/header.c
Modified: vendor/wine/dlls/comctl32/current/imagelist.c
Modified: vendor/wine/dlls/comctl32/current/listview.c
Modified: vendor/wine/dlls/comctl32/current/propsheet.c
Modified: vendor/wine/dlls/comctl32/current/toolbar.c
Modified: vendor/wine/dlls/comctl32/current/updown.c
Modified: vendor/wine/dlls/commdlg/current/Makefile.in
Modified: vendor/wine/dlls/commdlg/current/cdlg16.h
Modified: vendor/wine/dlls/commdlg/current/cdlg_De.rc
Modified: vendor/wine/dlls/commdlg/current/cdlg_En.rc
Modified: vendor/wine/dlls/commdlg/current/cdlg_Ru.rc
Modified: vendor/wine/dlls/commdlg/current/colordlg.c
Modified: vendor/wine/dlls/commdlg/current/colordlg16.c
Modified: vendor/wine/dlls/commdlg/current/filedlg.c
Modified: vendor/wine/dlls/commdlg/current/filedlg16.c
Modified: vendor/wine/dlls/commdlg/current/filedlg31.c
Modified: vendor/wine/dlls/commdlg/current/filedlgbrowser.c
Modified: vendor/wine/dlls/commdlg/current/filetitle.c
Modified: vendor/wine/dlls/commdlg/current/finddlg.c
Modified: vendor/wine/dlls/commdlg/current/fontdlg.c
Modified: vendor/wine/dlls/commdlg/current/fontdlg16.c
Modified: vendor/wine/dlls/commdlg/current/printdlg.c
Modified: vendor/wine/dlls/commdlg/current/printdlg16.c
Modified: vendor/wine/dlls/dinput/current/device_private.h
Modified: vendor/wine/dlls/dinput/current/joystick_linux.c
Modified: vendor/wine/dlls/dinput/current/joystick_linuxinput.c
Modified: vendor/wine/dlls/dsound/current/dsound.c
Modified: vendor/wine/dlls/dsound/current/dsound_main.c
Modified: vendor/wine/dlls/dsound/current/dsound_private.h
Added: vendor/wine/dlls/midimap/
Added: vendor/wine/dlls/midimap/Wine-20050628/
Added: vendor/wine/dlls/midimap/current/
Modified: vendor/wine/dlls/midimap/current/Makefile.in
Modified: vendor/wine/dlls/midimap/current/midimap.c
Deleted: vendor/wine/dlls/midimap/current/midimap.drv.spec
Added: vendor/wine/dlls/midimap/current/midimap.spec
Modified: vendor/wine/dlls/mpr/current/pwcache.c
Modified: vendor/wine/dlls/msi/current/Makefile.in
Modified: vendor/wine/dlls/msi/current/action.c
Modified: vendor/wine/dlls/msi/current/action.h
Modified: vendor/wine/dlls/msi/current/appsearch.c
Modified: vendor/wine/dlls/msi/current/custom.c
Modified: vendor/wine/dlls/msi/current/dialog.c
Modified: vendor/wine/dlls/msi/current/events.c
Modified: vendor/wine/dlls/msi/current/files.c
Modified: vendor/wine/dlls/msi/current/helpers.c
Modified: vendor/wine/dlls/msi/current/install.c
Modified: vendor/wine/dlls/msi/current/msi.c
Modified: vendor/wine/dlls/msi/current/msi.spec
Modified: vendor/wine/dlls/msi/current/msipriv.h
Modified: vendor/wine/dlls/msi/current/package.c
Modified: vendor/wine/dlls/msi/current/registry.c
Added: vendor/wine/dlls/msi/current/source.c
Modified: vendor/wine/dlls/msi/current/string.c
Modified: vendor/wine/dlls/msi/current/suminfo.c
Modified: vendor/wine/dlls/msi/current/upgrade.c
Deleted: vendor/wine/dlls/ole32/Wine-20050524/
Modified: vendor/wine/dlls/ole32/current/antimoniker.c
Modified: vendor/wine/dlls/ole32/current/bindctx.c
Modified: vendor/wine/dlls/ole32/current/clipboard.c
Modified: vendor/wine/dlls/ole32/current/compobj.c
Modified: vendor/wine/dlls/ole32/current/compobj.spec
Modified: vendor/wine/dlls/ole32/current/compobj_private.h
Modified: vendor/wine/dlls/ole32/current/compositemoniker.c
Modified: vendor/wine/dlls/ole32/current/datacache.c
Modified: vendor/wine/dlls/ole32/current/defaulthandler.c
Modified: vendor/wine/dlls/ole32/current/errorinfo.c
Modified: vendor/wine/dlls/ole32/current/filemoniker.c
Modified: vendor/wine/dlls/ole32/current/ftmarshal.c
Modified: vendor/wine/dlls/ole32/current/hglobalstream.c
Modified: vendor/wine/dlls/ole32/current/ifs.c
Modified: vendor/wine/dlls/ole32/current/ifs.h
Modified: vendor/wine/dlls/ole32/current/itemmoniker.c
Modified: vendor/wine/dlls/ole32/current/marshal.c
Modified: vendor/wine/dlls/ole32/current/memlockbytes.c
Modified: vendor/wine/dlls/ole32/current/memlockbytes16.c
[truncated at 100 lines; 134 more skipped]
_____
Modified: vendor/wine/dlls/cabinet/current/cabextract.c
--- vendor/wine/dlls/cabinet/current/cabextract.c 2005-08-05
21:47:25 UTC (rev 17087)
+++ vendor/wine/dlls/cabinet/current/cabextract.c 2005-08-05
21:50:34 UTC (rev 17088)
@@ -51,7 +51,7 @@
*/
/* try to open a cabinet file, returns success */
-BOOL cabinet_open(struct cabinet *cab)
+static BOOL cabinet_open(struct cabinet *cab)
{
const char *name = cab->filename;
HANDLE fh;
@@ -89,7 +89,7 @@
*
* close the file handle in a struct cabinet.
*/
-void cabinet_close(struct cabinet *cab) {
+static void cabinet_close(struct cabinet *cab) {
TRACE("(cab == ^%p)\n", cab);
if (cab->fh) CloseHandle(cab->fh);
cab->fh = 0;
@@ -98,7 +98,7 @@
/*******************************************************
* ensure_filepath2 (internal)
*/
-BOOL ensure_filepath2(char *path) {
+static BOOL ensure_filepath2(char *path) {
BOOL ret = TRUE;
int len;
char *new_path;
@@ -147,7 +147,7 @@
*
* ensure_filepath("a\b\c\d.txt") ensures a, a\b and a\b\c exist as
dirs
*/
-BOOL ensure_filepath(char *path) {
+static BOOL ensure_filepath(char *path) {
char new_path[MAX_PATH];
int len, i, lastslashpos = -1;
@@ -176,7 +176,7 @@
*
* opens a file for output, returns success
*/
-BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir)
+static BOOL file_open(struct cab_file *fi, BOOL lower, LPCSTR dir)
{
char c, *d, *name;
BOOL ok = FALSE;
@@ -239,7 +239,7 @@
*
* closes a completed file
*/
-void file_close(struct cab_file *fi)
+static void file_close(struct cab_file *fi)
{
TRACE("(fi == ^%p)\n", fi);
@@ -255,7 +255,7 @@
* writes from buf to a file specified as a cab_file struct.
* returns success/failure
*/
-BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t length)
+static BOOL file_write(struct cab_file *fi, cab_UBYTE *buf, cab_off_t
length)
{
DWORD bytes_written;
@@ -276,7 +276,7 @@
* advance the file pointer associated with the cab structure
* by distance bytes
*/
-void cabinet_skip(struct cabinet *cab, cab_off_t distance)
+static void cabinet_skip(struct cabinet *cab, cab_off_t distance)
{
TRACE("(cab == ^%p, distance == %u)\n", cab, distance);
if (SetFilePointer(cab->fh, distance, NULL, FILE_CURRENT) ==
INVALID_SET_FILE_POINTER) {
@@ -290,7 +290,7 @@
*
* seek to the specified absolute offset in a cab
*/
-void cabinet_seek(struct cabinet *cab, cab_off_t offset) {
+static void cabinet_seek(struct cabinet *cab, cab_off_t offset) {
TRACE("(cab == ^%p, offset == %u)\n", cab, offset);
if (SetFilePointer(cab->fh, offset, NULL, FILE_BEGIN) != offset)
ERR("%s seek failure\n", debugstr_a(cab->filename));
@@ -301,7 +301,7 @@
*
* returns the file pointer position of a cab
*/
-cab_off_t cabinet_getoffset(struct cabinet *cab)
+static cab_off_t cabinet_getoffset(struct cabinet *cab)
{
return SetFilePointer(cab->fh, 0, NULL, FILE_CURRENT);
}
@@ -311,7 +311,7 @@
*
* read data from a cabinet, returns success
*/
-BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t
length)
+static BOOL cabinet_read(struct cabinet *cab, cab_UBYTE *buf, cab_off_t
length)
{
DWORD bytes_read;
cab_off_t avail = cab->filelen - cabinet_getoffset(cab);
@@ -339,7 +339,7 @@
*
* allocate and read an aribitrarily long string from the cabinet
*/
-char *cabinet_read_string(struct cabinet *cab)
+static char *cabinet_read_string(struct cabinet *cab)
{
cab_off_t len=256, base = cabinet_getoffset(cab), maxlen =
cab->filelen - base;
BOOL ok = FALSE;
@@ -387,7 +387,7 @@
*
* reads the header and all folder and file entries in this cabinet
*/
-BOOL cabinet_read_entries(struct cabinet *cab)
+static BOOL cabinet_read_entries(struct cabinet *cab)
{
int num_folders, num_files, header_resv, folder_resv = 0, i;
struct cab_folder *fol, *linkfol = NULL;
@@ -525,7 +525,7 @@
* file [name]. Returns a cabinet structure if successful, or NULL
* otherwise.
*/
-struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset)
+static struct cabinet *load_cab_offset(LPCSTR name, cab_off_t offset)
{
struct cabinet *cab = (struct cabinet *) calloc(1, sizeof(struct
cabinet));
int ok;
@@ -553,7 +553,7 @@
/********************************************************
* Ziphuft_free (internal)
*/
-void Ziphuft_free(struct Ziphuft *t)
+static void Ziphuft_free(struct Ziphuft *t)
{
register struct Ziphuft *p, *q;
@@ -570,7 +570,7 @@
/*********************************************************
* Ziphuft_build (internal)
*/
-cab_LONG Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s,
cab_UWORD *d, cab_UWORD *e,
+static cab_LONG Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s,
cab_UWORD *d, cab_UWORD *e,
struct Ziphuft **t, cab_LONG *m, cab_decomp_state *decomp_state)
{
cab_ULONG a; /* counter for codes of length k
*/
@@ -750,7 +750,7 @@
/*********************************************************
* Zipinflate_codes (internal)
*/
-cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft *td,
+static cab_LONG Zipinflate_codes(struct Ziphuft *tl, struct Ziphuft
*td,
cab_LONG bl, cab_LONG bd, cab_decomp_state *decomp_state)
{
register cab_ULONG e; /* table entry flag/number of extra bits */
@@ -833,7 +833,7 @@
/***********************************************************
* Zipinflate_stored (internal)
*/
-cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state)
+static cab_LONG Zipinflate_stored(cab_decomp_state *decomp_state)
/* "decompress" an inflated type 0 (stored) block. */
{
cab_ULONG n; /* number of bytes in block */
@@ -877,7 +877,7 @@
/******************************************************
* Zipinflate_fixed (internal)
*/
-cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state)
+static cab_LONG Zipinflate_fixed(cab_decomp_state *decomp_state)
{
struct Ziphuft *fixed_tl;
struct Ziphuft *fixed_td;
@@ -923,7 +923,7 @@
/**************************************************************
* Zipinflate_dynamic (internal)
*/
-cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state)
+static cab_LONG Zipinflate_dynamic(cab_decomp_state *decomp_state)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */
{
cab_LONG i; /* temporary variables */
@@ -1058,7 +1058,7 @@
/*****************************************************
* Zipinflate_block (internal)
*/
-cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state *decomp_state)
/* e == last block flag */
+static cab_LONG Zipinflate_block(cab_LONG *e, cab_decomp_state
*decomp_state) /* e == last block flag */
{ /* decompress an inflated block */
cab_ULONG t; /* block type */
register cab_ULONG b; /* bit buffer */
@@ -1096,7 +1096,7 @@
/****************************************************
* ZIPdecompress (internal)
*/
-int ZIPdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
+static int ZIPdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
{
cab_LONG e; /* last block flag */
@@ -1132,7 +1132,7 @@
*
* Initialise a model which decodes symbols from [s] to [s]+[n]-1
*/
-void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int n,
int s) {
+static void QTMinitmodel(struct QTMmodel *m, struct QTMmodelsym *sym,
int n, int s) {
int i;
m->shiftsleft = 4;
m->entries = n;
@@ -1149,7 +1149,7 @@
/******************************************************************
* QTMinit (internal)
*/
-int QTMinit(int window, int level, cab_decomp_state *decomp_state) {
+static int QTMinit(int window, int level, cab_decomp_state
*decomp_state) {
unsigned int wndsize = 1 << window;
int msz = window * 2, i;
cab_ULONG j;
@@ -1256,7 +1256,7 @@
/*******************************************************************
* QTMdecompress (internal)
*/
-int QTMdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
+static int QTMdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
{
cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *window = QTM(window);
@@ -1438,7 +1438,7 @@
/************************************************************
* LZXinit (internal)
*/
-int LZXinit(int window, cab_decomp_state *decomp_state) {
+static int LZXinit(int window, cab_decomp_state *decomp_state) {
cab_ULONG wndsize = 1 << window;
int i, j, posn_slots;
@@ -1579,7 +1579,7 @@
/************************************************************
* lzx_read_lens (internal)
*/
-int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last,
struct lzx_bits *lb,
+static int lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG
last, struct lzx_bits *lb,
cab_decomp_state *decomp_state) {
cab_ULONG i,j, x,y;
int z;
@@ -1626,7 +1626,7 @@
/*******************************************************
* LZXdecompress (internal)
*/
-int LZXdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state) {
+static int LZXdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state) {
cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *endinp = inpos + inlen;
cab_UBYTE *window = LZX(window);
@@ -1949,7 +1949,7 @@
/*********************************************************
* find_cabs_in_file (internal)
*/
-struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE search_buf[])
+static struct cabinet *find_cabs_in_file(LPCSTR name, cab_UBYTE
search_buf[])
{
struct cabinet *cab, *cab2, *firstcab = NULL, *linkcab = NULL;
cab_UBYTE *pstart = &search_buf[0], *pend, *p;
@@ -2067,7 +2067,7 @@
* tries to find *cabname, from the directory path of origcab,
correcting the
* case of *cabname if necessary, If found, writes back to *cabname.
*/
-void find_cabinet_file(char **cabname, LPCSTR origcab) {
+static void find_cabinet_file(char **cabname, LPCSTR origcab) {
char *tail, *cab, *name, *nextpart, nametmp[MAX_PATH];
int found = 0;
@@ -2156,7 +2156,7 @@
* in CAB.c) for an implementation of this that correctly frees the
discarded
* file entries.
*/
-struct cab_file *process_files(struct cabinet *basecab) {
+static struct cab_file *process_files(struct cabinet *basecab) {
struct cabinet *cab;
struct cab_file *outfi = NULL, *linkfi = NULL, *nextfi, *fi, *cfi;
struct cab_folder *fol, *firstfol, *lastfol = NULL, *predfol;
@@ -2259,7 +2259,7 @@
*
* FIXME: use a winapi to do this
*/
-int convertUTF(cab_UBYTE *in) {
+static int convertUTF(cab_UBYTE *in) {
cab_UBYTE c, *out = in, *end = in + strlen((char *) in) + 1;
cab_ULONG x;
@@ -2291,7 +2291,7 @@
/****************************************************
* NONEdecompress (internal)
*/
-int NONEdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
+static int NONEdecompress(int inlen, int outlen, cab_decomp_state
*decomp_state)
{
if (inlen != outlen) return DECR_ILLEGALDATA;
memcpy(CAB(outbuf), CAB(inbuf), (size_t) inlen);
@@ -2322,7 +2322,7 @@
/**********************************************************
* decompress (internal)
*/
-int decompress(struct cab_file *fi, int savemode, int fix,
cab_decomp_state *decomp_state)
+static int decompress(struct cab_file *fi, int savemode, int fix,
cab_decomp_state *decomp_state)
{
cab_ULONG bytes = savemode ? fi->length : fi->offset - CAB(offset);
struct cabinet *cab = CAB(current)->cab[CAB(split)];
@@ -2412,7 +2412,7 @@
*
* workhorse to extract a particular file from a cab
*/
-void extract_file(struct cab_file *fi, int lower, int fix, LPCSTR dir,
cab_decomp_state *decomp_state)
+static void extract_file(struct cab_file *fi, int lower, int fix,
LPCSTR dir, cab_decomp_state *decomp_state)
{
struct cab_folder *fol = fi->folder, *oldfol = CAB(current);
cab_LONG err = DECR_OK;
@@ -2523,7 +2523,7 @@
/*********************************************************
* print_fileinfo (internal)
*/
-void print_fileinfo(struct cab_file *fi) {
+static void print_fileinfo(struct cab_file *fi) {
char *fname = NULL;
if (fi->attribs & cffile_A_NAME_IS_UTF) {
_____
Modified: vendor/wine/dlls/cabinet/current/fci.c
--- vendor/wine/dlls/cabinet/current/fci.c 2005-08-05 21:47:25 UTC
(rev 17087)
+++ vendor/wine/dlls/cabinet/current/fci.c 2005-08-05 21:50:34 UTC
(rev 17088)
@@ -23,7 +23,6 @@
There is still some work to be done:
-- currently no support for big-endian machines
- the ERF error structure aren't used on error
- no real compression yet
- unknown behaviour if files>4GB or cabinet >4GB
@@ -44,11 +43,22 @@
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
+#include "winternl.h"
#include "fci.h"
#include "cabinet.h"
#include "wine/debug.h"
+
+#ifdef WORDS_BIGENDIAN
+#define fci_endian_ulong(x) RtlUlongByteSwap(x)
+#define fci_endian_uword(x) RtlUshortByteSwap(x)
+#else
+#define fci_endian_ulong(x) (x)
+#define fci_endian_uword(x) (x)
+#endif
+
+
WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
typedef struct {
@@ -556,7 +566,7 @@
read_result=pcfdata->cbData;
/* Modify the size of the compressed data to store only a part
of the */
/* data block into the current cabinet. This is done to prevent
*/
- /* that the maximum cabinet size will be exceeded. The remainer
*/
+ /* that the maximum cabinet size will be exceeded. The
remainder */
/* will be stored into the next following cabinet. */
/* The cabinet will be of size "p_fci_internal->oldCCAB.cb". */
@@ -599,12 +609,19 @@
return FALSE;
}
+ /* set little endian */
+ pcfdata->cbData=fci_endian_uword(pcfdata->cbData);
+ pcfdata->cbUncomp=fci_endian_uword(pcfdata->cbUncomp);
+
/* get checksum and write to cfdata.csum */
pcfdata->csum = fci_get_checksum( &(pcfdata->cbData),
sizeof(CFDATA)+cbReserveCFData -
sizeof(pcfdata->csum), fci_get_checksum(
p_fci_internal->data_out, /*buffer*/
pcfdata->cbData, 0 ) );
+ /* set little endian */
+ pcfdata->csum=fci_endian_ulong(pcfdata->csum);
+
/* write cfdata with checksum to p_fci_internal->handleCFDATA2 */
if( PFCI_WRITE(hfci, p_fci_internal->handleCFDATA2, /* file
handle */
buffer, /* memory buffer */
@@ -617,6 +634,11 @@
p_fci_internal->sizeFileCFDATA2 +=
sizeof(CFDATA)+cbReserveCFData;
+ /* reset little endian */
+ pcfdata->cbData=fci_endian_uword(pcfdata->cbData);
+ pcfdata->cbUncomp=fci_endian_uword(pcfdata->cbUncomp);
+ pcfdata->csum=fci_endian_ulong(pcfdata->csum);
+
/* write compressed data into p_fci_internal->handleCFDATA2 */
if( PFCI_WRITE(hfci, p_fci_internal->handleCFDATA2, /* file
handle */
p_fci_internal->data_out, /* memory buffer */
@@ -632,7 +654,7 @@
p_fci_internal->statusFolderCopied += pcfdata->cbData;
(*payload)+=pcfdata->cbUncomp;
/* if cabinet size too large and data has been split */
- /* write the remainer of the data block to the new CFDATA1 file
*/
+ /* write the remainder of the data block to the new CFDATA1 file
*/
if( split_block ) { /* This does not include the */
/* abused one (just search for
"abused" )*/
/* copy all CFDATA structures from handleCFDATA1 to
handleCFDATA1new */
@@ -641,7 +663,7 @@
return FALSE;
}
- /* set cbData the size of the remainer of the data block */
+ /* set cbData to the size of the remainder of the data block */
pcfdata->cbData = read_result - pcfdata->cbData;
/*recover former value of cfdata.cbData; read_result will be
the offset*/
read_result -= pcfdata->cbData;
@@ -649,6 +671,7 @@
/* reset checksum, it will be computed later */
pcfdata->csum=0;
+
/* write cfdata WITHOUT checksum to handleCFDATA1new */
if( PFCI_WRITE(hfci, handleCFDATA1new, /* file handle */
buffer, /* memory buffer */
@@ -657,7 +680,7 @@
/* TODO write error */
return FALSE;
}
- /* TODO error handling of err dont forget PFCI_FREE(hfci,
reserved) */
+ /* TODO error handling of err don't forget PFCI_FREE(hfci,
reserved) */
*psizeFileCFDATA1new += sizeof(CFDATA)+cbReserveCFData;
@@ -676,7 +699,7 @@
*psizeFileCFDATA1new += pcfdata->cbData;
/* the two blocks of the split data block have been written */
- /* dont reset split_data yet, because it is still needed see
below */
+ /* don't reset split_data yet, because it is still needed see
below */
}
/* report status with pfnfcis about copied size of folder */
@@ -721,7 +744,7 @@
/* TODO read error */
return FALSE;
}
- /* TODO error handling of err dont forget PFCI_FREE(hfci,
reserved) */
+ /* TODO error handling of err don't forget PFCI_FREE(hfci,
reserved) */
/* write cfdata with checksum to handleCFDATA1new */
if( PFCI_WRITE(hfci, handleCFDATA1new, /* file handle */
@@ -731,7 +754,7 @@
/* TODO write error */
return FALSE;
}
- /* TODO error handling of err dont forget PFCI_FREE(hfci,
reserved) */
+ /* TODO error handling of err don't forget PFCI_FREE(hfci,
reserved) */
*psizeFileCFDATA1new += sizeof(CFDATA)+cbReserveCFData;
@@ -779,7 +802,7 @@
/* absolute offset cannot be set yet, because the size of cabinet
header, */
/* the number of CFFOLDERs and the number of CFFILEs may change. */
/* Instead the size of all previous data blocks will be stored and */
- /* the remainer of the offset will be added when the cabinet will be
*/
+ /* the remainder of the offset will be added when the cabinet will be
*/
/* flushed to disk. */
/* This is exactly the way the original CABINET.DLL works!!! */
cffolder.coffCabStart=sizeFileCFDATA2old;
@@ -965,6 +988,14 @@
cffile.iFolder=cffileCONTINUED_TO_NEXT;
}
+ /* set little endian */
+ cffile.cbFile=fci_endian_ulong(cffile.cbFile);
+ cffile.uoffFolderStart=fci_endian_ulong(cffile.uoffFolderStart);
+ cffile.iFolder=fci_endian_uword(cffile.iFolder);
+ cffile.date=fci_endian_uword(cffile.date);
+ cffile.time=fci_endian_uword(cffile.time);
+ cffile.attribs=fci_endian_uword(cffile.attribs);
+
/* write cffile to p_fci_internal->handleCFFILE2 */
if( PFCI_WRITE(hfci, p_fci_internal->handleCFFILE2, /* file handle
*/
&cffile, /* memory buffer */
@@ -977,6 +1008,14 @@
p_fci_internal->sizeFileCFFILE2 += sizeof(cffile);
+ /* reset little endian */
+ cffile.cbFile=fci_endian_ulong(cffile.cbFile);
+ cffile.uoffFolderStart=fci_endian_ulong(cffile.uoffFolderStart);
+ cffile.iFolder=fci_endian_uword(cffile.iFolder);
+ cffile.date=fci_endian_uword(cffile.date);
+ cffile.time=fci_endian_uword(cffile.time);
+ cffile.attribs=fci_endian_uword(cffile.attribs);
+
/* write file name to p_fci_internal->handleCFFILE2 */
if( PFCI_WRITE(hfci, p_fci_internal->handleCFFILE2, /* file handle
*/
p_fci_internal->data_out, /* memory buffer */
@@ -1580,6 +1619,18 @@
cfheader.iCabinet = p_fci_internal->pccab->iCab-1;
}
+ /* set little endian */
+ cfheader.reserved1=fci_endian_ulong(cfheader.reserved1);
+ cfheader.cbCabinet=fci_endian_ulong(cfheader.cbCabinet);
+ cfheader.reserved2=fci_endian_ulong(cfheader.reserved2);
+ cfheader.coffFiles=fci_endian_ulong(cfheader.coffFiles);
+ cfheader.reserved3=fci_endian_ulong(cfheader.reserved3);
+ cfheader.cFolders=fci_endian_uword(cfheader.cFolders);
+ cfheader.cFiles=fci_endian_uword(cfheader.cFiles);
+ cfheader.flags=fci_endian_uword(cfheader.flags);
+ cfheader.setID=fci_endian_uword(cfheader.setID);
+ cfheader.iCabinet=fci_endian_uword(cfheader.iCabinet);
+
/* write CFHEADER into cabinet file */
if( PFCI_WRITE(hfci, handleCABINET, /* file handle */
&cfheader, /* memory buffer */
@@ -1590,6 +1641,18 @@
}
/* TODO error handling of err */
+ /* reset little endian */
+ cfheader.reserved1=fci_endian_ulong(cfheader.reserved1);
+ cfheader.cbCabinet=fci_endian_ulong(cfheader.cbCabinet);
+ cfheader.reserved2=fci_endian_ulong(cfheader.reserved2);
+ cfheader.coffFiles=fci_endian_ulong(cfheader.coffFiles);
+ cfheader.reserved3=fci_endian_ulong(cfheader.reserved3);
+ cfheader.cFolders=fci_endian_uword(cfheader.cFolders);
+ cfheader.cFiles=fci_endian_uword(cfheader.cFiles);
+ cfheader.flags=fci_endian_uword(cfheader.flags);
+ cfheader.setID=fci_endian_uword(cfheader.setID);
+ cfheader.iCabinet=fci_endian_uword(cfheader.iCabinet);
+
if( cfheader.flags & cfheadRESERVE_PRESENT ) {
/* NOTE: No checks for maximum value overflows as designed by MS!!!
*/
cfreserved.cbCFHeader = cbReserveCFHeader;
@@ -1600,6 +1663,10 @@
} else {
cfreserved.cbCFData = p_fci_internal->pccab->cbReserveCFData;
}
+
+ /* set little endian */
+ cfreserved.cbCFHeader=fci_endian_uword(cfreserved.cbCFHeader);
+
/* write reserved info into cabinet file */
if( PFCI_WRITE(hfci, handleCABINET, /* file handle */
&cfreserved, /* memory buffer */
@@ -1609,6 +1676,9 @@
return FALSE;
}
/* TODO error handling of err */
+
+ /* reset little endian */
+ cfreserved.cbCFHeader=fci_endian_uword(cfreserved.cbCFHeader);
}
/* add optional reserved area */
@@ -1735,6 +1805,11 @@
}
}
+ /* set little endian */
+ cffolder.coffCabStart=fci_endian_ulong(cffolder.coffCabStart);
+ cffolder.cCFData=fci_endian_uword(cffolder.cCFData);
+ cffolder.typeCompress=fci_endian_uword(cffolder.typeCompress);
+
/* write cffolder to cabinet file */
if( PFCI_WRITE(hfci, handleCABINET, /* file handle */
&cffolder, /* memory buffer */
@@ -1745,6 +1820,11 @@
}
/* TODO error handling of err */
+ /* reset little endian */
+ cffolder.coffCabStart=fci_endian_ulong(cffolder.coffCabStart);
+ cffolder.cCFData=fci_endian_uword(cffolder.cCFData);
+ cffolder.typeCompress=fci_endian_uword(cffolder.typeCompress);
+
/* add optional reserved area */
/* This allocation and freeing at each CFFolder block is a bit */
_____
Modified: vendor/wine/dlls/cabinet/current/fdi.c
--- vendor/wine/dlls/cabinet/current/fdi.c 2005-08-05 21:47:25 UTC
(rev 17087)
+++ vendor/wine/dlls/cabinet/current/fdi.c 2005-08-05 21:50:34 UTC
(rev 17088)
@@ -243,7 +243,7 @@
*
* returns the file pointer position of a file handle.
*/
-long FDI_getoffset(HFDI hfdi, INT_PTR hf)
+static long FDI_getoffset(HFDI hfdi, INT_PTR hf)
{
return PFDI_SEEK(hfdi, hf, 0L, SEEK_CUR);
}
@@ -254,7 +254,7 @@
* we can't use _msize; the user might not be using malloc, so we
require
* an explicit specification of the previous size. inefficient.
*/
-void *FDI_realloc(HFDI hfdi, void *mem, size_t prevsize, size_t
newsize)
+static void *FDI_realloc(HFDI hfdi, void *mem, size_t prevsize, size_t
newsize)
{
void *rslt = NULL;
char *irslt, *imem;
@@ -273,7 +273,7 @@
*
* allocate and read an arbitrarily long string from the cabinet
*/
-char *FDI_read_string(HFDI hfdi, INT_PTR hf, long cabsize)
+static char *FDI_read_string(HFDI hfdi, INT_PTR hf, long cabsize)
{
size_t len=256,
oldlen = 0,
@@ -326,7 +326,7 @@
* process the cabinet header in the style of FDIIsCabinet, but
* without the sanity checks (and bug)
*/
-BOOL FDI_read_entries(
+static BOOL FDI_read_entries(
HFDI hfdi,
INT_PTR hf,
PFDICABINETINFO pfdici,
@@ -632,7 +632,7 @@
*
* Initialize a model which decodes symbols from [s] to [s]+[n]-1
*/
-void QTMfdi_initmodel(struct QTMmodel *m, struct QTMmodelsym *sym, int
n, int s) {
+static void QTMfdi_initmodel(struct QTMmodel *m, struct QTMmodelsym
*sym, int n, int s) {
int i;
m->shiftsleft = 4;
m->entries = n;
@@ -649,7 +649,7 @@
/******************************************************************
* QTMfdi_init (internal)
*/
-int QTMfdi_init(int window, int level, fdi_decomp_state *decomp_state)
{
+static int QTMfdi_init(int window, int level, fdi_decomp_state
*decomp_state) {
unsigned int wndsize = 1 << window;
int msz = window * 2, i;
cab_ULONG j;
@@ -701,7 +701,7 @@
/************************************************************
* LZXfdi_init (internal)
*/
-int LZXfdi_init(int window, fdi_decomp_state *decomp_state) {
+static int LZXfdi_init(int window, fdi_decomp_state *decomp_state) {
cab_ULONG wndsize = 1 << window;
int i, j, posn_slots;
@@ -755,7 +755,7 @@
/****************************************************
* NONEfdi_decomp(internal)
*/
-int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
+static int NONEfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
{
if (inlen != outlen) return DECR_ILLEGALDATA;
memcpy(CAB(outbuf), CAB(inbuf), (size_t) inlen);
@@ -765,7 +765,7 @@
/********************************************************
* Ziphuft_free (internal)
*/
-void fdi_Ziphuft_free(HFDI hfdi, struct Ziphuft *t)
+static void fdi_Ziphuft_free(HFDI hfdi, struct Ziphuft *t)
{
register struct Ziphuft *p, *q;
@@ -782,7 +782,7 @@
/*********************************************************
* fdi_Ziphuft_build (internal)
*/
-cab_LONG fdi_Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG s,
cab_UWORD *d, cab_UWORD *e,
+static cab_LONG fdi_Ziphuft_build(cab_ULONG *b, cab_ULONG n, cab_ULONG
s, cab_UWORD *d, cab_UWORD *e,
struct Ziphuft **t, cab_LONG *m, fdi_decomp_state *decomp_state)
{
cab_ULONG a; /* counter for codes of length k
*/
@@ -1045,7 +1045,7 @@
/***********************************************************
* Zipinflate_stored (internal)
*/
-cab_LONG fdi_Zipinflate_stored(fdi_decomp_state *decomp_state)
+static cab_LONG fdi_Zipinflate_stored(fdi_decomp_state *decomp_state)
/* "decompress" an inflated type 0 (stored) block. */
{
cab_ULONG n; /* number of bytes in block */
@@ -1089,7 +1089,7 @@
/******************************************************
* fdi_Zipinflate_fixed (internal)
*/
-cab_LONG fdi_Zipinflate_fixed(fdi_decomp_state *decomp_state)
+static cab_LONG fdi_Zipinflate_fixed(fdi_decomp_state *decomp_state)
{
struct Ziphuft *fixed_tl;
struct Ziphuft *fixed_td;
@@ -1135,7 +1135,7 @@
/**************************************************************
* fdi_Zipinflate_dynamic (internal)
*/
-cab_LONG fdi_Zipinflate_dynamic(fdi_decomp_state *decomp_state)
+static cab_LONG fdi_Zipinflate_dynamic(fdi_decomp_state *decomp_state)
/* decompress an inflated type 2 (dynamic Huffman codes) block. */
{
cab_LONG i; /* temporary variables */
@@ -1270,7 +1270,7 @@
/*****************************************************
* fdi_Zipinflate_block (internal)
*/
-cab_LONG fdi_Zipinflate_block(cab_LONG *e, fdi_decomp_state
*decomp_state) /* e == last block flag */
+static cab_LONG fdi_Zipinflate_block(cab_LONG *e, fdi_decomp_state
*decomp_state) /* e == last block flag */
{ /* decompress an inflated block */
cab_ULONG t; /* block type */
register cab_ULONG b; /* bit buffer */
@@ -1308,7 +1308,7 @@
/****************************************************
* ZIPfdi_decomp(internal)
*/
-int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
+static int ZIPfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
{
cab_LONG e; /* last block flag */
@@ -1336,7 +1336,7 @@
/*******************************************************************
* QTMfdi_decomp(internal)
*/
-int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
+static int QTMfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state)
{
cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *window = QTM(window);
@@ -1462,7 +1462,7 @@
/************************************************************
* fdi_lzx_read_lens (internal)
*/
-int fdi_lzx_read_lens(cab_UBYTE *lens, cab_ULONG first, cab_ULONG last,
struct lzx_bits *lb,
+static int fdi_lzx_read_lens(cab_UBYTE *lens, cab_ULONG first,
cab_ULONG last, struct lzx_bits *lb,
fdi_decomp_state *decomp_state) {
cab_ULONG i,j, x,y;
int z;
@@ -1509,7 +1509,7 @@
/*******************************************************
* LZXfdi_decomp(internal)
*/
-int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state) {
+static int LZXfdi_decomp(int inlen, int outlen, fdi_decomp_state
*decomp_state) {
cab_UBYTE *inpos = CAB(inbuf);
cab_UBYTE *endinp = inpos + inlen;
cab_UBYTE *window = LZX(window);
@@ -1841,7 +1841,7 @@
* is also where we jump to additional cabinets in the case of split
* cab's, and provide (some of) the NEXT_CABINET notification
semantics.
*/
-int fdi_decomp(struct fdi_file *fi, int savemode, fdi_decomp_state
*decomp_state,
+static int fdi_decomp(struct fdi_file *fi, int savemode,
fdi_decomp_state *decomp_state,
char *pszCabPath, PFNFDINOTIFY pfnfdin, void *pvUser)
{
cab_ULONG bytes = savemode ? fi->length : fi->offset - CAB(offset);
_____
Modified: vendor/wine/dlls/comctl32/current/Makefile.in
--- vendor/wine/dlls/comctl32/current/Makefile.in 2005-08-05
21:47:25 UTC (rev 17087)
+++ vendor/wine/dlls/comctl32/current/Makefile.in 2005-08-05
21:50:34 UTC (rev 17088)
@@ -6,7 +6,7 @@
MODULE = comctl32.dll
IMPORTLIB = libcomctl32.$(IMPLIBEXT)
IMPORTS = user32 gdi32 advapi32 kernel32
-DELAYIMPORTS = winmm
+DELAYIMPORTS = winmm uxtheme
EXTRALIBS = $(LIBUNICODE)
C_SRCS = \
@@ -15,7 +15,9 @@
comctl32undoc.c \
commctrl.c \
datetime.c \
+ dpa.c \
draglist.c \
+ dsa.c \
flatsb.c \
header.c \
hotkey.c \
_____
Modified: vendor/wine/dlls/comctl32/current/comctl32undoc.c
--- vendor/wine/dlls/comctl32/current/comctl32undoc.c 2005-08-05
21:47:25 UTC (rev 17087)
+++ vendor/wine/dlls/comctl32/current/comctl32undoc.c 2005-08-05
21:50:34 UTC (rev 17088)
@@ -55,314 +55,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(commctrl);
-struct _DSA
-{
- INT nItemCount;
- LPVOID pData;
- INT nMaxCount;
- INT nItemSize;
- INT nGrow;
-};
-
-struct _DPA
-{
- INT nItemCount;
- LPVOID *ptrs;
- HANDLE hHeap;
- INT nGrow;
- INT nMaxCount;
-};
-
-typedef struct _STREAMDATA
-{
- DWORD dwSize;
- DWORD dwData2;
- DWORD dwItems;
-} STREAMDATA, *PSTREAMDATA;
-
-typedef struct _LOADDATA
-{
- INT nCount;
- PVOID ptr;
-} LOADDATA, *LPLOADDATA;
-
-typedef HRESULT (CALLBACK *DPALOADPROC)(LPLOADDATA,IStream*,LPARAM);
-
static const WCHAR strMRUList[] = {
'M','R','U','L','i','s','t',0 };
/***********************************************************************
***
- * DPA_LoadStream [COMCTL32.9]
- *
- * Loads a dynamic pointer array from a stream
- *
- * PARAMS
- * phDpa [O] pointer to a handle to a dynamic pointer array
- * loadProc [I] pointer to a callback function
- * pStream [I] pointer to a stream
- * lParam [I] application specific value
- *
- * RETURNS
- * Success: TRUE
- * Failure: FALSE
- *
- * NOTES
- * No more information available yet!
- */
-HRESULT WINAPI DPA_LoadStream (HDPA *phDpa, DPALOADPROC loadProc,
- IStream *pStream, LPARAM lParam)
-{
- HRESULT errCode;
- LARGE_INTEGER position;
- ULARGE_INTEGER newPosition;
- STREAMDATA streamData;
- LOADDATA loadData;
- ULONG ulRead;
- HDPA hDpa;
- PVOID *ptr;
-
- FIXME ("phDpa=%p loadProc=%p pStream=%p lParam=%lx\n",
- phDpa, loadProc, pStream, lParam);
-
- if (!phDpa || !loadProc || !pStream)
- return E_INVALIDARG;
-
- *phDpa = (HDPA)NULL;
-
- position.QuadPart = 0;
-
- /*
- * Zero out our streamData
- */
- memset(&streamData,0,sizeof(STREAMDATA));
-
- errCode = IStream_Seek (pStream, position, STREAM_SEEK_CUR,
&newPosition);
- if (errCode != S_OK)
- return errCode;
-
- errCode = IStream_Read (pStream, &streamData, sizeof(STREAMDATA),
&ulRead);
- if (errCode != S_OK)
- return errCode;
-
- FIXME ("dwSize=%lu dwData2=%lu dwItems=%lu\n",
- streamData.dwSize, streamData.dwData2, streamData.dwItems);
-
- if ( ulRead < sizeof(STREAMDATA) ||
- lParam < sizeof(STREAMDATA) ||
- streamData.dwSize < sizeof(STREAMDATA) ||
- streamData.dwData2 < 1) {
- errCode = E_FAIL;
- }
-
- if (streamData.dwItems > (UINT_MAX / 2 / sizeof(VOID*))) /*
536870911 */
- return E_OUTOFMEMORY;
-
- /* create the dpa */
- hDpa = DPA_Create (streamData.dwItems);
- if (!hDpa)
- return E_OUTOFMEMORY;
-
- if (!DPA_Grow (hDpa, streamData.dwItems))
- return E_OUTOFMEMORY;
-
- /* load data from the stream into the dpa */
- ptr = hDpa->ptrs;
- for (loadData.nCount = 0; loadData.nCount < streamData.dwItems;
loadData.nCount++) {
- errCode = (loadProc)(&loadData, pStream, lParam);
- if (errCode != S_OK) {
- errCode = S_FALSE;
- break;
- }
-
- *ptr = loadData.ptr;
- ptr++;
- }
-
- /* set the number of items */
- hDpa->nItemCount = loadData.nCount;
-
- /* store the handle to the dpa */
- *phDpa = hDpa;
- FIXME ("new hDpa=%p, errorcode=%lx\n", hDpa, errCode);
-
- return errCode;
-}
-
-
-/**********************************************************************
****
- * DPA_SaveStream [COMCTL32.10]
- *
- * Saves a dynamic pointer array to a stream
- *
- * PARAMS
- * hDpa [I] handle to a dynamic pointer array
- * loadProc [I] pointer to a callback function
- * pStream [I] pointer to a stream
- * lParam [I] application specific value
- *
- * RETURNS
- * Success: TRUE
- * Failure: FALSE
- *
- * NOTES
- * No more information available yet!
- */
-HRESULT WINAPI DPA_SaveStream (const HDPA hDpa, DPALOADPROC loadProc,
- IStream *pStream, LPARAM lParam)
-{
-
- FIXME ("hDpa=%p loadProc=%p pStream=%p lParam=%lx\n",
- hDpa, loadProc, pStream, lParam);
-
- return E_FAIL;
-}
-
-
-/**********************************************************************
****
- * DPA_Merge [COMCTL32.11]
- *
- * Merge two dynamic pointers arrays.
- *
- * PARAMS
- * hdpa1 [I] handle to a dynamic pointer array
- * hdpa2 [I] handle to a dynamic pointer array
- * dwFlags [I] flags
- * pfnCompare [I] pointer to sort function
- * pfnMerge [I] pointer to merge function
- * lParam [I] application specific value
- *
- * RETURNS
- * Success: TRUE
- * Failure: FALSE
- *
- * NOTES
- * No more information available yet!
- */
-BOOL WINAPI DPA_Merge (const HDPA hdpa1, const HDPA hdpa2, DWORD
dwFlags,
- PFNDPACOMPARE pfnCompare, PFNDPAMERGE pfnMerge,
- LPARAM lParam)
-{
- INT nCount;
- LPVOID *pWork1, *pWork2;
- INT nResult, i;
- INT nIndex;
-
- TRACE("%p %p %08lx %p %p %08lx)\n",
- hdpa1, hdpa2, dwFlags, pfnCompare, pfnMerge, lParam);
-
- if (IsBadWritePtr (hdpa1, sizeof(*hdpa1)))
- return FALSE;
-
- if (IsBadWritePtr (hdpa2, sizeof(*hdpa2)))
- return FALSE;
-
- if (IsBadCodePtr ((FARPROC)pfnCompare))
- return FALSE;
-
- if (IsBadCodePtr ((FARPROC)pfnMerge))
- return FALSE;
-
[truncated at 1000 lines; 20198 more skipped]