Sync to trunk r38200
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 31 Dec 2008 14:31:22 +0000 (14:31 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Wed, 31 Dec 2008 14:31:22 +0000 (14:31 +0000)
svn path=/branches/ros-amd64-bringup/; revision=38489

121 files changed:
reactos/base/applications/calc/resource.rc
reactos/base/applications/cmdutils/more/more.c
reactos/base/applications/dxdiag/rsrc.rc
reactos/base/applications/kbswitch/kbswitch.c
reactos/base/applications/notepad/rsrc.rc
reactos/base/applications/sc/create.c
reactos/base/applications/shutdown/rsrc.rc
reactos/base/applications/winhlp32/lang/de-DE.rc
reactos/base/applications/winhlp32/lang/en-US.rc
reactos/base/applications/winhlp32/lang/fr-FR.rc
reactos/base/applications/winhlp32/lang/ko-KR.rc
reactos/base/applications/winhlp32/lang/sl-SI.rc
reactos/base/applications/winhlp32/lang/sv-SE.rc
reactos/base/applications/winhlp32/macro.c
reactos/base/applications/wordpad/Da.rc
reactos/base/applications/wordpad/De.rc
reactos/base/applications/wordpad/En.rc
reactos/base/applications/wordpad/Fr.rc
reactos/base/applications/wordpad/Hu.rc
reactos/base/applications/wordpad/Ko.rc
reactos/base/applications/wordpad/Nl.rc
reactos/base/applications/wordpad/No.rc
reactos/base/applications/wordpad/Pl.rc
reactos/base/applications/wordpad/Pt.rc
reactos/base/applications/wordpad/Ru.rc
reactos/base/applications/wordpad/Si.rc
reactos/base/applications/wordpad/Tr.rc
reactos/base/applications/wordpad/Zh.rc
reactos/base/applications/wordpad/wordpad.c
reactos/base/setup/reactos/lang/el-GR.rc
reactos/base/setup/usetup/interface/usetup.c
reactos/base/setup/usetup/lang/hy-AM.h
reactos/base/setup/usetup/mui.c
reactos/base/setup/usetup/muilanguages.h
reactos/base/setup/usetup/settings.c
reactos/base/shell/cmd/dir.c
reactos/base/shell/explorer-new/explorer.rc
reactos/base/system/services/database.c
reactos/boot/bootdata/hivecls_arm.inf
reactos/boot/bootdata/hivecls_i386.inf
reactos/boot/bootdata/hivesft_arm.inf
reactos/boot/bootdata/hivesft_i386.inf
reactos/boot/bootdata/hivesys_arm.inf
reactos/boot/bootdata/hivesys_i386.inf
reactos/boot/freeldr/freeldr/reactos/reactos.c
reactos/dll/cpl/desk/settings.c
reactos/dll/cpl/liccpa/rsrc.rc
reactos/dll/directx/d3d9/d3d9_device.c
reactos/dll/directx/d3d9/d3d9_swapchain.c
reactos/dll/directx/d3d9/d3d9_swapchain.h
reactos/dll/ntdll/ldr/utils.c
reactos/dll/win32/gdi32/objects/dc.c
reactos/dll/win32/gdi32/objects/font.c
reactos/dll/win32/gdi32/objects/utils.c
reactos/dll/win32/gdiplus/font.c
reactos/dll/win32/gdiplus/gdiplus.spec
reactos/dll/win32/gdiplus/graphics.c
reactos/dll/win32/gdiplus/graphicspath.c
reactos/dll/win32/gdiplus/pen.c
reactos/dll/win32/gdiplus/region.c
reactos/dll/win32/kernel32/file/iocompl.c
reactos/dll/win32/kernel32/file/lfile.c
reactos/dll/win32/kernel32/file/move.c
reactos/dll/win32/kernel32/locale_rc.rc
reactos/dll/win32/kernel32/misc/atom.c
reactos/dll/win32/kernel32/misc/lang.c
reactos/dll/win32/user32/include/window.h
reactos/dll/win32/user32/windows/defwnd.c
reactos/dll/win32/user32/windows/icon.c
reactos/dll/win32/user32/windows/input.c
reactos/dll/win32/user32/windows/mdi.c
reactos/drivers/filesystems/fastfat/fat.c
reactos/drivers/filesystems/fastfat/finfo.c
reactos/drivers/ksfilter/ks/allocators.c
reactos/drivers/ksfilter/ks/ks.rbuild
reactos/drivers/ksfilter/ks/worker.c
reactos/drivers/wdm/audio/backpln/portcls/portcls.rbuild
reactos/drivers/wdm/audio/backpln/portcls/registry.c
reactos/include/crt/_mingw.h
reactos/include/crt/malloc.h
reactos/include/crt/mingw32/crtdbg.h [deleted file]
reactos/include/crt/mingw32/stdarg.h [deleted file]
reactos/include/crt/mingw32/stddef.h [deleted file]
reactos/include/crt/mingw32/vadefs.h [deleted file]
reactos/include/crt/sys/utime.h
reactos/include/ddk/portcls.h
reactos/include/ndk/rtltypes.h
reactos/include/psdk/accctrl.h
reactos/include/psdk/devguid.h
reactos/include/psdk/gdiplusflat.h
reactos/include/psdk/guiddef.h
reactos/include/psdk/vfw.h
reactos/include/psdk/winuser.h
reactos/include/reactos/libs/pseh/pseh2.h
reactos/lib/3rdparty/mingw/argv.c [deleted file]
reactos/lib/3rdparty/mingw/mingw.rbuild
reactos/lib/pseh/framebased-gcchack.c
reactos/lib/pseh/i386/framebased-gcchack.S
reactos/lib/sdk/crt/locale/locale.c
reactos/lib/sdk/crt/mbstring/ismbc.c
reactos/lib/sdk/crt/mbstring/ismblead.c
reactos/lib/sdk/crt/mbstring/ismbtrl.c
reactos/lib/sdk/crt/mbstring/mbbtype.c
reactos/lib/sdk/crt/mbstring/mbccpy.c
reactos/lib/sdk/crt/mbstring/mbclen.c
reactos/lib/sdk/crt/mbstring/mbslen.c
reactos/lib/sdk/crt/mbstring/mbsncpy.c
reactos/lib/sdk/crt/mbstring/mbsnextc.c
reactos/lib/sdk/crt/mbstring/mbsninc.c
reactos/lib/sdk/crt/mbstring/mbstrlen.c
reactos/lib/sdk/crt/stdio/file.c
reactos/lib/sdk/crt/sys_stat/systime.c
reactos/ntoskrnl/io/iomgr/volume.c
reactos/ntoskrnl/kd/kdmain.c
reactos/ntoskrnl/ntoskrnl.pspec
reactos/subsystems/win32/win32k/objects/dibobj.c
reactos/subsystems/win32/win32k/objects/font.c
reactos/subsystems/win32/win32k/objects/freetype.c
reactos/subsystems/win32/win32k/objects/gdidbg.c
reactos/tools/rbuild/backend/mingw/modulehandler.cpp
reactos/tools/rbuild/module.cpp

index b3aac73..a4b6bcb 100644 (file)
@@ -40,16 +40,17 @@ IDI_CALC_SMALL          ICON    DISCARDABLE     "res/calc_sm.ico"
 IDB_BITMAP_ROS          BITMAP  DISCARDABLE     "res/ROS_logo.bmp"
 
 
-#include "lang/en-US.rc"
 #include "lang/bg-BG.rc"
 #include "lang/cs-CZ.rc"
 #include "lang/de-DE.rc"
+#include "lang/en-US.rc"
 #include "lang/es-ES.rc"
 #include "lang/it-IT.rc"
 #include "lang/ko-KR.rc"
-#include "lang/no-NO.rc"
 #include "lang/nl-NL.rc"
+#include "lang/no-NO.rc"
 #include "lang/pl-PL.rc"
 #include "lang/ru-RU.rc"
 #include "lang/sk-SK.rc"
+#include "lang/th-TH.rc"
 #include "lang/uk-UA.rc"
index 3ff4807..6755803 100644 (file)
@@ -124,7 +124,7 @@ int main (int argc, char **argv)
       return 0;
    }
 
-   hKeyboard = CreateFile (_T("CONIN$"), GENERIC_READ,
+   hKeyboard = CreateFile (_T("CONIN$"), GENERIC_READ|GENERIC_WRITE,
                            0,NULL,OPEN_ALWAYS,0,0);
 
    GetScreenSize(&maxx,&maxy);
index 896cf52..2008957 100644 (file)
@@ -11,6 +11,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
 #include "lang/es-ES.rc"
 #include "lang/fr-FR.rc"
 #include "lang/ko-KR.rc"
+#include "lang/nl-NL.rc"
 #include "lang/no-NO.rc"
 #include "lang/pl-PL.rc"
 #include "lang/ru-RU.rc"
index 5521b61..5c94c25 100644 (file)
@@ -24,8 +24,6 @@ HINSTANCE hInst;
 HANDLE    hProcessHeap;
 HMODULE   hDllLib;
 ULONG     ulCurrentLayoutNum = 1;
-UINT      cxSmIcon, cySmIcon;
-
 
 static HICON
 CreateTrayIcon(LPTSTR szLCID)
@@ -51,18 +49,18 @@ CreateTrayIcon(LPTSTR szLCID)
 
     hdcsrc = GetDC(NULL);
     hdc = CreateCompatibleDC(hdcsrc);
-    hBitmap = CreateCompatibleBitmap(hdcsrc, cxSmIcon, cySmIcon);
+    hBitmap = CreateCompatibleBitmap(hdcsrc, 16, 16);
     ReleaseDC(NULL, hdcsrc);
 
     if (hdc && hBitmap)
     {
-        hBmpNew = CreateBitmap(cxSmIcon, cySmIcon, 1, 1, NULL);
+        hBmpNew = CreateBitmap(16, 16, 1, 1, NULL);
         if (hBmpNew)
         {
             hBmpOld = SelectObject(hdc, hBitmap);
-            rect.right = cxSmIcon;
+            rect.right = 16;
             rect.left = 0;
-            rect.bottom = cySmIcon;
+            rect.bottom = 16;
             rect.top = 0;
 
             bkColor = SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
@@ -70,14 +68,14 @@ CreateTrayIcon(LPTSTR szLCID)
 
             ExtTextOut(hdc, rect.left, rect.top, ETO_OPAQUE, &rect, _T(""), 0, NULL);
 
-            hFont = (HFONT) GetStockObject(DEFAULT_GUI_FONT);
-            if (!hFont)
-                goto End;
+            hFont = CreateFont(-11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+                               OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
+                               DEFAULT_QUALITY, FF_DONTCARE, _T("Tahoma"));
 
             hFontOld = SelectObject(hdc, hFont);
             DrawText(hdc, _tcsupr(szBuf), 2, &rect, DT_SINGLELINE|DT_CENTER|DT_VCENTER);
             SelectObject(hdc, hBmpNew);
-            PatBlt(hdc, 0, 0, cxSmIcon, cySmIcon, BLACKNESS);
+            PatBlt(hdc, 0, 0, 16, 16, BLACKNESS);
             SelectObject(hdc, hBmpOld);
             SelectObject(hdc, hFontOld);
 
@@ -86,15 +84,15 @@ CreateTrayIcon(LPTSTR szLCID)
             IconInfo.fIcon = TRUE;
 
             hIcon = CreateIconIndirect(&IconInfo);
-End:
-            if (hBmpNew) DeleteObject(hBmpNew);
-            if (hBmpOld) DeleteObject(hBmpOld);
-            if (hFont) DeleteObject(hFont);
+
+            DeleteObject(hBmpNew);
+            DeleteObject(hBmpOld);
+            DeleteObject(hFont);
         }
     }
 
-    if (hdc) DeleteDC(hdc);
-    if (hBitmap) DeleteObject(hBitmap);
+    DeleteDC(hdc);
+    DeleteObject(hBitmap);
 
     return hIcon;
 }
@@ -267,6 +265,8 @@ GetLayoutName(LPTSTR szLayoutNum, LPTSTR szName)
             RegCloseKey(hKey);
             return TRUE;
         }
+
+        RegCloseKey(hKey);
     }
 
     return FALSE;
@@ -386,23 +386,6 @@ GetNextLayout()
     return -1;
 }
 
-static VOID
-SettingsChanging(HWND hwnd)
-{
-    UINT cxSmIconCur = 0, cySmIconCur = 0;
-
-    cxSmIconCur = GetSystemMetrics(SM_CXSMICON);
-    cySmIconCur = GetSystemMetrics(SM_CYSMICON);
-
-    if ((cxSmIcon != cxSmIconCur) || (cySmIcon != cySmIconCur))
-    {
-        cxSmIcon = cxSmIconCur;
-        cySmIcon = cySmIconCur;
-    }
-
-    ActivateLayout(hwnd, ulCurrentLayoutNum);
-}
-
 LRESULT CALLBACK
 WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
 {
@@ -413,9 +396,6 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
     {
         case WM_CREATE:
         {
-            cxSmIcon = GetSystemMetrics(SM_CXSMICON);
-            cySmIcon = GetSystemMetrics(SM_CYSMICON);
-
             SetHooks();
             AddTrayIcon(hwnd);
             hRightPopupMenu = GetSubMenu(LoadMenu(hInst, MAKEINTRESOURCE(IDR_POPUP)), 0);
@@ -511,8 +491,6 @@ WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
 
         case WM_SETTINGCHANGE:
         {
-            SettingsChanging(hwnd);
-
             if (wParam == SPI_SETDEFAULTINPUTLANG)
             {
                 //FIXME: Should detect default language changes by CPL applet or by other tools and update UI
index ee169bc..99ab46e 100644 (file)
@@ -45,12 +45,13 @@ IDI_NPICON ICON "res/notepad.ico"
 #include "lang/fi-FI.rc"
 #include "lang/fr-FR.rc"
 #include "lang/hu-HU.rc"
+#include "lang/hy-AM.rc"
 #include "lang/id-ID.rc"
 #include "lang/it-IT.rc"
 #include "lang/ja-JP.rc"
 #include "lang/lt-LT.rc"
-#include "lang/no-NO.rc"
 #include "lang/nl-NL.rc"
+#include "lang/no-NO.rc"
 #include "lang/pl-PL.rc"
 #include "lang/pt-PT.rc"
 #include "lang/ru-RU.rc"
index a8bfe21..85a064d 100644 (file)
@@ -20,7 +20,7 @@ BOOL Create(LPCTSTR ServiceName, LPCTSTR *ServiceArgs)
     DWORD dwErrorControl = SERVICE_ERROR_NORMAL;
     LPCTSTR lpBinaryPathName = NULL;
     LPCTSTR lpLoadOrderGroup = NULL;
-    LPDWORD lpdwTagId = NULL;
+    DWORD dwTagId = 0;
     LPCTSTR lpDependencies = NULL;
     LPCTSTR lpServiceStartName = NULL;
     LPCTSTR lpPassword = NULL;
@@ -36,7 +36,7 @@ BOOL Create(LPCTSTR ServiceName, LPCTSTR *ServiceArgs)
     _tprintf(_T("error control - %lu\n"), dwErrorControl);
     _tprintf(_T("Binary path - %s\n"), lpBinaryPathName);
     _tprintf(_T("load order group - %s\n"), lpLoadOrderGroup);
-    _tprintf(_T("tag - %lu\n"), *lpdwTagId);
+    _tprintf(_T("tag - %lu\n"), dwTagId);
     _tprintf(_T("dependincies - %s\n"), lpDependencies);
     _tprintf(_T("account start name - %s\n"), lpServiceStartName);
     _tprintf(_T("account password - %s\n"), lpPassword);
@@ -66,7 +66,7 @@ BOOL Create(LPCTSTR ServiceName, LPCTSTR *ServiceArgs)
                         dwErrorControl,
                         lpBinaryPathName,
                         lpLoadOrderGroup,
-                        lpdwTagId,
+                        &dwTagId,
                         lpDependencies,
                         lpServiceStartName,
                         lpPassword);
index 7b92abd..18fe216 100644 (file)
@@ -9,6 +9,7 @@
 #include "lang/it-IT.rc"
 #include "lang/ko-KR.rc"
 #include "lang/lt-LT.rc"
+#include "lang/nl-NL.rc"
 #include "lang/no-NO.rc"
 #include "lang/pl-PL.rc"
 #include "lang/ru-RU.rc"
index 49cda6d..c8ee650 100644 (file)
@@ -74,6 +74,14 @@ CAPTION "Index"
     LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER
 }
 
+IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg"
+CAPTION "Suche"
+{
+    LTEXT  "Noch nicht implementiert", -1, 10, 10, 180, 150
+}
+
 /* Strings */
 
 STRINGTABLE DISCARDABLE LANGUAGE LANG_GERMAN, SUBLANG_NEUTRAL
index 1276f9c..2a11e1a 100644 (file)
@@ -61,7 +61,7 @@ MAIN_MENU MENU LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
    MENUITEM SEPARATOR
    MENUITEM "&Info...", MNID_HELP_ABOUT
 #ifdef WINELIB
-   MENUITEM "&About WINE", MNID_HELP_WINE
+   MENUITEM "&About Wine", MNID_HELP_WINE
 #endif
  }
 }
@@ -85,7 +85,7 @@ CAPTION "Search"
 /* Strings */
 STRINGTABLE DISCARDABLE LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
 {
-STID_WINE_HELP,        "WINE Help"
+STID_WINE_HELP,        "Wine Help"
 STID_WHERROR,          "ERROR"
 STID_WARNING,                  "WARNING"
 STID_INFO,             "Information"
index 60acba8..0c5eea6 100644 (file)
@@ -64,7 +64,7 @@ MAIN_MENU MENU
    MENUITEM SEPARATOR
    MENUITEM "&Info...", MNID_HELP_ABOUT
 #ifdef WINELIB
-   MENUITEM "À &propos de WINE", MNID_HELP_WINE
+   MENUITEM "À &propos de Wine", MNID_HELP_WINE
 #endif
  }
 }
@@ -77,10 +77,18 @@ CAPTION "Index"
     LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER
 }
 
+IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg"
+CAPTION "Recherche"
+{
+    LTEXT  "Pas encore implémenté", -1, 10, 10, 180, 150
+}
+
 /* Strings */
 STRINGTABLE DISCARDABLE LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
 {
-STID_WINE_HELP,        "Aide de WINE"
+STID_WINE_HELP,        "Aide de Wine"
 STID_WHERROR,          "ERREUR"
 STID_WARNING,                  "ATTENTION"
 STID_INFO,             "Information"
index 3b05974..6893178 100644 (file)
@@ -21,7 +21,7 @@
 
 /* Menu */
 
-MAIN_MENU MENU LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
+MAIN_MENU MENU LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 {
  POPUP "ÆÄÀÏ(&F)" {
   MENUITEM "¿­±â(&O)...", MNID_FILE_OPEN
@@ -69,7 +69,7 @@ MAIN_MENU MENU LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
 
 IDD_INDEX DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
 CAPTION "À妽º"
 {
     LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER
@@ -77,7 +77,7 @@ CAPTION "
 
 IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
 CAPTION "ã±â"
 {
     LTEXT  "¾ÆÁ÷ ±¸ÇöµÇÁö ¾ÊÀ½", -1, 10, 10, 180, 150
@@ -85,7 +85,7 @@ CAPTION "ã
 
 /* Strings */
 
-STRINGTABLE DISCARDABLE LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
+STRINGTABLE DISCARDABLE LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 {
 STID_WINE_HELP,        "Wine µµ¿ò¸»"
 STID_WHERROR,          "¿¡·¯"
@@ -103,7 +103,7 @@ STID_NO_RICHEDIT    "richedit  
 STID_PSH_INDEX,                "µµ¿ò¸» ¸ñÂ÷: "
 }
 
-CONTEXT_MENU MENU LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
+CONTEXT_MENU MENU LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 BEGIN
        POPUP ""
        BEGIN
index f1a213d..a742caf 100644 (file)
@@ -35,26 +35,26 @@ MAIN_MENU MENU LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
  POPUP "&Urejanje" {
    MENUITEM "&Kopiraj ...", MNID_EDIT_COPYDLG
    MENUITEM SEPARATOR
-   MENUITEM "P&ripombe ...", MNID_EDIT_ANNOTATE
+   MENUITEM "&Opombe ...", MNID_EDIT_ANNOTATE
  }
  POPUP "&Zaznamki" {
    MENUITEM "Do&loči ...", MNID_BKMK_DEFINE
  }
- POPUP "&Options" {
-   POPUP       "Help always visible"
+ POPUP "&Možnosti" {
+   POPUP       "Pomoč vedno vidna"
    BEGIN
-     MENUITEM "Default",       MNID_OPTS_HELP_DEFAULT
-     MENUITEM "Visible",       MNID_OPTS_HELP_VISIBLE
-     MENUITEM "Non visible",   MNID_OPTS_HELP_NONVISIBLE
+     MENUITEM "Privzeto",      MNID_OPTS_HELP_DEFAULT
+     MENUITEM "Vidna", MNID_OPTS_HELP_VISIBLE
+     MENUITEM "Skrita",        MNID_OPTS_HELP_NONVISIBLE
    END
-   MENUITEM "History",         MNID_OPTS_HISTORY
-   POPUP    "Fonts"
+   MENUITEM "Zgodovina",               MNID_OPTS_HISTORY
+   POPUP    "Pisava"
    BEGIN
-    MENUITEM "Small",          MNID_OPTS_FONTS_SMALL
-    MENUITEM "Normal",         MNID_OPTS_FONTS_NORMAL
-    MENUITEM "Large",          MNID_OPTS_FONTS_LARGE
+    MENUITEM "Majhna",         MNID_OPTS_FONTS_SMALL
+    MENUITEM "Običajna",      MNID_OPTS_FONTS_NORMAL
+    MENUITEM "Velika",         MNID_OPTS_FONTS_LARGE
    END
-   MENUITEM "Use system colors",       MNID_OPTS_SYSTEM_COLORS
+   MENUITEM "Uporabi sistemske barve", MNID_OPTS_SYSTEM_COLORS
   }
   POPUP "&Pomoč" {
    MENUITEM "&O pomoči", MNID_HELP_HELPON
@@ -75,6 +75,14 @@ CAPTION "Indeks"
     LISTBOX IDC_INDEXLIST, 10, 10, 180, 150, LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_BORDER
 }
 
+IDD_SEARCH DIALOG DISCARDABLE 0, 0, 200, 190 LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+FONT 8, "MS Shell Dlg"
+CAPTION "Iskanje"
+{
+    LTEXT  "Ni (še) na voljo", -1, 10, 10, 180, 150
+}
+
 /* Strings */
 STRINGTABLE DISCARDABLE LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
 {
@@ -83,15 +91,38 @@ STID_WHERROR,               "NAPAKA"
 STID_WARNING,                  "OPOZORILO"
 STID_INFO,             "Informacija"
 STID_NOT_IMPLEMENTED,  "Ni (še) na voljo"
-STID_HLPFILE_ERROR_s,  "Napaka pri branju datoteke s pomočjo `%s'"
-STID_INDEX,            "&Teme pomoči"
-STID_CONTENTS,                 "Summart"
+STID_HLPFILE_ERROR_s,  "Napaka pri branju datoteke s pomočjo '%s'"
+STID_INDEX,            "&Indeks"
+STID_CONTENTS,                 "Vsebina"
 STID_BACK,             "&Nazaj"
 STID_ALL_FILES,        "Vse datoteke (*.*)"
 STID_HELP_FILES_HLP,   "Datoteke s pomočjo (*.hlp)"
 STID_FILE_NOT_FOUND_s  "Ne najdem datoteke '%s'. Ali jo želite poiskati sami?"
-STID_NO_RICHEDIT       "Cannot find a richedit implementation... Aborting"
-STID_PSH_INDEX,                "Help topics: "
+STID_NO_RICHEDIT       "Ne morem najti knjižnice richedit ... Prekinjam"
+STID_PSH_INDEX,                "Teme pomoči: "
 }
 
+CONTEXT_MENU MENU LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
+BEGIN
+       POPUP ""
+       BEGIN
+               MENUITEM "Opomba ...",       MNID_CTXT_ANNOTATE
+               MENUITEM "Kopiraj",                MNID_CTXT_COPY
+               MENUITEM "Natisni ...",            MNID_CTXT_PRINT
+               POPUP    "Pisava"
+               BEGIN
+                       MENUITEM "Majnha",       MNID_CTXT_FONTS_SMALL
+            MENUITEM "Običajna",      MNID_CTXT_FONTS_NORMAL
+                       MENUITEM "Velika",       MNID_CTXT_FONTS_LARGE
+               END
+        POPUP   "Pomoč vedno vidna"
+               BEGIN
+                       MENUITEM "Privzeto",     MNID_CTXT_HELP_DEFAULT
+                       MENUITEM "Vidna",     MNID_CTXT_HELP_VISIBLE
+                       MENUITEM "Nevidna", MNID_CTXT_HELP_NONVISIBLE
+               END
+               MENUITEM "Uporabi sistemske barve",   MNID_CTXT_SYSTEM_COLORS
+       END
+END
+
 #pragma code_page(default)
index 5fdae29..3bd6c93 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright 1996 Ulrich Schmid
  * Swedish language by Karl Backström <karl_b@geocities.com>
  * Copyright 2002 Sylvain Petreolle <spetreolle@yahoo.fr>
- * Copyright 2007 Daniel Nylander
+ * Copyright 2007, 2008 Daniel Nylander <po@danielnylander.se>
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -26,7 +26,7 @@
 MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
 {
  POPUP "&Arkiv" {
-  MENUITEM "&Öppna", MNID_FILE_OPEN
+  MENUITEM "&Öppna", MNID_FILE_OPEN
   MENUITEM SEPARATOR
   MENUITEM "&Skriv ut", MNID_FILE_PRINT
   MENUITEM "Skrivar&konfiguration...", MNID_FILE_SETUP
@@ -38,32 +38,32 @@ MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
    MENUITEM SEPARATOR
    MENUITEM "&Kommentera...", MNID_EDIT_ANNOTATE
  }
- POPUP "&Bokmärke" {
+ POPUP "&Bokmärke" {
    MENUITEM "&Definiera...", MNID_BKMK_DEFINE
  }
- POPUP "&Options" {
-   POPUP       "Help always visible"
+ POPUP "A&lternativ" {
+   POPUP       "Hjälpen alltid synlig"
    BEGIN
-     MENUITEM "Default",       MNID_OPTS_HELP_DEFAULT
-     MENUITEM "Visible",       MNID_OPTS_HELP_VISIBLE
-     MENUITEM "Non visible",   MNID_OPTS_HELP_NONVISIBLE
+     MENUITEM "Standard",      MNID_OPTS_HELP_DEFAULT
+     MENUITEM "Synlig",        MNID_OPTS_HELP_VISIBLE
+     MENUITEM "Inte synlig",   MNID_OPTS_HELP_NONVISIBLE
   END
-  MENUITEM "History",          MNID_OPTS_HISTORY
-  POPUP    "Fonts"
+  MENUITEM "Historik",         MNID_OPTS_HISTORY
+  POPUP    "Typsnitt"
   BEGIN
-    MENUITEM "Small",          MNID_OPTS_FONTS_SMALL
+    MENUITEM "Liten",          MNID_OPTS_FONTS_SMALL
     MENUITEM "Normal",         MNID_OPTS_FONTS_NORMAL
-    MENUITEM "Large",          MNID_OPTS_FONTS_LARGE
+    MENUITEM "Stor",           MNID_OPTS_FONTS_LARGE
   END
-  MENUITEM "Use system colors",        MNID_OPTS_SYSTEM_COLORS
+  MENUITEM "Använd systemfärger",      MNID_OPTS_SYSTEM_COLORS
  }
- POPUP "&Hjälp" {
-   MENUITEM "Hjälp &för hjälp", MNID_HELP_HELPON
-   MENUITEM "Alltid &överst", MNID_HELP_HELPTOP
+ POPUP "&Hjälp" {
+   MENUITEM "Hjälp &för hjälp", MNID_HELP_HELPON
+   MENUITEM "Alltid &överst", MNID_HELP_HELPTOP
    MENUITEM SEPARATOR
    MENUITEM "&Info...", MNID_HELP_ABOUT
 #ifdef WINELIB
-   MENUITEM "&Om WINE", MNID_HELP_WINE
+   MENUITEM "&Om Wine", MNID_HELP_WINE
 #endif
  }
 }
@@ -71,18 +71,18 @@ MAIN_MENU MENU LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
 /* Strings */
 STRINGTABLE DISCARDABLE LANGUAGE LANG_SWEDISH, SUBLANG_NEUTRAL
 {
-STID_WINE_HELP,        "WINE Hjälp"
+STID_WINE_HELP,        "WINE Hjälp"
 STID_WHERROR,          "FEL"
 STID_WARNING,                  "VARNING"
 STID_INFO,             "Information"
 STID_NOT_IMPLEMENTED,  "Inte implementerat"
-STID_HLPFILE_ERROR_s,  "Fel vid läsning av hjälpfilen `%s'"
-STID_INDEX,            "&Innehåll"
-STID_CONTENTS,         "Summary"
-STID_BACK,             "&Bakåt"
+STID_HLPFILE_ERROR_s,  "Fel vid läsning av hjälpfilen `%s'"
+STID_INDEX,            "&Innehåll"
+STID_CONTENTS,         "Sammandrag"
+STID_BACK,             "&Bakåt"
 STID_ALL_FILES,        "Alla filer (*.*)"
-STID_HELP_FILES_HLP,   "Hjälpfiler (*.hlp)"
-STID_FILE_NOT_FOUND_s  "Kan inte hitta '%s'. Vill du söka efter denna fil?"
-STID_NO_RICHEDIT       "Cannot find a richedit implementation... Aborting"
-STID_PSH_INDEX,                "Help topics: "
+STID_HELP_FILES_HLP,   "Hjälpfiler (*.hlp)"
+STID_FILE_NOT_FOUND_s  "Kan inte hitta '%s'. Vill du söka efter denna fil?"
+STID_NO_RICHEDIT       "Kan inte hitta en implementation av richedit... Avslutar"
+STID_PSH_INDEX,                "Hjälprubriker: "
 }
index 1c970c7..19bf196 100644 (file)
@@ -848,7 +848,7 @@ void CALLBACK MACRO_RegisterRoutine(LPCSTR dll_name, LPCSTR proc, LPCSTR args)
             dll->class = dll->handler ? (dll->handler)(DW_WHATMSG, 0, 0) : DC_NOMSG;\r
             WINE_TRACE("Got class %x for DLL %s\n", dll->class, dll_name);\r
             if (dll->class & DC_INITTERM) dll->handler(DW_INIT, 0, 0);\r
-            if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD_PTR)Callbacks, 0);\r
+            if (dll->class & DC_CALLBACKS) dll->handler(DW_CALLBACKS, (DWORD)Callbacks, 0);\r
         }\r
         else WINE_WARN("OOM\n");\r
     }\r
index 0ae3e29..c9f132c 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "Dato og tid"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Tilgængelige formater",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Annuller",IDCANCEL,87,26,40,12
 END
index 69244f6..d891e22 100644 (file)
@@ -112,7 +112,7 @@ CAPTION "Datum und Uhrzeit"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Verfügbare Formate",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "A&bbrechen",IDCANCEL,87,26,40,12
 END
@@ -241,6 +241,7 @@ BEGIN
     STRING_WRITE_ACCESS_DENIED,  "Sie haben keine ausreichende Zugriffsberechtigung um die Datei zu speichern."
     STRING_OPEN_FAILED,          "Die Datei konnte nicht geöffnet werden."
     STRING_OPEN_ACCESS_DENIED,   "Sie haben keine ausreichende Zugriffsberechtigung um die Datei zu öffnen."
+    STRING_PRINTING_NOT_IMPLEMENTED, "Drucken ist nicht implementiert"
 END
 
 #pragma code_page(default)
index c3ae2f9..2cc7022 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "Date and time"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Available formats",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Cancel",IDCANCEL,87,26,40,12
 END
index c423a7f..23a545c 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "Date et heure"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Formats disponibles",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Annuler",IDCANCEL,87,26,40,12
 END
@@ -235,4 +235,9 @@ BEGIN
                                  "Voulez-vous vraiment continuer ?"
     STRING_INVALID_NUMBER,       "Format de nombre invalide"
     STRING_OLE_STORAGE_NOT_SUPPORTED, "Les documents conteneur OLE ne sont pas supportés"
+    STRING_WRITE_FAILED,              "Impossible d'enregistrer le fichier."
+    STRING_WRITE_ACCESS_DENIED,       "Vous ne disposez pas des accès nécessaires à l'enregistrement du fichier."
+    STRING_OPEN_FAILED,               "Impossible d'ouvrir le fichier."
+    STRING_OPEN_ACCESS_DENIED,        "Vous ne disposez pas des accès nécessaires à l'ouverture du fichier."
+    STRING_PRINTING_NOT_IMPLEMENTED, "L'impression n'est pas implémentée"
 END
index 78f069b..c6d8df9 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "Date and time"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Available formats",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Cancel",IDCANCEL,87,26,40,12
 END
index ac246eb..95aa12e 100644 (file)
@@ -18,7 +18,7 @@
  */
 
 
-LANGUAGE LANG_KOREAN, SUBLANG_NEUTRAL
+LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
 
 IDM_MAINMENU MENU DISCARDABLE
 BEGIN
@@ -112,7 +112,7 @@ CAPTION "
 FONT 10, "MS Shell Dlg"
 BEGIN
     LTEXT        "°¡´ÉÇÑ Çü½Ä",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "È®ÀÎ(&O)",IDOK,87,12,40,12
     PUSHBUTTON   "Ãë¼Ò(&C)",IDCANCEL,87,26,40,12
 END
@@ -131,7 +131,7 @@ END
 IDD_PARAFORMAT DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "´Ü¶ô Çü½Ä"
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "µé¿©¾²±â", 0, 10, 10, 120, 68
     LTEXT "¿ÞÂÊ", 0, 15, 22, 40, 13
@@ -149,7 +149,7 @@ END
 IDD_TABSTOPS DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "ÅÇ"
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "ÅÇ Á¤Áö", 0, 10, 10, 120, 90
     COMBOBOX IDC_TABSTOPS, 20, 20, 100, 60, CBS_SIMPLE | CBS_SORT
@@ -163,16 +163,16 @@ END
 IDD_FORMATOPTS DIALOG DISCARDABLE 0, 0, 280, 110
 STYLE DS_SYSMODAL
 Caption ""
-FONT 8, "MS Shell Dlg"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "ÁÙ ³Ñ±â±â", 0, 10, 10, 130, 85
-    RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15
+    RADIOBUTTON "ÁٳѱâÁö ¾ÊÀ½", IDC_PAGEFMT_WN, 18, 25, 117, 15
     RADIOBUTTON "â °¡ÀåÀÚ¸®¼­  ±Û ³Ñ±â±â(&W)", IDC_PAGEFMT_WW, 18, 45, 117, 15
     RADIOBUTTON "°¡ÀåÀÚ¸®¿¡¼­ ÁÙ ³Ñ±â±â(&M)", IDC_PAGEFMT_WM, 18, 65, 117, 15
     GROUPBOX " µµ±¸¹Ù", 0, 150, 10, 120, 85
     CHECKBOX "µµ±¸¹Ù(&T)", IDC_PAGEFMT_TB, 160, 20, 80, 15
     CHECKBOX "Çü½Ä¹Ù(&F)", IDC_PAGEFMT_FB, 160, 38, 80, 15
-    CHECKBOX "&Ruler", IDC_PAGEFMT_RU, 160, 56, 80, 15
+    CHECKBOX "±æÀ̹Ù(&R)", IDC_PAGEFMT_RU, 160, 56, 80, 15
     CHECKBOX "»óŹÙ(&S)", IDC_PAGEFMT_SB, 160, 74, 80, 15
     LTEXT "", IDC_PAGEFMT_ID, 0,0,0,0
 END
@@ -233,9 +233,9 @@ BEGIN
     STRING_SEARCH_FINISHED,      "¹®¼­¿¡¼­ Ã£±â ³¡."
     STRING_LOAD_RICHED_FAILED,   "¸®Ä¡ÅؽºÆ® ¶óÀ̺귯¸® ºÒ·¯¿À±â ½ÇÆÐ."
     STRING_SAVE_LOSEFORMATTING,  "´ç½ÅÀº º¸Åë ÅؽºÆ® Çü½ÄÀ¸·Î ÀúÀåÇϱ⸦ ¼±ÅÃÇß½À´Ï´Ù, " \
-                                 "ÀÌ°ÍÀº Æ¯¼öÇÑ ²Ù¹ÒÀ» ¾ø¿¤ °ÍÀÔ´Ï´Ù. " \
+                                 "ÀÌ°ÍÀº Æ÷¸ËÆÃÀ» ¾ø¿¤ °ÍÀÔ´Ï´Ù. " \
                                  "´ç½ÅÀº Á¤¸»·Î ÀúÀåÇϱ⸦ ¿øÇմϱî?"
-    STRING_INVALID_NUMBER,       "¿Ã¹Ù¸£Áö ¾ÊÀº ¼ö Çü½Ä"
+    STRING_INVALID_NUMBER,       "¿Ã¹Ù¸£Áö ¾ÊÀº ¼ýÀÚ Çü½Ä"
     STRING_OLE_STORAGE_NOT_SUPPORTED, "OLE ÀúÀå ¹®¼­´Â Áö¿øµÇÁö ¾Ê½À´Ï´Ù"
     STRING_WRITE_FAILED,              "ÆÄÀÏÀ» ÀúÀåÇÒ ¼ö ¾ø½À´Ï´Ù."
     STRING_WRITE_ACCESS_DENIED,       "ÆÄÀÏÀ» ÀúÀåÇÒ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù."
index 0a53658..7186861 100644 (file)
@@ -111,7 +111,7 @@ CAPTION "Datum en tijd"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Beschikbare formaten",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Annuleren",IDCANCEL,87,26,40,12
 END
index b162926..66a6701 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "Dato og klokkeslett"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Tilgjengelige formater",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Avbryt",IDCANCEL,87,26,40,12
 END
index 7c6cdaa..3f430c6 100644 (file)
@@ -111,7 +111,7 @@ CAPTION "Data i godzina"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Dostêpne formaty",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Anuluj",IDCANCEL,87,26,40,12
 END
index ce15326..f539a44 100644 (file)
@@ -112,7 +112,7 @@ CAPTION "Data e hora"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Formatos Disponíveis",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Cancelar",IDCANCEL,87,26,40,12
 END
index 7628554..4504ac3 100644 (file)
@@ -110,7 +110,7 @@ CAPTION "
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Äîñòóïíûå ôîðìàòû",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&ÎÊ",IDOK,87,12,40,12
     PUSHBUTTON   "Î&òìåíà",IDCANCEL,87,26,40,12
 END
index 448541e..9cc93d9 100644 (file)
@@ -112,7 +112,7 @@ CAPTION "Datum in čas"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Razpoložljive oblike",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&V redu",IDOK,87,12,40,12
     PUSHBUTTON   "&Prekliči",IDCANCEL,87,26,40,12
 END
@@ -238,6 +238,11 @@ BEGIN
                                  "dokument v tej obliki?"
     STRING_INVALID_NUMBER,       "Neveljavna oblika števila"
     STRING_OLE_STORAGE_NOT_SUPPORTED, "Dokumenti z OLE predmeti niso podprti"
+    STRING_WRITE_FAILED,              "Napaka pri shranjevanju datoteke."
+    STRING_WRITE_ACCESS_DENIED,       "Nimate pravic za shranjevanje te datoteke."
+    STRING_OPEN_FAILED,               "Napaka pri odpiranju datoteke."
+    STRING_OPEN_ACCESS_DENIED,        "Nimate pravic za odpiranje te datoteke."
+    STRING_PRINTING_NOT_IMPLEMENTED, "Tiskanje (še) ni na voljo"
 END
 
 #pragma code_page(default)
index f03b68d..d5475e5 100644 (file)
@@ -112,7 +112,7 @@ CAPTION "Date and time"
 FONT 10, "MS Sans Serif"
 BEGIN
     LTEXT        "Available formats",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "&OK",IDOK,87,12,40,12
     PUSHBUTTON   "&Cancel",IDCANCEL,87,26,40,12
 END
index 3b87316..edbe589 100644 (file)
@@ -112,10 +112,10 @@ END
 IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 CAPTION "日期和时间"
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
 BEGIN
     LTEXT        "可用格式",0,3,2,100,15
-    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
+    LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT | LBS_NOTIFY
     PUSHBUTTON   "确定(&O)",IDOK,87,12,40,12
     PUSHBUTTON   "取消(&C)",IDCANCEL,87,26,40,12
 END
@@ -123,7 +123,7 @@ END
 IDD_NEWFILE DIALOG DISCARDABLE 30, 20, 140, 80
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 CAPTION "新建"
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
 BEGIN
     LTEXT        "新文件类型",0,3,2,100,15
     LISTBOX      IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT
@@ -134,7 +134,7 @@ END
 IDD_PARAFORMAT DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "段落格式"
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "缩进", 0, 10, 10, 120, 68
     LTEXT "左", 0, 15, 22, 40, 13
@@ -152,7 +152,7 @@ END
 IDD_TABSTOPS DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "标签"
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "标签停点", 0, 10, 10, 120, 90
     COMBOBOX IDC_TABSTOPS, 20, 20, 100, 60, CBS_SIMPLE | CBS_SORT
@@ -166,7 +166,7 @@ END
 IDD_FORMATOPTS DIALOG DISCARDABLE 0, 0, 280, 110
 STYLE DS_SYSMODAL
 Caption ""
-FONT 9, "MS Song"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "自动换行", 0, 10, 10, 130, 85
     RADIOBUTTON "No line wrapping", IDC_PAGEFMT_WN, 18, 25, 117, 15
@@ -337,7 +337,7 @@ END
 IDD_DATETIME DIALOG DISCARDABLE 30, 20, 130, 80
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 CAPTION "日期和時間"
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
 BEGIN
     LTEXT        "可用格式",0,3,2,100,15
     LISTBOX      IDC_DATETIME,3,12,80,65,LBS_NOINTEGRALHEIGHT
@@ -348,7 +348,7 @@ END
 IDD_NEWFILE DIALOG DISCARDABLE 30, 20, 140, 80
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 CAPTION "新建"
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
 BEGIN
     LTEXT        "新檔案類型",0,3,2,100,15
     LISTBOX      IDC_NEWFILE,3,12,90,65,LBS_NOINTEGRALHEIGHT
@@ -359,7 +359,7 @@ END
 IDD_PARAFORMAT DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "段落格式"
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "縮進", 0, 10, 10, 120, 68
     LTEXT "左", 0, 15, 22, 40, 13
@@ -377,7 +377,7 @@ END
 IDD_TABSTOPS DIALOG DISCARDABLE 30, 20, 200, 110
 STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
 Caption "標籤"
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "標籤停點", 0, 10, 10, 120, 90
     COMBOBOX IDC_TABSTOPS, 20, 20, 100, 60, CBS_SIMPLE | CBS_SORT
@@ -391,7 +391,7 @@ END
 IDD_FORMATOPTS DIALOG DISCARDABLE 0, 0, 280, 110
 STYLE DS_SYSMODAL
 Caption ""
-FONT 8, "PMingLiu"
+FONT 9, "MS Shell Dlg"
 BEGIN
     GROUPBOX "自動換行", 0, 10, 10, 130, 85
     RADIOBUTTON "按視窗寬度(&W)", IDC_PAGEFMT_WW, 18, 25, 117, 15
index d06b2d9..dd334ae 100644 (file)
@@ -1373,6 +1373,11 @@ static INT_PTR CALLBACK datetime_proc(HWND hWnd, UINT message, WPARAM wParam, LP
         case WM_COMMAND:
             switch(LOWORD(wParam))
             {
+                case IDC_DATETIME:
+                    if (HIWORD(wParam) != LBN_DBLCLK)
+                        break;
+                    /* Fall through */
+
                 case IDOK:
                     {
                         LRESULT index;
index 8541ca7..8f85574 100644 (file)
 
 LANGUAGE LANG_GREEK, SUBLANG_DEFAULT
 
-/* String Tables */
-STRINGTABLE DISCARDABLE
+IDD_STARTPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
 BEGIN
-    IDS_CAPTION  "ÅãêáôÜóôáóç ReactOS"
-    IDS_TEXT     "Äå ìðïñåßôå íá åãêáôáóôÞóåôå ôï ReactOS áðåõèåßáò áðü áõôü ôï CD!\n\nÐáñáêáëþ åðáíåêêéíÞóôå ôïí õðïëïãéóôÞ óáò áðü áõôü ôï CD ãéá íá åãêáôáóôÞóåôå ôï ReactOS."
+    LTEXT "Êáëþò Þëèáôå óôïí ïäçãü åãêáôÜóôáóçò ôïõ ReactOS.", IDC_STARTTITLE, 115, 8, 195, 24
+    LTEXT "Äå ìðïñåßôå íá åãêáôáóôÞóåôå ôï ReactOS áðåõèåßáò áðü áõôü ôï CD áêüìá! Ðáñáêáëïýìå åðáíåêêéíÞóôå ôïí õðïëïãéóôÞ óáò áðü áõôü ôï CD ãéá íá ìðïñÝóåôå íá åãêáôáóôÞóåôå ôï ReactOS.", IDC_STATIC, 115, 40, 195, 100
+    LTEXT "ÐáôÞóôå ÏëïêëÞñùóç ãéá íá âãåßôå áðü ôçí ÅãêáôÜóôáóç.", IDC_STATIC, 115, 169, 195, 17
 END
 
+IDD_LANGSELPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "IDB_LOGO", IDB_ROSLOGO, "Static", WS_CHILD | WS_VISIBLE | SS_OWNERDRAW, 18, 0, 290, 99
+    CONTROL "Ãëþóóá åãêáôÜóôáóçò:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 109, 106, 11
+    CONTROL "", IDC_LANGUAGES, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 107, 176, 142
+    CONTROL "Ðëçêôñïëüãéï Þ ìÝèïäïò åéóüäïõ:", IDC_STATIC, "Static", WS_CHILD | WS_VISIBLE | WS_GROUP | SS_RIGHT, 20, 142, 106, 11
+    CONTROL "", IDC_KEYLAYOUT, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST, 132, 141, 176, 81
+    LTEXT "ÐáôÞóôå Åðüìåíï ãéá íá åðéëÝîåôå ôïí ôýðï åãêáôÜóôáóçò.", IDC_STATIC, 10, 180 ,297, 10
+END
+
+IDD_TYPEPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "Type of setup", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172
+    CONTROL "Install ReactOS", IDC_INSTALL, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 20, 15, 277, 10
+    CONTROL "Repair or update an installed ReactOS", IDC_SETUP, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 20, 30, 277, 10
+    LTEXT "Click Next to setup the devices.", IDC_STATIC, 10, 180 ,297, 10
+END
+
+IDD_DEVICEPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "Ñõèìßóåéò óõóêåõþí", IDC_STATIC, "Button", BS_GROUPBOX, 10,0,297,172
+    LTEXT "ÕðïëïãéóôÞò:", IDC_STATIC, 20,15, 80, 10
+    CONTROL "", IDC_COMPUTER, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 15, 150, 80
+    LTEXT "ÅìöÜíéóç:", IDC_STATIC, 20,35, 80, 10
+    CONTROL "", IDC_DISPLAY, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 35, 150, 80
+    LTEXT "Ðëçêôñïëüãéï:", IDC_STATIC, 20,55, 80, 10
+    CONTROL "", IDC_KEYBOARD, "ComboBox", WS_VSCROLL | WS_TABSTOP | CBS_DROPDOWNLIST , 100, 55, 150, 80
+    LTEXT "Click Next setup of the installation device.", IDC_STATIC, 10, 180 ,277, 20
+END
+
+IDD_DRIVEPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "Partition ãéá ôçí åãêáôÜóôáóç ôïõ ReactOS", IDC_STATIC, "Button", BS_GROUPBOX, 10,1,298,176
+    LISTBOX IDC_PARTITION, 20,12,278,142,LBS_HASSTRINGS | WS_VSCROLL
+    PUSHBUTTON "&Äçìéïõñãßá", IDC_PARTCREATE, 20,155,50,15
+    PUSHBUTTON "&ÄéáãñáöÞ", IDC_PARTDELETE, 76,155,50,15
+    PUSHBUTTON "&ÅðéëïãÝò ãéá ðñï÷ùñçìÝíïõò...", IDC_PARTMOREOPTS, 218,155,80,15
+    LTEXT "ÐáôÞóôå Åðüìåíï ãéá íá îåêéíÞóåôå ôç äéáäéêáóßá åãêáôÜóôáóçò.", IDC_STATIC, 10, 180 ,277, 20
+END
+
+IDD_PARTITION DIALOGEX DISCARDABLE  0, 0, 145, 90
+STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME
+CAPTION "Äçìéïõñãßá Partition"
+FONT 8, "MS Shell Dlg"
+BEGIN
+  CONTROL "",IDC_UPDOWN1,"msctls_updown32", WS_VISIBLE,104,22,9,13
+  CONTROL "Create and format partition",IDC_STATIC,"Button",BS_GROUPBOX,7,5,129,57
+  LTEXT "ÌÝãåèïò:",IDC_STATIC, 13,24,27,9
+  EDITTEXT IDC_PARTSIZE,52,23,53,13, WS_VISIBLE|WS_TABSTOP
+  LTEXT "GB",IDC_UNIT, 117,24,14,9
+  LTEXT "Ôýðïò óõóôÞìáôïò:",IDC_STATIC,13,46,35,9
+  CONTROL "",IDC_FSTYPE,"ComboBox",WS_VISIBLE|WS_TABSTOP|CBS_DROPDOWNLIST,52,42,79,50
+  PUSHBUTTON "&OK",IDOK,35,68,47,15, WS_VISIBLE|WS_TABSTOP
+  PUSHBUTTON "&¢êõñï",IDCANCEL,87,68,47,15, WS_VISIBLE|WS_TABSTOP
+END
+
+IDD_BOOTOPTIONS DIALOGEX DISCARDABLE  0, 0, 305, 105
+STYLE WS_VISIBLE|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME
+CAPTION "Ñõèìßóåéò Partition ãéá ðñï÷ùñçìÝíïõò"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "ÖÜêåëïò åãêáôÜóôáóçò", IDC_STATIC, "Button", BS_GROUPBOX, 4,1,298,30
+    EDITTEXT IDC_PATH, 10,11,278,13, WS_VISIBLE
+
+    CONTROL "ÅãêáôÜóôáóç Boot loader", IDC_STATIC, "Button", BS_GROUPBOX, 4,36,298,41
+
+    CONTROL "ÅãêáôÜóôáóç boot loader óôï óêëçñü äßóêï (MBR)", IDC_INSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP, 10,46,278,11
+    CONTROL "Íá ìç ãßíåé åãêáôÜóôáóç ôïõ bootloader", IDC_NOINSTFREELDR, "Button", BS_AUTORADIOBUTTON | WS_TABSTOP | WS_DISABLED , 10,57,278,11
+    PUSHBUTTON "&OK", IDOK, 180,83,50,15, WS_TABSTOP | WS_VISIBLE
+    PUSHBUTTON "&¢êõñï", IDCANCEL, 240,83,50,15, WS_TABSTOP | WS_VISIBLE
+END
+
+IDD_PROCESSPAGE DIALOGEX 0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "ÅãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "Setup action", IDC_ACTION, "Button", BS_GROUPBOX, 10,0,297,172
+    LTEXT "Install files...", IDC_ACTIVITY, 20, 50, 277, 10
+    LTEXT "test.txt", IDC_ITEM, 30, 80, 257, 10
+    CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32",
+            PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8
+END
+
+
+IDD_RESTARTPAGE DIALOGEX DISCARDABLE  0, 0, 317, 193
+STYLE DS_SHELLFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Ïëïêëçñþíåôáé ç åãêáôÜóôáóç ôïõ ReactOS"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    CONTROL "Ïëïêëçñþíåôáé ôï ðñþôï óôÜäéï ôçò åãêáôÜóôáóçò ôïõ ReactOS", IDC_FINISHTITLE, "Button", BS_GROUPBOX, 10,0,297,172
+    LTEXT "Ïëïêëçñþóáôå åðéôõ÷þò ôï ðñþôï óôÜäéï ôçò åãêáôÜóôáóçò ôïõ ReactOS.", IDC_STATIC, 20, 50, 277, 10
+    LTEXT "¼ôáí ðáôÞóåôå ÏëïêëÞñùóç, èá ãßíåé åðáíåêêßíçóç ôïõ õðïëïãéóôÞ óáò.", IDC_STATIC, 20, 80, 277, 10
+    CONTROL "", IDC_RESTART_PROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 120, 277, 8
+    LTEXT "Áí õðÜñ÷åé êÜðïéï CD, áöáéñÝóôå ôï. ¸ðåéôá, ãéá íá ãßíåé åðáíåêêßíçóç, ðáôÞóôå ÏëïêëÞñùóç.", IDC_STATIC, 10, 180, 297, 20
+END
+
+
+STRINGTABLE
+BEGIN
+       IDS_LANGTITLE           "ÅðéëïãÞ Ãëþóóáò"
+       IDS_LANGSUBTITLE        "ÅðéëÝîôå ãëþóóá ãéá ôçí åãêáôÜóôáóç êáé ôï ôåëéêü óýóôçìá."
+       IDS_TYPETITLE           "Êáëþò Þëèáôå óôçí ÅãêáôÜóôáóç ôïõ ReactOS"
+       IDS_TYPESUBTITLE        "ÅðéëÝîôå ôýðï åãêáôÜóôáóçò."
+       IDS_DEVICETITLE         "Setup the basic devices"
+       IDS_DEVICESUBTITLE      "Ïñéóìüò ñõèìßóåùí ãéá åìöÜíéóç êáé ðëçêôñïëüãéï."
+       IDS_DRIVETITLE          "Ñýèìéóç ôïõ partition åãêáôÜóôáóçò êáé ôïõ öáêÝëïõ óõóôÞìáôïò"
+       IDS_DRIVESUBTITLE       "Ðñïåôïéìáóßá ôïõ partition åãêáôÜóôáóçò, öáêÝëïõ óõóôÞìáôïò êáé boot loader."
+       IDS_PROCESSTITLE        "Prepare partition, copy files and setup system"
+       IDS_PROCESSSUBTITLE     "Create and format partition, copy files, install and setup boot loader"
+       IDS_RESTARTTITLE        "Ôï ðñþôï óôÜäéï ôçò åãêáôÜóôáóçò ïëïêëçñþèçêå"
+       IDS_RESTARTSUBTITLE     "Ôï ðñþôï óôÜäéï ôçò åãêáôÜóôáóçò ïëïêëçñþèçêå, êÜíôå åðáíåêêßíçóç ãéá íá óõíå÷ßóåôå ìå ôï äåýôåñï óôÜäéï."
+       IDS_ABORTSETUP          "ReactOS is not completely installed on your computer. If you quit Setup now, you will need to run Setup again to install Reactos. Really quit?"
+       IDS_ABORTSETUP2         "Abort installation?"
+END
 /* EOF */
index 79fff3e..d12406d 100644 (file)
@@ -45,6 +45,7 @@ LONG UnattendFormatPartition = 0;
 LONG AutoPartition = 0;
 WCHAR UnattendInstallationDirectory[MAX_PATH];
 PWCHAR SelectedLanguageId;
+WCHAR LocaleID[9];
 WCHAR DefaultLanguage[20];
 WCHAR DefaultKBLayout[20];
 BOOLEAN RepairUpdateFlag = FALSE;
@@ -555,8 +556,16 @@ CheckUnattendedSetup(VOID)
         }
     }
 
-    SetupCloseInfFile(UnattendInf);
+       /* search for LocaleID in the 'Unattend' section*/
+       if (SetupFindFirstLineW (UnattendInf, L"Unattend", L"LocaleID", &Context)){
+               if (INF_GetData (&Context, NULL, &Value)){
+                       LONG Id = wcstol(Value, NULL, 16);
+                       swprintf(LocaleID,L"%08lx", Id);                        
+       }       
+    }
 
+       SetupCloseInfFile(UnattendInf);
+       
     DPRINT("Running unattended setup\n");
 }
 
@@ -700,6 +709,7 @@ SetupStartPage(PINPUT_RECORD Ir)
     PWCHAR Value;
     UINT ErrorLine;
     ULONG ReturnSize;
+    PGENERIC_LIST_ENTRY ListEntry;
 
     CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
 
@@ -797,8 +807,43 @@ SetupStartPage(PINPUT_RECORD Ir)
         KeyboardList = CreateKeyboardDriverList(SetupInf);
         LayoutList = CreateKeyboardLayoutList(SetupInf, DefaultKBLayout);
         LanguageList = CreateLanguageList(SetupInf, DefaultLanguage);
-
-        return INSTALL_INTRO_PAGE;
+               
+               /* new part */
+               
+               wcscpy(SelectedLanguageId,LocaleID);
+               
+                               
+               /* first we hack LanguageList */
+               ListEntry = GetFirstListEntry(LanguageList);
+
+               while (ListEntry != NULL)
+               {
+                       if (!wcscmp(LocaleID, GetListEntryUserData(ListEntry)))
+                       {
+                               DPRINT("found %S in LanguageList\n",GetListEntryUserData(ListEntry));
+                               SetCurrentListEntry(LanguageList, ListEntry);
+                               break;
+                       }
+
+                       ListEntry = GetNextListEntry(ListEntry);
+               }
+               /* now LayoutList */
+               ListEntry = GetFirstListEntry(LayoutList);
+
+               while (ListEntry != NULL)
+               {
+                       if (!wcscmp(LocaleID, GetListEntryUserData(ListEntry)))
+                       {
+                               DPRINT("found %S in LayoutList\n",GetListEntryUserData(ListEntry));
+                               SetCurrentListEntry(LayoutList, ListEntry);
+                               break;
+                       }
+
+                       ListEntry = GetNextListEntry(ListEntry);
+               }
+        SetConsoleCodePage();
+
+           return INSTALL_INTRO_PAGE;
     }
 
     return LANGUAGE_PAGE;
@@ -3235,14 +3280,16 @@ RegistryPage(PINPUT_RECORD Ir)
         return QUIT_PAGE;
     }
 
-    /* Update keyboard layout settings */
-    CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
-    if (!ProcessKeyboardLayoutRegistry(LayoutList))
-    {
-        MUIDisplayError(ERROR_UPDATE_KBSETTINGS, Ir, POPUP_WAIT_ENTER);
-        return QUIT_PAGE;
+    if (!IsUnattendedSetup){
+        
+       /* Update keyboard layout settings */
+       CONSOLE_SetStatusText(MUIGetString(STRING_KEYBOARDSETTINGSUPDATE));
+       if (!ProcessKeyboardLayoutRegistry(LayoutList))
+       {
+           MUIDisplayError(ERROR_UPDATE_KBSETTINGS, Ir, POPUP_WAIT_ENTER);
+           return QUIT_PAGE;
+       }
     }
-
     /* Add codepage information to registry */
     CONSOLE_SetStatusText(MUIGetString(STRING_CODEPAGEINFOUPDATE));
     if (!AddCodePage())
index 395e6f7..8499622 100644 (file)
@@ -3,9 +3,10 @@
 
 MUI_LAYOUTS hyAMLayouts[] =
 {
-    { L"042b", L"0000042b" },
-    { L"0409", L"00000409" },
+    { L"042B", L"0000042B" },
+    { L"042B", L"0001042B" },
     { L"0419", L"00000419" },
+    { L"0409", L"00000409" },
     { NULL, NULL }
 };
 
index 550a2e0..502c0ac 100644 (file)
@@ -391,12 +391,12 @@ AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
     {
         if (uIndex > 19) break;
 
-        swprintf(szValueName, L"%d", uIndex + 1);
+        swprintf(szValueName, L"%u", uIndex + 1);
         RtlInitUnicodeString(&ValueName, szValueName);
 
         swprintf(szLangID, L"0000%s", MuiLayouts[uIndex].LangID);
 
-        if (wcscmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
+        if (_wcsicmp(szLangID, MuiLayouts[uIndex].LayoutID) == 0)
         {
             Status = NtSetValueKey(KeyHandle,
                                    &ValueName,
@@ -414,7 +414,7 @@ AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
         }
         else
         {
-            swprintf(szLangID, L"d%03d%s", uCount, MuiLayouts[uIndex].LangID);
+            swprintf(szLangID, L"d%03u%s", uCount, MuiLayouts[uIndex].LangID);
             Status = NtSetValueKey(KeyHandle,
                                    &ValueName,
                                    0,
@@ -439,7 +439,7 @@ AddKbLayoutsToRegistry(IN const MUI_LAYOUTS * MuiLayouts)
                                    (wcslen(MuiLayouts[uIndex].LayoutID)+1) * sizeof(WCHAR));
             if (!NT_SUCCESS(Status))
             {
-                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %d)\n", Status, uIndex);
+                DPRINT1("NtSetValueKey() failed (Status = %lx, uIndex = %u)\n", Status, uIndex);
                 NtClose(SubKeyHandle);
                 NtClose(KeyHandle);
                 return FALSE;
index 19407eb..e08fbc3 100644 (file)
@@ -99,6 +99,7 @@
 #include "lang/mr-IN.h"
 #include "lang/ms-BN.h"
 #include "lang/ms-MY.h"
+#include "lang/my-MM.h"
 #include "lang/nl-BE.h"
 #include "lang/nl-NL.h"
 #include "lang/nn-NO.h"
@@ -159,7 +160,7 @@ const MUI_LANGUAGE LanguageList[] =
   {L"0000042D", L"1252", L"850", L"10000", L"Basque",                       enUSPages, enUSErrorEntries, enUSStrings, LatinFonts,    euESLayouts },
   {L"00000423", L"1251", L"866", L"10007", L"Belarusian",                   enUSPages, enUSErrorEntries, enUSStrings, CyrillicFonts, beBYLayouts },
   {L"00000402", L"1251", L"866", L"10007", L"Bulgarian",                    bgBGPages, bgBGErrorEntries, bgBGStrings, CyrillicFonts, bgBGLayouts },
-  {L"00000455", L"0",    L"1",   L"2",     L"Burmese",                      enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts,  enUSLayouts },
+  {L"00000455", L"0",    L"1",   L"2",     L"Burmese",                      enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts,  myMMLayouts },
   {L"00000403", L"1252", L"850", L"10000", L"Catalan",                      enUSPages, enUSErrorEntries, enUSStrings, LatinFonts,    caESLayouts },
   {L"00000404", L"950",  L"950", L"10008", L"Chinese (Taiwan)",             enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts,  zhTWLayouts },
   {L"00000804", L"936",  L"936", L"10008", L"Chinese (PRC)",                enUSPages, enUSErrorEntries, enUSStrings, UnicodeFonts,  zhCNLayouts },
index 5f4cb4a..e6ce524 100644 (file)
@@ -895,7 +895,7 @@ ProcessKeyboardLayoutRegistry(PGENERIC_LIST List)
     PWCHAR LayoutId;
     const MUI_LAYOUTS * LayoutsList;
     MUI_LAYOUTS NewLayoutsList[20];
-    ULONG uIndex = 0;
+    ULONG uIndex;
     ULONG uOldPos = 0;
 
     Entry = GetCurrentListEntry(List);
@@ -910,16 +910,17 @@ ProcessKeyboardLayoutRegistry(PGENERIC_LIST List)
 
     if (_wcsicmp(LayoutsList[0].LayoutID, LayoutId) != 0)
     {
-        do
+        for (uIndex = 1; LayoutsList[uIndex].LangID != NULL; uIndex++)
         {
             if (_wcsicmp(LayoutsList[uIndex].LayoutID, LayoutId) == 0)
             {
                 uOldPos = uIndex;
+                continue;
             }
 
-            uIndex++;
-
-        } while (LayoutsList[uIndex].LangID != NULL);
+            NewLayoutsList[uIndex].LangID   = LayoutsList[uIndex].LangID;
+            NewLayoutsList[uIndex].LayoutID = LayoutsList[uIndex].LayoutID;
+        }
 
         NewLayoutsList[uIndex].LangID    = NULL;
         NewLayoutsList[uIndex].LayoutID  = NULL;
index 9c3314e..deead6c 100644 (file)
@@ -1094,71 +1094,43 @@ DirPrintWideList(LPWIN32_FIND_DATA ptrFiles[],  /* [IN] Files' Info */
   if (!(iColumns))
     iColumns = 1;
 
-  /* Print Column sorted */
-  if (lpFlags->bWideListColSort)
-  {
-    /* Calculate the lines that will be printed */
-//    iLines = ceil((float)dwCount/(float)iColumns);
-    iLines = (USHORT)(dwCount / iColumns);
+  /* Calculate the lines that will be printed */
+  iLines = (USHORT)((dwCount + iColumns - 1) / iColumns);
 
-    for (i = 0;i < iLines;i++)
+  for (i = 0; i < iLines; i++)
+  {
+    for (j = 0; j < iColumns; j++)
     {
-      for (j = 0; j < iColumns; j++)
+      if (lpFlags->bWideListColSort)
       {
+        /* Print Column sorted */
         temp = (j * iLines) + i;
-        if (temp >= dwCount)
-           break;
-
-        if (ptrFiles[temp]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-          _stprintf(szTempFname, _T("[%s]"), ptrFiles[temp]->cFileName);
-        else
-          _stprintf(szTempFname, _T("%s"), ptrFiles[temp]->cFileName);
-
-        if(lpFlags->bPause)
-                  ConOutPrintfPaging(FALSE,_T("%-*s"), iLongestName + 1 , szTempFname);
-               else
-                  ConOutPrintf(_T("%-*s"), iLongestName + 1 , szTempFname);
+      }
+      else
+      {
+        /* Print Line sorted */
+        temp = (i * iColumns) + j;
       }
 
-      if(lpFlags->bPause)
-                ConOutPrintfPaging(FALSE,_T("\n"));
-         else
-                ConOutPrintf(_T("\n"));
-    }
-  }
-  else
-  {
-    /* Print Line sorted */
-    for (i = 0; i < dwCount; i++)
-    {
-      if (ptrFiles[i]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-        _stprintf(szTempFname, _T("[%s]"), ptrFiles[i]->cFileName);
+      if (temp >= dwCount)
+         break;
+
+      if (ptrFiles[temp]->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+        _stprintf(szTempFname, _T("[%s]"), ptrFiles[temp]->cFileName);
       else
-        _stprintf(szTempFname, _T("%s"), ptrFiles[i]->cFileName);
+        _stprintf(szTempFname, _T("%s"), ptrFiles[temp]->cFileName);
 
       if(lpFlags->bPause)
-                ConOutPrintfPaging(FALSE,_T("%-*s"), iLongestName + 1, szTempFname );
-         else
-                ConOutPrintf(_T("%-*s"), iLongestName + 1, szTempFname );
-
-      /*
-       * We print a new line at the end of each column
-       * except for the case that it is the last item.
-       */
-         if (!((i + 1) % iColumns) && (i < (dwCount - 1)))
-         {
-                 if(lpFlags->bPause)
-                        ConOutPrintfPaging(FALSE,_T("\n"));
-                 else
-                    ConOutPrintf(_T("\n"));
-         }
+        ConOutPrintfPaging(FALSE,_T("%-*s"), iLongestName + 1 , szTempFname);
+      else
+        ConOutPrintf(_T("%-*s"), iLongestName + 1 , szTempFname);
     }
 
-    /* Add a new line after the last item */
+    /* Add a new line after the last item in the column */
     if(lpFlags->bPause)
-          ConOutPrintfPaging(FALSE,_T("\n"));
-       else
-          ConOutPrintf(_T("\n"));
+      ConOutPrintfPaging(FALSE,_T("\n"));
+    else
+      ConOutPrintf(_T("\n"));
   }
 }
 
index d18c409..c87e1c9 100644 (file)
@@ -20,6 +20,7 @@ IDB_STARTMENU BITMAP DISCARDABLE res/logov.bmp
 #include "lang/it-IT.rc"
 #include "lang/ko-KR.rc"
 #include "lang/lt-LT.rc"
+#include "lang/nl-NL.rc"
 #include "lang/no-NO.rc"
 #include "lang/pl-PL.rc"
 #include "lang/ru-RU.rc"
index a046057..46a060a 100644 (file)
@@ -452,7 +452,7 @@ WaitForLSA(VOID)
     HANDLE hEvent;
     DWORD dwError;
 
-    DPRINT1("WaitForLSA() called\n");
+    DPRINT("WaitForLSA() called\n");
 
     hEvent = CreateEventW(NULL,
                           TRUE,
@@ -476,13 +476,13 @@ WaitForLSA(VOID)
         }
     }
 
-    DPRINT1("Wait for LSA!\n");
+    DPRINT("Wait for LSA!\n");
     WaitForSingleObject(hEvent, INFINITE);
-    DPRINT1("LSA is available!\n");
+    DPRINT("LSA is available!\n");
 
     CloseHandle(hEvent);
 
-    DPRINT1("WaitForLSA() done\n");
+    DPRINT("WaitForLSA() done\n");
 }
 
 
index acf275d..e339eb9 100644 (file)
@@ -662,6 +662,7 @@ HKCR,"MIME\Database\Rfc1766","0408",0x00000000,"el;Greek"
 HKCR,"MIME\Database\Rfc1766","040D",0x00000000,"he;Hebrew"
 HKCR,"MIME\Database\Rfc1766","0439",0x00000000,"hi;Hindi"
 HKCR,"MIME\Database\Rfc1766","040E",0x00000000,"hu;Hungarian"
+HKCR,"MIME\Database\Rfc1766","042B",0x00000000,"hy;Armenian"
 HKCR,"MIME\Database\Rfc1766","040F",0x00000000,"is;Icelandic"
 HKCR,"MIME\Database\Rfc1766","0421",0x00000000,"in;Indonesian"
 HKCR,"MIME\Database\Rfc1766","0410",0x00000000,"it;Italian (Italy)"
index 94d3084..bdbbb96 100644 (file)
@@ -662,6 +662,7 @@ HKCR,"MIME\Database\Rfc1766","0408",0x00000000,"el;Greek"
 HKCR,"MIME\Database\Rfc1766","040D",0x00000000,"he;Hebrew"
 HKCR,"MIME\Database\Rfc1766","0439",0x00000000,"hi;Hindi"
 HKCR,"MIME\Database\Rfc1766","040E",0x00000000,"hu;Hungarian"
+HKCR,"MIME\Database\Rfc1766","042B",0x00000000,"hy;Armenian"
 HKCR,"MIME\Database\Rfc1766","040F",0x00000000,"is;Icelandic"
 HKCR,"MIME\Database\Rfc1766","0421",0x00000000,"in;Indonesian"
 HKCR,"MIME\Database\Rfc1766","0410",0x00000000,"it;Italian (Italy)"
index 9dd2a10..42eb952 100644 (file)
@@ -178,6 +178,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x
    "429", "160",\
   "2001", "165",\
   "3801", "165",\
+   "42b", "170",\
    "420", "185",\
    "439", "190",\
    "421", "205",\
index 7b6f6ee..ec4e745 100644 (file)
@@ -184,6 +184,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones","IndexMapping",0x
    "429", "160",\
   "2001", "165",\
   "3801", "165",\
+   "42b", "170",\
    "420", "185",\
    "439", "190",\
    "421", "205",\
index 6f09a5f..d1979a6 100644 (file)
@@ -277,7 +277,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Text",
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5120"
 
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout File",0x00000000,"kbdarmw.dll"
-HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Eastern"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Western"
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5121"
 
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout File",0x00000000,"kbdazel.dll"
index a9f14a9..497285a 100644 (file)
@@ -277,7 +277,7 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Text",
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5120"
 
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout File",0x00000000,"kbdarmw.dll"
-HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Eastern"
+HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Text",0x00000000,"Armenian Western"
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0001042b","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5121"
 
 HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\0000042c","Layout File",0x00000000,"kbdazel.dll"
index e41d99b..437ad1c 100644 (file)
@@ -262,8 +262,11 @@ FrLdrLoadNlsFiles(PCHAR szSystemRoot,
     rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
     if (rc != ERROR_SUCCESS) {
 
-        strcpy(szErrorOut, "ACP NLS Setting exists, but isn't readable");
-        return(FALSE);
+        //strcpy(szErrorOut, "ACP NLS Setting exists, but isn't readable");
+        //return(FALSE);
+
+        /* HACK */
+        wcscpy(szNameBuffer, L"c_1252.nls");
     }
 
     /* load ANSI codepage table */
@@ -288,8 +291,11 @@ FrLdrLoadNlsFiles(PCHAR szSystemRoot,
     rc = RegQueryValue(hKey, szIdBuffer, NULL, (PUCHAR)szNameBuffer, &BufferSize);
     if (rc != ERROR_SUCCESS) {
 
-        strcpy(szErrorOut, "OEMCP NLS setting exists, but isn't readable");
-        return(FALSE);
+        //strcpy(szErrorOut, "OEMCP NLS setting exists, but isn't readable");
+        //return(FALSE);
+
+        /* HACK */
+        wcscpy(szNameBuffer, L"c_437.nls");
     }
 
     /* load OEM codepage table */
index 134f9dc..269a9ef 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS Display Control Panel
- * FILE:            lib/cpl/desk/settings.c
+ * FILE:            dll/cpl/desk/settings.c
  * PURPOSE:         Settings property page
  *
  * PROGRAMMERS:     Trevor McCort (lycan359@gmail.com)
@@ -286,13 +286,14 @@ OnInitDialog(IN HWND hwndDlg)
        DISPLAY_DEVICE displayDevice;
        PGLOBAL_DATA pGlobalData;
 
-       pGlobalData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(GLOBAL_DATA));
+       pGlobalData = HeapAlloc(GetProcessHeap(), 0, sizeof(GLOBAL_DATA));
        if (pGlobalData == NULL)
                return;
 
        SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pGlobalData);
 
        /* Get video cards list */
+       pGlobalData->DisplayDeviceList = NULL;
        displayDevice.cb = (DWORD)sizeof(DISPLAY_DEVICE);
        while (EnumDisplayDevices(NULL, iDevNum, &displayDevice, 0x1))
        {
@@ -303,6 +304,7 @@ OnInitDialog(IN HWND hwndDlg)
                }
                iDevNum++;
        }
+
        if (Result == 0)
        {
                /* No adapter found */
@@ -311,6 +313,10 @@ OnInitDialog(IN HWND hwndDlg)
                EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_RESOLUTION_TEXT), FALSE);
                EnableWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_ADVANCED), FALSE);
                ShowWindow(GetDlgItem(hwndDlg, IDC_SETTINGS_SPECTRUM), SW_HIDE);
+
+               /* Do not initialize the color spectrum bitmaps */
+               memset(pGlobalData->hSpectrumBitmaps, 0, sizeof(pGlobalData->hSpectrumBitmaps));
+               return;
        }
        else if (Result == 1)
        {
@@ -325,10 +331,10 @@ OnInitDialog(IN HWND hwndDlg)
                monitors.Size.cy = pGlobalData->CurrentDisplayDevice->CurrentSettings->dmPelsHeight;
                monitors.Flags = 0;
                SendDlgItemMessage(hwndDlg,
-                                                  IDC_SETTINGS_MONSEL,
-                                                  MSLM_SETMONITORSINFO,
-                                                  1,
-                                                  (LPARAM)&monitors);
+                                  IDC_SETTINGS_MONSEL,
+                                  MSLM_SETMONITORSINFO,
+                                  1,
+                                  (LPARAM)&monitors);
        }
        else /* FIXME: incomplete! */
        {
@@ -352,10 +358,10 @@ OnInitDialog(IN HWND hwndDlg)
                        }
 
                        SendDlgItemMessage(hwndDlg,
-                                                          IDC_SETTINGS_MONSEL,
-                                                          MSLM_SETMONITORSINFO,
-                                                          Result,
-                                                          (LPARAM)pMonitors);
+                                          IDC_SETTINGS_MONSEL,
+                                          MSLM_SETMONITORSINFO,
+                                          Result,
+                                          (LPARAM)pMonitors);
 
                        HeapFree(GetProcessHeap(), 0, pMonitors);
                }
@@ -401,12 +407,17 @@ ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel, IN PGLOBAL_
                default: iBitmap = 2;
        }
 
-       SelectObject(hdcMem, pGlobalData->hSpectrumBitmaps[iBitmap]);
-       StretchBlt(hDC,
-                  client->left, client->top, client->right - client->left, client->bottom - client->top,
-                  hdcMem, 0, 0,
-                  pGlobalData->cxSource[iBitmap],
-                  pGlobalData->cySource[iBitmap], SRCCOPY);
+       if (SelectObject(hdcMem, pGlobalData->hSpectrumBitmaps[iBitmap]))
+       {
+               StretchBlt(hDC,
+                          client->left, client->top,
+                          client->right - client->left,
+                          client->bottom - client->top,
+                          hdcMem, 0, 0,
+                          pGlobalData->cxSource[iBitmap],
+                          pGlobalData->cySource[iBitmap], SRCCOPY);
+       }
+
        DeleteDC(hdcMem);
 }
 
