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
August 2007
----- 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
21 participants
666 discussions
Start a n
N
ew thread
[weiden] 28066: Allocate correct amount of memory. See issue #2499 for more details.
by weidenďĽ svn.reactos.org
Author: weiden Date: Wed Aug 1 14:39:49 2007 New Revision: 28066 URL:
http://svn.reactos.org/svn/reactos?rev=28066&view=rev
Log: Allocate correct amount of memory. See issue #2499 for more details. Modified: trunk/reactos/base/shell/cmd/dir.c Modified: trunk/reactos/base/shell/cmd/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/dir.c (original) +++ trunk/reactos/base/shell/cmd/dir.c Wed Aug 1 14:39:49 2007 @@ -364,10 +364,10 @@ cCurSwitch = _T(' '); if(ptrStart && ptrEnd) { - temp = cmd_alloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + temp = cmd_alloc(((ptrEnd - ptrStart) + 2) * sizeof (TCHAR)); if(!temp) return FALSE; - memcpy(temp, ptrStart, (ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + memcpy(temp, ptrStart, ((ptrEnd - ptrStart) + 2) * sizeof (TCHAR)); temp[(ptrEnd - ptrStart + 1)] = _T('\0'); if(!add_entry(entries, params, temp)) { @@ -396,10 +396,10 @@ /* Process a character for parameter */ if ((cCurSwitch == _T(' ')) && ptrStart && ptrEnd) { - temp = cmd_alloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + temp = cmd_alloc(((ptrEnd - ptrStart) + 2) * sizeof (TCHAR)); if(!temp) return FALSE; - memcpy(temp, ptrStart, (ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + memcpy(temp, ptrStart, ((ptrEnd - ptrStart) + 2) * sizeof (TCHAR)); temp[(ptrEnd - ptrStart + 1)] = _T('\0'); if(!add_entry(entries, params, temp)) {
17Â years, 4Â months
1
0
0
0
[weiden] 28065: - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. - Change all calls to malloc, realloc and free to cmd_alloc, cmd_realloc and cmd_free
by weidenďĽ svn.reactos.org
Author: weiden Date: Wed Aug 1 14:17:13 2007 New Revision: 28065 URL:
http://svn.reactos.org/svn/reactos?rev=28065&view=rev
Log: - Add code to detect buffer overflows and buffer underflows on memory operations. This code is only enabled if _DEBUG is defined. - Change all calls to malloc, realloc and free to cmd_alloc, cmd_realloc and cmd_free Added: trunk/reactos/base/shell/cmd/cmddbg.c (with props) trunk/reactos/base/shell/cmd/cmddbg.h (with props) Modified: trunk/reactos/base/shell/cmd/alias.c trunk/reactos/base/shell/cmd/attrib.c trunk/reactos/base/shell/cmd/batch.c trunk/reactos/base/shell/cmd/beep.c trunk/reactos/base/shell/cmd/call.c trunk/reactos/base/shell/cmd/chcp.c trunk/reactos/base/shell/cmd/choice.c trunk/reactos/base/shell/cmd/cls.c trunk/reactos/base/shell/cmd/cmd.c trunk/reactos/base/shell/cmd/cmd.h trunk/reactos/base/shell/cmd/cmd.rbuild trunk/reactos/base/shell/cmd/cmdinput.c trunk/reactos/base/shell/cmd/cmdtable.c trunk/reactos/base/shell/cmd/color.c trunk/reactos/base/shell/cmd/console.c trunk/reactos/base/shell/cmd/copy.c trunk/reactos/base/shell/cmd/date.c trunk/reactos/base/shell/cmd/del.c trunk/reactos/base/shell/cmd/delay.c trunk/reactos/base/shell/cmd/dir.c trunk/reactos/base/shell/cmd/dirstack.c trunk/reactos/base/shell/cmd/echo.c trunk/reactos/base/shell/cmd/error.c trunk/reactos/base/shell/cmd/filecomp.c trunk/reactos/base/shell/cmd/for.c trunk/reactos/base/shell/cmd/free.c trunk/reactos/base/shell/cmd/goto.c trunk/reactos/base/shell/cmd/history.c trunk/reactos/base/shell/cmd/if.c trunk/reactos/base/shell/cmd/internal.c trunk/reactos/base/shell/cmd/label.c trunk/reactos/base/shell/cmd/locale.c trunk/reactos/base/shell/cmd/main.c trunk/reactos/base/shell/cmd/memory.c trunk/reactos/base/shell/cmd/misc.c trunk/reactos/base/shell/cmd/move.c trunk/reactos/base/shell/cmd/msgbox.c trunk/reactos/base/shell/cmd/path.c trunk/reactos/base/shell/cmd/pause.c trunk/reactos/base/shell/cmd/precomp.h trunk/reactos/base/shell/cmd/prompt.c trunk/reactos/base/shell/cmd/ren.c trunk/reactos/base/shell/cmd/screen.c trunk/reactos/base/shell/cmd/set.c trunk/reactos/base/shell/cmd/shift.c trunk/reactos/base/shell/cmd/start.c trunk/reactos/base/shell/cmd/time.c trunk/reactos/base/shell/cmd/timer.c trunk/reactos/base/shell/cmd/title.c trunk/reactos/base/shell/cmd/type.c trunk/reactos/base/shell/cmd/ver.c trunk/reactos/base/shell/cmd/verify.c trunk/reactos/base/shell/cmd/vol.c trunk/reactos/base/shell/cmd/where.c trunk/reactos/base/shell/cmd/window.c Modified: trunk/reactos/base/shell/cmd/alias.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/alias.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/alias.c (original) +++ trunk/reactos/base/shell/cmd/alias.c Wed Aug 1 14:17:13 2007 @@ -31,7 +31,6 @@ #include <precomp.h> -#include "resource.h" #ifdef FEATURE_ALIASES @@ -89,9 +88,9 @@ prev->next = ptr->next; else lpFirst = ptr->next; - free (ptr->lpName); - free (ptr->lpSubst); - free (ptr); + cmd_free (ptr->lpName); + cmd_free (ptr->lpSubst); + cmd_free (ptr); return; } prev = ptr; @@ -111,14 +110,14 @@ { if (!_tcsicmp (ptr->lpName, name)) { - s = (LPTSTR)malloc ((_tcslen (subst) + 1)*sizeof(TCHAR)); + s = (LPTSTR)cmd_alloc ((_tcslen (subst) + 1)*sizeof(TCHAR)); if (!s) { error_out_of_memory (); return; } - free (ptr->lpSubst); + cmd_free (ptr->lpSubst); ptr->lpSubst = s; _tcscpy (ptr->lpSubst, subst); return; @@ -126,27 +125,27 @@ ptr = ptr->next; } - ptr = (LPALIAS)malloc (sizeof (ALIAS)); + ptr = (LPALIAS)cmd_alloc (sizeof (ALIAS)); if (!ptr) return; ptr->next = 0; - ptr->lpName = (LPTSTR)malloc ((_tcslen (name) + 1)*sizeof(TCHAR)); + ptr->lpName = (LPTSTR)cmd_alloc ((_tcslen (name) + 1)*sizeof(TCHAR)); if (!ptr->lpName) { error_out_of_memory (); - free (ptr); + cmd_free (ptr); return; } _tcscpy (ptr->lpName, name); - ptr->lpSubst = (LPTSTR)malloc ((_tcslen (subst) + 1)*sizeof(TCHAR)); + ptr->lpSubst = (LPTSTR)cmd_alloc ((_tcslen (subst) + 1)*sizeof(TCHAR)); if (!ptr->lpSubst) { error_out_of_memory (); - free (ptr->lpName); - free (ptr); + cmd_free (ptr->lpName); + cmd_free (ptr); return; } _tcscpy (ptr->lpSubst, subst); @@ -220,14 +219,14 @@ lpLast = lpFirst; lpFirst = lpLast->next; - free (lpLast->lpName); - free (lpLast->lpSubst); - free (lpLast); + cmd_free (lpLast->lpName); + cmd_free (lpLast->lpSubst); + cmd_free (lpLast); } - free (lpFirst->lpName); - free (lpFirst->lpSubst); - free (lpFirst); + cmd_free (lpFirst->lpName); + cmd_free (lpFirst->lpSubst); + cmd_free (lpFirst); lpFirst = NULL; lpLast = NULL; Modified: trunk/reactos/base/shell/cmd/attrib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/attrib.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/attrib.c (original) +++ trunk/reactos/base/shell/cmd/attrib.c Wed Aug 1 14:17:13 2007 @@ -33,7 +33,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_ATTRIB 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 (original) +++ trunk/reactos/base/shell/cmd/batch.c Wed Aug 1 14:17:13 2007 @@ -39,7 +39,7 @@ * Implementation of FOR command * * 20-Jul-1998 (John P Price <linux-guru(a)gcfl.net>) - * added error checking after malloc calls + * added error checking after cmd_alloc calls * * 27-Jul-1998 (John P Price <linux-guru(a)gcfl.net>) * added config.h include @@ -59,7 +59,6 @@ */ #include <precomp.h> -#include "resource.h" /* The stack of current batch contexts. @@ -114,7 +113,7 @@ LPTSTR BatchParams (LPTSTR s1, LPTSTR s2) { - LPTSTR dp = (LPTSTR)malloc ((_tcslen(s1) + _tcslen(s2) + 3) * sizeof (TCHAR)); + LPTSTR dp = (LPTSTR)cmd_alloc ((_tcslen(s1) + _tcslen(s2) + 3) * sizeof (TCHAR)); /* JPP 20-Jul-1998 added error checking */ if (dp == NULL) @@ -188,19 +187,19 @@ } if (bc->params) - free(bc->params); + cmd_free(bc->params); if (bc->forproto) - free(bc->forproto); + cmd_free(bc->forproto); if (bc->ffind) - free(bc->ffind); + cmd_free(bc->ffind); /* Preserve echo state across batch calls */ bEcho = bc->bEcho; bc = bc->prev; - free(t); + cmd_free(t); } if (msg && *msg) @@ -241,7 +240,7 @@ if (bc == NULL) { /* No curent batch file, create a new context */ - LPBATCH_CONTEXT n = (LPBATCH_CONTEXT)malloc (sizeof(BATCH_CONTEXT)); + LPBATCH_CONTEXT n = (LPBATCH_CONTEXT)cmd_alloc (sizeof(BATCH_CONTEXT)); if (n == NULL) { @@ -260,7 +259,7 @@ /* Then we are transferring to another batch */ CloseHandle (bc->hBatchFile); bc->hBatchFile = INVALID_HANDLE_VALUE; - free (bc->params); + cmd_free (bc->params); } bc->hBatchFile = hFile; @@ -275,7 +274,7 @@ // // Allocate enough memory to hold the params and copy them over without modifications // - bc->raw_params = (TCHAR*) malloc((_tcslen(param)+1) * sizeof(TCHAR)); + bc->raw_params = (TCHAR*) cmd_alloc((_tcslen(param)+1) * sizeof(TCHAR)); if (bc->raw_params != NULL) { memset (bc->raw_params, 0, _tcslen(bc->raw_params) * sizeof(TCHAR)); @@ -378,7 +377,7 @@ else { /* For first find, allocate a find first block */ - if ((bc->ffind = (LPWIN32_FIND_DATA)malloc (sizeof (WIN32_FIND_DATA))) == NULL) + if ((bc->ffind = (LPWIN32_FIND_DATA)cmd_alloc (sizeof (WIN32_FIND_DATA))) == NULL) { error_out_of_memory(); return NULL; @@ -392,7 +391,7 @@ if (fv == NULL) { /* Null indicates no more files.. */ - free (bc->ffind); /* free the buffer */ + cmd_free (bc->ffind); /* free the buffer */ bc->ffind = NULL; bc->shiftlevel++; /* On to next list element */ continue; Modified: trunk/reactos/base/shell/cmd/beep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/beep.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/beep.c (original) +++ trunk/reactos/base/shell/cmd/beep.c Wed Aug 1 14:17:13 2007 @@ -25,7 +25,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_BEEP Modified: trunk/reactos/base/shell/cmd/call.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/call.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/call.c (original) +++ trunk/reactos/base/shell/cmd/call.c Wed Aug 1 14:17:13 2007 @@ -29,7 +29,6 @@ */ #include <precomp.h> -#include "resource.h" /* @@ -56,7 +55,7 @@ nErrorLevel = 0; - n = (LPBATCH_CONTEXT)malloc (sizeof (BATCH_CONTEXT)); + n = (LPBATCH_CONTEXT)cmd_alloc (sizeof (BATCH_CONTEXT)); if (n == NULL) { @@ -91,7 +90,7 @@ if (bc->hBatchFile == INVALID_HANDLE_VALUE) { bc = bc->prev; - free (n); + cmd_free (n); } return 0; Modified: trunk/reactos/base/shell/cmd/chcp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/chcp.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/chcp.c (original) +++ trunk/reactos/base/shell/cmd/chcp.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" Modified: trunk/reactos/base/shell/cmd/choice.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/choice.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/choice.c (original) +++ trunk/reactos/base/shell/cmd/choice.c Wed Aug 1 14:17:13 2007 @@ -20,7 +20,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_CHOICE Modified: trunk/reactos/base/shell/cmd/cls.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cls.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/cls.c (original) +++ trunk/reactos/base/shell/cmd/cls.c Wed Aug 1 14:17:13 2007 @@ -27,7 +27,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_CLS Modified: trunk/reactos/base/shell/cmd/cmd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.c (original) +++ trunk/reactos/base/shell/cmd/cmd.c Wed Aug 1 14:17:13 2007 @@ -142,8 +142,6 @@ */ #include <precomp.h> -#include <malloc.h> -#include "resource.h" #ifndef NT_SUCCESS #define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) @@ -351,10 +349,10 @@ #endif /* we need biger buffer that First, Rest, Full are already - need rewrite some code to use realloc when it need instead + need rewrite some code to use cmd_realloc when it need instead of add 512bytes extra */ - first = malloc ( (_tcslen(First) + 512) * sizeof(TCHAR)); + first = cmd_alloc ( (_tcslen(First) + 512) * sizeof(TCHAR)); if (first == NULL) { error_out_of_memory(); @@ -362,31 +360,31 @@ return ; } - rest = malloc ( (_tcslen(Rest) + 512) * sizeof(TCHAR)); + rest = cmd_alloc ( (_tcslen(Rest) + 512) * sizeof(TCHAR)); if (rest == NULL) { - free (first); + cmd_free (first); error_out_of_memory(); nErrorLevel = 1; return ; } - full = malloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); + full = cmd_alloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); if (full == NULL) { - free (first); - free (rest); + cmd_free (first); + cmd_free (rest); error_out_of_memory(); nErrorLevel = 1; return ; } - szFullName = malloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); + szFullName = cmd_alloc ( (_tcslen(Full) + 512) * sizeof(TCHAR)); if (full == NULL) { - free (first); - free (rest); - free (full); + cmd_free (first); + cmd_free (rest); + cmd_free (full); error_out_of_memory(); nErrorLevel = 1; return ; @@ -455,10 +453,10 @@ if (!working) ConErrResPuts (STRING_FREE_ERROR1); - free (first); - free (rest); - free (full); - free (szFullName); + cmd_free (first); + cmd_free (rest); + cmd_free (full); + cmd_free (szFullName); nErrorLevel = 1; return; } @@ -468,10 +466,10 @@ if (!SearchForExecutable (first, szFullName)) { error_bad_command (); - free (first); - free (rest); - free (full); - free (szFullName); + cmd_free (first); + cmd_free (rest); + cmd_free (full); + cmd_free (szFullName); nErrorLevel = 1; return; @@ -572,10 +570,10 @@ OutputCodePage = GetConsoleOutputCP(); SetConsoleTitle (szWindowTitle); - free(first); - free(rest); - free(full); - free (szFullName); + cmd_free(first); + cmd_free(rest); + cmd_free(full); + cmd_free (szFullName); } @@ -602,7 +600,7 @@ DebugPrintf (_T("DoCommand: (\'%s\')\n"), line); #endif /* DEBUG */ - com = malloc( (_tcslen(line) +512)*sizeof(TCHAR) ); + com = cmd_alloc( (_tcslen(line) +512)*sizeof(TCHAR) ); if (com == NULL) { error_out_of_memory(); @@ -646,7 +644,7 @@ if(_tcslen(com) > MAX_PATH) { error_bad_command(); - free(com); + cmd_free(com); return; } */ @@ -700,7 +698,7 @@ } } } - free(com); + cmd_free(com); } @@ -1124,8 +1122,8 @@ return TRUE; *retlen = needed; if ( *ret ) - free ( *ret ); - *ret = (LPTSTR)malloc ( *retlen * sizeof(TCHAR) ); + cmd_free ( *ret ); + *ret = (LPTSTR)cmd_alloc ( *retlen * sizeof(TCHAR) ); if ( !*ret ) SetLastError ( ERROR_OUTOFMEMORY ); return *ret != NULL; Modified: trunk/reactos/base/shell/cmd/cmd.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.h (original) +++ trunk/reactos/base/shell/cmd/cmd.h Wed Aug 1 14:17:13 2007 @@ -30,6 +30,8 @@ #include <tchar.h> #include "cmdver.h" + +#include "cmddbg.h" #define BREAK_BATCHFILE 1 #define BREAK_OUTOFBATCH 2 Modified: trunk/reactos/base/shell/cmd/cmd.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.rbuild?…
============================================================================== --- trunk/reactos/base/shell/cmd/cmd.rbuild (original) +++ trunk/reactos/base/shell/cmd/cmd.rbuild Wed Aug 1 14:17:13 2007 @@ -17,6 +17,7 @@ <file>choice.c</file> <file>cls.c</file> <file>cmd.c</file> + <file>cmddbg.c</file> <file>cmdinput.c</file> <file>cmdtable.c</file> <file>color.c</file> Added: trunk/reactos/base/shell/cmd/cmddbg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmddbg.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/cmddbg.c (added) +++ trunk/reactos/base/shell/cmd/cmddbg.c Wed Aug 1 14:17:13 2007 @@ -1,0 +1,140 @@ +#include <precomp.h> + +#ifdef _DEBUG + +#define REDZONE_SIZE 32 +#define REDZONE_LEFT 0x78 +#define REDZONE_RIGHT 0x87 + +typedef struct +{ + size_t size; + const char *file; + int line; +} alloc_info, *palloc_info; + +static void * +get_base_ptr(void *ptr) +{ + return (void *)((UINT_PTR)ptr - REDZONE_SIZE - sizeof(alloc_info)); +} + +static void * +write_redzone(void *ptr, size_t size, const char *file, int line) +{ + void *ret; + palloc_info info = (palloc_info)ptr; + + info->size = size; + info->file = file; + info->line = line; + + ptr = (void *)(info + 1); + memset(ptr, REDZONE_LEFT, REDZONE_SIZE); + ret = (void *)((size_t)ptr + REDZONE_SIZE); + ptr = (void *)((size_t)ret + size); + memset(ptr, REDZONE_RIGHT, REDZONE_SIZE); + return ret; +} + +static int +check_redzone_region(void *ptr, unsigned char sig, void **newptr) +{ + unsigned char *p, *q; + int ret = 1; + + p = (unsigned char *)ptr; + q = p + REDZONE_SIZE; + while (p != q) + { + if (*(p++) != sig) + ret = 0; + } + + if (newptr != NULL) + *newptr = p; + return ret; +} + +static void +redzone_err(const char *msg, palloc_info info, void *ptr, const char *file, int line) +{ + DbgPrint("CMD: %s\n", msg); + DbgPrint(" Block: 0x%p Size: %lu\n", ptr, info->size); + DbgPrint(" Allocated from %s:%d\n", info->file, info->line); + DbgPrint(" Called from: %s:%d\n", file, line); + ExitProcess(1); +} + +static void +check_redzone(void *ptr, const char *file, int line) +{ + palloc_info info = (palloc_info)ptr; + ptr = (void *)(info + 1); + if (!check_redzone_region(ptr, REDZONE_LEFT, &ptr)) + redzone_err("Detected buffer underflow!", info, ptr, file, line); + ptr = (void *)((UINT_PTR)ptr + info->size); + if (!check_redzone_region(ptr, REDZONE_RIGHT, NULL)) + redzone_err("Detected buffer overflow!", info, ptr, file, line); +} + +static size_t +calculate_size_with_redzone(size_t size) +{ + return sizeof(alloc_info) + size + (2 * REDZONE_SIZE); +} + +void * +cmd_alloc_dbg(size_t size, const char *file, int line) +{ + void *newptr = NULL; + + newptr = malloc(calculate_size_with_redzone(size)); + if (newptr != NULL) + newptr = write_redzone(newptr, size, file, line); + + return newptr; +} + +void * +cmd_realloc_dbg(void *ptr, size_t size, const char *file, int line) +{ + void *newptr = NULL; + + if (ptr == NULL) + return cmd_alloc_dbg(size, file, line); + if (size == 0) + { + cmd_free_dbg(ptr, file, line); + return NULL; + } + + ptr = get_base_ptr(ptr); + check_redzone(ptr, file, line); + + newptr = realloc(ptr, calculate_size_with_redzone(size)); + if (newptr != NULL) + newptr = write_redzone(newptr, size, file, line); + + return newptr; +} + +void +cmd_free_dbg(void *ptr, const char *file, int line) +{ + if (ptr != NULL) + { + ptr = get_base_ptr(ptr); + check_redzone(ptr, file, line); + } + + free(ptr); +} + +void +cmd_exit(int code) +{ + ExitProcess(code); +} + +#endif /* _DEBUG */ Propchange: trunk/reactos/base/shell/cmd/cmddbg.c ------------------------------------------------------------------------------ svn:eol-style = native Added: trunk/reactos/base/shell/cmd/cmddbg.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmddbg.h?re…
============================================================================== --- trunk/reactos/base/shell/cmd/cmddbg.h (added) +++ trunk/reactos/base/shell/cmd/cmddbg.h Wed Aug 1 14:17:13 2007 @@ -1,0 +1,22 @@ +#ifdef _DEBUG + +#define cmd_alloc(size) cmd_alloc_dbg(size, __FILE__, __LINE__) +#define cmd_realloc(ptr,size) cmd_realloc_dbg(ptr, size, __FILE__, __LINE__) +#define cmd_free(ptr) cmd_free_dbg(ptr, __FILE__, __LINE__) + +void * +cmd_alloc_dbg(size_t size, const char *file, int line); + +void * +cmd_realloc_dbg(void *ptr, size_t size, const char *file, int line); + +void +cmd_free_dbg(void *ptr, const char *file, int line); + +#else + +#define cmd_alloc(size) malloc(size) +#define cmd_realloc(ptr,size) realloc(ptr, size) +#define cmd_free(ptr) free(ptr) + +#endif Propchange: trunk/reactos/base/shell/cmd/cmddbg.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/shell/cmd/cmdinput.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdinput.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/cmdinput.c (original) +++ trunk/reactos/base/shell/cmd/cmdinput.c Wed Aug 1 14:17:13 2007 @@ -98,7 +98,6 @@ */ #include <precomp.h> -#include "resource.h" SHORT maxx; Modified: trunk/reactos/base/shell/cmd/cmdtable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmdtable.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/cmdtable.c (original) +++ trunk/reactos/base/shell/cmd/cmdtable.c Wed Aug 1 14:17:13 2007 @@ -18,7 +18,6 @@ */ #include <precomp.h> -#include "resource.h" /* a list of all the internal commands, associating their command names */ Modified: trunk/reactos/base/shell/cmd/color.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/color.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/color.c (original) +++ trunk/reactos/base/shell/cmd/color.c Wed Aug 1 14:17:13 2007 @@ -21,7 +21,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_COLOR 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 (original) +++ trunk/reactos/base/shell/cmd/console.c Wed Aug 1 14:17:13 2007 @@ -17,10 +17,7 @@ * Fixed ConPrintfPaging */ - - #include <precomp.h> -#include "resource.h" #define OUTPUT_BUFFER_SIZE 4096 @@ -103,7 +100,7 @@ PCHAR pBuf; #ifdef _UNICODE - pBuf = (PCHAR)malloc(dwLength); + pBuf = (PCHAR)cmd_alloc(dwLength); #else pBuf = lpInput; #endif @@ -129,7 +126,7 @@ } #ifdef _UNICODE - free(pBuf); + cmd_free(pBuf); #endif SetConsoleMode (hFile, dwOldMode); @@ -169,7 +166,7 @@ len = _tcslen(szText); #ifdef _UNICODE - pBuf = malloc(len + 1); + pBuf = cmd_alloc(len + 1); len = WideCharToMultiByte( OutputCodePage, 0, szText, len + 1, pBuf, len + 1, NULL, NULL) - 1; #else pBuf = szText; @@ -185,7 +182,7 @@ &dwWritten, NULL); #ifdef _UNICODE - free(pBuf); + cmd_free(pBuf); #endif } @@ -219,7 +216,7 @@ len = _vstprintf (szOut, szFormat, arg_ptr); #ifdef _UNICODE - pBuf = malloc(len + 1); + pBuf = cmd_alloc(len + 1); len = WideCharToMultiByte( OutputCodePage, 0, szOut, len + 1, pBuf, len + 1, NULL, NULL) - 1; #else pBuf = szOut; @@ -233,7 +230,7 @@ #ifdef _UNICODE - free(pBuf); + cmd_free(pBuf); #endif } @@ -287,7 +284,7 @@ len = _vstprintf (szOut, szFormat, arg_ptr); #ifdef _UNICODE - pBuf = malloc(len + 1); + pBuf = cmd_alloc(len + 1); len = WideCharToMultiByte( OutputCodePage, 0, szOut, len + 1, pBuf, len + 1, NULL, NULL) - 1; #else pBuf = szOut; @@ -311,7 +308,7 @@ if(PagePrompt() != PROMPT_YES) { #ifdef _UNICODE - free(pBuf); + cmd_free(pBuf); #endif return 1; } @@ -323,7 +320,7 @@ } #ifdef _UNICODE - free(pBuf); + cmd_free(pBuf); #endif return 0; } Modified: trunk/reactos/base/shell/cmd/copy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/copy.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/copy.c (original) +++ trunk/reactos/base/shell/cmd/copy.c Wed Aug 1 14:17:13 2007 @@ -32,7 +32,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_COPY @@ -264,7 +263,7 @@ { ConOutResPuts(STRING_COPY_ERROR3); - free (buffer); + cmd_free (buffer); CloseHandle (hFileDest); CloseHandle (hFileSrc); nErrorLevel = 1; @@ -375,7 +374,7 @@ nErrorLevel = 0; /* Get the envor value if it exists */ - evar = malloc(512 * sizeof(TCHAR)); + evar = cmd_alloc(512 * sizeof(TCHAR)); if (evar==NULL) size = 0; else { @@ -383,7 +382,7 @@ } if (size > 512) { - evar = realloc(evar,size * sizeof(TCHAR) ); + evar = cmd_realloc(evar,size * sizeof(TCHAR) ); if (evar!=NULL) { size = GetEnvironmentVariable (_T("COPYCMD"), evar, size); @@ -449,7 +448,7 @@ } } } - free(evar); + cmd_free(evar); /*Split the user input into array*/ @@ -873,7 +872,7 @@ FindClose(hFile); if (arg!=NULL) - free(arg); + cmd_free(arg); return 0; } Modified: trunk/reactos/base/shell/cmd/date.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/date.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/date.c (original) +++ trunk/reactos/base/shell/cmd/date.c Wed Aug 1 14:17:13 2007 @@ -32,7 +32,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_DATE Modified: trunk/reactos/base/shell/cmd/del.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/del.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/del.c (original) +++ trunk/reactos/base/shell/cmd/del.c Wed Aug 1 14:17:13 2007 @@ -46,7 +46,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_DEL Modified: trunk/reactos/base/shell/cmd/delay.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/delay.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/delay.c (original) +++ trunk/reactos/base/shell/cmd/delay.c Wed Aug 1 14:17:13 2007 @@ -10,7 +10,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_DELAY Modified: trunk/reactos/base/shell/cmd/dir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/dir.c (original) +++ trunk/reactos/base/shell/cmd/dir.c Wed Aug 1 14:17:13 2007 @@ -135,7 +135,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_DIR @@ -365,19 +364,19 @@ cCurSwitch = _T(' '); if(ptrStart && ptrEnd) { - temp = malloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + temp = cmd_alloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); if(!temp) return FALSE; memcpy(temp, ptrStart, (ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); temp[(ptrEnd - ptrStart + 1)] = _T('\0'); if(!add_entry(entries, params, temp)) { - free(temp); + cmd_free(temp); freep(*params); return FALSE; } - free(temp); + cmd_free(temp); ptrStart = NULL; ptrEnd = NULL; @@ -397,19 +396,19 @@ /* Process a character for parameter */ if ((cCurSwitch == _T(' ')) && ptrStart && ptrEnd) { - temp = malloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); + temp = cmd_alloc((ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); if(!temp) return FALSE; memcpy(temp, ptrStart, (ptrEnd - ptrStart) + 2 * sizeof (TCHAR)); temp[(ptrEnd - ptrStart + 1)] = _T('\0'); if(!add_entry(entries, params, temp)) { - free(temp); + cmd_free(temp); freep(*params); return FALSE; } - free(temp); + cmd_free(temp); ptrStart = NULL; ptrEnd = NULL; @@ -568,19 +567,19 @@ /* Terminate the parameters */ if(ptrStart && ptrEnd) { - temp = malloc((ptrEnd - ptrStart + 2) * sizeof(TCHAR)); + temp = cmd_alloc((ptrEnd - ptrStart + 2) * sizeof(TCHAR)); if(!temp) return FALSE; memcpy(temp, ptrStart, (ptrEnd - ptrStart + 1) * sizeof(TCHAR)); temp[(ptrEnd - ptrStart + 1)] = _T('\0'); if(!add_entry(entries, params, temp)) { - free(temp); + cmd_free(temp); freep(*params); return FALSE; } - free(temp); + cmd_free(temp); ptrStart = NULL; ptrEnd = NULL; @@ -1770,7 +1769,7 @@ _tcscat (szFullFileSpec, szFilespec); /* Prepare the linked list, first node is allocated */ - ptrStartNode = malloc(sizeof(DIRFINDLISTNODE)); + ptrStartNode = cmd_alloc(sizeof(DIRFINDLISTNODE)); if (ptrStartNode == NULL) { #ifdef _DEBUG @@ -1790,7 +1789,7 @@ if ((wfdFileInfo.dwFileAttributes & lpFlags->stAttribs.dwAttribMask ) == (lpFlags->stAttribs.dwAttribMask & lpFlags->stAttribs.dwAttribVal )) { - ptrNextNode->ptrNext = malloc(sizeof(DIRFINDLISTNODE)); + ptrNextNode->ptrNext = cmd_alloc(sizeof(DIRFINDLISTNODE)); if (ptrNextNode->ptrNext == NULL) { #ifdef _DEBUG @@ -1799,14 +1798,14 @@ while (ptrStartNode) { ptrNextNode = ptrStartNode->ptrNext; - free(ptrStartNode); + cmd_free(ptrStartNode); ptrStartNode = ptrNextNode; dwCount --; } return 1; } - /* If malloc fails we go to next file in hope it works, + /* If cmd_alloc fails we go to next file in hope it works, without braking the linked list! */ if (ptrNextNode->ptrNext) { @@ -1850,7 +1849,7 @@ ptrNextNode->ptrNext = NULL; /* Calculate and allocate space need for making an array of pointers */ - ptrFileArray = malloc(sizeof(LPWIN32_FIND_DATA) * dwCount); + ptrFileArray = cmd_alloc(sizeof(LPWIN32_FIND_DATA) * dwCount); if (ptrFileArray == NULL) { #ifdef _DEBUG @@ -1859,7 +1858,7 @@ while (ptrStartNode) { ptrNextNode = ptrStartNode->ptrNext; - free(ptrStartNode); + cmd_free(ptrStartNode); ptrStartNode = ptrNextNode; dwCount --; } @@ -1887,7 +1886,7 @@ DirPrintFiles(ptrFileArray, dwCount, szFullPath, lpFlags); /* Free array */ - free(ptrFileArray); + cmd_free(ptrFileArray); if (CheckCtrlBreak(BREAK_INPUT)) return 1; @@ -1933,7 +1932,7 @@ while (ptrStartNode) { ptrNextNode = ptrStartNode->ptrNext; - free(ptrStartNode); + cmd_free(ptrStartNode); ptrStartNode = ptrNextNode; dwCount --; } Modified: trunk/reactos/base/shell/cmd/dirstack.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dirstack.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/dirstack.c (original) +++ trunk/reactos/base/shell/cmd/dirstack.c Wed Aug 1 14:17:13 2007 @@ -15,7 +15,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef FEATURE_DIRECTORY_STACK @@ -39,7 +38,7 @@ nErrorLevel = 0; - lpDir = (LPDIRENTRY)malloc (sizeof (DIRENTRY)); + lpDir = (LPDIRENTRY)cmd_alloc (sizeof (DIRENTRY)); if (!lpDir) { error_out_of_memory (); @@ -59,10 +58,10 @@ } lpStackTop = lpDir; - lpDir->pszPath = (LPTSTR)malloc ((_tcslen(pszPath)+1)*sizeof(TCHAR)); + lpDir->pszPath = (LPTSTR)cmd_alloc ((_tcslen(pszPath)+1)*sizeof(TCHAR)); if (!lpDir->pszPath) { - free (lpDir); + cmd_free (lpDir); error_out_of_memory (); return -1; } @@ -92,8 +91,8 @@ else lpStackBottom = NULL; - free (lpDir->pszPath); - free (lpDir); + cmd_free (lpDir->pszPath); + cmd_free (lpDir); nStackDepth--; } Modified: trunk/reactos/base/shell/cmd/echo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/echo.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/echo.c (original) +++ trunk/reactos/base/shell/cmd/echo.c Wed Aug 1 14:17:13 2007 @@ -27,7 +27,6 @@ */ #include <precomp.h> -#include "resource.h" INT CommandEcho (LPTSTR cmd, LPTSTR param) Modified: trunk/reactos/base/shell/cmd/error.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/error.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/error.c (original) +++ trunk/reactos/base/shell/cmd/error.c Wed Aug 1 14:17:13 2007 @@ -21,7 +21,6 @@ */ #include <precomp.h> -#include "resource.h" VOID ErrorMessage (DWORD dwErrorCode, LPTSTR szFormat, ...) Modified: trunk/reactos/base/shell/cmd/filecomp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/filecomp.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/filecomp.c (original) +++ trunk/reactos/base/shell/cmd/filecomp.c Wed Aug 1 14:17:13 2007 @@ -21,7 +21,6 @@ */ #include <precomp.h> -#include "cmd.h" #ifdef FEATURE_UNIX_FILENAME_COMPLETION @@ -490,8 +489,8 @@ FileName * File2; INT ret; - File1 = malloc(sizeof(FileName)); - File2 = malloc(sizeof(FileName)); + File1 = cmd_alloc(sizeof(FileName)); + File2 = cmd_alloc(sizeof(FileName)); if(!File1 || !File2) return 0; @@ -501,8 +500,8 @@ /* ret = _tcsicmp(File1->Name, File2->Name); */ ret = lstrcmpi(File1->Name, File2->Name); - free(File1); - free(File2); + cmd_free(File1); + cmd_free(File2); return ret; } @@ -628,7 +627,7 @@ } /* Add the file to the list of files */ - FileList = realloc(FileList, ++FileListSize * sizeof(FileName)); + FileList = cmd_realloc(FileList, ++FileListSize * sizeof(FileName)); if(FileList == NULL) { @@ -651,7 +650,7 @@ { _tcscpy(strOut,szOrginal); if(FileList != NULL) - free(FileList); + cmd_free(FileList); return; } @@ -741,7 +740,7 @@ EndLength = _tcslen(strOut); DiffLength = EndLength - StartLength; if(FileList != NULL) - free(FileList); + cmd_free(FileList); } #endif Modified: trunk/reactos/base/shell/cmd/for.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/for.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/for.c (original) +++ trunk/reactos/base/shell/cmd/for.c Wed Aug 1 14:17:13 2007 @@ -31,7 +31,6 @@ */ #include <precomp.h> -#include "resource.h" /* @@ -126,7 +125,7 @@ } /* OK all is correct, build a bcontext.... */ - lpNew = (LPBATCH_CONTEXT)malloc (sizeof (BATCH_CONTEXT)); + lpNew = (LPBATCH_CONTEXT)cmd_alloc (sizeof (BATCH_CONTEXT)); lpNew->prev = bc; bc = lpNew; Modified: trunk/reactos/base/shell/cmd/free.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/free.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/free.c (original) +++ trunk/reactos/base/shell/cmd/free.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_FREE Modified: trunk/reactos/base/shell/cmd/goto.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/goto.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/goto.c (original) +++ trunk/reactos/base/shell/cmd/goto.c Wed Aug 1 14:17:13 2007 @@ -27,7 +27,6 @@ */ #include <precomp.h> -#include "resource.h" /* Modified: trunk/reactos/base/shell/cmd/history.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/history.c?r…
============================================================================== --- trunk/reactos/base/shell/cmd/history.c (original) +++ trunk/reactos/base/shell/cmd/history.c Wed Aug 1 14:17:13 2007 @@ -139,8 +139,8 @@ { size=0; - Top = malloc(sizeof(HIST_ENTRY)); - Bottom = malloc(sizeof(HIST_ENTRY)); + Top = cmd_alloc(sizeof(HIST_ENTRY)); + Bottom = cmd_alloc(sizeof(HIST_ENTRY)); Top->prev = Bottom; Top->next = NULL; @@ -161,8 +161,8 @@ while (Bottom->next!=Top) del(Bottom->next); - free(Top); - free(Bottom); + cmd_free(Top); + cmd_free(Bottom); } @@ -204,13 +204,13 @@ /*free string's mem*/ if (item->string) - free(item->string); + cmd_free(item->string); /*set links in prev and next item*/ item->next->prev=item->prev; item->prev->next=item->next; - free(item); + cmd_free(item); size--; } @@ -233,8 +233,8 @@ return; /*allocte entry and string*/ - tmp=malloc(sizeof(HIST_ENTRY)); - tmp->string=malloc((_tcslen(string)+1)*sizeof(TCHAR)); + tmp=cmd_alloc(sizeof(HIST_ENTRY)); + tmp->string=cmd_alloc((_tcslen(string)+1)*sizeof(TCHAR)); _tcscpy(tmp->string,string); /*set links*/ @@ -280,7 +280,7 @@ /*fill bottom with string, it will become Bottom->next*/ - Bottom->string=malloc((_tcslen(string)+1)*sizeof(TCHAR)); + Bottom->string=cmd_alloc((_tcslen(string)+1)*sizeof(TCHAR)); _tcscpy(Bottom->string,string); /*save Bottom value*/ @@ -288,7 +288,7 @@ /*create new void Bottom*/ - Bottom=malloc(sizeof(HIST_ENTRY)); + Bottom=cmd_alloc(sizeof(HIST_ENTRY)); Bottom->next=tmp; Bottom->prev=NULL; Bottom->string=NULL; @@ -401,7 +401,7 @@ /*first time History is called allocate mem*/ if (!history) { - history = malloc (history_size * sizeof (TCHAR)); + history = cmd_alloc (history_size * sizeof (TCHAR)); lines[0] = history; history[0] = 0; } Modified: trunk/reactos/base/shell/cmd/if.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/if.c?rev=28…
============================================================================== --- trunk/reactos/base/shell/cmd/if.c (original) +++ trunk/reactos/base/shell/cmd/if.c Wed Aug 1 14:17:13 2007 @@ -31,7 +31,6 @@ */ #include <precomp.h> -#include "resource.h" #define X_EXEC 1 Modified: trunk/reactos/base/shell/cmd/internal.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/internal.c?…
============================================================================== --- trunk/reactos/base/shell/cmd/internal.c (original) +++ trunk/reactos/base/shell/cmd/internal.c Wed Aug 1 14:17:13 2007 @@ -138,7 +138,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_CHDIR @@ -154,7 +153,7 @@ VOID FreeLastPath (VOID) { if (lpLastPath) - free (lpLastPath); + cmd_free (lpLastPath); } /* help functions for getting current path from drive @@ -766,11 +765,11 @@ /* If a param was send, display help of correspondent command */ if (_tcslen(param)) { - LPTSTR NewCommand = malloc((_tcslen(param)+4)*sizeof(TCHAR)); + LPTSTR NewCommand = cmd_alloc((_tcslen(param)+4)*sizeof(TCHAR)); _tcscpy(NewCommand, param); _tcscat(NewCommand, _T(" /?")); DoCommand(NewCommand); - free(NewCommand); + cmd_free(NewCommand); } /* Else, display detailed commands list */ else Modified: trunk/reactos/base/shell/cmd/label.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/label.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/label.c (original) +++ trunk/reactos/base/shell/cmd/label.c Wed Aug 1 14:17:13 2007 @@ -18,7 +18,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_LABEL Modified: trunk/reactos/base/shell/cmd/locale.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/locale.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/locale.c (original) +++ trunk/reactos/base/shell/cmd/locale.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" TCHAR cDateSeparator; Modified: trunk/reactos/base/shell/cmd/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/main.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/main.c (original) +++ trunk/reactos/base/shell/cmd/main.c Wed Aug 1 14:17:13 2007 @@ -1,5 +1,4 @@ #include <precomp.h> -#include "resource.h" #ifdef _UNICODE extern int _main (void); Modified: trunk/reactos/base/shell/cmd/memory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/memory.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/memory.c (original) +++ trunk/reactos/base/shell/cmd/memory.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_MEMORY Modified: trunk/reactos/base/shell/cmd/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/misc.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/misc.c (original) +++ trunk/reactos/base/shell/cmd/misc.c Wed Aug 1 14:17:13 2007 @@ -33,7 +33,6 @@ */ #include <precomp.h> -#include "resource.h" /* @@ -200,7 +199,7 @@ LPTSTR q; LPTSTR *oldarg; - q = malloc ((_tcslen(entry) + 1) * sizeof (TCHAR)); + q = cmd_alloc ((_tcslen(entry) + 1) * sizeof (TCHAR)); if (NULL == q) { return FALSE; @@ -208,7 +207,7 @@ _tcscpy (q, entry); oldarg = *arg; - *arg = realloc (oldarg, (*ac + 2) * sizeof (LPTSTR)); + *arg = cmd_realloc (oldarg, (*ac + 2) * sizeof (LPTSTR)); if (NULL == *arg) { *arg = oldarg; @@ -233,7 +232,7 @@ pathend = _tcsrchr (pattern, _T('\\')); if (NULL != pathend) { - dirpart = malloc((pathend - pattern + 2) * sizeof(TCHAR)); + dirpart = cmd_alloc((pathend - pattern + 2) * sizeof(TCHAR)); if (NULL == dirpart) { return FALSE; @@ -252,7 +251,7 @@ { if (NULL != dirpart) { - fullname = malloc((_tcslen(dirpart) + _tcslen(FindData.cFileName) + 1) * sizeof(TCHAR)); + fullname = cmd_alloc((_tcslen(dirpart) + _tcslen(FindData.cFileName) + 1) * sizeof(TCHAR)); if (NULL == fullname) { ok = FALSE; @@ -261,7 +260,7 @@ { _tcscat (_tcscpy (fullname, dirpart), FindData.cFileName); ok = add_entry(ac, arg, fullname); - free (fullname); + cmd_free (fullname); } } else @@ -278,7 +277,7 @@ if (NULL != dirpart) { - free (dirpart); + cmd_free (dirpart); } return ok; @@ -298,7 +297,7 @@ INT len; BOOL bQuoted = FALSE; - arg = malloc (sizeof (LPTSTR)); + arg = cmd_alloc (sizeof (LPTSTR)); if (!arg) return NULL; *arg = NULL; @@ -338,7 +337,7 @@ /* a word was found */ if (s != start) { - q = malloc (((len = s - start) + 1) * sizeof (TCHAR)); + q = cmd_alloc (((len = s - start) + 1) * sizeof (TCHAR)); if (!q) { return NULL; @@ -350,7 +349,7 @@ { if (! expand(&ac, &arg, q)) { - free (q); + cmd_free (q); freep (arg); return NULL; } @@ -359,12 +358,12 @@ { if (! add_entry(&ac, &arg, q)) { - free (q); + cmd_free (q); freep (arg); return NULL; } } - free (q); + cmd_free (q); } /* adjust string pointer if quoted (") */ @@ -400,9 +399,9 @@ q = p; while (*q) - free(*q++); - - free(p); + cmd_free(*q++); + + cmd_free(p); } @@ -457,7 +456,7 @@ DWORD dwRead; INT len; #ifdef _UNICODE - lpString = malloc(nBufferLength); + lpString = cmd_alloc(nBufferLength); #else lpString = lpBuffer; #endif @@ -479,7 +478,7 @@ lpString[len++] = _T('\0'); #ifdef _UNICODE MultiByteToWideChar(CP_ACP, 0, lpString, len, lpBuffer, len); - free(lpString); + cmd_free(lpString); #endif return TRUE; } Modified: trunk/reactos/base/shell/cmd/move.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/move.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/move.c (original) +++ trunk/reactos/base/shell/cmd/move.c Wed Aug 1 14:17:13 2007 @@ -30,7 +30,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_MOVE Modified: trunk/reactos/base/shell/cmd/msgbox.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/msgbox.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/msgbox.c (original) +++ trunk/reactos/base/shell/cmd/msgbox.c Wed Aug 1 14:17:13 2007 @@ -11,7 +11,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_MSGBOX Modified: trunk/reactos/base/shell/cmd/path.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/path.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/path.c (original) +++ trunk/reactos/base/shell/cmd/path.c Wed Aug 1 14:17:13 2007 @@ -26,7 +26,6 @@ * Remove all hardcode string to En.rc */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_PATH @@ -52,7 +51,7 @@ LPTSTR pszBuffer; TCHAR szMsg[RC_STRING_MAX_SIZE]; - pszBuffer = (LPTSTR)malloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); + pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); dwBuffer = GetEnvironmentVariable (_T("PATH"), pszBuffer, ENV_BUFFER_SIZE); if (dwBuffer == 0) { @@ -62,12 +61,12 @@ } else if (dwBuffer > ENV_BUFFER_SIZE) { - pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); + pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); GetEnvironmentVariable (_T("PATH"), pszBuffer, ENV_BUFFER_SIZE); } ConOutPrintf (_T("PATH=%s\n"), pszBuffer); - free (pszBuffer); + cmd_free (pszBuffer); return 0; } Modified: trunk/reactos/base/shell/cmd/pause.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/pause.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/pause.c (original) +++ trunk/reactos/base/shell/cmd/pause.c Wed Aug 1 14:17:13 2007 @@ -18,7 +18,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_PAUSE Modified: trunk/reactos/base/shell/cmd/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/precomp.h?r…
============================================================================== --- trunk/reactos/base/shell/cmd/precomp.h (original) +++ trunk/reactos/base/shell/cmd/precomp.h Wed Aug 1 14:17:13 2007 @@ -5,6 +5,7 @@ #endif//_MSC_VER #include <stdlib.h> +#include <malloc.h> #define WIN32_NO_STATUS #include <windows.h> #include <winnt.h> @@ -23,7 +24,11 @@ #define NTOS_MODE_USER #include <ndk/ntndk.h> +#include "resource.h" + #include "cmd.h" #include "config.h" #include "batch.h" +#include <reactos/resource.h> + Modified: trunk/reactos/base/shell/cmd/prompt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/prompt.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/prompt.c (original) +++ trunk/reactos/base/shell/cmd/prompt.c Wed Aug 1 14:17:13 2007 @@ -47,7 +47,6 @@ * Remove all hardcode string to En.rc */ #include <precomp.h> -#include "resource.h" /* * print the command-line prompt Modified: trunk/reactos/base/shell/cmd/ren.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/ren.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/ren.c (original) +++ trunk/reactos/base/shell/cmd/ren.c Wed Aug 1 14:17:13 2007 @@ -21,7 +21,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_RENAME Modified: trunk/reactos/base/shell/cmd/screen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/screen.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/screen.c (original) +++ trunk/reactos/base/shell/cmd/screen.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_SCREEN Modified: trunk/reactos/base/shell/cmd/set.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/set.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/set.c (original) +++ trunk/reactos/base/shell/cmd/set.c Wed Aug 1 14:17:13 2007 @@ -5,7 +5,7 @@ * History: * * 06/14/97 (Tim Norman) - * changed static var in set() to a malloc'd space to pass to putenv. + * changed static var in set() to a cmd_alloc'd space to pass to putenv. * need to find a better way to do this, since it seems it is wasting * memory when variables are redefined. * @@ -35,9 +35,6 @@ */ #include <precomp.h> -#include <malloc.h> -#include <stdio.h> -#include "resource.h" #ifdef INCLUDE_CMD_SET @@ -141,7 +138,7 @@ LPTSTR pszBuffer; DWORD dwBuffer; - pszBuffer = (LPTSTR)malloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); + pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); dwBuffer = GetEnvironmentVariable (param, pszBuffer, ENV_BUFFER_SIZE); if (dwBuffer == 0) { @@ -151,12 +148,12 @@ } else if (dwBuffer > ENV_BUFFER_SIZE) { - pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); + pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); GetEnvironmentVariable (param, pszBuffer, dwBuffer); } ConOutPrintf (_T("%s\n"), pszBuffer); - free (pszBuffer); + cmd_free (pszBuffer); return 0; } Modified: trunk/reactos/base/shell/cmd/shift.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/shift.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/shift.c (original) +++ trunk/reactos/base/shell/cmd/shift.c Wed Aug 1 14:17:13 2007 @@ -24,7 +24,6 @@ */ #include <precomp.h> -#include "resource.h" /* Modified: trunk/reactos/base/shell/cmd/start.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/start.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/start.c (original) +++ trunk/reactos/base/shell/cmd/start.c Wed Aug 1 14:17:13 2007 @@ -12,7 +12,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_START @@ -90,7 +89,7 @@ freep (arg); /* get comspec */ - comspec = malloc ( MAX_PATH * sizeof(TCHAR)); + comspec = cmd_alloc ( MAX_PATH * sizeof(TCHAR)); if (comspec == NULL) { error_out_of_memory(); @@ -109,7 +108,7 @@ { if (size > MAX_PATH) { - comspec = realloc(comspec,size * sizeof(TCHAR) ); + comspec = cmd_realloc(comspec,size * sizeof(TCHAR) ); if (comspec==NULL) { return 1; @@ -127,21 +126,21 @@ _tcscat(RestWithoutArgs,_T("\"")); } - rest = malloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR)); + rest = cmd_alloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR)); if (rest == NULL) { if(comspec != NULL) - free(comspec); + cmd_free(comspec); error_out_of_memory(); return 1; } - param =malloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR)); + param =cmd_alloc ( (_tcslen(RestWithoutArgs) + 1) * sizeof(TCHAR)); if (rest == NULL) { if(comspec != NULL) - free(comspec); - free(rest); + cmd_free(comspec); + cmd_free(rest); error_out_of_memory(); return 1; } @@ -210,12 +209,12 @@ ConErrResPuts (STRING_FREE_ERROR1); if (rest != NULL) - free(rest); + cmd_free(rest); if (param != NULL) - free(param); + cmd_free(param); if (comspec != NULL) - free(comspec); + cmd_free(comspec); return 0; } @@ -226,13 +225,13 @@ error_bad_command (); if (rest != NULL) - free(rest); + cmd_free(rest); if (param != NULL) - free(param); + cmd_free(param); if (comspec != NULL) - free(comspec); + cmd_free(comspec); return 1; } @@ -314,13 +313,13 @@ if (rest != NULL) - free(rest); + cmd_free(rest); if (param != NULL) - free(param); + cmd_free(param); if (comspec != NULL) - free(comspec); + cmd_free(comspec); return 0; } Modified: trunk/reactos/base/shell/cmd/time.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/time.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/time.c (original) +++ trunk/reactos/base/shell/cmd/time.c Wed Aug 1 14:17:13 2007 @@ -25,7 +25,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_TIME Modified: trunk/reactos/base/shell/cmd/timer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/timer.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/timer.c (original) +++ trunk/reactos/base/shell/cmd/timer.c Wed Aug 1 14:17:13 2007 @@ -8,7 +8,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_TIMER Modified: trunk/reactos/base/shell/cmd/title.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/title.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/title.c (original) +++ trunk/reactos/base/shell/cmd/title.c Wed Aug 1 14:17:13 2007 @@ -10,7 +10,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_TITLE Modified: trunk/reactos/base/shell/cmd/type.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/type.c?rev=…
============================================================================== --- trunk/reactos/base/shell/cmd/type.c (original) +++ trunk/reactos/base/shell/cmd/type.c Wed Aug 1 14:17:13 2007 @@ -27,7 +27,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_TYPE Modified: trunk/reactos/base/shell/cmd/ver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/ver.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/ver.c (original) +++ trunk/reactos/base/shell/cmd/ver.c Wed Aug 1 14:17:13 2007 @@ -22,8 +22,6 @@ */ #include <precomp.h> -#include "resource.h" -#include <reactos/resource.h> VOID ShortVersion (VOID) Modified: trunk/reactos/base/shell/cmd/verify.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/verify.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/verify.c (original) +++ trunk/reactos/base/shell/cmd/verify.c Wed Aug 1 14:17:13 2007 @@ -19,7 +19,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_VERIFY Modified: trunk/reactos/base/shell/cmd/vol.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/vol.c?rev=2…
============================================================================== --- trunk/reactos/base/shell/cmd/vol.c (original) +++ trunk/reactos/base/shell/cmd/vol.c Wed Aug 1 14:17:13 2007 @@ -21,7 +21,6 @@ */ #include <precomp.h> -#include "resource.h" #ifdef INCLUDE_CMD_VOL Modified: trunk/reactos/base/shell/cmd/where.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/where.c?rev…
============================================================================== --- trunk/reactos/base/shell/cmd/where.c (original) +++ trunk/reactos/base/shell/cmd/where.c Wed Aug 1 14:17:13 2007 @@ -151,11 +151,11 @@ /* load environment varable PATH into buffer */ - pszBuffer = (LPTSTR)malloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); + pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); dwBuffer = GetEnvironmentVariable (_T("PATH"), pszBuffer, ENV_BUFFER_SIZE); if (dwBuffer > ENV_BUFFER_SIZE) { - pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); + pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); GetEnvironmentVariable (_T("PATH"), pszBuffer, dwBuffer); } @@ -194,12 +194,12 @@ #ifdef _DEBUG DebugPrintf (_T("Found: \'%s\'\n"), szPathBuffer); #endif - free (pszBuffer); + cmd_free (pszBuffer); _tcscpy (pFullName, szPathBuffer); return TRUE; } } - free (pszBuffer); + cmd_free (pszBuffer); return FALSE; } @@ -216,11 +216,11 @@ DebugPrintf (_T("SearchForExecutable: \'%s\'\n"), pFileName); #endif /* load environment varable PATHEXT */ - pszBuffer = (LPTSTR)malloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); + pszBuffer = (LPTSTR)cmd_alloc (ENV_BUFFER_SIZE * sizeof(TCHAR)); dwBuffer = GetEnvironmentVariable (_T("PATHEXT"), pszBuffer, ENV_BUFFER_SIZE); if (dwBuffer > ENV_BUFFER_SIZE) { - pszBuffer = (LPTSTR)realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); + pszBuffer = (LPTSTR)cmd_realloc (pszBuffer, dwBuffer * sizeof (TCHAR)); GetEnvironmentVariable (_T("PATHEXT"), pszBuffer, dwBuffer); } else if (0 == dwBuffer) @@ -244,13 +244,13 @@ { if (0 == _tcsicmp(pCh, pExt)) { - free(pszBuffer); - free(pszBuffer2); + cmd_free(pszBuffer); + cmd_free(pszBuffer2); return SearchForExecutableSingle(pFileName, pFullName, NULL); } pCh = _tcstok(NULL, _T(";")); } - free(pszBuffer2); + cmd_free(pszBuffer2); } } @@ -259,13 +259,13 @@ { if (SearchForExecutableSingle(pFileName, pFullName, pCh)) { - free(pszBuffer); + cmd_free(pszBuffer); return TRUE; } pCh = _tcstok(NULL, _T(";")); } - free(pszBuffer); + cmd_free(pszBuffer); return FALSE; } Modified: trunk/reactos/base/shell/cmd/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/window.c?re…
============================================================================== --- trunk/reactos/base/shell/cmd/window.c (original) +++ trunk/reactos/base/shell/cmd/window.c Wed Aug 1 14:17:13 2007 @@ -17,7 +17,6 @@ #include <precomp.h> -#include "resource.h" #if ( defined(INCLUDE_CMD_WINDOW) || defined(INCLUDE_CMD_ACTIVATE) )
17Â years, 4Â months
1
0
0
0
[gedmurphy] 28064: - update cards.dll to use GPL cards which don't resemble the Windows counterparts - cards taken from http://sourceforge.net/projects/macsolitairex
by gedmurphyďĽ svn.reactos.org
Author: gedmurphy Date: Wed Aug 1 13:30:28 2007 New Revision: 28064 URL:
http://svn.reactos.org/svn/reactos?rev=28064&view=rev
Log: - update cards.dll to use GPL cards which don't resemble the Windows counterparts - cards taken from
http://sourceforge.net/projects/macsolitairex
Modified: trunk/reactos/dll/win32/cards/cards.h trunk/reactos/dll/win32/cards/res/Background_1.bmp trunk/reactos/dll/win32/cards/res/Clubs_Ace.bmp trunk/reactos/dll/win32/cards/res/Clubs_Eight.bmp trunk/reactos/dll/win32/cards/res/Clubs_Five.bmp trunk/reactos/dll/win32/cards/res/Clubs_Four.bmp trunk/reactos/dll/win32/cards/res/Clubs_Jack.bmp trunk/reactos/dll/win32/cards/res/Clubs_King.bmp trunk/reactos/dll/win32/cards/res/Clubs_Nine.bmp trunk/reactos/dll/win32/cards/res/Clubs_Queen.bmp trunk/reactos/dll/win32/cards/res/Clubs_Seven.bmp trunk/reactos/dll/win32/cards/res/Clubs_Six.bmp trunk/reactos/dll/win32/cards/res/Clubs_Ten.bmp trunk/reactos/dll/win32/cards/res/Clubs_Three.bmp trunk/reactos/dll/win32/cards/res/Clubs_Two.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Ace.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Eight.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Five.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Four.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Jack.bmp trunk/reactos/dll/win32/cards/res/Diamonds_King.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Nine.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Queen.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Seven.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Six.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Ten.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Three.bmp trunk/reactos/dll/win32/cards/res/Diamonds_Two.bmp trunk/reactos/dll/win32/cards/res/FreeCard.bmp trunk/reactos/dll/win32/cards/res/Hearts_Ace.bmp trunk/reactos/dll/win32/cards/res/Hearts_Eight.bmp trunk/reactos/dll/win32/cards/res/Hearts_Five.bmp trunk/reactos/dll/win32/cards/res/Hearts_Four.bmp trunk/reactos/dll/win32/cards/res/Hearts_Jack.bmp trunk/reactos/dll/win32/cards/res/Hearts_King.bmp trunk/reactos/dll/win32/cards/res/Hearts_Nine.bmp trunk/reactos/dll/win32/cards/res/Hearts_Queen.bmp trunk/reactos/dll/win32/cards/res/Hearts_Seven.bmp trunk/reactos/dll/win32/cards/res/Hearts_Six.bmp trunk/reactos/dll/win32/cards/res/Hearts_Ten.bmp trunk/reactos/dll/win32/cards/res/Hearts_Three.bmp trunk/reactos/dll/win32/cards/res/Hearts_Two.bmp trunk/reactos/dll/win32/cards/res/Joker.bmp trunk/reactos/dll/win32/cards/res/OSign.bmp trunk/reactos/dll/win32/cards/res/Spades_Ace.bmp trunk/reactos/dll/win32/cards/res/Spades_Eight.bmp trunk/reactos/dll/win32/cards/res/Spades_Five.bmp trunk/reactos/dll/win32/cards/res/Spades_Four.bmp trunk/reactos/dll/win32/cards/res/Spades_Jack.bmp trunk/reactos/dll/win32/cards/res/Spades_King.bmp trunk/reactos/dll/win32/cards/res/Spades_Nine.bmp trunk/reactos/dll/win32/cards/res/Spades_Queen.bmp trunk/reactos/dll/win32/cards/res/Spades_Seven.bmp trunk/reactos/dll/win32/cards/res/Spades_Six.bmp trunk/reactos/dll/win32/cards/res/Spades_Ten.bmp trunk/reactos/dll/win32/cards/res/Spades_Three.bmp trunk/reactos/dll/win32/cards/res/Spades_Two.bmp trunk/reactos/dll/win32/cards/res/XSign.bmp Modified: trunk/reactos/dll/win32/cards/cards.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/cards.h?re…
============================================================================== --- trunk/reactos/dll/win32/cards/cards.h (original) +++ trunk/reactos/dll/win32/cards/cards.h Wed Aug 1 13:30:28 2007 @@ -46,9 +46,9 @@ #define CARD_WIDTH 71 #define CARD_HEIGHT 96 */ -/* Oxymoron's card dimensions */ -#define CARD_WIDTH 73 -#define CARD_HEIGHT 97 +/* MacSolitaireX's card dimensions */ +#define CARD_WIDTH 72 +#define CARD_HEIGHT 96 #define ISREDCARD(x) (x >= 13 && x <= 39) Modified: trunk/reactos/dll/win32/cards/res/Background_1.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Backgr…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Ace.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Eight.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Five.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Four.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Jack.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_King.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Nine.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Queen.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Seven.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Six.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Ten.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Three.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Clubs_Two.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Clubs_…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Ace.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Eight.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Five.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Four.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Jack.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_King.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Nine.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Queen.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Seven.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Six.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Ten.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Three.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Diamonds_Two.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Diamon…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/FreeCard.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/FreeCa…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Ace.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Eight.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Five.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Four.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Jack.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_King.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Nine.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Queen.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Seven.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Six.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Ten.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Three.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Hearts_Two.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Hearts…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Joker.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Joker.…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/OSign.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/OSign.…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Ace.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Eight.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Five.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Four.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Jack.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_King.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Nine.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Queen.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Seven.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Six.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Ten.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Three.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/Spades_Two.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/Spades…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/cards/res/XSign.bmp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cards/res/XSign.…
============================================================================== Binary files - no diff available.
17Â years, 4Â months
1
0
0
0
[tkreuzer] 28063: Implement ExtEscape, MaskBlt, PlgBlt, wich were linked to the Nt functions before. But those have a different parameter count. Fixes compilation.
by tkreuzerďĽ svn.reactos.org
Author: tkreuzer Date: Wed Aug 1 06:07:15 2007 New Revision: 28063 URL:
http://svn.reactos.org/svn/reactos?rev=28063&view=rev
Log: Implement ExtEscape, MaskBlt, PlgBlt, wich were linked to the Nt functions before. But those have a different parameter count. Fixes compilation. Modified: trunk/reactos/dll/win32/gdi32/gdi32.def trunk/reactos/dll/win32/gdi32/misc/misc.c trunk/reactos/dll/win32/gdi32/objects/painting.c Modified: trunk/reactos/dll/win32/gdi32/gdi32.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?…
============================================================================== --- trunk/reactos/dll/win32/gdi32/gdi32.def (original) +++ trunk/reactos/dll/win32/gdi32/gdi32.def Wed Aug 1 06:07:15 2007 @@ -225,7 +225,7 @@ ExcludeClipRect@20=NtGdiExcludeClipRect@20 ExtCreatePen@20 ExtCreateRegion@12=NtGdiExtCreateRegion@12 -ExtEscape@24=NtGdiExtEscape@24 +ExtEscape@24 ExtFloodFill@20=NtGdiExtFloodFill@20 ExtSelectClipRgn@12=NtGdiExtSelectClipRgn@12 ExtTextOutA@32 @@ -467,7 +467,7 @@ LPtoDP@12=NtGdiLPtoDP@12 LineDDA@24 LineTo@12=NtGdiLineTo@12 -MaskBlt@48=NtGdiMaskBlt@48 +MaskBlt@48 MirrorRgn@8 ModifyWorldTransform@12=NtGdiModifyWorldTransform@12 MoveToEx@16=NtGdiMoveToEx@16 @@ -490,7 +490,7 @@ PlayEnhMetaFileRecord@16 PlayMetaFile@8 PlayMetaFileRecord@16 -PlgBlt@40=NtGdiPlgBlt@40 +PlgBlt@40 PolyBezier@12=NtGdiPolyBezier@12 PolyBezierTo@12=NtGdiPolyBezierTo@12 PolyDraw@16=NtGdiPolyDraw@16 Modified: trunk/reactos/dll/win32/gdi32/misc/misc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/misc.…
============================================================================== --- trunk/reactos/dll/win32/gdi32/misc/misc.c (original) +++ trunk/reactos/dll/win32/gdi32/misc/misc.c Wed Aug 1 06:07:15 2007 @@ -145,3 +145,15 @@ return 0; } +INT STDCALL +ExtEscape( + HDC hDC, + int nEscape, + int cbInput, + LPCSTR lpszInData, + int cbOutput, + LPSTR lpszOutData +) +{ + return NtGdiExtEscape(hDC, NULL, 0, nEscape, cbInput, (LPSTR)lpszInData, cbOutput, lpszOutData); +} Modified: trunk/reactos/dll/win32/gdi32/objects/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/pa…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/painting.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/painting.c Wed Aug 1 06:07:15 2007 @@ -903,3 +903,61 @@ { return NtGdiExtFloodFill(hDC, nXStart, nYStart, crFill, FLOODFILLBORDER); } + +BOOL WINAPI +MaskBlt( + HDC hdcDest, + INT nXDest, + INT nYDest, + INT nWidth, + INT nHeight, + HDC hdcSrc, + INT nXSrc, + INT nYSrc, + HBITMAP hbmMask, + INT xMask, + INT yMask, + DWORD dwRop) +{ + return NtGdiMaskBlt(hdcDest, + nXDest, + nYDest, + nWidth, + nHeight, + hdcSrc, + nXSrc, + nYSrc, + hbmMask, + xMask, + yMask, + dwRop, + 0); +} + + +BOOL +WINAPI +PlgBlt( + HDC hdcDest, + const POINT *lpPoint, + HDC hdcSrc, + INT nXSrc, + INT nYSrc, + INT nWidth, + INT nHeight, + HBITMAP hbmMask, + INT xMask, + INT yMask) +{ + return NtGdiPlgBlt(hdcDest, + (LPPOINT)lpPoint, + hdcSrc, + nXSrc, + nYSrc, + nWidth, + nHeight, + hbmMask, + xMask, + yMask, + 0); +}
17Â years, 4Â months
1
0
0
0
[tkreuzer] 28062: NtGdiMaskBlt has 13 params not 12 NtGdiPlgBlt has 11 params not 10 NtGdiSetPixelFormat has 2 params not 3
by tkreuzerďĽ svn.reactos.org
Author: tkreuzer Date: Wed Aug 1 06:05:24 2007 New Revision: 28062 URL:
http://svn.reactos.org/svn/reactos?rev=28062&view=rev
Log: NtGdiMaskBlt has 13 params not 12 NtGdiPlgBlt has 11 params not 10 NtGdiSetPixelFormat has 2 params not 3 Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Wed Aug 1 06:05:24 2007 @@ -166,7 +166,7 @@ NtGdiInvertRgn 2 NtGdiLPtoDP 3 NtGdiLineTo 3 -NtGdiMaskBlt 12 +NtGdiMaskBlt 13 NtGdiModifyWorldTransform 3 NtGdiMoveToEx 4 NtGdiOffsetClipRgn 3 @@ -182,7 +182,7 @@ NtGdiPlayEnhMetaFileRecord 4 NtGdiPlayMetaFile 2 NtGdiPlayMetaFileRecord 4 -NtGdiPlgBlt 10 +NtGdiPlgBlt 11 NtGdiPolyBezier 3 NtGdiPolyBezierTo 3 NtGdiPolyDraw 4 @@ -240,7 +240,7 @@ NtGdiSetMiterLimit 3 NtGdiSetPaletteEntries 4 NtGdiSetPixel 4 -NtGdiSetPixelFormat 3 +NtGdiSetPixelFormat 2 NtGdiSetPixelV 4 NtGdiSetPolyFillMode 2 NtGdiSetROP2 2
17Â years, 4Â months
1
0
0
0
[tkreuzer] 28061: fix parameter count for NtGdiExtEscape in w32ksvc.db (8 parameters not 6)
by tkreuzerďĽ svn.reactos.org
Author: tkreuzer Date: Wed Aug 1 04:57:17 2007 New Revision: 28061 URL:
http://svn.reactos.org/svn/reactos?rev=28061&view=rev
Log: fix parameter count for NtGdiExtEscape in w32ksvc.db (8 parameters not 6) Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Wed Aug 1 04:57:17 2007 @@ -66,7 +66,7 @@ NtGdiExcludeClipRect 5 NtGdiExtCreatePen 11 NtGdiExtCreateRegion 3 -NtGdiExtEscape 6 +NtGdiExtEscape 8 NtGdiExtFloodFill 5 NtGdiExtGetObjectW 3 NtGdiExtSelectClipRgn 3
17Â years, 4Â months
1
0
0
0
← Newer
1
...
64
65
66
67
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
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200