Author: jmorlan
Date: Fri Mar 13 04:26:08 2009
New Revision: 39998
URL:
http://svn.reactos.org/svn/reactos?rev=39998&view=rev
Log:
In a 'Bad command or filename' error, print the name of the non-existent program,
so getting the error from a batch file isn't so mysterious.
Modified:
trunk/reactos/base/shell/cmd/cmd.c
trunk/reactos/base/shell/cmd/cmd.h
trunk/reactos/base/shell/cmd/error.c
trunk/reactos/base/shell/cmd/for.c
trunk/reactos/base/shell/cmd/lang/de-DE.rc
trunk/reactos/base/shell/cmd/lang/el-GR.rc
trunk/reactos/base/shell/cmd/lang/en-US.rc
trunk/reactos/base/shell/cmd/lang/es-ES.rc
trunk/reactos/base/shell/cmd/lang/fr-FR.rc
trunk/reactos/base/shell/cmd/lang/hu-HU.rc
trunk/reactos/base/shell/cmd/lang/id-ID.rc
trunk/reactos/base/shell/cmd/lang/it-IT.rc
trunk/reactos/base/shell/cmd/lang/ja-JP.rc
trunk/reactos/base/shell/cmd/lang/no-NO.rc
trunk/reactos/base/shell/cmd/lang/pl-PL.rc
trunk/reactos/base/shell/cmd/lang/ru-RU.rc
trunk/reactos/base/shell/cmd/lang/uk-UA.rc
trunk/reactos/base/shell/cmd/start.c
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] Fri Mar 13 04:26:08 2009
@@ -453,7 +453,7 @@
/* search the PATH environment variable for the binary */
if (!SearchForExecutable (first, szFullName))
{
- error_bad_command ();
+ error_bad_command (first);
cmd_free (first);
cmd_free (rest);
cmd_free (full);
@@ -531,7 +531,7 @@
if (!RunFile(full))
{
TRACE ("[ShellExecute failed!: %s]\n", debugstr_aw(full));
- error_bad_command ();
+ error_bad_command (first);
nErrorLevel = 1;
}
else
Modified: trunk/reactos/base/shell/cmd/cmd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.h?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.h [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -214,7 +214,7 @@
VOID ErrorMessage (DWORD, LPTSTR, ...);
VOID error_no_pipe (VOID);
-VOID error_bad_command (VOID);
+VOID error_bad_command (LPTSTR);
VOID error_invalid_drive (VOID);
VOID error_req_param_missing (VOID);
VOID error_sfile_not_found (LPTSTR);
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 [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/error.c [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -118,9 +118,9 @@
}
-VOID error_bad_command (VOID)
+VOID error_bad_command (LPTSTR s)
{
- ConErrResPuts(STRING_ERROR_BADCOMMAND);
+ ConErrResPrintf(STRING_ERROR_BADCOMMAND, s);
nErrorLevel = 9009;
}
Modified: trunk/reactos/base/shell/cmd/for.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/for.c?rev=3…
==============================================================================
--- trunk/reactos/base/shell/cmd/for.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/for.c [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -268,7 +268,7 @@
InputFile = _tpopen(Start + 1, _T("r"));
if (!InputFile)
{
- error_bad_command();
+ error_bad_command(Start + 1);
return FALSE;
}
FullInput = ReadFileContents(InputFile, Buffer);
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] Fri Mar 13 04:26:08 2009
@@ -650,7 +650,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Benötigter Parameter fehlt\n"
STRING_ERROR_INVALID_DRIVE, "Ungültige Laufwerksangaben\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Ungültiges Parameterformat - %s\n"
-STRING_ERROR_BADCOMMAND, "Ungültiger Befehl oder Dateiname\n"
+STRING_ERROR_BADCOMMAND, "Ungültiger Befehl oder Dateiname - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Fehler: Zu wenig Speicher verfügbar.\n"
STRING_ERROR_CANNOTPIPE, "Fehler: Cannot pipe! Temporäre Datei kann nicht
geöffnet werden!\n"
STRING_ERROR_D_PAUSEMSG, "Drücken Sie eine beliebige Taste . . ."
Modified: trunk/reactos/base/shell/cmd/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/el-GR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/el-GR.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -664,7 +664,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Ëåßðåé áðáñáßôçôç ðáñÜìåôñïò\n"
STRING_ERROR_INVALID_DRIVE, "Invalid drive specification\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Ìç Ýãêõñï öïñìÜ ðáñáìÝôñïõ - %s\n"
-STRING_ERROR_BADCOMMAND, "ÅóöáëìÝíç åíôïëÞ Þ üíïìá\n"
+STRING_ERROR_BADCOMMAND, "ÅóöáëìÝíç åíôïëÞ Þ üíïìá - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Out of memory error.\n"
STRING_ERROR_CANNOTPIPE, "ÓöÜëìá! Cannot pipe! Cannot open temporary
file!\n"
STRING_ERROR_D_PAUSEMSG, "ÐáôÞóôå ïðïéïäÞðïôå ðëÞêôñï ãéá óõíÝ÷åéá . .
."
Modified: trunk/reactos/base/shell/cmd/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/en-US.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/en-US.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -669,7 +669,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Required parameter missing\n"
STRING_ERROR_INVALID_DRIVE, "Invalid drive specification\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Invalid parameter format - %s\n"
-STRING_ERROR_BADCOMMAND, "Bad command or filename\n"
+STRING_ERROR_BADCOMMAND, "Bad command or filename - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Out of memory error.\n"
STRING_ERROR_CANNOTPIPE, "Error! Cannot pipe! Cannot open temporary
file!\n"
STRING_ERROR_D_PAUSEMSG, "Press any key to continue . . ."
Modified: trunk/reactos/base/shell/cmd/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/es-ES.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/es-ES.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -624,7 +624,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Prámetro requerido no encontrado\n"
STRING_ERROR_INVALID_DRIVE, "Especificación de unidad errónea\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Formato de parámetro erróneo - %s\n"
-STRING_ERROR_BADCOMMAND, "Comando o nombre de archivo erróneo\n"
+STRING_ERROR_BADCOMMAND, "Comando o nombre de archivo erróneo -
%s\n"
STRING_ERROR_OUT_OF_MEMORY, "Error fuera de memoria.\n"
STRING_ERROR_CANNOTPIPE, "¡Error! ¡No se puede apilar! ¡No se puede
abrir el archivo temporal!\n"
STRING_ERROR_D_PAUSEMSG, "Pulsa una tecla para continuar . . ."
Modified: trunk/reactos/base/shell/cmd/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/fr-FR.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/fr-FR.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -682,7 +682,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Paramètre requis manquant\n"
STRING_ERROR_INVALID_DRIVE, "Lecteur spécifié introuvable\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Format de paramètre incorrect - %s\n"
-STRING_ERROR_BADCOMMAND, "Commande ou nom de fichier inconnu\n"
+STRING_ERROR_BADCOMMAND, "Commande ou nom de fichier inconnu - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Pas assez de mémoire.\n"
STRING_ERROR_CANNOTPIPE, "Erreur ! Impossible de chaîner ! Échec à
l'ouverture du fichier temporaire!\n"
STRING_ERROR_D_PAUSEMSG, "Appuyez sur une touche pour continuer . .
."
Modified: trunk/reactos/base/shell/cmd/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/hu-HU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/hu-HU.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -604,7 +604,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Egy szükséges paraméter hiányzik\n"
STRING_ERROR_INVALID_DRIVE, "Érvénytelen meghajtó\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Érvénytelen paraméter megadás - %s\n"
-STRING_ERROR_BADCOMMAND, "Ismeretlen parancs vagy állomány név\n"
+STRING_ERROR_BADCOMMAND, "Ismeretlen parancs vagy állomány név -
%s\n"
STRING_ERROR_OUT_OF_MEMORY, "Nincs elég memória.\n"
STRING_ERROR_CANNOTPIPE, "Error! Cannot pipe! Cannot open temporary
állomány!\n"
STRING_ERROR_D_PAUSEMSG, "A folytatáshoz nyomj meg egy billentyût . .
."
Modified: trunk/reactos/base/shell/cmd/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/id-ID.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/id-ID.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -626,7 +626,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Parameter yang diperlukan kurang\n"
STRING_ERROR_INVALID_DRIVE, "Spesifikasi drive tidak benar\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Format parameter tidak benar - %s\n"
-STRING_ERROR_BADCOMMAND, "Perintah atau nama file salah\n"
+STRING_ERROR_BADCOMMAND, "Perintah atau nama file salah - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Kesalahan kekurangan memori.\n"
STRING_ERROR_CANNOTPIPE, "Salah! Tidak bisa melakukan pipe! Tidak bisa
membuka file temporal!\n"
STRING_ERROR_D_PAUSEMSG, "Tekan tombol untuk melanjutkan . . ."
Modified: trunk/reactos/base/shell/cmd/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/it-IT.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/it-IT.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -672,7 +672,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Parametro obbligatorio mancante\n"
STRING_ERROR_INVALID_DRIVE, "Disco non valido\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Formato dei parametri non valido - %s\n"
-STRING_ERROR_BADCOMMAND, "Comando o nome di file errato\n"
+STRING_ERROR_BADCOMMAND, "Comando o nome di file errato - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Errore di memoria esaurita.\n"
STRING_ERROR_CANNOTPIPE, "Errore! Impossibile ridirigere! Impossibile
aprire un file temporaneo!\n"
STRING_ERROR_D_PAUSEMSG, "Premi un tasto per continuare . . ."
Modified: trunk/reactos/base/shell/cmd/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ja-JP.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ja-JP.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -633,7 +633,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "KvÈp[^ªs«µÄ¢Ü·B\n"
STRING_ERROR_INVALID_DRIVE, "³øÈhCuwèÅ·B\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "³øÈp[^̮ŷB - %s\n"
-STRING_ERROR_BADCOMMAND,
"R}hܽÍt@C¼ªÔáÁĢܷB\n"
+STRING_ERROR_BADCOMMAND, "R}hܽÍt@C¼ªÔáÁĢܷB -
%s\n"
STRING_ERROR_OUT_OF_MEMORY, "s«G[B\n"
STRING_ERROR_CANNOTPIPE, "G[! pCvūܹñ!
êt@CðJ¯Ü¹ñ!\n"
STRING_ERROR_D_PAUSEMSG, "±s·éÉͽ©L[ðµÄ¾³¢ . .
."
Modified: trunk/reactos/base/shell/cmd/lang/no-NO.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/no-NO.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/no-NO.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -618,7 +618,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Obligatorisk parameter mangler\n"
STRING_ERROR_INVALID_DRIVE, "Ugyldig stasjon angitt\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Ugyldig parameter format - %s\n"
-STRING_ERROR_BADCOMMAND, "Feil kommando eller filnavn\n"
+STRING_ERROR_BADCOMMAND, "Feil kommando eller filnavn - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Feil: Minne fullt.\n"
STRING_ERROR_CANNOTPIPE, "Feil! Kan ikke bruke datakanal! Kan ikke åpne
midlertidig fil!\n"
STRING_ERROR_D_PAUSEMSG, "Trykk en tast for å fortsette . . ."
Modified: trunk/reactos/base/shell/cmd/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/pl-PL.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/pl-PL.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -624,7 +624,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Brak wymaganego parametru\n"
STRING_ERROR_INVALID_DRIVE, "Nieprawid³owe okrelenie napêdu\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Niew³aciwy format parametru - %s\n"
-STRING_ERROR_BADCOMMAND, "Nieprawid³owa komenda lub nazwa pliku\n"
+STRING_ERROR_BADCOMMAND, "Nieprawid³owa komenda lub nazwa pliku -
%s\n"
STRING_ERROR_OUT_OF_MEMORY, "B³¹d - brak pamiêci.\n"
STRING_ERROR_CANNOTPIPE, "B³¹d potoków! Nie mo¿na otworzyæ pliku
tymczasowego.\n"
STRING_ERROR_D_PAUSEMSG, "Nacinij dowolny klawisz, aby kontynuowaæ . .
."
Modified: trunk/reactos/base/shell/cmd/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/ru-RU.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/ru-RU.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -631,7 +631,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "Îòñóòñòâóåò íåîáõîäèìûé ïàðàìåòð\n"
STRING_ERROR_INVALID_DRIVE, "Îøèáî÷íîå îïðåäåëåíèå äèñêà\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Îøèáî÷íûé ôîðìàò ïàðàìåòðà - %s\n"
-STRING_ERROR_BADCOMMAND, "Íåïðàâèëüíàÿ êîìàíäà èëè íåâåðíîå èìÿ
ôàéëà\n"
+STRING_ERROR_BADCOMMAND, "Íåïðàâèëüíàÿ êîìàíäà èëè íåâåðíîå èìÿ ôàéëà -
%s\n"
STRING_ERROR_OUT_OF_MEMORY, "Íåõâàòêà ïàìÿòè.\n"
STRING_ERROR_CANNOTPIPE, "Îøèáêà! Íåâîçìîæíî èñïîëüçîâàòü pipe!
Íåâîçìîæíî ñîçäàòü âðåìåííûé ôàéë!\n"
STRING_ERROR_D_PAUSEMSG, "Äëÿ ïðîäîëæåíèÿ íàæìèòå ëþáóþ êëàâèøó . .
."
Modified: trunk/reactos/base/shell/cmd/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/lang/uk-UA.…
==============================================================================
--- trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/lang/uk-UA.rc [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -672,7 +672,7 @@
STRING_ERROR_REQ_PARAM_MISSING, "³äñóòí³é îáîâ'ÿçêîâèé ïàðàìåòð\n"
STRING_ERROR_INVALID_DRIVE, "Invalid drive specification\n"
STRING_ERROR_INVALID_PARAM_FORMAT, "Invalid parameter format - %s\n"
-STRING_ERROR_BADCOMMAND, "Íåâ³ðíà êîìàíäà àáî ³ì'ÿ ôàéëó\n"
+STRING_ERROR_BADCOMMAND, "Íåâ³ðíà êîìàíäà àáî ³ì'ÿ ôàéëó - %s\n"
STRING_ERROR_OUT_OF_MEMORY, "Íåäîñòàòíüî ïàì'ÿò³.\n"
STRING_ERROR_CANNOTPIPE, "Error! Cannot pipe! Cannot open temporary
file!\n"
STRING_ERROR_D_PAUSEMSG, "Íàòèñí³òü áóäü-ÿêó êëàâ³øó äëÿ ïðîäîâæåííÿ . .
."
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 [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/start.c [iso-8859-1] Fri Mar 13 04:26:08 2009
@@ -214,7 +214,7 @@
/* search the PATH environment variable for the binary */
if (!SearchForExecutable (rest, szFullName))
{
- error_bad_command ();
+ error_bad_command(rest);
cmd_free(comspec);
return 1;