@@ -631,7 +642,6 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
 
                        if (lpDrawItem->CtlID == IDC_SETTINGS_SPECTRUM)
                                ShowColorSpectrum(lpDrawItem->hDC, &lpDrawItem->rcItem, pGlobalData->CurrentDisplayDevice->CurrentSettings->dmBitsPerPel, pGlobalData);
-
                        break;
                }
                case WM_COMMAND:
@@ -834,13 +844,13 @@ SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lPar
                                Current = Next;
                        }
 
-                       HeapFree(GetProcessHeap(), 0, pGlobalData);
-
                        for (i = 0; i < NUM_SPECTRUM_BITMAPS; i++)
                        {
                                if (pGlobalData->hSpectrumBitmaps[i])
                                        DeleteObject(pGlobalData->hSpectrumBitmaps[i]);
                        }
+
+                       HeapFree(GetProcessHeap(), 0, pGlobalData);
                }
        }
        return FALSE;
index 2dcb4c4..46d6d98 100644 (file)
@@ -4,6 +4,7 @@
 #include "lang/bg-BG.rc"
 #include "lang/cs-CZ.rc"
 #include "lang/de-DE.rc"
+#include "lang/el-GR.rc"
 #include "lang/en-US.rc"
 #include "lang/es-ES.rc"
 #include "lang/fr-FR.rc"
index d34a0a9..c9cf8fa 100644 (file)
@@ -316,10 +316,64 @@ BOOL WINAPI IDirect3DDevice9Base_ShowCursor(LPDIRECT3DDEVICE9 iface, BOOL bShow)
     return TRUE;
 }
 
+/*++
+* @name IDirect3DDevice9::CreateAdditionalSwapChain
+* @implemented
+*
+* The function IDirect3DDevice9Base_CreateAdditionalSwapChain creates a swap chain object,
+* useful when rendering multiple views.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice()
+*
+* @param D3DPRESENT_PARAMETERS* pPresentationParameters
+* Pointer to a D3DPRESENT_PARAMETERS structure describing the parameters for the swap chain
+* to be created.
+*
+* @param IDirect3DSwapChain9** ppSwapChain
+* Pointer to a IDirect3DSwapChain9* to receive the swap chain object pointer.
+*
+* @return HRESULT
+* If the method successfully fills the ppSwapChain structure, the return value is D3D_OK.
+* If iSwapChain is out of range or ppSwapChain is a bad pointer, the return value
+* will be D3DERR_INVALIDCALL. Also D3DERR_OUTOFVIDEOMEMORY can be returned if allocation
+* of the new swap chain object failed.
+*
+*/
 HRESULT WINAPI IDirect3DDevice9Base_CreateAdditionalSwapChain(LPDIRECT3DDEVICE9 iface, D3DPRESENT_PARAMETERS* pPresentationParameters, IDirect3DSwapChain9** ppSwapChain)
 {
-    UNIMPLEMENTED
+    UINT iSwapChain;
+    IDirect3DSwapChain9* pSwapChain;
+    Direct3DSwapChain9_INT* pSwapChain_INT;
+    LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
+    LOCK_D3DDEVICE9();
+
+    if (NULL == ppSwapChain)
+    {
+        DPRINT1("Invalid ppSwapChain parameter specified");
+        UNLOCK_D3DDEVICE9();
+        return D3DERR_INVALIDCALL;
+    }
+
+    *ppSwapChain = NULL;
+    iSwapChain = IDirect3DDevice9_GetNumberOfSwapChains(iface) + 1;
+
+    pSwapChain_INT = CreateDirect3DSwapChain9(RT_EXTERNAL, This, iSwapChain);
+    if (NULL == pSwapChain_INT)
+    {
+        DPRINT1("Out of memory");
+        UNLOCK_D3DDEVICE9();
+        return D3DERR_OUTOFVIDEOMEMORY;
+    }
+
+    Direct3DSwapChain9_Init(pSwapChain_INT, pPresentationParameters);
 
+    This->pSwapChains[iSwapChain] = pSwapChain_INT;
+    pSwapChain = (IDirect3DSwapChain9*)&pSwapChain_INT->lpVtbl;
+    IDirect3DSwapChain9_AddRef(pSwapChain);
+    *ppSwapChain = pSwapChain;
+
+    UNLOCK_D3DDEVICE9();
     return D3D_OK;
 }
 
@@ -432,11 +486,50 @@ HRESULT WINAPI IDirect3DDevice9Base_GetBackBuffer(LPDIRECT3DDEVICE9 iface, UINT
     return D3D_OK;
 }
 
+/*++
+* @name IDirect3DDevice9::GetRasterStatus
+* @implemented
+*
+* The function IDirect3DDevice9Base_GetRasterStatus retrieves raster information
+* of the monitor for the specified swap chain.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
+*
+* @param UINT iSwapChain
+* Swap chain index to get object for.
+* The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
+*
+* @param D3DRASTER_STATUS* pRasterStatus
+* Pointer to a D3DRASTER_STATUS to receive the raster information
+*
+*/
 HRESULT WINAPI IDirect3DDevice9Base_GetRasterStatus(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DRASTER_STATUS* pRasterStatus)
 {
-    UNIMPLEMENTED
+    HRESULT hResult;
+    IDirect3DSwapChain9* pSwapChain = NULL;
+    LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
+    LOCK_D3DDEVICE9();
 
-    return D3D_OK;
+    IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
+    if (NULL == pSwapChain)
+    {
+        DPRINT1("Invalid iSwapChain parameter specified");
+        UNLOCK_D3DDEVICE9();
+        return D3DERR_INVALIDCALL;
+    }
+
+    if (NULL == pRasterStatus)
+    {
+        DPRINT1("Invalid pRasterStatus parameter specified");
+        UNLOCK_D3DDEVICE9();
+        return D3DERR_INVALIDCALL;
+    }
+
+    hResult = IDirect3DSwapChain9_GetRasterStatus(pSwapChain, pRasterStatus);
+
+    UNLOCK_D3DDEVICE9();
+    return hResult;
 }
 
 HRESULT WINAPI IDirect3DDevice9Base_SetDialogBoxMode(LPDIRECT3DDEVICE9 iface, BOOL bEnableDialogs)
@@ -451,9 +544,50 @@ VOID WINAPI IDirect3DDevice9Base_SetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwa
     UNIMPLEMENTED
 }
 
+/*++
+* @name IDirect3DDevice9::GetGammaRamp
+* @implemented
+*
+* The function IDirect3DDevice9Base_GetGammaRamp retrieves the gamma correction ramp values
+* for the specified swap chain.
+*
+* @param LPDIRECT3D iface
+* Pointer to the IDirect3DDevice9 object returned from IDirect3D9::CreateDevice().
+*
+* @param UINT iSwapChain
+* Swap chain index to get object for.
+* The maximum value for this is the value returned by IDirect3DDevice9::GetNumberOfSwapChains() - 1.
+*
+* @param D3DGAMMARAMP* pRamp
+* Pointer to a D3DGAMMARAMP to receive the gamma correction ramp values.
+*
+*/
 VOID WINAPI IDirect3DDevice9Base_GetGammaRamp(LPDIRECT3DDEVICE9 iface, UINT iSwapChain, D3DGAMMARAMP* pRamp)
 {
-    UNIMPLEMENTED
+    IDirect3DSwapChain9* pSwapChain = NULL;
+    Direct3DSwapChain9_INT* pSwapChain_INT;
+    LPDIRECT3DDEVICE9_INT This = IDirect3DDevice9ToImpl(iface);
+    LOCK_D3DDEVICE9();
+
+    IDirect3DDevice9Base_GetSwapChain(iface, iSwapChain, &pSwapChain);
+    if (NULL == pSwapChain)
+    {
+        DPRINT1("Invalid iSwapChain parameter specified");
+        UNLOCK_D3DDEVICE9();
+        return;
+    }
+
+    if (NULL == pRamp)
+    {
+        DPRINT1("Invalid pRamp parameter specified");
+        UNLOCK_D3DDEVICE9();
+        return;
+    }
+
+    pSwapChain_INT = IDirect3DSwapChain9ToImpl(pSwapChain);
+    Direct3DSwapChain9_GetGammaRamp(pSwapChain_INT, pRamp);
+
+    UNLOCK_D3DDEVICE9();
 }
 
 /*++
index d64ec33..dc3acfc 100644 (file)
@@ -18,7 +18,7 @@
 #define UNLOCK_D3DDEVICE9() D3D9BaseObject_UnlockDevice(&This->BaseObject)
 
 /* Convert a IDirect3DSwapChain9 pointer safely to the internal implementation struct */
-static LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface)
+LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface)
 {
     if (NULL == iface)
         return NULL;
@@ -244,3 +244,8 @@ HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRES
     // TODO: Do all the dirty work...
     return D3D_OK;
 }
+
+VOID Direct3DSwapChain9_GetGammaRamp(Direct3DSwapChain9_INT* pThisSwapChain, D3DGAMMARAMP* pRamp)
+{
+    memcpy(pRamp, &pThisSwapChain->GammaRamp, sizeof(D3DGAMMARAMP));
+}
index c6e7609..5354647 100644 (file)
@@ -68,14 +68,15 @@ typedef struct _Direct3DSwapChain9_INT
 /* 0x01f4 */    D3DSWAPEFFECT SwapEffect;
 /* 0x01f8 */    DWORD dwUnknown01f8;
 /* 0x01fc */    DWORD dwUnknown01fc;
-/* 0x0200 */    DDGAMMARAMP GammaRamp;
+/* 0x0200 */    D3DGAMMARAMP GammaRamp;
 } Direct3DSwapChain9_INT, FAR* LPDIRECT3DSWAPCHAIN9_INT;
 
-
+LPDIRECT3DSWAPCHAIN9_INT IDirect3DSwapChain9ToImpl(LPDIRECT3DSWAPCHAIN9 iface);
 Direct3DSwapChain9_INT* CreateDirect3DSwapChain9(enum REF_TYPE RefType, struct _Direct3DDevice9_INT* pBaseDevice, DWORD ChainIndex);
 
 VOID Direct3DSwapChain9_SetDisplayMode(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters);
 HRESULT Direct3DSwapChain9_Init(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters);
 HRESULT Direct3DSwapChain9_Reset(Direct3DSwapChain9_INT* pThisSwapChain, D3DPRESENT_PARAMETERS* pPresentationParameters);
+VOID Direct3DSwapChain9_GetGammaRamp(Direct3DSwapChain9_INT* pThisSwapChain, D3DGAMMARAMP* pRamp);
 
 #endif // _D3D9_SWAPCHAIN_H_
index 924f0e7..fd4d325 100644 (file)
@@ -40,7 +40,7 @@ typedef struct _TLS_DATA
    PVOID StartAddressOfRawData;
    DWORD TlsDataSize;
    DWORD TlsZeroSize;
-   PIMAGE_TLS_CALLBACK TlsAddressOfCallBacks;
+   PIMAGE_TLS_CALLBACK *TlsAddressOfCallBacks;
    PLDR_DATA_TABLE_ENTRY Module;
 } TLS_DATA, *PTLS_DATA;
 
@@ -151,7 +151,7 @@ static __inline VOID LdrpAcquireTlsSlot(PLDR_DATA_TABLE_ENTRY Module, ULONG Size
 
 static __inline VOID LdrpTlsCallback(PLDR_DATA_TABLE_ENTRY Module, ULONG dwReason)
 {
-   PIMAGE_TLS_CALLBACK TlsCallback;
+   PIMAGE_TLS_CALLBACK *TlsCallback;
    if (Module->TlsIndex != 0xFFFF && Module->LoadCount == 0xFFFF)
      {
        TlsCallback = LdrpTlsArray[Module->TlsIndex].TlsAddressOfCallBacks;
@@ -160,9 +160,9 @@ static __inline VOID LdrpTlsCallback(PLDR_DATA_TABLE_ENTRY Module, ULONG dwReaso
            while (*TlsCallback)
              {
                TRACE_LDR("%wZ - Calling tls callback at %x\n",
-                         &Module->BaseDllName, TlsCallback);
-               TlsCallback(Module->DllBase, dwReason, NULL);
-               TlsCallback = (PIMAGE_TLS_CALLBACK)((ULONG_PTR)TlsCallback + sizeof(PVOID));
+                         &Module->BaseDllName, *TlsCallback);
+               (*TlsCallback)(Module->DllBase, dwReason, NULL);
+               TlsCallback++;
              }
          }
      }
@@ -225,6 +225,7 @@ LdrpInitializeTlsForThread(VOID)
              }
          }
      }
+
    DPRINT("LdrpInitializeTlsForThread() done\n");
    return STATUS_SUCCESS;
 }
@@ -271,7 +272,7 @@ LdrpInitializeTlsForProccess(VOID)
                TlsData->TlsDataSize = TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData;
                TlsData->TlsZeroSize = TlsDirectory->SizeOfZeroFill;
                if (TlsDirectory->AddressOfCallBacks)
-                 TlsData->TlsAddressOfCallBacks = *(PIMAGE_TLS_CALLBACK*)TlsDirectory->AddressOfCallBacks;
+                 TlsData->TlsAddressOfCallBacks = (PIMAGE_TLS_CALLBACK *)TlsDirectory->AddressOfCallBacks;
                else
                  TlsData->TlsAddressOfCallBacks = NULL;
                TlsData->Module = Module;
@@ -281,7 +282,7 @@ LdrpInitializeTlsForProccess(VOID)
                DbgPrint("EndAddressOfRawData:   %x\n", TlsDirectory->EndAddressOfRawData);
                DbgPrint("SizeOfRawData:         %d\n", TlsDirectory->EndAddressOfRawData - TlsDirectory->StartAddressOfRawData);
                DbgPrint("AddressOfIndex:        %x\n", TlsDirectory->AddressOfIndex);
-               DbgPrint("AddressOfCallBacks:    %x (%x)\n", TlsDirectory->AddressOfCallBacks, *TlsDirectory->AddressOfCallBacks);
+               DbgPrint("AddressOfCallBacks:    %x\n", TlsDirectory->AddressOfCallBacks);
                DbgPrint("SizeOfZeroFill:        %d\n", TlsDirectory->SizeOfZeroFill);
                DbgPrint("Characteristics:       %x\n", TlsDirectory->Characteristics);
 #endif
@@ -294,6 +295,7 @@ LdrpInitializeTlsForProccess(VOID)
            Entry = Entry->Flink;
         }
     }
+
   DPRINT("LdrpInitializeTlsForProccess() done\n");
   return STATUS_SUCCESS;
 }
@@ -614,7 +616,6 @@ LdrpMapDllImageFile(IN PWSTR SearchPath OPTIONAL,
                           NULL) == 0)
     return STATUS_DLL_NOT_FOUND;
 
