Author: sginsberg Date: Sat Aug 15 18:23:21 2009 New Revision: 42707
URL: http://svn.reactos.org/svn/reactos?rev=42707&view=rev Log: - gdi32: Don't use typeof -- MSVC does not implement it. Also fix an unitialized variable warning spotted by MSVC. - user32: Properly stub out 16-bit code -- fixes several warnings (more remain) - winent/winex11: Fix some const warnings in MSVC, and use redefine for WINVER and _WIN32_WINNT
Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild branches/arwinss/reactos/dll/win32/gdi32/regglue.c branches/arwinss/reactos/dll/win32/user32/driver.c branches/arwinss/reactos/dll/win32/user32/edit.c branches/arwinss/reactos/dll/win32/user32/spy.c branches/arwinss/reactos/dll/win32/user32/user_main.c branches/arwinss/reactos/dll/win32/winent.drv/font.c branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c branches/arwinss/reactos/dll/win32/winent.drv/winent.rbuild branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild
Modified: branches/arwinss/reactos/dll/win32/gdi32/freetype.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/... ============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/freetype.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -160,32 +160,31 @@
static void *ft_handle = NULL;
-#define MAKE_FUNCPTR(f) static typeof(f) * p##f = NULL // FIXME: MSVC does not implement typeof -MAKE_FUNCPTR(FT_Vector_Unit); -MAKE_FUNCPTR(FT_Done_Face); -MAKE_FUNCPTR(FT_Get_Char_Index); -MAKE_FUNCPTR(FT_Get_Module); -MAKE_FUNCPTR(FT_Get_Sfnt_Name); -MAKE_FUNCPTR(FT_Get_Sfnt_Name_Count); -MAKE_FUNCPTR(FT_Get_Sfnt_Table); -MAKE_FUNCPTR(FT_Init_FreeType); -MAKE_FUNCPTR(FT_Load_Glyph); -MAKE_FUNCPTR(FT_Matrix_Multiply); +static void (*pFT_Vector_Unit)(FT_Vector*, FT_Angle) = NULL; +static FT_Error (*pFT_Done_Face)(FT_Face) = NULL; +static FT_UInt (*pFT_Get_Char_Index)(FT_Face, FT_ULong) = NULL; +static FT_Module (*pFT_Get_Module)(FT_Library, const char*) = NULL; +static FT_Error (*pFT_Get_Sfnt_Name)(FT_Face, FT_UInt, FT_SfntName*) = NULL; +static FT_UInt (*pFT_Get_Sfnt_Name_Count)(FT_Face) = NULL; +static void* (*pFT_Get_Sfnt_Table)(FT_Face, FT_Sfnt_Tag) = NULL; +static FT_Error (*pFT_Init_FreeType)(FT_Library*) = NULL; +static FT_Error (*pFT_Load_Glyph)(FT_Face, FT_UInt, FT_Int32) = NULL; +static void (*pFT_Matrix_Multiply)(const FT_Matrix*, FT_Matrix*) = NULL; #ifdef FT_MULFIX_INLINED #define pFT_MulFix FT_MULFIX_INLINED #else -MAKE_FUNCPTR(FT_MulFix); +static FT_Long (*pFT_MulFix)(FT_Long, FT_Long) = NULL; #endif -MAKE_FUNCPTR(FT_New_Face); -MAKE_FUNCPTR(FT_New_Memory_Face); -MAKE_FUNCPTR(FT_Outline_Get_Bitmap); -MAKE_FUNCPTR(FT_Outline_Transform); -MAKE_FUNCPTR(FT_Outline_Translate); -MAKE_FUNCPTR(FT_Select_Charmap); -MAKE_FUNCPTR(FT_Set_Charmap); -MAKE_FUNCPTR(FT_Set_Pixel_Sizes); -MAKE_FUNCPTR(FT_Vector_Transform); -MAKE_FUNCPTR(FT_Render_Glyph); +static FT_Error (*pFT_New_Face)(FT_Library, const char*, FT_Long, FT_Face*) = NULL; +static FT_Error (*pFT_New_Memory_Face)(FT_Library, const FT_Byte*, FT_Long, FT_Long, FT_Face*) = NULL; +static FT_Error (*pFT_Outline_Get_Bitmap)(FT_Library, FT_Outline*, const FT_Bitmap*) = NULL; +static void (*pFT_Outline_Transform)(const FT_Outline*, const FT_Matrix*) = NULL; +static void (*pFT_Outline_Translate)(const FT_Outline*, FT_Pos, FT_Pos) = NULL; +static FT_Error (*pFT_Select_Charmap)(FT_Face, FT_Encoding) = NULL; +static FT_Error (*pFT_Set_Charmap)(FT_Face, FT_CharMap) = NULL; +static FT_Error (*pFT_Set_Pixel_Sizes)(FT_Face, FT_UInt, FT_UInt) = NULL; +static void (*pFT_Vector_Transform)(FT_Vector*, const FT_Matrix*) = NULL; +static FT_Error (*pFT_Render_Glyph)(FT_GlyphSlot, FT_Render_Mode) = NULL; static void (*pFT_Library_Version)(FT_Library,FT_Int*,FT_Int*,FT_Int*); static FT_Error (*pFT_Load_Sfnt_Table)(FT_Face,FT_ULong,FT_Long,FT_Byte*,FT_ULong*); static FT_ULong (*pFT_Get_First_Char)(FT_Face,FT_UInt*); @@ -195,11 +194,21 @@ static FT_Error (*pFT_Library_SetLcdFilter)(FT_Library, FT_LcdFilter); #endif #ifdef HAVE_FREETYPE_FTWINFNT_H -MAKE_FUNCPTR(FT_Get_WinFNT_Header); +static FT_Error (*pFT_Get_WinFNT_Header)(FT_Face, FT_WinFNT_HeaderRec*) = NULL; #endif
#ifdef SONAME_LIBFONTCONFIG #include <fontconfig/fontconfig.h> +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; +static = NULL; MAKE_FUNCPTR(FcConfigGetCurrent); MAKE_FUNCPTR(FcFontList); MAKE_FUNCPTR(FcFontSetDestroy); @@ -212,8 +221,6 @@ MAKE_FUNCPTR(FcPatternGetBool); MAKE_FUNCPTR(FcPatternGetString); #endif - -#undef MAKE_FUNCPTR
#ifndef FT_MAKE_TAG #define FT_MAKE_TAG( ch0, ch1, ch2, ch3 ) \
Modified: branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/... ============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/gdi32.rbuild [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -1,4 +1,4 @@ -<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes" allowwarnings="true"> +<module name="gdi32" type="win32dll" baseaddress="${BASEADDRESS_GDI32}" installbase="system32" installname="gdi32.dll" unicode="yes"> <importlibrary definition="gdi32.spec" /> <include base="gdi32">include</include> <include base="ReactOS">include/reactos/wine</include>
Modified: branches/arwinss/reactos/dll/win32/gdi32/regglue.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/gdi32/... ============================================================================== --- branches/arwinss/reactos/dll/win32/gdi32/regglue.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/gdi32/regglue.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -1338,7 +1338,7 @@ static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data );
TRACE("(%p,%s,%p,%p,%p,%p=%d)\n", - hkey, debugstr_w(name), reserved, type, data, count, + hkeyorg, debugstr_w(name), reserved, type, data, count, (count && data) ? *count : 0 );
if ((data && !count) || reserved) return ERROR_INVALID_PARAMETER;
Modified: branches/arwinss/reactos/dll/win32/user32/driver.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/driver.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/driver.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -36,7 +36,9 @@ static const USER_DRIVER *load_driver(void) { char buffer[MAX_PATH], libname[32], *name, *next; +#if 0 HKEY hkey; +#endif void *ptr; HMODULE graphics_driver; USER_DRIVER *driver, *prev;
Modified: branches/arwinss/reactos/dll/win32/user32/edit.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/edit.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -1133,8 +1133,6 @@ */ static void EDIT_LockBuffer(EDITSTATE *es) { - HINSTANCE16 hInstance = GetWindowLongPtrW( es->hwndSelf, GWLP_HINSTANCE ); - if (!es->text) { CHAR *textA = NULL; UINT countA = 0; @@ -1217,7 +1215,9 @@ CHAR *textA = NULL; UINT countA = 0; UINT countW = get_text_length(es) + 1; - HANDLE16 oldDS = 0; +#ifndef __REACTOS__ + HANDLE16 oldDS = 0; +#endif
if(es->hloc32A) { @@ -3037,29 +3037,6 @@
/********************************************************************* * - * EM_SETTABSTOPS16 - * - */ -static BOOL EDIT_EM_SetTabStops16(EDITSTATE *es, INT count, const INT16 *tabs) -{ - if (!(es->style & ES_MULTILINE)) - return FALSE; - HeapFree(GetProcessHeap(), 0, es->tabs); - es->tabs_count = count; - if (!count) - es->tabs = NULL; - else { - INT i; - es->tabs = HeapAlloc(GetProcessHeap(), 0, count * sizeof(INT)); - for (i = 0 ; i < count ; i++) - es->tabs[i] = *tabs++; - } - return TRUE; -} - - -/********************************************************************* - * * EM_SETWORDBREAKPROC * */ @@ -3071,25 +3048,6 @@ es->word_break_proc = wbp; es->word_break_proc16 = NULL;
- if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) { - EDIT_BuildLineDefs_ML(es, 0, get_text_length(es), 0, NULL); - EDIT_UpdateText(es, NULL, TRUE); - } -} - - -/********************************************************************* - * - * EM_SETWORDBREAKPROC16 - * - */ -static void EDIT_EM_SetWordBreakProc16(EDITSTATE *es, EDITWORDBREAKPROC16 wbp) -{ - if (es->word_break_proc16 == wbp) - return; - - es->word_break_proc = NULL; - es->word_break_proc16 = wbp; if ((es->style & ES_MULTILINE) && !(es->style & ES_AUTOHSCROLL)) { EDIT_BuildLineDefs_ML(es, 0, get_text_length(es), 0, NULL); EDIT_UpdateText(es, NULL, TRUE); @@ -4378,7 +4336,7 @@ * * The Following code is to handle inline editing from IMEs */ - +#if 0 static void EDIT_GetCompositionStr(HIMC hIMC, LPARAM CompFlag, EDITSTATE *es) { LONG buflen; @@ -4484,6 +4442,7 @@
HeapFree(GetProcessHeap(),0,lpResultStr); } +#endif
static void EDIT_ImeComposition(HWND hwnd, LPARAM CompFlag, EDITSTATE *es) {
Modified: branches/arwinss/reactos/dll/win32/user32/spy.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/spy.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/spy.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -2658,10 +2658,14 @@ { int i; UINT j; +#if 0 char buffer[1024]; +#endif const SPY_NOTIFY *p; const USER_MSG *q; +#if 0 HKEY hkey; +#endif
if (!TRACE_ON(message)) return TRUE;
Modified: branches/arwinss/reactos/dll/win32/user32/user_main.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/user32... ============================================================================== --- branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/user32/user_main.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -155,7 +155,9 @@ static const WCHAR *get_default_desktop(void) { static const WCHAR defaultW[] = {'D','e','f','a','u','l','t',0}; +#if 0 static const WCHAR desktopW[] = {'D','e','s','k','t','o','p',0}; +#endif static const WCHAR explorerW[] = {'\','E','x','p','l','o','r','e','r',0}; static const WCHAR app_defaultsW[] = {'S','o','f','t','w','a','r','e','\', 'W','i','n','e','\', @@ -164,7 +166,9 @@ WCHAR *p, *appname = buffer; const WCHAR *ret = defaultW; DWORD len; +#if 0 HKEY tmpkey, appkey; +#endif
len = (GetModuleFileNameW( 0, buffer, MAX_PATH )); if (!len || len >= MAX_PATH) return ret; @@ -264,10 +268,10 @@ */ static BOOL process_attach(void) { +#ifndef __REACTOS__ HINSTANCE16 instance;
/* Create USER heap */ -#ifndef __REACTOS__ if ((instance = LoadLibrary16( "USER.EXE" )) >= 32) USER_HeapSel = instance | 7; else {
Modified: branches/arwinss/reactos/dll/win32/winent.drv/font.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/font.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -633,7 +633,7 @@ pen = CreatePen(PS_NULL, 0, 0); oldPen = SelectObject(physDev->hUserDC, pen);
- RosGdiRectangle(physDev->hKernelDC, lprect); + RosGdiRectangle(physDev->hKernelDC, (RECT*)lprect);
DeleteObject(SelectObject(physDev->hUserDC, oldBrush)); DeleteObject(SelectObject(physDev->hUserDC, oldPen));
Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -247,7 +247,7 @@ if (in_count >= sizeof(struct ntdrv_escape_set_drawable)) { const struct ntdrv_escape_set_drawable *data = in_data; - RosGdiSetDcRects(physDev->hKernelDC, &data->dc_rect, &data->drawable_rect); + RosGdiSetDcRects(physDev->hKernelDC, (RECT*)&data->dc_rect, (RECT*)&data->drawable_rect); TRACE( "SET_DRAWABLE hdc %p dc_rect %s drawable_rect %s\n", physDev->hUserDC, wine_dbgstr_rect(&data->dc_rect), wine_dbgstr_rect(&data->drawable_rect) ); return TRUE;
Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -158,7 +158,7 @@ INT CDECL RosDrv_ToUnicodeEx( UINT virt, UINT scan, const BYTE *state, LPWSTR str, int size, UINT flags, HKL layout ) { - return RosUserToUnicodeEx(virt, scan, state, str, size, flags, layout); + return RosUserToUnicodeEx(virt, scan, (BYTE*)state, str, size, flags, layout); }
BOOL CDECL RosDrv_UnloadKeyboardLayout( HKL layout ) @@ -876,7 +876,7 @@ } }
- RosDrv_UpdateZOrder(hwnd, visible_rect); + RosDrv_UpdateZOrder(hwnd, (RECT*)visible_rect); }
/* EOF */
Modified: branches/arwinss/reactos/dll/win32/winent.drv/winent.rbuild URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/winent.rbuild [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/winent.rbuild [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -1,9 +1,9 @@ -<module name="winent" type="win32dll" baseaddress="${BASEADDRESS_WINENT}" installbase="system32" installname="winent.drv" allowwarnings="true"> +<module name="winent" type="win32dll" baseaddress="${BASEADDRESS_WINENT}" installbase="system32" installname="winent.drv"> <importlibrary definition="winent.drv.spec" /> <include base="winent">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="WINVER">0x0600</define> - <define name="_WIN32_WINNT">0x0501</define> + <redefine name="WINVER">0x0600</redefine> + <redefine name="_WIN32_WINNT">0x0501</redefine> <define name="__WINESRC__" /> <define name="_WINE" /> <file>font.c</file>
Modified: branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winex1... ============================================================================== --- branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winex11.drv/winex11.rbuild [iso-8859-1] Sat Aug 15 18:23:21 2009 @@ -2,8 +2,8 @@ <importlibrary definition="winex11.drv.spec" /> <include base="winex11">.</include> <include base="ReactOS">include/reactos/wine</include> - <define name="WINVER">0x0600</define> - <define name="_WIN32_WINNT">0x0501</define> + <redefine name="WINVER">0x0600</redefine> + <redefine name="_WIN32_WINNT">0x0501</redefine> <define name="__WINESRC__" /> <define name="_WINE" /> <file>bitblt.c</file>