ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
November 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
348 discussions
Start a n
N
ew thread
[jimtabor] 60859: - Turn off traces.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Nov 3 23:44:59 2013 New Revision: 60859 URL:
http://svn.reactos.org/svn/reactos?rev=60859&view=rev
Log: - Turn off traces. Modified: trunk/reactos/win32ss/user/user32/windows/class.c trunk/reactos/win32ss/user/user32/windows/window.c Modified: trunk/reactos/win32ss/user/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] Sun Nov 3 23:44:59 2013 @@ -342,7 +342,7 @@ if (!RegisterDefaultClasses) { - ERR("GetClassInfoExA RegisterSystemControls\n"); + TRACE("RegisterSystemControls\n"); RegisterSystemControls(); } @@ -442,7 +442,7 @@ if (!RegisterDefaultClasses) { - ERR("GetClassInfoExW RegisterSystemControls\n"); + TRACE("RegisterSystemControls\n"); RegisterSystemControls(); } Modified: trunk/reactos/win32ss/user/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] Sun Nov 3 23:44:59 2013 @@ -180,7 +180,7 @@ if (!RegisterDefaultClasses) { - ERR("User32CreateWindowEx RegisterSystemControls\n"); + TRACE("RegisterSystemControls\n"); RegisterSystemControls(); }
11 years, 1 month
1
0
0
0
[jimtabor] 60858: [User32] - Add context hack from wine. Pass alt tab info calls to win32k. - From wine: Alexandre Julliard : user32: Automatically load comctl32 when one of its classes is requested.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Sun Nov 3 23:19:59 2013 New Revision: 60858 URL:
http://svn.reactos.org/svn/reactos?rev=60858&view=rev
Log: [User32] - Add context hack from wine. Pass alt tab info calls to win32k. - From wine: Alexandre Julliard : user32: Automatically load comctl32 when one of its classes is requested. Modified: trunk/reactos/win32ss/user/user32/include/regcontrol.h trunk/reactos/win32ss/user/user32/windows/class.c trunk/reactos/win32ss/user/user32/windows/window.c Modified: trunk/reactos/win32ss/user/user32/include/regcontrol.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/includ…
============================================================================== --- trunk/reactos/win32ss/user/user32/include/regcontrol.h [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/include/regcontrol.h [iso-8859-1] Sun Nov 3 23:19:59 2013 @@ -39,3 +39,4 @@ extern const struct builtin_class_descr STATIC_builtin_class; ATOM WINAPI RegisterClassExWOWW(WNDCLASSEXW *,LPDWORD,WORD,DWORD,BOOL); +BOOL FASTCALL VersionRegisterClass(PCWSTR,LPCWSTR,HANDLE,HMODULE *); Modified: trunk/reactos/win32ss/user/user32/windows/class.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/class.c [iso-8859-1] Sun Nov 3 23:19:59 2013 @@ -39,7 +39,7 @@ { NTSTATUS Status; UNICODE_STRING SectionName; - WCHAR SeactionNameBuf[256] = {0}; + WCHAR SeactionNameBuf[MAX_PATH] = {0}; ACTCTX_SECTION_KEYED_DATA KeyedData = { sizeof(KeyedData) }; if (IS_ATOM(lpszClass)) @@ -113,9 +113,12 @@ return lpszClass; } +// +// Ref:
http://yvs-it.blogspot.com/2010/04/initcommoncontrolsex.html
+// BOOL FASTCALL -VersionRegisterClass( +Real_VersionRegisterClass( PCWSTR pszClass, LPCWSTR lpLibFileName, HANDLE Contex, @@ -125,7 +128,7 @@ HMODULE hLibModule; PREGISTERCLASSNAMEW pRegisterClassNameW; UNICODE_STRING ClassName; - WCHAR ClassNameBuf[256] = {0}; + WCHAR ClassNameBuf[MAX_PATH] = {0}; RTL_CALLER_ALLOCATED_ACTIVATION_CONTEXT_STACK_FRAME_EXTENDED Frame = { sizeof(Frame), 1 }; RtlActivateActivationContextUnsafeFast(&Frame, Contex); @@ -174,6 +177,117 @@ return Ret; } +// +// Use wine hack to process extened context classes. +// +/*********************************************************************** + * is_comctl32_class + */ +static BOOL is_comctl32_class( const WCHAR *name ) +{ + static const WCHAR classesW[][20] = + { + {'C','o','m','b','o','B','o','x','E','x','3','2',0}, + {'m','s','c','t','l','s','_','h','o','t','k','e','y','3','2',0}, + {'m','s','c','t','l','s','_','p','r','o','g','r','e','s','s','3','2',0}, + {'m','s','c','t','l','s','_','s','t','a','t','u','s','b','a','r','3','2',0}, + {'m','s','c','t','l','s','_','t','r','a','c','k','b','a','r','3','2',0}, + {'m','s','c','t','l','s','_','u','p','d','o','w','n','3','2',0}, + {'N','a','t','i','v','e','F','o','n','t','C','t','l',0}, + {'R','e','B','a','r','W','i','n','d','o','w','3','2',0}, + {'S','y','s','A','n','i','m','a','t','e','3','2',0}, + {'S','y','s','D','a','t','e','T','i','m','e','P','i','c','k','3','2',0}, + {'S','y','s','H','e','a','d','e','r','3','2',0}, + {'S','y','s','I','P','A','d','d','r','e','s','s','3','2',0}, + {'S','y','s','L','i','s','t','V','i','e','w','3','2',0}, + {'S','y','s','M','o','n','t','h','C','a','l','3','2',0}, + {'S','y','s','P','a','g','e','r',0}, + {'S','y','s','T','a','b','C','o','n','t','r','o','l','3','2',0}, + {'S','y','s','T','r','e','e','V','i','e','w','3','2',0}, + {'T','o','o','l','b','a','r','W','i','n','d','o','w','3','2',0}, + {'t','o','o','l','t','i','p','s','_','c','l','a','s','s','3','2',0}, + }; + + int min = 0, max = (sizeof(classesW) / sizeof(classesW[0])) - 1; + + while (min <= max) + { + int res, pos = (min + max) / 2; + if (!(res = strcmpiW( name, classesW[pos] ))) return TRUE; + if (res < 0) max = pos - 1; + else min = pos + 1; + } + return FALSE; +} + +BOOL +FASTCALL +VersionRegisterClass( + PCWSTR pszClass, + LPCWSTR lpLibFileName, + HANDLE Contex, + HMODULE * phLibModule) +{ + // Should be lpLibFileName..... + static const WCHAR comctl32W[] = {'c','o','m','c','t','l','3','2','.','d','l','l',0}; + // + PREGISTERCLASSNAMEW pRegisterClassNameW; + UNICODE_STRING ClassName; + WCHAR ClassNameBuf[MAX_PATH] = {0}; + BOOL Ret = FALSE; + HMODULE hLibModule = NULL; + + if (is_comctl32_class( pszClass )) + { + _SEH2_TRY + { + hLibModule = GetModuleHandleW( comctl32W ); + if (!hLibModule) hLibModule = LoadLibraryW(comctl32W); + if ( hLibModule ) + { + if ((pRegisterClassNameW = (void*) GetProcAddress(hLibModule, "RegisterClassNameW"))) + { + if (IS_ATOM(pszClass)) + { + ClassName.Buffer = (LPWSTR)&ClassNameBuf; + ClassName.MaximumLength = sizeof(ClassNameBuf); + if (!NtUserGetAtomName(LOWORD((DWORD_PTR)pszClass), &ClassName)) + { + ERR("Error while verifying ATOM\n"); + _SEH2_YIELD(goto Error_Exit); + } + pszClass = (PCWSTR)&ClassNameBuf; + } + Ret = pRegisterClassNameW(pszClass); + } + } + } + _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) + { + } + _SEH2_END + +Error_Exit: + if ( Ret || !hLibModule ) + { + if ( phLibModule ) *phLibModule = hLibModule; + } + else + { + DWORD save_error = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(save_error); + } + TRACE( "%s retrying after loading comctl32\n", debugstr_w(pszClass) ); + return Ret; + } + TRACE("NO ComCtl32 Class %S!\n",pszClass); + return FALSE; +} +// +// +// + /* * @implemented */ @@ -185,8 +299,10 @@ LPWNDCLASSEXA lpwcx) { UNICODE_STRING ClassName = {0}; - BOOL Ret; LPCSTR pszMenuName; + HMODULE hLibModule; + DWORD save_error; + BOOL Ret, ClassFound = FALSE; TRACE("%p class/atom: %s/%04x %p\n", hInstance, IS_ATOM(lpszClass) ? NULL : lpszClass, @@ -230,11 +346,34 @@ RegisterSystemControls(); } - Ret = NtUserGetClassInfo(hInstance, - &ClassName, - (LPWNDCLASSEXW)lpwcx, - (LPWSTR *)&pszMenuName, - TRUE); + for(;;) + { + Ret = NtUserGetClassInfo( hInstance, + &ClassName, + (LPWNDCLASSEXW)lpwcx, + (LPWSTR *)&pszMenuName, + TRUE); + if (Ret) break; + if (!ClassFound) + { + save_error = GetLastError(); + if ( save_error == ERROR_CANNOT_FIND_WND_CLASS || + save_error == ERROR_CLASS_DOES_NOT_EXIST ) + { + ClassFound = VersionRegisterClass(ClassName.Buffer, NULL, NULL, &hLibModule); + if (ClassFound) continue; + } + } + if (hLibModule) + { + save_error = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(save_error); + hLibModule = 0; + } + break; + } + if (Ret) { lpwcx->lpszClassName = lpszClass; @@ -261,8 +400,10 @@ LPWNDCLASSEXW lpwcx) { UNICODE_STRING ClassName = {0}; - BOOL Ret; LPWSTR pszMenuName; + HMODULE hLibModule; + DWORD save_error; + BOOL Ret, ClassFound = FALSE; TRACE("%p class/atom: %S/%04x %p\n", hInstance, IS_ATOM(lpszClass) ? NULL : lpszClass, @@ -305,11 +446,34 @@ RegisterSystemControls(); } - Ret = NtUserGetClassInfo( hInstance, - &ClassName, - lpwcx, - &pszMenuName, - FALSE); + for(;;) + { + Ret = NtUserGetClassInfo( hInstance, + &ClassName, + lpwcx, + &pszMenuName, + FALSE); + if (Ret) break; + if (!ClassFound) + { + save_error = GetLastError(); + if ( save_error == ERROR_CANNOT_FIND_WND_CLASS || + save_error == ERROR_CLASS_DOES_NOT_EXIST ) + { + ClassFound = VersionRegisterClass(ClassName.Buffer, NULL, NULL, &hLibModule); + if (ClassFound) continue; + } + } + if (hLibModule) + { + save_error = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(save_error); + hLibModule = 0; + } + break; + } + if (Ret) { lpwcx->lpszClassName = lpszClass; @@ -1265,6 +1429,9 @@ UNICODE_STRING MenuName = {0}; CLSMENUNAME clsMenuName; ANSI_STRING AnsiMenuName; + HMODULE hLibModule; + DWORD save_error; + BOOL ClassFound = FALSE; if (lpwcx == NULL || lpwcx->cbSize != sizeof(WNDCLASSEXW) || lpwcx->cbClsExtra < 0 || lpwcx->cbWndExtra < 0 || @@ -1338,13 +1505,36 @@ clsMenuName.pwszClientUnicodeMenuName = MenuName.Buffer; clsMenuName.pusMenuName = &MenuName; - Atom = NtUserRegisterClassExWOW( &WndClass, - &ClassName, - NULL, //PUNICODE_STRING ClsNVersion, - &clsMenuName, - fnID, - dwFlags, - pdwWowData); + for(;;) + { + Atom = NtUserRegisterClassExWOW( &WndClass, + &ClassName, + NULL, //PUNICODE_STRING ClsNVersion, + &clsMenuName, + fnID, + dwFlags, + pdwWowData); + + if (Atom) break; + if (!ClassFound) + { + save_error = GetLastError(); + if ( save_error == ERROR_CANNOT_FIND_WND_CLASS || + save_error == ERROR_CLASS_DOES_NOT_EXIST ) + { + ClassFound = VersionRegisterClass(ClassName.Buffer, NULL, NULL, &hLibModule); + if (ClassFound) continue; + } + } + if (hLibModule) + { + save_error = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(save_error); + hLibModule = 0; + } + break; + } TRACE("atom=%04x wndproc=%p hinst=%p bg=%p style=%08x clsExt=%d winExt=%d class=%p\n", Atom, lpwcx->lpfnWndProc, lpwcx->hInstance, lpwcx->hbrBackground, @@ -1720,8 +1910,8 @@ ClassName.Buffer = (PWSTR)((ULONG_PTR)lpClassName); Ret = NtUserUnregisterClass(&ClassName, - hInstance, - 0); + hInstance, + 0); if (!IS_ATOM(lpClassName)) RtlFreeUnicodeString(&ClassName); Modified: trunk/reactos/win32ss/user/user32/windows/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/window.c [iso-8859-1] Sun Nov 3 23:19:59 2013 @@ -169,7 +169,9 @@ UNICODE_STRING ClassName; WNDCLASSEXA wceA; WNDCLASSEXW wceW; - BOOL Unicode; + HMODULE hLibModule; + DWORD save_error; + BOOL Unicode, ClassFound = FALSE; HWND Handle = NULL; #if 0 @@ -262,21 +264,42 @@ if (!Unicode) dwExStyle |= WS_EX_SETANSICREATOR; - Handle = NtUserCreateWindowEx(dwExStyle, - plstrClassName, - NULL, - &WindowName, - dwStyle, - x, - y, - nWidth, - nHeight, - hWndParent, - hMenu, - hInstance, - lpParam, - dwFlags, - NULL); + for(;;) + { + Handle = NtUserCreateWindowEx(dwExStyle, + plstrClassName, + NULL, + &WindowName, + dwStyle, + x, + y, + nWidth, + nHeight, + hWndParent, + hMenu, + hInstance, + lpParam, + dwFlags, + NULL); + if (Handle) break; + if (!ClassFound) + { + save_error = GetLastError(); + if ( save_error == ERROR_CANNOT_FIND_WND_CLASS ) + { + ClassFound = VersionRegisterClass(ClassName.Buffer, NULL, NULL, &hLibModule); + if (ClassFound) continue; + } + } + if (hLibModule) + { + save_error = GetLastError(); + FreeLibrary(hLibModule); + SetLastError(save_error); + hLibModule = 0; + } + break; + } #if 0 DbgPrint("[window] NtUserCreateWindowEx() == %d\n", Handle); @@ -845,7 +868,7 @@ /* - * @unimplemented + * @implemented */ BOOL WINAPI GetAltTabInfoA(HWND hwnd, @@ -854,13 +877,12 @@ LPSTR pszItemText, UINT cchItemText) { - UNIMPLEMENTED; - return FALSE; -} - - -/* - * @unimplemented + return NtUserGetAltTabInfo(hwnd,iItem,pati,(LPWSTR)pszItemText,cchItemText,TRUE); +} + + +/* + * @implemented */ BOOL WINAPI GetAltTabInfoW(HWND hwnd, @@ -869,8 +891,7 @@ LPWSTR pszItemText, UINT cchItemText) { - UNIMPLEMENTED; - return FALSE; + return NtUserGetAltTabInfo(hwnd,iItem,pati,pszItemText,cchItemText,FALSE); }
11 years, 1 month
1
0
0
0
[hbelusca] 60857: [FAST486]: Code formatting only.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Nov 3 23:13:53 2013 New Revision: 60857 URL:
http://svn.reactos.org/svn/reactos?rev=60857&view=rev
Log: [FAST486]: Code formatting only. Modified: branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/opcodes.c branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Sun Nov 3 23:13:53 2013 @@ -739,7 +739,7 @@ Result = Accumulator - Destination; /* Update the flags */ - State->Flags.Cf = Accumulator < Destination; + State->Flags.Cf = (Accumulator < Destination); State->Flags.Of = ((Accumulator & SIGN_FLAG_BYTE) != (Destination & SIGN_FLAG_BYTE)) && ((Accumulator & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); @@ -795,7 +795,7 @@ Result = Accumulator - Destination; /* Update the flags */ - State->Flags.Cf = Accumulator < Destination; + State->Flags.Cf = (Accumulator < Destination); State->Flags.Of = ((Accumulator & SIGN_FLAG_LONG) != (Destination & SIGN_FLAG_LONG)) && ((Accumulator & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); @@ -830,7 +830,7 @@ Result = Accumulator - Destination; /* Update the flags */ - State->Flags.Cf = Accumulator < Destination; + State->Flags.Cf = (Accumulator < Destination); State->Flags.Of = ((Accumulator & SIGN_FLAG_WORD) != (Destination & SIGN_FLAG_WORD)) && ((Accumulator & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Sun Nov 3 23:13:53 2013 @@ -3065,7 +3065,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -3134,7 +3134,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -3181,7 +3181,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -3231,7 +3231,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -3274,7 +3274,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -3304,7 +3304,7 @@ Result = FirstValue - SecondValue; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -5566,7 +5566,7 @@ Result = (FirstValue - SecondValue) & DataMask; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -5890,7 +5890,7 @@ Result = (FirstValue - SecondValue) & DataMask; /* Update the flags */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Sun Nov 3 23:13:53 2013 @@ -120,7 +120,7 @@ Result = (FirstValue - SecondValue) & MaxValue; /* Update CF, OF and AF */ - State->Flags.Cf = FirstValue < SecondValue; + State->Flags.Cf = (FirstValue < SecondValue); State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); @@ -184,8 +184,8 @@ /* Update CF and OF */ State->Flags.Cf = Result & 1; - if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) - ^ State->Flags.Cf; + if (Count == 1) State->Flags.Of = State->Flags.Cf + ^ ((Result & HighestBit) != 0); break; } @@ -212,8 +212,8 @@ /* Update CF and OF */ State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0); - if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) - ^ State->Flags.Cf; + if (Count == 1) State->Flags.Of = State->Flags.Cf + ^ ((Result & HighestBit) != 0); break; } @@ -241,8 +241,8 @@ /* Update CF and OF */ State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0); - if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) - ^ State->Flags.Cf; + if (Count == 1) State->Flags.Of = State->Flags.Cf + ^ ((Result & HighestBit) != 0); break; } @@ -994,8 +994,7 @@ SHORT Result = (SHORT)((CHAR)Value) * (SHORT)((CHAR)State->GeneralRegs[FAST486_REG_EAX].LowByte); /* Update the flags */ - State->Flags.Cf = State->Flags.Of = - ((Result < -128) || (Result > 127)); + State->Flags.Cf = State->Flags.Of = ((Result < -128) || (Result > 127)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = (USHORT)Result; @@ -1166,8 +1165,7 @@ ULONGLONG Result = (ULONGLONG)Value * (ULONGLONG)State->GeneralRegs[FAST486_REG_EAX].Long; /* Update the flags */ - State->Flags.Cf = State->Flags.Of = - ((Result & 0xFFFFFFFF00000000ULL) != 0); + State->Flags.Cf = State->Flags.Of = ((Result & 0xFFFFFFFF00000000ULL) != 0); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL; @@ -1196,8 +1194,7 @@ LONGLONG Result = (LONGLONG)((LONG)Value) * (LONGLONG)((LONG)State->GeneralRegs[FAST486_REG_EAX].Long); /* Update the flags */ - State->Flags.Cf = State->Flags.Of = - ((Result < -2147483648LL) || (Result > 2147483647LL)); + State->Flags.Cf = State->Flags.Of = ((Result < -2147483648LL) || (Result > 2147483647LL)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL; @@ -1208,8 +1205,7 @@ LONG Result = (LONG)((SHORT)Value) * (LONG)((SHORT)State->GeneralRegs[FAST486_REG_EAX].LowWord); /* Update the flags */ - State->Flags.Cf = State->Flags.Of = - ((Result < -32768) || (Result > 32767)); + State->Flags.Cf = State->Flags.Of = ((Result < -32768) || (Result > 32767)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = LOWORD(Result);
11 years, 1 month
1
0
0
0
[hbelusca] 60856: [FAST486]: Replace (boolean_condition) ? TRUE : FALSE; by: (boolean_condition) .
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Nov 3 22:44:55 2013 New Revision: 60856 URL:
http://svn.reactos.org/svn/reactos?rev=60856&view=rev
Log: [FAST486]: Replace (boolean_condition) ? TRUE : FALSE; by: (boolean_condition) . Modified: branches/ntvdm/lib/fast486/extraops.c branches/ntvdm/lib/fast486/opcodes.c branches/ntvdm/lib/fast486/opgroups.c Modified: branches/ntvdm/lib/fast486/extraops.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/extraops.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/extraops.c [iso-8859-1] Sun Nov 3 22:44:55 2013 @@ -743,8 +743,8 @@ State->Flags.Of = ((Accumulator & SIGN_FLAG_BYTE) != (Destination & SIGN_FLAG_BYTE)) && ((Accumulator & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); if (State->Flags.Zf) @@ -799,8 +799,8 @@ State->Flags.Of = ((Accumulator & SIGN_FLAG_LONG) != (Destination & SIGN_FLAG_LONG)) && ((Accumulator & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); if (State->Flags.Zf) @@ -834,8 +834,8 @@ State->Flags.Of = ((Accumulator & SIGN_FLAG_WORD) != (Destination & SIGN_FLAG_WORD)) && ((Accumulator & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (Accumulator & 0x0F) < (Destination & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); if (State->Flags.Zf) @@ -1267,9 +1267,9 @@ State->Flags.Cf = (Result < Source) && (Result < Destination); State->Flags.Of = ((Source & SIGN_FLAG_BYTE) == (Destination & SIGN_FLAG_BYTE)) && ((Source & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); - State->Flags.Af = (((Source & 0x0F) + (Destination & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((((Source & 0x0F) + (Destination & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write the sum to the destination */ @@ -1330,9 +1330,9 @@ State->Flags.Cf = (Result < Source) && (Result < Destination); State->Flags.Of = ((Source & SIGN_FLAG_LONG) == (Destination & SIGN_FLAG_LONG)) && ((Source & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); - State->Flags.Af = (((Source & 0x0F) + (Destination & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Af = ((((Source & 0x0F) + (Destination & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write the sum to the destination */ @@ -1369,9 +1369,9 @@ State->Flags.Cf = (Result < Source) && (Result < Destination); State->Flags.Of = ((Source & SIGN_FLAG_WORD) == (Destination & SIGN_FLAG_WORD)) && ((Source & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); - State->Flags.Af = (((Source & 0x0F) + (Destination & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Af = ((((Source & 0x0F) + (Destination & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write the sum to the destination */ Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Sun Nov 3 22:44:55 2013 @@ -473,19 +473,19 @@ { Value = ++State->GeneralRegs[Opcode & 0x07].Long; - State->Flags.Of = (Value == SIGN_FLAG_LONG) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_LONG); + State->Flags.Sf = ((Value & SIGN_FLAG_LONG) != 0); } else { Value = ++State->GeneralRegs[Opcode & 0x07].LowWord; - State->Flags.Of = (Value == SIGN_FLAG_WORD) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_WORD) ? TRUE : FALSE; - } - - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; - State->Flags.Af = ((Value & 0x0F) == 0) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_WORD); + State->Flags.Sf = ((Value & SIGN_FLAG_WORD) != 0); + } + + State->Flags.Zf = (Value == 0); + State->Flags.Af = ((Value & 0x0F) == 0); State->Flags.Pf = Fast486CalculateParity(LOBYTE(Value)); /* Return success */ @@ -507,19 +507,19 @@ { Value = --State->GeneralRegs[Opcode & 0x07].Long; - State->Flags.Of = (Value == (SIGN_FLAG_LONG - 1)) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Of = (Value == (SIGN_FLAG_LONG - 1)); + State->Flags.Sf = ((Value & SIGN_FLAG_LONG) != 0); } else { Value = --State->GeneralRegs[Opcode & 0x07].LowWord; - State->Flags.Of = (Value == (SIGN_FLAG_WORD - 1)) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_WORD) ? TRUE : FALSE; - } - - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; - State->Flags.Af = ((Value & 0x0F) == 0x0F) ? TRUE : FALSE; + State->Flags.Of = (Value == (SIGN_FLAG_WORD - 1)); + State->Flags.Sf = ((Value & SIGN_FLAG_WORD) != 0); + } + + State->Flags.Zf = (Value == 0); + State->Flags.Af = ((Value & 0x0F) == 0x0F); State->Flags.Pf = Fast486CalculateParity(LOBYTE(Value)); /* Return success */ @@ -1186,9 +1186,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) == (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1239,9 +1239,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1270,9 +1270,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1311,9 +1311,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) == (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1350,9 +1350,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1376,9 +1376,9 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1421,8 +1421,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1472,8 +1472,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1501,8 +1501,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1540,8 +1540,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1577,8 +1577,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1601,8 +1601,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1645,8 +1645,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1696,8 +1696,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1725,8 +1725,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1759,8 +1759,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1796,8 +1796,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1820,8 +1820,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1864,8 +1864,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1915,8 +1915,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1944,8 +1944,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1983,8 +1983,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2020,8 +2020,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2044,8 +2044,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2087,8 +2087,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* The result is discarded */ @@ -2135,8 +2135,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); } else @@ -2158,8 +2158,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); } @@ -2194,8 +2194,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* The result is discarded */ @@ -2229,8 +2229,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); } else @@ -2250,8 +2250,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); } @@ -2465,9 +2465,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) == (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2522,9 +2522,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2557,9 +2557,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2603,9 +2603,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) == (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2646,9 +2646,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) == (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2676,9 +2676,9 @@ State->Flags.Cf = State->Flags.Cf || ((Result < FirstValue) && (Result < SecondValue)); State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) == (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2751,8 +2751,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + 1) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2812,8 +2812,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + 1) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2850,8 +2850,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + 1) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2892,8 +2892,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + 1) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2933,8 +2933,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + Carry) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -2959,8 +2959,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < ((SecondValue + Carry) & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -3069,8 +3069,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -3138,8 +3138,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -3185,8 +3185,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -3235,8 +3235,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_BYTE) != (SecondValue & SIGN_FLAG_BYTE)) && ((FirstValue & SIGN_FLAG_BYTE) != (Result & SIGN_FLAG_BYTE)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -3278,8 +3278,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_LONG) != (SecondValue & SIGN_FLAG_LONG)) && ((FirstValue & SIGN_FLAG_LONG) != (Result & SIGN_FLAG_LONG)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_LONG) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -3308,8 +3308,8 @@ State->Flags.Of = ((FirstValue & SIGN_FLAG_WORD) != (SecondValue & SIGN_FLAG_WORD)) && ((FirstValue & SIGN_FLAG_WORD) != (Result & SIGN_FLAG_WORD)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_WORD) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Check if this is not a CMP */ @@ -4847,8 +4847,8 @@ State->GeneralRegs[FAST486_REG_EAX].LowByte = Value %= Base; /* Update flags */ - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Value == 0); + State->Flags.Sf = ((Value & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Value); return TRUE; @@ -4873,8 +4873,8 @@ State->GeneralRegs[FAST486_REG_EAX].LowByte = Value; /* Update flags */ - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; - State->Flags.Sf = (Value & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Value == 0); + State->Flags.Sf = ((Value & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Value); return TRUE; @@ -5570,8 +5570,8 @@ State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SignFlag) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SignFlag) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Increment/decrement ESI and EDI */ @@ -5894,8 +5894,8 @@ State->Flags.Of = ((FirstValue & SignFlag) != (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); State->Flags.Af = (FirstValue & 0x0F) < (SecondValue & 0x0F); - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SignFlag) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SignFlag) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Increment/decrement EDI */ Modified: branches/ntvdm/lib/fast486/opgroups.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opgroups.c?re…
============================================================================== --- branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opgroups.c [iso-8859-1] Sun Nov 3 22:44:55 2013 @@ -61,7 +61,7 @@ State->Flags.Cf = (Result < FirstValue) && (Result < SecondValue); State->Flags.Of = ((FirstValue & SignFlag) == (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); - State->Flags.Af = (((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + (SecondValue & 0x0F)) & 0x10) != 0); break; } @@ -85,8 +85,7 @@ || ((Result < FirstValue) && (Result < (SecondValue + Carry))); State->Flags.Of = ((FirstValue & SignFlag) == (SecondValue & SignFlag)) && ((FirstValue & SignFlag) != (Result & SignFlag)); - State->Flags.Af = (((FirstValue & 0x0F) + ((SecondValue + Carry) & 0x0F)) & 0x10) - ? TRUE : FALSE; + State->Flags.Af = ((((FirstValue & 0x0F) + ((SecondValue + Carry) & 0x0F)) & 0x10) != 0); break; } @@ -144,8 +143,8 @@ } /* Update ZF, SF and PF */ - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SignFlag) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SignFlag) != 0); State->Flags.Pf = Fast486CalculateParity(LOBYTE(Result)); /* Return the result */ @@ -185,7 +184,7 @@ /* Update CF and OF */ State->Flags.Cf = Result & 1; - if (Count == 1) State->Flags.Of = ((Result & HighestBit) ? TRUE : FALSE) + if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) ^ State->Flags.Cf; break; @@ -197,10 +196,9 @@ Result = (Value >> Count) | (Value << (Bits - Count)); /* Update CF and OF */ - State->Flags.Cf = (Result & HighestBit) ? TRUE : FALSE; + State->Flags.Cf = ((Result & HighestBit) != 0); if (Count == 1) State->Flags.Of = State->Flags.Cf - ^ ((Result & (HighestBit >> 1)) - ? TRUE : FALSE); + ^ ((Result & (HighestBit >> 1)) != 0); break; } @@ -213,8 +211,8 @@ | (Value >> (Bits - Count + 1)); /* Update CF and OF */ - State->Flags.Cf = (Value & (1 << (Bits - Count))) ? TRUE : FALSE; - if (Count == 1) State->Flags.Of = ((Result & HighestBit) ? TRUE : FALSE) + State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0); + if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) ^ State->Flags.Cf; break; @@ -228,10 +226,9 @@ | (Value << (Bits - Count + 1)); /* Update CF and OF */ - State->Flags.Cf = (Value & (1 << (Bits - Count))) ? TRUE : FALSE; + State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0); if (Count == 1) State->Flags.Of = State->Flags.Cf - ^ ((Result & (HighestBit >> 1)) - ? TRUE : FALSE); + ^ ((Result & (HighestBit >> 1)) != 0); break; } @@ -243,9 +240,9 @@ Result = Value << Count; /* Update CF and OF */ - State->Flags.Cf = (Value & (1 << (Bits - Count))) ? TRUE : FALSE; - if (Count == 1) State->Flags.Of = ((Result & HighestBit) ? TRUE : FALSE) - ^ (State->Flags.Cf ? TRUE : FALSE); + State->Flags.Cf = ((Value & (1 << (Bits - Count))) != 0); + if (Count == 1) State->Flags.Of = ((Result & HighestBit) != 0) + ^ State->Flags.Cf; break; } @@ -256,8 +253,8 @@ Result = Value >> Count; /* Update CF and OF */ - State->Flags.Cf = (Value & (1 << (Count - 1))) ? TRUE : FALSE; - if (Count == 1) State->Flags.Of = (Value & HighestBit) ? TRUE : FALSE; + State->Flags.Cf = ((Value & (1 << (Count - 1))) != 0); + if (Count == 1) State->Flags.Of = ((Value & HighestBit) != 0); break; } @@ -271,7 +268,7 @@ if (Value & HighestBit) Result |= ((1 << Count) - 1) << (Bits - Count); /* Update CF and OF */ - State->Flags.Cf = (Value & (1 << (Count - 1))) ? TRUE : FALSE; + State->Flags.Cf = ((Value & (1 << (Count - 1))) != 0); if (Count == 1) State->Flags.Of = FALSE; break; @@ -281,8 +278,8 @@ if (Operation >= 4) { /* Update ZF, SF and PF */ - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & HighestBit) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & HighestBit) != 0); State->Flags.Pf = Fast486CalculateParity(Result); } @@ -945,8 +942,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); break; @@ -966,11 +963,11 @@ UCHAR Result = -Value; /* Update the flags */ - State->Flags.Cf = (Value != 0) ? TRUE : FALSE; + State->Flags.Cf = (Value != 0); State->Flags.Of = (Value & SIGN_FLAG_BYTE) && (Result & SIGN_FLAG_BYTE); - State->Flags.Af = ((Value & 0x0F) != 0) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Af = ((Value & 0x0F) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -983,7 +980,7 @@ USHORT Result = (USHORT)Value * (USHORT)State->GeneralRegs[FAST486_REG_EAX].LowByte; /* Update the flags */ - State->Flags.Cf = State->Flags.Of = HIBYTE(Result) ? TRUE : FALSE; + State->Flags.Cf = State->Flags.Of = (HIBYTE(Result) != 0); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = Result; @@ -998,7 +995,7 @@ /* Update the flags */ State->Flags.Cf = State->Flags.Of = - ((Result < -128) || (Result > 127)) ? TRUE : FALSE; + ((Result < -128) || (Result > 127)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = (USHORT)Result; @@ -1110,8 +1107,8 @@ /* Update the flags */ State->Flags.Cf = FALSE; State->Flags.Of = FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SignFlag) ? TRUE : FALSE; + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SignFlag) != 0); State->Flags.Pf = Fast486CalculateParity(Result); break; @@ -1141,11 +1138,11 @@ if (!OperandSize) Result &= 0xFFFF; /* Update the flags */ - State->Flags.Cf = (Value != 0) ? TRUE : FALSE; + State->Flags.Cf = (Value != 0); State->Flags.Of = (Value & SignFlag) && (Result & SignFlag); - State->Flags.Af = ((Value & 0x0F) != 0) ? TRUE : FALSE; - State->Flags.Zf = (Result == 0) ? TRUE : FALSE; - State->Flags.Sf = (Result & SignFlag) ? TRUE : FALSE; + State->Flags.Af = ((Value & 0x0F) != 0); + State->Flags.Zf = (Result == 0); + State->Flags.Sf = ((Result & SignFlag) != 0); State->Flags.Pf = Fast486CalculateParity(Result); /* Write back the result */ @@ -1170,7 +1167,7 @@ /* Update the flags */ State->Flags.Cf = State->Flags.Of = - (Result & 0xFFFFFFFF00000000ULL) ? TRUE : FALSE; + ((Result & 0xFFFFFFFF00000000ULL) != 0); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL; @@ -1181,7 +1178,7 @@ ULONG Result = (ULONG)Value * (ULONG)State->GeneralRegs[FAST486_REG_EAX].LowWord; /* Update the flags */ - State->Flags.Cf = State->Flags.Of = HIWORD(Result) ? TRUE : FALSE; + State->Flags.Cf = State->Flags.Of = (HIWORD(Result) != 0); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = LOWORD(Result); @@ -1200,7 +1197,7 @@ /* Update the flags */ State->Flags.Cf = State->Flags.Of = - ((Result < -2147483648LL) || (Result > 2147483647LL)) ? TRUE : FALSE; + ((Result < -2147483648LL) || (Result > 2147483647LL)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].Long = Result & 0xFFFFFFFFULL; @@ -1212,7 +1209,7 @@ /* Update the flags */ State->Flags.Cf = State->Flags.Of = - ((Result < -32768) || (Result > 32767)) ? TRUE : FALSE; + ((Result < -32768) || (Result > 32767)); /* Write back the result */ State->GeneralRegs[FAST486_REG_EAX].LowWord = LOWORD(Result); @@ -1316,20 +1313,20 @@ { /* Increment and update OF and AF */ Value++; - State->Flags.Of = (Value == SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_BYTE); State->Flags.Af = ((Value & 0x0F) == 0); } else { /* Decrement and update OF and AF */ - State->Flags.Of = (Value == SIGN_FLAG_BYTE) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_BYTE); Value--; State->Flags.Af = ((Value & 0x0F) == 0x0F); } /* Update flags */ - State->Flags.Sf = (Value & SIGN_FLAG_BYTE) ? TRUE : FALSE; - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; + State->Flags.Zf = (Value == 0); + State->Flags.Sf = ((Value & SIGN_FLAG_BYTE) != 0); State->Flags.Pf = Fast486CalculateParity(Value); /* Write back the result */ @@ -1377,13 +1374,13 @@ { /* Increment and update OF and AF */ Value++; - State->Flags.Of = (Value == SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_LONG); State->Flags.Af = ((Value & 0x0F) == 0); } else if (ModRegRm.Register == 1) { /* Decrement and update OF and AF */ - State->Flags.Of = (Value == SIGN_FLAG_LONG) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_LONG); Value--; State->Flags.Af = ((Value & 0x0F) == 0x0F); } @@ -1495,8 +1492,8 @@ if (ModRegRm.Register <= 1) { /* Update flags */ - State->Flags.Sf = (Value & SIGN_FLAG_LONG) ? TRUE : FALSE; - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; + State->Flags.Sf = ((Value & SIGN_FLAG_LONG) != 0); + State->Flags.Zf = (Value == 0); State->Flags.Pf = Fast486CalculateParity(Value); /* Write back the result */ @@ -1520,13 +1517,13 @@ { /* Increment and update OF */ Value++; - State->Flags.Of = (Value == SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_WORD); State->Flags.Af = ((Value & 0x0F) == 0); } else if (ModRegRm.Register == 1) { /* Decrement and update OF */ - State->Flags.Of = (Value == SIGN_FLAG_WORD) ? TRUE : FALSE; + State->Flags.Of = (Value == SIGN_FLAG_WORD); Value--; State->Flags.Af = ((Value & 0x0F) == 0x0F); } @@ -1645,8 +1642,8 @@ if (ModRegRm.Register <= 1) { /* Update flags */ - State->Flags.Sf = (Value & SIGN_FLAG_WORD) ? TRUE : FALSE; - State->Flags.Zf = (Value == 0) ? TRUE : FALSE; + State->Flags.Sf = ((Value & SIGN_FLAG_WORD) != 0); + State->Flags.Zf = (Value == 0); State->Flags.Pf = Fast486CalculateParity(Value); /* Write back the result */
11 years, 1 month
1
0
0
0
[aandrejevic] 60855: [NTVDM] Use BiosConsoleInput instead of calling GetStdHandle in the keyboard input thread.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sun Nov 3 21:52:58 2013 New Revision: 60855 URL:
http://svn.reactos.org/svn/reactos?rev=60855&view=rev
Log: [NTVDM] Use BiosConsoleInput instead of calling GetStdHandle in the keyboard input thread. Modified: branches/ntvdm/subsystems/ntvdm/bios.c branches/ntvdm/subsystems/ntvdm/ntvdm.c branches/ntvdm/subsystems/ntvdm/ps2.c Modified: branches/ntvdm/subsystems/ntvdm/bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios.c?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/bios.c [iso-8859-1] Sun Nov 3 21:52:58 2013 @@ -26,6 +26,7 @@ static HANDLE BiosConsoleInput = INVALID_HANDLE_VALUE; static HANDLE BiosConsoleOutput = INVALID_HANDLE_VALUE; static CONSOLE_SCREEN_BUFFER_INFO BiosSavedBufferInfo; +static HANDLE InputThread = NULL; /* * VGA Register Configurations for BIOS Video Modes @@ -555,6 +556,9 @@ /* Set the console input mode */ SetConsoleMode(BiosConsoleInput, ENABLE_MOUSE_INPUT | ENABLE_PROCESSED_INPUT); + /* Start the input thread */ + InputThread = CreateThread(NULL, 0, &InputThreadProc, BiosConsoleInput, 0, NULL); + /* Initialize the PIC */ PicWriteCommand(PIC_MASTER_CMD, PIC_ICW1 | PIC_ICW1_ICW4); PicWriteCommand(PIC_SLAVE_CMD , PIC_ICW1 | PIC_ICW1_ICW4); @@ -593,6 +597,9 @@ /* Close the console handles */ if (BiosConsoleOutput != INVALID_HANDLE_VALUE) CloseHandle(BiosConsoleOutput); if (BiosConsoleInput != INVALID_HANDLE_VALUE) CloseHandle(BiosConsoleInput); + + /* Close the input thread handle */ + if (InputThread != NULL) CloseHandle(InputThread); } WORD BiosPeekCharacter(VOID) Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sun Nov 3 21:52:58 2013 @@ -76,7 +76,6 @@ DWORD LastClockUpdate = GetTickCount(); LARGE_INTEGER Frequency, LastTimerTick, LastRtcTick, Counter; LONGLONG TimerTicks; - HANDLE InputThread = NULL; LARGE_INTEGER StartPerfCount; DWORD StartTickCount; @@ -138,9 +137,6 @@ DisplayMessage(L"Could not start program: %S", CommandLine); return -1; } - - /* Start the input thread */ - InputThread = CreateThread(NULL, 0, &InputThreadProc, NULL, 0, NULL); /* Find the starting performance and tick count */ StartTickCount = GetTickCount(); @@ -226,7 +222,6 @@ VgaRefreshDisplay(); Cleanup: - if (InputThread != NULL) CloseHandle(InputThread); SpeakerCleanup(); BiosCleanup(); EmulatorCleanup(); Modified: branches/ntvdm/subsystems/ntvdm/ps2.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ps2.c?re…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ps2.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ps2.c [iso-8859-1] Sun Nov 3 21:52:58 2013 @@ -268,7 +268,7 @@ DWORD WINAPI InputThreadProc(LPVOID Parameter) { INT i; - HANDLE ConsoleInput = GetStdHandle(STD_INPUT_HANDLE); + HANDLE ConsoleInput = (HANDLE)Parameter; INPUT_RECORD InputRecord; DWORD Count;
11 years, 1 month
1
0
0
0
[aandrejevic] 60854: [NTVDM] Implement the CMOS and Real Time Clock (RTC). Improve the performance of the PIT and RTC (correctly this time).
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sun Nov 3 21:33:22 2013 New Revision: 60854 URL:
http://svn.reactos.org/svn/reactos?rev=60854&view=rev
Log: [NTVDM] Implement the CMOS and Real Time Clock (RTC). Improve the performance of the PIT and RTC (correctly this time). Added: branches/ntvdm/subsystems/ntvdm/cmos.c (with props) branches/ntvdm/subsystems/ntvdm/cmos.h (with props) Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt branches/ntvdm/subsystems/ntvdm/emulator.c branches/ntvdm/subsystems/ntvdm/ntvdm.c Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/CMakeLis…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] Sun Nov 3 21:33:22 2013 @@ -14,6 +14,7 @@ ps2.c speaker.c vga.c + cmos.c ntvdm.c ntvdm.rc ${CMAKE_CURRENT_BINARY_DIR}/ntvdm.def) Added: branches/ntvdm/subsystems/ntvdm/cmos.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.c?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/cmos.c (added) +++ branches/ntvdm/subsystems/ntvdm/cmos.c [iso-8859-1] Sun Nov 3 21:33:22 2013 @@ -0,0 +1,419 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: cmos.c + * PURPOSE: CMOS Real Time Clock emulation + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +/* INCLUDES *******************************************************************/ + +#define NDEBUG + +#include "cmos.h" +#include "pic.h" + +/* PRIVATE VARIABLES **********************************************************/ + +static BOOLEAN NmiEnabled = TRUE; +static BYTE StatusRegA = CMOS_DEFAULT_STA; +static BYTE StatusRegB = CMOS_DEFAULT_STB; +static BYTE StatusRegC = 0; +static BYTE AlarmHour, AlarmMinute, AlarmSecond; +static CMOS_REGISTERS SelectedRegister = CMOS_REG_STATUS_D; + +/* PUBLIC FUNCTIONS ***********************************************************/ + +BOOLEAN IsNmiEnabled(VOID) +{ + return NmiEnabled; +} + +VOID CmosWriteAddress(BYTE Value) +{ + /* Update the NMI enabled flag */ + NmiEnabled = !(Value & CMOS_DISABLE_NMI); + + /* Get the register number */ + Value &= ~CMOS_DISABLE_NMI; + + if (Value < CMOS_REG_MAX) + { + /* Select the new register */ + SelectedRegister = Value; + } + else + { + /* Default to Status Register D */ + SelectedRegister = CMOS_REG_STATUS_D; + } +} + +BYTE CmosReadData(VOID) +{ + SYSTEMTIME CurrentTime; + + /* Get the current time */ + GetLocalTime(&CurrentTime); + + switch (SelectedRegister) + { + case CMOS_REG_SECONDS: + { + return (StatusRegB & CMOS_STB_BINARY) + ? CurrentTime.wSecond + : BINARY_TO_BCD(CurrentTime.wSecond); + } + + case CMOS_REG_ALARM_SEC: + { + return (StatusRegB & CMOS_STB_BINARY) + ? AlarmSecond + : BINARY_TO_BCD(AlarmSecond); + } + + case CMOS_REG_MINUTES: + { + return (StatusRegB & CMOS_STB_BINARY) + ? CurrentTime.wMinute + : BINARY_TO_BCD(CurrentTime.wMinute); + } + + case CMOS_REG_ALARM_MIN: + { + return (StatusRegB & CMOS_STB_BINARY) + ? AlarmMinute + : BINARY_TO_BCD(AlarmMinute); + } + + case CMOS_REG_HOURS: + { + BOOLEAN Afternoon = FALSE; + BYTE Value = CurrentTime.wHour; + + if (!(StatusRegB & CMOS_STB_24HOUR) && (Value >= 12)) + { + Value -= 12; + Afternoon = TRUE; + } + + if (!(StatusRegB & CMOS_STB_BINARY)) Value = BINARY_TO_BCD(Value); + + /* Convert to 12-hour */ + if (Afternoon) Value |= 0x80; + + return Value; + } + + case CMOS_REG_ALARM_HRS: + { + BOOLEAN Afternoon = FALSE; + BYTE Value = AlarmHour; + + if (!(StatusRegB & CMOS_STB_24HOUR) && (Value >= 12)) + { + Value -= 12; + Afternoon = TRUE; + } + + if (!(StatusRegB & CMOS_STB_BINARY)) Value = BINARY_TO_BCD(Value); + + /* Convert to 12-hour */ + if (Afternoon) Value |= 0x80; + + return Value; + } + + case CMOS_REG_DAY_OF_WEEK: + { + return (StatusRegB & CMOS_STB_BINARY) + ? CurrentTime.wDayOfWeek + : BINARY_TO_BCD(CurrentTime.wDayOfWeek); + } + + case CMOS_REG_DAY: + { + return (StatusRegB & CMOS_STB_BINARY) + ? CurrentTime.wDay + :BINARY_TO_BCD(CurrentTime.wDay); + } + + case CMOS_REG_MONTH: + { + return (StatusRegB & CMOS_STB_BINARY) + ? CurrentTime.wMonth + : BINARY_TO_BCD(CurrentTime.wMonth); + } + + case CMOS_REG_YEAR: + { + return (StatusRegB & CMOS_STB_BINARY) + ? (CurrentTime.wYear % 100) + : BINARY_TO_BCD(CurrentTime.wYear % 100); + } + + case CMOS_REG_STATUS_A: + { + return StatusRegA; + } + + case CMOS_REG_STATUS_B: + { + return StatusRegB; + } + + case CMOS_REG_STATUS_C: + { + BYTE Value = StatusRegC; + + /* Clear status register C */ + StatusRegC = 0; + + /* Return the old value */ + return Value; + } + + case CMOS_REG_STATUS_D: + { + /* Our CMOS battery works perfectly forever */ + return CMOS_BATTERY_OK; + } + + case CMOS_REG_DIAGNOSTICS: + { + /* Diagnostics found no errors */ + return 0; + } + + default: + { + /* Read ignored */ + return 0; + } + } + + /* Return to Status Register D */ + SelectedRegister = CMOS_REG_STATUS_D; +} + +VOID CmosWriteData(BYTE Value) +{ + BOOLEAN ChangeTime = FALSE; + SYSTEMTIME CurrentTime; + + /* Get the current time */ + GetLocalTime(&CurrentTime); + + switch (SelectedRegister) + { + case CMOS_REG_SECONDS: + { + ChangeTime = TRUE; + CurrentTime.wSecond = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_ALARM_SEC: + { + AlarmSecond = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_MINUTES: + { + ChangeTime = TRUE; + CurrentTime.wMinute = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_ALARM_MIN: + { + AlarmMinute = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_HOURS: + { + BOOLEAN Afternoon = FALSE; + + ChangeTime = TRUE; + + if (!(StatusRegB & CMOS_STB_24HOUR) && (Value & 0x80)) + { + Value &= ~0x80; + Afternoon = TRUE; + } + + CurrentTime.wHour = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + /* Convert to 24-hour format */ + if (Afternoon) CurrentTime.wHour += 12; + + break; + } + + case CMOS_REG_ALARM_HRS: + { + BOOLEAN Afternoon = FALSE; + + if (!(StatusRegB & CMOS_STB_24HOUR) && (Value & 0x80)) + { + Value &= ~0x80; + Afternoon = TRUE; + } + + AlarmHour = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + /* Convert to 24-hour format */ + if (Afternoon) AlarmHour += 12; + + break; + } + + case CMOS_REG_DAY_OF_WEEK: + { + ChangeTime = TRUE; + CurrentTime.wDayOfWeek = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_DAY: + { + ChangeTime = TRUE; + CurrentTime.wDay = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_MONTH: + { + ChangeTime = TRUE; + CurrentTime.wMonth = (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_YEAR: + { + ChangeTime = TRUE; + + /* Clear everything except the century */ + CurrentTime.wYear = (CurrentTime.wYear / 100) * 100; + + CurrentTime.wYear += (StatusRegB & CMOS_STB_BINARY) + ? Value + : BCD_TO_BINARY(Value); + + break; + } + + case CMOS_REG_STATUS_A: + { + StatusRegA = Value; + break; + } + + case CMOS_REG_STATUS_B: + { + StatusRegB = Value; + break; + } + + default: + { + /* Write ignored */ + } + } + + if (ChangeTime) SetLocalTime(&CurrentTime); + + /* Return to Status Register D */ + SelectedRegister = CMOS_REG_STATUS_D; +} + +DWORD RtcGetTicksPerSecond(VOID) +{ + BYTE RateSelect = StatusRegB & 0x0F; + + if (RateSelect == 0) + { + /* No periodic interrupt */ + return 0; + } + + /* 1 and 2 act like 8 and 9 */ + if (RateSelect <= 2) RateSelect += 7; + + return 1 << (16 - RateSelect); +} + +VOID RtcPeriodicTick(VOID) +{ + /* Set PF */ + StatusRegC |= CMOS_STC_PF; + + /* Check if there should be an interrupt on a periodic timer tick */ + if (StatusRegB & CMOS_STB_INT_PERIODIC) + { + StatusRegC |= CMOS_STC_IRQF; + + /* Interrupt! */ + PicInterruptRequest(RTC_IRQ_NUMBER); + } +} + +/* Should be called every second */ +VOID RtcTimeUpdate(VOID) +{ + SYSTEMTIME CurrentTime; + + /* Get the current time */ + GetLocalTime(&CurrentTime); + + /* Set UF */ + StatusRegC |= CMOS_STC_UF; + + /* Check if the time matches the alarm time */ + if ((CurrentTime.wHour == AlarmHour) + && (CurrentTime.wMinute == AlarmMinute) + && (CurrentTime.wSecond == AlarmSecond)) + { + /* Set the alarm flag */ + StatusRegC |= CMOS_STC_AF; + + /* Set IRQF if there should be an interrupt */ + if (StatusRegB & CMOS_STB_INT_ON_ALARM) StatusRegC |= CMOS_STC_IRQF; + } + + /* Check if there should be an interrupt on update */ + if (StatusRegB & CMOS_STB_INT_ON_UPDATE) StatusRegC |= CMOS_STC_IRQF; + + if (StatusRegC & CMOS_STC_IRQF) + { + /* Interrupt! */ + PicInterruptRequest(RTC_IRQ_NUMBER); + } +} Propchange: branches/ntvdm/subsystems/ntvdm/cmos.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ntvdm/subsystems/ntvdm/cmos.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/cmos.h?r…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/cmos.h (added) +++ branches/ntvdm/subsystems/ntvdm/cmos.h [iso-8859-1] Sun Nov 3 21:33:22 2013 @@ -0,0 +1,76 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: cmos.h + * PURPOSE: Real Time Clock emulation (header file) + * PROGRAMMERS: Aleksandar Andrejevic <theflash AT sdf DOT lonestar DOT org> + */ + +#ifndef _CMOS_H_ +#define _CMOS_H_ + +/* INCLUDES *******************************************************************/ + +#include "ntvdm.h" + +/* DEFINES ********************************************************************/ + +#define RTC_IRQ_NUMBER 8 +#define CMOS_ADDRESS_PORT 0x70 +#define CMOS_DATA_PORT 0x71 +#define CMOS_DISABLE_NMI (1 << 7) +#define CMOS_BATTERY_OK 0x80 + +/* Status Register B flags */ +#define CMOS_STB_24HOUR (1 << 1) +#define CMOS_STB_BINARY (1 << 2) +#define CMOS_STB_SQUARE_WAVE (1 << 3) +#define CMOS_STB_INT_ON_UPDATE (1 << 4) +#define CMOS_STB_INT_ON_ALARM (1 << 5) +#define CMOS_STB_INT_PERIODIC (1 << 6) + +/* Status Register C flags */ +#define CMOS_STC_UF CMOS_STB_INT_ON_UPDATE +#define CMOS_STC_AF CMOS_STB_INT_ON_ALARM +#define CMOS_STC_PF CMOS_STB_INT_PERIODIC +#define CMOS_STC_IRQF (1 << 7) + +/* Default register values */ +#define CMOS_DEFAULT_STA 0x26 +#define CMOS_DEFAULT_STB CMOS_STB_24HOUR + +/* BCD-Binary conversion */ +#define BINARY_TO_BCD(x) (((x / 10) << 4) | (x % 10)) +#define BCD_TO_BINARY(x) (((x >> 4) * 10) + (x & 0x0F)) + +typedef enum _CMOS_REGISTERS +{ + CMOS_REG_SECONDS, + CMOS_REG_ALARM_SEC, + CMOS_REG_MINUTES, + CMOS_REG_ALARM_MIN, + CMOS_REG_HOURS, + CMOS_REG_ALARM_HRS, + CMOS_REG_DAY_OF_WEEK, + CMOS_REG_DAY, + CMOS_REG_MONTH, + CMOS_REG_YEAR, + CMOS_REG_STATUS_A, + CMOS_REG_STATUS_B, + CMOS_REG_STATUS_C, + CMOS_REG_STATUS_D, + CMOS_REG_DIAGNOSTICS, + CMOS_REG_MAX +} CMOS_REGISTERS, *PCMOS_REGISTERS; + +BOOLEAN IsNmiEnabled(VOID); +VOID CmosWriteAddress(BYTE Value); +BYTE CmosReadData(VOID); +VOID CmosWriteData(BYTE Value); +DWORD RtcGetTicksPerSecond(VOID); +VOID RtcPeriodicTick(VOID); +VOID RtcTimeUpdate(VOID); + +#endif // _CMOS_H_ + +/* EOF */ Propchange: branches/ntvdm/subsystems/ntvdm/cmos.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Sun Nov 3 21:33:22 2013 @@ -19,6 +19,7 @@ #include "pic.h" #include "ps2.h" #include "timer.h" +#include "cmos.h" /* PRIVATE VARIABLES **********************************************************/ @@ -123,6 +124,12 @@ case PS2_DATA_PORT: { *(Address++) = KeyboardReadData(); + break; + } + + case CMOS_DATA_PORT: + { + *(Address++) = CmosReadData(); break; } @@ -211,6 +218,18 @@ break; } + case CMOS_ADDRESS_PORT: + { + CmosWriteAddress(*(Address++)); + break; + } + + case CMOS_DATA_PORT: + { + CmosWriteData(*(Address++)); + break; + } + case SPEAKER_CONTROL_PORT: { SpeakerWriteCommand(*(Address++)); Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sun Nov 3 21:33:22 2013 @@ -19,6 +19,7 @@ #include "timer.h" #include "pic.h" #include "ps2.h" +#include "cmos.h" /* * Activate this line if you want to be able to test NTVDM with: @@ -72,9 +73,12 @@ DWORD Cycles = 0; DWORD LastCyclePrintout = GetTickCount(); DWORD LastVerticalRefresh = GetTickCount(); - LARGE_INTEGER Frequency, LastTimerTick, Counter; + DWORD LastClockUpdate = GetTickCount(); + LARGE_INTEGER Frequency, LastTimerTick, LastRtcTick, Counter; LONGLONG TimerTicks; HANDLE InputThread = NULL; + LARGE_INTEGER StartPerfCount; + DWORD StartTickCount; /* Set the handler routine */ SetConsoleCtrlHandler(ConsoleCtrlHandler, TRUE); @@ -138,17 +142,34 @@ /* Start the input thread */ InputThread = CreateThread(NULL, 0, &InputThreadProc, NULL, 0, NULL); - /* Set the last timer tick to the current time */ - QueryPerformanceCounter(&LastTimerTick); + /* Find the starting performance and tick count */ + StartTickCount = GetTickCount(); + QueryPerformanceCounter(&StartPerfCount); + + /* Set the last timer ticks to the current time */ + LastTimerTick = LastRtcTick = StartPerfCount; /* Main loop */ while (VdmRunning) { + DWORD PitResolution = PitGetResolution(); + DWORD RtcFrequency = RtcGetTicksPerSecond(); + /* Get the current number of ticks */ CurrentTickCount = GetTickCount(); - /* Get the current performance counter value */ - QueryPerformanceCounter(&Counter); + if ((PitResolution <= 1000) && (RtcFrequency <= 1000)) + { + /* Calculate the approximate performance counter value instead */ + Counter.QuadPart = StartPerfCount.QuadPart + + (CurrentTickCount - StartTickCount) + * (Frequency.QuadPart / 1000); + } + else + { + /* Get the current performance counter value */ + QueryPerformanceCounter(&Counter); + } /* Get the number of PIT ticks that have passed */ TimerTicks = ((Counter.QuadPart - LastTimerTick.QuadPart) @@ -159,6 +180,21 @@ { PitDecrementCount(TimerTicks); LastTimerTick = Counter; + } + + /* Check for RTC update */ + if ((CurrentTickCount - LastClockUpdate) >= 1000) + { + RtcTimeUpdate(); + LastClockUpdate = CurrentTickCount; + } + + /* Check for RTC periodic tick */ + if ((Counter.QuadPart - LastRtcTick.QuadPart) + >= (Frequency.QuadPart / (LONGLONG)RtcFrequency)) + { + RtcPeriodicTick(); + LastRtcTick = Counter; } /* Check for vertical retrace */
11 years, 1 month
1
0
0
0
[hbelusca] 60853: [NTVDM] Start to implement a basic emulated PC speaker, using the Beep driver.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Nov 3 20:31:19 2013 New Revision: 60853 URL:
http://svn.reactos.org/svn/reactos?rev=60853&view=rev
Log: [NTVDM] Start to implement a basic emulated PC speaker, using the Beep driver. Added: branches/ntvdm/subsystems/ntvdm/speaker.c (with props) branches/ntvdm/subsystems/ntvdm/speaker.h (with props) Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt branches/ntvdm/subsystems/ntvdm/emulator.c branches/ntvdm/subsystems/ntvdm/ntvdm.c branches/ntvdm/subsystems/ntvdm/ntvdm.h branches/ntvdm/subsystems/ntvdm/timer.c branches/ntvdm/subsystems/ntvdm/timer.h Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/CMakeLis…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -12,6 +12,7 @@ registers.c timer.c ps2.c + speaker.c vga.c ntvdm.c ntvdm.rc Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -14,6 +14,7 @@ #include "bios.h" #include "bop.h" #include "dos.h" +#include "speaker.h" #include "vga.h" #include "pic.h" #include "ps2.h" @@ -122,6 +123,12 @@ case PS2_DATA_PORT: { *(Address++) = KeyboardReadData(); + break; + } + + case SPEAKER_CONTROL_PORT: + { + *(Address++) = SpeakerReadStatus(); break; } @@ -204,6 +211,12 @@ break; } + case SPEAKER_CONTROL_PORT: + { + SpeakerWriteCommand(*(Address++)); + break; + } + case VGA_AC_WRITE: case VGA_AC_READ: case VGA_SEQ_INDEX: Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.c [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -13,6 +13,7 @@ #include "ntvdm.h" #include "emulator.h" #include "bios.h" +#include "speaker.h" #include "vga.h" #include "dos.h" #include "timer.h" @@ -117,6 +118,9 @@ goto Cleanup; } + /* Initialize the PC Speaker */ + SpeakerInitialize(); + /* Initialize the VDM DOS kernel */ if (!DosInitialize()) { @@ -133,7 +137,7 @@ /* Start the input thread */ InputThread = CreateThread(NULL, 0, &InputThreadProc, NULL, 0, NULL); - + /* Set the last timer tick to the current time */ QueryPerformanceCounter(&LastTimerTick); @@ -187,6 +191,7 @@ Cleanup: if (InputThread != NULL) CloseHandle(InputThread); + SpeakerCleanup(); BiosCleanup(); EmulatorCleanup(); Modified: branches/ntvdm/subsystems/ntvdm/ntvdm.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/ntvdm.h?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/ntvdm.h [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -15,6 +15,7 @@ #include <stdarg.h> #include <conio.h> +#define WIN32_NO_STATUS #include <windows.h> #include <debug.h> Added: branches/ntvdm/subsystems/ntvdm/speaker.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/speaker.…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/speaker.c (added) +++ branches/ntvdm/subsystems/ntvdm/speaker.c [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -0,0 +1,165 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: speaker.c + * PURPOSE: PC Speaker emulation + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) + */ + +/* INCLUDES *******************************************************************/ + +#define NDEBUG + +#include "speaker.h" +#include "emulator.h" +#include "timer.h" + +/* Extra PSDK/NDK Headers */ +#include <ndk/iofuncs.h> +#include <ndk/obfuncs.h> +#include <ndk/rtlfuncs.h> + +/* DDK Driver Headers */ +#include <ntddbeep.h> + +/* PRIVATE VARIABLES **********************************************************/ + +static BYTE Port61hState = 0x00; +HANDLE hBeep = NULL; + +/* PUBLIC FUNCTIONS ***********************************************************/ + +VOID SpeakerInitialize(VOID) +{ + NTSTATUS Status; + UNICODE_STRING BeepDevice; + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + + /* Adapted from kernel32:Beep() */ + + // + // On TS systems, we need to Load Winsta.dll and call WinstationBeepOpen + // after doing a GetProcAddress for it + // + + /* Open the device */ + RtlInitUnicodeString(&BeepDevice, L"\\Device\\Beep"); + InitializeObjectAttributes(&ObjectAttributes, &BeepDevice, 0, NULL, NULL); + Status = NtCreateFile(&hBeep, + FILE_READ_DATA | FILE_WRITE_DATA, + &ObjectAttributes, + &IoStatusBlock, + NULL, + 0, + FILE_SHARE_READ | FILE_SHARE_WRITE, + FILE_OPEN_IF, + 0, + NULL, + 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to open Beep driver, Status 0x%08lx\n", Status); + } +} + +VOID SpeakerCleanup(VOID) +{ + NtClose(hBeep); +} + +BYTE SpeakerReadStatus(VOID) +{ + // DPRINT1("SpeakerReadStatus() == 0x%x\n", Port61hState); + return Port61hState; +} + +VOID SpeakerWriteCommand(BYTE Value) +{ + BOOLEAN IsConnectedToPITChannel2; + UCHAR SpeakerData; + + // DPRINT1("SpeakerWriteCommand(0x%x)\n", Value); + + Port61hState = Value; + IsConnectedToPITChannel2 = ((Port61hState & 0x01) != 0); + SpeakerData = (Port61hState & 0x02); + + if (PitChannel2 && IsConnectedToPITChannel2) + { + /* Set bit 5 of Port 61h */ + Port61hState |= 1 << 5; + } + else + { + /* Clear bit 5 of Port 61h */ + Port61hState &= ~(1 << 5); + } + + if (PitChannel2 && IsConnectedToPITChannel2 && (SpeakerData != 0)) + { + /* Start beeping - Adapted from kernel32:Beep() */ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + BEEP_SET_PARAMETERS BeepSetParameters; + + DWORD PitChannel2ReloadValue = PitChannel2->ReloadValue; + if (PitChannel2ReloadValue == 0) PitChannel2ReloadValue = 65536; + + /* Set beep data */ + BeepSetParameters.Frequency = (PIT_BASE_FREQUENCY / PitChannel2ReloadValue) * + (PitChannel2->Mode == PIT_MODE_SQUARE_WAVE ? 2 : 1); + BeepSetParameters.Duration = INFINITE; + + /* Send the beep */ + Status = NtDeviceIoControlFile(hBeep, + NULL, + NULL, + NULL, + &IoStatusBlock, + IOCTL_BEEP_SET, + &BeepSetParameters, + sizeof(BeepSetParameters), + NULL, + 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Beep (%lu, %lu) failed, Status 0x%08lx\n", + BeepSetParameters.Frequency, + BeepSetParameters.Duration, + Status); + } + } + else + { + /* Stop beeping */ + NTSTATUS Status; + IO_STATUS_BLOCK IoStatusBlock; + BEEP_SET_PARAMETERS BeepSetParameters; + + /* Set beep data */ + BeepSetParameters.Frequency = 0x00; + BeepSetParameters.Duration = 0x00; + + /* Send the beep */ + Status = NtDeviceIoControlFile(hBeep, + NULL, + NULL, + NULL, + &IoStatusBlock, + IOCTL_BEEP_SET, + &BeepSetParameters, + sizeof(BeepSetParameters), + NULL, + 0); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Beep (%lu, %lu) failed, Status 0x%08lx\n", + BeepSetParameters.Frequency, + BeepSetParameters.Duration, + Status); + } + } +} + +/* EOF */ Propchange: branches/ntvdm/subsystems/ntvdm/speaker.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ntvdm/subsystems/ntvdm/speaker.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/speaker.…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/speaker.h (added) +++ branches/ntvdm/subsystems/ntvdm/speaker.h [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -0,0 +1,29 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: speaker.h + * PURPOSE: PC Speaker emulation + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) + */ + +#ifndef _SPEAKER_H_ +#define _SPEAKER_H_ + +/* INCLUDES *******************************************************************/ + +#include "ntvdm.h" + +/* DEFINES ********************************************************************/ + +#define SPEAKER_CONTROL_PORT 0x61 + +/* FUNCTIONS ******************************************************************/ + +VOID SpeakerInitialize(VOID); +VOID SpeakerCleanup(VOID); +BYTE SpeakerReadStatus(VOID); +VOID SpeakerWriteCommand(BYTE Value); + +#endif // _SPEAKER_H_ + +/* EOF */ Propchange: branches/ntvdm/subsystems/ntvdm/speaker.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ntvdm/subsystems/ntvdm/timer.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/timer.c?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/timer.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/timer.c [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -16,6 +16,7 @@ /* PRIVATE VARIABLES **********************************************************/ static PIT_CHANNEL PitChannels[PIT_CHANNELS]; +PPIT_CHANNEL PitChannel2 = &PitChannels[2]; /* PUBLIC FUNCTIONS ***********************************************************/ Modified: branches/ntvdm/subsystems/ntvdm/timer.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/timer.h?…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/timer.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/timer.h [iso-8859-1] Sun Nov 3 20:31:19 2013 @@ -43,6 +43,8 @@ BYTE AccessMode; } PIT_CHANNEL, *PPIT_CHANNEL; +extern PPIT_CHANNEL PitChannel2; // Needed for PC Speaker + /* FUNCTIONS ******************************************************************/ VOID PitWriteCommand(BYTE Value);
11 years, 1 month
1
0
0
0
[tfaber] 60852: [RSYM] - Include string table in checksum calculation CORE-7547 #resolve
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Nov 3 19:01:03 2013 New Revision: 60852 URL:
http://svn.reactos.org/svn/reactos?rev=60852&view=rev
Log: [RSYM] - Include string table in checksum calculation CORE-7547 #resolve Modified: trunk/reactos/tools/rsym/rsym.c Modified: trunk/reactos/tools/rsym/rsym.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/rsym.c?rev=6085…
============================================================================== --- trunk/reactos/tools/rsym/rsym.c [iso-8859-1] (original) +++ trunk/reactos/tools/rsym/rsym.c [iso-8859-1] Sun Nov 3 19:01:03 2013 @@ -212,7 +212,7 @@ *StringsLength += strlen(StringToFind) + 1; AddStringToHash(StringTable, hash, End - (char *)StringsBase, End); - + return End - (char *)StringsBase; } } @@ -497,7 +497,7 @@ int i; char **newBucket; - if (tabEnt) + if (tabEnt) { for (i = 0; tabEnt[i] && strcmp(tabEnt[i], name); i++); if (tabEnt[i]) @@ -773,7 +773,7 @@ (*MergedSymbolCount)++; } /* Handle functions that have no analog in the upstream data */ - for (CoffIndex = 0; CoffIndex < CoffSymbolsCount; CoffIndex++) + for (CoffIndex = 0; CoffIndex < CoffSymbolsCount; CoffIndex++) { if (CoffSymbols[CoffIndex].Address && CoffSymbols[CoffIndex].FunctionOffset) @@ -901,6 +901,7 @@ ULONG StartOfRawData; unsigned Section; void *OutHeader, *ProcessedRelocs, *PaddedRosSym, *Data; + unsigned char *PaddedStringTable; PIMAGE_DOS_HEADER OutDosHeader; PIMAGE_FILE_HEADER OutFileHeader; PIMAGE_OPTIONAL_HEADER OutOptHeader; @@ -909,10 +910,11 @@ ULONG Length, i; ULONG ProcessedRelocsLength; ULONG RosSymOffset, RosSymFileLength; + ULONG PaddedStringTableLength; int InRelocSectionIndex; PIMAGE_SECTION_HEADER OutRelocSection; /* Each coff symbol is 18 bytes and the string table follows */ - char *StringTable = (char *)InData + + char *StringTable = (char *)InData + InFileHeader->PointerToSymbolTable + 18 * InFileHeader->NumberOfSymbols; ULONG StringTableLength = 0; ULONG StringTableLocation; @@ -1014,7 +1016,7 @@ OutRelocSection = CurrentSectionHeader; } StringTableLocation = CurrentSectionHeader->PointerToRawData + CurrentSectionHeader->SizeOfRawData; - (OutFileHeader->NumberOfSections)++; + OutFileHeader->NumberOfSections++; CurrentSectionHeader++; } } @@ -1058,7 +1060,7 @@ | IMAGE_SCN_LNK_REMOVE | IMAGE_SCN_TYPE_NOLOAD; OutOptHeader->SizeOfImage = ROUND_UP(CurrentSectionHeader->VirtualAddress + CurrentSectionHeader->Misc.VirtualSize, OutOptHeader->SectionAlignment); - (OutFileHeader->NumberOfSections)++; + OutFileHeader->NumberOfSections++; PaddedRosSym = malloc(RosSymFileLength); if (PaddedRosSym == NULL) @@ -1120,6 +1122,37 @@ } Length += OutSectionHeaders[Section].SizeOfRawData; } + + if (OutFileHeader->PointerToSymbolTable) + { + int PaddingFrom = (OutFileHeader->PointerToSymbolTable + StringTableLength) % + OutOptHeader->FileAlignment; + int PaddingSize = PaddingFrom ? OutOptHeader->FileAlignment - PaddingFrom : 0; + + PaddedStringTableLength = StringTableLength + PaddingSize; + PaddedStringTable = malloc(PaddedStringTableLength); + /* COFF string section is preceeded by a length */ + assert(sizeof(StringTableLength) == 4); + memcpy(PaddedStringTable, &StringTableLength, sizeof(StringTableLength)); + /* We just copy enough of the string table to contain the strings we want + The string table length technically counts as part of the string table + space itself. */ + memcpy(PaddedStringTable + 4, StringTable + 4, StringTableLength - 4); + memset(PaddedStringTable + StringTableLength, 0, PaddingSize); + + assert(OutFileHeader->PointerToSymbolTable % 2 == 0); + for (i = 0; i < PaddedStringTableLength / 2; i++) + { + CheckSum += ((unsigned short*)PaddedStringTable)[i]; + CheckSum = 0xffff & (CheckSum + (CheckSum >> 16)); + } + Length += PaddedStringTableLength; + } + else + { + PaddedStringTable = NULL; + } + CheckSum += Length; OutOptHeader->CheckSum = CheckSum; @@ -1161,28 +1194,11 @@ } } - if (OutFileHeader->PointerToSymbolTable) - { - int PaddingFrom = (OutFileHeader->PointerToSymbolTable + StringTableLength) % - OutOptHeader->FileAlignment; - fseek(OutFile, OutFileHeader->PointerToSymbolTable, 0); - - /* COFF string section is preceeded by a length */ - assert(sizeof(StringTableLength) == 4); - fwrite((char*)&StringTableLength, 1, sizeof(StringTableLength), OutFile); - /* We just copy enough of the string table to contain the strings we want - The string table length technically counts as part of the string table - space itself. */ - fwrite(StringTable + 4, 1, StringTableLength - 4, OutFile); - - if (PaddingFrom) - { - int PaddingSize = OutOptHeader->FileAlignment - PaddingFrom; - char *Padding = (char *)malloc(PaddingSize); - memset(Padding, 0, PaddingFrom); - fwrite(Padding, 1, PaddingSize, OutFile); - free(Padding); - } + if (PaddedStringTable) + { + fseek(OutFile, OutFileHeader->PointerToSymbolTable, SEEK_SET); + fwrite(PaddedStringTable, 1, PaddedStringTableLength, OutFile); + free(PaddedStringTable); } if (PaddedRosSym) @@ -1325,10 +1341,10 @@ // SYMOPT_LOAD_LINES SymSetOptions(0x10000 | 0x800000 | 0x40 | 0x10); SymInitialize(FileData, ".", 0); - + module_base = SymLoadModule(FileData, file, path1, path1, 0, FileSize) & 0xffffffff; - if (ConvertDbgHelp(FileData, + if (ConvertDbgHelp(FileData, module_base, SourcePath, &StabSymbolsCount,
11 years, 1 month
1
0
0
0
[aandrejevic] 60851: [FAST486] BP is certainly not the same register as BX.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Sun Nov 3 18:31:00 2013 New Revision: 60851 URL:
http://svn.reactos.org/svn/reactos?rev=60851&view=rev
Log: [FAST486] BP is certainly not the same register as BX. Modified: branches/ntvdm/lib/fast486/common.inl Modified: branches/ntvdm/lib/fast486/common.inl URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/common.inl?re…
============================================================================== --- branches/ntvdm/lib/fast486/common.inl [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/common.inl [iso-8859-1] Sun Nov 3 18:31:00 2013 @@ -550,9 +550,8 @@ switch (RegMem) { case 0: - case 2: - { - /* (SS:)[BX + SI] */ + { + /* [BX + SI] */ ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord + State->GeneralRegs[FAST486_REG_ESI].LowWord; @@ -560,10 +559,27 @@ } case 1: + { + /* [BX + DI] */ + ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord + + State->GeneralRegs[FAST486_REG_EDI].LowWord; + + break; + } + + case 2: + { + /* SS:[BP + SI] */ + ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBP].LowWord + + State->GeneralRegs[FAST486_REG_ESI].LowWord; + + break; + } + case 3: { - /* (SS:)[BX + DI] */ - ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBX].LowWord + /* SS:[BP + DI] */ + ModRegRm->MemoryAddress = State->GeneralRegs[FAST486_REG_EBP].LowWord + State->GeneralRegs[FAST486_REG_EDI].LowWord; break;
11 years, 1 month
1
0
0
0
[bfreisen] 60850: [PAINT] * apply patch from [#CORE-7521] (paint fails silently if a file could not be opened) * apply patch from [#CORE-7311] (fix and improve resource and UI) in modified form New...
by bfreisen@svn.reactos.org
Author: bfreisen Date: Sun Nov 3 14:37:42 2013 New Revision: 60850 URL:
http://svn.reactos.org/svn/reactos?rev=60850&view=rev
Log: [PAINT] * apply patch from [#CORE-7521] (paint fails silently if a file could not be opened) * apply patch from [#CORE-7311] (fix and improve resource and UI) in modified form New resource strings are involved => please check translations Modified: trunk/reactos/base/applications/mspaint/definitions.h trunk/reactos/base/applications/mspaint/lang/bg-BG.rc trunk/reactos/base/applications/mspaint/lang/cs-CZ.rc trunk/reactos/base/applications/mspaint/lang/de-DE.rc trunk/reactos/base/applications/mspaint/lang/en-GB.rc trunk/reactos/base/applications/mspaint/lang/en-US.rc trunk/reactos/base/applications/mspaint/lang/es-ES.rc trunk/reactos/base/applications/mspaint/lang/eu-ES.rc trunk/reactos/base/applications/mspaint/lang/fr-FR.rc trunk/reactos/base/applications/mspaint/lang/he-IL.rc trunk/reactos/base/applications/mspaint/lang/hu-HU.rc trunk/reactos/base/applications/mspaint/lang/it-IT.rc trunk/reactos/base/applications/mspaint/lang/ja-JP.rc trunk/reactos/base/applications/mspaint/lang/nl-NL.rc trunk/reactos/base/applications/mspaint/lang/no-NO.rc trunk/reactos/base/applications/mspaint/lang/pl-PL.rc trunk/reactos/base/applications/mspaint/lang/pt-BR.rc trunk/reactos/base/applications/mspaint/lang/pt-PT.rc trunk/reactos/base/applications/mspaint/lang/ro-RO.rc trunk/reactos/base/applications/mspaint/lang/ru-RU.rc trunk/reactos/base/applications/mspaint/lang/sk-SK.rc trunk/reactos/base/applications/mspaint/lang/sv-SE.rc trunk/reactos/base/applications/mspaint/lang/tr-TR.rc trunk/reactos/base/applications/mspaint/lang/uk-UA.rc trunk/reactos/base/applications/mspaint/lang/zh-CN.rc trunk/reactos/base/applications/mspaint/lang/zh-TW.rc trunk/reactos/base/applications/mspaint/winproc.c Modified: trunk/reactos/base/applications/mspaint/definitions.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/definitions.h [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/definitions.h [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -203,3 +203,5 @@ #define IDS_INTNUMBERS 930 #define IDS_PERCENTAGE 931 #define IDS_ANGLE 932 + +#define IDS_LOADERRORTEXT 933 Modified: trunk/reactos/base/applications/mspaint/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/bg-BG.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/bg-BG.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/cs-CZ.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/cs-CZ.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/de-DE.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Bitte geben Sie nur ganze Zahlen ein!" IDS_PERCENTAGE, "Der Prozentsatz muss zwischen 1 und 500 liegen." IDS_ANGLE, "Der Winkel muss zwischen -89 und 89 liegen." -END + IDS_LOADERRORTEXT, "Die Datei %s konnte nicht geladen werden." +END Modified: trunk/reactos/base/applications/mspaint/lang/en-GB.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/en-GB.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/en-GB.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/en-US.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/en-US.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -26,32 +26,32 @@ POPUP "&Edit" BEGIN - MENUITEM "Undo\tCtrl+Z", IDM_EDITUNDO - MENUITEM "Redo\tCtrl+Y", IDM_EDITREDO - MENUITEM SEPARATOR - MENUITEM "Cut\tCtrl+X", IDM_EDITCUT - MENUITEM "Copy\tCtrl+C", IDM_EDITCOPY - MENUITEM "Paste\tCtrl+V", IDM_EDITPASTE - MENUITEM "Delete selection\tDel", IDM_EDITDELETESELECTION - MENUITEM "Invert selection", IDM_EDITINVERTSELECTION - MENUITEM "Select all\tCtrl+A", IDM_EDITSELECTALL - MENUITEM SEPARATOR - MENUITEM "Copy to...", IDM_EDITCOPYTO - MENUITEM "Paste from...", IDM_EDITPASTEFROM + MENUITEM "&Undo\tCtrl+Z", IDM_EDITUNDO + MENUITEM "&Redo\tCtrl+Y", IDM_EDITREDO + MENUITEM SEPARATOR + MENUITEM "Cu&t\tCtrl+X", IDM_EDITCUT + MENUITEM "&Copy\tCtrl+C", IDM_EDITCOPY + MENUITEM "&Paste\tCtrl+V", IDM_EDITPASTE + MENUITEM "De&lete selection\tDel", IDM_EDITDELETESELECTION + MENUITEM "&Invert selection", IDM_EDITINVERTSELECTION + MENUITEM "Select &all\tCtrl+A", IDM_EDITSELECTALL + MENUITEM SEPARATOR + MENUITEM "C&opy to...", IDM_EDITCOPYTO + MENUITEM "Paste &from...", IDM_EDITPASTEFROM END POPUP "&View" BEGIN - MENUITEM "Tool box\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED - MENUITEM "Color palette\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED - MENUITEM "Status bar", IDM_VIEWSTATUSBAR, CHECKED - MENUITEM "Text Toolbar", IDM_FORMATICONBAR, CHECKED, GRAYED - MENUITEM SEPARATOR - POPUP "Zoom" + MENUITEM "&Tool box\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "&Color palette\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "&Status bar", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "T&ext Toolbar", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM SEPARATOR + POPUP "&Zoom" BEGIN - POPUP "User defined" + POPUP "&User defined" BEGIN - MENUITEM "12,5%", IDM_VIEWZOOM125 + MENUITEM "12.5%", IDM_VIEWZOOM125 MENUITEM "25%", IDM_VIEWZOOM25 MENUITEM "50%", IDM_VIEWZOOM50 MENUITEM "100%", IDM_VIEWZOOM100 @@ -60,26 +60,26 @@ MENUITEM "800%", IDM_VIEWZOOM800 END MENUITEM SEPARATOR - MENUITEM "Show grid\tCtrl+G", IDM_VIEWSHOWGRID - MENUITEM "Show miniature", IDM_VIEWSHOWMINIATURE + MENUITEM "Show &grid\tCtrl+G", IDM_VIEWSHOWGRID + MENUITEM "S&how miniature", IDM_VIEWSHOWMINIATURE END - MENUITEM "Full screen\tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "&Full screen\tCtrl+F", IDM_VIEWFULLSCREEN END POPUP "&Image" BEGIN - MENUITEM "Rotate/Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW - MENUITEM "Crop", IDM_IMAGECROP - MENUITEM "Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS - MENUITEM "Attributes...\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "Rotate/&Mirror...\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "&Stretch/Skew...\tCtrl+W", IDM_IMAGESTRETCHSKEW + MENUITEM "&Crop", IDM_IMAGECROP + MENUITEM "&Invert colors\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "&Attributes...\tCtrl+E", IDM_IMAGEATTRIBUTES MENUITEM "Delete image\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE - MENUITEM "Draw opaque", IDM_IMAGEDRAWOPAQUE + MENUITEM "&Draw opaque", IDM_IMAGEDRAWOPAQUE END POPUP "&Colors" BEGIN - MENUITEM "Edit palette...", IDM_COLORSEDITPALETTE + MENUITEM "&Edit palette...", IDM_COLORSEDITPALETTE MENUITEM SEPARATOR MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE MENUITEM "Old palette", IDM_COLORSOLDPALETTE @@ -87,9 +87,9 @@ POPUP "&?" BEGIN - MENUITEM "Help topics", IDM_HELPHELPTOPICS - MENUITEM SEPARATOR - MENUITEM "Info", IDM_HELPINFO + MENUITEM "&Help topics", IDM_HELPHELPTOPICS + MENUITEM SEPARATOR + MENUITEM "&Info", IDM_HELPINFO END END @@ -122,12 +122,12 @@ CAPTION "Rotate and mirror image" BEGIN GROUPBOX "Rotate or mirror", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 - AUTORADIOBUTTON "Mirror horizontally", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP - AUTORADIOBUTTON "Mirror vertically", IDD_MIRRORROTATERB2, 12, 30, 100, 10 - AUTORADIOBUTTON "Rotate by an angle of", IDD_MIRRORROTATERB3, 12, 42, 100, 10 - AUTORADIOBUTTON "90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED - AUTORADIOBUTTON "180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED - AUTORADIOBUTTON "270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + AUTORADIOBUTTON "Mirror &horizontally", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "Mirror &vertically", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "&Rotate by an angle of", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "&90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "&180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "&270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 PUSHBUTTON "Cancel", IDCANCEL, 125, 24, 48, 14 END @@ -139,21 +139,21 @@ BEGIN EDITTEXT IDD_ATTRIBUTESEDIT1, 48, 40, 35, 12 EDITTEXT IDD_ATTRIBUTESEDIT2, 128, 40, 35, 12 - LTEXT "Width:", IDD_ATTRIBUTESTEXT1, 10, 40, 35, 10 - LTEXT "Height:", IDD_ATTRIBUTESTEXT2, 90, 40, 35, 10 - LTEXT "File date:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 - LTEXT "File size:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT "Resolution:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "&Width:", IDD_ATTRIBUTESTEXT1, 10, 40, 35, 10 + LTEXT "&Height:", IDD_ATTRIBUTESTEXT2, 90, 40, 35, 10 + LTEXT "File &date:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "File &size:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "&Resolution:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 LTEXT "Not available", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 LTEXT "Not available", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 LTEXT "Not available", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 GROUPBOX "Units", IDD_ATTRIBUTESGROUP1, 6, 57, 158, 27 - AUTORADIOBUTTON "Inches", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP - AUTORADIOBUTTON "cm", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 - AUTORADIOBUTTON "Pixels", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 + AUTORADIOBUTTON "&Inches", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP + AUTORADIOBUTTON "c&m", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 + AUTORADIOBUTTON "&Pixels", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 GROUPBOX "Colors", IDD_ATTRIBUTESGROUP2, 6, 88, 158, 27 - AUTORADIOBUTTON "Black and white", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP - AUTORADIOBUTTON "Colors", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 + AUTORADIOBUTTON "&Black and white", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "Co&lors", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "Cancel", IDCANCEL, 170, 24, 48, 14 PUSHBUTTON "Default", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/es-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/es-ES.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/eu-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/eu-ES.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/eu-ES.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/fr-FR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/fr-FR.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/he-IL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/he-IL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/he-IL.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/hu-HU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/hu-HU.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/it-IT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/it-IT.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/ja-JP.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/ja-JP.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -3,7 +3,7 @@ * LICENSE: unknown (LGPL assumed) * FILE: base/applications/mspaint/lang/ja-JP.rc * PURPOSE: Japanese Language resource file - * TRANSLATORS: pcds90net, Tomoya Kitagawa + * TRANSLATORS: pcds90net, Tomoya Kitagawa, Katayama Hirofumi MZ */ LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT @@ -26,32 +26,32 @@ POPUP "ç·¨é(&E)" BEGIN - MENUITEM "å ã«æ»ã\tCtrl+Z", IDM_EDITUNDO - MENUITEM "ããç´ã\tCtrl+Y", IDM_EDITREDO - MENUITEM SEPARATOR - MENUITEM "åãåã\tCtrl+X", IDM_EDITCUT - MENUITEM "ã³ãã¼\tCtrl+C", IDM_EDITCOPY - MENUITEM "è²¼ãä»ã\tCtrl+V", IDM_EDITPASTE - MENUITEM "é¸æç¯å²ã®åé¤\tDel", IDM_EDITDELETESELECTION - MENUITEM "é¸æç¯å²ã®æ¿å ¥", IDM_EDITINVERTSELECTION - MENUITEM "ãã¹ã¦é¸æ\tCtrl+A", IDM_EDITSELECTALL - MENUITEM SEPARATOR - MENUITEM "ãã¡ã¤ã«ã¸ã³ãã¼", IDM_EDITCOPYTO - MENUITEM "ãã¡ã¤ã«ããè²¼ãä»ã", IDM_EDITPASTEFROM + MENUITEM "å ã«æ»ã(&U)\tCtrl+Z", IDM_EDITUNDO + MENUITEM "ããç´ã(&R)\tCtrl+Y", IDM_EDITREDO + MENUITEM SEPARATOR + MENUITEM "åãåã(&T)\tCtrl+X", IDM_EDITCUT + MENUITEM "ã³ãã¼(&C)\tCtrl+C", IDM_EDITCOPY + MENUITEM "è²¼ãä»ã(&P)\tCtrl+V", IDM_EDITPASTE + MENUITEM "é¸æç¯å²ã®åé¤(&L)\tDel", IDM_EDITDELETESELECTION + MENUITEM "é¸æç¯å²ã®å転(&I)", IDM_EDITINVERTSELECTION + MENUITEM "ãã¹ã¦é¸æ(&A)\tCtrl+A", IDM_EDITSELECTALL + MENUITEM SEPARATOR + MENUITEM "ãã¡ã¤ã«ã¸ã³ãã¼(&O)", IDM_EDITCOPYTO + MENUITEM "ãã¡ã¤ã«ããè²¼ãä»ã(&F)", IDM_EDITPASTEFROM END POPUP "表示(&V)" BEGIN - MENUITEM "ãã¼ã« ããã¯ã¹\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED - MENUITEM "ã«ã©ã¼ ãã¬ãã\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED - MENUITEM "ã¹ãã¼ã¿ã¹ ãã¼", IDM_VIEWSTATUSBAR, CHECKED - MENUITEM "ããã¹ã ãã¼ã« ãã¼", IDM_FORMATICONBAR, CHECKED, GRAYED - MENUITEM SEPARATOR - POPUP "æ¡å¤§" + MENUITEM "ãã¼ã« ããã¯ã¹(&T)\tCtrl+T", IDM_VIEWTOOLBOX, CHECKED + MENUITEM "ã«ã©ã¼ ãã¬ãã(&C)\tCtrl+L", IDM_VIEWCOLORPALETTE, CHECKED + MENUITEM "ã¹ãã¼ã¿ã¹ ãã¼(&S)", IDM_VIEWSTATUSBAR, CHECKED + MENUITEM "ããã¹ã ãã¼ã« ãã¼(&E)", IDM_FORMATICONBAR, CHECKED, GRAYED + MENUITEM SEPARATOR + POPUP "æ¡å¤§(&Z)" BEGIN - POPUP "ã¦ã¼ã¶ã¼å®ç¾©" + POPUP "ã¦ã¼ã¶ã¼å®ç¾©(&U)" BEGIN - MENUITEM "12,5%", IDM_VIEWZOOM125 + MENUITEM "12.5%", IDM_VIEWZOOM125 MENUITEM "25%", IDM_VIEWZOOM25 MENUITEM "50%", IDM_VIEWZOOM50 MENUITEM "100%", IDM_VIEWZOOM100 @@ -60,26 +60,26 @@ MENUITEM "800%", IDM_VIEWZOOM800 END MENUITEM SEPARATOR - MENUITEM "ã°ãªããã表示\tCtrl+G", IDM_VIEWSHOWGRID - MENUITEM "å®å¯¸è¡¨ç¤º", IDM_VIEWSHOWMINIATURE + MENUITEM "ã°ãªããã表示(&G)\tCtrl+G", IDM_VIEWSHOWGRID + MENUITEM "å®å¯¸è¡¨ç¤º(&H)", IDM_VIEWSHOWMINIATURE END - MENUITEM "å ¨ç»é¢è¡¨ç¤º\tCtrl+F", IDM_VIEWFULLSCREEN + MENUITEM "å ¨ç»é¢è¡¨ç¤º(&F)\tCtrl+F", IDM_VIEWFULLSCREEN END POPUP "ç»å(&I)" BEGIN - MENUITEM "å転ã¨å転\tCtrl+R", IDM_IMAGEROTATEMIRROR - MENUITEM "Stretch/Skew\tCtrl+W", IDM_IMAGESTRETCHSKEW - MENUITEM "åãåã", IDM_IMAGECROP - MENUITEM "è²ã®å転\tCtrl+I", IDM_IMAGEINVERTCOLORS - MENUITEM "ç»åã®å±æ§\tCtrl+E", IDM_IMAGEATTRIBUTES + MENUITEM "å転ã¨å転(&M)\tCtrl+R", IDM_IMAGEROTATEMIRROR + MENUITEM "Stretch/Skew(&S)\tCtrl+W", IDM_IMAGESTRETCHSKEW + MENUITEM "åãåã(&C)", IDM_IMAGECROP + MENUITEM "è²ã®å転(&I)\tCtrl+I", IDM_IMAGEINVERTCOLORS + MENUITEM "ç»åã®å±æ§(&A)\tCtrl+E", IDM_IMAGEATTRIBUTES MENUITEM "ç»åã®åé¤\tCtrl+Shft+N", IDM_IMAGEDELETEIMAGE - MENUITEM "ä¸éæè²ãæç»ãã", IDM_IMAGEDRAWOPAQUE + MENUITEM "ä¸éæè²ãæç»ãã(&D)", IDM_IMAGEDRAWOPAQUE END POPUP "è²(&C)" BEGIN - MENUITEM "ãã¬ããã®ç·¨é", IDM_COLORSEDITPALETTE + MENUITEM "ãã¬ããã®ç·¨é(&E)", IDM_COLORSEDITPALETTE MENUITEM SEPARATOR MENUITEM "Modern palette", IDM_COLORSMODERNPALETTE MENUITEM "Old palette", IDM_COLORSOLDPALETTE @@ -87,9 +87,9 @@ POPUP "&?" BEGIN - MENUITEM "ãã«ã ãããã¯", IDM_HELPHELPTOPICS - MENUITEM SEPARATOR - MENUITEM "æ å ±", IDM_HELPINFO + MENUITEM "ãã«ã ãããã¯(&H)", IDM_HELPHELPTOPICS + MENUITEM SEPARATOR + MENUITEM "æ å ±(&I)", IDM_HELPINFO END END @@ -122,12 +122,12 @@ CAPTION "å転ã¨å転" BEGIN GROUPBOX "å転ã¨å転", IDD_MIRRORROTATEGROUP, 6, 6, 112, 86 - AUTORADIOBUTTON "æ°´å¹³æ¹åã«å転", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP - AUTORADIOBUTTON "åç´æ¹åã«å転", IDD_MIRRORROTATERB2, 12, 30, 100, 10 - AUTORADIOBUTTON "è§åº¦ãæå®", IDD_MIRRORROTATERB3, 12, 42, 100, 10 - AUTORADIOBUTTON "90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED - AUTORADIOBUTTON "180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED - AUTORADIOBUTTON "270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED + AUTORADIOBUTTON "æ°´å¹³æ¹åã«å転(&H)", IDD_MIRRORROTATERB1, 12, 18, 100, 10, WS_GROUP + AUTORADIOBUTTON "åç´æ¹åã«å転(&V)", IDD_MIRRORROTATERB2, 12, 30, 100, 10 + AUTORADIOBUTTON "è§åº¦ãæå®(&R)", IDD_MIRRORROTATERB3, 12, 42, 100, 10 + AUTORADIOBUTTON "&90°", IDD_MIRRORROTATERB4, 42, 54, 50, 10, WS_GROUP | WS_DISABLED + AUTORADIOBUTTON "&180°", IDD_MIRRORROTATERB5, 42, 66, 50, 10, WS_DISABLED + AUTORADIOBUTTON "&270°", IDD_MIRRORROTATERB6, 42, 78, 50, 10, WS_DISABLED DEFPUSHBUTTON "OK", IDOK, 125, 8, 48, 14 PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 125, 24, 48, 14 END @@ -139,21 +139,21 @@ BEGIN EDITTEXT IDD_ATTRIBUTESEDIT1, 48, 40, 35, 12 EDITTEXT IDD_ATTRIBUTESEDIT2, 128, 40, 35, 12 - LTEXT "å¹ :", IDD_ATTRIBUTESTEXT1, 10, 40, 35, 10 - LTEXT "é«ã:", IDD_ATTRIBUTESTEXT2, 90, 40, 35, 10 - LTEXT "ãã¡ã¤ã«ã®æ¥ä»:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 - LTEXT "ãã¡ã¤ã«ã®ãµã¤ãº:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 - LTEXT "解å度:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 - LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10 - LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10 - LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 + LTEXT "å¹ (&W):", IDD_ATTRIBUTESTEXT1, 10, 40, 35, 10 + LTEXT "é«ã(&H):", IDD_ATTRIBUTESTEXT2, 90, 40, 35, 10 + LTEXT "ãã¡ã¤ã«ã®æ¥ä»(&D):", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10 + LTEXT "ãã¡ã¤ã«ã®ãµã¤ãº(&S):", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10 + LTEXT "解å度(&R):", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10 + LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT6, 75, 5, 90, 10 + LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT7, 75, 15, 90, 10 + LTEXT "å©ç¨ä¸å¯è½", IDD_ATTRIBUTESTEXT8, 75, 25, 90, 10 GROUPBOX "åä½", IDD_ATTRIBUTESGROUP1, 6, 57, 158, 27 - AUTORADIOBUTTON "ã¤ã³ã", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP - AUTORADIOBUTTON "cm", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 - AUTORADIOBUTTON "ãã¯ã»ã«", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 + AUTORADIOBUTTON "ã¤ã³ã(&I)", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP + AUTORADIOBUTTON "c&m", IDD_ATTRIBUTESRB2, 62, 69, 45, 10 + AUTORADIOBUTTON "ãã¯ã»ã«(&P)", IDD_ATTRIBUTESRB3, 112, 69, 45, 10 GROUPBOX "è²", IDD_ATTRIBUTESGROUP2, 6, 88, 158, 27 - AUTORADIOBUTTON "ç½é»", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP - AUTORADIOBUTTON "ã«ã©ã¼", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 + AUTORADIOBUTTON "ç½é»(&B)", IDD_ATTRIBUTESRB4, 12, 100, 70, 10, WS_GROUP + AUTORADIOBUTTON "ã«ã©ã¼(&L)", IDD_ATTRIBUTESRB5, 92, 100, 35, 10 DEFPUSHBUTTON "OK", IDOK, 170, 8, 48, 14 PUSHBUTTON "ãã£ã³ã»ã«", IDCANCEL, 170, 24, 48, 14 PUSHBUTTON "ããã©ã«ã", IDD_ATTRIBUTESSTANDARD, 170, 40, 48, 14 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/nl-NL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/nl-NL.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/no-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/no-NO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/no-NO.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/pl-PL.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/pl-PL.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -219,4 +219,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/pt-BR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/pt-BR.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/pt-PT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/pt-PT.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/pt-PT.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/ro-RO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/ro-RO.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/ro-RO.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -219,4 +219,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/ru-RU.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/ru-RU.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/sk-SK.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/sk-SK.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -219,4 +219,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/sv-SE.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/sv-SE.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/tr-TR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/tr-TR.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/tr-TR.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Buraya yalnızca tamsayı girilmelidir." IDS_PERCENTAGE, "Buradaki deÄer 1 ilâ 500 olmalıdır." IDS_ANGLE, "Buradaki deÄer -89 ilâ 89 olmalıdır." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/uk-UA.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/uk-UA.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/zh-CN.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/zh-CN.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/lang/zh-TW.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/lang/zh-TW.rc [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/lang/zh-TW.rc [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -218,4 +218,5 @@ IDS_INTNUMBERS, "Please enter integral numbers only!" IDS_PERCENTAGE, "The percentage must be between 1 and 500." IDS_ANGLE, "The angle must be between -89 and 89." -END + IDS_LOADERRORTEXT, "The file %s could not be loaded." +END Modified: trunk/reactos/base/applications/mspaint/winproc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/mspaint/…
============================================================================== --- trunk/reactos/base/applications/mspaint/winproc.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/mspaint/winproc.c [iso-8859-1] Sun Nov 3 14:37:42 2013 @@ -433,8 +433,8 @@ if (hwnd == hMainWnd) { MINMAXINFO *mm = (LPMINMAXINFO) lParam; - (*mm).ptMinTrackSize.x = 330; - (*mm).ptMinTrackSize.y = 430; + mm->ptMinTrackSize.x = 330; + mm->ptMinTrackSize.y = 430; } break; @@ -792,6 +792,16 @@ SetWindowText(hMainWnd, tempstr); clearHistory(); isAFile = TRUE; + } + else + { + TCHAR programname[20]; + TCHAR loaderrortext[100]; + TCHAR temptext[500]; + LoadString(hProgInstance, IDS_PROGRAMNAME, programname, SIZEOF(programname)); + LoadString(hProgInstance, IDS_LOADERRORTEXT, loaderrortext, SIZEOF(loaderrortext)); + _stprintf(temptext, loaderrortext, ofn.lpstrFile); + MessageBox(hwnd, temptext, programname, MB_OK | MB_ICONEXCLAMATION); } } break;
11 years, 1 month
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
35
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Results per page:
10
25
50
100
200