-
   if (!RtlDosPathNameToNtPathName_U (DosName,
                                      &FullNtFileName,
                                      NULL,
@@ -1697,14 +1698,15 @@ LdrFixupImports(IN PWSTR SearchPath OPTIONAL,
        TlsSize = TlsDirectory->EndAddressOfRawData
                    - TlsDirectory->StartAddressOfRawData
                    + TlsDirectory->SizeOfZeroFill;
-       if (TlsSize > 0 &&
-           NtCurrentPeb()->Ldr->Initialized)
+
+       if (TlsSize > 0 && NtCurrentPeb()->Ldr->Initialized)
          {
-           TRACE_LDR("Trying to load dynamicly %wZ which contains a tls directory\n",
+           TRACE_LDR("Trying to dynamically load %wZ which contains a TLS directory\n",
                      &Module->BaseDllName);
-           return STATUS_UNSUCCESSFUL;
+           TlsDirectory = NULL;
          }
      }
+
    /*
     * Process each import module.
     */
@@ -1767,7 +1769,7 @@ LdrFixupImports(IN PWSTR SearchPath OPTIONAL,
                else
                  {
                    TRACE_LDR("%wZ has correct binding to %wZ\n",
-                           &Module->BaseDllName, &ImportedModule->BaseDllName);
+                             &Module->BaseDllName, &ImportedModule->BaseDllName);
                  }
                if (BoundImportDescriptorCurrent->NumberOfModuleForwarderRefs)
                  {
index b37e9f4..c2e5583 100644 (file)
@@ -505,11 +505,6 @@ GetDeviceCaps(HDC hDC,
   }
   else
   {
-     // HAX!!!!
-     // Due to winlogon process/thread mapping issues we have this hax!
-     // FIXME!!! This is a victim of the Win32k Initialization BUG!!!!!
-     return NtGdiGetDeviceCaps(hDC,i);
-
      if (!GdiGetHandleUserData((HGDIOBJ) hDC, GDI_OBJECT_TYPE_DC, (PVOID) &Dc_Attr))
         return 0;
      if (!(Dc_Attr->ulDirty_ & DC_PRIMARY_DISPLAY) )
index 9ed1850..3ae1ee5 100644 (file)
@@ -108,7 +108,7 @@ static LPWSTR FONT_mbtowc(HDC hdc, LPCSTR str, INT count, INT *plenW, UINT *pCP)
     lenW = MultiByteToWideChar(cp, 0, str, count, NULL, 0);
     strW = HeapAlloc(GetProcessHeap(), 0, lenW*sizeof(WCHAR));
     MultiByteToWideChar(cp, 0, str, count, strW, lenW);
-    DPRINT1("mapped %s -> %S\n", str, strW);
+    DPRINT("mapped %s -> %S\n", str, strW);
     if(plenW) *plenW = lenW;
     if(pCP) *pCP = cp;
     return strW;
index 0d66080..fb99ed8 100644 (file)
@@ -329,6 +329,7 @@ LogFontA2W(LPLOGFONTW pW, CONST LOGFONTA *pA)
   COPYN(lfQuality);
   COPYN(lfPitchAndFamily);
   COPYS(lfFaceName,LF_FACESIZE);
+  pW->lfFaceName[LF_FACESIZE - 1] = '\0';
 
 #undef COPYN
 #undef COPYS
@@ -355,6 +356,7 @@ LogFontW2A(LPLOGFONTA pA, CONST LOGFONTW *pW)
   COPYN(lfQuality);
   COPYN(lfPitchAndFamily);
   COPYS(lfFaceName,LF_FACESIZE);
+  pA->lfFaceName[LF_FACESIZE - 1] = '\0';
 
 #undef COPYN
 #undef COPYS
index 220409b..22fd393 100644 (file)
@@ -195,6 +195,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
 
     (*font)->lfw.lfHeight = -textmet.tmHeight;
     (*font)->lfw.lfWeight = textmet.tmWeight;
+    (*font)->lfw.lfCharSet = textmet.tmCharSet;
 
     (*font)->height = 1; /* FIXME: need NEWTEXTMETRIC.ntmSizeEM here */
     (*font)->line_spacing = textmet.tmAscent + textmet.tmDescent + textmet.tmExternalLeading;
index b3d2103..d380d74 100644 (file)
@@ -10,8 +10,8 @@
 @ stdcall GdipAddPathClosedCurveI(ptr ptr long)
 @ stdcall GdipAddPathCurve2(ptr ptr long long)
 @ stdcall GdipAddPathCurve2I(ptr ptr long long)
-@ stub GdipAddPathCurve3
-@ stub GdipAddPathCurve3I
+@ stdcall GdipAddPathCurve3(ptr ptr long long long long)
+@ stdcall GdipAddPathCurve3I(ptr ptr long long long long)
 @ stdcall GdipAddPathCurve(ptr ptr long)
 @ stdcall GdipAddPathCurveI(ptr ptr long)
 @ stdcall GdipAddPathEllipse(ptr long long long long)
 @ stdcall GdipGetMetafileHeaderFromMetafile(ptr ptr)
 @ stub GdipGetMetafileHeaderFromStream
 @ stub GdipGetMetafileHeaderFromWmf
-@ stub GdipGetNearestColor
+@ stdcall GdipGetNearestColor(ptr ptr)
 @ stdcall GdipGetPageScale(ptr ptr)
 @ stdcall GdipGetPageUnit(ptr ptr)
 @ stdcall GdipGetPathData(ptr ptr)
index 786af95..35db94f 100644 (file)
@@ -2456,6 +2456,19 @@ GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics *graphics,
     return Ok;
 }
 
+GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics *graphics, ARGB* argb)
+{
+    if(!graphics || !argb)
+        return InvalidParameter;
+
+    if(graphics->busy)
+        return ObjectBusy;
+
+    FIXME("(%p, %p): stub\n", graphics, argb);
+
+    return NotImplemented;
+}
+
 GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics *graphics, REAL *scale)
 {
     TRACE("(%p, %p)\n", graphics, scale);
index e8f8fb9..874550f 100644 (file)
@@ -524,6 +524,28 @@ GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath *path, GDIPCONST GpPoint *points,
     return stat;
 }
 
+GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath *path, GDIPCONST GpPointF *points,
+    INT count, INT offset, INT nseg, REAL tension)
+{
+    TRACE("(%p, %p, %d, %d, %d, %.2f)\n", path, points, count, offset, nseg, tension);
+
+    if(!path || !points || offset + 1 >= count || count - offset < nseg + 1)
+        return InvalidParameter;
+
+    return GdipAddPathCurve2(path, &points[offset], nseg + 1, tension);
+}
+
+GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath *path, GDIPCONST GpPoint *points,
+    INT count, INT offset, INT nseg, REAL tension)
+{
+    TRACE("(%p, %p, %d, %d, %d, %.2f)\n", path, points, count, offset, nseg, tension);
+
+    if(!path || !points || offset + 1 >= count || count - offset < nseg + 1)
+        return InvalidParameter;
+
+    return GdipAddPathCurve2I(path, &points[offset], nseg + 1, tension);
+}
+
 GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath *path, REAL x, REAL y, REAL width,
     REAL height)
 {
index f41185a..b2d6dab 100644 (file)
@@ -412,7 +412,7 @@ GpStatus WINGDIPAPI GdipSetPenColor(GpPen *pen, ARGB argb)
 GpStatus WINGDIPAPI GdipSetPenCompoundArray(GpPen *pen, GDIPCONST REAL *dash,
     INT count)
 {
-    FIXME("(%p, %p, %i): stub", pen, dash, count);
+    FIXME("(%p, %p, %i): stub\n", pen, dash, count);
 
     if (!pen || !dash || count < 2 || count%2 == 1)
         return InvalidParameter;
index d28292c..4d694f4 100644 (file)
@@ -360,6 +360,7 @@ GpStatus WINGDIPAPI GdipCombineRegionRegion(GpRegion *region1,
 
         delete_element(&region1->node);
         memcpy(region1, reg2copy, sizeof(GpRegion));
+        GdipFree(reg2copy);
         return Ok;
     }
 
index a245d04..83a1fc0 100644 (file)
@@ -99,9 +99,10 @@ GetQueuedCompletionStatus(
 {
    NTSTATUS errCode;
    IO_STATUS_BLOCK IoStatus;
+   ULONG_PTR CompletionKey;
    LARGE_INTEGER Interval;
 
-   if (!lpNumberOfBytesTransferred||!lpCompletionKey||!lpOverlapped)
+   if (!lpNumberOfBytesTransferred || !lpCompletionKey || !lpOverlapped)
    {
       SetLastError(ERROR_INVALID_PARAMETER);
       return FALSE;
@@ -113,18 +114,19 @@ GetQueuedCompletionStatus(
    }
 
    errCode = NtRemoveIoCompletion(CompletionHandle,
-                                  (PVOID*)lpCompletionKey,
-                                  (PVOID*)lpNumberOfBytesTransferred,
+                                  (PVOID*)&CompletionKey,
+                                  (PVOID*)lpOverlapped,
                                   &IoStatus,
                                   dwMilliseconds == INFINITE ? NULL : &Interval);
 
-   if (!NT_SUCCESS(errCode)) {
+   if (!NT_SUCCESS(errCode) || errCode == STATUS_TIMEOUT) {
       *lpOverlapped = NULL;
       SetLastErrorByStatus(errCode);
       return FALSE;
    }
 
-   *lpOverlapped = (LPOVERLAPPED)IoStatus.Information;
+   *lpCompletionKey = CompletionKey;
+   *lpNumberOfBytesTransferred = IoStatus.Information;
 
    if (!NT_SUCCESS(IoStatus.Status)){
       //failed io operation
@@ -133,7 +135,6 @@ GetQueuedCompletionStatus(
    }
 
    return TRUE;
-
 }
 
 
@@ -152,10 +153,10 @@ PostQueuedCompletionStatus(
    NTSTATUS errCode;
 
    errCode = NtSetIoCompletion(CompletionHandle,
-                               (PVOID)dwCompletionKey,
-                               (PVOID)lpOverlapped,//CompletionValue
-                               STATUS_SUCCESS,                         //IoStatusBlock->Status
-                               dwNumberOfBytesTransferred);     //IoStatusBlock->Information
+                               (PVOID)dwCompletionKey,      // KeyContext
+                               (PVOID)lpOverlapped,         // ApcContext
+                               STATUS_SUCCESS,              // IoStatusBlock->Status
+                               dwNumberOfBytesTransferred); // IoStatusBlock->Information
 
    if ( !NT_SUCCESS(errCode) )
    {
index 503b75e..7171c89 100644 (file)
@@ -19,24 +19,19 @@ WINE_DEFAULT_DEBUG_CHANNEL(kernel32file);
  */
 long
 WINAPI
-_hread(
-       HFILE   hFile,
-       LPVOID  lpBuffer,
-       long    lBytes
-       )
+_hread(HFILE hFile, LPVOID lpBuffer, long lBytes)
 {
-       DWORD   NumberOfBytesRead;
-
-       if ( !ReadFile(
-               (HANDLE)(ULONG_PTR) hFile,
-               (LPVOID) lpBuffer,
-               (DWORD) lBytes,
-               & NumberOfBytesRead,
-               NULL) )
-       {
-               return HFILE_ERROR;
-       }
-       return NumberOfBytesRead;
+    DWORD NumberOfBytesRead;
+
+    if (!ReadFile(LongToHandle(hFile),
+                  lpBuffer,
+                  (DWORD) lBytes,
+                  &NumberOfBytesRead,
+                  NULL))
+    {
+        return HFILE_ERROR;
+    }
+    return NumberOfBytesRead;
 }
 
 
@@ -45,32 +40,27 @@ _hread(
  */
 long
 WINAPI
-_hwrite (
-       HFILE   hFile,
-       LPCSTR  lpBuffer,
-       long    lBytes
-       )
+_hwrite(HFILE hFile, LPCSTR lpBuffer, long lBytes)
 {
-       DWORD   NumberOfBytesWritten;
-
-       if (lBytes == 0)
-       {
-               if ( !SetEndOfFile((HANDLE) hFile ) )
-               {
-                       return HFILE_ERROR;
-               }
-               return 0;
-       }
-       if ( !WriteFile(
-               (HANDLE) hFile,
-               (LPVOID) lpBuffer,
-               (DWORD) lBytes,
-               & NumberOfBytesWritten,
-               NULL) )
-       {
-               return HFILE_ERROR;
-       }
-       return NumberOfBytesWritten;
+    DWORD NumberOfBytesWritten;
+
+    if (lBytes == 0)
+    {
+        if (!SetEndOfFile((HANDLE) hFile))
+        {
+            return HFILE_ERROR;
+        }
+        return 0;
+    }
+    if (!WriteFile(LongToHandle(hFile),
+                   (LPVOID) lpBuffer,
+                   (DWORD) lBytes,
+                   &NumberOfBytesWritten,
+                   NULL))
+    {
+        return HFILE_ERROR;
+    }
+    return NumberOfBytesWritten;
 }
 
 
@@ -79,39 +69,44 @@ _hwrite (
  */
 HFILE
 WINAPI
-_lopen (
-       LPCSTR  lpPathName,
-       int     iReadWrite
-       )
+_lopen(LPCSTR lpPathName, int iReadWrite)
 {
-       DWORD dwAccessMask = 0;
-       DWORD dwShareMode = 0;
-
-       if ( (iReadWrite & OF_READWRITE ) == OF_READWRITE )
-               dwAccessMask = GENERIC_READ | GENERIC_WRITE;
-       else if ( (iReadWrite & OF_READ ) == OF_READ )
-               dwAccessMask = GENERIC_READ;
-       else if ( (iReadWrite & OF_WRITE ) == OF_WRITE )
-               dwAccessMask = GENERIC_WRITE;
-
-       if ((iReadWrite & OF_SHARE_DENY_READ) == OF_SHARE_DENY_READ)
-               dwShareMode = FILE_SHARE_WRITE;
-       else if ((iReadWrite & OF_SHARE_DENY_WRITE) == OF_SHARE_DENY_WRITE )
-               dwShareMode = FILE_SHARE_READ;
-       else if ((iReadWrite & OF_SHARE_EXCLUSIVE) == OF_SHARE_EXCLUSIVE)
-               dwShareMode = 0;
-       else
-               /* OF_SHARE_DENY_NONE, OF_SHARE_COMPAT and everything else */
-                dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
-
-       return (HFILE) CreateFileA(
-                       lpPathName,
-                       dwAccessMask,
-                       dwShareMode,
-                       NULL,
-                       OPEN_EXISTING,
-                       FILE_ATTRIBUTE_NORMAL,
-                       NULL);
+    DWORD dwAccess, dwSharing, dwCreation;
+
+    if (iReadWrite & OF_CREATE)
+    {
+        dwCreation = CREATE_ALWAYS;
+        dwAccess = GENERIC_READ | GENERIC_WRITE;
+    }
+    else
+    {
+        dwCreation = OPEN_EXISTING;
+        switch(iReadWrite & 0x03)
+        {
+            case OF_READ:      dwAccess = GENERIC_READ; break;
+            case OF_WRITE:     dwAccess = GENERIC_WRITE; break;
+            case OF_READWRITE: dwAccess = GENERIC_READ | GENERIC_WRITE; break;
+            default:           dwAccess = 0; break;
+        }
+    }
+
+    switch(iReadWrite & 0x70)
+    {
+        case OF_SHARE_EXCLUSIVE:  dwSharing = 0; break;
+        case OF_SHARE_DENY_WRITE: dwSharing = FILE_SHARE_READ; break;
+        case OF_SHARE_DENY_READ:  dwSharing = FILE_SHARE_WRITE; break;
+        case OF_SHARE_DENY_NONE:
+        case OF_SHARE_COMPAT:
+        default:                  dwSharing = FILE_SHARE_READ | FILE_SHARE_WRITE; break;
+    }
+
+    return (HFILE) CreateFileA(lpPathName,
+                               dwAccess,
+                               dwSharing,
+                               NULL,
+                               dwCreation,
+                               FILE_ATTRIBUTE_NORMAL,
+                               NULL);
 }
 
 
@@ -120,20 +115,20 @@ _lopen (
  */
 HFILE
 WINAPI
-_lcreat (
-       LPCSTR  lpPathName,
-       int     iAttribute
-       )
+_lcreat(LPCSTR lpPathName, int iAttribute)
 {
-       iAttribute &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM;
-       return (HFILE) CreateFileA(
-                       lpPathName,
-                       GENERIC_READ | GENERIC_WRITE,
-                       (FILE_SHARE_READ | FILE_SHARE_WRITE),
-                       NULL,
-                       CREATE_ALWAYS,
-                       iAttribute,
-                       NULL);
+    HANDLE hFile;
+
+    iAttribute &= FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM;
+    hFile = CreateFileA(lpPathName,
+                        GENERIC_READ | GENERIC_WRITE,
+                        (FILE_SHARE_READ | FILE_SHARE_WRITE),
+                        NULL,
+                        CREATE_ALWAYS,
+                        iAttribute,
+                        NULL);
+
+    return HandleToLong(hFile);
 }
 
 
@@ -142,15 +137,9 @@ _lcreat (
  */
 int
 WINAPI
-_lclose (
-       HFILE   hFile
-       )
+_lclose(HFILE hFile)
 {
-       if (CloseHandle ((HANDLE)hFile))
-       {
-               return 0;
-       }
-       return HFILE_ERROR;
+    return CloseHandle(LongToHandle(hFile)) ? 0 : HFILE_ERROR;
 }
 
 
@@ -159,17 +148,12 @@ _lclose (
  */
 LONG
 WINAPI
-_llseek(
-       HFILE   hFile,
-       LONG    lOffset,
-       int     iOrigin
-       )
+_llseek(HFILE hFile, LONG lOffset, int iOrigin)
 {
-       return SetFilePointer (
-                       (HANDLE) hFile,
-                       lOffset,
-                       NULL,
-                       (DWORD) iOrigin);
+    return SetFilePointer(LongToHandle(hFile),
+                          lOffset,
+                          NULL,
+                          (DWORD) iOrigin);
 }
 
 /* EOF */
index e4f4fe3..287d831 100644 (file)
@@ -235,8 +235,9 @@ MoveFileWithProgressW (
        DWORD                   dwFlags
        )
 {
-       HANDLE hFile = NULL;
+       HANDLE hFile = NULL, hNewFile = NULL;
        IO_STATUS_BLOCK IoStatusBlock;
+    OBJECT_ATTRIBUTES ObjectAttributes;
        PFILE_RENAME_INFORMATION FileRename;
        NTSTATUS errCode;
        BOOL Result;
@@ -248,6 +249,48 @@ MoveFileWithProgressW (
        if (dwFlags & MOVEFILE_DELAY_UNTIL_REBOOT)
                return add_boot_rename_entry( lpExistingFileName, lpNewFileName, dwFlags );
 
+    if (dwFlags & MOVEFILE_WRITE_THROUGH)
+        FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n");
+
+    if (!lpNewFileName)
+        return DeleteFileW(lpExistingFileName);
+
+    /* validate & translate the filename */
+    if (!RtlDosPathNameToNtPathName_U (lpNewFileName,
+                                          &DstPathU,
+                                          NULL,
+                                          NULL))
+    {
+        WARN("Invalid destination path\n");
+        SetLastError(ERROR_PATH_NOT_FOUND);
+        return FALSE;
+    }
+
+    InitializeObjectAttributes(&ObjectAttributes,
+                               &DstPathU,
+                               OBJ_CASE_INSENSITIVE,
+                               NULL,
+                               NULL);
+
+    errCode = NtOpenFile(&hNewFile, GENERIC_READ | GENERIC_WRITE, &ObjectAttributes, &IoStatusBlock, 0,
+                         FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
+
+       if (NT_SUCCESS(errCode)) /* Destination exists */
+       {
+        NtClose(hNewFile);
+
+        if (!(dwFlags & MOVEFILE_REPLACE_EXISTING))
+        {
+                       SetLastError(ERROR_ALREADY_EXISTS);
+                       return FALSE;
+               }
+               else if (GetFileAttributesW(lpNewFileName) & FILE_ATTRIBUTE_DIRECTORY)
+               {
+                       SetLastError(ERROR_ACCESS_DENIED);
+                       return FALSE;
+               }
+       }
+
        hFile = CreateFileW (lpExistingFileName,
                             GENERIC_ALL,
                             FILE_SHARE_WRITE|FILE_SHARE_READ,
@@ -258,22 +301,9 @@ MoveFileWithProgressW (
 
        if (hFile == INVALID_HANDLE_VALUE)
        {
-          return FALSE;
+           return FALSE;
        }
 
-       
-        /* validate & translate the filename */
-        if (!RtlDosPathNameToNtPathName_U (lpNewFileName,
-                                          &DstPathU,
-                                          NULL,
-                                          NULL))
-        {
-           WARN("Invalid destination path\n");
-          CloseHandle(hFile);
-           SetLastError(ERROR_PATH_NOT_FOUND);
-           return FALSE;
-        }
-
        FileRename = RtlAllocateHeap(
                RtlGetProcessHeap(),
                HEAP_ZERO_MEMORY,
index 9673065..f3d2697 100644 (file)
 //#include "nls/cym.nls"   /* 0x0492  LANG_WELSH, SUBLANG_NEUTRAL */
 
 //#include "nls/brf.nls"   /* 0x0493  LANG_BRETON, SUBLANG_NEUTRAL */
+
+#include "lang/de-DE.rc"
+#include "lang/en-US.rc"
+#include "lang/ru-RU.rc"
index f719af5..e801dc2 100644 (file)
@@ -405,7 +405,7 @@ InternalGetAtomName(BOOLEAN Local,
     if (!NT_SUCCESS(Status))
     {
         /* Fail */
-        DPRINT1("Failed: %lx\n", Status);
+        DPRINT("Failed: %lx\n", Status);
         SetLastErrorByStatus(Status);
     }
 
index ba74d68..095dc6a 100644 (file)
@@ -1284,6 +1284,53 @@ GetCPInfo(UINT CodePage,
     return TRUE;
 }
 
+static BOOL
+GetLocalisedText(DWORD dwResId, WCHAR *lpszDest)
+{
+    HRSRC hrsrc;
+    LCID lcid;
+    LANGID langId;
+    DWORD dwId;
+
+    if (dwResId == 37)
+        dwId = dwResId * 100;
+    else
+        dwId = dwResId;
+
+    lcid = GetUserDefaultLCID();
+    lcid = ConvertDefaultLocale(lcid);
+
+    langId = LANGIDFROMLCID(lcid);
+
+    if (PRIMARYLANGID(langId) == LANG_NEUTRAL)
+        langId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
+
+    hrsrc = FindResourceExW(hCurrentModule,
+                            (LPWSTR)RT_STRING,
+                            MAKEINTRESOURCEW((dwId >> 4) + 1),
+                            langId);
+    if (hrsrc)
+    {
+        HGLOBAL hmem = LoadResource(hCurrentModule, hrsrc);
+
+        if (hmem)
+        {
+            const WCHAR *p;
+            unsigned int i;
+
+            p = LockResource(hmem);
+            for (i = 0; i < (dwId & 0x0f); i++) p += *p + 1;
+
+            memcpy(lpszDest, p + 1, *p * sizeof(WCHAR));
+            lpszDest[*p] = '\0';
+
+            return TRUE;
+        }
+    }
+
+    DPRINT1("Could not get codepage name. dwResId = %ld\n", dwResId);
+    return FALSE;
+}
 
 /*
  * @implemented
@@ -1301,21 +1348,17 @@ GetCPInfoExW(UINT CodePage,
     {
         case CP_UTF7:
         {
-            static const WCHAR utf7[] = L"Unicode (UTF-7)\0";
-
             lpCPInfoEx->CodePage = CP_UTF7;
             lpCPInfoEx->UnicodeDefaultChar = 0x3f;
-            wcscpy(lpCPInfoEx->CodePageName, utf7);
+            return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
         }
         break;
 
         case CP_UTF8:
         {
-            static const WCHAR utf8[] = L"Unicode (UTF-8)\0";
-            
             lpCPInfoEx->CodePage = CP_UTF8;
             lpCPInfoEx->UnicodeDefaultChar = 0x3f;
-            wcscpy(lpCPInfoEx->CodePageName, utf8);
+            return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
         }
 
         default:
@@ -1332,14 +1375,10 @@ GetCPInfoExW(UINT CodePage,
 
             lpCPInfoEx->CodePage = CodePageEntry->CodePageTable.CodePage;
             lpCPInfoEx->UnicodeDefaultChar = CodePageEntry->CodePageTable.UniDefaultChar;
-            /* FIXME: We need to get a codepage name */
-            DPRINT1("FIXME: We need to get a codepage name!\n");
-            wcscpy(lpCPInfoEx->CodePageName, L"Unknown\0");
+            return GetLocalisedText((DWORD)CodePage, lpCPInfoEx->CodePageName);
         }
         break;
     }
-
-    return TRUE;
 }
 
 
index cc069c4..0ac6e2a 100644 (file)
@@ -63,3 +63,5 @@ User32CreateWindowEx(DWORD dwExStyle,
                HINSTANCE hInstance,
                LPVOID lpParam,
                BOOL Unicode);
+
+HWND* WIN_ListChildren (HWND hWndparent);
index 6621a48..1ba7462 100644 (file)
@@ -1574,8 +1574,15 @@ User32DefWindowProc(HWND hWnd,
 
         case WM_INPUTLANGCHANGE:
         {
-            //FIXME: What to do?
-            return TRUE;
+            int count = 0;
+            HWND *win_array = WIN_ListChildren( hWnd );
+
+            if (!win_array)
+                break;
+            while (win_array[count])
+                SendMessageW( win_array[count++], WM_INPUTLANGCHANGE, wParam, lParam);
+            HeapFree(GetProcessHeap(),0,win_array);
+            break;
         }
 
         case WM_ENDSESSION:
index 4d0aac5..78e1da8 100644 (file)
@@ -658,6 +658,9 @@ LookupIconIdFromDirectoryEx(PBYTE xdir,
 {
     GRPCURSORICONDIR *dir = (GRPCURSORICONDIR*)xdir;
     UINT retVal = 0;
+
+    GetConnected();
+
     if(dir && !dir->idReserved && (IMAGE_ICON == dir->idType || IMAGE_CURSOR == dir->idType))
     {
         GRPCURSORICONDIRENTRY *entry = NULL;
@@ -667,11 +670,13 @@ LookupIconIdFromDirectoryEx(PBYTE xdir,
         {
             ColorBits = 1;
         }
+        else if (g_psi->SystemMetrics[SM_SAMEDISPLAYFORMAT] || (cFlag & LR_VGACOLOR) )
+        {
+            ColorBits = 4;
+        }
         else
         {
-            HDC hdc = CreateICW(NULL, NULL, NULL, NULL);
-            ColorBits = GetDeviceCaps(hdc, BITSPIXEL);
-            DeleteDC(hdc);
+            ColorBits = 0;
         }
 
         if(bIcon)
index d15f287..94fd02d 100644 (file)
@@ -153,6 +153,8 @@ EnableWindow(HWND hWnd,
 SHORT WINAPI
 GetAsyncKeyState(int vKey)
 {
+ if (vKey < 0 || vKey > 256)
+    return 0;
  return (SHORT) NtUserGetAsyncKeyState((DWORD) vKey);
 }
 
index 9c8deb5..41f6ae9 100644 (file)
@@ -126,7 +126,6 @@ static HWND MDI_MoreWindowsDialog(HWND);
 static LRESULT WINAPI MDIClientWndProcA( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam );
 static LRESULT WINAPI MDIClientWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam );
 
-static
 HWND* WIN_ListChildren (HWND hWndparent)
 {
 
index c9fb49e..8ff955a 100644 (file)
@@ -164,6 +164,8 @@ FAT16FindAndMarkAvailableCluster(PDEVICE_EXTENSION DeviceExt,
           *Block = 0xffff;
           CcSetDirtyPinnedData(Context, NULL);
           CcUnpinData(Context);
+          if (DeviceExt->AvailableClustersValid)
+            InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
           return(STATUS_SUCCESS);
         }
 
@@ -227,6 +229,8 @@ FAT12FindAndMarkAvailableCluster(PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
               *CBlock = (*CBlock & 0xf) | 0xfff0;
             CcSetDirtyPinnedData(Context, NULL);
             CcUnpinData(Context);
+            if (DeviceExt->AvailableClustersValid)
+              InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
             return(STATUS_SUCCESS);
           }
     }
@@ -281,6 +285,8 @@ FAT32FindAndMarkAvailableCluster (PDEVICE_EXTENSION DeviceExt, PULONG Cluster)
           *Block = 0x0fffffff;
           CcSetDirtyPinnedData(Context, NULL);
           CcUnpinData(Context);
+          if (DeviceExt->AvailableClustersValid)
+            InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
           return(STATUS_SUCCESS);
         }
 
index b8e3a14..6864a2d 100644 (file)
@@ -639,7 +639,6 @@ VfatSetAllocationSizeInformation(PFILE_OBJECT FileObject,
     }
     else
     {
-#if 0 /* FIXME */
        if (Fcb->LastCluster > 0)
        {
           if (Fcb->RFCB.AllocationSize.u.LowPart - ClusterSize == Fcb->LastOffset)
@@ -665,23 +664,14 @@ VfatSetAllocationSizeInformation(PFILE_OBJECT FileObject,
           return Status;
        }
 
-       if (Fcb->LastCluster == 0)
-       {
-          Fcb->LastCluster = Cluster;
-          Fcb->LastOffset = Fcb->RFCB.AllocationSize.u.LowPart - ClusterSize;
-       }
+       Fcb->LastCluster = Cluster;
+       Fcb->LastOffset = Fcb->RFCB.AllocationSize.u.LowPart - ClusterSize;
 
        /* FIXME: Check status */
        /* Cluster points now to the last cluster within the chain */
        Status = OffsetToCluster(DeviceExt, Cluster,
                                ROUND_DOWN(NewSize - 1, ClusterSize) - Fcb->LastOffset,
                                 &NCluster, TRUE);
-#else
-       Status = OffsetToCluster(DeviceExt, FirstCluster,
-                               ROUND_DOWN(NewSize - 1, ClusterSize),
-                                &Cluster, TRUE);
-       NCluster = Cluster;
-#endif
        if (NCluster == 0xffffffff || !NT_SUCCESS(Status))
        {
          /* disk is full */
index 5530a62..68f4eff 100644 (file)
@@ -20,14 +20,13 @@ KsCreateAllocator(
 }
 
 /*
-    @unimplemented
+    @implemented
 */
 KSDDKAPI NTSTATUS NTAPI
 KsCreateDefaultAllocator(
     IN  PIRP Irp)
 {
-    UNIMPLEMENTED;
-    return STATUS_UNSUCCESSFUL;
+    return KsCreateDefaultAllocatorEx(Irp, NULL, NULL, NULL, NULL, NULL);
 }
 
 /*
@@ -54,7 +53,14 @@ KsCreateDefaultAllocatorEx(
     IN  PFNKSINITIALIZEALLOCATOR InitializeAllocator OPTIONAL,
     IN  PFNKSDELETEALLOCATOR DeleteAllocator OPTIONAL)
 {
-    UNIMPLEMENTED;
+    NTSTATUS Status;
+    PKSALLOCATOR_FRAMING AllocatorFraming;
+
+   Status = KsValidateAllocatorCreateRequest(Irp, &AllocatorFraming);
+   if (!NT_SUCCESS(Status))
+       return STATUS_INVALID_PARAMETER;
+
+
     return STATUS_UNSUCCESSFUL;
 }
 
index 9c5bc8d..86032af 100644 (file)
@@ -6,6 +6,7 @@
        <include base="ks">../include</include>
        <importlibrary definition="ks.spec" />
        <library>ntoskrnl</library>
+       <library>hal</library>
        <define name="BUILDING_KS" />
        <define name="_NTDDK_" />
        <define name="_COMDDK_" />
index cae6681..cbfb18f 100644 (file)
@@ -6,30 +6,87 @@
 #include <debug.h>
 #include <ks.h>
 
+
+typedef struct
+{
+    KEVENT Event;
+    KSPIN_LOCK Lock;
+    WORK_QUEUE_TYPE Type;
+    LONG Counter;
+    PWORK_QUEUE_ITEM WorkItem;
+    ULONG WorkItemActive;
+    ULONG DeleteInProgress;
+}KS_WORKER;
+
 /*
-    @unimplemented
+    @implemented
 */
-KSDDKAPI NTSTATUS NTAPI
+KSDDKAPI
+NTSTATUS
+NTAPI
 KsRegisterWorker(
     IN  WORK_QUEUE_TYPE WorkQueueType,
     OUT PKSWORKER* Worker)
 {
+    KS_WORKER * KsWorker;
     UNIMPLEMENTED;
-    return STATUS_UNSUCCESSFUL;
+
+    if (WorkQueueType != CriticalWorkQueue && 
+        WorkQueueType != DelayedWorkQueue &&
+        WorkQueueType != HyperCriticalWorkQueue)
+    {
+        return STATUS_INVALID_PARAMETER;
+    }
+
+    KsWorker = ExAllocatePoolWithTag(NonPagedPool, sizeof(KS_WORKER), 0);
+    if (!KsWorker)
+        return STATUS_INSUFFICIENT_RESOURCES;
+
+    KsWorker->Type = WorkQueueType;
+    KsWorker->Counter = 0;
+    KsWorker->WorkItemActive = 0;
+    KsWorker->WorkItem = NULL;
+    KsWorker->DeleteInProgress = TRUE;
+    KeInitializeSpinLock(&KsWorker->Lock);
+    KeInitializeEvent(&KsWorker->Event, NotificationEvent, FALSE);
+
+    *Worker = KsWorker;
+    return STATUS_SUCCESS;
 }
 
 /*
-    @unimplemented
+    @implemented
 */
 KSDDKAPI VOID NTAPI
 KsUnregisterWorker(
     IN  PKSWORKER Worker)
 {
-    UNIMPLEMENTED;
+    KS_WORKER * KsWorker;
+    KIRQL OldIrql;
+    ULONG bWait = FALSE;
+
+    if (!Worker)
+        return;
+
+    KsWorker = (KS_WORKER *)Worker;
+
+    KsWorker->DeleteInProgress = TRUE;
+
+    if (KsWorker->WorkItemActive)
+    {
+        KeReleaseSpinLock(&KsWorker->Lock, OldIrql);
+        KeWaitForSingleObject(&KsWorker->Event, Executive, KernelMode, FALSE, NULL);
+    }
+    else
+    {
+        KeReleaseSpinLock(&KsWorker->Lock, OldIrql);
+    }
+
+    ExFreePoolWithTag(KsWorker, 0);
 }
 
 /*
-    @unimplemented
+    @implemented
 */
 KSDDKAPI NTSTATUS NTAPI
 KsRegisterCountedWorker(
@@ -37,40 +94,98 @@ KsRegisterCountedWorker(
     IN  PWORK_QUEUE_ITEM CountedWorkItem,
     OUT PKSWORKER* Worker)
 {
-    UNIMPLEMENTED;
-    return STATUS_UNSUCCESSFUL;
+    NTSTATUS Status;
+    KS_WORKER * KsWorker;
+
+    Status = KsRegisterWorker(WorkQueueType, Worker);
+
+    if (NT_SUCCESS(Status))
+    {
+        KsWorker = (KS_WORKER *)Worker;
+        KsWorker->WorkItem = CountedWorkItem;
+    }
+
+    return Status;
 }
 
 /*
-    @unimplemented
+    @implemented
 */
-KSDDKAPI ULONG NTAPI
+KSDDKAPI
+ULONG
+NTAPI
 KsDecrementCountedWorker(
     IN  PKSWORKER Worker)
 {
-    UNIMPLEMENTED;
-    return 0;
+    KS_WORKER * KsWorker;
+    LONG Counter;
+
+    if (!Worker)
+        return STATUS_INVALID_PARAMETER;
+
+    KsWorker = (KS_WORKER *)Worker;
+    Counter = InterlockedDecrement(&KsWorker->Counter);
+
+    if (KsWorker->DeleteInProgress)
+    {
+        /* signal that we are done */
+        KeSetEvent(&KsWorker->Event, 0, 0);
+    }
+
+    return Counter;
 }
 
 /*
-    @unimplemented
+    @implemented
 */
-KSDDKAPI ULONG NTAPI
+KSDDKAPI
+ULONG
+NTAPI
 KsIncrementCountedWorker(
     IN  PKSWORKER Worker)
 {
-    UNIMPLEMENTED;
-    return 0;
+    KS_WORKER * KsWorker;
+    LONG Counter;
+
+    if (!Worker)
+        return STATUS_INVALID_PARAMETER;
+
+    KsWorker = (KS_WORKER *)Worker;
+
+    Counter = InterlockedIncrement(&KsWorker->Counter);
+    if (Counter == 1)
+    {
+        KsQueueWorkItem(Worker, KsWorker->WorkItem);
+    }
+    return Counter;
 }
 
 /*
-    @unimplemented
+    @implemented
 */
-KSDDKAPI NTSTATUS NTAPI
+KSDDKAPI
+NTSTATUS
+NTAPI
 KsQueueWorkItem(
     IN  PKSWORKER Worker,
     IN  PWORK_QUEUE_ITEM WorkItem)
 {
-    UNIMPLEMENTED;
-    return STATUS_UNSUCCESSFUL;
+    KS_WORKER * KsWorker;
+    KIRQL OldIrql;
+    NTSTATUS Status = STATUS_SUCCESS;
+
+    if (!Worker || !WorkItem)
+        return STATUS_INVALID_PARAMETER;
+
+    KsWorker = (KS_WORKER *)Worker;
+    KeAcquireSpinLock(&KsWorker->Lock, &OldIrql);
+
+    if (!KsWorker->DeleteInProgress)
+    {
+        ExQueueWorkItem(WorkItem, KsWorker->Type);
+        Status = STATUS_UNSUCCESSFUL;
+    }
+
+    KeReleaseSpinLock(&KsWorker->Lock, OldIrql);
+    return Status;
 }
index b15f9ed..24c458d 100644 (file)
@@ -33,5 +33,6 @@
        <file>miniport.c</file>
        <file>miniport_dmus.c</file>
        <file>miniport_fmsynth.c</file>
+       <file>version.c</file>
        <file>portcls.rc</file>
 </module>
index 7228601..3cb7342 100644 (file)
@@ -253,6 +253,22 @@ PcNewRegistryKey(
 
         Status = ZwOpenKey(&hHandle, DesiredAccess, ObjectAttributes);
     }
+    else if (RegistryKeyType == DeviceRegistryKey ||
+             RegistryKeyType == DriverRegistryKey ||
+             RegistryKeyType == HwProfileRegistryKey)
+    {
+        if (RegistryKeyType == HwProfileRegistryKey)
+        {
+             /* IoOpenDeviceRegistryKey used different constant */
+            RegistryKeyType = PLUGPLAY_REGKEY_CURRENT_HWPROFILE;
+        }
+
+        Status = IoOpenDeviceRegistryKey(DeviceObject, RegistryKeyType, DesiredAccess, &hHandle);
+    }
+    else if (RegistryKeyType == DeviceInterfaceRegistryKey)
+    {
+        /* FIXME */
+    }
 
     if (!NT_SUCCESS(Status))
     {
index 6fd21d4..afe80a9 100644 (file)
 
 #if defined(_MSC_VER)
 # ifdef _DLL
-# ifndef __MINGW_IMPORT
-#  define __MINGW_IMPORT  __declspec(dllimport)
-# endif
-# ifndef _CRTIMP
-#  define _CRTIMP  __declspec(dllimport)
-# endif
+#  ifndef __MINGW_IMPORT
+#   define __MINGW_IMPORT  __declspec(dllimport)
+#  endif
+#  ifndef _CRTIMP
+#   define _CRTIMP  __declspec(dllimport)
+#  endif
 # else
 #  ifndef __MINGW_IMPORT
 #   define __MINGW_IMPORT
 #  endif
-# ifndef _CRTIMP
-#  define _CRTIMP
+#  ifndef _CRTIMP
+#   define _CRTIMP
+#  endif
 # endif
-#endif
 # define __DECLSPEC_SUPPORTED
 # define __attribute__(x) /* nothing */
 # define __restrict__ /* nothing */
 #   ifdef _DLL
 /* Note the extern. This is needed to work around GCC's
 limitations in handling dllimport attribute.  */
-#   define __MINGW_IMPORT  extern __attribute__ ((__dllimport__))
+#    define __MINGW_IMPORT  extern __attribute__ ((__dllimport__))
 #   else
 #    define __MINGW_IMPORT extern
 #   endif
 #  endif
 #  ifndef _CRTIMP
-#    undef __USE_CRTIMP
-#    if !defined (_CRTBLD) && !defined (_SYSCRT)
-#      define __USE_CRTIMP 1
-#    endif
-#    ifdef __USE_CRTIMP
-#     ifdef _DLL
-#      define _CRTIMP  __attribute__ ((dllimport))
-#    else
-#      define _CRTIMP
-#    endif
+#   undef __USE_CRTIMP
+#   if !defined (_CRTBLD) && !defined (_SYSCRT)
+#    define __USE_CRTIMP 1
+#   endif
+#   ifdef __USE_CRTIMP
+#    ifdef _DLL
+#     define _CRTIMP  __attribute__ ((dllimport))
 #    else
 #     define _CRTIMP
 #    endif
+#   else
+#    define _CRTIMP
+#   endif
 #  endif
 #  define __DECLSPEC_SUPPORTED
 # else /* __declspec */
index 9c4bf2f..6098b26 100644 (file)
@@ -25,7 +25,7 @@ extern "C" {
 #endif
 
 #ifndef _STATIC_ASSERT
-#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)]
+#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
 #endif
 
 /* Return codes for _heapwalk()  */
diff --git a/reactos/include/crt/mingw32/crtdbg.h b/reactos/include/crt/mingw32/crtdbg.h
deleted file mode 100644 (file)
index 797998a..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the w64 mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within this package.
- */
-#include <_mingw.h>
-
-#ifndef _INC_CRTDBG
-#define _INC_CRTDBG
-
-#pragma pack(push,_CRT_PACKING)
-
-#ifndef NULL
-#ifdef __cplusplus
-#define NULL 0
-#else
-#define NULL ((void *)0)
-#endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-  typedef void *_HFILE;
-
-#define _CRT_WARN 0
-#define _CRT_ERROR 1
-#define _CRT_ASSERT 2
-#define _CRT_ERRCNT 3
-
-#define _CRTDBG_MODE_FILE 0x1
-#define _CRTDBG_MODE_DEBUG 0x2
-#define _CRTDBG_MODE_WNDW 0x4
-#define _CRTDBG_REPORT_MODE -1
-
-#define _CRTDBG_INVALID_HFILE ((_HFILE)-1)
-#define _CRTDBG_HFILE_ERROR ((_HFILE)-2)
-#define _CRTDBG_FILE_STDOUT ((_HFILE)-4)
-#define _CRTDBG_FILE_STDERR ((_HFILE)-5)
-#define _CRTDBG_REPORT_FILE ((_HFILE)-6)
-
-  typedef int (__cdecl *_CRT_REPORT_HOOK)(int,char *,int *);
-  typedef int (__cdecl *_CRT_REPORT_HOOKW)(int,wchar_t *,int *);
-
-#define _CRT_RPTHOOK_INSTALL 0
-#define _CRT_RPTHOOK_REMOVE 1
-
-#define _HOOK_ALLOC 1
-#define _HOOK_REALLOC 2
-#define _HOOK_FREE 3
-
-  typedef int (__cdecl *_CRT_ALLOC_HOOK)(int,void *,size_t,int,long,const unsigned char *,int);
-
-#define _CRTDBG_ALLOC_MEM_DF 0x01
-#define _CRTDBG_DELAY_FREE_MEM_DF 0x02
-#define _CRTDBG_CHECK_ALWAYS_DF 0x04
-#define _CRTDBG_RESERVED_DF 0x08
-#define _CRTDBG_CHECK_CRT_DF 0x10
-#define _CRTDBG_LEAK_CHECK_DF 0x20
-
-#define _CRTDBG_CHECK_EVERY_16_DF 0x00100000
-#define _CRTDBG_CHECK_EVERY_128_DF 0x00800000
-#define _CRTDBG_CHECK_EVERY_1024_DF 0x04000000
-
-#define _CRTDBG_CHECK_DEFAULT_DF 0
-
-#define _CRTDBG_REPORT_FLAG -1
-
-#define _BLOCK_TYPE(block) (block & 0xFFFF)
-#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF)
-
-#define _FREE_BLOCK 0
-#define _NORMAL_BLOCK 1
-#define _CRT_BLOCK 2
-#define _IGNORE_BLOCK 3
-#define _CLIENT_BLOCK 4
-#define _MAX_BLOCKS 5
-
-  typedef void (__cdecl *_CRT_DUMP_CLIENT)(void *,size_t);
-
-  struct _CrtMemBlockHeader;
-
-  typedef struct _CrtMemState {
-    struct _CrtMemBlockHeader *pBlockHeader;
-    size_t lCounts[_MAX_BLOCKS];
-    size_t lSizes[_MAX_BLOCKS];
-    size_t lHighWaterCount;
-    size_t lTotalCount;
-  } _CrtMemState;
-
-#ifndef _STATIC_ASSERT
-#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)]
-#endif
-
-#ifndef _ASSERT
-#define _ASSERT(expr) ((void)0)
-#endif
-
-#ifndef _ASSERTE
-#define _ASSERTE(expr) ((void)0)
-#endif
-
-#ifndef _ASSERT_EXPR
-#define _ASSERT_EXPR(expr,expr_str) ((void)0)
-#endif
-
-#ifndef _ASSERT_BASE
-#define _ASSERT_BASE _ASSERT_EXPR
-#endif
-
-#define _RPT0(rptno,msg)
-#define _RPTW0(rptno,msg)
-
-#define _RPT1(rptno,msg,arg1)
-#define _RPTW1(rptno,msg,arg1)
-#define _RPT2(rptno,msg,arg1,arg2)
-#define _RPTW2(rptno,msg,arg1,arg2)
-#define _RPT3(rptno,msg,arg1,arg2,arg3)
-#define _RPTW3(rptno,msg,arg1,arg2,arg3)
-#define _RPT4(rptno,msg,arg1,arg2,arg3,arg4)
-#define _RPTW4(rptno,msg,arg1,arg2,arg3,arg4)
-#define _RPTF0(rptno,msg)
-#define _RPTFW0(rptno,msg)
-#define _RPTF1(rptno,msg,arg1)
-#define _RPTFW1(rptno,msg,arg1)
-#define _RPTF2(rptno,msg,arg1,arg2)
-#define _RPTFW2(rptno,msg,arg1,arg2)
-#define _RPTF3(rptno,msg,arg1,arg2,arg3)
-#define _RPTFW3(rptno,msg,arg1,arg2,arg3)
-#define _RPTF4(rptno,msg,arg1,arg2,arg3,arg4)
-#define _RPTFW4(rptno,msg,arg1,arg2,arg3,arg4)
-
-#define _malloc_dbg(s,t,f,l) malloc(s)
-#define _calloc_dbg(c,s,t,f,l) calloc(c,s)
-#define _realloc_dbg(p,s,t,f,l) realloc(p,s)
-#define _recalloc_dbg(p,c,s,t,f,l) _recalloc(p,c,s)
-#define _expand_dbg(p,s,t,f,l) _expand(p,s)
-#define _free_dbg(p,t) free(p)
-#define _msize_dbg(p,t) _msize(p)
-
-#define _aligned_malloc_dbg(s,a,f,l) _aligned_malloc(s,a)
-#define _aligned_realloc_dbg(p,s,a,f,l) _aligned_realloc(p,s,a)
-#define _aligned_recalloc_dbg(p,c,s,a,f,l) _aligned_realloc(p,c,s,a)
-#define _aligned_free_dbg(p) _aligned_free(p)
-#define _aligned_offset_malloc_dbg(s,a,o,f,l) _aligned_offset_malloc(s,a,o)
-#define _aligned_offset_realloc_dbg(p,s,a,o,f,l) _aligned_offset_realloc(p,s,a,o)
-#define _aligned_offset_recalloc_dbg(p,c,s,a,o,f,l) _aligned_offset_recalloc(p,c,s,a,o)
-
-#define _malloca_dbg(s,t,f,l) _malloca(s)
-#define _freea_dbg(p,t) _freea(p)
-
-#define _strdup_dbg(s,t,f,l) _strdup(s)
-#define _wcsdup_dbg(s,t,f,l) _wcsdup(s)
-#define _mbsdup_dbg(s,t,f,l) _mbsdup(s)
-#define _tempnam_dbg(s1,s2,t,f,l) _tempnam(s1,s2)
-#define _wtempnam_dbg(s1,s2,t,f,l) _wtempnam(s1,s2)
-#define _fullpath_dbg(s1,s2,le,t,f,l) _fullpath(s1,s2,le)
-#define _wfullpath_dbg(s1,s2,le,t,f,l) _wfullpath(s1,s2,le)
-#define _getcwd_dbg(s,le,t,f,l) _getcwd(s,le)
-#define _wgetcwd_dbg(s,le,t,f,l) _wgetcwd(s,le)
-#define _getdcwd_dbg(d,s,le,t,f,l) _getdcwd(d,s,le)
-#define _wgetdcwd_dbg(d,s,le,t,f,l) _wgetdcwd(d,s,le)
-#define _getdcwd_lk_dbg(d,s,le,t,f,l) _getdcwd_nolock(d,s,le)
-#define _wgetdcwd_lk_dbg(d,s,le,t,f,l) _wgetdcwd_nolock(d,s,le)
-
-#define _CrtSetReportHook(f) ((_CRT_REPORT_HOOK)0)
-#define _CrtGetReportHook() ((_CRT_REPORT_HOOK)0)
-#define _CrtSetReportHook2(t,f) ((int)0)
-#define _CrtSetReportHookW2(t,f) ((int)0)
-#define _CrtSetReportMode(t,f) ((int)0)
-#define _CrtSetReportFile(t,f) ((_HFILE)0)
-
-#define _CrtDbgBreak() ((void)0)
-
-#define _CrtSetBreakAlloc(a) ((long)0)
-#define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0)
-#define _CrtGetAllocHook() ((_CRT_ALLOC_HOOK)0)
-#define _CrtCheckMemory() ((int)1)
-#define _CrtSetDbgFlag(f) ((int)0)
-#define _CrtDoForAllClientObjects(f,c) ((void)0)
-#define _CrtIsValidPointer(p,n,r) ((int)1)
-#define _CrtIsValidHeapPointer(p) ((int)1)
-#define _CrtIsMemoryBlock(p,t,r,f,l) ((int)1)
-#define _CrtReportBlockType(p) ((int)-1)
-#define _CrtSetDumpClient(f) ((_CRT_DUMP_CLIENT)0)
-#define _CrtGetDumpClient() ((_CRT_DUMP_CLIENT)0)
-#define _CrtMemCheckpoint(s) ((void)0)
-#define _CrtMemDifference(s1,s2,s3) ((int)0)
-#define _CrtMemDumpAllObjectsSince(s) ((void)0)
-#define _CrtMemDumpStatistics(s) ((void)0)
-#define _CrtDumpMemoryLeaks() ((int)0)
-#define _CrtSetDebugFillThreshold(t) ((size_t)0)
-#define _CrtSetCheckCount(f) ((int)0)
-#define _CrtGetCheckCount() ((int)0)
-
-#ifdef __cplusplus
-}
-
-  void *__cdecl operator new[](size_t _Size);
-  inline void *__cdecl operator new(size_t _Size,int,const char *,int) { return ::operator new(_Size); }
-  inline void *__cdecl operator new[](size_t _Size,int,const char *,int) { return ::operator new[](_Size); }
-  void __cdecl operator delete[](void *);
-  inline void __cdecl operator delete(void *_P,int,const char *,int) { ::operator delete(_P); }
-  inline void __cdecl operator delete[](void *_P,int,const char *,int) { ::operator delete[](_P); }
-#endif
-
-#pragma pack(pop)
-
-#include <sec_api/crtdbg_s.h>
-
-#endif
diff --git a/reactos/include/crt/mingw32/stdarg.h b/reactos/include/crt/mingw32/stdarg.h
deleted file mode 100644 (file)
index 4e6490b..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/* Copyright (C) 1989, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA.  */
-
-/* As a special exception, if you include this header file into source
-   files compiled by GCC, this header file does not by itself cause
-   the resulting executable to be covered by the GNU General Public
-   License.  This exception does not however invalidate any other
-   reasons why the executable file might be covered by the GNU General
-   Public License.  */
-
-/*
- * ISO C Standard:  7.15  Variable arguments  <stdarg.h>
- */
-
-#ifndef _INC_STDARG
-#define _INC_STDARG
-#ifndef _WIN32
-#error Only Win32 target is supported!
-#endif
-
-#ifndef _STDARG_H
-#ifndef _ANSI_STDARG_H_
-#ifndef __need___va_list
-#define _STDARG_H
-#define _ANSI_STDARG_H_
-#endif /* not __need___va_list */
-#undef __need___va_list
-
-/* Define __gnuc_va_list.  */
-
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
-typedef __builtin_va_list __gnuc_va_list;
-#endif
-
-/* Define the standard macros for the user,
-   if this invocation was from the user program.  */
-#ifdef _STDARG_H
-
-#define va_start(v,l)  __builtin_va_start(v,l)
-#define va_end(v)      __builtin_va_end(v)
-#define va_arg(v,l)    __builtin_va_arg(v,l)
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
-#define va_copy(d,s)   __builtin_va_copy(d,s)
-#endif
-#define __va_copy(d,s) __builtin_va_copy(d,s)
-
-/* Define va_list, if desired, from __gnuc_va_list. */
-/* We deliberately do not define va_list when called from
-   stdio.h, because ANSI C says that stdio.h is not supposed to define
-   va_list.  stdio.h needs to have access to that data type, 
-   but must not use that name.  It should use the name __gnuc_va_list,
-   which is safe because it is reserved for the implementation.  */
-
-#ifdef _HIDDEN_VA_LIST  /* On OSF1, this means varargs.h is "half-loaded".  */
-#undef _VA_LIST
-#endif
-
-#ifdef _BSD_VA_LIST
-#undef _BSD_VA_LIST
-#endif
-
-#if defined(__svr4__) || (defined(_SCO_DS) && !defined(__VA_LIST))
-/* SVR4.2 uses _VA_LIST for an internal alias for va_list,
-   so we must avoid testing it and setting it here.
-   SVR4 uses _VA_LIST as a flag in stdarg.h, but we should
-   have no conflict with that.  */
-#ifndef _VA_LIST_
-#define _VA_LIST_
-#ifdef __i860__
-#ifndef _VA_LIST
-#define _VA_LIST va_list
-#endif
-#endif /* __i860__ */
-typedef __gnuc_va_list va_list;
-#ifdef _SCO_DS
-#define __VA_LIST
-#endif
-#endif /* _VA_LIST_ */
-#else /* not __svr4__ || _SCO_DS */
-
-/* The macro _VA_LIST_ is the same thing used by this file in Ultrix.
-   But on BSD NET2 we must not test or define or undef it.
-   (Note that the comments in NET 2's ansi.h
-   are incorrect for _VA_LIST_--see stdio.h!)  */
-#if !defined (_VA_LIST_) || defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__) || defined(WINNT)
-/* The macro _VA_LIST_DEFINED is used in Windows NT 3.5  */
-#ifndef _VA_LIST_DEFINED
-/* The macro _VA_LIST is used in SCO Unix 3.2.  */
-#ifndef _VA_LIST
-/* The macro _VA_LIST_T_H is used in the Bull dpx2  */
-#ifndef _VA_LIST_T_H
-/* The macro __va_list__ is used by BeOS.  */
-#ifndef __va_list__
-typedef __gnuc_va_list va_list;
-#endif /* not __va_list__ */
-#endif /* not _VA_LIST_T_H */
-#endif /* not _VA_LIST */
-#endif /* not _VA_LIST_DEFINED */
-#if !(defined (__BSD_NET2__) || defined (____386BSD____) || defined (__bsdi__) || defined (__sequent__) || defined (__FreeBSD__))
-#define _VA_LIST_
-#endif
-#ifndef _VA_LIST
-#define _VA_LIST
-#endif
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-#endif
-#ifndef _VA_LIST_T_H
-#define _VA_LIST_T_H
-#endif
-#ifndef __va_list__
-#define __va_list__
-#endif
-
-#endif /* not _VA_LIST_, except on certain systems */
-
-#endif /* not __svr4__ */
-
-#endif /* _STDARG_H */
-
-#endif /* not _ANSI_STDARG_H_ */
-#endif /* not _STDARG_H */
-
-#include <vadefs.h>
-
-#ifndef va_start
-#define va_start _crt_va_start
-#endif
-#ifndef va_arg
-#define va_arg _crt_va_arg
-#endif
-#ifndef va_end
-#define va_end _crt_va_end
-#endif
-
-#endif
diff --git a/reactos/include/crt/mingw32/stddef.h b/reactos/include/crt/mingw32/stddef.h
deleted file mode 100644 (file)
index 162a3ba..0000000
+++ /dev/null
@@ -1,398 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the w64 mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within this package.
- */
-
-#include <_mingw.h>
-
-#ifndef _INC_STDDEF
-#define _INC_STDDEF
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _CRT_ERRNO_DEFINED
-#define _CRT_ERRNO_DEFINED
-  _CRTIMP extern int *__cdecl _errno(void);
-#define errno (*_errno())
-  errno_t __cdecl _set_errno(int _Value);
-  errno_t __cdecl _get_errno(int *_Value);
-#endif
-
-  _CRTIMP extern unsigned long __cdecl __threadid(void);
-#define _threadid (__threadid())
-  _CRTIMP extern uintptr_t __cdecl __threadhandle(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
-/*
- * ISO C Standard:  7.17  Common definitions  <stddef.h>
- */
-#if (!defined(_STDDEF_H) && !defined(_STDDEF_H_) && !defined(_ANSI_STDDEF_H) \
-     && !defined(__STDDEF_H__)) \
-    || defined(__need_wchar_t) || defined(__need_size_t) \
-    || defined(__need_ptrdiff_t) || defined(__need_NULL) \
-    || defined(__need_wint_t)
-
-/* Any one of these symbols __need_* means that GNU libc
-   wants us just to define one data type.  So don't define
-   the symbols that indicate this file's entire job has been done.  */
-#if (!defined(__need_wchar_t) && !defined(__need_size_t)       \
-     && !defined(__need_ptrdiff_t) && !defined(__need_NULL)    \
-     && !defined(__need_wint_t))
-#define _STDDEF_H
-#define _STDDEF_H_
-/* snaroff@next.com says the NeXT needs this.  */
-#define _ANSI_STDDEF_H
-/* Irix 5.1 needs this.  */
-#define __STDDEF_H__
-#endif
-
-#ifndef __sys_stdtypes_h
-/* In 4.3bsd-net2, machine/ansi.h defines these symbols, which are
-   defined if the corresponding type is *not* defined.
-   FreeBSD-2.1 defines _MACHINE_ANSI_H_ instead of _ANSI_H_ */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
-#if !defined(_SIZE_T_) && !defined(_BSD_SIZE_T_)
-#define _SIZE_T
-#endif
-#if !defined(_PTRDIFF_T_) && !defined(_BSD_PTRDIFF_T_)
-#define _PTRDIFF_T
-#endif
-/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
-   instead of _WCHAR_T_. */
-#if !defined(_WCHAR_T_) && !defined(_BSD_WCHAR_T_)
-#ifndef _BSD_WCHAR_T_
-#define _WCHAR_T
-#endif
-#endif
-/* Undef _FOO_T_ if we are supposed to define foo_t.  */
-#if defined (__need_ptrdiff_t) || defined (_STDDEF_H_)
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#if defined (__need_size_t) || defined (_STDDEF_H_)
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#if defined (__need_wchar_t) || defined (_STDDEF_H_)
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-#endif /* defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_) */
-
-/* Sequent's header files use _PTRDIFF_T_ in some conflicting way.
-   Just ignore it.  */
-#if defined (__sequent__) && defined (_PTRDIFF_T_)
-#undef _PTRDIFF_T_
-#endif
-
-/* On VxWorks, <type/vxTypesBase.h> may have defined macros like
-   _TYPE_size_t which will typedef size_t.  fixincludes patched the
-   vxTypesBase.h so that this macro is only defined if _GCC_SIZE_T is
-   not defined, and so that defining this macro defines _GCC_SIZE_T.
-   If we find that the macros are still defined at this point, we must
-   invoke them so that the type is defined as expected.  */
-#if defined (_TYPE_ptrdiff_t) && (defined (__need_ptrdiff_t) || defined (_STDDEF_H_))
-_TYPE_ptrdiff_t;
-#undef _TYPE_ptrdiff_t
-#endif
-#if defined (_TYPE_size_t) && (defined (__need_size_t) || defined (_STDDEF_H_))
-_TYPE_size_t;
-#undef _TYPE_size_t
-#endif
-#if defined (_TYPE_wchar_t) && (defined (__need_wchar_t) || defined (_STDDEF_H_))
-_TYPE_wchar_t;
-#undef _TYPE_wchar_t
-#endif
-
-/* In case nobody has defined these types, but we aren't running under
-   GCC 2.00, make sure that __PTRDIFF_TYPE__, __SIZE_TYPE__, and
-   __WCHAR_TYPE__ have reasonable values.  This can happen if the
-   parts of GCC is compiled by an older compiler, that actually
-   include gstddef.h, such as collect2.  */
-
-/* Signed type of difference of two pointers.  */
-
-/* Define this type if we are doing the whole job,
-   or if we want this type in particular.  */
-#if defined (_STDDEF_H) || defined (__need_ptrdiff_t)
-#ifndef _PTRDIFF_T     /* in case <sys/types.h> has defined it. */
-#ifndef _T_PTRDIFF_
-#ifndef _T_PTRDIFF
-#ifndef __PTRDIFF_T
-#ifndef _PTRDIFF_T_
-#ifndef _BSD_PTRDIFF_T_
-#ifndef ___int_ptrdiff_t_h
-#ifndef _GCC_PTRDIFF_T
-#define _PTRDIFF_T
-#define _T_PTRDIFF_
-#define _T_PTRDIFF
-#define __PTRDIFF_T
-#define _PTRDIFF_T_
-#define _BSD_PTRDIFF_T_
-#define ___int_ptrdiff_t_h
-#define _GCC_PTRDIFF_T
-#ifndef __PTRDIFF_TYPE__
-# ifdef _WIN64
-  #define __PTRDIFF_TYPE__ long long int
-# else
-# #define __PTRDIFF_TYPE__ long int
-# endif  
-#endif
-#ifndef _PTRDIFF_T_DEFINED
-#define _PTRDIFF_T_DEFINED
-typedef __PTRDIFF_TYPE__ ptrdiff_t;
-#endif
-#endif /* _GCC_PTRDIFF_T */
-#endif /* ___int_ptrdiff_t_h */
-#endif /* _BSD_PTRDIFF_T_ */
-#endif /* _PTRDIFF_T_ */
-#endif /* __PTRDIFF_T */
-#endif /* _T_PTRDIFF */
-#endif /* _T_PTRDIFF_ */
-#endif /* _PTRDIFF_T */
-
-/* If this symbol has done its job, get rid of it.  */
-#undef __need_ptrdiff_t
-
-#endif /* _STDDEF_H or __need_ptrdiff_t.  */
-
-/* Unsigned type of `sizeof' something.  */
-
-/* Define this type if we are doing the whole job,
-   or if we want this type in particular.  */
-#if defined (_STDDEF_H) || defined (__need_size_t)
-#ifndef __size_t__     /* BeOS */
-#ifndef __SIZE_T__     /* Cray Unicos/Mk */
-#ifndef _SIZE_T        /* in case <sys/types.h> has defined it. */
-#ifndef _SYS_SIZE_T_H
-#ifndef _T_SIZE_
-#ifndef _T_SIZE
-#ifndef __SIZE_T
-#ifndef _SIZE_T_
-#ifndef _BSD_SIZE_T_
-#ifndef _SIZE_T_DEFINED_
-#ifndef _SIZE_T_DEFINED
-#ifndef _BSD_SIZE_T_DEFINED_   /* Darwin */
-#ifndef _SIZE_T_DECLARED       /* FreeBSD 5 */
-#ifndef ___int_size_t_h
-#ifndef _GCC_SIZE_T
-#ifndef _SIZET_
-#ifndef __size_t
-#define __size_t__     /* BeOS */
-#define __SIZE_T__     /* Cray Unicos/Mk */
-#define _SIZE_T
-#define _SYS_SIZE_T_H
-#define _T_SIZE_
-#define _T_SIZE
-#define __SIZE_T
-#define _SIZE_T_
-#define _BSD_SIZE_T_
-#define _SIZE_T_DEFINED_
-#define _SIZE_T_DEFINED
-#define _BSD_SIZE_T_DEFINED_   /* Darwin */
-#define _SIZE_T_DECLARED       /* FreeBSD 5 */
-#define ___int_size_t_h
-#define _GCC_SIZE_T
-#define _SIZET_
-#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
-/* __size_t is a typedef on FreeBSD 5!, must not trash it. */
-#else
-#define __size_t
-#endif
-#ifndef __SIZE_TYPE__
-# ifdef _WIN64
-#  define __SIZE_TYPE__ long long unsigned int
-# else
-#  define __SIZE_TYPE__ long unsigned int
-# endif
-#endif
-#if !(defined (__GNUG__) && defined (size_t))
-typedef __SIZE_TYPE__ size_t;
-#ifdef __BEOS__
-typedef long ssize_t;
-#endif /* __BEOS__ */
-#endif /* !(defined (__GNUG__) && defined (size_t)) */
-#endif /* __size_t */
-#endif /* _SIZET_ */
-#endif /* _GCC_SIZE_T */
-#endif /* ___int_size_t_h */
-#endif /* _SIZE_T_DECLARED */
-#endif /* _BSD_SIZE_T_DEFINED_ */
-#endif /* _SIZE_T_DEFINED */
-#endif /* _SIZE_T_DEFINED_ */
-#endif /* _BSD_SIZE_T_ */
-#endif /* _SIZE_T_ */
-#endif /* __SIZE_T */
-#endif /* _T_SIZE */
-#endif /* _T_SIZE_ */
-#endif /* _SYS_SIZE_T_H */
-#endif /* _SIZE_T */
-#endif /* __SIZE_T__ */
-#endif /* __size_t__ */
-#undef __need_size_t
-#endif /* _STDDEF_H or __need_size_t.  */
-
-
-/* Wide character type.
-   Locale-writers should change this as necessary to
-   be big enough to hold unique values not between 0 and 127,
-   and not (wchar_t) -1, for each defined multibyte character.  */
-
-/* Define this type if we are doing the whole job,
-   or if we want this type in particular.  */
-#if defined (_STDDEF_H) || defined (__need_wchar_t)
-#ifndef __wchar_t__    /* BeOS */
-#ifndef __WCHAR_T__    /* Cray Unicos/Mk */
-#ifndef _WCHAR_T
-#ifndef _T_WCHAR_
-#ifndef _T_WCHAR
-#ifndef __WCHAR_T
-#ifndef _WCHAR_T_
-#ifndef _BSD_WCHAR_T_
-#ifndef _BSD_WCHAR_T_DEFINED_    /* Darwin */
-#ifndef _BSD_RUNE_T_DEFINED_   /* Darwin */
-#ifndef _WCHAR_T_DECLARED /* FreeBSD 5 */
-#ifndef _WCHAR_T_DEFINED_
-#ifndef _WCHAR_T_DEFINED
-#ifndef _WCHAR_T_H
-#ifndef ___int_wchar_t_h
-#ifndef __INT_WCHAR_T_H
-#ifndef _GCC_WCHAR_T
-#define __wchar_t__    /* BeOS */
-#define __WCHAR_T__    /* Cray Unicos/Mk */
-#define _WCHAR_T
-#define _T_WCHAR_
-#define _T_WCHAR
-#define __WCHAR_T
-#define _WCHAR_T_
-#define _BSD_WCHAR_T_
-#define _WCHAR_T_DEFINED_
-#define _WCHAR_T_DEFINED
-#define _WCHAR_T_H
-#define ___int_wchar_t_h
-#define __INT_WCHAR_T_H
-#define _GCC_WCHAR_T
-#define _WCHAR_T_DECLARED
-
-/* On BSD/386 1.1, at least, machine/ansi.h defines _BSD_WCHAR_T_
-   instead of _WCHAR_T_, and _BSD_RUNE_T_ (which, unlike the other
-   symbols in the _FOO_T_ family, stays defined even after its
-   corresponding type is defined).  If we define wchar_t, then we
-   must undef _WCHAR_T_; for BSD/386 1.1 (and perhaps others), if
-   we undef _WCHAR_T_, then we must also define rune_t, since 
-   headers like runetype.h assume that if machine/ansi.h is included,
-   and _BSD_WCHAR_T_ is not defined, then rune_t is available.
-   machine/ansi.h says, "Note that _WCHAR_T_ and _RUNE_T_ must be of
-   the same type." */
-#ifdef _BSD_WCHAR_T_
-#undef _BSD_WCHAR_T_
-#ifdef _BSD_RUNE_T_
-#if !defined (_ANSI_SOURCE) && !defined (_POSIX_SOURCE)
-typedef _BSD_RUNE_T_ rune_t;
-#define _BSD_WCHAR_T_DEFINED_
-#define _BSD_RUNE_T_DEFINED_   /* Darwin */
-#if defined (__FreeBSD__) && (__FreeBSD__ < 5)
-/* Why is this file so hard to maintain properly?  In contrast to
-   the comment above regarding BSD/386 1.1, on FreeBSD for as long
-   as the symbol has existed, _BSD_RUNE_T_ must not stay defined or
-   redundant typedefs will occur when stdlib.h is included after this file. */
-#undef _BSD_RUNE_T_
-#endif
-#endif
-#endif
-#endif
-
-#ifndef __WCHAR_TYPE__
-#define __WCHAR_TYPE__ unsigned short
-#endif
-#ifndef __cplusplus
-typedef __WCHAR_TYPE__ wchar_t;
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif /* _WCHAR_T_DECLARED */
-#endif /* _BSD_RUNE_T_DEFINED_ */
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif /* __WCHAR_T__ */
-#endif /* __wchar_t__ */
-#undef __need_wchar_t
-#endif /* _STDDEF_H or __need_wchar_t.  */
-
-/*  In 4.3bsd-net2, leave these undefined to indicate that size_t, etc.
-    are already defined.  */
-/*  BSD/OS 3.1 and FreeBSD [23].x require the MACHINE_ANSI_H check here.  */
-#if defined(_ANSI_H_) || defined(_MACHINE_ANSI_H_)
-/*  The references to _GCC_PTRDIFF_T_, _GCC_SIZE_T_, and _GCC_WCHAR_T_
-    are probably typos and should be removed before 2.8 is released.  */
-#ifdef _GCC_PTRDIFF_T_
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#ifdef _GCC_SIZE_T_
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#ifdef _GCC_WCHAR_T_
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-/*  The following ones are the real ones.  */
-#ifdef _GCC_PTRDIFF_T
-#undef _PTRDIFF_T_
-#undef _BSD_PTRDIFF_T_
-#endif
-#ifdef _GCC_SIZE_T
-#undef _SIZE_T_
-#undef _BSD_SIZE_T_
-#endif
-#ifdef _GCC_WCHAR_T
-#undef _WCHAR_T_
-#undef _BSD_WCHAR_T_
-#endif
-#endif /* _ANSI_H_ || _MACHINE_ANSI_H_ */
-
-#endif /* __sys_stdtypes_h */
-
-/* A null pointer constant.  */
-
-#if defined (_STDDEF_H) || defined (__need_NULL)
-#undef NULL            /* in case <stdio.h> has defined it. */
-#ifdef __GNUG__
-#define NULL __null
-#else   /* G++ */
-#ifndef __cplusplus
-#define NULL ((void *)0)
-#else   /* C++ */
-#define NULL 0
-#endif  /* C++ */
-#endif  /* G++ */
-#endif /* NULL not defined and <stddef.h> or need NULL.  */
-#undef __need_NULL
-
-#ifndef offsetof
-
-/* Offset of member MEMBER in a struct of type TYPE. */
-#define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
-
-#endif /* !offsetof */
-
-#endif /* !_STDDEF_H && !_STDDEF_H_ && !_ANSI_STDDEF_H && !__STDDEF_H__
-         || __need_XXX was not defined before */
diff --git a/reactos/include/crt/mingw32/vadefs.h b/reactos/include/crt/mingw32/vadefs.h
deleted file mode 100644 (file)
index eae1a2e..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the w64 mingw-runtime package.
- * No warranty is given; refer to the file DISCLAIMER within this package.
- */
-#ifndef _INC_VADEFS
-#define _INC_VADEFS
-
-#ifndef _WIN32
-#error Only Win32 target is supported!
-#endif
-
-#include <_mingw.h>
-
-#undef _CRT_PACKING
-#define _CRT_PACKING 8
-#pragma pack(push,_CRT_PACKING)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _UINTPTR_T_DEFINED
-#define _UINTPTR_T_DEFINED
-#ifndef __uintptr_t_defined
-#define __uintptr_t_defined
-#undef uintptr_t
-#ifdef _WIN64
-#if defined(__GNUC__) && defined(__STRICT_ANSI__)
-  typedef unsigned int uintptr_t __attribute__ ((mode (DI)));
-#else
-  typedef unsigned __int64 uintptr_t;
-#endif
-#else
-  typedef unsigned long uintptr_t;
-#endif
-#endif
-#endif
-
-#ifndef __GNUC_VA_LIST
-#define __GNUC_VA_LIST
-  typedef __builtin_va_list __gnuc_va_list;
-#endif
-
-#ifndef _VA_LIST_DEFINED
-#define _VA_LIST_DEFINED
-  typedef __gnuc_va_list va_list;
-#endif
-
-#ifdef __cplusplus
-#define _ADDRESSOF(v) (&reinterpret_cast<const char &>(v))
-#else
-#define _ADDRESSOF(v) (&(v))
-#endif
-
-#if defined(__ia64__)
-#define _VA_ALIGN 8
-#define _SLOTSIZEOF(t) ((sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1))
-
-#define _VA_STRUCT_ALIGN 16
-
-#define _ALIGNOF(ap) ((((ap)+_VA_STRUCT_ALIGN - 1) & ~(_VA_STRUCT_ALIGN -1)) - (ap))
-#define _APALIGN(t,ap) (__alignof(t) > 8 ? _ALIGNOF((uintptr_t) ap) : 0)
-#else
-#define _SLOTSIZEOF(t) (sizeof(t))
-#define _APALIGN(t,ap) (__alignof(t))
-#endif
-
-#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ + 0 >= 199900L
-#define va_copy(d,s)   __builtin_va_copy(d,s)
-#endif
-#define __va_copy(d,s) __builtin_va_copy(d,s)
-
-#define _INTSIZEOF(n) ((sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1))
-
-#define _crt_va_start(v,l)     __builtin_va_start(v,l)
-#define _crt_va_arg(v,l)       __builtin_va_arg(v,l)
-#define _crt_va_end(v) __builtin_va_end(v)
-
-#ifdef __cplusplus
-}
-#endif
-
-#pragma pack(pop)
-#endif
index e5cd41a..5b09415 100644 (file)
@@ -107,7 +107,7 @@ extern "C" {
 #ifndef RC_INVOKED
  #ifdef _USE_32BIT_TIME_T
   __CRT_INLINE int __cdecl _utime32(const char *_Filename,struct __utimbuf32 *_Utimbuf) {
-    return _utime(_Filename,(struct __timbuf *)_Utimbuf);
+    return _utime(_Filename,(struct _utimbuf *)_Utimbuf);
   }
   __CRT_INLINE int __cdecl _futime32(int _Desc,struct __utimbuf32 *_Utimbuf) {
     return _futime(_Desc,(struct _utimbuf *)_Utimbuf);
index 2a3ce70..df4275c 100644 (file)
@@ -622,6 +622,65 @@ DECLARE_INTERFACE_(IServiceGroup, IServiceSink)
 typedef IServiceGroup *PSERVICEGROUP;
 
 
+#if (NTDDI_VERSION >= NTDDI_WIN2003)
+/* ===============================================================
+    IUnregisterSubdevice Interface
+*/
+
+DEFINE_GUID(IID_IUnregisterSubdevice, 0x16738177L, 0xe199, 0x41f9, 0x9a, 0x87, 0xab, 0xb2, 0xa5, 0x43, 0x2f, 0x21);
+
+#undef INTERFACE
+#define INTERFACE IUnregisterSubdevice
+
+DECLARE_INTERFACE_(IUnregisterSubdevice,IUnknown)
+{
+    DEFINE_ABSTRACT_UNKNOWN()
+
+    STDMETHOD_(NTSTATUS,UnregisterSubdevice)(THIS_
+        IN  PDEVICE_OBJECT  DeviceObject,
+        IN  PUNKNOWN        Unknown)PURE;
+};
+
+typedef IUnregisterSubdevice *PUNREGISTERSUBDEVICE;
+
+/* ===============================================================
+    IUnregisterPhysicalConnection Interface
+*/
+
+#undef INTERFACE
+#define INTERFACE IUnregisterPhysicalConnection
+
+DEFINE_GUID(IID_IUnregisterPhysicalConnection, 0x6c38e231L, 0x2a0d, 0x428d, 0x81, 0xf8, 0x07, 0xcc, 0x42, 0x8b, 0xb9, 0xa4);
+
+DECLARE_INTERFACE_(IUnregisterPhysicalConnection,IUnknown)
+{
+    DEFINE_ABSTRACT_UNKNOWN()
+
+    STDMETHOD_(NTSTATUS,UnregisterPhysicalConnection)(THIS_
+        IN  PDEVICE_OBJECT  DeviceObject,
+        IN  PUNKNOWN        FromUnknown,
+        IN  ULONG           FromPin,
+        IN  PUNKNOWN        ToUnknown,
+        IN  ULONG           ToPin)PURE;
+
+    STDMETHOD_(NTSTATUS,UnregisterPhysicalConnectionToExternal)(THIS_
+        IN  PDEVICE_OBJECT  DeviceObject,
+        IN  PUNKNOWN        FromUnknown,
+        IN  ULONG           FromPin,
+        IN  PUNICODE_STRING ToString,
+        IN  ULONG           ToPin)PURE;
+
+    STDMETHOD_(NTSTATUS,UnregisterPhysicalConnectionFromExternal)(THIS_
+        IN  PDEVICE_OBJECT  DeviceObject,
+        IN  PUNICODE_STRING FromString,
+        IN  ULONG           FromPin,
+        IN  PUNKNOWN        ToUnknown,
+        IN  ULONG           ToPin)PURE;
+};
+
+typedef IUnregisterPhysicalConnection *PUNREGISTERPHYSICALCONNECTION;
+#endif
+
 /* ===============================================================
     IDmaChannel Interface
 */
@@ -1579,6 +1638,10 @@ typedef IDrmPort2 *PDRMPORT2;
 #undef INTERFACE
 #define INTERFACE IPortClsVersion
 
+#if (NTDDI_VERSION >= NTDDI_WINXP)
+DEFINE_GUID(IID_IPortClsVersion, 0x7D89A7BBL, 0x869B, 0x4567, 0x8D, 0xBE, 0x1E, 0x16, 0x8C, 0xC8, 0x53, 0xDE);
+#endif
+
 DECLARE_INTERFACE_(IPortClsVersion, IUnknown)
 {
     DEFINE_ABSTRACT_UNKNOWN()
index 42df9d3..9613a2f 100644 (file)
@@ -760,6 +760,16 @@ typedef struct _RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED
 } RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED,
   *PRTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED;
 
+typedef struct _ACTIVATION_CONTEXT_STACK
+{
+    PRTL_ACTIVATION_CONTEXT_STACK_FRAME ActiveFrame;
+    LIST_ENTRY FrameListCache;
+    ULONG Flags;
+    ULONG NextCookieSequenceNumber;
+    ULONG StackId;
+} ACTIVATION_CONTEXT_STACK,
+  *PACTIVATION_CONTEXT_STACK;
+
 #endif
 
 //
index f2f424d..92124de 100644 (file)
@@ -6,6 +6,7 @@ extern "C" {
 #endif
 
 #define AccFree LocalFree
+
 #define ACTRL_RESERVED            0x00000000
 #define ACTRL_ACCESS_PROTECTED    0x00000001
 #define ACTRL_ACCESS_ALLOWED      0x00000001
@@ -29,11 +30,13 @@ extern "C" {
 #define ACTRL_FILE_READ_ATTRIB    0x00000080
 #define ACTRL_FILE_WRITE_ATTRIB   0x00000100
 #define ACTRL_FILE_CREATE_PIPE    0x00000200
+
 #define ACTRL_DIR_LIST            0x00000001
 #define ACTRL_DIR_CREATE_OBJECT   0x00000002
 #define ACTRL_DIR_CREATE_CHILD    0x00000004
 #define ACTRL_DIR_DELETE_CHILD    0x00000040
 #define ACTRL_DIR_TRAVERSE        0x00000020
+
 #define ACTRL_KERNEL_TERMINATE    0x00000001
 #define ACTRL_KERNEL_THREAD       0x00000002
 #define ACTRL_KERNEL_VM           0x00000004
@@ -50,11 +53,13 @@ extern "C" {
 #define ACTRL_KERNEL_TOKEN        0x00002000
 #define ACTRL_KERNEL_IMPERSONATE  0x00004000
 #define ACTRL_KERNEL_DIMPERSONATE 0x00008000
+
 #define ACTRL_PRINT_SADMIN        0x00000001
 #define ACTRL_PRINT_SLIST         0x00000002
 #define ACTRL_PRINT_PADMIN        0x00000004
 #define ACTRL_PRINT_PUSE          0x00000008
 #define ACTRL_PRINT_JADMIN        0x00000010
+
 #define ACTRL_SVC_GET_INFO        0x00000001
 #define ACTRL_SVC_SET_INFO        0x00000002
 #define ACTRL_SVC_STATUS          0x00000004
@@ -64,12 +69,14 @@ extern "C" {
 #define ACTRL_SVC_PAUSE           0x00000040
 #define ACTRL_SVC_INTERROGATE     0x00000080
 #define ACTRL_SVC_UCONTROL        0x00000100
+
 #define ACTRL_REG_QUERY           0x00000001
 #define ACTRL_REG_SET             0x00000002
 #define ACTRL_REG_CREATE_CHILD    0x00000004
 #define ACTRL_REG_LIST            0x00000008
 #define ACTRL_REG_NOTIFY          0x00000010
 #define ACTRL_REG_LINK            0x00000020
+
 #define ACTRL_WIN_CLIPBRD         0x00000001
 #define ACTRL_WIN_GLOBAL_ATOMS    0x00000002
 #define ACTRL_WIN_CREATE          0x00000004
@@ -79,238 +86,300 @@ extern "C" {
 #define ACTRL_WIN_WRITE_ATTRIBS   0x00000040
 #define ACTRL_WIN_SCREEN          0x00000080
 #define ACTRL_WIN_EXIT            0x00000100
+
 #define ACTRL_ACCESS_NO_OPTIONS                 0x00000000
 #define ACTRL_ACCESS_SUPPORTS_OBJECT_ENTRIES    0x00000001
+
 #define ACCCTRL_DEFAULT_PROVIDERA   "Windows NT Access Provider"
-#define ACCCTRL_DEFAULT_PROVIDERW  L"Windows NT Access Provider"
+#define ACCCTRL_DEFAULT_PROVIDERW   L"Windows NT Access Provider"
+
 #define TRUSTEE_ACCESS_ALLOWED    0x00000001L
 #define TRUSTEE_ACCESS_READ       0x00000002L
 #define TRUSTEE_ACCESS_WRITE      0x00000004L
 #define TRUSTEE_ACCESS_EXPLICIT   0x00000001L
-#define TRUSTEE_ACCESS_READ_WRITE   (TRUSTEE_ACCESS_READ | TRUSTEE_ACCESS_WRITE)
+#define TRUSTEE_ACCESS_READ_WRITE (TRUSTEE_ACCESS_READ | TRUSTEE_ACCESS_WRITE)
 #define TRUSTEE_ACCESS_ALL        0xFFFFFFFFL
-#define NO_INHERITANCE           0x0
-#define SUB_OBJECTS_ONLY_INHERIT  0x1
-#define SUB_CONTAINERS_ONLY_INHERIT 0x2
+
+#define NO_INHERITANCE                      0x0
+#define SUB_OBJECTS_ONLY_INHERIT            0x1
+#define SUB_CONTAINERS_ONLY_INHERIT         0x2
 #define SUB_CONTAINERS_AND_OBJECTS_INHERIT  0x3
-#define INHERIT_NO_PROPAGATE      0x4
-#define INHERIT_ONLY              0x8
-#define INHERITED_ACCESS_ENTRY    0x10
-#define INHERITED_PARENT          0x10000000
-#define INHERITED_GRANDPARENT     0x20000000
-
-#define SI_EDIT_PERMS  0x00000000
-#define SI_EDIT_OWNER  0x00000001
-#define SI_EDIT_AUDITS 0x00000002
-#define SI_CONTAINER   0x00000004
-#define SI_READONLY    0x00000008
-#define SI_ADVANCED    0x00000010
-#define SI_RESET       0x00000020
-#define SI_OWNER_READONLY      0x00000040
-#define SI_EDIT_PROPERTIES     0x00000080
-#define SI_OWNER_RECURSE       0x00000100
-#define SI_NO_ACL_PROTECT      0x00000200
-#define SI_NO_TREE_APPLY       0x00000400
-#define SI_PAGE_TITLE  0x00000800
-#define SI_SERVER_IS_DC        0x00001000
-#define SI_RESET_DACL_TREE     0x00004000
-#define SI_RESET_SACL_TREE     0x00008000
-#define SI_OBJECT_GUID 0x00010000
-#define SI_EDIT_EFFECTIVE      0x00020000
-#define SI_RESET_DACL  0x00040000
-#define SI_RESET_SACL  0x00080000
-#define SI_RESET_OWNER 0x00100000
-#define SI_NO_ADDITIONAL_PERMISSION    0x00200000
-#define SI_MAY_WRITE   0x10000000
-#define SI_EDIT_ALL    (SI_EDIT_OWNER |SI_EDIT_PERMS | SI_EDIT_AUDITS)
-
-#define SI_ACCESS_SPECIFIC     0x00010000
-#define SI_ACCESS_GENERAL      0x00020000
-#define SI_ACCESS_CONTAINER    0x00040000
-#define SI_ACCESS_PROPERTY     0x00080000
+#define INHERIT_NO_PROPAGATE                0x4
+#define INHERIT_ONLY                        0x8
+#define INHERITED_ACCESS_ENTRY              0x10
+#define INHERITED_PARENT                    0x10000000
+#define INHERITED_GRANDPARENT               0x20000000
+
+#define SI_EDIT_PERMS               0x00000000
+#define SI_EDIT_OWNER               0x00000001
+#define SI_EDIT_AUDITS              0x00000002
+#define SI_CONTAINER                0x00000004
+#define SI_READONLY                 0x00000008
+#define SI_ADVANCED                 0x00000010
+#define SI_RESET                    0x00000020
+#define SI_OWNER_READONLY           0x00000040
+#define SI_EDIT_PROPERTIES          0x00000080
+#define SI_OWNER_RECURSE            0x00000100
+#define SI_NO_ACL_PROTECT           0x00000200
+#define SI_NO_TREE_APPLY            0x00000400
+#define SI_PAGE_TITLE               0x00000800
+#define SI_SERVER_IS_DC             0x00001000
+#define SI_RESET_DACL_TREE          0x00004000
+#define SI_RESET_SACL_TREE          0x00008000
+#define SI_OBJECT_GUID              0x00010000
+#define SI_EDIT_EFFECTIVE           0x00020000
+#define SI_RESET_DACL               0x00040000
+#define SI_RESET_SACL               0x00080000
+#define SI_RESET_OWNER              0x00100000
+#define SI_NO_ADDITIONAL_PERMISSION 0x00200000
+#define SI_MAY_WRITE                0x10000000
+#define SI_EDIT_ALL                 (SI_EDIT_OWNER |SI_EDIT_PERMS | SI_EDIT_AUDITS)
+
+#define SI_ACCESS_SPECIFIC          0x00010000
+#define SI_ACCESS_GENERAL           0x00020000
+#define SI_ACCESS_CONTAINER         0x00040000
+#define SI_ACCESS_PROPERTY          0x00080000
 
 typedef ULONG INHERIT_FLAGS, *PINHERIT_FLAGS;
 typedef ULONG ACCESS_RIGHTS, *PACCESS_RIGHTS;
 
-typedef enum _ACCESS_MODE {
-       NOT_USED_ACCESS = 0,
-       GRANT_ACCESS,
-       SET_ACCESS,
-       DENY_ACCESS,
-       REVOKE_ACCESS,
-       SET_AUDIT_SUCCESS,
-       SET_AUDIT_FAILURE
+typedef enum _ACCESS_MODE
+{
+    NOT_USED_ACCESS = 0,
+    GRANT_ACCESS,
+    SET_ACCESS,
+    DENY_ACCESS,
+    REVOKE_ACCESS,
+    SET_AUDIT_SUCCESS,
+    SET_AUDIT_FAILURE
 } ACCESS_MODE;
-typedef enum _SE_OBJECT_TYPE {
-       SE_UNKNOWN_OBJECT_TYPE = 0,
-       SE_FILE_OBJECT,
-       SE_SERVICE,
-       SE_PRINTER,
-       SE_REGISTRY_KEY,
-       SE_LMSHARE,
-       SE_KERNEL_OBJECT,
-       SE_WINDOW_OBJECT,
-       SE_DS_OBJECT,
-       SE_DS_OBJECT_ALL,
-       SE_PROVIDER_DEFINED_OBJECT,
-       SE_WMIGUID_OBJECT,
-       SE_REGISTRY_WOW64_32KEY
+
+typedef enum _SE_OBJECT_TYPE
+{
+    SE_UNKNOWN_OBJECT_TYPE = 0,
+    SE_FILE_OBJECT,
+    SE_SERVICE,
+    SE_PRINTER,
+    SE_REGISTRY_KEY,
+    SE_LMSHARE,
+    SE_KERNEL_OBJECT,
+    SE_WINDOW_OBJECT,
+    SE_DS_OBJECT,
+    SE_DS_OBJECT_ALL,
+    SE_PROVIDER_DEFINED_OBJECT,
+    SE_WMIGUID_OBJECT,
+    SE_REGISTRY_WOW64_32KEY
 } SE_OBJECT_TYPE;
-typedef enum _TRUSTEE_TYPE {
-       TRUSTEE_IS_UNKNOWN,
-       TRUSTEE_IS_USER,
-       TRUSTEE_IS_GROUP,
-       TRUSTEE_IS_DOMAIN,
-       TRUSTEE_IS_ALIAS,
-       TRUSTEE_IS_WELL_KNOWN_GROUP,
-       TRUSTEE_IS_DELETED,
-       TRUSTEE_IS_INVALID,
-       TRUSTEE_IS_COMPUTER
+
+typedef enum _TRUSTEE_TYPE
+{
+    TRUSTEE_IS_UNKNOWN,
+    TRUSTEE_IS_USER,
+    TRUSTEE_IS_GROUP,
+    TRUSTEE_IS_DOMAIN,
+    TRUSTEE_IS_ALIAS,
+    TRUSTEE_IS_WELL_KNOWN_GROUP,
+    TRUSTEE_IS_DELETED,
+    TRUSTEE_IS_INVALID,
+    TRUSTEE_IS_COMPUTER
 } TRUSTEE_TYPE;
-typedef enum _TRUSTEE_FORM {
-       TRUSTEE_IS_SID,
-       TRUSTEE_IS_NAME,
-       TRUSTEE_BAD_FORM,
-       TRUSTEE_IS_OBJECTS_AND_SID,
-       TRUSTEE_IS_OBJECTS_AND_NAME
+
+typedef enum _TRUSTEE_FORM
+{
+    TRUSTEE_IS_SID,
+    TRUSTEE_IS_NAME,
+    TRUSTEE_BAD_FORM,
+    TRUSTEE_IS_OBJECTS_AND_SID,
+    TRUSTEE_IS_OBJECTS_AND_NAME
 } TRUSTEE_FORM;
-typedef enum _MULTIPLE_TRUSTEE_OPERATION {
-       NO_MULTIPLE_TRUSTEE,
-       TRUSTEE_IS_IMPERSONATE
+
+typedef enum _MULTIPLE_TRUSTEE_OPERATION
+{
+    NO_MULTIPLE_TRUSTEE,
+    TRUSTEE_IS_IMPERSONATE
 } MULTIPLE_TRUSTEE_OPERATION;
-typedef struct _TRUSTEE_A {
-       struct _TRUSTEE_A          *pMultipleTrustee;
-       MULTIPLE_TRUSTEE_OPERATION  MultipleTrusteeOperation;
-       TRUSTEE_FORM                TrusteeForm;
-       TRUSTEE_TYPE                TrusteeType;
-       LPSTR                       ptstrName;
+
+typedef struct _TRUSTEE_A
+{
+    struct _TRUSTEE_A           *pMultipleTrustee;
+    MULTIPLE_TRUSTEE_OPERATION  MultipleTrusteeOperation;
+    TRUSTEE_FORM                TrusteeForm;
+    TRUSTEE_TYPE                TrusteeType;
+    LPSTR                       ptstrName;
 } TRUSTEE_A, *PTRUSTEE_A, TRUSTEEA, *PTRUSTEEA;
-typedef struct _TRUSTEE_W {
-       struct _TRUSTEE_W          *pMultipleTrustee;
-       MULTIPLE_TRUSTEE_OPERATION  MultipleTrusteeOperation;
-       TRUSTEE_FORM                TrusteeForm;
-       TRUSTEE_TYPE                TrusteeType;
-       LPWSTR                      ptstrName;
+
+typedef struct _TRUSTEE_W
+{
+    struct _TRUSTEE_W           *pMultipleTrustee;
+    MULTIPLE_TRUSTEE_OPERATION  MultipleTrusteeOperation;
+    TRUSTEE_FORM                TrusteeForm;
+    TRUSTEE_TYPE                TrusteeType;
+    LPWSTR                      ptstrName;
 } TRUSTEE_W, *PTRUSTEE_W, TRUSTEEW, *PTRUSTEEW;
-typedef struct _ACTRL_ACCESS_ENTRYA {
-       TRUSTEE_A       Trustee;
-       ULONG           fAccessFlags;
-       ACCESS_RIGHTS   Access;
-       ACCESS_RIGHTS   ProvSpecificAccess;
-       INHERIT_FLAGS   Inheritance;
-       LPCSTR          lpInheritProperty;
+
+typedef struct _ACTRL_ACCESS_ENTRYA
+{
+    TRUSTEE_A       Trustee;
+    ULONG           fAccessFlags;
+    ACCESS_RIGHTS   Access;
+    ACCESS_RIGHTS   ProvSpecificAccess;
+    INHERIT_FLAGS   Inheritance;
+    LPCSTR          lpInheritProperty;
 } ACTRL_ACCESS_ENTRYA, *PACTRL_ACCESS_ENTRYA;
-typedef struct _ACTRL_ACCESS_ENTRYW {
-       TRUSTEE_W       Trustee;
-       ULONG           fAccessFlags;
-       ACCESS_RIGHTS   Access;
-       ACCESS_RIGHTS   ProvSpecificAccess;
-       INHERIT_FLAGS   Inheritance;
-       LPCWSTR         lpInheritProperty;
+
+typedef struct _ACTRL_ACCESS_ENTRYW
+{
+    TRUSTEE_W       Trustee;
+    ULONG           fAccessFlags;
+    ACCESS_RIGHTS   Access;
+    ACCESS_RIGHTS   ProvSpecificAccess;
+    INHERIT_FLAGS   Inheritance;
+    LPCWSTR         lpInheritProperty;
 } ACTRL_ACCESS_ENTRYW, *PACTRL_ACCESS_ENTRYW;
-typedef struct _ACTRL_ACCESS_ENTRY_LISTA {
-       ULONG                  cEntries;
-       ACTRL_ACCESS_ENTRYA    *pAccessList;
+
+typedef struct _ACTRL_ACCESS_ENTRY_LISTA
+{
+    ULONG                  cEntries;
+    ACTRL_ACCESS_ENTRYA    *pAccessList;
 } ACTRL_ACCESS_ENTRY_LISTA, *PACTRL_ACCESS_ENTRY_LISTA;
-typedef struct _ACTRL_ACCESS_ENTRY_LISTW {
-       ULONG                  cEntries;
-       ACTRL_ACCESS_ENTRYW    *pAccessList;
+
+typedef struct _ACTRL_ACCESS_ENTRY_LISTW
+{
+    ULONG                  cEntries;
+    ACTRL_ACCESS_ENTRYW    *pAccessList;
 } ACTRL_ACCESS_ENTRY_LISTW, *PACTRL_ACCESS_ENTRY_LISTW;
-typedef struct _ACTRL_PROPERTY_ENTRYA {
-       LPCSTR                      lpProperty;
-       PACTRL_ACCESS_ENTRY_LISTA   pAccessEntryList;
-       ULONG                       fListFlags;
+
+typedef struct _ACTRL_PROPERTY_ENTRYA
+{
+    LPCSTR                      lpProperty;
+    PACTRL_ACCESS_ENTRY_LISTA   pAccessEntryList;
+    ULONG                       fListFlags;
 } ACTRL_PROPERTY_ENTRYA, *PACTRL_PROPERTY_ENTRYA;
-typedef struct _ACTRL_PROPERTY_ENTRYW {
-       LPCWSTR                     lpProperty;
-       PACTRL_ACCESS_ENTRY_LISTW   pAccessEntryList;
-       ULONG                       fListFlags;
+
+typedef struct _ACTRL_PROPERTY_ENTRYW
+{
+    LPCWSTR                     lpProperty;
+    PACTRL_ACCESS_ENTRY_LISTW   pAccessEntryList;
+    ULONG                       fListFlags;
 } ACTRL_PROPERTY_ENTRYW, *PACTRL_PROPERTY_ENTRYW;
-typedef struct _ACTRL_ALISTA {
-       ULONG                       cEntries;
-       PACTRL_PROPERTY_ENTRYA      pPropertyAccessList;
+
+typedef struct _ACTRL_ALISTA
+{
+    ULONG                       cEntries;
+    PACTRL_PROPERTY_ENTRYA      pPropertyAccessList;
 } ACTRL_ACCESSA, *PACTRL_ACCESSA, ACTRL_AUDITA, *PACTRL_AUDITA;
-typedef struct _ACTRL_ALISTW {
-       ULONG                       cEntries;
-       PACTRL_PROPERTY_ENTRYW      pPropertyAccessList;
+
+typedef struct _ACTRL_ALISTW
+{
+    ULONG                       cEntries;
+    PACTRL_PROPERTY_ENTRYW      pPropertyAccessList;
 } ACTRL_ACCESSW, *PACTRL_ACCESSW, ACTRL_AUDITW, *PACTRL_AUDITW;
-typedef struct _TRUSTEE_ACCESSA {
-       LPSTR           lpProperty;
-       ACCESS_RIGHTS   Access;
-       ULONG           fAccessFlags;
-       ULONG           fReturnedAccess;
+
+typedef struct _TRUSTEE_ACCESSA
+{
+    LPSTR           lpProperty;
+    ACCESS_RIGHTS   Access;
+    ULONG           fAccessFlags;
+    ULONG           fReturnedAccess;
 } TRUSTEE_ACCESSA, *PTRUSTEE_ACCESSA;
-typedef struct _TRUSTEE_ACCESSW {
-       LPWSTR          lpProperty;
-       ACCESS_RIGHTS   Access;
-       ULONG           fAccessFlags;
-       ULONG           fReturnedAccess;
+
+typedef struct _TRUSTEE_ACCESSW
+{
+    LPWSTR          lpProperty;
+    ACCESS_RIGHTS   Access;
+    ULONG           fAccessFlags;
+    ULONG           fReturnedAccess;
 } TRUSTEE_ACCESSW, *PTRUSTEE_ACCESSW;
-typedef struct _ACTRL_OVERLAPPED {
-       _ANONYMOUS_UNION
-       union {
-           PVOID Provider;
-           ULONG Reserved1;
-       } DUMMYUNIONNAME;
-       ULONG       Reserved2;
-       HANDLE      hEvent;
+
+typedef struct _ACTRL_OVERLAPPED
+{
+    _ANONYMOUS_UNION
+    union
+    {
+        PVOID Provider;
+        ULONG Reserved1;
+    } DUMMYUNIONNAME;
+    ULONG       Reserved2;
+    HANDLE      hEvent;
 } ACTRL_OVERLAPPED, *PACTRL_OVERLAPPED;
-typedef struct _ACTRL_ACCESS_INFOA {
-       ULONG       fAccessPermission;
-       LPSTR       lpAccessPermissionName;
+
+typedef struct _ACTRL_ACCESS_INFOA
+{
+    ULONG       fAccessPermission;
+    LPSTR       lpAccessPermissionName;
 } ACTRL_ACCESS_INFOA, *PACTRL_ACCESS_INFOA;
-typedef struct _ACTRL_ACCESS_INFOW {
-       ULONG       fAccessPermission;
-       LPWSTR      lpAccessPermissionName;
+
+typedef struct _ACTRL_ACCESS_INFOW
+{
+    ULONG       fAccessPermission;
+    LPWSTR      lpAccessPermissionName;
 } ACTRL_ACCESS_INFOW, *PACTRL_ACCESS_INFOW;
-typedef struct _ACTRL_CONTROL_INFOA {
-       LPSTR       lpControlId;
-       LPSTR       lpControlName;
+
+typedef struct _ACTRL_CONTROL_INFOA
+{
+    LPSTR       lpControlId;
+    LPSTR       lpControlName;
 } ACTRL_CONTROL_INFOA, *PACTRL_CONTROL_INFOA;
-typedef struct _ACTRL_CONTROL_INFOW {
-       LPWSTR      lpControlId;
-       LPWSTR      lpControlName;
+
+typedef struct _ACTRL_CONTROL_INFOW
+{
+    LPWSTR      lpControlId;
+    LPWSTR      lpControlName;
 } ACTRL_CONTROL_INFOW, *PACTRL_CONTROL_INFOW;
-typedef struct _EXPLICIT_ACCESS_A {
-       DWORD        grfAccessPermissions;
-       ACCESS_MODE  grfAccessMode;
-       DWORD        grfInheritance;
-       TRUSTEE_A    Trustee;
+
+typedef struct _EXPLICIT_ACCESS_A
+{
+    DWORD        grfAccessPermissions;
+    ACCESS_MODE  grfAccessMode;
+    DWORD        grfInheritance;
+    TRUSTEE_A    Trustee;
 } EXPLICIT_ACCESS_A, *PEXPLICIT_ACCESS_A, EXPLICIT_ACCESSA, *PEXPLICIT_ACCESSA;
-typedef struct _EXPLICIT_ACCESS_W {
-       DWORD        grfAccessPermissions;
-       ACCESS_MODE  grfAccessMode;
-       DWORD        grfInheritance;
-       TRUSTEE_W    Trustee;
+
+typedef struct _EXPLICIT_ACCESS_W
+{
+    DWORD        grfAccessPermissions;
+    ACCESS_MODE  grfAccessMode;
+    DWORD        grfInheritance;
+    TRUSTEE_W    Trustee;
 } EXPLICIT_ACCESS_W, *PEXPLICIT_ACCESS_W, EXPLICIT_ACCESSW, *PEXPLICIT_ACCESSW;
-typedef struct _OBJECTS_AND_SID {
-       DWORD   ObjectsPresent;
-       GUID    ObjectTypeGuid;
-       GUID    InheritedObjectTypeGuid;
-       SID     * pSid;
+
+typedef struct _OBJECTS_AND_SID
+{
+    DWORD   ObjectsPresent;
+    GUID    ObjectTypeGuid;
+    GUID    InheritedObjectTypeGuid;
+    SID     *pSid;
 } OBJECTS_AND_SID, *POBJECTS_AND_SID;
-typedef struct _OBJECTS_AND_NAME_A {
-       DWORD    ObjectsPresent;
-       SE_OBJECT_TYPE ObjectType;
-       LPSTR    ObjectTypeName;
-       LPSTR    InheritedObjectTypeName;
-       LPSTR    ptstrName;
+
+typedef struct _OBJECTS_AND_NAME_A
+{
+    DWORD    ObjectsPresent;
+    SE_OBJECT_TYPE ObjectType;
+    LPSTR    ObjectTypeName;
+    LPSTR    InheritedObjectTypeName;
+    LPSTR    ptstrName;
 } OBJECTS_AND_NAME_A, *POBJECTS_AND_NAME_A;
-typedef struct _OBJECTS_AND_NAME_W {
-       DWORD          ObjectsPresent;
-       SE_OBJECT_TYPE ObjectType;
-       LPWSTR   ObjectTypeName;
-       LPWSTR   InheritedObjectTypeName;
-       LPWSTR   ptstrName;
+
+typedef struct _OBJECTS_AND_NAME_W
+{
+    DWORD          ObjectsPresent;
+    SE_OBJECT_TYPE ObjectType;
+    LPWSTR   ObjectTypeName;
+    LPWSTR   InheritedObjectTypeName;
+    LPWSTR   ptstrName;
 } OBJECTS_AND_NAME_W, *POBJECTS_AND_NAME_W;
+
 #if (_WIN32_WINNT >= 0x0501)
-typedef struct {
-       LONG     GenerationGap;
-       LPSTR    AncestorName;
+typedef struct
+{
+    LONG     GenerationGap;
+    LPSTR    AncestorName;
 } INHERITED_FROMA, *PINHERITED_FROMA;
-typedef struct {
-       LONG     GenerationGap;
-       LPWSTR   AncestorName;
+
+typedef struct
+{
+    LONG     GenerationGap;
+    LPWSTR   AncestorName;
 } INHERITED_FROMW, *PINHERITED_FROMW;
 #endif /* (_WIN32_WINNT >= 0x0501) */
 
@@ -323,6 +392,7 @@ typedef struct _SI_OBJECT_INFO
     LPWSTR    pszPageTitle;
     GUID      guidObjectType;
 } SI_OBJECT_INFO, *PSI_OBJECT_INFO;
+
 typedef struct _SI_ACCESS
 {
     const GUID  *pguid;
@@ -330,15 +400,17 @@ typedef struct _SI_ACCESS
     LPCWSTR     pszName;
     DWORD       dwFlags;
 } SI_ACCESS, *PSI_ACCESS;
+
 typedef struct _SI_INHERIT_TYPE
 {
     const GUID *pguid;
     ULONG      dwFlags;
     LPCWSTR    pszName;
 } SI_INHERIT_TYPE, *PSI_INHERIT_TYPE;
+
 typedef enum _SI_PAGE_TYPE
 {
-    SI_PAGE_PERM     = 0,
+    SI_PAGE_PERM = 0,
     SI_PAGE_ADVPERM,
     SI_PAGE_AUDIT,
     SI_PAGE_OWNER
@@ -359,15 +431,15 @@ typedef enum _PROG_INVOKE_SETTING
 } PROG_INVOKE_SETTING, *PPROG_INVOKE_SETTING;
 
 typedef VOID (WINAPI *FN_PROGRESSW)(LPWSTR pObjectName,
-                                     DWORD Status,
-                                     PPROG_INVOKE_SETTING pInvokeSetting,
-                                     PVOID Args,
-                                     BOOL SecuritySet);
+                                    DWORD Status,
+                                    PPROG_INVOKE_SETTING pInvokeSetting,
+                                    PVOID Args,
+                                    BOOL SecuritySet);
 typedef VOID (WINAPI *FN_PROGRESSA)(LPSTR pObjectName,
-                                     DWORD Status,
-                                     PPROG_INVOKE_SETTING pInvokeSetting,
-                                     PVOID Args,
-                                     BOOL SecuritySet);
+                                    DWORD Status,
+                                    PPROG_INVOKE_SETTING pInvokeSetting,
+                                    PVOID Args,
+                                    BOOL SecuritySet);
 
 #ifdef UNICODE
 #define ACCCTRL_DEFAULT_PROVIDER ACCCTRL_DEFAULT_PROVIDERW
@@ -383,6 +455,7 @@ typedef EXPLICIT_ACCESS_W EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
 typedef EXPLICIT_ACCESSW EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
 typedef TRUSTEE_ACCESSW TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
 typedef OBJECTS_AND_NAME_W OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
+
 #if (_WIN32_WINNT >= 0x0501)
 typedef INHERITED_FROMW INHERITED_FROM, *PINHERITED_FROM;
 typedef FN_PROGRESSW FN_PROGRESS;
@@ -402,14 +475,17 @@ typedef EXPLICIT_ACCESS_A EXPLICIT_ACCESS_, *PEXPLICIT_ACCESS_;
 typedef EXPLICIT_ACCESSA EXPLICIT_ACCESS, *PEXPLICIT_ACCESS;
 typedef TRUSTEE_ACCESSA TRUSTEE_ACCESS, *PTRUSTEE_ACCESS;
 typedef OBJECTS_AND_NAME_A OBJECTS_AND_NAME_, *POBJECTS_AND_NAME_;
+
 #if (_WIN32_WINNT >= 0x0501)
 typedef INHERITED_FROMA INHERITED_FROM, *PINHERITED_FROM;
 typedef FN_PROGRESSA FN_PROGRESS;
 #define HAS_FN_PROGRESSA
-#endif
+#endif /* (_WIN32_WINNT >= 0x0501) */
+
 #endif /* UNICODE */
 
 #ifdef __cplusplus
 }
 #endif
-#endif
+
+#endif /* _ACCCTRL_H */
index 58ef433..9f4f9b0 100644 (file)
@@ -25,3 +25,4 @@ DEFINE_GUID(GUID_DEVCLASS_NETCLIENT,     0x4D36E973, 0xE325, 0x11CE, 0xBF, 0xC1,
 DEFINE_GUID(GUID_DEVCLASS_NETSERVICE,    0x4D36E974, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
 DEFINE_GUID(GUID_DEVCLASS_NETTRANS,      0x4D36E975, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
 DEFINE_GUID(GUID_DEVCLASS_DISKDRIVE,     0x4D36E967, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
+DEFINE_GUID(GUID_DEVCLASS_SOUND,         0x4d36e97C, 0xe325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
index 1f93258..1a39dee 100644 (file)
@@ -196,6 +196,7 @@ GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics*,REAL*);
 GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics*,REAL*);
 GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage*,GpGraphics**);
 GpStatus WINGDIPAPI GdipGetInterpolationMode(GpGraphics*,InterpolationMode*);
+GpStatus WINGDIPAPI GdipGetNearestColor(GpGraphics*,ARGB*);
 GpStatus WINGDIPAPI GdipGetPageScale(GpGraphics*,REAL*);
 GpStatus WINGDIPAPI GdipGetPageUnit(GpGraphics*,GpUnit*);
 GpStatus WINGDIPAPI GdipGetPixelOffsetMode(GpGraphics*,PixelOffsetMode*);
@@ -255,6 +256,8 @@ GpStatus WINGDIPAPI GdipAddPathCurve(GpPath*,GDIPCONST GpPointF*,INT);
 GpStatus WINGDIPAPI GdipAddPathCurveI(GpPath*,GDIPCONST GpPoint*,INT);
 GpStatus WINGDIPAPI GdipAddPathCurve2(GpPath*,GDIPCONST GpPointF*,INT,REAL);
 GpStatus WINGDIPAPI GdipAddPathCurve2I(GpPath*,GDIPCONST GpPoint*,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathCurve3(GpPath*,GDIPCONST GpPointF*,INT,INT,INT,REAL);
+GpStatus WINGDIPAPI GdipAddPathCurve3I(GpPath*,GDIPCONST GpPoint*,INT,INT,INT,REAL);
 GpStatus WINGDIPAPI GdipAddPathEllipse(GpPath*,REAL,REAL,REAL,REAL);
 GpStatus WINGDIPAPI GdipAddPathEllipseI(GpPath*,INT,INT,INT,INT);
 GpStatus WINGDIPAPI GdipAddPathLine(GpPath*,REAL,REAL,REAL,REAL);
index 5ca3566..e5e4094 100644 (file)
@@ -31,6 +31,10 @@ typedef struct _GUID
 } GUID;
 #endif
 
+#ifndef DECLSPEC_SELECTANY
+#define DECLSPEC_SELECTANY __declspec(selectany)
+#endif
+
 #undef DEFINE_GUID
 
 #ifdef INITGUID
index 3a3d9e4..e0bc2fd 100644 (file)
@@ -25,6 +25,8 @@ typedef struct IAVIFile *PAVIFILE;
 typedef struct IGetFrame *PGETFRAME;
 typedef struct IAVIEditStream *PAVIEDITSTREAM;
 
+#define ICVERSION 0x0104
+
 #define        ICERR_OK        0
 #define        ICERR_DONTDRAW  1
 #define        ICERR_NEWPALETTE        2
index f5e9fd0..9cd411c 100644 (file)
@@ -1072,6 +1072,7 @@ extern "C" {
 #define LR_LOADTRANSPARENT 32
 #define LR_DEFAULTSIZE 64
 #define LR_LOADREALSIZE 128
+#define LR_VGACOLOR 128
 #define LR_LOADMAP3DCOLORS 4096
 #define LR_CREATEDIBSECTION 8192
 #define LR_COPYFROMRESOURCE 0x4000
index aa5a6d7..effb678 100644 (file)
@@ -49,8 +49,7 @@ typedef struct __SEH2Frame
 {
        _SEH2Registration_t SF_Registration;
        volatile struct __SEH2TryLevel * volatile SF_TopTryLevel;
-       void * volatile SF_FramePointer;
-       void * volatile SF_StackPointer;
+       struct _EXCEPTION_POINTERS * volatile SF_ExceptionInformation;
        volatile unsigned long SF_Code;
 }
 _SEH2Frame_t;
@@ -58,9 +57,10 @@ _SEH2Frame_t;
 typedef struct __SEH2TryLevel
 {
        volatile struct __SEH2TryLevel * ST_Next;
-       void * ST_FramePointer;
        void * ST_Filter;
        void * ST_Body;
+       void * volatile ST_Ebp;
+       void * volatile ST_Esp;
 }
 _SEH2TryLevel_t;
 
@@ -123,32 +123,40 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
 #define __SEH_PRETEND_SIDE_EFFECT (void)0
 
 /* Forces GCC to consider the specified label reachable */
-#define __SEH_USE_LABEL(L_) __asm__ __volatile__("# %0\n" : : "i" (&&L_))
+#define __SEH_USE_LABEL(L_) if(__SEH_VOLATILE_FALSE) goto L_;
 
 /* Makes GCC pretend the specified label is reachable, to silence warnings */
 #define __SEH_PRETEND_USE_LABEL(L_) (void)(&&L_)
 
-/* Forces GCC to emit the specified nested function as a function */
-#define __SEH_USE_NESTED_FUNCTION(F_) (void)(&F_) /* __attribute__((noinline)) seems to do the trick */
-
 /* Soft memory barrier */
 #define __SEH_BARRIER __asm__ __volatile__("#":::"memory")
 
 /* GCC doesn't know that this equals zero */
-#define __SEH_ZERO ({ int zero = 0; __asm__ __volatile__("#" : "+g" (zero)); zero; })
+#define __SEH_VOLATILE_ZERO ({ int zero = 0; __asm__ __volatile__("#" : "+g" (zero)); zero; })
+
+/* GCC believes this is setjmp */
+#define __SEH_PRETEND_SETJMP() (_SEH2PretendSetjmp(), 0)
+
+#define __SEH_VOLATILE_FALSE __builtin_expect(__SEH_VOLATILE_ZERO, 0)
+#define __SEH_VOLATILE_TRUE  __builtin_expect(!__SEH_VOLATILE_ZERO, 1)
 
-#define __SEH_FALSE __builtin_expect(__SEH_ZERO, 0)
-#define __SEH_TRUE  __builtin_expect(!__SEH_ZERO, 1)
+#define ___SEH_STRINGIFY(X_) # X_
+#define __SEH_STRINGIFY(X_) ___SEH_STRINGIFY(X_)
+
+static
+__inline__
+__attribute__((returns_twice))
+__attribute__((always_inline))
+void _SEH2PretendSetjmp(void)
+{
+}
 
 #define __SEH_FORCE_NEST \
        __asm__ __volatile__("#%0" : : "r" (&_SEHFrame))
 
-#define __SEH_NESTED_PROLOG \
-       __SEH_FORCE_NEST;
-
-#define __SEH_DECLARE_EXCEPT_PFN(NAME_) int (__cdecl * NAME_)(void *)
-#define __SEH_DECLARE_EXCEPT(NAME_) int __cdecl NAME_(void *)
-#define __SEH_DEFINE_EXCEPT(NAME_) int __cdecl NAME_(void * _SEHExceptionPointers)
+#define __SEH_DECLARE_EXCEPT_PFN(NAME_) int (__cdecl * NAME_)(void)
+#define __SEH_DECLARE_EXCEPT(NAME_) int __cdecl NAME_(void)
+#define __SEH_DEFINE_EXCEPT(NAME_) int __cdecl NAME_(void)
 
 #define __SEH_DECLARE_FINALLY_PFN(NAME_) void (__cdecl * NAME_)(void)
 #define __SEH_DECLARE_FINALLY(NAME_) void __cdecl NAME_(void)
@@ -158,21 +166,19 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
 #define __SEH_RETURN_FINALLY() return
 
 #define __SEH_BEGIN_TRY \
+       if(!__SEH_PRETEND_SETJMP()) \
        { \
-               __label__ _SEHBeginTry; \
                __label__ _SEHEndTry; \
-        \
-               __SEH_USE_LABEL(_SEHBeginTry); \
-               __SEH_USE_LABEL(_SEHEndTry); \
-        \
-               _SEHBeginTry: __SEH_SIDE_EFFECT; \
+ \
+               __SEH_PRETEND_USE_LABEL(_SEHEndTry); \
+ \
                { \
                        __SEH_BARRIER;
 
 #define __SEH_END_TRY \
                        __SEH_BARRIER; \
                } \
-               _SEHEndTry: __SEH_SIDE_EFFECT; \
+               _SEHEndTry:; \
        }
 
 #define __SEH_SET_TRYLEVEL(TRYLEVEL_) \
@@ -191,21 +197,14 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
 #define __SEH_BEGIN_SCOPE \
        for(;;) \
        { \
-               __label__ _SEHBeginScope; \
-               __label__ _SEHEndScope; \
- \
-               _SEHBeginScope: __SEH_SIDE_EFFECT; \
- \
                const int _SEHTopTryLevel = (_SEH2ScopeKind != 0); \
                _SEH2Frame_t * const _SEHCurFrameP = _SEH2FrameP; \
                volatile _SEH2TryLevel_t * const _SEHPrevTryLevelP = _SEH2TryLevelP; \
+               __attribute__((unused)) int _SEHAbnormalTermination; \
  \
         (void)_SEHTopTryLevel; \
         (void)_SEHCurFrameP; \
         (void)_SEHPrevTryLevelP; \
- \
-               __SEH_USE_LABEL(_SEHBeginScope); \
-               __SEH_USE_LABEL(_SEHEndScope); \
  \
                { \
                        __label__ _SEHBeforeTry; \
@@ -230,15 +229,10 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
                        __SEH_ENTER_TRYLEVEL(); \
  \
                        if(_SEHTopTryLevel) \
-                       { \
-                               __SEH_BARRIER; __asm__ __volatile__("mov %%ebp, %0\n#%1" : "=m" (_SEHFrame.SF_FramePointer) : "r" (__builtin_frame_address(0))); __SEH_BARRIER; \
                                _SEH2EnterFrame(&_SEHFrame); \
-                       } \
 
 #define __SEH_END_SCOPE \
                } \
- \
-               _SEHEndScope: __SEH_SIDE_EFFECT; \
  \
                break; \
        }
@@ -247,14 +241,13 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
        __label__ _SEHBeginExcept; \
        __label__ _SEHEndExcept; \
  \
-       auto __SEH_DECLARE_EXCEPT(_SEHExcept); \
        auto __SEH_DECLARE_FINALLY(_SEHFinally);
 
 #define _SEH2_TRY \
        __SEH_BEGIN_SCOPE \
        { \
                __SEH_SCOPE_LOCALS; \
-\
+ \
                __SEH_BEGIN_TRY \
                {
 
@@ -268,14 +261,15 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
                __SEH_PRETEND_USE_LABEL(_SEHBeginExcept); \
                __SEH_PRETEND_USE_LABEL(_SEHEndExcept); \
  \
-               __SEH_USE_NESTED_FUNCTION(_SEHFinally); \
- \
-               _SEHTryLevel.ST_FramePointer = _SEHClosureFromTrampoline((_SEHTrampoline_t *)&_SEHFinally); \
                _SEHTryLevel.ST_Filter = 0; \
-               _SEHTryLevel.ST_Body = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)&_SEHFinally); \
+               _SEHTryLevel.ST_Body = &_SEHFinally; \
+ \
+               _SEHAbnormalTermination = 1; \
  \
                goto _SEHDoTry; \
                _SEHAfterTry:; \
+ \
+               _SEHAbnormalTermination = 0; \
  \
                if(_SEHTopTryLevel) \
                        _SEH2LeaveFrame(); \
@@ -287,50 +281,74 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
                _SEHFinally(); \
                goto _SEHEndExcept; \
  \
-               _SEHBeginExcept: __SEH_PRETEND_SIDE_EFFECT; \
-               __attribute__((unused)) __SEH_DEFINE_EXCEPT(_SEHExcept) { __SEH_RETURN_EXCEPT(0); } \
+               _SEHBeginExcept:; \
  \
-               __attribute__((noinline)) __attribute__((used)) __SEH_DEFINE_FINALLY(_SEHFinally) \
+               __attribute__((noinline)) __SEH_DEFINE_FINALLY(_SEHFinally) \
                { \
                        __SEH_END_SCOPE_CHAIN; \
  \
                        (void)_SEH2ScopeKind; \
                        (void)_SEH2FrameP; \
                        (void)_SEH2TryLevelP; \
- \
-                       __SEH_NESTED_PROLOG; \
  \
                        for(;; ({ __SEH_RETURN_FINALLY(); })) \
                        {
 
-#define _SEH2_EXCEPT(E_) \
+#define _SEH2_EXCEPT(...) \
                } \
                __SEH_END_TRY; \
  \
                goto _SEHAfterTry; \
  \
                _SEHBeforeTry:; \
-\
-               __SEH_USE_LABEL(_SEHBeginExcept); \
-               __SEH_USE_LABEL(_SEHEndExcept); \
-\
-               __SEH_USE_NESTED_FUNCTION(_SEHExcept); \
- \
-               _SEHTryLevel.ST_FramePointer = _SEHClosureFromTrampoline((_SEHTrampoline_t *)&_SEHExcept); \
-               _SEHTryLevel.ST_Filter = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)&_SEHExcept); \
-               _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
-               __SEH_BARRIER; __asm__ __volatile__("mov %%esp, %0" : "=m" (_SEH2FrameP->SF_StackPointer)); __SEH_BARRIER; \
-\
-               goto _SEHDoTry; \
-\
-               __attribute__((noinline)) __attribute__((used)) __SEH_DEFINE_EXCEPT(_SEHExcept) \
+ \
+               if(__builtin_constant_p((__VA_ARGS__))) \
+               { \
+                       if((__VA_ARGS__) > 0) \
+                       { \
+                               _SEHTryLevel.ST_Filter = (void *)1; \
+                               _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
+                               __SEH_USE_LABEL(_SEHBeginExcept); \
+                       } \
+                       else if((__VA_ARGS__) < 0) \
+                       { \
+                               _SEHTryLevel.ST_Filter = (void *)-1; \
+                               _SEHTryLevel.ST_Body = NULL; \
+                       } \
+                       else \
+                       { \
+                               _SEHTryLevel.ST_Filter = (void *)0; \
+                               _SEHTryLevel.ST_Body = NULL; \
+                       } \
+               } \
+               else \
                { \
-                       __SEH_NESTED_PROLOG; \
-                       __SEH_RETURN_EXCEPT(E_); \
+                       __SEH_DEFINE_EXCEPT(_SEHExcept) \
+                       { \
+                               __SEH_RETURN_EXCEPT((__VA_ARGS__)); \
+                       } \
+ \
+                       _SEHTryLevel.ST_Filter = &_SEHExcept; \
+                       _SEHTryLevel.ST_Body = &&_SEHBeginExcept; \
+                       __SEH_USE_LABEL(_SEHBeginExcept); \
                } \
-\
+ \
+               __SEH_BARRIER; \
+ \
+               __asm__ __volatile__ \
+               ( \
+                       "mov %%ebp, %0\n" \
+                       "mov %%esp, %1" : \
+                       "=m" (_SEHTryLevel.ST_Ebp), \
+                       "=m" (_SEHTryLevel.ST_Esp) \
+               ); \
+ \
+               __SEH_BARRIER; \
+ \
+               goto _SEHDoTry; \
+ \
                __attribute__((unused)) __SEH_DEFINE_FINALLY(_SEHFinally) { __SEH_RETURN_FINALLY(); } \
-\
+ \
                _SEHAfterTry:; \
                if(_SEHTopTryLevel) \
                        _SEH2LeaveFrame(); \
@@ -339,12 +357,9 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
                        __SEH_LEAVE_TRYLEVEL(); \
                } \
  \
-               if(__SEH_FALSE) \
-                       goto _SEHBeginExcept; \
-               else \
-                       goto _SEHEndExcept; \
-\
-               _SEHBeginExcept: __SEH_SIDE_EFFECT; \
+               goto _SEHEndExcept; \
+ \
+               _SEHBeginExcept:; \
                { \
                        { \
                                _SEH2Frame_t * const _SEH2FrameP = _SEHTopTryLevel ? &_SEHFrame : _SEHCurFrameP; \
@@ -355,13 +370,14 @@ void * _SEHClosureFromTrampoline(_SEHTrampoline_t * trampoline_)
                                __SEH_BARRIER; \
                        } \
                } \
-               _SEHEndExcept: __SEH_SIDE_EFFECT; \
+ \
+               _SEHEndExcept:; \
        } \
        __SEH_END_SCOPE;
 
-#define _SEH2_GetExceptionInformation() ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers)
+#define _SEH2_GetExceptionInformation() ((_SEH2FrameP)->SF_ExceptionInformation)
 #define _SEH2_GetExceptionCode() ((_SEH2FrameP)->SF_Code)
-#define _SEH2_AbnormalTermination() (!!_SEH2_GetExceptionCode())
+#define _SEH2_AbnormalTermination() (_SEHAbnormalTermination)
 
 #define _SEH2_YIELD(STMT_) \
        for(;;) \
@@ -382,7 +398,7 @@ __SEH_END_SCOPE_CHAIN;
 
 #define _SEH2_TRY __try
 #define _SEH2_FINALLY __finally
-#define _SEH2_EXCEPT(E_) __except((E_))
+#define _SEH2_EXCEPT(...) __except(__VA_ARGS__)
 #define _SEH2_END
 
 #define _SEH2_GetExceptionInformation() (GetExceptionInformation())
diff --git a/reactos/lib/3rdparty/mingw/argv.c b/reactos/lib/3rdparty/mingw/argv.c
deleted file mode 100644 (file)
index a4a954c..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef CRTDLL
-#undef CRTDLL
-#endif
-
-#include "internal.h"
-
-extern int _dowildcard;
-
-#ifdef WPRFLAG
-int __CRTDECL
-__wsetargv (void)
-#else
-int __CRTDECL
-__setargv (void)
-#endif
-{
-  _dowildcard = 1;
-  return 0;
-}
index 05cd498..bcc6828 100644 (file)
@@ -6,7 +6,6 @@
        <include base="mingw_common">include</include>
        <file>_newmode.c</file>
        <file>_wgetopt.c</file>
-       <file>argv.c</file>
        <file>atonexit.c</file>
        <file>binmode.c</file>
        <file>charmax.c</file>
        <file>xthdloc.c</file>
        <file>xtxtmode.c</file>
 </module>
-<module name="mingw_main" type="staticlibrary" isstartuplib="true" allowwarnings="true" crt="dll">
+<module name="mingw_main" type="staticlibrary" isstartuplib="true" crt="dll">
        <include base="mingw_common">include</include>
        <library>mingw_common</library>
        <file>crt0_c.c</file>
        <file>crtexe.c</file>
        <file>dllargv.c</file>
 </module>
-<module name="mingw_wmain" type="staticlibrary" isstartuplib="true" allowwarnings="true" unicode="yes" crt="dll">
+<module name="mingw_wmain" type="staticlibrary" isstartuplib="true" unicode="yes" crt="dll">
        <include base="mingw_common">include</include>
        <library>mingw_common</library>
        <define name="WPRFLAG"/>
index 3fb7833..73ef1aa 100644 (file)
@@ -40,7 +40,7 @@
 extern _SEH2Registration_t * __cdecl _SEH2CurrentRegistration(void);
 extern void _SEH2GlobalUnwind(void *);
 
-extern int __SEH2Except(void *, void *, void *);
+extern int __SEH2Except(void *, void *);
 extern void __SEH2Finally(void *, void *);
 extern DECLSPEC_NORETURN int __SEH2Handle(void *, void *, void *);
 
@@ -51,18 +51,45 @@ extern int __cdecl __SEH2FrameHandler(struct _EXCEPTION_RECORD *, void *, struct
 extern int __cdecl __SEH2NestedHandler(struct _EXCEPTION_RECORD *, void *, struct _CONTEXT *, void *);
 
 FORCEINLINE
-int _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel, EXCEPTION_POINTERS * ep)
+int _SEH2Except(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
 {
-       return __SEH2Except(trylevel->ST_Filter, trylevel->ST_FramePointer, ep);
+       void * filter = trylevel->ST_Filter;
+       void * context = NULL;
+
+       if(filter == (void *)0)
+               return 0;
+
+       if(filter == (void *)1)
+               return 1;
+
+       if(filter == (void *)-1)
+               return -1;
+
+       if(_SEHIsTrampoline((_SEHTrampoline_t *)filter))
+       {
+               context = _SEHClosureFromTrampoline((_SEHTrampoline_t *)filter);
+               filter = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)filter);
+       }
+
+       return __SEH2Except(filter, context);
 }
 
-static
-#if defined(__GNUC__)
-__attribute__((noinline))
-#endif
+FORCEINLINE
 void _SEH2Finally(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
 {
-       __SEH2Finally(trylevel->ST_Body, trylevel->ST_FramePointer);
+       if(trylevel->ST_Filter == NULL && trylevel->ST_Body != NULL)
+       {
+               void * body = trylevel->ST_Body;
+               void * context = NULL;
+
+               if(_SEHIsTrampoline((_SEHTrampoline_t *)body))
+               {
+                       context = _SEHClosureFromTrampoline((_SEHTrampoline_t *)body);
+                       body = _SEHFunctionFromTrampoline((_SEHTrampoline_t *)body);
+               }
+
+               __SEH2Finally(body, context);
+       }
 }
 
 extern
@@ -91,10 +118,7 @@ void _SEH2LocalUnwind(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * dsttrylev
        __SEH2EnterFrame(&nestedframe);
 
        for(trylevel = frame->SF_TopTryLevel; trylevel && trylevel != dsttrylevel; trylevel = trylevel->ST_Next)
-       {
-               if(!trylevel->ST_Filter)
-                       _SEH2Finally(frame, trylevel);
-       }
+               _SEH2Finally(frame, trylevel);
 
        frame->SF_TopTryLevel = dsttrylevel;
 
@@ -106,7 +130,7 @@ void _SEH2Handle(_SEH2Frame_t * frame, volatile _SEH2TryLevel_t * trylevel)
 {
        _SEH2GlobalUnwind(frame);
        _SEH2LocalUnwind(frame, trylevel);
-       __SEH2Handle(trylevel->ST_Body, frame->SF_FramePointer, frame->SF_StackPointer);
+       __SEH2Handle(trylevel->ST_Body, trylevel->ST_Ebp, trylevel->ST_Esp);
 }
 
 extern
@@ -132,25 +156,22 @@ int __cdecl _SEH2FrameHandler
        {
                int ret = 0;
                volatile _SEH2TryLevel_t * trylevel;
+               EXCEPTION_POINTERS ep;
+
+               ep.ExceptionRecord = ExceptionRecord;
+               ep.ContextRecord = ContextRecord;
 
                frame->SF_Code = ExceptionRecord->ExceptionCode;
+               frame->SF_ExceptionInformation = &ep;
 
                for(trylevel = frame->SF_TopTryLevel; trylevel != NULL; trylevel = trylevel->ST_Next)
                {
-                       if(trylevel->ST_Filter)
-                       {
-                               EXCEPTION_POINTERS ep;
-
-                               ep.ExceptionRecord = ExceptionRecord;
-                               ep.ContextRecord = ContextRecord;
-
-                               ret = _SEH2Except(frame, trylevel, &ep);
+                       ret = _SEH2Except(frame, trylevel);
 
-                               if(ret < 0)
-                                       return ExceptionContinueExecution;
-                               else if(ret > 0)
-                                       _SEH2Handle(frame, trylevel);
-                       }
+                       if(ret < 0)
+                               return ExceptionContinueExecution;
+                       else if(ret > 0)
+                               _SEH2Handle(frame, trylevel);
                }
        }
 
index 4b8eef4..a67f993 100644 (file)
@@ -49,18 +49,8 @@ ___SEH2Handle:
        jmp eax
 
 .globl ___SEH2Except
-___SEH2Except:
-       mov eax, [esp+4]
-       mov ecx, [esp+8]
-
-       push [esp+12]
-       call eax
-
-       pop ecx
-
-       ret
-
 .globl ___SEH2Finally
+___SEH2Except:
 ___SEH2Finally:
        mov eax, [esp+4]
        mov ecx, [esp+8]
index e20d439..e4ffa64 100644 (file)
@@ -27,8 +27,8 @@
  */
 #define MAX_ELEM_LEN 64 /* Max length of country/language/CP string */
 
-unsigned char MSVCRT_mbctype[257] = { 0 };
-static int g_mbcp_is_multibyte = 0;
+unsigned char _mbctype[257] = { 0 };
+int g_mbcp_is_multibyte = 0;
 
 /* It seems that the data about valid trail bytes is not available from kernel32
  * so we have to store is here. The format is the same as for lead bytes in CPINFO */
@@ -671,13 +671,13 @@ int CDECL _setmbcp(int cp)
   }
 
   /* setup the _mbctype */
-  memset(MSVCRT_mbctype, 0, sizeof(MSVCRT_mbctype));
+  memset(_mbctype, 0, sizeof(_mbctype));
 
   bytes = cpi.LeadByte;
   while (bytes[0] || bytes[1])
   {
     for (i = bytes[0]; i <= bytes[1]; i++)
-      MSVCRT_mbctype[i + 1] |= _M1;
+      _mbctype[i + 1] |= _M1;
     bytes += 2;
   }
 
@@ -698,7 +698,7 @@ int CDECL _setmbcp(int cp)
         while (bytes[0] || bytes[1])
         {
           for (i = bytes[0]; i <= bytes[1]; i++)
-            MSVCRT_mbctype[i + 1] |= _M2;
+            _mbctype[i + 1] |= _M2;
           bytes += 2;
         }
         break;
@@ -713,7 +713,7 @@ int CDECL _setmbcp(int cp)
    */
   charcount = 0;
   for (i = 0; i < 256; i++)
-    if (!(MSVCRT_mbctype[i + 1] & _M1))
+    if (!(_mbctype[i + 1] & _M1))
       bufA[charcount++] = i;
 
   ret = MultiByteToWideChar(newcp, 0, bufA, charcount, bufW, charcount);
@@ -724,12 +724,12 @@ int CDECL _setmbcp(int cp)
 
   curr_type = chartypes;
   for (i = 0; i < 256; i++)
-    if (!(MSVCRT_mbctype[i + 1] & _M1))
+    if (!(_mbctype[i + 1] & _M1))
     {
        if ((*curr_type) & C1_UPPER)
-           MSVCRT_mbctype[i + 1] |= _SBUP;
+           _mbctype[i + 1] |= _SBUP;
        if ((*curr_type) & C1_LOWER)
-           MSVCRT_mbctype[i + 1] |= _SBLOW;
+           _mbctype[i + 1] |= _SBLOW;
        curr_type++;
     }
 
@@ -741,9 +741,9 @@ int CDECL _setmbcp(int cp)
      * also faster execution.
      */
     for (i = 161; i <= 165; i++)
-      MSVCRT_mbctype[i + 1] |= _MP;
+      _mbctype[i + 1] |= _MP;
     for (i = 166; i <= 223; i++)
-      MSVCRT_mbctype[i + 1] |= _MS;
+      _mbctype[i + 1] |= _MS;
   }
 
   MSVCRT___lc_collate_cp = MSVCRT___lc_codepage = newcp;
@@ -802,7 +802,15 @@ void *_Gettnames(void)
  */
 void __lconv_init(void)
 {
-  FIXME(" stub\n");
+  char Char = (char) UCHAR_MAX;
+
+  TRACE("__lconv_init()\n");
+
+  _lconv.int_frac_digits = Char;
+  _lconv.frac_digits = Char;
+  _lconv.p_sep_by_space = _lconv.n_sep_by_space = Char;
+  _lconv.p_cs_precedes = _lconv.n_cs_precedes = Char;
+  _lconv.p_sign_posn = _lconv.n_sign_posn = Char;
 }
 
 
index aae943c..9fcb085 100644 (file)
 #include <mbstring.h>
 #include <mbctype.h>
 
-unsigned char _mbctype[257] = {
-    0,                                              /* EOF */
-    0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , /* 0 */
-    0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , /* 1 */
-    B ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P ,P , /* 2 */
-    D ,D ,D ,P ,D ,D ,D ,D ,D ,D ,P ,P ,P ,P ,P ,P , /* 3 */
-    PT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT, /* 4 */
-    AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,PT,PT,PT,PT,PT, /* 5 */
-    PT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT, /* 6 */
-    AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,AT,PT,PT,PT,PT,0 , /* 7 */
-    T ,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT, /* 8 */
-    LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT, /* 9 */
-    T ,GT,GT,GT,GT,GT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT, /* A */
-    KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT, /* B */
-    KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT, /* C */
-    KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,KT,GT,GT, /* D */
-    LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT, /* E */
-    LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,LT,0 ,0 ,0 ,  /* F */
-};
-
 /*
  * @implemented
  */
index 26d52bf..9b315ae 100644 (file)
@@ -1,39 +1,45 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
- * FILE:        lib/sdk/crt/mbstring/iskana.c
- * PURPOSE: 
- * PROGRAMER:
- * UPDATE HISTORY:
- *              12/04/99:  Ariadne, Taiji Yamada Created
- *              05/30/08:  Samuel Serapion adapted from PROJECT C Library
+ * FILE:        lib/sdk/crt/mbstring/ismblead.c
+ * PURPOSE:      Checks for a leading byte
+ * PROGRAMERS:
+ *              Copyright 1999 Ariadne, Taiji Yamada
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *              Copyright 2008 Samuel Serapion adapted from PROJECT C Library
  *
  */
 
 #include <precomp.h>
-
-size_t _mbclen2(const unsigned int s);
+#include <mbctype.h>
 
 /*
  * @implemented
  */
 int _ismbblead(unsigned int c)
 {
-   return (_mbctype[c & 0xff] & _MLEAD);
+  return (_mbctype[(c&0xff) + 1] & _M1) != 0;
 }
 
 /*
  * @implemented
  */
-int _ismbslead( const unsigned char *str, const unsigned char *t)
+int _ismbslead( const unsigned char *start, const unsigned char *str)
 {
-       unsigned char *s = (unsigned char *)str;
-       while(*s != 0 && s != t)
-       {
-
-               s+= _mbclen2(*s);
-       }
-       return _ismbblead( *s);
+  int lead = 0;
+
+  /* Lead bytes can also be trail bytes so we need to analyse the string
+   */
+  while (start <= str)
+  {
+    if (!*start)
+      return 0;
+    lead = !lead && _ismbblead(*start);
+    start++;
+  }
+
+  return lead ? -1 : 0;
 }
 
 /*
@@ -41,7 +47,7 @@ int _ismbslead( const unsigned char *str, const unsigned char *t)
  */
 const unsigned char *__p__mbctype(void)
 {
-       return _mbctype;
+  return _mbctype;
 }
 
 
index 574733a..7b5b630 100644 (file)
@@ -1,14 +1,17 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/mbstring/ismbtrl.c
+ * FILE:        lib/sdk/crt/mbstring/ismbtrl.c
  * PURPOSE:     Checks for a trailing byte
- * PROGRAMER:   Ariadne
- * UPDATE HISTORY:
- *              12/04/99: Created
+ * PROGRAMERS:
+ *              Copyright 1999 Ariadne
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
  */
 
 #include <precomp.h>
+#include <mbctype.h>
 
 size_t _mbclen2(const unsigned int s);
 
@@ -19,21 +22,18 @@ size_t _mbclen2(const unsigned int s);
  */
 int _ismbbtrail(unsigned int c)
 {
-   return (_mbctype[c & 0xff] & _MTRAIL);
+  return (_mbctype[(c&0xff) + 1] & _M2) != 0;
 }
 
 
 /*
  * @implemented
  */
-int _ismbstrail( const unsigned char *str, const unsigned char *t)
+int _ismbstrail( const unsigned char *start, const unsigned char *str)
 {
-       unsigned char *s = (unsigned char *)str;
-       while(*s != 0 && s != t)
-       {
-
-               s+= _mbclen2(*s);
-       }
-
-       return _ismbbtrail(*s);
+  /* Note: this function doesn't check _ismbbtrail */
+  if ((str > start) && _ismbslead(start, str-1))
+    return -1;
+  else
+    return 0;
 }
index 7f1f774..e1a21bd 100644 (file)
@@ -1,11 +1,13 @@
 /*
  * COPYRIGHT:   See COPYING in the top level directory
  * PROJECT:     ReactOS system libraries
- * FILE:        lib/msvcrt/mbstring/mbbtype.c
+ * FILE:        lib/sdk/crt/mbstring/mbbtype.c
  * PURPOSE:     Determines the type of a multibyte character
- * PROGRAMER:   Ariadne
- * UPDATE HISTORY:
- *              12/04/99: Created
+ * PROGRAMERS:   
+ *              Copyright 1999 Ariadne
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
  */
 
 #include <precomp.h>
@@ -48,7 +50,28 @@ int _mbbtype(unsigned char c , int type)
  */
 int _mbsbtype( const unsigned char *str, size_t n )
 {
-       if ( str == NULL )
-               return -1;
-       return _mbbtype(*(str+n),1);
+  int lead = 0;
+  const unsigned char *end = str + n;
+
+  /* Lead bytes can also be trail bytes so we need to analyse the string.
+   * Also we must return _MBC_ILLEGAL for chars past the end of the string
+   */
+  while (str < end) /* Note: we skip the last byte - will check after the loop */
+  {
+    if (!*str)
+      return _MBC_ILLEGAL;
+    lead = !lead && _ismbblead(*str);
+    str++;
+  }
+
+  if (lead)
+    if (_ismbbtrail(*str))
+      return _MBC_TRAIL;
+    else
+      return _MBC_ILLEGAL;
+  else
+    if (_ismbblead(*str))
+      return _MBC_LEAD;
+    else
+      return _MBC_SINGLE;
 }
index b48e126..b1c7c33 100644 (file)
@@ -1,15 +1,23 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbccpy.c
+ * PURPOSE:     Copies a multi byte character
+ * PROGRAMERS:
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
+
 #include <mbstring.h>
 #include <string.h>
 
-size_t _mbclen2(const unsigned int s);
-
 /*
  * @implemented
  */
 void _mbccpy(unsigned char *dst, const unsigned char *src)
 {
-  if (!_ismbblead(*src) )
-    return;
-
-  memcpy(dst,src,_mbclen2(*src));
+  *dst = *src;
+  if(_ismbblead(*src))
+    *++dst = *++src; /* MB char */
 }
index 414852d..e186674 100644 (file)
@@ -1,18 +1,30 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbclen.c
+ * PURPOSE:      Determines the length of a multi byte character
+ * PROGRAMERS:
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
+
 #include <mbstring.h>
 #include <stdlib.h>
 
+int isleadbyte(int byte);
 
 /*
  * @implemented
  */
 size_t _mbclen(const unsigned char *s)
 {
-       return (_ismbblead(*s>>8) && _ismbbtrail(*s&0x00FF)) ? 2 : 1;
+  return _ismbblead(*s) ? 2 : 1;
 }
 
 size_t _mbclen2(const unsigned int s)
 {
-       return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1;
+  return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1;
 }
 
 /*
@@ -20,14 +32,11 @@ size_t _mbclen2(const unsigned int s)
  *
  * @implemented
  */
-int mblen( const char *s, size_t count )
+int mblen( const char *str, size_t size )
 {
-       size_t l;
-       if ( s == NULL )
-               return 0;
-
-       l =  _mbclen((const unsigned char *)s);
-       if ( l < count )
-               return -1;
-       return l;
+  if (str && *str && size)
+  {
+    return !isleadbyte(*str) ? 1 : (size>1 ? 2 : -1);
+  }
+  return 0;
 }
index 6773329..5093796 100644 (file)
@@ -1,18 +1,32 @@
-#include <mbstring.h>
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbslen.c
+ * PURPOSE:      Determines the length of a multi byte string
+ * PROGRAMERS:
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
 
-size_t _mbclen2(const unsigned int s);
+#include <mbstring.h>
 
 /*
  * @implemented
  */
 size_t _mbslen(const unsigned char *str)
 {
-       int i = 0;
-       unsigned char *s;
-
-       if (str == 0)
-               return 0;
-
-       for (s = (unsigned char *)str; *s; s+=_mbclen2(*s),i++);
-       return i;
+  size_t len = 0;
+  while(*str)
+  {
+    if (_ismbblead(*str))
+    {
+      str++;
+      if (!*str)  /* count only full chars */
+        break;
+    }
+    str++;
+    len++;
+  }
+  return len;
 }
index 2b176bf..016765e 100644 (file)
@@ -3,48 +3,55 @@
  * PROJECT:     ReactOS system libraries
  * FILE:        lib/msvcrt/mbstring/mbsncpy.c
  * PURPOSE:     Copies a string to a maximum of n bytes or characters
- * PROGRAMER:   Ariadne
- * UPDATE HISTORY:
- *              12/04/99: Created
+ * PROGRAMERS:
+ *              Copyright 1999 Ariadne
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
  */
 
 #include <mbstring.h>
 
+extern int g_mbcp_is_multibyte;
 
 /*
  * @implemented
  */
-unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n)
+unsigned char* _mbsncpy(unsigned char *dst, const unsigned char *src, size_t n)
 {
-       unsigned char *s1 = (unsigned char *)str1;
-       unsigned char *s2 = (unsigned char *)str2;
-
-       unsigned short *short_s1, *short_s2;
-
-       if (n == 0)
-               return 0;
-       do {
-
-               if (*s2 == 0)
-                       break;
+  unsigned char* ret = dst;
+  if(!n)
+    return dst;
+  if (g_mbcp_is_multibyte)
+  {
+    while (*src && n)
+    {
+      n--;
+      if (_ismbblead(*src))
+      {
+        if (!*(src+1))
+        {
+            *dst++ = 0;
+            *dst++ = 0;
+            break;
+        }
 
-               if (  !_ismbblead(*s2) ) {
+        *dst++ = *src++;
+      }
 
-                       *s1 = *s2;
-                       s1 += 1;
-                       s2 += 1;
-                       n--;
-               }
-               else {
-                       short_s1 = (unsigned short *)s1;
-                       short_s2 = (unsigned short *)s2;
-                       *short_s1 = *short_s2;
-                       s1 += 2;
-                       s2 += 2;
-                       n--;
-               }
-       } while (n > 0);
-       return str1;
+      *dst++ = *src++;
+    }
+  }
+  else
+  {
+    while (n)
+    {
+        n--;
+        if (!(*dst++ = *src++)) break;
+    }
+  }
+  while (n--) *dst++ = 0;
+  return ret;
 }
 
 
@@ -55,37 +62,32 @@ unsigned char* _mbsncpy(unsigned char *str1, const unsigned char *str2, size_t n
  *
  * @implemented
  */
-unsigned char * _mbsnbcpy(unsigned char *str1, const unsigned char *str2, size_t n)
+unsigned char * _mbsnbcpy(unsigned char *dst, const unsigned char *src, size_t n)
 {
-       unsigned char *s1 = (unsigned char *)str1;
-       unsigned char *s2 = (unsigned char *)str2;
-
-       unsigned short *short_s1, *short_s2;
-
-       if (n == 0)
-               return 0;
-       do {
-
-        if (*s2 == 0) {
-                       *s1 = *s2;
-                       break;
-        }
-
-               if (  !_ismbblead(*s2) ) {
+  unsigned char* ret = dst;
+  if(!n)
+    return dst;
+  if(g_mbcp_is_multibyte)
+  {
+    int is_lead = 0;
+    while (*src && n)
+    {
+      is_lead = (!is_lead && _ismbblead(*src));
+      n--;
+      *dst++ = *src++;
+    }
 
-                       *s1 = *s2;
-                       s1 += 1;
-                       s2 += 1;
-                       n--;
-               }
-               else {
-                       short_s1 = (unsigned short *)s1;
-                       short_s2 = (unsigned short *)s2;
-                       *short_s1 = *short_s2;
-                       s1 += 2;
-                       s2 += 2;
-                       n-=2;
-               }
-       } while (n > 0);
-       return str1;
+    if (is_lead) /* if string ends with a lead, remove it */
+      *(dst - 1) = 0;
+  }
+  else
+  {
+    while (n)
+    {
+        n--;
+        if (!(*dst++ = *src++)) break;
+    }
+  }
+  while (n--) *dst++ = 0;
+  return ret;
 }
index 667024a..f5bd724 100644 (file)
@@ -1,20 +1,23 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbsnextc.c
+ * PURPOSE:      Finds the next character in a string
+ * PROGRAMERS:
+*              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
+
 #include <precomp.h>
 #include <mbstring.h>
 
 /*
  * @implemented
  */
-unsigned int _mbsnextc (const unsigned char *src)
+unsigned int _mbsnextc (const unsigned char *str)
 {
-  unsigned char *char_src = (unsigned char *)src;
-  unsigned short *short_src = (unsigned short *)src;
-
-  if (src == NULL)
-    return 0;
-
-  if (!_ismbblead(*src))
-     return *char_src;
-  else
-     return *short_src;
-  return 0;
+  if(_ismbblead(*str))
+    return *str << 8 | str[1];
+  return *str;
 }
index 67f2fac..b07634a 100644 (file)
@@ -1,3 +1,16 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbsninc.c
+ * PURPOSE:     
+ * PROGRAMERS:   
+  *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
+
+#include <precomp.h>
+
 #include <mbstring.h>
 
 /*
  */
 unsigned char * _mbsninc(const unsigned char *str, size_t n)
 {
-       unsigned char *s = (unsigned char *)str;
-       while(*s != 0 && n > 0) {
-               if (!_ismbblead(*s) )
-                       n--;
-               s++;
-       }
+  if(!str)
+    return NULL;
+
+  while (n > 0 && *str)
+  {
+    if (_ismbblead(*str))
+    {
+      if (!*(str+1))
+         break;
+      str++;
+    }
+    str++;
+    n--;
+  }
 
-       return s;
+  return (unsigned char*)str;
 }
index e4411f1..c600bd1 100644 (file)
@@ -1,19 +1,32 @@
+/*
+ * COPYRIGHT:   See COPYING in the top level directory
+ * PROJECT:     ReactOS system libraries
+ * FILE:        lib/sdk/crt/mbstring/mbstrlen.c
+ * PURPOSE:      Determines the length of a multi byte string, current locale
+ * PROGRAMERS:
+ *              Copyright 1999 Alexandre Julliard
+ *              Copyright 2000 Jon Griffths
+ *
+ */
+
 #include <mbstring.h>
 #include <stdlib.h>
 
+int isleadbyte(int byte);
+
 /*
  * @implemented
  */
-size_t _mbstrlen( const char *string )
+size_t _mbstrlen( const char *str )
 {
-       char *s = (char *)string;
-       size_t i = 0;
-
-       while ( *s != 0 ) {
-               if ( _ismbblead(*s) )
-                       s++;
-               s++;
-               i++;
-       }
-       return i;
+  size_t len = 0;
+  while(*str)
+  {
+    /* FIXME: According to the documentation we are supposed to test for
+     * multi-byte character validity. Whatever that means
+     */
+    str += isleadbyte(*str) ? 2 : 1;
+    len++;
+  }
+  return len;
 }
index e4fc8f7..98e3cd3 100644 (file)
@@ -2167,28 +2167,10 @@ size_t CDECL fwrite(const void *ptr, size_t size, size_t nmemb, FILE* file)
  */
 wint_t CDECL fputwc(wint_t wc, FILE* file)
 {
-    if (file->_flag & _IOBINARY)
-    {
-        if (fwrite(&wc, sizeof(wc), 1, file) != 1)
-            return WEOF;
-    }
-    else
-    {
-        /* Convert to multibyte in text mode */
-        char mbc[MB_LEN_MAX];
-        int mb_return;
-
-        mb_return = wctomb(mbc, wc);
-
-        if(mb_return == -1)
-            return WEOF;
-
-        /* Output all characters */
-        if (fwrite(mbc, mb_return, 1, file) != 1)
-            return WEOF;
-    }
-
-    return wc;
+  wchar_t mwc=wc;
+  if (fwrite( &mwc, sizeof(mwc), 1, file) != 1)
+    return WEOF;
+  return wc;
 }
 
 /*********************************************************************
@@ -2292,7 +2274,7 @@ int CDECL fputc(int c, FILE* file)
       return res ? res : c;
     }
     else
-      return c;
+      return c & 0xff;
   } else {
     return _flsbuf(c, file);
   }
@@ -2321,7 +2303,7 @@ int CDECL _flsbuf(int c, FILE* file)
        unsigned char cc=c;
         int len;
        len = _write(file->_file, &cc, 1);
-        if (len == 1) return c;
+        if (len == 1) return c & 0xff;
         file->_flag |= _IOERR;
         return EOF;
   }
index fbf938c..395b7b8 100644 (file)
@@ -19,6 +19,8 @@ unsigned int _getsystime(struct tm* tp)
 {
     SYSTEMTIME Time;
     int i;
+    DWORD TimeZoneId;
+    TIME_ZONE_INFORMATION TimeZoneInformation;
 
     GetLocalTime(&Time);
 
@@ -32,14 +34,12 @@ unsigned int _getsystime(struct tm* tp)
 
     tp->tm_isdst = -1;
 
-    //FIXME GetTimeZoneInformation currently not in kernel32
-
-    //TimeZoneId =  GetTimeZoneInformation(&TimeZoneInformation );
-    //if ( TimeZoneId == TIME_ZONE_ID_DAYLIGHT ) {
-    //  tp->tm_isdst = 1;
-    //}
-    //else
-    //  tp->tm_isdst = 0;
+    TimeZoneId =  GetTimeZoneInformation(&TimeZoneInformation);
+    if (TimeZoneId == TIME_ZONE_ID_DAYLIGHT){
+      tp->tm_isdst = 1;
+    }
+    else
+      tp->tm_isdst = 0;
 
     if (tp->tm_year % 4 == 0) {
         if (tp->tm_year % 100 != 0)
index 7b47305..3f01953 100644 (file)
@@ -70,7 +70,7 @@ IopCheckVpbMounted(IN POPEN_PACKET OpenPacket,
             IopDereferenceDeviceObject(DeviceObject, FALSE);
 
             /* Check if it was a total failure */
-            if (!NT_SUCCESS(Status)) return NULL;
+            if (!NT_SUCCESS(*Status)) return NULL;
 
             /* Otherwise we were alerted */
             *Status = STATUS_WRONG_VOLUME;
index c20f10f..6b306b2 100644 (file)
@@ -89,6 +89,14 @@ KdpServiceDispatcher(ULONG Service,
                 default:
                     break;
             }
+            break;
+        }
+
+        /* Special  case for stack frame dumps */
+        case TAG('R', 'o', 's', 'D'):
+        {
+            KeRosDumpStackFrames((PULONG)Buffer1, Buffer1Length);
+            break;
         }
 #endif
         default:
index d78174b..1fd0182 100644 (file)
 @ stdcall READ_REGISTER_ULONG(ptr)
 @ stdcall READ_REGISTER_USHORT(ptr)
 #endif
-@ stdcall KeRosDumpStackFrames(ptr long)
 @ stdcall RtlAbsoluteToSelfRelativeSD(ptr ptr ptr)
 @ stdcall RtlAddAccessAllowedAce(ptr long long ptr)
 @ stdcall RtlAddAccessAllowedAceEx(ptr long long long ptr)
index a387ca6..161ed01 100644 (file)
@@ -1018,8 +1018,9 @@ NtGdiStretchDIBitsInternal(
        return 0;
    }
 
-   hBitmap = NtGdiCreateCompatibleBitmap(hDC, BitsInfo->bmiHeader.biWidth,
-                                         BitsInfo->bmiHeader.biHeight);
+   hBitmap = NtGdiCreateCompatibleBitmap( hDC,
+                                      abs(BitsInfo->bmiHeader.biWidth),
+                                      abs(BitsInfo->bmiHeader.biHeight));
    if (hBitmap == NULL)
    {
        DPRINT1("NtGdiCreateCompatibleBitmap fail create bitmap\n");
@@ -1302,14 +1303,19 @@ HBITMAP APIENTRY NtGdiCreateDIBSection(HDC hDC,
 
 HBITMAP APIENTRY
 DIB_CreateDIBSection(
-  PDC dc, BITMAPINFO *bmi, UINT usage,
-  LPVOID *bits, HANDLE section,
-  DWORD offset, DWORD ovr_pitch)
+  PDC dc,
+  BITMAPINFO *bmi,
+  UINT usage,
+  LPVOID *bits,
+  HANDLE section,
+  DWORD offset,
+  DWORD ovr_pitch)
 {
   HBITMAP res = 0;
   BITMAPOBJ *bmp = NULL;
   DIBSECTION *dib = NULL;
   void *mapBits = NULL;
+  PDC_ATTR pDc_Attr;
 
   // Fill BITMAP32 structure with DIB data
   BITMAPINFOHEADER *bi = &bmi->bmiHeader;
@@ -1329,6 +1335,9 @@ DIB_CreateDIBSection(
     return (HBITMAP)NULL;
   }
 
+  pDc_Attr = dc->pDc_Attr;
+  if ( !pDc_Attr ) pDc_Attr = &dc->Dc_Attr;
+
   effHeight = bi->biHeight >= 0 ? bi->biHeight : -bi->biHeight;
   bm.bmType = 0;
   bm.bmWidth = bi->biWidth;
@@ -1523,6 +1532,8 @@ DIB_CreateDIBSection(
       *bits = bm.bmBits;
   }
 
+//  if (res) pDc_Attr->ulDirty_ |= DC_DIBSECTION;
+
   return res;
 }
 
index 73fc59f..f1c7a1c 100644 (file)
@@ -292,7 +292,7 @@ NtGdiGetFontUnicodeRanges(
      {     
         _SEH2_TRY
         {
-            ProbeForWrite(pgsSafe, Size, 1);
+            ProbeForWrite(pgs, Size, 1);
             RtlCopyMemory(pgs, pgsSafe, Size);
         }
         _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
index 0cdc89a..af69675 100644 (file)
@@ -30,9 +30,9 @@
  * LICENSE:         GPL - See COPYING in the top level directory
  * FILE:            subsystems/win32/win32k/objects/freetype.c
  * PURPOSE:         Freetype library support
- * PROGRAMMER:      
+ * PROGRAMMER:
  */
-      
+
 /** Includes ******************************************************************/
 
 #include <w32k.h>
@@ -50,7 +50,7 @@
 #define NDEBUG
 #include <debug.h>
 
-#ifndef FT_MAKE_TAG      
+#ifndef FT_MAKE_TAG
 #define FT_MAKE_TAG( ch0, ch1, ch2, ch3 ) \
        ( ((DWORD)(BYTE)(ch0) << 24) | ((DWORD)(BYTE)(ch1) << 16) | \
        ((DWORD)(BYTE)(ch2) << 8) | (DWORD)(BYTE)(ch3) )
 
 FT_Library  library;
 
-typedef struct _FONT_ENTRY {
-  LIST_ENTRY ListEntry;
-  FONTGDI *Font;
-  UNICODE_STRING FaceName;
-  BYTE NotEnum;
+typedef struct _FONT_ENTRY
+{
+    LIST_ENTRY ListEntry;
+    FONTGDI *Font;
+    UNICODE_STRING FaceName;
+    BYTE NotEnum;
 } FONT_ENTRY, *PFONT_ENTRY;
 
 /* The FreeType library is not thread safe, so we have
@@ -77,36 +78,38 @@ static BOOL RenderingEnabled = TRUE;
 UINT Hits;
 UINT Misses;
 
-typedef struct _FONT_CACHE_ENTRY {
-  LIST_ENTRY ListEntry;
-  int GlyphIndex;
-  FT_Face Face;
-  FT_Glyph Glyph;
-  int Height;
+typedef struct _FONT_CACHE_ENTRY
+{
+    LIST_ENTRY ListEntry;
+    int GlyphIndex;
+    FT_Face Face;
+    FT_Glyph Glyph;
+    int Height;
 } FONT_CACHE_ENTRY, *PFONT_CACHE_ENTRY;
 static LIST_ENTRY FontCacheListHead;
 static UINT FontCacheNumEntries;
 
-static PWCHAR ElfScripts[32] = { /* these are in the order of the fsCsb[0] bits */
-  L"Western", /*00*/
-  L"Central_European",
-  L"Cyrillic",
-  L"Greek",
-  L"Turkish",
-  L"Hebrew",
-  L"Arabic",
-  L"Baltic",
-  L"Vietnamese", /*08*/
-  NULL, NULL, NULL, NULL, NULL, NULL, NULL, /*15*/
-  L"Thai",
-  L"Japanese",
-  L"CHINESE_GB2312",
-  L"Hangul",
-  L"CHINESE_BIG5",
-  L"Hangul(Johab)",
-  NULL, NULL, /*23*/
-  NULL, NULL, NULL, NULL, NULL, NULL, NULL,
-  L"Symbol" /*31*/
+static PWCHAR ElfScripts[32] =   /* these are in the order of the fsCsb[0] bits */
+{
+    L"Western", /*00*/
+    L"Central_European",
+    L"Cyrillic",
+    L"Greek",
+    L"Turkish",
+    L"Hebrew",
+    L"Arabic",
+    L"Baltic",
+    L"Vietnamese", /*08*/
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL, /*15*/
+    L"Thai",
+    L"Japanese",
+    L"CHINESE_GB2312",
+    L"Hangul",
+    L"CHINESE_BIG5",
+    L"Hangul(Johab)",
+    NULL, NULL, /*23*/
+    NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+    L"Symbol" /*31*/
 };
 
 /*
@@ -114,66 +117,68 @@ static PWCHAR ElfScripts[32] = { /* these are in the order of the fsCsb[0] bits
  */
 #define CP_SYMBOL   42
 #define MAXTCIINDEX 32
-static const CHARSETINFO FontTci[MAXTCIINDEX] = {
-  /* ANSI */
-  { ANSI_CHARSET, 1252, {{0,0,0,0},{FS_LATIN1,0}} },
-  { EASTEUROPE_CHARSET, 1250, {{0,0,0,0},{FS_LATIN2,0}} },
-  { RUSSIAN_CHARSET, 1251, {{0,0,0,0},{FS_CYRILLIC,0}} },
-  { GREEK_CHARSET, 1253, {{0,0,0,0},{FS_GREEK,0}} },
-  { TURKISH_CHARSET, 1254, {{0,0,0,0},{FS_TURKISH,0}} },
-  { HEBREW_CHARSET, 1255, {{0,0,0,0},{FS_HEBREW,0}} },
-  { ARABIC_CHARSET, 1256, {{0,0,0,0},{FS_ARABIC,0}} },
-  { BALTIC_CHARSET, 1257, {{0,0,0,0},{FS_BALTIC,0}} },
-  { VIETNAMESE_CHARSET, 1258, {{0,0,0,0},{FS_VIETNAMESE,0}} },
-  /* reserved by ANSI */
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  /* ANSI and OEM */
-  { THAI_CHARSET, 874, {{0,0,0,0},{FS_THAI,0}} },
-  { SHIFTJIS_CHARSET, 932, {{0,0,0,0},{FS_JISJAPAN,0}} },
-  { GB2312_CHARSET, 936, {{0,0,0,0},{FS_CHINESESIMP,0}} },
-  { HANGEUL_CHARSET, 949, {{0,0,0,0},{FS_WANSUNG,0}} },
-  { CHINESEBIG5_CHARSET, 950, {{0,0,0,0},{FS_CHINESETRAD,0}} },
-  { JOHAB_CHARSET, 1361, {{0,0,0,0},{FS_JOHAB,0}} },
-  /* reserved for alternate ANSI and OEM */
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  /* reserved for system */
-  { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
-  { SYMBOL_CHARSET, CP_SYMBOL, {{0,0,0,0},{FS_SYMBOL,0}} }
+static const CHARSETINFO FontTci[MAXTCIINDEX] =
+{
+    /* ANSI */
+    { ANSI_CHARSET, 1252, {{0,0,0,0},{FS_LATIN1,0}} },
+    { EASTEUROPE_CHARSET, 1250, {{0,0,0,0},{FS_LATIN2,0}} },
+    { RUSSIAN_CHARSET, 1251, {{0,0,0,0},{FS_CYRILLIC,0}} },
+    { GREEK_CHARSET, 1253, {{0,0,0,0},{FS_GREEK,0}} },
+    { TURKISH_CHARSET, 1254, {{0,0,0,0},{FS_TURKISH,0}} },
+    { HEBREW_CHARSET, 1255, {{0,0,0,0},{FS_HEBREW,0}} },
+    { ARABIC_CHARSET, 1256, {{0,0,0,0},{FS_ARABIC,0}} },
+    { BALTIC_CHARSET, 1257, {{0,0,0,0},{FS_BALTIC,0}} },
+    { VIETNAMESE_CHARSET, 1258, {{0,0,0,0},{FS_VIETNAMESE,0}} },
+    /* reserved by ANSI */
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    /* ANSI and OEM */
+    { THAI_CHARSET, 874, {{0,0,0,0},{FS_THAI,0}} },
+    { SHIFTJIS_CHARSET, 932, {{0,0,0,0},{FS_JISJAPAN,0}} },
+    { GB2312_CHARSET, 936, {{0,0,0,0},{FS_CHINESESIMP,0}} },
+    { HANGEUL_CHARSET, 949, {{0,0,0,0},{FS_WANSUNG,0}} },
+    { CHINESEBIG5_CHARSET, 950, {{0,0,0,0},{FS_CHINESETRAD,0}} },
+    { JOHAB_CHARSET, 1361, {{0,0,0,0},{FS_JOHAB,0}} },
+    /* reserved for alternate ANSI and OEM */
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    /* reserved for system */
+    { DEFAULT_CHARSET, 0, {{0,0,0,0},{FS_LATIN1,0}} },
+    { SYMBOL_CHARSET, CP_SYMBOL, {{0,0,0,0},{FS_SYMBOL,0}} }
 };
 
 BOOL FASTCALL
 InitFontSupport(VOID)
 {
-   ULONG ulError;
+    ULONG ulError;
 
-   InitializeListHead(&FontListHead);
-   InitializeListHead(&FontCacheListHead);
-   FontCacheNumEntries = 0;
-   ExInitializeFastMutex(&FontListLock);
-   ExInitializeFastMutex(&FreeTypeLock);
+    InitializeListHead(&FontListHead);
+    InitializeListHead(&FontCacheListHead);
+    FontCacheNumEntries = 0;
+    ExInitializeFastMutex(&FontListLock);
+    ExInitializeFastMutex(&FreeTypeLock);
 
-   ulError = FT_Init_FreeType(&library);
-   if (ulError) {
-      DPRINT1("FT_Init_FreeType failed with error code 0x%x\n", ulError);
-      return FALSE;
-   }
+    ulError = FT_Init_FreeType(&library);
+    if (ulError)
+    {
+        DPRINT1("FT_Init_FreeType failed with error code 0x%x\n", ulError);
+        return FALSE;
+    }
 
-   IntLoadSystemFonts();
+    IntLoadSystemFonts();
 
-   return TRUE;
+    return TRUE;
 }
 
 /*
@@ -185,94 +190,94 @@ InitFontSupport(VOID)
 VOID FASTCALL
 IntLoadSystemFonts(VOID)
 {
-   OBJECT_ATTRIBUTES ObjectAttributes;
-   UNICODE_STRING Directory, SearchPattern, FileName, TempString;
-   IO_STATUS_BLOCK Iosb;
-   HANDLE hDirectory;
-   BYTE *DirInfoBuffer;
-   PFILE_DIRECTORY_INFORMATION DirInfo;
-   BOOLEAN bRestartScan = TRUE;
-   NTSTATUS Status;
-
-   RtlInitUnicodeString(&Directory, L"\\SystemRoot\\Fonts\\");
-   /* FIXME: Add support for other font types */
-   RtlInitUnicodeString(&SearchPattern, L"*.ttf");
-
-   InitializeObjectAttributes(
-      &ObjectAttributes,
-      &Directory,
-      OBJ_CASE_INSENSITIVE,
-      NULL,
-      NULL);
-
-   Status = ZwOpenFile(
-      &hDirectory,
-      SYNCHRONIZE | FILE_LIST_DIRECTORY,
-      &ObjectAttributes,
-      &Iosb,
-      FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
-      FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE);
-
-   if (NT_SUCCESS(Status))
-   {
-      DirInfoBuffer = ExAllocatePool(PagedPool, 0x4000);
-      if (DirInfoBuffer == NULL)
-      {
-         ZwClose(hDirectory);
-         return;
-      }
-
-      FileName.Buffer = ExAllocatePool(PagedPool, MAX_PATH * sizeof(WCHAR));
-      if (FileName.Buffer == NULL)
-      {
-         ExFreePool(DirInfoBuffer);
-         ZwClose(hDirectory);
-         return;
-      }
-      FileName.Length = 0;
-      FileName.MaximumLength = MAX_PATH * sizeof(WCHAR);
-
-      while (1)
-      {
-         Status = ZwQueryDirectoryFile(
-            hDirectory,
-            NULL,
-            NULL,
-            NULL,
-            &Iosb,
-            DirInfoBuffer,
-            0x4000,
-            FileDirectoryInformation,
-            FALSE,
-            &SearchPattern,
-            bRestartScan);
-
-         if (!NT_SUCCESS(Status) || Status == STATUS_NO_MORE_FILES)
-         {
-            break;
-         }
-
-         DirInfo = (PFILE_DIRECTORY_INFORMATION)DirInfoBuffer;
-         while (1)
-         {
-            TempString.Buffer = DirInfo->FileName;
-            TempString.Length =
-            TempString.MaximumLength = DirInfo->FileNameLength;
-            RtlCopyUnicodeString(&FileName, &Directory);
-            RtlAppendUnicodeStringToString(&FileName, &TempString);
-            IntGdiAddFontResource(&FileName, 0);
-            if (DirInfo->NextEntryOffset == 0)
-               break;
-            DirInfo = (PFILE_DIRECTORY_INFORMATION)((ULONG_PTR)DirInfo + DirInfo->NextEntryOffset);
-         }
-
-         bRestartScan = FALSE;
-      }
-
-      ExFreePool(FileName.Buffer);
-      ExFreePool(DirInfoBuffer);
-      ZwClose(hDirectory);
-   }
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    UNICODE_STRING Directory, SearchPattern, FileName, TempString;
+    IO_STATUS_BLOCK Iosb;
+    HANDLE hDirectory;
+    BYTE *DirInfoBuffer;
+    PFILE_DIRECTORY_INFORMATION DirInfo;
+    BOOLEAN bRestartScan = TRUE;
+    NTSTATUS Status;
+
+    RtlInitUnicodeString(&Directory, L"\\SystemRoot\\Fonts\\");
+    /* FIXME: Add support for other font types */
+    RtlInitUnicodeString(&SearchPattern, L"*.ttf");
+
+    InitializeObjectAttributes(
+        &ObjectAttributes,
+        &Directory,
+        OBJ_CASE_INSENSITIVE,
+        NULL,
+        NULL);
+
+    Status = ZwOpenFile(
+                 &hDirectory,
+                 SYNCHRONIZE | FILE_LIST_DIRECTORY,
+                 &ObjectAttributes,
+                 &Iosb,
+                 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
+                 FILE_SYNCHRONOUS_IO_NONALERT | FILE_DIRECTORY_FILE);
+
+    if (NT_SUCCESS(Status))
+    {
+        DirInfoBuffer = ExAllocatePool(PagedPool, 0x4000);
+        if (DirInfoBuffer == NULL)
+        {
+            ZwClose(hDirectory);
+            return;
+        }
+
+        FileName.Buffer = ExAllocatePool(PagedPool, MAX_PATH * sizeof(WCHAR));
+        if (FileName.Buffer == NULL)
+        {
+            ExFreePool(DirInfoBuffer);
+            ZwClose(hDirectory);
+            return;
+        }
+        FileName.Length = 0;
+        FileName.MaximumLength = MAX_PATH * sizeof(WCHAR);
+
+        while (1)
+        {
+            Status = ZwQueryDirectoryFile(
+                         hDirectory,
+                         NULL,
+                         NULL,
+                         NULL,
+                         &Iosb,
+                         DirInfoBuffer,
+                         0x4000,
+                         FileDirectoryInformation,
+                         FALSE,
+                         &SearchPattern,
+                         bRestartScan);
+
+            if (!NT_SUCCESS(Status) || Status == STATUS_NO_MORE_FILES)
+            {
+                break;
+            }
+
+            DirInfo = (PFILE_DIRECTORY_INFORMATION)DirInfoBuffer;
+            while (1)
+            {
+                TempString.Buffer = DirInfo->FileName;
+                TempString.Length =
+                    TempString.MaximumLength = DirInfo->FileNameLength;
+                RtlCopyUnicodeString(&FileName, &Directory);
+                RtlAppendUnicodeStringToString(&FileName, &TempString);
+                IntGdiAddFontResource(&FileName, 0);
+                if (DirInfo->NextEntryOffset == 0)
+                    break;
+                DirInfo = (PFILE_DIRECTORY_INFORMATION)((ULONG_PTR)DirInfo + DirInfo->NextEntryOffset);
+            }
+
+            bRestartScan = FALSE;
+        }
+
+        ExFreePool(FileName.Buffer);
+        ExFreePool(DirInfoBuffer);
+        ZwClose(hDirectory);
+    }
 }
 
 
@@ -285,112 +290,112 @@ IntLoadSystemFonts(VOID)
 INT FASTCALL
 IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
 {
-   FONTGDI *FontGDI;
-   NTSTATUS Status;
-   HANDLE FileHandle, KeyHandle;
-   OBJECT_ATTRIBUTES ObjectAttributes;
-   PVOID Buffer = NULL;
-   IO_STATUS_BLOCK Iosb;
-   INT Error;
-   FT_Face Face;
-   ANSI_STRING AnsiFaceName;
-   PFONT_ENTRY Entry;
-   PSECTION_OBJECT SectionObject;
-   ULONG ViewSize = 0;
-   LARGE_INTEGER SectionSize;
-   FT_Fixed XScale, YScale;
-   UNICODE_STRING FontRegPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
-
-   /* Open the font file */
-
-   InitializeObjectAttributes(&ObjectAttributes, FileName, 0, NULL, NULL);
-   Status = ZwOpenFile(
-      &FileHandle,
-      FILE_GENERIC_READ | SYNCHRONIZE,
-      &ObjectAttributes,
-      &Iosb,
-      FILE_SHARE_READ,
-      FILE_SYNCHRONOUS_IO_NONALERT);
-
-   if (!NT_SUCCESS(Status))
-   {
-      DPRINT("Could not load font file: %wZ\n", FileName);
-      return 0;
-   }
-
-   SectionSize.QuadPart = 0LL;
-   Status = MmCreateSection((PVOID)&SectionObject, SECTION_ALL_ACCESS,
-                            NULL, &SectionSize, PAGE_READONLY,
-                            SEC_COMMIT, FileHandle, NULL);
-   if (!NT_SUCCESS(Status))
-   {
-      DPRINT("Could not map file: %wZ\n", FileName);
-      ZwClose(FileHandle);
-      return 0;
-   }
-
-   ZwClose(FileHandle);
-
-   Status = MmMapViewInSystemSpace(SectionObject, &Buffer, &ViewSize);
-   if (!NT_SUCCESS(Status))
-   {
-      DPRINT("Could not map file: %wZ\n", FileName);
-      return Status;
-   }
-
-   IntLockFreeType;
-   Error = FT_New_Memory_Face(
-      library,
-      Buffer,
-      ViewSize,
-      0,
-      &Face);
-   IntUnLockFreeType;
-
-   if (Error)
-   {
-      if (Error == FT_Err_Unknown_File_Format)
-         DPRINT("Unknown font file format\n");
-      else
-         DPRINT("Error reading font file (error code: %u)\n", Error);
-      ObDereferenceObject(SectionObject);
-      return 0;
-   }
-
-   Entry = ExAllocatePoolWithTag(PagedPool, sizeof(FONT_ENTRY), TAG_FONT);
-   if (!Entry)
-   {
-      FT_Done_Face(Face);
-      ObDereferenceObject(SectionObject);
-      SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
-      return 0;
-   }
-
-   FontGDI = EngAllocMem(FL_ZERO_MEMORY, sizeof(FONTGDI), TAG_FONTOBJ);
-   if(FontGDI == NULL)
-   {
-      FT_Done_Face(Face);
-      ObDereferenceObject(SectionObject);
-      ExFreePoolWithTag(Entry, TAG_FONT);
-      SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
-      return 0;
-   }
-
-   FontGDI->Filename = ExAllocatePoolWithTag(PagedPool, FileName->Length + sizeof(WCHAR), TAG_PFF);
-   if (FontGDI->Filename == NULL)
-   {
-      EngFreeMem(FontGDI);
-      FT_Done_Face(Face);
-      ObDereferenceObject(SectionObject);
-      ExFreePoolWithTag(Entry, TAG_FONT);
-      SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
-      return 0;      
-   }
-   RtlCopyMemory(FontGDI->Filename, FileName->Buffer, FileName->Length);
-   FontGDI->Filename[FileName->Length / sizeof(WCHAR)] = L'\0';
-   FontGDI->face = Face;
-
-   /* FIXME: Complete text metrics */
+    FONTGDI *FontGDI;
+    NTSTATUS Status;
+    HANDLE FileHandle, KeyHandle;
+    OBJECT_ATTRIBUTES ObjectAttributes;
+    PVOID Buffer = NULL;
+    IO_STATUS_BLOCK Iosb;
+    INT Error;
+    FT_Face Face;
+    ANSI_STRING AnsiFaceName;
+    PFONT_ENTRY Entry;
+    PSECTION_OBJECT SectionObject;
+    ULONG ViewSize = 0;
+    LARGE_INTEGER SectionSize;
+    FT_Fixed XScale, YScale;
+    UNICODE_STRING FontRegPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
+
+    /* Open the font file */
+
+    InitializeObjectAttributes(&ObjectAttributes, FileName, 0, NULL, NULL);
+    Status = ZwOpenFile(
+                 &FileHandle,
+                 FILE_GENERIC_READ | SYNCHRONIZE,
+                 &ObjectAttributes,
+                 &Iosb,
+                 FILE_SHARE_READ,
+                 FILE_SYNCHRONOUS_IO_NONALERT);
+
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT("Could not load font file: %wZ\n", FileName);
+        return 0;
+    }
+
+    SectionSize.QuadPart = 0LL;
+    Status = MmCreateSection((PVOID)&SectionObject, SECTION_ALL_ACCESS,
+                             NULL, &SectionSize, PAGE_READONLY,
+                             SEC_COMMIT, FileHandle, NULL);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT("Could not map file: %wZ\n", FileName);
+        ZwClose(FileHandle);
+        return 0;
+    }
+
+    ZwClose(FileHandle);
+
+    Status = MmMapViewInSystemSpace(SectionObject, &Buffer, &ViewSize);
+    if (!NT_SUCCESS(Status))
+    {
+        DPRINT("Could not map file: %wZ\n", FileName);
+        return Status;
+    }
+
+    IntLockFreeType;
+    Error = FT_New_Memory_Face(
+                library,
+                Buffer,
+                ViewSize,
+                0,
+                &Face);
+    IntUnLockFreeType;
+
+    if (Error)
+    {
+        if (Error == FT_Err_Unknown_File_Format)
+            DPRINT("Unknown font file format\n");
+        else
+            DPRINT("Error reading font file (error code: %u)\n", Error);
+        ObDereferenceObject(SectionObject);
+        return 0;
+    }
+
+    Entry = ExAllocatePoolWithTag(PagedPool, sizeof(FONT_ENTRY), TAG_FONT);
+    if (!Entry)
+    {
+        FT_Done_Face(Face);
+        ObDereferenceObject(SectionObject);
+        SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+        return 0;
+    }
+
+    FontGDI = EngAllocMem(FL_ZERO_MEMORY, sizeof(FONTGDI), TAG_FONTOBJ);
+    if (FontGDI == NULL)
+    {
+        FT_Done_Face(Face);
+        ObDereferenceObject(SectionObject);
+        ExFreePoolWithTag(Entry, TAG_FONT);
+        SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+        return 0;
+    }
+
+    FontGDI->Filename = ExAllocatePoolWithTag(PagedPool, FileName->Length + sizeof(WCHAR), TAG_PFF);
+    if (FontGDI->Filename == NULL)
+    {
+        EngFreeMem(FontGDI);
+        FT_Done_Face(Face);
+        ObDereferenceObject(SectionObject);
+        ExFreePoolWithTag(Entry, TAG_FONT);
+        SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
+        return 0;
+    }
+    RtlCopyMemory(FontGDI->Filename, FileName->Buffer, FileName->Length);
+    FontGDI->Filename[FileName->Length / sizeof(WCHAR)] = L'\0';
+    FontGDI->face = Face;
+
+    /* FIXME: Complete text metrics */
     XScale = Face->size->metrics.x_scale;
     YScale = Face->size->metrics.y_scale;
 #if 0 /* This (Wine) code doesn't seem to work correctly for us */
@@ -406,101 +411,101 @@ IntGdiAddFontResource(PUNICODE_STRING FileName, DWORD Characteristics)
 
 
 
-   DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name);
-   DPRINT("Num glyphs: %u\n", Face->num_glyphs);
-
-   /* Add this font resource to the font table */
-
-   Entry->Font = FontGDI;
-   Entry->NotEnum = (Characteristics & FR_NOT_ENUM);
-   RtlInitAnsiString(&AnsiFaceName, (LPSTR)Face->family_name);
-   RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiFaceName, TRUE);
-
-   if (Characteristics & FR_PRIVATE)
-   {
-      PW32PROCESS Win32Process = PsGetCurrentProcessWin32Process();
-      IntLockProcessPrivateFonts(Win32Process);
-      InsertTailList(&Win32Process->PrivateFontListHead, &Entry->ListEntry);
-      IntUnLockProcessPrivateFonts(Win32Process);
-   }
-   else
-   {
-      IntLockGlobalFonts;
-      InsertTailList(&FontListHead, &Entry->ListEntry);
-      InitializeObjectAttributes(&ObjectAttributes, &FontRegPath, OBJ_CASE_INSENSITIVE, NULL, NULL);
-      Status = ZwOpenKey(&KeyHandle, KEY_WRITE, &ObjectAttributes);
-      if (NT_SUCCESS(Status))
-      {
-         LPWSTR pName = wcsrchr(FileName->Buffer, L'\\');
-         if (pName)
-         {
-            pName++;
-            ZwSetValueKey(KeyHandle, &Entry->FaceName, 0, REG_SZ, pName, (wcslen(pName) + 1) * sizeof(WCHAR));
-         }
-         ZwClose(KeyHandle);
-      }
-      IntUnLockGlobalFonts;
-   }
-   return 1;
+    DPRINT("Font loaded: %s (%s)\n", Face->family_name, Face->style_name);
+    DPRINT("Num glyphs: %u\n", Face->num_glyphs);
+
+    /* Add this font resource to the font table */
+
+    Entry->Font = FontGDI;
+    Entry->NotEnum = (Characteristics & FR_NOT_ENUM);
+    RtlInitAnsiString(&AnsiFaceName, (LPSTR)Face->family_name);
+    RtlAnsiStringToUnicodeString(&Entry->FaceName, &AnsiFaceName, TRUE);
+
+    if (Characteristics & FR_PRIVATE)
+    {
+        PW32PROCESS Win32Process = PsGetCurrentProcessWin32Process();
+        IntLockProcessPrivateFonts(Win32Process);
+        InsertTailList(&Win32Process->PrivateFontListHead, &Entry->ListEntry);
+        IntUnLockProcessPrivateFonts(Win32Process);
+    }
+    else
+    {
+        IntLockGlobalFonts;
+        InsertTailList(&FontListHead, &Entry->ListEntry);
+        InitializeObjectAttributes(&ObjectAttributes, &FontRegPath, OBJ_CASE_INSENSITIVE, NULL, NULL);
+        Status = ZwOpenKey(&KeyHandle, KEY_WRITE, &ObjectAttributes);
+        if (NT_SUCCESS(Status))
+        {
+            LPWSTR pName = wcsrchr(FileName->Buffer, L'\\');
+            if (pName)
+            {
+                pName++;
+                ZwSetValueKey(KeyHandle, &Entry->FaceName, 0, REG_SZ, pName, (wcslen(pName) + 1) * sizeof(WCHAR));
+            }
+            ZwClose(KeyHandle);
+        }
+        IntUnLockGlobalFonts;
+    }
+    return 1;
 }
 
 BOOL FASTCALL
 IntIsFontRenderingEnabled(VOID)
 {
-   BOOL Ret = RenderingEnabled;
-   HDC hDC;
+    BOOL Ret = RenderingEnabled;
+    HDC hDC;
 
-   hDC = IntGetScreenDC();
-   if (hDC)
-      Ret = (NtGdiGetDeviceCaps(hDC, BITSPIXEL) > 8) && RenderingEnabled;
+    hDC = IntGetScreenDC();
+    if (hDC)
+        Ret = (NtGdiGetDeviceCaps(hDC, BITSPIXEL) > 8) && RenderingEnabled;
 
-   return Ret;
+    return Ret;
 }
 
 VOID FASTCALL
 IntEnableFontRendering(BOOL Enable)
 {
-  RenderingEnabled = Enable;
+    RenderingEnabled = Enable;
 }
 
 FT_Render_Mode FASTCALL
 IntGetFontRenderMode(LOGFONTW *logfont)
 {
-  switch(logfont->lfQuality)
-  {
+    switch (logfont->lfQuality)
+    {
     case NONANTIALIASED_QUALITY:
-      return FT_RENDER_MODE_MONO;
+        return FT_RENDER_MODE_MONO;
     case DRAFT_QUALITY:
-      return FT_RENDER_MODE_LIGHT;
-/*    case CLEARTYPE_QUALITY:
-        return FT_RENDER_MODE_LCD; */
-  }
-  return FT_RENDER_MODE_NORMAL;
+        return FT_RENDER_MODE_LIGHT;
+        /*    case CLEARTYPE_QUALITY:
+                return FT_RENDER_MODE_LCD; */
+    }
+    return FT_RENDER_MODE_NORMAL;
 }
 
 
 NTSTATUS FASTCALL
 TextIntCreateFontIndirect(CONST LPLOGFONTW lf, HFONT *NewFont)
 {
-  PTEXTOBJ TextObj;
-
-  TextObj = TEXTOBJ_AllocTextWithHandle();
-  if (!TextObj)
-  {
-    return STATUS_NO_MEMORY;
-  }
-
-  *NewFont = TextObj->BaseObject.hHmgr;
-  RtlCopyMemory(&TextObj->logfont.elfEnumLogfontEx.elfLogFont, lf, sizeof(LOGFONTW));
-  if (lf->lfEscapement != lf->lfOrientation)
-  {
-    /* this should really depend on whether GM_ADVANCED is set */
-    TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
-    TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
-  }
-  TEXTOBJ_UnlockText(TextObj);
-
-  return STATUS_SUCCESS;
+    PTEXTOBJ TextObj;
+
+    TextObj = TEXTOBJ_AllocTextWithHandle();
+    if (!TextObj)
+    {
+        return STATUS_NO_MEMORY;
+    }
+
+    *NewFont = TextObj->BaseObject.hHmgr;
+    RtlCopyMemory(&TextObj->logfont.elfEnumLogfontEx.elfLogFont, lf, sizeof(LOGFONTW));
+    if (lf->lfEscapement != lf->lfOrientation)
+    {
+        /* this should really depend on whether GM_ADVANCED is set */
+        TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfOrientation =
+            TextObj->logfont.elfEnumLogfontEx.elfLogFont.lfEscapement;
+    }
+    TEXTOBJ_UnlockText(TextObj);
+
+    return STATUS_SUCCESS;
 }
 
 /*************************************************************************
@@ -526,182 +531,182 @@ IntTranslateCharsetInfo(PDWORD Src, /* [in]
                         LPCHARSETINFO Cs, /* [out] structure to receive charset information */
                         DWORD Flags /* [in] determines interpretation of lpSrc */)
 {
-  int Index = 0;
+    int Index = 0;
 
-  switch (Flags)
+    switch (Flags)
     {
-      case TCI_SRCFONTSIG:
-       while (0 == (*Src >> Index & 0x0001) && Index < MAXTCIINDEX)
-          {
+    case TCI_SRCFONTSIG:
+        while (0 == (*Src >> Index & 0x0001) && Index < MAXTCIINDEX)
+        {
             Index++;
-          }
+        }
         break;
-      case TCI_SRCCODEPAGE:
+    case TCI_SRCCODEPAGE:
         while ( *Src != FontTci[Index].ciACP && Index < MAXTCIINDEX)
-          {
+        {
             Index++;
-          }
+        }
         break;
-      case TCI_SRCCHARSET:
+    case TCI_SRCCHARSET:
         while ( *Src != FontTci[Index].ciCharset && Index < MAXTCIINDEX)
-          {
+        {
             Index++;
-          }
+        }
         break;
-      default:
+    default:
         return FALSE;
     }
 
-  if (Index >= MAXTCIINDEX || DEFAULT_CHARSET == FontTci[Index].ciCharset)
-  {
-     return FALSE;
-  }
+    if (Index >= MAXTCIINDEX || DEFAULT_CHARSET == FontTci[Index].ciCharset)
+    {
+        return FALSE;
+    }
 
-  RtlCopyMemory(Cs, &FontTci[Index], sizeof(CHARSETINFO));
+    RtlCopyMemory(Cs, &FontTci[Index], sizeof(CHARSETINFO));
 
-  return TRUE;
+    return TRUE;
 }
 
 
 static void FASTCALL
 FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI, TT_OS2 *pOS2, TT_HoriHeader *pHori, FT_WinFNT_HeaderRec *pWin)
 {
-  FT_Fixed XScale, YScale;
-  int Ascent, Descent;
-  FT_Face Face = FontGDI->face;
-
-  XScale = Face->size->metrics.x_scale;
-  YScale = Face->size->metrics.y_scale;
-
-  if (pWin)
-  {
-     TM->tmHeight           = pWin->pixel_height;
-     TM->tmAscent           = pWin->ascent;
-     TM->tmDescent          = TM->tmHeight - TM->tmAscent;
-     TM->tmInternalLeading  = pWin->internal_leading;
-     TM->tmExternalLeading  = pWin->external_leading;
-     TM->tmAveCharWidth     = pWin->avg_width;
-     TM->tmMaxCharWidth     = pWin->max_width;
-     TM->tmWeight           = pWin->weight;
-     TM->tmOverhang         = 0;
-     TM->tmDigitizedAspectX = pWin->horizontal_resolution;
-     TM->tmDigitizedAspectY = pWin->vertical_resolution;
-     TM->tmFirstChar        = pWin->first_char;
-     TM->tmLastChar         = pWin->last_char;
-     TM->tmDefaultChar      = pWin->default_char + pWin->first_char;
-     TM->tmBreakChar        = pWin->break_char + pWin->first_char;
-     TM->tmItalic           = pWin->italic;
-     TM->tmUnderlined       = FontGDI->Underline;
-     TM->tmStruckOut        = FontGDI->StrikeOut;
-     TM->tmPitchAndFamily   = pWin->pitch_and_family;
-     TM->tmCharSet          = pWin->charset;
-     return;
-  }
-
-  if (0  == pOS2->usWinAscent + pOS2->usWinDescent)
-    {
-      Ascent = pHori->Ascender;
-      Descent = -pHori->Descender;
-    }
-  else
-    {
-      Ascent = pOS2->usWinAscent;
-      Descent = pOS2->usWinDescent;
+    FT_Fixed XScale, YScale;
+    int Ascent, Descent;
+    FT_Face Face = FontGDI->face;
+
+    XScale = Face->size->metrics.x_scale;
+    YScale = Face->size->metrics.y_scale;
+
+    if (pWin)
+    {
+        TM->tmHeight           = pWin->pixel_height;
+        TM->tmAscent           = pWin->ascent;
+        TM->tmDescent          = TM->tmHeight - TM->tmAscent;
+        TM->tmInternalLeading  = pWin->internal_leading;
+        TM->tmExternalLeading  = pWin->external_leading;
+        TM->tmAveCharWidth     = pWin->avg_width;
+        TM->tmMaxCharWidth     = pWin->max_width;
+        TM->tmWeight           = pWin->weight;
+