I should not write code when it is hot outside
clean up a if statement for realloc
Modified: trunk/reactos/subsys/system/cmd/copy.c
_____
Modified: trunk/reactos/subsys/system/cmd/copy.c
--- trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 18:31:42 UTC
(rev 16589)
+++ trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 18:38:01 UTC
(rev 16590)
@@ -280,7 +280,7 @@
{
size = GetEnvironmentVariable (_T("COPYCMD"), evar, 512);
}
- if ((size > 1) && (size > 512))
+ if (size > 512)
{
evar = realloc(evar,size * sizeof(TCHAR) );
if (evar!=NULL)
last bugfix did forget use tchar * 512 in malloc I did only use 512 in
malloc
Modified: trunk/reactos/subsys/system/cmd/copy.c
_____
Modified: trunk/reactos/subsys/system/cmd/copy.c
--- trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 18:18:40 UTC
(rev 16586)
+++ trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 18:21:17 UTC
(rev 16587)
@@ -274,7 +274,7 @@
nErrorLevel = 0;
/* Get the envor value if it exists */
- evar = malloc(512);
+ evar = malloc(512 * sizeof(TCHAR));
if (evar==NULL) size = 0;
size = GetEnvironmentVariable (_T("COPYCMD"), evar, 512);
did forget check malloc and realloc was NULL and set size to zero. thx
w3seek that did see this mistake
Modified: trunk/reactos/subsys/system/cmd/copy.c
_____
Modified: trunk/reactos/subsys/system/cmd/copy.c
--- trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 17:46:26 UTC
(rev 16585)
+++ trunk/reactos/subsys/system/cmd/copy.c 2005-07-15 18:18:40 UTC
(rev 16586)
@@ -275,15 +275,22 @@
/* Get the envor value if it exists */
evar = malloc(512);
- size = GetEnvironmentVariable (_T("COPYCMD"), evar, 512);
- if (size > 512)
+ if (evar==NULL) size = 0;
+
+ size = GetEnvironmentVariable (_T("COPYCMD"), evar, 512);
+ if ((size > 1) && (size > 512))
{
evar = realloc(evar,size * sizeof(TCHAR) );
if (evar!=NULL)
{
size = GetEnvironmentVariable (_T("COPYCMD"), evar, size);
}
+ else
+ {
+ size=0;
+ }
}
+
/* check see if we did get any env variable */
if (size !=0)
{
bug fix $t so it write out time instead for "current time is xxxxxxx"
not it write the time. bug fix $h so it did jump back and erase the char
that was there before.
Modified: trunk/reactos/subsys/system/cmd/prompt.c
_____
Modified: trunk/reactos/subsys/system/cmd/prompt.c
--- trunk/reactos/subsys/system/cmd/prompt.c 2005-07-15 15:31:14 UTC
(rev 16583)
+++ trunk/reactos/subsys/system/cmd/prompt.c 2005-07-15 17:31:12 UTC
(rev 16584)
@@ -105,6 +105,8 @@
case _T('H'):
ConOutChar (_T('\x08'));
+ ConOutChar (_T(' '));
+ ConOutChar (_T('\x08'));
break;
case _T('L'):
@@ -132,9 +134,14 @@
break;
case _T('T'):
- PrintTime ();
+ //PrintTime ();
+ {
+ TCHAR szTime[32];
+ GetTimeFormat(LOCALE_USER_DEFAULT, 0, NULL, NULL,szTime,
sizeof(szTime));
+ ConOutPrintf("%s",szTime);
+ }
break;
-
+
case _T('V'):
switch (osvi.dwPlatformId)
{
@@ -146,6 +153,7 @@
ConOutPrintf (_T("Windows 95"));
break;
+
case
VER_PLATFORM_WIN32_NT:
ConOutPrintf
(_T("Windows NT Version %lu.%lu"),
osvi.dwMajorVersion, osvi.dwMinorVersion);
crop the height of mf new logo so it show right
Modified: trunk/reactos/subsys/system/explorer/res/logov.bmp
Modified: trunk/reactos/subsys/system/explorer/res/logov256.bmp
_____
Modified: trunk/reactos/subsys/system/explorer/res/logov.bmp
(Binary files differ)
_____
Modified: trunk/reactos/subsys/system/explorer/res/logov256.bmp
(Binary files differ)