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
September 2005
----- 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
22 participants
582 discussions
Start a n
N
ew thread
[mf] 17951: - fix build for MinGW and VC++ environments
by mf@svn.reactos.com
- fix build for MinGW and VC++ environments - fix Manifest descriptions - ignore some immediate files Modified: trunk/reactos/subsys/system/explorer/explorer.dsp Modified: trunk/reactos/subsys/system/explorer/explorer.exe.manifest Modified: trunk/reactos/subsys/system/explorer/explorer.rc Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc Modified: trunk/reactos/subsys/system/explorer/resource.h Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.cpp Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h Modified: trunk/reactos/subsys/system/explorer/taskbar/taskbar.cpp Property changes on: trunk/reactos/subsys/system/explorer ___________________________________________________________________ Name: svn:ignore - *.coff *.exe *.d *.o *.a *.sym *.map bin Debug Release DRelease UDebug URelease _NO_COMUTIL doxy-doc Win32 WineDll WineRelease *.ncb *.opt *.aps *.ncb *.plg *.suo buildno.h notifyhook.dll *.gch *.h.pch pack.* .gdbinit start-gdb.bat libexpat.dll GNUmakefile + *.coff *.exe *.d *.o *.a *.sym *.map bin Debug Release DRelease UDebug URelease _NO_COMUTIL doxy-doc Win32 WineDll WineRelease *.ncb *.opt *.aps *.ncb *.plg *.suo buildno.h notifyhook.dll *.gch *.h.pch pack.* .gdbinit start-gdb.bat libexpat.dll GNUmakefile *.chm *.lib _____ Modified: trunk/reactos/subsys/system/explorer/explorer.dsp --- trunk/reactos/subsys/system/explorer/explorer.dsp 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/explorer.dsp 2005-09-20 19:51:27 UTC (rev 17951) @@ -451,6 +451,10 @@ # End Source File # Begin Source File +SOURCE=.\explorer.exe.manifest +# End Source File +# Begin Source File + SOURCE=.\res\explorer.ico # End Source File # Begin Source File _____ Modified: trunk/reactos/subsys/system/explorer/explorer.exe.manifest --- trunk/reactos/subsys/system/explorer/explorer.exe.manifest 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/explorer.exe.manifest 2005-09-20 19:51:27 UTC (rev 17951) @@ -3,10 +3,10 @@ <assemblyIdentity version="1.0.0.0" processorArchitecture="X86" - name="IrfanView" + name="ReactOS.Explorer" type="win32" /> -<description>Universal picture viewer</description> +<description>ROS Excplorer</description> <dependency> <dependentAssembly> <assemblyIdentity _____ Modified: trunk/reactos/subsys/system/explorer/explorer.rc --- trunk/reactos/subsys/system/explorer/explorer.rc 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/explorer.rc 2005-09-20 19:51:27 UTC (rev 17951) @@ -19,7 +19,3 @@ IDS_VERSION_STR REACTOS_STR_PRODUCT_VERSION IDS_EXPLORER_VERSION_STR "ReactOS %s Explorer" END - -#define MANIFEST_RESOURCE_ID 1 - -MANIFEST_RESOURCE_ID RT_MANIFEST "explorer.exe.manifest" _____ Modified: trunk/reactos/subsys/system/explorer/explorer_intres.rc --- trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/explorer_intres.rc 2005-09-20 19:51:27 UTC (rev 17951) @@ -85,8 +85,8 @@ 3 TEXTINCLUDE MOVEABLE PURE BEGIN "#ifndef ROSSHELL\r\n" - "IDB_IMAGES BITMAP DISCARDABLE ""res/images.bmp""\r\n" - "IDB_TOOLBAR BITMAP DISCARDABLE ""res/toolbar.bmp""\r\n" + "IDB_IMAGES BITMAP DISCARDABLE ""res/images.bmp""\r\n" + "IDB_TOOLBAR BITMAP DISCARDABLE ""res/toolbar.bmp""\r\n" "#endif\r\n" "#ifndef _ROS_\r\n" "LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL\r\n" @@ -100,6 +100,7 @@ "#endif\r\n" "END\r\n" "#endif\r\n" + "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE ""explorer.exe.manifest""\r\n" "\r\n" "#include ""explorer-en.rc""\r\n" "#include ""explorer-de.rc""\r\n" @@ -167,8 +168,8 @@ // Generated from the TEXTINCLUDE 3 resource. // #ifndef ROSSHELL -IDB_IMAGES BITMAP DISCARDABLE "res/images.bmp" -IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp" +IDB_IMAGES BITMAP DISCARDABLE "res/images.bmp" +IDB_TOOLBAR BITMAP DISCARDABLE "res/toolbar.bmp" #endif #ifndef _ROS_ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL @@ -182,11 +183,11 @@ #endif END #endif +CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST DISCARDABLE PURE "explorer.exe.manifest" #include "explorer-en.rc" #include "explorer-de.rc" #include "explorer-es.rc" -#include "explorer-fr.rc" #include "explorer-sv.rc" #include "explorer-pt.rc" #include "explorer-cz.rc" Property changes on: trunk/reactos/subsys/system/explorer/notifyhook ___________________________________________________________________ Name: svn:ignore - Debug Release *.d *.o *.a *.dll *.gch *.h.pch notifyhook.map notifyhook.sym notifyhook.coff GNUmakefile + Debug Release *.d *.o *.a *.dll *.gch *.h.pch notifyhook.map notifyhook.sym notifyhook.coff GNUmakefile Win32 _____ Modified: trunk/reactos/subsys/system/explorer/resource.h --- trunk/reactos/subsys/system/explorer/resource.h 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/resource.h 2005-09-20 19:51:27 UTC (rev 17951) @@ -3,6 +3,7 @@ // Used by explorer_intres.rc // #define IDS_TITLE 1 +#define MANIFEST_RESOURCE_ID 1 #define IDS_START 2 #define IDS_LOGOFF 3 #define IDS_SHUTDOWN 4 _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.cpp --- trunk/reactos/subsys/system/explorer/taskbar/desktopbar.cpp 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/taskbar/desktopbar.cpp 2005-09-20 19:51:27 UTC (rev 17951) @@ -273,13 +273,17 @@ int DesktopBar::Notify(int id, NMHDR* pnmh) { - if (pnmh->code == RBN_CHILDSIZE) { - /* align the task bands to the top, so it's in row with the Start button */ - NMREBARCHILDSIZE *childSize = (NMREBARCHILDSIZE*)pnmh; + if (pnmh->code == RBN_CHILDSIZE) { + /* align the task bands to the top, so it's in row with the Start button */ + NMREBARCHILDSIZE* childSize = (NMREBARCHILDSIZE*)pnmh; + if (childSize->wID == IDW_TASKTOOLBAR) { int cy = childSize->rcChild.top - childSize->rcBand.top; - childSize->rcChild.bottom -= cy; - childSize->rcChild.top -= cy; + + if (cy) { + childSize->rcChild.bottom -= cy; + childSize->rcChild.top -= cy; + } } } _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h --- trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/taskbar/desktopbar.h 2005-09-20 19:51:27 UTC (rev 17951) @@ -31,7 +31,7 @@ #define DESKTOPBARBAR_HEIGHT (GetSystemMetrics(SM_CYSIZE) + 5 * GetSystemMetrics(SM_CYEDGE)) -#define REBARBAND_HEIGHT (GetSystemMetrics(SM_CYSIZE) + 2 * GetSystemMetrics(SM_CYEDGE)) +#define REBARBAND_HEIGHT (GetSystemMetrics(SM_CYSIZE) + 2 * GetSystemMetrics(SM_CYEDGE)) #define IDC_START 0x1000 _____ Modified: trunk/reactos/subsys/system/explorer/taskbar/taskbar.cpp --- trunk/reactos/subsys/system/explorer/taskbar/taskbar.cpp 2005-09-20 19:27:08 UTC (rev 17950) +++ trunk/reactos/subsys/system/explorer/taskbar/taskbar.cpp 2005-09-20 19:51:27 UTC (rev 17951) @@ -29,7 +29,7 @@ #include <precomp.h> #include "taskbar.h" -#include "traynotify.h" // for NOTIFYAREA_WIDTH_DEF +#include "traynotify.h" // for NOTIFYAREA_WIDTH_DEF DynamicFct<BOOL (WINAPI*)(HWND hwnd)> g_SetTaskmanWindow(TEXT("user32"), "SetTaskmanWindow"); @@ -118,8 +118,6 @@ LRESULT TaskBar::Init(LPCREATESTRUCT pcs) { - TBMETRICS metrics; - if (super::Init(pcs)) return 1; @@ -135,13 +133,19 @@ //SetWindowFont(_htoolbar, GetStockFont(ANSI_VAR_FONT), FALSE); //SendMessage(_htoolbar, TB_SETPADDING, 0, MAKELPARAM(8,8)); +#ifndef __MINGW32__ // TBMETRICS missing in MinGW (as of 20.09.2005) + // set metrics for the Taskbar toolbar to enable button spacing + TBMETRICS metrics; + metrics.cbSize = sizeof(TBMETRICS); metrics.dwMask = TBMF_BARPAD | TBMF_BUTTONSPACING; metrics.cxBarPad = 0; metrics.cyBarPad = 0; metrics.cxButtonSpacing = 3; metrics.cyButtonSpacing = 3; + SendMessage(_htoolbar, TB_SETMETRICS, 0, (LPARAM)&metrics); +#endif _next_id = IDC_FIRST_APP; @@ -392,8 +396,7 @@ HICON hIcon = get_window_icon_small(hwnd); BOOL delete_icon = FALSE; - if (!hIcon) - { + if (!hIcon) { hIcon = LoadIcon(0, IDI_APPLICATION); delete_icon = TRUE; }
19 years, 3 months
1
0
0
0
[royce] 17950: unrevert change - this change is correct and works in windows
by royce@svn.reactos.com
unrevert change - this change is correct and works in windows Modified: trunk/reactos/subsys/system/cmd/choice.c _____ Modified: trunk/reactos/subsys/system/cmd/choice.c --- trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 18:11:55 UTC (rev 17949) +++ trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 19:27:08 UTC (rev 17950) @@ -254,7 +254,11 @@ { val = IsKeyInString (lpOptions, +#ifdef _UNICODE ir.Event.KeyEvent.uChar.UnicodeChar, +#else + ir.Event.KeyEvent.uChar.AsciiChar, +#endif bCaseSensitive); }
19 years, 3 months
1
0
0
0
[greatlrd] 17949: Revert royce3 change from 17948 to 16488 it break choice in bat files, in some case.
by greatlrd@svn.reactos.com
Revert royce3 change from 17948 to 16488 it break choice in bat files, in some case. Modified: trunk/reactos/subsys/system/cmd/choice.c _____ Modified: trunk/reactos/subsys/system/cmd/choice.c --- trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 16:38:02 UTC (rev 17948) +++ trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 18:11:55 UTC (rev 17949) @@ -254,11 +254,7 @@ { val = IsKeyInString (lpOptions, -#ifdef _UNICODE ir.Event.KeyEvent.uChar.UnicodeChar, -#else - ir.Event.KeyEvent.uChar.AsciiChar, -#endif bCaseSensitive); }
19 years, 3 months
1
0
0
0
[royce] 17948: cmd's documentation says that env variables override the "built-ins" like %errorlevel% and such.
by royce@svn.reactos.com
cmd's documentation says that env variables override the "built-ins" like %errorlevel% and such. also fixed a couple msvc6 warnings and added a little documentation to the set/a code Modified: trunk/reactos/subsys/system/cmd/choice.c Modified: trunk/reactos/subsys/system/cmd/cmd.c Modified: trunk/reactos/subsys/system/cmd/cmd.h Modified: trunk/reactos/subsys/system/cmd/misc.c Modified: trunk/reactos/subsys/system/cmd/precomp.h Modified: trunk/reactos/subsys/system/cmd/set.c _____ Modified: trunk/reactos/subsys/system/cmd/choice.c --- trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/choice.c 2005-09-20 16:38:02 UTC (rev 17948) @@ -254,7 +254,11 @@ { val = IsKeyInString (lpOptions, +#ifdef _UNICODE ir.Event.KeyEvent.uChar.UnicodeChar, +#else + ir.Event.KeyEvent.uChar.AsciiChar, +#endif bCaseSensitive); } _____ Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-09-20 16:38:02 UTC (rev 17948) @@ -142,6 +142,7 @@ */ #include <precomp.h> +#include <malloc.h> #include "resource.h" #ifndef NT_SUCCESS @@ -1061,7 +1062,189 @@ #endif /* FEATURE_REDIRECTION */ } +BOOL +GrowIfNecessary ( UINT needed, LPTSTR* ret, UINT* retlen ) +{ + if ( *ret && needed < *retlen ) + return TRUE; + *retlen = needed; + if ( *ret ) + free ( *ret ); + *ret = (LPTSTR)malloc ( *retlen * sizeof(TCHAR) ); + if ( !*ret ) + SetLastError ( ERROR_OUTOFMEMORY ); + return *ret != NULL; +} +LPCTSTR +GetParsedEnvVar ( LPCTSTR envName, UINT* envNameLen ) +{ + static LPTSTR ret = NULL; + static UINT retlen = 0; + LPTSTR p, tmp; + UINT size; + + if ( envNameLen ) + *envNameLen = 0; + SetLastError(0); + if ( *envName++ != '%' ) + return NULL; + switch ( *envName ) + { + case _T('0'): + case _T('1'): + case _T('2'): + case _T('3'): + case _T('4'): + case _T('5'): + case _T('6'): + case _T('7'): + case _T('8'): + case _T('9'): + if ((tmp = FindArg (*envName - _T('0')))) + { + if ( !GrowIfNecessary ( _tcslen(tmp), &ret, &retlen ) ) + return NULL; + _tcscpy ( ret, tmp ); + if ( envNameLen ) + *envNameLen = 2; + return ret; + } + if ( !GrowIfNecessary ( 3, &ret, &retlen ) ) + return NULL; + ret[0] = _T('%'); + ret[1] = *envName; + ret[2] = 0; + if ( envNameLen ) + *envNameLen = 2; + return ret; + + case _T('%'): + if ( !GrowIfNecessary ( 2, &ret, &retlen ) ) + return NULL; + ret[0] = _T('%'); + ret[1] = 0; + if ( envNameLen ) + *envNameLen = 2; + return ret; + + case _T('?'): + /* TODO FIXME 10 is only max size for 32-bit */ + if ( !GrowIfNecessary ( 11, &ret, &retlen ) ) + return NULL; + _sntprintf ( ret, retlen, _T("%u"), nErrorLevel); + ret[retlen-1] = 0; + if ( envNameLen ) + *envNameLen = 2; + return ret; + } + p = _tcschr ( envName, _T('%') ); + if ( !p ) + { + SetLastError ( ERROR_INVALID_PARAMETER ); + return NULL; + } + size = p-envName; + if ( envNameLen ) + *envNameLen = size + 2; + p = alloca ( (size+1) * sizeof(TCHAR) ); + memmove ( p, envName, size * sizeof(TCHAR) ); + p[size] = 0; + envName = p; + size = GetEnvironmentVariable ( envName, ret, retlen ); + if ( size > retlen ) + { + if ( !GrowIfNecessary ( size, &ret, &retlen ) ) + return NULL; + size = GetEnvironmentVariable ( envName, ret, retlen ); + } + if ( size ) + return ret; + + /* env var doesn't exist, look for a "special" one */ + /* %CD% */ + if (_tcsicmp(envName,_T("cd")) ==0) + { + size = GetCurrentDirectory ( retlen, ret ); + if ( size > retlen ) + { + if ( !GrowIfNecessary ( size, &ret, &retlen ) ) + return NULL; + size = GetCurrentDirectory ( retlen, ret ); + } + if ( !size ) + return NULL; + return ret; + } + /* %TIME% */ + else if (_tcsicmp(envName,_T("time")) ==0) + { + SYSTEMTIME t; + if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) ) + return NULL; + GetSystemTime(&t); + _sntprintf ( ret, retlen, _T("%02d%c%02d%c%02d%c%02d"), + t.wHour, cTimeSeparator, t.wMinute, cTimeSeparator, + t.wSecond, cDecimalSeparator, t.wMilliseconds ); + return ret; + } + /* %DATE% */ + else if (_tcsicmp(envName,_T("date")) ==0) + { + if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) ) + return NULL; + size = GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("ddd"), ret, retlen ); + /* TODO FIXME - test whether GetDateFormat() can return a value indicating the buffer wasn't big enough */ + if ( !size ) + return NULL; + tmp = ret + _tcslen(ret); + *tmp++ = _T(' '); + size = GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, tmp, retlen-(tmp-ret)); + /* TODO FIXME - test whether GetDateFormat() can return a value indicating the buffer wasn't big enough */ + if ( !size ) + return NULL; + return ret; + } + + /* %RANDOM% */ + else if (_tcsicmp(envName,_T("random")) ==0) + { + if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) ) + return NULL; + /* Get random number */ + _itot(rand(),ret,10); + return ret; + } + + /* %CMDCMDLINE% */ + else if (_tcsicmp(envName,_T("cmdcmdline")) ==0) + { + return GetCommandLine(); + } + + /* %CMDEXTVERSION% */ + else if (_tcsicmp(envName,_T("cmdextversion")) ==0) + { + if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) ) + return NULL; + /* Set version number to 2 */ + _itot(2,ret,10); + return ret; + } + + /* %ERRORLEVEL% */ + else if (_tcsicmp(envName,_T("errorlevel")) ==0) + { + if ( !GrowIfNecessary ( MAX_PATH, &ret, &retlen ) ) + return NULL; + _itot(nErrorLevel,ret,10); + return ret; + } + + return _T(""); /* not found - return empty string */ +} + + /* * do the prompt/input/process loop * @@ -1072,7 +1255,6 @@ { TCHAR commandline[CMDLINE_LENGTH]; TCHAR readline[CMDLINE_LENGTH]; - LPTSTR tp = NULL; LPTSTR ip; LPTSTR cp; LPCTSTR tmp; @@ -1100,165 +1282,14 @@ bSubstitute = TRUE; while (*ip) { - if (bSubstitute && *ip == _T('%')) + if ( bSubstitute && *ip == _T('%') ) { - switch (*++ip) - { - case _T('%'): - *cp++ = *ip++; - break; - - case _T('0'): - case _T('1'): - case _T('2'): - case _T('3'): - case _T('4'): - case _T('5'): - case _T('6'): - case _T('7'): - case _T('8'): - case _T('9'): - if ((tp = FindArg (*ip - _T('0')))) - { - cp = _stpcpy (cp, tp); - ip++; - } - else - *cp++ = _T('%'); - break; - - case _T('?'): - cp += _stprintf (cp, _T("%u"), nErrorLevel); - ip++; - break; - - default: - tp = _tcschr(ip, _T('%')); - if ((tp != NULL) && - (tp <= _tcschr(ip, _T(' ')) - 1)) - { - INT size = 512; - TCHAR *evar; - *tp = _T('\0'); - - /* FIXME: Correct error handling when it can not alloc memmory */ - - /* %CD% */ - if (_tcsicmp(ip,_T("cd")) ==0) - { - TCHAR szPath[MAX_PATH]; - GetCurrentDirectory (MAX_PATH, szPath); - cp = _stpcpy (cp, szPath); - } - /* %TIME% */ - else if (_tcsicmp(ip,_T("time")) ==0) - { - TCHAR szTime[40]; - SYSTEMTIME t; - GetSystemTime(&t); - - _sntprintf(szTime ,40,_T("%02d%c%02d%c%02d%c%02d"), t.wHour, cTimeSeparator,t.wMinute , cTimeSeparator,t.wSecond , cDecimalSeparator, t.wMilliseconds ); - cp = _stpcpy (cp, szTime); - } - - /* %DATE% */ - else if (_tcsicmp(ip,_T("date")) ==0) - { - TCHAR szDate[40]; - - GetDateFormat(LOCALE_USER_DEFAULT, 0, NULL, _T("ddd"), szDate, sizeof (szDate)); - cp = _stpcpy (cp, szDate); - cp = _stpcpy (cp, _T(" ")); - GetDateFormat(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, szDate, sizeof (szDate)); - cp = _stpcpy (cp, szDate); - } - - /* %RANDOM% */ - else if (_tcsicmp(ip,_T("random")) ==0) - { - TCHAR szRand[40]; - /* Get random number */ - _itot(rand(),szRand,10); - cp = _stpcpy (cp, szRand); - } - - /* %CMDCMDLINE% */ - else if (_tcsicmp(ip,_T("cmdcmdline")) ==0) - { - TCHAR *pargv; - /* Get random number */ - pargv = GetCommandLine(); - cp = _stpcpy (cp, pargv); - } - - /* %CMDEXTVERSION% */ - else if (_tcsicmp(ip,_T("cmdextversion")) ==0) - { - TCHAR szVER[40]; - /* Set version number to 2 */ - _itot(2,szVER,10); - cp = _stpcpy (cp, szVER); - } - - /* %ERRORLEVEL% */ - else if (_tcsicmp(ip,_T("errorlevel")) ==0) - { - evar = malloc ( size * sizeof(TCHAR)); - if (evar==NULL) - return 1; - - memset(evar,0,512 * sizeof(TCHAR)); - _itot(nErrorLevel,evar,10); - cp = _stpcpy (cp, evar); - - free(evar); - } - else - { - evar = malloc ( 512 * sizeof(TCHAR)); - if (evar==NULL) - return 1; - SetLastError(0); - size = GetEnvironmentVariable (ip, evar, 512); - if(GetLastError() == ERROR_ENVVAR_NOT_FOUND) - { - /* if no env var is found you must - continue with what was input*/ - cp = _stpcpy (cp, _T("%")); - cp = _stpcpy (cp, ip); - cp = _stpcpy (cp, _T("%")); - } - else - { - if (size > 512) - { - evar = realloc(evar,size * sizeof(TCHAR) ); - if (evar==NULL) - { - return 1; - } - size = GetEnvironmentVariable (ip, evar, size); - } - - if (size) - { - cp = _stpcpy (cp, evar); - } - } - - free(evar); - } - - ip = tp + 1; - - } - else - { - *cp++ = _T('%'); - } - - break; - } + UINT envNameLen; + LPCTSTR envVal = GetParsedEnvVar ( ip, &envNameLen ); + if ( !envVal ) + return 1; + ip += envNameLen; + cp = _stpcpy ( cp, envVal ); continue; } _____ Modified: trunk/reactos/subsys/system/cmd/cmd.h --- trunk/reactos/subsys/system/cmd/cmd.h 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/cmd.h 2005-09-20 16:38:02 UTC (rev 17948) @@ -299,7 +299,7 @@ BOOL CheckCtrlBreak (INT); LPTSTR *split (LPTSTR, LPINT, BOOL); VOID freep (LPTSTR *); -LPTSTR _stpcpy (LPTSTR, LPTSTR); +LPTSTR _stpcpy (LPTSTR, LPCTSTR); BOOL IsValidPathName (LPCTSTR); BOOL IsExistingFile (LPCTSTR); BOOL IsExistingDirectory (LPCTSTR); _____ Modified: trunk/reactos/subsys/system/cmd/misc.c --- trunk/reactos/subsys/system/cmd/misc.c 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/misc.c 2005-09-20 16:38:02 UTC (rev 17948) @@ -322,7 +322,7 @@ } -LPTSTR _stpcpy (LPTSTR dest, LPTSTR src) +LPTSTR _stpcpy (LPTSTR dest, LPCTSTR src) { _tcscpy (dest, src); return (dest + _tcslen (src)); _____ Modified: trunk/reactos/subsys/system/cmd/precomp.h --- trunk/reactos/subsys/system/cmd/precomp.h 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/precomp.h 2005-09-20 16:38:02 UTC (rev 17948) @@ -1,3 +1,9 @@ +#ifdef _MSC_VER +#pragma warning ( disable : 4103 ) /* use #pragma pack to change alignment */ +#endif//_MSC_VER + +#include <stdlib.h> + #include <windows.h> #include <winnt.h> #include <shellapi.h> @@ -8,7 +14,6 @@ #include <ctype.h> #include <string.h> #include <stdio.h> -#include <stdlib.h> #include <stdarg.h> #include <math.h> #include <time.h> _____ Modified: trunk/reactos/subsys/system/cmd/set.c --- trunk/reactos/subsys/system/cmd/set.c 2005-09-20 10:45:27 UTC (rev 17947) +++ trunk/reactos/subsys/system/cmd/set.c 2005-09-20 16:38:02 UTC (rev 17948) @@ -103,9 +103,10 @@ return 0; } + /* the /A does *NOT* have to be followed by a whitespace */ if ( !_tcsnicmp (param, _T("/A"), 2) ) { - // TODO FIXME - what are we supposed to return? + /* TODO FIXME - what are we supposed to return? */ return seta_eval ( skip_ws(param+2) ); }
19 years, 3 months
1
0
0
0
[navaraf] 17947: Restore the pre-r17946 UserGetAncestor behaviour and fix the code calling it.
by navaraf@svn.reactos.com
Restore the pre-r17946 UserGetAncestor behaviour and fix the code calling it. Modified: trunk/reactos/subsys/win32k/ntuser/focus.c Modified: trunk/reactos/subsys/win32k/ntuser/window.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/focus.c --- trunk/reactos/subsys/win32k/ntuser/focus.c 2005-09-20 10:31:57 UTC (rev 17946) +++ trunk/reactos/subsys/win32k/ntuser/focus.c 2005-09-20 10:45:27 UTC (rev 17947) @@ -520,7 +520,7 @@ } TopWnd = UserGetAncestor(Window, GA_ROOT); - if (TopWnd->hSelf != UserGetActiveWindow()) + if (TopWnd && TopWnd->hSelf != UserGetActiveWindow()) { // PWINDOW_OBJECT WndTops = UserGetWindowObject(hWndTop); UserRefObjectCo(TopWnd); _____ Modified: trunk/reactos/subsys/win32k/ntuser/window.c --- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 10:31:57 UTC (rev 17946) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 10:45:27 UTC (rev 17947) @@ -1374,9 +1374,9 @@ else { //temp hack - PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent); - if (Par) - OwnerWindowHandle = UserGetAncestor(Par, GA_ROOT)->hSelf; + PWINDOW_OBJECT Par = UserGetWindowObject(hWndParent), Root; + if (Par && (Root = UserGetAncestor(Par, GA_ROOT))) + OwnerWindowHandle = Root->hSelf; } } else if ((dwStyle & (WS_CHILD | WS_POPUP)) == WS_CHILD) @@ -2543,6 +2543,11 @@ { PWINDOW_OBJECT WndAncestor, Parent; + if (Wnd->hSelf == IntGetDesktopWindow()) + { + return NULL; + } + switch (Type) { case GA_PARENT:
19 years, 3 months
1
0
0
0
[navaraf] 17946: - SetParent shouldn't destroy menus.
by navaraf@svn.reactos.com
- SetParent shouldn't destroy menus. - UserGetAncestor(Window, GA_ROOT) really shouldn't return NULL, in any case. Modified: trunk/reactos/subsys/win32k/ntuser/window.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/window.c --- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 10:29:05 UTC (rev 17945) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 10:31:57 UTC (rev 17946) @@ -878,7 +878,6 @@ PWINDOW_OBJECT WndOldParent, Sibling, InsertAfter; // HWND hWnd, hWndNewParent; BOOL WasVisible; - BOOL MenuChanged; ASSERT(Wnd); ASSERT(WndNewParent); @@ -930,15 +929,6 @@ IntLinkWindow(Wnd, WndNewParent, InsertAfter /*prev sibling*/); // UserDerefObject(InsertAfter); } - - if (WndNewParent->hSelf != IntGetDesktopWindow()) /* a child window */ - { - if (!(Wnd->Style & WS_CHILD)) - { - //if ( Wnd->Menu ) DestroyMenu ( Wnd->menu ); - IntSetMenu(Wnd, NULL, &MenuChanged); - } - } } /* @@ -2553,11 +2543,6 @@ { PWINDOW_OBJECT WndAncestor, Parent; - if (Wnd->hSelf == IntGetDesktopWindow()) - { - return NULL; - } - switch (Type) { case GA_PARENT:
19 years, 3 months
1
0
0
0
[navaraf] 17945: Don't return NULL regions from DceGetVisRgn.
by navaraf@svn.reactos.com
Don't return NULL regions from DceGetVisRgn. Modified: trunk/reactos/subsys/win32k/ntuser/windc.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/windc.c --- trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-20 09:31:13 UTC (rev 17944) +++ trunk/reactos/subsys/win32k/ntuser/windc.c 2005-09-20 10:29:05 UTC (rev 17945) @@ -63,6 +63,9 @@ 0 != (Flags & DCX_CLIPCHILDREN), 0 != (Flags & DCX_CLIPSIBLINGS)); + if (VisRgn == NULL) + VisRgn = NtGdiCreateRectRgn(0, 0, 0, 0); + return VisRgn; } @@ -266,10 +269,6 @@ DcxFlags = Flags & ~(DCX_CLIPSIBLINGS | DCX_CLIPCHILDREN | DCX_WINDOW); } hRgnVisible = DceGetVisRgn(Parent, DcxFlags, Window->hSelf, Flags); - if (hRgnVisible == NULL) - { - hRgnVisible = NtGdiCreateRectRgn(0, 0, 0, 0); - } } else if (Window == NULL) {
19 years, 3 months
1
0
0
0
[navaraf] 17944: Fix parameter validation in WM_GETTEXT and GetWindowText.
by navaraf@svn.reactos.com
Fix parameter validation in WM_GETTEXT and GetWindowText. Modified: trunk/reactos/lib/user32/windows/defwnd.c Modified: trunk/reactos/lib/user32/windows/window.c _____ Modified: trunk/reactos/lib/user32/windows/defwnd.c --- trunk/reactos/lib/user32/windows/defwnd.c 2005-09-20 09:28:49 UTC (rev 17943) +++ trunk/reactos/lib/user32/windows/defwnd.c 2005-09-20 09:31:13 UTC (rev 17944) @@ -1426,10 +1426,6 @@ LPSTR AnsiBuffer = (LPSTR)lParam; INT Length; - if (wParam > 1) - { - *((PWSTR)lParam) = '\0'; - } Buffer = HeapAlloc(GetProcessHeap(), 0, wParam * sizeof(WCHAR)); if (!Buffer) return FALSE; @@ -1505,10 +1501,6 @@ case WM_GETTEXT: { - if (wParam > 1) - { - *((PWSTR)lParam) = L'\0'; - } return (LRESULT)NtUserInternalGetWindowText(hWnd, (PWSTR)lParam, wParam); } _____ Modified: trunk/reactos/lib/user32/windows/window.c --- trunk/reactos/lib/user32/windows/window.c 2005-09-20 09:28:49 UTC (rev 17943) +++ trunk/reactos/lib/user32/windows/window.c 2005-09-20 09:31:13 UTC (rev 17944) @@ -819,39 +819,36 @@ int STDCALL GetWindowTextA(HWND hWnd, LPSTR lpString, int nMaxCount) { - DWORD ProcessId; - if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId)) - { - return 0; - } + DWORD ProcessId; + + if (lpString == NULL) + return 0; - if(ProcessId != GetCurrentProcessId()) - { - /* do not send WM_GETTEXT messages to other processes */ - LPWSTR Buffer; - INT Length; + if (!NtUserGetWindowThreadProcessId(hWnd, &ProcessId)) + return 0; - if (nMaxCount > 1) - { - *((PWSTR)lpString) = '\0'; - } - Buffer = HeapAlloc(GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR)); - if (!Buffer) - return FALSE; - Length = NtUserInternalGetWindowText(hWnd, Buffer, nMaxCount); - if (Length > 0 && nMaxCount > 0 && - !WideCharToMultiByte(CP_ACP, 0, Buffer, -1, - lpString, nMaxCount, NULL, NULL)) - { - lpString[0] = '\0'; - } + if (ProcessId != GetCurrentProcessId()) + { + /* do not send WM_GETTEXT messages to other processes */ + LPWSTR Buffer; + INT Length; - HeapFree(GetProcessHeap(), 0, Buffer); + Buffer = HeapAlloc(GetProcessHeap(), 0, nMaxCount * sizeof(WCHAR)); + if (!Buffer) + return FALSE; + Length = NtUserInternalGetWindowText(hWnd, Buffer, nMaxCount); + if (Length > 0 && nMaxCount > 0 && + !WideCharToMultiByte(CP_ACP, 0, Buffer, -1, + lpString, nMaxCount, NULL, NULL)) + { + lpString[0] = '\0'; + } + HeapFree(GetProcessHeap(), 0, Buffer); - return (LRESULT)Length; - } + return (LRESULT)Length; + } - return(SendMessageA(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString)); + return SendMessageA(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString); } @@ -903,29 +900,20 @@ * @implemented */ int STDCALL -GetWindowTextW( - HWND hWnd, - LPWSTR lpString, - int nMaxCount) +GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount) { - DWORD ProcessId; - if(!NtUserGetWindowThreadProcessId(hWnd, &ProcessId)) - { - return 0; - } + DWORD ProcessId; + + if (lpString == NULL) + return 0; - if(ProcessId == GetCurrentProcessId()) - { - return(SendMessageW(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString)); - } + if (!NtUserGetWindowThreadProcessId(hWnd, &ProcessId)) + return 0; - /* do not send WM_GETTEXT messages to other processes */ - if (nMaxCount > 1) - { - *((PWSTR)lpString) = L'\0'; - } + if (ProcessId == GetCurrentProcessId()) + return SendMessageW(hWnd, WM_GETTEXT, nMaxCount, (LPARAM)lpString); - return (LRESULT)NtUserInternalGetWindowText(hWnd, (PWSTR)lpString, nMaxCount); + return NtUserInternalGetWindowText(hWnd, lpString, nMaxCount); } DWORD STDCALL
19 years, 3 months
1
0
0
0
[navaraf] 17943: Support GCW_ATOM in GetClassLong.
by navaraf@svn.reactos.com
Support GCW_ATOM in GetClassLong. Modified: trunk/reactos/subsys/win32k/ntuser/class.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/class.c --- trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-20 09:28:18 UTC (rev 17942) +++ trunk/reactos/subsys/win32k/ntuser/class.c 2005-09-20 09:28:49 UTC (rev 17943) @@ -527,6 +527,9 @@ Ret = (ULONG)Window->Class->lpfnWndProcW; } break; + case GCW_ATOM: + Ret = Window->Class->Atom; + break; default: Ret = 0; break;
19 years, 3 months
1
0
0
0
[navaraf] 17942: Fix the order of window style setting.
by navaraf@svn.reactos.com
Fix the order of window style setting. Modified: trunk/reactos/subsys/win32k/ntuser/window.c _____ Modified: trunk/reactos/subsys/win32k/ntuser/window.c --- trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 08:00:00 UTC (rev 17941) +++ trunk/reactos/subsys/win32k/ntuser/window.c 2005-09-20 09:28:18 UTC (rev 17942) @@ -1468,10 +1468,6 @@ InsertTailList(&Class->ClassWindowsListHead, &Window->ClassListEntry); - Window->ExStyle = dwExStyle; - Window->Style = dwStyle & ~WS_VISIBLE; - DPRINT("1: Style is now %lx\n", Window->Style); - Window->SystemMenu = (HMENU)0; Window->ContextHelpId = 0; Window->IDMenu = 0; @@ -1571,19 +1567,19 @@ /* Correct the window style. */ if (!(dwStyle & WS_CHILD)) { - Window->Style |= WS_CLIPSIBLINGS; - DPRINT("3: Style is now %lx\n", Window->Style); + dwStyle |= WS_CLIPSIBLINGS; + DPRINT("3: Style is now %lx\n", dwStyle); if (!(dwStyle & WS_POPUP)) { - Window->Style |= WS_CAPTION; + dwStyle |= WS_CAPTION; Window->Flags |= WINDOWOBJECT_NEED_SIZE; - DPRINT("4: Style is now %lx\n", Window->Style); + DPRINT("4: Style is now %lx\n", dwStyle); } } /* create system menu */ - if((Window->Style & WS_SYSMENU) && - (Window->Style & WS_CAPTION) == WS_CAPTION) + if((dwStyle & WS_SYSMENU) && + (dwStyle & WS_CAPTION) == WS_CAPTION) { SystemMenu = IntGetSystemMenu(Window, TRUE, TRUE); if(SystemMenu) @@ -1608,6 +1604,9 @@ Size.cx = nWidth; Size.cy = nHeight; + Window->ExStyle = dwExStyle; + Window->Style = dwStyle & ~WS_VISIBLE; + /* call hook */ Cs.lpCreateParams = lpParam; Cs.hInstance = hInstance; @@ -1617,7 +1616,7 @@ Cs.cy = Size.cy; Cs.x = Pos.x; Cs.y = Pos.y; - Cs.style = dwStyle; + Cs.style = Window->Style; Cs.lpszName = (LPCWSTR) WindowName; Cs.lpszClass = (LPCWSTR) ClassName; Cs.dwExStyle = dwExStyle; @@ -2569,13 +2568,11 @@ case GA_ROOT: { - PWINDOW_OBJECT tmp; WndAncestor = Wnd; Parent = NULL; for(;;) { - tmp = Parent; if(!(Parent = WndAncestor->Parent)) { break;
19 years, 3 months
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
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