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
2025
January
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
May 2008
----- 2025 -----
January 2025
----- 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
25 participants
586 discussions
Start a n
N
ew thread
[pschweitzer] 33569: Synced uxtheme.dll with Wine HEAD
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun May 18 05:03:29 2008 New Revision: 33569 URL:
http://svn.reactos.org/svn/reactos?rev=33569&view=rev
Log: Synced uxtheme.dll with Wine HEAD Modified: trunk/reactos/dll/win32/uxtheme/draw.c trunk/reactos/dll/win32/uxtheme/system.c Modified: trunk/reactos/dll/win32/uxtheme/draw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/draw.c?r…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/draw.c [iso-8859-1] Sun May 18 05:03:29 2008 @@ -196,7 +196,6 @@ WCHAR szPath[MAX_PATH]; int imagelayout = IL_HORIZONTAL; int imagecount = 1; - int imagenum; BITMAP bmp; HBITMAP hBmp; BOOL hasAlpha; @@ -209,7 +208,6 @@ GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_IMAGELAYOUT, &imagelayout); GetThemeInt(hTheme, iPartId, iStateId, TMT_IMAGECOUNT, &imagecount); - imagenum = max (min (imagecount, iStateId), 1) - 1; GetObjectW(hBmp, sizeof(bmp), &bmp); if(imagelayout == IL_VERTICAL) { reqsize.x = bmp.bmWidth; @@ -340,27 +338,81 @@ { if (sizingtype == ST_TILE) { - int yOfs = nYOriginDst; - int yRemaining = nHeightDst; - while (yRemaining > 0) + HDC hdcTemp; + BOOL result = FALSE; + + if (!nWidthSrc || !nHeightSrc) return TRUE; + + /* For destination width/height less than or equal to source + width/height, do not bother with memory bitmap optimization */ + if (nWidthSrc >= nWidthDst && nHeightSrc >= nHeightDst) { - int bltHeight = min (yRemaining, nHeightSrc); - int xOfs = nXOriginDst; - int xRemaining = nWidthDst; + int bltWidth = min (nWidthDst, nWidthSrc); + int bltHeight = min (nHeightDst, nHeightSrc); + + return UXTHEME_Blt (hdcDst, nXOriginDst, nYOriginDst, bltWidth, bltHeight, + hdcSrc, nXOriginSrc, nYOriginSrc, + transparent, transcolor); + } + + /* Create a DC with a bitmap consisting of a tiling of the source + bitmap, with standard GDI functions. This is faster than an + iteration with UXTHEME_Blt(). */ + hdcTemp = CreateCompatibleDC(hdcSrc); + if (hdcTemp != 0) + { + HBITMAP bitmapTemp; + HBITMAP bitmapOrig; + int nWidthTemp, nHeightTemp; + int xOfs, xRemaining; + int yOfs, yRemaining; + int growSize; + + /* Calculate temp dimensions of integer multiples of source dimensions */ + nWidthTemp = ((nWidthDst + nWidthSrc - 1) / nWidthSrc) * nWidthSrc; + nHeightTemp = ((nHeightDst + nHeightSrc - 1) / nHeightSrc) * nHeightSrc; + bitmapTemp = CreateCompatibleBitmap(hdcSrc, nWidthTemp, nHeightTemp); + bitmapOrig = SelectObject(hdcTemp, bitmapTemp); + + /* Initial copy of bitmap */ + BitBlt(hdcTemp, 0, 0, nWidthSrc, nHeightSrc, hdcSrc, nXOriginSrc, nYOriginSrc, SRCCOPY); + + /* Extend bitmap in the X direction. Growth of width is exponential */ + xOfs = nWidthSrc; + xRemaining = nWidthTemp - nWidthSrc; + growSize = nWidthSrc; while (xRemaining > 0) { - int bltWidth = min (xRemaining, nWidthSrc); - if (!UXTHEME_Blt (hdcDst, xOfs, yOfs, bltWidth, bltHeight, - hdcSrc, nXOriginSrc, nYOriginSrc, - transparent, transcolor)) - return FALSE; - xOfs += nWidthSrc; - xRemaining -= nWidthSrc; + growSize = min(growSize, xRemaining); + BitBlt(hdcTemp, xOfs, 0, growSize, nHeightSrc, hdcTemp, 0, 0, SRCCOPY); + xOfs += growSize; + xRemaining -= growSize; + growSize *= 2; } - yOfs += nHeightSrc; - yRemaining -= nHeightSrc; + + /* Extend bitmap in the Y direction. Growth of height is exponential */ + yOfs = nHeightSrc; + yRemaining = nHeightTemp - nHeightSrc; + growSize = nHeightSrc; + while (yRemaining > 0) + { + growSize = min(growSize, yRemaining); + BitBlt(hdcTemp, 0, yOfs, nWidthTemp, growSize, hdcTemp, 0, 0, SRCCOPY); + yOfs += growSize; + yRemaining -= growSize; + growSize *= 2; + } + + /* Use temporary hdc for source */ + result = UXTHEME_Blt (hdcDst, nXOriginDst, nYOriginDst, nWidthDst, nHeightDst, + hdcTemp, 0, 0, + transparent, transcolor); + + SelectObject(hdcTemp, bitmapOrig); + DeleteObject(bitmapTemp); } - return TRUE; + DeleteDC(hdcTemp); + return result; } else { @@ -853,7 +905,7 @@ /* FIXME: This only accounts for 2 gradient colors (out of 5) and ignores the gradient ratios (no idea how those work) Few themes use this, and the ones I've seen only use 2 colors with - a gradient ratio of 0 and 255 respectivly + a gradient ratio of 0 and 255 respectively */ COLORREF gradient1 = RGB(0,0,0); Modified: trunk/reactos/dll/win32/uxtheme/system.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/system.c…
============================================================================== --- trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/uxtheme/system.c [iso-8859-1] Sun May 18 05:03:29 2008 @@ -1171,7 +1171,7 @@ * 0x800706488 (Unknown property) when enumeration is canceled from callback * * NOTES - * When pszUnknown is NULL the callback is never called, the value does not seem to surve + * When pszUnknown is NULL the callback is never called, the value does not seem to serve * any other purpose */ HRESULT WINAPI ParseThemeIniFile(LPCWSTR pszIniFileName, LPWSTR pszUnknown,
16 years, 8 months
1
0
0
0
[hpoussin] 33568: Free memory only we allocated it
by hpoussin@svn.reactos.org
Author: hpoussin Date: Sun May 18 04:34:31 2008 New Revision: 33568 URL:
http://svn.reactos.org/svn/reactos?rev=33568&view=rev
Log: Free memory only we allocated it Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c Modified: trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
============================================================================== --- trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/csrss/win32csr/dllmain.c [iso-8859-1] Sun May 18 04:34:31 2008 @@ -356,6 +356,7 @@ LPSTR NtStatusString; UNICODE_STRING MessageU; ANSI_STRING MessageA; + USHORT CaptionSize = 0; if( !MessageResource->Flags ) { /* we've got an ansi string */ @@ -369,7 +370,6 @@ RtlUnicodeStringToAnsiString(&MessageA, &MessageU, TRUE); } - USHORT CaptionSize = 0; // check whether a caption exists if( *MessageA.Buffer == '{' ) { // get size of the caption @@ -464,7 +464,10 @@ RtlFreeHeap (RtlGetProcessHeap(), 0, NtStatusString); } - RtlFreeAnsiString(&MessageA); + if( MessageResource->Flags ) { + /* we've got a unicode string */ + RtlFreeAnsiString(&MessageA); + } } if( ClientFileNameU.Buffer ) { RtlFreeHeap (RtlGetProcessHeap(), 0, ClientFileNameU.Buffer);
16 years, 8 months
1
0
0
0
[dchapyshev] 33567: - Implement "Advanced Key Settings" and "Change Key Sequence" dialogs
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Sun May 18 04:06:48 2008 New Revision: 33567 URL:
http://svn.reactos.org/svn/reactos?rev=33567&view=rev
Log: - Implement "Advanced Key Settings" and "Change Key Sequence" dialogs Modified: trunk/reactos/dll/cpl/input/changekeyseq.c trunk/reactos/dll/cpl/input/input.h trunk/reactos/dll/cpl/input/keysettings.c Modified: trunk/reactos/dll/cpl/input/changekeyseq.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/changekeyseq…
============================================================================== --- trunk/reactos/dll/cpl/input/changekeyseq.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/changekeyseq.c [iso-8859-1] Sun May 18 04:06:48 2008 @@ -20,7 +20,7 @@ if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Keyboard Layout\\Toggle"), 0, KEY_QUERY_VALUE, &hKey) == ERROR_SUCCESS) { - dwSize = sizeof(szHotkey); + dwSize = (1 + 1) * sizeof(TCHAR); if (RegQueryValueEx(hKey, _T("Hotkey"), NULL, NULL, (LPBYTE)szHotkey, &dwSize) != ERROR_SUCCESS) { @@ -28,7 +28,7 @@ return FALSE; } - dwSize = sizeof(szLangHotkey); + dwSize = (1 + 1) * sizeof(TCHAR); if (RegQueryValueEx(hKey, _T("Language Hotkey"), NULL, NULL, (LPBYTE)szLangHotkey, &dwSize) != ERROR_SUCCESS) { @@ -36,7 +36,7 @@ return FALSE; } - dwSize = sizeof(szLayoutHotkey); + dwSize = (1 + 1) * sizeof(TCHAR); if (RegQueryValueEx(hKey, _T("Layout Hotkey"), NULL, NULL, (LPBYTE)szLayoutHotkey, &dwSize) != ERROR_SUCCESS) { @@ -49,6 +49,66 @@ else return FALSE; return TRUE; +} + +static VOID +SaveKeySeq(HWND hDlg) +{ + TCHAR szLang[1 + 1], szLayout[1 + 1]; + HKEY hKey; + + if (SendDlgItemMessage(hDlg, IDC_SWITCH_INPUT_LANG_CB, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + if (SendDlgItemMessage(hDlg, IDC_CTRL_LANG, BM_GETCHECK, 0, 0) == BST_CHECKED) + _tcscpy(szLang, _T("2")); + else + _tcscpy(szLang, _T("1")); + } + else + { + _tcscpy(szLang, _T("3")); + } + + if (SendDlgItemMessage(hDlg, IDC_SWITCH_KBLAYOUTS_CB, BM_GETCHECK, 0, 0) == BST_CHECKED) + { + if (SendDlgItemMessage(hDlg, IDC_CTRL_LAYOUT, BM_GETCHECK, 0, 0) == BST_CHECKED) + _tcscpy(szLayout, _T("2")); + else + _tcscpy(szLayout, _T("1")); + } + else + { + _tcscpy(szLayout, _T("3")); + } + + if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Keyboard Layout\\Toggle"), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, + NULL, &hKey, NULL) == ERROR_SUCCESS) + { + if (RegSetValueEx(hKey, _T("Hotkey"), 0, REG_SZ, (LPBYTE)szLang, + (DWORD)((1 + 1) * sizeof(TCHAR))) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + + if (RegSetValueEx(hKey, _T("Language Hotkey"), 0, REG_SZ, (LPBYTE)szLang, + (DWORD)((1 + 1) * sizeof(TCHAR))) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + + if (RegSetValueEx(hKey, _T("Layout Hotkey"), 0, REG_SZ, (LPBYTE)szLayout, + (DWORD)((1 + 1) * sizeof(TCHAR))) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + + RegCloseKey(hKey); + UpdateKeySettingsList(); + } } static VOID @@ -174,6 +234,8 @@ break; case IDOK: + SaveKeySeq(hDlg); + EndDialog(hDlg, LOWORD(wParam)); break; case IDCANCEL: Modified: trunk/reactos/dll/cpl/input/input.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/input.h?rev=…
============================================================================== --- trunk/reactos/dll/cpl/input/input.h [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/input.h [iso-8859-1] Sun May 18 04:06:48 2008 @@ -47,6 +47,8 @@ /* keysettings.c */ INT_PTR CALLBACK KeySettingsDlgProc(HWND hDlg,UINT message,WPARAM wParam,LPARAM lParam); +VOID +UpdateKeySettingsList(); /* add.c */ INT_PTR CALLBACK Modified: trunk/reactos/dll/cpl/input/keysettings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/input/keysettings.…
============================================================================== --- trunk/reactos/dll/cpl/input/keysettings.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/input/keysettings.c [iso-8859-1] Sun May 18 04:06:48 2008 @@ -11,6 +11,8 @@ #include "resource.h" #include "input.h" + +static HWND hKeySettingsWnd; static VOID AddListColumn(HWND hDlg) @@ -57,6 +59,27 @@ } static VOID +SaveKeySettings(HWND hDlg) +{ + HKEY hKey; + DWORD dwValue; + + if (SendDlgItemMessage(hDlg, IDC_PRESS_CL_KEY_RB, BM_GETCHECK, 0, 0) == BST_CHECKED) + dwValue = 0x0; + else + dwValue = 0x10000; + + if (RegCreateKeyEx(HKEY_CURRENT_USER, _T("Keyboard Layout"), 0, NULL, + REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, + NULL, &hKey, NULL) == ERROR_SUCCESS) + { + RegSetValueEx(hKey, _T("Attributes"), 0, REG_DWORD, (LPBYTE)&dwValue, sizeof(DWORD)); + + RegCloseKey(hKey); + } +} + +static VOID InitKeySettingsDlg(HWND hDlg) { TCHAR szHotkey[1 + 1], szLangHotkey[1 + 1], szLayoutHotkey[1 + 1], @@ -78,8 +101,10 @@ if (_tcscmp(szLangHotkey, _T("2")) == 0) LoadString(hApplet, IDS_CTRL_SHIFT, szText, sizeof(szText) / sizeof(TCHAR)); + else if (_tcscmp(szLangHotkey, _T("1")) == 0) + LoadString(hApplet, IDS_LEFT_ALT_SHIFT, szText, sizeof(szText) / sizeof(TCHAR)); else - LoadString(hApplet, IDS_LEFT_ALT_SHIFT, szText, sizeof(szText) / sizeof(TCHAR)); + LoadString(hApplet, IDS_NONE, szText, sizeof(szText) / sizeof(TCHAR)); item.mask = LVIF_TEXT | LVIF_PARAM | LVIF_STATE; item.pszText = szTitle; @@ -90,6 +115,13 @@ (VOID) ListView_SetHotItem(hHotkeyList, i); ListView_SetItemState(hHotkeyList, i, LVIS_SELECTED, LVIS_OVERLAYMASK); +} + +VOID +UpdateKeySettingsList() +{ + (VOID) ListView_DeleteAllItems(GetDlgItem(hKeySettingsWnd, IDC_KEY_LISTVIEW)); + InitKeySettingsDlg(hKeySettingsWnd); } INT_PTR CALLBACK @@ -103,6 +135,7 @@ switch (message) { case WM_INITDIALOG: + hKeySettingsWnd = hDlg; AddListColumn(hDlg); (VOID) ListView_SetExtendedListViewStyle(GetDlgItem(hDlg, IDC_KEY_LISTVIEW), LVS_EX_FULLROWSELECT); @@ -120,6 +153,8 @@ break; case IDOK: + SaveKeySettings(hDlg); + EndDialog(hDlg, LOWORD(wParam)); break; case IDCANCEL:
16 years, 8 months
1
0
0
0
[gbrunmar] 33566: More correct include for PSEH support
by gbrunmar@svn.reactos.org
Author: gbrunmar Date: Sun May 18 03:40:03 2008 New Revision: 33566 URL:
http://svn.reactos.org/svn/reactos?rev=33566&view=rev
Log: More correct include for PSEH support Modified: trunk/reactos/dll/win32/user32/include/user32.h Modified: trunk/reactos/dll/win32/user32/include/user32.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/include/u…
============================================================================== --- trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/include/user32.h [iso-8859-1] Sun May 18 03:40:03 2008 @@ -39,8 +39,8 @@ /* Internal User32 Headers */ #include "user32p.h" -#include <libs/pseh/pseh.h> -#include <libs/pseh/framebased.h> +/* SEH Support with PSEH */ +#include <pseh/pseh.h> /* FIXME: Use ntgdi.h then cleanup... */ HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj);
16 years, 8 months
1
0
0
0
[ekohl] 33565: Check user name for illegal characters when it is changed from within the user list.
by ekohl@svn.reactos.org
Author: ekohl Date: Sat May 17 17:33:04 2008 New Revision: 33565 URL:
http://svn.reactos.org/svn/reactos?rev=33565&view=rev
Log: Check user name for illegal characters when it is changed from within the user list. Modified: trunk/reactos/dll/cpl/usrmgr/users.c Modified: trunk/reactos/dll/cpl/usrmgr/users.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/usrmgr/users.c?rev…
============================================================================== --- trunk/reactos/dll/cpl/usrmgr/users.c [iso-8859-1] (original) +++ trunk/reactos/dll/cpl/usrmgr/users.c [iso-8859-1] Sat May 17 17:33:04 2008 @@ -58,15 +58,20 @@ static BOOL CheckUserName(HWND hwndDlg, - INT nIdDlgItem) + INT nIdDlgItem, + LPTSTR lpUserName) { TCHAR szUserName[256]; UINT uLen; - uLen = GetDlgItemText(hwndDlg, nIdDlgItem, szUserName, 256); + if (lpUserName) + uLen = _tcslen(lpUserName); + else + uLen = GetDlgItemText(hwndDlg, nIdDlgItem, szUserName, 256); /* Check the user name */ - if (uLen > 0 && _tcspbrk(szUserName, TEXT("\"*+,/\\:;<=>?[]|")) != NULL) + if (uLen > 0 && + _tcspbrk((lpUserName) ? lpUserName : szUserName, TEXT("\"*+,/\\:;<=>?[]|")) != NULL) { MessageBox(hwndDlg, TEXT("The user name you entered is invalid! A user name must not contain the following charecters: *+,/:;<=>?[\\]|"), @@ -199,7 +204,7 @@ break; case IDOK: - if (!CheckUserName(hwndDlg, IDC_USER_NEW_NAME)) + if (!CheckUserName(hwndDlg, IDC_USER_NEW_NAME, NULL)) { SetFocus(GetDlgItem(hwndDlg, IDC_USER_NEW_NAME)); SendDlgItemMessage(hwndDlg, IDC_USER_NEW_NAME, EM_SETSEL, 0, -1); @@ -333,6 +338,24 @@ } +static VOID +UserRename(HWND hwndDlg) +{ + HWND hwndLV; + INT nItem; + + hwndLV = GetDlgItem(hwndDlg, IDC_USERS_LIST); + if (hwndLV == NULL) + return; + + nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); + if (nItem != -1) + { + (void)ListView_EditLabel(hwndLV, nItem); + } +} + + static BOOL UserDelete(HWND hwndDlg) { @@ -530,6 +553,9 @@ if (lstrcmp(szOldUserName, szNewUserName) == 0) return FALSE; + /* Check the user name for illegal characters */ + if (!CheckUserName(NULL, 0, szNewUserName)) + return FALSE; /* Change the user name */ useri0.usri0_name = szNewUserName; @@ -633,17 +659,7 @@ break; case IDM_USER_RENAME: - { - INT nItem; - HWND hwndLV; - - hwndLV = GetDlgItem(hwndDlg, IDC_USERS_LIST); - nItem = ListView_GetNextItem(hwndLV, -1, LVNI_SELECTED); - if (nItem != -1) - { - (void)ListView_EditLabel(hwndLV, nItem); - } - } + UserRename(hwndDlg); break; case IDM_USER_NEW:
16 years, 8 months
1
0
0
0
[pschweitzer] 33564: Forgot to commit urlmon.dll tests synced with Wine HEAD
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat May 17 17:29:12 2008 New Revision: 33564 URL:
http://svn.reactos.org/svn/reactos?rev=33564&view=rev
Log: Forgot to commit urlmon.dll tests synced with Wine HEAD Modified: trunk/rostests/winetests/urlmon/protocol.c trunk/rostests/winetests/urlmon/urlmon.rbuild Modified: trunk/rostests/winetests/urlmon/protocol.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/protocol…
============================================================================== --- trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/protocol.c [iso-8859-1] Sat May 17 17:29:12 2008 @@ -27,6 +27,7 @@ #include "winbase.h" #include "ole2.h" #include "urlmon.h" +#include "wininet.h" #include "initguid.h" @@ -1383,11 +1384,21 @@ CHECK_CALLED(ReportProgress_SENDINGREQUEST); CHECK_CALLED(ReportResult); + SET_EXPECT(GetBindInfo); + hres = IInternetProtocol_Start(protocol, NULL, &protocol_sink, &bind_info, 0, 0); + ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + CHECK_CALLED(GetBindInfo); + + SET_EXPECT(GetBindInfo); + hres = IInternetProtocol_Start(protocol, emptyW, &protocol_sink, &bind_info, 0, 0); + ok(hres == E_INVALIDARG, "Start failed: %08x, expected E_INVALIDARG\n", hres); + CHECK_CALLED(GetBindInfo); + IInternetProtocol_Release(protocol); } static void test_file_protocol(void) { - WCHAR buf[MAX_PATH]; + WCHAR buf[INTERNET_MAX_URL_LENGTH], file_name_buf[MAX_PATH]; DWORD size; ULONG len; HANDLE file; @@ -1429,15 +1440,17 @@ test_file_protocol_url(buf); memcpy(buf, wszFile2, sizeof(wszFile2)); - len = sizeof(wszFile2)/sizeof(WCHAR)-1; - len += GetCurrentDirectoryW(sizeof(buf)/sizeof(WCHAR)-len, buf+len); - buf[len++] = '\\'; - memcpy(buf+len, wszIndexHtml, sizeof(wszIndexHtml)); - - file_name = buf + sizeof(wszFile2)/sizeof(WCHAR)-1; + len = GetCurrentDirectoryW(sizeof(file_name_buf)/sizeof(WCHAR), file_name_buf); + file_name_buf[len++] = '\\'; + memcpy(file_name_buf+len, wszIndexHtml, sizeof(wszIndexHtml)); + lstrcpyW(buf+sizeof(wszFile2)/sizeof(WCHAR)-1, file_name_buf); + file_name = file_name_buf; bindf = 0; test_file_protocol_url(buf); bindf = BINDF_FROMURLMON; + test_file_protocol_url(buf); + + buf[sizeof(wszFile2)/sizeof(WCHAR)] = '|'; test_file_protocol_url(buf); memcpy(buf, wszFile3, sizeof(wszFile3)); Modified: trunk/rostests/winetests/urlmon/urlmon.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/urlmon.r…
============================================================================== --- trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] Sat May 17 17:29:12 2008 @@ -12,12 +12,12 @@ <file>url.c</file> <file>testlist.c</file> <library>wine</library> + <library>uuid</library> <library>urlmon</library> <library>ole32</library> <library>user32</library> <library>advapi32</library> <library>kernel32</library> - <library>uuid</library> <library>ntdll</library> </module> </group>
16 years, 8 months
1
0
0
0
[pschweitzer] 33563: Removed wrong entrypoint
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sat May 17 16:52:51 2008 New Revision: 33563 URL:
http://svn.reactos.org/svn/reactos?rev=33563&view=rev
Log: Removed wrong entrypoint Modified: trunk/reactos/dll/win32/urlmon/urlmon.rbuild Modified: trunk/reactos/dll/win32/urlmon/urlmon.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/urlmon/urlmon.rb…
============================================================================== --- trunk/reactos/dll/win32/urlmon/urlmon.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/urlmon/urlmon.rbuild [iso-8859-1] Sat May 17 16:52:51 2008 @@ -1,7 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> -<module name="urlmon" type="win32dll" baseaddress="${BASEADDRESS_URLMON}" installbase="system32" installname="urlmon.dll" allowwarnings="true" entrypoint="0"> +<module name="urlmon" type="win32dll" baseaddress="${BASEADDRESS_URLMON}" installbase="system32" installname="urlmon.dll" allowwarnings="true"> <autoregister infsection="OleControlDlls" type="Both" /> <importlibrary definition="urlmon.spec.def" /> <include base="urlmon">.</include>
16 years, 8 months
1
0
0
0
[cfinck] 33562: Change the LCID for the default Bulgarian keyboard layout from 00040402 to 00000402. See issue #3208 for more details.
by cfinck@svn.reactos.org
Author: cfinck Date: Sat May 17 16:01:08 2008 New Revision: 33562 URL:
http://svn.reactos.org/svn/reactos?rev=33562&view=rev
Log: Change the LCID for the default Bulgarian keyboard layout from 00040402 to 00000402. See issue #3208 for more details. Modified: trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/boot/bootdata/txtsetup.sif Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Sat May 17 16:01:08 2008 @@ -50,9 +50,9 @@ HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Text",0x00000000,"Arabic (102) AZERTY" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020401","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5086" -HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040402","Layout File",0x00000000,"kbdbgm.dll" -HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040402","Layout Text",0x00000000,"Bulgarian BDS 5237-1978" -HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00040402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5136" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout File",0x00000000,"kbdbgm.dll" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Text",0x00000000,"Bulgarian BDS 5237-1978" +HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00000402","Layout Display Name",0x00000000,"@%SystemRoot%\system32\input.dll,-5136" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout File",0x00000000,"kbdbgt.dll" HKLM,"SYSTEM\CurrentControlSet\Control\Keyboard Layouts\00020402","Layout Text",0x00000000,"Bulgarian phonetic classic" Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif [iso-8859-1] Sat May 17 16:01:08 2008 @@ -166,7 +166,7 @@ 0000042C = "Azeri Latin" 00000423 = "Belarusian" 00000445 = "Bengali" -00040402 = "Bulgarian BDS 5237-1978" +00000402 = "Bulgarian BDS 5237-1978" 00020402 = "Bulgarian phonetic classic" 00030402 = "Bulgarian phonetic BDS 5237-2006" 00000455 = "Burmese"
16 years, 8 months
1
0
0
0
[cfinck] 33561: - Minor fixes to work more like WinXP's cmd - Removed the now obsolete "seta_test.cmd"
by cfinck@svn.reactos.org
Author: cfinck Date: Sat May 17 15:07:31 2008 New Revision: 33561 URL:
http://svn.reactos.org/svn/reactos?rev=33561&view=rev
Log: - Minor fixes to work more like WinXP's cmd - Removed the now obsolete "seta_test.cmd" Removed: trunk/reactos/base/shell/cmd/seta_test.cmd Modified: trunk/reactos/base/shell/cmd/batch.c trunk/reactos/base/shell/cmd/cls.c trunk/reactos/base/shell/cmd/cmd.c trunk/reactos/base/shell/cmd/console.c trunk/reactos/base/shell/cmd/dir.c trunk/reactos/base/shell/cmd/lang/de-DE.rc Modified: trunk/reactos/base/shell/cmd/batch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Sat May 17 15:07:31 2008 @@ -292,6 +292,9 @@ return FALSE; } + /* Don't print a newline for this command */ + bIgnoreEcho = TRUE; + TRACE ("Batch: returns TRUE\n"); return TRUE; Modified: trunk/reactos/base/shell/cmd/cls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cls.c?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/cls.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cls.c [iso-8859-1] Sat May 17 15:07:31 2008 @@ -54,8 +54,6 @@ coPos, &dwWritten); SetConsoleCursorPosition(hConsole, coPos); - bIgnoreEcho = TRUE; - return 0; } #endif Modified: trunk/reactos/base/shell/cmd/cmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Sat May 17 15:07:31 2008 @@ -154,7 +154,7 @@ BOOL bExit = FALSE; /* indicates EXIT was typed */ BOOL bCanExit = TRUE; /* indicates if this shell is exitable */ BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */ -BOOL bIgnoreEcho = FALSE; /* Ignore 'newline' before 'cls' */ +BOOL bIgnoreEcho = FALSE; /* Set this to TRUE to prevent a newline, when executing a command */ INT nErrorLevel = 0; /* Errorlevel of last launched external program */ BOOL bChildProcessRunning = FALSE; DWORD dwChildProcessId = 0; Modified: trunk/reactos/base/shell/cmd/console.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?r…
============================================================================== --- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Sat May 17 15:07:31 2008 @@ -157,6 +157,7 @@ VOID ConPuts(LPTSTR szText, DWORD nStdHandle) { DWORD dwWritten; + HANDLE hStdHandle; PCHAR pBuf; INT len; @@ -167,12 +168,14 @@ #else pBuf = szText; #endif - WriteFile (GetStdHandle (nStdHandle), + hStdHandle = GetStdHandle(nStdHandle); + + WriteFile (hStdHandle, pBuf, len, &dwWritten, NULL); - WriteFile (GetStdHandle (nStdHandle), + WriteFile (hStdHandle, _T("\n"), 1, &dwWritten, Modified: trunk/reactos/base/shell/cmd/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=3…
============================================================================== --- trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] Sat May 17 15:07:31 2008 @@ -795,14 +795,14 @@ { case 0: /* 12 hour format */ default: - _stprintf (szTime,_T(" %02d%c%02u%c"), + _stprintf (szTime,_T("%02d%c%02u%c"), (dt.wHour == 0 ? 12 : (dt.wHour <= 12 ? dt.wHour : dt.wHour - 12)), cTimeSeparator, dt.wMinute, (dt.wHour <= 11 ? _T('a') : _T('p'))); break; case 1: /* 24 hour format */ - _stprintf (szTime, _T(" %02d%c%02u"), + _stprintf (szTime, _T("%02d%c%02u"), dt.wHour, cTimeSeparator, dt.wMinute); break; } @@ -1024,7 +1024,7 @@ /* Print the line */ if(lpFlags->bPause) { - if (ConOutPrintfPaging(FALSE,_T("%10s %-8s %*s%s %s\n"), + if (ConOutPrintfPaging(FALSE,_T("%10s %-6s %*s%s %s\n"), szDate, szTime, iSizeFormat, @@ -1034,7 +1034,7 @@ return ; } else - ConOutPrintf(_T("%10s %-8s %*s%s %s\n"), + ConOutPrintf(_T("%10s %-6s %*s%s %s\n"), szDate, szTime, iSizeFormat, @@ -1656,7 +1656,7 @@ } } } - }while(FindNextFile(hSearch, &wfdFileInfo)); + } while(FindNextFile(hSearch, &wfdFileInfo)); FindClose(hSearch); /* Terminate list */ @@ -1692,7 +1692,7 @@ /* Sort Data if requested*/ if (lpFlags->stOrderBy.sCriteriaCount > 0) - QsortFiles(ptrFileArray, 0, dwCount-1,lpFlags); + QsortFiles(ptrFileArray, 0, dwCount-1, lpFlags); /* Print Data */ DirPrintFiles(ptrFileArray, dwCount, szFullPath, lpFlags); Modified: trunk/reactos/base/shell/cmd/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/de-DE.…
============================================================================== --- trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] Sat May 17 15:07:31 2008 @@ -196,12 +196,12 @@ ""-"" vor einer Option setzt die Voreinstellung ausser Kraft, z.B. DIR /-W." STRING_DIR_HELP2, " Datenträger in Laufwerk %c ist %s\n" -STRING_DIR_HELP3, " Datenträger in Laufwerk %c hat keinen Namen\n" -STRING_DIR_HELP4, " Datenträger-Seriennummer ist %04X-%04X\n" -STRING_DIR_HELP5, "\n Gelistete Dateien:\n%16i Datei(en)% 14s bytes\n" -STRING_DIR_HELP6, "%16i Verzeichnis(se)% 15s bytes\n" -STRING_DIR_HELP7, "\n Verzeichnisse %s\n\n" -STRING_DIR_HELP8, "%16i Datei(en)% 14s bytes\n" +STRING_DIR_HELP3, " Datenträger in Laufwerk %c hat keine Bezeichnung\n" +STRING_DIR_HELP4, " Volumeseriennummer: %04X-%04X\n" +STRING_DIR_HELP5, "\n Anzahl der angezeigten Dateien:\n%16i Datei(en)% 15s Bytes\n" +STRING_DIR_HELP6, "%16i Verzeichnis(se), % 15s Bytes frei\n" +STRING_DIR_HELP7, "\n Verzeichnis von %s\n\n" +STRING_DIR_HELP8, "%16i Datei(en)% 14s Bytes\n" STRING_DIRSTACK_HELP1, "Speichert das aktuelle Verzeichnis für den POPD Befehl, und\n\ wechselt dann zu den festgelegten Verzeichnis.\n\n\ Removed: trunk/reactos/base/shell/cmd/seta_test.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/seta_test.c…
============================================================================== --- trunk/reactos/base/shell/cmd/seta_test.cmd [iso-8859-1] (original) +++ trunk/reactos/base/shell/cmd/seta_test.cmd (removed) @@ -1,116 +1,0 @@ -@echo off - -@rem the next line reexecutes the script without params if it was called with params, else we'll get false failures -@if not "%1"=="" seta_test.cmd - -@rem the next two lines illustrate bug in existing if code -if not "=="=="==" goto failure -if "=="=="==" goto next1 -goto failure -:next1 -if "1"=="2" goto failure -if not "1"=="1" goto failure -set /a a=1 -echo. -if not "%a%"=="1" goto failure -set /a b=a -echo. -if not "%b%"=="1" goto failure -set /a a=!5 -echo. -if not "%a%"=="0" goto failure -set /a a=!a -echo. -if not "%a%"=="1" goto failure -set /a a=~5 -echo. -if not "%a%"=="-6" goto failure -set /a a=5,a=-a -echo. -if not "%a%"=="-5" goto failure -set /a a=5*7 -echo. -if not "%a%"=="35" goto failure -set /a a=2000/10 -echo. -if not "%a%"=="200" goto failure -set /a a=42%%9 -echo. -if not "%a%"=="6" goto failure -set /a a=5%2 -echo. -if not "%a%"=="5" goto failure -set /a a=42^%13 -echo. -if not "%a%"=="423" goto failure -set /a a=7+9 -echo. -if not "%a%"=="16" goto failure -set /a a=9-7 -echo. -if not "%a%"=="2" goto failure -set /a a=9^<^<2 -echo. -if not "%a%"=="36" goto failure -set /a a=36^>^>2 -echo. -if not "%a%"=="9" goto failure -set /a a=42^&9 -echo. -if not "%a%"=="8" goto failure -set /a a=32^9 -echo. -if not "%a%"=="329" goto failure -set /a a=32^^9 -echo. -if not "%a%"=="41" goto failure -set /a a=10^|22 -echo. -if not "%a%"=="30" goto failure -set /a a=2,a*=3 -echo. -if not "%a%"=="6" goto failure -set /a a=11,a/=2 -echo. -if not "%a%"=="5" goto failure -set /a a=42,a%%=9 -echo. -if not "%a%"=="6" goto failure -set /a a=7,a+=9 -echo. -if not "%a%"=="16" goto failure -set /a a=9,a-=7 -echo. -if not "%a%"=="2" goto failure -set /a a=42,a^&=9 -echo. -if not "%a%"=="8" goto failure -set /a a=32,a^^=9 -echo. -if not "%a%"=="41" goto failure -set /a a=10,a^|=22 -echo. -if not "%a%"=="30" goto failure -set /a a=9,a^<^<=2 -echo. -if not "%a%"=="36" goto failure -set /a a=36,a^>^>=2 -echo. -if not "%a%"=="9" goto failure -set /a a=1,2 -echo. -if not "%a%"=="1" goto failure -set /a a=(a=1,a+2) -echo. -if "%a%"=="3" goto success -goto failure - -:success -echo SUCCESS! -echo. -goto done - -:failure -echo FAILURE! remove the echo off and see the last formula that executed before this line -echo. -:done
16 years, 8 months
1
0
0
0
[cfinck] 33560: Add a testing suite for CMD based on CMD scripts. Of course, ReactOS' cmd doesn't work at all with the framework at the moment :-) Some tests were taken from "seta_test.cmd" by Royce. (see file headers)
by cfinck@svn.reactos.org
Author: cfinck Date: Sat May 17 15:01:21 2008 New Revision: 33560 URL:
http://svn.reactos.org/svn/reactos?rev=33560&view=rev
Log: Add a testing suite for CMD based on CMD scripts. Of course, ReactOS' cmd doesn't work at all with the framework at the moment :-) Some tests were taken from "seta_test.cmd" by Royce. (see file headers) Added: trunk/rostests/win32/cmd/script_testsuite/ trunk/rostests/win32/cmd/script_testsuite/lib/ trunk/rostests/win32/cmd/script_testsuite/lib/testlib.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/run.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/tests/ trunk/rostests/win32/cmd/script_testsuite/tests/at.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/tests/environment.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/tests/if.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/tests/redirect.cmd (with props) trunk/rostests/win32/cmd/script_testsuite/tests/set.cmd (with props) Added: trunk/rostests/win32/cmd/script_testsuite/lib/testlib.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/lib/testlib.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/lib/testlib.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,69 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: lib/testlib.cmd +:: PURPOSE: Library with functions available for all tests +:: COPYRIGHT: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: Indicate that a test ran successfully +:_successful +set /a test_count+=1 +set /a successful_tests+=1 +goto :EOF + + +:: Indicate that a test failed +:: @param 1 Description of the test that failed +:_failed +set /a test_count+=1 +set /a failed_tests+=1 +echo Test "%~1" failed! +goto :EOF + + +:: Test whether a call succeeded +:: @param 1 The test command to run and check +:_test +%~1 + +if "%errorlevel%" == "0" ( + call :_successful +) else ( + call :_failed "%~1" +) +goto :EOF + + +:: Test whether a call failed +:: @param 1 The test command to run and check +:_testnot +%~1 + +if "%errorlevel%" == "0" ( + call :_failed "%~1" +) else ( + call :_successful +) +goto :EOF + + +:: Test the value of a variable +:: @param 1 The variable to check (like %test%) +:: @param 2 The variable name (like test) +:: @param 3 The expected result (like 5) +:: If this parameter wasn't given, _testvar checks if the variable is not "" +:_testvar +if "%~3" == "" ( + set testvar_operator=not +) else ( + set testvar_operator= +) + +if %testvar_operator% "%~1" == "%~3" ( + call :_successful +) else ( + call :_failed "if %%~2%% == %~3, actual result was %~1" +) + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/lib/testlib.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/run.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/run.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/run.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,43 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: run.cmd +:: PURPOSE: Runs the testing scripts +:: COPYRIGHT: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +@echo off +cls +echo ReactOS CMD Testing Suite +echo ========================== +echo. + +:: Preparations +set failed_tests=0 +set successful_tests=0 +set test_count=0 + +if exist "temp\." ( + rmdir /s /q "temp" +) + +mkdir "temp" + +:: Run the tests +call :_runtest at +call :_runtest environment +call :_runtest if +call :_runtest redirect +call :_runtest set + +:: Print the summary and clean up +echo Executed %test_count% tests, %successful_tests% successful, %failed_tests% failed +rmdir /s /q "temp" +goto :EOF + +:: Functions +:_runtest +type "tests\%~1.cmd" > "temp\%~1.cmd" +type "lib\testlib.cmd" >> "temp\%~1.cmd" +call "temp\%~1.cmd" +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/run.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/tests/at.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/tests/at.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/tests/at.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,20 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: tests/at.cmd +:: PURPOSE: Tests for the correct parsing of the "@" character +:: COPYRIGHT: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: Calling a command should work with any number of "@" characters prepended +call :_test "@echo Test >nul" +call :_test "@@echo Test >nul" + +:: Files with an "@" sign at the beginning should work as well +echo @^@echo Test > "temp\(a)file.cmd" +call :_test "call temp\(a)file.cmd >nul" + +echo ^@echo Test > "temp\(a)file.cmd" +call :_test "call temp\(a)file.cmd >nul" + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/tests/at.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/tests/environment.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/tests/environment.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/tests/environment.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,47 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: tests/environment.cmd +:: PURPOSE: Tests for the environment (like automatically set variables) +:: COPYRIGHT: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: ~0 contains the called path to the current script file +call :_testvar %~0 ~0 + +:: ~d0 contains the drive of the current script file +call :_testvar %~d0 ~d0 + +:: ~p0 contains the path of the current script file without the drive letter +call :_testvar %~p0 ~p0 + +:: ~dp0 contains the path to the current script file with the drive letter +call :_testvar %~dp0 ~dp0 + +:: ~dpf0 contains the full path to the current script file +call :_testvar %~dpf0 ~dpf0 + +:: ~n0 contains the name of the current script file without extension +call :_testvar %~n0 ~n0 + +:: ~x0 contains the extension of the current script file +call :_testvar %~x0 ~x0 + +:: ~a0 contains the attributes of the current script file +call :_testvar %~a0 ~a0 + +:: ~t0 contains the date and time of the current script file +call :_testvar "%~t0" ~t0 + +:: ~z0 contains the file size of the current script file in bytes +call :_testvar %~z0 ~z0 + +:: ~s0 and ~spf0 contain the short path to the current script file +call :_testvar %~s0 ~s0 +call :_testvar %~s0 ~s0 %~spf0% + +:: Now try to verify that the information is valid +set test_path=%~d0%~p0%~n0%~x0 +call :_testvar %test_path% test_path %~dpf0 + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/tests/environment.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/tests/if.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/tests/if.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/tests/if.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,26 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: tests/if.cmd +:: PURPOSE: Tests for the "if" command +:: COPYRIGHT: Copyright 2005 Royce Mitchell III +:: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: Bugs in the if code +if not "=="=="==" call :_failed "if not "=="=="=="" +if "=="=="==" call :_successful + +if "1"=="2" ( + call :_failed "if "1"=="2"" +) else ( + call :_successful +) + +if not "1"=="1" ( + call :_failed "if "1"=="1"" +) else ( + call :_successful +) + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/tests/if.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/tests/redirect.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/tests/redirect.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/tests/redirect.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,28 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: tests/redirect.cmd +:: PURPOSE: Tests for redirections +:: COPYRIGHT: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: One redirect, the file must exist +call :_test "echo moo > temp\redirect_temp.txt" +call :_test "type temp\redirect_temp.txt >nul" +call :_test "find "moo" temp\redirect_temp.txt >nul" + +:: Add the string yet another time to the file +call :_test "echo moo >> temp\redirect_temp.txt" + +set moo_temp=0 + +:: Count the moo's in the file (must be 2 now) +:: No idea why so many percent signs are necessary here :-) +call :_test "for /f "usebackq" %%%%i in (`findstr moo temp\redirect_temp.txt`) do set /a moo_temp+=1" +call :_testvar %moo_temp% moo_temp 2 + +:: Two redirects, the file in the middle mustn't exist after this call +call :_test "echo moo > temp\redirect_temp2.txt > nul" +call :_testnot "type temp\redirect_temp2.txt 2>nul" + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/tests/redirect.cmd ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/rostests/win32/cmd/script_testsuite/tests/set.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/win32/cmd/script_testsuit…
============================================================================== --- trunk/rostests/win32/cmd/script_testsuite/tests/set.cmd (added) +++ trunk/rostests/win32/cmd/script_testsuite/tests/set.cmd [iso-8859-1] Sat May 17 15:01:21 2008 @@ -1,0 +1,104 @@ +:: +:: PROJECT: ReactOS CMD Testing Suite +:: LICENSE: GPL v2 or any later version +:: FILE: tests/set.cmd +:: PURPOSE: Tests for the "set" command +:: COPYRIGHT: Copyright 2005 Royce Mitchell III +:: Copyright 2008 Colin Finck <mail(a)colinfinck.de> +:: + +:: Test the /A parameter +call :_test "set /a a=1" +call :_testvar %a% a 1 + +call :_test "set /a b=a" +call :_testvar %b% b 1 + +call :_test "set /a a=!5" +call :_testvar %a% a 0 + +call :_test "set /a a=!a" +call :_testvar %a% a 1 + +call :_test "set /a a=~5" +call :_testvar %a% a -6 + +call :_test "set /a a=5,a=-a" +call :_testvar %a% a -5 + +call :_test "set /a a=5*7" +call :_testvar %a% a 35 + +call :_test "set /a a=2000/10" +call :_testvar %a% a 200 + +call :_test "set /a a=42%%%%9" +call :_testvar %a% a 6 + +call :_test "set /a a=5%%2" +call :_testvar %a% a 5 + +call :_test "set /a a=42%13" +call :_testvar %a% a 423 + +call :_test "set /a a=7+9" +call :_testvar %a% a 16 + +call :_test "set /a a=9-7" +call :_testvar %a% a 2 + +set /a a=9^<^<2 +call :_testvar %a% a 36 + +set /a a=36^>^>2 +call :_testvar %a% a 9 + +set /a a=42^&9 +call :_testvar %a% a 8 + +set /a a=32^9 +call :_testvar %a% a 329 + +set /a a=32^^9 +call :_testvar %a% a 41 + +set /a a=10^|22 +call :_testvar %a% a 30 + +call :_test "set /a a=2,a*=3" +call :_testvar %a% a 6 + +call :_test "set /a a=11,a/=2" +call :_testvar %a% a 5 + +call :_test "set /a a=42,a%%%%=9" +call :_testvar %a% a 6 + +call :_test "set /a a=7,a+=9" +call :_testvar %a% a 16 + +call :_test "set /a a=9,a-=7" +call :_testvar %a% a 2 + +set /a a=42,a^&=9 +call :_testvar %a% a 8 + +set /a a=32,a^^=9 +call :_testvar %a% a 41 + +set /a a=10,a^|=22 +call :_testvar %a% a 30 + +set /a a=9,a^<^<=2 +call :_testvar %a% a 36 + +set /a a=36,a^>^>=2 +call :_testvar %a% a 9 + +call :_test "set /a a=1,2" +call :_testvar %a% a 1 + +call :_test "set /a a=(a=1,a+2)" +call :_testvar %a% a 3 + +goto :EOF Propchange: trunk/rostests/win32/cmd/script_testsuite/tests/set.cmd ------------------------------------------------------------------------------ svn:eol-style = native
16 years, 8 months
1
0
0
0
← Newer
1
...
20
21
22
23
24
25
26
...
59
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Results per page:
10
25
50
100
200