Author: cfinck
Date: Sat May 17 15:07:31 2008
New Revision: 33561
URL:
http://svn.reactos.org/svn/reactos?rev=33561&view=rev
Log:
- Minor fixes to work more like WinXP's cmd
- Removed the now obsolete "seta_test.cmd"
Removed:
trunk/reactos/base/shell/cmd/seta_test.cmd
Modified:
trunk/reactos/base/shell/cmd/batch.c
trunk/reactos/base/shell/cmd/cls.c
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/console.c
trunk/reactos/base/shell/cmd/dir.c
trunk/reactos/base/shell/cmd/lang/de-DE.rc
Modified: trunk/reactos/base/shell/cmd/batch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/batch.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/batch.c [iso-8859-1] Sat May 17 15:07:31 2008
@@ -292,6 +292,9 @@
return FALSE;
}
+ /* Don't print a newline for this command */
+ bIgnoreEcho = TRUE;
+
TRACE ("Batch: returns TRUE\n");
return TRUE;
Modified: trunk/reactos/base/shell/cmd/cls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cls.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/cls.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cls.c [iso-8859-1] Sat May 17 15:07:31 2008
@@ -54,8 +54,6 @@
coPos, &dwWritten);
SetConsoleCursorPosition(hConsole, coPos);
- bIgnoreEcho = TRUE;
-
return 0;
}
#endif
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Sat May 17 15:07:31 2008
@@ -154,7 +154,7 @@
BOOL bExit = FALSE; /* indicates EXIT was typed */
BOOL bCanExit = TRUE; /* indicates if this shell is exitable */
BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */
-BOOL bIgnoreEcho = FALSE; /* Ignore 'newline' before 'cls' */
+BOOL bIgnoreEcho = FALSE; /* Set this to TRUE to prevent a newline, when executing a
command */
INT nErrorLevel = 0; /* Errorlevel of last launched external program */
BOOL bChildProcessRunning = FALSE;
DWORD dwChildProcessId = 0;
Modified: trunk/reactos/base/shell/cmd/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/console.c?r…
==============================================================================
--- trunk/reactos/base/shell/cmd/console.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/console.c [iso-8859-1] Sat May 17 15:07:31 2008
@@ -157,6 +157,7 @@
VOID ConPuts(LPTSTR szText, DWORD nStdHandle)
{
DWORD dwWritten;
+ HANDLE hStdHandle;
PCHAR pBuf;
INT len;
@@ -167,12 +168,14 @@
#else
pBuf = szText;
#endif
- WriteFile (GetStdHandle (nStdHandle),
+ hStdHandle = GetStdHandle(nStdHandle);
+
+ WriteFile (hStdHandle,
pBuf,
len,
&dwWritten,
NULL);
- WriteFile (GetStdHandle (nStdHandle),
+ WriteFile (hStdHandle,
_T("\n"),
1,
&dwWritten,
Modified: trunk/reactos/base/shell/cmd/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/dir.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/dir.c [iso-8859-1] Sat May 17 15:07:31 2008
@@ -795,14 +795,14 @@
{
case 0: /* 12 hour format */
default:
- _stprintf (szTime,_T(" %02d%c%02u%c"),
+ _stprintf (szTime,_T("%02d%c%02u%c"),
(dt.wHour == 0 ? 12 : (dt.wHour <= 12 ? dt.wHour : dt.wHour - 12)),
cTimeSeparator,
dt.wMinute, (dt.wHour <= 11 ? _T('a') : _T('p')));
break;
case 1: /* 24 hour format */
- _stprintf (szTime, _T(" %02d%c%02u"),
+ _stprintf (szTime, _T("%02d%c%02u"),
dt.wHour, cTimeSeparator, dt.wMinute);
break;
}
@@ -1024,7 +1024,7 @@
/* Print the line */
if(lpFlags->bPause)
{
- if (ConOutPrintfPaging(FALSE,_T("%10s %-8s %*s%s %s\n"),
+ if (ConOutPrintfPaging(FALSE,_T("%10s %-6s %*s%s %s\n"),
szDate,
szTime,
iSizeFormat,
@@ -1034,7 +1034,7 @@
return ;
}
else
- ConOutPrintf(_T("%10s %-8s %*s%s %s\n"),
+ ConOutPrintf(_T("%10s %-6s %*s%s %s\n"),
szDate,
szTime,
iSizeFormat,
@@ -1656,7 +1656,7 @@
}
}
}
- }while(FindNextFile(hSearch, &wfdFileInfo));
+ } while(FindNextFile(hSearch, &wfdFileInfo));
FindClose(hSearch);
/* Terminate list */
@@ -1692,7 +1692,7 @@
/* Sort Data if requested*/
if (lpFlags->stOrderBy.sCriteriaCount > 0)
- QsortFiles(ptrFileArray, 0, dwCount-1,lpFlags);
+ QsortFiles(ptrFileArray, 0, dwCount-1, lpFlags);
/* Print Data */
DirPrintFiles(ptrFileArray, dwCount, szFullPath, lpFlags);
Modified: trunk/reactos/base/shell/cmd/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/de-DE.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/de-DE.rc [iso-8859-1] Sat May 17 15:07:31 2008
@@ -196,12 +196,12 @@
""-"" vor einer Option setzt die Voreinstellung ausser Kraft, z.B.
DIR /-W."
STRING_DIR_HELP2, " Datenträger in Laufwerk %c ist %s\n"
-STRING_DIR_HELP3, " Datenträger in Laufwerk %c hat keinen Namen\n"
-STRING_DIR_HELP4, " Datenträger-Seriennummer ist %04X-%04X\n"
-STRING_DIR_HELP5, "\n Gelistete Dateien:\n%16i Datei(en)% 14s bytes\n"
-STRING_DIR_HELP6, "%16i Verzeichnis(se)% 15s bytes\n"
-STRING_DIR_HELP7, "\n Verzeichnisse %s\n\n"
-STRING_DIR_HELP8, "%16i Datei(en)% 14s bytes\n"
+STRING_DIR_HELP3, " Datenträger in Laufwerk %c hat keine Bezeichnung\n"
+STRING_DIR_HELP4, " Volumeseriennummer: %04X-%04X\n"
+STRING_DIR_HELP5, "\n Anzahl der angezeigten Dateien:\n%16i Datei(en)% 15s
Bytes\n"
+STRING_DIR_HELP6, "%16i Verzeichnis(se), % 15s Bytes frei\n"
+STRING_DIR_HELP7, "\n Verzeichnis von %s\n\n"
+STRING_DIR_HELP8, "%16i Datei(en)% 14s Bytes\n"
STRING_DIRSTACK_HELP1, "Speichert das aktuelle Verzeichnis für den POPD Befehl,
und\n\
wechselt dann zu den festgelegten Verzeichnis.\n\n\
Removed: trunk/reactos/base/shell/cmd/seta_test.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/seta_test.c…
==============================================================================
--- trunk/reactos/base/shell/cmd/seta_test.cmd [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/seta_test.cmd (removed)
@@ -1,116 +1,0 @@
-@echo off
-
-@rem the next line reexecutes the script without params if it was called with params,
else we'll get false failures
-@if not "%1"=="" seta_test.cmd
-
-@rem the next two lines illustrate bug in existing if code
-if not "=="=="==" goto failure
-if "=="=="==" goto next1
-goto failure
-:next1
-if "1"=="2" goto failure
-if not "1"=="1" goto failure
-set /a a=1
-echo.
-if not "%a%"=="1" goto failure
-set /a b=a
-echo.
-if not "%b%"=="1" goto failure
-set /a a=!5
-echo.
-if not "%a%"=="0" goto failure
-set /a a=!a
-echo.
-if not "%a%"=="1" goto failure
-set /a a=~5
-echo.
-if not "%a%"=="-6" goto failure
-set /a a=5,a=-a
-echo.
-if not "%a%"=="-5" goto failure
-set /a a=5*7
-echo.
-if not "%a%"=="35" goto failure
-set /a a=2000/10
-echo.
-if not "%a%"=="200" goto failure
-set /a a=42%%9
-echo.
-if not "%a%"=="6" goto failure
-set /a a=5%2
-echo.
-if not "%a%"=="5" goto failure
-set /a a=42^%13
-echo.
-if not "%a%"=="423" goto failure
-set /a a=7+9
-echo.
-if not "%a%"=="16" goto failure
-set /a a=9-7
-echo.
-if not "%a%"=="2" goto failure
-set /a a=9^<^<2
-echo.
-if not "%a%"=="36" goto failure
-set /a a=36^>^>2
-echo.
-if not "%a%"=="9" goto failure
-set /a a=42^&9
-echo.
-if not "%a%"=="8" goto failure
-set /a a=32^9
-echo.
-if not "%a%"=="329" goto failure
-set /a a=32^^9
-echo.
-if not "%a%"=="41" goto failure
-set /a a=10^|22
-echo.
-if not "%a%"=="30" goto failure
-set /a a=2,a*=3
-echo.
-if not "%a%"=="6" goto failure
-set /a a=11,a/=2
-echo.
-if not "%a%"=="5" goto failure
-set /a a=42,a%%=9
-echo.
-if not "%a%"=="6" goto failure
-set /a a=7,a+=9
-echo.
-if not "%a%"=="16" goto failure
-set /a a=9,a-=7
-echo.
-if not "%a%"=="2" goto failure
-set /a a=42,a^&=9
-echo.
-if not "%a%"=="8" goto failure
-set /a a=32,a^^=9
-echo.
-if not "%a%"=="41" goto failure
-set /a a=10,a^|=22
-echo.
-if not "%a%"=="30" goto failure
-set /a a=9,a^<^<=2
-echo.
-if not "%a%"=="36" goto failure
-set /a a=36,a^>^>=2
-echo.
-if not "%a%"=="9" goto failure
-set /a a=1,2
-echo.
-if not "%a%"=="1" goto failure
-set /a a=(a=1,a+2)
-echo.
-if "%a%"=="3" goto success
-goto failure
-
-:success
-echo SUCCESS!
-echo.
-goto done
-
-:failure
-echo FAILURE! remove the echo off and see the last formula that executed before this
line
-echo.
-:done