https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7c175d4999fb66d86111e…
commit 7c175d4999fb66d86111e45d694f934d2735a61f
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Jul 5 23:39:06 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:06 2020 +0200
[CMD] PATH, SET: Fix the returned error message when an environment variable does not exist.
Translators, please update the translations!
---
base/shell/cmd/lang/cs-CZ.rc | 2 +-
base/shell/cmd/lang/de-DE.rc | 2 +-
base/shell/cmd/lang/el-GR.rc | 2 +-
base/shell/cmd/lang/en-US.rc | 2 +-
base/shell/cmd/lang/es-ES.rc | 2 +-
base/shell/cmd/lang/fr-FR.rc | 2 +-
base/shell/cmd/lang/hu-HU.rc | 2 +-
base/shell/cmd/lang/id-ID.rc | 2 +-
base/shell/cmd/lang/it-IT.rc | 2 +-
base/shell/cmd/lang/ja-JP.rc | 2 +-
base/shell/cmd/lang/no-NO.rc | 2 +-
base/shell/cmd/lang/pl-PL.rc | 2 +-
base/shell/cmd/lang/ro-RO.rc | 2 +-
base/shell/cmd/lang/ru-RU.rc | 2 +-
base/shell/cmd/lang/sk-SK.rc | 2 +-
base/shell/cmd/lang/sq-AL.rc | 2 +-
base/shell/cmd/lang/sv-SE.rc | 2 +-
base/shell/cmd/lang/tr-TR.rc | 2 +-
base/shell/cmd/lang/uk-UA.rc | 2 +-
base/shell/cmd/lang/zh-CN.rc | 2 +-
base/shell/cmd/lang/zh-TW.rc | 2 +-
base/shell/cmd/path.c | 2 +-
base/shell/cmd/resource.h | 2 +-
base/shell/cmd/set.c | 2 +-
24 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/base/shell/cmd/lang/cs-CZ.rc b/base/shell/cmd/lang/cs-CZ.rc
index 3499a2641a9..0f788899104 100644
--- a/base/shell/cmd/lang/cs-CZ.rc
+++ b/base/shell/cmd/lang/cs-CZ.rc
@@ -523,7 +523,7 @@ title new title\n"
STRING_ERROR_CANNOTPIPE "Chyba! Nelze vytvořit rouru! Nelze vytvořit dočasný soubor!\n"
STRING_ERROR_D_PAUSEMSG "Pokračujte stisknutím libovolné klávesy . . . "
STRING_ERROR_DRIVER_NOT_READY "Jednotka není připravena"
- STRING_PATH_ERROR "CMD: Ne v prostředí '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Neplatný přepínač - %s\n"
STRING_REPLACE_ERROR2 "Cesta nenalezena - %s\n"
STRING_REPLACE_ERROR3 "Název souboru, adresáře nebo popisek svazku je neplatný.\n"
diff --git a/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc
index 94cb49924e3..e9afa7eefb3 100644
--- a/base/shell/cmd/lang/de-DE.rc
+++ b/base/shell/cmd/lang/de-DE.rc
@@ -519,7 +519,7 @@ Titel neuer Titel"
STRING_ERROR_CANNOTPIPE "Fehler: Pipen nicht möglich! Temporäre Datei kann nicht geöffnet werden!\n"
STRING_ERROR_D_PAUSEMSG "Drücken Sie eine beliebige Taste . . . "
STRING_ERROR_DRIVER_NOT_READY "Laufwerk ist nicht bereit"
- STRING_PATH_ERROR "CMD: Nicht in Umgebung '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Ungültiger Parameter - %s\n"
STRING_REPLACE_ERROR2 "Pfad wurde nicht gefunden - %s\n"
STRING_REPLACE_ERROR3 "Der Dateiname, Ordnername oder die Syntax der Volumenbezeichung sind inkorrekt.\n"
diff --git a/base/shell/cmd/lang/el-GR.rc b/base/shell/cmd/lang/el-GR.rc
index 10a48f409e1..1714f763af1 100644
--- a/base/shell/cmd/lang/el-GR.rc
+++ b/base/shell/cmd/lang/el-GR.rc
@@ -522,7 +522,7 @@ title new title\n"
STRING_ERROR_CANNOTPIPE "Σφάλμα! Cannot pipe! Cannot open temporary file!\n"
STRING_ERROR_D_PAUSEMSG "Πατήστε οποιοδήποτε πλήκτρο για συνέχεια . . . "
STRING_ERROR_DRIVER_NOT_READY "Ο δίσκος δεν είναι έτοιμος"
- STRING_PATH_ERROR "CMD: Not in environment '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Δε βρέθηκε το μονοπάτι - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/en-US.rc b/base/shell/cmd/lang/en-US.rc
index e5d0ea5056a..2286203a633 100644
--- a/base/shell/cmd/lang/en-US.rc
+++ b/base/shell/cmd/lang/en-US.rc
@@ -518,7 +518,7 @@ title new title\n"
STRING_ERROR_CANNOTPIPE "Error! Cannot pipe! Cannot open temporary file!\n"
STRING_ERROR_D_PAUSEMSG "Press any key to continue . . . "
STRING_ERROR_DRIVER_NOT_READY "Drive not ready"
- STRING_PATH_ERROR "CMD: Not in environment '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Path not found - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/es-ES.rc b/base/shell/cmd/lang/es-ES.rc
index 786b5f7e974..cf18bec6044 100644
--- a/base/shell/cmd/lang/es-ES.rc
+++ b/base/shell/cmd/lang/es-ES.rc
@@ -524,7 +524,7 @@ title Nuevo título\n"
STRING_ERROR_CANNOTPIPE "¡Error! ¡No se puede apilar! ¡No se puede abrir el archivo temporal!\n"
STRING_ERROR_D_PAUSEMSG "Pulse una tecla para continuar ... "
STRING_ERROR_DRIVER_NOT_READY "La unidad no está lista"
- STRING_PATH_ERROR "CMD: No está en el entorno '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Argumento no válido - %s\n"
STRING_REPLACE_ERROR2 "Ruta no encontrada - %s\n"
STRING_REPLACE_ERROR3 "La sintaxis del nombre de archivo, carpeta o volúmen es incorrecta.\n"
diff --git a/base/shell/cmd/lang/fr-FR.rc b/base/shell/cmd/lang/fr-FR.rc
index 7a681fdf5b3..92a32cf1fa2 100644
--- a/base/shell/cmd/lang/fr-FR.rc
+++ b/base/shell/cmd/lang/fr-FR.rc
@@ -534,7 +534,7 @@ titre titre de la fenêtre"
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 . . . "
STRING_ERROR_DRIVER_NOT_READY "Lecteur non prêt"
- STRING_PATH_ERROR "CMD : Pas dans l'environnement '%s'\n"
+ STRING_SET_ENV_ERROR "Variable d'environnement '%s' non définie\n"
STRING_REPLACE_ERROR1 "Commutateur invalide - %s\n"
STRING_REPLACE_ERROR2 "Chemin introuvable - %s\n"
STRING_REPLACE_ERROR3 "La syntaxe du nom de fichier, du répertoire, ou du nom de volume est incorrecte.\n"
diff --git a/base/shell/cmd/lang/hu-HU.rc b/base/shell/cmd/lang/hu-HU.rc
index d73faa7c2cc..003cf0d6c96 100644
--- a/base/shell/cmd/lang/hu-HU.rc
+++ b/base/shell/cmd/lang/hu-HU.rc
@@ -503,7 +503,7 @@ title new title\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 . . . "
STRING_ERROR_DRIVER_NOT_READY "A meghajtó nem áll készen"
- STRING_PATH_ERROR "CMD: Not in environment '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Path not found - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/id-ID.rc b/base/shell/cmd/lang/id-ID.rc
index 2f7ce290d59..befdb9a16a2 100644
--- a/base/shell/cmd/lang/id-ID.rc
+++ b/base/shell/cmd/lang/id-ID.rc
@@ -517,7 +517,7 @@ title judul baru\n"
STRING_ERROR_CANNOTPIPE "Salah! Tidak bisa melakukan pipe! Tidak bisa membuka file temporal!\n"
STRING_ERROR_D_PAUSEMSG "Tekan tombol untuk melanjutkan . . . "
STRING_ERROR_DRIVER_NOT_READY "Drive tidak siap"
- STRING_PATH_ERROR "CMD: Tidak dalam lingkungan '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Path not found - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/it-IT.rc b/base/shell/cmd/lang/it-IT.rc
index e3485640449..e02ad50cbd0 100644
--- a/base/shell/cmd/lang/it-IT.rc
+++ b/base/shell/cmd/lang/it-IT.rc
@@ -527,7 +527,7 @@ titolo il nuovo titolo\n"
STRING_ERROR_CANNOTPIPE "Errore! Impossibile ridirigere! Impossibile aprire un file temporaneo!\n"
STRING_ERROR_D_PAUSEMSG "Premi un tasto per continuare . . . "
STRING_ERROR_DRIVER_NOT_READY "Disco non pronto"
- STRING_PATH_ERROR "CMD: Non nell'ambiente '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Parametro non valido - %s\n"
STRING_REPLACE_ERROR2 "Percorso non trovato - %s\n"
STRING_REPLACE_ERROR3 "Il nome del file, della cartella o della etichetta di volume è errato.\n"
diff --git a/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc
index a0581742431..3bd1a7ea396 100644
--- a/base/shell/cmd/lang/ja-JP.rc
+++ b/base/shell/cmd/lang/ja-JP.rc
@@ -525,7 +525,7 @@ RESTORE ウィンドウを元のサイズに戻します。\n\
STRING_ERROR_CANNOTPIPE "エラー! パイプできません! 一時ファイルを開けません!\n"
STRING_ERROR_D_PAUSEMSG "続行するには何かキーを押してください . . . "
STRING_ERROR_DRIVER_NOT_READY "ドライブの準備ができていません。"
- STRING_PATH_ERROR "CMD: Not in environment '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Path not found - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/no-NO.rc b/base/shell/cmd/lang/no-NO.rc
index 7cb1bb65431..c8577d88c55 100644
--- a/base/shell/cmd/lang/no-NO.rc
+++ b/base/shell/cmd/lang/no-NO.rc
@@ -516,7 +516,7 @@ tittel ny tittel\n"
STRING_ERROR_CANNOTPIPE "Feil! Kan ikke bruke datakanal! Kan ikke åpne midlertidig fil!\n"
STRING_ERROR_D_PAUSEMSG "Trykk en tast for å fortsette . . . "
STRING_ERROR_DRIVER_NOT_READY "Stasjonen er ikke klar"
- STRING_PATH_ERROR "CMD: Ikke i miljøet '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Invalid switch - %s\n"
STRING_REPLACE_ERROR2 "Mappen ble ikke funnet - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc
index 49d89386170..626696c546b 100644
--- a/base/shell/cmd/lang/pl-PL.rc
+++ b/base/shell/cmd/lang/pl-PL.rc
@@ -523,7 +523,7 @@ title nowy tytuł okna\n"
STRING_ERROR_CANNOTPIPE "Błąd potoków! Nie można otworzyć pliku tymczasowego.\n"
STRING_ERROR_D_PAUSEMSG "Naciśnij dowolny klawisz, aby kontynuować . . . "
STRING_ERROR_DRIVER_NOT_READY "Napęd nie jest gotowy"
- STRING_PATH_ERROR "CMD: Poza środowiskiem '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Nieprawidłowy parametr - %s\n"
STRING_REPLACE_ERROR2 "Ścieżka nie została odnaleziona - %s\n"
STRING_REPLACE_ERROR3 "Nazwa pliku, katalogu lub napędu nie jest prawidłowa.\n"
diff --git a/base/shell/cmd/lang/ro-RO.rc b/base/shell/cmd/lang/ro-RO.rc
index a9349427dc8..2013f65d8d8 100644
--- a/base/shell/cmd/lang/ro-RO.rc
+++ b/base/shell/cmd/lang/ro-RO.rc
@@ -551,7 +551,7 @@ titlu Noul titlu.\n"
STRING_ERROR_CANNOTPIPE "Eroare! Nu datele nu pot fi canalizate! Nu fișierul temporar nu a putut fi deschis!\n"
STRING_ERROR_D_PAUSEMSG "Tastați pentru a continua... "
STRING_ERROR_DRIVER_NOT_READY "Unitatea de stocare nu e utilizabilă"
- STRING_PATH_ERROR "CMD: «%s» inexistentă în mediu\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Argument eronat - %s\n"
STRING_REPLACE_ERROR2 "Calea nu este găsită - %s\n"
STRING_REPLACE_ERROR3 "Numele fișierului, directorului sau eticheta volumului este incorectă.\n"
diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc
index 64c217e547d..554b7e028ef 100644
--- a/base/shell/cmd/lang/ru-RU.rc
+++ b/base/shell/cmd/lang/ru-RU.rc
@@ -528,7 +528,7 @@ RESTORE восстанавливает окно\n\
STRING_ERROR_CANNOTPIPE "Ошибка! Невозможно использовать pipe! Невозможно создать временный файл!\n"
STRING_ERROR_D_PAUSEMSG "Для продолжения нажмите любую клавишу . . . "
STRING_ERROR_DRIVER_NOT_READY "Устройство не готово"
- STRING_PATH_ERROR "CMD: Не в среде окружения '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Неверный ключ - %s\n"
STRING_REPLACE_ERROR2 "Путь не найден - %s\n"
STRING_REPLACE_ERROR3 "Имя файла, папки или метка диска неверная.\n"
diff --git a/base/shell/cmd/lang/sk-SK.rc b/base/shell/cmd/lang/sk-SK.rc
index 3bb33e7c01a..c0a5673bd44 100644
--- a/base/shell/cmd/lang/sk-SK.rc
+++ b/base/shell/cmd/lang/sk-SK.rc
@@ -524,7 +524,7 @@ title new title\n"
STRING_ERROR_CANNOTPIPE "Chyba! Cannot pipe! Cannot open temporary file!\n"
STRING_ERROR_D_PAUSEMSG "Pokračujte stlačením ľubovoľného klávesu ... "
STRING_ERROR_DRIVER_NOT_READY "Jednotka nie je pripravená"
- STRING_PATH_ERROR "CMD: Not in environment '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Neplatný prepínač - %s\n"
STRING_REPLACE_ERROR2 "Cesta sa nenašla - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/sq-AL.rc b/base/shell/cmd/lang/sq-AL.rc
index f31217025f0..42e2d5736f5 100644
--- a/base/shell/cmd/lang/sq-AL.rc
+++ b/base/shell/cmd/lang/sq-AL.rc
@@ -522,7 +522,7 @@ title titull i ri\n"
STRING_ERROR_CANNOTPIPE "Error! Nuk mund të pipoj! Nuk mund të hape dokumentet e perkohshem!\n"
STRING_ERROR_D_PAUSEMSG "Shtypni një buton për të vazhduar . . . "
STRING_ERROR_DRIVER_NOT_READY "Drive nuk është gati"
- STRING_PATH_ERROR "CMD: Jo në mjedis '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Qeles invalid - %s\n"
STRING_REPLACE_ERROR2 "Rruga nuk u gjet - %s\n"
STRING_REPLACE_ERROR3 "Dokumenti, emri i direktorise, ose syntaksi i etiketes volumetrike eshte gabim.\n"
diff --git a/base/shell/cmd/lang/sv-SE.rc b/base/shell/cmd/lang/sv-SE.rc
index 41c5131f015..b9d857299f5 100644
--- a/base/shell/cmd/lang/sv-SE.rc
+++ b/base/shell/cmd/lang/sv-SE.rc
@@ -516,7 +516,7 @@ tittel ny tittel\n"
STRING_ERROR_CANNOTPIPE "Fel! Kan inte bruke datakanal! Kan inte åpne midlertidig fil!\n"
STRING_ERROR_D_PAUSEMSG "Tryck på valfri tangent för att fortsätta . . . "
STRING_ERROR_DRIVER_NOT_READY "enheten är inte klar"
- STRING_PATH_ERROR "CMD: Inte i miljön '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Felaktig växel - %s\n"
STRING_REPLACE_ERROR2 "Mappen ble inte funnet - %s\n"
STRING_REPLACE_ERROR3 "The filename, directory name, or volume label syntax is incorrect.\n"
diff --git a/base/shell/cmd/lang/tr-TR.rc b/base/shell/cmd/lang/tr-TR.rc
index 44810d8fef2..326bc16e907 100644
--- a/base/shell/cmd/lang/tr-TR.rc
+++ b/base/shell/cmd/lang/tr-TR.rc
@@ -523,7 +523,7 @@ başlık Yeni başlık\n"
STRING_ERROR_CANNOTPIPE "Yanlışlık! Borulanamıyor! Geçici kütük açılamıyor!\n"
STRING_ERROR_D_PAUSEMSG "Sürdürmek için bir düğmeye basınız . . . "
STRING_ERROR_DRIVER_NOT_READY "Sürücü anık değil."
- STRING_PATH_ERROR "CMD: ""%s"" ortamda yok.\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Geçersiz seçenek - %s\n"
STRING_REPLACE_ERROR2 "Yol bulunamadı - %s\n"
STRING_REPLACE_ERROR3 "Kütük adı, dizin adı ya da birim etiketi yazımı yanlış.\n"
diff --git a/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc
index 2b6a6e85348..4b34f727177 100644
--- a/base/shell/cmd/lang/uk-UA.rc
+++ b/base/shell/cmd/lang/uk-UA.rc
@@ -528,7 +528,7 @@ title новий заголовок\n"
STRING_ERROR_CANNOTPIPE "Помилка! Неможливо використати pipe! Неможливо вiдкрити тимчасовий файл!\n"
STRING_ERROR_D_PAUSEMSG "Натиснiть будь-яку клавiшу для продовження . . . "
STRING_ERROR_DRIVER_NOT_READY "Пристрій не готовий"
- STRING_PATH_ERROR "CMD: Не в середовищi '%s'\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "Невiрний ключ - %s\n"
STRING_REPLACE_ERROR2 "Шлях не знайдено - %s\n"
STRING_REPLACE_ERROR3 "Синтаксис iменi файлу, теки чи мiтки диску некоректнi.\n"
diff --git a/base/shell/cmd/lang/zh-CN.rc b/base/shell/cmd/lang/zh-CN.rc
index 724459ca8f4..7562413928b 100644
--- a/base/shell/cmd/lang/zh-CN.rc
+++ b/base/shell/cmd/lang/zh-CN.rc
@@ -488,7 +488,7 @@ RESTORE 恢复窗口\n\
STRING_ERROR_CANNOTPIPE "错误!无法创建管道!不能打开临时文件!\n"
STRING_ERROR_D_PAUSEMSG "按任意键继续... "
STRING_ERROR_DRIVER_NOT_READY "驱动器未就绪"
- STRING_PATH_ERROR "CMD: 不在环境 '%s' 中\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "无效开关 - %s\n"
STRING_REPLACE_ERROR2 "路径未找到 - %s\n"
STRING_REPLACE_ERROR3 "文件名、目录名或卷标语法不正确。\n"
diff --git a/base/shell/cmd/lang/zh-TW.rc b/base/shell/cmd/lang/zh-TW.rc
index d4e37356d5b..4d59c824948 100644
--- a/base/shell/cmd/lang/zh-TW.rc
+++ b/base/shell/cmd/lang/zh-TW.rc
@@ -489,7 +489,7 @@ RESTORE 恢復視窗\n\
STRING_ERROR_CANNOTPIPE "錯誤!無法創建管道!不能開啟臨時檔案!\n"
STRING_ERROR_D_PAUSEMSG "按任意鍵繼續... "
STRING_ERROR_DRIVER_NOT_READY "驅動器未就緒"
- STRING_PATH_ERROR "CMD: 不在環境 '%s' 中\n"
+ STRING_SET_ENV_ERROR "Environment variable '%s' is not defined\n"
STRING_REPLACE_ERROR1 "無效開關 - %s\n"
STRING_REPLACE_ERROR2 "路徑未找到 - %s\n"
STRING_REPLACE_ERROR3 "檔名、目錄名或卷標語法不正確。\n"
diff --git a/base/shell/cmd/path.c b/base/shell/cmd/path.c
index c00851dae40..1faed8ea29c 100644
--- a/base/shell/cmd/path.c
+++ b/base/shell/cmd/path.c
@@ -60,7 +60,7 @@ INT cmd_path (LPTSTR param)
if (dwBuffer == 0)
{
cmd_free(pszBuffer);
- ConOutResPrintf(STRING_VOL_HELP2, _T("PATH"));
+ ConErrResPrintf(STRING_SET_ENV_ERROR, _T("PATH"));
return 0;
}
else if (dwBuffer > ENV_BUFFER_SIZE)
diff --git a/base/shell/cmd/resource.h b/base/shell/cmd/resource.h
index 933d5677408..7836cfb96b8 100644
--- a/base/shell/cmd/resource.h
+++ b/base/shell/cmd/resource.h
@@ -52,7 +52,7 @@
#define STRING_GOTO_ERROR2 341
#define STRING_MOVE_ERROR1 342
#define STRING_MOVE_ERROR2 343
-#define STRING_PATH_ERROR 345
+#define STRING_SET_ENV_ERROR 345
#define STRING_REN_ERROR1 346
#define STRING_TIME_ERROR1 348
#define STRING_TYPE_ERROR1 349
diff --git a/base/shell/cmd/set.c b/base/shell/cmd/set.c
index 7a4a5d4c408..f63de691a2f 100644
--- a/base/shell/cmd/set.c
+++ b/base/shell/cmd/set.c
@@ -197,7 +197,7 @@ INT cmd_set(LPTSTR param)
if (!bFound)
{
- ConErrResPrintf(STRING_PATH_ERROR, param);
+ ConErrResPrintf(STRING_SET_ENV_ERROR, param);
nErrorLevel = 1;
return 1;
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6e09a6a3ffd92c565e206…
commit 6e09a6a3ffd92c565e20664a023add74eaa55ecf
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jul 1 02:42:04 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:05 2020 +0200
[CMD] Use kernel32!lstrcmp(i) when comparing strings with the IF command.
Use kernel32!lstrcmp(i) instead of CRT!_tcs(i)cmp, so as to use the correct
current thread locale information when comparing user-specific strings.
As a result, the following comparison: 'b LSS B' will return TRUE,
instead of FALSE as it would be by using the CRT functions (and by
naively considering the lexicographical order in ANSI).
This behaviour has been introduced in Windows 2000 onwards.
---
base/shell/cmd/if.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/base/shell/cmd/if.c b/base/shell/cmd/if.c
index 830ec459c8a..c7882ad2fec 100644
--- a/base/shell/cmd/if.c
+++ b/base/shell/cmd/if.c
@@ -32,7 +32,7 @@
#include "precomp.h"
-static INT GenericCmp(INT (*StringCmp)(LPCTSTR, LPCTSTR),
+static INT GenericCmp(INT (WINAPI *StringCmp)(LPCTSTR, LPCTSTR),
LPCTSTR Left, LPCTSTR Right)
{
TCHAR *end;
@@ -152,14 +152,20 @@ INT ExecuteIf(PARSED_COMMAND *Cmd)
}
else
{
- /* Do case-insensitive string comparisons if /I specified */
- INT (*StringCmp)(LPCTSTR, LPCTSTR) =
- (Cmd->If.Flags & IFFLAG_IGNORECASE) ? _tcsicmp : _tcscmp;
+ /*
+ * Do case-insensitive string comparisons if /I specified.
+ *
+ * Since both strings are user-specific, use kernel32!lstrcmp(i)
+ * instead of CRT!_tcs(i)cmp, so as to use the correct
+ * current thread locale information.
+ */
+ INT (WINAPI *StringCmp)(LPCTSTR, LPCTSTR) =
+ (Cmd->If.Flags & IFFLAG_IGNORECASE) ? lstrcmpi : lstrcmp;
if (Cmd->If.Operator == IF_STRINGEQ)
{
/* IF str1 == str2 */
- result = StringCmp(Left, Right) == 0;
+ result = (StringCmp(Left, Right) == 0);
}
else
{
@@ -168,9 +174,9 @@ INT ExecuteIf(PARSED_COMMAND *Cmd)
{
case IF_EQU: result = (result == 0); break;
case IF_NEQ: result = (result != 0); break;
- case IF_LSS: result = (result < 0); break;
+ case IF_LSS: result = (result < 0); break;
case IF_LEQ: result = (result <= 0); break;
- case IF_GTR: result = (result > 0); break;
+ case IF_GTR: result = (result > 0); break;
case IF_GEQ: result = (result >= 0); break;
}
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=1efbcd3d5d84389dec9ec…
commit 1efbcd3d5d84389dec9ec54fbb9ca5d763abe874
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jul 1 02:06:42 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:04 2020 +0200
[CMD] Improve RMDIR help and MD error message.
---
base/shell/cmd/lang/cs-CZ.rc | 8 ++++----
base/shell/cmd/lang/de-DE.rc | 6 ++++--
base/shell/cmd/lang/el-GR.rc | 8 ++++----
base/shell/cmd/lang/en-US.rc | 8 ++++----
base/shell/cmd/lang/es-ES.rc | 6 ++++--
base/shell/cmd/lang/fr-FR.rc | 8 ++++----
base/shell/cmd/lang/hu-HU.rc | 6 ++++--
base/shell/cmd/lang/id-ID.rc | 8 ++++----
base/shell/cmd/lang/it-IT.rc | 8 ++++----
base/shell/cmd/lang/ja-JP.rc | 4 ++--
base/shell/cmd/lang/no-NO.rc | 8 ++++----
base/shell/cmd/lang/pl-PL.rc | 8 ++++----
base/shell/cmd/lang/ro-RO.rc | 4 ++--
base/shell/cmd/lang/ru-RU.rc | 8 ++++----
base/shell/cmd/lang/sk-SK.rc | 8 ++++----
base/shell/cmd/lang/sq-AL.rc | 8 ++++----
base/shell/cmd/lang/sv-SE.rc | 8 ++++----
base/shell/cmd/lang/tr-TR.rc | 8 ++++----
base/shell/cmd/lang/uk-UA.rc | 8 ++++----
base/shell/cmd/lang/zh-CN.rc | 8 ++++----
base/shell/cmd/lang/zh-TW.rc | 8 ++++----
21 files changed, 80 insertions(+), 74 deletions(-)
diff --git a/base/shell/cmd/lang/cs-CZ.rc b/base/shell/cmd/lang/cs-CZ.rc
index a06ade2dfac..3499a2641a9 100644
--- a/base/shell/cmd/lang/cs-CZ.rc
+++ b/base/shell/cmd/lang/cs-CZ.rc
@@ -322,9 +322,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nType PROMPT without parameters to reset the prompt to the default setting."
STRING_REM_HELP "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_RMDIR_HELP "Removes a directory.\n\n\
-RMDIR [drive:]path\nRD [drive:]path\n\
-/S Deletes all files and folders within target\n\
-/Q Doesn't prompt for user\n"
+RMDIR [/S] [/Q] [drive:]path\nRD [/S] [/Q] [drive:]path\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Directory is not empty!\n"
STRING_REN_HELP1 "Renames a file/directory or files/directories.\n\n\
RENAME [/E /N /P /Q /S /T] old_name ... new_name\n\
@@ -502,7 +502,7 @@ title new title\n"
STRING_FREE_ERROR2 "bez popisku"
STRING_GOTO_ERROR1 "Pro GOTO nebyl zadán popisek\n"
STRING_GOTO_ERROR2 "Popisek '%s' nenalezen\n"
- STRING_MD_ERROR "Podadresář nebo soubor už existuje.\n"
+ STRING_MD_ERROR "Podadresář nebo soubor %s už existuje.\n"
STRING_MD_ERROR2 "Cesta do nového adresáře neexistuje.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Chyba]\n"
diff --git a/base/shell/cmd/lang/de-DE.rc b/base/shell/cmd/lang/de-DE.rc
index 4fa69baa07f..94cb49924e3 100644
--- a/base/shell/cmd/lang/de-DE.rc
+++ b/base/shell/cmd/lang/de-DE.rc
@@ -316,7 +316,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\n 'PROMPT' setzt die Prompt auf die Standardwerte zurück."
STRING_REM_HELP "Leitet Kommentare in einer Batchdatei ein.\n\nREM [Kommentar]"
STRING_RMDIR_HELP "Löscht ein Verzeichnis.\n\n\
-RMDIR [Laufwerk:]Pfad\nRD [Laufwerk:]Pfad"
+RMDIR [/S] [/Q] [Laufwerk:]Pfad\nRD [/S] [/Q] [Laufwerk:]Pfad\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Verzeichnis ist nicht leer!\n"//FIXME
STRING_REN_HELP1 "Benennt Dateien und Verzeichnisse um.\n\n\
RENAME [/E /N /P /Q /S /T] alter_Name ... neuer_Name\n\
@@ -496,7 +498,7 @@ Titel neuer Titel"
STRING_FREE_ERROR2 "keine Bezeichnung"
STRING_GOTO_ERROR1 "Keine Sprungmarke für GOTO gesetzt\n"
STRING_GOTO_ERROR2 "Sprungmarke '%s' wurde nicht gefunden\n"
- STRING_MD_ERROR "Unterverzeichnis oder Datei existiert bereits.\n"
+ STRING_MD_ERROR "Unterverzeichnis oder Datei %s existiert bereits.\n"
STRING_MD_ERROR2 "Der Pfad zum neuen Ordner existiert nicht.\n"//FIXME
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[FEHLER]\n"
diff --git a/base/shell/cmd/lang/el-GR.rc b/base/shell/cmd/lang/el-GR.rc
index e49650da179..10a48f409e1 100644
--- a/base/shell/cmd/lang/el-GR.rc
+++ b/base/shell/cmd/lang/el-GR.rc
@@ -321,9 +321,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nType PROMPT without parameters to reset the prompt to the default setting."
STRING_REM_HELP "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_RMDIR_HELP "Removes a directory.\n\n\
-RMDIR [drive:]path\nRD [drive:]path\n\
-/S Deletes all files and folders within target\n\
-/Q Doesn't prompt for user\n"
+RMDIR [/S] [/Q] [drive:]path\nRD [/S] [/Q] [drive:]path\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Directory is not empty!\n"
STRING_REN_HELP1 "Renames a file/directory or files/directories.\n\n\
RENAME [/E /N /P /Q /S /T] old_name ... new_name\n\
@@ -501,7 +501,7 @@ title new title\n"
STRING_FREE_ERROR2 "unlabeled"
STRING_GOTO_ERROR1 "No label specified for GOTO\n"
STRING_GOTO_ERROR2 "Label '%s' not found\n"
- STRING_MD_ERROR "A subdirectory or file already exists.\n"
+ STRING_MD_ERROR "A subdirectory or file %s already exists.\n"
STRING_MD_ERROR2 "The path to the new folder does not exist.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Σφάλμα]\n"
diff --git a/base/shell/cmd/lang/en-US.rc b/base/shell/cmd/lang/en-US.rc
index 943c695b790..e5d0ea5056a 100644
--- a/base/shell/cmd/lang/en-US.rc
+++ b/base/shell/cmd/lang/en-US.rc
@@ -317,9 +317,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nType PROMPT without parameters to reset the prompt to the default setting."
STRING_REM_HELP "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_RMDIR_HELP "Removes a directory.\n\n\
-RMDIR [drive:]path\nRD [drive:]path\n\
-/S Deletes all files and folders within target\n\
-/Q Doesn't prompt for user\n"
+RMDIR [/S] [/Q] [drive:]path\nRD [/S] [/Q] [drive:]path\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Directory is not empty!\n"
STRING_REN_HELP1 "Renames a file/directory or files/directories.\n\n\
RENAME [/E /N /P /Q /S /T] old_name ... new_name\n\
@@ -497,7 +497,7 @@ title new title\n"
STRING_FREE_ERROR2 "unlabeled"
STRING_GOTO_ERROR1 "No label specified for GOTO\n"
STRING_GOTO_ERROR2 "Label '%s' not found\n"
- STRING_MD_ERROR "A subdirectory or file already exists.\n"
+ STRING_MD_ERROR "A subdirectory or file %s already exists.\n"
STRING_MD_ERROR2 "The path to the new folder does not exist.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Error]\n"
diff --git a/base/shell/cmd/lang/es-ES.rc b/base/shell/cmd/lang/es-ES.rc
index 9998bfd1bad..786b5f7e974 100644
--- a/base/shell/cmd/lang/es-ES.rc
+++ b/base/shell/cmd/lang/es-ES.rc
@@ -322,7 +322,9 @@ PAUSE [mensaje]"
comandos a su configuración por defecto."
STRING_REM_HELP "Comienza una liena de comentarios en un archivo por lotes\n\nREM [Comentario]"
STRING_RMDIR_HELP "Elimina un directorio.\n\n\
-RMDIR [unidad:]ruta\nRD [unidad:]ruta"
+RMDIR [/S] [/Q] [unidad:]ruta\nRD [/S] [/Q] [unidad:]ruta\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "La carpeta no está vacía.\n"
STRING_REN_HELP1 "Renombra un archivo/directorio o varios archivos/directorios.\n\n\
RENAME [/E /N /P /Q /S /T] nombre_antiguo ... nuevo_nombre\n\
@@ -501,7 +503,7 @@ title Nuevo título\n"
STRING_FREE_ERROR2 "Sin etiqueta"
STRING_GOTO_ERROR1 "No se especifico etiqueta para GOTO\n"
STRING_GOTO_ERROR2 "La etiqueta '%s' no se encuentra\n"
- STRING_MD_ERROR "A subdirectory or file already exists.\n"
+ STRING_MD_ERROR "A subdirectory or file %s already exists.\n"
STRING_MD_ERROR2 "The path to the new folder does not exist.\n"
STRING_MOVE_ERROR1 "[Correcto]\n"
STRING_MOVE_ERROR2 "[Error]\n"
diff --git a/base/shell/cmd/lang/fr-FR.rc b/base/shell/cmd/lang/fr-FR.rc
index 646791f8235..7a681fdf5b3 100644
--- a/base/shell/cmd/lang/fr-FR.rc
+++ b/base/shell/cmd/lang/fr-FR.rc
@@ -334,9 +334,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nTaper PROMPT sans paramètres pour changer l'invite à celui défini par défaut."
STRING_REM_HELP "Démarrer une ligne de commentaire dans un fichier batch.\n\nREM [Commentaire]"
STRING_RMDIR_HELP "Supprime un répertoire.\n\n\
-RMDIR [lecteur:]chemin\nRD [lecteur:]chemin\n\
-/S Supprime tous les fichiers et dossiers dans le répertoire cible\n\
-/Q N'interroge pas l'utilisateur\n"
+RMDIR [/S] [/Q] [lecteur:]chemin\nRD [/S] [/Q] [lecteur:]chemin\n\
+ /S Supprime tous les fichiers et dossiers dans le répertoire cible.\n\
+ /Q N'interroge pas l'utilisateur.\n"
STRING_RMDIR_HELP2 "Le répertoire n'est pas vide!\n"
STRING_REN_HELP1 "Renomme un(des) fichier(s)/répertoire(s)\n\
RENAME [/E /N /P /Q /S /T] ancien_nom ... nouveau_nom\n\
@@ -513,7 +513,7 @@ titre titre de la fenêtre"
STRING_FREE_ERROR2 "sans nom"
STRING_GOTO_ERROR1 "Pas de label indiqué pour GOTO\n"
STRING_GOTO_ERROR2 "Label '%s' introuvable\n"
- STRING_MD_ERROR "Un sous répertoire ou un fichier existe déjà.\n"
+ STRING_MD_ERROR "Un sous-répertoire ou un fichier %s existe déjà.\n"
STRING_MD_ERROR2 "Le chemin vers le nouveau répertoire n'existe pas.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Erreur]\n"
diff --git a/base/shell/cmd/lang/hu-HU.rc b/base/shell/cmd/lang/hu-HU.rc
index 518c83364b3..d73faa7c2cc 100644
--- a/base/shell/cmd/lang/hu-HU.rc
+++ b/base/shell/cmd/lang/hu-HU.rc
@@ -303,7 +303,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nHa paraméter nélkül beírod a PROMPT parancsot, vissza áll az alapértelmezettre a kijelzés."
STRING_REM_HELP "Megjegyzést jelölõ sor batch fájlokban.\n\nREM [megjegyzés]"
STRING_RMDIR_HELP "Eltávolít egy mappát.\n\n\
-RMDIR [meghajtó:]elérési_út\nRD [meghajtó:]elérési_út"
+RMDIR [/S] [/Q] [meghajtó:]elérési_út\nRD [/S] [/Q] [meghajtó:]elérési_út\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Directory is not empty!\n"//FIXME
STRING_REN_HELP1 "Átnevez egy állományt.\n\n\
RENAME [/E /N /P /Q /S /T] régi_név ... új_név\n\
@@ -480,7 +482,7 @@ title new title\n"
STRING_FREE_ERROR2 "nincs cimkézve"
STRING_GOTO_ERROR1 "Nem lett cimke megadva a GOTO után\n"
STRING_GOTO_ERROR2 "A '%s' cimke nem található\n"
- STRING_MD_ERROR "A subdirectory or file already exists.\n"//FIXME
+ STRING_MD_ERROR "A subdirectory or file %s already exists.\n"
STRING_MD_ERROR2 "The path to the new folder does not exist.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[HIBA]\n"
diff --git a/base/shell/cmd/lang/id-ID.rc b/base/shell/cmd/lang/id-ID.rc
index 42bd9e2b516..2f7ce290d59 100644
--- a/base/shell/cmd/lang/id-ID.rc
+++ b/base/shell/cmd/lang/id-ID.rc
@@ -318,9 +318,9 @@ PAUSE [pesan]"
STRING_PROMPT_HELP3 "\nKetik PROMPT tanpa parameter untuk mereset prompt ke setelan standar."
STRING_REM_HELP "Memulai baris komentar dalam file batch.\n\nREM [Komentar]"
STRING_RMDIR_HELP "Menghapus direktori.\n\n\
-RMDIR [drive:]path\nRD [drive:]path\n\
-/S Menghapus semua file dan folder di dalam target\n\
-/Q Tidak bertanya pada pengguna\n"
+RMDIR [/S] [/Q] [drive:]path\nRD [/S] [/Q] [drive:]path\n\
+ /S Menghapus semua file dan folder di dalam target.\n\
+ /Q Tidak bertanya pada pengguna.\n"
STRING_RMDIR_HELP2 "Direktori tidak kosong!\n"
STRING_REN_HELP1 "Mengganti nama file/direktori.\n\n\
RENAME [/E /N /P /Q /S /T] nama_lama ... nama_baru\n\
@@ -496,7 +496,7 @@ title judul baru\n"
STRING_FREE_ERROR2 "tak berlabel"
STRING_GOTO_ERROR1 "Tidak ada label ditetapkan untuk GOTO\n"
STRING_GOTO_ERROR2 "Label '%s' tidak ditemukan\n"
- STRING_MD_ERROR "Subdirektori atau file sudah ada.\n"
+ STRING_MD_ERROR "Subdirektori atau file %s sudah ada.\n"
STRING_MD_ERROR2 "Path ke folder baru tidak ada.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Salah]\n"
diff --git a/base/shell/cmd/lang/it-IT.rc b/base/shell/cmd/lang/it-IT.rc
index 0f80bf5504a..e3485640449 100644
--- a/base/shell/cmd/lang/it-IT.rc
+++ b/base/shell/cmd/lang/it-IT.rc
@@ -324,9 +324,9 @@ PAUSE [messaggio]"
STRING_REM_HELP "Inizia una linea di commento.\n\n\
REM [Commento]"
STRING_RMDIR_HELP "Cancella una cartella.\n\n\
-RMDIR [disco:]percorso\nRD [disco:]percorso\n\
-/S cancella tutti i file e le cartelle indicate\n\
-/Q non chiede conferma\n"
+RMDIR [/S] [/Q] [disco:]percorso\nRD [/S] [/Q] [disco:]percorso\n\
+ /S Cancella tutti i file e le cartelle indicate.\n\
+ /Q Non chiede conferma.\n"
STRING_RMDIR_HELP2 "La cartella non è vuota!\n"
STRING_REN_HELP1 "Rinomina file/cartella or file/cartelle.\n\n\
RENAME [/E /N /P /Q /S /T] vecchio_nome ... nuovo_nome\n\
@@ -506,7 +506,7 @@ titolo il nuovo titolo\n"
STRING_FREE_ERROR2 "non etichettato"
STRING_GOTO_ERROR1 "Nessuna etichetta indicata per GOTO\n"
STRING_GOTO_ERROR2 "Etichetta '%s' non trovata\n"
- STRING_MD_ERROR "Una cartella o file esiste già.\n"
+ STRING_MD_ERROR "Una cartella o file %s esiste già.\n"
STRING_MD_ERROR2 "Il percorso della nuova cartella non esiste.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Errore]\n"
diff --git a/base/shell/cmd/lang/ja-JP.rc b/base/shell/cmd/lang/ja-JP.rc
index 8d493993447..a0581742431 100644
--- a/base/shell/cmd/lang/ja-JP.rc
+++ b/base/shell/cmd/lang/ja-JP.rc
@@ -326,7 +326,7 @@ PAUSE [メッセージ]"
STRING_PROMPT_HELP3 "\nパラメータを指定せずに PROMPT と入力すると、プロンプトの設定がデフォルトにリセットされます。"
STRING_REM_HELP "バッチ ファイルにコメント (注釈) を記録します。\n\nREM [コメント]"
STRING_RMDIR_HELP "ディレクトリを削除します。\n\n\
-RMDIR [ドライブ:]パス\nRD [ドライブ:]パス\n\
+RMDIR [/S] [/Q] [ドライブ:]パス\nRD [/S] [/Q] [ドライブ:]パス\n\
/S 指定されたディレクトリ内にあるファイルやフォルダもすべて削除します。\n\
/Q 確認のメッセージを表示しません。\n"
STRING_RMDIR_HELP2 "ディレクトリが空ではありません!\n"
@@ -504,7 +504,7 @@ RESTORE ウィンドウを元のサイズに戻します。\n\
STRING_FREE_ERROR2 "ラベルがありません。"
STRING_GOTO_ERROR1 "GOTO にラベルが指定されていません。\n"
STRING_GOTO_ERROR2 "ラベル '%s' が見つかりませんでした。\n"
- STRING_MD_ERROR "すでにディレクトリ内にサブディレクトリかファイルが存在しています。\n"
+ STRING_MD_ERROR "%s すでにディレクトリ内にサブディレクトリかファイルが存在しています。\n"
STRING_MD_ERROR2 "新しいフォルダへのパスが存在していません。\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[エラー]\n"
diff --git a/base/shell/cmd/lang/no-NO.rc b/base/shell/cmd/lang/no-NO.rc
index d5056d19e9d..7cb1bb65431 100644
--- a/base/shell/cmd/lang/no-NO.rc
+++ b/base/shell/cmd/lang/no-NO.rc
@@ -316,9 +316,9 @@ PAUSE [melding]"
STRING_PROMPT_HELP3 "\nSkriv PROMPT uten parameter for å resette ledeteksten."
STRING_REM_HELP "Start en kommentarlinje i en satsvis fil.\n\nREM [Kommentar]"
STRING_RMDIR_HELP "Flytter en mappe.\n\n\
-RMDIR [stasjon:]mappe\nRD [stasjon:]mappe\n\
-/S Sletter alle filer og mapper innenfor målet\n\
-/Q Ikke spør før sletting.\n"
+RMDIR [/S] [/Q] [stasjon:]mappe\nRD [/S] [/Q] [stasjon:]mappe\n\
+ /S Sletter alle filer og mapper innenfor målet.\n\
+ /Q Ikke spør før sletting.\n"
STRING_RMDIR_HELP2 "Mappen er ikke tom!\n"
STRING_REN_HELP1 "Endre navn på fil/mappe eller filer/mapper.\n\n\
ENDRE NAVN [/E /N /P /Q /S /T] gammelt_navn ... nytt_navn\n\
@@ -495,7 +495,7 @@ tittel ny tittel\n"
STRING_FREE_ERROR2 "utmerket"
STRING_GOTO_ERROR1 "Ingen merke spesifisert for GOTO\n"
STRING_GOTO_ERROR2 "Merke '%s' ikke funnet\n"
- STRING_MD_ERROR "En undermappe eller fil finnes allerede.\n"
+ STRING_MD_ERROR "En undermappe eller fil %s finnes allerede.\n"
STRING_MD_ERROR2 "Stien til den nye mappen eksisterer ikke.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Feil]\n"
diff --git a/base/shell/cmd/lang/pl-PL.rc b/base/shell/cmd/lang/pl-PL.rc
index c53eddf985c..49d89386170 100644
--- a/base/shell/cmd/lang/pl-PL.rc
+++ b/base/shell/cmd/lang/pl-PL.rc
@@ -324,9 +324,9 @@ PAUSE [wiadomość]"
STRING_PROMPT_HELP3 "\nWpisz PROMPT bez żadnych parametrów, by powrócić do ustawień domyślnych."
STRING_REM_HELP "Definiuje linię komentarza w pliku wsadowym.\n\nREM [komentarz]"
STRING_RMDIR_HELP "Usuwa katalog.\n\n\
-RMDIR [napęd:]ścieżka\nRD [napęd:]ścieżka\n\
-/S Kasuje także wszystkie pliki i podkatalogi w danym katalogu\n\
-/Q Nie wyświetla prośby o potwierdzenie\n"
+RMDIR [/S] [/Q] [napęd:]ścieżka\nRD [/S] [/Q] [napęd:]ścieżka\n\
+ /S Kasuje także wszystkie pliki i podkatalogi w danym katalogu.\n\
+ /Q Nie wyświetla prośby o potwierdzenie.\n"
STRING_RMDIR_HELP2 "Katalog nie jest pusty!\n"
STRING_REN_HELP1 "Zmienia nazwę pliku/katalogu (także wielu).\n\n\
RENAME [/E /N /P /Q /S /T] stara_nazwa ... nowa_nazwa\n\
@@ -502,7 +502,7 @@ title nowy tytuł okna\n"
STRING_FREE_ERROR2 "brak"
STRING_GOTO_ERROR1 "Brak etykiety dla GOTO\n"
STRING_GOTO_ERROR2 "Etykieta '%s' nie została znaleziona\n"
- STRING_MD_ERROR "Istnieje już plik lub podkatalog o tej nazwie.\n"
+ STRING_MD_ERROR "Istnieje już plik lub podkatalog %s o tej nazwie.\n"
STRING_MD_ERROR2 "Ścieżka do nowego katalogu nie jest prawidłowa.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Błąd]\n"
diff --git a/base/shell/cmd/lang/ro-RO.rc b/base/shell/cmd/lang/ro-RO.rc
index f406454ee49..a9349427dc8 100644
--- a/base/shell/cmd/lang/ro-RO.rc
+++ b/base/shell/cmd/lang/ro-RO.rc
@@ -352,7 +352,7 @@ PAUSE [mesaj]\n"
STRING_PROMPT_HELP3 "\nTastați PROMPT fără argumente pentru a readuce consola în starea implicită.\n"
STRING_REM_HELP "Începe o linie de comentariu într-un fișier de comenzi.\n\nREM [comentariu]\n"
STRING_RMDIR_HELP "Șterge un director.\n\n\
-RMDIR [unitate:]cale\nRD [unitate:]cale\n\
+RMDIR [/S] [/Q] [unitate:]cale\nRD [/S] [/Q] [unitate:]cale\n\
/S Șterge toate fișierele și directoarele țintă.\n\
/Q Omite cererile de confirmare.\n"
STRING_RMDIR_HELP2 "Directorul nu este gol!\n"
@@ -530,7 +530,7 @@ titlu Noul titlu.\n"
STRING_FREE_ERROR2 "neetichetat"
STRING_GOTO_ERROR1 "Nu a fost specificată nici o etichetă pentru «GOTO»\n"
STRING_GOTO_ERROR2 "Eticheta «%s» nu a fost găsită\n"
- STRING_MD_ERROR "Există deja un fișier sau un subdirector cu acest nume.\n"
+ STRING_MD_ERROR "Există deja un fișier sau un subdirector %s cu acest nume.\n"
STRING_MD_ERROR2 "Calea către noul director nu există.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Eroare]\n"
diff --git a/base/shell/cmd/lang/ru-RU.rc b/base/shell/cmd/lang/ru-RU.rc
index f4ffc1c91b9..64c217e547d 100644
--- a/base/shell/cmd/lang/ru-RU.rc
+++ b/base/shell/cmd/lang/ru-RU.rc
@@ -326,9 +326,9 @@ PAUSE [сообщение]"
STRING_PROMPT_HELP3 "\nPROMPT без параметров устанавливает приглашение командной строки по умолчанию."
STRING_REM_HELP "Помещение комментариев в пакетные файлы.\n\nREM [комментарий]"
STRING_RMDIR_HELP "Удаление каталога.\n\n\
-RMDIR [диск:]путь\nRD [диск:]путь\n\
-/S Удаление дерева каталогов\n\
-/Q Отключение запроса подтверждения\n"
+RMDIR [/S] [/Q] [диск:]путь\nRD [/S] [/Q] [диск:]путь\n\
+ /S Удаление дерева каталогов.\n\
+ /Q Отключение запроса подтверждения.\n"
STRING_RMDIR_HELP2 "Каталог не пуст!\n"
STRING_REN_HELP1 "Переименование одного или нескольких файлов/каталогов.\n\n\
RENAME [/E /N /P /Q /S /T] старое_имя ... новое_имя\n\
@@ -507,7 +507,7 @@ RESTORE восстанавливает окно\n\
STRING_FREE_ERROR2 "не отмечено"
STRING_GOTO_ERROR1 "Не определена метка для GOTO\n"
STRING_GOTO_ERROR2 "Метка '%s' не найдена\n"
- STRING_MD_ERROR "Подкаталог или файл уже существует.\n"
+ STRING_MD_ERROR "Подкаталог или файл %s уже существует.\n"
STRING_MD_ERROR2 "Путь к новому каталогу не существует.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Ошибка]\n"
diff --git a/base/shell/cmd/lang/sk-SK.rc b/base/shell/cmd/lang/sk-SK.rc
index 8f86dbd0d2f..3bb33e7c01a 100644
--- a/base/shell/cmd/lang/sk-SK.rc
+++ b/base/shell/cmd/lang/sk-SK.rc
@@ -323,9 +323,9 @@ PAUSE [message]"
STRING_PROMPT_HELP3 "\nType PROMPT without parameters to reset the prompt to the default setting."
STRING_REM_HELP "Starts a comment line in a batch file.\n\nREM [Comment]"
STRING_RMDIR_HELP "Removes a directory.\n\n\
-RMDIR [drive:]path\nRD [drive:]path\n\
-/S Deletes all files and folders within target\n\
-/Q Doesn't prompt for user\n"
+RMDIR [/S] [/Q] [drive:]path\nRD [/S] [/Q] [drive:]path\n\
+ /S Deletes all files and folders within the target.\n\
+ /Q Doesn't prompt for user.\n"
STRING_RMDIR_HELP2 "Directory is not empty!\n"
STRING_REN_HELP1 "Renames a file/directory or files/directories.\n\n\
RENAME [/E /N /P /Q /S /T] old_name ... new_name\n\
@@ -503,7 +503,7 @@ title new title\n"
STRING_FREE_ERROR2 "unlabeled"
STRING_GOTO_ERROR1 "No label specified for GOTO\n"
STRING_GOTO_ERROR2 "Label '%s' not found\n"
- STRING_MD_ERROR "A subdirectory or file already exists.\n"
+ STRING_MD_ERROR "A subdirectory or file %s already exists.\n"
STRING_MD_ERROR2 "The path to the new folder does not exist.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Chyba]\n"
diff --git a/base/shell/cmd/lang/sq-AL.rc b/base/shell/cmd/lang/sq-AL.rc
index c8b002590fa..f31217025f0 100644
--- a/base/shell/cmd/lang/sq-AL.rc
+++ b/base/shell/cmd/lang/sq-AL.rc
@@ -321,9 +321,9 @@ PAUZE [mesazhi]"
STRING_PROMPT_HELP3 "\nSHFAQ pa parametra për të resetuar ne konfigurimet e automatizuara."
STRING_REM_HELP "Nis një linjë koment në një dokument batch.\n\nREM [Koment"
STRING_RMDIR_HELP "Heq një direktori.\n\n\
-RMDIR [drive:]rrugë\nRD [drive:]rrugë\n\
-/S Fshin të gjitha dokumentat dhe dosjet brenda objektivit\n\
-/Q Nuk e shfaq për përdoruesin\n"
+RMDIR [/S] [/Q] [drive:]rrugë\nRD [/S] [/Q] [drive:]rrugë\n\
+ /S Fshin të gjitha dokumentat dhe dosjet brenda objektivit.\n\
+ /Q Nuk e shfaq për përdoruesin.\n"
STRING_RMDIR_HELP2 "Direktoria nuk është e zbrazët!\n"
STRING_REN_HELP1 "Emeron nje dokument/directori ose dokument/skedë.\n\n\
RENAME [/E /N /P /Q /S /T] emrin_e_vjetër ... emrin_e_ri\n\
@@ -501,7 +501,7 @@ title titull i ri\n"
STRING_FREE_ERROR2 "E paetiketuar"
STRING_GOTO_ERROR1 "Nuk ka etiketa specifikuar për GOTO\n"
STRING_GOTO_ERROR2 "Etikete '%s' Nuk u gjet\n"
- STRING_MD_ERROR "Një nën-skedë ose dokument ekziston.\n"
+ STRING_MD_ERROR "Një nën-skedë ose dokument %s ekziston.\n"
STRING_MD_ERROR2 "Rruga për tek skeda e re nuk ekziston.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Error]\n"
diff --git a/base/shell/cmd/lang/sv-SE.rc b/base/shell/cmd/lang/sv-SE.rc
index 4636c1e52e2..41c5131f015 100644
--- a/base/shell/cmd/lang/sv-SE.rc
+++ b/base/shell/cmd/lang/sv-SE.rc
@@ -316,9 +316,9 @@ PAUSE [melding]"
STRING_PROMPT_HELP3 "\nSkriv PROMPT uten parameter för att resette ledetexten."
STRING_REM_HELP "Start en kommentarlinje i en batch-fil.\n\nREM [Kommentar]"
STRING_RMDIR_HELP "Flytter en mapp.\n\n\
-RMDIR [enhet:]mapp\nRD [enhet:]mapp\n\
-/S Sletter alle filer och mappar innenfor målet\n\
-/Q Inte spør før sletting.\n"
+RMDIR [/S] [/Q] [enhet:]mapp\nRD [/S] [/Q] [enhet:]mapp\n\
+ /S Sletter alle filer och mappar innenfor målet.\n\
+ /Q Inte spør før sletting.\n"
STRING_RMDIR_HELP2 "mappn är inte tom!\n"
STRING_REN_HELP1 "Ändra namn på fil/mapp eller filer/mappar.\n\n\
ENDRE NAVN [/E /N /P /Q /S /T] gammelt_namn ... nytt_namn\n\
@@ -495,7 +495,7 @@ tittel ny tittel\n"
STRING_FREE_ERROR2 "utmärkt"
STRING_GOTO_ERROR1 "Inget märke specifiserat för GOTO\n"
STRING_GOTO_ERROR2 "Märke '%s' finns inte\n"
- STRING_MD_ERROR "En undermapp eller fil finns redan.\n"
+ STRING_MD_ERROR "En undermapp eller fil %s finns redan.\n"
STRING_MD_ERROR2 "Stien till den nye mappen exsisterar inte.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Fel]\n"
diff --git a/base/shell/cmd/lang/tr-TR.rc b/base/shell/cmd/lang/tr-TR.rc
index e113222c039..44810d8fef2 100644
--- a/base/shell/cmd/lang/tr-TR.rc
+++ b/base/shell/cmd/lang/tr-TR.rc
@@ -324,9 +324,9 @@ PAUSE [ileti]"
STRING_PROMPT_HELP3 "\nÖn tanımlı ayarlamaya istemi sıfırlamak için değişkensiz PROMPT yazınız."
STRING_REM_HELP "Bir toplu iş kütüğünde bir açıklama yatacı başlatır.\n\nREM [Açıklama]"
STRING_RMDIR_HELP "Bir dizin siler.\n\n\
-RMDIR [sürücü:]yol\nRD [sürücü:]yol\n\
-/S Varış içinde tüm kütükleri ve dizinleri siler.\n\
-/Q Kullanıcı için sorma.\n"
+RMDIR [/S] [/Q] [sürücü:]yol\nRD [/S] [/Q] [sürücü:]yol\n\
+ /S Varış içinde tüm kütükleri ve dizinleri siler.\n\
+ /Q Kullanıcı için sorma.\n"
STRING_RMDIR_HELP2 "Dizin boş değil!\n"
STRING_REN_HELP1 "Bir kütüğü/dizini ya da kütükleri/dizinleri yeniden adlandırır.\n\n\
RENAME [/E /N /P /Q /S /T] eski ad ... yeni ad\n\
@@ -502,7 +502,7 @@ başlık Yeni başlık\n"
STRING_FREE_ERROR2 "etiketlenmemiş"
STRING_GOTO_ERROR1 "GOTO için bir etiket belirlenmemiş.\n"
STRING_GOTO_ERROR2 """%s"" etiketi bulunamadı.\n"
- STRING_MD_ERROR "Bir alt dizin ya da kütük önceden var.\n"
+ STRING_MD_ERROR "Bir alt dizin ya da kütük %s önceden var.\n"
STRING_MD_ERROR2 "Yeni dizin için yol yok.\n"
STRING_MOVE_ERROR1 "[Tamam]\n"
STRING_MOVE_ERROR2 "[Yanlışlık]\n"
diff --git a/base/shell/cmd/lang/uk-UA.rc b/base/shell/cmd/lang/uk-UA.rc
index 8ea0e7f5512..2b6a6e85348 100644
--- a/base/shell/cmd/lang/uk-UA.rc
+++ b/base/shell/cmd/lang/uk-UA.rc
@@ -328,9 +328,9 @@ PAUSE [повiдомлення]"
STRING_PROMPT_HELP3 "\nPROMPT без параметрiв встановлює запрошення командного рядка за замовчуванням."
STRING_REM_HELP "Стартує рядок коментаря впакетному файлi.\n\nREM [Comment]"
STRING_RMDIR_HELP "Видалення каталогу.\n\n\
-RMDIR [диск:]шлях\nRD [диск:]шлях\n\
-/S Видалення всього дерева всерединi цiлi\n\
-/Q Вимкнення запиту пiдтвердження\n"
+RMDIR [/S] [/Q] [диск:]шлях\nRD [/S] [/Q] [диск:]шлях\n\
+ /S Видалення всього дерева всерединi цiлi.\n\
+ /Q Вимкнення запиту пiдтвердження.\n"
STRING_RMDIR_HELP2 "Каталог не порожнiй!\n"
STRING_REN_HELP1 "Перейменування одного чи кiлькох файлiв/каталогiв.\n\n\
RENAME [/E /N /P /Q /S /T] старе_iм'я ... нове_iм'я\n\
@@ -507,7 +507,7 @@ title новий заголовок\n"
STRING_FREE_ERROR2 "не вiдмiчено"
STRING_GOTO_ERROR1 "Не визначена мiтка для GOTO\n"
STRING_GOTO_ERROR2 "Мiтка '%s' не знайдена\n"
- STRING_MD_ERROR "Пiдкаталог чи файл вже iснує.\n"
+ STRING_MD_ERROR "Пiдкаталог чи файл %s вже iснує.\n"
STRING_MD_ERROR2 "Шлях до нового каталогу не iснує.\n"
STRING_MOVE_ERROR1 "[OK]\n"
STRING_MOVE_ERROR2 "[Помилка]\n"
diff --git a/base/shell/cmd/lang/zh-CN.rc b/base/shell/cmd/lang/zh-CN.rc
index b8421123d95..724459ca8f4 100644
--- a/base/shell/cmd/lang/zh-CN.rc
+++ b/base/shell/cmd/lang/zh-CN.rc
@@ -301,9 +301,9 @@ PAUSE [消息]"
STRING_PROMPT_HELP3 "\n执行不带参数的 PROMPT 将会把提示符重置为默认设置。"
STRING_REM_HELP "在批处理文件中开始一行注释。\n\nREM [注释]"
STRING_RMDIR_HELP "删除一个目录。\n\n\
-RMDIR [驱动器:]路径\nRD [驱动器:]路径\n\
-/S 删除目标中的所有文件和文件夹。\n\
-/Q 删除时不要提示。\n"
+RMDIR [/S] [/Q] [驱动器:]路径\nRD [/S] [/Q] [驱动器:]路径\n\
+ /S 删除目标中的所有文件和文件夹。\n\
+ /Q 删除时不要提示。\n"
STRING_RMDIR_HELP2 "目录非空!\n"
STRING_REN_HELP1 "重命名一个或者多个文件或文件夹。\n\n\
RENAME [/E /N /P /Q /S /T] 旧名称 ... 新名称\n\
@@ -467,7 +467,7 @@ RESTORE 恢复窗口\n\
STRING_FREE_ERROR2 "未标记"
STRING_GOTO_ERROR1 "没有为 GOTO 指定标签\n"
STRING_GOTO_ERROR2 "标签 '%s' 未找到\n"
- STRING_MD_ERROR "一个子目录或文件已存在。\n"
+ STRING_MD_ERROR "%s 一个子目录或文件已存在。\n"
STRING_MD_ERROR2 "到新文件夹的路径不存在。\n"
STRING_MOVE_ERROR1 "[成功]\n"
STRING_MOVE_ERROR2 "[错误]\n"
diff --git a/base/shell/cmd/lang/zh-TW.rc b/base/shell/cmd/lang/zh-TW.rc
index 18248aec402..d4e37356d5b 100644
--- a/base/shell/cmd/lang/zh-TW.rc
+++ b/base/shell/cmd/lang/zh-TW.rc
@@ -302,9 +302,9 @@ PAUSE [訊息]"
STRING_PROMPT_HELP3 "\n執行不帶參數的 PROMPT 將會把提示符重置為默認設定。"
STRING_REM_HELP "在批處理檔案中開始一行註釋。\n\nREM [註釋]"
STRING_RMDIR_HELP "刪除一個目錄。\n\n\
-RMDIR [驅動器:]路徑\nRD [驅動器:]路徑\n\
-/S 刪除目標中的所有檔案和資料夾。\n\
-/Q 刪除時不要提示。\n"
+RMDIR [/S] [/Q] [驅動器:]路徑\nRD [/S] [/Q] [驅動器:]路徑\n\
+ /S 刪除目標中的所有檔案和資料夾。\n\
+ /Q 刪除時不要提示。\n"
STRING_RMDIR_HELP2 "目錄非空!\n"
STRING_REN_HELP1 "重新命名一個或者多個檔案或資料夾。\n\n\
RENAME [/E /N /P /Q /S /T] 舊名稱 ... 新名稱\n\
@@ -468,7 +468,7 @@ RESTORE 恢復視窗\n\
STRING_FREE_ERROR2 "未標記"
STRING_GOTO_ERROR1 "沒有為 GOTO 指定標籤\n"
STRING_GOTO_ERROR2 "標籤 '%s' 未找到\n"
- STRING_MD_ERROR "一個子目錄或檔案已存在。\n"
+ STRING_MD_ERROR "%s 一個子目錄或檔案已存在。\n"
STRING_MD_ERROR2 "到新資料夾的路徑不存在。\n"
STRING_MOVE_ERROR1 "[成功]\n"
STRING_MOVE_ERROR2 "[錯誤]\n"
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=82bcb3f9f035f96ea1706…
commit 82bcb3f9f035f96ea1706b0a755ac3d5c9ace234
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Aug 7 02:13:27 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:03 2020 +0200
[CMD] Fix the implementation of EXIT /B when a batch context is active.
---
base/shell/cmd/internal.c | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/base/shell/cmd/internal.c b/base/shell/cmd/internal.c
index 175f4b452a7..b81e6cb5645 100644
--- a/base/shell/cmd/internal.c
+++ b/base/shell/cmd/internal.c
@@ -509,8 +509,12 @@ INT cmd_rmdir (LPTSTR param)
/*
- * set the exitflag to true
+ * Either exits the command interpreter, or quits the current batch context.
*/
+
+/* Enable this define for supporting EXIT /B even when extensions are disabled */
+// #define SUPPORT_EXIT_B_NO_EXTENSIONS
+
INT CommandExit(LPTSTR param)
{
if (!_tcsncmp(param, _T("/?"), 2))
@@ -522,7 +526,7 @@ INT CommandExit(LPTSTR param)
return 0;
}
- if (_tcsnicmp(param, _T("/b"), 2) == 0)
+ if (_tcsnicmp(param, _T("/B"), 2) == 0)
{
param += 2;
@@ -532,8 +536,29 @@ INT CommandExit(LPTSTR param)
*/
if (bc)
{
- bc->current = NULL;
- ExitBatch();
+ /* Windows' CMD compatibility: Use GOTO :EOF */
+ TCHAR EofLabel[] = _T(":EOF");
+
+#ifdef SUPPORT_EXIT_B_NO_EXTENSIONS
+ /*
+ * Temporarily enable extensions so as to support :EOF.
+ *
+ * Our GOTO implementation ensures that, when extensions are
+ * enabled and the label is ':EOF', no immediate change of batch
+ * context (done e.g. via ExitBatch() calls) is performed.
+ * This will therefore ensure that we do not spoil the extensions
+ * state when we restore it below.
+ */
+ BOOL bOldEnableExtensions = bEnableExtensions;
+ bEnableExtensions = TRUE;
+#endif
+
+ cmd_goto(EofLabel);
+
+#ifdef SUPPORT_EXIT_B_NO_EXTENSIONS
+ /* Restore the original state of the extensions */
+ bEnableExtensions = bOldEnableExtensions;
+#endif
}
else
{
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2e4c8c019ebe5d78dbcf4…
commit 2e4c8c019ebe5d78dbcf4397ffa0caa4eabb5d0d
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Jul 22 01:16:53 2020 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed Aug 19 20:36:01 2020 +0200
[CMD] GOTO: Fix label parsing.
We note two things, when CMD searches for the corresponding label in the
batch file:
- the first character of the line is always ignored, unless it's a colon;
- the escape caret ^ is supported and interpreted.
Fixes some cmd_winetests.
---
base/shell/cmd/batch.c | 4 +-
base/shell/cmd/cmd.h | 4 ++
base/shell/cmd/goto.c | 97 ++++++++++++++++++++++++++++++++++---------------
base/shell/cmd/parser.c | 3 --
4 files changed, 74 insertions(+), 34 deletions(-)
diff --git a/base/shell/cmd/batch.c b/base/shell/cmd/batch.c
index a5c31aece09..184911c60a6 100644
--- a/base/shell/cmd/batch.c
+++ b/base/shell/cmd/batch.c
@@ -131,7 +131,7 @@ static LPTSTR BatchParams(LPTSTR s1, LPTSTR s2)
BOOL inquotes = FALSE;
/* Find next parameter */
- while (_istspace(*s2) || (*s2 && _tcschr(_T(",;="), *s2)))
+ while (_istspace(*s2) || (*s2 && _tcschr(STANDARD_SEPS, *s2)))
s2++;
if (!*s2)
break;
@@ -139,7 +139,7 @@ static LPTSTR BatchParams(LPTSTR s1, LPTSTR s2)
/* Copy it */
do
{
- if (!inquotes && (_istspace(*s2) || _tcschr(_T(",;="), *s2)))
+ if (!inquotes && (_istspace(*s2) || _tcschr(STANDARD_SEPS, *s2)))
break;
inquotes ^= (*s2 == _T('"'));
*s1++ = *s2++;
diff --git a/base/shell/cmd/cmd.h b/base/shell/cmd/cmd.h
index a6e780bdc6e..f547389024e 100644
--- a/base/shell/cmd/cmd.h
+++ b/base/shell/cmd/cmd.h
@@ -301,6 +301,10 @@ INT cmd_move (LPTSTR);
INT CommandMsgbox (LPTSTR);
/* Prototypes from PARSER.C */
+
+/* These three characters act like spaces to the parser in most contexts */
+#define STANDARD_SEPS _T(",;=")
+
enum { C_COMMAND, C_QUIET, C_BLOCK, C_MULTI, C_OR, C_AND, C_PIPE, C_IF, C_FOR };
typedef struct _PARSED_COMMAND
{
diff --git a/base/shell/cmd/goto.c b/base/shell/cmd/goto.c
index 5831b25e22f..5174b62417f 100644
--- a/base/shell/cmd/goto.c
+++ b/base/shell/cmd/goto.c
@@ -35,7 +35,7 @@
*/
INT cmd_goto(LPTSTR param)
{
- LPTSTR tmp, tmp2;
+ LPTSTR label, tmp;
DWORD dwCurrPos;
BOOL bRetry;
@@ -59,11 +59,9 @@ INT cmd_goto(LPTSTR param)
return 1;
}
- /* Terminate label at first space char */
- tmp = param + 1;
- while (!_istcntrl(*tmp) && !_istspace(*tmp) && (*tmp != _T(':')))
- ++tmp;
- *tmp = _T('\0');
+ /* Strip leading whitespace */
+ while (_istspace(*param))
+ ++param;
/* Support jumping to the end of the file, only if extensions are enabled */
if (bEnableExtensions &&
@@ -78,6 +76,23 @@ INT cmd_goto(LPTSTR param)
return 0;
}
+ /* Skip the first colon or plus sign */
+ if (*param == _T(':') || *param == _T('+'))
+ ++param;
+ /* Terminate the label at the first delimiter character */
+ tmp = param;
+ while (!_istcntrl(*tmp) && !_istspace(*tmp) &&
+ !_tcschr(_T(":+"), *tmp) && !_tcschr(STANDARD_SEPS, *tmp) /* &&
+ !_tcschr(_T("&|<>"), *tmp) */)
+ {
+ ++tmp;
+ }
+ *tmp = _T('\0');
+
+ /* If we don't have any label, bail out */
+ if (!*param)
+ goto NotFound;
+
/*
* Search the next label starting our position, until the end of the file.
* If none has been found, restart at the beginning of the file, and continue
@@ -89,36 +104,59 @@ INT cmd_goto(LPTSTR param)
retry:
while (BatchGetString(textline, ARRAYSIZE(textline)))
{
- INT pos;
- INT_PTR size;
-
if (bRetry && (bc->mempos >= dwCurrPos))
break;
- /* Strip out any trailing spaces or control chars */
- tmp = textline + _tcslen(textline) - 1;
- while (tmp > textline && (_istcntrl(*tmp) || _istspace(*tmp) || (*tmp == _T(':'))))
- --tmp;
- *(tmp + 1) = _T('\0');
+#if 0
+ /* If this is not a label, continue searching */
+ if (!_tcschr(textline, _T(':')))
+ continue;
+#endif
+
+ label = textline;
+
+ /* A bug in Windows' CMD makes it always ignore the
+ * first character of the line, unless it's a colon. */
+ if (*label != _T(':'))
+ ++label;
+
+ /* Strip any leading whitespace */
+ while (_istspace(*label))
+ ++label;
+
+ /* If this is not a label, continue searching */
+ if (*label != _T(':'))
+ continue;
+
+ /* Skip the first colon or plus sign */
+#if 0
+ if (*label == _T(':') || *label == _T('+'))
+ ++label;
+#endif
+ ++label;
+ /* Strip any whitespace between the colon and the label */
+ while (_istspace(*label))
+ ++label;
+ /* Terminate the label at the first delimiter character */
+ tmp = label;
+ while (!_istcntrl(*tmp) && !_istspace(*tmp) &&
+ !_tcschr(_T(":+"), *tmp) && !_tcschr(STANDARD_SEPS, *tmp) &&
+ !_tcschr(_T("&|<>"), *tmp))
+ {
+ /* Support the escape caret */
+ if (*tmp == _T('^'))
+ {
+ /* Move the buffer back one character */
+ memmove(tmp, tmp + 1, (_tcslen(tmp + 1) + 1) * sizeof(TCHAR));
+ /* We will ignore the new character */
+ }
- /* Then leading spaces... */
- tmp = textline;
- while (_istspace(*tmp))
++tmp;
-
- /* All space after leading space terminate the string */
- size = _tcslen(tmp) - 1;
- pos = 0;
- while (tmp + pos < tmp + size)
- {
- if (_istspace(tmp[pos]))
- tmp[pos]=_T('\0');
- ++pos;
}
+ *tmp = _T('\0');
- tmp2 = param;
- /* Use whole label name */
- if ((*tmp == _T(':')) && ((_tcsicmp(++tmp, param) == 0) || (_tcsicmp(tmp, ++tmp2) == 0)))
+ /* Jump if the labels are identical */
+ if (_tcsicmp(label, param) == 0)
{
/* Do not process any more parts of a compound command */
bc->current = NULL;
@@ -132,6 +170,7 @@ retry:
goto retry;
}
+NotFound:
ConErrResPrintf(STRING_GOTO_ERROR2, param);
ExitBatch();
return 1;
diff --git a/base/shell/cmd/parser.c b/base/shell/cmd/parser.c
index e25b63aa91b..20310c77830 100644
--- a/base/shell/cmd/parser.c
+++ b/base/shell/cmd/parser.c
@@ -39,9 +39,6 @@ static const TCHAR *const IfOperatorString[] =
#define IF_MAX_COMPARISON IF_NEQ
};
-/* These three characters act like spaces to the parser in most contexts */
-#define STANDARD_SEPS _T(",;=")
-
static BOOL IsSeparator(TCHAR Char)
{
return _istspace(Char) || (Char && _tcschr(STANDARD_SEPS, Char));