Patches to fix compilation with gcc-4.0
David Bronaugh <[email protected]> Fri, 12 Aug 2005 15:10:57 -0700
| Newsgroups | gmane.comp.emulators.winex.devel |
|---|---|
| Message-ID | <[email protected]> |
Hey all, I've hacked Transgaming CVS to compile with gcc-4.0. There are a lot of changes. I've split it up by file to make things somewhat sane; the patches are attached. Most of the errors are along the lines of "invalid lvalue in assignment" (assigning to a casted value). Some are not. Please review. Here is a summary of the patches: patch.commdlg: Fixes "invalid lvalue in assignment" problems. patch.ddraw: Fixes "invalid lvalue in assignment" problems. patch.dplayx: Removes "static" keyword from several declarations declared as "extern" earlier. patch.dsound: #if defined(__MMX__) around MMX instructions; gcc-4.0 and later reject instructions not valid for the target they are compiling for. Alternative fix: change default CFLAGS to include -dMMX or whatever. patch.kernel: Fixes "invalid lvalue in assignment" problems. patch.loader: Cleans up code to use memcpy instead of repeated abuses of casts. Fixes "invalid lvalue in assignment" problems. patch.msdos: Fixes "invalid lvalue in assignment" problems. patch.msvideo: Fixes "invalid lvalue in assignment" problems. patch.objects: Fixes "invalid lvalue in assignment" problems. patch.ole32: Removes "extern" keyword from several declarations, changes them to static. Removes "static" keywords from others. patch.oleaut32: Fixes "invalid lvalue in assignment" problems. Also removes "static" keyword from items declared "extern" earlier. patch.quartz: Reorders avcodec.h so that 'struct AVOption' is declared before common.h is included; fixes resulting chaos. Also changes several items declared as "extern" to "static" in mpeg.c patch.rpcrt4: Fixes "invalid lvalue in assignment" problems. patch.shell32: Removes "static" keyword on item declared "extern" earlier. patch.tools: Fixes "invalid lvalue in assignment" problems. patch.windows: Fixes "invalid lvalue in assignment" problems. patch.x11drv: Fixes "invalid lvalue in assignment" problems. David Bronaugh
patch.commdlg
(text/plain, 1015 B)
Index: dlls/commdlg/filedlg95.c
===================================================================
RCS file: /cvsroot/winex/dlls/commdlg/filedlg95.c,v
retrieving revision 1.7
diff -u -d -r1.7 filedlg95.c
--- dlls/commdlg/filedlg95.c 14 Mar 2005 17:13:13 -0000 1.7
+++ dlls/commdlg/filedlg95.c 12 Aug 2005 17:40:32 -0000
@@ -427,7 +427,7 @@
len = WideCharToMultiByte( CP_ACP, 0, ofn->lpstrFilter, n, NULL, 0, NULL, NULL );
y = (LPSTR)MemAlloc(len);
WideCharToMultiByte( CP_ACP, 0, ofn->lpstrFilter, n, y, len, NULL, NULL );
- (LPSTR)ofn->lpstrFilter = y;
+ ofn->lpstrFilter = (LPCWSTR)y;
}
/* convert lpstrCustomFilter */
@@ -446,7 +446,7 @@
len = WideCharToMultiByte( CP_ACP, 0, ofn->lpstrCustomFilter, n, NULL, 0, NULL, NULL );
y = (LPSTR)MemAlloc(len);
WideCharToMultiByte( CP_ACP, 0, ofn->lpstrCustomFilter, n, y, len, NULL, NULL );
- (LPSTR)ofn->lpstrCustomFilter = y;
+ ofn->lpstrCustomFilter = (LPWSTR)y;
}
/* convert string arguments, save others */
patch.ddraw
(text/plain, 868 B)
Index: dlls/ddraw/dsurface/dib.c
===================================================================
RCS file: /cvsroot/winex/dlls/ddraw/dsurface/dib.c,v
retrieving revision 1.57
diff -u -d -r1.57 dib.c
--- dlls/ddraw/dsurface/dib.c 18 Feb 2004 22:27:36 -0000 1.57
+++ dlls/ddraw/dsurface/dib.c 12 Aug 2005 17:40:34 -0000
@@ -376,8 +376,8 @@
tmp = s[x]; \
if (tmp < keylow || tmp > keyhigh) d[x] = tmp; \
} \
- (LPBYTE)s += spitch; \
- (LPBYTE)d += dpitch; \
+ s = (void *)((LPBYTE)s + spitch); \
+ d = (void *)((LPBYTE)d + dpitch); \
} \
}
@@ -960,8 +960,8 @@
tmp = s[x]; \
if (tmp < keylow || tmp > keyhigh) d[x] = tmp; \
} \
- (LPBYTE)s += sdesc.u1.lPitch; \
- (LPBYTE)d += ddesc.u1.lPitch; \
+ s = (void *)((LPBYTE)s + sdesc.u1.lPitch); \
+ s = (void *)((LPBYTE)d + ddesc.u1.lPitch); \
} \
break; \
}
patch.dplayx
(text/plain, 1.7 KB)
Index: dlls/dplayx/dplay.c
===================================================================
RCS file: /cvsroot/winex/dlls/dplayx/dplay.c,v
retrieving revision 1.10
diff -u -d -r1.10 dplay.c
--- dlls/dplayx/dplay.c 23 Feb 2005 22:50:19 -0000 1.10
+++ dlls/dplayx/dplay.c 12 Aug 2005 17:40:36 -0000
@@ -4922,7 +4922,7 @@
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay2) directPlay2WVT =
+ICOM_VTABLE(IDirectPlay2) directPlay2WVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
@@ -4968,7 +4968,7 @@
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay2) directPlay2AVT =
+ICOM_VTABLE(IDirectPlay2) directPlay2AVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
@@ -5015,7 +5015,7 @@
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay3) directPlay3AVT =
+ICOM_VTABLE(IDirectPlay3) directPlay3AVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
@@ -5076,7 +5076,7 @@
#else
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay3) directPlay3WVT =
+ICOM_VTABLE(IDirectPlay3) directPlay3WVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
@@ -5137,7 +5137,7 @@
#else
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay4) directPlay4WVT =
+ICOM_VTABLE(IDirectPlay4) directPlay4WVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
@@ -5206,7 +5206,7 @@
#else
# define XCAST(fun) (void*)
#endif
-static ICOM_VTABLE(IDirectPlay4) directPlay4AVT =
+ICOM_VTABLE(IDirectPlay4) directPlay4AVT =
{
ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
XCAST(QueryInterface)DP_QueryInterface,
patch.dsound
(text/plain, 805 B)
Index: dlls/dsound/mixer.c
===================================================================
RCS file: /cvsroot/winex/dlls/dsound/mixer.c,v
retrieving revision 1.41
diff -u -d -r1.41 mixer.c
--- dlls/dsound/mixer.c 14 Mar 2005 17:13:22 -0000 1.41
+++ dlls/dsound/mixer.c 12 Aug 2005 17:40:37 -0000
@@ -613,7 +613,7 @@
wrapmix:
if (temp > size) temp = size;
-#if defined( __i386__ )
+#if defined( __MMX__ )
if( bMmxExtensionsAvailable && (dsb->wfx.wBitsPerSample == 16) )
{
@@ -718,7 +718,7 @@
}
else
-#endif /* __i386__ */
+#endif /* __MMX__ */
for (i = 0; i < temp; i++)
{
@@ -884,7 +884,7 @@
if (temp > ulen) temp = ulen;
if (temp > size) temp = size;
-#if defined( __i386__ )
+#if defined(__MMX__)
if( bMmxExtensionsAvailable && (dsb->wfx.wBitsPerSample == 16) )
{
patch.kernel
(text/plain, 2.2 KB)
Index: dlls/kernel/thunk.c
===================================================================
RCS file: /cvsroot/winex/dlls/kernel/thunk.c,v
retrieving revision 1.6
diff -u -d -r1.6 thunk.c
--- dlls/kernel/thunk.c 7 Mar 2005 21:09:47 -0000 1.6
+++ dlls/kernel/thunk.c 12 Aug 2005 17:40:38 -0000
@@ -1334,18 +1334,19 @@
* call __FLATCS:__wine_call_from_16_thunk
*/
- *x++ = 0xB8; *((WORD *)x)++ = ds;
+ *x++ = 0xB8; *((WORD *)x) = ds; x = (void *)((WORD *)x + 1);
*x++ = 0x8E; *x++ = 0xC0;
*x++ = 0x66; *x++ = 0x0F; *x++ = 0xB7; *x++ = 0xC9;
*x++ = 0x67; *x++ = 0x66; *x++ = 0x26; *x++ = 0x8B;
- *x++ = 0x91; *((DWORD *)x)++ = context->Edx;
+ *x++ = 0x91; *((DWORD *)x) = context->Edx;
+ x = (void *)((DWORD *)x + 1);
*x++ = 0x55;
*x++ = 0x66; *x++ = 0x52;
*x++ = 0x52;
*x++ = 0x66; *x++ = 0x52;
- *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x)++ = (DWORD)__wine_call_from_16_thunk;
- *((WORD *)x)++ = cs;
+ *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x) = (DWORD)__wine_call_from_16_thunk; x = (void *)((DWORD *)x + 1);
+ *((WORD *)x) = cs; x = (void *)((WORD *)x + 1);
/* Jump to the stub code just created */
context->Eip = LOWORD(context->Eax);
@@ -1394,15 +1395,15 @@
*/
*x++ = 0x66; *x++ = 0x33; *x++ = 0xC0;
- *x++ = 0x66; *x++ = 0xBA; *((DWORD *)x)++ = (DWORD)td;
- *x++ = 0x9A; *((DWORD *)x)++ = procAddress;
+ *x++ = 0x66; *x++ = 0xBA; *((DWORD *)x) = (DWORD)td;
+ *x++ = 0x9A; *((DWORD *)x) = procAddress; x = (void *)((DWORD *)x + 1);
*x++ = 0x55;
*x++ = 0x66; *x++ = 0x52;
*x++ = 0x52;
*x++ = 0x66; *x++ = 0x52;
- *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x)++ = (DWORD)__wine_call_from_16_thunk;
- *((WORD *)x)++ = cs;
+ *x++ = 0x66; *x++ = 0x9A; *((DWORD *)x) = (DWORD)__wine_call_from_16_thunk; x = (void *)((DWORD *)x + 1);
+ *((WORD *)x) = cs; x = (void *)((WORD *)x + 1);
/* Jump to the stub code just created */
context->Eip = LOWORD(context->Eax);
patch.loader
(text/plain, 19 KB)
Index: loader/ne/convert.c
===================================================================
RCS file: /cvsroot/winex/loader/ne/convert.c,v
retrieving revision 1.3
diff -u -d -r1.3 convert.c
--- loader/ne/convert.c 18 Feb 2004 22:27:49 -0000 1.3
+++ loader/ne/convert.c 12 Aug 2005 17:41:10 -0000
@@ -14,6 +14,16 @@
WINE_DEFAULT_DEBUG_CHANNEL(resource);
+#define ADDPTR(x,y,z) ((x) = (void *)((z *)(x) + (y)))
+
+#define ADDBP(x,y) ADDPTR(x,y,BYTE)
+#define INCBP(x) ADDBP(x, 1)
+#define ADDDWP(x, y) ADDPTR(x,y,DWORD)
+#define INCDWP(x) ADDDWP(x, 1)
+#define ADDWP(x, y) ADDPTR(x,y,WORD)
+#define INCWP(x) ADDWP(x, 1)
+#define ADDLPWSTR(x, y) ADDPTR(x,y,WCHAR)
+
/**********************************************************************
* ConvertDialog32To16 (KERNEL.615)
* ConvertDialog32To16 (KERNEL32.@)
@@ -24,64 +34,72 @@
WORD nbItems, data, dialogEx;
DWORD style;
- style = *((DWORD *)dialog16)++ = *((DWORD *)p)++;
+ memcpy(dialog16, p, sizeof(DWORD));
+ style = *(DWORD *)dialog16;
+ INCDWP(dialog16); INCDWP(p);
+
dialogEx = (style == 0xffff0001); /* DIALOGEX resource */
if (dialogEx)
{
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* helpID */
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* exStyle */
- style = *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* style */
+ memcpy(dialog16, p, sizeof(DWORD) * 3); /* Copy helpID, exStyle, style */
+ ADDDWP(dialog16, 2);
+ style = *(DWORD *)dialog16;
+ ADDDWP(p, 3); INCDWP(dialog16);
}
else
- ((DWORD *)p)++; /* exStyle ignored in 16-bit standard dialog */
+ INCDWP(p); /* exStyle ignored in 16-bit standard dialog */
- nbItems = *((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++;
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* x */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* y */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* cx */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* cy */
+ nbItems = *((BYTE *)dialog16) = (BYTE)*((WORD *)p);
+ INCWP(p); INCBP(dialog16);
+ memcpy(dialog16, p, sizeof(WORD) * 4); /* x, y, cx, cy */
+ ADDWP(p, 4); ADDWP(dialog16, 4);
/* Transfer menu name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
- case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
- *((WORD *)dialog16)++ = *((WORD *)p)++; break;
+ case 0x0000: INCWP(p); *((BYTE *)dialog16) = 0; INCBP(dialog16); break;
+ case 0xffff: INCWP(p); *((BYTE *)dialog16) = 0xff; INCBP(dialog16);
+ memcpy(dialog16, p, sizeof(WORD));
+ INCWP(p); INCWP(dialog16);
+ break;
default: WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
break;
}
/* Transfer class name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
- case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
- *((WORD *)dialog16)++ = *((WORD *)p)++; break;
+ case 0x0000: INCWP(p); *((BYTE *)dialog16) = 0; INCBP(dialog16); break;
+ case 0xffff: INCWP(p); *((BYTE *)dialog16) = 0xff; INCBP(dialog16);
+ memcpy(dialog16, p, sizeof(WORD));
+ INCWP(p); INCWP(dialog16);
+ break;
default: WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
break;
}
/* Transfer window caption */
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
/* Transfer font info */
if (style & DS_SETFONT)
{
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* pointSize */
+ memcpy(dialog16, p, sizeof(WORD)); /* pointSize */
+ INCWP(p); INCWP(dialog16);
if (dialogEx)
{
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* weight */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* italic */
+ memcpy(dialog16, p, sizeof(WORD) * 2); /* weight, italic */
+ INCDWP(p); INCDWP(dialog16);
}
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL ); /* faceName */
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
}
/* Transfer dialog items */
@@ -92,65 +110,77 @@
if (dialogEx)
{
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* helpID */
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* exStyle */
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* style */
+ memcpy(dialog16, p, sizeof(DWORD) * 3); /* Copy helpID, exStyle, style */
+ ADDDWP(p, 3); ADDDWP(dialog16, 3);
}
else
{
- style = *((DWORD *)p)++; /* save style */
- ((DWORD *)p)++; /* ignore exStyle */
+ style = *((DWORD *)p); /* save style */
+ ADDDWP(p, 2); /* Skip exStyle */
}
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* x */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* y */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* cx */
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* cy */
+ memcpy(dialog16, p, sizeof(WORD) * 4); /* x, y, cx, cy */
+ ADDWP(p, 4); ADDWP(dialog16, 4);
- if (dialogEx)
- *((DWORD *)dialog16)++ = *((DWORD *)p)++; /* ID */
+ if (dialogEx) {
+ memcpy(dialog16, p, sizeof(DWORD)); /* ID */
+ INCDWP(p); INCDWP(dialog16);
+ }
else
{
- *((WORD *)dialog16)++ = *((WORD *)p)++; /* ID */
- *((DWORD *)dialog16)++ = style; /* style from above */
+ memcpy(dialog16, p, sizeof(WORD)); /* ID */
+ INCWP(p); INCWP(dialog16);
+ *((DWORD *)dialog16) = style; /* style from above */
+ INCWP(dialog16);
}
/* Transfer class name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
- case 0xffff: ((WORD *)p)++;
- *((BYTE *)dialog16)++ = (BYTE)*((WORD *)p)++; break;
+ case 0x0000: INCWP(p); *((BYTE *)dialog16) = 0; INCBP(dialog16); break;
+ case 0xffff: INCWP(p);
+ *((BYTE *)dialog16) = (BYTE)*((WORD *)p);
+ INCBP(dialog16); INCWP(p);
+ break;
default: WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
break;
}
/* Transfer window name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0; break;
- case 0xffff: ((WORD *)p)++; *((BYTE *)dialog16)++ = 0xff;
- *((WORD *)dialog16)++ = *((WORD *)p)++; break;
+ case 0x0000: INCWP(p); *((BYTE *)dialog16) = 0; INCBP(dialog16); break;
+ case 0xffff: INCWP(p); *((BYTE *)dialog16) = 0xff; INCBP(dialog16);
+ memcpy(dialog16, p, sizeof(WORD));
+ INCWP(p); INCWP(dialog16);
+ break;
default: WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)dialog16, 0x7fffffff, NULL,NULL );
- ((LPSTR)dialog16) += strlen( (LPSTR)dialog16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(dialog16, strlen( (LPSTR)dialog16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
break;
}
/* Transfer data */
- data = *((WORD *)p)++;
+ data = *((WORD *)p);
if (dialogEx)
- *((WORD *)dialog16)++ = data;
+ {
+ *((WORD *)dialog16) = data;
+ INCWP(dialog16);
+ }
else
- *((BYTE *)dialog16)++ = (BYTE)data;
+ {
+ *((BYTE *)dialog16) = (BYTE)data;
+ INCBP(dialog16);
+ }
+ INCWP(p);
if (data)
{
memcpy( dialog16, p, data );
- (LPSTR)dialog16 += data;
- (LPSTR)p += data;
+ ADDBP(dialog16, data);
+ ADDBP(p, data);
}
/* Next item */
@@ -167,52 +197,49 @@
WORD nbItems, data, dialogEx;
DWORD style;
- style = *((DWORD *)p)++;
+ style = *((DWORD *)p);
+ INCDWP(p);
dialogEx = (style == 0xffff0001); /* DIALOGEX resource */
if (dialogEx)
{
- ((DWORD *)p)++; /* helpID */
- ((DWORD *)p)++; /* exStyle */
- style = *((DWORD *)p)++; /* style */
+ ADDDWP(p, 2);
+ style = *(DWORD *)p;
+ INCDWP(p);
}
else
- ((DWORD *)p)++; /* exStyle */
+ INCDWP(p); /* exStyle */
- nbItems = *((WORD *)p)++;
- ((WORD *)p)++; /* x */
- ((WORD *)p)++; /* y */
- ((WORD *)p)++; /* cx */
- ((WORD *)p)++; /* cy */
+ nbItems = *((WORD *)p);
+ ADDWP(p, 5); /* Skip x, y, cx, cy */
/* Skip menu name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; break;
- case 0xffff: ((WORD *)p) += 2; break;
- default: ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; break;
+ case 0x0000: INCWP(p); break;
+ case 0xffff: ADDWP(p, 2); break;
+ default: ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1); break;
}
/* Skip class name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; break;
- case 0xffff: ((WORD *)p) += 2; break;
- default: ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; break;
+ case 0x0000: INCWP(p); break;
+ case 0xffff: ADDWP(p, 2); break;
+ default: ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1); break;
}
/* Skip window caption */
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
/* Skip font info */
if (style & DS_SETFONT)
{
- ((WORD *)p)++; /* pointSize */
+ INCWP(p); /* Skip pointSize */
if (dialogEx)
{
- ((WORD *)p)++; /* weight */
- ((WORD *)p)++; /* italic */
+ ADDWP(p, 2); /* Skip weight, italic */
}
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; /* faceName */
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1); /* Skip faceName */
}
/* Skip dialog items */
@@ -222,46 +249,36 @@
p = (LPVOID)((((int)p) + 3) & ~3);
if (dialogEx)
- {
- ((DWORD *)p)++; /* helpID */
- ((DWORD *)p)++; /* exStyle */
- ((DWORD *)p)++; /* style */
- }
+ ADDDWP(p, 3); /* Skip helpID, exStyle, style */
else
- {
- ((DWORD *)p)++; /* style */
- ((DWORD *)p)++; /* exStyle */
- }
+ ADDDWP(p, 2); /* Skip style, exStyle */
- ((WORD *)p)++; /* x */
- ((WORD *)p)++; /* y */
- ((WORD *)p)++; /* cx */
- ((WORD *)p)++; /* cy */
+ ADDWP(p, 4); /* Skip x, y, cx, cy */
if (dialogEx)
- ((DWORD *)p)++; /* ID */
+ INCDWP(p); /* ID */
else
- ((WORD *)p)++; /* ID */
+ INCWP(p); /* ID */
/* Skip class name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; break;
- case 0xffff: ((WORD *)p) += 2; break;
- default: ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; break;
+ case 0x0000: INCWP(p); break;
+ case 0xffff: ADDWP(p, 2); break;
+ default: ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1); break;
}
/* Skip window name */
switch (*((WORD *)p))
{
- case 0x0000: ((WORD *)p)++; break;
- case 0xffff: ((WORD *)p) += 2; break;
- default: ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1; break;
+ case 0x0000: INCWP(p); break;
+ case 0xffff: ADDWP(p, 2); break;
+ default: ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1); break;
}
/* Skip data */
- data = *((WORD *)p)++;
- (LPSTR)p += data;
+ data = *((WORD *)p);
+ ADDBP(p, data + sizeof(WORD)); /* Skip data plus length of data */
/* Next item */
nbItems--;
@@ -278,41 +295,51 @@
LPVOID p = menu32;
WORD version, headersize, flags, level = 1;
- version = *((WORD *)menu16)++ = *((WORD *)p)++;
- headersize = *((WORD *)menu16)++ = *((WORD *)p)++;
+ memcpy(menu16, p, 4); /* Copy both version and headersize */
+ version = *((WORD *)menu16);
+ INCWP(menu16); INCWP(p);
+ headersize = *((WORD *)menu16);
+ INCWP(menu16); INCWP(p);
+
if ( headersize )
{
memcpy( menu16, p, headersize );
- ((LPSTR)menu16) += headersize;
- ((LPSTR)p) += headersize;
+ ADDBP(menu16, headersize);
+ ADDBP(p, headersize);
}
while ( level )
if ( version == 0 ) /* standard */
{
- flags = *((WORD *)menu16)++ = *((WORD *)p)++;
- if ( !(flags & MF_POPUP) )
- *((WORD *)menu16)++ = *((WORD *)p)++; /* ID */
+ memcpy(menu16, p, 2);
+ flags = *((WORD *)menu16);
+ INCWP(p); INCWP(menu16);
+ if ( !(flags & MF_POPUP) ) {
+ memcpy(menu16, p, 2); /* ID */
+ INCWP(menu16); INCWP(p);
+ }
else
level++;
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)menu16, 0x7fffffff, NULL,NULL );
- ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(menu16, strlen( (LPSTR)menu16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
if ( flags & MF_END )
level--;
}
else /* extended */
{
- *((DWORD *)menu16)++ = *((DWORD *)p)++; /* fType */
- *((DWORD *)menu16)++ = *((DWORD *)p)++; /* fState */
- *((WORD *)menu16)++ = (WORD)*((DWORD *)p)++; /* ID */
- flags = *((BYTE *)menu16)++ = (BYTE)*((WORD *)p)++;
+ memcpy(menu16, p, sizeof(DWORD) * 2); /* Copy fType, fState */
+ ADDWP(p, 2); ADDWP(menu16, 2);
+ *((WORD *)menu16) = (WORD)*((DWORD *)p); /* ID */
+ INCDWP(p); INCWP(menu16);
+ flags = *((BYTE *)menu16) = (BYTE)*((WORD *)p);
+ INCWP(p); INCBP(menu16);
WideCharToMultiByte( CP_ACP, 0, (LPWSTR)p, -1, (LPSTR)menu16, 0x7fffffff, NULL,NULL );
- ((LPSTR)menu16) += strlen( (LPSTR)menu16 ) + 1;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDBP(menu16, strlen( (LPSTR)menu16 ) + 1);
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
/* align on DWORD boundary (32-bit only) */
p = (LPVOID)((((int)p) + 3) & ~3);
@@ -320,7 +347,8 @@
/* If popup, transfer helpid */
if ( flags & 1)
{
- *((DWORD *)menu16)++ = *((DWORD *)p)++;
+ memcpy(menu16, p, sizeof(DWORD));
+ INCDWP(p); INCDWP(menu16);
level++;
}
@@ -337,32 +365,34 @@
LPVOID p = menu32;
WORD version, headersize, flags, level = 1;
- version = *((WORD *)p)++;
- headersize = *((WORD *)p)++;
- ((LPSTR)p) += headersize;
+ version = *((WORD *)p);
+ INCWP(p);
+ headersize = *((WORD *)p);
+ INCWP(p);
+ ADDBP(p, headersize);
while ( level )
if ( version == 0 ) /* standard */
{
- flags = *((WORD *)p)++;
+ flags = *((WORD *)p);
+ INCWP(p);
if ( !(flags & MF_POPUP) )
- ((WORD *)p)++; /* ID */
+ INCWP(p); /* ID */
else
level++;
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
if ( flags & MF_END )
level--;
}
else /* extended */
{
- ((DWORD *)p)++; /* fType */
- ((DWORD *)p)++; /* fState */
- ((DWORD *)p)++; /* ID */
- flags = *((WORD *)p)++;
+ ADDDWP(p, 3); /* Skip fType, fState, ID */
+ flags = *((WORD *)p);
+ INCWP(p);
- ((LPWSTR)p) += strlenW( (LPWSTR)p ) + 1;
+ ADDLPWSTR(p, strlenW( (LPWSTR)p ) + 1);
/* align on DWORD boundary (32-bit only) */
p = (LPVOID)((((int)p) + 3) & ~3);
@@ -370,7 +400,7 @@
/* If popup, skip helpid */
if ( flags & 1)
{
- ((DWORD *)p)++;
+ INCDWP(p);
level++;
}
@@ -391,14 +421,16 @@
do
{
/* Copy type */
- type = *((BYTE *)acc16)++ = *((BYTE *)acc32)++;
+ memcpy(acc16, acc32, sizeof(BYTE));
+ type = *((BYTE *)acc16);
+ INCBP(acc16); INCBP(acc32);
/* Skip padding */
- ((BYTE *)acc32)++;
+ INCBP(acc32);
/* Copy event and IDval */
- *((WORD *)acc16)++ = *((WORD *)acc32)++;
- *((WORD *)acc16)++ = *((WORD *)acc32)++;
+ memcpy(acc16, acc32, sizeof(WORD) * 2);
+ ADDWP(acc16, 2); ADDWP(acc32, 2);
/* Skip padding */
- ((WORD *)acc32)++;
+ INCWP(acc32);
} while ( !( type & 0x80 ) );
}
Index: loader/ne/module.c
===================================================================
RCS file: /cvsroot/winex/loader/ne/module.c,v
retrieving revision 1.6
diff -u -d -r1.6 module.c
--- loader/ne/module.c 18 Feb 2004 22:27:49 -0000 1.6
+++ loader/ne/module.c 12 Aug 2005 17:41:11 -0000
@@ -680,7 +680,7 @@
bundle->first = bundle->last =
oldbundle->last + nr_entries;
bundle->next = 0;
- (BYTE *)entry += sizeof(ET_BUNDLE);
+ entry = (void *)((BYTE *)entry + sizeof(ET_BUNDLE));
}
}
}
Index: loader/ne/segment.c
===================================================================
RCS file: /cvsroot/winex/loader/ne/segment.c,v
retrieving revision 1.5
diff -u -d -r1.5 segment.c
--- loader/ne/segment.c 15 Nov 2004 15:42:07 -0000 1.5
+++ loader/ne/segment.c 12 Aug 2005 17:41:12 -0000
@@ -179,8 +179,10 @@
ReadFile(hf, buff, size, &res, NULL);
while(curr < buff + size) {
- unsigned int rept = *((short*) curr)++;
- unsigned int len = *((short*) curr)++;
+ unsigned int rept = *((short*) curr);
+ curr = (void*)((short*)curr + 1);
+ unsigned int len = *((short*) curr);
+ curr = (void*)((short*)curr + 1);
for(; rept > 0; rept--) {
char* bytes = curr;
unsigned int byte;
patch.msdos
(text/plain, 1.5 KB)
Index: msdos/int21.c
===================================================================
RCS file: /cvsroot/winex/msdos/int21.c,v
retrieving revision 1.8
diff -u -d -r1.8 int21.c
--- msdos/int21.c 14 Mar 2005 17:15:43 -0000 1.8
+++ msdos/int21.c 12 Aug 2005 17:41:13 -0000
@@ -840,12 +840,12 @@
if (*fcb == 0xff) { /* place extended FCB header before pResult if called with extended FCB */
*(BYTE *)pResult = 0xff;
- (BYTE *)pResult +=6; /* leave reserved field behind */
+ pResult = (void *)((BYTE *)pResult + 6); /* leave reserved field behind */
*(BYTE *)pResult = entry.dwFileAttributes;
- ((BYTE *)pResult)++;
+ pResult = (void *)((BYTE *)pResult + 1);
}
*(BYTE *)pResult = DOS_GET_DRIVE( pFCB->drive ); /* DOS_DIRENTRY_LAYOUT after current drive number */
- ((BYTE *)pResult)++;
+ pResult = (void *)((BYTE *)pResult + 1);
pResult->fileattr = entry.dwFileAttributes;
pResult->cluster = 0; /* what else? */
pResult->filesize = entry.nFileSizeLow;
Index: msdos/int2f.c
===================================================================
RCS file: /cvsroot/winex/msdos/int2f.c,v
retrieving revision 1.11
diff -u -d -r1.11 int2f.c
--- msdos/int2f.c 7 Mar 2005 21:21:59 -0000 1.11
+++ msdos/int2f.c 12 Aug 2005 17:41:14 -0000
@@ -203,7 +203,7 @@
}
break;
case 0xb7: /* append */
- LOBYTE(context->Eax) = 0; /* not installed */
+ context->Eax &= 0xffffff00; /* not installed */
break;
case 0xb8: /* network */
switch (LOBYTE(context->Eax))
patch.msvideo
(text/plain, 1.6 KB)
Index: dlls/msvideo/msrle32/msrle32.c
===================================================================
RCS file: /cvsroot/winex/dlls/msvideo/msrle32/msrle32.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 msrle32.c
--- dlls/msvideo/msrle32/msrle32.c 17 Dec 2003 18:51:59 -0000 1.1.1.2
+++ dlls/msvideo/msrle32/msrle32.c 12 Aug 2005 17:40:40 -0000
@@ -554,7 +554,8 @@
/* add EOL -- end of line */
lpbiOut->biSizeImage += 2;
- *((LPWORD)lpOut)++ = 0;
+ *((LPWORD)lpOut) = 0;
+ lpOut = (void *)((LPWORD)lpOut + 1);
}
} else {
/* delta-frame -- compute delta between last and this internal frame */
@@ -612,7 +613,8 @@
}
/* add EOL -- end of line */
lpbiOut->biSizeImage += 2;
- *((LPWORD)lpOut)++ = 0;
+ *((LPWORD)lpOut) = 0;
+ lpOut = (void *)((LPWORD)lpOut + 1);
}
/* FIXME: if (jumpy == 0 && could encode all) then jump too expensive */
@@ -650,7 +652,8 @@
/* add EOL -- end of line */
lpbiOut->biSizeImage += 2;
- *((LPWORD)lpOut)++ = 0;
+ *((LPWORD)lpOut) = 0;
+ lpOut = (void *)((LPWORD)lpOut + 1);
}
}
}
@@ -693,7 +696,8 @@
/* add EOL -- end of line */
lpbiOut->biSizeImage += 2;
- *((LPWORD)lpOut)++ = 0;
+ *((LPWORD)lpOut) = 0;
+ lpOut = (void *)((LPWORD)lpOut + 1);
}
} else {
/* delta-frame -- compute delta between last and this internal frame */
@@ -737,7 +741,8 @@
/* add EOL -- end of line */
lpbiOut->biSizeImage += 2;
- *((LPWORD)lpOut)++ = 0;
+ *((LPWORD)lpOut) = 0;
+ lpOut = (void *)((LPWORD)lpOut + 1);
}
/* FIXME: if (jumpy == 0 && could encode all) then jump too expensive */
patch.objects
(text/plain, 1.1 KB)
Index: objects/enhmetafile.c
===================================================================
RCS file: /cvsroot/winex/objects/enhmetafile.c,v
retrieving revision 1.3
diff -u -d -r1.3 enhmetafile.c
--- objects/enhmetafile.c 18 Feb 2004 22:27:50 -0000 1.3
+++ objects/enhmetafile.c 12 Aug 2005 17:41:15 -0000
@@ -1842,7 +1842,7 @@
bOpenGL */
}
- (char*)lpbBuffer += ((METAHEADER*)lpbBuffer)->mtHeaderSize * 2; /* Point past the header - FIXME: metafile quirk? */
+ lpbBuffer = (void*)((char*)lpbBuffer + ((METAHEADER*)lpbBuffer)->mtHeaderSize * 2); /* Point past the header - FIXME: metafile quirk? */
/* 2. Enum over individual records and convert them to the new type of records */
while( !bFoundEOF )
@@ -2149,7 +2149,7 @@
}
/* Move to the next record */
- (char*)lpbBuffer += ((LPMETARECORD)lpbBuffer)->rdSize * 2; /* FIXME: Seem to be doing this in metafile.c */
+ lpbBuffer = (void *)((char*)lpbBuffer + ((LPMETARECORD)lpbBuffer)->rdSize * 2); /* FIXME: Seem to be doing this in metafile.c */
#undef ReAllocAndAdjustPointers
}
patch.ole32
(text/plain, 3 KB)
Index: dlls/ole32/ifs.c
===================================================================
RCS file: /cvsroot/winex/dlls/ole32/ifs.c,v
retrieving revision 1.7
diff -u -d -r1.7 ifs.c
--- dlls/ole32/ifs.c 1 Apr 2004 12:09:26 -0000 1.7
+++ dlls/ole32/ifs.c 12 Aug 2005 17:40:40 -0000
@@ -30,7 +30,7 @@
*
*****************************************************************************/
/* set the vtable later */
-extern ICOM_VTABLE(IMalloc) VT_IMalloc32;
+static ICOM_VTABLE(IMalloc) VT_IMalloc32;
typedef struct {
ICOM_VFIELD(IMalloc);
@@ -330,7 +330,7 @@
*****************************************************************************/
/* set the vtable later */
-extern ICOM_VTABLE(IMallocSpy) VT_IMallocSpy;
+static ICOM_VTABLE(IMallocSpy) VT_IMallocSpy;
typedef struct {
ICOM_VFIELD(IMallocSpy);
Index: dlls/ole32/proxy.c
===================================================================
RCS file: /cvsroot/winex/dlls/ole32/proxy.c,v
retrieving revision 1.24
diff -u -d -r1.24 proxy.c
--- dlls/ole32/proxy.c 14 Mar 2005 17:17:03 -0000 1.24
+++ dlls/ole32/proxy.c 12 Aug 2005 17:40:41 -0000
@@ -42,7 +42,7 @@
static HRESULT COM_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv);
/* the standard marshaller returns a special GUID */
-static const CLSID CLSID_StdMarshal = {
+const CLSID CLSID_StdMarshal = {
0x1B, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46}
};
@@ -52,7 +52,7 @@
0x320, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46}
};
-static const IID IID_IRemUnknown = {
+const IID IID_IRemUnknown = {
0x131, 0, 0, {0xC0, 0, 0, 0, 0, 0, 0, 0x46}
};
Index: dlls/ole32/storage.c
===================================================================
RCS file: /cvsroot/winex/dlls/ole32/storage.c,v
retrieving revision 1.5
diff -u -d -r1.5 storage.c
--- dlls/ole32/storage.c 14 Mar 2005 17:13:55 -0000 1.5
+++ dlls/ole32/storage.c 12 Aug 2005 17:40:42 -0000
@@ -801,7 +801,7 @@
cc=SMALLSIZE-(This->offset.s.LowPart&(SMALLSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(SMALLSIZE-1)),cc);
This->offset.s.LowPart+=cc;
- (LPBYTE)pv+=cc;
+ pv = (void *)((LPBYTE)pv + cc);
*bytesread+=cc;
cb-=cc;
blocknr = STORAGE_get_next_small_blocknr(This->hf,blocknr);
@@ -821,7 +821,7 @@
cc=BIGSIZE-(This->offset.s.LowPart&(BIGSIZE-1));
memcpy((LPBYTE)pv,block+(This->offset.s.LowPart&(BIGSIZE-1)),cc);
This->offset.s.LowPart+=cc;
- (LPBYTE)pv+=cc;
+ pv = (void *)((LPBYTE)pv + cc);
*bytesread+=cc;
cb-=cc;
blocknr=STORAGE_get_next_big_blocknr(This->hf,blocknr);
@@ -1055,7 +1055,7 @@
return E_FAIL;
cb -= cc;
curoffset += cc;
- (LPBYTE)pv += cc;
+ pv = (void *)((LPBYTE)pv + cc);
This->offset.s.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_small_blocknr(hf,blocknr);
@@ -1083,7 +1083,7 @@
return E_FAIL;
cb -= cc;
curoffset += cc;
- (LPBYTE)pv += cc;
+ pv = (void *)((LPBYTE)pv + cc);
This->offset.s.LowPart += cc;
*byteswritten += cc;
blocknr = STORAGE_get_next_big_blocknr(hf,blocknr);
patch.oleaut32
(text/plain, 124.8 KB) - not displayed
patch.quartz
(text/plain, 12.2 KB)
Index: dlls/quartz/ffmpeg/libavcodec/avcodec.h
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/avcodec.h,v
retrieving revision 1.1.1.3
diff -u -d -r1.1.1.3 avcodec.h
--- dlls/quartz/ffmpeg/libavcodec/avcodec.h 9 Jun 2003 01:54:54 -0000 1.1.1.3
+++ dlls/quartz/ffmpeg/libavcodec/avcodec.h 12 Aug 2005 17:40:50 -0000
@@ -11,6 +11,41 @@
extern "C" {
#endif
+/**
+ * AVOption.
+ */
+typedef struct AVOption {
+ /** options' name */
+ const char *name; /* if name is NULL, it indicates a link to next */
+ /** short English text help or const struct AVOption* subpointer */
+ const char *help; // const struct AVOption* sub;
+ /** offset to context structure where the parsed value should be stored */
+ int offset;
+ /** options' type */
+ int type;
+#define FF_OPT_TYPE_BOOL 1 ///< boolean - true,1,on (or simply presence)
+#define FF_OPT_TYPE_DOUBLE 2 ///< double
+#define FF_OPT_TYPE_INT 3 ///< integer
+#define FF_OPT_TYPE_STRING 4 ///< string (finished with \0)
+#define FF_OPT_TYPE_MASK 0x1f ///< mask for types - upper bits are various flags
+//#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option
+#define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40)
+#define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80)
+ /** min value (min == max -> no limits) */
+ double min;
+ /** maximum value for double/int */
+ double max;
+ /** default boo [0,1]l/double/int value */
+ double defval;
+ /**
+ * default string value (with optional semicolon delimited extra option-list
+ * i.e. option1;option2;option3
+ * defval might select other then first argument as default
+ */
+ const char *defstr;
+#define FF_OPT_MAX_DEPTH 10
+} AVOption;
+
#include "common.h"
#define LIBAVCODEC_VERSION_INT 0x000406
@@ -1125,42 +1160,6 @@
int global_quality;
} AVCodecContext;
-
-/**
- * AVOption.
- */
-typedef struct AVOption {
- /** options' name */
- const char *name; /* if name is NULL, it indicates a link to next */
- /** short English text help or const struct AVOption* subpointer */
- const char *help; // const struct AVOption* sub;
- /** offset to context structure where the parsed value should be stored */
- int offset;
- /** options' type */
- int type;
-#define FF_OPT_TYPE_BOOL 1 ///< boolean - true,1,on (or simply presence)
-#define FF_OPT_TYPE_DOUBLE 2 ///< double
-#define FF_OPT_TYPE_INT 3 ///< integer
-#define FF_OPT_TYPE_STRING 4 ///< string (finished with \0)
-#define FF_OPT_TYPE_MASK 0x1f ///< mask for types - upper bits are various flags
-//#define FF_OPT_TYPE_EXPERT 0x20 // flag for expert option
-#define FF_OPT_TYPE_FLAG (FF_OPT_TYPE_BOOL | 0x40)
-#define FF_OPT_TYPE_RCOVERRIDE (FF_OPT_TYPE_STRING | 0x80)
- /** min value (min == max -> no limits) */
- double min;
- /** maximum value for double/int */
- double max;
- /** default boo [0,1]l/double/int value */
- double defval;
- /**
- * default string value (with optional semicolon delimited extra option-list
- * i.e. option1;option2;option3
- * defval might select other then first argument as default
- */
- const char *defstr;
-#define FF_OPT_MAX_DEPTH 10
-} AVOption;
-
/**
* Parse option(s) and sets fields in passed structure
* @param strct structure where the parsed results will be written
Index: dlls/quartz/ffmpeg/libavcodec/common.h
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/common.h,v
retrieving revision 1.9
diff -u -d -r1.9 common.h
--- dlls/quartz/ffmpeg/libavcodec/common.h 9 Jun 2003 02:02:44 -0000 1.9
+++ dlls/quartz/ffmpeg/libavcodec/common.h 12 Aug 2005 17:40:51 -0000
@@ -60,7 +60,6 @@
#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr }
#define AVOPTION_END() AVOPTION_SUB(NULL)
-struct AVOption;
#ifdef HAVE_MMX
extern const struct AVOption avoptions_common[3 + 5];
#else
Index: dlls/quartz/ffmpeg/libavcodec/cyuv.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/cyuv.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 cyuv.c
--- dlls/quartz/ffmpeg/libavcodec/cyuv.c 9 Jun 2003 01:54:51 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/cyuv.c 12 Aug 2005 17:40:51 -0000
@@ -33,7 +33,6 @@
#include <string.h>
#include <unistd.h>
-#include "common.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/dsputil.h
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/dsputil.h,v
retrieving revision 1.1.1.3
diff -u -d -r1.1.1.3 dsputil.h
--- dlls/quartz/ffmpeg/libavcodec/dsputil.h 9 Jun 2003 01:54:56 -0000 1.1.1.3
+++ dlls/quartz/ffmpeg/libavcodec/dsputil.h 12 Aug 2005 17:40:51 -0000
@@ -27,7 +27,6 @@
#ifndef DSPUTIL_H
#define DSPUTIL_H
-#include "common.h"
#include "avcodec.h"
Index: dlls/quartz/ffmpeg/libavcodec/h263.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/h263.c,v
retrieving revision 1.4
diff -u -d -r1.4 h263.c
--- dlls/quartz/ffmpeg/libavcodec/h263.c 9 Jun 2003 02:02:44 -0000 1.4
+++ dlls/quartz/ffmpeg/libavcodec/h263.c 12 Aug 2005 17:40:54 -0000
@@ -29,7 +29,6 @@
*/
//#define DEBUG
-#include "common.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/h263dec.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/h263dec.c,v
retrieving revision 1.1.1.3
diff -u -d -r1.1.1.3 h263dec.c
--- dlls/quartz/ffmpeg/libavcodec/h263dec.c 9 Jun 2003 01:55:01 -0000 1.1.1.3
+++ dlls/quartz/ffmpeg/libavcodec/h263dec.c 12 Aug 2005 17:40:54 -0000
@@ -697,7 +697,7 @@
static const AVOption mpeg4_decoptions[] =
{
- AVOPTION_SUB(avoptions_workaround_bug),
+ AVOPTION_SUB(&avoptions_workaround_bug),
AVOPTION_END()
};
Index: dlls/quartz/ffmpeg/libavcodec/h264.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/h264.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 h264.c
--- dlls/quartz/ffmpeg/libavcodec/h264.c 9 Jun 2003 01:55:31 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/h264.c 12 Aug 2005 17:40:57 -0000
@@ -24,7 +24,6 @@
* @author Michael Niedermayer <[email protected]>
*/
-#include "common.h"
#include "dsputil.h"
#include "avcodec.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/huffyuv.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/huffyuv.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 huffyuv.c
--- dlls/quartz/ffmpeg/libavcodec/huffyuv.c 9 Jun 2003 01:55:23 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/huffyuv.c 12 Aug 2005 17:40:57 -0000
@@ -26,7 +26,6 @@
* huffyuv codec for libavcodec.
*/
-#include "common.h"
#include "avcodec.h"
#include "dsputil.h"
Index: dlls/quartz/ffmpeg/libavcodec/indeo3.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/indeo3.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 indeo3.c
--- dlls/quartz/ffmpeg/libavcodec/indeo3.c 9 Jun 2003 01:55:32 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/indeo3.c 12 Aug 2005 17:40:58 -0000
@@ -22,7 +22,6 @@
#include <string.h>
#include <unistd.h>
-#include "common.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/jfdctfst.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/jfdctfst.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 jfdctfst.c
--- dlls/quartz/ffmpeg/libavcodec/jfdctfst.c 3 May 2003 00:19:07 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/jfdctfst.c 12 Aug 2005 17:40:58 -0000
@@ -37,7 +37,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include "common.h"
#include "dsputil.h"
#define DCTSIZE 8
Index: dlls/quartz/ffmpeg/libavcodec/jfdctint.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/jfdctint.c,v
retrieving revision 1.1.1.1
diff -u -d -r1.1.1.1 jfdctint.c
--- dlls/quartz/ffmpeg/libavcodec/jfdctint.c 3 May 2003 00:19:08 -0000 1.1.1.1
+++ dlls/quartz/ffmpeg/libavcodec/jfdctint.c 12 Aug 2005 17:40:58 -0000
@@ -30,7 +30,6 @@
#include <stdlib.h>
#include <stdio.h>
-#include "common.h"
#include "dsputil.h"
#define SHIFT_TEMPS
Index: dlls/quartz/ffmpeg/libavcodec/jrevdct.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/jrevdct.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 jrevdct.c
--- dlls/quartz/ffmpeg/libavcodec/jrevdct.c 3 May 2003 00:19:08 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/jrevdct.c 12 Aug 2005 17:40:59 -0000
@@ -31,7 +31,6 @@
* Independent JPEG Group's LLM idct.
*/
-#include "common.h"
#include "dsputil.h"
#define EIGHT_BIT_SAMPLES
Index: dlls/quartz/ffmpeg/libavcodec/mpegvideo.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/mpegvideo.c,v
retrieving revision 1.1.1.3
diff -u -d -r1.1.1.3 mpegvideo.c
--- dlls/quartz/ffmpeg/libavcodec/mpegvideo.c 9 Jun 2003 01:55:13 -0000 1.1.1.3
+++ dlls/quartz/ffmpeg/libavcodec/mpegvideo.c 12 Aug 2005 17:41:02 -0000
@@ -4287,7 +4287,7 @@
flags, CODEC_FLAG_PSNR, 0),
AVOPTION_CODEC_RCOVERRIDE("rc_override", "ratecontrol override (=startframe,endframe,qscale,quality_factor)",
rc_override),
- AVOPTION_SUB(avoptions_common),
+ AVOPTION_SUB(&avoptions_common),
AVOPTION_END()
};
Index: dlls/quartz/ffmpeg/libavcodec/svq1.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/svq1.c,v
retrieving revision 1.1.1.3
diff -u -d -r1.1.1.3 svq1.c
--- dlls/quartz/ffmpeg/libavcodec/svq1.c 9 Jun 2003 01:55:19 -0000 1.1.1.3
+++ dlls/quartz/ffmpeg/libavcodec/svq1.c 12 Aug 2005 17:41:02 -0000
@@ -34,7 +34,6 @@
#include <string.h>
#include <unistd.h>
-#include "common.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/vp3.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/vp3.c,v
retrieving revision 1.1.1.1
diff -u -d -r1.1.1.1 vp3.c
--- dlls/quartz/ffmpeg/libavcodec/vp3.c 9 Jun 2003 01:55:38 -0000 1.1.1.1
+++ dlls/quartz/ffmpeg/libavcodec/vp3.c 12 Aug 2005 17:41:04 -0000
@@ -30,7 +30,6 @@
#include <string.h>
#include <unistd.h>
-#include "common.h"
#include "avcodec.h"
#include "dsputil.h"
#include "mpegvideo.h"
Index: dlls/quartz/ffmpeg/libavcodec/i386/fdct_mmx.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavcodec/i386/fdct_mmx.c,v
retrieving revision 1.1.1.2
diff -u -d -r1.1.1.2 fdct_mmx.c
--- dlls/quartz/ffmpeg/libavcodec/i386/fdct_mmx.c 3 May 2003 00:19:45 -0000 1.1.1.2
+++ dlls/quartz/ffmpeg/libavcodec/i386/fdct_mmx.c 12 Aug 2005 17:41:04 -0000
@@ -7,7 +7,7 @@
* Intel Application Note AP-922 - fast, precise implementation of DCT
* http://developer.intel.com/vtune/cbts/appnotes.htm
*/
-#include "../common.h"
+#include "../avcodec.h"
#include "mmx.h"
#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
Index: dlls/quartz/ffmpeg/libavformat/mpeg.c
===================================================================
RCS file: /cvsroot/winex/dlls/quartz/ffmpeg/libavformat/mpeg.c,v
retrieving revision 1.1.1.1
diff -u -d -r1.1.1.1 mpeg.c
--- dlls/quartz/ffmpeg/libavformat/mpeg.c 3 May 2003 00:20:17 -0000 1.1.1.1
+++ dlls/quartz/ffmpeg/libavformat/mpeg.c 12 Aug 2005 17:41:04 -0000
@@ -61,9 +61,9 @@
#define AUDIO_ID 0xc0
#define VIDEO_ID 0xe0
-extern AVOutputFormat mpeg1system_mux;
-extern AVOutputFormat mpeg1vcd_mux;
-extern AVOutputFormat mpeg2vob_mux;
+static AVOutputFormat mpeg1system_mux;
+static AVOutputFormat mpeg1vcd_mux;
+static AVOutputFormat mpeg2vob_mux;
static int put_pack_header(AVFormatContext *ctx,
uint8_t *buf, int64_t timestamp)
patch.rpcrt4
(text/plain, 623 B)
Index: dlls/rpcrt4/cproxy.c
===================================================================
RCS file: /cvsroot/winex/dlls/rpcrt4/cproxy.c,v
retrieving revision 1.3
diff -u -d -r1.3 cproxy.c
--- dlls/rpcrt4/cproxy.c 17 Dec 2003 20:51:17 -0000 1.3
+++ dlls/rpcrt4/cproxy.c 12 Aug 2005 17:41:04 -0000
@@ -107,7 +107,8 @@
/* I can't find any other way to detect stubless proxies than this hack */
if (!IsEqualGUID(vtbl->header.piid, riid)) {
- stubless = *((const void **)vtbl)++;
+ stubless = *((const void **)vtbl);
+ vtbl = (void*)((const void **)vtbl + 1);
TRACE("stubless=%p\n", stubless);
}
patch.shell32
(text/plain, 514 B)
Index: dlls/shell32/iconcache.c =================================================================== RCS file: /cvsroot/winex/dlls/shell32/iconcache.c,v retrieving revision 1.6 diff -u -d -r1.6 iconcache.c --- dlls/shell32/iconcache.c 15 Nov 2004 15:40:27 -0000 1.6 +++ dlls/shell32/iconcache.c 12 Aug 2005 17:41:05 -0000 @@ -41,7 +41,7 @@ DWORD dwAccessTime; } SIC_ENTRY, * LPSIC_ENTRY; -static HDPA sic_hdpa = 0; +HDPA sic_hdpa = 0; static CRITICAL_SECTION SHELL32_SicCS; void create_iconcache_cs(void)
patch.tools
(text/plain, 723 B)
Index: tools/wrc/newstruc.c =================================================================== RCS file: /cvsroot/winex/tools/wrc/newstruc.c,v retrieving revision 1.1.1.4 diff -u -d -r1.1.1.4 newstruc.c --- tools/wrc/newstruc.c 25 Sep 2002 19:24:23 -0000 1.1.1.4 +++ tools/wrc/newstruc.c 12 Aug 2005 17:41:16 -0000 @@ -737,7 +737,7 @@ /* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */ if((DWORD)rtp & 1) - ((char *)rtp)++; + rtp = (riff_tag_t*)((char *)rtp + 1); } } @@ -848,7 +848,7 @@ /* FIXME: This relies in sizeof(DWORD) == sizeof(pointer_type) */ if((DWORD)rtp & 1) - ((char *)rtp)++; + rtp = (riff_tag_t*)((char *)rtp + 1); } /* We must end correctly here */
patch.windows
(text/plain, 1.3 KB)
Index: windows/winproc.c
===================================================================
RCS file: /cvsroot/winex/windows/winproc.c,v
retrieving revision 1.14
diff -u -d -r1.14 winproc.c
--- windows/winproc.c 7 Mar 2005 21:21:31 -0000 1.14
+++ windows/winproc.c 12 Aug 2005 17:41:18 -0000
@@ -1844,7 +1844,8 @@
*pwparam16 = (WPARAM16)min( wParam32, 0x7f80 ); /* Must be < 64K */
if (!(items = HeapAlloc( GetProcessHeap(), 0,
*pwparam16 * sizeof(INT16) + sizeof(LPARAM)))) return -1;
- *((LPARAM *)items)++ = *plparam; /* Store the previous lParam */
+ *((LPARAM *)items) = *plparam; /* Store the previous lParam */
+ items = (void *)((LPARAM *)items + 1);
*plparam = MapLS( items );
}
*pmsg16 = LB_GETSELITEMS16;
@@ -1987,7 +1988,8 @@
LPSTR str;
*pwparam16 = (WPARAM16)min( wParam32, 0xff80 ); /* Must be < 64K */
if (!(str = HeapAlloc( GetProcessHeap(), 0, *pwparam16 + sizeof(LPARAM)))) return -1;
- *((LPARAM *)str)++ = *plparam; /* Store the previous lParam */
+ *((LPARAM *)str) = *plparam; /* Store the previous lParam */
+ str = (void *)((LPARAM *)str + 1);
*plparam = MapLS( str );
}
return 1;
patch.x11drv
(text/plain, 1.9 KB)
Index: dlls/x11drv/executebuffer.c
===================================================================
RCS file: /cvsroot/winex/dlls/x11drv/executebuffer.c,v
retrieving revision 1.64
diff -u -d -r1.64 executebuffer.c
--- dlls/x11drv/executebuffer.c 14 Mar 2005 17:17:29 -0000 1.64
+++ dlls/x11drv/executebuffer.c 12 Aug 2005 17:41:06 -0000
@@ -1028,11 +1028,10 @@
{
DWORD tmp = *in++;
*out++ = (tmp & 0xFF00FF00) | (rot16(tmp) & 0x00FF00FF);
- *((float*)out)++
#ifdef COMPUTE_FOG_COORDINATE
- = RGBA_GETALPHA(tmp) / 255.0
+ *((float*)out) = RGBA_GETALPHA(tmp) / 255.0;
#endif
- ;
+ out = (void *)((float *)out + 1);
}
#define TEXCOORDSIZE_SWITCH(x) switch( D3DFVF_TEXCOORDSIZE(fvf,(x)) ) { \
Index: graphics/x11drv/dib.c
===================================================================
RCS file: /cvsroot/winex/graphics/x11drv/dib.c,v
retrieving revision 1.90
diff -u -d -r1.90 dib.c
--- graphics/x11drv/dib.c 21 Jan 2005 22:05:40 -0000 1.90
+++ graphics/x11drv/dib.c 12 Aug 2005 17:41:10 -0000
@@ -1606,7 +1606,8 @@
for (x=0; x<oddwidth; x++) {
DWORD srcval;
srcval=*srcpixel++;
- *((WORD*)dstbyte)++=srcval; /* h, g */
+ *((WORD*)dstbyte) = srcval; /* h, g */
+ dstbyte = ((WORD *)dstbyte + 1);
*dstbyte++=srcval >> 16; /* l */
}
srcbits += srclinebytes;
@@ -1657,8 +1658,9 @@
for (x=0; x<oddwidth; x++) {
DWORD srcval;
srcval=*srcpixel++;
- *((WORD*)dstbyte)++=((srcval >> 16) & 0x00ff) | /* h */
+ *((WORD*)dstbyte) = ((srcval >> 16) & 0x00ff) | /* h */
(srcval & 0xff00); /* g */
+ dstbyte = (void *)((WORD *)dstbyte + 1);
*dstbyte++=srcval; /* l */
}
srcbits += srclinebytes;