Delete all Trailing spaces in code.
authorDaniel Reimer <reimer.daniel@freenet.de>
Fri, 19 Oct 2007 23:01:40 +0000 (23:01 +0000)
committerDaniel Reimer <reimer.daniel@freenet.de>
Fri, 19 Oct 2007 23:01:40 +0000 (23:01 +0000)
svn path=/trunk/; revision=29688

161 files changed:
rostests/apitests/gdi32api/gdi32api.c
rostests/apitests/gdi32api/tests/AddFontResource.c
rostests/apitests/gdi32api/tests/CreateFont.c
rostests/apitests/gdi32api/tests/GetObject.c
rostests/apitests/gdi32api/tests/SetSysColors.c
rostests/apitests/w32kdll/w32kdll_2ksp4/main.c
rostests/apitests/w32kdll/w32kdll_ros/main.c
rostests/apitests/w32kdll/w32kdll_xpsp2/main.c
rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c
rostests/apitests/w32knapi/ntgdi/NtGdiDoPalette.c
rostests/apitests/w32knapi/ntgdi/NtGdiGetDIBits.c
rostests/apitests/w32knapi/w32knapi.c
rostests/drivers/kmtest/deviface.c
rostests/drivers/kmtest/ntos_ob.c
rostests/drivers/ntoskrnl/IoEaTest.cpp
rostests/dxtest/ddraw/DDraw/available_mem.cpp
rostests/dxtest/ddraw/DDraw/create.cpp
rostests/dxtest/ddraw/DDraw/display_modes.cpp
rostests/dxtest/ddraw/Surface/blt.cpp
rostests/dxtest/ddraw/Surface/caps_tests.h
rostests/dxtest/ddraw/Surface/create.cpp
rostests/dxtest/ddraw/Surface/misc.cpp
rostests/dxtest/ddraw/Surface/private_data.cpp
rostests/dxtest/ddraw/helper.cpp
rostests/dxtest/win32kdxtest/NtGdiDdCanCreateSurface.c
rostests/dxtest/win32kdxtest/NtGdiDdCreateDirectDrawObject.c
rostests/dxtest/win32kdxtest/NtGdiDdDeleteDirectDrawObject.c
rostests/dxtest/win32kdxtest/NtGdiDdGetScanLine.c
rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c
rostests/dxtest/win32kdxtest/NtGdiDdWaitForVerticalBlank.c
rostests/dxtest/win32kdxtest/dump.c
rostests/dxtest/win32kdxtest/main.c
rostests/dxtest/win32kdxtest/win32kdxtest.rbuild
rostests/regtests_by_casper/shared/regtests.h
rostests/tests/D3DParseUnknownCommand_show/main.c
rostests/tests/DxHalTest/main.c
rostests/tests/DxHalTest/main.h
rostests/tests/diskspeed/diskspeed.c
rostests/tests/enumfonts/enumfonts.cpp
rostests/tests/iptest/iptest.cpp
rostests/tests/lantst/lantest.cpp
rostests/tests/map_dup_inherit/map_dup_inherit.c
rostests/tests/mdi/mdi.rc
rostests/tests/miditest/miditest.rc
rostests/tests/oskittcp/tcptest.cpp
rostests/tests/patblt/patblt.cpp
rostests/tests/polytest/polytest.cpp
rostests/tests/popupmenu/popupmenu.rc
rostests/tests/primitives/mk_font.cpp
rostests/tests/primitives/primitives.cpp
rostests/tests/readconsole/readconsole.rbuild
rostests/tests/stretchblt/stretchblt.cpp
rostests/tests/txtscale/mk_font.cpp
rostests/tests/txtscale/txtscale.cpp
rostests/tests/wclickat/wclickat.c
rostests/tests/wm_erasebkgnd/wm_erasebkgnd.cpp
rostests/win32/loadlib/loadlib.c
rostests/win32/loadlib/loadlib.h
rostests/win32/msvcrt/fileio/_tfileio.c
rostests/win32/msvcrt/fileio/fileio.c
rostests/win32/msvcrt/fileio/main.c
rostests/win32/msvcrt/fileio/main.h
rostests/win32/msvcrt/fileio/wfileio.c
rostests/win32/rpcrt4/context_handles/client.c
rostests/win32/rpcrt4/context_handles/ctx.h
rostests/win32/rpcrt4/context_handles/ctx_c.c
rostests/win32/rpcrt4/context_handles/ctx_s.c
rostests/win32/rpcrt4/context_handles/server.c
rostests/win32/smss/movefile/movefile.cpp
rostests/win32/user32/drawcaption/capicon.c
rostests/win32/user32/drawcaption/drawcap.c
rostests/win32/user32/kbdlayout/kbdlayout.c
rostests/win32/user32/kbdlayout/kbdlayout.rc
rostests/win32/user32/kbdlayout/resource.h
rostests/win32/user32/sysicon/sysicon.c
rostests/winetests/advapi32/registry.c
rostests/winetests/cabinet/extract.c
rostests/winetests/comctl32/comboex.c
rostests/winetests/comctl32/dpa.c
rostests/winetests/comctl32/header.c
rostests/winetests/comctl32/listview.c
rostests/winetests/comctl32/progress.c
rostests/winetests/comctl32/propsheet.c
rostests/winetests/comctl32/subclass.c
rostests/winetests/comctl32/toolbar.c
rostests/winetests/comctl32/treeview.c
rostests/winetests/comctl32/updown.c
rostests/winetests/comdlg32/printdlg.c
rostests/winetests/gdi32/bitmap.c
rostests/winetests/gdi32/brush.c
rostests/winetests/gdi32/clipping.c
rostests/winetests/gdi32/dc.c
rostests/winetests/gdi32/font.c
rostests/winetests/gdi32/mapping.c
rostests/winetests/gdi32/metafile.c
rostests/winetests/gdi32/palette.c
rostests/winetests/icmp/icmp.c
rostests/winetests/kernel32/atom.c
rostests/winetests/kernel32/change.c
rostests/winetests/kernel32/codepage.c
rostests/winetests/kernel32/comm.c
rostests/winetests/kernel32/directory.c
rostests/winetests/kernel32/file.c
rostests/winetests/kernel32/heap.c
rostests/winetests/kernel32/locale.c
rostests/winetests/kernel32/mailslot.c
rostests/winetests/kernel32/module.c
rostests/winetests/kernel32/path.c
rostests/winetests/kernel32/pipe.c
rostests/winetests/kernel32/process.c
rostests/winetests/kernel32/profile.c
rostests/winetests/kernel32/sync.c
rostests/winetests/kernel32/thread.c
rostests/winetests/kernel32/time.c
rostests/winetests/kernel32/timer.c
rostests/winetests/lz32/lzexpand_main.c
rostests/winetests/mlang/mlang.c
rostests/winetests/msi/db.c
rostests/winetests/msi/format.c
rostests/winetests/msi/install.c
rostests/winetests/msi/msi.c
rostests/winetests/msi/package.c
rostests/winetests/msi/record.c
rostests/winetests/msvcrt/cpp.c
rostests/winetests/msvcrt/file.c
rostests/winetests/msvcrt/heap.c
rostests/winetests/msvcrt/printf.c
rostests/winetests/msvcrt/string.c
rostests/winetests/msvcrt/time.c
rostests/winetests/ntdll/atom.c
rostests/winetests/ntdll/change.c
rostests/winetests/ntdll/env.c
rostests/winetests/ntdll/info.c
rostests/winetests/ntdll/om.c
rostests/winetests/ntdll/port.c
rostests/winetests/ntdll/rtl.c
rostests/winetests/ntdll/rtlstr.c
rostests/winetests/ntdll/string.c
rostests/winetests/ntdll/time.c
rostests/winetests/powrprof/pwrprof.c
rostests/winetests/psapi/psapi_main.c
rostests/winetests/setupapi/stringtable.c
rostests/winetests/shell32/shellpath.c
rostests/winetests/shell32/shlexec.c
rostests/winetests/shell32/shlfolder.c
rostests/winetests/shlwapi/ordinal.c
rostests/winetests/shlwapi/path.c
rostests/winetests/shlwapi/shreg.c
rostests/winetests/shlwapi/string.c
rostests/winetests/user32/edit.c
rostests/winetests/user32/listbox.c
rostests/winetests/user32/menu.c
rostests/winetests/user32/msg.c
rostests/winetests/user32/resource.c
rostests/winetests/user32/sysparams.c
rostests/winetests/user32/text.c
rostests/winetests/user32/win.c
rostests/winetests/usp10/usp10.c
rostests/winetests/winetest/gui.c
rostests/winetests/winetest/main.c
rostests/winetests/winetest/winetest.rc

index 054cc10..000fa2b 100644 (file)
@@ -8,7 +8,7 @@ IsFunctionPresent(LPWSTR lpszFunction)
        return TRUE;\r
 }\r
 \r
-int APIENTRY \r
+int APIENTRY\r
 WinMain(HINSTANCE hInstance,\r
         HINSTANCE hPrevInstance,\r
         LPSTR     lpCmdLine,\r
index 016c5bd..727cedc 100644 (file)
@@ -16,7 +16,7 @@ Test_AddFontResourceA(PTESTINFO pti)
 
     RtlZeroMemory(szFileNameA,MAX_PATH);
 
-    /* 
+    /*
      * Start testing Ansi version
      *
      */
index fc26058..e14ba71 100644 (file)
@@ -7,8 +7,8 @@ Test_CreateFont(PTESTINFO pti)
        LOGFONTA logfonta;\r
 \r
        /* Test invalid font name */\r
-       hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE, \r
-                           DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, \r
+       hFont = CreateFontA(15, 0, 0, 0, FW_DONTCARE, FALSE, FALSE, FALSE,\r
+                           DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,\r
                            DEFAULT_QUALITY, DEFAULT_PITCH, INVALIDFONT);\r
        RTEST(hFont);\r
        RTEST(GetObjectA(hFont, sizeof(LOGFONTA), &logfonta) == sizeof(LOGFONTA));\r
index 45a8863..06acb3b 100644 (file)
@@ -220,7 +220,7 @@ Test_Pen(PTESTINFO pti)
 \r
        /* test if the fields are filled correctly */\r
        RTEST(logpen.lopnStyle == PS_SOLID);\r
-       \r
+\r
 \r
        DeleteObject(hPen);\r
        return TRUE;\r
@@ -308,7 +308,7 @@ Test_Font(PTESTINFO pti)
        BYTE bData[270];\r
 \r
        FillMemory(&logfonta, sizeof(LOGFONTA), 0x77);\r
-       hFont = CreateFont(8, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, \r
+       hFont = CreateFont(8, 8, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE,\r
                ANSI_CHARSET, OUT_CHARACTER_PRECIS, CLIP_CHARACTER_PRECIS,\r
                ANTIALIASED_QUALITY, DEFAULT_PITCH, "testfont");\r
        TEST(hFont);\r
index 9becb7e..224a37e 100644 (file)
@@ -18,7 +18,7 @@ Test_SetSysColors(PTESTINFO pti)
        TEST((UINT)SetSysColors(0, nElements, crColors) == 1);\r
        RTEST((UINT)SetSysColors(1, nElements, crColors) == 1);\r
        RTEST((UINT)SetSysColors(2, nElements, crColors) == 1);\r
-       \r
+\r
        /* try more than NUM_SYSCOLORS */\r
        RTEST((UINT)SetSysColors(55, nElements, crColors) == 1);\r
 \r
index 65d2fee..8b5e3ff 100644 (file)
@@ -14,15 +14,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
             // attach to process\r
             // return FALSE to fail DLL load\r
             break;\r
-        \r
+\r
         case DLL_PROCESS_DETACH:\r
             // detach from process\r
             break;\r
-        \r
+\r
         case DLL_THREAD_ATTACH:\r
             // attach to thread\r
             break;\r
-        \r
+\r
         case DLL_THREAD_DETACH:\r
             // detach from thread\r
             break;\r
index 65d2fee..8b5e3ff 100644 (file)
@@ -14,15 +14,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
             // attach to process\r
             // return FALSE to fail DLL load\r
             break;\r
-        \r
+\r
         case DLL_PROCESS_DETACH:\r
             // detach from process\r
             break;\r
-        \r
+\r
         case DLL_THREAD_ATTACH:\r
             // attach to thread\r
             break;\r
-        \r
+\r
         case DLL_THREAD_DETACH:\r
             // detach from thread\r
             break;\r
index 65d2fee..8b5e3ff 100644 (file)
@@ -14,15 +14,15 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
             // attach to process\r
             // return FALSE to fail DLL load\r
             break;\r
-        \r
+\r
         case DLL_PROCESS_DETACH:\r
             // detach from process\r
             break;\r
-        \r
+\r
         case DLL_THREAD_ATTACH:\r
             // attach to thread\r
             break;\r
-        \r
+\r
         case DLL_THREAD_DETACH:\r
             // detach from thread\r
             break;\r
index eb929ad..ce5e224 100644 (file)
@@ -52,10 +52,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        /* Test ReactX */\r
        hDirectDraw = (HANDLE) Syscall(L"NtGdiDdCreateDirectDrawObject", 1, &hdc);\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( NULL, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( NULL, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC) == FALSE);\r
 \r
@@ -70,10 +70,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RTEST(puNumHeaps == NULL);\r
        RTEST(puvmList == NULL);\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC) == FALSE);\r
 \r
@@ -89,10 +89,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RTEST(puvmList == NULL);\r
 \r
        pHalInfo = &HalInfo;\r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -124,11 +124,11 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
 \r
                /* Check the res */\r
                RTEST(pHalInfo->vmiData.dwDisplayWidth == devmode.dmPelsWidth );\r
-               RTEST(pHalInfo->vmiData.dwDisplayHeight == devmode.dmPelsHeight ); \r
-               /* FIXME \r
+               RTEST(pHalInfo->vmiData.dwDisplayHeight == devmode.dmPelsHeight );\r
+               /* FIXME\r
                        RTEST(pHalInfo->vmiData.lDisplayPitch == 0x1700;\r
                */\r
-               RTEST(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT) ); \r
+               RTEST(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT) );\r
                ASSERT(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT));\r
 \r
                /* Fail on 8bit screen deep */\r
@@ -159,18 +159,18 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
                /* the primary display address */\r
                /* test see if it in kmode memory or not */\r
                RTEST(pHalInfo->vmiData.pvPrimary != 0 );\r
-               \r
+\r
                /* Test see if we got any hardware acclartions for 2d or 3d */\r
                //RTEST(pHalInfo->ddCaps.dwSize == sizeof(DDCORECAPS));\r
 \r
-               /* Testing see if we got any hw support for \r
-                * This test can fail on video card that does not support 2d/overlay/3d \r
+               /* Testing see if we got any hw support for\r
+                * This test can fail on video card that does not support 2d/overlay/3d\r
                 */\r
                RTEST( pHalInfo->ddCaps.dwCaps != 0);\r
                RTEST( pHalInfo->ddCaps.ddsCaps.dwCaps != 0);\r
 \r
                /* if this fail we do not have a dx driver install acodring ms, some version of windows it\r
-                * is okay this fail and drv does then only support basic dx \r
+                * is okay this fail and drv does then only support basic dx\r
                 */\r
                RTEST( (pHalInfo->dwFlags & (DDHALINFO_GETDRIVERINFOSET | DDHALINFO_GETDRIVERINFO2)) != 0 );\r
 \r
@@ -191,10 +191,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        pCallBackFlags = CallBackFlags;\r
        RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -225,10 +225,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));\r
        RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -266,10 +266,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);\r
        RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -309,10 +309,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));\r
        RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS));\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -354,10 +354,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_GLOBALDRIVERDATA));\r
        RtlZeroMemory(&D3dBufferCallbacks,sizeof(DD_D3DBUFCALLBACKS));\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -408,10 +408,10 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
        RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_GLOBALDRIVERDATA));\r
        RtlZeroMemory(&D3dBufferCallbacks,sizeof(DD_D3DBUFCALLBACKS));\r
 \r
-       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, \r
-                                                                               pCallBackFlags, puD3dCallbacks, \r
-                                                                               puD3dDriverData, puD3dBufferCallbacks, \r
-                                                                               puD3dTextureFormats, puNumHeaps, \r
+       RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo,\r
+                                                                               pCallBackFlags, puD3dCallbacks,\r
+                                                                               puD3dDriverData, puD3dBufferCallbacks,\r
+                                                                               puD3dTextureFormats, puNumHeaps,\r
                                                                                puvmList, puNumFourCC,\r
                                                                                puFourCC)== FALSE);\r
        RTEST(pHalInfo != NULL);\r
@@ -445,8 +445,8 @@ Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti)
 \r
 \r
 \r
-       /* Todo \r
-       * adding test for \r
+       /* Todo\r
+       * adding test for\r
        * puD3dCallbacks\r
        * puD3dDriverData\r
        * puD3dBufferCallbacks\r
index b30438c..6331d71 100644 (file)
@@ -5,7 +5,7 @@ CreateTestPalette()
        {\r
                LOGPALETTE logpal;\r
                PALETTEENTRY entry[5];\r
-       } palstruct = \r
+       } palstruct =\r
        { {0x300,5,\r
          { {1,2,3,0} }},\r
          { {22,33,44,PC_RESERVED},\r
index e1fc948..6718bb9 100644 (file)
@@ -4,7 +4,7 @@ FASTCALL
 DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )\r
 {\r
     UINT MaxBits = 0;\r
-    \r
+\r
     if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))\r
     {\r
        PBITMAPCOREHEADER Core = (PBITMAPCOREHEADER)Info;\r
@@ -14,7 +14,7 @@ DIB_BitmapMaxBitsSize( PBITMAPINFO Info, UINT ScanLines )
     {\r
        if ((Info->bmiHeader.biCompression) && (Info->bmiHeader.biCompression != BI_BITFIELDS))\r
            return Info->bmiHeader.biSizeImage;\r
-    // Planes are over looked by Yuan. I guess assumed always 1.    \r
+    // Planes are over looked by Yuan. I guess assumed always 1.\r
        MaxBits = Info->bmiHeader.biBitCount * Info->bmiHeader.biPlanes * Info->bmiHeader.biWidth;\r
     }\r
     MaxBits = ((MaxBits + 31) & ~31 ) / 8; // From Yuan, ScanLineSize = (Width * bitcount + 31)/32\r
index 32837aa..41d67df 100644 (file)
@@ -9,7 +9,7 @@ IntSyscall(FARPROC proc, UINT cParams, PVOID pFirstParam)
 {\r
        DWORD ret;\r
 \r
-       asm volatile \r
+       asm volatile\r
        (\r
                "pushfl;"                               // Save flags\r
                "movl %%ecx, %%eax;"\r
index 3f6ed12..ebb5010 100644 (file)
  * Returns a list of device interfaces of a particular device interface class.
  *
  * Parameters
- *    InterfaceClassGuid 
+ *    InterfaceClassGuid
  *       Points to a class GUID specifying the device interface class.
  *
- *    PhysicalDeviceObject 
+ *    PhysicalDeviceObject
  *       Points to an optional PDO that narrows the search to only the
- *       device interfaces of the device represented by the PDO. 
+ *       device interfaces of the device represented by the PDO.
  *
- *    Flags 
+ *    Flags
  *       Specifies flags that modify the search for device interfaces. The
  *       DEVICE_INTERFACE_INCLUDE_NONACTIVE flag specifies that the list of
  *       returned symbolic links should contain also disabled device
- *       interfaces in addition to the enabled ones.  
+ *       interfaces in addition to the enabled ones.
  *
- *    SymbolicLinkList 
+ *    SymbolicLinkList
  *       Points to a character pointer that is filled in on successful return
  *       with a list of unicode strings identifying the device interfaces
  *       that match the search criteria. The newly allocated buffer contains
  *       a list of symbolic link names. Each unicode string in the list is
  *       null-terminated; the end of the whole list is marked by an additional
  *       NULL. The caller is responsible for freeing the buffer (ExFreePool)
- *       when it is no longer needed. 
+ *       when it is no longer needed.
  *       If no device interfaces match the search criteria, this routine
  *       returns STATUS_SUCCESS and the string contains a single NULL
- *       character. 
+ *       character.
  *
  * Status
  *    @unimplemented
@@ -102,7 +102,7 @@ ReactOS_IoGetDeviceInterfaces(
    ULONG i = 0;
    ULONG j = 0;
    OBJECT_ATTRIBUTES ObjectAttributes;
-  
+
    Status = RtlStringFromGUID(InterfaceClassGuid, &GuidString);
    if (!NT_SUCCESS(Status))
    {
@@ -144,17 +144,17 @@ ReactOS_IoGetDeviceInterfaces(
       }
 
       DPRINT("IoGetDeviceInterfaces() called with PDO, not implemented.\n");
-      return STATUS_NOT_IMPLEMENTED;    
+      return STATUS_NOT_IMPLEMENTED;
    }
    else
-   {                                
+   {
       InitializeObjectAttributes(
          &ObjectAttributes,
          &BaseKeyName,
          OBJ_CASE_INSENSITIVE,
          NULL,
          NULL);
-                                                         
+
       Status = ZwOpenKey(
          &InterfaceKey,
          KEY_READ,
@@ -191,7 +191,7 @@ ReactOS_IoGetDeviceInterfaces(
          fip,
          Size,
          &Size);
-  
+
       if (!NT_SUCCESS(Status))
       {
          DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status);
@@ -224,7 +224,7 @@ ReactOS_IoGetDeviceInterfaces(
 
          bip = (PKEY_BASIC_INFORMATION)ExAllocatePool(NonPagedPool, Size);
          ASSERT(bip != NULL);
-    
+
          Status = ZwEnumerateKey(
             InterfaceKey,
             i,
@@ -232,7 +232,7 @@ ReactOS_IoGetDeviceInterfaces(
             bip,
             Size,
             &Size);
-      
+
          if (!NT_SUCCESS(Status))
          {
             DPRINT("ZwEnumerateKey() Failed.(0x%X)\n", Status);
@@ -244,7 +244,7 @@ ReactOS_IoGetDeviceInterfaces(
             ZwClose(InterfaceKey);
             return Status;
          }
-         
+
          SubKeyName.Length = 0;
          SubKeyName.MaximumLength = BaseKeyName.Length + bip->NameLength + sizeof(WCHAR);
          SubKeyName.Buffer = ExAllocatePool(NonPagedPool, SubKeyName.MaximumLength);
@@ -308,7 +308,7 @@ ReactOS_IoGetDeviceInterfaces(
             bfip,
             Size,
             &Size);
-  
+
          if (!NT_SUCCESS(Status))
          {
             DPRINT("ZwQueryKey() Failed. (0x%X)\n", Status);
@@ -319,7 +319,7 @@ ReactOS_IoGetDeviceInterfaces(
             ZwClose(InterfaceKey);
             return Status;
          }
-         
+
          for(j = 0; j < bfip->SubKeys; j++)
          {
             Status = ZwEnumerateKey(
@@ -372,12 +372,12 @@ ReactOS_IoGetDeviceInterfaces(
                ZwClose(InterfaceKey);
                return Status;
             }
-         
+
             if (!wcsncmp(bip->Name, L"Control", bip->NameLength))
             {
                continue;
             }
-            
+
             SymbolicLinkKeyName.Length = 0;
             SymbolicLinkKeyName.MaximumLength = SubKeyName.Length + bip->NameLength + sizeof(WCHAR);
             SymbolicLinkKeyName.Buffer = ExAllocatePool(NonPagedPool, SymbolicLinkKeyName.MaximumLength);
@@ -394,7 +394,7 @@ ReactOS_IoGetDeviceInterfaces(
             ASSERT(ControlKeyName.Buffer != NULL);
             RtlCopyUnicodeString(&ControlKeyName, &SymbolicLinkKeyName);
             RtlAppendUnicodeStringToString(&ControlKeyName, &Control);
-   
+
             ExFreePool(bip);
 
             InitializeObjectAttributes(
@@ -425,16 +425,16 @@ ReactOS_IoGetDeviceInterfaces(
             }
 
             Status = ZwQueryValueKey(
-               SymbolicLinkKey, 
-               &SymbolicLink, 
+               SymbolicLinkKey,
+               &SymbolicLink,
                KeyValuePartialInformation,
                NULL,
                0,
                &Size);
-               
+
             if (Status == STATUS_OBJECT_NAME_NOT_FOUND)
                continue;
-      
+
             if (Status != STATUS_BUFFER_TOO_SMALL)
             {
                DPRINT("ZwQueryValueKey() Failed.(0x%X)\n", Status);
@@ -482,7 +482,7 @@ ReactOS_IoGetDeviceInterfaces(
             Status = RtlCheckRegistryKey(RTL_REGISTRY_ABSOLUTE, ControlKeyName.Buffer);
 
             if (NT_SUCCESS(Status))
-            {         
+            {
                /* Put the name in the string here */
                if (SymLinkList == NULL)
                {
@@ -510,7 +510,7 @@ ReactOS_IoGetDeviceInterfaces(
                   RtlCopyMemory(SymLinkListPtr, vpip->Data, vpip->DataLength);
                   SymLinkListPtr[vpip->DataLength / sizeof(WCHAR)] = 0;
                   SymLinkListPtr[1] = '?';
-               }               
+               }
             }
 
             RtlFreeUnicodeString(&SymbolicLinkKeyName);
@@ -534,7 +534,7 @@ ReactOS_IoGetDeviceInterfaces(
       }
 
       *SymbolicLinkList = SymLinkList;
-    
+
       RtlFreeUnicodeString(&BaseKeyName);
       ZwClose(InterfaceKey);
       ExFreePool(bfip);
index 1b54dac..e053b2d 100644 (file)
@@ -201,10 +201,10 @@ ObtCreateObjectTypes()
         ObTypeInitializer[i].ParseProcedure = (OB_PARSE_METHOD)ParseProc;
         //ObTypeInitializer[i].OkayToCloseProcedure =
         //    (OB_OKAYTOCLOSE_METHOD)OkayToCloseProc;
-        
+
         //ObTypeInitializer[i].QueryNameProcedure =
         //    (OB_QUERYNAME_METHOD)QueryNameProc;
-        
+
         //ObTypeInitializer[i].SecurityProcedure =
         // (OB_SECURITY_METHOD)SecurityProc;
 
@@ -284,7 +284,7 @@ ObtCreateObjects()
     QueryNameSave=QueryNameCount;
 
     Status = ObInsertObject(ObBody[1], NULL, GENERIC_ALL, 0,
-        &ObBody[1], &ObHandle1[1]); 
+        &ObBody[1], &ObHandle1[1]);
     ok(Status == STATUS_SUCCESS,
         "Failed to insert object 1 with status=0x%lX", Status);
     ok(ObBody[1] != NULL, "Object body = NULL");
index 7e2f40e..4bd18e5 100644 (file)
@@ -34,16 +34,16 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
    ULONG NextEaBufferOffset;
    UINT IntEaLength;
 
-   /* Lenght of the rest. Inital equal to EaLength */ 
+   /* Lenght of the rest. Inital equal to EaLength */
    IntEaLength = EaLength;
-   /* Inital EaBuffer equal to EaBuffer */ 
+   /* Inital EaBuffer equal to EaBuffer */
    EaBufferEnd = EaBuffer;
 
    /* The rest length of the buffer */
    /* 8 = sizeof(ULONG) + sizeof(UCHAR) + sizeof(UCHAR) + sizeof(USHORT) */
    while (IntEaLength >= 8)
    {
-      /* rest of buffer must greater then the sizeof(FILE_FULL_EA_INFORMATION) + buffer */ 
+      /* rest of buffer must greater then the sizeof(FILE_FULL_EA_INFORMATION) + buffer */
       NextEaBufferOffset = EaBufferEnd->EaNameLength+EaBufferEnd->EaValueLength + 9;
       if (IntEaLength >= NextEaBufferOffset)
       {
@@ -61,11 +61,11 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
                }
             }
             else
-            { 
-               /* 
-                  From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). 
-                  For all entries except the last, the value of NextEntryOffset must be greater 
-                  than zero and must fall on a ULONG boundary. 
+            {
+               /*
+                  From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx).
+                  For all entries except the last, the value of NextEntryOffset must be greater
+                  than zero and must fall on a ULONG boundary.
                */
                NextEaBufferOffset = ((NextEaBufferOffset + 3) & 0xFFFFFFFC);
                if ((EaBufferEnd->NextEntryOffset == NextEaBufferOffset) && (EaBufferEnd->NextEntryOffset>0))
@@ -89,7 +89,7 @@ IoCheckEaBufferValidityROS(IN PFILE_FULL_EA_INFORMATION EaBuffer,
       /* calculate the error offset. Or in */
       *ErrorOffset = (ULONG)((ULONG_PTR)EaBufferEnd - (ULONG_PTR)EaBuffer);
    }
-   
+
    return STATUS_EA_LIST_INCONSISTENT;
 }
 
@@ -125,7 +125,7 @@ int _tmain(int argc, _TCHAR* argv[])
 {
    void *pFunction;
    pIoCheckEaBufferValidity IoCheckEaBufferValidity;
-   
+
    HMODULE hKrnlMod = LoadLibrary(L"ntoskrnl.exe");
    if (hKrnlMod)
    {
@@ -144,29 +144,29 @@ int _tmain(int argc, _TCHAR* argv[])
          int iTestCount,i;
          ULONG TestEaLength;
          UCHAR TestEaBufferFlags;
-         
+
          // Test the flag
          TestEaBufferFlags = 0;
-         
+
          iTestCount = 1;
          WinEaBuffer = (PFILE_FULL_EA_INFORMATION)malloc(TEST_BUFFER_LEN);
          ROSEaBuffer = (PFILE_FULL_EA_INFORMATION)malloc(TEST_BUFFER_LEN);
-         
+
 
          printf("1.) Test : *********************\n");
 
          /* Check EaLength calculation */
-         /* Here all zero : only i>9 pass the test with STATUS_SUCCESS */ 
+         /* Here all zero : only i>9 pass the test with STATUS_SUCCESS */
 
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             ulROSError = RANDOM_INIT_ERROR;
@@ -179,18 +179,18 @@ int _tmain(int argc, _TCHAR* argv[])
 
          printf("2.) Test : *********************\n");
 
-         /* Here all zero but EaBuffer::EaName is set : will allways end in STATUS_EA_LIST_INCONSISTENT */ 
-         /* There must a link to EaBuffer::EaName */ 
+         /* Here all zero but EaBuffer::EaName is set : will allways end in STATUS_EA_LIST_INCONSISTENT */
+         /* There must a link to EaBuffer::EaName */
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -202,20 +202,20 @@ int _tmain(int argc, _TCHAR* argv[])
          }
 
          printf("3.) Test : *********************\n");
-         
-         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is count up. EaLength is maxbuffer: STATUS_SUCCESS when EaBuffer::EaNameLength>strlen(EaBuffer::EaName) */ 
+
+         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is count up. EaLength is maxbuffer: STATUS_SUCCESS when EaBuffer::EaNameLength>strlen(EaBuffer::EaName) */
          TestEaLength = TEST_BUFFER_LEN;
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
 
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
             WinEaBuffer->EaNameLength = i;
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -229,19 +229,19 @@ int _tmain(int argc, _TCHAR* argv[])
          }
 
          printf("4.) Test : *********************\n");
-         
-         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName). EaLength is count: STATUS_SUCCESS when EaLength>=17 (EaBuffer::EaNameLength+9) */ 
+
+         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName). EaLength is count: STATUS_SUCCESS when EaLength>=17 (EaBuffer::EaNameLength+9) */
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
             WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName);
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -256,11 +256,11 @@ int _tmain(int argc, _TCHAR* argv[])
 
          printf("5.) Test : *********************\n");
 
-         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */ 
+         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
             WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName);
@@ -268,7 +268,7 @@ int _tmain(int argc, _TCHAR* argv[])
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -282,16 +282,16 @@ int _tmain(int argc, _TCHAR* argv[])
             iTestCount++;
          }
 
-         
+
          printf("6.) Test : *********************\n");
 
          /* The same test like 5.) but more data in the buffer*/
-         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */ 
-         
+         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: STATUS_SUCCESS when EaLength>=26 (EaBuffer::EaNameLength+EaBuffer::EaValueLength+9) */
+
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -300,7 +300,7 @@ int _tmain(int argc, _TCHAR* argv[])
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
@@ -316,13 +316,13 @@ int _tmain(int argc, _TCHAR* argv[])
          }
 
          printf("7.) Test : *********************\n");
-         
+
          /* The same test like 6.) but wrong strlen */
-         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: will allways end in STATUS_EA_LIST_INCONSISTENT */ 
+         /* Here EaBuffer::EaName is set and EaBuffer::EaNameLength is strlen(EaBuffer::EaName) EaBuffer::EaValueLength is strlen(EaBuffer::EaName)+1. EaLength is count: will allways end in STATUS_EA_LIST_INCONSISTENT */
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = i;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -331,7 +331,7 @@ int _tmain(int argc, _TCHAR* argv[])
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
@@ -348,13 +348,13 @@ int _tmain(int argc, _TCHAR* argv[])
 
 
          printf("8.) Test : *********************\n");
-         
-         /* Here WinEaBuffer->NextEntryOffset test : STATUS_SUCCESS when NextEntryOffset=0 else STATUS_EA_LIST_INCONSISTENT when NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC then ErrorOffset 28 */ 
+
+         /* Here WinEaBuffer->NextEntryOffset test : STATUS_SUCCESS when NextEntryOffset=0 else STATUS_EA_LIST_INCONSISTENT when NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC then ErrorOffset 28 */
          /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = TEST_BUFFER_LEN;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
@@ -364,7 +364,7 @@ int _tmain(int argc, _TCHAR* argv[])
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinEaBuffer->NextEntryOffset = i;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x%x%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
@@ -382,27 +382,27 @@ int _tmain(int argc, _TCHAR* argv[])
          }
 
          printf("9.) Test : *********************\n");
-         
-         /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */ 
+
+         /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */
          /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = TEST_BUFFER_LEN;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
-            
+
             WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName)-1;
             WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName);
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinEaBuffer->NextEntryOffset = i;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
-            
+
             ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName)-1;
             ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName);
             ulROSError = RANDOM_INIT_ERROR;
@@ -416,27 +416,27 @@ int _tmain(int argc, _TCHAR* argv[])
          }
 
          printf("10.) Test : *********************\n");
-         
-         /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */ 
+
+         /* Here WinEaBuffer->NextEntryOffset test wrong strlen: STATUS_SUCCESS NextEntryOffset=0 & NextEntryOffset = 28 = 8+8+9 ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC */
          /* From the MSDN (http://msdn2.microsoft.com/en-us/library/ms795740.aspx). For all entries except the last, the value of NextEntryOffset must be greater than zero and must fall on a ULONG boundary.*/
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = TEST_BUFFER_LEN;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
-            
+
             WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName)+1;
             WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName)+1;
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinEaBuffer->NextEntryOffset = i;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR);
-            
+
             ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1;
             ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName)+1;
             ulROSError = RANDOM_INIT_ERROR;
@@ -451,25 +451,25 @@ int _tmain(int argc, _TCHAR* argv[])
 
          printf("11.) Test : *********************\n");
 
-         /* Here WinEaBuffer->NextEntryOffset :  */ 
+         /* Here WinEaBuffer->NextEntryOffset :  */
          for (i=0;i<TEST_BUFFER_LEN;i++)
          {
             TestEaLength = TEST_BUFFER_LEN;
-            // Windows 
+            // Windows
             memset(WinEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(WinEaBuffer->EaName,"%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
-            
+
             WinEaBuffer->EaNameLength = (UCHAR)strlen(WinEaBuffer->EaName);
             WinEaBuffer->EaValueLength = (UCHAR)strlen(WinEaBuffer->EaName);
             ulWinError = RANDOM_INIT_ERROR;
             WinEaBuffer->Flags = TestEaBufferFlags;
             WinEaBuffer->NextEntryOffset = ((WinEaBuffer->EaNameLength+WinEaBuffer->EaNameLength+9)+3)&0xFFFFFFFC;
             WinStatus = IoCheckEaBufferValidity(WinEaBuffer,TestEaLength,&ulWinError);
-            
+
             // ROS
             memset(ROSEaBuffer,0,TEST_BUFFER_LEN);
             sprintf(ROSEaBuffer->EaName,"%x",RANDOM_INIT_ERROR,RANDOM_INIT_ERROR);
-            
+
             ROSEaBuffer->EaNameLength = (UCHAR)strlen(ROSEaBuffer->EaName);
             ROSEaBuffer->EaValueLength = (UCHAR)strlen(ROSEaBuffer->EaName);
             ulROSError = RANDOM_INIT_ERROR;
@@ -486,7 +486,7 @@ int _tmain(int argc, _TCHAR* argv[])
          free(WinEaBuffer);
          free(ROSEaBuffer);
       }
-      
+
       FreeLibrary(hKrnlMod);
    }
    else
index 2af24ac..6a93fb9 100644 (file)
@@ -254,7 +254,7 @@ BOOL Test_GetAvailableVidMem (INT* passed, INT* failed)
        memset(&Caps,0,sizeof(DDSCAPS2));
        Caps.dwCaps3 = ~(DDSCAPS3_MULTISAMPLE_QUALITY_MASK | DDSCAPS3_MULTISAMPLE_MASK | DDSCAPS3_RESERVED1 | DDSCAPS3_RESERVED2 | DDSCAPS3_LIGHTWEIGHTMIPMAP | DDSCAPS3_AUTOGENMIPMAP | DDSCAPS3_DMAP);
        TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DDERR_INVALIDCAPS);
-       
+
        memset(&Caps,0,sizeof(DDSCAPS2));
        Caps.dwCaps3 = (DDSCAPS3_MULTISAMPLE_QUALITY_MASK | DDSCAPS3_MULTISAMPLE_MASK | DDSCAPS3_RESERVED1 | DDSCAPS3_RESERVED2 | DDSCAPS3_LIGHTWEIGHTMIPMAP | DDSCAPS3_AUTOGENMIPMAP | DDSCAPS3_DMAP);
        TEST (DirectDraw->GetAvailableVidMem(&Caps, &Total, &Free) == DD_OK);
index 21ccd25..ffa612b 100644 (file)
@@ -12,7 +12,7 @@ BOOL Test_CreateDDraw (INT* passed, INT* failed)
 
        TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, (IUnknown*)0xdeadbeef) == CLASS_E_NOAGGREGATION);
        TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw4, NULL) == DDERR_INVALIDPARAMS);
-       TEST (DirectDrawCreateEx(NULL, NULL, IID_IDirectDraw7, NULL) == DDERR_INVALIDPARAMS); 
+       TEST (DirectDrawCreateEx(NULL, NULL, IID_IDirectDraw7, NULL) == DDERR_INVALIDPARAMS);
 
        DirectDraw = NULL;
        TEST (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) == DD_OK);
index 68e30b2..9915af2 100644 (file)
@@ -18,7 +18,7 @@ HRESULT CALLBACK EnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context
        if(setcout >= 5)
                return DDENUMRET_OK;
 
-       DWORD lpdwFrequency = 0; 
+       DWORD lpdwFrequency = 0;
        INT* passed = Context->passed;
        INT* failed = Context->failed;
        DDSURFACEDESC2 DisplayMode = {0};
@@ -29,12 +29,12 @@ HRESULT CALLBACK EnumDisplayModes( LPDDSURFACEDESC2 pDDSD, ENUMCONTEXT* Context
        TEST ( Context->DirectDraw->SetDisplayMode (pDDSD->dwWidth, pDDSD->dwHeight, pDDSD->ddpfPixelFormat.dwRGBBitCount, pDDSD->dwRefreshRate, 0) == DD_OK);
        TEST ( Context->DirectDraw->GetMonitorFrequency (&lpdwFrequency) == DD_OK && lpdwFrequency == pDDSD->dwRefreshRate);
        TEST ( Context->DirectDraw->GetDisplayMode (&DisplayMode) == DD_OK
-               && pDDSD->dwHeight == DisplayMode.dwHeight 
-               && pDDSD->dwWidth == DisplayMode.dwWidth 
+               && pDDSD->dwHeight == DisplayMode.dwHeight
+               && pDDSD->dwWidth == DisplayMode.dwWidth
                && pDDSD->dwRefreshRate == DisplayMode.dwRefreshRate
-               && pDDSD->ddpfPixelFormat.dwRGBBitCount == DisplayMode.ddpfPixelFormat.dwRGBBitCount 
+               && pDDSD->ddpfPixelFormat.dwRGBBitCount == DisplayMode.ddpfPixelFormat.dwRGBBitCount
                && DisplayMode.dwFlags == DDSD_HEIGHT | DDSD_WIDTH | DDSD_PITCH | DDSD_PIXELFORMAT | DDSD_REFRESHRATE );
-       
+
        setcout++;
        return DDENUMRET_OK;
 }
index 5515bc4..ed3024f 100644 (file)
@@ -53,11 +53,11 @@ VOID Blt_Test (LPDIRECTDRAWSURFACE7 Surface, INT* passed, INT* failed)
        bltfx.dwFillColor = RGB(255, 255, 0);
     TEST (Source->Blt(&rect, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx) == DD_OK);
     TEST (GetPixel(Source, 0, 0) == RGB(0, 255, 0));
-    TEST (GetPixel(Source, 100, 100) == RGB(255, 255, 0));    
+    TEST (GetPixel(Source, 100, 100) == RGB(255, 255, 0));
 
     // Test DestRect and SrcRect
-    RECT SourceRect = {100, 100, 200, 200}; 
-    RECT DestRect = {0, 0, 200, 100}; 
+    RECT SourceRect = {100, 100, 200, 200};
+    RECT DestRect = {0, 0, 200, 100};
 
     TEST (Surface->Blt(&SourceRect, Source, &DestRect, 0, NULL) == DD_OK);
     TEST (GetPixel(Surface, 100, 100) == RGB(0, 255, 0)); // Src bigger: normal blt
@@ -68,20 +68,20 @@ VOID Blt_Test (LPDIRECTDRAWSURFACE7 Surface, INT* passed, INT* failed)
     DestRect.right = 100; // both are same size now
     TEST (Surface->Blt(&DestRect, Source, &SourceRect, 0, NULL) == DD_OK);
     TEST (GetPixel(Surface, 0, 0) == RGB(255, 255, 0));
-    
-    RECT TooBig = {100, 100, 200, 250}; 
+
+    RECT TooBig = {100, 100, 200, 250};
     TEST (Surface->Blt(&TooBig, Source, &SourceRect, 0, NULL) == DDERR_INVALIDRECT);
     TEST (Surface->Blt(&DestRect, Source, &TooBig, 0, NULL) == DDERR_INVALIDRECT);
 
     // Test Rotation
        bltfx.dwDDFX = DDBLTFX_MIRRORLEFTRIGHT|DDBLTFX_MIRRORUPDOWN;
-    TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DD_OK); 
+    TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_DDFX, &bltfx) == DD_OK);
     TEST (GetPixel(Surface, 0, 0) == RGB(255, 255, 0));
 
        bltfx.dwDDFX = DDBLTFX_ROTATE180;
     TEST (Surface->Blt(NULL, Source, NULL, DDBLT_DDFX, &bltfx) == DDERR_NOROTATIONHW);
 
-       //bltfx.dwRotationAngle = 
+       //bltfx.dwRotationAngle =
     TEST (Surface->Blt(NULL, Source, NULL, DDBLT_ROTATIONANGLE, &bltfx) == DDERR_NOROTATIONHW);
 
     // Test Raster Operations
@@ -95,7 +95,7 @@ VOID Blt_Test (LPDIRECTDRAWSURFACE7 Surface, INT* passed, INT* failed)
     TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DD_OK);
     TEST(GetPixel(Surface, 0, 0) == RGB(0, 255, 0));
        bltfx.dwROP = SRCAND;
-    TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DDERR_NORASTEROPHW); 
+    TEST (Surface->Blt(NULL, Source, NULL, DDBLT_WAIT|DDBLT_ROP, &bltfx) == DDERR_NORASTEROPHW);
 
     // Test Direct Draw Raster Operations
        bltfx.dwDDROP = 0x123;
index cf26f8e..0a1394f 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * The following test cases have been generated automatically. Many of them might be 
- * redundant. Also some of them might fail on other other machines then the one I 
- * used (win xp, nvidea, 32 bit color deepth) - mbosma 
+ * The following test cases have been generated automatically. Many of them might be
+ * redundant. Also some of them might fail on other other machines then the one I
+ * used (win xp, nvidea, 32 bit color deepth) - mbosma
  *
  */
 
index 6c53c64..7ad5cb5 100644 (file)
@@ -5,7 +5,7 @@ LPDIRECTDRAW7 DirectDraw;
 BOOL TestCaps (char* dummy, DWORD Caps, HRESULT test1, HRESULT test2)
 {
     LPDIRECTDRAWSURFACE7 Surface = NULL;
-       DDSURFACEDESC2 Desc = { 0 }; 
+       DDSURFACEDESC2 Desc = { 0 };
        Desc.dwHeight = 200;
        Desc.dwWidth = 200;
        Desc.dwSize = sizeof (DDSURFACEDESC2);
@@ -27,7 +27,7 @@ BOOL Test_CreateSurface (INT* passed, INT* failed)
 {
        LPDIRECTDRAWSURFACE7 Surface = NULL;
        HWND hwnd;
+
        /* Preparations */
        if (DirectDrawCreateEx(NULL, (VOID**)&DirectDraw, IID_IDirectDraw7, NULL) != DD_OK)
        {
@@ -36,21 +36,21 @@ BOOL Test_CreateSurface (INT* passed, INT* failed)
        }
 
        TEST ( DirectDraw->CreateSurface(NULL, NULL, NULL) == DDERR_NOCOOPERATIVELEVELSET);
+
        if(!( hwnd = CreateBasicWindow() ))
        {
                printf("ERROR: Failed to create window\n");
                DirectDraw->Release();
                return FALSE;
        }
+
        if (DirectDraw->SetCooperativeLevel (hwnd, DDSCL_NORMAL) != DD_OK)
        {
                printf("ERROR: Could not set cooperative level\n");
                DirectDraw->Release();
                return 0;
        }
+
        /* The Test */
        DDSURFACEDESC2 Desc = { 0 };
        Desc.dwSize = sizeof (DDSURFACEDESC2);
@@ -61,11 +61,11 @@ BOOL Test_CreateSurface (INT* passed, INT* failed)
        TEST ( DirectDraw->CreateSurface(NULL, &Surface, NULL) == DDERR_INVALIDPARAMS );
        TEST ( DirectDraw->CreateSurface(&Desc, NULL, NULL) == DDERR_INVALIDPARAMS );
        TEST ( DirectDraw->CreateSurface(&Desc, &Surface, NULL) == DDERR_INVALIDPARAMS );
-    
+
     // Test (nearly) all possible cap combinations
     #include "caps_tests.h"
 
     DirectDraw->Release();
+
        return TRUE;
 }
index 1d493e9..41c13c0 100644 (file)
@@ -11,7 +11,7 @@ BOOL Test_Misc (INT* passed, INT* failed)
     // GetCaps
     DDSCAPS2 Caps;
     TEST (Surface->GetCaps((DDSCAPS2*)0xdeadbeef) == DDERR_INVALIDPARAMS);
-    TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040 
+    TEST (Surface->GetCaps(&Caps) == DD_OK && Caps.dwCaps == 0x10004040
         && Caps.dwCaps2 == Caps.dwCaps3 == Caps.dwCaps4 == 0); // FIXME: Replace 0x10004040
 
     // GetDC / ReleaseDC
@@ -41,7 +41,7 @@ BOOL Test_Misc (INT* passed, INT* failed)
     TEST (Surface->GetPixelFormat(&PixelFormat));
     PixelFormat.dwSize = sizeof(DDPIXELFORMAT);
     TEST (Surface->GetPixelFormat(&PixelFormat) == DD_OK && PixelFormat.dwFlags == 0x40); // FIXME: Find out what 0x40 is
-    
+
     // GetSurfaceDesc / SetSurfaceDesc
     DDSURFACEDESC2 Desc = {0};
     // FIXME: Produce DDERR_INVALIDSURFACETYPE
index cb8f85b..e9839af 100644 (file)
@@ -29,7 +29,7 @@ BOOL Test_PrivateData (INT* passed, INT* failed)
     TEST(Surface->FreePrivateData(guid) == DD_OK);
     TEST(Surface->FreePrivateData(guid) == DDERR_NOTFOUND);
 
-    // Test for DDSPD_VOLATILE flag 
+    // Test for DDSPD_VOLATILE flag
     TEST(Surface->SetPrivateData(guid, (LPVOID)&dummy, sizeof(DWORD), DDSPD_VOLATILE) == DD_OK);
     size = 0;
     TEST(Surface->GetPrivateData(guid, NULL, &size) == DDERR_MOREDATA && size == sizeof(DWORD));
@@ -37,7 +37,7 @@ BOOL Test_PrivateData (INT* passed, INT* failed)
 
        DDBLTFX  bltfx;
        bltfx.dwSize = sizeof(DDBLTFX);
-       bltfx.dwFillColor = RGB(0, 0, 0);       
+       bltfx.dwFillColor = RGB(0, 0, 0);
        if(Surface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltfx) != DD_OK)
         printf("ERROR: Failed to draw to surface !");
     TEST(Surface->GetPrivateData(guid, &dummy, &size) == DDERR_EXPIRED);
index b414ffc..92bf3aa 100644 (file)
@@ -37,7 +37,7 @@ BOOL CreateSurface(LPDIRECTDRAWSURFACE7* pSurface)
                printf("ERROR: Failed to set up ddraw\n");
                return FALSE;
        }
+
        if(!( hwnd = CreateBasicWindow() ))
        {
                printf("ERROR: Failed to create window\n");
@@ -53,9 +53,9 @@ BOOL CreateSurface(LPDIRECTDRAWSURFACE7* pSurface)
        }
 
     // Creat Surface
-       DDSURFACEDESC2 Desc = { 0 }; 
+       DDSURFACEDESC2 Desc = { 0 };
        Desc.dwHeight = 200;
-       Desc.dwWidth = 200;     
+       Desc.dwWidth = 200;
     Desc.dwSize = sizeof (DDSURFACEDESC2);
     Desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
        Desc.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH;
index e3662f4..0bc6e4c 100644 (file)
@@ -20,10 +20,10 @@ test_NtGdiDdCanCreateSurface(HANDLE hDirectDrawLocal)
     BOOL retValue=FALSE;\r
     DDHAL_CANCREATESURFACEDATA pCanCreateSurface;\r
     DDSURFACEDESC2 desc;\r
-    \r
+\r
     RtlZeroMemory(&pCanCreateSurface,sizeof(DDHAL_CANCREATESURFACEDATA));\r
     RtlZeroMemory(&desc,sizeof(DDSURFACEDESC2));\r
-    \r
+\r
     /* crash in windows 2000 */\r
     retValue = OsThunkDdCanCreateSurface(NULL,NULL);\r
     testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdCanCreateSurface(NULL,NULL);\0");\r
index 08f9e41..28943ce 100644 (file)
@@ -37,7 +37,7 @@ test_NtGdiDdCreateDirectDrawObject()
     }
 
     printf("Start testing of NtGdiDdCreateDirectDrawObject\n");
-    
+
     retValue = OsThunkDdCreateDirectDrawObject(NULL);
     testing_noteq(retValue,NULL,fails,"NtGdiDdCreateDirectDrawObject(NULL);\0");
 
index c2dd32b..0fd1e47 100644 (file)
@@ -17,7 +17,7 @@ test_NtGdiDdDeleteDirectDrawObject(HANDLE hDirectDrawLocal)
     int fails=0;
     BOOL retValue=FALSE;
     printf("Start testing of NtGdiDdDeleteDirectDrawObject\n");
-    
+
     retValue = OsThunkDdDeleteDirectDrawObject(hDirectDrawLocal);
     testing_eq(retValue,FALSE,fails,"NtGdiDdDeleteDirectDrawObject(hDirectDrawLocal);\0");
 
index d3ed876..3aea20f 100644 (file)
@@ -20,7 +20,7 @@ test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal)
 \r
     printf("Start testing of NtGdiDdGetScanLine\n");\r
     RtlZeroMemory(&puGetScanLineData,sizeof(DD_GETSCANLINEDATA));\r
-    \r
+\r
     retValue = OsThunkDdGetScanLine(NULL,NULL);\r
     testing_eq(retValue, DDHAL_DRIVER_HANDLED,fails,"1. NtGdiDdGetScanLine(NULL,NULL);\0");\r
 \r
@@ -33,7 +33,7 @@ test_NtGdiDdGetScanLine(HANDLE hDirectDrawLocal)
     testing_noteq(puGetScanLineData.ddRVal,DD_OK,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");\r
     testing_eq(puGetScanLineData.dwScanLine,0,fails,"4. NtGdiDdGetScanLine(hDirectDrawLocal,puGetScanLineData);\0");\r
 \r
-    \r
+\r
     /* FIXME DDERR_VERTICALBLANKINPROGRESS test */\r
 \r
     show_status(fails, "NtGdiDdGetScanLine\0");\r
index bc72101..3d0daa3 100644 (file)
@@ -16,21 +16,21 @@ struct
 } *mytest;
 
 /*
- * Test see if we can setup DirectDrawObject 
+ * Test see if we can setup DirectDrawObject
  *
  */
 
-/* 
- * ToDO 
- * 1. add more testcase it is only some, but we do not test for all case 
+/*
+ * ToDO
+ * 1. add more testcase it is only some, but we do not test for all case
  *    that happen only some
  *
- * 2.Fixed the false alaret for drivers only support 2d dx interface 
+ * 2.Fixed the false alaret for drivers only support 2d dx interface
  *
- * 3. fixed the dumping of d3d struct. 
+ * 3. fixed the dumping of d3d struct.
  *
  */
+
 void
 test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
 {
@@ -69,14 +69,14 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     memset(CallBackFlags,0,sizeof(DWORD)*3);
 
     printf("Start testing of NtGdiDdQueryDirectDrawObject\n");
-    
+
     /* testing  OsThunkDdQueryDirectDrawObject( NULL, ....  */
     printf("testing  DdQueryDirectDrawObject( NULL, ....)\n");
 
-    retValue = OsThunkDdQueryDirectDrawObject( NULL, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( NULL, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
     testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(NULL, ...);\0");
@@ -92,10 +92,10 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     /* testing  OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, NULL, ....  */
     printf("testing  DdQueryDirectDrawObject( hDD, NULL, ....)\n");
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
@@ -113,10 +113,10 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     printf("testing  DdQueryDirectDrawObject( hDD, pHalInfo, NULL, ....)\n");
 
     pHalInfo = &HalInfo;
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
@@ -150,10 +150,10 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
 
     RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
@@ -189,16 +189,16 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
     RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
     testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
     testing_eq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
-    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");    
+    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
     testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
 
     testing_noteq(puD3dDriverData,NULL,fails,"5. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
@@ -232,16 +232,16 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
     RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
     testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0");
     testing_eq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0");
-    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0");    
+    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0");
     testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, NULL, ...);\0");
 
     testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"5. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, NULL, ...);\0");
@@ -279,16 +279,16 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
     RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
     RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS));
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
     testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0");
     testing_eq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0");
-    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0");    
+    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0");
     testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...);\0");
 
     testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"5. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dBufferCallbacks, NULL, ...);\0");
@@ -315,7 +315,7 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
         /* FIXME dump puD3dCallbacks */
         /* FIXME dump puD3dDriverData */
         /* FIXME dump D3dBufferCallbacks */
-        
+
     }
 
 /* testing  OsThunkDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL, */
@@ -342,16 +342,16 @@ test_NtGdiDdQueryDirectDrawObject( HANDLE hDirectDrawLocal)
         RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats * sizeof(DDSURFACEDESC2));
     }
 
-    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo, 
-                                                pCallBackFlags, puD3dCallbacks, 
-                                                puD3dDriverData, puD3dBufferCallbacks, 
-                                                puD3dTextureFormats, puNumHeaps, 
+    retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+                                                pCallBackFlags, puD3dCallbacks,
+                                                puD3dDriverData, puD3dBufferCallbacks,
+                                                puD3dTextureFormats, puNumHeaps,
                                                 puvmList, puNumFourCC,
                                                 puFourCC);
 
     testing_noteq(retValue,FALSE,fails,"1. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
     testing_eq(pHalInfo,NULL,fails,"2. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");    
+    testing_eq(pCallBackFlags,NULL,fails,"3. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
     testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"4. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
 
     testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"5. NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
index 9b51d15..2f7eae7 100644 (file)
@@ -19,7 +19,7 @@ test_NtGdiDdWaitForVerticalBlank(HANDLE hDirectDrawLocal)
     int fails=0;\r
     BOOL retValue=FALSE;\r
     DDHAL_WAITFORVERTICALBLANKDATA pDdWaitForVerticalBlankData;\r
-    \r
+\r
     RtlZeroMemory(&pDdWaitForVerticalBlankData,sizeof(DDHAL_WAITFORVERTICALBLANKDATA));\r
 \r
     retValue = OsThunkDdWaitForVerticalBlank(NULL,NULL);\r
index b44dafa..1747860 100644 (file)
@@ -86,7 +86,7 @@ void
 dump_halinfo(DD_HALINFO *pHalInfo, char *text)
 {
     printf("dumping the DD_HALINFO from %s\n",text);
-    
+
     if (pHalInfo->dwSize == sizeof(DD_HALINFO_V4))
     {
         DD_HALINFO_V4 *pHalInfo4 = (DD_HALINFO_V4 *) pHalInfo;
@@ -101,7 +101,7 @@ dump_halinfo(DD_HALINFO *pHalInfo, char *text)
         printf(" pHalInfo4->vmiData->lDisplayPitch                  : 0x%08lx\n",(long)pHalInfo4->vmiData.lDisplayPitch);
 
         printf(" pHalInfo4->vmiData->ddpfDisplay.dwSize             : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwSize);
-        printf(" pHalInfo4->vmiData->ddpfDisplay.dwFlags            : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFlags); 
+        printf(" pHalInfo4->vmiData->ddpfDisplay.dwFlags            : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFlags);
         printf(" pHalInfo4->vmiData->ddpfDisplay.dwFourCC           : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwFourCC);
         printf(" pHalInfo4->vmiData->ddpfDisplay.dwRGBBitCount      : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRGBBitCount);
         printf(" pHalInfo4->vmiData->ddpfDisplay.dwRBitMask         : 0x%08lx\n",(long)pHalInfo4->vmiData.ddpfDisplay.dwRBitMask);
@@ -203,7 +203,7 @@ dump_halinfo(DD_HALINFO *pHalInfo, char *text)
         printf(" pHalInfo->vmiData->lDisplayPitch                  : 0x%08lx\n",(long)pHalInfo->vmiData.lDisplayPitch);
 
         printf(" pHalInfo->vmiData->ddpfDisplay.dwSize             : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwSize);
-        printf(" pHalInfo->vmiData->ddpfDisplay.dwFlags            : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFlags); 
+        printf(" pHalInfo->vmiData->ddpfDisplay.dwFlags            : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFlags);
         printf(" pHalInfo->vmiData->ddpfDisplay.dwFourCC           : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwFourCC);
         printf(" pHalInfo->vmiData->ddpfDisplay.dwRGBBitCount      : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount);
         printf(" pHalInfo->vmiData->ddpfDisplay.dwRBitMask         : 0x%08lx\n",(long)pHalInfo->vmiData.ddpfDisplay.dwRBitMask);
index f8fffa1..95f3088 100644 (file)
 
 BOOL dumping_on =FALSE;
 
-/* we using d3d8thk.dll it is doing the real syscall in windows 2000 
+/* we using d3d8thk.dll it is doing the real syscall in windows 2000
  * in ReactOS and Windows XP and higher d3d8thk.dll it linking to
- * gdi32.dll instead doing syscall, gdi32.dll export DdEntry1-56 
- * and doing the syscall direcly. I did forget about it, This 
- * test program are now working on any Windows and ReactOS 
+ * gdi32.dll instead doing syscall, gdi32.dll export DdEntry1-56
+ * and doing the syscall direcly. I did forget about it, This
+ * test program are now working on any Windows and ReactOS
  * that got d3d8thk.dll
  */
 
index c3977c4..c503ae4 100644 (file)
@@ -15,5 +15,5 @@
        <file>NtGdiDdGetScanLine.c</file>
        <file>NtGdiDdWaitForVerticalBlank.c</file>
        <file>NtGdiDdCanCreateSurface.c</file>
-       <file>dump.c</file>     
+       <file>dump.c</file>
 </module>
\ No newline at end of file
index aa1845f..eeca12f 100644 (file)
@@ -265,7 +265,7 @@ FrameworkGetFunction(_PAPI_DESCRIPTION ApiDescription)
   exportedFunctionName = FrameworkGetExportedFunctionNameInternal(ApiDescription);
 
   hModule = _GetModuleHandleA(ApiDescription->FileName);
-  if (hModule != NULL) 
+  if (hModule != NULL)
     {
       function = _GetProcAddress(hModule, exportedFunctionName);
     }
@@ -303,7 +303,7 @@ FrameworkGetHookInternal(ULONG index)
     ExternalDependencies[index].FileName);
 
   address = FrameworkGetFunction(&ExternalDependencies[index]);
+
   if (address == NULL)
     {
       printf("Function '%s' not found in DLL '%s'.\n",
@@ -311,7 +311,7 @@ FrameworkGetHookInternal(ULONG index)
         ExternalDependencies[index].FileName);
     }
   ExternalDependencies[index].FunctionAddress = address;
+
   return address;
 }
 
index f23f948..c96d6c1 100644 (file)
@@ -7,18 +7,18 @@
 
 /* Black Box program for D3DParseUnknownCommand in ddraw.dll
  *
- * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll 
- * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document 
- * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for 
+ * This program scaning all return valu that D3DParseUnknownCommand have in ddraw.dll
+ * This command is not 100% document in MSDN so I using ddk kit doc and WinCE document
+ * and ms ddk / ms sdk to figout the basic. and MSDN was unclare what this command support for
  * D3DHAL_DP2COMMAND dp2command->bCommand so I wrote this small scanner
  *
  * it will show D3DParseUnknownCommand  dp2command->bCommand support follow command
- *  command                 hex      dec 
+ *  command                 hex      dec
  *  D3DDP2OP_VIEWPORTINFO (aka 0x1c) 28
  *  D3DDP2OP_WINFO        (aka 0x1d) 29
  *  Unknown               (aka 0x0d) 13
  *
- *  no doc in msdn about command 13 (dec) I will exaime it later 
+ *  no doc in msdn about command 13 (dec) I will exaime it later
  *
  */
 
@@ -39,11 +39,11 @@ VOID BuildReturnCode(DWORD * ReturnCode)
     INT t;
     D3DHAL_DP2COMMAND dp2command;
     DWORD lplpvReturnedCommand[2];
-    
+
     for (t=0;t<256;t++)
     {
        dp2command.bCommand = t;
-       ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ;   
+       ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ;
        printf("D3DParseUnknownCommand return code = %x command %d \n", ReturnCode[t], t);
     }
 }
index 527ac80..af89cd9 100644 (file)
@@ -3,7 +3,7 @@
 
 
 // TODO:
-//  
+//
 // - free memory
 // - Check if we ran out of memory (HeapAlloc == NULL)
   HDC hdc;
@@ -67,7 +67,7 @@ typedef struct _DD_MISCELLANEOUSCALLBACKS {
 } DD_MISCELLANEOUSCALLBACKS;
 
 
-int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, 
+int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
                                        LPSTR lpCmdLine, int nCmdShow)
 {
        /* get the functions we need */
@@ -84,13 +84,13 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     const UINT bmiSize = sizeof(BITMAPINFOHEADER) + 0x10;
     UCHAR *pbmiData;
     BITMAPINFO *pbmi;
-    
+
     DWORD *pMasks;
     //BOOL newmode = FALSE;
        //DWORD Status; /* for create surface */
        UINT i;
        UINT j;
-       
+
 
        printf("This apps showing how to start up directx draw/d3d interface and some other as well\n");
        printf("This code have been releae to some close applactons with my premtions, if any company\n");
@@ -104,17 +104,17 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
        printf("and a overlay sufrace and blt to the primary surface\n");
 
 
-    /* 
-       Get and Create mode info 
+    /*
+       Get and Create mode info
     */
     mcModeInfos = 1;
-    mpModeInfos = (DDHALMODEINFO*)HeapAlloc(GetProcessHeap(), 
-                                                  HEAP_ZERO_MEMORY, 
-                                                  mcModeInfos * sizeof(DDHALMODEINFO));  
-   
+    mpModeInfos = (DDHALMODEINFO*)HeapAlloc(GetProcessHeap(),
+                                                  HEAP_ZERO_MEMORY,
+                                                  mcModeInfos * sizeof(DDHALMODEINFO));
+
     if (mpModeInfos == NULL)
     {
-       printf("Fail to alloc mpModeInfos\n"); 
+       printf("Fail to alloc mpModeInfos\n");
        return DD_FALSE;
     }
 
@@ -128,28 +128,28 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     mpModeInfos[0].wRefreshRate = (WORD)devmode.dmDisplayFrequency;
 
     /*
-       Setup HDC and mDDrawGlobal right 
-    */    
-    hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL);    
+       Setup HDC and mDDrawGlobal right
+    */
+    hdc = CreateDCW(L"DISPLAY",L"DISPLAY",NULL,NULL);
 
     if (hdc == NULL)
     {
-         printf("Fail to create HDC\n"); 
+         printf("Fail to create HDC\n");
       return DD_FALSE;
     }
 
     /*
-      Dectect RGB bit mask 
-    */  
-    hbmp = CreateCompatibleBitmap(hdc, 1, 1);  
+      Dectect RGB bit mask
+    */
+    hbmp = CreateCompatibleBitmap(hdc, 1, 1);
     if (hbmp==NULL)
     {
        HeapFree(GetProcessHeap(), 0, mpModeInfos);
        DeleteDC(hdc);
-          printf("Fail to Create Compatible Bitmap\n"); 
+          printf("Fail to Create Compatible Bitmap\n");
        return DD_FALSE;
     }
-  
+
     pbmiData = (UCHAR *)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, bmiSize);
     pbmi = (BITMAPINFO*)pbmiData;
 
@@ -159,7 +159,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
        free(mpModeInfos);
        DeleteDC(hdc);
        DeleteObject(hbmp);
-          printf("Fail to Alloc  pbmiData\n"); 
+          printf("Fail to Alloc  pbmiData\n");
        return DDERR_UNSUPPORTED;
     }
 
@@ -180,32 +180,32 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
 
     HeapFree(GetProcessHeap(), 0, pbmiData);
 
-    /* 
-      prepare start up the DX Draw HAL interface now 
+    /*
+      prepare start up the DX Draw HAL interface now
     */
-   
+
     memset(&mDDrawGlobal, 0, sizeof(DDRAWI_DIRECTDRAW_GBL));
     memset(&mHALInfo,     0, sizeof(DDHALINFO));
     memset(&mCallbacks,   0, sizeof(DDHAL_CALLBACKS));
-       
-    /* 
-      Startup DX HAL step one of three 
+
+    /*
+      Startup DX HAL step one of three
     */
     if (!DdCreateDirectDrawObject(&mDDrawGlobal, hdc))
     {
-       HeapFree(GetProcessHeap(), 0, mpModeInfos);       
+       HeapFree(GetProcessHeap(), 0, mpModeInfos);
        DeleteDC(hdc);
        DeleteObject(hbmp);
-          printf("Fail to Create Direct DrawObject\n"); 
+          printf("Fail to Create Direct DrawObject\n");
        return DD_FALSE;
     }
 
        mDDrawGlobal.dwRefCnt = 1; //addref / remove ref
 
-    // Do not relase HDC it have been map in kernel mode 
+    // Do not relase HDC it have been map in kernel mode
     // DeleteDC(hdc);
-  
-    /* we need reanable it if screen res have changes, and some bad drv need be reanble very few 
+
+    /* we need reanable it if screen res have changes, and some bad drv need be reanble very few
           to contiune */
        /*
     if (!DdReenableDirectDrawObject(&mDDrawGlobal, &newmode))
@@ -215,11 +215,11 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
       DeleteObject(hbmp);
       return DD_FALSE;
     }*/
-  
+
     /*
-      Setup the DirectDraw Local 
+      Setup the DirectDraw Local
     */
-  
+
     mDDrawLocal.lpDDCB = &mCallbacks;
     mDDrawLocal.lpGbl = &mDDrawGlobal;
     mDDrawLocal.dwProcessId = GetCurrentProcessId();
@@ -228,16 +228,16 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     mDDrawGlobal.lpExclusiveOwner = &mDDrawLocal;
        //mDDrawLocal.dwLocalFlags = DDRAWILCL_DIRECTDRAW7;
 
-       
+
     /*
-       Startup DX HAL step two of three 
+       Startup DX HAL step two of three
     */
 
     if (!DdQueryDirectDrawObject(&mDDrawGlobal,
                                  &mHALInfo,
                                  &mCallbacks.HALDD,
                                  &mCallbacks.HALDDSurface,
-                                 &mCallbacks.HALDDPalette, 
+                                 &mCallbacks.HALDDPalette,
                                  &mD3dCallbacks,
                                  &mD3dDriverData,
                                  &mD3dBufferCallbacks,
@@ -255,12 +255,12 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     mcvmList = mHALInfo.vmiData.dwNumHeaps;
     mpvmList = (VIDMEM*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(VIDMEM) * mcvmList);
     if (mpvmList == NULL)
-    {      
+    {
       HeapFree(GetProcessHeap(), 0, mpModeInfos);
       DeleteDC(hdc);
       DeleteObject(hbmp);
       // FIXME Close DX fristcall and second call
-         printf("Fail to QueryDirect Draw Object frist pass\n"); 
+         printf("Fail to QueryDirect Draw Object frist pass\n");
       return DD_FALSE;
     }
 
@@ -279,14 +279,14 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     mcTextures = mD3dDriverData.dwNumTextureFormats;
     mpTextures = (DDSURFACEDESC*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DDSURFACEDESC) * mcTextures);
     if (mpTextures == NULL)
-    {      
+    {
       HeapFree(GetProcessHeap(), 0, mpFourCC);
       HeapFree(GetProcessHeap(), 0, mpvmList);
       HeapFree(GetProcessHeap(), 0, mpModeInfos);
       DeleteDC(hdc);
       DeleteObject(hbmp);
       // FIXME Close DX fristcall and second call
-         printf("Fail QueryDirect Draw Object to Alloc mpTextures \n"); 
+         printf("Fail QueryDirect Draw Object to Alloc mpTextures \n");
       return DD_FALSE;
     }
 
@@ -299,14 +299,14 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
                                     &mHALInfo,
                                     &mCallbacks.HALDD,
                                     &mCallbacks.HALDDSurface,
-                                    &mCallbacks.HALDDPalette, 
+                                    &mCallbacks.HALDDPalette,
                                     &mD3dCallbacks,
                                     &mD3dDriverData,
                                     &mCallbacks.HALDDExeBuf,
                                     mpTextures,
                                     mpFourCC,
                                     mpvmList))
-  
+
     {
       HeapFree(GetProcessHeap(), 0, mpTextures);
       HeapFree(GetProcessHeap(), 0, mpFourCC);
@@ -314,7 +314,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
       HeapFree(GetProcessHeap(), 0, mpModeInfos);
       DeleteDC(hdc);
       DeleteObject(hbmp);
-         printf("Fail to QueryDirect Draw Object second pass\n"); 
+         printf("Fail to QueryDirect Draw Object second pass\n");
       return DD_FALSE;
     }
 
@@ -322,7 +322,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
       Copy over from HalInfo to DirectDrawGlobal
    */
 
-  // this is wrong, cDriverName need be in ASC code not UNICODE 
+  // this is wrong, cDriverName need be in ASC code not UNICODE
   //memcpy(mDDrawGlobal.cDriverName, mDisplayAdapter, sizeof(wchar)*MAX_DRIVER_NAME);
 
   memcpy(&mDDrawGlobal.vmiData, &mHALInfo.vmiData,sizeof(VIDMEMINFO));
@@ -336,11 +336,11 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   mDDrawGlobal.dwModeIndex        = mHALInfo.dwModeIndex;
   mDDrawGlobal.dwNumModes         = mHALInfo.dwNumModes;
   mDDrawGlobal.lpModeInfo         = mHALInfo.lpModeInfo;
-  mDDrawGlobal.hInstance          = mHALInfo.hInstance;    
-  
+  mDDrawGlobal.hInstance          = mHALInfo.hInstance;
+
   mDDrawGlobal.lp16DD = &mDDrawGlobal;
 
-  
+
 
   /* Hal insate is down now */
 
@@ -358,7 +358,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   /* cleare surface ends now */
 
   /* create primare surface now */
-  
+
    memset(&mddsdPrimary,   0, sizeof(DDSURFACEDESC));
    mddsdPrimary.dwSize      = sizeof(DDSURFACEDESC);
    mddsdPrimary.dwFlags     = DDSD_CAPS;
@@ -369,16 +369,16 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
    mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
    mDdCanCreateSurface.bIsDifferentPixelFormat = FALSE; //isDifferentPixelFormat;
    mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdPrimary; // pDDSD;
-      
-   if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED) 
+
+   if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
    {
-     printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED\n"); 
+     printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED\n");
      return DDERR_NOTINITIALIZED;
    }
 
    if (mDdCanCreateSurface.ddRVal != DD_OK)
    {
-          printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal)); 
+          printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
        return DDERR_NOTINITIALIZED;
    }
 
@@ -393,7 +393,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   memset(&mPrimaryMore,   0, sizeof(DDRAWI_DDRAWSURFACE_MORE));
   mPrimaryMore.dwSize = sizeof(DDRAWI_DDRAWSURFACE_MORE);
 
-   
+
   //mPrimaryMore. = mpr
 
   memset(&mPrimaryLocal,  0, sizeof(DDRAWI_DDRAWSURFACE_LCL));
@@ -407,7 +407,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
 
   DDHAL_CREATESURFACEDATA      mDdCreateSurface;
   mDdCreateSurface.lpDD = &mDDrawGlobal;
-  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;  
+  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
   mDdCreateSurface.lpDDSurfaceDesc = &mddsdPrimary;//pDDSD;
   mDdCreateSurface.lplpSList = mpPrimaryLocals; //cSurfaces;
   mDdCreateSurface.dwSCnt = 1 ;  //ppSurfaces;
@@ -417,11 +417,11 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
     printf("Fail to mDdCreateSurface  DDHAL_DRIVER_NOTHANDLED \n");
        return DDERR_NOTINITIALIZED;
   }
-  
 
-  if (mDdCreateSurface.ddRVal != DD_OK) 
-  {   
-    printf("Fail to mDdCanCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal)); 
+
+  if (mDdCreateSurface.ddRVal != DD_OK)
+  {
+    printf("Fail to mDdCanCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
     return mDdCreateSurface.ddRVal;
   }
 
@@ -429,7 +429,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   memset(&mPrimaryClipperGlobal, 0, sizeof(DDRAWI_DDRAWCLIPPER_GBL));
   mPrimaryClipperGlobal.dwFlags = DDRAWICLIP_ISINITIALIZED;
   mPrimaryClipperGlobal.dwProcessId = GetCurrentProcessId();
-  //mPrimaryClipperGlobal.hWnd = (ULONG_PTR)hwnd; 
+  //mPrimaryClipperGlobal.hWnd = (ULONG_PTR)hwnd;
   mPrimaryClipperGlobal.hWnd = (ULONG_PTR)GetDesktopWindow();
   mPrimaryClipperGlobal.lpDD = &mDDrawGlobal;
   mPrimaryClipperGlobal.lpStaticClipList = NULL;
@@ -447,12 +447,12 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   //mPrimaryMore.lpDDIClipper = &mPrimaryClipperInterface;
 
   mDdBlt.lpDDDestSurface = mpPrimaryLocals[0];
-  
-  
+
+
   /* create primare surface is down now */
 
   /* create overlay surface now */
-  
+
   memset(&mddsdOverlay, 0, sizeof(DDSURFACEDESC));
   mddsdOverlay.dwSize = sizeof(DDSURFACEDESC);
   mddsdOverlay.dwFlags = DDSD_CAPS | DDSD_PIXELFORMAT | DDSD_BACKBUFFERCOUNT | DDSD_WIDTH | DDSD_HEIGHT;
@@ -464,32 +464,32 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   mddsdOverlay.dwBackBufferCount = 1; //cBuffers;
 
   mddsdOverlay.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
-  mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB; 
+  mddsdOverlay.ddpfPixelFormat.dwFlags = DDPF_RGB;
   mddsdOverlay.ddpfPixelFormat.dwRGBBitCount = 32;
-  
+
 
    //DDHAL_CANCREATESURFACEDATA   mDdCanCreateSurface;
    mDdCanCreateSurface.lpDD = &mDDrawGlobal;
    mDdCanCreateSurface.CanCreateSurface = mCallbacks.HALDD.CanCreateSurface;
    mDdCanCreateSurface.bIsDifferentPixelFormat = TRUE; //isDifferentPixelFormat;
    mDdCanCreateSurface.lpDDSurfaceDesc = &mddsdOverlay; // pDDSD;
-   
-   
-   if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED) 
+
+
+   if (mHALInfo.lpDDCallbacks->CanCreateSurface(&mDdCanCreateSurface)== DDHAL_DRIVER_NOTHANDLED)
    {
     // derr(L"DirectDrawImpl[%08x]::__createPrimary Cannot create primary [%08x]", this, rv);
-          
-        printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED \n"); 
+
+        printf("Fail to mDdCanCreateSurface DDHAL_DRIVER_NOTHANDLED \n");
     return DDERR_NOTINITIALIZED;
    }
 
    if (mDdCanCreateSurface.ddRVal != DD_OK)
    {
-        printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal)); 
+        printf("Fail to mDdCanCreateSurface mDdCanCreateSurface.ddRVal = %d:%s\n",(int)mDdCanCreateSurface.ddRVal,DDErrorString(mDdCanCreateSurface.ddRVal));
      return DDERR_NOTINITIALIZED;
    }
 
+
   memset(&mOverlayGlobal, 0, sizeof(DDRAWI_DDRAWSURFACE_GBL));
   mOverlayGlobal.dwGlobalFlags = 0;
   mOverlayGlobal.lpDD       = &mDDrawGlobal;
@@ -514,7 +514,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
       (DDRAWISURF_IMPLICITROOT|DDRAWISURF_FRONTBUFFER):
       (DDRAWISURF_IMPLICITCREATE|DDRAWISURF_BACKBUFFER);
 
-    mOverlayLocal[i].dwFlags |= 
+    mOverlayLocal[i].dwFlags |=
       DDRAWISURF_ATTACHED|DDRAWISURF_ATTACHED_FROM|
       DDRAWISURF_HASPIXELFORMAT|
       DDRAWISURF_HASOVERLAYDATA;
@@ -527,26 +527,26 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   {
     j = (i + 1) % cSurfaces;
 
-       
-    /*if (!mHALInfo.lpDDSurfaceCallbacks->AddAttachedSurface(mpOverlayLocals[i], mpOverlayLocals[j])) 
+
+    /*if (!mHALInfo.lpDDSurfaceCallbacks->AddAttachedSurface(mpOverlayLocals[i], mpOverlayLocals[j]))
        {
      // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j);
       return DD_FALSE;
     }*/
 
-       if (!DdAttachSurface(mpOverlayLocals[i], mpOverlayLocals[j])) 
+       if (!DdAttachSurface(mpOverlayLocals[i], mpOverlayLocals[j]))
        {
      // derr(L"DirectDrawImpl[%08x]::__setupDevice DdAttachSurface(%d, %d) failed", this, i, j);
                printf("Fail to DdAttachSurface (%d:%d)\n", i, j);
       return DD_FALSE;
     }
-       
+
   }
 
 
   // DDHAL_CREATESURFACEDATA      mDdCreateSurface;
   mDdCreateSurface.lpDD = &mDDrawGlobal;
-  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;  
+  mDdCreateSurface.CreateSurface = mCallbacks.HALDD.CreateSurface;
   mDdCreateSurface.lpDDSurfaceDesc = &mddsdOverlay;//pDDSD;
   mDdCreateSurface.lplpSList = mpOverlayLocals; //cSurfaces;
   mDdCreateSurface.dwSCnt = 1 ;  //ppSurfaces;
@@ -556,11 +556,11 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
        printf("Fail to mDdCreateSurface = DDHAL_DRIVER_HANDLED\n");
        return DDERR_NOTINITIALIZED;
   }
-  
 
-  if (mDdCreateSurface.ddRVal != DD_OK) 
-  {   
-        printf("Fail to mDdCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal)); 
+
+  if (mDdCreateSurface.ddRVal != DD_OK)
+  {
+        printf("Fail to mDdCreateSurface mDdCreateSurface.ddRVal = %d:%s\n",(int)mDdCreateSurface.ddRVal,DDErrorString(mDdCreateSurface.ddRVal));
      return mDdCreateSurface.ddRVal;
   }
 
@@ -577,7 +577,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   copyRect(&mDdUpdateOverlay.rDest, pdst);
   copyRect(&mDdUpdateOverlay.rSrc, psrc);
 */
-  
+
   mDdUpdateOverlay.rDest.top = 0;
   mDdUpdateOverlay.rDest.left = 0;
   mDdUpdateOverlay.rDest.right = 50;
@@ -588,63 +588,63 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
   mDdUpdateOverlay.rSrc.right = 50;
   mDdUpdateOverlay.rSrc.bottom = 50;
 
+
+
 
   if ( mDdUpdateOverlay.UpdateOverlay(&mDdUpdateOverlay) == DDHAL_DRIVER_NOTHANDLED)
   {
         printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
         return DDERR_NOTINITIALIZED;
   }
-  
 
-  if (mDdUpdateOverlay.ddRVal != DD_OK) 
-  {   
-         printf("Fail to mDdUpdateOverlay mDdUpdateOverlay.ddRVal = %d:%s\n",(int)mDdUpdateOverlay.ddRVal,DDErrorString(mDdUpdateOverlay.ddRVal)); 
+
+  if (mDdUpdateOverlay.ddRVal != DD_OK)
+  {
+         printf("Fail to mDdUpdateOverlay mDdUpdateOverlay.ddRVal = %d:%s\n",(int)mDdUpdateOverlay.ddRVal,DDErrorString(mDdUpdateOverlay.ddRVal));
       return mDdUpdateOverlay.ddRVal;
   }
+
   /* blt */
-    
+
 
   DDRAWI_DDRAWSURFACE_LCL *pDDSurface = mpPrimaryLocals[0];
 
-  if (!DdResetVisrgn(pDDSurface, NULL)) 
+  if (!DdResetVisrgn(pDDSurface, NULL))
   {
    // derr(L"DirectDrawImpl[%08x]::_clear DdResetVisrgn failed", this);
   }
 
-   
+
   memset(&mDdBlt, 0, sizeof(DDHAL_BLTDATA));
   memset(&mDdBlt.bltFX, 0, sizeof(DDBLTFX));
   mDdBlt.bltFX.dwSize = sizeof(DDBLTFX);
 
   mDdBlt.lpDD = &mDDrawGlobal;
-  mDdBlt.Blt = mCallbacks.HALDDSurface.Blt; 
+  mDdBlt.Blt = mCallbacks.HALDDSurface.Blt;
   mDdBlt.lpDDDestSurface = mpPrimaryLocals[0];
-       
+
   mpPrimaryLocals[0]->hDC = (ULONG_PTR)GetDC(GetDesktopWindow());
   mDdBlt.rDest.top = 50;
   mDdBlt.rDest.bottom = 100;
   mDdBlt.rDest.left = 0;
   mDdBlt.rDest.right = 100;
   mDdBlt.lpDDSrcSurface = NULL;
-  mDdBlt.IsClipped = FALSE;    
+  mDdBlt.IsClipped = FALSE;
   mDdBlt.bltFX.dwFillColor = 0xFFFF00;
   mDdBlt.dwFlags = DDBLT_COLORFILL | DDBLT_WAIT;
  // mDdBlt.IsClipped = TRUE;
-    
+
     if (mDdBlt.Blt(&mDdBlt) != DDHAL_DRIVER_HANDLED)
        {
       printf("Fail to mDdBlt = DDHAL_DRIVER_HANDLED\n");
          return DDHAL_DRIVER_HANDLED;
     }
 
-       
 
-    if (mDdBlt.ddRVal!=DD_OK) 
-       {      
-               printf("Fail to mDdBlt mDdBlt.ddRVal = %d:%s\n",(int)mDdBlt.ddRVal,DDErrorString(mDdBlt.ddRVal)); 
+
+    if (mDdBlt.ddRVal!=DD_OK)
+       {
+               printf("Fail to mDdBlt mDdBlt.ddRVal = %d:%s\n",(int)mDdBlt.ddRVal,DDErrorString(mDdBlt.ddRVal));
                return mDdBlt.ddRVal;
     }
 
index db46e69..f431388 100644 (file)
@@ -28,71 +28,71 @@ extern   DDRAWI_DIRECTDRAW_GBL mDDrawGlobal;
 
 
 
-BOOL (APIENTRY *DdCreateDirectDrawObject) ( 
+BOOL (APIENTRY *DdCreateDirectDrawObject) (
     LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
     HDC hdc
 );
 
-BOOL (APIENTRY *DdQueryDirectDrawObject) ( 
+BOOL (APIENTRY *DdQueryDirectDrawObject) (
     LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
     LPDDHALINFO pHalInfo,
     LPDDHAL_DDCALLBACKS pDDCallbacks,
     LPDDHAL_DDSURFACECALLBACKS pDDSurfaceCallbacks,
     LPDDHAL_DDPALETTECALLBACKS pDDPaletteCallbacks,
-    LPD3DHAL_CALLBACKS pD3dCallbacks, 
-    LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData, 
+    LPD3DHAL_CALLBACKS pD3dCallbacks,
+    LPD3DHAL_GLOBALDRIVERDATA pD3dDriverData,
     LPDDHAL_DDEXEBUFCALLBACKS pD3dBufferCallbacks,
     LPDDSURFACEDESC pD3dTextureFormats,
     LPDWORD pdwFourCC,
     LPVIDMEM pvmList
 );
 
-BOOL 
-APIENTRY 
-DdDeleteDirectDrawObject( 
+BOOL
+APIENTRY
+DdDeleteDirectDrawObject(
     LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal
 );
 
-BOOL 
-APIENTRY 
-DdCreateSurfaceObject( 
+BOOL
+APIENTRY
+DdCreateSurfaceObject(
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
     BOOL bPrimarySurface
 );
 
-BOOL 
-APIENTRY 
-DdDeleteSurfaceObject( 
+BOOL
+APIENTRY
+DdDeleteSurfaceObject(
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
 );
 
-//BOOL 
-//APIENTRY 
-//DdResetVisrgn( 
+//BOOL
+//APIENTRY
+//DdResetVisrgn(
 //    LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
 //    HWND hWnd
 //);
-BOOL (APIENTRY *DdResetVisrgn) ( 
+BOOL (APIENTRY *DdResetVisrgn) (
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
     HWND hWnd
 );
 
-HDC 
-APIENTRY 
-DdGetDC( 
+HDC
+APIENTRY
+DdGetDC(
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
     LPPALETTEENTRY pColorTable
 );
 
-BOOL 
-APIENTRY 
-DdReleaseDC( 
+BOOL
+APIENTRY
+DdReleaseDC(
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal
 );
 
-HBITMAP 
-APIENTRY 
-DdCreateDIBSection( 
+HBITMAP
+APIENTRY
+DdCreateDIBSection(
     HDC hdc,
     CONST BITMAPINFO *pbmi,
     UINT iUsage,
@@ -101,62 +101,62 @@ DdCreateDIBSection(
     DWORD dwOffset
 );
 
-BOOL 
-APIENTRY 
-DdReenableDirectDrawObject( 
+BOOL
+APIENTRY
+DdReenableDirectDrawObject(
     LPDDRAWI_DIRECTDRAW_GBL pDirectDrawGlobal,
     BOOL *pbNewMode
 );
 
-//BOOL 
-//APIENTRY 
-//DdAttachSurface( 
+//BOOL
+//APIENTRY
+//DdAttachSurface(
 //    LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
 //    LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
 //);
 
-BOOL (APIENTRY *DdAttachSurface) ( 
+BOOL (APIENTRY *DdAttachSurface) (
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceFrom,
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceTo
 );
 
-VOID 
-APIENTRY 
-DdUnattachSurface( 
+VOID
+APIENTRY
+DdUnattachSurface(
     LPDDRAWI_DDRAWSURFACE_LCL pSurface,
     LPDDRAWI_DDRAWSURFACE_LCL pSurfaceAttached
 );
 
-ULONG 
-APIENTRY 
+ULONG
+APIENTRY
 DdQueryDisplaySettingsUniqueness(VOID);
 
-HANDLE 
-APIENTRY 
-DdGetDxHandle( 
+HANDLE
+APIENTRY
+DdGetDxHandle(
     LPDDRAWI_DIRECTDRAW_LCL pDDraw,
     LPDDRAWI_DDRAWSURFACE_LCL pSurface,
     BOOL bRelease
 );
 
-BOOL 
-APIENTRY 
-DdSetGammaRamp( 
+BOOL
+APIENTRY
+DdSetGammaRamp(
     LPDDRAWI_DIRECTDRAW_LCL pDDraw,
     HDC hdc,
     LPVOID lpGammaRamp
 );
 
-DWORD 
-APIENTRY 
-DdSwapTextureHandles( 
+DWORD
+APIENTRY
+DdSwapTextureHandles(
     LPDDRAWI_DIRECTDRAW_LCL pDDraw,
     LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl1,
     LPDDRAWI_DDRAWSURFACE_LCL pDDSLcl2
 );
 
 char* DDErrorString (HRESULT hr)
-{ 
+{
        switch (hr)
        {
                case DD_OK:                                                              return "DD_OK";
@@ -261,7 +261,7 @@ char* DDErrorString (HRESULT hr)
                case DDERR_NOTPAGELOCKED:                return "DDERR_NOTPAGELOCKED";
                case DDERR_NOTINITIALIZED:               return "DDERR_NOTINITIALIZED";
        }
-       
+
        return "Unknown Error ";
 }
 
index 510d0b1..acb83c8 100644 (file)
@@ -5,7 +5,7 @@
  * PROJECT:         ReactOS diskspeed.exe
  * FILE:            apps/tests/diskspeed/diskspeed.c
  * PURPOSE:         Determines disk transfer rates
- * PROGRAMMER:      
+ * PROGRAMMER:
  */
 
 #include <stdio.h>
index ae55f09..e7d9b4b 100644 (file)
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
@@ -29,18 +29,18 @@ const int ID_LISTBOX = 101;
 
 HINSTANCE hInst;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, 
+LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
    LPARAM lParam);
 
 
-int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, 
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
    int nCmdShow)
 {
    hInst = hInstance;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_VREDRAW | CS_HREDRAW;
    wc.lpszClassName = WndClassName;
    wc.lpfnWndProc = MainWndProc;
@@ -52,17 +52,17 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
 
    if (RegisterClass(&wc))
    {
-      HWND hWnd = 
+      HWND hWnd =
          CreateWindow(
             WndClassName, TEXT("Font Enumeration Demo"),
-            WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | 
+            WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION |
             WS_VISIBLE | WS_CLIPCHILDREN,
             CW_USEDEFAULT, CW_USEDEFAULT, 295, 285,
             NULL, NULL, hInst, NULL
             );
 
       if (hWnd)
-      {                                 
+      {
          ShowWindow(hWnd, nCmdShow);
          UpdateWindow(hWnd);
 
@@ -71,10 +71,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
-    return 0;                                                               
+    return 0;
 }
 //-------------------------------------------------------------------------
 
@@ -87,78 +87,78 @@ int CALLBACK MyEnumFontFamExProc(ENUMLOGFONTEX *lpelfe,
       // if the typeface name is not already in the list
       LPARAM name = reinterpret_cast<LPARAM>(lpelfe->elfFullName);
       if (SNDMSG(hListBox, LB_FINDSTRINGEXACT, (ULONG)-1, name) == LB_ERR)
-      {                 
-         // add each font to the list box    
+      {
+         // add each font to the list box
          int index = SNDMSG(hListBox, LB_ADDSTRING, 0, name);
-   
+
          // fix the size of the font
          lpelfe->elfLogFont.lfHeight = -20;
          lpelfe->elfLogFont.lfWidth = 0;
-   
+
          // create a new font and store its handle
          // as the data of the newly added item
          HFONT hFont = CreateFontIndirect(&lpelfe->elfLogFont);
-         SNDMSG(hListBox, LB_SETITEMDATA, index, 
+         SNDMSG(hListBox, LB_SETITEMDATA, index,
                 reinterpret_cast<LPARAM>(hFont));
       }
    }
-   return TRUE;   
+   return TRUE;
 }
 //-------------------------------------------------------------------------
 
 
 void AddScreenFonts()
 {
-   // grab a handle to the screen's DC    
-   HDC hScreenDC = GetDC(NULL);    
-   try    
-   {  
-      // 
+   // grab a handle to the screen's DC
+   HDC hScreenDC = GetDC(NULL);
+   try
+   {
+      //
       // NOTE: Windows 95, 98 and Me requires that the lpLogfont
-      // (second) parameter of the EnumFontFamiliesEx function is 
+      // (second) parameter of the EnumFontFamiliesEx function is
       // non-NULL.  This parameter can be NULL on Windows NT/2000.
-      //      
+      //
       LOGFONT lf = {0};
       lf.lfCharSet = DEFAULT_CHARSET;
 
-      // enumerate the current screen fonts        
+      // enumerate the current screen fonts
       EnumFontFamiliesEx(
-         hScreenDC, &lf, 
+         hScreenDC, &lf,
          (FONTENUMPROC)MyEnumFontFamExProc,
          0, 0
-         );                         
-   }    
-   catch (...)    
-   {        
-      // release the screen's DC        
-      ReleaseDC(NULL, hScreenDC);    
-   }    
-   // release the screen's DC        
+         );
+   }
+   catch (...)
+   {
+      // release the screen's DC
+      ReleaseDC(NULL, hScreenDC);
+   }
+   // release the screen's DC
    ReleaseDC(NULL, hScreenDC);
 }
 //-------------------------------------------------------------------------
 
 
-LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, 
+LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
    LPARAM lParam)
 {
    switch (msg)
    {
       case WM_CREATE:
-      {  
-         hListBox = 
+      {
+         hListBox =
             CreateWindowEx(
                WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""),
-               WS_CHILD | WS_VISIBLE | LBS_STANDARD | 
-               LBS_HASSTRINGS | LBS_OWNERDRAWFIXED, 
-               20, 10, 250, 250, 
+               WS_CHILD | WS_VISIBLE | LBS_STANDARD |
+               LBS_HASSTRINGS | LBS_OWNERDRAWFIXED,
+               20, 10, 250, 250,
                hWnd, reinterpret_cast<HMENU>(ID_LISTBOX),
                hInst, NULL
-               );    
+               );
          if (hListBox)
          {
             AddScreenFonts();
-         }         
+         }
       }
       case WM_MEASUREITEM:
       {
@@ -193,14 +193,14 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
             // if the item is currently selected
             if (lpdis->itemState & ODS_SELECTED)
             {
-               // set the text color to white and 
+               // set the text color to white and
                // the background color to black
                COLORREF clrWhite = PALETTERGB(255, 255, 255);
                OldColor = SetTextColor(lpdis->hDC, clrWhite);
                stock = BLACK_BRUSH;
             }
             FillRect(
-               lpdis->hDC, &lpdis->rcItem, 
+               lpdis->hDC, &lpdis->rcItem,
                static_cast<HBRUSH>(GetStockObject(stock))
                );
 
@@ -209,7 +209,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
                // extract the item's text
                char text[MAX_PATH];
                SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID,
-                      reinterpret_cast<LPARAM>(text)); 
+                      reinterpret_cast<LPARAM>(text));
 
                // extract the corresponding font handle
                DWORD value =
@@ -228,11 +228,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
                // render the text
                RECT RText = lpdis->rcItem;
                InflateRect(&RText, -2, -2);
-               DrawText(lpdis->hDC, text, strlen(text), &RText, 
+               DrawText(lpdis->hDC, text, strlen(text), &RText,
                         DT_LEFT | DT_VCENTER | DT_SINGLELINE);
 
                // restore the previous font
-               SelectObject(lpdis->hDC, HOldFont);            
+               SelectObject(lpdis->hDC, HOldFont);
             }
 
             // render the focus rectangle
@@ -251,13 +251,13 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
       }
       case WM_DESTROY:
       {
-         // delete each created font object    
+         // delete each created font object
          int count = SNDMSG(hListBox, LB_GETCOUNT, 0, 0);
          for (int index = 0; index < count; ++index)
          {
             DWORD value = SNDMSG(hListBox, LB_GETITEMDATA, index, 0);
             DeleteObject(reinterpret_cast<HFONT>(value));
-         }         
+         }
 
          PostQuitMessage(0);
          break;
index e442060..8d67a7c 100644 (file)
@@ -30,7 +30,7 @@ PVOID GlobalBufferPool, GlobalPacketPool;
 
 char hwaddr[6] = { 0x08, 0x00, 0x20, 0x0b, 0xb7, 0xbb };
 
-char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 0x08, 0x00 };
 
@@ -70,7 +70,7 @@ void receive_complete( void *context, NTSTATUS status, unsigned long count ) {
 class SocketObject {
 public:
     virtual ~SocketObject() { }
-    virtual int send( char *buf, int len, int *bytes, 
+    virtual int send( char *buf, int len, int *bytes,
                      struct sockaddr_in *si ) = 0;
     virtual int recv( char *buf, int len, int *bytes,
                      struct sockaddr_in *si ) = 0;
@@ -88,7 +88,7 @@ UINT TdiAddressSizeFromType( UINT AddressType ) {
 
 NTSTATUS TdiBuildNullConnectionInfoInPlace
 ( PTDI_CONNECTION_INFORMATION ConnInfo,
-  ULONG Type ) 
+  ULONG Type )
 /*
  * FUNCTION: Builds a NULL TDI connection information structure
  * ARGUMENTS:
@@ -99,7 +99,7 @@ NTSTATUS TdiBuildNullConnectionInfoInPlace
  */
 {
   ULONG TdiAddressSize;
-  
+
   TdiAddressSize = TdiAddressSizeFromType(Type);
 
   RtlZeroMemory(ConnInfo,
@@ -119,7 +119,7 @@ NTSTATUS TdiBuildNullConnectionInfo
 /*
  * FUNCTION: Builds a NULL TDI connection information structure
  * ARGUMENTS:
- *     ConnectionInfo = Address of buffer pointer to allocate connection 
+ *     ConnectionInfo = Address of buffer pointer to allocate connection
  *                      information in
  *     Type           = TDI style address type (TDI_ADDRESS_TYPE_XXX).
  * RETURNS:
@@ -129,7 +129,7 @@ NTSTATUS TdiBuildNullConnectionInfo
   PTDI_CONNECTION_INFORMATION ConnInfo;
   ULONG TdiAddressSize;
   NTSTATUS Status;
-  
+
   TdiAddressSize = TdiAddressSizeFromType(Type);
 
   ConnInfo = (PTDI_CONNECTION_INFORMATION)
@@ -141,7 +141,7 @@ NTSTATUS TdiBuildNullConnectionInfo
 
   Status = TdiBuildNullConnectionInfoInPlace( ConnInfo, Type );
 
-  if (!NT_SUCCESS(Status)) 
+  if (!NT_SUCCESS(Status))
       ExFreePool( ConnInfo );
   else
       *ConnectionInfo = ConnInfo;
@@ -164,11 +164,11 @@ TdiBuildConnectionInfoInPlace
 ( PTDI_CONNECTION_INFORMATION ConnectionInfo,
   PTA_ADDRESS Address ) {
     NTSTATUS Status = STATUS_SUCCESS;
-    
+
     RtlCopyMemory( ConnectionInfo->RemoteAddress,
-                  Address, 
+                  Address,
                   ConnectionInfo->RemoteAddressLength );
-    
+
     return Status;
 }
 
@@ -178,10 +178,10 @@ TdiBuildConnectionInfo
   PTA_ADDRESS Address ) {
   NTSTATUS Status = TdiBuildNullConnectionInfo( ConnectionInfo,
                                                Address->AddressType );
-  
+
   if( NT_SUCCESS(Status) )
       TdiBuildConnectionInfoInPlace( *ConnectionInfo, Address );
-  
+
   return Status;
 }
 
@@ -200,10 +200,10 @@ public:
        TdiBuildConnectionInfo( &ConnInfo, (PTA_ADDRESS)&ConnectTo );
 
        Connection = TCPAllocateConnectionEndpoint( NULL );
-       *status = TCPSocket( Connection, 
+       *status = TCPSocket( Connection,
                             AF_INET,
                             SOCK_STREAM, IPPROTO_TCP );
-       if( !*status ) 
+       if( !*status )
            *status = TCPConnect( Connection,
                                  ConnInfo,
                                  NULL,
@@ -220,7 +220,7 @@ public:
        NTSTATUS Status = STATUS_UNSUCCESSFUL;
 
        if( Connection )
-           Status = TCPSendData( Connection, 
+           Status = TCPSendData( Connection,
                                  buf,
                                  len,
                                  (PULONG)bytes,
@@ -232,7 +232,7 @@ public:
        NTSTATUS Status = STATUS_UNSUCCESSFUL;
 
        if( Connection )
-           Status = TCPSendData( Connection, 
+           Status = TCPSendData( Connection,
                                  buf,
                                  len,
                                  (PULONG)bytes,
@@ -244,9 +244,9 @@ private:
     PCONNECTION_ENDPOINT Connection;
 };
 
-VOID SendPacket( PVOID Context, 
-                PNDIS_PACKET NdisPacket, 
-                UINT Offset, 
+VOID SendPacket( PVOID Context,
+                PNDIS_PACKET NdisPacket,
+                UINT Offset,
                 PVOID LinkAddress,
                 USHORT Type ) {
     PCHAR DataOut;
@@ -254,9 +254,9 @@ VOID SendPacket( PVOID Context,
     UINT Size;
     std::string output_packet;
 
-    printf( "Sending packet: %02x:%02x:%02x:%02x:%02x:%02x\n", 
+    printf( "Sending packet: %02x:%02x:%02x:%02x:%02x:%02x\n",
            Addr[0], Addr[1], Addr[2], Addr[3], Addr[4], Addr[5] );
-    
+
     GetDataPtr( NdisPacket, Offset, &DataOut, &Size );
     for( int off = 0; off < Size; off += 16 ) {
        display_row( DataOut, off, Size );
@@ -298,7 +298,7 @@ int main( int argc, char **argv ) {
     SocketObject *S = NULL;
 
     RtlInitUnicodeString
-       ( &RegistryUnicodePath, 
+       ( &RegistryUnicodePath,
          L"\\SYSTEM\\CurrentControlSet\\Services"
          L"\\Tcpip" );
 
@@ -316,7 +316,7 @@ int main( int argc, char **argv ) {
     BindInfo.Address = (PUCHAR)hwaddr;
     BindInfo.AddressLength = sizeof(hwaddr);
     BindInfo.Transmit = SendPacket;
-    
+
     IPCreateInterface( &BindInfo );
 
     asock = socket( AF_INET, SOCK_DGRAM, 0 );
@@ -327,32 +327,32 @@ int main( int argc, char **argv ) {
        printf( "Bind error\n" );
        return 0;
     }
-    
+
     while( true ) {
        FD_ZERO( &readf );
        FD_SET( asock, &readf );
-       tv.tv_sec = 0; 
+       tv.tv_sec = 0;
        tv.tv_usec = 10000;
        selret = select( asock + 1, &readf, NULL, NULL, &tv );
-       
+
        if( FD_ISSET( asock, &readf ) ) {
            fromsize = sizeof( addr_from );
            dgrecv = recvfrom( asock, datagram, sizeof(datagram), 0,
                               (struct sockaddr *)&addr_from, &fromsize );
-           
+
            if( datagram[0] == 'C' && datagram[1] == 'M' &&
                datagram[2] == 'D' && datagram[3] == ' ' ) {
                int theport, bytes, recvret, off, bytin;
                struct sockaddr_in nam;
                std::string faddr, word;
-               std::istringstream 
+               std::istringstream
                    cmdin( std::string( datagram + 4, dgrecv - 4 ) );
-               
+
                cmdin >> word;
-               
+
 /* UDP Section */
                if( word == "udpsocket" ) {
-/* TCP Section */              
+/* TCP Section */
                } else if( word == "tcpsocket" ) {
                    cmdin >> host >> port;
                    S = new TCPSocketObject( host, port, &Status );
@@ -385,23 +385,23 @@ int main( int argc, char **argv ) {
                        *dst++ = c;
                    }
                    *dst = '\0';
-                   if( S ) 
+                   if( S )
                        err = S->send( p, strlen(p), &bytes, NULL );
                    if( err > 0 ) { bytin = err; err = 0; }
-                   
-                   if( err ) 
-                       fprintf ( stderr, "OskitTCPConnect: error %d\n", 
+
+                   if( err )
+                       fprintf ( stderr, "OskitTCPConnect: error %d\n",
                                  err );
                    else {
                        printf ( "wrote %d bytes\n", bytin );
-                   }               
+                   }
                } else if( word == "send" ) {
                    off = 0;
                    while( cmdin >> word ) {
-                       datagram[off++] = 
+                       datagram[off++] =
                            atoi( (std::string("0x") + word).c_str() );
                    }
-                   
+
                    if( (err = S->send( datagram, off, &bytin, NULL )) != 0 ) {
                        fprintf( stderr, "OskitTCPConnect: error %d\n", err );
                    } else {
@@ -409,21 +409,21 @@ int main( int argc, char **argv ) {
                    }
                } else if( word == "recv" ) {
                    cmdin >> bytes;
-                   
-                   if( (err = S->recv( datagram, 
+
+                   if( (err = S->recv( datagram,
                                        sizeof(datagram),
-                                       &bytes, 
+                                       &bytes,
                                        NULL )) != 0 ) {
                        fprintf( stderr, "OskitTCPRecv: error %d\n", err );
                    }
-                   
+
 /* Misc section */
                } else if( word == "end" ) {
                    return 0;
                }
            } else if( dgrecv > 14 ) {
                addr_to = addr_from;
-               
+
                if( datagram[12] == 8 && datagram[13] == 6 ) {
                    /* Answer arp query */
                    char laddr[4];
@@ -439,11 +439,11 @@ int main( int argc, char **argv ) {
                    memcpy( datagram + 38, laddr, 4 );
                    /* Set reply opcode */
                    datagram[21] = 2;
-                   
+
                    err = sendto( asock, datagram, dgrecv, 0,
-                                 (struct sockaddr *)&addr_to, 
+                                 (struct sockaddr *)&addr_to,
                                  sizeof(addr_to) );
-                   
+
                    if( err != 0 )
                        printf( "sendto: %d\n", err );
                } else {
@@ -457,20 +457,20 @@ int main( int argc, char **argv ) {
                }
            }
        }
-       
+
        IPTimeout(NULL, NULL, NULL, NULL);
-       
+
        for( i = output_packets.begin(); i != output_packets.end(); i++ ) {
-           err = sendto( asock, i->c_str(), i->size(), 0, 
+           err = sendto( asock, i->c_str(), i->size(), 0,
                          (struct sockaddr *)&addr_to, sizeof(addr_to) );
-           
+
            fprintf( stderr, "** SENDING PACKET %d bytes **\n", i->size() );
-           
+
            if( err != 0 )
                printf( "sendto: %d\n", err );
        }
-       
+
        output_packets.clear();
     }
 }
-    
+
index 5a02cc3..6b678a2 100644 (file)
@@ -93,10 +93,10 @@ int main( int argc, char **argv ) {
                           NULL,
                           0,
                           0 );
-    
+
     RtlInitUnicodeString( &LanDevice, L"\\Device\\Lan" );
 
-    InitializeObjectAttributes( &Attributes, 
+    InitializeObjectAttributes( &Attributes,
                                &LanDevice,
                                OBJ_CASE_INSENSITIVE,
                                NULL,
@@ -106,9 +106,9 @@ int main( int argc, char **argv ) {
     LAN_FILL_EA_INFO(EaBuffer,sizeof(TypesToListen)/sizeof(USHORT),
                     TypesToListen);
 
-    Status = ZwCreateFile( &LanFile, 
-                          SYNCHRONIZE | GENERIC_READ | GENERIC_WRITE | 
-                          GENERIC_EXECUTE, 
+    Status = ZwCreateFile( &LanFile,
+                          SYNCHRONIZE | GENERIC_READ | GENERIC_WRITE |
+                          GENERIC_EXECUTE,
                           &Attributes,
                           &Iosb,
                           NULL,
@@ -123,7 +123,7 @@ int main( int argc, char **argv ) {
        cerr << "Could not open lan device " << Status << "\n";
        return 1;
     }
-    
+
     Status = DeviceIoControl( LanFile,
                              IOCTL_IF_BUFFERED_MODE,
                              &On,
@@ -132,7 +132,7 @@ int main( int argc, char **argv ) {
                              0,
                              &PktLen,
                              NULL );
-    
+
     if( !Status ) {
        cerr << "Could not turn on buffered mode " << Status << "\n";
        return 1;
@@ -153,7 +153,7 @@ int main( int argc, char **argv ) {
                                      NULL );
 
            cout << "EnumAdapters: " << Status << "\n";
-           if( Status ) 
+           if( Status )
                display_buffer( Packet, PktLen );
        } else if( word == "query" ) {
            cin >> PktLen;
@@ -166,18 +166,18 @@ int main( int argc, char **argv ) {
                                      sizeof(Packet),
                                      &PktLen,
                                      NULL );
-           
+
            cout << "QueryAdapterInfo: " << Status << "\n";
            if( Status )
                display_buffer( Packet, PktLen );
        } else if( word == "send" ) {
-           cin >> Hdr->Fixed.Adapter 
-               >> Hdr->Fixed.AddressType 
-               >> Hdr->Fixed.AddressLen 
+           cin >> Hdr->Fixed.Adapter
+               >> Hdr->Fixed.AddressType
+               >> Hdr->Fixed.AddressLen
                >> Hdr->Fixed.PacketType;
            Hdr->Fixed.Mdl = NULL;
            PktLen = byte_till_end( Packet, Hdr->Address - (PCHAR)Hdr );
-           Status = NtWriteFile( LanFile, 
+           Status = NtWriteFile( LanFile,
                                  NULL,
                                  NULL,
                                  NULL,
@@ -203,7 +203,7 @@ int main( int argc, char **argv ) {
            if( Status == STATUS_PENDING ) {
                LARGE_INTEGER Timeout = { 0 };
                Status = NtWaitForSingleObject( Event, 1, &Timeout );
-           } 
+           }
 
            ReadLen = Iosb.Information;
 
index 1e86bff..59077fd 100644 (file)
@@ -100,7 +100,7 @@ int main( int argc, char **argv ) {
           CloseHandle(pi.hProcess);
       return 6;
     }
-       
+
     if (pi.hProcess != INVALID_HANDLE_VALUE)
         CloseHandle(pi.hProcess);
 
index 310a893..e409b76 100644 (file)
@@ -2,7 +2,7 @@
 #include <reactos/resource.h>
 #include "resource.h"
 
-IDR_MAINMENU MENU DISCARDABLE 
+IDR_MAINMENU MENU DISCARDABLE
 BEGIN
     POPUP "&File"
     BEGIN
index 46f1906..2070bdd 100644 (file)
@@ -2,7 +2,7 @@
 //#include <reactos/resource.h>
 #include "resource.h"
 
-IDR_MAINMENU MENU DISCARDABLE 
+IDR_MAINMENU MENU DISCARDABLE
 BEGIN
     POPUP "&File"
     BEGIN
index 8760ef9..e1985a4 100644 (file)
@@ -41,7 +41,7 @@ extern "C" int is_stack_ptr ( const void* p )
 }
 
 int TCPSocketState(void *ClientData,
-                  void *WhichSocket, 
+                  void *WhichSocket,
                   void *WhichConnection,
                   OSK_UINT NewState ) {
     PCONNECTION_ENDPOINT Connection = (PCONNECTION_ENDPOINT)WhichConnection;
@@ -54,22 +54,22 @@ int TCPSocketState(void *ClientData,
        return 0;
     }
 
-    if( (NewState & SEL_CONNECT) && 
+    if( (NewState & SEL_CONNECT) &&
        !(Connection->State & SEL_CONNECT) ) {
     } else if( (NewState & SEL_READ) || (NewState & SEL_FIN) ) {
-    } 
+    }
 
     return 0;
 }
 
 #define STRINGIFY(x) #x
 
-char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+char hdr[14] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 0x08, 0x00 };
 
 int TCPPacketSend(void *ClientData, OSK_PCHAR data, OSK_UINT len ) {
-    output_packets.push_back( std::string( hdr, 14 ) + 
+    output_packets.push_back( std::string( hdr, 14 ) +
                              std::string( (char *)data, (int)len ) );
     return 0;
 }
@@ -79,14 +79,14 @@ struct ifaddr *TCPFindInterface( void *ClientData,
                                 OSK_UINT FindType,
                                 struct sockaddr *ReqAddr ) {
     static struct sockaddr_in ifa = { AF_INET }, nm = { AF_INET };
-    static struct ifaddr a = { 
-       (struct sockaddr *)&ifa, 
-       NULL, 
-       (struct sockaddr *)&nm, 
-       0, 
-       0, 
-       1, 
-       1500 
+    static struct ifaddr a = {
+       (struct sockaddr *)&ifa,
+       NULL,
+       (struct sockaddr *)&nm,
+       0,
+       0,
+       1,
+       1500
     };
     ifa.sin_addr.s_addr = inet_addr( "10.10.2.115" );
     nm.sin_addr.s_addr  = inet_addr( "255.255.255.0" );
@@ -110,7 +110,7 @@ int TCPSleep( void *ClientData, void *token, int priority, char *msg,
              int tmio ) {
 #if 0
     PSLEEPING_THREAD SleepingThread;
-    
+
     TI_DbgPrint(MID_TRACE,
                ("Called TSLEEP: tok = %x, pri = %d, wmesg = %s, tmio = %x\n",
                 token, priority, msg, tmio));
@@ -222,7 +222,7 @@ int main( int argc, char **argv ) {
     while( true ) {
        FD_ZERO( &readf );
        FD_SET( asock, &readf );
-       tv.tv_sec = 0; 
+       tv.tv_sec = 0;
        tv.tv_usec = 10000;
        selret = select( asock + 1, &readf, NULL, NULL, &tv );
 
@@ -236,11 +236,11 @@ int main( int argc, char **argv ) {
                int theport, bytes, /*recvret,*/ off, bytin;
                struct sockaddr_in nam;
                std::string faddr, word;
-               std::istringstream 
+               std::istringstream
                    cmdin( std::string( datagram + 4, dgrecv - 4 ) );
-               
+
                cmdin >> word;
-               
+
                if( word == "socket" ) {
                    cmdin >> faddr >> theport;
 
@@ -248,18 +248,18 @@ int main( int argc, char **argv ) {
                    nam.sin_addr.s_addr = inet_addr(faddr.c_str());
                    nam.sin_port = htons(theport);
 
-                   if( (err = OskitTCPSocket( NULL, &conn, AF_INET, 
+                   if( (err = OskitTCPSocket( NULL, &conn, AF_INET,
                                              SOCK_STREAM, 0 )) != 0 ) {
                        fprintf( stderr, "OskitTCPSocket: error %d\n", err );
                    }
-                   
-                   if( (err = OskitTCPConnect( conn, NULL, &nam, 
+
+                   if( (err = OskitTCPConnect( conn, NULL, &nam,
                                                sizeof(nam) )) != 0 ) {
                        fprintf( stderr, "OskitTCPConnect: error %d\n", err );
                    } else {
                        printf( "Socket created\n" );
                    }
-               } 
+               }
 
                /* The rest of the commands apply only to an open socket */
                if( !conn ) continue;
@@ -267,7 +267,7 @@ int main( int argc, char **argv ) {
                if( word == "recv" ) {
                    cmdin >> bytes;
 
-                   if( (err = OskitTCPRecv( conn, (OSK_PCHAR)datagram, 
+                   if( (err = OskitTCPRecv( conn, (OSK_PCHAR)datagram,
                                             sizeof(datagram),
                                             (unsigned int *)&bytin, 0 )) != 0 ) {
                        fprintf( stderr, "OskitTCPRecv: error %d\n", err );
@@ -311,12 +311,12 @@ int main( int argc, char **argv ) {
                } else if( word == "send" ) {
                    off = 0;
                    while( cmdin >> word ) {
-                       datagram[off++] = 
+                       datagram[off++] =
                            atoi( (std::string("0x") + word).c_str() );
                    }
-                   
-                   if( (err = OskitTCPSend( conn, (OSK_PCHAR)datagram, 
-                                            off, (OSK_UINT *)&bytin, 0 )) 
+
+                   if( (err = OskitTCPSend( conn, (OSK_PCHAR)datagram,
+                                            off, (OSK_UINT *)&bytin, 0 ))
                        != 0 ) {
                        fprintf( stderr, "OskitTCPConnect: error %d\n", err );
                    } else {
@@ -346,9 +346,9 @@ int main( int argc, char **argv ) {
                    datagram[21] = 2;
 
                    err = sendto( asock, datagram, dgrecv, 0,
-                                 (struct sockaddr *)&addr_to, 
+                                 (struct sockaddr *)&addr_to,
                                  sizeof(addr_to) );
-                   
+
                    if( err != 0 )
                        printf( "sendto: %d\n", err );
                } else {
@@ -356,7 +356,7 @@ int main( int argc, char **argv ) {
                    memcpy( hdr + 6, datagram, 6 );
                    memcpy( hdr + 12, datagram + 12, 2 );
                    OskitTCPReceiveDatagram
-                       ( (unsigned char *)datagram + 14, 
+                       ( (unsigned char *)datagram + 14,
                          dgrecv - 14, 20 );
                }
            }
@@ -365,7 +365,7 @@ int main( int argc, char **argv ) {
        TimerOskitTCP();
 
        for( i = output_packets.begin(); i != output_packets.end(); i++ ) {
-           err = sendto( asock, i->c_str(), i->size(), 0, 
+           err = sendto( asock, i->c_str(), i->size(), 0,
                          (struct sockaddr *)&addr_to, sizeof(addr_to) );
 
            fprintf( stderr, "** SENDING PACKET %d bytes **\n", i->size() );
@@ -377,4 +377,4 @@ int main( int argc, char **argv ) {
        output_packets.clear();
     }
 }
-    
+
index 84c5d7b..86d4e76 100644 (file)
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
 
 HINSTANCE HInst;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam);
 
 
-int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE, LPTSTR, 
+int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE, LPTSTR,
    int nCmdShow)
 {
    HInst = HInstance;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_VREDRAW | CS_HREDRAW;
    wc.lpszClassName = WndClassName;
    wc.lpfnWndProc = MainWndProc;
@@ -41,14 +41,14 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE, LPTSTR,
 
    if (RegisterClass(&wc))
    {
-      HWND HWnd = 
-         CreateWindow(WndClassName, 
+      HWND HWnd =
+         CreateWindow(WndClassName,
                       TEXT("PatBlt Tracking Rect Demo"),
-                      WS_OVERLAPPEDWINDOW | WS_CAPTION | 
+                      WS_OVERLAPPEDWINDOW | WS_CAPTION |
                       WS_VISIBLE | WS_CLIPCHILDREN,
                       CW_USEDEFAULT, CW_USEDEFAULT, 640, 480,
                       NULL, NULL, HInst, NULL);
-                                 
+
       if (HWnd)
       {
          ShowWindow(HWnd, nCmdShow);
@@ -59,7 +59,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE, LPTSTR,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
     return 0;
@@ -101,31 +101,31 @@ void RenderTrackingRect(IN HDC HDestDC, IN const RECT& RRender)
    const DWORD dwROP3 = DSTINVERT; // experiment with others
 
    // render top bar
-   PatBlt(HDestDC, 
-          RRender.left, RRender.top, 
-          width, line_width, 
+   PatBlt(HDestDC,
+          RRender.left, RRender.top,
+          width, line_width,
           dwROP3);
    // render bottom bar
-   PatBlt(HDestDC, 
-          RRender.left, RRender.bottom - line_width, 
-          width, line_width, 
+   PatBlt(HDestDC,
+          RRender.left, RRender.bottom - line_width,
+          width, line_width,
           dwROP3);
    // render left bar
-   PatBlt(HDestDC, 
-          RRender.left, RRender.top + line_width, 
-          line_width, height - (2 * line_width), 
+   PatBlt(HDestDC,
+          RRender.left, RRender.top + line_width,
+          line_width, height - (2 * line_width),
           dwROP3);
    // render right bar
-   PatBlt(HDestDC, 
-          RRender.right - line_width, RRender.top + line_width, 
-          line_width, height - (2 * line_width), 
+   PatBlt(HDestDC,
+          RRender.right - line_width, RRender.top + line_width,
+          line_width, height - (2 * line_width),
           dwROP3);
 
 }
 //------------------------------------------------------------------
 
 
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam)
 {
    switch (Msg)
@@ -138,15 +138,15 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          {
             // load the penguin bitmap
             HBITMAP HBmp = static_cast<HBITMAP>(
-               LoadImage(HInst, filename, IMAGE_BITMAP, 0, 0, 
+               LoadImage(HInst, filename, IMAGE_BITMAP, 0, 0,
                          LR_LOADFROMFILE | LR_DEFAULTSIZE)
-               );         
+               );
             if (HBmp)
             {
                // get the bitmap's dimensions
                BITMAP bmp;
                if (GetObject(HBmp, sizeof(BITMAP), &bmp))
-               {  
+               {
                   RImage.right += bmp.bmWidth;
                   RImage.bottom += bmp.bmHeight;
 
@@ -166,9 +166,9 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          PMouse.y = HIWORD(LParam);
 
          RECT RClient;
-         if (PtInRect(&RImage, PMouse) && 
+         if (PtInRect(&RImage, PMouse) &&
              GetClientRect(HWnd, &RClient))
-         {   
+         {
             MapRect(HWnd, HWND_DESKTOP, RClient);
             ClipCursor(&RClient);
 
@@ -178,23 +178,23 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
             HRGN HClipRgn = CreateRectRgnIndirect(&RClient);
             SelectClipRgn(HScreenDC, HClipRgn);
             DeleteObject(HClipRgn);
-            
+
             CopyRect(&RTrack, &RImage);
-            MapRect(HWnd, HWND_DESKTOP, RTrack);                  
+            MapRect(HWnd, HWND_DESKTOP, RTrack);
 
             // render the first tracking rect
             RenderTrackingRect(HScreenDC, RTrack);
             is_tracking = true;
-         }                                       
+         }
          break;
       }
       case WM_MOUSEMOVE:
       {
          if (HScreenDC && is_tracking)
-         {  
-            POINT PCurrent = {LOWORD(LParam), HIWORD(LParam)};       
+         {
+            POINT PCurrent = {LOWORD(LParam), HIWORD(LParam)};
             const int dX = PCurrent.x - PMouse.x;
-            const int dY = PCurrent.y - PMouse.y; 
+            const int dY = PCurrent.y - PMouse.y;
 
             // erase the previous rectangle
             RenderTrackingRect(HScreenDC, RTrack);
@@ -227,12 +227,12 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          break;
       }
       case WM_PAINT:
-      {  
+      {
          PAINTSTRUCT ps;
          HDC Hdc = BeginPaint(HWnd, &ps);
          try
          {
-            // 
+            //
             // TODO: Add palette support...
             //
 
@@ -240,7 +240,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
             BitBlt(Hdc, RImage.left, RImage.top,
                    RImage.right - RImage.left,
                    RImage.bottom - RImage.top,
-                   HMemDC, 0, 0, 
+                   HMemDC, 0, 0,
                    SRCCOPY);
          }
          catch (...)
@@ -249,11 +249,11 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          }
          EndPaint(HWnd, &ps);
          break;
-      }      
+      }
       case WM_DESTROY:
       {
          // clean up
-         if (HOldBmp) 
+         if (HOldBmp)
          {
             DeleteObject(SelectObject(HMemDC, HOldBmp));
          }
index 8a440cf..c05293f 100644 (file)
@@ -315,10 +315,10 @@ POLYGONFILL_MakeEdge(POINT From, POINT To)
 ** lines will become active first when scanning from
 ** top (min y) to bottom (max y).
 **
-** Return Value Meaning 
-** Negative integer element1 < element2 
-** Zero element1 = element2 
-** Positive integer element1 > element2 
+** Return Value Meaning
+** Negative integer element1 < element2
+** Zero element1 = element2
+** Positive integer element1 > element2
 */
 static
 INT
@@ -427,7 +427,7 @@ fail:
 
 
 /*
-** This slow routine uses the data stored in the edge list to 
+** This slow routine uses the data stored in the edge list to
 ** calculate the x intercepts for each line in the edge list
 ** for scanline Scanline.
 **TODO: Get rid of this floating point arithmetic
@@ -664,14 +664,14 @@ POLYGONFILL_FillScanLineWinding(
                RopMode); // MIX
 }
 
-//When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and 
-//even-numbered polygon sides on each scan line. That is, GDI fills the area between the 
-//first and second side, between the third and fourth side, and so on. 
+//When the fill mode is ALTERNATE, GDI fills the area between odd-numbered and
+//even-numbered polygon sides on each scan line. That is, GDI fills the area between the
+//first and second side, between the third and fourth side, and so on.
 
-//WINDING Selects winding mode (fills any region with a nonzero winding value). 
+//WINDING Selects winding mode (fills any region with a nonzero winding value).
 //When the fill mode is WINDING, GDI fills any region that has a nonzero winding value.
 //This value is defined as the number of times a pen used to draw the polygon would go around the region.
-//The direction of each edge of the polygon is important. 
+//The direction of each edge of the polygon is important.
 
 BOOL
 STDCALL
@@ -711,7 +711,7 @@ FillPolygon(
   else /* default */
     FillScanLine = POLYGONFILL_FillScanLineAlternate;
 
-  /* For each Scanline from BoundRect.bottom to BoundRect.top, 
+  /* For each Scanline from BoundRect.bottom to BoundRect.top,
    * determine line segments to draw
    */
   for ( ScanLine = BoundRect.top; ScanLine < BoundRect.bottom; ++ScanLine )
@@ -780,7 +780,7 @@ Polygon ( CONST PPOINT UnsafePoints, int Count, int polyFillMode )
       DestRect.top      = MIN(DestRect.top, Points[CurrentPoint].y);
       DestRect.bottom   = MAX(DestRect.bottom, Points[CurrentPoint].y);
     }
-    
+
   // Draw the Polygon Edges with the current pen
   for (CurrentPoint = 0; CurrentPoint < Count; ++CurrentPoint)
     {
@@ -804,9 +804,9 @@ Polygon ( CONST PPOINT UnsafePoints, int Count, int polyFillMode )
       IntEngLineTo(SurfObj,
                   dc.CombinedClip,
                   OutBrushObj,
-                  From.x, 
-                  From.y, 
-                  To.x, 
+                  From.x,
+                  From.y,
+                  To.x,
                   To.y,
                   &DestRect,
                   EDGE_CHAR); /* MIX */
index edb467a..7ee181d 100644 (file)
@@ -21,7 +21,7 @@ IDM_MAINMENU MENU LOADONCALL MOVEABLE DISCARDABLE
       MENUITEM "&9", 19
     }
     MENUITEM SEPARATOR
-    MENUITEM "&Save\tCtrl+S", 3 
+    MENUITEM "&Save\tCtrl+S", 3
     MENUITEM "Save &as...", 4
     MENUITEM SEPARATOR
     MENUITEM "E&xit\tAlt-F4", IDM_EXIT
index 59e3cf8..650fdfe 100644 (file)
@@ -1,4 +1,4 @@
-                    
+
 // ------------------------------------------------------------------
 // Windows 2000 Graphics API Black Book
 // Chapter 4 - Utility functions
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
@@ -23,7 +23,7 @@ namespace font {
 HFONT MakeFont(
     IN HDC hDestDC,           // handle to target DC
     IN LPCSTR typeface_name,  // font's typeface name
-    IN int point_size,        // font's point size 
+    IN int point_size,        // font's point size
     IN const BYTE charset,    // font's character set
     IN const DWORD style      // font's styles
    )
@@ -38,12 +38,12 @@ HFONT MakeFont(
    int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY);
 
    POINT PSize = {
-      0, 
-      -MulDiv(static_cast<int>(xf.eM22 * point_size + 0.5), 
+      0,
+      -MulDiv(static_cast<int>(xf.eM22 * point_size + 0.5),
               pixels_per_inch, 72)
       };
 
-   HFONT hResult = NULL;      
+   HFONT hResult = NULL;
    if (DPtoLP(hDestDC, &PSize, 1))
    {
       LOGFONT lf;
index 1a34999..df61756 100644 (file)
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
 
 HINSTANCE hInst;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam);
 
 
-int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, 
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
    int nCmdShow)
 {
    hInst = hInstance;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_VREDRAW | CS_HREDRAW;
    wc.lpszClassName = WndClassName;
    wc.lpfnWndProc = MainWndProc;
@@ -45,15 +45,15 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
 
    if (RegisterClass(&wc))
    {
-      HWND hWnd = 
+      HWND hWnd =
          CreateWindow(
             WndClassName, TEXT("Output Primitives Demo"),
-            WS_OVERLAPPEDWINDOW | WS_CAPTION | 
+            WS_OVERLAPPEDWINDOW | WS_CAPTION |
             WS_VISIBLE | WS_CLIPCHILDREN,
             CW_USEDEFAULT, CW_USEDEFAULT, 640, 480,
             NULL, NULL, hInst, NULL
             );
-                                 
+
       if (hWnd)
       {
          ShowWindow(hWnd, nCmdShow);
@@ -64,10 +64,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
-    return 0;                                                               
+    return 0;
 }
 //------------------------------------------------------------------
 
@@ -77,7 +77,7 @@ enum OutPrimitive {
    opEllipse, opArc, opPie, opChord, opCustom
    };
 
-void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive, 
+void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
    IN OutPrimitive PrimitiveID)
 {
    RECT R = RPrimitive;
@@ -98,8 +98,8 @@ void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
             {(R.right - R.left) / 2, R.top},
             {(R.right - R.left) / 2, R.bottom},
             {R.right, R.bottom}
-            };         
-         PolyBezier(hDC, PControlPoints, 4);         
+            };
+         PolyBezier(hDC, PControlPoints, 4);
          break;
       }
       case opRectangle:
@@ -122,8 +122,8 @@ void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
          const POINT PRads[] = {
             {(R.right - R.left) / 3 + R.left, R.top},
             {(R.right - R.left) / 3 + R.left, R.bottom}
-            };         
-         Arc(hDC, R.left, R.top, R.right, R.bottom, 
+            };
+         Arc(hDC, R.left, R.top, R.right, R.bottom,
              PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
          break;
       }
@@ -132,8 +132,8 @@ void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
          const POINT PRads[] = {
             {(R.right - R.left) / 3 + R.left, R.top},
             {(R.right - R.left) / 3 + R.left, R.bottom}
-            };         
-         Pie(hDC, R.left, R.top, R.right, R.bottom, 
+            };
+         Pie(hDC, R.left, R.top, R.right, R.bottom,
              PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
          break;
       }
@@ -142,8 +142,8 @@ void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
          const POINT PRads[] = {
             {(R.right - R.left) / 3 + R.left, R.top},
             {(R.right - R.left) / 3 + R.left, R.bottom}
-            };         
-         Chord(hDC, R.left, R.top, R.right, R.bottom, 
+            };
+         Chord(hDC, R.left, R.top, R.right, R.bottom,
              PRads[0].x, PRads[0].y, PRads[1].x, PRads[1].y);
          break;
       }
@@ -153,8 +153,8 @@ void DrawPrimitive(IN HDC hDC, IN const RECT& RPrimitive,
             {R.left, (R.bottom - R.top) / 2 + R.top},
             {(R.right - R.left) / 2 + R.left, R.top},
             {R.right, (R.bottom - R.top) / 2 + R.top},
-            {(R.right - R.left) / 2 + R.left, R.bottom}            
-            };         
+            {(R.right - R.left) / 2 + R.left, R.bottom}
+            };
          Polygon(hDC, PVertices, 4);
          break;
       }
@@ -168,20 +168,20 @@ HBRUSH hListBrush = NULL;  // handle to the list box brush
 HPEN hListPen = NULL;      // handle to the list box pen
 HFONT hListFont = NULL;    // handle to the list box font
 
-LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, 
+LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
    LPARAM lParam)
 {
    switch (msg)
    {
       case WM_CREATE:
       {
-         hListBox = 
+         hListBox =
             CreateWindowEx(
-               WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""), 
+               WS_EX_CLIENTEDGE, TEXT("LISTBOX"), TEXT(""),
                WS_CHILD | WS_VISIBLE | WS_VSCROLL |
-               LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | 
-               LBS_OWNERDRAWFIXED, 
-               0, 0, 640, 480, 
+               LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT |
+               LBS_OWNERDRAWFIXED,
+               0, 0, 640, 480,
                hWnd, NULL, hInst, NULL
                );
          assert(hListBox != NULL);
@@ -190,23 +190,23 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
             hListBox, GWL_ID, reinterpret_cast<LONG>(hListBox)
             );
 
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Line")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Bezier Curve")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Rectangle")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Rounded Rectangle")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Ellipse")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Arc")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Pie Slice")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Chord")));
-         SNDMSG(hListBox, LB_ADDSTRING, 0, 
+         SNDMSG(hListBox, LB_ADDSTRING, 0,
                 reinterpret_cast<LPARAM>(TEXT("Custom")));
 
          hListBrush = CreateSolidBrush(PALETTERGB(64, 192, 64));
@@ -218,9 +218,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
          {
             // MakeFont() from Chapter 4
             hListFont = font::MakeFont(
-               hScreenDC, "Impact", 20, ANSI_CHARSET, 
+               hScreenDC, "Impact", 20, ANSI_CHARSET,
                font::FS_BOLD | font::FS_UNDERLINE
-               ); 
+               );
          }
 #if 0
          catch (...)
@@ -234,30 +234,30 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
       }
       case WM_MEASUREITEM:
       {
-         LPMEASUREITEMSTRUCT lpmis = 
+         LPMEASUREITEMSTRUCT lpmis =
             reinterpret_cast<LPMEASUREITEMSTRUCT>(lParam);
          assert(lpmis != NULL);
 
          if (lpmis->CtlID == reinterpret_cast<UINT>(hListBox))
          {
-            lpmis->itemHeight = 150;            
-            return TRUE;         
+            lpmis->itemHeight = 150;
+            return TRUE;
          }
          break;
       }
       case WM_DRAWITEM:
       {
-         LPDRAWITEMSTRUCT lpdis = 
+         LPDRAWITEMSTRUCT lpdis =
             reinterpret_cast<LPDRAWITEMSTRUCT>(lParam);
          assert(lpdis != NULL);
 
          if (lpdis->CtlID == reinterpret_cast<UINT>(hListBox))
-         {            
+         {
             SaveDC(lpdis->hDC);
 #if 0
             try
 #endif
-            {              
+            {
                SelectObject(lpdis->hDC, hListBrush);
                SelectObject(lpdis->hDC, hListPen);
                SelectObject(lpdis->hDC, hListFont);
@@ -280,11 +280,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
                   0.6 * lpdis->rcItem.right + 0.5
                   );
                FillRect(
-                  lpdis->hDC, &RPrimitive, 
+                  lpdis->hDC, &RPrimitive,
                   reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1)
                   );
                DrawPrimitive(
-                  lpdis->hDC, RPrimitive, 
+                  lpdis->hDC, RPrimitive,
                   static_cast<OutPrimitive>(lpdis->itemID)
                   );
                if (selected) InvertRect(lpdis->hDC, &RPrimitive);
@@ -292,24 +292,24 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
 
                // render the text
                TCHAR text[13];
-               if (SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID, 
+               if (SNDMSG(hListBox, LB_GETTEXT, lpdis->itemID,
                           reinterpret_cast<LPARAM>(&text)) != LB_ERR)
-               {           
+               {
                   RECT RText = RPrimitive;
                   RText.left =  RPrimitive.right;
-                  RText.right = lpdis->rcItem.right; 
+                  RText.right = lpdis->rcItem.right;
 
                   SelectObject(lpdis->hDC, hListFont);
                   SetBkMode(lpdis->hDC, TRANSPARENT);
                   SetTextColor(lpdis->hDC, clrText);
-            
-                  DrawText(lpdis->hDC, text, -1, &RText, 
+
+                  DrawText(lpdis->hDC, text, -1, &RText,
                            DT_CENTER | DT_VCENTER | DT_SINGLELINE);
                }
 
                // indicate keyboard focus
                if (lpdis->itemState & ODS_FOCUS)
-               {  
+               {
                   RECT RFocus = lpdis->rcItem;
                   InflateRect(&RFocus, -1, -1);
                   DrawFocusRect(lpdis->hDC, &RFocus);
@@ -330,7 +330,7 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
       {
          MoveWindow(
             hListBox, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE
-            ); 
+            );
          return 0;
       }
       case WM_DESTROY:
index d0a0d37..2a1512e 100644 (file)
@@ -1,6 +1,6 @@
 <module name="readconsole" type="win32cui" installbase="bin" installname="readconsole.exe">
        <define name="UNICODE" />
-       <define name="_UNICODE" />      
+       <define name="_UNICODE" />
        <define name="__USE_W32API" />
        <library>kernel32</library>
        <file>main.c</file>
index dec7dd5..fede8e2 100644 (file)
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
@@ -31,7 +31,7 @@ HINSTANCE HInst;
 HINSTANCE HPrevInst;
 TCHAR *cmdline;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam);
 
 
@@ -44,7 +44,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
    wc.lpfnWndProc = MainWndProc;
    wc.hInstance = HInstance;
@@ -54,63 +54,63 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
 
    if (RegisterClass(&wc))
    {
-      HWND HWnd = 
+      HWND HWnd =
          CreateWindow(WndClassName, TEXT("StretchBlt NonUniform Zooming Demo"),
-                      WS_OVERLAPPEDWINDOW | WS_CAPTION | 
+                      WS_OVERLAPPEDWINDOW | WS_CAPTION |
                       WS_VISIBLE | WS_CLIPSIBLINGS,
                       0, 0, 675, 560,
                       NULL, NULL, HInst, NULL);
-                                 
+
       if (HWnd)
       {
          HListBox =
-            CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "", 
-                           LBS_NOTIFY | WS_CHILD | WS_VISIBLE, 
-                           530, 5, 130, 150, HWnd, 
+            CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "",
+                           LBS_NOTIFY | WS_CHILD | WS_VISIBLE,
+                           530, 5, 130, 150, HWnd,
                            reinterpret_cast<HMENU>(ID_LISTBOX),
                            HInst, NULL);
          VListBox =
-            CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "", 
-                           LBS_NOTIFY | WS_CHILD | WS_VISIBLE, 
-                           530, 5+170, 130, 150, HWnd, 
+            CreateWindowEx(WS_EX_CLIENTEDGE, "LISTBOX", "",
+                           LBS_NOTIFY | WS_CHILD | WS_VISIBLE,
+                           530, 5+170, 130, 150, HWnd,
                            reinterpret_cast<HMENU>(ID_LISTBOX2),
                            HInst, NULL);
 
          if (HListBox && VListBox)
          {
 // horizontal zoom
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 25%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 50%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 75%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 100%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 125%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 150%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 200%"));
-            SNDMSG(HListBox, LB_ADDSTRING, 0, 
+            SNDMSG(HListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 300%"));
 // vertical zoom
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 25%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 50%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 75%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 100%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 125%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 150%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 200%"));
-            SNDMSG(VListBox, LB_ADDSTRING, 0, 
+            SNDMSG(VListBox, LB_ADDSTRING, 0,
                    reinterpret_cast<LPARAM>("Zoom 300%"));
 
          }
@@ -123,7 +123,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
     return 0;
@@ -143,16 +143,16 @@ HBITMAP HOldBmp = NULL;
 float zoom_factor_h = 0.5;
 float zoom_factor_v = 0.5;
 RECT RDest = {5, 5, 0, 0};
-enum {ID_ZOOM25, ID_ZOOM50, ID_ZOOM75, ID_ZOOM100, 
+enum {ID_ZOOM25, ID_ZOOM50, ID_ZOOM75, ID_ZOOM100,
       ID_ZOOM125, ID_ZOOM150, ID_ZOOM200, ID_ZOOM300};
 
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam)
 {
    switch (Msg)
    {
       case WM_CREATE:
-      {         
+      {
                 // check commandline
                 if (strlen(cmdline) != 0)
                 {
@@ -167,13 +167,13 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          if (HMemDC)
          {
             // load a bitmap from file
-            HBITMAP HBmp = 
+            HBITMAP HBmp =
                static_cast<HBITMAP>(
-                  LoadImage(HInst, filename, IMAGE_BITMAP, 
+                  LoadImage(HInst, filename, IMAGE_BITMAP,
                             0, 0, LR_LOADFROMFILE)
-                            );  
+                            );
             if (HBmp)
-            { 
+            {
                // extract dimensions of the bitmap
                GetObject(HBmp, sizeof(BITMAP), &bmp);
 
@@ -188,7 +188,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
                bmInfo.bmiHeader.biXPelsPerMeter = 0;
                bmInfo.bmiHeader.biClrImportant = 0;
                           bmInfo.bmiHeader.biClrUsed = 0;
-               
+
                           // associate the bitmap with the memory DC
                HOldBmp = static_cast<HBITMAP>(
                   SelectObject(HMemDC, HBmp)
@@ -211,11 +211,11 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
                                   fclose(f);
                           }
             }
-         }         
+         }
       }
       case WM_COMMAND:
       {
-         if (WParam == MAKEWPARAM(ID_LISTBOX, LBN_SELCHANGE) || 
+         if (WParam == MAKEWPARAM(ID_LISTBOX, LBN_SELCHANGE) ||
                         WParam == MAKEWPARAM(ID_LISTBOX2, LBN_SELCHANGE))
          {
             switch (SNDMSG(HListBox, LB_GETCURSEL, 0, 0))
@@ -243,15 +243,15 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
             }
 
             // calculate the new width and height
-            const int new_width = 
+            const int new_width =
                static_cast<int>(zoom_factor_h * bmp.bmWidth);
-            const int new_height = 
+            const int new_height =
                static_cast<int>(zoom_factor_v * bmp.bmHeight);
 
             // is zooming in?
             bool zoom_in = (new_width > RDest.right - RDest.left);
 
-            // caculate the area that needs to be updated 
+            // caculate the area that needs to be updated
             RECT RUpdate = {
                RDest.left, RDest.top,
                RDest.left + max(new_width, RDest.right - RDest.left),
@@ -260,20 +260,20 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
 
             // adjust the dimenstions of the
             // destination rectangle
-            RDest.right = RDest.left + new_width;               
-            RDest.bottom = RDest.top + new_height;            
+            RDest.right = RDest.left + new_width;
+            RDest.bottom = RDest.top + new_height;
 
             // create an update region from the XOR combination
             // of the update and destination rectangles
             HRGN HUpdateRgn = CreateRectRgnIndirect(&RUpdate);
             HRGN HDestRgn = CreateRectRgnIndirect(&RDest);
-            int result = 
+            int result =
                CombineRgn(HUpdateRgn, HUpdateRgn, HDestRgn, RGN_XOR);
 
             // incite a repaint
             if (result != NULLREGION && result != ERROR)
-            {              
-               InvalidateRgn(HWnd, HUpdateRgn, true);               
+            {
+               InvalidateRgn(HWnd, HUpdateRgn, true);
                RedrawWindow(HWnd, &RDest, NULL, RDW_NOERASE | RDW_INVALIDATE);
             }
             else if (result == NULLREGION)
@@ -301,36 +301,36 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
                        if (useDIBits)
                        {
                    if (RDest.right - RDest.left > 0)
-                       {                               
+                       {
                                      if (zoom_factor_h < 1.0 || zoom_factor_v < 1.0)
                                          {
                             SetStretchBltMode(Hdc, COLORONCOLOR);
                              }
 
                                  // render the zoomed image
-                                     StretchDIBits(Hdc, RDest.left, RDest.top, 
-                                                       RDest.right - RDest.left, 
+                                     StretchDIBits(Hdc, RDest.left, RDest.top,
+                                                       RDest.right - RDest.left,
                                                            RDest.bottom - RDest.top,
-                                                               0, 0, 
+                                                               0, 0,
                                                                    bmp.bmWidth, bmp.bmHeight,
                                                                        bbits, &bmInfo,
                                                                        DIB_RGB_COLORS,
-                                       SRCCOPY);  
+                                       SRCCOPY);
                        }
                        }
                        else
                        {
                    if (RDest.right - RDest.left > 0)
                        {
-                               
+
                                   // use BitBlt when not zooming
                       if (zoom_factor_h == 1.0 && zoom_factor_v == 1.0)
                           {
-                                 BitBlt(Hdc, RDest.left, RDest.top, 
-                                            RDest.right - RDest.left, 
+                                 BitBlt(Hdc, RDest.left, RDest.top,
+                                            RDest.right - RDest.left,
                                                 RDest.bottom - RDest.top,
-                                                    HMemDC, 0, 0, 
-                                                        SRCCOPY);  
+                                                    HMemDC, 0, 0,
+                                                        SRCCOPY);
                       }
                           else
                               {
@@ -340,17 +340,17 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
                              }
 
                                  // render the zoomed image
-                                     StretchBlt(Hdc, RDest.left, RDest.top, 
-                                                    RDest.right - RDest.left, 
+                                     StretchBlt(Hdc, RDest.left, RDest.top,
+                                                    RDest.right - RDest.left,
                                                         RDest.bottom - RDest.top,
-                                                            HMemDC, 0, 0, 
+                                                            HMemDC, 0, 0,
                                                                 bmp.bmWidth, bmp.bmHeight,
-                                    SRCCOPY);  
+                                    SRCCOPY);
                           }
                        }
                        }
          }
-#if 0           
+#if 0
          catch (...)
 #endif
          {
index 59e3cf8..650fdfe 100644 (file)
@@ -1,4 +1,4 @@
-                    
+
 // ------------------------------------------------------------------
 // Windows 2000 Graphics API Black Book
 // Chapter 4 - Utility functions
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
@@ -23,7 +23,7 @@ namespace font {
 HFONT MakeFont(
     IN HDC hDestDC,           // handle to target DC
     IN LPCSTR typeface_name,  // font's typeface name
-    IN int point_size,        // font's point size 
+    IN int point_size,        // font's point size
     IN const BYTE charset,    // font's character set
     IN const DWORD style      // font's styles
    )
@@ -38,12 +38,12 @@ HFONT MakeFont(
    int pixels_per_inch = GetDeviceCaps(hDestDC, LOGPIXELSY);
 
    POINT PSize = {
-      0, 
-      -MulDiv(static_cast<int>(xf.eM22 * point_size + 0.5), 
+      0,
+      -MulDiv(static_cast<int>(xf.eM22 * point_size + 0.5),
               pixels_per_inch, 72)
       };
 
-   HFONT hResult = NULL;      
+   HFONT hResult = NULL;
    if (DPtoLP(hDestDC, &PSize, 1))
    {
       LOGFONT lf;
index c77216b..8c86dc2 100644 (file)
@@ -6,7 +6,7 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
 
 HINSTANCE hInst;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam);
 
 
-int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR, 
+int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
    int nCmdShow)
 {
    hInst = hInstance;
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_HREDRAW | CS_VREDRAW;
    wc.lpszClassName = WndClassName;
    wc.lpfnWndProc = MainWndProc;
@@ -46,15 +46,15 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
 
    if (RegisterClass(&wc))
    {
-      HWND hWnd = 
+      HWND hWnd =
          CreateWindow(
             WndClassName, TEXT("Scaled Text Demo"),
-            WS_OVERLAPPEDWINDOW | WS_CAPTION | 
+            WS_OVERLAPPEDWINDOW | WS_CAPTION |
             WS_VISIBLE | WS_CLIPCHILDREN,
             CW_USEDEFAULT, CW_USEDEFAULT, 800, 300,
             NULL, NULL, hInst, NULL
             );
-                                 
+
       if (hWnd)
       {
          ShowWindow(hWnd, nCmdShow);
@@ -65,10 +65,10 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE, LPTSTR,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
-    return 0;                                                               
+    return 0;
 }
 //-------------------------------------------------------------------------
 
@@ -78,7 +78,7 @@ HFONT hTTFont = NULL;
 double scale = 0.0;
 LPCSTR pText = TEXT("The Scaled Text!");
 
-LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam, 
+LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
    LPARAM lParam)
 {
    switch (msg)
@@ -91,13 +91,13 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
 
          InitCommonControlsEx(&icx);
 
-         hTrackBar = 
+         hTrackBar =
             CreateWindow(
-               TRACKBAR_CLASS, "", 
-               TBS_HORZ | TBS_BOTH | TBS_AUTOTICKS | 
+               TRACKBAR_CLASS, "",
+               TBS_HORZ | TBS_BOTH | TBS_AUTOTICKS |
                TBS_FIXEDLENGTH | TBS_ENABLESELRANGE |
-               WS_CHILD | WS_VISIBLE, 
-               10, 260, 375, 40, 
+               WS_CHILD | WS_VISIBLE,
+               10, 260, 375, 40,
                hWnd, NULL, hInst, NULL
                );
 
@@ -136,9 +136,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
          break;
       }
       case WM_ERASEBKGND:
-      {  
+      {
          LRESULT res = DefWindowProc(hWnd, msg, wParam, lParam);
-                       
+
          HDC hDC = reinterpret_cast<HDC>(wParam);
          HFONT hOldFont = static_cast<HFONT>(
             SelectObject(hDC, hTTFont)
@@ -182,8 +182,8 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
                            );
                         pPEnds[iPoint].y = static_cast<LONG>(
                            scale * pPEnds[iPoint].y + 0.5
-                           );                           
-                     }  
+                           );
+                     }
 
                      for (iPoint = 0; iPoint < num_points; ++iPoint)
                      {
@@ -227,9 +227,9 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
                   delete [] pPEnds;
                   throw;
                }
-               // clean up 
-               delete [] pTypes; 
-               delete [] pPEnds; 
+               // clean up
+               delete [] pTypes;
+               delete [] pPEnds;
             }
             // ...
          }
@@ -243,11 +243,11 @@ LRESULT CALLBACK MainWndProc(HWND hWnd, UINT msg, WPARAM wParam,
       case WM_SIZE:
       {
          MoveWindow(
-            hTrackBar, 
+            hTrackBar,
             0, HIWORD(lParam) - 40, LOWORD(lParam), 40,
             false
             );
-         break;         
+         break;
       }
       case WM_DESTROY:
       {
index cfc6731..22e2f97 100644 (file)
@@ -242,7 +242,7 @@ static BOOL CALLBACK find_top_window(HWND hwnd, LPARAM lParam)
             return TRUE;
         hwnd=control;
     }
-        
+
     pwindow = (HWND*)lParam;
     *pwindow = hwnd;
     return FALSE;
@@ -298,7 +298,7 @@ static void do_click(HWND window, DWORD down, DWORD up)
             if (dragto_y<window_info.rcWindow.top || dragto_y>=window_info.rcWindow.bottom)
                 dragto_y=(window_info.rcWindow.bottom+window_info.rcWindow.top)/2;
             dragto_y=(dragto_y << 16)/GetSystemMetrics(SM_CYSCREEN);
-       
+
             dx = g_dragto_x - g_x;
             dy = g_dragto_y - g_y;
             step_per_x = dx / 4;
@@ -309,8 +309,8 @@ static void do_click(HWND window, DWORD down, DWORD up)
             x=dragto_x;
             y=dragto_y;
         }
-    } 
-    if (up) 
+    }
+    if (up)
        mouse_event(MOUSEEVENTF_ABSOLUTE | up, x, y, 0, 0);
 }
 
index 6bfa5a3..b964bdf 100644 (file)
@@ -6,19 +6,19 @@
 // Created by Damon Chandler <dmc27@ee.cornell.edu>
 // Updates can be downloaded at: <www.coriolis.com>
 //
-// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu 
+// Please do not hesistate to e-mail me at dmc27@ee.cornell.edu
 // if you have any questions about this code.
 // ------------------------------------------------------------------
 
 //*********************************************************//
-//                                                         // 
+//                                                         //
 // SYNOPSIS:                                               //
 //   This sample project demonstrates how to render        //
 //   a background image in response to the WM_ERASEBKGND   //
 //   message.  It also shows how to create a transparent   //
 //   static (text) control by handling the                 //
 //   WM_CTLCOLORSTATIC message.                            //
-//                                                         // 
+//                                                         //
 //*********************************************************//
 
 
@@ -31,7 +31,7 @@ HINSTANCE HInst;
 HINSTANCE HPrevInst;
 TCHAR *cmdline;
 const char* WndClassName = "GMainWnd";
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam);
 
 
@@ -44,25 +44,25 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
 
    WNDCLASS wc;
    memset(&wc, 0, sizeof(WNDCLASS));
-    
+
    wc.style = CS_VREDRAW | CS_HREDRAW | CS_DBLCLKS;
    wc.lpfnWndProc = MainWndProc;
    wc.hInstance = HInstance;
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
-   wc.hbrBackground = 
+   wc.hbrBackground =
       reinterpret_cast<HBRUSH>(COLOR_BTNFACE + 1);
    wc.lpszClassName = WndClassName;
 
    if (RegisterClass(&wc))
    {
-      HWND HWnd = 
-         CreateWindow(WndClassName, 
+      HWND HWnd =
+         CreateWindow(WndClassName,
                       TEXT("WM_ERASEBKGND Demo"),
-                      WS_OVERLAPPEDWINDOW | WS_CAPTION | 
+                      WS_OVERLAPPEDWINDOW | WS_CAPTION |
                       WS_VISIBLE | WS_CLIPSIBLINGS,
                       CW_USEDEFAULT, CW_USEDEFAULT, 205, 85,
                       NULL, NULL, HInstance, NULL);
-                                 
+
       if (HWnd)
       {
          ShowWindow(HWnd, nCmdShow);
@@ -73,7 +73,7 @@ int APIENTRY WinMain(HINSTANCE HInstance, HINSTANCE HPrevInstance,
          {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
-         }      
+         }
       }
     }
     return 0;
@@ -87,17 +87,17 @@ HDC HMemDC;
 HBITMAP HBmp, HOldBmp;
 const char* filename = "BACKBITMAP.BMP";
 
-LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam, 
+LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
    LPARAM LParam)
 {
    switch (Msg)
    {
       case WM_CREATE:
       {
-         HStatic = 
-            CreateWindow(TEXT("STATIC"), TEXT("Static Text"), 
-                         WS_CHILD | WS_VISIBLE | SS_CENTER, 
-                         10, 20, 175, 30, 
+         HStatic =
+            CreateWindow(TEXT("STATIC"), TEXT("Static Text"),
+                         WS_CHILD | WS_VISIBLE | SS_CENTER,
+                         10, 20, 175, 30,
                          HWnd, NULL, HInst, NULL);
 
          // create a memory DC compatible with the screen
@@ -106,7 +106,7 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
          {
             // load a DDB from file
             HBmp = static_cast<HBITMAP>(
-               LoadImage(HInst, filename, IMAGE_BITMAP, 
+               LoadImage(HInst, filename, IMAGE_BITMAP,
                          0, 0, LR_LOADFROMFILE)
                );
             if (HBmp)
@@ -139,19 +139,19 @@ LRESULT CALLBACK MainWndProc(HWND HWnd, UINT Msg, WPARAM WParam,
             RECT RClient;
             GetClientRect(HWnd, &RClient);
 
-            HDC Hdc = reinterpret_cast<HDC>(WParam); 
+            HDC Hdc = reinterpret_cast<HDC>(WParam);
             SetStretchBltMode(Hdc, COLORONCOLOR);
-            
+
             //
-            // TODO: add palette handling code for 
+            // TODO: add palette handling code for
             // palettized displays (see Chapter 9)...
             //
 
-            // render the background image            
-            StretchBlt(Hdc, 0, 0, 
+            // render the background image
+            StretchBlt(Hdc, 0, 0,
                        RClient.right - RClient.left,
                        RClient.bottom - RClient.top,
-                       HMemDC, 0, 0, bmp.bmWidth, bmp.bmHeight, 
+                       HMemDC, 0, 0, bmp.bmWidth, bmp.bmHeight,
                        SRCCOPY);
             return TRUE;
          }
index 1c0bec9..391795f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  loadlib.c
  *
@@ -91,7 +91,7 @@ const char* appName(const char* argv0)
     const char* name;
 
     name = (const char*)strrchr(argv0, '\\');
-    if (name != NULL) 
+    if (name != NULL)
         return name + 1;
     return argv0;
 }
index 51210d4..c4b4acd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  loadlib.h
  *
index 84d0e1a..e140dc3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  _tfileio.c
  *
@@ -31,8 +31,8 @@
 #define _tfopen      _wfopen
 #define _tunlink     _wunlink
 #define _TEOF        WEOF
-#define _gettchar    getwchar 
-#define _puttchar    putwchar  
+#define _gettchar    getwchar
+#define _puttchar    putwchar
 #define _THEX_FORMAT _T("0x%04x ")
 #else /*UNICODE*/
 #define _tfopen      fopen
index ab29300..dd6659b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  _fileio.c
  *
index 64f5476..3ac8f0a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  main.c
  *
index ee20fbe..df22b72 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  main.h
  *
index 5985a8a..1f8fe37 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  ReactOS test program - 
+ *  ReactOS test program -
  *
  *  wfileio.c
  *
index 8cfb261..5540cfd 100644 (file)
@@ -1,12 +1,12 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
-#include "ctx.h" 
-#define TYPE_FORMAT_STRING_SIZE   23                                
-#define PROC_FORMAT_STRING_SIZE   21                                
-#define TRANSMIT_AS_TABLE_SIZE    0            
-#define WIRE_MARSHAL_TABLE_SIZE   0   
+#include "ctx.h"
+
+#define TYPE_FORMAT_STRING_SIZE   23
+#define PROC_FORMAT_STRING_SIZE   21
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
 
 typedef struct _MIDL_TYPE_FORMAT_STRING
     {
@@ -29,23 +29,23 @@ extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
  *****************************************************************/
 
 
-void m_CtxOpen( 
+void m_CtxOpen(
     /* [out] */ PCTXTYPE __RPC_FAR *pphContext,
     /* [in] */ long Value)
 {
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
 
        char *ctx, *buf;
        int i;
-       
+
        printf("\n*******************************************************************\n");
        printf("**** CtxOpen()                                                  ***\n");
        printf("*******************************************************************\n\n");
-    
+
     if(!pphContext)
         {
         RpcRaiseException(RPC_X_NULL_REF_POINTER);
@@ -57,18 +57,18 @@ void m_CtxOpen(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           0);
-        
-        
+
+
         _Handle = hBinding;
-        
-        
+
+
         _StubMsg.BufferLength = 4U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value;
-        
+
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
 
@@ -77,74 +77,74 @@ void m_CtxOpen(
         for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.RpcMsg->BufferLength; i++)
                printf("0x%x, ", buf[i] & 0x0FF);
         printf("\n\n");
-        
+
         *pphContext = (void *)0;
         NdrClientContextUnmarshall(
                               ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                               ( NDR_CCONTEXT __RPC_FAR * )pphContext,
                               _Handle);
-        
+
         ctx = (char*)*pphContext;
         printf("\nNdrClientContextUnmarshall returned: handle=0x%p\n", ctx);
         printf("00: 0x%x <- obviously pointer to binding handle copyed from _Handle\n", *((int*)ctx));
         ctx+=4;
         printf("04: 0x%x <- unknown field\n", *((int*)ctx));
         printf("08: ");
-        
+
         for(ctx+=4, i = 0; i < 20; i++)
                printf("0x%x,", *(ctx+i) & 0x0FF); printf(" <- ndr 20 bytes\n\n");
-               
+
         printf("Buflen=%d, Buffer: ", _StubMsg.BufferLength);
         for(buf = _StubMsg.BufferStart; buf < _StubMsg.BufferEnd; buf++)
                printf("0x%x,", *buf & 0x0FF);
         printf("\n");
-        
-        
+
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
-void m_CtxOpen2( 
+void m_CtxOpen2(
     /* [out] */ PCTXTYPE __RPC_FAR *pphContext,
     /* [in] */ long Value)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
-    
+
     char buf[255];
-    
+
         NdrClientInitializeNew(
                           ( PRPC_MESSAGE  )&_RpcMessage,
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           0);
-        
-        
+
+
         _Handle = hBinding;
-        
-        
+
+
         _StubMsg.BufferLength = 4U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value;
-        
+
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
-        
+
         *pphContext = (void *)0;
-        
+
         RpcTryExcept
         {
         NdrClientContextUnmarshall(
@@ -157,9 +157,9 @@ void m_CtxOpen2(
                printf("NdrClientContextUnmarshall reported exception = %d\n", RpcExceptionCode());
         }
         RpcEndExcept
-        
-        
-        
+
+
+
         RpcTryExcept
         {
         NdrClientContextUnmarshall(
@@ -172,8 +172,8 @@ void m_CtxOpen2(
                printf("NdrClientContextUnmarshall reported exception = %d\n", RpcExceptionCode());
         }
         RpcEndExcept
-        
-                            
+
+
         RpcTryExcept
         {
         NdrClientContextMarshall(
@@ -186,7 +186,7 @@ void m_CtxOpen2(
                printf("NdrClientContextMarshall reported exception = %d\n", RpcExceptionCode());
         }
         RpcEndExcept
-        
+
         RpcTryExcept
         {
                NDRCContextUnmarshall( NULL, _Handle, buf, _RpcMessage.DataRepresentation  );
@@ -197,29 +197,29 @@ void m_CtxOpen2(
         }
         RpcEndExcept
 
-        
+
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
-    
+
+
 }
 
-void m_CtxHello( 
+void m_CtxHello(
     /* [in] */ PCTXTYPE phContext)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
-    
+
     char *buf;
     int i;
-    
+
        printf("\n*******************************************************************\n");
        printf("**** CtxHello()                                                 ***\n");
        printf("*******************************************************************\n\n");
-    
+
     RpcTryFinally
         {
         NdrClientInitializeNew(
@@ -227,21 +227,21 @@ void m_CtxHello(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           1);
-        
-        
+
+
         if(phContext != 0)
             {
             _Handle = NDRCContextBinding(( NDR_CCONTEXT  )phContext);;
-            
+
             }
         else
             {
             RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
             }
-        
+
         _StubMsg.BufferLength = 20U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         NdrClientContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_CCONTEXT  )phContext,
@@ -250,36 +250,36 @@ void m_CtxHello(
         for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.BufferLength; i++)
                printf("0x%x, ", buf[i] & 0x0FF);
         printf("\n\n");
-        
+
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
 
-void m_CtxClose( 
+void m_CtxClose(
     /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
     char *buf;
     int i;
-       
+
        printf("\n*******************************************************************\n");
        printf("**** CtxClose()                                                 ***\n");
        printf("*******************************************************************\n\n");
-       
+
     if(!pphContext)
         {
         RpcRaiseException(RPC_X_NULL_REF_POINTER);
@@ -291,50 +291,50 @@ void m_CtxClose(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           2);
-        
-        
+
+
         if(*pphContext != 0)
             {
             _Handle = NDRCContextBinding(( NDR_CCONTEXT  )*pphContext);;
-            
+
             }
-        
+
         _StubMsg.BufferLength = 20U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         NdrClientContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_CCONTEXT  )*pphContext,
                             0);
-        
+
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
-        
-        
+
+
       printf("Before NdrClientContextUnmarshall: Buflen=%d\nBuffer: ",  _StubMsg.BufferLength );
         for(buf = _StubMsg.Buffer, i = 0; i < _StubMsg.BufferLength; i++)
                printf("0x%x, ", buf[i] & 0x0FF);
         printf("\n\n");
-        
+
         NdrClientContextUnmarshall(
                               ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                               ( NDR_CCONTEXT __RPC_FAR * )pphContext,
                               _Handle);
-                            
+
+
                printf("\nNdrClientContextUnmarshall returned: handle=0x%p\n", *pphContext);
-               
-        
+
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
 int interactive = 0;
@@ -356,10 +356,10 @@ void main(int argc, char **argv)
        char *pszStringBinding = NULL;
        RPC_BINDING_HANDLE Handle =     0;
        char buffer[255];
-       
+
        int test_num = 0;
        int test_value = 31337;
-       
+
        if(argc<2)
        {
                printf("USAGE: client.exe <test_number> [test_value] [interactive]\n"
@@ -369,24 +369,24 @@ void main(int argc, char **argv)
                        "2. Context rundown routine");
                return;
        }
-       
+
        test_num = atoi(argv[1]);
        if(argc>2) test_value = atoi(argv[2]);
        if(argc>3) interactive = 1;
 
-       status = RpcStringBindingCompose(NULL, 
-               "ncacn_np", 
-               NULL, 
-               "\\pipe\\hello", 
-               NULL, 
+       status = RpcStringBindingCompose(NULL,
+               "ncacn_np",
+               NULL,
+               "\\pipe\\hello",
+               NULL,
                &pszStringBinding);
 
-       if (status) 
+       if (status)
        {
                printf("RpcStringBindingCompose %x\n", status);
                exit(status);
        }
-       
+
        status = RpcBindingFromStringBinding(pszStringBinding, &hBinding);
 
        if (status)
@@ -395,8 +395,8 @@ void main(int argc, char **argv)
                exit(status);
        }
 
-       RpcStringFree(&pszStringBinding); 
-       
+       RpcStringFree(&pszStringBinding);
+
        switch(test_num)
        {
        case 0:
@@ -417,10 +417,10 @@ void main(int argc, char **argv)
                {
                         printf("NDRCContextBinding(NULL) reported exception = %d\n", RpcExceptionCode());
                }
-               RpcEndExcept    
-               
+               RpcEndExcept
+
                m_CtxOpen2(&hContext, test_value);
-               
+
                /////////////////////////////////////////////////////////////////////////////////////////
                RpcTryExcept
                {
@@ -431,7 +431,7 @@ void main(int argc, char **argv)
                {
                         printf("NDRCContextMarshall(NULL) reported exception = %d\n", RpcExceptionCode());
                }
-               RpcEndExcept    
+               RpcEndExcept
                /////////////////////////////////////////////////////////////////////////////////////////
                break;
        case 2:
@@ -450,7 +450,7 @@ void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
 {
        return(malloc(len));
 }
+
 void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
 {
        free(ptr);
index f92edbe..3e6eee2 100644 (file)
@@ -9,8 +9,8 @@
  */
 /* Compiler settings for ctx.idl:
     Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
          __declspec(uuid()), __declspec(selectany), __declspec(novtable)
          DECLSPEC_UUID(), MIDL_INTERFACE()
 */
 #ifndef __ctx_h__
 #define __ctx_h__
 
-/* Forward Declarations */ 
+/* Forward Declarations */
 
 #ifdef __cplusplus
 extern "C"{
-#endif 
+#endif
 
 void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t);
-void __RPC_USER MIDL_user_free( void __RPC_FAR * ); 
+void __RPC_USER MIDL_user_free( void __RPC_FAR * );
 
 #ifndef __hello_INTERFACE_DEFINED__
 #define __hello_INTERFACE_DEFINED__
 
 /* interface hello */
-/* [implicit_handle][version][uuid] */ 
+/* [implicit_handle][version][uuid] */
 
 typedef long CTXTYPE;
 
 typedef /* [context_handle] */ CTXTYPE __RPC_FAR *PCTXTYPE;
 
-void CtxOpen( 
+void CtxOpen(
     /* [out] */ PCTXTYPE __RPC_FAR *pphContext,
     /* [in] */ long Value);
 
-void CtxHello( 
+void CtxHello(
     /* [in] */ PCTXTYPE phContext);
 
-void CtxClose( 
+void CtxClose(
     /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext);
 
 
index 69a8bd3..ae3cbc1 100644 (file)
@@ -9,8 +9,8 @@
  */
 /* Compiler settings for ctx.idl:
     Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
          __declspec(uuid()), __declspec(selectany), __declspec(novtable)
          DECLSPEC_UUID(), MIDL_INTERFACE()
 */
 
 #include "ctx.h"
 
-#define TYPE_FORMAT_STRING_SIZE   23                                
-#define PROC_FORMAT_STRING_SIZE   21                                
-#define TRANSMIT_AS_TABLE_SIZE    0            
-#define WIRE_MARSHAL_TABLE_SIZE   0            
+#define TYPE_FORMAT_STRING_SIZE   23
+#define PROC_FORMAT_STRING_SIZE   21
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
 
 typedef struct _MIDL_TYPE_FORMAT_STRING
     {
@@ -45,7 +45,7 @@ typedef struct _MIDL_PROC_FORMAT_STRING
 extern const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString;
 extern const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString;
 
-#define GENERIC_BINDING_TABLE_SIZE   0            
+#define GENERIC_BINDING_TABLE_SIZE   0
 
 
 /* Standard interface: hello, ver. 1.0,
@@ -73,17 +73,17 @@ extern const MIDL_STUB_DESC hello_StubDesc;
 RPC_BINDING_HANDLE hello__MIDL_AutoBindHandle;
 
 
-void CtxOpen( 
+void CtxOpen(
     /* [out] */ PCTXTYPE __RPC_FAR *pphContext,
     /* [in] */ long Value)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
-    
+
     if(!pphContext)
         {
         RpcRaiseException(RPC_X_NULL_REF_POINTER);
@@ -95,48 +95,48 @@ void CtxOpen(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           0);
-        
-        
+
+
         _Handle = hBinding;
-        
-        
+
+
         _StubMsg.BufferLength = 4U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         *(( long __RPC_FAR * )_StubMsg.Buffer)++ = Value;
-        
+
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
-        
+
         *pphContext = (void *)0;
         NdrClientContextUnmarshall(
                               ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                               ( NDR_CCONTEXT __RPC_FAR * )pphContext,
                               _Handle);
-        
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
 
-void CtxHello( 
+void CtxHello(
     /* [in] */ PCTXTYPE phContext)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
-    
+
     RpcTryFinally
         {
         NdrClientInitializeNew(
@@ -144,48 +144,48 @@ void CtxHello(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           1);
-        
-        
+
+
         if(phContext != 0)
             {
             _Handle = NDRCContextBinding(( NDR_CCONTEXT  )phContext);;
-            
+
             }
         else
             {
             RpcRaiseException(RPC_X_SS_IN_NULL_CONTEXT);
             }
-        
+
         _StubMsg.BufferLength = 20U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         NdrClientContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_CCONTEXT  )phContext,
                             1);
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
 
-void CtxClose( 
+void CtxClose(
     /* [out][in] */ PCTXTYPE __RPC_FAR *pphContext)
 {
 
     RPC_BINDING_HANDLE _Handle =       0;
-    
+
     RPC_MESSAGE _RpcMessage;
-    
+
     MIDL_STUB_MESSAGE _StubMsg;
-    
+
     if(!pphContext)
         {
         RpcRaiseException(RPC_X_NULL_REF_POINTER);
@@ -197,43 +197,43 @@ void CtxClose(
                           ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                           ( PMIDL_STUB_DESC  )&hello_StubDesc,
                           2);
-        
-        
+
+
         if(*pphContext != 0)
             {
             _Handle = NDRCContextBinding(( NDR_CCONTEXT  )*pphContext);;
-            
+
             }
-        
+
         _StubMsg.BufferLength = 20U;
         NdrGetBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg, _StubMsg.BufferLength, _Handle );
-        
+
         NdrClientContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_CCONTEXT  )*pphContext,
                             0);
         NdrSendReceive( (PMIDL_STUB_MESSAGE) &_StubMsg, (unsigned char __RPC_FAR *) _StubMsg.Buffer );
-        
+
         if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
             NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
-        
+
         NdrClientContextUnmarshall(
                               ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                               ( NDR_CCONTEXT __RPC_FAR * )pphContext,
                               _Handle);
-        
+
         }
     RpcFinally
         {
         NdrFreeBuffer( (PMIDL_STUB_MESSAGE) &_StubMsg );
-        
+
         }
     RpcEndFinally
-    
+
 }
 
 
-const MIDL_STUB_DESC hello_StubDesc = 
+const MIDL_STUB_DESC hello_StubDesc =
     {
     (void __RPC_FAR *)& hello___RpcClientInterface,
     MIDL_user_allocate,
@@ -265,7 +265,7 @@ const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
     {
         0,
         {
-                       
+
                        0x51,           /* FC_OUT_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -277,7 +277,7 @@ const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
                        0x8,            /* FC_LONG */
 /*  6 */       0x5b,           /* FC_END */
                        0x5c,           /* FC_PAD */
-/*  8 */       
+/*  8 */
                        0x4d,           /* FC_IN_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -287,7 +287,7 @@ const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
 /* 10 */       NdrFcShort( 0xa ),      /* Type Offset=10 */
 /* 12 */       0x5b,           /* FC_END */
                        0x5c,           /* FC_PAD */
-/* 14 */       
+/* 14 */
                        0x50,           /* FC_IN_OUT_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -307,7 +307,7 @@ const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
         0,
         {
                        NdrFcShort( 0x0 ),      /* 0 */
-/*  2 */       
+/*  2 */
                        0x11, 0x0,      /* FC_RP */
 /*  4 */       NdrFcShort( 0x2 ),      /* Offset= 2 (6) */
 /*  6 */       0x30,           /* FC_BIND_CONTEXT */
@@ -318,7 +318,7 @@ const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
                        0x41,           /* Ctxt flags:  in, can't be null */
 /* 12 */       0x0,            /* 0 */
                        0x0,            /* 0 */
-/* 14 */       
+/* 14 */
                        0x11, 0x0,      /* FC_RP */
 /* 16 */       NdrFcShort( 0x2 ),      /* Offset= 2 (18) */
 /* 18 */       0x30,           /* FC_BIND_CONTEXT */
index 81e610c..2c76871 100644 (file)
@@ -9,8 +9,8 @@
  */
 /* Compiler settings for ctx.idl:
     Os (OptLev=s), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext
-    error checks: allocation ref bounds_check enum stub_data 
-    VC __declspec() decoration level: 
+    error checks: allocation ref bounds_check enum stub_data
+    VC __declspec() decoration level:
          __declspec(uuid()), __declspec(selectany), __declspec(novtable)
          DECLSPEC_UUID(), MIDL_INTERFACE()
 */
 #include <string.h>
 #include "ctx.h"
 
-#define TYPE_FORMAT_STRING_SIZE   23                                
-#define PROC_FORMAT_STRING_SIZE   21                                
-#define TRANSMIT_AS_TABLE_SIZE    0            
-#define WIRE_MARSHAL_TABLE_SIZE   0            
+#define TYPE_FORMAT_STRING_SIZE   23
+#define PROC_FORMAT_STRING_SIZE   21
+#define TRANSMIT_AS_TABLE_SIZE    0
+#define WIRE_MARSHAL_TABLE_SIZE   0
 
 typedef struct _MIDL_TYPE_FORMAT_STRING
     {
@@ -70,13 +70,13 @@ hello_CtxOpen(
     MIDL_STUB_MESSAGE _StubMsg;
     NDR_SCONTEXT pphContext;
     RPC_STATUS _Status;
-    
+
     ((void)(_Status));
     NdrServerInitializeNew(
                           _pRpcMessage,
                           &_StubMsg,
                           &hello_StubDesc);
-    
+
     ( PCTXTYPE __RPC_FAR * )pphContext = 0;
     RpcTryFinally
         {
@@ -84,9 +84,9 @@ hello_CtxOpen(
             {
             if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[0] );
-            
+
             Value = *(( long __RPC_FAR * )_StubMsg.Buffer)++;
-            
+
             if(_StubMsg.Buffer > _StubMsg.BufferEnd)
                 {
                 RpcRaiseException(RPC_X_BAD_STUB_DATA);
@@ -97,33 +97,33 @@ hello_CtxOpen(
             RpcRaiseException(RPC_X_BAD_STUB_DATA);
             }
         RpcEndExcept
-        pphContext = NDRSContextUnmarshall( (char *)0, _pRpcMessage->DataRepresentation ); 
-        
-        
+        pphContext = NDRSContextUnmarshall( (char *)0, _pRpcMessage->DataRepresentation );
+
+
         CtxOpen(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext),Value);
-        
+
         _StubMsg.BufferLength = 20U;
         _pRpcMessage->BufferLength = _StubMsg.BufferLength;
-        
-        _Status = I_RpcGetBuffer( _pRpcMessage ); 
+
+        _Status = I_RpcGetBuffer( _pRpcMessage );
         if ( _Status )
             RpcRaiseException( _Status );
-        
+
         _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
-        
+
         NdrServerContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_SCONTEXT  )pphContext,
                             ( NDR_RUNDOWN  )PCTXTYPE_rundown);
-        
+
         }
     RpcFinally
         {
         }
     RpcEndFinally
-    _pRpcMessage->BufferLength = 
+    _pRpcMessage->BufferLength =
         (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
-    
+
 }
 
 void __RPC_STUB
@@ -133,22 +133,22 @@ hello_CtxHello(
     MIDL_STUB_MESSAGE _StubMsg;
     NDR_SCONTEXT phContext;
     RPC_STATUS _Status;
-    
+
     ((void)(_Status));
     NdrServerInitializeNew(
                           _pRpcMessage,
                           &_StubMsg,
                           &hello_StubDesc);
-    
+
     RpcTryFinally
         {
         RpcTryExcept
             {
             if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[8] );
-            
+
             phContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE  )&_StubMsg);
-            
+
             if(_StubMsg.Buffer > _StubMsg.BufferEnd)
                 {
                 RpcRaiseException(RPC_X_BAD_STUB_DATA);
@@ -159,17 +159,17 @@ hello_CtxHello(
             RpcRaiseException(RPC_X_BAD_STUB_DATA);
             }
         RpcEndExcept
-        
+
         CtxHello(( PCTXTYPE  )*NDRSContextValue(phContext));
-        
+
         }
     RpcFinally
         {
         }
     RpcEndFinally
-    _pRpcMessage->BufferLength = 
+    _pRpcMessage->BufferLength =
         (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
-    
+
 }
 
 void __RPC_STUB
@@ -179,13 +179,13 @@ hello_CtxClose(
     MIDL_STUB_MESSAGE _StubMsg;
     NDR_SCONTEXT pphContext;
     RPC_STATUS _Status;
-    
+
     ((void)(_Status));
     NdrServerInitializeNew(
                           _pRpcMessage,
                           &_StubMsg,
                           &hello_StubDesc);
-    
+
     ( PCTXTYPE __RPC_FAR * )pphContext = 0;
     RpcTryFinally
         {
@@ -193,9 +193,9 @@ hello_CtxClose(
             {
             if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
                 NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDL_ProcFormatString.Format[14] );
-            
+
             pphContext = NdrServerContextUnmarshall(( PMIDL_STUB_MESSAGE  )&_StubMsg);
-            
+
             if(_StubMsg.Buffer > _StubMsg.BufferEnd)
                 {
                 RpcRaiseException(RPC_X_BAD_STUB_DATA);
@@ -206,35 +206,35 @@ hello_CtxClose(
             RpcRaiseException(RPC_X_BAD_STUB_DATA);
             }
         RpcEndExcept
-        
+
         CtxClose(( PCTXTYPE __RPC_FAR * )NDRSContextValue(pphContext));
-        
+
         _StubMsg.BufferLength = 20U;
         _pRpcMessage->BufferLength = _StubMsg.BufferLength;
-        
-        _Status = I_RpcGetBuffer( _pRpcMessage ); 
+
+        _Status = I_RpcGetBuffer( _pRpcMessage );
         if ( _Status )
             RpcRaiseException( _Status );
-        
+
         _StubMsg.Buffer = (unsigned char __RPC_FAR *) _pRpcMessage->Buffer;
-        
+
         NdrServerContextMarshall(
                             ( PMIDL_STUB_MESSAGE  )&_StubMsg,
                             ( NDR_SCONTEXT  )pphContext,
                             ( NDR_RUNDOWN  )PCTXTYPE_rundown);
-        
+
         }
     RpcFinally
         {
         }
     RpcEndFinally
-    _pRpcMessage->BufferLength = 
+    _pRpcMessage->BufferLength =
         (unsigned int)(_StubMsg.Buffer - (unsigned char __RPC_FAR *)_pRpcMessage->Buffer);
-    
+
 }
 
 
-static const MIDL_STUB_DESC hello_StubDesc = 
+static const MIDL_STUB_DESC hello_StubDesc =
     {
     (void __RPC_FAR *)& hello___RpcServerInterface,
     MIDL_user_allocate,
@@ -265,7 +265,7 @@ static RPC_DISPATCH_FUNCTION hello_table[] =
     hello_CtxClose,
     0
     };
-RPC_DISPATCH_TABLE hello_v1_0_DispatchTable = 
+RPC_DISPATCH_TABLE hello_v1_0_DispatchTable =
     {
     3,
     hello_table
@@ -279,7 +279,7 @@ static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
     {
         0,
         {
-                       
+
                        0x51,           /* FC_OUT_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -291,7 +291,7 @@ static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
                        0x8,            /* FC_LONG */
 /*  6 */       0x5b,           /* FC_END */
                        0x5c,           /* FC_PAD */
-/*  8 */       
+/*  8 */
                        0x4d,           /* FC_IN_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -301,7 +301,7 @@ static const MIDL_PROC_FORMAT_STRING __MIDL_ProcFormatString =
 /* 10 */       NdrFcShort( 0xa ),      /* Type Offset=10 */
 /* 12 */       0x5b,           /* FC_END */
                        0x5c,           /* FC_PAD */
-/* 14 */       
+/* 14 */
                        0x50,           /* FC_IN_OUT_PARAM */
 #ifndef _ALPHA_
                        0x1,            /* x86, MIPS & PPC stack size = 1 */
@@ -321,7 +321,7 @@ static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
         0,
         {
                        NdrFcShort( 0x0 ),      /* 0 */
-/*  2 */       
+/*  2 */
                        0x11, 0x0,      /* FC_RP */
 /*  4 */       NdrFcShort( 0x2 ),      /* Offset= 2 (6) */
 /*  6 */       0x30,           /* FC_BIND_CONTEXT */
@@ -332,7 +332,7 @@ static const MIDL_TYPE_FORMAT_STRING __MIDL_TypeFormatString =
                        0x41,           /* Ctxt flags:  in, can't be null */
 /* 12 */       0x0,            /* 0 */
                        0x0,            /* 0 */
-/* 14 */       
+/* 14 */
                        0x11, 0x0,      /* FC_RP */
 /* 16 */       NdrFcShort( 0x2 ),      /* Offset= 2 (18) */
 /* 18 */       0x30,           /* FC_BIND_CONTEXT */
index 66f048f..9c0ac02 100644 (file)
@@ -33,7 +33,7 @@ void main()
 
        status = RpcServerUseProtseqEp("ncacn_np", 20, "\\pipe\\hello", NULL);
 
-       if (status) 
+       if (status)
        {
                printf("RpcServerUseProtseqEp %x\n", status);
                exit(status);
@@ -41,7 +41,7 @@ void main()
 
        status = RpcServerRegisterIf(hello_v1_0_s_ifspec, NULL, NULL);
 
-       if (status) 
+       if (status)
        {
                printf("RpcServerRegisterIf %x\n", status);
        exit(status);
@@ -49,7 +49,7 @@ void main()
 
        status = RpcServerListen(1, 20, FALSE);
 
-       if (status) 
+       if (status)
        {
                printf("RpcServerListen %x", status);
                exit(status);
@@ -71,7 +71,7 @@ void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
 {
        return(malloc(len));
 }
+
 void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
 {
        free(ptr);
index 447c389..0444298 100644 (file)
@@ -140,7 +140,7 @@ int Generate()
        WriteFile(hFile, sBuf, sizeof(sBuf), &dwSize, NULL);
        CloseHandle(hFile);
 
-       
+
        hFile = CreateFile(
                szxMovedFileWithRepl,
                FILE_ALL_ACCESS,
@@ -217,7 +217,7 @@ int _tmain(int argc, _TCHAR* argv[])
        }
        else if( 0 == strncmp(argv[1], "-s", 2) )
        {
-               // 
+               //
                return ShowRegValue();
        }
        else if( 0 == strncmp(argv[1], "-d", 2) )
index 31bec73..cef5ca2 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Copyright 2006 Saveliy Tretiakov
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,13 +26,13 @@ HINSTANCE hInst;
 INT testnum = 0;
 
 
-LRESULT CALLBACK WndProc(HWND hWnd, 
-                                                        UINT msg, 
-                                                        WPARAM wParam, 
+LRESULT CALLBACK WndProc(HWND hWnd,
+                                                        UINT msg,
+                                                        WPARAM wParam,
                                                         LPARAM lParam)
-{      
+{
    HICON hIcon;
-       
+
        switch (msg)
        {
           case WM_GETICON:
@@ -43,17 +43,17 @@ LRESULT CALLBACK WndProc(HWND hWnd,
                 else if(wParam == ICON_BIG)
                    hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON2BIG));
                 else hIcon = (HICON)1;
-             
+
                 if(!hIcon)
                 {
                    printf("LoadIcon() failed: %d\n", (INT)GetLastError());
                    break;
                 }
-             
+
                 return (LRESULT)hIcon;
              }
              break;
-       
+
        case WM_DESTROY:
                        PostQuitMessage(0);
                        return 0;
@@ -82,16 +82,16 @@ INT main(INT argc, CHAR **argv)
                        "5. WM_GETICON only\n\n");
                return 0;
        }
-       
+
        testnum = atoi(argv[1]);
        if(testnum < 1 || testnum > 5)
        {
                printf("Unknown test %d\n", testnum);
                return 1;
        }
-       
+
        hInst = GetModuleHandle(NULL);
-       
+
        memset(&wcx, 0, sizeof(wcx));
        wcx.cbSize = sizeof(wcx);
        wcx.style = CS_HREDRAW | CS_VREDRAW;
@@ -102,16 +102,16 @@ INT main(INT argc, CHAR **argv)
        if(testnum<5)wcx.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1BIG));
        if(testnum == 1 || testnum == 3)
           wcx.hIconSm = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1SM));
-       
+
        if(!(result = RegisterClassEx(&wcx)))
        {
-               printf("Shit! RegisterClassEx failed: %d\n", 
+               printf("Shit! RegisterClassEx failed: %d\n",
                        (int)GetLastError());
                return 1;
        }
-       
-       hWnd = CreateWindowEx(0, 
-                               WndClass, 
+
+       hWnd = CreateWindowEx(0,
+                               WndClass,
                                L"DrawCaption icon test",
                                WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU,
                                CW_USEDEFAULT,
@@ -122,23 +122,23 @@ INT main(INT argc, CHAR **argv)
                                0,
                                hInst,
                                NULL);
-       
+
        if(!hWnd)
        {
                printf("Shit! Can't create wnd!\n");
                UnregisterClass(WndClass, hInst);
                return 1;
        }
-       
-       
-       ShowWindow(hWnd, SW_SHOW); 
-       UpdateWindow(hWnd);  
+
+
+       ShowWindow(hWnd, SW_SHOW);
+       UpdateWindow(hWnd);
 
        while(GetMessage(&msg, NULL, 0, 0 ))
        {
-               TranslateMessage(&msg); 
-               DispatchMessage(&msg); 
-       } 
+               TranslateMessage(&msg);
+               DispatchMessage(&msg);
+       }
 
        UnregisterClass(WndClass, hInst);
        return 0;
index b6036d8..5c6b1e1 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Copyright 2006 Saveliy Tretiakov
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -34,32 +34,32 @@ INT testnum = 0;
 //              LPCWSTR     str,
 //              UINT        uFlags);
 
-VOID CapTest(HWND hWnd, 
-       HDC hDc, 
-       LPRECT pR, 
-       WCHAR *Text, 
+VOID CapTest(HWND hWnd,
+       HDC hDc,
+       LPRECT pR,
+       WCHAR *Text,
        DWORD Flags,
        WCHAR *AddonStr,
        DWORD Addon)
 {
        WCHAR Buf[512];
-       
+
        lstrcpy(Buf, AddonStr);
        if(lstrlen(Buf))lstrcat(Buf, L" | ");
        lstrcat(Buf, Text);
-       
-       DrawText( hDc, Buf, lstrlen(Buf), pR, DT_LEFT );  
-       
+
+       DrawText( hDc, Buf, lstrlen(Buf), pR, DT_LEFT );
+
        pR->top+=20;
-       pR->bottom+=20; 
-               
+       pR->bottom+=20;
+
        if(!DrawCaption(hWnd, hDc, pR, Flags | Addon))
        {
                printf("PAINT: DrawCaption failed: %d\n", (int)GetLastError());
        }
 
        pR->top+=30;
-       pR->bottom+=30; 
+       pR->bottom+=30;
 }
 
 VOID DrawCaptionTest(HWND hWnd, HDC hDc, WCHAR *AddonStr, DWORD Addon)
@@ -71,52 +71,52 @@ VOID DrawCaptionTest(HWND hWnd, HDC hDc, WCHAR *AddonStr, DWORD Addon)
        Rect.right-=10;
        Rect.top = 10;
 
-       CapTest(hWnd, hDc, &Rect, L"DC_TEXT:", DC_TEXT, AddonStr, Addon); 
-       
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_ACTIVE:", 
-               DC_TEXT | DC_ACTIVE, 
-               AddonStr, Addon); 
-       
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_ICON:" , 
-               DC_TEXT | DC_ICON, 
+       CapTest(hWnd, hDc, &Rect, L"DC_TEXT:", DC_TEXT, AddonStr, Addon);
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_ACTIVE:",
+               DC_TEXT | DC_ACTIVE,
                AddonStr, Addon);
-        
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_ACTIVE | DC_ICON:" , 
-               DC_TEXT | DC_ACTIVE | DC_ICON, 
-               AddonStr, Addon); 
-
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_INBUTTON:" , 
-               DC_TEXT | DC_INBUTTON, 
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_ICON:" ,
+               DC_TEXT | DC_ICON,
+               AddonStr, Addon);
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_ACTIVE | DC_ICON:" ,
+               DC_TEXT | DC_ACTIVE | DC_ICON,
                AddonStr, Addon);
-        
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_ACTIVE | DC_INBUTTON:" , 
-               DC_TEXT | DC_ACTIVE | DC_INBUTTON, 
-               AddonStr, Addon); 
-                               
-       CapTest(hWnd, hDc, &Rect, 
-               L"DC_TEXT | DC_ICON | DC_INBUTTON:" , 
-               DC_TEXT | DC_ICON | DC_INBUTTON, 
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_INBUTTON:" ,
+               DC_TEXT | DC_INBUTTON,
                AddonStr, Addon);
-        
-       CapTest(hWnd, hDc, &Rect, 
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_ACTIVE | DC_INBUTTON:" ,
+               DC_TEXT | DC_ACTIVE | DC_INBUTTON,
+               AddonStr, Addon);
+
+       CapTest(hWnd, hDc, &Rect,
+               L"DC_TEXT | DC_ICON | DC_INBUTTON:" ,
+               DC_TEXT | DC_ICON | DC_INBUTTON,
+               AddonStr, Addon);
+
+       CapTest(hWnd, hDc, &Rect,
                L"DC_TEXT | DC_ACTIVE | DC_ICON | DC_INBUTTON:" ,
-               DC_TEXT | DC_ACTIVE | DC_ICON | DC_INBUTTON, 
-               AddonStr, Addon);                       
+               DC_TEXT | DC_ACTIVE | DC_ICON | DC_INBUTTON,
+               AddonStr, Addon);
 
 }
 
-LRESULT CALLBACK CaptWndProc(HWND hWnd, 
-                                                        UINT msg, 
-                                                        WPARAM wParam, 
+LRESULT CALLBACK CaptWndProc(HWND hWnd,
+                                                        UINT msg,
+                                                        WPARAM wParam,
                                                         LPARAM lParam)
-{      
+{
+
 
-       
        switch (msg)
        {
 
@@ -124,10 +124,10 @@ LRESULT CALLBACK CaptWndProc(HWND hWnd,
                {
                        HDC hDc;
                        PAINTSTRUCT Ps;
-                       
+
                        hDc = BeginPaint(hWnd, &Ps);
                        SetBkMode( hDc, TRANSPARENT );
-                       
+
                        switch(testnum)
                        {
                        case 1:
@@ -143,29 +143,29 @@ LRESULT CALLBACK CaptWndProc(HWND hWnd,
                                DrawCaptionTest(hWnd, hDc, L"DC_BUTTONS", DC_BUTTONS);
                                break;
                        case 5:
-                               DrawCaptionTest(hWnd, hDc, 
-                                       L"DC_GRADIENT | DC_SMALLCAP", 
+                               DrawCaptionTest(hWnd, hDc,
+                                       L"DC_GRADIENT | DC_SMALLCAP",
                                        DC_GRADIENT | DC_SMALLCAP);
                                break;
                        case 6:
-                               DrawCaptionTest(hWnd, hDc, 
-                                       L"DC_GRADIENT | DC_BUTTONS", 
+                               DrawCaptionTest(hWnd, hDc,
+                                       L"DC_GRADIENT | DC_BUTTONS",
                                        DC_GRADIENT | DC_BUTTONS);
                                break;
-                       case 7: 
-                               DrawCaptionTest(hWnd, hDc, 
-                                       L"DC_BUTTONS | DC_SMALLCAP", 
+                       case 7:
+                               DrawCaptionTest(hWnd, hDc,
+                                       L"DC_BUTTONS | DC_SMALLCAP",
                                        DC_BUTTONS | DC_SMALLCAP);
                                break;
                        case 8:
-                               DrawCaptionTest(hWnd, hDc, 
-                                       L"DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT", 
+                               DrawCaptionTest(hWnd, hDc,
+                                       L"DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT",
                                        DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT);
                                break;
                        }
-                       
+
                        EndPaint(hWnd, &Ps);
-               
+
                        return 0;
                }
 
@@ -188,7 +188,7 @@ INT main(INT argc, CHAR **argv)
        UINT result;
        HBRUSH hBr;
        //HMODULE hLib;
-       
+
        if(argc<2)
        {
                printf("DrawCaption testcode.\n");
@@ -204,37 +204,37 @@ INT main(INT argc, CHAR **argv)
                        "8. DrawCaption test + DC_BUTTONS | DC_SMALLCAP | DC_GRADIENT\n\n");
                return 0;
        }
-       
+
        testnum = atoi(argv[1]);
        if(testnum < 1 || testnum > 8)
        {
                printf("Unknown test %d\n", testnum);
                return 1;
        }
-               
+
        hInst = GetModuleHandle(NULL);
-       
+
        //hLib = LoadLibrary(L"user32");
        //if(!hLib)
        //{
        //      printf("Shit! Can't load user32.dll\n");
        //      return 1;
        //}
-       
+
        //DrawCaptionTemp = GetProcAddress(hLib, "DrawCaptionTempW");
        //if(!DrawCaptionTemp)
        //{
        //      printf("Shit! Can't get DrawCaptionTemp address\n");
        //      return 1;
        //}
-       
+
        hBr = CreateSolidBrush(RGB(255, 255, 255));
        if(!hBr)
        {
                printf("Shit! Can't create brush.");
                return 1;
        }
-       
+
        memset(&wcx, 0, sizeof(wcx));
        wcx.cbSize = sizeof(wcx);
        wcx.style = CS_HREDRAW | CS_VREDRAW;
@@ -243,17 +243,17 @@ INT main(INT argc, CHAR **argv)
        wcx.hbrBackground = hBr;
        wcx.lpszClassName = CaptWndClass;
        if(argc > 2) wcx.hIconSm = LoadIcon(hInst, MAKEINTRESOURCE(ID_ICON1SM));
-       
+
        if(!(result = RegisterClassEx(&wcx)))
        {
-               printf("Shit! RegisterClassEx failed: %d\n", 
+               printf("Shit! RegisterClassEx failed: %d\n",
                        (int)GetLastError());
                DeleteObject(hBr);
                return 1;
        }
-       
-       hWnd = CreateWindowEx(0, 
-                               CaptWndClass, 
+
+       hWnd = CreateWindowEx(0,
+                               CaptWndClass,
                                L"DrawCaption test",
                                WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU,
                                CW_USEDEFAULT,
@@ -264,7 +264,7 @@ INT main(INT argc, CHAR **argv)
                                0,
                                hInst,
                                NULL);
-       
+
        if(!hWnd)
        {
                printf("Shit! Can't create wnd!\n");
@@ -272,16 +272,16 @@ INT main(INT argc, CHAR **argv)
                DeleteObject(hBr);
                return 1;
        }
-       
-       
-       ShowWindow(hWnd, SW_SHOW); 
-       UpdateWindow(hWnd);  
+
+
+       ShowWindow(hWnd, SW_SHOW);
+       UpdateWindow(hWnd);
 
        while(GetMessage(&msg, NULL, 0, 0 ))
        {
-               TranslateMessage(&msg); 
-               DispatchMessage(&msg); 
-       } 
+               TranslateMessage(&msg);
+               DispatchMessage(&msg);
+       }
 
        DeleteObject(hBr);
        UnregisterClass(CaptWndClass, hInst);
index f142303..58e7bbb 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
- * PROJECT:         ReactOS \r
+ * PROJECT:         ReactOS\r
  * LICENSE:         GPL - See COPYING in the top level directory\r
  * FILE:            base/applications/testset/user32/kbdlayout/kbdlayout.c\r
  * PURPOSE:         Keyboard layout testapp\r
@@ -28,10 +28,10 @@ typedef struct {
 DWORD WINAPI ThreadProc(LPVOID lpParam)\r
 {\r
 \r
-       DialogBoxParam(hInst, \r
+       DialogBoxParam(hInst,\r
                MAKEINTRESOURCE(IDD_MAINDIALOG),\r
-               NULL, \r
-               (DLGPROC)MainDialogProc, \r
+               NULL,\r
+               (DLGPROC)MainDialogProc,\r
                (LPARAM)NULL);\r
 \r
        return 0;\r
@@ -91,8 +91,8 @@ void UpdateData(HWND hDlg)
        for(i = 0; i < n; i++)\r
        {\r
                swprintf(buf, L"%x", klList[i] );\r
-               j = SendMessage(hList, LB_ADDSTRING, 0, (LPARAM) buf); \r
-               SendMessage(hList, LB_SETITEMDATA, j, (LPARAM) klList[i]); \r
+               j = SendMessage(hList, LB_ADDSTRING, 0, (LPARAM) buf);\r
+               SendMessage(hList, LB_SETITEMDATA, j, (LPARAM) klList[i]);\r
                if(klList[i] == hKl) SendMessage(hList, LB_SETCURSEL, j, 0);\r
        }\r
 \r
@@ -129,15 +129,15 @@ LRESULT CALLBACK WndSubclassProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lP
                FormatMsg(L"%s: WM_INPUTLANGCHANGE lParam=%x wParam=%x\n", data->WndName, lParam, wParam);\r
                UpdateData(hMainDlg);\r
                //Pass message to defwindowproc\r
-       } \r
+       }\r
        else if(uMsg == WM_INPUTLANGCHANGEREQUEST)\r
        {\r
                FormatMsg(L"%s: WM_INPUTLANGCHANGEREQUEST lParam=%x wParam=%x\n", data->WndName, lParam, wParam);\r
                UpdateData(hMainDlg);\r
                //Pass message to defwindowproc\r
        }\r
-       \r
-       return ( CallWindowProc( data->OrigProc, hwnd, uMsg, wParam, lParam) ); \r
+\r
+       return ( CallWindowProc( data->OrigProc, hwnd, uMsg, wParam, lParam) );\r
 }\r
 \r
 void SubclassWnd(HWND hWnd, WCHAR* Name)\r
@@ -221,7 +221,7 @@ HKL GetActivateHandle(HWND hDlg)
 \r
        if(IsDlgButtonChecked(hDlg, IDC_FROMLIST))\r
                return GetSelectedLayout(hDlg);\r
-       else if(IsDlgButtonChecked(hDlg, IDC_HKL_NEXT)) \r
+       else if(IsDlgButtonChecked(hDlg, IDC_HKL_NEXT))\r
                return (HKL)HKL_NEXT;\r
 \r
        return (HKL)HKL_PREV;\r
@@ -284,10 +284,10 @@ LRESULT MainDialogProc(HWND hDlg,
                                        {\r
                                                Sleep(GetDelayMilliseconds(hDlg));\r
                                                if(!(hKl = ActivateKeyboardLayout(hKl, GetActivateFlags(hDlg))))\r
-                                                       FormatBox(hDlg, MB_ICONERROR, L"Error", \r
+                                                       FormatBox(hDlg, MB_ICONERROR, L"Error",\r
                                                                L"ActivateKeyboardLayout() failed. %d", GetLastError());\r
                                                else UpdateData(hDlg);\r
-                                               //FormatBox(hDlg, 0, L"Activated", L"Prev - %x, err - %d.", hKl, \r
+                                               //FormatBox(hDlg, 0, L"Activated", L"Prev - %x, err - %d.", hKl,\r
                                                // GetLastError());\r
                                        }\r
                                        else MessageBox(hDlg, L"No item selected", L"Error", MB_ICONERROR);\r
@@ -300,11 +300,11 @@ LRESULT MainDialogProc(HWND hDlg,
                                        {\r
                                                Sleep(GetDelayMilliseconds(hDlg));\r
                                                if(!UnloadKeyboardLayout(hKl))\r
-                                                       FormatBox(hDlg, MB_ICONERROR, L"Error", \r
-                                                               L"UnloadKeyboardLayout() failed. %d", \r
+                                                       FormatBox(hDlg, MB_ICONERROR, L"Error",\r
+                                                               L"UnloadKeyboardLayout() failed. %d",\r
                                                                GetLastError());\r
                                                else UpdateData(hDlg);\r
-                                       }                       \r
+                                       }\r
                                        else MessageBox(hDlg,  L"No item selected", L"Error", MB_ICONERROR);\r
                                        break;\r
                                }\r
@@ -315,7 +315,7 @@ LRESULT MainDialogProc(HWND hDlg,
                                        GetWindowText(GetDlgItem(hDlg, IDC_KLID), buf, sizeof(buf));\r
                                        Sleep(GetDelayMilliseconds(hDlg));\r
                                        if(!LoadKeyboardLayout(buf, GetLoadFlags(hDlg)))\r
-                                               FormatBox(hDlg, MB_ICONERROR, L"Error", \r
+                                               FormatBox(hDlg, MB_ICONERROR, L"Error",\r
                                                        L"LoadKeyboardLayout() failed. %d",\r
                                                        GetLastError());\r
                                        else UpdateData(hDlg);\r
@@ -332,7 +332,7 @@ LRESULT MainDialogProc(HWND hDlg,
                                {\r
                                        if(!CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL))\r
                                        {\r
-                                               FormatBox(hDlg, MB_ICONERROR, L"Error!", \r
+                                               FormatBox(hDlg, MB_ICONERROR, L"Error!",\r
                                                        L"Can not create thread (%d).", GetLastError());\r
                                        }\r
                                }\r
index 5e681bd..41eb31b 100644 (file)
@@ -33,36 +33,36 @@ FONT 8, "MS Sans Serif"
 BEGIN
     PUSHBUTTON      "Close",ID_CANCEL,215,172,105,14
     EDITTEXT        IDC_EDIT1,7,140,199,47,ES_MULTILINE | ES_AUTOHSCROLL
-    LISTBOX         IDC_LIST,124,60,84,46,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | 
+    LISTBOX         IDC_LIST,124,60,84,46,LBS_NOINTEGRALHEIGHT | WS_VSCROLL |
                     WS_TABSTOP
     LTEXT           "Loaded layouts",IDC_STATIC,124,50,49,8
     LTEXT           "Active:",IDC_ACTIVE,7,127,114,10,SS_SUNKEN
     PUSHBUTTON      "Unload",IDC_UNLOAD,124,109,41,14
     PUSHBUTTON      "Activate",IDC_ACTIVATE,166,109,41,14
     GROUPBOX        "Activate Flags",IDC_STATIC,215,7,103,67
-    CONTROL         "KLF_REORDER",IDC_KLF_REORDER,"Button",BS_AUTOCHECKBOX | 
+    CONTROL         "KLF_REORDER",IDC_KLF_REORDER,"Button",BS_AUTOCHECKBOX |
                     WS_TABSTOP,221,22,69,10
-    CONTROL         "KLF_RESET",IDC_KLF_RESET,"Button",BS_AUTOCHECKBOX | 
+    CONTROL         "KLF_RESET",IDC_KLF_RESET,"Button",BS_AUTOCHECKBOX |
                     WS_TABSTOP,221,34,66,12
     CONTROL         "KLF_SETFORPROCESS",IDC_KLF_SETFORPROCESS,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,221,48,95,10
     CONTROL         "KLF_SHIFTLOCK",IDC_KLF_SHIFTLOCK,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,221,60,72,10
     GROUPBOX        "Activate layout",IDC_STATIC,216,77,103,50
-    CONTROL         "From list",IDC_FROMLIST,"Button",BS_AUTORADIOBUTTON | 
+    CONTROL         "From list",IDC_FROMLIST,"Button",BS_AUTORADIOBUTTON |
                     WS_GROUP,220,90,41,10
     CONTROL         "HKL_NEXT",IDC_HKL_NEXT,"Button",BS_AUTORADIOBUTTON,220,
                     101,53,10
     CONTROL         "HKL_PREV",IDC_HKL_PREV,"Button",BS_AUTORADIOBUTTON,220,
                     112,53,10
     GROUPBOX        "Load layout",IDC_STATIC,7,7,113,118
-    CONTROL         "KLF_ACTIVATE",IDL_KLF_ACTIVATE,"Button",BS_AUTOCHECKBOX | 
+    CONTROL         "KLF_ACTIVATE",IDL_KLF_ACTIVATE,"Button",BS_AUTOCHECKBOX |
                     WS_TABSTOP,14,44,67,10
     CONTROL         "KLF_NOTELLSHELL",IDL_KLF_NOTELLSHELL,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,14,57,83,10
     LTEXT           "pwszKLID:",IDC_STATIC,14,17,35,8
     EDITTEXT        IDC_KLID,14,27,54,14,ES_AUTOHSCROLL
-    CONTROL         "KLF_REORDER",IDL_KLF_REORDER,"Button",BS_AUTOCHECKBOX | 
+    CONTROL         "KLF_REORDER",IDL_KLF_REORDER,"Button",BS_AUTOCHECKBOX |
                     WS_TABSTOP,14,71,69,10
     CONTROL         "KLF_REPLACELANG",IDL_KLF_REPLACELANG,"Button",
                     BS_AUTOCHECKBOX | WS_TABSTOP,14,84,85,10
@@ -87,7 +87,7 @@ END
 //
 
 #ifdef APSTUDIO_INVOKED
-GUIDELINES DESIGNINFO DISCARDABLE 
+GUIDELINES DESIGNINFO DISCARDABLE
 BEGIN
     IDD_MAINDIALOG, DIALOG
     BEGIN
@@ -106,18 +106,18 @@ END
 // TEXTINCLUDE
 //
 
-1 TEXTINCLUDE DISCARDABLE 
+1 TEXTINCLUDE DISCARDABLE
 BEGIN
     "resource.h\0"
 END
 
-2 TEXTINCLUDE DISCARDABLE 
+2 TEXTINCLUDE DISCARDABLE
 BEGIN
     "#include ""afxres.h""\r\n"
     "\0"
 END
 
-3 TEXTINCLUDE DISCARDABLE 
+3 TEXTINCLUDE DISCARDABLE
 BEGIN
     "\r\n"
     "\0"
index 38b5f84..a245b7f 100644 (file)
@@ -34,7 +34,7 @@
 #define IDC_NEWTHREAD                   1050\r
 \r
 // Next default values for new objects\r
-// \r
+//\r
 #ifdef APSTUDIO_INVOKED\r
 #ifndef APSTUDIO_READONLY_SYMBOLS\r
 #define _APS_NO_MFC                     1\r
index 054f422..84802a1 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  *  Copyright 2006 Saveliy Tretiakov
  *
  *  This program is free software; you can redistribute it and/or modify
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
- /* This testapp demonstrates WS_SYSMENU + WS_EX_DLGMODALFRAME 
-  * behavior and shows that DrawCaption does care 
-  * about WS_EX_DLGMODALFRAME and WS_EX_TOOLWINDOW 
+
+ /* This testapp demonstrates WS_SYSMENU + WS_EX_DLGMODALFRAME
+  * behavior and shows that DrawCaption does care
+  * about WS_EX_DLGMODALFRAME and WS_EX_TOOLWINDOW
   */
 
 #include "windows.h"
 
 WCHAR WndClass[] = L"sysicon_class";
 
-LRESULT CALLBACK WndProc(HWND hWnd, 
-                                                        UINT msg, 
-                                                        WPARAM wParam, 
+LRESULT CALLBACK WndProc(HWND hWnd,
+                                                        UINT msg,
+                                                        WPARAM wParam,
                                                         LPARAM lParam)
-{      
-       
+{
+
        switch (msg)
        {
-  
+
     case WM_PAINT:
     {
                        HDC hDc;
                        PAINTSTRUCT Ps;
            RECT Rect;
            GetClientRect(hWnd, &Rect);
-           
+
            Rect.left = 10;
            Rect.top = 10;
            Rect.right-=10;
            Rect.bottom = 25;
-           
+
                        hDc = BeginPaint(hWnd, &Ps);
                        SetBkMode( hDc, TRANSPARENT );
-                       
+
            DrawCaption(hWnd, hDc, &Rect, DC_GRADIENT | DC_ACTIVE | DC_TEXT | DC_ICON);
-       
+
                        EndPaint(hWnd, &Ps);
-               
+
                        return 0;
                }
-                       
+
    case WM_DESTROY:
                        PostQuitMessage(0);
                        return 0;
@@ -75,22 +75,22 @@ int APIENTRY WinMain(HINSTANCE hInst,
        MSG msg;
        WNDCLASSEX wcx;
        UINT result;
-       
+
        memset(&wcx, 0, sizeof(wcx));
        wcx.cbSize = sizeof(wcx);
        wcx.lpfnWndProc = (WNDPROC) WndProc;
        wcx.hInstance = hInst;
        wcx.hbrBackground = (HBRUSH)COLOR_WINDOW;
        wcx.lpszClassName = WndClass;
-       
+
        if(!(result = RegisterClassEx(&wcx)))
        {
                return 1;
        }
-       
+
        /* WS_EX_DLGMODALFRAME */
-       hWnd1 = CreateWindowEx(WS_EX_DLGMODALFRAME, 
-                               WndClass, 
+       hWnd1 = CreateWindowEx(WS_EX_DLGMODALFRAME,
+                               WndClass,
                                L"WS_SYSMENU | WS_EX_DLGMODALFRAME",
                                WS_CAPTION | WS_SYSMENU ,
                                CW_USEDEFAULT,
@@ -101,17 +101,17 @@ int APIENTRY WinMain(HINSTANCE hInst,
                                0,
                                hInst,
                                NULL);
-       
+
        if(!hWnd1)
        {
                return 1;
        }
-       
-       ShowWindow(hWnd1, SW_SHOW); 
-       UpdateWindow(hWnd1);  
+
+       ShowWindow(hWnd1, SW_SHOW);
+       UpdateWindow(hWnd1);
 
        hWnd2 = CreateWindowEx(WS_EX_TOOLWINDOW,
-                               WndClass, 
+                               WndClass,
                                L"WS_SYSMENU | WS_EX_TOOLWINDOW",
                                WS_CAPTION | WS_SYSMENU ,
                                CW_USEDEFAULT,
@@ -122,17 +122,17 @@ int APIENTRY WinMain(HINSTANCE hInst,
                                0,
                                hInst,
                                NULL);
-       
+
        if(!hWnd2)
        {
                return 1;
        }
-       
-       ShowWindow(hWnd2, SW_SHOW); 
-       UpdateWindow(hWnd2);  
+
+       ShowWindow(hWnd2, SW_SHOW);
+       UpdateWindow(hWnd2);
 
        hWnd3 = CreateWindowEx(0,
-                               WndClass, 
+                               WndClass,
                                L"WS_SYSMENU ",
                                WS_CAPTION | WS_SYSMENU ,
                                CW_USEDEFAULT,
@@ -143,20 +143,20 @@ int APIENTRY WinMain(HINSTANCE hInst,
                                0,
                                hInst,
                                NULL);
-       
+
        if(!hWnd3)
        {
                return 1;
        }
-       
-       ShowWindow(hWnd3, SW_SHOW); 
-       UpdateWindow(hWnd3);  
-       
+
+       ShowWindow(hWnd3, SW_SHOW);
+       UpdateWindow(hWnd3);
+
        while(GetMessage(&msg, NULL, 0, 0 ))
        {
-               TranslateMessage(&msg); 
-               DispatchMessage(&msg); 
-       } 
+               TranslateMessage(&msg);
+               DispatchMessage(&msg);
+       }
 
        UnregisterClass(WndClass, hInst);
        return 0;
index 6f7d1f0..e881411 100644 (file)
@@ -352,20 +352,20 @@ static void test_reg_delete_key()
 {
     DWORD ret;
     HKEY hkResult = NULL;
-    
+
     ret = RegDeleteKey(hkey_main, NULL);
     ok(ret == ERROR_INVALID_PARAMETER || ret == ERROR_ACCESS_DENIED,
        "expected ERROR_INVALID_PARAMETER or ERROR_ACCESS_DENIED, got %ld\n", ret);
-       
+
     ret = RegCreateKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Tost", &hkResult);
 
     ret = RegDeleteValue(hkResult, "noExists");
     ok(ret == ERROR_FILE_NOT_FOUND, "expected ERROR_FILE_NOT_FOUND, got %ld\n", ret);
 
     ret = RegDeleteKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Tost");
-    
-    ret = RegCloseKey(hkResult); 
-  
+
+    ret = RegCloseKey(hkResult);
+
 }
 
 static void test_reg_save_key()
index a108c92..b409287 100644 (file)
@@ -144,7 +144,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv)
     DWORD dwAccess = 0;
     DWORD dwShareMode = 0;
     DWORD dwCreateDisposition = OPEN_EXISTING;
-    
+
     dwAccess = GENERIC_READ | GENERIC_WRITE;
     dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
 
@@ -166,7 +166,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
     HANDLE handle = (HANDLE)hf;
     DWORD dwRead;
     BOOL res;
-    
+
     res = ReadFile(handle, memory, cb, &dwRead, NULL);
     ok(res, "Failed to ReadFile\n");
 
@@ -197,7 +197,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv)
 {
     HANDLE handle = (HANDLE)hf;
     DWORD ret;
-    
+
     ret = SetFilePointer(handle, dist, NULL, seektype);
     ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n");
 
@@ -247,7 +247,7 @@ static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
 
     res = GetFileInformationByHandle(handle, &finfo);
     ok(res, "Expected GetFileInformationByHandle to succeed\n");
-   
+
     FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
     FileTimeToDosDateTime(&filetime, pdate, ptime);
 
index 106a80e..3743c07 100644 (file)
@@ -107,40 +107,40 @@ static void test_comboboxex(void) {
        ok(res == -1, "Adding out of range worked unexpectedly (%ld)\n", res);
      */
 
-    /* Get an item completely out of range */ 
-    res = getItem(myHwnd, 99, &cbexItem); 
+    /* Get an item completely out of range */
+    res = getItem(myHwnd, 99, &cbexItem);
     ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText);
-    res = getItem(myHwnd, 4, &cbexItem); 
+    res = getItem(myHwnd, 4, &cbexItem);
     ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText);
-    res = getItem(myHwnd, -2, &cbexItem); 
+    res = getItem(myHwnd, -2, &cbexItem);
     ok(res == 0, "Getting item using out of range index worked unexpectedly (%ld, %s)\n", res, cbexItem.pszText);
 
-    /* Get an item in range */ 
-    res = getItem(myHwnd, 0, &cbexItem); 
+    /* Get an item in range */
+    res = getItem(myHwnd, 0, &cbexItem);
     ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res);
     ok(strcmp(first_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
 
-    res = getItem(myHwnd, 1, &cbexItem); 
+    res = getItem(myHwnd, 1, &cbexItem);
     ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res);
     ok(strcmp(middle_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
 
-    res = getItem(myHwnd, 2, &cbexItem); 
+    res = getItem(myHwnd, 2, &cbexItem);
     ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res);
     ok(strcmp(second_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
 
-    res = getItem(myHwnd, 3, &cbexItem); 
+    res = getItem(myHwnd, 3, &cbexItem);
     ok(res != 0, "Getting item using valid index failed unexpectedly (%ld)\n", res);
     ok(strcmp(third_item, cbexItem.pszText) == 0, "Getting item returned wrong string (%s)\n", cbexItem.pszText);
 
-    /* Set an item completely out of range */ 
-    res = setItem(myHwnd, 99, replacement_item); 
+    /* Set an item completely out of range */
+    res = setItem(myHwnd, 99, replacement_item);
     ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res);
-    res = setItem(myHwnd, 4, replacement_item); 
+    res = setItem(myHwnd, 4, replacement_item);
     ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res);
-    res = setItem(myHwnd, -2, replacement_item); 
+    res = setItem(myHwnd, -2, replacement_item);
     ok(res == 0, "Setting item using out of range index worked unexpectedly (%ld)\n", res);
 
-    /* Set an item in range */ 
+    /* Set an item in range */
     res = setItem(myHwnd, 0, replacement_item);
     ok(res != 0, "Setting first item failed (%ld)\n", res);
     res = setItem(myHwnd, 3, replacement_item);
@@ -175,15 +175,15 @@ static void test_comboboxex(void) {
 LRESULT CALLBACK ComboExTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch(msg) {
-    
+
     case WM_DESTROY:
         PostQuitMessage(0);
         break;
-  
+
     default:
         return DefWindowProcA(hWnd, msg, wParam, lParam);
     }
-    
+
     return 0L;
 }
 
@@ -207,7 +207,7 @@ static void init(void) {
     wc.lpfnWndProc = ComboExTestWndProc;
     RegisterClassA(&wc);
 
-    hComboExParentWnd = CreateWindowExA(0, ComboExTestClass, "ComboEx test", WS_OVERLAPPEDWINDOW, 
+    hComboExParentWnd = CreateWindowExA(0, ComboExTestClass, "ComboEx test", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0);
     assert(hComboExParentWnd != NULL);
 
@@ -218,13 +218,13 @@ static void init(void) {
 static void cleanup(void)
 {
     MSG msg;
-    
+
     PostMessageA(hComboExParentWnd, WM_CLOSE, 0, 0);
     while (GetMessageA(&msg,0,0,0)) {
         TranslateMessage(&msg);
         DispatchMessageA(&msg);
     }
-    
+
     UnregisterClassA(ComboExTestClass, GetModuleHandleA(NULL));
 }
 
index 8febf61..4aa7b88 100644 (file)
@@ -49,7 +49,7 @@ static PVOID   (WINAPI *pDPA_DeleteAllPtrs)(const HDPA);
 static PVOID   (WINAPI *pDPA_DeletePtr)(const HDPA,INT);
 static BOOL    (WINAPI *pDPA_Destroy)(const HDPA);
 static VOID    (WINAPI *pDPA_DestroyCallback)(HDPA,PFNDPAENUMCALLBACK,PVOID);
-static VOID    (WINAPI *pDPA_EnumCallback)(HDPA,PFNDPAENUMCALLBACK,PVOID); 
+static VOID    (WINAPI *pDPA_EnumCallback)(HDPA,PFNDPAENUMCALLBACK,PVOID);
 static INT     (WINAPI *pDPA_GetPtr)(const HDPA,INT);
 static INT     (WINAPI *pDPA_GetPtrIndex)(const HDPA,PVOID);
 static BOOL    (WINAPI *pDPA_Grow)(HDPA,INT);
@@ -63,7 +63,7 @@ static BOOL    (WINAPI *pDPA_Sort)(const HDPA,PFNDPACOMPARE,LPARAM);
 
 #define COMCTL32_GET_PROC(func, ord) \
   ((p ## func = (PVOID)GetProcAddress(hcomctl32,(LPCSTR)ord)) ? 1 \
-   : (trace( #func " not exported\n"), 0)) 
+   : (trace( #func " not exported\n"), 0))
 
 static BOOL InitFunctionPtrs(HMODULE hcomctl32)
 {
@@ -112,7 +112,7 @@ static PVOID CALLBACK CB_MergeInsertSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp)
 {
     ok(lp == 0xdeadbeef, "lp=%ld\n", lp);
     return p1;
-}        
+}
 
 static PVOID CALLBACK CB_MergeDeleteOddSrc(UINT op, PVOID p1, PVOID p2, LPARAM lp)
 {
@@ -123,7 +123,7 @@ static PVOID CALLBACK CB_MergeDeleteOddSrc(UINT op, PVOID p1, PVOID p2, LPARAM l
 static INT nEnum;
 
 static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp)
-{   
+{
     INT i;
 
     i = pDPA_GetPtrIndex(lp, pItem);
@@ -136,7 +136,7 @@ static INT CALLBACK CB_EnumFirstThree(PVOID pItem, PVOID lp)
 static HRESULT CALLBACK CB_Save(LPITEMDATA pInfo, IStream *pStm, LPARAM lp)
 {
     HRESULT hRes;
-    
+
     ok(lp == 0xdeadbeef, "lp=%ld\n", lp);
     hRes = IStream_Write(pStm, &pInfo->iPos, sizeof(INT), NULL);
     ok(hRes == S_OK, "hRes=0x%lx\n", hRes);
@@ -149,7 +149,7 @@ static HRESULT CALLBACK CB_Load(LPITEMDATA pInfo, IStream *pStm, LPARAM lp)
 {
     HRESULT hRes;
     INT iOldPos;
-    
+
     iOldPos = pInfo->iPos;
     ok(lp == 0xdeadbeef, "lp=%ld\n", lp);
     hRes = IStream_Read(pStm, &pInfo->iPos, sizeof(INT), NULL);
@@ -171,23 +171,23 @@ static BOOL CheckDPA(HDPA dpa, DWORD dwIn, PDWORD pdwOut)
         if(!ulItem) break;
         dwOut = dwOut << 4 | (ulItem & 0xf);
     }
-    
+
     *pdwOut = dwOut;
 
     if(dwOut != dwIn)
     {
         pDPA_DeleteAllPtrs(dpa);
-        
+
         do
         {
             pDPA_InsertPtr(dpa, 0, (PVOID)(dwIn & 0xf));
             dwIn >>= 4;
         }
         while(dwIn);
-        
+
         return FALSE;
     }
-    
+
     return TRUE;
 }
 
@@ -200,16 +200,16 @@ static void test_dpa(void)
     PVOID p;
     DWORD dw, dw2, dw3;
     HRESULT hRes;
-    
+
     GetSystemInfo(&si);
     hHeap = HeapCreate(0, 1, 2);
     ok(hHeap != NULL, "error=%ld\n", GetLastError());
     dpa3 = pDPA_CreateEx(0, hHeap);
     ok(dpa3 != NULL, "\n");
     ret = pDPA_Grow(dpa3, si.dwPageSize + 1);
-    todo_wine ok(!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY, 
+    todo_wine ok(!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
        "ret=%d error=%ld\n", ret, GetLastError());
-        
+
     dpa = pDPA_Create(0);
     ok(dpa != NULL, "\n");
 
@@ -218,7 +218,7 @@ static void test_dpa(void)
     /* Fill the greated gap */
     ok(pDPA_SetPtr(dpa, 0, (PVOID)5), "\n");
     ok(CheckDPA(dpa, 0x56, &dw), "dw=0x%lx\n", dw);
-    
+
     /* Prepend item */
     ret = pDPA_InsertPtr(dpa, 1, (PVOID)1);
     ok(ret == 1, "ret=%d\n", ret);
@@ -228,7 +228,7 @@ static void test_dpa(void)
     /* Append item using out of bound index */
     ret = pDPA_InsertPtr(dpa, 5, (PVOID)2);
     ok(ret == 4, "ret=%d\n", ret);
-    /* Append item using DPA_APPEND */ 
+    /* Append item using DPA_APPEND */
     ret = pDPA_InsertPtr(dpa, DPA_APPEND, (PVOID)4);
     ok(ret == 5, "ret=%d\n", ret);
 
@@ -246,14 +246,14 @@ static void test_dpa(void)
     /* Sort DPA */
     ok(pDPA_Sort(dpa, CB_CmpGT, 0xdeadbeef), "\n");
     ok(CheckDPA(dpa, 0x654321, &dw), "dw=0x%lx\n", dw);
-    
+
     /* Clone into a new DPA */
     dpa2 = pDPA_Clone(dpa, NULL);
     ok(dpa2 != NULL, "\n");
     /* The old data should have been preserved */
     ok(CheckDPA(dpa2, 0x654321, &dw2), "dw=0x%lx\n", dw2);
     ok(pDPA_Sort(dpa, CB_CmpLT, 0xdeadbeef), "\n");
-    
+
     /* Test if the DPA itself was really copied */
     ok(CheckDPA(dpa,  0x123456, &dw),  "dw=0x%lx\n",  dw );
     ok(CheckDPA(dpa2, 0x654321, &dw2), "dw2=0x%lx\n", dw2);
@@ -281,11 +281,11 @@ static void test_dpa(void)
         j = pDPA_Search(dpa, (PVOID)i, i+1, CB_CmpLT, 0xdeadbeef, DPAS_SORTED);
         todo_wine ok(j+1 == i, "j=%d i=%d\n", j, i);
     }
-    
+
     /* Try to get the index of a nonexistent item */
     i = pDPA_GetPtrIndex(dpa, (PVOID)7);
     ok(i == DPA_ERR, "i=%d\n", i);
-    
+
     /* Try to delete out of bound indexes */
     p = pDPA_DeletePtr(dpa, -1);
     ok(p == NULL, "p=%p\n", p);
@@ -298,7 +298,7 @@ static void test_dpa(void)
     ok(CheckDPA(dpa, 0x12456, &dw), "dw=0x%lx\n", dw);
 
     /* Check where to re-insert the deleted item */
-    i = pDPA_Search(dpa, (PVOID)3, 0, 
+    i = pDPA_Search(dpa, (PVOID)3, 0,
                     CB_CmpLT, 0xdeadbeef, DPAS_SORTED|DPAS_INSERTAFTER);
     ok(i == 2, "i=%d\n", i);
     /* DPAS_INSERTBEFORE works just like DPAS_INSERTAFTER */
@@ -314,7 +314,7 @@ static void test_dpa(void)
     ret = pDPA_InsertPtr(dpa, 2, (PVOID)3);
     ok(ret == 2, "ret=%d i=%d\n", ret, 2);
     ok(CheckDPA(dpa, 0x123456, &dw), "dw=0x%lx\n", dw);
-    
+
     /* When doing a binary search while claiming reverse order all indexes
      * should be bogus */
     for(i = 0; i < 6; i++)
@@ -331,18 +331,18 @@ static void test_dpa(void)
         p = pDPA_DeletePtr(dpa, 2);
         p = pDPA_DeletePtr(dpa, 3);
         ok(CheckDPA(dpa, 0x135, &dw), "dw=0x%lx\n", dw);
-    
+
         /* Delete all odd entries from dpa2 */
-        pDPA_Merge(dpa2, dpa, DPAM_DELETE, 
+        pDPA_Merge(dpa2, dpa, DPAM_DELETE,
                    CB_CmpLT, CB_MergeDeleteOddSrc, 0xdeadbeef);
         todo_wine ok(CheckDPA(dpa2, 0x246, &dw2), "dw=0x%lx\n", dw2);
-    
+
         /* Merge dpa3 into dpa2 and dpa */
-        pDPA_Merge(dpa, dpa3, DPAM_INSERT|DPAM_NOSORT, 
+        pDPA_Merge(dpa, dpa3, DPAM_INSERT|DPAM_NOSORT,
                    CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef);
-        pDPA_Merge(dpa2, dpa3, DPAM_INSERT|DPAM_NOSORT, 
+        pDPA_Merge(dpa2, dpa3, DPAM_INSERT|DPAM_NOSORT,
                    CB_CmpLT, CB_MergeInsertSrc, 0xdeadbeef);
-    
+
         ok(CheckDPA(dpa,  0x123456, &dw ), "dw=0x%lx\n",  dw);
         ok(CheckDPA(dpa2, 0x123456, &dw2), "dw2=0x%lx\n", dw2);
         ok(CheckDPA(dpa3, 0x123456, &dw3), "dw3=0x%lx\n", dw3);
@@ -355,12 +355,12 @@ static void test_dpa(void)
         ok(CheckDPA(dpa2, 0x777456, &dw2), "dw=0x%lx\n", dw2);
         ok(nEnum == 3, "nEnum=%d\n", nEnum);
     }
-    
+
     /* Setting item with huge index should work */
     ok(pDPA_SetPtr(dpa2, 0x12345, (PVOID)0xdeadbeef), "\n");
     ret = pDPA_GetPtrIndex(dpa2, (PVOID)0xdeadbeef);
     ok(ret == 0x12345, "ret=%d\n", ret);
-          
+
     pDPA_DeleteAllPtrs(dpa2);
     ok(CheckDPA(dpa2, 0, &dw2), "dw2=0x%lx\n", dw2);
     pDPA_Destroy(dpa2);
@@ -396,7 +396,7 @@ static void test_dpa(void)
         hRes = pDPA_SaveStream(dpa, CB_Save, pStm, 0xdeadbeef);
         todo_wine ok(hRes == S_OK, "hRes=0x%lx\n", hRes);
         pDPA_Destroy(dpa);
-        
+
         hRes = IStream_Seek(pStm, liZero, STREAM_SEEK_SET, NULL);
         ok(hRes == S_OK, "hRes=0x%lx\n", hRes);
         hRes = pDPA_LoadStream(&dpa, CB_Load, pStm, 0xdeadbeef);
@@ -406,7 +406,7 @@ static void test_dpa(void)
 
         ret = IStream_Release(pStm);
         ok(!ret, "ret=%d\n", ret);
-       
+
         ret = IStorage_Release(pStg);
         ok(!ret, "ret=%d\n", ret);
 
index 0084a71..3d72e19 100644 (file)
@@ -1,6 +1,6 @@
 /* Unit test suite for header control.
  *
- * Copyright 2005 Vijay Kiran Kamuju 
+ * Copyright 2005 Vijay Kiran Kamuju
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -100,10 +100,10 @@ static LONG setItemUnicodeNotify(HWND hdex, int idx, LPCSTR text, LPCWSTR wText)
     hdexItem.mask       = HDI_TEXT;
     hdexItem.pszText    = (LPSTR)text;
     hdexItem.cchTextMax = 0;
-    
+
     hdexNotify.mask    = HDI_TEXT;
     hdexNotify.pszText = (LPWSTR)wText;
-    
+
     expect_notify(HDN_ITEMCHANGINGW, TRUE, (HDITEMA*)&hdexNotify);
     expect_notify(HDN_ITEMCHANGEDW, TRUE, (HDITEMA*)&hdexNotify);
     ret = (LONG)SendMessage(hdex, HDM_SETITEMA, (WPARAM)idx, (LPARAM)&hdexItem);
@@ -159,7 +159,7 @@ static HWND create_header_control (void)
     hlayout.prc = &rectwin;
     hlayout.pwpos = &winpos;
     SendMessageA(handle,HDM_LAYOUT,0,(LPARAM) &hlayout);
-    SetWindowPos(handle, winpos.hwndInsertAfter, winpos.x, winpos.y, 
+    SetWindowPos(handle, winpos.hwndInsertAfter, winpos.x, winpos.y,
                  winpos.cx, winpos.cy, 0);
 
     return handle;
@@ -200,7 +200,7 @@ static void compare_items(INT iCode, HDITEMA *hdi1, HDITEMA *hdi2, BOOL fUnicode
 
 static const char *str_items[] =
     {"First Item", "Second Item", "Third Item", "Fourth Item", "Replace Item", "Out Of Range Item"};
-    
+
 static const char pszUniTestA[] = "TST";
 static const WCHAR pszUniTestW[] = {'T','S','T',0};
 
@@ -432,12 +432,12 @@ static void test_header_control (void)
         TEST_GET_ITEM(i, 4);
         TEST_GET_ITEMCOUNT(6);
     }
-    
+
     SendMessageA(hWndHeader, HDM_SETUNICODEFORMAT, (WPARAM)TRUE, 0);
     setItemUnicodeNotify(hWndHeader, 3, pszUniTestA, pszUniTestW);
     SendMessageA(hWndHeader, WM_NOTIFYFORMAT, (WPARAM)hHeaderParentWnd, (LPARAM)NF_REQUERY);
     setItem(hWndHeader, 3, str_items[4], TRUE);
-    
+
     dont_expect_notify(HDN_GETDISPINFOA);
     dont_expect_notify(HDN_GETDISPINFOW);
     addItem(hWndHeader, 0, LPSTR_TEXTCALLBACKA);
@@ -488,30 +488,30 @@ LRESULT CALLBACK HeaderTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
         NMHEADERA *hdr = (NMHEADER *)lParam;
         EXPECTEDNOTIFY *expected;
         int i;
-        
+
         for (i=0; i<nUnexpectedNotify; i++)
             ok(hdr->hdr.code != unexpectedNotify[i], "Received invalid notify %d\n", hdr->hdr.code);
-        
+
         if (nReceivedNotify >= nExpectedNotify || hdr->hdr.hwndFrom != hWndHeader )
             break;
 
         expected = &expectedNotify[nReceivedNotify];
         if (hdr->hdr.code != expected->iCode)
             break;
-        
+
         nReceivedNotify++;
         compare_items(hdr->hdr.code, &expected->hdItem, hdr->pitem, expected->fUnicode);
         break;
     }
-    
+
     case WM_DESTROY:
         PostQuitMessage(0);
         break;
-  
+
     default:
         return DefWindowProcA(hWnd, msg, wParam, lParam);
     }
-    
+
     return 0L;
 }
 
@@ -535,7 +535,7 @@ static void init(void) {
     wc.lpfnWndProc = HeaderTestWndProc;
     RegisterClassA(&wc);
 
-    hHeaderParentWnd = CreateWindowExA(0, "HeaderTestClass", "Header test", WS_OVERLAPPEDWINDOW, 
+    hHeaderParentWnd = CreateWindowExA(0, "HeaderTestClass", "Header test", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0);
     assert(hHeaderParentWnd != NULL);
 }
index dd99df9..e8d147d 100644 (file)
@@ -43,7 +43,7 @@ static void test_images(void)
     r = ImageList_Add(himl, hbmp, 0);
     ok(r == 0, "should be zero\n");
 
-    hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_OWNERDRAWFIXED, 
+    hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_OWNERDRAWFIXED,
                 10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
     ok(hwnd != NULL, "failed to create listview window\n");
 
@@ -101,7 +101,7 @@ static void test_checkboxes(void)
                 text2[] = "Text2",
                 text3[] = "Text3";
 
-    hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT, 
+    hwnd = CreateWindowEx(0, "SysListView32", "foo", LVS_REPORT,
                 10, 10, 100, 200, hwndparent, NULL, NULL, NULL);
     ok(hwnd != NULL, "failed to create listview window\n");
 
index 9d801c9..35b7551 100644 (file)
@@ -24,7 +24,7 @@
 #include "winbase.h"
 #include "wingdi.h"
 #include "winuser.h"
-#include "commctrl.h" 
+#include "commctrl.h"
 
 #include "wine/test.h"
 
@@ -36,15 +36,15 @@ static const char progressTestClass[] = "ProgressBarTestClass";
 LRESULT CALLBACK ProgressTestWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch(msg) {
-    
+
     case WM_DESTROY:
         PostQuitMessage(0);
         break;
-  
+
     default:
         return DefWindowProcA(hWnd, msg, wParam, lParam);
     }
-    
+
     return 0L;
 }
 
@@ -69,7 +69,7 @@ LRESULT CALLBACK ProgressSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM
 static void update_window(HWND hWnd)
 {
     UpdateWindow(hWnd);
-    ok(!GetUpdateRect(hWnd, NULL, FALSE), "GetUpdateRect must return zero after UpdateWindow\n");    
+    ok(!GetUpdateRect(hWnd, NULL, FALSE), "GetUpdateRect must return zero after UpdateWindow\n");
 }
 
 
@@ -78,11 +78,11 @@ static void init(void)
     WNDCLASSA wc;
     INITCOMMONCONTROLSEX icex;
     RECT rect;
-    
+
     icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
     icex.dwICC   = ICC_PROGRESS_CLASS;
     InitCommonControlsEx(&icex);
-  
+
     wc.style = CS_HREDRAW | CS_VREDRAW;
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
@@ -94,13 +94,13 @@ static void init(void)
     wc.lpszClassName = progressTestClass;
     wc.lpfnWndProc = ProgressTestWndProc;
     RegisterClassA(&wc);
-    
+
     rect.left = 0;
     rect.top = 0;
     rect.right = 400;
     rect.bottom = 20;
     assert(AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE));
-    
+
     hProgressParentWnd = CreateWindowExA(0, progressTestClass, "Progress Bar Test", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, GetModuleHandleA(NULL), 0);
     assert(hProgressParentWnd != NULL);
@@ -110,23 +110,23 @@ static void init(void)
       0, 0, rect.right, rect.bottom, hProgressParentWnd, NULL, GetModuleHandleA(NULL), 0);
     assert(hProgressWnd != NULL);
     progress_wndproc = (WNDPROC)SetWindowLongPtr(hProgressWnd, GWLP_WNDPROC, (LPARAM)ProgressSubclassProc);
-    
+
     ShowWindow(hProgressParentWnd, SW_SHOWNORMAL);
     ok(GetUpdateRect(hProgressParentWnd, NULL, FALSE), "GetUpdateRect: There should be a region that needs to be updated\n");
-    update_window(hProgressParentWnd);    
+    update_window(hProgressParentWnd);
 }
 
 
 static void cleanup(void)
 {
     MSG msg;
-    
+
     PostMessageA(hProgressParentWnd, WM_CLOSE, 0, 0);
     while (GetMessageA(&msg,0,0,0)) {
         TranslateMessage(&msg);
         DispatchMessageA(&msg);
     }
-    
+
     UnregisterClassA(progressTestClass, GetModuleHandleA(NULL));
 }
 
@@ -147,20 +147,20 @@ static void test_redraw(void)
     /* PBM_SETPOS */
     ok(SendMessageA(hProgressWnd, PBM_SETPOS, 50, 0) == 10, "PBM_SETPOS must return the previous position\n");
     ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n");
-    
+
     /* PBM_DELTAPOS */
     ok(SendMessageA(hProgressWnd, PBM_DELTAPOS, 15, 0) == 50, "PBM_DELTAPOS must return the previous position\n");
     ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_DELTAPOS: The progress bar should be redrawn immediately\n");
-    
+
     /* PBM_SETPOS */
     ok(SendMessageA(hProgressWnd, PBM_SETPOS, 80, 0) == 65, "PBM_SETPOS must return the previous position\n");
     ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_SETPOS: The progress bar should be redrawn immediately\n");
-    
+
     /* PBM_STEPIT */
     ok(SendMessageA(hProgressWnd, PBM_STEPIT, 0, 0) == 80, "PBM_STEPIT must return the previous position\n");
     ok(!GetUpdateRect(hProgressWnd, NULL, FALSE), "PBM_STEPIT: The progress bar should be redrawn immediately\n");
     ok((UINT)SendMessageA(hProgressWnd, PBM_GETPOS, 0, 0) == 100, "PBM_GETPOS returned a wrong position\n");
-    
+
     /* PBM_SETRANGE and PBM_SETRANGE32:
     Usually the progress bar doesn't repaint itself immediately. If the
     position is not in the new range, it does.
@@ -198,8 +198,8 @@ static void test_redraw(void)
 START_TEST(progress)
 {
     init();
-    
+
     test_redraw();
-    
+
     cleanup();
 }
index 79be337..cbf6812 100644 (file)
@@ -39,7 +39,7 @@ static int CALLBACK sheet_callback(HWND hwnd, UINT msg, LPARAM lparam)
     }
     return 0;
 }
-        
+
 static INT_PTR CALLBACK page_dlg_proc(HWND hwnd, UINT msg, WPARAM wparam,
                                       LPARAM lparam)
 {
index 9455fbd..937ec1b 100644 (file)
@@ -169,7 +169,7 @@ static void ok_sequence(const struct message *expected, const char *context)
 static LRESULT WINAPI WndProc1(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     struct message msg;
-    
+
     if(message == WM_USER) {
         msg.wParam = wParam;
         msg.procnum = 1;
@@ -183,7 +183,7 @@ static WNDPROC origProc3;
 static LRESULT WINAPI WndProc3(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
 {
     struct message msg;
-    
+
     if(message == WM_USER) {
         msg.wParam = wParam;
         msg.procnum = 3;
@@ -195,12 +195,12 @@ static LRESULT WINAPI WndProc3(HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
 static LRESULT WINAPI WndProcSub(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam, UINT_PTR uldSubclass, DWORD_PTR dwRefData)
 {
     struct message msg;
-    
+
     if(message == WM_USER) {
         msg.wParam = wParam;
         msg.procnum = uldSubclass;
         add_message(&msg);
-        
+
         if(lParam) {
             if(dwRefData & DELETE_SELF) {
                 pRemoveWindowSubclass(hwnd, WndProcSub, uldSubclass);
@@ -275,20 +275,20 @@ static BOOL RegisterWindowClasses(void)
     cls.lpszMenuName = NULL;
     cls.lpszClassName = "TestSubclass";
     if(!RegisterClassA(&cls)) return FALSE;
-    
+
     return TRUE;
 }
 
 START_TEST(subclass)
 {
     HMODULE hdll;
-    
+
     hdll = GetModuleHandleA("comctl32.dll");
     assert(hdll);
     pSetWindowSubclass = (void*)GetProcAddress(hdll, "SetWindowSubclass");
     pRemoveWindowSubclass = (void*)GetProcAddress(hdll, "RemoveWindowSubclass");
     pDefSubclassProc = (void*)GetProcAddress(hdll, "DefSubclassProc");
-    
+
     if(!pSetWindowSubclass || !pRemoveWindowSubclass || !pDefSubclassProc)
         return;
 
index ec29a82..1ccc80c 100644 (file)
 #include "winuser.h"
 #include "winnls.h"
 #include "winreg.h"
-#include "commctrl.h" 
+#include "commctrl.h"
 
 #include "wine/test.h"
+
 static void MakeButton(TBBUTTON *p, int idCommand, int fsStyle, int nString) {
   p->iBitmap = -2;
   p->idCommand = idCommand;
@@ -41,7 +41,7 @@ static void MakeButton(TBBUTTON *p, int idCommand, int fsStyle, int nString) {
 static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch(msg) {
-                  
+
     case WM_CREATE:
     {
         TBBUTTON buttons[9];
@@ -98,7 +98,7 @@ static LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa
     case WM_DESTROY:
         PostQuitMessage(0);
         break;
-  
+
     default:
         return DefWindowProcA(hWnd, msg, wParam, lParam);
     }
@@ -111,9 +111,9 @@ START_TEST(toolbar)
     MSG msg;
     RECT rc;
     HWND hMainWnd;
-  
+
     InitCommonControls();
-  
+
     wc.style = CS_HREDRAW | CS_VREDRAW;
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
@@ -125,8 +125,8 @@ START_TEST(toolbar)
     wc.lpszClassName = "MyTestWnd";
     wc.lpfnWndProc = MyWndProc;
     RegisterClassA(&wc);
-    
-    hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, 
+
+    hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0);
     GetClientRect(hMainWnd, &rc);
 
index b71be91..d65155a 100644 (file)
 #include "winuser.h"
 #include "winnls.h"
 #include "winreg.h"
-#include "commctrl.h" 
+#include "commctrl.h"
 
 #include "wine/test.h"
+
 static HWND hMainWnd;
 
 static HWND hTree;
@@ -135,20 +135,20 @@ static void DoTest2(void)
 LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch(msg) {
-                  
+
     case WM_CREATE:
     {
         hTree = CreateWindowExA(WS_EX_CLIENTEDGE, WC_TREEVIEWA, NULL, WS_CHILD|WS_VISIBLE|
-            TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS, 
+            TVS_LINESATROOT|TVS_HASLINES|TVS_HASBUTTONS,
             0, 0, 300, 50, hWnd, (HMENU)100, GetModuleHandleA(0), 0);
-    
+
         SetFocus(hTree);
         return 0;
     }
     case WM_NOTIFY:
     {
         NMHDR *pHdr = (NMHDR *)lParam;
-    
+
         if (pHdr->idFrom == 100) {
             NMTREEVIEWA *pTreeView = (LPNMTREEVIEWA) lParam;
             switch(pHdr->code) {
@@ -166,15 +166,15 @@ LRESULT CALLBACK MyWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
         }
         return 0;
     }
-  
+
     case WM_SIZE:
         MoveWindow(hTree, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
         break;
-      
+
     case WM_DESTROY:
         PostQuitMessage(0);
         break;
-  
+
     default:
         return DefWindowProcA(hWnd, msg, wParam, lParam);
     }
@@ -187,11 +187,11 @@ START_TEST(treeview)
     MSG msg;
     INITCOMMONCONTROLSEX icex;
     RECT rc;
-  
+
     icex.dwSize = sizeof(INITCOMMONCONTROLSEX);
     icex.dwICC   = ICC_TREEVIEW_CLASSES;
     InitCommonControlsEx(&icex);
-  
+
     wc.style = CS_HREDRAW | CS_VREDRAW;
     wc.cbClsExtra = 0;
     wc.cbWndExtra = 0;
@@ -203,9 +203,9 @@ START_TEST(treeview)
     wc.lpszClassName = "MyTestWnd";
     wc.lpfnWndProc = MyWndProc;
     RegisterClassA(&wc);
-    
-    
-    hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW, 
+
+
+    hMainWnd = CreateWindowExA(0, "MyTestWnd", "Blah", WS_OVERLAPPEDWINDOW,
       CW_USEDEFAULT, CW_USEDEFAULT, 680, 260, NULL, NULL, GetModuleHandleA(NULL), 0);
     GetClientRect(hMainWnd, &rc);
 
index 7268c48..c69657a 100644 (file)
@@ -54,7 +54,7 @@ static HWND create_updown_control (HWND hWndEdit)
         UDS_SETBUDDYINT | UDS_ALIGNRIGHT |
         UDS_ARROWKEYS | UDS_NOTHOUSANDS,
         /* placement */
-        0, 0, 8, 8, 
+        0, 0, 8, 8,
         /* parent, etc */
         NULL, NULL, hinst, NULL);
     assert (hWndUpDown);
index 5ace767..2748248 100644 (file)
@@ -1,4 +1,4 @@
-/* \r
+/*\r
  * Unit test suite for comdlg32 API functions: printer dialogs\r
  *\r
  * Copyright 2006 Detlef Riekenberg\r
index 62a57eb..addd40f 100755 (executable)
@@ -127,7 +127,7 @@ static void test_createdibitmap(void)
     bmih.biPlanes = 1;
     bmih.biBitCount = 32;
     bmih.biCompression = BI_RGB;
+
     /* First create an un-initialised bitmap.  The depth of the bitmap
        should match that of the hdc and not that supplied in bmih.
     */
@@ -137,7 +137,7 @@ static void test_createdibitmap(void)
     ok(hbm != NULL, "CreateDIBitmap failed\n");
     test_bitmap_info(hbm, screen_depth, &bmih);
     DeleteObject(hbm);
-    
+
     /* Then 16 */
     bmih.biBitCount = 16;
     hbm = CreateDIBitmap(hdc, &bmih, 0, NULL, NULL, 0);
@@ -161,14 +161,14 @@ static void test_createdibitmap(void)
     ok(hbm != NULL, "CreateDIBitmap failed\n");
     test_bitmap_info(hbm, 1, &bmih);
     DeleteObject(hbm);
-    
+
     /* Then 16 */
     bmih.biBitCount = 16;
     hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0);
     ok(hbm != NULL, "CreateDIBitmap failed\n");
     test_bitmap_info(hbm, 1, &bmih);
     DeleteObject(hbm);
-    
+
     /* Then 1 */
     bmih.biBitCount = 1;
     hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0);
@@ -187,14 +187,14 @@ static void test_createdibitmap(void)
     ok(hbm != NULL, "CreateDIBitmap failed\n");
     test_bitmap_info(hbm, screen_depth, &bmih);
     DeleteObject(hbm);
-    
+
     /* Then 16 */
     bmih.biBitCount = 16;
     hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0);
     ok(hbm != NULL, "CreateDIBitmap failed\n");
     test_bitmap_info(hbm, screen_depth, &bmih);
     DeleteObject(hbm);
-    
+
     /* Then 1 */
     bmih.biBitCount = 1;
     hbm = CreateDIBitmap(hdcmem, &bmih, 0, NULL, NULL, 0);
@@ -214,7 +214,7 @@ static void test_createdibitmap(void)
         test_bitmap_info(hbm, 1, &bmih);
         DeleteObject(hbm);
     }
-    
+
     ReleaseDC(0, hdc);
 }
 
@@ -451,8 +451,8 @@ static void test_dibsections(void)
     ok(dibsec.dsBmih.biClrUsed == 2,
         "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 2);
 
-    /* Test if the old BITMAPCOREINFO structure is supported */    
-        
+    /* Test if the old BITMAPCOREINFO structure is supported */
+
     pbci->bmciHeader.bcSize = sizeof(BITMAPCOREHEADER);
     pbci->bmciHeader.bcBitCount = 0;
 
@@ -572,9 +572,9 @@ static void test_dibsections(void)
     oldbm = SelectObject(hdcmem, hdib);
 
     for (i = 0; i < 256; i++) {
-        test_color(hdcmem, DIBINDEX(i), 
+        test_color(hdcmem, DIBINDEX(i),
             RGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), 0, 0);
-        test_color(hdcmem, PALETTERGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), 
+        test_color(hdcmem, PALETTERGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue),
             RGB(pbmi->bmiColors[i].rgbRed, pbmi->bmiColors[i].rgbGreen, pbmi->bmiColors[i].rgbBlue), 0, 0);
     }
 
@@ -705,19 +705,19 @@ static void test_dibsections(void)
     ret = GetDIBColorTable(hdcmem, 0, 256, rgb);
     ok(ret == 256, "GetDIBColorTable returned %d\n", ret);
     for (i = 0; i < 256; i++) {
-        ok(rgb[i].rgbRed == plogpal->palPalEntry[i].peRed && 
-            rgb[i].rgbBlue == plogpal->palPalEntry[i].peBlue && 
-            rgb[i].rgbGreen == plogpal->palPalEntry[i].peGreen, 
+        ok(rgb[i].rgbRed == plogpal->palPalEntry[i].peRed &&
+            rgb[i].rgbBlue == plogpal->palPalEntry[i].peBlue &&
+            rgb[i].rgbGreen == plogpal->palPalEntry[i].peGreen,
             "GetDIBColorTable returns table %d: r%02x g%02x b%02x res%02x\n",
             i, rgb[i].rgbRed, rgb[i].rgbGreen, rgb[i].rgbBlue, rgb[i].rgbReserved);
     }
 
     for (i = 0; i < 256; i++) {
-        test_color(hdcmem, DIBINDEX(i), 
+        test_color(hdcmem, DIBINDEX(i),
             RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0);
-        test_color(hdcmem, PALETTEINDEX(i), 
+        test_color(hdcmem, PALETTEINDEX(i),
             RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0);
-        test_color(hdcmem, PALETTERGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 
+        test_color(hdcmem, PALETTERGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue),
             RGB(plogpal->palPalEntry[i].peRed, plogpal->palPalEntry[i].peGreen, plogpal->palPalEntry[i].peBlue), 0, 0);
     }
 
@@ -729,7 +729,7 @@ static void test_dibsections(void)
 
     DeleteDC(hdcmem);
     ReleaseDC(0, hdc);
-}    
+}
 
 void test_mono_dibsection(void)
 {
@@ -877,7 +877,7 @@ todo_wine {
     /*
      * Now a dib section with a strange colour map just for fun.  This behaves just like an inverted one.
      */
+
     pbmi->bmiColors[0].rgbRed = 0xff;
     pbmi->bmiColors[0].rgbGreen = 0x0;
     pbmi->bmiColors[0].rgbBlue = 0x0;
index c2aee7c..c7c3b8f 100755 (executable)
@@ -49,7 +49,7 @@ static void test_solidbrush(void)
 
     for(i=0; i<sizeof(stock)/sizeof(stock[0]); i++) {
         solidBrush = CreateSolidBrush(stock[i].color);
-        
+
         if(stock[i].stockobj != -1) {
             stockBrush = (HBRUSH)GetStockObject(stock[i].stockobj);
             ok(stockBrush!=solidBrush, "Stock %s brush equals solid %s brush\n", stock[i].name, stock[i].name);
@@ -61,7 +61,7 @@ static void test_solidbrush(void)
         ok( ret !=0, "GetObject on solid %s brush failed, error=%ld\n", stock[i].name, GetLastError());
         ok(br.lbStyle==BS_SOLID, "%s brush has wrong style, got %d expected %d\n", stock[i].name, br.lbStyle, BS_SOLID);
         ok(br.lbColor==stock[i].color, "%s brush has wrong color, got 0x%08lx expected 0x%08lx\n", stock[i].name, br.lbColor, stock[i].color);
-        
+
         if(stockBrush) {
             /* Sanity check, make sure the colors being compared do in fact have a stock brush */
             ret = GetObject(stockBrush, sizeof(br), &br);
@@ -73,7 +73,7 @@ static void test_solidbrush(void)
         ok(GetObject(solidBrush, sizeof(br), &br)==0, "GetObject succeeded on a deleted %s brush\n", stock[i].name);
     }
 }
+
 START_TEST(brush)
 {
     test_solidbrush();
index 079fbcc..7d94380 100644 (file)
@@ -54,7 +54,7 @@ static void test_GetRandomRgn(void)
     GetRgnBox(hrgn, &ret_rc);
     ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n",
        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
+
     ret = GetRandomRgn(hdc, hrgn, 2);
     ok(ret == 0, "GetRandomRgn rets %d\n", ret);
 
@@ -96,7 +96,7 @@ static void test_GetRandomRgn(void)
     GetRgnBox(hrgn, &ret_rc);
     ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n",
        ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom);
+
     IntersectRect(&rc2, &rc, &rc2);
 
     ret = GetRandomRgn(hdc, hrgn, 3);
index 5b50632..4942ff4 100644 (file)
@@ -154,7 +154,7 @@ static void test_savedc(void)
     ret = SaveDC(hdc);
     ok(ret == 1, "ret = %d\n", ret);
     ret = SaveDC(hdc);
-    ok(ret == 2, "ret = %d\n", ret); 
+    ok(ret == 2, "ret = %d\n", ret);
     ret = RestoreDC(hdc, -4);
     ok(!ret, "ret = %d\n", ret);
     ret = RestoreDC(hdc, 3);
index 699d9b2..bdb4abc 100644 (file)
@@ -78,7 +78,7 @@ static void test_logfont(void)
     memset(&lf, 'A', sizeof(lf));
     hfont = CreateFontIndirectA(&lf);
     ok(hfont != 0, "CreateFontIndirectA with strange LOGFONT failed\n");
-    
+
     lf.lfFaceName[LF_FACESIZE - 1] = 0;
     check_font("AAA...", &lf, hfont);
     DeleteObject(hfont);
@@ -403,7 +403,7 @@ static void test_GetGlyphIndices()
     TEXTMETRIC textm;
 
     typedef BOOL (WINAPI *fnGetGlyphIndicesW)(HDC hdc, LPCWSTR lpstr, INT count, LPWORD pgi, DWORD flags);
-    fnGetGlyphIndicesW GetGlyphIndicesW = (fnGetGlyphIndicesW)GetProcAddress(LoadLibrary("gdi32"), 
+    fnGetGlyphIndicesW GetGlyphIndicesW = (fnGetGlyphIndicesW)GetProcAddress(LoadLibrary("gdi32"),
                                            "GetGlyphIndicesW");
     if (!GetGlyphIndicesW) {
         trace("GetGlyphIndices not available on platform\n");
@@ -425,7 +425,7 @@ static void test_GetGlyphIndices()
     flags = 0;
     charcount = GetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags);
     ok(charcount == 5, "GetGlyphIndices count of glyphs should = 5 not %ld\n", charcount);
-    ok(glyphs[4] == textm.tmDefaultChar, "GetGlyphIndices should have returned a %04x not %04x\n", 
+    ok(glyphs[4] == textm.tmDefaultChar, "GetGlyphIndices should have returned a %04x not %04x\n",
                     textm.tmDefaultChar, glyphs[4]);
 }
 
index 2baeb2d..28faaea 100644 (file)
@@ -118,24 +118,24 @@ void test_isotropic_mapping(void)
 {
     SIZE win, vp;
     HDC hdc = GetDC(0);
-    
+
     SetMapMode(hdc, MM_ISOTROPIC);
-    
+
     /* MM_ISOTROPIC is set up like MM_LOMETRIC.
        Initial values after SetMapMode():
        (1 inch = 25.4 mm)
-       
+
                        Windows 9x:               Windows NT:
        Window Ext:     254 x -254                HORZSIZE*10 x VERTSIZE*10
        Viewport Ext:   LOGPIXELSX x LOGPIXELSY   HORZRES x -VERTRES
-       
+
        To test without rounding errors, we have to use multiples of
        these values!
      */
-    
+
     GetWindowExtEx(hdc, &win);
     GetViewportExtEx(hdc, &vp);
-    
+
     test_SetViewportExt(hdc, 10 * vp.cx, 10 * vp.cy, 10 * vp.cx, 10 * vp.cy);
     test_SetWindowExt(hdc, win.cx, win.cy, 10 * vp.cx, 10 * vp.cy);
     test_SetWindowExt(hdc, 2 * win.cx, win.cy, 10 * vp.cx, 5 * vp.cy);
@@ -146,10 +146,10 @@ void test_isotropic_mapping(void)
     test_SetViewportExt(hdc, 4 * vp.cx, 2 * vp.cy, 2 * vp.cx, 2 * vp.cy);
     test_SetWindowExt(hdc, 4 * win.cx, 2 * win.cy, 2 * vp.cx, vp.cy);
     test_SetViewportExt(hdc, -2 * vp.cx, -4 * vp.cy, -2 * vp.cx, -vp.cy);
-    test_SetViewportExt(hdc, -2 * vp.cx, -1 * vp.cy, -2 * vp.cx, -vp.cy);    
+    test_SetViewportExt(hdc, -2 * vp.cx, -1 * vp.cy, -2 * vp.cx, -vp.cy);
     test_SetWindowExt(hdc, -4 * win.cx, -2 * win.cy, -2 * vp.cx, -vp.cy);
     test_SetWindowExt(hdc, 4 * win.cx, -4 * win.cy, -vp.cx, -vp.cy);
-    
+
     ReleaseDC(0, hdc);
 }
 
index 3610bf8..664dc0e 100755 (executable)
@@ -304,7 +304,7 @@ static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table,
     }
 
 
-    return 1;        
+    return 1;
 }
 
 void test_SaveDC(void)
@@ -665,7 +665,7 @@ static int compare_mf_bits (const HMETAFILE mf, const unsigned char *bits, UINT
     ok (diff == 0, "%s: mfsize=%d, bsize=%d, diff=%d\n",
         desc, mfsize, bsize, diff);
 
-    return diff; 
+    return diff;
 }
 
 static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const char *desc)
@@ -701,7 +701,7 @@ static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const
     ok(diff == 0, "%s: mfsize=%ld, bsize=%d, diff=%d\n",
         desc, mfsize, bsize, diff);
 
-    return diff; 
+    return diff;
 }
 
 /* For debugging or dumping the raw EMFs produced by
@@ -1162,7 +1162,7 @@ static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETAREC
 {
     LPMETAFILEPICT lpMFP = (LPMETAFILEPICT)lpData;
     POINT mapping[2] = { { 0, 0 }, { 10, 10 } };
-    /* When using MM_TEXT Win9x does not update the mapping mode 
+    /* When using MM_TEXT Win9x does not update the mapping mode
      * until a record is played which actually outputs something */
     PlayEnhMetaFileRecord(hdc, lpHTable, lpEMFR, nObj);
     LPtoDP(hdc, mapping, 2);
@@ -1183,7 +1183,7 @@ static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETAREC
         else
         {
             ok(lpMFP->mm == MM_ANISOTROPIC, "mm=%ld\n", lpMFP->mm);
-            
+
             x0 = MulDiv(0, GetDeviceCaps(hdc, HORZSIZE) * 100, GetDeviceCaps(hdc, HORZRES));
             y0 = MulDiv(0, GetDeviceCaps(hdc, VERTSIZE) * 100, GetDeviceCaps(hdc, VERTRES));
             x1 = MulDiv(10, GetDeviceCaps(hdc, HORZSIZE) * 100, GetDeviceCaps(hdc, HORZRES));
index 9947639..bff9cbf 100644 (file)
@@ -57,7 +57,7 @@ static void test_DIB_PAL_COLORS(void) {
     logpalette->palVersion = 0x300;
     logpalette->palNumEntries = 8;
     memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) );
-    hpal = CreatePalette( logpalette ); 
+    hpal = CreatePalette( logpalette );
     hpalOld = SelectPalette( memhdc, hpal, FALSE );
     ok( hpalOld != NULL, "error=%ld\n", GetLastError() );
 
index 6e7d28c..700e82d 100644 (file)
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
-/* 
+/*
  * TODO:
  * It seems under Windows XP, 2003 and Vista these functions are not implemented
  * in iphlpapi. Move the implementation and tests there.
index 8be4ba0..9fcf56c 100755 (executable)
@@ -276,7 +276,7 @@ static void test_get_atom_name(void)
             if (i)
             {
                 WCHAR res[20];
-                
+
                 ok( (len > 1) && (len < 7), "bad length %d\n", len );
                 print_integral( res, i );
                 memset( res + lstrlenW(res) + 1, 'a', 10 * sizeof(WCHAR));
@@ -448,7 +448,7 @@ static void test_local_get_atom_name(void)
     len = GetAtomNameA( atom, buf, 6 );
     ok( len == 5, "bad length %d\n", len );
     ok( !memcmp( buf, "fooba\0....", 10 ), "bad buffer contents\n" );
+
     /* Repeat, unicode-style */
     if (unicode_OS)
     {
@@ -460,7 +460,7 @@ static void test_local_get_atom_name(void)
         ok( len == 5, "bad length %d\n", len );
         ok( !memcmp( bufW, resW, 10*sizeof(WCHAR) ), "bad buffer contents\n" );
     }
+
     /* Check error code returns */
     memset(buf, '.', 10);
     ok( !GetAtomNameA( atom, buf,  0 ), "succeeded\n" );
@@ -546,7 +546,7 @@ static void test_local_get_atom_name(void)
             if (i)
             {
                 WCHAR res[20];
-                
+
                 ok( (len > 1) && (len < 7), "bad length %d\n", len );
                 print_integral( res, i );
                 memset( res + lstrlenW(res) + 1, 'a', 10 * sizeof(WCHAR));
index 8bce2ce..6d2ec16 100755 (executable)
@@ -100,7 +100,7 @@ static void test_FindFirstChangeNotification(void)
        "FindFirstChangeNotification error: %ld\n", GetLastError());
 
     if (0) /* This documents win2k behavior. It crashes on win98. */
-    { 
+    {
         change = FindFirstChangeNotificationA(NULL, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
         ok(change == NULL && GetLastError() == ERROR_PATH_NOT_FOUND,
         "FindFirstChangeNotification error: %ld\n", GetLastError());
@@ -198,7 +198,7 @@ static void test_FindFirstChangeNotification(void)
 
     /* Create a file */
     thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_FILE_NAME);
-    file = CreateFileA(filename2, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS, 
+    file = CreateFileA(filename2, GENERIC_WRITE|GENERIC_READ, 0, NULL, CREATE_ALWAYS,
                        FILE_ATTRIBUTE_NORMAL, 0);
     ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
     ret = CloseHandle(file);
@@ -217,7 +217,7 @@ static void test_FindFirstChangeNotification(void)
 
     /* Change last write time by writing to a file */
     thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE);
-    file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 
+    file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
                        FILE_ATTRIBUTE_NORMAL, 0);
     ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
     ret = WriteFile(file, buffer, sizeof(buffer), &count, NULL);
@@ -228,7 +228,7 @@ static void test_FindFirstChangeNotification(void)
 
     /* Change file size by truncating a file */
     thread = StartNotificationThread(workdir, FALSE, FILE_NOTIFY_CHANGE_SIZE);
-    file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 
+    file = CreateFileA(filename2, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
                        FILE_ATTRIBUTE_NORMAL, 0);
     ok(file != INVALID_HANDLE_VALUE, "CreateFileA error: %ld\n", GetLastError());
     ret = WriteFile(file, buffer, sizeof(buffer) / 2, &count, NULL);
@@ -238,7 +238,7 @@ static void test_FindFirstChangeNotification(void)
     ok(FinishNotificationThread(thread), "Missed notification\n");
 
     /* clean up */
-    
+
     ret = DeleteFileA(filename2);
     ok(ret, "DeleteFileA error: %ld\n", GetLastError());
 
@@ -267,7 +267,7 @@ static void test_ffcn(void)
 
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
@@ -351,7 +351,7 @@ static void test_readdirectorychanges(void)
     RemoveDirectoryW( subsubdir );
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
@@ -361,8 +361,8 @@ static void test_readdirectorychanges(void)
     ok(r==FALSE, "should return false\n");
 
     fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED;
-    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, 
-                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 
+    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY,
+                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
                         OPEN_EXISTING, fflags, NULL);
     ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n");
 
@@ -555,13 +555,13 @@ static void test_readdirectorychanges_null(void)
 
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
     fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED;
-    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, 
-                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 
+    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY,
+                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
                         OPEN_EXISTING, fflags, NULL);
     ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n");
 
@@ -648,13 +648,13 @@ static void test_readdirectorychanges_filedir(void)
     DeleteFileW( file );
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
     fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED;
-    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY, 
-                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, 
+    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE|FILE_LIST_DIRECTORY,
+                        FILE_SHARE_READ|FILE_SHARE_WRITE, NULL,
                         OPEN_EXISTING, fflags, NULL);
     ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n");
 
index 5036d3a..d090b88 100755 (executable)
@@ -34,7 +34,7 @@ static void test_null_source(void)
     len = WideCharToMultiByte(CP_ACP, 0, NULL, 0, NULL, 0, NULL, NULL);
     GLE = GetLastError();
     ok(!len && GLE == ERROR_INVALID_PARAMETER,
-        "WideCharToMultiByte returned %d with GLE=%ld (expected 0 with ERROR_INVALID_PARAMETER)\n", 
+        "WideCharToMultiByte returned %d with GLE=%ld (expected 0 with ERROR_INVALID_PARAMETER)\n",
         len, GLE);
 }
 
index 794ded2..5fb8613 100755 (executable)
@@ -905,7 +905,7 @@ static void test_LoopbackRead(HANDLE hcom)
     read = 0;
     read1 =0;
     i=0;
-    do 
+    do
     {
        res = ReadFile(hcom, rbuf+read, sizeof(rbuf-read), &read1, NULL);
        ok(res, "Readfile failed\n");
@@ -916,7 +916,7 @@ static void test_LoopbackRead(HANDLE hcom)
     after =  GetTickCount();
     ok( read == sizeof(tbuf),"ReadFile read %ld bytes, expected %d\n", read, sizeof(tbuf));
     trace("Plain Read for %d char at %d baud took %ld ms\n", sizeof(tbuf), SLOWBAUD, after-before);
-    
+
 }
 
 static void test_LoopbackCtsRts(HANDLE hcom)
@@ -1549,7 +1549,7 @@ static void  test_WaitDcd(HANDLE hcom)
        args[1] = CLRDTR;
 }
 
-/* 
+/*
    Set Break after timeout
 */
 static DWORD CALLBACK set_CommBreak(LPVOID arg)
index 8a3dbf5..e6bff71 100755 (executable)
@@ -216,7 +216,7 @@ static void test_CreateDirectoryA(void)
     GetTempPathA(MAX_PATH, tmpdir);
     lstrcatA(tmpdir, "Please Remove Me/Please Remove Me");
     ret = CreateDirectoryA(tmpdir, NULL);
-    ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, 
+    ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND,
        "CreateDirectoryA(%s): ret=%d err=%ld\n", tmpdir, ret, GetLastError());
     RemoveDirectoryA(tmpdir);
 
@@ -385,13 +385,13 @@ static void test_CreateDirectoryW(void)
        "CreateDirectoryW with * wildcard name should fail with error 183, ret=%s error=%ld\n",
        ret ? " True" : "False", GetLastError());
     ret = RemoveDirectoryW(tmpdir);
-    
+
     GetTempPathW(MAX_PATH, tmpdir);
     lstrcatW(tmpdir, tmp_dir_name);
     lstrcatW(tmpdir, slashW);
     lstrcatW(tmpdir, tmp_dir_name);
     ret = CreateDirectoryW(tmpdir, NULL);
-    ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND, 
+    ok(ret == FALSE && GetLastError() == ERROR_PATH_NOT_FOUND,
       "CreateDirectoryW with multiple nonexistent directories in path should fail\n");
     ret = RemoveDirectoryW(tmpdir);
 }
index e946413..4c32167 100755 (executable)
@@ -1139,7 +1139,7 @@ static void test_file_sharing(void)
                             "  indexes = %d, %d, %d, %d\n"
                             "  modes   =\n  %lx/%lx/%lx/%lx\n",
                            ret,
-                            a1, s1, a2, s2, 
+                            a1, s1, a2, s2,
                             access_modes[a1], sharing_modes[s1],
                            access_modes[a2], sharing_modes[s2]
                             );
@@ -1406,11 +1406,11 @@ static void test_OpenFile_exists(void)
 {
     HFILE hFile;
     OFSTRUCT ofs;
-    
+
     static const char *file = "\\winver.exe";
     char buff[MAX_PATH];
     UINT length;
-    
+
     length = GetSystemDirectoryA(buff, MAX_PATH);
 
     if ((length + lstrlen(file) < MAX_PATH))
index a6284a0..51da38d 100755 (executable)
@@ -49,7 +49,7 @@ START_TEST(heap)
         SIZE_T heap_size;
         mem = HeapAlloc(GetProcessHeap(), 0, size);
         heap_size = HeapSize(GetProcessHeap(), 0, mem);
-        ok(heap_size == size || heap_size == resize_9x(size), 
+        ok(heap_size == size || heap_size == resize_9x(size),
             "HeapSize returned %lu instead of %lu or %lu\n", heap_size, size, resize_9x(size));
         HeapFree(GetProcessHeap(), 0, mem);
     }
index 2ef2edb..295b7e0 100755 (executable)
@@ -801,14 +801,14 @@ static void test_CompareStringA(void)
 
     ret = lstrcmpA(NULL, "");
     ok (ret == -1, "lstrcmpA(NULL, \"\") should return -1, got %d\n", ret);
-  
+
     ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"EndDialog",-1,"_Property",-1);
     ok( ret == 3, "EndDialog vs _Property ... expected 3, got %d\n", ret);
 
     ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"osp_vba.sreg0070",-1,"_IEWWBrowserComp",-1);
     ok( ret == 3, "osp_vba.sreg0070 vs _IEWWBrowserComp ... expected 3, got %d\n", ret);
 
-    ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"r",-1,"\\",-1); 
+    ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"r",-1,"\\",-1);
     ok( ret == 3, "r vs \\ ... expected 3, got %d\n", ret);
 
     ret = CompareStringA(LOCALE_SYSTEM_DEFAULT,0,"osp_vba.sreg0031", -1, "OriginalDatabase", -1 );
index b5f99ad..e3deea4 100755 (executable)
@@ -107,7 +107,7 @@ static int mailslot_test(void)
             "slot write\n");
 
     /*
-     * we can't read from this client, 
+     * we can't read from this client,
      * but we should be able to write to it
      */
     ok( !ReadFile( hWriter, buffer, sizeof buffer/2, &count, NULL),
index c8d65cc..081f096 100755 (executable)
@@ -76,7 +76,7 @@ static void testGetModuleFileName(const char* name)
         ok(len1W / 2 == len2W, "Correct length in GetModuleFilenameW with buffer too small (%ld/%ld)\n", len1W / 2, len2W);
     }
 
-    ok(len1A / 2 == len2A || 
+    ok(len1A / 2 == len2A ||
        len1A / 2 == len2A + 1, /* Win9x */
        "Correct length in GetModuleFilenameA with buffer too small (%ld/%ld)\n", len1A / 2, len2A);
 }
@@ -136,7 +136,7 @@ static void testLoadLibraryA_Wrong(void)
     SetLastError(0xdeadbeef);
     hModule = LoadLibraryA("non_ex_pv.dll");
     ok( !hModule, "non_ex_pv.dll should be not loadable\n");
-    ok( GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_DLL_NOT_FOUND, 
+    ok( GetLastError() == ERROR_MOD_NOT_FOUND || GetLastError() == ERROR_DLL_NOT_FOUND,
         "Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND (win9x), got %08lx\n", GetLastError());
 
     /* Just in case */
index 4bab5ce..17ccdd6 100755 (executable)
@@ -373,7 +373,7 @@ static void test_InitPathA(CHAR *newdir, CHAR *curDrive, CHAR *otherDrive)
   sprintf(tmpstr,"%s\\%s",newdir,LONGDIR);
   ok(CreateDirectoryA(tmpstr,NULL),"CreateDirectoryA failed\n");
   bRes = CreateDirectoryA("c:",NULL);
-  ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED  || 
+  ok(!bRes && (GetLastError() == ERROR_ACCESS_DENIED  ||
                GetLastError() == ERROR_ALREADY_EXISTS),
      "CreateDirectoryA(\"c:\" should have failed (%ld)\n", GetLastError());
   bRes = CreateDirectoryA("c:\\",NULL);
index 5b0286f..dd5a4be 100755 (executable)
@@ -205,7 +205,7 @@ static void test_CreateNamedPipe(int pipemode)
             todo_wine {
                 ok(SetNamedPipeHandleState(hFile, &lpmode, NULL, NULL), "Change mode\n");
             }
-        
+
             memset(ibuf, 0, sizeof(ibuf));
             ok(WriteFile(hnp, obuf, sizeof(obuf), &written, NULL), "WriteFile5a\n");
             ok(written == sizeof(obuf), "write file len 3a\n");
@@ -223,7 +223,7 @@ static void test_CreateNamedPipe(int pipemode)
             }
             pbuf = ibuf;
             ok(memcmp(obuf, pbuf, sizeof(obuf)) == 0, "content 5a check\n");
-    
+
             /* Multiple writes in the reverse direction */
             /* the write of obuf2 from write4 should still be in the buffer */
             ok(PeekNamedPipe(hnp, ibuf, sizeof(ibuf), &readden, &avail, NULL), "Peek6a\n");
@@ -741,9 +741,9 @@ static void test_CreatePipe(void)
     DWORD read;
     char readbuf[32];
 
-    pipe_attr.nLength = sizeof(SECURITY_ATTRIBUTES); 
-    pipe_attr.bInheritHandle = TRUE; 
-    pipe_attr.lpSecurityDescriptor = NULL; 
+    pipe_attr.nLength = sizeof(SECURITY_ATTRIBUTES);
+    pipe_attr.bInheritHandle = TRUE;
+    pipe_attr.lpSecurityDescriptor = NULL;
     ok(CreatePipe(&piperead, &pipewrite, &pipe_attr, 0) != 0, "CreatePipe failed\n");
     ok(WriteFile(pipewrite,PIPENAME,sizeof(PIPENAME), &written, NULL), "Write to anonymous pipe failed\n");
     ok(written == sizeof(PIPENAME), "Write to anonymous pipe wrote %ld bytes instead of %d\n", written,sizeof(PIPENAME));
index b28f28d..3a62b9b 100755 (executable)
@@ -766,7 +766,7 @@ static void test_CommandLine(void)
     okChildString("Arguments", "argvA0", buffer);
     release_memory();
     assert(DeleteFileA(resfile) != 0);
-    
+
     get_file_name(resfile);
     len = GetFullPathNameA(selfname, MAX_PATH, fullpath, &lpFilePart);
     assert ( lpFilePart != 0);
@@ -783,7 +783,7 @@ static void test_CommandLine(void)
     okChildString("Arguments", "argvA0", buffer);
     release_memory();
     assert(DeleteFileA(resfile) != 0);
-    
+
 }
 
 static void test_Directory(void)
@@ -831,7 +831,7 @@ static void cmpEnvironment(const char* gesA)
     BOOL                found;
 
     clen = GetPrivateProfileIntA("EnvironmentA", "len", 0, resfile);
-    
+
     /* now look each parent env in child */
     if ((ptrA = gesA) != NULL)
     {
@@ -846,7 +846,7 @@ static void cmpEnvironment(const char* gesA)
             }
             found = i < clen;
             ok(found, "Parent-env string %s isn't in child process\n", ptrA);
-            
+
             ptrA += strlen(ptrA) + 1;
             release_memory();
         }
@@ -900,7 +900,7 @@ static void test_Environment(void)
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */
     WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
-    
+
     cmpEnvironment(GetEnvironmentStringsA());
     release_memory();
     assert(DeleteFileA(resfile) != 0);
@@ -913,7 +913,7 @@ static void test_Environment(void)
     /* the basics */
     get_file_name(resfile);
     sprintf(buffer, "%s tests/process.c %s", selfname, resfile);
-    
+
     child_env_len = 0;
     ptr = GetEnvironmentStringsA();
     while(*ptr)
@@ -925,7 +925,7 @@ static void test_Environment(void)
     /* Add space for additional environment variables */
     child_env_len += 256;
     child_env = HeapAlloc(GetProcessHeap(), 0, child_env_len);
-    
+
     ptr = child_env;
     sprintf(ptr, "=%c:=%s", 'C', "C:\\FOO\\BAR");
     ptr += strlen(ptr) + 1;
@@ -956,7 +956,7 @@ static void test_Environment(void)
     ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
     /* child process has changed result file, so let profile functions know about it */
     WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
-    
+
     cmpEnvironment(child_env);
 
     HeapFree(GetProcessHeap(), 0, child_env);
@@ -1028,7 +1028,7 @@ static  void    test_DebuggingFlag(void)
     ok(CreateProcessA(NULL, buffer, NULL, NULL, FALSE, DEBUG_PROCESS, NULL, NULL, &startup, &info), "CreateProcess\n");
 
     /* get all startup events up to the entry point break exception */
-    do 
+    do
     {
         ok(WaitForDebugEvent(&de, INFINITE), "reading debug event\n");
         ContinueDebugEvent(de.dwProcessId, de.dwThreadId, DBG_CONTINUE);
@@ -1104,7 +1104,7 @@ static void test_Console(void)
     startup.hStdError = startup.hStdOutput;
 
     ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbi), "Getting sb info\n");
-    ok(GetConsoleMode(startup.hStdInput, &modeIn) && 
+    ok(GetConsoleMode(startup.hStdInput, &modeIn) &&
        GetConsoleMode(startup.hStdOutput, &modeOut), "Getting console modes\n");
     cpIn = GetConsoleCP();
     cpOut = GetConsoleOutputCP();
@@ -1120,7 +1120,7 @@ static void test_Console(void)
 
     /* now get the modification the child has made, and resets parents expected values */
     ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbiC), "Getting sb info\n");
-    ok(GetConsoleMode(startup.hStdInput, &modeInC) && 
+    ok(GetConsoleMode(startup.hStdInput, &modeInC) &&
        GetConsoleMode(startup.hStdOutput, &modeOutC), "Getting console modes\n");
 
     SetConsoleMode(startup.hStdInput, modeIn);
@@ -1177,17 +1177,17 @@ static void test_Console(void)
     assert(DeleteFileA(resfile) != 0);
 
     ok(CreatePipe(&hParentIn, &hChildOut, NULL, 0), "Creating parent-input pipe\n");
-    ok(DuplicateHandle(GetCurrentProcess(), hChildOut, GetCurrentProcess(), 
+    ok(DuplicateHandle(GetCurrentProcess(), hChildOut, GetCurrentProcess(),
                        &hChildOutInh, 0, TRUE, DUPLICATE_SAME_ACCESS),
        "Duplicating as inheritable child-output pipe\n");
     CloseHandle(hChildOut);
+
     ok(CreatePipe(&hChildIn, &hParentOut, NULL, 0), "Creating parent-output pipe\n");
-    ok(DuplicateHandle(GetCurrentProcess(), hChildIn, GetCurrentProcess(), 
+    ok(DuplicateHandle(GetCurrentProcess(), hChildIn, GetCurrentProcess(),
                        &hChildInInh, 0, TRUE, DUPLICATE_SAME_ACCESS),
        "Duplicating as inheritable child-input pipe\n");
-    CloseHandle(hChildIn); 
-    
+    CloseHandle(hChildIn);
+
     memset(&startup, 0, sizeof(startup));
     startup.cb = sizeof(startup);
     startup.dwFlags = STARTF_USESHOWWINDOW|STARTF_USESTDHANDLES;
index a6cfe0a..9da7de9 100755 (executable)
@@ -30,7 +30,7 @@
 #define TESTFILE ".\\testwine.ini"
 #define TESTFILE2 ".\\testwine2.ini"
 
-struct _profileInt { 
+struct _profileInt {
     LPCSTR section;
     LPCSTR key;
     LPCSTR value;
@@ -76,11 +76,11 @@ static void test_profile_int(void)
 
     for (i=0; i < num_test; i++) {
         if (profileInt[i].value)
-            WritePrivateProfileStringA(SECTION, KEY, profileInt[i].value, 
+            WritePrivateProfileStringA(SECTION, KEY, profileInt[i].value,
                                       profileInt[i].iniFile);
 
-       res = GetPrivateProfileIntA(profileInt[i].section, profileInt[i].key, 
-                 profileInt[i].defaultVal, profileInt[i].iniFile); 
+       res = GetPrivateProfileIntA(profileInt[i].section, profileInt[i].key,
+                 profileInt[i].defaultVal, profileInt[i].iniFile);
        ok((res == profileInt[i].result) || (res == profileInt[i].result9x),
            "test<%02d>: ret<%010u> exp<%010u><%010u>\n",
             i, res, profileInt[i].result, profileInt[i].result9x);
@@ -110,24 +110,24 @@ static void test_profile_string(void)
     /* enumerate the keys */
     ret=GetPrivateProfileStringA( "s", NULL, "", buf, sizeof(buf),
         TESTFILE2);
-    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) 
+    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1)
         p[-1] = ',';
     /* and test */
     ok( ret == 18 && !strcmp( buf, "name1,name2,name4"), "wrong keys returned(%d): %s\n", ret,
             buf);
 
     ret=GetPrivateProfileSectionA("s", buf, sizeof(buf), TESTFILE2);
-    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) 
+    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1)
         p[-1] = ',';
     /* and test */
     ok( ret == 35 && !strcmp( buf, "name1=val1,name2=,name3,name4=val4"), "wrong section returned(%d): %s\n",
             ret, buf);
-    
+
     /* add a new key to test that the file is quite usable */
-    WritePrivateProfileStringA( "s", "name5", "val5", TESTFILE2); 
+    WritePrivateProfileStringA( "s", "name5", "val5", TESTFILE2);
     ret=GetPrivateProfileStringA( "s", NULL, "", buf, sizeof(buf),
         TESTFILE2);
-    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1) 
+    for( p = buf + strlen(buf) + 1; *p;p += strlen(p)+1)
         p[-1] = ',';
     ok( ret == 24 && !strcmp( buf, "name1,name2,name4,name5"), "wrong keys returned(%d): %s\n",
             ret, buf);
index 6d7bc88..b405816 100755 (executable)
@@ -105,7 +105,7 @@ static void test_signalandwait(void)
     CloseHandle(semaphore[1]);
 
     /* try a registry key */
-    file = CreateFile("x", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 
+    file = CreateFile("x", GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
         FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL);
     r = pSignalObjectAndWait(file, file, 0, FALSE);
     ok( r == WAIT_FAILED, "should fail\n");
index bd350db..db14f50 100755 (executable)
@@ -458,7 +458,7 @@ static VOID test_thread_priority(void)
    ok(SetThreadPriority(curthread,0)!=0,"SetThreadPriority Failed\n");
 
 /* Check thread priority boost */
-   if (!pGetThreadPriorityBoost || !pSetThreadPriorityBoost) 
+   if (!pGetThreadPriorityBoost || !pSetThreadPriorityBoost)
      return; /* Win9x */
 
    SetLastError(0xdeadbeef);
@@ -608,7 +608,7 @@ static VOID test_GetThreadExitCode(void)
     ret = WaitForSingleObject(thread,100);
     ok(ret==WAIT_OBJECT_0, "threadFunc2 did not exit during 100 ms\n");
     ret = GetExitCodeThread(thread,&exitCode);
-    ok(ret==exitCode || ret==1, 
+    ok(ret==exitCode || ret==1,
        "GetExitCodeThread returned %ld (expected 1 or %ld)\n", ret, exitCode);
     ok(exitCode==99, "threadFunc2 exited with code %ld (expected 99)\n", exitCode);
     ok(CloseHandle(thread)!=0,"Error closing thread handle\n");
index 3208760..ab864a8 100755 (executable)
@@ -153,7 +153,7 @@ static void test_invalid_arg(void)
 
     ok( !SystemTimeToFileTime(&st, &ft), "bad minute\n");
 }
+
 static void test_GetTimeZoneInformation(void)
 {
     TIME_ZONE_INFORMATION tzinfo, tzinfo1;
@@ -164,13 +164,13 @@ static void test_GetTimeZoneInformation(void)
     res =  GetTimeZoneInformation(&tzinfo1);
     ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
 
-    ok(((tzinfo.Bias == tzinfo1.Bias) && 
+    ok(((tzinfo.Bias == tzinfo1.Bias) &&
        (tzinfo.StandardBias == tzinfo1.StandardBias) &&
        (tzinfo.DaylightBias == tzinfo1.DaylightBias)),
-       "Bias influenced by TZ variable\n"); 
+       "Bias influenced by TZ variable\n");
     ok(SetEnvironmentVariableA("TZ",NULL) != 0,
        "SetEnvironmentVariableA failed\n");
-        
+
 }
 
 static void test_FileTimeToSystemTime(void)
@@ -210,7 +210,7 @@ static void test_FileTimeToLocalFileTime(void)
     TIME_ZONE_INFORMATION tzinfo;
     DWORD res =  GetTimeZoneInformation(&tzinfo);
     ULONGLONG time = (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970 +
-        (LONGLONG)(tzinfo.Bias + 
+        (LONGLONG)(tzinfo.Bias +
             ( res == TIME_ZONE_ID_STANDARD ? tzinfo.StandardBias :
             ( res == TIME_ZONE_ID_DAYLIGHT ? tzinfo.DaylightBias : 0 ))) *
              SECSPERMIN *TICKSPERSEC;
@@ -261,7 +261,7 @@ typedef struct {
 } TZLT2ST_case;
 
 static void test_TzSpecificLocalTimeToSystemTime(void)
-{    
+{
     HMODULE hKernel = GetModuleHandle("kernel32");
     fnTzSpecificLocalTimeToSystemTime pTzSpecificLocalTimeToSystemTime;
     fnSystemTimeToTzSpecificLocalTime pSystemTimeToTzSpecificLocalTime = NULL;
@@ -369,7 +369,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void)
                 cases[i].slt.wDay = yeardays[j][i/3];
                 pTzSpecificLocalTimeToSystemTime( cases[i].ptz, &(cases[i].slt), &result);
                 ok( result.wHour == cases[i].ehour,
-                        "Test TzSpecificLocalTimeToSystemTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour =  %02d\n", 
+                        "Test TzSpecificLocalTimeToSystemTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour =  %02d\n",
                         cases[i].nr, result.wYear, result.wMonth, result.wDay,
                         result.wHour, result.wMinute, cases[i].ehour);
             }
@@ -401,7 +401,7 @@ static void test_TzSpecificLocalTimeToSystemTime(void)
             { 18, &tzS, {2004,10,-1,24,6,0,0,0}, 3},
 
             {0}
-        }; 
+        };
     /*  days of transitions to put into the cases array */
         int yeardays[][6]=
         {
@@ -434,13 +434,13 @@ static void test_TzSpecificLocalTimeToSystemTime(void)
                 cases[i].slt.wDay = yeardays[j][i/3];
                 pSystemTimeToTzSpecificLocalTime( cases[i].ptz, &(cases[i].slt), &result);
                 ok( result.wHour == cases[i].ehour,
-                        "Test SystemTimeToTzSpecificLocalTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour = %02d\n", 
+                        "Test SystemTimeToTzSpecificLocalTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour = %02d\n",
                         cases[i].nr, result.wYear, result.wMonth, result.wDay,
                         result.wHour, result.wMinute, cases[i].ehour);
             }
         }
 
-    }        
+    }
 }
 
 START_TEST(time)
index bbfd7c9..efc773c 100755 (executable)
@@ -43,13 +43,13 @@ static void test_timer(void)
     pSetWaitableTimer = (fnSetWaitableTimer) GetProcAddress( hker, "SetWaitableTimer");
     if( !pSetWaitableTimer )
         return;
-       
+
     /* try once with a positive number */
     handle = pCreateWaitableTimerA( NULL, 0, NULL );
     ok( handle != NULL, "failed to create waitable timer with no name\n" );
 
     due.QuadPart = 10000;
-    r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE ); 
+    r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE );
     ok( r, "failed to set timer\n");
 
     CloseHandle( handle );
@@ -59,7 +59,7 @@ static void test_timer(void)
     ok( handle != NULL, "failed to create waitable timer with no name\n" );
 
     due.QuadPart = -10000;
-    r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE ); 
+    r = pSetWaitableTimer( handle, &due, 0x1f4, NULL, NULL, FALSE );
     ok( r, "failed to set timer\n");
 
     CloseHandle( handle );
index 277f1ba..a5d0e59 100644 (file)
@@ -35,14 +35,14 @@ static char filename2[] = "testfile.yyy";
 
 /* This is the hex string representation of the file created by compressing
    a simple text file with the contents "This is a test file."
+
    The file was created using COMPRESS.EXE from the Windows Server 2003
    Resource Kit from Microsoft.  The resource kit was retrieved from the
-   following URL:  
+   following URL:
 
    http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
  */
-static const unsigned char compressed_file[] = 
+static const unsigned char compressed_file[] =
   {0x53,0x5A,0x44,0x44,0x88,0xF0,0x27,0x33,0x41,
    0x74,0x75,0x14,0x00,0x00,0xDF,0x54,0x68,0x69,
    0x73,0x20,0xF2,0xF0,0x61,0x20,0xFF,0x74,0x65,
@@ -62,7 +62,7 @@ static void test_lzopenfile(void)
 
   /* Check for nonexistent file. */
   file = LZOpenFile("badfilename_", &test, OF_READ);
-  ok(file == LZERROR_BADINHANDLE, 
+  ok(file == LZERROR_BADINHANDLE,
      "LZOpenFile succeeded on nonexistent file\n");
   LZClose(file);
 
@@ -71,7 +71,7 @@ static void test_lzopenfile(void)
   ok(file >= 0, "LZOpenFile failed on creation\n");
   LZClose(file);
   retval = GetFileAttributes(filename_);
-  ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n", 
+  ok(retval != INVALID_FILE_ATTRIBUTES, "GetFileAttributes: error %ld\n",
      GetLastError());
 
   /* Check various opening options. */
@@ -91,14 +91,14 @@ static void test_lzopenfile(void)
 
   /* If the file "foo.xxx" does not exist, LZOpenFile should then
      check for the file "foo.xx_" and open that -- at least on some
-     operating systems.  Doesn't seem to on my copy of Win98.   
+     operating systems.  Doesn't seem to on my copy of Win98.
      The Wine testing guidelines say we should accept the behavior of
      any valid version of Windows.  Thus it seems we cannot check this?!
      Revisit this at some point to see if this can be tested somehow.
    */
 #if 0
   file = LZOpenFile(filename, &test, OF_EXIST);
-  ok(file != LZERROR_BADINHANDLE, 
+  ok(file != LZERROR_BADINHANDLE,
      "LZOpenFile \"filename_\" check failed\n");
   LZClose(file);
 #endif
@@ -109,9 +109,9 @@ static void test_lzopenfile(void)
   LZClose(file);
 
   retval = GetFileAttributes(filename_);
-  ok(retval == INVALID_FILE_ATTRIBUTES, 
+  ok(retval == INVALID_FILE_ATTRIBUTES,
      "GetFileAttributes succeeded on deleted file\n");
-  
+
 }
 
 static void test_lzread(void)
@@ -162,7 +162,7 @@ static void test_lzcopy(void)
 
   /* Create the compressed file. */
   file = CreateFile(filename_, GENERIC_WRITE, 0, NULL, CREATE_NEW, 0, 0);
-  ok(file != INVALID_HANDLE_VALUE, 
+  ok(file != INVALID_HANDLE_VALUE,
      "CreateFile: error %ld\n", GetLastError());
   retok = WriteFile(file, compressed_file, compressed_file_size, &ret, 0);
   ok( retok, "WriteFile error %ld\n", GetLastError());
index fb50e2e..76c9f28 100644 (file)
@@ -629,7 +629,7 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
             "IMLangFontLink_CodePageToCodePages failed\n");
     ok (dwCodePages != 0, "No CodePages returned\n");
     ok(IMLangFontLink_CodePagesToCodePage(iMLFL, dwCodePages, 1035,
-                &CodePage)==S_OK, 
+                &CodePage)==S_OK,
             "IMLangFontLink_CodePagesToCodePage failed\n");
     ok(CodePage == 932, "Incorrect CodePage Returned (%i)\n",CodePage);
 
@@ -644,12 +644,12 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
     dwManyCodePages = dwManyCodePages | dwCodePages;
 
     ok(IMLangFontLink_CodePagesToCodePage(iMLFL, dwManyCodePages, 1256,
-                &CodePage)==S_OK, 
+                &CodePage)==S_OK,
             "IMLangFontLink_CodePagesToCodePage failed\n");
     ok(CodePage == 1256, "Incorrect CodePage Returned (%i)\n",CodePage);
 
     ok(IMLangFontLink_CodePagesToCodePage(iMLFL, dwManyCodePages, 936,
-                &CodePage)==S_OK, 
+                &CodePage)==S_OK,
             "IMLangFontLink_CodePagesToCodePage failed\n");
     ok(CodePage == 1252, "Incorrect CodePage Returned (%i)\n",CodePage);
 }
@@ -783,6 +783,6 @@ START_TEST(mlang)
 
     IMLangFontLink_Test(iMLFL);
     IMLangFontLink_Release(iMLFL);
-    
+
     CoUninitialize();
 }
index 6da7666..4c68bb4 100644 (file)
@@ -891,7 +891,7 @@ static void test_msiexport(void)
 
 static void test_longstrings(void)
 {
-    const char insert_query[] = 
+    const char insert_query[] =
         "INSERT INTO `strings` ( `id`, `val` ) VALUES('1', 'Z')";
     char *str;
     MSIHANDLE hdb = 0, hview = 0, hrec = 0;
@@ -905,7 +905,7 @@ static void test_longstrings(void)
     ok(r == ERROR_SUCCESS, "MsiOpenDatabase failed\n");
 
     /* create a table */
-    r = try_query( hdb, 
+    r = try_query( hdb,
         "CREATE TABLE `strings` ( `id` INT, `val` CHAR(0) PRIMARY KEY `id`)");
     ok(r == ERROR_SUCCESS, "query failed\n");
 
@@ -948,7 +948,7 @@ static void test_longstrings(void)
     MsiCloseHandle(hdb);
     DeleteFile(msifile);
 }
+
 static void test_streamtable(void)
 {
     MSIHANDLE hdb = 0, rec;
index c7d4fc5..112cd42 100644 (file)
@@ -239,7 +239,7 @@ static void test_formatrecord(void)
     r = MsiFormatRecord(0, hrec, buffer, &sz);
     ok( r == ERROR_SUCCESS, "format failed\n");
     ok( sz == 30, "size wrong %li\n",sz);
-    ok( 0 == strcmp(buffer,"1: boo 2: hoo 3:  4:  5:  6:  "), 
+    ok( 0 == strcmp(buffer,"1: boo 2: hoo 3:  4:  5:  6:  "),
                     "wrong output(%s)\n",buffer);
 
     /* play games with recursive lookups */
@@ -575,7 +575,7 @@ static void test_formatrecord(void)
     ok( sz == 3, "size wrong,(%li)\n",sz);
     ok( 0 == strcmp(buffer," 12"), "wrong output (%s)\n",buffer);
     }
-    
+
     /* now put play games with escaping */
     r = MsiRecordSetString(hrec, 0, "[1] [2] [\\3asdf]");
     r = MsiRecordSetString(hrec, 1, "boo");
index 33f34b3..f3abf2c 100644 (file)
@@ -248,7 +248,7 @@ static INT_PTR fci_open(char *pszFile, int oflag, int pmode, int *err, void *pv)
     DWORD dwAccess = 0;
     DWORD dwShareMode = 0;
     DWORD dwCreateDisposition = OPEN_EXISTING;
-    
+
     dwAccess = GENERIC_READ | GENERIC_WRITE;
     dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
 
@@ -270,7 +270,7 @@ static UINT fci_read(INT_PTR hf, void *memory, UINT cb, int *err, void *pv)
     HANDLE handle = (HANDLE)hf;
     DWORD dwRead;
     BOOL res;
-    
+
     res = ReadFile(handle, memory, cb, &dwRead, NULL);
     ok(res, "Failed to ReadFile\n");
 
@@ -301,7 +301,7 @@ static long fci_seek(INT_PTR hf, long dist, int seektype, int *err, void *pv)
 {
     HANDLE handle = (HANDLE)hf;
     DWORD ret;
-    
+
     ret = SetFilePointer(handle, dist, NULL, seektype);
     ok(ret != INVALID_SET_FILE_POINTER, "Failed to SetFilePointer\n");
 
@@ -362,7 +362,7 @@ static INT_PTR get_open_info(char *pszName, USHORT *pdate, USHORT *ptime,
 
     res = GetFileInformationByHandle(handle, &finfo);
     ok(res, "Expected GetFileInformationByHandle to succeed\n");
-   
+
     FileTimeToLocalFileTime(&finfo.ftLastWriteTime, &filetime);
     FileTimeToDosDateTime(&filetime, pdate, ptime);
 
@@ -754,10 +754,10 @@ START_TEST(install)
 
     create_test_files();
     create_database(msifile, tables, sizeof(tables) / sizeof(msi_table));
-    
+
     test_MsiInstallProduct();
     test_MsiSetComponentState();
     test_packagecoltypes();
-    
+
     delete_test_files();
 }
index 3b98d53..59953a6 100644 (file)
@@ -60,19 +60,19 @@ static void test_usefeature(void)
     r = pMsiUseFeatureExA(NULL, "WORDVIEWFiles", -2, 1 );
     ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
 
-    r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}", 
+    r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}",
                          NULL, -2, 0 );
     ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
 
-    r = pMsiUseFeatureExA("{9085040-6000-11d3-8cfe-0150048383c9}", 
+    r = pMsiUseFeatureExA("{9085040-6000-11d3-8cfe-0150048383c9}",
                          "WORDVIEWFiles", -2, 0 );
     ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
 
-    r = pMsiUseFeatureExA("{0085040-6000-11d3-8cfe-0150048383c9}", 
+    r = pMsiUseFeatureExA("{0085040-6000-11d3-8cfe-0150048383c9}",
                          "WORDVIEWFiles", -2, 0 );
     ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
 
-    r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}", 
+    r = pMsiUseFeatureExA("{90850409-6000-11d3-8cfe-0150048383c9}",
                          "WORDVIEWFiles", -2, 1 );
     ok( r == INSTALLSTATE_INVALIDARG, "wrong return val\n");
 }
@@ -170,7 +170,7 @@ static void test_filehash(void)
     r = pMsiGetFileHashA(name, 0, &hash);
     ok( r == ERROR_FILE_NOT_FOUND, "wrong error %d\n", r);
 
-    handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE, 0, NULL, 
+    handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE, 0, NULL,
                 CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE, NULL);
     ok(handle != INVALID_HANDLE_VALUE, "failed to create file\n");
 
@@ -201,11 +201,11 @@ static void test_filehash(void)
 START_TEST(msi)
 {
     HMODULE hmod = GetModuleHandle("msi.dll");
-    pMsiUseFeatureExA = (fnMsiUseFeatureExA) 
+    pMsiUseFeatureExA = (fnMsiUseFeatureExA)
         GetProcAddress(hmod, "MsiUseFeatureExA");
-    pMsiOpenPackageExA = (fnMsiOpenPackageExA) 
+    pMsiOpenPackageExA = (fnMsiOpenPackageExA)
         GetProcAddress(hmod, "MsiOpenPackageExA");
-    pMsiOpenPackageExW = (fnMsiOpenPackageExW) 
+    pMsiOpenPackageExW = (fnMsiOpenPackageExW)
         GetProcAddress(hmod, "MsiOpenPackageExW");
     pMsiGetComponentPathA = (fnMsiGetComponentPathA)
         GetProcAddress(hmod, "MsiGetComponentPathA" );
index 7856a62..4d9eefa 100644 (file)
@@ -724,7 +724,7 @@ static void test_settargetpath(void)
     query_file_path( hpkg, "[#TestFile]", buffer );
     ok( !lstrcmp(buffer, "C:\\one\\two\\TestDir\\testfile.txt"),
         "Expected C:\\one\\two\\TestDir\\testfile.txt, got %s\n", buffer );
-    
+
     MsiCloseHandle( hpkg );
 }
 
@@ -2071,7 +2071,7 @@ static void test_states(void)
     ok( r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r );
     ok( state == INSTALLSTATE_ABSENT, "Expected INSTALLSTATE_ABSENT, got %d\n", state);
     ok( action == INSTALLSTATE_LOCAL, "Expected INSTALLSTATE_LOCAL, got %d\n", action);
-    
+
     MsiCloseHandle( hpkg );
 }
 
@@ -2254,7 +2254,7 @@ static void test_removefiles(void)
     ok( r == ERROR_SUCCESS, "remove files failed\n");
 
     ok(DeleteFileA("hydrogen.txt"), "Expected hydrogen.txt to exist\n");
-    ok(DeleteFileA("lithium.txt"), "Expected lithium.txt to exist\n");    
+    ok(DeleteFileA("lithium.txt"), "Expected lithium.txt to exist\n");
     ok(DeleteFileA("beryllium.txt"), "Expected beryllium.txt to exist\n");
     ok(DeleteFileA("carbon.txt"), "Expected carbon.txt to exist\n");
     ok(DeleteFileA("helium.txt"), "Expected helium.txt to exist\n");
index f6e11a9..e95d66b 100644 (file)
@@ -30,11 +30,11 @@ static BOOL create_temp_file(char *name)
     unsigned char buffer[26], i;
     DWORD sz;
     HANDLE handle;
-    
+
     r = GetTempFileName(".", "msitest",0,name);
     if(!r)
         return r;
-    handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE, 
+    handle = CreateFile(name, GENERIC_READ|GENERIC_WRITE,
         0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
     if(handle==INVALID_HANDLE_VALUE)
         return 0;
@@ -268,7 +268,7 @@ static void test_msirecord(void)
     ok(r == ERROR_SUCCESS, "Failed to close handle\n");
 
     /* now try streams in a new record - need to create a file to play with */
-    r = create_temp_file(filename); 
+    r = create_temp_file(filename);
     if(!r)
         return;
 
index 4d8c55a..3fd66e3 100644 (file)
@@ -838,7 +838,7 @@ static void test_demangle_datatype(void)
 /*     { "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@", "?AV?$CDB_GEN_BIG_ENUM_FLAG@W4CDB_WYSIWYG_BITS_ENUM@@$011@@@",FALSE}, */
     };
     int i, num_test = (sizeof(demangle)/sizeof(struct _demangle));
-    
+
     for (i = 0; i < num_test; i++)
     {
        name = p__unDName(0, demangle[i].mangled, 0, pmalloc, pfree, 0x2800);
@@ -846,11 +846,11 @@ static void test_demangle_datatype(void)
            ok(name != NULL && !strcmp(name,demangle[i].result), "Got name \"%s\" for %d\n", name, i);
        else
            todo_wine ok(name != NULL && !strcmp(name,demangle[i].result), "Got name %s for %d\n", name, i);
-             
+
     }
 }
 
-/* Compare two strings treating multiple spaces (' ', ascii 0x20) in s2 
+/* Compare two strings treating multiple spaces (' ', ascii 0x20) in s2
    as single space. Needed for test_demangle as __unDName() returns sometimes
    two spaces instead of one in some older native msvcrt dlls. */
 static int strcmp_space(const char *s1, const char *s2)
index 9166ee9..100ddf7 100644 (file)
@@ -323,10 +323,10 @@ static void test_file_inherit_child_no(const char* fd_s)
     int ret;
 
     ret = write(fd, "Success", 8);
-    ok( ret == -1 && errno == EBADF, 
+    ok( ret == -1 && errno == EBADF,
        "Wrong write result in child process on %d (%s)\n", fd, strerror(errno));
 }
+
 static void test_file_inherit( const char* selfname )
 {
     int                        fd;
@@ -345,7 +345,7 @@ static void test_file_inherit( const char* selfname )
     ok(read(fd, buffer, sizeof (buffer)) == 8 && memcmp(buffer, "Success", 8) == 0, "Couldn't read back the data\n");
     close (fd);
     ok(unlink("fdopen.tst") == 0, "Couldn't unlink\n");
-    
+
     fd = open ("fdopen.tst", O_CREAT | O_RDWR | O_BINARY | O_NOINHERIT, _S_IREAD |_S_IWRITE);
     ok(fd != -1, "Couldn't create test file\n");
     arg_v[0] = selfname;
@@ -385,7 +385,7 @@ static void test_chsize( void )
     long cur, pos, count;
     char temptext[] = "012345678";
     char *tempfile = _tempnam( ".", "tst" );
-    
+
     ok( tempfile != NULL, "Couldn't create test file: %s\n", tempfile );
 
     fd = _open( tempfile, _O_CREAT|_O_TRUNC|_O_RDWR, _S_IREAD|_S_IWRITE );
@@ -405,7 +405,7 @@ static void test_chsize( void )
     ok( _filelength( fd ) == sizeof(temptext) / 2, "Wrong file size\n" );
 
     /* enlarge the file */
-    ok( _chsize( fd, sizeof(temptext) * 2 ) == 0, "_chsize() failed\n" ); 
+    ok( _chsize( fd, sizeof(temptext) * 2 ) == 0, "_chsize() failed\n" );
 
     pos = _lseek( fd, 0, SEEK_CUR );
     ok( cur == pos, "File pointer changed from: %ld to: %ld\n", cur, pos );
@@ -435,11 +435,11 @@ static void test_fopen_fclose_fcloseall( void )
     ok(stream3 != NULL, "The file '%s' should be opened now\n", fname3 );
     errno = 0xfaceabad;
     stream4 = fopen("", "w+");
-    ok(stream4 == NULL && errno == ENOENT, 
+    ok(stream4 == NULL && errno == ENOENT,
        "filename is empty, errno = %d (expected 2)\n", errno);
     errno = 0xfaceabad;
     stream4 = fopen(NULL, "w+");
-    ok(stream4 == NULL && (errno == EINVAL || errno == ENOENT), 
+    ok(stream4 == NULL && (errno == EINVAL || errno == ENOENT),
        "filename is NULL, errno = %d (expected 2 or 22)\n", errno);
 
     /* testing fclose() */
@@ -474,7 +474,7 @@ START_TEST(file)
     /* testing low-level I/O */
     if (arg_c >= 3)
     {
-        if (arg_c == 3) test_file_inherit_child(arg_v[2]); 
+        if (arg_c == 3) test_file_inherit_child(arg_v[2]);
         else test_file_inherit_child_no(arg_v[2]);
         return;
     }
index a1ae0c5..765caec 100644 (file)
@@ -30,13 +30,13 @@ START_TEST(heap)
 
     mem = realloc(NULL, 10);
     ok(mem != NULL, "memory not allocated\n");
-    
+
     mem = realloc(mem, 20);
     ok(mem != NULL, "memory not reallocated\n");
+
     mem = realloc(mem, 0);
     ok(mem == NULL, "memory not freed\n");
-    
+
     mem = realloc(NULL, 0);
     ok(mem != NULL, "memory not (re)allocated for size 0\n");
 }
index 64b5d5a..aa4efaf 100644 (file)
@@ -19,7 +19,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
+
 #include <stdio.h>
 
 #include "wine/test.h"
@@ -523,7 +523,7 @@ static void test_fcvt(void)
 {
     char *str;
     int dec=100, sign=100;
-    
+
     str = _fcvt(0.0001, 1, &dec, &sign );
     todo_wine {
     ok( 0 == strcmp(str,""), "bad return\n");
index 7fda59e..0e1a7fa 100644 (file)
@@ -36,13 +36,13 @@ static void test_swab( void ) {
     char expected1[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ@#";
     char expected2[] = "ABCDEFGHIJKLMNOPQRSTUVWX$";
     char expected3[] = "$";
-    
+
     char from[30];
     char to[30];
-    
+
     int testsize;
-    
-    /* Test 1 - normal even case */                               
+
+    /* Test 1 - normal even case */
     memset(to,'$', sizeof(to));
     memset(from,'@', sizeof(from));
     testsize = 26;
@@ -50,7 +50,7 @@ static void test_swab( void ) {
     _swab( from, to, testsize );
     ok(memcmp(to,expected1,testsize) == 0, "Testing even size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
 
-    /* Test 2 - uneven case  */                               
+    /* Test 2 - uneven case  */
     memset(to,'$', sizeof(to));
     memset(from,'@', sizeof(from));
     testsize = 25;
@@ -58,7 +58,7 @@ static void test_swab( void ) {
     _swab( from, to, testsize );
     ok(memcmp(to,expected2,testsize) == 0, "Testing odd size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
 
-    /* Test 3 - from = to */                               
+    /* Test 3 - from = to */
     memset(to,'$', sizeof(to));
     memset(from,'@', sizeof(from));
     testsize = 26;
@@ -66,7 +66,7 @@ static void test_swab( void ) {
     _swab( to, to, testsize );
     ok(memcmp(to,expected1,testsize) == 0, "Testing overlapped size %d returned '%*.*s'\n", testsize, testsize, testsize, to);
 
-    /* Test 4 - 1 bytes */                               
+    /* Test 4 - 1 bytes */
     memset(to,'$', sizeof(to));
     memset(from,'@', sizeof(from));
     testsize = 1;
@@ -115,7 +115,7 @@ START_TEST(string)
     ok(mem != NULL, "memory not allocated for size 0\n");
     strcpy((char*)mem,xilstring);
     pmemcpy((char*)mem+5, mem,nLen+1);
-    ok(pmemcmp((char*)mem+5,xilstring, nLen) == 0, 
+    ok(pmemcmp((char*)mem+5,xilstring, nLen) == 0,
        "Got result %s\n",(char*)mem+5);
 
     /* Test _swab function */
index 1d54787..1b4ad41 100644 (file)
@@ -44,9 +44,9 @@ static void test_gmtime(void)
        (gmt_tm->tm_mday ==  1) && (gmt_tm->tm_wday == 4) && (gmt_tm->tm_hour  == 0) &&
        (gmt_tm->tm_min  ==  0) && (gmt_tm->tm_sec  == 0) && (gmt_tm->tm_isdst == 0)),
        "Wrong date:Year %4d mon %2d yday %3d mday %2d wday %1d hour%2d min %2d sec %2d dst %2d\n",
-       gmt_tm->tm_year, gmt_tm->tm_mon, gmt_tm->tm_yday, gmt_tm->tm_mday, gmt_tm->tm_wday, 
-       gmt_tm->tm_hour, gmt_tm->tm_min, gmt_tm->tm_sec, gmt_tm->tm_isdst); 
-  
+       gmt_tm->tm_year, gmt_tm->tm_mon, gmt_tm->tm_yday, gmt_tm->tm_mday, gmt_tm->tm_wday,
+       gmt_tm->tm_hour, gmt_tm->tm_min, gmt_tm->tm_sec, gmt_tm->tm_isdst);
+
 }
 static void test_mktime(void)
 {
@@ -75,7 +75,7 @@ static void test_mktime(void)
     my_tm.tm_isdst=  0;
 
     sav_tm = my_tm;
-  
+
     local_time = mktime(&my_tm);
     ok(((DWORD)local_time == SECSPERDAY), "mktime returned 0x%08lx\n",(DWORD)local_time);
     /* now test some unnormalized struct tm's */
@@ -156,7 +156,7 @@ static void test_localtime(void)
 
     char TZ_env[256];
     struct tm* lt;
-    
+
     ok (res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
     lt = localtime(&gmt);
     ok(((lt->tm_year == 70) && (lt->tm_mon  == 0) && (lt->tm_yday  == 1) &&
@@ -164,8 +164,8 @@ static void test_localtime(void)
        (lt->tm_min  ==  0) && (lt->tm_sec  == 0) && (lt->tm_isdst ==
                                                       (res == TIME_ZONE_ID_DAYLIGHT))),
        "Wrong date:Year %4d mon %2d yday %3d mday %2d wday %1d hour%2d min %2d sec %2d dst %2d\n",
-       lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour, 
-       lt->tm_min, lt->tm_sec, lt->tm_isdst); 
+       lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour,
+       lt->tm_min, lt->tm_sec, lt->tm_isdst);
 
     _snprintf(TZ_env,255,"TZ=%s",(getenv("TZ")?getenv("TZ"):""));
     putenv("TZ=GMT");
@@ -175,8 +175,8 @@ static void test_localtime(void)
        (lt->tm_min  ==  0) && (lt->tm_sec  == 0) && (lt->tm_isdst ==
                                                       (res == TIME_ZONE_ID_DAYLIGHT))),
        "Wrong date:Year %4d mon %2d yday %3d mday %2d wday %1d hour%2d min %2d sec %2d dst %2d\n",
-       lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour, 
-       lt->tm_min, lt->tm_sec, lt->tm_isdst); 
+       lt->tm_year, lt->tm_mon, lt->tm_yday, lt->tm_mday, lt->tm_wday, lt->tm_hour,
+       lt->tm_min, lt->tm_sec, lt->tm_isdst);
     putenv(TZ_env);
 }
 static void test_strdate(void)
index a837e8b..6ef6ee8 100755 (executable)
@@ -25,7 +25,7 @@
 #include <stdarg.h>
 
 #include "ntstatus.h"
-/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro 
+/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
  * definition errors when we get to winnt.h
  */
 #define WIN32_NO_STATUS
@@ -404,7 +404,7 @@ static void test_NtRefPinAtom(void)
         res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
         ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
         ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount);
-        ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount); 
+        ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
 
         res = pRtlPinAtomInAtomTable(AtomTable, Atom);
         ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
index 3a3ffa2..1155df9 100644 (file)
@@ -59,7 +59,7 @@ static void test_ntncdf(void)
 
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
@@ -67,7 +67,7 @@ static void test_ntncdf(void)
     ok(r==STATUS_ACCESS_VIOLATION, "should return access violation\n");
 
     fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED;
-    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL, 
+    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL,
                         OPEN_EXISTING, fflags, NULL);
     ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n");
 
@@ -187,7 +187,7 @@ static void test_ntncdf_async(void)
 
     RemoveDirectoryW( subdir );
     RemoveDirectoryW( path );
-    
+
     r = CreateDirectoryW(path, NULL);
     ok( r == TRUE, "failed to create directory\n");
 
@@ -195,7 +195,7 @@ static void test_ntncdf_async(void)
     ok(r==STATUS_ACCESS_VIOLATION, "should return access violation\n");
 
     fflags = FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED;
-    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL, 
+    hdir = CreateFileW(path, GENERIC_READ|SYNCHRONIZE, FILE_SHARE_READ, NULL,
                         OPEN_EXISTING, fflags, NULL);
     ok( hdir != INVALID_HANDLE_VALUE, "failed to open directory\n");
 
@@ -317,7 +317,7 @@ START_TEST(change)
 {
     HMODULE hntdll = GetModuleHandle("ntdll");
 
-    pNtNotifyChangeDirectoryFile = (fnNtNotifyChangeDirectoryFile) 
+    pNtNotifyChangeDirectoryFile = (fnNtNotifyChangeDirectoryFile)
         GetProcAddress(hntdll, "NtNotifyChangeDirectoryFile");
     pNtCancelIoFile = (fnNtCancelIoFile)
         GetProcAddress(hntdll, "NtCancelIoFile");
index 8f864a4..230398b 100755 (executable)
@@ -108,12 +108,12 @@ static void testQuery(void)
             ok( value.Length == strlen(test->val) * sizeof(WCHAR), "Wrong length %d/%d for %s\n",
                 value.Length, strlen(test->val) * sizeof(WCHAR), test->var );
             ok((value.Length == strlen(test->val) * sizeof(WCHAR) && memcmp(bv, bn, test->len*sizeof(WCHAR)) == 0) ||
-              lstrcmpW(bv, bn) == 0, 
+              lstrcmpW(bv, bn) == 0,
               "Wrong result for %s/%d\n", test->var, test->len);
             ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len);
             break;
         case STATUS_BUFFER_TOO_SMALL:
-            ok( value.Length == strlen(test->val) * sizeof(WCHAR), 
+            ok( value.Length == strlen(test->val) * sizeof(WCHAR),
                 "Wrong returned length %d/%d (too small buffer) for %s\n",
                 value.Length, strlen(test->val) * sizeof(WCHAR), test->var );
             break;
@@ -214,7 +214,7 @@ static void testExpand(void)
          * {"hello%foo%world%=oOH%eeck",   "hellototoworldIIIeeck"},
          * Interestingly enough, with a 8 WCHAR buffers, we get on 2k:
          *      helloIII
-         * so it seems like strings overflowing the buffer are written 
+         * so it seems like strings overflowing the buffer are written
          * (troncated) but the write cursor is not advanced :-/
          */
         {NULL, NULL}
@@ -240,7 +240,7 @@ static void testExpand(void)
         us_dst.Buffer = NULL;
 
         nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
-        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), 
+        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
            "Wrong  returned length for %s: %lu <> %u\n",
            test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
 
@@ -250,10 +250,10 @@ static void testExpand(void)
 
         nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
         ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts);
-        ok(ul == us_dst.Length + sizeof(WCHAR), 
+        ok(ul == us_dst.Length + sizeof(WCHAR),
            "Wrong returned length for %s: %lu <> %u\n",
            test->src, ul, us_dst.Length + sizeof(WCHAR));
-        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), 
+        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
            "Wrong  returned length for %s: %lu <> %u\n",
            test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
         ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n",
@@ -265,7 +265,7 @@ static void testExpand(void)
         dst[8] = '-';
         nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
         ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
-        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR), 
+        ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
            "Wrong  returned length for %s (with buffer too small): %lu <> %u\n",
            test->src, ul, strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR));
         ok(memcmp(dst, rst, 8*sizeof(WCHAR)) == 0,
index 75eb0ef..b134af5 100755 (executable)
@@ -59,7 +59,7 @@ static void test_query_basic(void)
     ULONG ReturnLength;
     SYSTEM_BASIC_INFORMATION sbi;
 
-    /* This test also covers some basic parameter testing that should be the same for 
+    /* This test also covers some basic parameter testing that should be the same for
      * every information class
     */
 
@@ -149,7 +149,7 @@ static void test_query_timeofday(void)
     } SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE, *PSYSTEM_TIMEOFDAY_INFORMATION_PRIVATE;
 
     SYSTEM_TIMEOFDAY_INFORMATION_PRIVATE sti;
-  
+
     /*  The struct size for NT (32 bytes) and Win2K/XP (48 bytes) differ.
      *
      *  Windows 2000 and XP return STATUS_INFO_LENGTH_MISMATCH if the given buffer size is greater
@@ -167,7 +167,7 @@ static void test_query_timeofday(void)
     if (status == STATUS_INFO_LENGTH_MISMATCH)
     {
         trace("Windows version is NT, we have to cater for differences with W2K/WinXP\n");
+
         status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 0, &ReturnLength);
         ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
         ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength);
@@ -191,17 +191,17 @@ static void test_query_timeofday(void)
         ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
         ok( 24 == ReturnLength, "ReturnLength should be 24, it is (%ld)\n", ReturnLength);
         ok( 0xdeadbeef == sti.uCurrentTimeZoneId, "This part of the buffer should not have been filled\n");
-    
+
         sti.uCurrentTimeZoneId = 0xdeadbeef;
         status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 32, &ReturnLength);
         ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
         ok( 32 == ReturnLength, "ReturnLength should be 32, it is (%ld)\n", ReturnLength);
         ok( 0xdeadbeef != sti.uCurrentTimeZoneId, "Buffer should have been partially filled\n");
-    
+
         status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, 49, &ReturnLength);
         ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
         ok( 0 == ReturnLength, "ReturnLength should be 0, it is (%ld)\n", ReturnLength);
-    
+
         status = pNtQuerySystemInformation(SystemTimeOfDayInformation, &sti, sizeof(sti), &ReturnLength);
         ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
         ok( sizeof(sti) == ReturnLength, "Inconsistent length (%d) <-> (%ld)\n", sizeof(sti), ReturnLength);
@@ -250,7 +250,7 @@ static void test_query_process(void)
         status = pNtQuerySystemInformation(SystemProcessInformation, spi, SystemInformationLength, &ReturnLength);
 
         if (status != STATUS_INFO_LENGTH_MISMATCH) break;
-        
+
         spi = HeapReAlloc(GetProcessHeap(), 0, spi , SystemInformationLength *= 2);
     }
 
@@ -278,11 +278,11 @@ static void test_query_process(void)
     if (is_nt) trace("Windows version is NT, we will skip thread tests\n");
 
     /* Check if we have some return values
-     * 
+     *
      * On windows there will be several processes running (Including the always present Idle and System)
      * On wine we only have one (if this test is the only wine process running)
     */
-    
+
     /* Loop through the processes */
 
     for (;;)
@@ -294,14 +294,14 @@ static void test_query_process(void)
         ok( spi->dwThreadCount > 0, "Expected some threads for this process, got 0\n");
 
         /* Loop through the threads, skip NT4 for now */
-        
+
         if (!is_nt)
         {
             DWORD j;
-            for ( j = 0; j < spi->dwThreadCount; j++) 
+            for ( j = 0; j < spi->dwThreadCount; j++)
             {
                 k++;
-                ok ( spi->ti[j].dwOwningPID == spi->dwProcessID, 
+                ok ( spi->ti[j].dwOwningPID == spi->dwProcessID,
                      "The owning pid of the thread (%ld) doesn't equal the pid (%ld) of the process\n",
                      spi->ti[j].dwOwningPID, spi->dwProcessID);
             }
@@ -344,7 +344,7 @@ static void test_query_procperf(void)
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
     ok( sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) == ReturnLength,
         "Inconsistent length (%d) <-> (%ld)\n", sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION), ReturnLength);
+
     /* Try it for all processors */
     status = pNtQuerySystemInformation(SystemProcessorPerformanceInformation, sppi, NeededLength, &ReturnLength);
     ok( status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08lx\n", status);
@@ -366,7 +366,7 @@ static void test_query_module(void)
     ULONG ModuleCount, i;
 
     ULONG SystemInformationLength = sizeof(SYSTEM_MODULE_INFORMATION);
-    SYSTEM_MODULE_INFORMATION* smi = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength); 
+    SYSTEM_MODULE_INFORMATION* smi = HeapAlloc(GetProcessHeap(), 0, SystemInformationLength);
     SYSTEM_MODULE* sm;
 
     /* Request the needed length */
@@ -573,7 +573,7 @@ static void test_query_process_basic(void)
     status = pNtQueryInformationProcess(GetCurrentProcess(), ProcessBasicInformation, &pbi, sizeof(pbi) * 2, &ReturnLength);
     ok( status == STATUS_INFO_LENGTH_MISMATCH, "Expected STATUS_INFO_LENGTH_MISMATCH, got %08lx\n", status);
     ok( sizeof(pbi) == ReturnLength, "Inconsistent length (%d) <-> (%ld)\n", sizeof(pbi), ReturnLength);
-                                                                                                                                               
+
     /* Check if we have some return values */
     trace("ProcessID : %ld\n", pbi.UniqueProcessId);
     ok( pbi.UniqueProcessId > 0, "Expected a ProcessID > 0, got 0\n");
@@ -630,7 +630,7 @@ static void test_query_process_io(void)
         trace("ProcessIoCounters information class not supported, skipping tests\n");
         return;
     }
+
     status = pNtQueryInformationProcess(NULL, ProcessIoCounters, NULL, sizeof(pii), NULL);
     ok( status == STATUS_ACCESS_VIOLATION || status == STATUS_INVALID_HANDLE,
         "Expected STATUS_ACCESS_VIOLATION or STATUS_INVALID_HANDLE(W2K3), got %08lx\n", status);
index 2903984..acd947c 100644 (file)
@@ -206,7 +206,7 @@ static void test_name_collisions(void)
     DIR_TEST_OPEN_SUCCESS(&dir)
     pRtlCreateUnicodeStringFromAsciiz(&str, "om.c-test");
     InitializeObjectAttributes(&attr, &str, OBJ_OPENIF, dir, NULL);
-    
+
     h = CreateMutexA(NULL, FALSE, "om.c-test");
     ok(h != 0, "CreateMutexA failed got ret=%p (%ld)\n", h, GetLastError());
     status = pNtCreateMutant(&h1, GENERIC_ALL, &attr, FALSE);
@@ -245,7 +245,7 @@ static void test_name_collisions(void)
     pNtClose(h);
     pNtClose(h1);
     pNtClose(h2);
-    
+
     h = CreateWaitableTimerA(NULL, TRUE, "om.c-test");
     ok(h != 0, "CreateWaitableTimerA failed got ret=%p (%ld)\n", h, GetLastError());
     status = pNtCreateTimer(&h1, GENERIC_ALL, &attr, NotificationTimer);
index 5b0300a..6c79970 100644 (file)
@@ -147,7 +147,7 @@ static void ProcessConnectionRequest(PLPC_MESSAGE LpcMessage, PHANDLE pAcceptPor
 
     status = pNtAcceptConnectPort(pAcceptPortHandle, 0, LpcMessage, 1, 0, NULL);
     ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
-    
+
     status = pNtCompleteConnectPort(*pAcceptPortHandle);
     ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %ld\n", status);
 }
index d0adaa8..72de773 100755 (executable)
@@ -410,7 +410,7 @@ static void test_RtlUniform(void)
            expected = (expected + (~seed & 1)) & MAXLONG;
        } else if (seed < 0x1435e50b) {
            expected = expected + (seed & 1);
-       } else if (seed < 0x1af286ba) { 
+       } else if (seed < 0x1af286ba) {
            expected = (expected + (~seed & 1)) & MAXLONG;
        } else if (seed < 0x21af2869) {
            expected = expected + (seed & 1);
@@ -725,7 +725,7 @@ static void test_RtlRandom(void)
  *
  * What remains to be determined is: The size of the saved_value array,
  * the initial values of the saved_value array and the function
- * position(seed). These tests are not shown here. 
+ * position(seed). These tests are not shown here.
  * The result of these tests is: The size of the saved_value array
  * is 128, the initial values can be seen in the my_RtlRandom
  * function and the position(seed) function is (seed & 0x7f).
index f4939e9..b60f54f 100755 (executable)
@@ -1033,7 +1033,7 @@ static const app_ustr2str_t app_ustr2str[] = {
     { 4, 12, 14,     "Fake0123abcdef", 4, 6, 8,   "UstrZYXW",  8, 12, 14,   "FakeUstr\0\0cdef", STATUS_SUCCESS},
     { 4, 11, 14,     "Fake0123abcdef", 4, 6, 8,   "UstrZYXW",  8, 11, 14,   "FakeUstr\0\0cdef", STATUS_SUCCESS},
     { 4, 10, 14,     "Fake0123abcdef", 4, 6, 8,   "UstrZYXW",  8, 10, 14,   "FakeUstr\0\0cdef", STATUS_SUCCESS},
-/* In the following test the native function writes beyond MaximumLength 
+/* In the following test the native function writes beyond MaximumLength
  *  { 4,  9, 14,     "Fake0123abcdef", 4, 6, 8,   "UstrZYXW",  8,  9, 14,     "FakeUstrabcdef", STATUS_SUCCESS},
  */
     { 4,  8, 14,     "Fake0123abcdef", 4, 6, 8,   "UstrZYXW",  8,  8, 14,     "FakeUstrabcdef", STATUS_SUCCESS},
index 2858374..a1bc872 100755 (executable)
@@ -1069,7 +1069,7 @@ static void test_wtoi64(void)
 }
 
 static void test_wcsfuncs(void)
-{       
+{
     static const WCHAR testing[] = {'T','e','s','t','i','n','g',0};
     ok (p_wcschr(testing,0)!=NULL, "wcschr Not finding terminating character\n");
     ok (p_wcsrchr(testing,0)!=NULL, "wcsrchr Not finding terminating character\n");
index 2e9adbc..1f6cbc3 100755 (executable)
@@ -53,7 +53,7 @@ static void test_pRtlTimeToTimeFields(void)
         /* test at the last second of the month */
         pRtlTimeToTimeFields( &litime, &tfresult);
         ok( tfresult.Year == tftest.Year && tfresult.Month == tftest.Month &&
-            tfresult.Day == tftest.Day && tfresult.Hour == tftest.Hour && 
+            tfresult.Day == tftest.Day && tfresult.Hour == tftest.Hour &&
             tfresult.Minute == tftest.Minute && tfresult.Second == tftest.Second,
             "#%d expected: %d-%d-%d %d:%d:%d  got:  %d-%d-%d %d:%d:%d\n", ++i,
             tftest.Year, tftest.Month, tftest.Day,
@@ -71,7 +71,7 @@ static void test_pRtlTimeToTimeFields(void)
         pRtlTimeToTimeFields( &litime, &tfresult);
         ok( tfresult.Year == tftest.Year + (tftest.Month ==12) &&
             tfresult.Month == tftest.Month % 12 + 1 &&
-            tfresult.Day == 1 && tfresult.Hour == 0 && 
+            tfresult.Day == 1 && tfresult.Hour == 0 &&
             tfresult.Minute == 0 && tfresult.Second == 0,
             "#%d expected: %d-%d-%d %d:%d:%d  got:  %d-%d-%d %d:%d:%d\n", ++i,
             tftest.Year + (tftest.Month ==12),
@@ -89,7 +89,7 @@ static void test_pRtlTimeToTimeFields(void)
         if( tftest.Month == 12) {
             tftest.Month = 1;
             tftest.Year += 1;
-        } else 
+        } else
             tftest.Month += 1;
         tftest.Day = MonthLengths[IsLeapYear(tftest.Year)][tftest.Month - 1];
         litime.QuadPart +=  (LONGLONG) tftest.Day * TICKSPERSEC * SECSPERDAY;
index b045014..4bd1271 100644 (file)
@@ -903,7 +903,7 @@ void func_power(void)
    test_WriteGlobalPwrPolicy();
    test_WriteProcessorPwrScheme();
 
-}      
+}
 
 void func_ros_init(void)
 {
index 63dbc0d..ee8f8ab 100644 (file)
@@ -33,7 +33,7 @@
         return FALSE; \
     }
 
-/* All PSAPI functions return non-zero and call SetLastError() 
+/* All PSAPI functions return non-zero and call SetLastError()
  * on failure so we can use some macros for convenience */
 
 #define w32_suc(x) \
@@ -67,7 +67,7 @@ static BOOL  (WINAPI *pGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, D
 static BOOL  (WINAPI *pGetWsChanges)(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
 static BOOL  (WINAPI *pInitializeProcessForWsWatch)(HANDLE);
 static BOOL  (WINAPI *pQueryWorkingSet)(HANDLE, PVOID, DWORD);
-      
+
 static BOOL InitFunctionPtrs(HMODULE hpsapi)
 {
     PSAPI_GET_PROC(EmptyWorkingSet);
@@ -120,7 +120,7 @@ static void test_GetModuleInformation(void)
 {
     HMODULE hMod = GetModuleHandle(NULL);
     MODULEINFO info;
-    
+
     w32_err(pGetModuleInformation(NULL, hMod, &info, sizeof(info)), ERROR_INVALID_HANDLE);
     w32_err(pGetModuleInformation(hpQI, hMod, &info, sizeof(info)), ERROR_ACCESS_DENIED);
     w32_err(pGetModuleInformation(hpQV, hBad, &info, sizeof(info)), ERROR_INVALID_HANDLE);
@@ -144,7 +144,7 @@ static void test_GetMappedFileName(void)
     HMODULE hMod = GetModuleHandle(NULL);
     char szMapPath[MAX_PATH], szModPath[MAX_PATH], *szMapBaseName;
     DWORD ret;
-    
+
     w32_err(pGetMappedFileNameA(NULL, hMod, szMapPath, sizeof(szMapPath)), ERROR_INVALID_HANDLE);
     w32_err(pGetMappedFileNameA(hpSR, hMod, szMapPath, sizeof(szMapPath)), ERROR_ACCESS_DENIED);
     if(!w32_suc(ret = pGetMappedFileNameA(hpQI, hMod, szMapPath, sizeof(szMapPath))))
@@ -184,7 +184,7 @@ static void test_GetProcessImageFileName(void)
 
         return;
     }
-    
+
     w32_err(pGetProcessImageFileNameA(NULL, szImgPath, sizeof(szImgPath)), ERROR_INVALID_HANDLE);
     w32_err(pGetProcessImageFileNameA(hpSR, szImgPath, sizeof(szImgPath)), ERROR_ACCESS_DENIED);
     w32_err(pGetProcessImageFileNameA(hpQI, szImgPath, 0), ERROR_INSUFFICIENT_BUFFER);
@@ -194,7 +194,7 @@ static void test_GetProcessImageFileName(void)
     /* Windows returns 2*strlen-1 */
     ok(ret >= strlen(szImgPath), "szImgPath=\"%s\" ret=%ld\n", szImgPath, ret);
     ok(!strcmp(szImgPath, szMapPath),
-       "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath);    
+       "szImgPath=\"%s\" szMapPath=\"%s\"\n", szImgPath, szMapPath);
 }
 
 static void test_GetModuleFileNameEx(void)
@@ -202,7 +202,7 @@ static void test_GetModuleFileNameEx(void)
     HMODULE hMod = GetModuleHandle(NULL);
     char szModExPath[MAX_PATH+1], szModPath[MAX_PATH+1];
     DWORD ret;
-    
+
     w32_err(pGetModuleFileNameExA(NULL, hMod, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE);
     w32_err(pGetModuleFileNameExA(hpQI, hMod, szModExPath, sizeof(szModExPath)), ERROR_ACCESS_DENIED);
     w32_err(pGetModuleFileNameExA(hpQV, hBad, szModExPath, sizeof(szModExPath)), ERROR_INVALID_HANDLE);
@@ -210,7 +210,7 @@ static void test_GetModuleFileNameEx(void)
         return;
     ok(ret == strlen(szModExPath), "szModExPath=\"%s\" ret=%ld\n", szModExPath, ret);
     GetModuleFileNameA(NULL, szModPath, sizeof(szModPath));
-    ok(!strncmp(szModExPath, szModPath, MAX_PATH), 
+    ok(!strncmp(szModExPath, szModPath, MAX_PATH),
        "szModExPath=\"%s\" szModPath=\"%s\"\n", szModExPath, szModPath);
 }
 
@@ -237,14 +237,14 @@ static void test_ws_functions(void)
     ULONG_PTR pages[4096];
     char *addr;
     int i;
-    
+
     todo_wine w32_err(pEmptyWorkingSet(NULL), ERROR_INVALID_HANDLE);
     todo_wine w32_err(pEmptyWorkingSet(hpSR), ERROR_ACCESS_DENIED);
     w32_suc(pEmptyWorkingSet(hpAA));
-    
+
     todo_wine w32_err(pInitializeProcessForWsWatch(NULL), ERROR_INVALID_HANDLE);
     w32_suc(pInitializeProcessForWsWatch(hpAA));
-    
+
     if(!w32_suc(addr = VirtualAlloc(NULL, 1, MEM_COMMIT, PAGE_READWRITE)))
         return;
 
@@ -253,7 +253,7 @@ static void test_ws_functions(void)
         trace("locking failed (error=%ld) - skipping test\n", GetLastError());
         goto free_page;
     }
-       
+
     todo_wine if(w32_suc(pQueryWorkingSet(hpQI, pages, 4096 * sizeof(ULONG_PTR))))
     {
        for(i = 0; i < pages[0]; i++)
@@ -262,7 +262,7 @@ static void test_ws_functions(void)
               ok(1, "QueryWorkingSet found our page\n");
               goto test_gwsc;
           }
-       
+
        ok(0, "QueryWorkingSet didn't find our page\n");
     }
 
@@ -278,7 +278,7 @@ test_gwsc:
 
        ok(0, "GetWsChanges didn't find our page\n");
     }
-    
+
 free_page:
     VirtualFree(addr, 0, MEM_RELEASE);
 }
@@ -286,7 +286,7 @@ free_page:
 START_TEST(psapi_main)
 {
     HMODULE hpsapi = LoadLibraryA("psapi.dll");
-    
+
     if(!hpsapi)
     {
         trace("Could not load psapi.dll\n");
@@ -320,6 +320,6 @@ START_TEST(psapi_main)
        CloseHandle(hpQV);
        CloseHandle(hpAA);
     }
-    
+
     FreeLibrary(hpsapi);
 }
index d28f3e3..fab7a7f 100644 (file)
@@ -17,7 +17,7 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
-/* 
+/*
  * TODO:
  * Add test for StringTableStringFromIdEx
  */
@@ -96,18 +96,18 @@ static void test_StringTableAddString(void)
     /* case insensitive */
     hstring=pStringTableAddString(table,string,0);
     ok(hstring!=-1,"Failed to add string to String Table\n");
-    
+
     retval=pStringTableAddString(table,String,0);
-    ok(retval!=-1,"Failed to add String to String Table\n");    
-    ok(hstring==retval,"string handle %lx != String handle %lx in String Table\n", hstring, retval);        
-    
+    ok(retval!=-1,"Failed to add String to String Table\n");
+    ok(hstring==retval,"string handle %lx != String handle %lx in String Table\n", hstring, retval);
+
     hfoo=pStringTableAddString(table,foo,0);
-    ok(hfoo!=-1,"Failed to add foo to String Table\n");        
-    ok(hfoo!=hstring,"foo and string share the same ID %lx in String Table\n", hfoo);            
-    
-    /* case sensitive */    
+    ok(hfoo!=-1,"Failed to add foo to String Table\n");
+    ok(hfoo!=hstring,"foo and string share the same ID %lx in String Table\n", hfoo);
+
+    /* case sensitive */
     hString=pStringTableAddString(table,String,ST_CASE_SENSITIVE_COMPARE);
-    ok(hstring!=hString,"String handle and string share same ID %lx in Table\n", hstring);        
+    ok(hstring!=hString,"String handle and string share same ID %lx in Table\n", hstring);
 }
 
 static void test_StringTableDuplicate(void)
@@ -117,41 +117,41 @@ static void test_StringTableDuplicate(void)
 }
 
 static void test_StringTableLookUpString(void)
-{   
+{
     DWORD retval, retval2;
-    
+
     /* case insensitive */
     retval=pStringTableLookUpString(table,string,0);
     ok(retval!=-1,"Failed find string in String Table 1\n");
     ok(retval==hstring,
         "Lookup for string (%lx) does not match previous handle (%lx) in String Table 1\n",
-        retval, hstring);    
+        retval, hstring);
 
     retval=pStringTableLookUpString(table2,string,0);
     ok(retval!=-1,"Failed find string in String Table 2\n");
-    
+
     retval=pStringTableLookUpString(table,String,0);
     ok(retval!=-1,"Failed find String in String Table 1\n");
 
     retval=pStringTableLookUpString(table2,String,0);
-    ok(retval!=-1,"Failed find String in String Table 2\n");    
-    
+    ok(retval!=-1,"Failed find String in String Table 2\n");
+
     retval=pStringTableLookUpString(table,foo,0);
-    ok(retval!=-1,"Failed find foo in String Table 1\n");    
+    ok(retval!=-1,"Failed find foo in String Table 1\n");
     ok(retval==hfoo,
         "Lookup for foo (%lx) does not match previous handle (%lx) in String Table 1\n",
-        retval, hfoo);        
-    
+        retval, hfoo);
+
     retval=pStringTableLookUpString(table2,foo,0);
-    ok(retval!=-1,"Failed find foo in String Table 2\n");    
-    
+    ok(retval!=-1,"Failed find foo in String Table 2\n");
+
     /* case sensitive */
     retval=pStringTableLookUpString(table,string,ST_CASE_SENSITIVE_COMPARE);
-    retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE);    
+    retval2=pStringTableLookUpString(table,String,ST_CASE_SENSITIVE_COMPARE);
     ok(retval!=retval2,"Lookup of string equals String in Table 1\n");
     ok(retval2==hString,
         "Lookup for String (%lx) does not match previous handle (%lx) in String Table 1\n",
-        retval, hString);        
+        retval, hString);
 }
 
 static void test_StringTableStringFromId(void)
@@ -162,7 +162,7 @@ static void test_StringTableStringFromId(void)
     /* correct */
     string2=pStringTableStringFromId(table,pStringTableLookUpString(table,string,0));
     ok(string2!=NULL,"Failed to look up string by ID from String Table\n");
-    
+
     result=lstrcmpiW(string, string2);
     ok(result==0,"StringID %p does not match requested StringID %p\n",string,string2);
 
index 2821b4f..663b9be 100644 (file)
@@ -43,7 +43,7 @@
 #ifndef PT_GUID
 #define PT_GUID       0x1f /* no path */
 #endif
-#ifndef PT_DRIVE 
+#ifndef PT_DRIVE
 #define PT_DRIVE      0x23 /* has path */
 #endif
 #ifndef PT_DRIVE2
@@ -800,7 +800,7 @@ static void doChild(const char *arg)
  */
 static void testNonExistentPath(void)
 {
-    static const char userShellFolders[] = 
+    static const char userShellFolders[] =
      "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\User Shell Folders";
     char originalPath[MAX_PATH], modifiedPath[MAX_PATH];
     HKEY key;
index 66b9406..a32b53a 100755 (executable)
@@ -954,7 +954,7 @@ static void test_lnks(void)
             {
                 okChildInt("argcA", 5);
             }
-            else 
+            else
             {
                 okChildInt("argcA", 5);
             }
index 0cf398a..26a11c4 100644 (file)
@@ -86,25 +86,25 @@ static void test_ParseDisplayName(void)
     if(res != INVALID_FILE_ATTRIBUTES) return;
 
     MultiByteToWideChar(CP_ACP, 0, cNonExistDir1A, -1, cTestDirW, MAX_PATH);
-    hr = IShellFolder_ParseDisplayName(IDesktopFolder, 
+    hr = IShellFolder_ParseDisplayName(IDesktopFolder,
         NULL, NULL, cTestDirW, NULL, &newPIDL, 0);
-    ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL), 
+    ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL),
         "ParseDisplayName returned %08x, expected 80070002 or E_FAIL\n", hr);
 
     res = GetFileAttributesA(cNonExistDir2A);
     if(res != INVALID_FILE_ATTRIBUTES) return;
 
     MultiByteToWideChar(CP_ACP, 0, cNonExistDir2A, -1, cTestDirW, MAX_PATH);
-    hr = IShellFolder_ParseDisplayName(IDesktopFolder, 
+    hr = IShellFolder_ParseDisplayName(IDesktopFolder,
         NULL, NULL, cTestDirW, NULL, &newPIDL, 0);
-    ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL) || (hr == E_INVALIDARG), 
+    ok((hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) || (hr == E_FAIL) || (hr == E_INVALIDARG),
         "ParseDisplayName returned %08x, expected 80070002, E_FAIL or E_INVALIDARG\n", hr);
 
     /* I thought that perhaps the DesktopFolder's ParseDisplayName would recognize the
      * path corresponding to CSIDL_PERSONAL and return a CLSID_MyDocuments PIDL. Turns
      * out it doesn't. The magic seems to happen in the file dialogs, then. */
     if (!pSHGetSpecialFolderPathW || !pILFindLastID) goto finished;
-    
+
     bRes = pSHGetSpecialFolderPathW(NULL, cTestDirW, CSIDL_PERSONAL, FALSE);
     ok(bRes, "SHGetSpecialFolderPath(CSIDL_PERSONAL) failed! %u\n", GetLastError());
     if (!bRes) goto finished;
@@ -116,7 +116,7 @@ static void test_ParseDisplayName(void)
     ok(pILFindLastID(newPIDL)->mkid.abID[0] == 0x31, "Last pidl should be of type "
        "PT_FOLDER, but is: %02x\n", pILFindLastID(newPIDL)->mkid.abID[0]);
     IMalloc_Free(ppM, newPIDL);
-    
+
 finished:
     IShellFolder_Release(IDesktopFolder);
 }
@@ -198,13 +198,13 @@ static void test_EnumObjects(IShellFolder *iFolder)
      * the filesystem shellfolders return S_OK even if less than 'celt' items are
      * returned (in contrast to S_FALSE). We have to do it in a loop since WinXP
      * only ever returns a single entry per call. */
-    while (IEnumIDList_Next(iEnumList, 10-i, &idlArr[i], &NumPIDLs) == S_OK) 
+    while (IEnumIDList_Next(iEnumList, 10-i, &idlArr[i], &NumPIDLs) == S_OK)
         i += NumPIDLs;
     ok (i == 5, "i: %d\n", i);
 
     hr = IEnumIDList_Release(iEnumList);
     ok(hr == S_OK, "IEnumIDList_Release failed %08x\n", hr);
-    
+
     /* Sort them first in case of wrong order from system */
     for (i=0;i<5;i++) for (j=0;j<5;j++)
         if ((SHORT)IShellFolder_CompareIDs(iFolder, 0, idlArr[i], idlArr[j]) < 0)
@@ -213,7 +213,7 @@ static void test_EnumObjects(IShellFolder *iFolder)
             idlArr[i] = idlArr[j];
             idlArr[j] = newPIDL;
         }
-           
+
     for (i=0;i<5;i++) for (j=0;j<5;j++)
     {
         hr = IShellFolder_CompareIDs(iFolder, 0, idlArr[i], idlArr[j]);
@@ -251,7 +251,7 @@ static void test_BindToObject(void)
     LPITEMIDLIST pidlMyComputer, pidlSystemDir, pidlEmpty = (LPITEMIDLIST)&emptyitem;
     WCHAR wszSystemDir[MAX_PATH];
     char szSystemDir[MAX_PATH];
-    WCHAR wszMyComputer[] = { 
+    WCHAR wszMyComputer[] = {
         ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-',
         'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 };
 
@@ -261,7 +261,7 @@ static void test_BindToObject(void)
     hr = SHGetDesktopFolder(&psfDesktop);
     ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr);
     if (FAILED(hr)) return;
-    
+
     hr = IShellFolder_BindToObject(psfDesktop, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
     ok (hr == E_INVALIDARG, "Desktop's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr);
 
@@ -274,7 +274,7 @@ static void test_BindToObject(void)
         IShellFolder_Release(psfDesktop);
         return;
     }
-    
+
     hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer);
     ok (SUCCEEDED(hr), "Desktop failed to bind to MyComputer object! hr = %08x\n", hr);
     IShellFolder_Release(psfDesktop);
@@ -297,7 +297,7 @@ static void test_BindToObject(void)
         return;
     }
     MultiByteToWideChar(CP_ACP, 0, szSystemDir, -1, wszSystemDir, MAX_PATH);
-    
+
     hr = IShellFolder_ParseDisplayName(psfMyComputer, NULL, NULL, wszSystemDir, NULL, &pidlSystemDir, NULL);
     ok (SUCCEEDED(hr), "MyComputers's ParseDisplayName failed to parse the SystemDirectory! hr = %08x\n", hr);
     if (FAILED(hr)) {
@@ -312,19 +312,19 @@ static void test_BindToObject(void)
     if (FAILED(hr)) return;
 
     hr = IShellFolder_BindToObject(psfSystemDir, pidlEmpty, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
-    ok (hr == E_INVALIDARG, 
+    ok (hr == E_INVALIDARG,
         "FileSystem ShellFolder's BindToObject should fail, when called with empty pidl! hr = %08x\n", hr);
-    
+
 #if 0
     /* this call segfaults on 98SE */
     hr = IShellFolder_BindToObject(psfSystemDir, NULL, NULL, &IID_IShellFolder, (LPVOID*)&psfChild);
-    ok (hr == E_INVALIDARG, 
+    ok (hr == E_INVALIDARG,
         "FileSystem ShellFolder's BindToObject should fail, when called with NULL pidl! hr = %08x\n", hr);
 #endif
 
     IShellFolder_Release(psfSystemDir);
 }
-  
+
 static void test_GetDisplayName(void)
 {
     BOOL result;
@@ -344,7 +344,7 @@ static void test_GetDisplayName(void)
 
     /* I'm trying to figure if there is a functional difference between calling
      * SHGetPathFromIDList and calling GetDisplayNameOf(SHGDN_FORPARSING) after
-     * binding to the shellfolder. One thing I thought of was that perhaps 
+     * binding to the shellfolder. One thing I thought of was that perhaps
      * SHGetPathFromIDList would be able to get the path to a file, which does
      * not exist anymore, while the other method would'nt. It turns out there's
      * no functional difference in this respect.
@@ -398,15 +398,15 @@ static void test_GetDisplayName(void)
         ok(!lstrcmpW((WCHAR*)&pidlLast->mkid.abID[46], wszFileName),
             "WinXP stores the filename as a wchar-string at this position!\n");
     }
-    
-    /* It seems as if we cannot bind to regular files on windows, but only directories. 
+
+    /* It seems as if we cannot bind to regular files on windows, but only directories.
      */
     hr = IShellFolder_BindToObject(psfDesktop, pidlTestFile, NULL, &IID_IUnknown, (VOID**)&psfFile);
     todo_wine { ok (hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "hr = %08x\n", hr); }
     if (SUCCEEDED(hr)) {
         IShellFolder_Release(psfFile);
     }
-  
+
     /* Some tests for IShellFolder::SetNameOf */
     hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
     ok(SUCCEEDED(hr), "SHBindToParent failed! hr = %08x\n", hr);
@@ -418,12 +418,12 @@ static void test_GetDisplayName(void)
         /* The pidl returned through the last parameter of SetNameOf is a simple one. */
         hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlLast, wszDirName, SHGDN_NORMAL, &pidlNew);
         ok (SUCCEEDED(hr), "SetNameOf failed! hr = %08x\n", hr);
-        ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0, 
+        ok (((LPITEMIDLIST)((LPBYTE)pidlNew+pidlNew->mkid.cb))->mkid.cb == 0,
             "pidl returned from SetNameOf should be simple!\n");
 
         /* Passing an absolute path to SetNameOf fails. The HRESULT code indicates that SetNameOf
          * is implemented on top of SHFileOperation in WinXP. */
-        hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename, 
+        hr = IShellFolder_SetNameOf(psfPersonal, NULL, pidlNew, wszAbsoluteFilename,
                 SHGDN_FORPARSING, NULL);
         ok (hr == HRESULT_FROM_WIN32(ERROR_CANCELLED), "SetNameOf succeeded! hr = %08x\n", hr);
 
@@ -455,22 +455,22 @@ static void test_GetDisplayName(void)
     hr = pSHBindToParent(pidlEmpty, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
     ok (SUCCEEDED(hr), "SHBindToParent(empty PIDL) should succeed! hr = %08x\n", hr);
     ok (pidlLast == pidlEmpty, "The last element of an empty PIDL should be the PIDL itself!\n");
-    if (SUCCEEDED(hr)) 
+    if (SUCCEEDED(hr))
         IShellFolder_Release(psfPersonal);
-    
+
     /* Binding to the folder and querying the display name of the file also works. */
-    hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast); 
+    hr = pSHBindToParent(pidlTestFile, &IID_IShellFolder, (VOID**)&psfPersonal, &pidlLast);
     ok (SUCCEEDED(hr), "SHBindToParent failed! hr = %08x\n", hr);
     if (FAILED(hr)) {
         IShellFolder_Release(psfDesktop);
         return;
     }
 
-    /* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into 
+    /* This test shows that Windows doesn't allocate a new pidlLast, but returns a pointer into
      * pidlTestFile (In accordance with MSDN). */
-    ok (pILFindLastID(pidlTestFile) == pidlLast, 
+    ok (pILFindLastID(pidlTestFile) == pidlLast,
                                 "SHBindToParent doesn't return the last id of the pidl param!\n");
-    
+
     hr = IShellFolder_GetDisplayNameOf(psfPersonal, pidlLast, SHGDN_FORPARSING, &strret);
     ok (SUCCEEDED(hr), "Personal->GetDisplayNameOf failed! hr = %08x\n", hr);
     if (FAILED(hr)) {
@@ -485,7 +485,7 @@ static void test_GetDisplayName(void)
         ok (SUCCEEDED(hr), "StrRetToBufW failed! hr = %08x\n", hr);
         ok (!lstrcmpiW(wszTestFile, wszTestFile2), "GetDisplayNameOf returns incorrect path!\n");
     }
-    
+
     IShellFolder_Release(psfDesktop);
     IShellFolder_Release(psfPersonal);
 }
@@ -500,7 +500,7 @@ static void test_CallForAttributes(void)
     LPITEMIDLIST pidlMyDocuments;
     DWORD dwAttributes, dwCallForAttributes, dwOrigAttributes, dwOrigCallForAttributes;
     static const WCHAR wszAttributes[] = { 'A','t','t','r','i','b','u','t','e','s',0 };
-    static const WCHAR wszCallForAttributes[] = { 
+    static const WCHAR wszCallForAttributes[] = {
         'C','a','l','l','F','o','r','A','t','t','r','i','b','u','t','e','s',0 };
     static const WCHAR wszMyDocumentsKey[] = {
         'C','L','S','I','D','\\','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-',
@@ -509,9 +509,9 @@ static void test_CallForAttributes(void)
     WCHAR wszMyDocuments[] = {
         ':',':','{','4','5','0','D','8','F','B','A','-','A','D','2','5','-','1','1','D','0','-',
         '9','8','A','8','-','0','8','0','0','3','6','1','B','1','1','0','3','}',0 };
-    
+
     /* For the root of a namespace extension, the attributes are not queried by binding
-     * to the object and calling GetAttributesOf. Instead, the attributes are read from 
+     * to the object and calling GetAttributesOf. Instead, the attributes are read from
      * the registry value HKCR/CLSID/{...}/ShellFolder/Attributes. This is documented on MSDN.
      *
      * The MyDocuments shellfolder on WinXP has a HKCR/CLSID/{...}/ShellFolder/CallForAttributes
@@ -522,10 +522,10 @@ static void test_CallForAttributes(void)
     hr = SHGetDesktopFolder(&psfDesktop);
     ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr);
     if (FAILED(hr)) return;
-    
-    hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyDocuments, NULL, 
+
+    hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyDocuments, NULL,
                                        &pidlMyDocuments, NULL);
-    ok (SUCCEEDED(hr), 
+    ok (SUCCEEDED(hr),
         "Desktop's ParseDisplayName failed to parse MyDocuments's CLSID! hr = %08x\n", hr);
     if (FAILED(hr)) {
         IShellFolder_Release(psfDesktop);
@@ -533,7 +533,7 @@ static void test_CallForAttributes(void)
     }
 
     dwAttributes = 0xffffffff;
-    hr = IShellFolder_GetAttributesOf(psfDesktop, 1, 
+    hr = IShellFolder_GetAttributesOf(psfDesktop, 1,
                                       (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr);
 
@@ -543,7 +543,7 @@ static void test_CallForAttributes(void)
     ok (!(dwAttributes & SFGAO_GHOSTED), "SFGAO_GHOSTED attribute is set for MyDocuments!\n");
 
     /* We don't have the MyDocuments shellfolder in wine yet, and thus we don't have the registry
-     * key. So the test will return at this point, if run on wine. 
+     * key. So the test will return at this point, if run on wine.
      */
     lResult = RegOpenKeyExW(HKEY_CLASSES_ROOT, wszMyDocumentsKey, 0, KEY_WRITE|KEY_READ, &hKey);
     ok (lResult == ERROR_SUCCESS, "RegOpenKeyEx failed! result: %08x\n", lResult);
@@ -552,7 +552,7 @@ static void test_CallForAttributes(void)
         IShellFolder_Release(psfDesktop);
         return;
     }
-    
+
     /* Query MyDocuments' Attributes value, to be able to restore it later. */
     dwSize = sizeof(DWORD);
     lResult = RegQueryValueExW(hKey, wszAttributes, NULL, NULL, (LPBYTE)&dwOrigAttributes, &dwSize);
@@ -566,7 +566,7 @@ static void test_CallForAttributes(void)
 
     /* Query MyDocuments' CallForAttributes value, to be able to restore it later. */
     dwSize = sizeof(DWORD);
-    lResult = RegQueryValueExW(hKey, wszCallForAttributes, NULL, NULL, 
+    lResult = RegQueryValueExW(hKey, wszCallForAttributes, NULL, NULL,
                               (LPBYTE)&dwOrigCallForAttributes, &dwSize);
     ok (lResult == ERROR_SUCCESS, "RegQueryValueEx failed! result: %08x\n", lResult);
     if (lResult != ERROR_SUCCESS) {
@@ -575,40 +575,40 @@ static void test_CallForAttributes(void)
         IShellFolder_Release(psfDesktop);
         return;
     }
-    
-    /* Define via the Attributes value that MyDocuments attributes are SFGAO_ISSLOW and 
+
+    /* Define via the Attributes value that MyDocuments attributes are SFGAO_ISSLOW and
      * SFGAO_GHOSTED and that MyDocuments should be called for the SFGAO_ISSLOW and
      * SFGAO_FILESYSTEM attributes. */
     dwAttributes = SFGAO_ISSLOW|SFGAO_GHOSTED;
     RegSetValueExW(hKey, wszAttributes, 0, REG_DWORD, (LPBYTE)&dwAttributes, sizeof(DWORD));
     dwCallForAttributes = SFGAO_ISSLOW|SFGAO_FILESYSTEM;
-    RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD, 
+    RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD,
                    (LPBYTE)&dwCallForAttributes, sizeof(DWORD));
 
-    /* Although it is not set in CallForAttributes, the SFGAO_GHOSTED flag is reset by 
+    /* Although it is not set in CallForAttributes, the SFGAO_GHOSTED flag is reset by
      * GetAttributesOf. It seems that once there is a single attribute queried, for which
      * CallForAttributes is set, all flags are taken from the GetAttributesOf call and
-     * the flags in Attributes are ignored. 
+     * the flags in Attributes are ignored.
      */
     dwAttributes = SFGAO_ISSLOW|SFGAO_GHOSTED|SFGAO_FILESYSTEM;
-    hr = IShellFolder_GetAttributesOf(psfDesktop, 1, 
+    hr = IShellFolder_GetAttributesOf(psfDesktop, 1,
                                       (LPCITEMIDLIST*)&pidlMyDocuments, &dwAttributes);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf(MyDocuments) failed! hr = %08x\n", hr);
-    if (SUCCEEDED(hr)) 
-        ok (dwAttributes == SFGAO_FILESYSTEM, 
-            "Desktop->GetAttributes(MyDocuments) returned unexpected attributes: %08x\n", 
+    if (SUCCEEDED(hr))
+        ok (dwAttributes == SFGAO_FILESYSTEM,
+            "Desktop->GetAttributes(MyDocuments) returned unexpected attributes: %08x\n",
             dwAttributes);
 
     /* Restore MyDocuments' original Attributes and CallForAttributes registry values */
     RegSetValueExW(hKey, wszAttributes, 0, REG_DWORD, (LPBYTE)&dwOrigAttributes, sizeof(DWORD));
-    RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD, 
+    RegSetValueExW(hKey, wszCallForAttributes, 0, REG_DWORD,
                    (LPBYTE)&dwOrigCallForAttributes, sizeof(DWORD));
     RegCloseKey(hKey);
     IMalloc_Free(ppM, pidlMyDocuments);
     IShellFolder_Release(psfDesktop);
 }
 
-static void test_GetAttributesOf(void) 
+static void test_GetAttributesOf(void)
 {
     HRESULT hr;
     LPSHELLFOLDER psfDesktop, psfMyComputer;
@@ -622,7 +622,7 @@ static void test_GetAttributesOf(void)
     static const DWORD dwMyComputerFlags = /* As observed on WinXP SP2 */
         SFGAO_CANRENAME | SFGAO_CANDELETE | SFGAO_HASPROPSHEET |
         SFGAO_DROPTARGET | SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
-    WCHAR wszMyComputer[] = { 
+    WCHAR wszMyComputer[] = {
         ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-',
         'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 };
     char  cCurrDirA [MAX_PATH] = {0};
@@ -641,16 +641,16 @@ static void test_GetAttributesOf(void)
     dwFlags = 0xffffffff;
     hr = IShellFolder_GetAttributesOf(psfDesktop, 1, &pidlEmpty, &dwFlags);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf(empty pidl) failed! hr = %08x\n", hr);
-    ok (dwFlags == dwDesktopFlags, "Wrong Desktop attributes: %08x, expected: %08x\n", 
+    ok (dwFlags == dwDesktopFlags, "Wrong Desktop attributes: %08x, expected: %08x\n",
         dwFlags, dwDesktopFlags);
 
     /* .. or with no itemidlist at all. */
     dwFlags = 0xffffffff;
     hr = IShellFolder_GetAttributesOf(psfDesktop, 0, NULL, &dwFlags);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf(NULL) failed! hr = %08x\n", hr);
-    ok (dwFlags == dwDesktopFlags, "Wrong Desktop attributes: %08x, expected: %08x\n", 
+    ok (dwFlags == dwDesktopFlags, "Wrong Desktop attributes: %08x, expected: %08x\n",
         dwFlags, dwDesktopFlags);
-   
+
     /* Testing the attributes of the MyComputer shellfolder */
     hr = IShellFolder_ParseDisplayName(psfDesktop, NULL, NULL, wszMyComputer, NULL, &pidlMyComputer, NULL);
     ok (SUCCEEDED(hr), "Desktop's ParseDisplayName failed to parse MyComputer's CLSID! hr = %08x\n", hr);
@@ -659,7 +659,7 @@ static void test_GetAttributesOf(void)
         return;
     }
 
-    /* WinXP SP2 sets the SFGAO_CANLINK flag, when MyComputer is queried via the Desktop 
+    /* WinXP SP2 sets the SFGAO_CANLINK flag, when MyComputer is queried via the Desktop
      * folder object. It doesn't do this, if MyComputer is queried directly (see below).
      * SFGAO_CANLINK is the same as DROPEFFECT_LINK, which MSDN says means: "Drag source
      * should create a link to the original data". You can't create links on MyComputer on
@@ -669,7 +669,7 @@ static void test_GetAttributesOf(void)
     dwFlags = 0xffffffff;
     hr = IShellFolder_GetAttributesOf(psfDesktop, 1, (LPCITEMIDLIST*)&pidlMyComputer, &dwFlags);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf(MyComputer) failed! hr = %08x\n", hr);
-    ok ((dwFlags & ~(DWORD)SFGAO_CANLINK) == dwMyComputerFlags, 
+    ok ((dwFlags & ~(DWORD)SFGAO_CANLINK) == dwMyComputerFlags,
                     "Wrong MyComputer attributes: %08x, expected: %08x\n", dwFlags, dwMyComputerFlags);
 
     hr = IShellFolder_BindToObject(psfDesktop, pidlMyComputer, NULL, &IID_IShellFolder, (LPVOID*)&psfMyComputer);
@@ -683,8 +683,8 @@ static void test_GetAttributesOf(void)
 
     dwFlags = 0xffffffff;
     hr = IShellFolder_GetAttributesOf(psfMyComputer, 0, NULL, &dwFlags);
-    ok (SUCCEEDED(hr), "MyComputer->GetAttributesOf(NULL) failed! hr = %08x\n", hr); 
-    todo_wine { ok (dwFlags == dwMyComputerFlags, 
+    ok (SUCCEEDED(hr), "MyComputer->GetAttributesOf(NULL) failed! hr = %08x\n", hr);
+    todo_wine { ok (dwFlags == dwMyComputerFlags,
                     "Wrong MyComputer attributes: %08x, expected: %08x\n", dwFlags, dwMyComputerFlags); }
 
     IShellFolder_Release(psfMyComputer);
@@ -703,7 +703,7 @@ static void test_GetAttributesOf(void)
        cCurrDirA[len-1] = 0;
 
     MultiByteToWideChar(CP_ACP, 0, cCurrDirA, -1, cCurrDirW, MAX_PATH);
+
     hr = SHGetDesktopFolder(&IDesktopFolder);
     ok(hr == S_OK, "SHGetDesktopfolder failed %08x\n", hr);
 
@@ -740,7 +740,7 @@ static void test_GetAttributesOf(void)
     hr = IShellFolder_GetAttributesOf(IDesktopFolder, 1, (LPCITEMIDLIST*)&newPIDL, &dwFlags);
     ok (SUCCEEDED(hr), "Desktop->GetAttributesOf() failed! hr = %08x\n", hr);
     ok ((dwFlags&SFGAO_FOLDER), "Wrong directory attribute for absolute PIDL: %08x\n", dwFlags);
-        
+
     /* free memory */
     IMalloc_Free(ppM, newPIDL);
 
@@ -749,7 +749,7 @@ static void test_GetAttributesOf(void)
     Cleanup();
 
     IShellFolder_Release(IDesktopFolder);
-}    
+}
 
 static void test_SHGetPathFromIDList(void)
 {
@@ -760,7 +760,7 @@ static void test_SHGetPathFromIDList(void)
     BOOL result;
     HRESULT hr;
     LPSHELLFOLDER psfDesktop;
-    WCHAR wszMyComputer[] = { 
+    WCHAR wszMyComputer[] = {
         ':',':','{','2','0','D','0','4','F','E','0','-','3','A','E','A','-','1','0','6','9','-',
         'A','2','D','8','-','0','8','0','0','2','B','3','0','3','0','9','D','}',0 };
     WCHAR wszFileName[MAX_PATH];
@@ -786,7 +786,7 @@ static void test_SHGetPathFromIDList(void)
     result = pSHGetSpecialFolderPathW(NULL, wszDesktop, CSIDL_DESKTOP, FALSE);
     ok(result, "SHGetSpecialFolderPathW(CSIDL_DESKTOP) failed! Last error: %u\n", GetLastError());
     if (!result) return;
-    
+
     result = SHGetPathFromIDListW(pidlEmpty, wszPath);
     ok(result, "SHGetPathFromIDListW failed! Last error: %u\n", GetLastError());
     if (!result) return;
@@ -856,7 +856,7 @@ static void test_SHGetPathFromIDList(void)
     if (pStrRetToBufW)
     {
         pStrRetToBufW(&strret, pidlTestFile, wszPath, MAX_PATH);
-        ok(0 == lstrcmpW(wszFileName, wszPath), 
+        ok(0 == lstrcmpW(wszFileName, wszPath),
            "Desktop->GetDisplayNameOf(pidlTestFile, SHGDN_FORPARSING) "
            "returned incorrect path for file placed on desktop\n");
     }
@@ -930,7 +930,7 @@ static void test_EnumObjects_and_CompareIDs(void)
  * 'Target' and 'Attributes' properties.
  */
 static HRESULT WINAPI InitPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface, REFIID riid,
-    void **ppvObject) 
+    void **ppvObject)
 {
     if (!ppvObject)
         return E_INVALIDARG;
@@ -965,13 +965,13 @@ static HRESULT WINAPI InitPropertyBag_IPropertyBag_Read(IPropertyBag *iface, LPC
         'A','t','t','r','i','b','u','t','e','s',0 };
     static const WCHAR wszResolveLinkFlags[] = {
         'R','e','s','o','l','v','e','L','i','n','k','F','l','a','g','s',0 };
-       
+
     if (!lstrcmpW(pszPropName, wszTargetSpecialFolder)) {
         ok(V_VT(pVar) == VT_I4, "Wrong variant type for 'TargetSpecialFolder' property!\n");
         return E_INVALIDARG;
     }
-    
-    if (!lstrcmpW(pszPropName, wszResolveLinkFlags)) 
+
+    if (!lstrcmpW(pszPropName, wszResolveLinkFlags))
     {
         ok(V_VT(pVar) == VT_UI4, "Wrong variant type for 'ResolveLinkFlags' property!\n");
         return E_INVALIDARG;
@@ -980,7 +980,7 @@ static HRESULT WINAPI InitPropertyBag_IPropertyBag_Read(IPropertyBag *iface, LPC
     if (!lstrcmpW(pszPropName, wszTarget)) {
         WCHAR wszPath[MAX_PATH];
         BOOL result;
-        
+
         ok(V_VT(pVar) == VT_BSTR, "Wrong variant type for 'Target' property!\n");
         if (V_VT(pVar) != VT_BSTR) return E_INVALIDARG;
 
@@ -1010,7 +1010,7 @@ static HRESULT WINAPI InitPropertyBag_IPropertyBag_Write(IPropertyBag *iface, LP
     ok(FALSE, "Unexpected call to IPropertyBag_Write\n");
     return E_NOTIMPL;
 }
-    
+
 static const IPropertyBagVtbl InitPropertyBag_IPropertyBagVtbl = {
     InitPropertyBag_IPropertyBag_QueryInterface,
     InitPropertyBag_IPropertyBag_AddRef,
@@ -1044,18 +1044,18 @@ static void test_FolderShortcut(void) {
         'N','a','m','e','S','p','a','c','e','\\',
         '{','9','b','3','5','2','e','b','f','-','2','7','6','5','-','4','5','c','1','-',
         'b','4','c','6','-','8','5','c','c','7','f','7','a','b','c','6','4','}',0 };
-    
+
     WCHAR wszSomeSubFolder[] = { 'S','u','b','F','o','l','d','e','r', 0};
-    static const GUID CLSID_UnixDosFolder = 
+    static const GUID CLSID_UnixDosFolder =
         {0x9d20aae8, 0x0625, 0x44b0, {0x9c, 0xa7, 0x71, 0x88, 0x9c, 0x22, 0x54, 0xd9}};
 
     if (!pSHGetSpecialFolderPathW || !pStrRetToBufW) return;
-   
+
     /* These tests basically show, that CLSID_FolderShortcuts are initialized
      * via their IPersistPropertyBag interface. And that the target folder
      * is taken from the IPropertyBag's 'Target' property.
      */
-    hr = CoCreateInstance(&CLSID_FolderShortcut, NULL, CLSCTX_INPROC_SERVER, 
+    hr = CoCreateInstance(&CLSID_FolderShortcut, NULL, CLSCTX_INPROC_SERVER,
                           &IID_IPersistPropertyBag, (LPVOID*)&pPersistPropertyBag);
     ok (SUCCEEDED(hr), "CoCreateInstance failed! hr = 0x%08x\n", hr);
     if (FAILED(hr)) return;
@@ -1066,8 +1066,8 @@ static void test_FolderShortcut(void) {
         IPersistPropertyBag_Release(pPersistPropertyBag);
         return;
     }
-    
-    hr = IPersistPropertyBag_QueryInterface(pPersistPropertyBag, &IID_IShellFolder, 
+
+    hr = IPersistPropertyBag_QueryInterface(pPersistPropertyBag, &IID_IShellFolder,
                                             (LPVOID*)&pShellFolder);
     IPersistPropertyBag_Release(pPersistPropertyBag);
     ok(SUCCEEDED(hr), "IPersistPropertyBag_QueryInterface(IShellFolder) failed! hr = %08x\n", hr);
@@ -1099,9 +1099,9 @@ static void test_FolderShortcut(void) {
     hr = IPersistFolder3_GetCurFolder(pPersistFolder3, &pidlCurrentFolder);
     ok(SUCCEEDED(hr), "IPersistFolder3_GetCurFolder failed! hr=0x%08x\n", hr);
     ok(!pidlCurrentFolder, "IPersistFolder3_GetCurFolder should return a NULL pidl!\n");
-                    
+
     /* For FolderShortcut objects, the Initialize method initialized the folder's position in the
-     * shell namespace. The target folder, read from the property bag above, remains untouched. 
+     * shell namespace. The target folder, read from the property bag above, remains untouched.
      * The following tests show this: The itemidlist for some imaginary shellfolder object
      * is created and the FolderShortcut is initialized with it. GetCurFolder now returns this
      * itemidlist, but GetDisplayNameOf still returns the path from above.
@@ -1110,7 +1110,7 @@ static void test_FolderShortcut(void) {
     ok (SUCCEEDED(hr), "SHGetDesktopFolder failed! hr = %08x\n", hr);
     if (FAILED(hr)) return;
 
-    /* Temporarily register WineTestFolder as a shell namespace extension at the Desktop. 
+    /* Temporarily register WineTestFolder as a shell namespace extension at the Desktop.
      * Otherwise ParseDisplayName fails on WinXP with E_INVALIDARG */
     RegCreateKeyW(HKEY_CURRENT_USER, wszShellExtKey, &hShellExtKey);
     RegCloseKey(hShellExtKey);
@@ -1159,8 +1159,8 @@ static void test_FolderShortcut(void) {
         IShellFolder_Release(pShellFolder);
         return;
     }
-    
-    hr = IShellFolder_ParseDisplayName(pShellFolder, NULL, NULL, wszSomeSubFolder, NULL, 
+
+    hr = IShellFolder_ParseDisplayName(pShellFolder, NULL, NULL, wszSomeSubFolder, NULL,
                                        &pidlSubFolder, NULL);
     RemoveDirectoryW(wszDesktopPath);
     ok (SUCCEEDED(hr), "IShellFolder::ParseDisplayName failed! hr = %08x\n", hr);
@@ -1208,7 +1208,7 @@ struct FileStructW {
     BYTE  abFooBar2[4]; /* Beyond any recognition. */
     WCHAR wszName[1];   /* The long filename in unicode. */
     /* Just for documentation: Right after the unicode string: */
-    WORD  cbOffset;     /* FileStructW's offset from the beginning of the SHITMEID. 
+    WORD  cbOffset;     /* FileStructW's offset from the beginning of the SHITMEID.
                          * SHITEMID->cb == uOffset + cbLen */
 };
 #include "poppack.h"
@@ -1220,10 +1220,10 @@ static void test_ITEMIDLIST_format(void) {
     HANDLE hFile;
     HRESULT hr;
     BOOL bResult;
-    WCHAR wszFile[3][17] = { { 'e','v','e','n','_',0 }, { 'o','d','d','_',0 }, 
+    WCHAR wszFile[3][17] = { { 'e','v','e','n','_',0 }, { 'o','d','d','_',0 },
         { 'l','o','n','g','e','r','_','t','h','a','n','.','8','_','3',0 } };
     int i;
-    
+
     if(!pSHGetSpecialFolderPathW) return;
 
     bResult = pSHGetSpecialFolderPathW(NULL, wszPersonal, CSIDL_PERSONAL, FALSE);
@@ -1256,9 +1256,9 @@ static void test_ITEMIDLIST_format(void) {
         CHAR szFile[MAX_PATH];
         struct FileStructA *pFileStructA;
         WORD cbOffset;
-        
+
         WideCharToMultiByte(CP_ACP, 0, wszFile[i], -1, szFile, MAX_PATH, NULL, NULL);
-        
+
         hFile = CreateFileW(wszFile[i], GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_FLAG_WRITE_THROUGH, NULL);
         ok(hFile != INVALID_HANDLE_VALUE, "CreateFile failed! (%u)\n", GetLastError());
         if (hFile == INVALID_HANDLE_VALUE) {
@@ -1278,11 +1278,11 @@ static void test_ITEMIDLIST_format(void) {
         pFileStructA = (struct FileStructA *)pidlFile->mkid.abID;
         ok(pFileStructA->type == 0x32, "PIDLTYPE should be 0x32!\n");
         ok(pFileStructA->dummy == 0x00, "Dummy Byte should be 0x00!\n");
-        ok(pFileStructA->dwFileSize == 0, "Filesize should be zero!\n"); 
+        ok(pFileStructA->dwFileSize == 0, "Filesize should be zero!\n");
 
-        if (i < 2) /* First two file names are already in valid 8.3 format */ 
+        if (i < 2) /* First two file names are already in valid 8.3 format */
             ok(!strcmp(szFile, (CHAR*)&pidlFile->mkid.abID[12]), "Wrong file name!\n");
-        else 
+        else
             /* WinXP stores a derived 8.3 dos name (LONGER~1.8_3) here. We probably
              * can't implement this correctly, since unix filesystems don't support
              * this nasty short/long filename stuff. So we'll probably stay with our
@@ -1291,11 +1291,11 @@ static void test_ITEMIDLIST_format(void) {
             todo_wine { ok(pidlFile->mkid.abID[18] == '~', "Should be derived 8.3 name!\n"); }
 
         if (i == 0) /* First file name has an even number of chars. No need for alignment. */
-            ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] != '\0', 
-                "Alignment byte, where there shouldn't be!\n"); 
-        
+            ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] != '\0',
+                "Alignment byte, where there shouldn't be!\n");
+
         if (i == 1) /* Second file name has an uneven number of chars => alignment byte */
-            ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] == '\0', 
+            ok(pidlFile->mkid.abID[12 + strlen(szFile) + 1] == '\0',
                 "There should be an alignment byte, but isn't!\n");
 
         /* The offset of the FileStructW member is stored as a WORD at the end of the pidl. */
@@ -1305,24 +1305,24 @@ static void test_ITEMIDLIST_format(void) {
             "Wrong offset value (%d) stored at the end of the PIDL\n", cbOffset);
 
         if (cbOffset >= sizeof(struct FileStructA) &&
-            cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW)) 
+            cbOffset <= pidlFile->mkid.cb - sizeof(struct FileStructW))
         {
             struct FileStructW *pFileStructW = (struct FileStructW *)(((LPBYTE)pidlFile)+cbOffset);
 
-            ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen, 
+            ok(pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen,
                 "FileStructW's offset and length should add up to the PIDL's length!\n");
 
             if (pidlFile->mkid.cb == cbOffset + pFileStructW->cbLen) {
                 /* Since we just created the file, time of creation,
-                 * time of last access and time of last write access just be the same. 
-                 * These tests seem to fail sometimes (on WinXP), if the test is run again shortly 
+                 * time of last access and time of last write access just be the same.
+                 * These tests seem to fail sometimes (on WinXP), if the test is run again shortly
                  * after the first run. I do remember something with NTFS keeping the creation time
                  * if a file is deleted and then created again within a couple of seconds or so.
                  * Might be the reason. */
                 ok (pFileStructA->uFileDate == pFileStructW->uDate &&
                     pFileStructA->uFileTime == pFileStructW->uTime,
                     "Last write time should match creation time!\n");
-    
+
                 ok (pFileStructA->uFileDate == pFileStructW->uDate2 &&
                     pFileStructA->uFileTime == pFileStructW->uTime2,
                     "Last write time should match last access time!\n");
index c948274..234097a 100755 (executable)
@@ -52,7 +52,7 @@ static void test_GetAcceptLanguagesA(void)
        trace("GetAcceptLanguagesA: skipping tests\n");
        return;
     }
-    ok( (ERROR_NO_IMPERSONATION_TOKEN == GetLastError()) || 
+    ok( (ERROR_NO_IMPERSONATION_TOKEN == GetLastError()) ||
        (ERROR_CLASS_DOES_NOT_EXIST == GetLastError()) ||
        (ERROR_PROC_NOT_FOUND == GetLastError()) ||
        (ERROR_CALL_NOT_IMPLEMENTED == GetLastError()) ||
@@ -380,7 +380,7 @@ static void test_GetShellSecurityDescriptor(void)
                 "GetSecurityDescriptorControl failed with error %u\n", GetLastError());
         ok(0 == (control & SE_SELF_RELATIVE), "SD should be absolute\n");
 
-        ok(GetSecurityDescriptorDacl(psd, &bHasDacl, &pAcl, &bDefaulted), 
+        ok(GetSecurityDescriptorDacl(psd, &bHasDacl, &pAcl, &bDefaulted),
             "GetSecurityDescriptorDacl failed with error %u\n", GetLastError());
 
         ok(bHasDacl, "SD has no DACL\n");
@@ -404,21 +404,21 @@ static void test_GetShellSecurityDescriptor(void)
                     ACCESS_ALLOWED_ACE *paaa; /* will use for DENIED too */
 
                     ok(GetAce(pAcl, 0, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError());
-                    ok(paaa->Header.AceType == ACCESS_ALLOWED_ACE_TYPE, 
-                            "Invalid ACE type %d\n", paaa->Header.AceType); 
+                    ok(paaa->Header.AceType == ACCESS_ALLOWED_ACE_TYPE,
+                            "Invalid ACE type %d\n", paaa->Header.AceType);
                     ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags);
                     ok(paaa->Mask == GENERIC_ALL, "Invalid ACE mask %x\n", paaa->Mask);
 
                     ok(GetAce(pAcl, 1, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError());
-                    ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, 
-                            "Invalid ACE type %d\n", paaa->Header.AceType); 
+                    ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE,
+                            "Invalid ACE type %d\n", paaa->Header.AceType);
                     /* first one of two ACEs generated from inheritable entry - without inheritance */
                     ok(paaa->Header.AceFlags == 0, "Invalid ACE flags %x\n", paaa->Header.AceFlags);
                     ok(paaa->Mask == GENERIC_WRITE, "Invalid ACE mask %x\n", paaa->Mask);
 
                     ok(GetAce(pAcl, 2, (LPVOID*)&paaa), "GetAce failed with error %u\n", GetLastError());
-                    ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE, 
-                            "Invalid ACE type %d\n", paaa->Header.AceType); 
+                    ok(paaa->Header.AceType == ACCESS_DENIED_ACE_TYPE,
+                            "Invalid ACE type %d\n", paaa->Header.AceType);
                     /* second ACE - with inheritance */
                     ok(paaa->Header.AceFlags == MY_INHERITANCE,
                             "Invalid ACE flags %x\n", paaa->Header.AceFlags);
index d4ed84d..d562062 100755 (executable)
@@ -335,7 +335,7 @@ struct {
 static LPWSTR GetWideString(const char* szString)
 {
   LPWSTR wszString = HeapAlloc(GetProcessHeap(), 0, (2*INTERNET_MAX_URL_LENGTH) * sizeof(WCHAR));
-  
+
   MultiByteToWideChar(0, 0, szString, -1, wszString, INTERNET_MAX_URL_LENGTH);
 
   return wszString;
@@ -359,7 +359,7 @@ static void hash_url(const char* szUrl)
 {
   LPCSTR szTestUrl = szUrl;
   LPWSTR wszTestUrl = GetWideString(szTestUrl);
-  
+
   DWORD cbSize = sizeof(DWORD);
   DWORD dwHash1, dwHash2;
   ok(UrlHashA(szTestUrl, (LPBYTE)&dwHash1, cbSize) == S_OK, "UrlHashA didn't return S_OK\n");
@@ -424,7 +424,7 @@ static void test_UrlGetPart(void)
   ok (res==S_FALSE, "UrlGetPartA(\"hi\") returned %08X\n", res);
   ok(szPart[0]==0, "UrlGetPartA(\"hi\") return \"%s\" instead of \"\"\n", szPart);
   }
-  
+
   test_url_part(TEST_URL_3, URL_PART_HOSTNAME, 0, "localhost");
   test_url_part(TEST_URL_3, URL_PART_PORT, 0, "21");
   test_url_part(TEST_URL_3, URL_PART_USERNAME, 0, "foo");
@@ -443,7 +443,7 @@ static void test_url_escape(const char *szUrl, DWORD dwFlags, HRESULT dwExpectRe
 
     ok(UrlEscapeA(szUrl, szReturnUrl, &dwEscaped, dwFlags) == dwExpectReturn, "UrlEscapeA didn't return 0x%08x from \"%s\"\n", dwExpectReturn, szUrl);
     ok(strcmp(szReturnUrl,szExpectUrl)==0, "Expected \"%s\", but got \"%s\" from \"%s\"\n", szExpectUrl, szReturnUrl, szUrl);
-    
+
     dwEscaped = INTERNET_MAX_URL_LENGTH;
     urlW = GetWideString(szUrl);
     expected_urlW = GetWideString(szExpectUrl);
@@ -462,9 +462,9 @@ static void test_url_canonicalize(const char *szUrl, DWORD dwFlags, HRESULT dwEx
     LPWSTR wszUrl = GetWideString(szUrl);
     LPWSTR wszExpectUrl = GetWideString(szExpectUrl);
     LPWSTR wszConvertedUrl;
-    
+
     DWORD dwSize;
-    
+
     dwSize = INTERNET_MAX_URL_LENGTH;
     ok(UrlCanonicalizeA(szUrl, NULL, &dwSize, dwFlags) != dwExpectReturn, "Unexpected return for NULL buffer\n");
     ok(UrlCanonicalizeA(szUrl, szReturnUrl, &dwSize, dwFlags) == dwExpectReturn, "UrlCanonicalizeA didn't return 0x%08x\n", dwExpectReturn);
@@ -476,8 +476,8 @@ static void test_url_canonicalize(const char *szUrl, DWORD dwFlags, HRESULT dwEx
     wszConvertedUrl = GetWideString(szReturnUrl);
     ok(lstrcmpW(wszReturnUrl, wszConvertedUrl)==0, "Strings didn't match between ascii and unicode UrlCanonicalize!\n");
     FreeWideString(wszConvertedUrl);
-    
-            
+
+
     FreeWideString(wszUrl);
     FreeWideString(wszExpectUrl);
 }
@@ -535,7 +535,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
 
     hr = UrlCombineA(szUrl1, szUrl2, NULL, NULL, dwFlags);
     ok(hr == E_INVALIDARG, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_INVALIDARG);
-    
+
     dwSize = 0;
     hr = UrlCombineA(szUrl1, szUrl2, NULL, &dwSize, dwFlags);
     ok(hr == E_POINTER, "Checking length of string, return was 0x%08x, expected 0x%08x\n", hr, E_POINTER);
@@ -545,7 +545,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
     hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
     ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER);
     ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
-    
+
     hr = UrlCombineA(szUrl1, szUrl2, szReturnUrl, &dwSize, dwFlags);
     ok(hr == dwExpectReturn, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn);
     ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen);
@@ -562,7 +562,7 @@ static void test_url_combine(const char *szUrl1, const char *szUrl2, DWORD dwFla
     hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
     ok(hr == E_POINTER, "UrlCombineA returned 0x%08x, expected 0x%08x\n", hr, E_POINTER);
     ok(dwSize == dwExpectLen+1, "Got length %d, expected %d\n", dwSize, dwExpectLen+1);
-    
+
     hr = UrlCombineW(wszUrl1, wszUrl2, wszReturnUrl, &dwSize, dwFlags);
     ok(hr == dwExpectReturn, "UrlCombineW returned 0x%08x, expected 0x%08x\n", hr, dwExpectReturn);
     ok(dwSize == dwExpectLen, "Got length %d, expected %d\n", dwSize, dwExpectLen);
@@ -661,14 +661,14 @@ static void test_UrlUnescape(void)
 {
     CHAR szReturnUrl[INTERNET_MAX_URL_LENGTH];
     WCHAR ret_urlW[INTERNET_MAX_URL_LENGTH];
-    WCHAR *urlW, *expected_urlW; 
+    WCHAR *urlW, *expected_urlW;
     DWORD dwEscaped;
     size_t i;
     static char inplace[] = "file:///C:/Program%20Files";
     static WCHAR inplaceW[] = {'f','i','l','e',':','/','/','/','C',':','/',
                                'P','r','o','g','r','a','m','%','2','0','F','i','l','e','s',0};
 
-    for(i=0; i<sizeof(TEST_URL_UNESCAPE)/sizeof(TEST_URL_UNESCAPE[0]); i++) { 
+    for(i=0; i<sizeof(TEST_URL_UNESCAPE)/sizeof(TEST_URL_UNESCAPE[0]); i++) {
         dwEscaped=INTERNET_MAX_URL_LENGTH;
         ok(UrlUnescapeA(TEST_URL_UNESCAPE[i].url, szReturnUrl, &dwEscaped, 0) == S_OK, "UrlUnescapeA didn't return 0x%08x from \"%s\"\n", S_OK, TEST_URL_UNESCAPE[i].url);
         ok(strcmp(szReturnUrl,TEST_URL_UNESCAPE[i].expect)==0, "Expected \"%s\", but got \"%s\" from \"%s\"\n", TEST_URL_UNESCAPE[i].expect, szReturnUrl, TEST_URL_UNESCAPE[i].url);
@@ -695,8 +695,8 @@ static void test_PathSearchAndQualify(void)
     WCHAR path1[] = {'c',':','\\','f','o','o',0};
     WCHAR expect1[] = {'c',':','\\','f','o','o',0};
     WCHAR path2[] = {'c',':','f','o','o',0};
-    WCHAR c_drive[] = {'c',':',0}; 
-    WCHAR foo[] = {'f','o','o',0}; 
+    WCHAR c_drive[] = {'c',':',0};
+    WCHAR foo[] = {'f','o','o',0};
     WCHAR path3[] = {'\\','f','o','o',0};
     WCHAR winini[] = {'w','i','n','.','i','n','i',0};
     WCHAR out[MAX_PATH];
@@ -714,7 +714,7 @@ static void test_PathSearchAndQualify(void)
     GetFullPathNameW(c_drive, MAX_PATH, cur_dir, NULL);
     PathAddBackslashW(cur_dir);
     lstrcatW(cur_dir, foo);
-    ok(!lstrcmpiW(out, cur_dir), "strings don't match\n");    
+    ok(!lstrcmpiW(out, cur_dir), "strings don't match\n");
 
     /* foo */
     ok(PathSearchAndQualifyW(foo, out, MAX_PATH) != 0,
@@ -722,7 +722,7 @@ static void test_PathSearchAndQualify(void)
     GetFullPathNameW(dot, MAX_PATH, cur_dir, NULL);
     PathAddBackslashW(cur_dir);
     lstrcatW(cur_dir, foo);
-    ok(!lstrcmpiW(out, cur_dir), "strings don't match\n");    
+    ok(!lstrcmpiW(out, cur_dir), "strings don't match\n");
 
     /* \foo */
     ok(PathSearchAndQualifyW(path3, out, MAX_PATH) != 0,
@@ -751,7 +751,7 @@ static void test_PathCreateFromUrl(void)
 
     /* Check ret_path = NULL */
     len = sizeof(url);
-    ret = PathCreateFromUrlA(url, NULL, &len, 0); 
+    ret = PathCreateFromUrlA(url, NULL, &len, 0);
     ok ( ret == E_INVALIDARG, "got 0x%08x expected E_INVALIDARG\n", ret);
 
     for(i = 0; i < sizeof(TEST_PATHFROMURL) / sizeof(TEST_PATHFROMURL[0]); i++) {
@@ -952,7 +952,7 @@ static void test_PathCombineW(void)
     WCHAR wbuf[MAX_PATH+1], wstr1[MAX_PATH] = {'C',':','\\',0}, wstr2[MAX_PATH];
     static const WCHAR expout[] = {'C',':','\\','A','A',0};
     int i;
-   
+
     wszString2 = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
 
     /* NULL test */
@@ -1365,7 +1365,7 @@ static void test_PathCanonicalizeA(void)
     SetLastError(0xdeadbeef);
     res = PathCanonicalizeA(dest, NULL);
     ok(!res, "Expected failure\n");
-    ok(GetLastError() == ERROR_INVALID_PARAMETER, 
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
        "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
     todo_wine
     {
@@ -1384,7 +1384,7 @@ static void test_PathCanonicalizeA(void)
     SetLastError(0xdeadbeef);
     res = PathCanonicalizeA(NULL, "C:\\");
     ok(!res, "Expected failure\n");
-    ok(GetLastError() == ERROR_INVALID_PARAMETER, 
+    ok(GetLastError() == ERROR_INVALID_PARAMETER,
        "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError());
 
     /* try empty dest */
index 77a47e2..dd61ab1 100755 (executable)
@@ -102,10 +102,10 @@ static HKEY create_test_entries(void)
 
         trace("sExplen2 = (%d)\n", nExpLen2);
        if (nExpectedLen2 != nExpLen2)
-            trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 );      
+            trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 );
 
        /* Make sure we carry on with correct values */
-       nExpLen1 = nExpectedLen1; 
+       nExpLen1 = nExpectedLen1;
        nExpLen2 = nExpectedLen2;
        return hKey;
 }
@@ -238,7 +238,7 @@ static void test_SHQUeryValueEx(void)
         todo_wine
         {
                 ok( (0 == strcmp("", buf)) || (0 == strcmp(sTestpath2, buf)),
-                    "Expected empty or unexpanded string (win98), got (%s)\n", buf); 
+                    "Expected empty or unexpanded string (win98), got (%s)\n", buf);
         }
 
         ok( dwSize >= nUsedBuffer2, "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
index 895d767..8c0cf91 100755 (executable)
@@ -704,7 +704,7 @@ static void test_StrRStrI(void)
     static const WCHAR wszPattern4[] = {'a','b',0};
     LPWSTR retW;
     LPSTR retA;
-    
+
     check_strrstri(A, szTest, 4, "A", szTest+1);
     check_strrstri(A, szTest, 4, "aX", szTest+1);
     check_strrstri(A, szTest, 4, "Ay", NULL);
index a349271..86205ec 100755 (executable)
@@ -65,13 +65,13 @@ static HWND create_child_editcontrol (DWORD style, DWORD exstyle)
     HWND parentWnd;
     HWND editWnd;
     RECT rect;
-    
+
     rect.left = 0;
     rect.top = 0;
     rect.right = 300;
     rect.bottom = 300;
     assert(AdjustWindowRect(&rect, WS_OVERLAPPEDWINDOW, FALSE));
-    
+
     parentWnd = CreateWindowEx(0,
                             szEditTextPositionClass,
                             "Edit Test",
@@ -140,7 +140,7 @@ static void set_client_height(HWND Wnd, unsigned Height)
 
     /* Workaround for a bug in Windows' edit control
        (multi-line mode) */
-    GetWindowRect(Wnd, &WindowRect);             
+    GetWindowRect(Wnd, &WindowRect);
     SetWindowPos(Wnd, NULL, 0, 0,
                  WindowRect.right - WindowRect.left + 1,
                  WindowRect.bottom - WindowRect.top + 1,
@@ -168,7 +168,7 @@ static void test_edit_control_1(void)
     trace("EDIT: Single line\n");
     hwEdit = create_editcontrol(ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
     r = get_edit_style(hwEdit);
-    ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%lx\n", r); 
+    ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL), "Wrong style expected 0xc0 got: 0x%lx\n", r);
     for (i=0;i<65535;i++)
     {
        msMessage.wParam = i;
@@ -181,7 +181,7 @@ static void test_edit_control_1(void)
     trace("EDIT: Single line want returns\n");
     hwEdit = create_editcontrol(ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
     r = get_edit_style(hwEdit);
-    ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%lx\n", r); 
+    ok(r == (ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN), "Wrong style expected 0x10c0 got: 0x%lx\n", r);
     for (i=0;i<65535;i++)
     {
        msMessage.wParam = i;
@@ -194,7 +194,7 @@ static void test_edit_control_1(void)
     trace("EDIT: Multiline line\n");
     hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
     r = get_edit_style(hwEdit);
-    ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%lx\n", r); 
+    ok(r == (ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0xc4 got: 0x%lx\n", r);
     for (i=0;i<65535;i++)
     {
        msMessage.wParam = i;
@@ -207,7 +207,7 @@ static void test_edit_control_1(void)
     trace("EDIT: Multi line want returns\n");
     hwEdit = create_editcontrol(ES_MULTILINE | WS_VSCROLL | ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
     r = get_edit_style(hwEdit);
-    ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%lx\n", r); 
+    ok(r == (ES_WANTRETURN | ES_AUTOHSCROLL | ES_AUTOVSCROLL | ES_MULTILINE), "Wrong style expected 0x10c4 got: 0x%lx\n", r);
     for (i=0;i<65535;i++)
     {
        msMessage.wParam = i;
@@ -713,26 +713,26 @@ static void test_margins(void)
     DWORD old_margins, new_margins;
 
     hwEdit = create_editcontrol(WS_BORDER | ES_AUTOHSCROLL | ES_AUTOVSCROLL, 0);
-    
+
     old_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
     old_left_margin = LOWORD(old_margins);
     old_right_margin = HIWORD(old_margins);
-    
+
     /* Check if setting the margins works */
-    
+
     SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN, MAKELONG(10, 0));
     new_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
     ok(LOWORD(new_margins) == 10, "Wrong left margin: %d\n", LOWORD(new_margins));
     ok(HIWORD(new_margins) == old_right_margin, "Wrong right margin: %d\n", HIWORD(new_margins));
-    
+
     SendMessage(hwEdit, EM_SETMARGINS, EC_RIGHTMARGIN, MAKELONG(0, 10));
     new_margins = SendMessage(hwEdit, EM_GETMARGINS, 0, 0);
     ok(LOWORD(new_margins) == 10, "Wrong left margin: %d\n", LOWORD(new_margins));
     ok(HIWORD(new_margins) == 10, "Wrong right margin: %d\n", HIWORD(new_margins));
-    
-    
+
+
     /* The size of the rectangle must decrease if we increase the margin */
-    
+
     SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(5, 5));
     SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&old_rect);
     SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(15, 20));
@@ -741,17 +741,17 @@ static void test_margins(void)
     ok(new_rect.right == old_rect.right - 15, "The right border of the rectangle is wrong\n");
     ok(new_rect.top == old_rect.top, "The top border of the rectangle must not change\n");
     ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle must not change\n");
-    
-    
+
+
     /* If we set the margin to same value as the current margin,
        the rectangle must not change */
-    
+
     SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(10, 10));
     old_rect.left = 1;
     old_rect.right = 99;
     old_rect.top = 1;
     old_rect.bottom = 99;
-    SendMessage(hwEdit, EM_SETRECT, 0, (LPARAM)&old_rect);    
+    SendMessage(hwEdit, EM_SETRECT, 0, (LPARAM)&old_rect);
     SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&old_rect);
     SendMessage(hwEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN, MAKELONG(10, 10));
     SendMessage(hwEdit, EM_GETRECT, 0, (LPARAM)&new_rect);
@@ -759,7 +759,7 @@ static void test_margins(void)
     ok(new_rect.right == old_rect.right, "The right border of the rectangle has changed\n");
     ok(new_rect.top == old_rect.top, "The top border of the rectangle has changed\n");
     ok(new_rect.bottom == old_rect.bottom, "The bottom border of the rectangle has changed\n");
-    
+
     DestroyWindow (hwEdit);
 }
 
@@ -791,15 +791,15 @@ void test_text_position_style(DWORD style)
     b2 = 2 * b;
     b3 = 3 * b;
     bm = b2 - 1;
-    
+
     /* Get a stock font for which we can determine the metrics */
     assert(font = GetStockObject(SYSTEM_FONT));
     assert(dc = GetDC(NULL));
     oldFont = SelectObject(dc, font);
-    assert(GetTextMetrics(dc, &metrics));    
+    assert(GetTextMetrics(dc, &metrics));
     SelectObject(dc, oldFont);
     ReleaseDC(NULL, dc);
-    
+
     /* Windows' edit control has some bugs in multi-line mode:
      * - Sometimes the format rectangle doesn't get updated
      *   (see workaround in set_client_height())
@@ -807,9 +807,9 @@ void test_text_position_style(DWORD style)
      *   line, the format rectangle is still as high as a text line
      *   (higher than the client rectangle) and the caret is not shown
      */
-    
+
     /* Edit controls that are in a parent window */
-       
+
     hwEdit = create_child_editcontrol(style | WS_VISIBLE, 0);
     SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
     if (single_line)
@@ -853,7 +853,7 @@ void test_text_position_style(DWORD style)
 
 
     /* Edit controls that are popup windows */
-    
+
     hwEdit = create_editcontrol(style | WS_POPUP, 0);
     SendMessage(hwEdit, WM_SETFONT, (WPARAM) font, (LPARAM) FALSE);
     if (single_line)
@@ -909,7 +909,7 @@ static BOOL RegisterWindowClasses (void)
     WNDCLASSA test2;
     WNDCLASSA test3;
     WNDCLASSA text_position;
-    
+
     test2.style = 0;
     test2.lpfnWndProc = ET2_WndProc;
     test2.cbClsExtra = 0;
@@ -968,6 +968,6 @@ START_TEST(edit)
     test_edit_control_5();
     test_margins();
     test_text_position();
-    
+
     UnregisterWindowClasses();
 }
index 8b02b71..fdbdfe9 100644 (file)
@@ -179,7 +179,7 @@ check (const struct listbox_test test)
        HeapFree (GetProcessHeap(), 0, txtw);
        HeapFree (GetProcessHeap(), 0, txt);
   }
-  
+
   /* Confirm the count of items, and that an invalid delete does not remove anything */
   res = SendMessage (hLB, LB_GETCOUNT, 0, 0);
   ok((res==4), "Expected 4 items, got %d\n", res);
@@ -395,7 +395,7 @@ static void test_listbox_height(void)
     HWND hList;
     int r, id;
 
-    hList = CreateWindow( "ListBox", "list test", 0, 
+    hList = CreateWindow( "ListBox", "list test", 0,
                           1, 1, 600, 100, NULL, NULL, NULL, NULL );
     ok( hList != NULL, "failed to create listbox\n");
 
index 52d52d9..0b8ddfc 100755 (executable)
@@ -173,7 +173,7 @@ static void register_menu_check_class(void)
         NULL,
         TEXT("WineMenuCheck"),
     };
-    
+
     atomMenuCheckClass = RegisterClass(&wc);
 }
 
@@ -231,7 +231,7 @@ static void test_menu_ownerdraw(void)
     k=0;
     for( j=0;j<2;j++) /* create columns */
         for(i=0;i<2;i++) { /* create rows */
-            ret = AppendMenu( hmenu, MF_OWNERDRAW | 
+            ret = AppendMenu( hmenu, MF_OWNERDRAW |
                     (i==0 ? MF_MENUBREAK : 0), k, (LPCTSTR) k);
             k++;
             ok( ret, "AppendMenu failed for %d\n", k-1);
@@ -261,11 +261,11 @@ static void test_menu_ownerdraw(void)
     /* test what MF_MENUBREAK did at the first position. Also show
      * that an MF_SEPARATOR is ignored in the height calculation. */
     leftcol= MOD_rc[0].left;
-    ModifyMenu( hmenu, 0, MF_BYCOMMAND| MF_OWNERDRAW| MF_SEPARATOR, 0, 0); 
+    ModifyMenu( hmenu, 0, MF_BYCOMMAND| MF_OWNERDRAW| MF_SEPARATOR, 0, 0);
     /* display the menu */
     ret = TrackPopupMenu( hmenu, 0x100, 100,100, 0, hwnd, NULL);
     /* left should be 4 pixels less now */
-    ok( leftcol == MOD_rc[0].left + 4, 
+    ok( leftcol == MOD_rc[0].left + 4,
             "columns should be 4 pixels to the left (actual %ld).\n",
             leftcol - MOD_rc[0].left);
     /* test width */
@@ -284,7 +284,7 @@ static void test_menu_ownerdraw(void)
     ok(hmenu != NULL, "CreateMenu failed with error %ld\n", GetLastError());
     if( !hmenu) { DestroyWindow(hwnd);return;}
     MOD_maxid=1;
-    for(i=0;i<2;i++) { 
+    for(i=0;i<2;i++) {
         ret = AppendMenu( hmenu, MF_OWNERDRAW , i, 0);
         ok( ret, "AppendMenu failed for %d\n", i);
     }
@@ -515,7 +515,7 @@ static void test_menu_add_string( void )
 
     char strback[0x80];
     WCHAR strbackW[0x80];
-    static const WCHAR expectedString[] = {'D', 'u', 'm', 'm', 'y', ' ', 
+    static const WCHAR expectedString[] = {'D', 'u', 'm', 'm', 'y', ' ',
                          's', 't', 'r', 'i', 'n', 'g', 0};
 
     hmenu = CreateMenu();
@@ -543,10 +543,10 @@ static void test_menu_add_string( void )
     /* Test combination of ownerdraw and strings with GetMenuItemString(A/W) */
     strcpy(string, "Dummy string");
     memset(&info, 0x00, sizeof(info));
-    info.cbSize= sizeof(MENUITEMINFO); 
+    info.cbSize= sizeof(MENUITEMINFO);
     info.fMask= MIIM_FTYPE | MIIM_STRING; /* Set OwnerDraw + typeData */
     info.fType= MFT_OWNERDRAW;
-    info.dwTypeData= string; 
+    info.dwTypeData= string;
     rc = InsertMenuItem( hmenu, 0, TRUE, &info );
     ok (rc, "InsertMenuItem failed\n");
 
@@ -559,10 +559,10 @@ static void test_menu_add_string( void )
 
     /* Just change ftype to string and see what text is stored */
     memset(&info, 0x00, sizeof(info));
-    info.cbSize= sizeof(MENUITEMINFO); 
+    info.cbSize= sizeof(MENUITEMINFO);
     info.fMask= MIIM_FTYPE; /* Set string type */
     info.fType= MFT_STRING;
-    info.dwTypeData= (char *)0xdeadbeef; 
+    info.dwTypeData= (char *)0xdeadbeef;
     rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
     ok (rc, "SetMenuItemInfo failed\n");
 
@@ -572,29 +572,29 @@ static void test_menu_add_string( void )
 
     /* Ensure change to bitmap type fails */
     memset(&info, 0x00, sizeof(info));
-    info.cbSize= sizeof(MENUITEMINFO); 
+    info.cbSize= sizeof(MENUITEMINFO);
     info.fMask= MIIM_FTYPE; /* Set as bitmap type */
     info.fType= MFT_BITMAP;
-    info.dwTypeData= (char *)0xdeadbee2; 
+    info.dwTypeData= (char *)0xdeadbee2;
     rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
     ok (!rc, "SetMenuItemInfo unexpectedly worked\n");
 
     /* Just change ftype back and ensure data hasn't been freed */
     info.fType= MFT_OWNERDRAW; /* Set as ownerdraw type */
-    info.dwTypeData= (char *)0xdeadbee3; 
+    info.dwTypeData= (char *)0xdeadbee3;
     rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
     ok (rc, "SetMenuItemInfo failed\n");
-    
+
     /* Did we keep the old dwTypeData? */
     ok (GetMenuString( hmenu, 0, strback, 99, MF_BYPOSITION), "GetMenuString on ownerdraw entry failed\n");
     ok (!strcmp( strback, "Dummy string" ), "Menu text from Ansi version incorrect\n");
 
     /* Just change string value (not type) */
     memset(&info, 0x00, sizeof(info));
-    info.cbSize= sizeof(MENUITEMINFO); 
+    info.cbSize= sizeof(MENUITEMINFO);
     info.fMask= MIIM_STRING; /* Set typeData */
     strcpy(string2, "string2");
-    info.dwTypeData= string2; 
+    info.dwTypeData= string2;
     rc = SetMenuItemInfo( hmenu, 0, TRUE, &info );
     ok (rc, "SetMenuItemInfo failed\n");
 
@@ -603,7 +603,7 @@ static void test_menu_add_string( void )
 
     /*  crashes with wine 0.9.5 */
     memset(&info, 0x00, sizeof(info));
-    info.cbSize= sizeof(MENUITEMINFO); 
+    info.cbSize= sizeof(MENUITEMINFO);
     info.fMask= MIIM_FTYPE | MIIM_STRING; /* Set OwnerDraw + typeData */
     info.fType= MFT_OWNERDRAW;
     rc = InsertMenuItem( hmenu, 0, TRUE, &info );
@@ -650,7 +650,7 @@ static  WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
     DMIINFF( i, e, dwTypeData)\
     DMIINFF( i, e, cch)\
     if( s==sizeof(MENUITEMINFOA)) DMIINFF( i, e, hbmpItem)\
-}    
+}
 
 /* insert menu item */
 #define TMII_INSMI( a1,b1,c1,d1,e1,f1,g1,h1,i1,j1,k1,l1,m1,n1,\
@@ -850,13 +850,13 @@ static void test_menu_iteminfo( void )
         txt, OK, OK )
     TMII_DONE
     /* to be continued */
-    /* set text with MIIM_TYPE and retrieve with MIIM_STRING */ 
+    /* set text with MIIM_TYPE and retrieve with MIIM_STRING */
     TMII_INSMI( {, S, MIIM_TYPE, MFT_STRING, -1, -1, -1, -1, -1, -1, txt, 6, -1, }, OK)
     TMII_GMII ( {, S, MIIM_STRING|MIIM_FTYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_STRING|MIIM_FTYPE, MFT_STRING, -9, -9, 0, -9, -9, -9, string, 4, -9, },
         txt, OK, OK )
     TMII_DONE
-    /* set text with MIIM_TYPE and retrieve with MIIM_STRING; MFT_OWNERDRAW causes an empty string */ 
+    /* set text with MIIM_TYPE and retrieve with MIIM_STRING; MFT_OWNERDRAW causes an empty string */
     TMII_INSMI( {, S, MIIM_TYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, -1, -1, -1, -1, txt, 6, -1, }, OK)
     TMII_GMII ( {, S, MIIM_STRING|MIIM_FTYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -9, -9, 0, -9, -9, -9, string, 0, -9, },
@@ -877,13 +877,13 @@ static void test_menu_iteminfo( void )
         {, S, 0, -9, -9, -9, 0, -9, -9, -9, string, 80, -9, },
         init, OK, OK )
     TMII_DONE
-    /* contrary to MIIM_TYPE,you can set the text for an owner draw menu */ 
+    /* contrary to MIIM_TYPE,you can set the text for an owner draw menu */
     TMII_INSMI( {, S, MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, -1, -1, -1, -1, txt, 0, -1, }, OK)
     TMII_GMII ( {, S, MIIM_STRING|MIIM_FTYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_STRING|MIIM_FTYPE, MFT_OWNERDRAW, -9, -9, 0, -9, -9, -9, string, 4, -9, },
         txt, OK, OK )
     TMII_DONE
-    /* same but retrieve with MIIM_TYPE */ 
+    /* same but retrieve with MIIM_TYPE */
     TMII_INSMI( {, S, MIIM_STRING|MIIM_FTYPE, MFT_STRING|MFT_OWNERDRAW, -1, -1, -1, -1, -1, -1, txt, 0, -1, }, OK)
     TMII_GMII ( {, S, MIIM_TYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_TYPE, MFT_OWNERDRAW, -9, -9, 0, -9, -9, -9, NULL, 4, NULL, },
@@ -900,7 +900,7 @@ static void test_menu_iteminfo( void )
         empty, OK, ER )
     TMII_DONE
 
-    /* How is that with bitmaps? */ 
+    /* How is that with bitmaps? */
     TMII_INSMI( {, S, MIIM_BITMAP, -1, -1, -1, -1, -1, -1, -1, -1, -1, hbm, }, OK)
     TMII_GMII ( {, S, MIIM_TYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_TYPE, MFT_BITMAP, -9, -9, 0, -9, -9, -9, hbm, 0, hbm, },
@@ -956,7 +956,7 @@ static void test_menu_iteminfo( void )
         {, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, },
         init, OK, ER )
     TMII_DONE
+
     TMII_INSMI( {, S, MIIM_TYPE, MFT_SEPARATOR, 0, 0, 0, 0, 0, 0, txt, 0, 0, }, OK)
     TMII_GMII ( {, S, MIIM_TYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_TYPE, MFT_SEPARATOR, -9, -9, 0, -9, -9, -9, 0, 0, 0, },
@@ -1069,7 +1069,7 @@ static void test_menu_iteminfo( void )
                 {, S, 0, -9, -9, -9,  0, -9, -9, -9, string, 80, -9, },
         init, OK, OK )
     TMII_DONE
-    /* some tests with small cbSize: the hbmpItem is to be ignored */ 
+    /* some tests with small cbSize: the hbmpItem is to be ignored */
     TMII_INSMI( {, S - 4, MIIM_BITMAP, -1, -1, -1, -1, -1, -1, -1, -1, -1, hbm, }, OK)
     TMII_GMII ( {, S, MIIM_TYPE, -9, -9, -9, -9, -9, -9, -9, string, 80, -9, },
         {, S, MIIM_TYPE, MFT_SEPARATOR, -9, -9, 0, -9, -9, -9, NULL, 0, NULL, },
@@ -1152,8 +1152,8 @@ static void test_menu_iteminfo( void )
   DeleteObject( hbm);
 }
 
-/* 
-   The following tests try to confirm the algorithm used to return the menu items 
+/*
+   The following tests try to confirm the algorithm used to return the menu items
    when there is a collision between a menu item and a popup menu
  */
 void test_menu_search_bycommand( void )
@@ -1167,7 +1167,7 @@ void test_menu_search_bycommand( void )
 
     /* Case 1: Menu containing a menu item */
     hmenu = CreateMenu();
-    
+
     memset( &info, 0, sizeof info );
     info.cbSize = sizeof info;
     info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID;
@@ -1175,7 +1175,7 @@ void test_menu_search_bycommand( void )
     strcpy(strIn, "Case 1 MenuItem");
     info.dwTypeData = strIn;
     info.wID = (UINT) 0x1234;
-    
+
     rc = InsertMenuItem(hmenu, 0, TRUE, &info );
     ok (rc, "Inserting the menuitem failed\n");
 
@@ -1213,7 +1213,7 @@ void test_menu_search_bycommand( void )
     /* Case 2: Menu containing a popup menu */
     hmenu = CreateMenu();
     hmenuSub = CreateMenu();
-    
+
     strcpy(strIn, "Case 2 SubMenu");
     rc = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, strIn);
     ok (rc, "Inserting the popup menu into the main menu failed\n");
@@ -1248,7 +1248,7 @@ void test_menu_search_bycommand( void )
     ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the popup menu\n");
     ok (!strcmp(info.dwTypeData, "Case 2 SubMenu"), "Returned item has wrong label\n");
 
-    /* 
+    /*
         Now add an item after it with the same id
      */
     memset( &info, 0, sizeof info );
@@ -1274,7 +1274,7 @@ void test_menu_search_bycommand( void )
     ok (info.wID == (UINT_PTR)hmenuSub, "IDs differ for the popup menu\n");
     ok (!strcmp(info.dwTypeData, "Case 2 MenuItem 1"), "Returned item has wrong label (%s)\n", info.dwTypeData);
 
-    /* 
+    /*
         Now add an item before the popup (with the same id)
      */
     memset( &info, 0, sizeof info );
@@ -1303,14 +1303,14 @@ void test_menu_search_bycommand( void )
     DestroyMenu( hmenu );
     DestroyMenu( hmenuSub );
 
-    /* 
-        Case 3: Menu containing a popup menu which in turn 
+    /*
+        Case 3: Menu containing a popup menu which in turn
            contains 2 items with the same id as the popup itself
      */
-             
+
     hmenu = CreateMenu();
     hmenuSub = CreateMenu();
-    
+
     memset( &info, 0, sizeof info );
     info.cbSize = sizeof info;
     info.fMask = MIIM_FTYPE | MIIM_STRING | MIIM_ID;
@@ -1330,7 +1330,7 @@ void test_menu_search_bycommand( void )
     info.fType = MFT_STRING;
     info.dwTypeData = "MenuItem 2";
     info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/
-    
+
     rc = InsertMenuItem(hmenuSub, 1, TRUE, &info );
     ok (rc, "Inserting the sub menu menuitem 2 failed\n");
 
@@ -1353,17 +1353,17 @@ void test_menu_search_bycommand( void )
     DestroyMenu( hmenu );
     DestroyMenu( hmenuSub );
 
-    /* 
+    /*
         Case 4: Menu containing 2 popup menus, the second
            contains 2 items with the same id as the first popup menu
      */
     hmenu = CreateMenu();
     hmenuSub = CreateMenu();
     hmenuSub2 = CreateMenu();
-    
+
     rc = InsertMenu(hmenu, 0, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub, "Submenu");
     ok (rc, "Inserting the popup menu into the main menu failed\n");
-    
+
     rc = InsertMenu(hmenu, 1, MF_BYPOSITION | MF_POPUP | MF_STRING, (UINT_PTR)hmenuSub2, "Submenu2");
     ok (rc, "Inserting the popup menu into the main menu failed\n");
 
@@ -1373,7 +1373,7 @@ void test_menu_search_bycommand( void )
     info.fType = MFT_STRING;
     info.dwTypeData = "MenuItem";
     info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/
-   
+
     rc = InsertMenuItem(hmenuSub2, 0, TRUE, &info );
     ok (rc, "Inserting the sub menu menuitem failed\n");
 
@@ -1383,7 +1383,7 @@ void test_menu_search_bycommand( void )
     info.fType = MFT_STRING;
     info.dwTypeData = "MenuItem 2";
     info.wID = (UINT_PTR) hmenuSub; /* Enforce id collisions with the hmenu of the popup submenu*/
-    
+
     rc = InsertMenuItem(hmenuSub2, 1, TRUE, &info );
     ok (rc, "Inserting the sub menu menuitem 2 failed\n");
 
index ec21cc7..950a813 100755 (executable)
@@ -486,7 +486,7 @@ static const struct message WmShowVisMaxPopupSeq[] = {
 /* CreateWindow (for a child popup window, not initially visible) */
 static const struct message WmCreateChildPopupSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -499,7 +499,7 @@ static const struct message WmCreateChildPopupSeq[] = {
  */
 static const struct message WmCreateInvisiblePopupSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { WM_STYLECHANGING, sent },
@@ -539,7 +539,7 @@ static const struct message WmShowVisiblePopupSeq_3[] = {
 /* CreateWindow (for child window, not initially visible) */
 static const struct message WmCreateChildSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     /* child is inserted into parent's child list after WM_NCCREATE returns */
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
@@ -552,7 +552,7 @@ static const struct message WmCreateChildSeq[] = {
 /* CreateWindow (for maximized child window, not initially visible) */
 static const struct message WmCreateMaximizedChildSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -571,7 +571,7 @@ static const struct message WmCreateMaximizedChildSeq[] = {
 /* CreateWindow (for a child window, initially visible) */
 static const struct message WmCreateVisibleChildSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     /* child is inserted into parent's child list after WM_NCCREATE returns */
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { EVENT_OBJECT_REORDER, winevent_hook|wparam|lparam, 0, 0 },
@@ -1262,12 +1262,12 @@ static int log_all_parent_messages;
 
 static void add_message(const struct message *msg)
 {
-    if (!sequence) 
+    if (!sequence)
     {
        sequence_size = 10;
        sequence = HeapAlloc( GetProcessHeap(), 0, sequence_size * sizeof (struct message) );
     }
-    if (sequence_cnt == sequence_size) 
+    if (sequence_cnt == sequence_size)
     {
        sequence_size *= 2;
        sequence = HeapReAlloc( GetProcessHeap(), 0, sequence, sequence_size * sizeof (struct message) );
@@ -1314,7 +1314,7 @@ static void ok_sequence_(const struct message *expected, const char *context, in
     static const struct message end_of_sequence = { 0, 0, 0, 0 };
     const struct message *actual;
     int failcount = 0;
-    
+
     add_message(&end_of_sequence);
 
     actual = sequence;
@@ -1499,7 +1499,7 @@ static const struct message WmDestroyMDIclientSeq[] = {
 /* CreateWindow for MDI child window, initially visible */
 static const struct message WmCreateMDIchildVisibleSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -1607,7 +1607,7 @@ static const struct message WmDestroyMDIchildVisibleSeq[] = {
 /* CreateWindow for MDI child window, initially invisible */
 static const struct message WmCreateMDIchildInvisibleSeq[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -1638,7 +1638,7 @@ static const struct message WmDestroyMDIchildInvisibleSeq[] = {
 /* CreateWindow for the 1st MDI child window, initially visible and maximized */
 static const struct message WmCreateMDIchildVisibleMaxSeq1[] = {
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -1711,7 +1711,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
     { WM_SETREDRAW, sent|wparam, 1 }, /* in the 1st MDI child */
     /* create the 2nd MDI child */
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -1777,7 +1777,7 @@ static const struct message WmCreateMDIchildVisibleMaxSeq2[] = {
 static const struct message WmCreateMDIchildVisibleMaxSeq3[] = {
     { WM_MDICREATE, sent },
     { HCBT_CREATEWND, hook },
-    { WM_NCCREATE, sent }, 
+    { WM_NCCREATE, sent },
     { WM_NCCALCSIZE, sent|wparam, 0 },
     { WM_CREATE, sent },
     { EVENT_OBJECT_CREATE, winevent_hook|wparam|lparam, 0, 0 },
@@ -3036,12 +3036,12 @@ static void test_showwindow(void)
     ShowWindow(hchild, SW_HIDE);
     ShowWindow(hwnd, SW_HIDE);
     flush_sequence();
-    /* ShowWindow(SW_SHOWNA) with child and parent invisible */ 
+    /* ShowWindow(SW_SHOWNA) with child and parent invisible */
     trace("calling ShowWindow( SW_SHOWNA) for invisible child with invisible parent\n");
     ok( ShowWindow(hchild, SW_SHOWNA) == FALSE, "ShowWindow: window was visible\n" );
     ok_sequence(WmSHOWNAChildInvisParInvis, "ShowWindow(SW_SHOWNA) invisible child and parent", FALSE);
     trace("done\n");
-    /* ShowWindow(SW_SHOWNA) with child visible and parent invisible */ 
+    /* ShowWindow(SW_SHOWNA) with child visible and parent invisible */
     ok( ShowWindow(hchild, SW_SHOW) != FALSE, "ShowWindow: window was invisible\n" );
     flush_sequence();
     trace("calling ShowWindow( SW_SHOWNA) for the visible child and invisible parent\n");
@@ -3310,7 +3310,7 @@ static void test_messages(void)
                              0, 0, 10, 10, hparent, 0, 0, NULL);
     ok (hchild != 0, "Failed to create child window\n");
     ok_sequence(WmCreateChildSeq, "CreateWindow:child", FALSE);
-    
+
     hchild2 = CreateWindowExA(0, "SimpleWindowClass", "Test child2", WS_CHILD,
                                100, 100, 50, 50, hparent, 0, 0, NULL);
     ok (hchild2 != 0, "Failed to create child2 window\n");
@@ -4886,7 +4886,7 @@ static void test_accelerators(void)
 
 /************* window procedures ********************/
 
-static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message, 
+static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
                             WPARAM wParam, LPARAM lParam)
 {
     static long defwndproc_counter = 0;
@@ -4954,7 +4954,7 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
        /* test_accelerators() depends on this */
        case WM_NCHITTEST:
            return HTCLIENT;
-    
+
        /* ignore */
        case WM_MOUSEMOVE:
        case WM_SETCURSOR:
@@ -5024,7 +5024,7 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message,
     }
 
     defwndproc_counter++;
-    ret = unicode ? DefWindowProcW(hwnd, message, wParam, lParam) 
+    ret = unicode ? DefWindowProcW(hwnd, message, wParam, lParam)
                  : DefWindowProcA(hwnd, message, wParam, lParam);
     defwndproc_counter--;
 
@@ -5244,8 +5244,8 @@ static BOOL RegisterWindowClasses(void)
 static HHOOK hCBT_hook;
 static DWORD cbt_hook_thread_id;
 
-static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) 
-{ 
+static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
+{
     static const char *CBT_code_name[10] = {
        "HCBT_MOVESIZE",
        "HCBT_MINMAX",
@@ -5391,7 +5391,7 @@ static const struct message WmGetTextLengthAfromW[] = {
     { 0 }
 };
 
-static const WCHAR testWindowClassW[] = 
+static const WCHAR testWindowClassW[] =
 { 'T','e','s','t','W','i','n','d','o','w','C','l','a','s','s','W',0 };
 
 static const WCHAR dummy_window_text[] = {'d','u','m','m','y',' ','t','e','x','t',0};
@@ -5708,8 +5708,8 @@ static void CALLBACK win_event_global_hook_proc(HWINEVENTHOOK hevent,
 static HHOOK hCBT_global_hook;
 static DWORD cbt_global_hook_thread_id;
 
-static LRESULT CALLBACK cbt_global_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) 
-{ 
+static LRESULT CALLBACK cbt_global_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
+{
     HWND hwnd;
     char buf[256];
 
@@ -6176,7 +6176,7 @@ static void test_scrollwindowex(void)
             WS_VISIBLE|WS_OVERLAPPEDWINDOW,
             100, 100, 200, 200, 0, 0, 0, NULL);
     ok (hwnd != 0, "Failed to create overlapped window\n");
-    hchild = CreateWindowExA(0, "TestWindowClass", "Test child", 
+    hchild = CreateWindowExA(0, "TestWindowClass", "Test child",
             WS_VISIBLE|WS_CAPTION|WS_CHILD,
             10, 10, 150, 150, hwnd, 0, 0, NULL);
     ok (hchild != 0, "Failed to create child\n");
index 13988d9..9c968ad 100755 (executable)
@@ -25,7 +25,7 @@
 
 static UINT (WINAPI *pPrivateExtractIconsA)(LPCTSTR, int, int, int, HICON *, UINT *, UINT, UINT) = NULL;
 
-static void init_function_pointers(void) 
+static void init_function_pointers(void)
 {
     HMODULE hmod = GetModuleHandleA("user32.dll");
     if (hmod) {
@@ -264,11 +264,11 @@ static void test_PrivateExtractIcons(void) {
     UINT cIcons, cIcons2;
 
     if (!pPrivateExtractIconsA) return;
-    
+
     cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, NULL, NULL, 0, 0);
-    cIcons2 = pPrivateExtractIconsA(szShell32Dll, 4, MAKELONG(32,16), MAKELONG(32,16), 
+    cIcons2 = pPrivateExtractIconsA(szShell32Dll, 4, MAKELONG(32,16), MAKELONG(32,16),
                                    NULL, NULL, 256, 0);
-    ok((cIcons == cIcons2) && (cIcons > 0), 
+    ok((cIcons == cIcons2) && (cIcons > 0),
        "Icon count should be independent of requested icon sizes and base icon index! "
        "(cIcons=%d, cIcons2=%d)\n", cIcons, cIcons2);
 
@@ -278,22 +278,22 @@ static void test_PrivateExtractIcons(void) {
     cIcons = pPrivateExtractIconsA(szShell32Dll, 0, 16, 16, ahIcon, aIconId, 3, 0);
     ok(cIcons == 3, "Three icons requested got cIcons=%d\n", cIcons);
 
-    cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(32,16), MAKELONG(32,16), 
+    cIcons = pPrivateExtractIconsA(szShell32Dll, 0, MAKELONG(32,16), MAKELONG(32,16),
                                   ahIcon, aIconId, 3, 0);
     ok(cIcons == 4, "Three icons requested, four expected, got cIcons=%d\n", cIcons);
 }
 
 static void test_LoadImage(void) {
     HBITMAP bmp;
-    
+
     bmp = LoadBitmapA(NULL, MAKEINTRESOURCE(OBM_CHECK));
     ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n");
     if (bmp) DeleteObject(bmp);
-    
+
     bmp = LoadBitmapA(NULL, "#32760"); /* Value of OBM_CHECK */
     ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n");
     if (bmp) DeleteObject(bmp);
-}    
+}
 
 START_TEST(resource)
 {
index 4b73230..0f35824 100755 (executable)
@@ -157,7 +157,7 @@ static LRESULT CALLBACK SysParamsTestWndProc( HWND hWnd, UINT msg, WPARAM wParam
     switch (msg) {
 
     case WM_SETTINGCHANGE:
-        if (change_counter>0) { 
+        if (change_counter>0) {
             /* ignore these messages caused by resizing of toolbars */
             if( wParam == SPI_SETWORKAREA) break;
             if( change_last_param == SPI_SETWORKAREA) {
@@ -380,12 +380,12 @@ static int lffromreg( char *keyname,  char *valname, LOGFONTA *plf)
     LOGFONTW lfw;
     DWORD ret, size, type;
 
-    RegOpenKeyA( HKEY_CURRENT_USER, keyname, &hkey ); 
+    RegOpenKeyA( HKEY_CURRENT_USER, keyname, &hkey );
     size = sizeof( lfw);
     ret=RegQueryValueExA( hkey, valname, NULL, &type, (LPBYTE)&lfw, &size );
     RegCloseKey( hkey );
     ok( ret == ERROR_SUCCESS, "Key \"%s\" value \"%s\" not found\n", keyname, valname);
-    if( ret != ERROR_SUCCESS) 
+    if( ret != ERROR_SUCCESS)
         return FALSE;
     if( size <= sizeof( LOGFONT16)) {
         LOGFONT16 *plf16 = (LOGFONT16*) &lfw;
@@ -509,7 +509,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
     rc=0;
     if ((aw_turn % 2!=0) && (w_implemented))
     {
-        /* call unicode on odd (non even) calls */ 
+        /* call unicode on odd (non even) calls */
         SetLastError(0xdeadbeef);
         rc=SystemParametersInfoW( SPI_SETMOUSE, 0, curr_val, SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
         if (rc==0 && GetLastError()==ERROR_CALL_NOT_IMPLEMENTED)
@@ -542,7 +542,7 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
     }
 
     if (w_implemented)
-    { 
+    {
         rc=SystemParametersInfoW( SPI_GETMOUSE, 0, mi, 0 );
         ok(rc!=0,"SystemParametersInfoW: rc=%d err=%ld\n",rc,GetLastError());
         for (i = 0; i < 3; i++)
@@ -662,7 +662,7 @@ static void test_setborder(UINT curr_val, int usesetborder, int dpi)
     rc=SystemParametersInfo( SPI_GETNONCLIENTMETRICS, 0, &ncm, 0);
     ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
     eq( (UINT)ncm.iBorderWidth, curr_val, "NonClientMetric.iBorderWidth", "%d");
-    /* and from SPI_GETBORDER */ 
+    /* and from SPI_GETBORDER */
     rc=SystemParametersInfoA( SPI_GETBORDER, 0, &border, 0 );
     ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
     eq( border, curr_val, "SPI_{GET,SET}BORDER", "%d");
@@ -1210,7 +1210,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void )        /*     33 */
                                   SPIF_UPDATEINIFILE | SPIF_SENDCHANGE );
         if (!test_error_msg(rc,"SPI_{GET,SET}MOUSEBUTTONSWAP"))
             break;
-            
+
         test_change_message( SPI_SETMOUSEBUTTONSWAP, 0 );
         test_reg_key( SPI_SETMOUSEBUTTONSWAP_REGKEY,
                       SPI_SETMOUSEBUTTONSWAP_VALNAME,
@@ -1285,7 +1285,7 @@ static void test_SPI_SETDRAGFULLWINDOWS( void )        /*     37 */
     regval = metricfromreg( KEY, VAL, dpi);\
     ok( regval==val, "wrong value \"%s\" in registry %d, expected %d\n", VAL, regval, val);\
 }
+
 #define test_reg_metric2( KEY1, KEY2, VAL, val) \
 {   INT regval;\
     regval = metricfromreg( KEY1, VAL, dpi);\
@@ -1353,7 +1353,7 @@ static void test_SPI_SETNONCLIENTMETRICS( void )               /*     44 */
     if (!test_error_msg(rc,"SPI_{GET,SET}NONCLIENTMETRICS"))
         return;
     Ncmstart = Ncmorig;
-    /* SPI_GETNONCLIENTMETRICS returns some "cooked" values. For instance if 
+    /* SPI_GETNONCLIENTMETRICS returns some "cooked" values. For instance if
        the caption font height is higher than the CaptionHeight field,
        the latter is adjusted accordingly. To be able to restore these setting
        accurately be restore the raw values. */
@@ -1578,7 +1578,7 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
     ICONMETRICSA im_new;
     ICONMETRICSA im_cur;
     INT regval;
-        
+
     im_orig.cbSize = sizeof(ICONMETRICSA);
     im_new.cbSize = sizeof(ICONMETRICSA);
     im_cur.cbSize = sizeof(ICONMETRICSA);
@@ -1588,7 +1588,7 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
     rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_orig, FALSE );
     if (!test_error_msg(rc,"SPI_{GET,SET}ICONMETRICS"))
         return;
-   /* check some registry values */ 
+   /* check some registry values */
     regval = metricfromreg( SPI_ICONHORIZONTALSPACING_REGKEY, SPI_ICONHORIZONTALSPACING_VALNAME, dpi);
     ok( regval==im_orig.iHorzSpacing, "wrong value in registry %d, expected %d\n", regval, im_orig.iHorzSpacing);
     regval = metricfromreg( SPI_ICONVERTICALSPACING_REGKEY, SPI_ICONVERTICALSPACING_VALNAME, dpi);
@@ -1616,7 +1616,7 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
                                 OUT_TT_PRECIS : OUT_DEFAULT_PRECIS;
     im_cur.lfFont.lfClipPrecision ^= CLIP_LH_ANGLES;
     im_cur.lfFont.lfPitchAndFamily = im_cur.lfFont.lfPitchAndFamily ? 0 : 1;
-    im_cur.lfFont.lfQuality = im_cur.lfFont.lfQuality == DEFAULT_QUALITY ? 
+    im_cur.lfFont.lfQuality = im_cur.lfFont.lfQuality == DEFAULT_QUALITY ?
                                 DRAFT_QUALITY : DEFAULT_QUALITY;
     if( strcmp( im_cur.lfFont.lfFaceName, "MS Serif"))
         strcpy( im_cur.lfFont.lfFaceName, "MS Serif");
@@ -1628,7 +1628,7 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
 
     rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE );
     ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
-    /* test GET <-> SETICONMETRICS */ 
+    /* test GET <-> SETICONMETRICS */
     eq( im_new.iHorzSpacing, im_cur.iHorzSpacing, "iHorzSpacing", "%d" );
     eq( im_new.iVertSpacing, im_cur.iVertSpacing, "iVertSpacing", "%d" );
     eq( im_new.iTitleWrap,   im_cur.iTitleWrap,   "iTitleWrap",   "%d" );
@@ -1652,7 +1652,7 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
         im_new.iHorzSpacing, "iHorzSpacing", "%d" );
     eq( GetSystemMetrics( SM_CYICONSPACING ),
         im_new.iVertSpacing, "iVertSpacing", "%d" );
-   /* check some registry values */ 
+   /* check some registry values */
     regval = metricfromreg( SPI_ICONHORIZONTALSPACING_REGKEY, SPI_ICONHORIZONTALSPACING_VALNAME, dpi);
     ok( regval==im_cur.iHorzSpacing, "wrong value in registry %d, expected %d\n", regval, im_cur.iHorzSpacing);
     regval = metricfromreg( SPI_ICONVERTICALSPACING_REGKEY, SPI_ICONVERTICALSPACING_VALNAME, dpi);
@@ -1677,10 +1677,10 @@ static void test_SPI_SETICONMETRICS( void )               /*     46 */
     /* restore old values */
     rc=SystemParametersInfoA( SPI_SETICONMETRICS, sizeof(ICONMETRICSA), &im_orig,SPIF_UPDATEINIFILE );
     ok(rc!=0,"***warning*** failed to restore the original value: rc=%d err=%ld\n",rc,GetLastError());
-    
+
     rc=SystemParametersInfoA( SPI_GETICONMETRICS, sizeof(ICONMETRICSA), &im_new, FALSE );
     ok(rc!=0,"SystemParametersInfoA: rc=%d err=%ld\n",rc,GetLastError());
-    
+
     eq( im_new.iHorzSpacing, im_orig.iHorzSpacing, "iHorzSpacing", "%d" );
     eq( im_new.iVertSpacing, im_orig.iVertSpacing, "iVertSpacing", "%d" );
     eq( im_new.iTitleWrap,   im_orig.iTitleWrap,   "iTitleWrap",   "%d" );
@@ -1845,7 +1845,7 @@ static void test_SPI_SETFONTSMOOTHING( void )         /*     75 */
     unsigned int i;
 
     trace("testing SPI_{GET,SET}FONTSMOOTHING\n");
-    if( iswin9x) return; /* 95/98/ME don't seem to implement this fully */ 
+    if( iswin9x) return; /* 95/98/ME don't seem to implement this fully */
     SetLastError(0xdeadbeef);
     rc=SystemParametersInfoA( SPI_GETFONTSMOOTHING, 0, &old_b, 0 );
     if (!test_error_msg(rc,"SPI_{GET,SET}FONTSMOOTHING"))
@@ -1955,7 +1955,7 @@ static void test_SPI_SETMOUSEHOVERWIDTH( void )      /*     99 */
     */
     if (!test_error_msg(rc,"SPI_{GET,SET}MOUSEHOVERWIDTH"))
         return;
-    
+
     for (i=0;i<sizeof(vals)/sizeof(*vals);i++)
     {
         UINT v;
@@ -1994,7 +1994,7 @@ static void test_SPI_SETMOUSEHOVERHEIGHT( void )      /*     101 */
      */
     if (!test_error_msg(rc,"SPI_{GET,SET}MOUSEHOVERHEIGHT"))
         return;
-    
+
     for (i=0;i<sizeof(vals)/sizeof(*vals);i++)
     {
         UINT v;
@@ -2034,10 +2034,10 @@ static void test_SPI_SETMOUSEHOVERTIME( void )      /*     103 */
     rc=SystemParametersInfoA( SPI_GETMOUSEHOVERTIME, 0, &old_time, 0 );
     /* SPI_{GET,SET}MOUSEHOVERWIDTH does not seem to be supported on Win9x despite
      * what MSDN states (Verified on Win98SE)
-     */    
+     */
     if (!test_error_msg(rc,"SPI_{GET,SET}MOUSEHOVERTIME"))
         return;
-    
+
     for (i=0;i<sizeof(vals)/sizeof(*vals);i++)
     {
         UINT v;
@@ -2209,7 +2209,7 @@ static DWORD WINAPI SysParamsThreadFunc( LPVOID lpParam )
 }
 
 /* test calculation of GetSystemMetrics values (mostly) from non client metrics,
- * icon metrics and minimized metrics. 
+ * icon metrics and minimized metrics.
  */
 
 /* copied from wine's GdiGetCharDimensions, which is not available on most
index 874b6e0..a1b95b7 100755 (executable)
@@ -145,7 +145,7 @@ static void test_DrawTextCalcRect(void)
         ok( !(rect.left == rect.right && rect.bottom == rect.top),
                 "rectangle should NOT be empty.\n");
     }
-   
+
     SelectObject(hdc, hOldFont);
     ret = DeleteObject(hFont);
     ok( ret, "DeleteObject error %lu\n", GetLastError());
@@ -167,7 +167,7 @@ static void strfmt( char *str, char *strout)
             strout[j]='t';
         }
 }
-  
+
 
 #define TABTEST( tabval, tabcount, string, _exp) \
 { int i,x_act, x_exp; char strdisp[64];\
@@ -207,11 +207,11 @@ static void test_TabbedText(void)
     trace( "cx is %d cy is %d\n", cx, cy);
 
     align=1;
-    for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to 
+    for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to
                                catch the one off errors */
         tab =  (cx *4 + t);
         /* test the special case tabcount =1 and the general array (80 of tabs */
-        for( tabcount = 1; tabcount <= 8; tabcount +=7) { 
+        for( tabcount = 1; tabcount <= 8; tabcount +=7) {
             TABTEST( align * tab, tabcount, "\t", tab)
             TABTEST( align * tab, tabcount, "xxx\t", tab)
             TABTEST( align * tab, tabcount, "\tx", tab+cx)
@@ -225,11 +225,11 @@ static void test_TabbedText(void)
         }
     }
     align=-1;
-    for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to 
+    for( t=-1; t<=1; t++) { /* slightly adjust the 4 char tabstop, to
                                catch the one off errors */
         tab =  (cx *4 + t);
         /* test the special case tabcount =1 and the general array (8) of tabs */
-        for( tabcount = 1; tabcount <= 8; tabcount +=7) { 
+        for( tabcount = 1; tabcount <= 8; tabcount +=7) {
             TABTEST( align * tab, tabcount, "\t", tab)
             TABTEST( align * tab, tabcount, "xxx\t", tab)
             TABTEST( align * tab, tabcount, "\tx", tab)
index d286b13..0feb213 100644 (file)
@@ -103,7 +103,7 @@ static void check_parents( HWND hwnd, HWND ga_parent, HWND gwl_parent, HWND get_
     }
 }
 
-BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam) 
+BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam)
 {
     (*(LPINT)lParam)++;
     trace("EnumChildProc on %p\n", hwndChild);
@@ -112,7 +112,7 @@ BOOL CALLBACK EnumChildProc( HWND hwndChild, LPARAM lParam)
 }
 
 /* will search for the given window */
-BOOL CALLBACK EnumChildProc1( HWND hwndChild, LPARAM lParam) 
+BOOL CALLBACK EnumChildProc1( HWND hwndChild, LPARAM lParam)
 {
     trace("EnumChildProc1 on %p\n", hwndChild);
     if ((HWND)lParam == hwndChild) return FALSE;
@@ -814,8 +814,8 @@ static void test_nonclient_area(HWND hwnd)
     ok(EqualRect(&rc, &rc_client), "synthetic rect does not match: style:exstyle=0x%08lx:0x%08lx, menu=%d\n", style, exstyle, menu);
 }
 
-static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam) 
-{ 
+static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
+{
     static const char *CBT_code_name[10] = {
        "HCBT_MOVESIZE",
        "HCBT_MINMAX",
@@ -1868,7 +1868,7 @@ static void test_SetMenu(HWND parent)
     ok(SetMenu(parent, hMenu), "SetMenu on a top level window should not fail\n");
 #if 0
     /* fails on (at least) Wine, NT4, XP SP2 */
-    test_nonclient_area(parent); 
+    test_nonclient_area(parent);
 #endif
     ret = GetMenu(parent);
     ok(ret == hMenu, "unexpected menu id %p\n", ret);
@@ -1907,7 +1907,7 @@ static void test_SetMenu(HWND parent)
     test_nonclient_area(parent);
     ret = GetMenu(parent);
     ok(ret == 0, "unexpected menu id %p\n", ret);
+
     /* child */
     child = CreateWindowExA(0, "static", NULL, WS_CHILD, 0, 0, 0, 0, parent, (HMENU)10, 0, NULL);
     assert(child);
@@ -2121,7 +2121,7 @@ static void test_SetActiveWindow(HWND hwnd)
     SetActiveWindow(hwnd);
     ok( GetActiveWindow() == hwnd, "Window %p not active\n", hwnd );
     ok( !(GetWindowLong(hwnd,GWL_STYLE) & WS_VISIBLE), "Window %p is visible\n", hwnd );
-    
+
     ShowWindow(hwnd, SW_SHOW);
 
     hwnd2 = CreateWindowExA(0, "static", NULL, WS_POPUP|WS_VISIBLE, 0, 0, 0, 0, hwnd, 0, 0, NULL);
@@ -2497,7 +2497,7 @@ static void test_mouse_input(HWND hwnd)
 #define TEST_MOUSEACTIVATE(A,B)                                                          \
        res = SendMessageA(hwnd, WM_MOUSEACTIVATE, (WPARAM)hwnd, (LPARAM)MAKELRESULT(A,0));   \
        ok(res == B, "WM_MOUSEACTIVATE for %s returned %ld\n", #A, res);
-       
+
     TEST_MOUSEACTIVATE(HTERROR,MA_ACTIVATE);
     TEST_MOUSEACTIVATE(HTTRANSPARENT,MA_ACTIVATE);
     TEST_MOUSEACTIVATE(HTNOWHERE,MA_ACTIVATE);
@@ -2570,7 +2570,7 @@ static void nccalchelper(HWND hwnd, INT x, INT y, RECT *prc)
 {
     MoveWindow( hwnd, 0, 0, x, y, 0);
     GetWindowRect( hwnd, prc);
-    trace("window rect is %ld,%ld - %ld,%ld\n", 
+    trace("window rect is %ld,%ld - %ld,%ld\n",
             prc->left,prc->top,prc->right,prc->bottom);
     DefWindowProcA(hwnd, WM_NCCALCSIZE, 0, (LPARAM)prc);
     trace("nccalc rect is %ld,%ld - %ld,%ld\n",
@@ -2582,37 +2582,37 @@ static void test_nccalcscroll(HWND parent)
     RECT rc1;
     INT sbheight = GetSystemMetrics( SM_CYHSCROLL);
     INT sbwidth = GetSystemMetrics( SM_CXVSCROLL);
-    HWND hwnd = CreateWindowExA(0, "static", NULL, 
-            WS_CHILD| WS_VISIBLE | WS_VSCROLL | WS_HSCROLL , 
-            10, 10, 200, 200, parent, 0, 0, NULL); 
+    HWND hwnd = CreateWindowExA(0, "static", NULL,
+            WS_CHILD| WS_VISIBLE | WS_VSCROLL | WS_HSCROLL ,
+            10, 10, 200, 200, parent, 0, 0, NULL);
     ShowWindow( parent, SW_SHOW);
     UpdateWindow( parent);
 
     /* test window too low for a horizontal scroll bar */
     nccalchelper( hwnd, 100, sbheight, &rc1);
-    ok( rc1.bottom - rc1.top == sbheight, "Height should be %d size is %ld,%ld - %ld,%ld\n", 
+    ok( rc1.bottom - rc1.top == sbheight, "Height should be %d size is %ld,%ld - %ld,%ld\n",
             sbheight, rc1.left, rc1.top, rc1.right, rc1.bottom);
 
     /* test window just high enough for a horizontal scroll bar */
     nccalchelper( hwnd, 100, sbheight + 1, &rc1);
-    ok( rc1.bottom - rc1.top == 1, "Height should be %d size is %ld,%ld - %ld,%ld\n", 
+    ok( rc1.bottom - rc1.top == 1, "Height should be %d size is %ld,%ld - %ld,%ld\n",
             1, rc1.left, rc1.top, rc1.right, rc1.bottom);
 
     /* test window too narrow for a vertical scroll bar */
     nccalchelper( hwnd, sbwidth - 1, 100, &rc1);
-    ok( rc1.right - rc1.left == sbwidth - 1 , "Width should be %d size is %ld,%ld - %ld,%ld\n", 
+    ok( rc1.right - rc1.left == sbwidth - 1 , "Width should be %d size is %ld,%ld - %ld,%ld\n",
             sbwidth - 1, rc1.left, rc1.top, rc1.right, rc1.bottom);
 
     /* test window just wide enough for a vertical scroll bar */
     nccalchelper( hwnd, sbwidth, 100, &rc1);
-    ok( rc1.right - rc1.left == 0, "Width should be %d size is %ld,%ld - %ld,%ld\n", 
+    ok( rc1.right - rc1.left == 0, "Width should be %d size is %ld,%ld - %ld,%ld\n",
             0, rc1.left, rc1.top, rc1.right, rc1.bottom);
 
     /* same test, but with client edge: not enough width */
     SetWindowLong( hwnd, GWL_EXSTYLE, WS_EX_CLIENTEDGE | GetWindowLong( hwnd, GWL_EXSTYLE));
     nccalchelper( hwnd, sbwidth, 100, &rc1);
     ok( rc1.right - rc1.left == sbwidth - 2 * GetSystemMetrics(SM_CXEDGE),
-            "Width should be %d size is %ld,%ld - %ld,%ld\n", 
+            "Width should be %d size is %ld,%ld - %ld,%ld\n",
             sbwidth - 2 * GetSystemMetrics(SM_CXEDGE), rc1.left, rc1.top, rc1.right, rc1.bottom);
 
     DestroyWindow( hwnd);
@@ -2759,7 +2759,7 @@ static void register_style_check_class(void)
         NULL,
         TEXT("WineStyleCheck"),
     };
-    
+
     atomStyleCheckClass = RegisterClass(&wc);
 }
 
@@ -2842,7 +2842,7 @@ static void test_scrollvalidate( HWND parent)
     ShowWindow( parent, SW_SHOW);
     UpdateWindow( parent);
     GetClientRect( hwnd1, &rc);
-    cliprc=rc; 
+    cliprc=rc;
     SetRectRgn( clipping, 10, 10, 90, 90);
     hdc = GetDC( hwnd1);
     /* for a visual touch */
@@ -2952,7 +2952,7 @@ static void test_scrollvalidate( HWND parent)
 }
 
 /* couple of tests of return values of scrollbar functions
- * called on a scrollbarless window */ 
+ * called on a scrollbarless window */
 static void test_scroll(void)
 {
     BOOL ret;
@@ -3011,15 +3011,15 @@ static void test_scrolldc( HWND parent)
     rc2.bottom = ( rc.top + rc.bottom) /2;
     FillRect( hdc, &rc2, GetStockObject(BLACK_BRUSH));
     /* clip region is the lower half */
-    cliprc=rc; 
+    cliprc=rc;
     cliprc.top = (rc.top + rc.bottom) /2;
-    /* test whether scrolled pixels are properly clipped */ 
+    /* test whether scrolled pixels are properly clipped */
     colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1);
-    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); 
-    /* this scroll should not cause any visible changes */ 
+    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
+    /* this scroll should not cause any visible changes */
     ScrollDC( hdc, 5, -20, &rc, &cliprc, hrgn, &rcu);
     colr = GetPixel( hdc, (rc.left+rc.right)/2, ( rc.top + rc.bottom) /2 - 1);
-    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); 
+    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
     /* test with NULL clip rect */
     ScrollDC( hdc, 20, -20, &rc, NULL, hrgn, &rcu);
     /*FillRgn(hdc, hrgn, GetStockObject(WHITE_BRUSH));*/
@@ -3035,7 +3035,7 @@ static void test_scrolldc( HWND parent)
     CombineRgn(exprgn, exprgn, tmprgn, RGN_OR);
     if (winetest_debug > 0) dump_region(exprgn);
     ok(EqualRgn(exprgn, hrgn), "wrong update region\n");
-    /* test clip rect > scroll rect */ 
+    /* test clip rect > scroll rect */
     FillRect( hdc, &rc, GetStockObject(WHITE_BRUSH));
     rc2=rc;
     InflateRect( &rc2, -(rc.right-rc.left)/4, -(rc.bottom-rc.top)/4);
@@ -3046,7 +3046,7 @@ static void test_scrolldc( HWND parent)
     CombineRgn(exprgn, exprgn, tmprgn, RGN_OR);
     ok(EqualRgn(exprgn, hrgn), "wrong update region\n");
     colr = GetPixel( hdc, 80, 80);
-    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr); 
+    ok ( colr == 0, "pixel should be black, color is %08lx\n", colr);
     trace("update rect: %ld,%ld - %ld,%ld\n",
            rcu.left, rcu.top, rcu.right, rcu.bottom);
     if (winetest_debug > 0) dump_region(hrgn);
@@ -3116,7 +3116,7 @@ static BOOL AWR_init(void)
     class.hbrBackground = 0;
     class.lpszMenuName  = 0;
     class.lpszClassName = szAWRClass;
-    
+
     if (!RegisterClass (&class)) {
        ok(FALSE, "RegisterClass failed\n");
        return FALSE;
@@ -3127,7 +3127,7 @@ static BOOL AWR_init(void)
        return FALSE;
     ok(hmenu != 0, "Failed to create menu\n");
     ok(AppendMenu(hmenu, MF_STRING, 1, "Test!"), "Failed to create menu item\n");
-    
+
     return TRUE;
 }
 
@@ -3136,8 +3136,8 @@ static void test_AWR_window_size(BOOL menu)
 {
     LONG styles[] = {
        WS_POPUP,
-       WS_MAXIMIZE, WS_BORDER, WS_DLGFRAME, 
-       WS_SYSMENU, 
+       WS_MAXIMIZE, WS_BORDER, WS_DLGFRAME,
+       WS_SYSMENU,
        WS_THICKFRAME,
        WS_MINIMIZEBOX, WS_MAXIMIZEBOX,
        WS_HSCROLL, WS_VSCROLL
@@ -3148,12 +3148,12 @@ static void test_AWR_window_size(BOOL menu)
        WS_EX_APPWINDOW,
 #if 0
        /* These styles have problems on (at least) WinXP (SP2) and Wine */
-       WS_EX_DLGMODALFRAME, 
-       WS_EX_STATICEDGE, 
+       WS_EX_DLGMODALFRAME,
+       WS_EX_STATICEDGE,
 #endif
     };
 
-    int i;    
+    int i;
 
     /* A exhaustive check of all the styles takes too long
      * so just do a (hopefully representative) sample
@@ -3173,7 +3173,7 @@ static void test_AdjustWindowRect(void)
 {
     if (!AWR_init())
        return;
-    
+
     SHOWSYSMETRIC(SM_CYCAPTION);
     SHOWSYSMETRIC(SM_CYSMCAPTION);
     SHOWSYSMETRIC(SM_CYMENU);
@@ -3186,7 +3186,7 @@ static void test_AdjustWindowRect(void)
     SHOWSYSMETRIC(SM_CXDLGFRAME);
     SHOWSYSMETRIC(SM_CYDLGFRAME);
     SHOWSYSMETRIC(SM_CXBORDER);
-    SHOWSYSMETRIC(SM_CYBORDER);  
+    SHOWSYSMETRIC(SM_CYBORDER);
 
     test_AWR_window_size(FALSE);
     test_AWR_window_size(TRUE);
@@ -3344,49 +3344,49 @@ static void test_csparentdc(void)
    struct parentdc_test test_answer;
 
 #define nothing_todo {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}
-   const struct parentdc_test test1 = 
+   const struct parentdc_test test1 =
    {
         {{0, 0, 150, 150}, {0, 0, 150, 150}, {0, 0, 150, 150}}, nothing_todo,
         {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
         {{0, 0, 40, 40}, {-40, -40, 110, 110}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
    };
 
-   const struct parentdc_test test2 = 
+   const struct parentdc_test test2 =
    {
         {{0, 0, 150, 150}, {0, 0, 50, 50}, {0, 0, 50, 50}}, nothing_todo,
         {{0, 0, 40, 40}, {-20, -20, 30, 30}, {0, 0, 30, 30}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
         {{0, 0, 40, 40}, {-40, -40, 10, 10}, {0, 0, 10, 10}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
    };
 
-   const struct parentdc_test test3 = 
+   const struct parentdc_test test3 =
    {
         {{0, 0, 150, 150}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo,
         {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo,
         {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo,
    };
 
-   const struct parentdc_test test4 = 
+   const struct parentdc_test test4 =
    {
         {{0, 0, 150, 150}, {40, 40, 50, 50}, {40, 40, 50, 50}}, nothing_todo,
         {{0, 0, 40, 40}, {20, 20, 30, 30}, {20, 20, 30, 30}}, nothing_todo,
         {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo,
    };
 
-   const struct parentdc_test test5 = 
+   const struct parentdc_test test5 =
    {
         {{0, 0, 150, 150}, {20, 20, 60, 60}, {20, 20, 60, 60}}, nothing_todo,
         {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
         {{0, 0, 40, 40}, {-20, -20, 20, 20}, {0, 0, 20, 20}}, {{0, 0, 0, 0}, {1, 1, 0, 0}, {0, 0, 0, 0}},
    };
 
-   const struct parentdc_test test6 = 
+   const struct parentdc_test test6 =
    {
         {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo,
         {{0, 0, 40, 40}, {0, 0, 10, 10}, {0, 0, 10, 10}}, nothing_todo,
         {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo,
    };
 
-   const struct parentdc_test test7 = 
+   const struct parentdc_test test7 =
    {
         {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, nothing_todo,
         {{0, 0, 40, 40}, {-20, -20, 130, 130}, {0, 0, 40, 40}}, {{0, 0, 0, 0}, {1, 1, 1, 1}, {0, 0, 0, 0}},
index 01a0bb9..b0b5028 100644 (file)
@@ -52,11 +52,11 @@ static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256
     int             cMaxItems;\r
     SCRIPT_ITEM     pItem[255];\r
     int             pcItems;\r
-    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; \r
-    WCHAR           TestItem2[] = {'T', 'e', 's', 't', 'b', 0}; \r
-    WCHAR           TestItem3[] = {'T', 'e', 's', 't', 'c',' ','1','2','3',' ',' ','e','n','d',0}; \r
+    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0};\r
+    WCHAR           TestItem2[] = {'T', 'e', 's', 't', 'b', 0};\r
+    WCHAR           TestItem3[] = {'T', 'e', 's', 't', 'c',' ','1','2','3',' ',' ','e','n','d',0};\r
     WCHAR           TestItem4[] = {'T', 'e', 's', 't', 'c',' ',0x0684,0x0694,0x06a4,' ',' ','e','n','d',0};\r
-    WCHAR           TestItem5[] = {0x0684,'T','e','s','t','c',' ',0x0684,0x0694,0x06a4,' ',' ','e','n','d',0}; \r
+    WCHAR           TestItem5[] = {0x0684,'T','e','s','t','c',' ',0x0684,0x0694,0x06a4,' ',' ','e','n','d',0};\r
 \r
     SCRIPT_CACHE    psc;\r
     int             cChars;\r
@@ -76,7 +76,7 @@ static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256
      * by checking a known value in the table                                                */\r
     hr = ScriptGetProperties(&ppSp, &iMaxProps);\r
     trace("number of script properties %d\n", iMaxProps);\r
-    ok (iMaxProps > 0, "Number of scripts returned should not be 0\n"); \r
+    ok (iMaxProps > 0, "Number of scripts returned should not be 0\n");\r
     if  (iMaxProps > 0)\r
          ok( ppSp[5]->langid == 9, "Langid[5] not = to 9\n"); /* Check a known value to ensure   */\r
                                                               /* ptrs work                       */\r
@@ -241,12 +241,12 @@ static void test_ScriptItemIzeShapePlace(HDC hdc, unsigned short pwOutGlyphs[256
 \r
     /*\r
      * This test is for when the first unicode character requires bidi support\r
-     */ \r
+     */\r
     cInChars = (sizeof(TestItem5)-1)/sizeof(WCHAR);\r
     hr = ScriptItemize(TestItem5, cInChars, cMaxItems, NULL, NULL, pItem, &pcItems);\r
     ok (hr == 0, "ScriptItemize should return 0, returned %08x\n", hr);\r
     ok (pcItems == 4, "There should have been 4 items, found %d\n", pcItems);\r
-    ok (pItem[0].a.s.uBidiLevel == 1, "The first character should have been bidi=1 not %d\n", \r
+    ok (pItem[0].a.s.uBidiLevel == 1, "The first character should have been bidi=1 not %d\n",\r
                                        pItem[0].a.s.uBidiLevel);\r
 }\r
 \r
@@ -257,7 +257,7 @@ static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
     int             cInChars;\r
     int             cChars;\r
     unsigned short  pwOutGlyphs3[256];\r
-    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; \r
+    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0};\r
     DWORD           dwFlags;\r
     int             cnt;\r
 \r
@@ -300,7 +300,7 @@ static void test_ScriptGetCMap(HDC hdc, unsigned short pwOutGlyphs[256])
     for (cnt=0; cnt < cChars && pwOutGlyphs[cnt] == pwOutGlyphs3[cnt]; cnt++) {}\r
     ok (cnt == cInChars, "Translation not correct. WCHAR %d - %04x != %04x\n",\r
                          cnt, pwOutGlyphs[cnt], pwOutGlyphs3[cnt]);\r
-        \r
+\r
     hr = ScriptFreeCache( &psc);\r
     ok (!psc, "psc is not null after ScriptFreeCache\n");\r
 \r
@@ -377,7 +377,7 @@ static void test_ScriptTextOut(HDC hdc)
     int             cMaxItems;\r
     SCRIPT_ITEM     pItem[255];\r
     int             pcItems;\r
-    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0}; \r
+    WCHAR           TestItem1[] = {'T', 'e', 's', 't', 'a', 0};\r
 \r
     SCRIPT_CACHE    psc;\r
     int             cChars;\r
@@ -572,7 +572,7 @@ static void test_ScriptXtoX(void)
     cGlyphs = 10;\r
     hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);\r
     ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);\r
-    ok(piX == 1171, "iCP=%d should return piX=1171 not %d\n", iCP, piX);   \r
+    ok(piX == 1171, "iCP=%d should return piX=1171 not %d\n", iCP, piX);\r
     iCP=6;\r
     fTrailing = FALSE;\r
     cChars = 10;\r
@@ -593,7 +593,7 @@ static void test_ScriptXtoX(void)
     cGlyphs = 10;\r
     hr = ScriptCPtoX(iCP, fTrailing, cChars, cGlyphs, pwLogClust, psva, piAdvance, &psa, &piX);\r
     ok(hr == S_OK, "ScriptCPtoX should return S_OK not %08x\n", hr);\r
-    ok(piX == 1953, "iCP=%d should return piX=1953 not %d\n", iCP, piX); \r
+    ok(piX == 1953, "iCP=%d should return piX=1953 not %d\n", iCP, piX);\r
 \r
 }\r
 \r
@@ -622,10 +622,10 @@ static void test_ScriptString(HDC hdc)
     const BYTE      InClass = 0;\r
     SCRIPT_STRING_ANALYSIS ssa = NULL;\r
 \r
-    int             X = 10; \r
+    int             X = 10;\r
     int             Y = 100;\r
-    UINT            Options = 0; \r
-    const RECT      rc = {0, 50, 100, 100}; \r
+    UINT            Options = 0;\r
+    const RECT      rc = {0, 50, 100, 100};\r
     int             MinSel = 0;\r
     int             MaxSel = 0;\r
     BOOL            Disabled = FALSE;\r
@@ -733,7 +733,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
             hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);\r
             ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);\r
             ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, X);\r
-            ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", \r
+            ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",\r
                                   iTrailing, X);\r
             fTrailing = TRUE;\r
             hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X);\r
@@ -747,7 +747,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
              * again works\r
              */\r
             ok(Cp + 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp + 1, Ch, X);\r
-            ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", \r
+            ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",\r
                                    iTrailing, X);\r
         }\r
         /*\r
@@ -762,13 +762,13 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
         hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);\r
         ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);\r
         ok(Cp == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp, Ch, X);\r
-        ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n", \r
+        ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n",\r
                                   iTrailing, X);\r
 \r
         /*\r
          * This test is to check that if the X position is just outside the trailing edge of the\r
          * character then iTrailing will indicate the leading edge, ie. FALSE, and Ch will indicate\r
-         * the next character, ie. Cp + 1 \r
+         * the next character, ie. Cp + 1\r
          */\r
         fTrailing = TRUE;\r
         Cp = 3;\r
@@ -778,13 +778,13 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
         hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);\r
         ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);\r
         ok(Cp + 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp + 1, Ch, X);\r
-        ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n", \r
+        ok(iTrailing == FALSE, "ScriptStringXtoCP should return iTrailing = 0 not %d for X = %d\n",\r
                                   iTrailing, X);\r
 \r
         /*\r
          * This test is to check that if the X position is just outside the leading edge of the\r
          * character then iTrailing will indicate the trailing edge, ie. TRUE, and Ch will indicate\r
-         * the next character down , ie. Cp - 1 \r
+         * the next character down , ie. Cp - 1\r
          */\r
         fTrailing = FALSE;\r
         Cp = 3;\r
@@ -794,7 +794,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
         hr = ScriptStringXtoCP(ssa, X, &Ch, &iTrailing);\r
         ok(hr == S_OK, "ScriptStringXtoCP should return S_OK not %08x\n", hr);\r
         ok(Cp - 1 == Ch, "ScriptStringXtoCP should return Ch = %d not %d for X = %d\n", Cp - 1, Ch, X);\r
-        ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n", \r
+        ok(iTrailing == TRUE, "ScriptStringXtoCP should return iTrailing = 1 not %d for X = %d\n",\r
                                   iTrailing, X);\r
 \r
         /*\r
@@ -814,11 +814,11 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
 \r
         /*\r
          * When ScriptStringCPtoX is called with a character position Cp that exceeds the\r
-         * string length, return E_INVALIDARG.  This also invalidates the ssa so a \r
+         * string length, return E_INVALIDARG.  This also invalidates the ssa so a\r
          * ScriptStringFree should also fail.\r
          */\r
         fTrailing = FALSE;\r
-        Cp = String_len + 1; \r
+        Cp = String_len + 1;\r
         hr = ScriptStringCPtoX(ssa, Cp, fTrailing, &X);\r
         ok(hr == E_INVALIDARG, "ScriptStringCPtoX should return E_INVALIDARG not %08x\n", hr);\r
 \r
index d766a62..b0178a6 100644 (file)
@@ -130,7 +130,7 @@ guiStep (va_list ap)
 {
     const int pgID = IDC_ST0 + progressGroup * 2;
     char *str = vstrmake (NULL, ap);
-    
+
     progressCurr++;
     SetDlgItemText (dialog, pgID, str);
     SendDlgItemMessage (dialog, pgID+1, PBM_SETPOS,
@@ -518,7 +518,7 @@ report (enum report_type t, ...)
             }
         }
     }
-        
+
     va_start (ap, t);
     if (t < sizeof text_funcs / sizeof text_funcs[0] &&
         t < sizeof GUI_funcs / sizeof GUI_funcs[0]) ret = funcs[t](ap);
index 01b2e91..c008535 100644 (file)
@@ -181,7 +181,7 @@ static const char* get_test_source_file(const char* test, const char* subtest)
 static const char* get_file_rev(const char* file)
 {
     const struct rev_info* rev;
+
     for(rev = rev_infos; rev->file; rev++) {
        if (strcmp(rev->file, file) == 0) return rev->rev;
     }
@@ -205,7 +205,7 @@ static void extract_rev_infos (void)
 
         len = LoadStringA (module, REV_INFO+i, revinfo, sizeof(revinfo));
         if (len == 0) break; /* end of revision info */
-       if (len >= sizeof(revinfo) - 1) 
+       if (len >= sizeof(revinfo) - 1)
            report (R_FATAL, "Revision info too long.");
        if(!(p = strrchr(revinfo, ':')))
            report (R_FATAL, "Revision info malformed (i=%d)", i);
@@ -220,7 +220,7 @@ static void* extract_rcdata (int id, int type, DWORD* size)
     HRSRC rsrc;
     HGLOBAL hdl;
     LPVOID addr;
-    
+
     if (!(rsrc = FindResource (NULL, (LPTSTR)id, MAKEINTRESOURCE(type))) ||
         !(*size = SizeofResource (0, rsrc)) ||
         !(hdl = LoadResource (0, rsrc)) ||
@@ -624,7 +624,7 @@ int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst,
             report (R_FATAL, "Tests must be run on a visible desktop");
 
         if (reset_env && (putenv ("WINETEST_PLATFORM=windows") ||
-                          putenv ("WINETEST_DEBUG=1") || 
+                          putenv ("WINETEST_DEBUG=1") ||
                           putenv ("WINETEST_INTERACTIVE=0") ||
                           putenv ("WINETEST_REPORT_SUCCESS=0")))
             report (R_FATAL, "Could not reset environment: %d", errno);
index 6846067..d241483 100644 (file)
@@ -44,7 +44,7 @@ BEGIN
     CONTROL "PB1", IDC_PB1, PROGRESS_CLASS, 0,    5,  40, 150, 15
     LTEXT   "Network transfer:", IDC_ST2,        10,  60, 140, 10
     CONTROL "PB2", IDC_PB2, PROGRESS_CLASS, 0,    5,  70, 150, 10
-                                               
+
     LTEXT   "Tag:",               IDC_STATIC,    10,  89, 100, 10
     EDITTEXT                      IDC_TAG,       25,  88, 125, 10,
              ES_READONLY