programs/wcmd: Rename to programs/cmd.
diff --git a/programs/cmd/Cs.rc b/programs/cmd/Cs.rc
new file mode 100644
index 0000000..7dfdd4c
--- /dev/null
+++ b/programs/cmd/Cs.rc
@@ -0,0 +1,233 @@
+/* Hey, Emacs, open this file with -*- coding: cp1250 -*-
+ *
+ * Wine command prompt
+ * Czech Language Support
+ *
+ * Copyright (C) 1999 D A Pickles
+ * Copyright (C) 2004 David Kredba
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
+
+/* Czech strings in CP1250 */
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Nápovìda k ATTRIB\n"
+ WCMD_CALL,
+"CALL <dávkový soubor> je uíván ke sputìní pøíkazù\n\
+z jiného dávkového souboru. Kdy se bìh volaného dávkového souboru ukonèí, kontrola se vrátí\n\
+volajícímu souboru. Pøíkaz CALL mùe pøedávat parametry\n\
+volané proceduøe.\n\
+\n\
+Zmìny v defaultním adresáøi, promìnných prostøedí atd., udìlané\n\
+volanou procedurou jsou zdìdìny volajícím.\n"
+
+ WCMD_CD, "Nápovìda k CD\n"
+ WCMD_CHDIR, "Nápovìda k CHDIR\n"
+
+ WCMD_CLS, "CLS vymae obrazovku terminálu\n"
+
+ WCMD_COPY, "Nápovìda k COPY\n"
+ WCMD_CTTY, "Nápovìda k CTTY\n"
+ WCMD_DATE, "Nápovìda k DATE\n"
+ WCMD_DEL, "Nápovìda k DEL\n"
+ WCMD_DIR, "Nápovìda k DIR\n"
+
+ WCMD_ECHO,
+"ECHO <øetìzec> zobrazí <øetìzec> na pouívaném terminálovém zaøízení.\n\
+\n\
+ECHO ON zpùsobí, e vechny následující pøíkazy v dávkovém souboru budou\n\
+zobrazeny na terminálovém zaøízení pøed svým sputìním.\n\
+\n\
+ECHO OFF vypisování pøíkazù zakáe (ECHO je OFF defaultnì.\n\
+Pøedsadí-li se pøíkazu ECHO OFF @ nebude pøíkaz ECHO OFF vypsán\n\
+na terminálové zaøízení.\n"
+
+ WCMD_ERASE, "Nápovìda k ERASE\n"
+
+ WCMD_FOR,
+"Pøíkaz FOR vykoná zadanou akci pro kadý ze zadané skupiny souborù.\n\
+\n\
+Syntaxe: FOR %promìnná IN (skupina souborù) DO akce\n\
+\n\
+V programu wcmd není tøeba zdvojovat znak % pøed promìnnou pøi pouití pøíkazu\n\ FOR v dávkovém souboru.\n"
+
+ WCMD_GOTO,
+"Pøíkaz GOTO pøedá výkon na jiné místo\n\
+v dávkovém souboru.\n\
+\n\
+Návìtí, kterým se oznaèuje cíl skoku GOTO mùe být a 255 znakù\n\
+dlouhé. Nesmí vak obsahovat mezery (odliné chování od jiných operaèních\n\
+systémù). Existují-li dvì nebo více stejných návìtí v jednom dávkovém\n\
+souboru, pak první bude vykonáno. Skok GOTO na neexistující návìtí\n\
+ukonèí výkon dávkového souboru.\n\
+\n\
+GOTO se nedá pouít interaktivnì.\n"
+
+ WCMD_HELP, "Nápovìda k HELP\n"
+
+ WCMD_IF,
+"IF slouí k podmínìnému výkonu pøíkazù.\n\
+\n\
+Syntaxe: IF [NOT] EXIST soubor pøíkaz\n\
+ IF [NOT] øetìzec1==øetìzec2 pøíkaz\n\
+ IF [NOT] ERRORLEVEL èíslo pøíkaz\n\
+\n\
+Ve druhé formì pøíkazu musí být øetìzec1 a øetìzec2 uzavøeny v dvojitých\n\
+uvozovkách. Srovnání není citlivé na velikost písmen.\n"
+
+ WCMD_LABEL, "LABEL nastavuje jmenovku svazku-disku. \n\
+\n\
+Syntaxe: LABEL [disk:]\n\
+Budete vyzváni k zadání jmenovky.\n\
+Jmenovku si mùete zobrazit pøíkazem VOL.\n"
+
+ WCMD_MD, "Nápovìda k MD\n"
+ WCMD_MKDIR, "Nápovìda k MKDIR\n"
+ WCMD_MOVE,
+"MOVE pøesune soubor èi adresáø na jiné místo v souborovém systému.\n\
+\n\
+Je-li pøesouván adresáø, jsou pøesunuty vechny jeho podadresáøe a soubory.\n\
+\n\
+MOVE sele jsou-li zdrojová a cílová oblast na jednotkách s jinými DOS písmeny diskù.\n"
+
+ WCMD_PATH,
+"PATH zobrazí èi zmìní cesty, v nich wcmd hledá soubory.\n\
+\n\
+PATH bez argumentù zobrazí momentálnì platné nastavení (pøed první zmìnou\n\
+je to hodnota pøevzatá ze souboru wine.conf). Ke zmìnì pøipojte k pøíkazu\n\
+PATH novou cestu.\n\
+\n\
+Je takté moné zmìnit PATH pouitím promìnné prostøedí PATH,\n\
+napøíklad:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE zobrazí na obrazovce text 'Press Return key to continue'\n\
+a vyèká, dokud uivatel nestiskne klávesu Enter. Je to uiteèné hlavnì\n\
+proto, aby si uivatel mohl pøeèíst výstup z výkonu pøedcházejích pøíkazù,\n\
+ne se tyto odrolují z obrazovky.\n"
+
+ WCMD_PROMPT,
+"PROMPT nastaví výzvu pøíkazového øádku.\n\
+\n\
+Øetìzec za pøíkazem PROMPT (a mezerou bezprostøednì za PROMPT)\n\
+se zobrazí na zaèátku kadé nové pøíkazové øádky.\n\
+\n\
+Tyto znaky mají v øetìzcích speciální význam:\n\
+\n\
+$$ Znak dolaru $_ Odøádkování $b Znak roury (|)\n\
+$d Datum $e Escape $g Znaménko vìtí ne\n\
+$l Znaménko mení ne $n Písmeno disku $p Cesta\n\
+$q Rovnítko $t Èas $v Verze wcmd\n\
+\n\
+PROMPT bez parametrù resetuje prompt na defaultní,\n\
+který je sloen z cesty k souèasnému adresáøi (vèetnì písmena disku\n\
+) a znaménka vìtí ne (>).\n\
+(jako je v DOS-u PROMPT $p$g).\n\
+\n\
+Prompt mùe být zmìnìn i zmìnou promìnné prostøedí PROMPT,\n\
+èili pøíkaz 'SET PROMPT=text' má tentý efekt jako 'PROMPT text'\n"
+
+ WCMD_REM,
+"Øádky zaèínající REM (následovaným mezerou)\n\
+nejsou vykonány. REM je proto pouíván jako komentáøový pøíkaz.\n"
+
+ WCMD_REN, "Nápovìda k REN\n"
+ WCMD_RENAME, "Nápovìda k RENAME\n"
+ WCMD_RD, "Nápovìda k RD\n"
+ WCMD_RMDIR, "Nápovìda k RMDIR\n"
+
+ WCMD_SET,
+"SET zobrazí nebo zmìní promìnné prostøedí wcmd.\n\
+\n\
+SET bez argumentù ukáe souèasné nastavení prostøedí.\n\
+\n\
+Syntaxe pro nastavení a zmìnu promìnné prostøedí je:\n\
+\n\
+ SET <promìnná>=<hodnota>\n\
+ \n\
+ kde <promìnná> a <hodnota> musí být prosta mezer\n\
+ a speciálních znakù a mezi <promìnná> rovnítko <hodnota>\n\
+ nesmí být mezery.\n\
+ \n\
+ Ve Wine jsou viditelné promìnné prostøedí operaèního\n\
+ systému, ve kterém je Wine sputìn. Proto uvidíte mnohem víc promìnných\n\
+ prostøedí, ne u nativní Win32 implementace. Není moné\n\
+ mìnit promìnné prostøedí hostitelského operaèního systému z wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT uíván v dávkových souborech k odstranìní jednoho parametru ze zaèátku\n\
+jejich seznamu, take parametr 2 se stane parametrem 1 atd. Nemá ádný\n\
+efekt, je-li zadán na pøíkazovou øádku.\n"
+
+ WCMD_TIME, "Nápovìda k TIME\n"
+
+ WCMD_TITLE, "Nastaví titulek okna wcmd, syntaxe TITLE [øetìzec]\n"
+
+ WCMD_TYPE,
+"TYPE <soubor> vypíe <soubor> na konzolové zaøízení (nebo jinam,\n\
+je-li výstup pøemìrován). Není zjiováno, bude-li vypsán èitelný text.\n"
+
+ WCMD_VERIFY,
+"VERIFY je pouíván k nastavení nebo zjitìní stavu pøíznaku verify.\n\
+Syntaxe:\n\
+\n\
+VERIFY ON Nastaví pøíznak\n\
+VERIFY OFF Zruí pøíznak\n\
+VERIFY Zobrazí aktuální stav.\n\
+\n\
+Pøíznak verify nemá ve Wine ádnou funkci.\n"
+
+ WCMD_VER,
+"VER zobrazí verzi sputìného programu wcmd.\n"
+
+ WCMD_VOL, "Nápovìda k VOL\n"
+
+ WCMD_EXIT,
+"EXIT ukonèí bìící sezení a vrátí kontrolu\n\
+operaènímu systému nebo pøíkazovému interpretu,\n\
+ze kterého byl wcmd sputìn.\n"
+
+ 1000, "Vestavìné pøíkazy WCMD jsou:\n\
+ATTRIB\t\tZobrazí nebo nastaví DOS-ovské souborové attributy\n\
+CALL\t\tZavolá dávkový soubor z jiného\n\
+CD (CHDIR)\tZmìní pracovní adresáø\n\
+CLS\t\tVymae okno terminálu\n\
+COPY\t\tKopíruje soubory\n\
+CTTY\t\tZmìní vstupnì/výstupní zaøízení\n\
+DATE\t\tUkáe nebo nastaví systémové datum\n\
+DEL (ERASE)\tSmae jeden nebo více souborù\n\
+DIR\t\tVypíe obsah adresáøe\n\
+ECHO\t\tVypíe text na terminál\n\
+HELP\t\tZobrazí detailní nápovìdu k tématu\n\
+MD (MKDIR)\tVytvoøí adresáø\n\
+MOVE\t\tPøesune soubor, skupinu souborù nebo adresáøový strom\n\
+PATH\t\tNastaví nebo ukáe prohledávané cesty\n\
+PROMPT\t\tZmìní výzvu pøíkazového øádku\n\
+REN (RENAME)\tPøejmenuje soubor\n\
+RD (RMDIR)\tSmae adresáø\n\
+SET\t\tNastaví nebo zobrazí promìnnou prostøedí\n\
+TIME\t\tUkáe èi nastaví systémový èas\n\
+TITLE\t\tNastaví titulek okna bìící WCMD instance\n\
+TYPE\t\tVypíe obsah textového souboru\n\
+VER\t\tZobrazí verzi WCMD\n\
+VOL\t\tUkáe jmenovku disku\n\
+EXIT\t\tUkonèí WCMD\n\n\
+Zadejte HELP <pøíkaz> pro podrobnìjí informace o nìkterém z výe uvedených pøíkazù\n"
+}
diff --git a/programs/cmd/De.rc b/programs/cmd/De.rc
new file mode 100644
index 0000000..22859e0
--- /dev/null
+++ b/programs/cmd/De.rc
@@ -0,0 +1,250 @@
+/*
+ * Wine command prompt
+ * German Language Support
+ *
+ * Copyright 2004 Henning Gerhardt
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_GERMAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Hilfe für ATTRIB\n"
+ WCMD_CALL,
+"CALL <Batchdateiname> wird in einer Batchdatei genutzt, um Befehle aus\n\
+einer anderen Batchdatei auszuführen. Wenn die Batchdatei exisiert, kehrt\n\
+die Kontrolle zu der Datei zurück, die sie gerufen hat. Der CALL Befehl kann\n\
+Parameter zu der rufenden Prozedure übertragen.\n\
+\n\
+Änderungen für das aktuelle Verzeichnis, Umgebungsvariablen usw. werden in\n\
+der gerufenen Prozedur gemacht, die sie von der aufgerufenen geerbt hat.\n"
+
+ WCMD_CD, "Hilfe für CD\n"
+ WCMD_CHDIR, "Hilfe für CHDIR\n"
+
+ WCMD_CLS, "CLS löscht den Inhalt der Konsole\n"
+
+ WCMD_COPY, "Hilfe für COPY\n"
+ WCMD_CTTY, "Hilfe für CTTY\n"
+ WCMD_DATE, "Hilfe für DATE\n"
+ WCMD_DEL, "Hilfe für DEL\n"
+ WCMD_DIR, "Hilfe für DIR\n"
+
+ WCMD_ECHO,
+"ECHO <Zeichenkette> zeigt die <Zeichenkette> auf dem aktuellen Terminalgerät.\n\
+\n\
+ECHO ON bewirkt, dass alle nachfolgenden Befehle in einer Batchdatei zuerst\n\
+auf dem Terminalgerät angezeigt und danach ausgeführt werden.\n\
+\n\
+ECHO OFF kehrt den Effekt des vorherigen ECHO ON (ECHO ist standardmässig\n\
+auf OFF) um. Um den ECHO OFF Befehl nicht anzeigen zu lassen, kann vor dessen\n\
+ein @ Zeichen gesetzt werden.\n"
+
+ WCMD_ERASE, "Hilfe für ERASE\n"
+
+ WCMD_FOR,
+"Der FOR Befehl wird genutzt, um einen Befehl für eine Menge von Dateien\n\
+einzeln auszuführen.\n\
+\n\
+Syntax: FOR %Variable IN (set) DO Befehl\n\
+\n\
+Die Anforderung das % Zeichen zu verdoppeln, sobald FOR in einer Batchdatei\n\
+benutzt wird, existiert im WCMD nicht.\n"
+
+ WCMD_GOTO,
+"Der GOTO Befehl transferiert die Ausführung zu einer anderen Stelle in einer\n\
+Batchdatei.\n\
+\n\
+Die Bezeichnung, die das Ziel eines GOTO's ist, kann bis zu 255 Zeichen lang\n\
+sein, darf aber keine Leerzeichen enthakten (dies ist der Unterschied zu\n\
+anderen Betriebssystemen). Wenn zwei oder mehr identische Bezeichnungen in\n\
+einer Batchdatei existieren, dann wird immer zu der ersten Bezeichnung\n\
+gesprungen. Versucht GOTO zu einer nicht vorhanden Bezeichnung zu springen,\n\
+beendet sich die Ausführung der Batchdatei.\n\
+\n\
+GOTO hat keine Auswirkungen, wenn es interaktiv genutzt wird.\n"
+
+ WCMD_HELP, "Hilfe für HELP\n"
+
+ WCMD_IF,
+"IF wird benutzt, um einen Befehl bedingt auszuführen.\n\
+\n\
+Syntax: IF [NOT] EXIST Dateiname Befehl\n\
+ IF [NOT] Zeichenkette1==Zeichenkette2 Befehl\n\
+ IF [NOT] ERRORLEVEL Nummer Befehl\n\
+\n\
+In der zweiten Form des Befehls, müssen die beiden Zeichenketten in doppelten\n\
+Anführungszeichen stehen. Der Vergleich achtet nicht auf die Groß- und\n\
+Kleinschreibung.\n"
+
+ WCMD_LABEL,
+"LABEL wird benutzt, um die Laufwerksbezeichnung festzulegen.\n\
+\n\
+Syntax: LABEL [Laufwerk:]\n\
+\n\
+Der Befehl wartet auf die Eingabe einer neuen Bezeichnung für das angegebene\n\
+Laufwerk. Sie können sich auch die Laufwerksbezeicnung mit dem VOL - Befehl\n\
+anzeigen lassen.\n"
+
+ WCMD_MD, "Hilfe für MD\n"
+ WCMD_MKDIR, "Hilfe für MKDIR\n"
+ WCMD_MOVE,
+"MOVE verschiebt eine Datei oder ein Verzeichnis zu einem neuen Punkt im\n\
+Dateisystem.\n\
+\n\
+Ist das zu verschiebende Objekt ein Verzeichnis, dann werden alle Dateien und\n\
+Unterverzeichnisse unterhalb des Objektes genauso verschoben.\n\
+\n\
+MOVE schlägt fehl, wenn die alte und die neue Position auf verschiedenen DOS\n\
+Laufwerken sind.\n"
+
+ WCMD_PATH,
+"PATH ändert oder zeigt den WCMD Suchpfad an.\n\
+\n\
+Nach der Eingabe von PATH, wird die aktuelle PATH Einstellung angezeigt\n\
+(nach dem Start wird der Wert aus der wine.conf Datei genommen). Um die\n\
+Einstellungen zu ändern, muss nach dem PATH Befehl der neue Wert angegeben\n\
+werden\n\
+\n\
+Es ist auch möglich den PATH mit Hilfe der PATH Umgebungsvariable zu\n\
+modifizieren. Zum Beispiel:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE lässt eine Meldung auf dem Bildschirm erscheinen\n\
+'Press Return key to continue' und wartet darauf, dass der Nutzer die\n\
+Return/Enter-Taste drückt. Es wird hauptsächlich in Batchdateien genutzt,\n\
+um dem Nutzer zu erlauben, die Ausgabe eines vorherigen Befehls zu lesen,\n\
+bevor es durch Scrollen vom Bildschirm verschwindet.\n"
+
+ WCMD_PROMPT,
+"PROMPT setzt den Befehlszeilenprompt.\n\
+\n\
+Die Zeichenkette, die dem PROMPT Befehl folgt (und dem Leerzeichen\n\
+unmittelbar danach), erscheint am Zeilenanfang, wenn WCMD auf die Eingabe\n\
+wartet.\n\
+\n\
+Die nachfolgenden Zeichen haben eine besondere Bedeutung:\n\
+\n\
+$$ Dollarzeichen $_ Zeilenvorschub $b Pipe Zeichen (|)\n\
+$d aktuelles Datum $e Escape $g > Zeichen\n\
+$l < Zeichen $n akutelles Laufwerk $p aktueller Pfad\n\
+$q Gleichheitszeichen $t aktuelle Zeit $v wcmd Version\n\
+\n\
+Hinweis: Die Eingabe des PROMPT Befehls ohne eine Prompt-Zeichenkette, setzt\n\
+den Prompt zu den Standardwert zurück, was das aktuelle Verzeichnis (inklusive\n\
+dem aktuellen Laufwerksbuchstaben) gefolgt von einen Größerzeichen (>)\n\
+(genau wie der PROMPT $p$g Befehl).\n\
+\n\
+Der Prompt kann auch geändert werden durch das Ändern der PROMPT\n\
+Umgebungsvariable, so hat der Befehl 'SET PROMPT=text' die gleiche Auswirkung\n\
+wie 'PROMPT text'.\n"
+
+ WCMD_REM,
+"Beginnt eine Befehlszeile mit REM (gefolgt von einem Leerzeichen), wird\n\
+keine Aktion ausgeführt und kann deshalb auch als Kommentar in einer\n\
+Batchdatei genutzt werden.\n"
+
+ WCMD_REN, "Hilfe für REN\n"
+ WCMD_RENAME, "Hilfe für RENAME\n"
+ WCMD_RD, "Hilfe für RD\n"
+ WCMD_RMDIR, "Hilfe für RMDIR\n"
+
+ WCMD_SET,
+"SET ändert oder zeigt die WCMD Umgebungsvariablen an.\n\
+\n\
+SET ohne Parameter zeigt alle aktuellen Umgebungsvariablen an.\n\
+\n\
+Um eine Umgebungsvariable zu erschaffen oder zu ändern, ist der Syntax nötig:\n\
+\n\
+ SET <Variable>=<Wert>\n\
+\n\
+Wobei <Variable> und <Wert> Zeichenkette sind. Es müssen keine Leerzeichen vor\n\
+dem Gleichheitszeichen sein, noch muss der Variablenname in Anführungszeichen\n\
+eingeschlossen sein.\n\
+\n\
+In Wine werden die Umgebungsvariablen des darunterliegenden Betriebssystems\n\
+mit in die Win32 Umgebung eingebunden, deshalb gibt es gewöhnlich mehr Werte\n\
+als es sie in einer ursprünglichen Win32 Realisierung gäbe. Anmerkung: Es ist\n\
+nicht möglich die Umgebungsvariablen des Betriebssystems vom WCMD aus zu\n\
+beeinflussen.\n"
+
+ WCMD_SHIFT,
+"SHIFT wird in einer Batchdatei genutzt, um einen Parameter vom Anfang der\n\
+Liste zu entfernen, so das der Parameter 2 zu Parameter 1 wird und so weiter.\n\
+Es hat keine Auswirkungen, wenn es von der Befehlszeile gerufen wird.\n"
+
+ WCMD_TIME, "Hilfe für TIME\n"
+
+ WCMD_TITLE,
+"Setzt den Fenstertitel für das WCMD - Fenster.\n\
+\n\
+Syntax: TITLE [Zeichenkette]\n"
+
+ WCMD_TYPE,
+"TYPE <Datei> kopiert <Datei> zu dem Konsolengerät (oder dorthin, wohin\n\
+dies umgeleitet wurde). Es wird keine Überprüfung vorgenommen, ob die\n\
+Datei lesbarer Text ist.\n"
+
+ WCMD_VERIFY,
+"VERIFY wird benutzt, um das Verify Flag zu setzen, zu löschen oder zu\n\
+testen. Gültige Eingaben sind:\n\
+\n\
+VERIFY ON Setzt das Flag\n\
+VERIFY OFF Löscht das Flag\n\
+VERIFY Zeigt an, ob ON oder OFF verwendet wird.\n\
+\n\
+Das Verify Flag hat keine Funktion in Wine.\n"
+
+ WCMD_VER,
+"VER zeigt die aktuelle Version von WCMD an.\n"
+
+ WCMD_VOL, "Hilfe für VOL\n"
+
+ WCMD_EXIT,
+"EXIT beendet die aktuelle Befehlssitzung und kehrt zum\n\
+Betriebssystem oder der Shell zurück, von der WCMD gestart wurde.\n"
+
+
+ 1000, "WCMD eingebauten Befehle sind:\n\
+ATTRIB\t\tZeigt an oder ändert die DOS Dateieigenschaften\n\
+CALL\t\tRuft eine Batch-Datei innerhalb einer anderen auf\n\
+CD (CHDIR)\tWechselt in das Verzeichnis\n\
+CLS\t\tLöscht den Inhalt der Konsole\n\
+COPY\t\tKopiert eine Datei\n\
+CTTY\t\tÄndert das Eingabe/Ausgabe - Gerät\n\
+DATE\t\tZeigt an oder ändert das Systemdatum\n\
+DEL (ERASE)\tLöscht eine oder mehrere Dateien\n\
+DIR\t\tListet den Inhalt eines Verzeichnisses\n\
+ECHO\t\tKopiert den Text direkt zur Konsolenausgabe\n\
+HELP\t\tZeigt detalierte Informationen zu einen Thema\n\
+MD (MKDIR)\tErzeugt ein Unterverzeichnis\n\
+MOVE\t\tBewegt eine oder mehrere Dateien oder einen Verzeichnisbaum\n\
+PATH\t\tSetzt oder zeigt den Suchpfad an\n\
+PROMPT\t\tÄndert den Befehlszeilenprompt\n\
+REN (RENAME)\tBenennt eine Datei um\n\
+RD (RMDIR)\tLöscht ein Unterverzeichnis\n\
+SET\t\tSetzt oder zeigt die Umgebungsvariablen an\n\
+TIME\t\tSetzt oder zeigt die aktuelle Systemzeit an\n\
+TITLE\t\tSetzt den Fenstertitel für die WCMD - Sitzung\n\
+TYPE\t\tGibt den Inhalt einer Textdatei aus\n\
+VER\t\tZeigt die aktuelle Version von WCMD an\n\
+VOL\t\tZeigt die Bezeichnung eines Laufwerkes an\n\
+EXIT\t\tBeendet den WCMD\n\n\
+Geben Sie HELP <Befehl> ein, damit Sie weitere Informationen für einen der\n\
+obigen Befehle erhalten.\n"
+}
diff --git a/programs/cmd/En.rc b/programs/cmd/En.rc
new file mode 100644
index 0000000..fda556e
--- /dev/null
+++ b/programs/cmd/En.rc
@@ -0,0 +1,229 @@
+/*
+ * Wine command prompt
+ * English Language Support
+ *
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Help about ATTRIB\n"
+ WCMD_CALL,
+"CALL <batchfilename> is used within a batch file to execute commands\n\
+from another batch file. When the batch file exits, control returns to\n\
+the file which called it. The CALL command may supply parameters to the\n\
+called procedure.\n\
+\n\
+Changes to default directory, environment variables etc made within a\n\
+called procedure are inherited by the caller.\n"
+
+ WCMD_CD, "Help about CD\n"
+ WCMD_CHDIR, "Help about CHDIR\n"
+
+ WCMD_CLS, "CLS clears the console screen\n"
+
+ WCMD_COPY, "Help about COPY\n"
+ WCMD_CTTY, "Help about CTTY\n"
+ WCMD_DATE, "Help about DATE\n"
+ WCMD_DEL, "Help about DEL\n"
+ WCMD_DIR, "Help about DIR\n"
+
+ WCMD_ECHO,
+"ECHO <string> displays <string> on the current terminal device.\n\
+\n\
+ECHO ON causes all subsequent commands in a batch file to be displayed\n\
+on the terminal device before they are executed.\n\
+\n\
+ECHO OFF reverses the effect of a previous ECHO ON (ECHO is OFF by\n\
+default). The ECHO OFF command can be prevented from displaying by\n\
+preceding it with an @ sign.\n"
+
+ WCMD_ERASE, "Help about ERASE\n"
+
+ WCMD_FOR,
+"The FOR command is used to execute a command for each of a set of files.\n\
+\n\
+Syntax: FOR %variable IN (set) DO command\n\
+\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
+not exist in wine's cmd.\n"
+
+ WCMD_GOTO,
+"The GOTO command transfers execution to another statement within a\n\
+batch file.\n\
+\n\
+The label which is the target of a GOTO may be up to 255 characters\n\
+long but may not include spaces (this is different from other operating\n\
+systems). If two or more identical labels exist in a batch file the\n\
+first one will always be executed. Attempting to GOTO a nonexistent\n\
+label terminates the batch file execution.\n\
+\n\
+GOTO has no effect when used interactively.\n"
+
+ WCMD_HELP, "Help about HELP\n"
+
+ WCMD_IF,
+"IF is used to conditionally execute a command.\n\
+\n\
+Syntax: IF [NOT] EXIST filename command\n\
+ IF [NOT] string1==string2 command\n\
+ IF [NOT] ERRORLEVEL number command\n\
+\n\
+In the second form of the command, string1 and string2 must be in double\n\
+quotes. The comparison is not case-sensitive.\n"
+
+ WCMD_LABEL, "LABEL is used to set a disk volume label. \n\
+\n\
+Syntax: LABEL [drive:]\n\
+The command will prompt you for the new volume label for the given drive.\n\
+You can display the disk volume label with the VOL command.\n"
+
+ WCMD_MD, "Help about MD\n"
+ WCMD_MKDIR, "Help about MKDIR\n"
+ WCMD_MOVE,
+"MOVE relocates a file or directory to a new point within the file system.\n\
+\n\
+If the item being moved is a directory then all the files and subdirectories\n\
+below the item are moved as well.\n\
+\n\
+MOVE fails if the old and new locations are on different DOS drive letters.\n"
+
+ WCMD_PATH,
+"PATH displays or changes the cmd search path.\n\
+\n\
+Entering PATH will display the current PATH setting (initially this is\n\
+the value given in your wine.conf file). To change the setting follow the\n\
+PATH command with the new value.\n\
+\n\
+It is also possible to modify the PATH by using the PATH environment\n\
+variable, for example:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE displays a message on the screen 'Press Return key to continue'\n\
+and waits for the user to press the Return key. It is mainly useful in\n\
+batch files to allow the user to read the output of a previous command\n\
+before it scrolls off the screen.\n"
+
+ WCMD_PROMPT,
+"PROMPT sets the command-line prompt.\n\
+\n\
+The string following the PROMPT command (and the space immediately after)\n\
+appears at the beginning of the line when cmd is waiting for input.\n\
+\n\
+The following character strings have the special meaning shown:\n\
+\n\
+$$ Dollar sign $_ Linefeed $b Pipe sign (|)\n\
+$d Current date $e Escape $g > sign\n\
+$l < sign $n Current drive $p Current path\n\
+$q Equal sign $t Current time $v cmd version\n\
+\n\
+Note that entering the PROMPT command without a prompt-string resets the\n\
+prompt to the default, which is the current directory (which includes the\n\
+current drive letter) followed by a greater-than (>) sign.\n\
+(like a command PROMPT $p$g).\n\
+\n\
+The prompt can also be changed by altering the PROMPT environment variable,\n\
+so the command 'SET PROMPT=text' has the same effect as 'PROMPT text'\n"
+
+ WCMD_REM,
+"A command line beginning REM (followed by a space) performs no\n\
+action, and can therefore be used as a comment in a batch file.\n"
+
+ WCMD_REN, "Help about REN\n"
+ WCMD_RENAME, "Help about RENAME\n"
+ WCMD_RD, "Help about RD\n"
+ WCMD_RMDIR, "Help about RMDIR\n"
+
+ WCMD_SET,
+"SET displays or changes the cmd environment variables.\n\
+\n\
+SET without parameters shows all of the current environment.\n\
+\n\
+To create or modify an environment variable the syntax is:\n\
+\n\
+ SET <variable>=<value>\n\
+\n\
+where <variable> and <value> are character strings. There must be no\n\
+spaces before the equals sign, nor can the variable name\n\
+have embedded spaces.\n\
+\n\
+Under Wine, the environment of the underlying operating system is\n\
+included into the Win32 environment, there will generally therefore be\n\
+many more values than in a native Win32 implementation. Note that it is\n\
+not possible to affect the operating system environment from within cmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT is used in a batch file to remove one parameter from the head of\n\
+the list, so parameter 2 becomes parameter 1 and so on. It has no effect\n\
+if called from the command line.\n"
+
+ WCMD_TIME, "Help about TIME\n"
+
+ WCMD_TITLE, "Sets the window title for the cmd window, syntax TITLE [string]\n"
+
+ WCMD_TYPE,
+"TYPE <filename> copies <filename> to the console device (or elsewhere\n\
+if redirected). No check is made that the file is readable text.\n"
+
+ WCMD_VERIFY,
+"VERIFY is used to set, clear or test the verify flag. Valid forms are:\n\
+\n\
+VERIFY ON Set the flag\n\
+VERIFY OFF Clear the flag\n\
+VERIFY Displays ON or OFF as appropriate.\n\
+\n\
+The verify flag has no function in Wine.\n"
+
+ WCMD_VER,
+"VER displays the version of cmd you are running\n"
+
+ WCMD_VOL, "Help about VOL\n"
+
+ WCMD_EXIT,
+"EXIT terminates the current command session and returns\n\
+to the operating system or shell from which you invoked cmd.\n"
+
+ 1000, "CMD built-in commands are:\n\
+ATTRIB\t\tShow or change DOS file attributes\n\
+CALL\t\tInvoke a batch file from inside another\n\
+CD (CHDIR)\tChange current default directory\n\
+CLS\t\tClear the console screen\n\
+COPY\t\tCopy file\n\
+CTTY\t\tChange input/output device\n\
+DATE\t\tShow or change the system date\n\
+DEL (ERASE)\tDelete a file or set of files\n\
+DIR\t\tList the contents of a directory\n\
+ECHO\t\tCopy text directly to the console output\n\
+HELP\t\tShow brief help details on a topic\n\
+MD (MKDIR)\tCreate a subdirectory\n\
+MOVE\t\tMove a file, set of files or directory tree\n\
+PATH\t\tSet or show the search path\n\
+PROMPT\t\tChange the command prompt\n\
+REN (RENAME)\tRename a file\n\
+RD (RMDIR)\tDelete a subdirectory\n\
+SET\t\tSet or show environment variables\n\
+TIME\t\tSet or show the current system time\n\
+TITLE\t\tSet the window title for the CMD session\n\
+TYPE\t\tType the contents of a text file\n\
+VER\t\tShow the current version of CMD\n\
+VOL\t\tShow the volume label of a disk device\n\
+EXIT\t\tClose down CMD\n\n\
+Enter HELP <command> for further information on any of the above commands\n"
+}
diff --git a/programs/cmd/Es.rc b/programs/cmd/Es.rc
new file mode 100644
index 0000000..179fbfb
--- /dev/null
+++ b/programs/cmd/Es.rc
@@ -0,0 +1,245 @@
+/*
+ * Wine command prompt
+ * Spanish Language Support
+ *
+ * Copyright (C) 2004 José Manuel Ferrer Ortiz
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_SPANISH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Ayuda sobre ATTRIB\n"
+ WCMD_CALL,
+"CALL <nombre de archivo por lotes> se utiliza dentro de un archivo por\n\
+lotes para ejecutar comandos desde otro archivo por lotes. Cuando el\n\
+archivo por lotes existe, el control regresa al archivo que lo llamó. El\n\
+comando CALL puede proporcionar parámetros para el procedimiento llamado.\n\
+\n\
+Los cambios sobre el directorio por defecto, variables de entorno, etc.\n\
+realizados desde dentro de un procedimiento llamado son heredados por el\n\
+llamante.\n"
+
+ WCMD_CD, "Ayuda sobre CD\n"
+ WCMD_CHDIR, "Ayuda sobre CHDIR\n"
+
+ WCMD_CLS, "CLS limpia la pantalla de la consola\n"
+
+ WCMD_COPY, "Ayuda sobre COPY\n"
+ WCMD_CTTY, "Ayuda sobre CTTY\n"
+ WCMD_DATE, "Ayuda sobre DATE\n"
+ WCMD_DEL, "Ayuda sobre DEL\n"
+ WCMD_DIR, "Ayuda sobre DIR\n"
+
+ WCMD_ECHO,
+"ECHO <cadena> muestra <cadena> en el dispositivo de terminal actual.\n\
+\n\
+ECHO ON provoca que todos los comandos subsiguientes en un archivo por\n\
+lotes sean mostrados en el terminal antes de ser ejecutados.\n\
+\n\
+ECHO OFF invierte el efecto de un previo ECHO ON (ECHO es OFF por\n\
+defecto). El comando ECHO OFF puede prevenirse de ser mostrado\n\
+precediéndolo por un signo @.\n"
+
+ WCMD_ERASE, "Ayuda sobre ERASE\n"
+
+ WCMD_FOR,
+"El comando FOR se utiliza para ejecutar un comando para cada uno de\n\
+un conjunto de archivos.\n\
+\n\
+Sintaxis: FOR %variable IN (conjunto) DO comando\n\
+\n\
+La necesidad de doblar el signo % cuando se utiliza FOR en un archivo\n\
+por lotes no existe en wcmd.\n"
+
+ WCMD_GOTO,
+"El comando GOTO transfiere la ejecución a otro mandato dentro de un\n\
+archivo por lotes.\n\
+\n\
+La etiqueta que es el objetivo de un comando GOTO puede ser de hasta\n\
+255 caracteres de longitud pero no puede incluir espacios (esto es\n\
+diferente a otros sistemas operativos). Si dos o más etiquetas\n\
+idénticas existen en un archivo por lotes, la primera de ellas será\n\
+siempre la que se ejecutará. El intento de hacer GOTO a una etiqueta\n\
+no existente termina la ejecución del archivo por lotes.\n\
+\n\
+GOTO no tiene efecto cuando se usa interactivamente.\n"
+
+ WCMD_HELP, "Ayuda sobre HELP\n"
+
+ WCMD_IF,
+"IF se utiliza para ejecutar condicionalmente un comando.\n\
+\n\
+Sintaxis: IF [NOT] EXIST nombre_archivo comando\n\
+ IF [NOT] cadena1==cadena2 comando\n\
+ IF [NOT] ERRORLEVEL número comando\n\
+\n\
+En la segunda forma del comando, cadena1 y cadena2 deben estar entre\n\
+comillas dobles. La comparación no distingue mayúsculas de minúsculas.\n"
+
+ WCMD_LABEL, "LABEL se utiliza para ajustar una etiqueta de volumen\n\
+ de disco.\n\
+\n\
+Sintaxis: LABEL [unidad:]\n\
+El comando le pedirá la nueva etiqueta de volumen para la unidad dada.\n\
+Puede ver la etiqueta de volumen del disco con el comando VOL.\n"
+
+ WCMD_MD, "Ayuda sobre MD\n"
+ WCMD_MKDIR, "Ayuda sobre MKDIR\n"
+ WCMD_MOVE,
+"MOVE realoja un archivo o directorio a un nuevo punto del sistema de\n\
+archivos.\n\
+\n\
+Si el elemento siendo movido es un directorio, entonces todos los\n\
+archivos y subdirectorios por debajo del elemento son movidos también.\n\
+\n\
+MOVE falla si la localización vieja y la nueva están en diferentes\n\
+letras de unidad de DOS.\n"
+
+ WCMD_PATH,
+"PATH muestra o cambia la ruta de búsqueda de wcmd.\n\
+\n\
+Al introducir PATH se mostrará la configuración actual de PATH\n\
+(inicialmente esto es el valor dado en su archivo wine.conf). Para\n\
+cambiar la configuración acompañe al comando PATH con el nuevo valor.\n\
+\n\
+También es posible modificar el PATH usando la variable de entorno\n\
+PATH, por ejamplo:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE muestra un mensaje en la pantalla 'Pulse la tecla Return para\n\
+continuar' y espera que el usuario pulse la tecla Return. Es\n\
+principalmente útil en archivos por lotes para permitir al usuario\n\
+leer la salida de un comando anterior antes de que se desplace fuera\n\
+de la pantalla.\n"
+
+ WCMD_PROMPT,
+"PROMPT ajusta el prompt de la línea de comandos.\n\
+\n\
+La cadena que sigue al comando PROMPT (y el espacio inmediatamente\n\
+después) aparece al principio de la línea cuando wcmd está esperando\n\
+la entrada.\n\
+\n\
+Las siguientes cadenas de caracteres tienen el significado especial\n\
+que se muestra:\n\
+\n\
+$$ Signo dólar $_ Nueva línea $b Signo de tubo (|)\n\
+$d Fecha actual $e Escape $g Signo >\n\
+$l Signo < $n Unidad actual $p Ruta actual\n\
+$q Signo igual $t Hora actual $v Versión de wcmd\n\
+\n\
+Nótese que si se introduce el comando PROMPT sin una cadena de prompt\n\
+reinicializa el prompt al valor por defecto, que es el directorio\n\
+actual (que incluye la letra de la unidad actual) seguido por un signo\n\
+mayor que (>).\n\
+(como un comando PROMPT $p$g).\n\
+\n\
+El prompt puede también ser cambiado alterando la variable de entorno\n\
+PROMPT, por lo que el comando 'SET PROMPT=texto' tiene el mismo efecto\n\
+que 'PROMPT texto'\n"
+
+ WCMD_REM,
+"Una línea de comandos que empieza por REM (seguido de un espacio) no\n\
+realiza ninguna acción, y puede por tanto ser utilizada como un\n\
+comentario en un archivo por lotes.\n"
+
+ WCMD_REN, "Ayuda sobre REN\n"
+ WCMD_RENAME, "Ayuda sobre RENAME\n"
+ WCMD_RD, "Ayuda sobre RD\n"
+ WCMD_RMDIR, "Ayuda sobre RMDIR\n"
+
+ WCMD_SET,
+"SET muestra o cambia las variables de entorno de wcmd.\n\
+\n\
+SET sin parámetros muestra todas las variables de entorno actuales.\n\
+\n\
+Para crear o modificar una variable de entorno la sintaxis es:\n\
+\n\
+ SET <variable>=<valor>\n\
+\n\
+donde <variable> y <valor> son cadenas de caracteres. No debe haber\n\
+espacios antes del signo igual, ni la variable puede contener espacios\n\
+embebidos.\n\
+\n\
+Bajo Wine, el entorno del sistema operativo que hay por debajo se\n\
+incluye en el entorno de Win32 por lo que, por lo general, habrá muchos\n\
+más valores que en una implementación Win32 nativa. Nótese que no es\n\
+posible afectar al entorno del sistema operativo desde wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT se utiliza en un archivo por lotes para eliminar un parámetro\n\
+de la cabeza de la lista, por lo que el parámetro 2 se convierte en\n\
+el parámetro 1 y demás. No tiene efecto si se llama desde la línea\n\
+de comando.\n"
+
+ WCMD_TIME, "Ayuda sobre TIME\n"
+
+ WCMD_TITLE,
+"Ajusta el título de la ventana de wcmd, sintaxis TITLE [cadena]\n"
+
+ WCMD_TYPE,
+"TYPE <nombre de archivo> copia <nombre de archivo> al dispositivo de\n\
+consola (o a donde sea si se redirecciona). No se realiza ninguna\n\
+comprobación de si el archivo es texto legible.\n"
+
+ WCMD_VERIFY,
+"VERIFY se usa para poner, quitar o probar la etiqueta de verificación.\n\
+Las formas válidas son:\n\
+\n\
+VERIFY ON Poner la bandera\n\
+VERIFY OFF Quitar la bandera\n\
+VERIFY Muestra ON u OFF como corresponda.\n\
+\n\
+La bandera de verificación no tiene funcionalidad en Wine.\n"
+
+ WCMD_VER,
+"VER muestra la versión de wcmd que está ejecutando\n"
+
+ WCMD_VOL, "Ayuda sobre VOL\n"
+
+ WCMD_EXIT,
+"EXIT termina la sesión de comandos actual y regresa al sistema\n\
+operativo o intérprete de comandos desde el que invocó wcmd.\n"
+
+ 1000, "Los comandos internos de WCMD son:\n\
+ATTRIB\t\tMostrar o cambiar los atributos de archivo de DOS\n\
+CALL\t\tInvocar un archivo por lotes desde dentro de otro\n\
+CD (CHDIR)\tCambiar el directorio por defecto actual\n\
+CLS\t\tVaciar la pantalla de la consola\n\
+COPY\t\tCopiar un archivo\n\
+CTTY\t\tCambiar el dispositivo de entrada/salida\n\
+DATE\t\tMostrar o cambiar la fecha del sistema\n\
+DEL (ERASE)\tEliminar un archivo o conjunto de archivos\n\
+DIR\t\tListar el contenido de un directorio\n\
+ECHO\t\tCopiar texto directamente a la salida de consola\n\
+HELP\t\tMostrar detalles breves de ayuda sobre un tema\n\
+MD (MKDIR)\tCrear un subdirectorio\n\
+MOVE\t\tMover un archivo, conjunto de archivos o árbol de directorio\n\
+PATH\t\tAjustar o cambiar la ruta de búsqueda\n\
+PROMPT\t\tCambiar el prompt de comandos\n\
+REN (RENAME)\tRenombrar un archivo\n\
+RD (RMDIR)\tEliminar un subdirectorio\n\
+SET\t\tAjustar o mostrar variables de entorno\n\
+TIME\t\tAjustar o mostrar la hora actual del sistema\n\
+TITLE\t\tAjustar el título de la ventana para la sesión de WCMD\n\
+TYPE\t\tTeclear el contenido de un archivo de texto\n\
+VER\t\tMostrar la versión actual de WCMD\n\
+VOL\t\tMostrar la etiqueta de volumen de un dispositivo de disco\n\
+EXIT\t\tConcluir WCMD\n\n\
+Introduzca HELP <comando> para más información sobre cualquiera de los comandos\nde arriba\n"
+}
diff --git a/programs/cmd/Fr.rc b/programs/cmd/Fr.rc
new file mode 100644
index 0000000..975bcac
--- /dev/null
+++ b/programs/cmd/Fr.rc
@@ -0,0 +1,227 @@
+/*
+ * Wine command prompt
+ * French Language Support
+ *
+ * Copyright 2003 Sylvain Petreolle
+ *
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Aide d' ATTRIB\n"
+ WCMD_CALL,
+"CALL <fichierbatch> sert à appeler un fichier batch \n\
+depuis un autre fichier batch. Quand le fichier batch sort, le contrôle revient\n\
+au fichier qui l'a appelé. La commande CALL doit être suivie des paramètres\n\
+de la procédure appelée.\n\
+\n\
+Les changements de répertoire courant, de variables d'environment etc. faits\n\
+dans une procédure appelée sont transmis à l'appelant.\n"
+
+ WCMD_CD, "Change le répertoire courant par défaut\n"
+ WCMD_CHDIR, "Change le répertoire courant par défaut\n"
+
+ WCMD_CLS,
+"CLS efface l'écran\n"
+
+ WCMD_COPY, "Aide de COPY\n"
+ WCMD_CTTY, "Aide de CTTY\n"
+ WCMD_DATE, "Aide de DATE\n"
+ WCMD_DEL, "Aide de DEL\n"
+ WCMD_DIR, "Aide de DIR\n"
+
+ WCMD_ECHO,
+"ECHO <chaîne> affiche <chaîne> sur la console courante.\n\
+\n\
+ECHO ON provoque l'affichage de toutes les commandes sur la console\n\
+avant leur exécution.\n\
+\n\
+ECHO OFF annule l'effet de tout précédent ECHO ON (ECHO est OFF par\n\
+défaut). On peut empêcher l'affichage de ECHO OFF en le faisant\n\
+précéder d'un signe @.\n"
+
+ WCMD_ERASE, "Aide de ERASE\n"
+
+ WCMD_FOR,
+"La commande FOR sert à exécuter une commande pour un groupe de fichiers.\n\
+\n\
+Syntaxe: FOR %variable IN (groupe) DO commande\n\
+\n\
+La nécessité de doubler le signe '%' en utilisant FOR dans un fichier batch \n\
+n'existe pas dans wcmd.\n"
+
+ WCMD_GOTO,
+"La commande GOTO transfère l'exécution à un autre label dans un \n\
+fichier batch.\n\
+\n\
+Le label cible de GOTO peut être long de 255 caractères\n\
+mais ne peut inclure d'espaces (ceci est différent d'autres systèmes\n\
+d'exploitation). Si deux ou plusieurs labels identiques sont dans le même fichier \n\
+seul le premier sera exécuté. Essayer de sauter à un label non-existant\n\
+termine l'exécution du fichier batch .\n\
+\n\
+GOTO n'a pas d'effet si utilisé interactivement.\n"
+
+ WCMD_HELP, "Affiche une brève aide sur les commandes internes de WCMD\n"
+
+ WCMD_IF,
+"IF est utilisé pour exécuter une commande de façon conditionnelle.\n\
+\n\
+Syntaxe: IF [NOT] EXIST nomfichier commande\n\
+ IF [NOT] chaîne1==chaîne2 commande\n\
+ IF [NOT] ERRORLEVEL nombre commande\n\
+\n\
+Dans la deuxième forme de la commande, chaîne1 et chaîne2 doivent être \n\
+entre guillemets doubles. La comparaison est insensible à la casse.\n"
+
+ WCMD_LABEL, "LABEL sert à modifier le nom de volume d'un disque. \n\
+\n\
+Syntaxe: LABEL [lecteur:]\n\
+La commnande demandera le nouveau nom de volume pour le lecteur donné.\n\
+Vous pouvez afficher le nom de volume avec la commande VOL.\n"
+
+ WCMD_MD, "Crée le répertoire donné en paramètre.\n"
+ WCMD_MKDIR, "Crée le répertoire donné en paramètre.\n"
+ WCMD_MOVE,
+"MOVE déplace un fichier, un groupe de fichiers ou un répertoire\n\
+à un autre endroit. Si l'objet déplacé est un répertoire alors\n\
+tous les fichiers et sous-répertoires de l'objet sont également déplacés.\n\
+MOVE échoue si l'ancien et le nouvel emplacement sont sur des lecteurs DOS différents.\n"
+
+ WCMD_PATH,
+"PATH affiche ou change le chemin de recherche de wcmd.\n\
+Entrer PATH affichera le réglage courant de PATH (au départ\n\
+c'est la valeur donnée dans le fichier de configuration wine). Pour changer\n\
+le réglage, faites suivre la commande PATH de la nouvelle valeur.\n\
+Il est possible de modifier le PATH en utilisant la variable d'environment PATH, \n\
+par exemple :\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE affiche un message sur l'écran : 'Pressez Entrée pour continuer'\n\
+et attend que l'utilisateur presse la touche Entrée. PAUSE est surtout utilisé dans\n\
+les fichiers batchs pour permettre à l'utilisateur de lire la sortie de\n\
+la dernière commande avant qu'elle ne disparaisse de l'écran.\n"
+
+ WCMD_PROMPT,
+"PROMPT règle l'invite de commande.\n\
+\n\
+La chaîne suivant la commande PROMPT (and the space immediately after)\n\
+apparaît au début de la ligne quand wcmd attend une entrée texte.\n\
+\n\
+Les chaînes de caractères suivantes ont une signification spéciale :\n\
+\n\
+$$ Signe Dollar $_ Saut de ligne $b Signe Pipe (|)\n\
+$d Date courante $e Escape $g Signe >\n\
+$l Signe < $n Lecteur courant $p Répertoire courant\n\
+$q Signe = $t Heure courante $v Version de wcmd\n\
+\n\
+Notez qu'entrer la commande PROMPT sans texte d'invite remet l'invite\n\
+à la valeur par défaut, qui est la lettre du lecteur courant suivie de\n\
+son répertoire courant et d'un signe plus-grand-que (>).\n\
+(Tel que la commande PROMPT $p$g).\n\
+\n\
+L'invite peut aussi être modifiée en changeant la variable d'environment PROMPT,\n\
+donc la commande 'SET PROMPT=texte' a le même effet que 'PROMPT texte'\n"
+
+ WCMD_REM,
+"Une ligne de commande commençant par REM (suivi d'une espace) n'engendre \n\
+aucune action, et peut donc servir de commentaire dans un fichier batch.\n"
+
+ WCMD_REN, "Aide de REN\n"
+ WCMD_RENAME, "Aide de RENAME\n"
+ WCMD_RD, "Efface le répertoire donné en paramètre.\n"
+ WCMD_RMDIR, "Efface le répertoire donné en paramètre.\n"
+
+ WCMD_SET,
+"SET affiche ou change les variables d'environnement de wcmd.\n\
+\n\
+SET sans paramètre affiche l'environnement courant.\n\
+\n\
+Pour créer et modifier une variable d'environnement la syntaxe est:\n\
+\n\
+ SET <variable>=<valeur>\n\
+\n\
+où <variable> et <valeur> sont des chaînes de caractères. Il est à noter que <variable>\n\
+ne peut contenir d'espace, et qu'il ne doit pas y en avoir non plus autour du signe d'égalité.\n\
+\n\
+Sous Wine, l'environment du système hôte est\n\
+inclus dans l'environnment Win32, il y aura par conséquent généralement\n\
+bien plus de valeurs que dans un système Win32 natif. Notez qu'il\n\
+n'est pas possible de modifier l'environnement du système d'exploitation dans wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT est utilisé dans un fichier batch pour enlever un paramètre de la\n\
+liste, ainsi le paramètre 2 devient paramètre 1 et ainsi de suite. Il est sans effet\n\
+s'il est appelé depuis la ligne de commande.\n"
+
+ WCMD_TIME, "Aide de TIME\n"
+
+ WCMD_TITLE,
+"Règle le titre de la fenêtre pour la session wcmd, syntaxe: TITLE [chaîne]\n"
+
+ WCMD_TYPE,
+"TYPE <nomfichier> affiche <nomfichier> sur la console (ou ailleurs\n\
+si redirigé). Aucun test n'est fait quand au format texte du fichier.\n"
+
+ WCMD_VERIFY,
+"VERIFY est utilisé pour positionner, effacer ou tester le flag de vérification.\n\
+Les formes suivantes sont correctes :\n\
+VERIFY ON Positionne le flag\n\
+VERIFY OFF Efface le flag\n\
+VERIFY\t\tAffiche l'état ON ou OFF du flag.\n\
+\n\
+Le flag de verification n'a pas de fonction dans Wine.\n"
+
+ WCMD_VER,
+"VER affiche la version de wcmd actuellement en mémoire.\n"
+
+ WCMD_VOL, "\t\tAffiche le nom de volume d'un lecteur de disque\n"
+
+ WCMD_EXIT,
+"EXIT termine la session de ligne de commande et retourne\n\
+au système d'exploitation ou au shell où vous avez invoqué wcmd.\n"
+
+ 1000, "Les commandes internes WCMD sont:\n\
+ATTRIB\t\tAffiche ou change les attributs de fichiers DOS\n\
+CALL\t\tInvoque un fichier batch à l'intérieur d'un autre\n\
+CD (CHDIR)\tChange le répertoire courant par défaut\n\
+CLS\t\tEfface l'écran\n\
+COPY\t\tCopie un ou plusieurs fichiers\n\
+CTTY\t\tChange le périphérique d'entrée/sortie\n\
+DATE\t\tAffiche ou change la date système\n\
+DEL (ERASE)\tEfface un fichier ou un groupe de fichiers\n\
+DIR\t\tListe le contenu d'un répertoire\n\
+ECHO\t\tAffiche du texte sur la console\n\
+HELP\t\tAffiche de brefs détails sur l'utilisation d'une commande\n\
+MD (MKDIR)\tCrée un répertoire\n\
+MOVE\t\tDéplace un fichier, un groupe de fichiers ou un répertoire\n\
+PATH\t\tRègle ou affiche le chemin de recherche\n\
+PROMPT\t\tChange l'invite de commande\n\
+REN (RENAME)\tRenomme un fichier, un groupe de fichiers ou un répertoire\n\
+RD (RMDIR)\tEfface un répertoire\n\
+SET\t\tRègle ou affiche les variables d'environment\n\
+TIME\t\tRègle ou affiche l'heure système courante\n\
+TITLE\t\tRègle le titre de la fenêtre pour la session WCMD\n\
+TYPE\t\tAffiche le contenu d'un fichier texte\n\
+VER\t\tAffiche la version de wcmd actuellement en mémoire.\n\
+VOL\t\tAffiche le nom de volume d'un lecteur de disque\n\
+EXIT\t\tQuitte WCMD\n\n\
+Entrez HELP <commande> pour plus d'informations sur les commandes ci-dessus\n"
+}
diff --git a/programs/cmd/Ja.rc b/programs/cmd/Ja.rc
new file mode 100644
index 0000000..7663f61
--- /dev/null
+++ b/programs/cmd/Ja.rc
@@ -0,0 +1,231 @@
+/*
+ * Wine command prompt
+ * Japanese Language Support
+ *
+ * Copyright (C) 2004 Hajime Segawa
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_JAPANESE, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "ATTRIBÌwv\n"
+ WCMD_CALL,
+"CALL <ob`t@C¼> ͼÌob`t@C©çR}hðÀs·éê\n\
+Éob`t@CÅgpµÜ·Bob`t@CI¹ÉRg[ÍÄ\n\
+Ñoµ½t@CÉßèÜ·B CALL R}hÍÄÑo³êé豫Ép\n\
+[^ðn·±ÆªÂ\Å·B\n\
+\n\
+ÄÑo³ê½è±«ªsÁ½JgfBNgâ«ÏÌÏXÍÄÑo\n\
+µ³Éø«pªêÜ·B\n"
+
+ WCMD_CD, "CDÌwv\n"
+ WCMD_CHDIR, "CHDIRÌwv\n"
+
+ WCMD_CLS, "CLSÍR\[æÊðNAµÜ·\n"
+
+ WCMD_COPY, "COPYÌwv\n"
+ WCMD_CTTY, "CTTYÌwv\n"
+ WCMD_DATE, "DATEÌwv\n"
+ WCMD_DEL, "DELÌwv\n"
+ WCMD_DIR, "DIRÌwv\n"
+
+ WCMD_ECHO,
+"ECHO <¶ñ> Í<¶ñ>ð»ÝÌ^[~iÉ\¦µÜ·B\n\
+\n\
+ECHO ON ÍÈ~Éob`t@CÅÀs·éR}hðÀsOÉ\n\
+^[~iÉ\¦·éæ¤ÉµÜ·B\n\
+\n\
+ECHO OFF ÍECHO ONÌtÌøÊð¿Ü·B (ECHOÍftHg\n\
+ÅÍOFFÅ·)BECHO OFF R}hÍ@}[Nɱ¯ÄÀs·êÎ\n\
+\¦³êܹñB\n"
+
+ WCMD_ERASE, "ERASEÌwv\n"
+
+ WCMD_FOR,
+"FOR R}hÍ»ê¼êÌt@CÉεÄR}hðÀs·é\n\
+êÉgpµÜ·B\n\
+\n\
+¶@: FOR %Ï IN (Zbg) DO R}h\n\
+\n\
+wcmdàɶݵȢob`t@CÅFORðgp·éêÍ%L\n\
+ðñdÉ·éKvª èÜ·B\n"
+
+ WCMD_GOTO,
+"GOTO R}hÍob`t@CÅÀssð¼ÌXe[ggÉ\n\
+ڵܷB\n\
+\n\
+GOTO ¶Ì^[QbgÆÈéxͼp255¶ÈàÅ·ªAó\n\
+ðÜñÅÍ¢¯Ü¹ñB(±êͼÌIy[eBOVXeÅÍ\n\
+ÙÈèÜ·)BñÂÈã¯êÌxª¶Ý·éêÍíÉĄ̊\n\
+ªÀs³êÜ·BGOTO¶É¶ÝµÈ¢xðwèµ½êÍob\n\
+`t@CÌÀsðfµÜ·B\n\
+\n\
+GOTO ÍÎb[hÅgp³ê½êÍÓ¡ð¿Ü¹ñB\n"
+
+ WCMD_HELP, "HELPÌwv\n"
+
+ WCMD_IF,
+"IF ÍðÉîâÄR}hðÀs·éêÉgpµÜ·B\n\
+\n\
+¶@: IF [NOT] EXIST t@C¼ R}h\n\
+ IF [NOT] ¶ñ1==¶ñ2 R}h\n\
+ IF [NOT] ERRORLEVEL Ô R}h\n\
+\n\
+ñÔÚÌ`®É¨¢ÄA¶ñ1ƶñ2Í_uNI[gÅÍíê\n\
+ĢȯêÎÈèܹñBå¶Æ¬¶ÍæÊ³êܹñB\n"
+
+ WCMD_LABEL, "LABEL ÍfBXNÌ{
[xðÝè·éêÉgpµÜ·B\n\
+\n\
+¶@: LABEL [hCu:]\n\
+R}hðÀs·éÆwèµ½hCuÌVµ¢{
[¼ðvµÜ·B\n\
+fBXNÌ{
[xÍVOLR}hÅ\¦Å«Ü·B\n"
+
+ WCMD_MD, "MDÌwv\n"
+ WCMD_MKDIR, "MKDIRÌwv\n"
+ WCMD_MOVE,
+"MOVE Ít@CܽÍfBNgðt@CVXeÅVµ¢êÉÚ®µÜ·B\n\
+\n\
+Ú®·éÎÛªfBNgÌêÍAfBNgàÌSÄÌt@\n\
+CÆTufBNgàÚ®µÜ·B\n\
+\n\
+MOVE ÅÍÚ®³ÆÚ®æÌhCu^[ªÙÈéêAڮ͸sµÜ·B\n"
+
+ WCMD_PATH,
+"PATH ÍwcmdÌõpXð\¦Ü½ÍÏXµÜ·B\n\
+\n\
+PATH ÆüÍ·éÆ»ÝÌpXÝèð\¦µÜ·(úóÔÅÍ\n\
+wine.conft@CÅwè³ê½¨ÉÈÁĢܷ)BÝèð\n\
+ÏX·éÉÍAPATHR}hɱ¯ÄVµ¢Ýèlðü͵Ä\n\
+º³¢B\n\
+\n\
+pXðÏX·éÆ«ÉPATH«Ïðgp·é±ÆàÂ\Å·B\n\
+á¦ÎF\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE ÍæÊÉu±¯éÉÍ^[L[ðµÄº³¢vÆ\n\
+\¦µA[Uª^[L[ð·ÌðÒ@µÜ·B±êÍ\n\
+åÉob`t@CÅÀs³ê½R}hÌʪXN[\n\
+·éOÉ[UªÇß鿤ɵ½¢êÉLpÅ·B\n"
+
+ WCMD_PROMPT,
+"PROMPT ÍR}hvvgðÝèµÜ·B\n\
+\n\
+PROMPT R}h(ƼãÌXy[X)ɱ¶ñÍwcmdªüÍÒ¿ÌA\n\
+sÌæªÉ\¦³êÜ·B\n\
+\n\
+ȺÌLN^¶ñÍÁÊÈÓ¡ð¿Ü·F\n\
+\n\
+$$ hL $_ üs $b pCvL (|)\n\
+$d »ÝÌút $e GXP[v $g > L\n\
+$l < L $n »ÝÌhCu $p »ÝÌpX\n\
+$q $t »ÝÌ $v wcmdÌo[W\n\
+\n\
+ÓFPROMPTR}hðvvg¶ñȵÅÀs·éÆAftHglÉ\n\
+Zbg³êÜ·B ftHglÍJgfBNg(hCu¼ðÜÝÜ·)\n\
+ɱ¢ÄåÈè(>)LÅ·B\n\
+(PROMPT $p$g ðÀsµ½Æ¯lÅ·)\n\
+\n\
+vvgÍPROMPT«ÏðÒW·é±ÆÅàÏXūܷB\n\
+µ½ªÁÄA'SET PROMPT=¶ñ'Æ'PROMPT ¶ñ'ÌøÊͯ¶Å·B\n"
+
+ WCMD_REM,
+"REM(ƼãÌXy[X)ÅnÜéR}hÍÀs³êܹñB\n\
+µ½ªÁÄAob`t@CÌRgƵÄgpūܷB\n"
+
+ WCMD_REN, "RENÌwv\n"
+ WCMD_RENAME, "RENAMEÌwv\n"
+ WCMD_RD, "RDÌwv\n"
+ WCMD_RMDIR, "RMDIRÌwv\n"
+
+ WCMD_SET,
+"SET ÍwcmdÌ«Ïð\¦Ü½ÍÏXµÜ·B\n\
+\n\
+p[^ȵÅSETðÀs·éÆA»ÝÌSÄÌ«Ïð\¦µÜ·B\n\
+\n\
+«ÏÌì¬Ü½ÍÏXðs¤êÍÌæ¤ÉLqµÄº³¢F\n\
+\n\
+ SET <«ϼ>=<l>\n\
+\n\
+<«ϼ> Æ <l> ͶñÅ·BÌèOÉXy[Xð\n\
+üêȢź³¢BèOÉXy[XðüêéÆÂ«Ï¼É]ª\n\
+ÈXy[XªÜÜêÄµÜ¤êª èÜ·B\n\
+\n\
+Wine«ÅÍAWineª®ìµÄ¢éOSÌ«ϪWin32«ÏÉÜ\n\
+ÜêÜ·Bµ½ªÁÄAlCeBuWin32«æè½ÌlªZbg³\n\
+êĢܷBwcmdà©çOSÌ«ÏðÏX·é±ÆªÅ«È¢±Æ\n\
+Éӵĺ³¢B\n"
+
+ WCMD_SHIFT,
+"SHIFT Íob`t@CÅXgÌæª©çêÂÌp[^ðæè\n\
+ÉgpµÜ·BÂÜèAp[^2ªp[^1ÉÈèÜ·BR}hC\n\
+©çÄÎê½Æ«ÉͽàN±èܹñB\n"
+
+ WCMD_TIME, "TIMEÌwv\n"
+
+ WCMD_TITLE, "wcmdEBhEÌEBhE^CgðÝèµÜ·B¶@ TITLE [¶ñ]\n"
+
+ WCMD_TYPE,
+"TYPE <t@C¼> Í <t@C¼> ðR\[foCX(Í_CNg\n\
+³ê½)ÉRs[µÜ·Bt@CªÂÇÈeLXgt@C©Ç¤©`FbN\n\
+³êܹñB\n"
+
+ WCMD_VERIFY,
+"VERIFY ÍverifytOðZbgANAAÍeXg·éÉgpµÜ·BLøÈtH[Í:\n\
+\n\
+VERIFY ON tOðZbg\n\
+VERIFY OFF tOðNA\n\
+VERIFY ON©OFF©\¦\n\
+\n\
+Wine«ÅÍverifytOÍÓ¡ð¿Ü¹ñB\n"
+
+ WCMD_VER,
+"VER Í®ìµÄ¢éwcmdÌo[Wð\¦µÜ·\n"
+
+ WCMD_VOL, "VOLÌwv\n"
+
+ WCMD_EXIT,
+"EXIT Í»ÝÌR}hZbVðI¹µÄwcmdðÄÑoµ½OSܽÍVFÉߵܷB\n"
+
+ 1000, "WCMD à ÌR}h:\n\
+ATTRIB\t\tDOSt@CÌ®«ð\¦ÍÏX\n\
+CALL\t\tOÌob`t@CðÄÑoµ\n\
+CD (CHDIR)\tJgfBNgðÏX\n\
+CLS\t\tR\[æÊðNA\n\
+COPY\t\tt@CðRs[\n\
+CTTY\t\tüÍ/oÍfoCXðÏX\n\
+DATE\t\tVXeÌútð\¦ÍÏX\n\
+DEL (ERASE)\tt@Cðí\n\
+DIR\t\tfBNgÌàeð\¦\n\
+ECHO\t\t¶ñð¼ÚR\[oÍÉRs[\n\
+HELP\t\tgsbNÌÚ×Èwvð\¦\n\
+MD (MKDIR)\tTufBNgðì¬\n\
+MOVE\t\tt@CܽÍfBNgc[ðÚ®\n\
+PATH\t\tpXð\¦ÍÝè\n\
+PROMPT\t\tR}hvvgðÏX\n\
+REN (RENAME)\tt@Cðl[\n\
+RD (RMDIR)\tTufBNgðí\n\
+SET\t\t«ÏðÝèÍ\¦\n\
+TIME\t\tVXeÌðÝèÍ\¦\n\
+TITLE\t\tWCMDZbVÌEBhE^CgðÝè\n\
+TYPE\t\teLXgt@CÌàeðoÍ\n\
+VER\t\tWCMDÌo[Wð\¦\n\
+VOL\t\tfBXNfoCXÌ{
[xð\¦\n\
+EXIT\t\tWCMDðI¹\n\n\
+ãLÌR}hÉÖ·éÚ×ð\¦·éÉÍ HELP <R}h¼> Æü͵ĺ³¢B\n"
+}
diff --git a/programs/cmd/Ko.rc b/programs/cmd/Ko.rc
new file mode 100644
index 0000000..dcea380
--- /dev/null
+++ b/programs/cmd/Ko.rc
@@ -0,0 +1,222 @@
+/*
+ * Wine command prompt
+ * Korean Language Support
+ *
+ * Copyright (C) 1999 D A Pickles
+ * Copyright 2005 YunSong Hwang
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "ATTRIB µµ¿ò¸»\n"
+ WCMD_CALL,
+"<¹èÄ¡ÆÄÀÏ À̸§>À» È£Ãâ(CALL)ÇÏ´Â °ÍÀº ¹èÄ¡ ÆÄÀϾȿ¡¼ ´Ù¸¥ ¹èÄ¡ ÆÄÀÏ ¾ÈÀÇ \n\
+¸í·ÉÀ» »ç¿ëÇÏ´Â °ÍÀÔ´Ï´Ù. ¹èÄ¡ ÆÄÀÏÀÌ Á¾·áÇϸé , Á¦¾î±ÇÀº ±×°ÍÀ» È£ÃâÇÑ \n\
+ÆÄÀÏÇÑÅ× µ¹¾Æ°©´Ï´Ù. CALL ¸í·ÉÀº È£ÃâÇÏ´Â °úÁ¤¿¡¼ ¸Å°³º¯¼ö¸¦ °¡Áý´Ï´Ù.\n\
+\n\
+±âº» µð·ºÅ丮³ª ȯ°æº¯¼ö³ª ±âŸ¸¦ ¹Ù²Ù´Â °ÍÀº È£ÃâÀÚ¿¡ ÀÇÇØ »ó¼ÓµÇ¾î¼ È£ÃâµÈ \n\
+°úÁ¤¿¡¸¸ Àû¿ëµË´Ï´Ù.\n"
+
+ WCMD_CD, " CD µµ¿ò¸»\n"
+ WCMD_CHDIR, " CHDIR µµ¿ò¸»\n"
+
+ WCMD_CLS, "CLS ÄÜ¼Ö È¸é ±ú²ýÈ÷\n"
+
+ WCMD_COPY, "COPY µµ¿ò¸»\n"
+ WCMD_CTTY, "CTTY µµ¿ò¸»\n"
+ WCMD_DATE, "DATE µµ¿ò¸»\n"
+ WCMD_DEL, "DEL µµ¿ò¸»\n"
+ WCMD_DIR, "DIR µµ¿ò¸» \n"
+
+ WCMD_ECHO,
+"ECHO <¹®ÀÚ¿>Àº <¹®ÀÚ¿>À» ÇöÀç Å͹̳ο¡ º¸¿©ÁÝ´Ï´Ù.\n\
+\n\
+ECHO ON´Â ¹èÄ¡ÆÄÀÏ¿¡¼ ´ÙÀ½¿¡ ¿À´Â ¸ðµç ¸í·ÉÀ» ½ÇÇ౫±â Àü¿¡ Å͹̳ο¡ º¸¿©ÁÝ´Ï´Ù\n\
+\n\
+ECHO OFF ´Â ECHO ON°ú ¹Ý´ëÀÇ ÀÏÀ» ÇÕ´Ï´Ù. (ECHO ´Â OFF°¡ ±âº»)\n\
+ECHO OFF ¸í·ÉÀº ½ÅÈ£°¡ ÁøÇàµÇ´Â °É º¸¿©ÁÖ´Â°É ¸·½À´Ï´Ù.\n"
+
+ WCMD_ERASE, "ERASE µµ¿ò¸»\n"
+
+ WCMD_FOR,
+"FOR ¸í·ÉÀº ÆÄÀÏ ÇÑ ¼ÂÆ®¿¡¼ °¢°¢ÀÇ ¸í·ÉÀ» ½ÇÇà½Ãų ¶§ »ç¿ë.\n\
+\n\
+¹®¹ý: FOR º¯¼ö IN (set) DO ¸í·É\n\
+\n\
+ wcmd ¾È¿¡¼ Á¸ÀçÇÏÁö ¾Ê´Â ¹èÄ¡ ÆÄÀÏ¿¡ FOR¸¦ »ç¿ëÇÒ·Á¸é µÎ °³ÀÇ %°¡ ÇÊ¿äÇÕ´Ï´Ù.\n"
+
+ WCMD_GOTO,
+"The GOTO ¸í·ÉÀº ¹èÄ¡ÆÄÀÏ ¾È¿¡¼ ´Ù¸¥ ºÎºÐÀ¸·Î ½ÇÇàÈ帧À» ¹Ù²ß´Ï´Ù.\n\
+\n\
+GOTOÀÇ Å¸°ÙÀÎ ¶óº§Àº °ø¹éÀ» Æ÷ÇÔÇØ¼ 255ÀÚ±îÁö °¡´ÉÇÏ´Ù\n\
+(´Ù¸¥ ¿î¿µÃ¼Á¦¿¡¼´Â ´Ù¸¦ ¼öµµ ÀÖ´Ù).\n\
+ ¸¸¾à 2°³³ª ´õ ¸¹Àº µ¿ÀÏÇÑ ¶óº§ÀÌ Á¸ÀçÇÒ °æ¿ì ¹èÄ¡ÆÄÀÏÀº ù¹øÂ° °Í¸¸ \n\
+½ÇÇà½Ãų °ÍÀÔ´Ï´Ù. Á¸ÀçÇÏÁö ¾Ê´Â ¶óº§·Î GOTO¸¦ ½ÃµµÇÑ´Ù¸é ¹èÄ¡ÆÄÀÏ ½ÇÇàÀº \n\
+Áߴܵ˴ϴÙ.\n\
+\n\
+GOTO´Â ´ëȽÄÀ¸·Î »ç¿ëµÉ °æ¿ì ¾Æ¹« Àϵµ ¾ÈÇÕ´Ï´Ù.\n"
+
+ WCMD_HELP, "HELP µµ¿ò¸»\n"
+
+ WCMD_IF,
+"IF´Â ¸í·ÉÀ» ¼±ÅÃÀûÀ¸·Î ½ÇÇà ÇÒ ¶§ »ç¿ëÇÑ´Ù.\n\
+\n\
+Syntax: IF [NOT] EXIST ÆÄÀÏÀ̸§ ¸í·É\n\
+ IF [NOT] string1==string2 ¸í·É\n\
+ IF [NOT] ERRORLEVEL ¼ýÀÚ ¸í·É\n\
+\n\
+¸í·ÉÀÇ Ã¹¹øÂ° Çü½Ä¿¡¼, string1 °ú string2´Â ¹Ýµå½Ã 2°³ÀÇ µû¿ÈÇ¥·Î\n\
+µÑ·Á³õ¾Æ¾ß ÇÕ´Ï´Ù. ´ë¼Ò¹®ÀÚ´Â ±¸ºÐÇÏÁö ¾Ê½À´Ï´Ù.\n"
+
+ WCMD_LABEL, "LABELÀº µð½ºÅ© º¼·ý ¶óº§À» ¼³Á¤ÇÒ ¶§ »ç¿ë. \n\
+\n\
+Syntax: LABEL [µå¶óÀ̺ê:]\n\
+ÀÌ ¸í·ÉÀº ´ç½ÅÀÌ ÁÖ¾îÁø µå¶óÀ̺꿡 »õ º¼·ý ¶óº§¿ï ³ÖÀ»¼ö ÀÖµµ·Ï ÇÒ°ÍÀÌ´Ù.\n\
+VOL ¸í·ÉÀ¸·Î µð½ºÅ© º¼·ý ¶óº§À» º¼ ¼ö ÀÖ´Ù.\n"
+
+ WCMD_MD, "MD µµ¿ò¸»\n"
+ WCMD_MKDIR, "MKDIR µµ¿ò¸»\n"
+ WCMD_MOVE,
+"MOVE´Â ÆÄÀÏÀ̳ª µð·ºÅ丮¸¦ ÆÄÀϽýºÅÛ ¾È¿¡ ÀÖ´Â »õ·Î¿î °÷À¸·Î Àç¹èÄ¡ÇÔ.\n\
+\n\
+¸¸¾à ¿Å°ÜÁö´Â ¾ÆÀÌÅÛÀÌ ÇϳªÀÇ µð·ºÅ丮¶ó¸é ¸ðµç ÆÄÀϰú ÇÏÀ§ µð·ºÅ丮 ¹Ø¿¡\n\
+ÀÖ´Â ÆÄÀϵµ À̵¿µÉ °ÍÀÌ´Ù.\n\
+MOVE´Â ¸¸¾à ¿À·¡µÇ°í »õ·Î¿î ÆÄÀÏÀÌ ´Ù¸¥ µµ½º µå¶óÀÌºê ¹®ÀÚ¸¦ °¡Áö°í ÀÖ´Ù¸é\n\
+½ÇÆÐÇÕ´Ï´Ù.\n"
+
+ WCMD_PATH,
+"PATH ´Â wcmd Ž»ö °æ·Î¸¦ º¸¿©Áְųª ¹Ù²Þ.\n\
+\n\
+PATH¸¦ Ä¡¸é ÇöÀç PATH ¼³Á¤À» º¸¿©ÁÙ °ÍÀÔ´Ï´Ù (À̰ÍÀº ´ç½ÅÀÇ wine.conf ÆÄÀÏ¿¡ \n\
+ÁÖ¾îÁø °ªÀ¸·Î ½ÃÀÛµÊ). PATH ¸í·É¿¡ »õ °ªÀ» ÁÜÀ¸·Î½á ¼³Á¤À» ¹Ù²Ü ¼ö ÀÖ½À´Ï´Ù.\n\
+\n\
+¶ÇÇÑ PATH ȯ°æ º¯¼ö¸¦ »ç¿ëÇØ¼ PATH¸¦ °íÄ¥ ¼öµµ ÀÖ½À´Ï´Ù\n\
+, ¿¹:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE´Â 'Press Return key to continue' ¸Þ¼¼Áö¸¦ ȸ鿡 º¸¿©ÁÖ°í \n\
+»ç¿ëÀÚ°¡ ¸®ÅÏ Å°¸¦ ´©¸¦ ¶§±îÁö ±â´Ù¸². À̰ÍÀº ÁÖ·Î ¹èÄ¡ÆÄÀÏ¿¡¼ ½ºÅ©¸°À» \n\
+³ÑÄ¡°Ô ÇÏ´Â ÀÌÀü ¸í·ÉÀÇ °á°ú¸¦ Àеµ·Ï ÇÑ´Ù\n"
+
+ WCMD_PROMPT,
+"PROMPT ¸í·É¶óÀÎ ÇÁ·ÒÇÁÆ® ¼³Á¤.\n\
+\n\
+ÀÌ ¹®ÀÚ´Â wcmd°¡ ÀÔ·ÂÀ» ±â´Ù¸®°í ÀÖÀ» ¶§ ½ÃÀÛ ÁÙ¿¡ ³ªÅ¸³ª´Â PROMPT \n\
+ ¸í·É(±×¸®°í ½ºÆäÀ̽º ´ÙÀ½¿¡)¿¡ µÚµû¸¥´Ù.\n\
+\n\
+µÚÀÇ ¹®ÀÚÀÇ ¹®ÀÚ¿ÀÇ Æ¯º°ÇÑ ÀÇ¹Ì ¼³¸í:\n\
+\n\
+$$ ´Þ·¯ ±âÈ£ $_ ¶óÀÎÇǵå $b ÆÄÀÌÇÁ ±âÈ£ (|)\n\
+$d CÇöÀç ³¯Â¥ $e À̽ºÄÉÀÌÇÁ $g > ±âÈ£\n\
+$l < ±âÈ£ $n ÇöÀç µå¶óÀ̺ê $p ÇöÀç °æ·Î\n\
+$q µîÈ£ ±âÈ£ $t ÇöÀç ½Ã°£ $v wcmd ¹öÁ¯\n\
+\n\
+ÇÁ·ÒÇÁÆ®°¡ ±âº»»óÅÂÀΠä·Î ÇÁ·ÒÇÁÆ®¹®ÀÚ¸¦ Àç¼³Á¤ÇÏÁö ¾Ê°í PROMPT ¸í·ÉÀ» \n\
+»ç¿ëÇßÀ» ¶§ ,À̰ÍÀº ÇöÀç µð·ºÅ丮 (Æ÷ÇÔÇØ¼ÇöÀç µå¶óÀÌºê ¹®ÀÚ) ¿¡ \"º¸´Ù Å«(>)\"\n\
+±âÈ£°¡ µÚµû¸¥´Ù´Â °É ÁÖÀÇÇϽÿÀ. (¸í·É PROMPT $p$g·Ö °°ÀÌ).\n\
+\n\
+ÀÌ ÇÁ·ÒÇÁÆ®´Â PROMPT ȯ°æ º¯¼ö °ªÀÇ º¯°æ¿¡ ÀÇÇØ ¹Ù²ð ¼ö ÀÖ½À´Ï´Ù,\n\
+±×·¡¼ ¸í·É 'SET PROMPT=ÅØ½ºÆ®'´Â 'PROMPT ÅØ½ºÆ®¿Í °°Àº ÀÏÀ» ÇÕ´Ï´Ù\n"
+
+ WCMD_REM,
+"REM·Î ½ÃÀÛÇÏ´Â ¸í·É ¶óÀÎÀº (°ø¹éÀ» Æ÷ÇÔÇØ¼) ¾Æ¹«Àϵµ ¾È ÇÕ´Ï´Ù,\n\
+±×¸®°í ¹èÄ¡ÆÄÀÏ¿¡ ¼³¸íÀ» ³Ö´Âµ¥ »ç¿ëÇÕ´Ï´Ù.\n"
+
+ WCMD_REN, "REN µµ¿ò¸» \n"
+ WCMD_RENAME, "RENAME µµ¿ò¸»\n"
+ WCMD_RD, "RD µµ¿ò¸»\n"
+ WCMD_RMDIR, "RMDIR µµ¿ò¸»\n"
+
+ WCMD_SET,
+"SET wcmd ȯ°æ º¯¼ö º¸¿©Áְųª ¹Ù²Ù±â.\n\
+\n\
+¾Æ¹« ¸Å°³º¯¼ö°¡ ¾ø´Â SETÀº ¸ðµç ÇöÀç ȯ°æº¯¼ö¸¦ º¸¿©ÁÜ.\n\
+\n\
+ȯ°æ º¯¼ö¸¦ ¸¸µé°Å³ª °íÄ¥¶§ »ç¿ëÇÏ´Â ¹®¹ý:\n\
+\n\
+ SET <º¯¼ö>=<°ª>\n\
+\n\
+<º¯¼ö> °ú <°ª>Àº ij¸¯ÅÍ-¹®ÀÚ¿ ÀÌ´Ù. ¹Ýµå½Ã µîÈ£(=)±âÈ£ ¾Õ¿¡ ¾î¶²\n\
+°ø¹éµµ À־ ¾ÈµÇ°í, º¯¼ö À̸§¿¡ ³»ºÎ °ø¹éµµ ÀÖÀ» ¼ö ¾ø´Ù.\n\
+\n\
+Wine ¾Æ·¡¿¡¼, ¿î¿µÃ¼Á¦ ¹ØÀÇ È¯°æÀº Win32 ȯ°æ¿¡ Æ÷ÇԵ˴ϴÙ, ±×°ÍÀº\n\
+ÀϹÝÀûÀ¸·Î ³×ÀÌÆ¼ºê Win32 ±¸Çö¿¡´Â ´õ ¸¹Àº °ªÀÌ ÀÖ¾î¾ß µÈ ´Ù´Â °ÍÀ»\n\
+ÀǹÌÇÕ´Ï´Ù. À̰ÍÀº wcmd¾È¿¡¼ ¿î¿µÃ¼Á¦ ȯ°æÀÌ ¿µÇâÀ» ¹ÌÄ¡´Â°Å °ÍÀº\n\
+°¡´ÉÇÏÁö ¾Ê´Ù´Â °ÍÀ» ±â¾ïÇϽÿÀ.\n"
+
+ WCMD_SHIFT,
+"SHIFT ´Â ¹èÄ¡ÆÄÀÏ¿¡¼ ¸Å°³º¯¼öÀÇ Ã¹¹øÂ° °ÍÀ» Áö¿ì´Âµ¥ »ç¿ëÇÑ´Ù,\n\
+±×·¡¼ ¸Å°³º¯¼ö 2°¡ ¸Å°³º¯¼ö 1ÀÌ µÈ´Ù. À̰ÍÀº ¸í·É ¶óÀο¡¼ »ç¿ëÇßÀ»\n\
+°æ¿ì ¾Æ¹« Àϵµ ¾È ÇÕ´Ï´Ù.\n"
+
+ WCMD_TIME, "TIME µµ¿ò¸»\n"
+
+ WCMD_TITLE, "wcmdâÀÇ Ã¢ Á¦¸ñ ¼³Á¤, ¹®¹ý TITLE [¹®ÀÚ¿]\n"
+
+ WCMD_TYPE,
+"TYPE <ÆÄÀÏÀ̸§> <ÆÄÀÏ À̸§>¸¦ ÄÜ¼Ö ÀåÄ¡·Î º¹»ç (¸¸¾à ¹æÇâÀÌ ÀçÁ¤ÀÇ µÈ´Ù¸é \n\
+¾îµð³ª). ¾Æ¹« ¿¡·¯°¡ ¾øÀ¸¸é ±× ÆÄÀÏÀ» ÀÐÀ» ¼ö ÀÖ´Â ÅØ½ºÆ®ÀÔ´Ï´Ù.\n"
+
+ WCMD_VERIFY,
+"VERIFY´Â verify Ç÷¡±×¸¦ ¼³Á¤Çϰí, Áö¿ì°í, Å×½ºÆ® Çϴµ¥ »ç¿ëµÈ´Ù.\n\
+¿Ã¹Ù¸¥ ÇüÅ´Â:\n\
+\n\
+VERIFY ON Ç÷¡±× ÄÄ\n\
+VERIFY OFFÇ÷¡±× ²û\n\
+VERIFY ON À̳ª OFF¸¦ ÀûÀýÇϰԺ¸¿©ÁÜ .\n\
+\n\
+verify Ç÷¡±×´Â Wine¿¡¼´Â ¾î¶² Àϵµ ¾ÈÇÕ´Ï´Ù.\n"
+
+ WCMD_VER,
+"VER ´ç½ÅÀÌ ½ÇÇà½ÃŲ wcmd ¹öÁ¯ º¸¿©ÁÜ\n"
+
+ WCMD_VOL, "VOL µµ¿ò¸»\n"
+
+ WCMD_EXIT,
+"EXIT´Â ÇöÀç ¸í·É ¼¼¼ÇÀ» ÁߴܽÃŰ°í ¿î¿µÃ¼Á¦·Î µ¹¾Æ°¡°Å³ª wcmd¸¦\n\
+È£ÃâÇÑ ¼¿·Î µ¹¾Æ°©´Ï´Ù.\n"
+
+ 1000, "WCMD ³»ºÎ ¸í·Éµé:\n\
+ATTRIB\t\tµµ½º ÆÄÀÏ ¼Ó º¸¿©Áְųª ¹Ù²Ù±â\n\
+CALL\t\tI¹èÄ¡ ÆÄÀÏ ¾È¿¡¼ ´Ù¸¥ ÆÄÀÏ ºÒ·¯¿À±â\n\
+CD (CHDIR)\tÇöÁ¦ ±âº» µð·ºÅ丮 ¹Ù²Ù±â\n\
+CLS\t\tÄÜ¼Ö È¸é ±ú²ýÇϰÔ\n\
+COPY\t\tÆÄÀÏ º¹»ç\n\
+CTTY\t\tÀÔÃâ·Â ÀåÄ¡ ¹Ù²Ù±â\n\
+DATE\t\t½Ã½ºÅÛ ³¯Â¥ º¸¿©Áְųª ¹Ù²Ù±â\n\
+DEL (ERASE)\tÇϳªÀÇ ÆÄÀÏÀ̳ª ¿©·¯ ÆÄÀÏÀ» Áö¿ì±â\n\
+DIR\t\tµð·ºÅ丮 ³»¿ë º¸¿©ÁÖ±â\n\
+ECHO\t\t¹®ÀÚ¸¦ ¹Ù·Î ȸé Ãâ·ÂÀ¸·Î º¹»ç\n\
+HELP\t\t ¸ñÂ÷ÀÇ Â©¸·ÇÑ µµ¿ò¸» Ç׸ñ º¸¿©ÁÜ\n\
+MD (MKDIR)\tÇÏÀ§ µð·ºÅ丮 ¸¸µé±â\n\
+MOVE\t\tÆÄÀÏ À̳ª ¿©·¯ ÆÄÀÏ,±×¸®°í µð·ºÅ丮 ±¸Á¶ À̵¿\n\
+PATH\t\tŽ»ö °æ·Î º¸¿©Áְųª ¼³Á¤Çϱâ\n\
+PROMPT\t\t¸í·É ÇÁ·ÒÇÁÆ® ¹Ù²Ù±â\n\
+REN (RENAME)\tÆÄÀÏ À̸§ ¹Ù²Ù±â\n\
+RD (RMDIR)\tÇÏÀ§ µð·ºÅ丮 Áö¿ì±â\n\
+SET\t\tȯ°æ º¯¼ö º¸¿©Áְųª ¹Ù²Ù±â\n\
+TIME\t\t½Ã½ºÅÛ ³¯Â¥ ¹Ù²Ù°Å³ª º¸¿©ÁÖ±â\n\
+TITLE\t\tWCMD ¼¼¼ÇÀÇ Ã¢ Á¦¸ñ ¼³Á¤ \n\
+TYPE\t\tÅØ½ºÆ® ÆÄÀÏÀÇ ³»¿ë º¸¿©ÁÖ±â\n\
+VER\t\tWCMD ÇöÀç ¹öÁ¯ º¸¿©ÁÖ±â\n\
+VOL\t\tµð½ºÅ© ÀåÄ¡ÀÇ ºÒ·ý ¶óº§ º¸¿©ÁÖ±â\n\
+EXIT\t\tWCMD ´Ý±â\n\n\
+HELP <¸í·É>À» Ä¡¸é ±× ¸í·ÉÀÇ »ó¼¼ÇÑ Á¤º¸¸¦ º¸¿©ÁÜ\n"
+}
diff --git a/programs/cmd/Makefile.in b/programs/cmd/Makefile.in
new file mode 100644
index 0000000..f0c75b3
--- /dev/null
+++ b/programs/cmd/Makefile.in
@@ -0,0 +1,21 @@
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR = @srcdir@
+VPATH = @srcdir@
+MODULE = cmd.exe
+APPMODE = -mconsole
+IMPORTS = shell32 user32 kernel32
+
+C_SRCS = \
+ batch.c \
+ builtins.c \
+ directory.c \
+ wcmdmain.c
+
+RC_SRCS = wcmdrc.rc
+RC_BINSRC = wcmdrc.rc
+RC_BINARIES = wcmd.ico
+
+@MAKE_PROG_RULES@
+
+### Dependencies:
diff --git a/programs/cmd/Nl.rc b/programs/cmd/Nl.rc
new file mode 100644
index 0000000..922fa49
--- /dev/null
+++ b/programs/cmd/Nl.rc
@@ -0,0 +1,230 @@
+/*
+ * Wine command prompt (Dutch resources)
+ *
+ * Copyright (C) 2003 Hans Leidekker
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_DUTCH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Uitleg bij ATTRIB\n"
+ WCMD_CALL,
+"CALL <batchbestandsnaam> wordt gebruikt binnen een batchbestand om opdrachten uit\n\
+een ander batchbestand aan te roepen. Als het batchbestand bestaat keert de controle terug\n\
+naar het bestand dat het aanriep. The CALL opdracht kan parameters meegeven aan de aan te\n\
+roepen procedure.\n\
+\n\
+Veranderingen m.b.t directory, omgevingsvariabelen, etc die tot stand komen binnen een\n\
+aangeroepen procedure worden gëerft door de aanroepende procedure.\n"
+
+ WCMD_CD, "Uitleg bij CD\n"
+ WCMD_CHDIR, "Uitleg bij CHDIR\n"
+
+ WCMD_CLS, "CLS schoont het scherm\n"
+
+ WCMD_COPY, "Uitleg bij COPY\n"
+ WCMD_CTTY, "Uitleg bij CTTY\n"
+ WCMD_DATE, "Uitleg bij DATE\n"
+ WCMD_DEL, "Uitleg bij DEL\n"
+ WCMD_DIR, "Uitleg bij DIR\n"
+
+ WCMD_ECHO,
+"ECHO <tekenreeks> geeft <tekenreeks> weer op het actieve uitvoerapparaat.\n\
+\n\
+ECHO ON zorgt ervoor dat alle hierop volgende opdrachten in een batchbestand worden weergegeven\n\
+op het uitvoerapparaat voordat ze worden uitgevoerd.\n\
+\n\
+ECHO OFF keert het effect van een voorafgaande ECHO ON om (ECHO OFF is\n\
+de standaardinstelling). Weergave van de ECHO OFF opdracht kan worden voorkomen door\n\
+het te laten voorafgaan door het @-teken.\n"
+
+ WCMD_ERASE, "Uitleg bij ERASE\n"
+
+ WCMD_FOR,
+"De FOR opdracht wordt gebruikt om een opdracht uit te voeren voor ieder van een verzameling bestanden.\n\
+\n\
+Syntax: FOR %variabele IN (verzameling) DO opdracht\n\
+\n\
+In wcmd is het niet vereist om het %-teken in een FOR opdracht in een batchbestand te\n\
+verdubbelen.\n"
+
+ WCMD_GOTO,
+"De GOTO opdracht verplaatst uitvoering naar een andere opdracht binnen een\n\
+batchbestand.\n\
+\n\
+Het doel van een GOTO opdracht wordt aangegeven met een label. Dat label mag uit maximaal 255 tekens\n\
+bestaan maar er mogen geen spaties in voorkomen (dit verschilt bij andere besturingssystemen).\n\
+Als er twee of meer identieke labels bestaan in een batchbestand dan\n\
+wordt altijd naar de eerste gesprongen. Een poging om te springen naar een niet bestaand\n\
+label beëindigt het uitvoeren van het batchbestand.\n\
+\n\
+GOTO heeft geen effect als het in een interactieve sessie wordt gebruikt.\n"
+
+ WCMD_HELP, "Uitleg bij HELP\n"
+
+ WCMD_IF,
+"IF wordt gebruikt om een opdracht voorwaardelijk uit te voeren.\n\
+\n\
+Syntax: IF [NOT] EXIST bestandsnaam opdracht\n\
+ IF [NOT] tekenreeks1==tekenreeks2 opdracht\n\
+ IF [NOT] ERRORLEVEL getal opdracht\n\
+\n\
+In de tweede vorm van de opdracht moeten tekenreeks1 en tekenreeks2 tussen dubbele\n\
+aanhalingsteken staan. De vergelijking is niet gevoelig voor het onderscheid tussen\n\
+hoofd- en kleine letters.\n"
+
+ WCMD_LABEL, "LABEL wordt gebruikt om een schijflabel te wijzigen. \n\
+\n\
+Syntax: LABEL [schijf:]\n\
+De opdracht vraagt u om een nieuw label in te tikken voor de opgegeven schijf.\n\
+U kunt het label van een schijf tonen met behulp van de VOL opdracht.\n"
+
+ WCMD_MD, "Uitleg bij MD\n"
+ WCMD_MKDIR, "Uitleg bij MKDIR\n"
+ WCMD_MOVE,
+"MOVE verplaatst een bestand of directory naar een andere plek binnen het bestandssysteem.\n\
+\n\
+Als het om een directory gaat dan worden alle bestanden en directories\n\
+daaronder ook verplaatst.\n\
+\n\
+MOVE werkt niet als de oude en nieuwe locaties zich op verschillende DOS-schijven bevinden.\n"
+
+ WCMD_PATH,
+"PATH toon of wijzigt het zoekpad van wcmd.\n\
+\n\
+De opdracht PATH toont het huidige zoekpad (de beginwaarde wordt in\n\
+het bestand genaamd wine.conf toegekend). Om het zoekpad te wijzigen laat u de PATH\n\
+opdracht volgen door de nieuwe waarde.\n\
+\n\
+Het is ook mogelijk om het zoekpad te wijzigen met behulp van de PATH omgevingsvariabele,\n\
+bij voorbeeld:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE toont een bericht op het scherm: 'Toets Enter om door te gaan'\n\
+en wacht totdat de gebruiker de Enter-toets indrukt. Dit is vooral handig in\n\
+batchbestanden om de gebruiker in staat te stellen om de uitvoer van een voorafgaande opdracht\n\
+te bekijken, voordat het van het scherm schuift.\n"
+
+ WCMD_PROMPT,
+"PROMPT wijzigt de prompt van de opdrachtregel.\n\
+\n\
+De tekenreeks volgend op de PROMPT opdracht (en de spatie direct daarna)\n\
+verschijnt vooraan op de regel als wcmd wacht op invoer.\n\
+\n\
+De volgende tekenreeksen hebben een speciale betekenis:\n\
+\n\
+$$ dollar-teken $_ nieuwe regel $b pijp-teken (|)\n\
+$d huidige datum $e escape $g groter-dan-teken (>)\n\
+$l kleiner-dan-teken (<) $n huidige schijf $p huidige directory\n\
+$q is-gelijk-teken (=) $t huidige tijd $v wcmd versie\n\
+\n\
+Merk op dat het uitvoeren van de PROMPT opdracht zonder een tekenreeks de\n\
+prompt terugzet naar de standaardinstelling. Dat is de huidige directory\n\
+(inclusief schijfaanduiding) gevolgd een groter-dan-teken (>).\n\
+(dat staat gelijk aan de opdracht: PROMPT $p$g).\n\
+\n\
+De prompt kan ook gewijzigd worden via de PROMPT omgevingsvariabele,\n\
+dus de opdracht 'SET PROMPT=tekenreeks' heeft hetzelfde effect als 'PROMPT tekenreeks'\n"
+
+ WCMD_REM,
+"Een opdrachtregel die begint met REM (gevold door een spatie) wordt niet\n\
+uitgevoerd, en kan daarom worden gebruikt als een commentaarregel in een batchbestand.\n"
+
+ WCMD_REN, "Uitleg bij REN\n"
+ WCMD_RENAME, "Uitleg bij RENAME\n"
+ WCMD_RD, "Uitleg bij RD\n"
+ WCMD_RMDIR, "Uitleg bij RMDIR\n"
+
+ WCMD_SET,
+"SET toont of wijzigt omgevingsvariabelen van wcmd.\n\
+\n\
+SET zonder parameters toont alle omgevingsvariabelen.\n\
+\n\
+De syntax voor het maken of wijzigen van een omgevingsvariabele is:\n\
+\n\
+ SET <variable>=<waarde>\n\
+\n\
+waarbij <variable> en <waarde> uit tekenreeksen bestaan. Er mogen geen spaties\n\
+voor het is-gelijk-teken staan, noch mogen er in de variabelenaam\n\
+spaties voorkomen.\n\
+\n\
+Onder Wine worden de omgevingsvariabelen van het onderliggende besturingssysteem\n\
+opgenomen in de Win32 omgeving. Er zullen daarom doorgaans veel meer\n\
+variabelen in voorkomen dan in een oorspronkelijke Win32 implementatie. Merk op dat het\n\
+niet mogelijk is om de omgevingsvariabelen van het onderliggende besturingssysteem te\n\
+wijzigen vanuit wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT wordt gebruikt in een batchbestand om een parameter te verwijderen van het begin van\n\
+de lijst. Dus de tweede parameter wordt dan de eerste, enzovoort. Deze opdracht heeft geen effect\n\
+als hij wordt aangeroepen vanaf de opdrachtregel.\n"
+
+ WCMD_TIME, "Uitleg bij TIME\n"
+
+ WCMD_TITLE, "Wijzigt de naam van het wcmd-venster, syntax: TITLE [tekenreeks]\n"
+
+ WCMD_TYPE,
+"TYPE <bestandsnaam> kopiëert <bestandsnaam> naar het uitvoerapparaat.\n\
+Er wordt niet gecontroleerd of het bestand leesbare tekst bevat.\n"
+
+ WCMD_VERIFY,
+"VERIFY wordt gebruikt om de VERIFY-schakelaar aan of uit te zetten of om hem te testen. Geldige aanroepen zijn:\n\
+\n\
+VERIFY ON Zet de schakelaar aan\n\
+VERIFY OFF Zet de schakelaar uit\n\
+VERIFY Toont ON of OFF naar gelang de stand.\n\
+\n\
+De verify-schakelaar heeft geen functie binnen Wine.\n"
+
+ WCMD_VER,
+"VER toont de versie van wcmd die u draait\n"
+
+ WCMD_VOL, "Uitleg bij VOL\n"
+
+ WCMD_EXIT,
+"EXIT beëindigt de lopende sessie en keert terug\n\
+naar het besturingssysteem of de schil van waaruit wcmd werd gestart.\n"
+
+ 1000, "WCMD's ingebouwde opdrachten zijn:\n\
+ATTRIB\t\tToon of wijzig DOS bestandsattributen\n\
+CALL\t\tRoep een batchbestand aan vanuit een ander bestand\n\
+CD (CHDIR)\tWijzig de huidige directory\n\
+CLS\t\tWis het scherm\n\
+COPY\t\tKopiëer een bestand\n\
+CTTY\t\tWijzig het invoer-/uitvoerapparaat\n\
+DATE\t\tToon of wijzig de systeemdatum\n\
+DEL (ERASE)\tVerwijder een bestand of een verzameling van bestanden\n\
+DIR\t\tToon de inhoud van een directory\n\
+ECHO\t\tKopiëer tekst direct naar het uitvoerapparaat\n\
+HELP\t\tToon een korte uitleg over een onderwerp\n\
+MD (MKDIR)\tMaak een directory\n\
+MOVE\t\tVerplaats een bestand, een verzameling bestanden of een directory\n\
+PATH\t\tWijzig of toon het zoekpad\n\
+PROMPT\t\tWijzig de prompt\n\
+REN (RENAME)\tHernoem een bestand\n\
+RD (RMDIR)\tVerwijder een directory\n\
+SET\t\tWijzig of toon de omgevingsvariabelen\n\
+TIME\t\tWijzig of toon de systeemtijd\n\
+TITLE\t\tWijzig de vensternaam van de WCMD-sessie\n\
+TYPE\t\tToon de inhoud van een tekstbestand\n\
+VER\t\tToon de versie van WCMD\n\
+VOL\t\tToon het label van een schijf\n\
+EXIT\t\tSluit WCMD af\n\n\
+type HELP <opdracht> voor meer informatie over bovengenoemde opdrachten\n"
+}
diff --git a/programs/cmd/No.rc b/programs/cmd/No.rc
new file mode 100644
index 0000000..8159335
--- /dev/null
+++ b/programs/cmd/No.rc
@@ -0,0 +1,228 @@
+/*
+ * Wine command prompt
+ * Norwegian Bokmål Language Support
+ *
+ * Copyright (C) 2005 Alexander N. Sørnes <alex@thehandofagony.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_NORWEGIAN, SUBLANG_NORWEGIAN_BOKMAL
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Hjelp til ATTRIB\n"
+ WCMD_CALL,
+"«CALL <satsvisfilnavn>» brukes i en satsvis fil for å utføre kommandoer\n\
+fra en annen satsvis fil. Når den satsvise filen avslutter, returneres\n\
+kontrollen til filen som kalte den. CALL-kommandoen kan gi parametere\n\
+til den kalte prosedyren.\n\
+\n\
+Endringer til standardkatalogen, miljøvariabler etc. gjort av den kalte\n\
+prosedyren arves av påkalleren.\n"
+
+ WCMD_CD, "Hjelp til CD\n"
+ WCMD_CHDIR, "Hjelp til CHDIR\n"
+
+ WCMD_CLS, "CLS tømmer konsollskjermen\n"
+
+ WCMD_COPY, "Hjelp til COPY\n"
+ WCMD_CTTY, "Hjelp til CTTY\n"
+ WCMD_DATE, "Hjelp til DATE\n"
+ WCMD_DEL, "Hjelp til DEL\n"
+ WCMD_DIR, "Hjelp til DIR\n"
+
+ WCMD_ECHO,
+"«ECHO <streng> viser <streng>» på den gjeldende terminalenheten.\n\
+\n\
+«ECHO ON» forårsaker at alle kommandoer i en satsvis fil vises på\n\
+terminalenheten før de kjøres.\n\
+\n\
+«ECHO OFF» reverserer effekten av en tidligere «ECHO ON» (ECHO er OFF som\n\
+standard). «ECHO OFF»-kommandoen kan hindres fra å vises ved å plassere\n\
+et @-tegn foran den.\n"
+
+ WCMD_ERASE, "Hjelp til ERASE\n"
+
+ WCMD_FOR,
+"FOR-kommandoen brukes til å kjøre en kommando for hver fil i et sett filer.\n\
+\n\
+Syntaks: FOR %variabel IN (sett) DO kommando\n\
+\n\
+Kravet om to %-tegn når FOR brukes i en satsvis fil finnes ikke i WCMD.\n"
+
+ WCMD_GOTO,
+"GOTO-kommandoen flytter kjøringen til et annet sted i en satsvis fil.\n\
+\n\
+Merkelappen som er målet til GOTO kan være opptil 255 tegn langt,\n\
+men kan ikke inneholde mellomrom (dette er forskjellig fra andre\n\
+operativsystemer). Hvis det finnes to eller flere identiske merkelapper\n\
+i en satsvis fil, kjøres alltid den første. Å peke GOTO til en ikke-\n\
+eksisterende merkelapp avbryter kjøringen av den satsvise filen.\n\
+\n\
+GOTO har ingen effekt når den brukes interaktivt.\n"
+
+ WCMD_HELP, "Hjelp til HELP\n"
+
+ WCMD_IF,
+"IF brukes til å kjøre en kommando på betingelser.\n\
+\n\
+Syntax: IF [NOT] EXIST filnavn kommando\n\
+ IF [NOT] streng1==streng2 kommando\n\
+ IF [NOT] ERRORLEVEL nummer kommando\n\
+\n\
+I kommandoform nummer to må streng1 og streng2 omsluttes av doble\n\ anførselstegn. Det skiller ikke mellom store og små bokstaver.\n"
+
+ WCMD_LABEL, "LABEL brukes for å navgi et stasjonsvolum. \n\
+\n\
+Syntaks: LABEL [stasjon:]\n\
+Kommandoen vil be om det nye volumnavnet for stasjonen.\n\
+Du kan vise en stasjons volumnavn med VOL-kommandoen.\n"
+
+ WCMD_MD, "Hjelp til MD\n"
+ WCMD_MKDIR, "Hjelp til MKDIR\n"
+ WCMD_MOVE,
+"MOVE flytter en fil eller katalog til et nytt sted innenfor\n\
+filsystemet.\n\
+\n\
+Hvis elementet som flyttes er en katalog, flyttes også filene og\n\
+underkatalogene i den.\n\
+\n\
+MOVE feiler hvis den gamle og nye plasseringen har forskjellige\n\
+stasjonsbokstaver.\n"
+
+ WCMD_PATH,
+"PATH viser eller endrer WCMDs søkesti.\n\
+\n\
+Å skrive inn PATH viser den gjeldende PATH-innstillingen (dette er\n\
+i begynnelsen verdien oppgitt i filen «wine.conf»). Etterfølg PATH-\n\
+kommandoen med et nytt navn for å endre innstillingen.\n\
+\n\
+Det er også mulig å endre PATH ved å bruke miljøvariablen PATH, for\n\
+eksempel:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE viser meldingen 'Trykk Enter for å fortsette', og venter på at\n\ brukeren trykker Enter. Dette er hovedsakelig nyttig i satsvise filer,\n\
+for å la brukeren lese utdata fra en tidligere kommando før den ruller\n\
+vekk fra skjermen..\n"
+
+ WCMD_PROMPT,
+"PROMPT oppgir kommandolinje-klartegnet.\n\
+\n\
+Strengen som etterfølger PROMPT-kommandoen (og mellomrommet rett etter)\n\
+vises ved begynnelsen av linjen når vcmd venter på inndata.\n\
+\n\
+Følgende tegnstrenger har den spesielle betydningen som vises:\n\
+\n\
+$$ Dollar-tegn $_ Linjemating $b Rørtegn sign (|)\n\
+$d Gjeldende dato $e Escape $g Større enn-tegn\n\
+$l Mindre enn-tegn $n Gjeldende stasjon $p Gjeldende sti\n\
+$q Likhetstegn $t Gjeldende tid $v WCMD-versjon\n\
+\n\
+Merk at å bruke PROMPT-kommandoen uten en klartegn-streng tilbakestiller\n\
+klartegnet til standardverdien, som er arbeidskatalogen (inkludert\n\
+stasjonsbokstaven) etterfulgt av et større enn-tegn (>).\n\
+(Som en kommando PROMPT $p$g.)\n\
+\n\
+Klartegnet kan også endres ved endre miljøvariablen PROMPT, så\n\
+kommandoen «SET PROMPT=tekst» har samme effekt som «PROMPT tekst».\n"
+
+ WCMD_REM,
+"En kommandolinje som begynner med REM (etterfulgt av et mellomrom)\n\
+utfører ingen handling, og kan derfor brukes som kommantar i en satsvis\n\
+fil.\n"
+
+ WCMD_REN, "Hjelp til REN\n"
+ WCMD_RENAME, "Hjelp til RENAME\n"
+ WCMD_RD, "Hjelp til RD\n"
+ WCMD_RMDIR, "Hjelp til RMDIR\n"
+
+ WCMD_SET,
+"SET viser eller endrer miljøvariablene i WCMD.\n\
+\n\
+SET uten parametere viser alle gjeldende miljøvariabler.\n\
+\n\
+Syntaksen for å opprette eller endre en miljøvariabel er:\n\
+\n\
+ SET <variabel>=<verdi>\n\
+\n\
+hvor <variabel> og <verdi> er tegnstrenger. Det må ikke være mellomrom\n\
+før likhetstegnet, og variabelnavnet kan heller ikke ha innebygde\n\
+mellomrom.\n\
+\n\
+I Wine er miljøvariablene i det underliggende operativsystemet\n\ inkludert i Win32-miljøet, og det er derfor vanligvis mange flere\n\
+verdier enn i et vanlig Win32-miljø. Vær oppmerksom på at det ikke går\n\
+an å endre mijøet i det underliggende operativsystemet fra WCMD.\n"
+
+ WCMD_SHIFT,
+"SHIFT bruker i en satsvis fil for å fjerne den første parameteren i en\n\
+liste, sånn at parameter 2 blir parameter 1 og så videre. Det har ingen\n\
+effekt hvis det brukes fra kommandolinjen.\n"
+
+ WCMD_TIME, "Hjelp til TIME\n"
+
+ WCMD_TITLE, "Angir tittelen for WCMD-vinduet, syntaksen er\n\
+ TITLE [streng]\n"
+
+ WCMD_TYPE,
+"«TYPE <filnavn>» kopierer <filnavn> til konsollenheten (eller et annet\n\
+sted hvis det omdirigeres). Det kontrolleres ikke om filen er leselig tekst.\n"
+
+ WCMD_VERIFY,
+"VERIFY brukes til å aktivere, deaktivere eller teste «verify»-flagget.\n\ Gyldige måter er:\n\
+\n\
+VERIFY ON Aktiverer flagget\n\
+VERIFY OFF Deaktiverer flagget\n\
+VERIFY Viser ON hvis på ellerr OFF hvis av.\n\
+\n\
+«Verify»-flagget har ingen funksjon i Wine.\n"
+
+ WCMD_VER,
+"VER viser versjonnummeret til WCMD\n"
+
+ WCMD_VOL, "Hjelp til VOL\n"
+
+ WCMD_EXIT,
+"EXIT avslutter gjeldende kommandoøkt og returnerer til operativsystemet\n\
+eller skallet WCMD ble startet fra.\n"
+
+ 1000, "Innebygde kommandoer i WCMD:\n\
+ATTRIB\t\tViser eller endrer DOS-filattributter\n\
+CALL\t\tKall en satsvis fil inne i en annen\n\
+CD (CHDIR)\tBytter arbeidskatalog\n\
+CLS\t\tTømmer konsollskjermen\n\
+COPY\t\tKopierer filer\n\
+CTTY\t\tEndrer inn/ut-enhet\n\
+DATE\t\tViser eller endrer systemdatoen\n\
+DEL (ERASE)\tSletter en eller flere filer\n\
+DIR\t\tViser innholdet i en katalgo\n\
+ECHO\t\tKopierer tekst direkte til konsoll-utdataen\n\
+HELP\t\tViser en kort hjelpebeskrivelse om et emne\n\
+MD (MKDIR)\tLager en underkatalog\n\
+MOVE\t\tFlytter en eller flere filer, eller en katalogtre\n\
+PATH\t\tEndrer eller viser søkestien\n\
+PROMPT\t\tEndrer kommando-klartegnet\n\
+REN (RENAME)\tGir nytt navn til en fil\n\
+RD (RMDIR)\tSletter en underkatalog\n\
+SET\t\tAngir eller viser miljøvariabler\n\
+TIME\t\tAngir eller viser gjeldende systemtid\n\
+TITLE\t\tAngir vindustittelen for WCMD-økten\n\
+TYPE\t\tViser innholdet i en fil\n\
+VER\t\tViser WCMDs versjonnummer\n\
+VOL\t\tViser volumnavnet til en stasjon\n\
+EXIT\t\tAvslutter WCMD\n\n\
+Skriv «HELP <kommando>» for mer informasjon om kommandoene ovenfor\n"
+}
diff --git a/programs/cmd/Pl.rc b/programs/cmd/Pl.rc
new file mode 100644
index 0000000..18c419e
--- /dev/null
+++ b/programs/cmd/Pl.rc
@@ -0,0 +1,224 @@
+/*
+ * Wine command prompt
+ * Polish Language Support
+ *
+ * Copyright (C) 1999 D A Pickles
+ * Copyright (C) 2004 Piotr Caban
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_POLISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Pomoc o ATTRIB\n"
+ WCMD_CALL,
+"CALL <nazwa pliku bat> jest u¿ywane w pliku typu bat do uruchamiania\n\
+komend z innego pliku bat. Nastêpnie powraca do pliku, z którego zosta³a\n\
+wywo³ana (je¿eli istnieje). Komenda CALL mo¿e przekazywaæ parametry do\n\
+wywo³ywanej procedury.\n\
+\n\
+Zmiany domylnego katalogu, zmiennych rodowiskowych itd. wykonane przez\n\
+wywo³an¹ procedure s¹ dziedziczone przez skrypt wywo³uj¹cy CALL.\n"
+
+ WCMD_CD, "Pomoc o CD\n"
+ WCMD_CHDIR, "Pomoc o CHDIR\n"
+
+ WCMD_CLS, "CLS czyci ekran konsoli\n"
+
+ WCMD_COPY, "Pomoc o COPY\n"
+ WCMD_CTTY, "Pomoc o CTTY\n"
+ WCMD_DATE, "Pomoc o DATE\n"
+ WCMD_DEL, "Pomoc o DEL\n"
+ WCMD_DIR, "Pomoc o DIR\n"
+
+ WCMD_ECHO,
+"ECHO <ci¹g znaków> drukuje <ci¹g znków> do aktualnego u¿¹dzenia.\n\
+\n\
+ECHO ON powoduje, ¿e wszystkie komendy z pliku bat s¹ drukowane\n\
+do aktualnego urz¹dzenia przed wywo³aniem.\n\
+\n\
+ECHO OFF odwraca efekt komendy ECHO ON (ECHO jest wy³¹czone (OFF)\n\
+standardowo). Komenda ECHO OFF mo¿e zostaæ nie wywietlona je¿eli\n\
+zostanie poprzedzona znakiem @.\n"
+
+ WCMD_ERASE, "Pomoc o ERASE\n"
+
+ WCMD_FOR,
+"Komenda FOR s³u¿y do uruchomienia komendy dla ka¿dego z plików ze\n\
+zbioru.\n\
+Sk³adnia: FOR %zmienna IN (zbiór) DO polecenie\n\
+\n\
+Wymóg powtarzania znaku %, gdy u¿ywamy komendy FOR w pliku bat nie\n\
+istnije w wcmd\n"
+
+ WCMD_GOTO,
+"Komenda GOTO przenosi kursor do innego miejsca w pliku bat.\n\
+\n\
+Etykieta, która jest celem skoku (komendy GOTO) mo¿e mieæ maksymalnie\n\
+255 znaków d³ugoci, nie mo¿e zawieraæ spacji. Je¿eli s¹ dwie (lub\n\
+wiêcej) etykiety o takich samych nazwach skok zostanie wykonany do\n\
+pierwszej z nich. Je¿eli etykieta nie istnije wykonywanie pliku zostaje\n\
+przerwane.\n"
+
+ WCMD_HELP, "Pomoc o HELP\n"
+
+ WCMD_IF,
+"IF jest u¿ywane do warunkowego wykonywania poleceñ\n\
+\n\
+Sk³adnia: IF [NOT] EXIST nazwa_pliku komenda\n\
+ IF [NOT] ci¹g_znaków1==ci¹g_znaków2 komenda\n\
+ IF [NOT] ERRORLEVEL numer komenda\n\
+\n\
+W drugiej formie (ci¹g_znaków1==ci¹g_znaków2) ci¹g znaków musi byæ zawarty w\n\
+cudzys³owie.Przy porównywaniu pomijana jest wielkoæ znaków.\n"
+
+ WCMD_LABEL, "LABEL jest u¿ywane do ustawienia etykiety dysku.\n\
+\n\
+Sk³adnia: LABEL [dysk:]\n\
+Komenda poprosi o podanie nowej etykiety dysku.\n\
+Mo¿esz wywietliæ aktualn¹ etykietê komend¹ VOL.\n"
+
+ WCMD_MD, "Pomoc o MD\n"
+ WCMD_MKDIR, "Pomoc o MKDIR\n"
+ WCMD_MOVE,
+"MOVE zmienia po³o¿enie wybranego pliku lub katalogu.\n\
+\n\
+Je¿eli przemieszczany jest katalog wszystkie podkatalogi\n\
+i pliki s¹ tak¿e przesówane.\n\
+\n\
+MOVE dzia³a tylko w obrêbie jednego dysku.\n"
+
+ WCMD_PATH,
+"PATH wywitla lub zmienia cie¿ke w której wyszukuje wcmd.\n\
+\n\
+Komenda PATH bez parametrów wywietla aktualn¹ cie¿kê. Aby j¹\n\
+zmieniæ nale¿y wywo³aæ PATH za którym wystêpuje nowa cie¿ka.\n\
+\n\
+Umieszczenie wyra¿enia %PATH% przy poawaniu nowej cie¿ki\n\
+powoduje wstawienie starej cie¿ki, na przyk³ad:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE wywietla informacje 'Nacinij Enter aby kontynuowaæ' i czeka,\n\
+a¿ u¿ytkownik nacinie klawisz Enter. Funkcja ta jest u¿yteczna w plikach\n\
+typu bat, aby umo¿liwiæ u¿ytkownikowi przeczytanie informacji wywietlonych\n\
+na ekranie.\n"
+
+ WCMD_PROMPT,
+"PROMPT ustawia tekst zg³oszenia konsoli.\n\
+\n\
+Tekst wystêpuj¹cy za komend¹ (i spacje wystêpuj¹ce za nim)\n\
+pojawiaj¹ siê na pocz¹tku lini gdy wcmd czeka na komendê.\n\
+\n\
+Nastêpuj¹ce ci¹gi znaków maj¹ specjalne znaczenie:\n\
+\n\
+$$ Znak dolara ($) $_ Znak _ $b Znak |\n\
+$d Data $e Escape $g Znak >\n\
+$l Znak < $n Dysk $p cie¿ka\n\
+$q Znak = $t Czas $v Wersja wcmd\n\
+\n\
+Wpisanie PROMPT bez opcji resetuje ustawienia konsoli zwi¹zane z komend¹\n\
+PROMPT, ustawia wywietlany tekst na cie¿ke i znak >.\n\
+(Tak samo jak polecenie PROMPT $p$g).\n\
+\n\
+Polecenie 'SET PROMPT=tekst' ma taki sam efekt jak 'PROMPT tekst'\n"
+
+ WCMD_REM,
+"Polecenie poprzedzone komend¹ REM nie jest wykonywane, mo¿e byæ\n\
+stosowane jako komenta¿ w pliku typu bat.\n"
+
+ WCMD_REN, "Pomoc o REN\n"
+ WCMD_RENAME, "Pomoc o RENAME\n"
+ WCMD_RD, "Pomoc o RD\n"
+ WCMD_RMDIR, "Pomoc o RMDIR\n"
+
+ WCMD_SET,
+"SET wywietla lub ustawia zmienne rodowiskowe wcmd.\n\
+\n\
+SET bez parametrów wywitla wszystkie ustawione zmienne.\n\
+\n\
+Sk³adnia polecenia (by utworzyæ lub zmodyfikowaæ zmienn¹:\n\
+\n\
+ SET <zmienna>=<wartoæ>\n\
+\n\
+gdzie <zmienna> i <wartoæ> s¹ ci¹gami znaków. Spacja nie mo¿e\n\
+wystêpowaæ przed znakiem równoci, nazwa zmiennej nie mo¿e zawieraæ\n\
+spacji.\n\
+\n\
+Pod Wine'em zmienne rodowiskowe systemu operacyjnego s¹ dodawane do\n\
+zmiennych rodowiskowych Win32, ztego powodu jest wiêcej zmiennych ni¿\n\
+w implementacji Win32. Wine nie modyfikuje zmiennych rodowiskowych\n\
+systemu.\n"
+
+ WCMD_SHIFT,
+"SHIFT jest u¿ywane w plikach bat do usuniêcia pierwszego parametru z listy\n\
+parametrów, parametr 2 staje sie 1 itd. Polecenie to nie ma efektu gdy jest\n\
+wywo³ywane z lini komend.\n"
+
+ WCMD_TIME, "Pomoc o TIME\n"
+
+ WCMD_TITLE, "Ustawia nazwê okna wcmd, sk³adnia TITLE [ci¹g znaków]\n"
+
+ WCMD_TYPE,
+"TYPE <nazwa pliku> wywietla zawartoc pliku, nie jest sprawdzane, czy\n\
+jest on plikiem tekstowym.\n"
+
+ WCMD_VERIFY,
+"VERIFY jest u¿ywane do ustawienia wartoci flagi verify. Prawid³owa sk³adnia:\n\
+\n\
+VERIFY ON Ustawia flagê\n\
+VERIFY OFF Usuwa flagê\n\
+VERIFY Wywietla ON lub OFF w zale¿noci od stanu flagi.\n\
+\n\
+Ustawienia flagi nic nie zmieniaj¹ pod Wine'em.\n"
+
+ WCMD_VER,
+"VER wywietla wersjê wcmd.\n"
+
+ WCMD_VOL, "Pomoc o VOL\n"
+
+ WCMD_EXIT,
+"EXIT koñczy bierz¹c¹ sesjê wcmd i powraca do systemu operacyjnego\n\
+lub pow³oki, w której uruchomiono wcmd.\n"
+
+ 1000, "WCMD - wbudowane komendy:\n\
+ATTRIB\t\tPokazuje lub zmienia atrybuty pliku\n\
+CALL\t\tWywo³uje plik bat z innego pliku\n\
+CD (CHDIR)\tZmienia bierz¹cy katalog\n\
+CLS\t\tCzyci ekran konsoli\n\
+COPY\t\tKopiuje plik\n\
+CTTY\t\tZmienia urz¹dzenie wyjcia/wejcia\n\
+DATE\t\tPokazuje lub zmienia date systemow¹\n\
+DEL (ERASE)\tUsuwa plik lub pliki\n\
+DIR\t\tWywietla zawartoæ katalogu\n\
+ECHO\t\tKopiuje tekst na wyjcie konsoli\n\
+HELP\t\tWywietla dok³adniejsz¹ pomoc o komendzie\n\
+MD (MKDIR)\tTworzy katalog\n\
+MOVE\t\tPrzenosi katalog lub pliki\n\
+PATH\t\tUstawia lub wywietla cie¿kê przeszukiwania\n\
+PROMPT\t\tZmienia tekst zg³oszenia\n\
+REN (RENAME)\tZmienia nazwê pliku\n\
+RD (RMDIR)\tUsuwa katalog\n\
+SET\t\tUstawia lub wywietla zmienne rodowiskowe\n\
+TIME\t\tUstawia lub wywietla czas\n\
+TITLE\t\tUstawia tytu³ okna WCMD\n\
+TYPE\t\tWywietla zawartoæ pliku\n\
+VER\t\tWywietla wersjê WCMD\n\
+VOL\t\tWywietla etykietê dysku\n\
+EXIT\t\tWy³¹cza WCMD\n\n\
+Wpisz HELP <komenda> dla dok³adniejszych informacji o komendzie\n"
+}
diff --git a/programs/cmd/Pt.rc b/programs/cmd/Pt.rc
new file mode 100644
index 0000000..0125a8c
--- /dev/null
+++ b/programs/cmd/Pt.rc
@@ -0,0 +1,437 @@
+/*
+ * Wine command prompt
+ * Portuguese Language Support
+ *
+ * Copyright (C) 2003 Marcelo Duarte
+ * Copyright 2004 Américo José Melo
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE_BRAZILIAN
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Ajuda do comando ATTRIB\n"
+ WCMD_CALL,
+"CALL <arquivo_de_lote> é usado dentro de um arquivo de lote para executar\n\
+comando de outro arquivo de lote. Quando o arquivo existe, o controle retorna\n\
+ao arquivo que o chamou. O comando CALL pode passar parâmetros ao procedimento\n\
+chamado.\n\
+\n\
+Mudannças no diretório padrão, variáveis de ambiente, etc, feitas dentro\n\
+do procedimente chamado são herdados pelo chamador.\n"
+
+ WCMD_CD, "Ajuda do comando CD\n"
+ WCMD_CHDIR, "Ajuda do comando CHDIR\n"
+
+ WCMD_CLS, "CLS limpa a tela do console\n"
+
+ WCMD_COPY, "Ajuda do comando COPY\n"
+ WCMD_CTTY, "Ajuda do comando CTTY\n"
+ WCMD_DATE, "Ajuda do comando DATE\n"
+ WCMD_DEL, "Ajuda do comando DEL\n"
+ WCMD_DIR, "Ajuda do comando DIR\n"
+
+ WCMD_ECHO,
+"ECHO <string> mostra a <string> no dispositivo terminal atual.\n\
+\n\
+ECHO ON ativa a exibição de todos os comandos subsequentes em um\n\
+arquivo de lote no terminal antes deles serem executados.\n\
+\n\
+ECHO OFF desativa o efeito de um comando ECHO ON (ECHO é OFF por padrão).\n\
+O comando ECHO OFF pode ser impedido de ser mostrado colocando-se um\n\
+símbolo @ precedendo o mesmo.\n"
+
+ WCMD_ERASE, "Ajuda do comando ERASE\n"
+
+ WCMD_FOR,
+"O comando FOR é usado para executar um comando a cada vez em\num conjunto de arquivos.\n\
+\n\
+Sintaxe: FOR %variável IN (conjunto) DO comando\n\
+\n\
+No wcmd, não existe a necessidade de usar dois sinais % no \n\
+comando FOR nos arquivos de lote.\n"
+
+ WCMD_GOTO,
+"O comando GOTO transfere a execução para outra declaração dentro\n\
+do arquivo de lote.\n\
+\n\
+O rótulo que será o destino do comando GOTO pode ter até 255 caracteres\n\
+mas não pode incluir espaços (diferentemente de outros sistemas operacionais).\n\
+Se dois ou mais rótulos forem identicos no arquivo de lote, o primeiro deles\n\
+será sempre executado. A tentativa de usar o GOTO para um rótulo inexistente\n\
+termina a execução do arquivo de lote.\n\
+\n\
+GOTO não tem efeito quando usando interativamente.\n"
+
+ WCMD_HELP, "Ajuda do comando HELP\n"
+
+ WCMD_IF,
+"IF é usado para executar um comando condicionalmente.\n\
+\n\
+Sintaxe: IF [NOT] EXIST arquivo comando\n\
+ IF [NOT] texto1==texto2 comando\n\
+ IF [NOT] ERRORLEVEL número comando\n\
+\n\
+Na segunda forma do comando, texto1 e texto2 devem estar usando aspas.\n\
+A comparação não diferencia maiúsculas de minusculas.\n"
+
+ WCMD_LABEL, "LABEL é usado para rotular um volume do disco. \n\
+\n\
+Sintaxe: LABEL [drive:]\n\
+O comando LABEL irá aguardar que vc informe o novo rótulo para o drive\n\
+especificado. Você pode mostrar o rótulo do disco com o comando VOL.\n"
+
+ WCMD_MD, "Ajuda do comando MD\n"
+ WCMD_MKDIR, "Ajuda do comando MKDIR\n"
+ WCMD_MOVE,
+"MOVE realoca um arquivo ou diretório em um novo ponto no sistema de arquivos.\n\
+\n\
+Se o item sendo movido é um diretório então todos os arquivos e subdiretórios\n\
+abaixo do item são movidos com o mesmo.\n\
+\n\
+MOVE falhará se o local antigo e o novo local estão em diferentes unidades.\n"
+
+ WCMD_PATH,
+"PATH mostra ou permite mudar o caminho de procura de programas do wcmd.\n\
+\n\
+Digitando PATH mostrará a atual configuração do comando PATH (inicialmente este\n\
+valor é especificado no arquivo wine.conf). Para mudar as configurações, digite\n\
+novos valores no comando PATH.\n\
+\n\
+Também é possível modificar o comando PATH usando a variável de ambiente PATH,\n\
+por exemplo:\n\
+ PATH %PATH%;c:\\temp\n"
+
+ WCMD_PAUSE,
+"PAUSE mostra a seguinte mensagem na tela 'Pressione Enter para continuar'\n\
+e aguarda que o usuário pressione a tecla Enter. Isto é útil principalmente\n\
+em arquivos de lote para permitir ao usuário ler a saída de um comando anterior\n\
+antes que a tela sofra um rolamento.\n"
+
+ WCMD_PROMPT,
+"PROMPT configura o 'prompt' da linha de comando.\n\
+\n\
+O texto seguindo o comando PROMPT (e os espaços imediatamente depois)\n\
+aparecem no começo da linha enquanto o wcmd está aguardando por comandos.\n\
+\n\
+Os seguintes caracteres tem um significado especial, conforme mostrado:\n\
+\n\
+$$ Cifrão ($) $_ Avanço de linha $b Símbolo pipe (|)\n\
+$d Data atual $e Código de escape $g Sinal de maior (>)\n\
+$l Sinal de menor (<) $n Unidade atual $p Caminho atual\n\
+$q Sinal de igual (=) $t Hora atual $v Versão do wcmd\n\
+\n\
+Note que digitando o comando PROMPT sem parâmetros reconfigura o padrão,\n\
+que é a letra da unidade atual seguida pelo diretório e um sinal de maior\n\
+(equivalente a um comando PROMPT $p$g).\n\
+\n\
+O 'prompt' também pode ser mudado alterando a variável PROMPT, assim,\n\
+o comando 'SET PROMPT=texto' tem o mesmo efeito que 'PROMPT texto'\n"
+
+ WCMD_REM,
+"Uma linha de comando iniciando com REM (seguindo de um espaço) não faz\n\
+ação alguma, e os carateres usando são considerados comentários em um\n\
+arquivo de lote\n"
+
+ WCMD_REN, "Ajuda do comando REN\n"
+ WCMD_RENAME, "Ajuda do comando RENAME\n"
+ WCMD_RD, "Ajuda do comando RD\n"
+ WCMD_RMDIR, "Ajuda do comando RMDIR\n"
+
+ WCMD_SET,
+"SET mostra ou muda as varável de ambiente de wcmd.\n\
+\n\
+SET sem parêmtros mostra todas as varável de ambiente atuais\n\
+\n\
+Para criar ou modificar variável de ambiente, a sintaxe é:\n\
+\n\
+ SET <variável>=<valor>\n\
+\n\
+sendo que <variável> e <valor> são textos. Não devem existir espaços\n\
+antes do sinal de igualdade, nem a varável pode conter espaços.\n\
+\n\
+No Wine, o ambiente do sistema operacional é incluido no ambiente Win32,\n\
+onde sempre haverá mais valores que em um sistema Win32 nativo. Note que\n\
+não é possível afetar o ambiente do sistema operacional a partir do wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT é usado em arquivos de lote para remover um parâmetro que inicia a\n\
+lista, assim então o parâmentro2 sobrepôe o parametro1 e assim por diante.\n\
+Isto não tem efeito se chamado a partir da linha de comando.\n"
+
+ WCMD_TIME, "Ajuda do comando TIME\n"
+
+ WCMD_TITLE, "Configura o título da janela do wcmd, e a sintaxe é TITLE [texto]\n"
+
+ WCMD_TYPE,
+"TYPE <arquivo> copia <arquvo> para o dispositivo console (ou outro, se\n\
+redirecionado). Nehuma verificação é feita se o arquivo pode ser lido.\n"
+
+ WCMD_VERIFY,
+"VERIFY é usado para configurar, limpar e testar o 'flag' de verificação. As\n\
+formas válidas são>\n\
+\n\
+VERIFY ON Configura o flag\n\
+VERIFY OFF Limpa o flag\n\
+VERIFY Mostra ON ou OFF qdo apropriado.\n\
+\n\
+O flag de verificação não tem função no Wine.\n"
+
+ WCMD_VER,
+"VER mostra a versão em execução do wcmd.\n"
+
+ WCMD_VOL, "Ajuda do comando VOL\n"
+
+ WCMD_EXIT,
+"EXIT termina a sessão de comando atual e retorna ao sistema operacional\n\
+ou shell que tenha invocado o wcmd.\n"
+
+ 1000, "WCMD - os comando internos são:\n\
+ATTRIB\t\tMostra ou troca atributos de arquivo DOS\n\
+CALL\t\tInvoca um arquivo de lote dentro de outro\n\
+CD (CHDIR)\tMuda o diretório padrão atual\n\
+CLS\t\tLimpa a tela do console\n\
+COPY\t\tCopia arquivos\n\
+CTTY\t\tMuda o dispositivo de entrada/saída\n\
+DATE\t\tMostra ou muda a data do sistema\n\
+DEL (ERASE)\tApaga um arquivo ou conjunto de arquivos\n\
+DIR\t\tMostra o conteúdo de um diretórios\n\
+ECHO\t\tCopia texto diretamente na saída do console\n\
+HELP\t\tMostra breves detalhes de um tópico\n\
+MD (MKDIR)\tCria um subdiretório\n\
+MOVE\t\tMove um arquivo, conjunto de arquivos ou uma árvore de diretórios\n\
+PATH\t\tConfigira o caminho de procura\n\
+PROMPT\t\tMuda o 'prompt' de comando\n\
+REN (RENAME)\tRenomeia um arquivo\n\
+RD (RMDIR)\tApaga um subdiretório\n\
+SET\t\tConfigura ou mostra variáveis de ambiente\n\
+TIME\t\tConfigura ou mostra a hora atual do sistema\n\
+TITLE\t\tConfigura o título da janela de comando WCMD\n\
+TYPE\t\tMostra o conteúdo de um arquivo texto\n\
+VER\t\tMostra a versão atual do WCMD\n\
+VOL\t\tMostra o rótulo do volume de uma unidade de disco\n\
+EXIT\t\tFecha o WCMD\n\n\
+Entre HELP <comando> para maiores informações sobre alguns dos comandos acima\n"
+}
+
+LANGUAGE LANG_PORTUGUESE, SUBLANG_PORTUGUESE
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Ajuda do comando ATTRIB\n"
+ WCMD_CALL,
+"CALL <ficheiro_de_lote> é usado dentro de um ficheiro de lote para executar o\n\
+comando de outro ficheiro de lote. Quando o ficheiro existe, o controle retorna\n\
+ao ficheiro que o chamou. O comando CALL pode passar parâmetros ao procedimento\n\
+chamado.\n\
+\n\
+Mudanças no directório padrão, variáveis de ambiente, etc, feitas dentro\n\
+do procedimente chamado são herdados pelo chamador.\n"
+
+ WCMD_CD, "Ajuda do comando CD\n"
+ WCMD_CHDIR, "Ajuda do comando CHDIR\n"
+
+ WCMD_CLS, "CLS limpa a ecrã da consola\n"
+
+ WCMD_COPY, "Ajuda do comando COPY\n"
+ WCMD_CTTY, "Ajuda do comando CTTY\n"
+ WCMD_DATE, "Ajuda do comando DATE\n"
+ WCMD_DEL, "Ajuda do comando DEL\n"
+ WCMD_DIR, "Ajuda do comando DIR\n"
+
+ WCMD_ECHO,
+"ECHO <string> mostra a <string> no dispositivo terminal actual.\n\
+\n\
+ECHO ON activa a exibição de todos os comandos subsequentes num\n\
+ficheiro de lote no terminal antes deles serem executados.\n\
+\n\
+ECHO OFF desactiva o efeito de um comando ECHO ON (ECHO é OFF por padrão).\n\
+O comando ECHO OFF pode ser impedido de ser mostrado colocando-se um\n\
+símbolo @ precedendo o mesmo.\n"
+
+ WCMD_ERASE, "Ajuda do comando ERASE\n"
+
+ WCMD_FOR,
+"O comando FOR é usado para executar um comando a cada vez num conjunto de ficheiros.\n\
+\n\
+Sintaxe: FOR %variável IN (conjunto) DO comando\n\
+\n\
+No wcmd, não existe a necessidade de usar dois sinais % no \n\
+comando FOR nos ficheiros de lote.\n"
+
+ WCMD_GOTO,
+"O comando GOTO transfere a execução para outra declaração dentro\n\
+do ficheiro de lote.\n\
+\n\
+O rótulo que será o destino do comando GOTO pode ter até 255 caracteres\n\
+mas não pode conter espaços (diferentemente de outros sistemas operacionais).\n\
+Se dois ou mais rótulos forem identicos no ficheiro de lote, o primeiro deles\n\
+será sempre executado. A tentativa de usar o GOTO para um rótulo inexistente\n\
+termina a execução do ficheiro de lote.\n\
+\n\
+GOTO não tem efeito quando usado interactivamente.\n"
+
+ WCMD_HELP, "Ajuda do comando HELP\n"
+
+ WCMD_IF,
+"IF é usado para executar um comando condicionalmente.\n\
+\n\
+Sintaxe: IF [NOT] EXIST ficheiro comando\n\
+ IF [NOT] texto1==texto2 comando\n\
+ IF [NOT] ERRORLEVEL número comando\n\
+\n\
+Na segunda forma do comando, texto1 e texto2 devem estar a usar aspas.\n\
+A comparação não diferencia maiúsculas de minusculas.\n"
+
+ WCMD_LABEL, "LABEL é usado para rotular um volume do disco. \n\
+\n\
+Sintaxe: LABEL [drive:]\n\
+O comando LABEL irá aguardar que informe o novo rótulo para o drive\n\
+especificado. Pode mostrar o rótulo do disco com o comando VOL.\n"
+
+ WCMD_MD, "Ajuda do comando MD\n"
+ WCMD_MKDIR, "Ajuda do comando MKDIR\n"
+ WCMD_MOVE,
+"MOVE realoca um ficheiro ou directório num novo ponto no sistema de ficheiros.\n\
+\n\
+Se o item ao ser movido é um directório então todos os ficheiros e subdirectórios\n\
+abaixo do item serão movidos com o mesmo.\n\
+\n\
+MOVE falhará se o local antigo e o novo local estão em diferentes unidades.\n"
+
+ WCMD_PATH,
+"PATH mostra ou permite mudar o caminho de procura de programas do wcmd.\n\
+\n\
+Ao digitar PATH mostrará a actual configuração do comando PATH (inicialmente este\n\
+valor é especificado no ficheiro wine.conf). Para mudar as configurações, digite\n\
+novos valores no comando PATH.\n\
+\n\
+Também é possível modificar o comando PATH usando a variável de ambiente PATH,\n\
+por exemplo:\n\
+ PATH %PATH%;c:\\temp\n"
+
+ WCMD_PAUSE,
+"PAUSE mostra a seguinte mensagem no ecrã 'Prima Enter para continuar'\n\
+e aguarda que o utilizador prima a tecla Enter. Isto é útil principalmente\n\
+em ficheiros de lote para permitir ao utilizador ler a saída de um comando anterior\n\
+antes que o ecrã sofra um rolamento.\n"
+
+ WCMD_PROMPT,
+"PROMPT configura o 'prompt' da linha de comando.\n\
+\n\
+O texto a seguir o comando PROMPT (e os espaços imediatamente depois)\n\
+aparecem no começo da linha enquanto o wcmd está a aguardar por comandos.\n\
+\n\
+Os seguintes caracteres tem um significado especial, conforme mostrado:\n\
+\n\
+$$ Cifrão ($) $_ Avanço de linha $b Símbolo pipe (|)\n\
+$d Data actual $e Código de escape $g Sinal de maior (>)\n\
+$l Sinal de menor (<) $n Unidade actual $p Caminho actual\n\
+$q Sinal de igual (=) $t Hora actual $v Versão do wcmd\n\
+\n\
+Note que ao digitar o comando PROMPT sem parâmetros reconfigura o padrão,\n\
+que é a letra da unidade actual seguida pelo directório e um sinal de maior\n\
+(equivalente a um comando PROMPT $p$g).\n\
+\n\
+O 'prompt' também pode ser mudado alterando a variável PROMPT, assim,\n\
+o comando 'SET PROMPT=texto' tem o mesmo efeito que 'PROMPT texto'\n"
+
+ WCMD_REM,
+"Uma linha de comando a iniciar com REM (seguido de um espaço) não faz\n\
+nenhuma acção, e os carateres a usar são considerados comentários num\n\
+ficheiro de lote\n"
+
+ WCMD_REN, "Ajuda do comando REN\n"
+ WCMD_RENAME, "Ajuda do comando RENAME\n"
+ WCMD_RD, "Ajuda do comando RD\n"
+ WCMD_RMDIR, "Ajuda do comando RMDIR\n"
+
+ WCMD_SET,
+"SET mostra ou muda as varável de ambiente de wcmd.\n\
+\n\
+SET sem parêmtros mostra todas as varável de ambiente actuais\n\
+\n\
+Para criar ou modificar variável de ambiente, a sintaxe é:\n\
+\n\
+ SET <variável>=<valor>\n\
+\n\
+sendo que <variável> e <valor> são textos. Não devem existir espaços\n\
+antes do sinal de igualdade, nem a varável pode conter espaços.\n\
+\n\
+No Wine, o ambiente do sistema operacional é incluido no ambiente Win32,\n\
+onde sempre haverá mais valores que num sistema Win32 nativo. Note que\n\
+não é possível afectar o ambiente do sistema operacional a partir do wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT é usado em ficheiros de lote para remover um parâmetro que inicia a\n\
+lista, assim então o parâmentro2 sobrepôe o parametro1 e assim por diante.\n\
+Isto não tem efeito se chamado a partir da linha de comando.\n"
+
+ WCMD_TIME, "Ajuda do comando TIME\n"
+
+ WCMD_TITLE, "Configura o título da janela do wcmd, e a sintaxe é TITLE [texto]\n"
+
+ WCMD_TYPE,
+"TYPE <ficheiro> copia <ficheiro> para o dispositivo consola (ou outro, se\n\
+redireccionado). Nehuma verificação é feita se o ficheiro pode ser lido.\n"
+
+ WCMD_VERIFY,
+"VERIFY é usado para configurar, limpar e testar o 'flag' de verificação. As\n\
+formas válidas são>\n\
+\n\
+VERIFY ON Configura o flag\n\
+VERIFY OFF Limpa o flag\n\
+VERIFY Mostra ON ou OFF qdo apropriado.\n\
+\n\
+O flag de verificação não tem função no Wine.\n"
+
+ WCMD_VER,
+"VER mostra a versão em execução do wcmd.\n"
+
+ WCMD_VOL, "Ajuda do comando VOL\n"
+
+ WCMD_EXIT,
+"EXIT termina a sessão de comando actual e retorna ao sistema operacional\n\
+ou shell que tenha invocado o wcmd.\n"
+
+ 1000, "WCMD - os comando internos são:\n\
+ATTRIB\t\tMostra ou troca atributos do ficheiro DOS\n\
+CALL\t\tInvoca um ficheiro de lote dentro de outro\n\
+CD (CHDIR)\tMuda o directório padrão actual\n\
+CLS\t\tLimpa o ecrã da consola\n\
+COPY\t\tCopia ficheiros\n\
+CTTY\t\tMuda o dispositivo de entrada/saída\n\
+DATE\t\tMostra ou muda a data do sistema\n\
+DEL (ERASE)\tApaga um ficheiro ou conjunto de ficheiros\n\
+DIR\t\tMostra o conteúdo de um directório\n\
+ECHO\t\tCopia o texto diretamente na saída da consola\n\
+HELP\t\tMostra breves detalhes de um tópico\n\
+MD (MKDIR)\tCria um subdirectório\n\
+MOVE\t\tMove um ficheiro, conjunto de ficheiros ou uma árvore de directórios\n\
+PATH\t\tConfigura o caminho de procura\n\
+PROMPT\t\tMuda a 'prompt' de comando\n\
+REN (RENAME)\tRenomeia um ficheiro\n\
+RD (RMDIR)\tApaga um subdirectório\n\
+SET\t\tConfigura ou mostra variáveis de ambiente\n\
+TIME\t\tConfigura ou mostra a hora atual do sistema\n\
+TITLE\t\tConfigura o título da janela de comando WCMD\n\
+TYPE\t\tMostra o conteúdo de um ficheiro texto\n\
+VER\t\tMostra a versão atual do WCMD\n\
+VOL\t\tMostra o rótulo do volume de uma unidade de disco\n\
+EXIT\t\tFecha o WCMD\n\n\
+Digite HELP <comando> para mais informações sobre alguns dos comandos acima\n"
+}
diff --git a/programs/cmd/README b/programs/cmd/README
new file mode 100644
index 0000000..ee1c542
--- /dev/null
+++ b/programs/cmd/README
@@ -0,0 +1,46 @@
+CMD - A Command-Line Interface for WINE
+Copyright (C) 1999 D Pickles (davep@nugate.demon.co.uk)
+Open Source software published under the Wine Licence and Warranty.
+
+This is an Alpha version and is very much "work in progress".
+
+WHAT'S INCLUDED
+- Sources
+- A Makefile for compiling with LibWine. Build Wine with "-enable-dll" first.
+- A Makefile for Borland C++ (needs editing for directories).
+
+WHAT'S MISSING
+- Command-line qualifiers for most builtin commands
+- Wildcards and relative paths in COPY, MOVE and RENAME
+- Set functionality in DATE, TIME, ATTRIB, LABEL
+- Full internationalisation of the text (and commands?).
+
+WHAT DOESN'T WORK
+- The ATTRIB command reports all files having their Archive flag set, and the
+READONLY setting depends on the Unix file permissions. All other flags are
+always clear. The Wine attributes API calls map to the Unix stat() function
+which cannot handle the other attributes available in DOS.
+- Date/timestamps of files in the DIR listing are shown using the current
+locale, which is set using the Unix LANG environment variable. By default the
+US date-time format is used. Set eg "LANG=en_GB" for DD/MM/YY dates and 24-hour
+times.
+- Line editing and command recall doesn't work due to missing functionality in
+Wine.
+- DIR/S only works if no file specification is given, ie "DIR C:\TEMP /S" works
+but "DIR C:\TEMP\*.C" doesn't work if a matching file exists in a lower
+directory.
+- Copy, rename, move, need the source and destination to be specified fully
+with an absolute or relative path but no wildcards or partial filenames.
+- Redirection is implemented as a command line is parsed. This means that ">"
+and "<" symbols cannot appear in command arguments even within quotes.
+- In many cases parsing and syntax checking is less rigorous than DOS. Thus an
+existing DOS batch file will probably run unchanged under wine's cmd but the
+reverse may not be the case.
+
+WINE OR WIN32 BINARY?
+cmd can be built as a Wine binary, or (using a Win32 compiler) as a Win32 .EXE
+image. The Wine binary is simpler to invoke from the U**x command line or from
+a GUI such as KDE, however it is not possible to invoke a second shell using the
+"CMD /C filename" syntax. Conversely a Win32 application can be invoked from a
+Win32 GUI such as Program Manager but that needs starting under Wine first.
+
diff --git a/programs/cmd/Ru.rc b/programs/cmd/Ru.rc
new file mode 100644
index 0000000..61ab8ef
--- /dev/null
+++ b/programs/cmd/Ru.rc
@@ -0,0 +1,228 @@
+/*
+ * Wine command prompt (Russian resources)
+ *
+ * Copyright 2003 Igor Stepin
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Ñïðàâêà îá ATTRIB\n"
+ WCMD_CALL,
+"CALL <èìÿ bat-ôàéëà> èñïîëüçóåòñÿ â bat-ôàéëàõ äëÿ çàïóñêà êîìàíä\n\
+èç äðóãîãî bat-ôàéëà. When the batch file exits, control returns to\n\
+the file which called it. The CALL command may supply parameters to the\n\
+called procedure.\n\
+\n\
+Changes to default directory, environment variables etc made within a\n\
+called procedure are inherited by the caller.\n"
+
+ WCMD_CD, "Ñïðàâêà î CD\n"
+ WCMD_CHDIR, "Ñïðàâêà î CHDIR\n"
+
+ WCMD_CLS, "CLS î÷èùàåò ýêðàí êîíñîëè\n"
+
+ WCMD_COPY, "Ñïðàâêà î COPY\n"
+ WCMD_CTTY, "Ñïðàâêà î CTTY\n"
+ WCMD_DATE, "Ñïðàâêà î DATE\n"
+ WCMD_DEL, "Ñïðàâêà î DEL\n"
+ WCMD_DIR, "Ñïðàâêà î DIR\n"
+
+ WCMD_ECHO,
+"ECHO <ñòðîêà> îòîáðàæàåò <ñòðîêó> íà òåêóùåì òåðìèíàëüíîì óòðîéñòâå.\n\
+\n\
+ECHO ON causes all subsequent commands in a batch file to be displayed\n\
+on the terminal device before they are executed.\n\
+\n\
+ECHO OFF reverses the effect of a previous ECHO ON (ECHO is OFF by\n\
+default). The ECHO OFF command can be prevented from displaying by\n\
+preceding it with an @ sign.\n"
+
+ WCMD_ERASE, "Ñïðàâêà îá ERASE\n"
+
+ WCMD_FOR,
+"The FOR command is used to execute a command for each of a set of files.\n\
+\n\
+Syntax: FOR %variable IN (set) DO command\n\
+\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
+not exist in wcmd.\n"
+
+ WCMD_GOTO,
+"The GOTO command transfers execution to another statement within a\n\
+batch file.\n\
+\n\
+The label which is the target of a GOTO may be up to 255 characters\n\
+long but may not include spaces (this is different from other operating\n\
+systems). If two or more identical labels exist in a batch file the\n\
+first one will always be executed. Attempting to GOTO a nonexistent\n\
+label terminates the batch file execution.\n\
+\n\
+GOTO has no effect when used interactively.\n"
+
+ WCMD_HELP, "Ñïðàâêà î HELP\n"
+
+ WCMD_IF,
+"IF is used to conditionally execute a command.\n\
+\n\
+Syntax: IF [NOT] EXIST filename command\n\
+ IF [NOT] string1==string2 command\n\
+ IF [NOT] ERRORLEVEL number command\n\
+\n\
+In the second form of the command, string1 and string2 must be in double\n\
+quotes. The comparison is not case-sensitive.\n"
+
+ WCMD_LABEL, "LABEL is used to set a disk volume label. \n\
+\n\
+Syntax: LABEL [drive:]\n\
+The command will prompt you for the new volume label for the given drive.\n\
+You can display the disk volume label with the VOL command.\n"
+
+ WCMD_MD, "Ñïðàâêà î MD\n"
+ WCMD_MKDIR, "Ñïðàâêà î MKDIR\n"
+ WCMD_MOVE,
+"MOVE relocates a file or directory to a new point within the file system.\n\
+\n\
+If the item being moved is a directory then all the files and subdirectories\n\
+below the item are moved as well.\n\
+\n\
+MOVE fails if the old and new locations are on different DOS drive letters.\n"
+
+ WCMD_PATH,
+"PATH displays or changes the wcmd search path.\n\
+\n\
+Entering PATH will display the current PATH setting (initially this is\n\
+the value given in your wine.conf file). To change the setting follow the\n\
+PATH command with the new value.\n\
+\n\
+It is also possible to modify the PATH by using the PATH environment\n\
+variable, for example:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE displays a message on the screen 'Press Return key to continue'\n\
+and waits for the user to press the Return key. It is mainly useful in\n\
+batch files to allow the user to read the output of a previous command\n\
+before it scrolls off the screen.\n"
+
+ WCMD_PROMPT,
+"PROMPT sets the command-line prompt.\n\
+\n\
+The string following the PROMPT command (and the space immediately after)\n\
+appears at the beginning of the line when wcmd is waiting for input.\n\
+\n\
+The following character strings have the special meaning shown:\n\
+\n\
+$$ Çíàê äîëëàðà $_ Linefeed $b Çíàê Pipe (|)\n\
+$d Òåêóùàÿ äàòà $e Escape $g Çíàê >\n\
+$l Çíàê < $n Òåêóùèé äèñê $p Òåêóùèé ïóòü\n\
+$q Çíàê ðàâíî $t Òåêóùåå âðåìÿ $v Âåðñèÿ wcmd\n\
+\n\
+Note that entering the PROMPT command without a prompt-string resets the\n\
+prompt to the default, which is the current drive letter followed by its\n\
+current directory and a greater-than (>) sign.\n\
+(like a command PROMPT $p$g).\n\
+\n\
+The prompt can also be changed by altering the PROMPT environment variable,\n\
+so the command 'SET PROMPT=text' has the same effect as 'PROMPT text'\n"
+
+ WCMD_REM,
+"Êîìàíäíàÿ òðîêà, íà÷èíàþùàÿñÿ ñ REM (ñ ïîñëåäóþùèì ïðîáåëîì) íå âûïîëíÿåò\n\
+íèêàêèõ äåéñòâèé è ñëåäîâàòåëüíî èñïîëüçóåòñÿ äëÿ êîììåíòàðèåâ â bat-ôàéëàõ.\n"
+
+ WCMD_REN, "Ñïðàâêà î REN\n"
+ WCMD_RENAME, "Ñïðàâêà î RENAME\n"
+ WCMD_RD, "Ñïðàâêà î RD\n"
+ WCMD_RMDIR, "Ñïðàâêà î RMDIR\n"
+
+ WCMD_SET,
+"SET ïîêàçûâàåò èëè èçìåíÿåò ïåðåìåííûå îêðóæåíèÿ wcmd.\n\
+\n\
+SET áåç ïàðàìåòðîâ ïîêàçûâàåò âñ¸ òåêóùåå îêðóæåíèå.\n\
+\n\
+Äëÿ ñîçäàíèÿ èëè èçìåíåíèÿ ïåðåìåííîé îêðóæåíèÿ èñïîëüçóéòå:\n\
+\n\
+ SET <ïåêðåìåííàÿ>=<çíà÷åíèå>\n\
+\n\
+ãäå <ïåðåìåííàÿ> è <çàí÷åíèå> ÿâëÿþòñÿ ñèìâîëüíûìè ñòðîêàìè. There must be no\n\
+spaces before the equals sign, nor can the variable name\n\
+have embedded spaces.\n\
+\n\
+Under Wine, the environment of the underlying operating system is\n\
+included into the Win32 environment, there will generally therefore be\n\
+many more values than in a native Win32 implementation. Note that it is\n\
+not possible to affect the operating system environment from within wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT is used in a batch file to remove one parameter from the head of\n\
+the list, so parameter 2 becomes parameter 1 and so on. It has no effect\n\
+if called from the command line.\n"
+
+ WCMD_TIME, "Ñïðàâêà î TIME\n"
+
+ WCMD_TITLE, "Óñòàíàâëèâàåò çàãîëîâîê îêíà wcmd äëÿ òåêóùåé ñåññèè,\n ñèíòàêñèñ: TITLE [ñòðîêà]\n"
+
+ WCMD_TYPE,
+"TYPE <filename> copies <filename> to the console device (or elsewhere\n\
+if redirected). No check is made that the file is readable text.\n"
+
+ WCMD_VERIFY,
+"VERIFY is used to set, clear or test the verify flag. Valid forms are:\n\
+\n\
+VERIFY ON Óñòàíîâèòü ôëàã\n\
+VERIFY OFF Ñáðîñèòü ôëàã\n\
+VERIFY Displays ON or OFF as appropriate.\n\
+\n\
+Ôëàã verify íå èñïîëüçóåòñÿ Wine.\n"
+
+ WCMD_VER,
+"VER îòîáðàæàåò âåðñèþ çàïóùåííîãî wcmd\n"
+
+ WCMD_VOL, "Ñïðàâêà î VOL\n"
+
+ WCMD_EXIT,
+"EXIT çàâåðøàåò òåêóùóþ êîìàíäíóþ ñåññèþ â âîçâðàùàåò\n\
+â îïåðàöèîííóþ ñèñòåìó èëè îáîëî÷êó èç êîòîðîé áûë çàïóùåí wcmd.\n"
+
+ 1000, "Âñòðîåííûå êîìàíäû WCMD:\n\
+ATTRIB\t\tÏîêàçàòü èëè èçìåíèòü DOS-àòòðèáóòû ôàéëà\n\
+CALL\t\tÇàïóñòèòü bat-ôàéë èç äðóãîãî bat-ôàéëà\n\
+CD (CHDIR)\tÑìåíèòü òåêóùóþ ïàïêó\n\
+CLS\t\tÎ÷èñòèòü ýêðàí êîíñîëè\n\
+COPY\t\tÑêîïèðîâàòü ôàéë\n\
+CTTY\t\tÑìåíèòü óñòðîéñòâî ââîäà/âûâîäà\n\
+DATE\t\tÏîêàçàòü èëè èçìåíèòü ñèñòåìíóþ äàòó\n\
+DEL (ERASE)\tÓäàëèòü ôàéë èëè íàáîð ôàéëîâ\n\
+DIR\t\tÏîêàçàòü ñîäåðæàíèå ïàïêè\n\
+ECHO\t\tÑêîïèðîâàòü òåêñò ïðÿìî íà âûõîä êîíñîëè\n\
+HELP\t\tÏîêàçàòü êðàäêóþ ïîäñêàçêó ïî êîìàíäå\n\
+MD (MKDIR)\tÑîçäàòü ïàïêó\n\
+MOVE\t\tÏåðåìåñòèòü ôàéë, íàáîð ôàéëîâ èëè äåðåâî ïàïîê\n\
+PATH\t\tÏîêàçàòü èëè èçìåíèòü ïóòü ïîèñêà ïðîãðàìì\n\
+PROMPT\t\tÈçìåíèòü ïðèãëàøåíèå êîìàíäíîé ñòðîêè\n\
+REN (RENAME)\tÏåðåèìåíîâàòü ôàéë\n\
+RD (RMDIR)\tÓäàëèòü ïàïêó\n\
+SET\t\tÏîêàçàòü èëè èçìåíèòü ïåðåìåííûå îêðóæåíèÿ\n\
+TIME\t\tÏîêàçàòü èëè èçìåíèòü òåêóùåå ñèñòåìíîå âðåìÿ\n\
+TITLE\t\tÓñòàíàâèòü çàãîëîâîê îêíà wcmd äëÿ òåêóùåé ñåññèè\n\
+TYPE\t\tÂûâåñòè ñîäåðæàíèå òåêñòîâîãî ôàéëà\n\
+VER\t\tÏîêàçàòü òåêóùóþ âåðñèþ WCMD\n\
+VOL\t\tÏîêàçàòü ìåòêó òîìà äèñêîâîãî óñòðîéñòâà\n\
+EXIT\t\tÂûéòè èç WCMD\n\n\
+Âûïîëíèòå HELP <êîìàíäà> äëÿ äîïîëíèòåëüíîé èíôîðìàöèè ïî ïåðå÷èñëåííûì âûøå êîìàíäàì.\n"
+}
diff --git a/programs/cmd/Si.rc b/programs/cmd/Si.rc
new file mode 100644
index 0000000..59f3aa2
--- /dev/null
+++ b/programs/cmd/Si.rc
@@ -0,0 +1,229 @@
+/*
+ * Wine command prompt
+ * Slovenian Language Support
+ *
+ * Copyright (C) 2003 Rok Mandeljc <rok.mandeljc@gimb.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_SLOVENIAN, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "Help about ATTRIB\n"
+ WCMD_CALL,
+"CALL <batchfilename> is used within a batch file to execute commands\n\
+from another batch file. When the batch file exits, control returns to\n\
+the file which called it. The CALL command may supply parameters to the\n\
+called procedure.\n\
+\n\
+Changes to default directory, environment variables etc made within a\n\
+called procedure are inherited by the caller.\n"
+
+ WCMD_CD, "Help about CD\n"
+ WCMD_CHDIR, "Help about CHDIR\n"
+
+ WCMD_CLS, "CLS clears the console screen\n"
+
+ WCMD_COPY, "Help about COPY\n"
+ WCMD_CTTY, "Help about CTTY\n"
+ WCMD_DATE, "Help about DATE\n"
+ WCMD_DEL, "Help about DEL\n"
+ WCMD_DIR, "Help about DIR\n"
+
+ WCMD_ECHO,
+"ECHO <string> displays <string> on the current terminal device.\n\
+\n\
+ECHO ON causes all subsequent commands in a batch file to be displayed\n\
+on the terminal device before they are executed.\n\
+\n\
+ECHO OFF reverses the effect of a previous ECHO ON (ECHO is OFF by\n\
+default). The ECHO OFF command can be prevented from displaying by\n\
+preceding it with an @ sign.\n"
+
+ WCMD_ERASE, "Help about ERASE\n"
+
+ WCMD_FOR,
+"The FOR command is used to execute a command for each of a set of files.\n\
+\n\
+Syntax: FOR %variable IN (set) DO command\n\
+\n\
+The requirement to double the % sign when using FOR in a batch file does\n\
+not exist in wcmd.\n"
+
+ WCMD_GOTO,
+"The GOTO command transfers execution to another statement within a\n\
+batch file.\n\
+\n\
+The label which is the target of a GOTO may be up to 255 characters\n\
+long but may not include spaces (this is different from other operating\n\
+systems). If two or more identical labels exist in a batch file the\n\
+first one will always be executed. Attempting to GOTO a nonexistent\n\
+label terminates the batch file execution.\n\
+\n\
+GOTO has no effect when used interactively.\n"
+
+ WCMD_HELP, "Help about HELP\n"
+
+ WCMD_IF,
+"IF is used to conditionally execute a command.\n\
+\n\
+Syntax: IF [NOT] EXIST filename command\n\
+ IF [NOT] string1==string2 command\n\
+ IF [NOT] ERRORLEVEL number command\n\
+\n\
+In the second form of the command, string1 and string2 must be in double\n\
+quotes. The comparison is not case-sensitive.\n"
+
+ WCMD_LABEL, "LABEL is used to set a disk volume label. \n\
+\n\
+Syntax: LABEL [drive:]\n\
+The command will prompt you for the new volume label for the given drive.\n\
+You can display the disk volume label with the VOL command.\n"
+
+ WCMD_MD, "Help about MD\n"
+ WCMD_MKDIR, "Help about MKDIR\n"
+ WCMD_MOVE,
+"MOVE relocates a file or directory to a new point within the file system.\n\
+\n\
+If the item being moved is a directory then all the files and subdirectories\n\
+below the item are moved as well.\n\
+\n\
+MOVE fails if the old and new locations are on different DOS drive letters.\n"
+
+ WCMD_PATH,
+"PATH displays or changes the wcmd search path.\n\
+\n\
+Entering PATH will display the current PATH setting (initially this is\n\
+the value given in your wine.conf file). To change the setting follow the\n\
+PATH command with the new value.\n\
+\n\
+It is also possible to modify the PATH by using the PATH environment\n\
+variable, for example:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE displays a message on the screen 'Press Return key to continue'\n\
+and waits for the user to press the Return key. It is mainly useful in\n\
+batch files to allow the user to read the output of a previous command\n\
+before it scrolls off the screen.\n"
+
+ WCMD_PROMPT,
+"PROMPT sets the command-line prompt.\n\
+\n\
+The string following the PROMPT command (and the space immediately after)\n\
+appears at the beginning of the line when wcmd is waiting for input.\n\
+\n\
+The following character strings have the special meaning shown:\n\
+\n\
+$$ Dollar sign $_ Linefeed $b Pipe sign (|)\n\
+$d Current date $e Escape $g > sign\n\
+$l < sign $n Current drive $p Current path\n\
+$q Equal sign $t Current time $v wcmd version\n\
+\n\
+Note that entering the PROMPT command without a prompt-string resets the\n\
+prompt to the default, which is the current drive letter followed by its\n\
+current directory and a greater-than (>) sign.\n\
+(like a command PROMPT $p$g).\n\
+\n\
+The prompt can also be changed by altering the PROMPT environment variable,\n\
+so the command 'SET PROMPT=text' has the same effect as 'PROMPT text'\n"
+
+ WCMD_REM,
+"A command line beginning REM (followed by a space) performs no\n\
+action, and can therefore be used as a comment in a batch file.\n"
+
+ WCMD_REN, "Help about REN\n"
+ WCMD_RENAME, "Help about RENAME\n"
+ WCMD_RD, "Help about RD\n"
+ WCMD_RMDIR, "Help about RMDIR\n"
+
+ WCMD_SET,
+"SET displays or changes the wcmd environment variables.\n\
+\n\
+SET without parameters shows all of the current environment.\n\
+\n\
+To create or modify an environment variable the syntax is:\n\
+\n\
+ SET <variable>=<value>\n\
+\n\
+where <variable> and <value> are character strings. There must be no\n\
+spaces before the equals sign, nor can the variable name\n\
+have embedded spaces.\n\
+\n\
+Under Wine, the environment of the underlying operating system is\n\
+included into the Win32 environment, there will generally therefore be\n\
+many more values than in a native Win32 implementation. Note that it is\n\
+not possible to affect the operating system environment from within wcmd.\n"
+
+ WCMD_SHIFT,
+"SHIFT is used in a batch file to remove one parameter from the head of\n\
+the list, so parameter 2 becomes parameter 1 and so on. It has no effect\n\
+if called from the command line.\n"
+
+ WCMD_TIME, "Help about TIME\n"
+
+ WCMD_TITLE, "Sets the window title for the wcmd window, syntax TITLE [string]\n"
+
+ WCMD_TYPE,
+"TYPE <filename> copies <filename> to the console device (or elsewhere\n\
+if redirected). No check is made that the file is readable text.\n"
+
+ WCMD_VERIFY,
+"VERIFY is used to set, clear or test the verify flag. Valid forms are:\n\
+\n\
+VERIFY ON Set the flag\n\
+VERIFY OFF Clear the flag\n\
+VERIFY Displays ON or OFF as appropriate.\n\
+\n\
+The verify flag has no function in Wine.\n"
+
+ WCMD_VER,
+"VER displays the version of wcmd you are running\n"
+
+ WCMD_VOL, "Help about VOL\n"
+
+ WCMD_EXIT,
+"EXIT terminates the current command session and returns\n\
+to the operating system or shell from which you invoked wcmd.\n"
+
+ 1000, "WCMD built-in commands are:\n\
+ATTRIB\t\tShow or change DOS file attributes\n\
+CALL\t\tInvoke a batch file from inside another\n\
+CD (CHDIR)\tChange current default directory\n\
+CLS\t\tClear the console screen\n\
+COPY\t\tCopy file\n\
+CTTY\t\tChange input/output device\n\
+DATE\t\tShow or change the system date\n\
+DEL (ERASE)\tDelete a file or set of files\n\
+DIR\t\tList the contents of a directory\n\
+ECHO\t\tCopy text directly to the console output\n\
+HELP\t\tShow brief help details on a topic\n\
+MD (MKDIR)\tCreate a subdirectory\n\
+MOVE\t\tMove a file, set of files or directory tree\n\
+PATH\t\tSet or show the search path\n\
+PROMPT\t\tChange the command prompt\n\
+REN (RENAME)\tRename a file\n\
+RD (RMDIR)\tDelete a subdirectory\n\
+SET\t\tSet or show environment variables\n\
+TIME\t\tSet or show the current system time\n\
+TITLE\t\tSet the window title for the WCMD session\n\
+TYPE\t\tType the contents of a text file\n\
+VER\t\tShow the current version of WCMD\n\
+VOL\t\tShow the volume label of a disk device\n\
+EXIT\t\tClose down WCMD\n\n\
+Enter HELP <command> for further information on any of the above commands\n"
+}
diff --git a/programs/cmd/Tr.rc b/programs/cmd/Tr.rc
new file mode 100644
index 0000000..cc225ce
--- /dev/null
+++ b/programs/cmd/Tr.rc
@@ -0,0 +1,231 @@
+/*
+ * Wine command prompt
+ * Turkish Language Support
+ *
+ * Copyright (C) 2006 Fatih Aþýcý
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+LANGUAGE LANG_TURKISH, SUBLANG_DEFAULT
+
+STRINGTABLE
+{
+ WCMD_ATTRIB, "ATTRIB hakkýnda yardým\n"
+ WCMD_CALL,
+"CALL <topluiþlemdosyasý> komutu bir toplu iþlem dosyasýnda baþka bir\n\
+toplu iþlem dosyasýndaki komutlarý çalýþtýrmak için kullanýlýr. Eðer\n\
+dosya mevcutsa, denetim yine onu çaðýran dosyaya döner. CALL komutu\n\
+çaðrýlan yordamlar için parametre verebilir.\n\
+\n\
+Çaðrýlan bir yordamda deðiþtirilen dizinler, çevre deðiþkenleri vb.\n\
+kendisini çaðýran tarafýndan miras alýnýr.\n"
+
+ WCMD_CD, "CD hakkýnda yardým\n"
+ WCMD_CHDIR, "CHDIR hakkýnda yardým\n"
+
+ WCMD_CLS, "CLS konsol ekranýný temizler\n"
+
+ WCMD_COPY, "COPY hakkýnda yardým\n"
+ WCMD_CTTY, "CTTY hakkýnda yardým\n"
+ WCMD_DATE, "DATE hakkýnda yardým\n"
+ WCMD_DEL, "DEL hakkýnda yardým\n"
+ WCMD_DIR, "DIR hakkýnda yardým\n"
+
+ WCMD_ECHO,
+"ECHO <ileti> geçerli uçbirim aygýtýnda <ileti>'yi gösterir.\n\
+\n\
+ECHO ON bir toplu iþlem dosyasýnda tüm komutlarýn çalýþtýrýlmadan önce\n\
+uçbirim aygýtýnda görüntülenmesini saðlar\n\
+\n\
+ECHO OFF bir önceki ECHO ON (ECHO öntanýmlý olarak kapalýdýr)komutunun\n\
+tersini yapar. ECHO OFF çýktýsýnýn görüntülenmesini baþýna @ iþareti\n\
+getirerek engelleyebilirsiniz.\n"
+
+ WCMD_ERASE, "ERASE hakkýnda yardým\n"
+
+ WCMD_FOR,
+"FOR komutu bir dosya kümesinin her öðesi için bir komut çalýþtýrmada\n\
+kullanýlýr.\n\
+\n\
+Sözdizim: FOR %deðiþken IN (küme) DO komut\n\
+\n\
+FOR kullanýmý için toplu iþlem dosyasýnda % iþaretini çift kullanma\n\
+gereksinimi wcmd'de yoktur.\n"
+
+ WCMD_GOTO,
+"GOTO komutu çalýþma satýrýný toplu iþlem dosyasýndaki baþka bir satýra\n\
+yönlendirir.\n\
+\n\
+GOTO komutunun hedefi olacak etiket en fazla 255 karakterden oluþabilir;\n\
+ancak boþluk içeremez (bu diðer iþletim sistemlerinden farklýdýr). Eðer\n\
+toplu iþlem dosyasýnda ayný etiket bir veya daha fazla yerde kullanýlmýþsa\n\
+her zaman ilk etiket kullanýlacaktýr. GOTO var olmayan bir etiket alýrsa\n\
+toplu iþlem dosyasý sonlanacaktýr.\n\
+\n\
+GOTO komutunun etkileþimli olarak kullanýmýnýn bir etkisi yoktur.\n"
+
+ WCMD_HELP, "HELP hakkýnda yardým\n"
+
+ WCMD_IF,
+"IF bir komutu koþula baðlý olarak çalýþtýrmada kullanýlýr.\n\
+\n\
+Sözdzimi: IF [NOT] EXIST dosyaadý komut\n\
+ IF [NOT] dize1==dize2 komut\n\
+ IF [NOT] ERRORLEVEL sayý komut\n\
+\n\
+Ýkinci biçimde dize1 ve dize2 çift týrnak içerisinde olmalýdýr.\n\
+Karþýlaþtýrma BÜYÜK/küçük harf duyarlý deðildir.\n"
+
+ WCMD_LABEL, "LABEL bir disk bölümüne etiket verir. \n\
+\n\
+Sözdizimi: LABEL [sürücü:]\n\
+Komut sizden verilen sürücü için yeni bir etiket girmenizi bekleyecektir.\n\
+Disk bölüm etiketini VOL komutu ile gösterebilirsiniz.\n"
+
+ WCMD_MD, "MD hakkýnda yardým\n"
+ WCMD_MKDIR, "MKDIR hakkýnda yardým\n"
+ WCMD_MOVE,
+"MOVE bir dosya veya dizini dosya sistemi içinde yeni bir noktaya taþýr.\n\
+\n\
+Eðer taþýnacak öðe bir dizinse dizin içerisindeki tüm dosyalar ve alt\n\
+dizinler de birlikte taþýnacaktýr.\n\
+\n\
+Eðer eski ve yeni konumlar farklý DOS sürücüleri üzerindeyse MOVE hata\n\
+verecektir.\n"
+
+ WCMD_PATH,
+"PATH wcmd arama yolunu gösterir veya deðiþtirir.\n\
+\n\
+Sadece PATH girmek geçerli PATH ayarýný gösterecektir (baþlangýçta bu\n\
+wine.conf dosyanýzda verilen deðer olacaktýr). Ayarý deðiþtirmek için\n\
+PATH komutuna yeni deðeri ekleyin.\n\
+\n\
+Ayrýca PATH ayarýný düzenlemek için PATH çevre deðikenini de\n\
+kullanabilirsiniz, örneðin:\n\
+ PATH %PATH%;c:\\temp \n"
+
+ WCMD_PAUSE,
+"PAUSE 'Devam etmek için bir tuþa basýn' iletisini ekranda gösterip\n\
+kullanýcýnýn bir tuþa basmasýný bekler. Çoðunlukla toplu iþlem\n\
+dosyalarýnda kullanýcýya önceki komutun çýktýsýný ekrandan çýkmadan\n\
+önce okutmak için kullanýlýr.\n"
+
+ WCMD_PROMPT,
+"PROMPT komut istemini deðiþtirir.\n\
+\n\
+PROMPT komutunu izleyen dize (ve hemen ardýndan bir boþluk) wcmd sizden\n\
+komut beklerken satýr baþýnda görünür.\n\
+\n\
+Aþaðýdaki karakter dizeleri gösterilen özel anlamlarý içerir:\n\
+\n\
+$$ Dolar iþareti $_ Alt satýr $b boru iþareti (|)\n\
+$d Geçerli tarih $e Escape $g > iþareti\n\
+$l < iþareti $n Geçerli sürücü $p Geçerli yol\n\
+$q Eþittir iþareti $t Geçerli saat $v wcmd sürümü\n\
+\n\
+Sadece PROMPT komutunu girerseniz komut istemi geçerli dizini (sürücü harfi\n\
+dahil) ve onu izleyen büyüktür (>) iþareti içeren öntanýmlý deðerlere\n\
+dönecektir.\n\
+(PROMPT $p$g komutu gibi).\n\
+\n\
+Komut istemi ayrýca PROMPT çevre deðiþkeni deðiþtirilerek de belirlenebilir.\n\
+Yani 'SET PROMPT=metin' ile 'PROMPT metin' ayný iþi görür.\n"
+
+ WCMD_REM,
+"REM (ardýndan da bir boþluk) ile baþlayan bir komut satýrýnýn\n\
+hiçbir iþlevi yoktur; dolayýsýyla toplu iþlem dosyalarýnda\n\
+açýklama olarak kullanýlabilir.\n"
+
+ WCMD_REN, "REN hakkýnda yardým\n"
+ WCMD_RENAME, "RENAME hakkýnda yardým\n"
+ WCMD_RD, "RD hakkýnda yardým\n"
+ WCMD_RMDIR, "RMDIR hakkýnda yardým\n"
+
+ WCMD_SET,
+"SET wcmd çevre deðiþkenlerini gösterir veya deðiþtirir.\n\
+\n\
+Parametresiz girilen SET geçerli çevrenin tümünü gösterir.\n\
+\n\
+Bir çevre deðiþkenini oluþturmak veya düzenlemek için sözdizimi:\n\
+\n\
+ SET <deðiþken>=<deðer>\n\
+\n\
+<deðiþken> ve <deðer> karakter dizeleridir. Ne eþittir iþaretinden\n\
+önce ne de deðiþken adý içerisinde boþluk bulunabilir.\n\
+\n\
+Wine altýnda, üzerinde çalýþýlan iþletim sistemi çevresi Win32 çevresine\n\
+dahil edilir. Dolayýsýyla doðal bir Win32 gerçeklemesinden daha fazla\n\
+deðer bulunacaktýr. wcmd altýnda iþletim sistemi çevresini deðiþtirmek\n\
+mümkün deðildir.\n"
+
+ WCMD_SHIFT,
+"SHIFT toplu iþlem dosyasýnda parametre listesinin baþýndan bir tanesini\n\
+siler. Böylece 2. parametre 1. parametre olacaktýr. Komut satýrýnda\n\
+çaðrýldýðýnda bir etkisi yoktur.\n"
+
+ WCMD_TIME, "TIME hakkýnda yardým\n"
+
+ WCMD_TITLE, "wcmd penceresi için pencere baþlýðýný deðiþtirir. Sözdizimi: TITLE [dize]\n"
+
+ WCMD_TYPE,
+"TYPE <dosyaadý> komutu <dosyaadý>'ný konsol aygýtýna kopyalar (eðer\n\
+yönlendirilmiþse baþka yere). Dosyanýn okunabilirliði denetlenmez.\n"
+
+ WCMD_VERIFY,
+"VERIFY doðrulama bayraðýný açar, kapatýr veya sýnar. Geçerli biçimler:\n\
+\n\
+VERIFY ON Bayraðý aç\n\
+VERIFY OFF Bayraðý kaldýr\n\
+VERIFY Bayraðýn durumunu gösterir.\n\
+\n\
+Doðrulama bayraðýnýn Wine'da bir iþlevi yoktur.\n"
+
+ WCMD_VER,
+"VER kullandýðýnýz wcmd sürümünü gösterir\n"
+
+ WCMD_VOL, "VOL hakkýnda yardým\n"
+
+ WCMD_EXIT,
+"EXIT geçerli komut oturumunu sonlandýrýr ve wcmd'yi çaðýrdýðýnýz\n\
+yerden iþletim sistemine döner.\n"
+
+ 1000, "WCMD dahili komutlarý:\n\
+ATTRIB\t\tDOS dosya özelliklerini göster veya deðiþtir\n\
+CALL\t\tToplu iþlem dosyasý içerisinden bir diðerini çalýþtýr\n\
+CD (CHDIR)\tGeçerli dizini deðiþtir\n\
+CLS\t\tKonsol ekranýný temizle\n\
+COPY\t\tDosya kopyala\n\
+CTTY\t\tGiriþ/çýkýþ aygýtýný deðiþtir\n\
+DATE\t\tSistem tarihini göster veya deðiþtir\n\
+DEL (ERASE)\tBir veya daha fazla dosyayý sil\n\
+DIR\t\tDizin içeriðini listele\n\
+ECHO\t\tMetni doðrudan konsol çýkýþýna kopyala\n\
+HELP\t\tBir konu üzerinde özet yardým göster\n\
+MD (MKDIR)\tAlt dizin oluþtur\n\
+MOVE\t\tBir veya daha fazla dosyayý ya da dizin aðacýný taþý\n\
+PATH\t\tArama yolunu düzenle veya göster\n\
+PROMPT\t\tKomut istemini deðiþtir\n\
+REN (RENAME)\tDosyayý yeniden adlandýr\n\
+RD (RMDIR)\tAlt dizini sil\n\
+SET\t\tÇevre deðiþkenlerini düzenle veya göster\n\
+TIME\t\tGeçerli sistem saatini düzenle veya göster\n\
+TITLE\t\tWCMD oturumu için pencere baþlýðýný belirle\n\
+TYPE\t\tMetin dosyasýnýn içeriðini göster\n\
+VER\t\tGeçerli WCMD sürümünü göster\n\
+VOL\t\tDisk aygýtýnýn bölüm etiketini göster\n\
+EXIT\t\tWCMD'yi kapat\n\n\
+Yukarýdaki komutlar hakkýnda daha fazla bilgi için HELP <komut> girin\n"
+}
diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
new file mode 100644
index 0000000..8beef16
--- /dev/null
+++ b/programs/cmd/batch.c
@@ -0,0 +1,288 @@
+/*
+ * CMD - Wine-compatible command line interface - batch interface.
+ *
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "wcmd.h"
+
+void WCMD_batch_command (char *line);
+
+extern int echo_mode;
+extern char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
+extern BATCH_CONTEXT *context;
+extern DWORD errorlevel;
+
+/* msdn specified max for Win XP */
+#define MAXSTRING 8192
+
+/****************************************************************************
+ * WCMD_batch
+ *
+ * Open and execute a batch file.
+ * On entry *command includes the complete command line beginning with the name
+ * of the batch file (if a CALL command was entered the CALL has been removed).
+ * *file is the name of the file, which might not exist and may not have the
+ * .BAT suffix on. Called is 1 for a CALL, 0 otherwise.
+ *
+ * We need to handle recursion correctly, since one batch program might call another.
+ * So parameters for this batch file are held in a BATCH_CONTEXT structure.
+ */
+
+void WCMD_batch (char *file, char *command, int called) {
+
+#define WCMD_BATCH_EXT_SIZE 5
+
+HANDLE h = INVALID_HANDLE_VALUE;
+char string[MAXSTRING];
+char extension_batch[][WCMD_BATCH_EXT_SIZE] = {".bat",".cmd"};
+char extension_exe[WCMD_BATCH_EXT_SIZE] = ".exe";
+unsigned int i;
+BATCH_CONTEXT *prev_context;
+
+ for(i=0; (i<(sizeof(extension_batch)/WCMD_BATCH_EXT_SIZE)) &&
+ (h == INVALID_HANDLE_VALUE); i++) {
+ strcpy (string, file);
+ CharLower (string);
+ if (strstr (string, extension_batch[i]) == NULL) strcat (string, extension_batch[i]);
+ h = CreateFile (string, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ }
+ if (h == INVALID_HANDLE_VALUE) {
+ strcpy (string, file);
+ CharLower (string);
+ if (strstr (string, extension_exe) == NULL) strcat (string, extension_exe);
+ h = CreateFile (string, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h != INVALID_HANDLE_VALUE) {
+ WCMD_run_program (command, 0);
+ } else {
+ SetLastError (ERROR_FILE_NOT_FOUND);
+ WCMD_print_error ();
+ }
+ return;
+ }
+
+/*
+ * Create a context structure for this batch file.
+ */
+
+ prev_context = context;
+ context = (BATCH_CONTEXT *)LocalAlloc (LMEM_FIXED, sizeof (BATCH_CONTEXT));
+ context -> h = h;
+ context -> command = command;
+ context -> shift_count = 0;
+ context -> prev_context = prev_context;
+
+/*
+ * Work through the file line by line. Specific batch commands are processed here,
+ * the rest are handled by the main command processor.
+ */
+
+ while (WCMD_fgets (string, sizeof(string), h)) {
+ if (strlen(string) == MAXSTRING -1) {
+ WCMD_output_asis( "Line in Batch processing possibly truncated. Using:\n");
+ WCMD_output_asis( string);
+ WCMD_output_asis( "\n");
+ }
+ if (string[0] != ':') { /* Skip over labels */
+ WCMD_batch_command (string);
+ }
+ }
+ CloseHandle (h);
+
+/*
+ * If invoked by a CALL, we return to the context of our caller. Otherwise return
+ * to the caller's caller.
+ */
+
+ LocalFree ((HANDLE)context);
+ if ((prev_context != NULL) && (!called)) {
+ CloseHandle (prev_context -> h);
+ context = prev_context -> prev_context;
+ LocalFree ((HANDLE)prev_context);
+ }
+ else {
+ context = prev_context;
+ }
+}
+
+/****************************************************************************
+ * WCMD_batch_command
+ *
+ * Execute one line from a batch file, expanding parameters.
+ */
+
+void WCMD_batch_command (char *line) {
+
+DWORD status;
+char cmd1[MAXSTRING],cmd2[MAXSTRING];
+char *p, *s, *t;
+int i;
+
+ /* Get working version of command line */
+ strcpy(cmd1, line);
+
+ /* Expand environment variables in a batch file %{0-9} first */
+ /* Then env vars, and if any left (ie use of undefined vars,*/
+ /* replace with spaces */
+ /* FIXME: Winnt would replace %1%fred%1 with first parm, then */
+ /* contents of fred, then the digit 1. Would need to remove */
+ /* ExpandEnvStrings to achieve this */
+
+ /* Replace use of %0...%9 */
+ p = cmd1;
+ while ((p = strchr(p, '%'))) {
+ i = *(p+1) - '0';
+ if ((i >= 0) && (i <= 9)) {
+ s = strdup (p+2);
+ t = WCMD_parameter (context -> command, i + context -> shift_count, NULL);
+ strcpy (p, t);
+ strcat (p, s);
+ free (s);
+ } else {
+ p++;
+ }
+ }
+
+ /* Now replace environment variables */
+ status = ExpandEnvironmentStrings(cmd1, cmd2, sizeof(cmd2));
+ if (!status) {
+ WCMD_print_error ();
+ return;
+ }
+
+ /* In a batch program, unknown variables are replace by nothing */
+ /* so remove any remaining %var% */
+ p = cmd2;
+ while ((p = strchr(p, '%'))) {
+ s = strchr(p+1, '%');
+ if (!s) {
+ *p=0x00;
+ } else {
+ t = strdup(s+1);
+ strcpy(p, t);
+ free(t);
+ }
+ }
+
+ /* Show prompt before batch line IF echo is on */
+ if (echo_mode && (line[0] != '@')) {
+ WCMD_show_prompt();
+ WCMD_output_asis ( cmd2);
+ WCMD_output_asis ( "\n");
+ }
+
+ WCMD_process_command (cmd2);
+}
+
+/*******************************************************************
+ * WCMD_parameter - extract a parameter from a command line.
+ *
+ * Returns the 'n'th space-delimited parameter on the command line (zero-based).
+ * Parameter is in static storage overwritten on the next call.
+ * Parameters in quotes (and brackets) are handled.
+ * Also returns a pointer to the location of the parameter in the command line.
+ */
+
+char *WCMD_parameter (char *s, int n, char **where) {
+
+int i = 0;
+static char param[MAX_PATH];
+char *p;
+
+ p = param;
+ while (TRUE) {
+ switch (*s) {
+ case ' ':
+ s++;
+ break;
+ case '"':
+ if (where != NULL) *where = s;
+ s++;
+ while ((*s != '\0') && (*s != '"')) {
+ *p++ = *s++;
+ }
+ if (i == n) {
+ *p = '\0';
+ return param;
+ }
+ if (*s == '"') s++;
+ param[0] = '\0';
+ i++;
+ p = param;
+ break;
+ case '(':
+ if (where != NULL) *where = s;
+ s++;
+ while ((*s != '\0') && (*s != ')')) {
+ *p++ = *s++;
+ }
+ if (i == n) {
+ *p = '\0';
+ return param;
+ }
+ if (*s == ')') s++;
+ param[0] = '\0';
+ i++;
+ p = param;
+ break;
+ case '\0':
+ return param;
+ default:
+ if (where != NULL) *where = s;
+ while ((*s != '\0') && (*s != ' ')) {
+ *p++ = *s++;
+ }
+ if (i == n) {
+ *p = '\0';
+ return param;
+ }
+ param[0] = '\0';
+ i++;
+ p = param;
+ }
+ }
+}
+
+/****************************************************************************
+ * WCMD_fgets
+ *
+ * Get one line from a batch file. We can't use the native f* functions because
+ * of the filename syntax differences between DOS and Unix. Also need to lose
+ * the LF (or CRLF) from the line.
+ */
+
+char *WCMD_fgets (char *s, int n, HANDLE h) {
+
+DWORD bytes;
+BOOL status;
+char *p;
+
+ p = s;
+ do {
+ status = ReadFile (h, s, 1, &bytes, NULL);
+ if ((status == 0) || ((bytes == 0) && (s == p))) return NULL;
+ if (*s == '\n') bytes = 0;
+ else if (*s != '\r') {
+ s++;
+ n--;
+ }
+ *s = '\0';
+ } while ((bytes == 1) && (n > 1));
+ return p;
+}
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
new file mode 100644
index 0000000..3329a0b
--- /dev/null
+++ b/programs/cmd/builtins.c
@@ -0,0 +1,1118 @@
+/*
+ * CMD - Wine-compatible command line interface - built-in functions.
+ *
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * NOTES:
+ * On entry to each function, global variables quals, param1, param2 contain
+ * the qualifiers (uppercased and concatenated) and parameters entered, with
+ * environment-variable and batch parameter substitution already done.
+ */
+
+/*
+ * FIXME:
+ * - No support for pipes, shell parameters
+ * - Lots of functionality missing from builtins
+ * - Messages etc need international support
+ */
+
+#define WIN32_LEAN_AND_MEAN
+
+#include "wcmd.h"
+
+void WCMD_execute (char *orig_command, char *parameter, char *substitution);
+
+struct env_stack
+{
+ struct env_stack *next;
+ WCHAR *strings;
+};
+
+struct env_stack *saved_environment;
+
+extern HINSTANCE hinst;
+extern char *inbuilt[];
+extern int echo_mode, verify_mode;
+extern char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
+extern BATCH_CONTEXT *context;
+extern DWORD errorlevel;
+
+
+
+/****************************************************************************
+ * WCMD_clear_screen
+ *
+ * Clear the terminal screen.
+ */
+
+void WCMD_clear_screen (void) {
+
+ /* Emulate by filling the screen from the top left to bottom right with
+ spaces, then moving the cursor to the top left afterwards */
+ CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
+ HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
+
+ if (GetConsoleScreenBufferInfo(hStdOut, &consoleInfo))
+ {
+ COORD topLeft;
+ DWORD screenSize;
+
+ screenSize = consoleInfo.dwSize.X * (consoleInfo.dwSize.Y + 1);
+
+ topLeft.X = 0;
+ topLeft.Y = 0;
+ FillConsoleOutputCharacter(hStdOut, ' ', screenSize, topLeft, &screenSize);
+ SetConsoleCursorPosition(hStdOut, topLeft);
+ }
+}
+
+/****************************************************************************
+ * WCMD_change_tty
+ *
+ * Change the default i/o device (ie redirect STDin/STDout).
+ */
+
+void WCMD_change_tty (void) {
+
+ WCMD_output (nyi);
+
+}
+
+/****************************************************************************
+ * WCMD_copy
+ *
+ * Copy a file or wildcarded set.
+ * FIXME: No wildcard support
+ */
+
+void WCMD_copy (void) {
+
+DWORD count;
+WIN32_FIND_DATA fd;
+HANDLE hff;
+BOOL force, status;
+static const char overwrite[] = "Overwrite file (Y/N)?";
+char string[8], outpath[MAX_PATH], inpath[MAX_PATH], *infile;
+
+ if ((strchr(param1,'*') != NULL) && (strchr(param1,'%') != NULL)) {
+ WCMD_output ("Wildcards not yet supported\n");
+ return;
+ }
+
+ /* If no destination supplied, assume current directory */
+ if (param2[0] == 0x00) {
+ strcpy(param2, ".");
+ }
+
+ GetFullPathName (param2, sizeof(outpath), outpath, NULL);
+ hff = FindFirstFile (outpath, &fd);
+ if (hff != INVALID_HANDLE_VALUE) {
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ GetFullPathName (param1, sizeof(inpath), inpath, &infile);
+ strcat (outpath, "\\");
+ strcat (outpath, infile);
+ }
+ FindClose (hff);
+ }
+
+ force = (strstr (quals, "/Y") != NULL);
+ if (!force) {
+ hff = FindFirstFile (outpath, &fd);
+ if (hff != INVALID_HANDLE_VALUE) {
+ FindClose (hff);
+ WCMD_output (overwrite);
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string), &count, NULL);
+ if (toupper(string[0]) == 'Y') force = TRUE;
+ }
+ else force = TRUE;
+ }
+ if (force) {
+ status = CopyFile (param1, outpath, FALSE);
+ if (!status) WCMD_print_error ();
+ }
+}
+
+/****************************************************************************
+ * WCMD_create_dir
+ *
+ * Create a directory.
+ *
+ * this works recursivly. so mkdir dir1\dir2\dir3 will create dir1 and dir2 if
+ * they do not already exist.
+ */
+
+BOOL create_full_path(CHAR* path)
+{
+ int len;
+ CHAR *new_path;
+ BOOL ret = TRUE;
+
+ new_path = HeapAlloc(GetProcessHeap(),0,strlen(path)+1);
+ strcpy(new_path,path);
+
+ while ((len = strlen(new_path)) && new_path[len - 1] == '\\')
+ new_path[len - 1] = 0;
+
+ while (!CreateDirectory(new_path,NULL))
+ {
+ CHAR *slash;
+ DWORD last_error = GetLastError();
+ if (last_error == ERROR_ALREADY_EXISTS)
+ break;
+
+ if (last_error != ERROR_PATH_NOT_FOUND)
+ {
+ ret = FALSE;
+ break;
+ }
+
+ if (!(slash = strrchr(new_path,'\\')) && ! (slash = strrchr(new_path,'/')))
+ {
+ ret = FALSE;
+ break;
+ }
+
+ len = slash - new_path;
+ new_path[len] = 0;
+ if (!create_full_path(new_path))
+ {
+ ret = FALSE;
+ break;
+ }
+ new_path[len] = '\\';
+ }
+ HeapFree(GetProcessHeap(),0,new_path);
+ return ret;
+}
+
+void WCMD_create_dir (void) {
+
+ if (!create_full_path(param1)) WCMD_print_error ();
+}
+
+/****************************************************************************
+ * WCMD_delete
+ *
+ * Delete a file or wildcarded set.
+ *
+ */
+
+void WCMD_delete (int recurse) {
+
+WIN32_FIND_DATA fd;
+HANDLE hff;
+char fpath[MAX_PATH];
+char *p;
+
+ hff = FindFirstFile (param1, &fd);
+ if (hff == INVALID_HANDLE_VALUE) {
+ WCMD_output ("%s :File Not Found\n",param1);
+ return;
+ }
+ if ((strchr(param1,'*') == NULL) && (strchr(param1,'?') == NULL)
+ && (!recurse) && (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+ strcat (param1, "\\*");
+ FindClose(hff);
+ WCMD_delete (1);
+ return;
+ }
+ if ((strchr(param1,'*') != NULL) || (strchr(param1,'?') != NULL)) {
+ strcpy (fpath, param1);
+ do {
+ p = strrchr (fpath, '\\');
+ if (p != NULL) {
+ *++p = '\0';
+ strcat (fpath, fd.cFileName);
+ }
+ else strcpy (fpath, fd.cFileName);
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (!DeleteFile (fpath)) WCMD_print_error ();
+ }
+ } while (FindNextFile(hff, &fd) != 0);
+ FindClose (hff);
+ }
+ else {
+ if (!DeleteFile (param1)) WCMD_print_error ();
+ FindClose (hff);
+ }
+}
+
+/****************************************************************************
+ * WCMD_echo
+ *
+ * Echo input to the screen (or not). We don't try to emulate the bugs
+ * in DOS (try typing "ECHO ON AGAIN" for an example).
+ */
+
+void WCMD_echo (const char *command) {
+
+static const char eon[] = "Echo is ON\n", eoff[] = "Echo is OFF\n";
+int count;
+
+ if ((command[0] == '.') && (command[1] == 0)) {
+ WCMD_output (newline);
+ return;
+ }
+ if (command[0]==' ')
+ command++;
+ count = strlen(command);
+ if (count == 0) {
+ if (echo_mode) WCMD_output (eon);
+ else WCMD_output (eoff);
+ return;
+ }
+ if (lstrcmpi(command, "ON") == 0) {
+ echo_mode = 1;
+ return;
+ }
+ if (lstrcmpi(command, "OFF") == 0) {
+ echo_mode = 0;
+ return;
+ }
+ WCMD_output_asis (command);
+ WCMD_output (newline);
+
+}
+
+/**************************************************************************
+ * WCMD_for
+ *
+ * Batch file loop processing.
+ * FIXME: We don't exhaustively check syntax. Any command which works in MessDOS
+ * will probably work here, but the reverse is not necessarily the case...
+ */
+
+void WCMD_for (char *p) {
+
+WIN32_FIND_DATA fd;
+HANDLE hff;
+char *cmd, *item;
+char set[MAX_PATH], param[MAX_PATH];
+int i;
+
+ if (lstrcmpi (WCMD_parameter (p, 1, NULL), "in")
+ || lstrcmpi (WCMD_parameter (p, 3, NULL), "do")
+ || (param1[0] != '%')) {
+ WCMD_output ("Syntax error\n");
+ return;
+ }
+ lstrcpyn (set, WCMD_parameter (p, 2, NULL), sizeof(set));
+ WCMD_parameter (p, 4, &cmd);
+ lstrcpy (param, param1);
+
+/*
+ * If the parameter within the set has a wildcard then search for matching files
+ * otherwise do a literal substitution.
+ */
+
+ i = 0;
+ while (*(item = WCMD_parameter (set, i, NULL))) {
+ if (strpbrk (item, "*?")) {
+ hff = FindFirstFile (item, &fd);
+ if (hff == INVALID_HANDLE_VALUE) {
+ return;
+ }
+ do {
+ WCMD_execute (cmd, param, fd.cFileName);
+ } while (FindNextFile(hff, &fd) != 0);
+ FindClose (hff);
+}
+ else {
+ WCMD_execute (cmd, param, item);
+ }
+ i++;
+ }
+}
+
+/*****************************************************************************
+ * WCMD_Execute
+ *
+ * Execute a command after substituting variable text for the supplied parameter
+ */
+
+void WCMD_execute (char *orig_cmd, char *param, char *subst) {
+
+char *new_cmd, *p, *s, *dup;
+int size;
+
+ size = lstrlen (orig_cmd);
+ new_cmd = (char *) LocalAlloc (LMEM_FIXED | LMEM_ZEROINIT, size);
+ dup = s = strdup (orig_cmd);
+
+ while ((p = strstr (s, param))) {
+ *p = '\0';
+ size += lstrlen (subst);
+ new_cmd = (char *) LocalReAlloc ((HANDLE)new_cmd, size, 0);
+ strcat (new_cmd, s);
+ strcat (new_cmd, subst);
+ s = p + lstrlen (param);
+ }
+ strcat (new_cmd, s);
+ WCMD_process_command (new_cmd);
+ free (dup);
+ LocalFree ((HANDLE)new_cmd);
+}
+
+
+/**************************************************************************
+ * WCMD_give_help
+ *
+ * Simple on-line help. Help text is stored in the resource file.
+ */
+
+void WCMD_give_help (char *command) {
+
+int i;
+char buffer[2048];
+
+ command = WCMD_strtrim_leading_spaces(command);
+ if (lstrlen(command) == 0) {
+ LoadString (hinst, 1000, buffer, sizeof(buffer));
+ WCMD_output_asis (buffer);
+ }
+ else {
+ for (i=0; i<=WCMD_EXIT; i++) {
+ if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
+ param1, -1, inbuilt[i], -1) == 2) {
+ LoadString (hinst, i, buffer, sizeof(buffer));
+ WCMD_output_asis (buffer);
+ return;
+ }
+ }
+ WCMD_output ("No help available for %s\n", param1);
+ }
+ return;
+}
+
+/****************************************************************************
+ * WCMD_go_to
+ *
+ * Batch file jump instruction. Not the most efficient algorithm ;-)
+ * Prints error message if the specified label cannot be found - the file pointer is
+ * then at EOF, effectively stopping the batch file.
+ * FIXME: DOS is supposed to allow labels with spaces - we don't.
+ */
+
+void WCMD_goto (void) {
+
+char string[MAX_PATH];
+
+ if (context != NULL) {
+ SetFilePointer (context -> h, 0, NULL, FILE_BEGIN);
+ while (WCMD_fgets (string, sizeof(string), context -> h)) {
+ if ((string[0] == ':') && (strcmp (&string[1], param1) == 0)) return;
+ }
+ WCMD_output ("Target to GOTO not found\n");
+ }
+ return;
+}
+
+
+/****************************************************************************
+ * WCMD_if
+ *
+ * Batch file conditional.
+ * FIXME: Much more syntax checking needed!
+ */
+
+void WCMD_if (char *p) {
+
+int negate = 0, test = 0;
+char condition[MAX_PATH], *command, *s;
+
+ if (!lstrcmpi (param1, "not")) {
+ negate = 1;
+ lstrcpy (condition, param2);
+}
+ else {
+ lstrcpy (condition, param1);
+ }
+ if (!lstrcmpi (condition, "errorlevel")) {
+ if (errorlevel >= atoi(WCMD_parameter (p, 1+negate, NULL))) test = 1;
+ return;
+ WCMD_parameter (p, 2+negate, &command);
+ }
+ else if (!lstrcmpi (condition, "exist")) {
+ if (GetFileAttributesA(WCMD_parameter (p, 1+negate, NULL)) != INVALID_FILE_ATTRIBUTES) {
+ test = 1;
+ }
+ WCMD_parameter (p, 2+negate, &command);
+ }
+ else if ((s = strstr (p, "=="))) {
+ s += 2;
+ if (!lstrcmpi (condition, WCMD_parameter (s, 0, NULL))) test = 1;
+ WCMD_parameter (s, 1, &command);
+ }
+ else {
+ WCMD_output ("Syntax error\n");
+ return;
+ }
+ if (test != negate) {
+ command = strdup (command);
+ WCMD_process_command (command);
+ free (command);
+ }
+}
+
+/****************************************************************************
+ * WCMD_move
+ *
+ * Move a file, directory tree or wildcarded set of files.
+ * FIXME: Needs input and output files to be fully specified.
+ */
+
+void WCMD_move (void) {
+
+int status;
+char outpath[MAX_PATH], inpath[MAX_PATH], *infile;
+WIN32_FIND_DATA fd;
+HANDLE hff;
+
+ if ((strchr(param1,'*') != NULL) || (strchr(param1,'%') != NULL)) {
+ WCMD_output ("Wildcards not yet supported\n");
+ return;
+ }
+
+ /* If no destination supplied, assume current directory */
+ if (param2[0] == 0x00) {
+ strcpy(param2, ".");
+ }
+
+ /* If 2nd parm is directory, then use original filename */
+ GetFullPathName (param2, sizeof(outpath), outpath, NULL);
+ hff = FindFirstFile (outpath, &fd);
+ if (hff != INVALID_HANDLE_VALUE) {
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ GetFullPathName (param1, sizeof(inpath), inpath, &infile);
+ strcat (outpath, "\\");
+ strcat (outpath, infile);
+ }
+ FindClose (hff);
+ }
+
+ status = MoveFile (param1, outpath);
+ if (!status) WCMD_print_error ();
+}
+
+/****************************************************************************
+ * WCMD_pause
+ *
+ * Wait for keyboard input.
+ */
+
+void WCMD_pause (void) {
+
+DWORD count;
+char string[32];
+
+ WCMD_output (anykey);
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string), &count, NULL);
+}
+
+/****************************************************************************
+ * WCMD_remove_dir
+ *
+ * Delete a directory.
+ */
+
+void WCMD_remove_dir (void) {
+
+ if (!RemoveDirectory (param1)) WCMD_print_error ();
+}
+
+/****************************************************************************
+ * WCMD_rename
+ *
+ * Rename a file.
+ * FIXME: Needs input and output files to be fully specified.
+ */
+
+void WCMD_rename (void) {
+
+int status;
+
+ if ((strchr(param1,'*') != NULL) || (strchr(param1,'%') != NULL)) {
+ WCMD_output ("Wildcards not yet supported\n");
+ return;
+ }
+ status = MoveFile (param1, param2);
+ if (!status) WCMD_print_error ();
+}
+
+/*****************************************************************************
+ * WCMD_dupenv
+ *
+ * Make a copy of the environment.
+ */
+static WCHAR *WCMD_dupenv( const WCHAR *env )
+{
+ WCHAR *env_copy;
+ int len;
+
+ if( !env )
+ return NULL;
+
+ len = 0;
+ while ( env[len] )
+ len += (lstrlenW(&env[len]) + 1);
+
+ env_copy = LocalAlloc (LMEM_FIXED, (len+1) * sizeof (WCHAR) );
+ if (!env_copy)
+ {
+ WCMD_output ("out of memory\n");
+ return env_copy;
+ }
+ memcpy (env_copy, env, len*sizeof (WCHAR));
+ env_copy[len] = 0;
+
+ return env_copy;
+}
+
+/*****************************************************************************
+ * WCMD_setlocal
+ *
+ * setlocal pushes the environment onto a stack
+ * Save the environment as unicode so we don't screw anything up.
+ */
+void WCMD_setlocal (const char *s) {
+ WCHAR *env;
+ struct env_stack *env_copy;
+
+ /* DISABLEEXTENSIONS ignored */
+
+ env_copy = LocalAlloc (LMEM_FIXED, sizeof (struct env_stack));
+ if( !env_copy )
+ {
+ WCMD_output ("out of memory\n");
+ return;
+ }
+
+ env = GetEnvironmentStringsW ();
+
+ env_copy->strings = WCMD_dupenv (env);
+ if (env_copy->strings)
+ {
+ env_copy->next = saved_environment;
+ saved_environment = env_copy;
+ }
+ else
+ LocalFree (env_copy);
+
+ FreeEnvironmentStringsW (env);
+}
+
+/*****************************************************************************
+ * WCMD_strchrW
+ */
+static inline WCHAR *WCMD_strchrW(WCHAR *str, WCHAR ch)
+{
+ while(*str)
+ {
+ if(*str == ch)
+ return str;
+ str++;
+ }
+ return NULL;
+}
+
+/*****************************************************************************
+ * WCMD_endlocal
+ *
+ * endlocal pops the environment off a stack
+ */
+void WCMD_endlocal (void) {
+ WCHAR *env, *old, *p;
+ struct env_stack *temp;
+ int len, n;
+
+ if (!saved_environment)
+ return;
+
+ /* pop the old environment from the stack */
+ temp = saved_environment;
+ saved_environment = temp->next;
+
+ /* delete the current environment, totally */
+ env = GetEnvironmentStringsW ();
+ old = WCMD_dupenv (GetEnvironmentStringsW ());
+ len = 0;
+ while (old[len]) {
+ n = lstrlenW(&old[len]) + 1;
+ p = WCMD_strchrW(&old[len], '=');
+ if (p)
+ {
+ *p++ = 0;
+ SetEnvironmentVariableW (&old[len], NULL);
+ }
+ len += n;
+ }
+ LocalFree (old);
+ FreeEnvironmentStringsW (env);
+
+ /* restore old environment */
+ env = temp->strings;
+ len = 0;
+ while (env[len]) {
+ n = lstrlenW(&env[len]) + 1;
+ p = WCMD_strchrW(&env[len], '=');
+ if (p)
+ {
+ *p++ = 0;
+ SetEnvironmentVariableW (&env[len], p);
+ }
+ len += n;
+ }
+ LocalFree (env);
+ LocalFree (temp);
+}
+
+/*****************************************************************************
+ * WCMD_setshow_attrib
+ *
+ * Display and optionally sets DOS attributes on a file or directory
+ *
+ * FIXME: Wine currently uses the Unix stat() function to get file attributes.
+ * As a result only the Readonly flag is correctly reported, the Archive bit
+ * is always set and the rest are not implemented. We do the Right Thing anyway.
+ *
+ * FIXME: No SET functionality.
+ *
+ */
+
+void WCMD_setshow_attrib (void) {
+
+DWORD count;
+HANDLE hff;
+WIN32_FIND_DATA fd;
+char flags[9] = {" "};
+
+ if (param1[0] == '-') {
+ WCMD_output (nyi);
+ return;
+ }
+
+ if (lstrlen(param1) == 0) {
+ GetCurrentDirectory (sizeof(param1), param1);
+ strcat (param1, "\\*");
+ }
+
+ hff = FindFirstFile (param1, &fd);
+ if (hff == INVALID_HANDLE_VALUE) {
+ WCMD_output ("%s: File Not Found\n",param1);
+ }
+ else {
+ do {
+ if (!(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) {
+ flags[0] = 'H';
+ }
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM) {
+ flags[1] = 'S';
+ }
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_ARCHIVE) {
+ flags[2] = 'A';
+ }
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
+ flags[3] = 'R';
+ }
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY) {
+ flags[4] = 'T';
+ }
+ if (fd.dwFileAttributes & FILE_ATTRIBUTE_COMPRESSED) {
+ flags[5] = 'C';
+ }
+ WCMD_output ("%s %s\n", flags, fd.cFileName);
+ for (count=0; count < 8; count++) flags[count] = ' ';
+ }
+ } while (FindNextFile(hff, &fd) != 0);
+ }
+ FindClose (hff);
+}
+
+/*****************************************************************************
+ * WCMD_setshow_default
+ *
+ * Set/Show the current default directory
+ */
+
+void WCMD_setshow_default (void) {
+
+BOOL status;
+char string[1024];
+
+ if (strlen(param1) == 0) {
+ GetCurrentDirectory (sizeof(string), string);
+ strcat (string, "\n");
+ WCMD_output (string);
+ }
+ else {
+ status = SetCurrentDirectory (param1);
+ if (!status) {
+ WCMD_print_error ();
+ return;
+ }
+ }
+ return;
+}
+
+/****************************************************************************
+ * WCMD_setshow_date
+ *
+ * Set/Show the system date
+ * FIXME: Can't change date yet
+ */
+
+void WCMD_setshow_date (void) {
+
+char curdate[64], buffer[64];
+DWORD count;
+
+ if (lstrlen(param1) == 0) {
+ if (GetDateFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL,
+ curdate, sizeof(curdate))) {
+ WCMD_output ("Current Date is %s\nEnter new date: ", curdate);
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), buffer, sizeof(buffer), &count, NULL);
+ if (count > 2) {
+ WCMD_output (nyi);
+ }
+ }
+ else WCMD_print_error ();
+ }
+ else {
+ WCMD_output (nyi);
+ }
+}
+
+/****************************************************************************
+ * WCMD_compare
+ */
+static int WCMD_compare( const void *a, const void *b )
+{
+ int r;
+ const char * const *str_a = a, * const *str_b = b;
+ r = CompareString( LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
+ *str_a, -1, *str_b, -1 );
+ if( r == CSTR_LESS_THAN ) return -1;
+ if( r == CSTR_GREATER_THAN ) return 1;
+ return 0;
+}
+
+/****************************************************************************
+ * WCMD_setshow_sortenv
+ *
+ * sort variables into order for display
+ */
+static void WCMD_setshow_sortenv(const char *s)
+{
+ UINT count=0, len=0, i;
+ const char **str;
+
+ /* count the number of strings, and the total length */
+ while ( s[len] ) {
+ len += (lstrlen(&s[len]) + 1);
+ count++;
+ }
+
+ /* add the strings to an array */
+ str = LocalAlloc (LMEM_FIXED | LMEM_ZEROINIT, count * sizeof (char*) );
+ if( !str )
+ return;
+ str[0] = s;
+ for( i=1; i<count; i++ )
+ str[i] = str[i-1] + lstrlen(str[i-1]) + 1;
+
+ /* sort the array */
+ qsort( str, count, sizeof (char*), WCMD_compare );
+
+ /* print it */
+ for( i=0; i<count; i++ ) {
+ WCMD_output_asis(str[i]);
+ WCMD_output_asis("\n");
+ }
+
+ LocalFree( str );
+}
+
+/****************************************************************************
+ * WCMD_setshow_env
+ *
+ * Set/Show the environment variables
+ */
+
+void WCMD_setshow_env (char *s) {
+
+LPVOID env;
+char *p;
+int status;
+char buffer[1048];
+
+ if (strlen(param1) == 0) {
+ env = GetEnvironmentStrings ();
+ WCMD_setshow_sortenv( env );
+ }
+ else {
+ p = strchr (s, '=');
+ if (p == NULL) {
+
+ /* FIXME: Emulate Win98 for now, ie "SET C" looks ONLY for an
+ environment variable C, whereas on NT it shows ALL variables
+ starting with C.
+ */
+ status = GetEnvironmentVariable(s, buffer, sizeof(buffer));
+ if (status) {
+ WCMD_output_asis( s);
+ WCMD_output_asis( "=");
+ WCMD_output_asis( buffer);
+ WCMD_output_asis( "\n");
+ } else {
+ WCMD_output ("Environment variable %s not defined\n", s);
+ }
+ return;
+ }
+ *p++ = '\0';
+
+ if (strlen(p) == 0) p = NULL;
+ status = SetEnvironmentVariable (s, p);
+ if ((!status) & (GetLastError() != ERROR_ENVVAR_NOT_FOUND)) WCMD_print_error();
+ }
+ /* WCMD_output (newline); @JED*/
+}
+
+/****************************************************************************
+ * WCMD_setshow_path
+ *
+ * Set/Show the path environment variable
+ */
+
+void WCMD_setshow_path (char *command) {
+
+char string[1024];
+DWORD status;
+
+ if (strlen(param1) == 0) {
+ status = GetEnvironmentVariable ("PATH", string, sizeof(string));
+ if (status != 0) {
+ WCMD_output_asis ( "PATH=");
+ WCMD_output_asis ( string);
+ WCMD_output_asis ( "\n");
+ }
+ else {
+ WCMD_output ("PATH not found\n");
+ }
+ }
+ else {
+ status = SetEnvironmentVariable ("PATH", command);
+ if (!status) WCMD_print_error();
+ }
+}
+
+/****************************************************************************
+ * WCMD_setshow_prompt
+ *
+ * Set or show the command prompt.
+ */
+
+void WCMD_setshow_prompt (void) {
+
+char *s;
+
+ if (strlen(param1) == 0) {
+ SetEnvironmentVariable ("PROMPT", NULL);
+ }
+ else {
+ s = param1;
+ while ((*s == '=') || (*s == ' ')) s++;
+ if (strlen(s) == 0) {
+ SetEnvironmentVariable ("PROMPT", NULL);
+ }
+ else SetEnvironmentVariable ("PROMPT", s);
+ }
+}
+
+/****************************************************************************
+ * WCMD_setshow_time
+ *
+ * Set/Show the system time
+ * FIXME: Can't change time yet
+ */
+
+void WCMD_setshow_time (void) {
+
+char curtime[64], buffer[64];
+DWORD count;
+SYSTEMTIME st;
+
+ if (strlen(param1) == 0) {
+ GetLocalTime(&st);
+ if (GetTimeFormat (LOCALE_USER_DEFAULT, 0, &st, NULL,
+ curtime, sizeof(curtime))) {
+ WCMD_output ("Current Time is %s\nEnter new time: ", curtime);
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), buffer, sizeof(buffer), &count, NULL);
+ if (count > 2) {
+ WCMD_output (nyi);
+ }
+ }
+ else WCMD_print_error ();
+ }
+ else {
+ WCMD_output (nyi);
+ }
+}
+
+/****************************************************************************
+ * WCMD_shift
+ *
+ * Shift batch parameters.
+ */
+
+void WCMD_shift (void) {
+
+ if (context != NULL) context -> shift_count++;
+
+}
+
+/****************************************************************************
+ * WCMD_title
+ *
+ * Set the console title
+ */
+void WCMD_title (char *command) {
+ SetConsoleTitle(command);
+}
+
+/****************************************************************************
+ * WCMD_type
+ *
+ * Copy a file to standard output.
+ */
+
+void WCMD_type (void) {
+
+HANDLE h;
+char buffer[512];
+DWORD count;
+
+ h = CreateFile (param1, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h == INVALID_HANDLE_VALUE) {
+ WCMD_print_error ();
+ return;
+ }
+ while (ReadFile (h, buffer, sizeof(buffer), &count, NULL)) {
+ if (count == 0) break; /* ReadFile reports success on EOF! */
+ buffer[count] = 0;
+ WCMD_output_asis (buffer);
+ }
+ CloseHandle (h);
+}
+
+/****************************************************************************
+ * WCMD_verify
+ *
+ * Display verify flag.
+ * FIXME: We don't actually do anything with the verify flag other than toggle
+ * it...
+ */
+
+void WCMD_verify (char *command) {
+
+static const char von[] = "Verify is ON\n", voff[] = "Verify is OFF\n";
+int count;
+
+ count = strlen(command);
+ if (count == 0) {
+ if (verify_mode) WCMD_output (von);
+ else WCMD_output (voff);
+ return;
+ }
+ if (lstrcmpi(command, "ON") == 0) {
+ verify_mode = 1;
+ return;
+ }
+ else if (lstrcmpi(command, "OFF") == 0) {
+ verify_mode = 0;
+ return;
+ }
+ else WCMD_output ("Verify must be ON or OFF\n");
+}
+
+/****************************************************************************
+ * WCMD_version
+ *
+ * Display version info.
+ */
+
+void WCMD_version (void) {
+
+ WCMD_output (version_string);
+
+}
+
+/****************************************************************************
+ * WCMD_volume
+ *
+ * Display volume info and/or set volume label. Returns 0 if error.
+ */
+
+int WCMD_volume (int mode, char *path) {
+
+DWORD count, serial;
+char string[MAX_PATH], label[MAX_PATH], curdir[MAX_PATH];
+BOOL status;
+
+ if (lstrlen(path) == 0) {
+ status = GetCurrentDirectory (sizeof(curdir), curdir);
+ if (!status) {
+ WCMD_print_error ();
+ return 0;
+ }
+ status = GetVolumeInformation (NULL, label, sizeof(label), &serial, NULL,
+ NULL, NULL, 0);
+ }
+ else {
+ if ((path[1] != ':') || (lstrlen(path) != 2)) {
+ WCMD_output_asis("Syntax Error\n\n");
+ return 0;
+ }
+ wsprintf (curdir, "%s\\", path);
+ status = GetVolumeInformation (curdir, label, sizeof(label), &serial, NULL,
+ NULL, NULL, 0);
+ }
+ if (!status) {
+ WCMD_print_error ();
+ return 0;
+ }
+ WCMD_output ("Volume in drive %c is %s\nVolume Serial Number is %04x-%04x\n\n",
+ curdir[0], label, HIWORD(serial), LOWORD(serial));
+ if (mode) {
+ WCMD_output ("Volume label (11 characters, ENTER for none)?");
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string), &count, NULL);
+ if (count > 1) {
+ string[count-1] = '\0'; /* ReadFile output is not null-terminated! */
+ if (string[count-2] == '\r') string[count-2] = '\0'; /* Under Windoze we get CRLF! */
+ }
+ if (lstrlen(path) != 0) {
+ if (!SetVolumeLabel (curdir, string)) WCMD_print_error ();
+ }
+ else {
+ if (!SetVolumeLabel (NULL, string)) WCMD_print_error ();
+ }
+ }
+ return 1;
+}
diff --git a/programs/cmd/directory.c b/programs/cmd/directory.c
new file mode 100644
index 0000000..9a6b811
--- /dev/null
+++ b/programs/cmd/directory.c
@@ -0,0 +1,370 @@
+/*
+ * CMD - Wine-compatible command line interface - Directory functions.
+ *
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * NOTES:
+ * On entry, global variables quals, param1, param2 contain
+ * the qualifiers (uppercased and concatenated) and parameters entered, with
+ * environment-variable and batch parameter substitution already done.
+ */
+
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
+#define WIN32_LEAN_AND_MEAN
+
+#include "wcmd.h"
+
+int WCMD_dir_sort (const void *a, const void *b);
+void WCMD_list_directory (char *path, int level);
+char * WCMD_filesize64 (ULONGLONG free);
+char * WCMD_strrev (char *buff);
+
+
+extern int echo_mode;
+extern char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
+extern DWORD errorlevel;
+
+static int file_total, dir_total, recurse, wide, bare, max_width;
+static ULONGLONG byte_total;
+
+/*****************************************************************************
+ * WCMD_directory
+ *
+ * List a file directory.
+ *
+ */
+
+void WCMD_directory (void) {
+
+char path[MAX_PATH], drive[8];
+int status, paged_mode;
+ULARGE_INTEGER avail, total, free;
+CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
+
+ byte_total = 0;
+ file_total = dir_total = 0;
+
+ /* Handle args */
+ paged_mode = (strstr(quals, "/P") != NULL);
+ recurse = (strstr(quals, "/S") != NULL);
+ wide = (strstr(quals, "/W") != NULL);
+ bare = (strstr(quals, "/B") != NULL);
+
+ /* Handle conflicting args and initialization */
+ if (bare) wide = FALSE;
+
+ if (wide) {
+ if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo))
+ max_width = consoleInfo.dwSize.X;
+ else
+ max_width = 80;
+ }
+ if (paged_mode) {
+ WCMD_enter_paged_mode();
+ }
+
+ if (param1[0] == '\0') strcpy (param1, ".");
+ status = GetFullPathName (param1, sizeof(path), path, NULL);
+ if (!status) {
+ WCMD_print_error();
+ if (paged_mode) WCMD_leave_paged_mode();
+ return;
+ }
+ lstrcpyn (drive, path, 3);
+
+ if (!bare) {
+ status = WCMD_volume (0, drive);
+ if (!status) {
+ if (paged_mode) WCMD_leave_paged_mode();
+ return;
+ }
+ }
+
+ WCMD_list_directory (path, 0);
+ lstrcpyn (drive, path, 4);
+ GetDiskFreeSpaceEx (drive, &avail, &total, &free);
+
+ if (!bare) {
+ if (recurse) {
+ WCMD_output ("\n\n Total files listed:\n%8d files%25s bytes\n",
+ file_total, WCMD_filesize64 (byte_total));
+ WCMD_output ("%8d directories %18s bytes free\n\n",
+ dir_total, WCMD_filesize64 (free.QuadPart));
+ } else {
+ WCMD_output (" %18s bytes free\n\n", WCMD_filesize64 (free.QuadPart));
+ }
+ }
+ if (paged_mode) WCMD_leave_paged_mode();
+}
+
+/*****************************************************************************
+ * WCMD_list_directory
+ *
+ * List a single file directory. This function (and those below it) can be called
+ * recursively when the /S switch is used.
+ *
+ * FIXME: Entries sorted by name only. Should we support DIRCMD??
+ * FIXME: Assumes 24-line display for the /P qualifier.
+ * FIXME: Other command qualifiers not supported.
+ * FIXME: DIR /S FILENAME fails if at least one matching file is not found in the top level.
+ */
+
+void WCMD_list_directory (char *search_path, int level) {
+
+char string[1024], datestring[32], timestring[32];
+char *p;
+char real_path[MAX_PATH];
+WIN32_FIND_DATA *fd;
+FILETIME ft;
+SYSTEMTIME st;
+HANDLE hff;
+int status, dir_count, file_count, entry_count, i, widest, cur_width, tmp_width;
+ULARGE_INTEGER byte_count, file_size;
+
+ dir_count = 0;
+ file_count = 0;
+ entry_count = 0;
+ byte_count.QuadPart = 0;
+ widest = 0;
+ cur_width = 0;
+
+/*
+ * If the path supplied does not include a wildcard, and the endpoint of the
+ * path references a directory, we need to list the *contents* of that
+ * directory not the directory file itself.
+ */
+
+ if ((strchr(search_path, '*') == NULL) && (strchr(search_path, '%') == NULL)) {
+ status = GetFileAttributes (search_path);
+ if ((status != INVALID_FILE_ATTRIBUTES) && (status & FILE_ATTRIBUTE_DIRECTORY)) {
+ if (search_path[strlen(search_path)-1] == '\\') {
+ strcat (search_path, "*");
+ }
+ else {
+ strcat (search_path, "\\*");
+ }
+ }
+ }
+
+ /* Work out the actual current directory name */
+ p = strrchr (search_path, '\\');
+ memset(real_path, 0x00, sizeof(real_path));
+ lstrcpyn (real_path, search_path, (p-search_path+2));
+
+ /* Load all files into an in memory structure */
+ fd = malloc (sizeof(WIN32_FIND_DATA));
+ hff = FindFirstFile (search_path, fd);
+ if (hff == INVALID_HANDLE_VALUE) {
+ SetLastError (ERROR_FILE_NOT_FOUND);
+ WCMD_print_error ();
+ free (fd);
+ return;
+ }
+ do {
+ entry_count++;
+
+ /* Keep running track of longest filename for wide output */
+ if (wide) {
+ int tmpLen = strlen((fd+(entry_count-1))->cFileName) + 3;
+ if ((fd+(entry_count-1))->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) tmpLen = tmpLen + 2;
+ if (tmpLen > widest) widest = tmpLen;
+ }
+
+ fd = realloc (fd, (entry_count+1)*sizeof(WIN32_FIND_DATA));
+ if (fd == NULL) {
+ FindClose (hff);
+ WCMD_output ("Memory Allocation Error");
+ return;
+ }
+ } while (FindNextFile(hff, (fd+entry_count)) != 0);
+ FindClose (hff);
+
+ /* Sort the list of files */
+ qsort (fd, entry_count, sizeof(WIN32_FIND_DATA), WCMD_dir_sort);
+
+ /* Output the results */
+ if (!bare) {
+ if (level != 0) WCMD_output ("\n\n");
+ WCMD_output ("Directory of %s\n\n", real_path);
+ }
+
+ for (i=0; i<entry_count; i++) {
+ FileTimeToLocalFileTime (&(fd+i)->ftLastWriteTime, &ft);
+ FileTimeToSystemTime (&ft, &st);
+ GetDateFormat (0, DATE_SHORTDATE, &st, NULL, datestring,
+ sizeof(datestring));
+ GetTimeFormat (0, TIME_NOSECONDS, &st,
+ NULL, timestring, sizeof(timestring));
+
+ if (wide) {
+
+ tmp_width = cur_width;
+ if ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ WCMD_output ("[%s]", (fd+i)->cFileName);
+ dir_count++;
+ tmp_width = tmp_width + strlen((fd+i)->cFileName) + 2;
+ } else {
+ WCMD_output ("%s", (fd+i)->cFileName);
+ tmp_width = tmp_width + strlen((fd+i)->cFileName) ;
+ file_count++;
+#ifndef NONAMELESSSTRUCT
+ file_size.LowPart = (fd+i)->nFileSizeLow;
+ file_size.HighPart = (fd+i)->nFileSizeHigh;
+#else
+ file_size.u.LowPart = (fd+i)->nFileSizeLow;
+ file_size.u.HighPart = (fd+i)->nFileSizeHigh;
+#endif
+ byte_count.QuadPart += file_size.QuadPart;
+ }
+ cur_width = cur_width + widest;
+
+ if ((cur_width + widest) > max_width) {
+ WCMD_output ("\n");
+ cur_width = 0;
+ } else {
+ WCMD_output ("%*.s", (tmp_width - cur_width) ,"");
+ }
+
+ } else if ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ dir_count++;
+
+ if (!bare) {
+ WCMD_output ("%10s %8s <DIR> %s\n",
+ datestring, timestring, (fd+i)->cFileName);
+ } else {
+ if (!((strcmp((fd+i)->cFileName, ".") == 0) ||
+ (strcmp((fd+i)->cFileName, "..") == 0))) {
+ WCMD_output ("%s%s\n", recurse?real_path:"", (fd+i)->cFileName);
+ }
+ }
+ }
+ else {
+ file_count++;
+#ifndef NONAMELESSSTRUCT
+ file_size.LowPart = (fd+i)->nFileSizeLow;
+ file_size.HighPart = (fd+i)->nFileSizeHigh;
+#else
+ file_size.u.LowPart = (fd+i)->nFileSizeLow;
+ file_size.u.HighPart = (fd+i)->nFileSizeHigh;
+#endif
+ byte_count.QuadPart += file_size.QuadPart;
+ if (!bare) {
+ WCMD_output ("%10s %8s %10s %s\n",
+ datestring, timestring,
+ WCMD_filesize64(file_size.QuadPart), (fd+i)->cFileName);
+ } else {
+ WCMD_output ("%s%s\n", recurse?real_path:"", (fd+i)->cFileName);
+ }
+ }
+ }
+
+ if (wide && cur_width>0) {
+ WCMD_output ("\n");
+ }
+
+ if (!bare) {
+ if (file_count == 1) {
+ WCMD_output (" 1 file %25s bytes\n", WCMD_filesize64 (byte_count.QuadPart));
+ }
+ else {
+ WCMD_output ("%8d files %24s bytes\n", file_count, WCMD_filesize64 (byte_count.QuadPart));
+ }
+ }
+ byte_total = byte_total + byte_count.QuadPart;
+ file_total = file_total + file_count;
+ dir_total = dir_total + dir_count;
+
+ if (!bare) {
+ if (dir_count == 1) WCMD_output ("1 directory ");
+ else WCMD_output ("%8d directories", dir_count);
+ }
+ for (i=0; i<entry_count; i++) {
+ if ((recurse) &&
+ ((fd+i)->cFileName[0] != '.') &&
+ ((fd+i)->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
+#if 0
+ GetFullPathName ((fd+i)->cFileName, sizeof(string), string, NULL);
+#endif
+ p = strrchr (search_path, '\\');
+ lstrcpyn (string, search_path, (p-search_path+2));
+ lstrcat (string, (fd+i)->cFileName);
+ lstrcat (string, p);
+ WCMD_list_directory (string, 1);
+ }
+ }
+ free (fd);
+ return;
+}
+
+/*****************************************************************************
+ * WCMD_filesize64
+ *
+ * Convert a 64-bit number into a character string, with commas every three digits.
+ * Result is returned in a static string overwritten with each call.
+ * FIXME: There must be a better algorithm!
+ */
+
+char * WCMD_filesize64 (ULONGLONG n) {
+
+ULONGLONG q;
+unsigned int r, i;
+char *p;
+static char buff[32];
+
+ p = buff;
+ i = -3;
+ do {
+ if ((++i)%3 == 1) *p++ = ',';
+ q = n / 10;
+ r = n - (q * 10);
+ *p++ = r + '0';
+ *p = '\0';
+ n = q;
+ } while (n != 0);
+ WCMD_strrev (buff);
+ return buff;
+}
+
+/*****************************************************************************
+ * WCMD_strrev
+ *
+ * Reverse a character string in-place (strrev() is not available under unixen :-( ).
+ */
+
+char * WCMD_strrev (char *buff) {
+
+int r, i;
+char b;
+
+ r = lstrlen (buff);
+ for (i=0; i<r/2; i++) {
+ b = buff[i];
+ buff[i] = buff[r-i-1];
+ buff[r-i-1] = b;
+ }
+ return (buff);
+}
+
+
+int WCMD_dir_sort (const void *a, const void *b)
+{
+ return (lstrcmpi(((const WIN32_FIND_DATA *)a)->cFileName,
+ ((const WIN32_FIND_DATA *)b)->cFileName));
+}
diff --git a/programs/cmd/wcmd.h b/programs/cmd/wcmd.h
new file mode 100644
index 0000000..de9d317
--- /dev/null
+++ b/programs/cmd/wcmd.h
@@ -0,0 +1,146 @@
+/*
+ * CMD - Wine-compatible command line interface.
+ *
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#define IDI_ICON1 1
+#include <windows.h>
+#ifndef RC_INVOKED
+#include <string.h>
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <ctype.h>
+
+void WCMD_batch (char *, char *, int);
+void WCMD_change_tty (void);
+void WCMD_clear_screen (void);
+void WCMD_copy (void);
+void WCMD_create_dir (void);
+void WCMD_delete (int recurse);
+void WCMD_directory (void);
+void WCMD_echo (const char *);
+void WCMD_endlocal (void);
+void WCMD_enter_paged_mode(void);
+void WCMD_for (char *);
+void WCMD_give_help (char *command);
+void WCMD_goto (void);
+void WCMD_if (char *);
+void WCMD_leave_paged_mode(void);
+void WCMD_move (void);
+void WCMD_output (const char *format, ...);
+void WCMD_output_asis (const char *message);
+void WCMD_parse (char *s, char *q, char *p1, char *p2);
+void WCMD_pause (void);
+void WCMD_pipe (char *command);
+void WCMD_print_error (void);
+void WCMD_process_command (char *command);
+int WCMD_read_console (char *string, int str_len);
+void WCMD_remove_dir (void);
+void WCMD_rename (void);
+void WCMD_run_program (char *command, int called);
+void WCMD_setlocal (const char *command);
+void WCMD_setshow_attrib (void);
+void WCMD_setshow_date (void);
+void WCMD_setshow_default (void);
+void WCMD_setshow_env (char *command);
+void WCMD_setshow_path (char *command);
+void WCMD_setshow_prompt (void);
+void WCMD_setshow_time (void);
+void WCMD_shift (void);
+void WCMD_show_prompt (void);
+void WCMD_title (char *);
+void WCMD_type (void);
+void WCMD_verify (char *command);
+void WCMD_version (void);
+int WCMD_volume (int mode, char *command);
+
+char *WCMD_fgets (char *s, int n, HANDLE stream);
+char *WCMD_parameter (char *s, int n, char **where);
+char *WCMD_strtrim_leading_spaces (char *string);
+void WCMD_strtrim_trailing_spaces (char *string);
+void WCMD_opt_s_strip_quotes(char *cmd);
+
+/* Data structure to hold context when executing batch files */
+
+typedef struct {
+ char *command; /* The command which invoked the batch file */
+ HANDLE h; /* Handle to the open batch file */
+ int shift_count; /* Number of SHIFT commands executed */
+ void *prev_context; /* Pointer to the previous context block */
+} BATCH_CONTEXT;
+
+#endif /* !RC_INVOKED */
+
+/*
+ * Serial nos of builtin commands. These constants must be in step with
+ * the list of strings defined in WCMD.C, and WCMD_EXIT *must* always be
+ * the last one.
+ *
+ * Yes it *would* be nice to use an enumeration here, but the Resource
+ * Compiler won't accept resource IDs from enumerations :-(
+ */
+
+#define WCMD_ATTRIB 0
+#define WCMD_CALL 1
+#define WCMD_CD 2
+#define WCMD_CHDIR 3
+#define WCMD_CLS 4
+#define WCMD_COPY 5
+#define WCMD_CTTY 6
+#define WCMD_DATE 7
+#define WCMD_DEL 8
+#define WCMD_DIR 9
+#define WCMD_ECHO 10
+#define WCMD_ERASE 11
+#define WCMD_FOR 12
+#define WCMD_GOTO 13
+#define WCMD_HELP 14
+#define WCMD_IF 15
+#define WCMD_LABEL 16
+#define WCMD_MD 17
+#define WCMD_MKDIR 18
+#define WCMD_MOVE 19
+#define WCMD_PATH 20
+#define WCMD_PAUSE 21
+#define WCMD_PROMPT 22
+#define WCMD_REM 23
+#define WCMD_REN 24
+#define WCMD_RENAME 25
+#define WCMD_RD 26
+#define WCMD_RMDIR 27
+#define WCMD_SET 28
+#define WCMD_SHIFT 29
+#define WCMD_TIME 30
+#define WCMD_TITLE 31
+#define WCMD_TYPE 32
+#define WCMD_VERIFY 33
+#define WCMD_VER 34
+#define WCMD_VOL 35
+
+#define WCMD_ENDLOCAL 36
+#define WCMD_SETLOCAL 37
+
+/* Must be last in list */
+#define WCMD_EXIT 38
+
+/* Some standard messages */
+extern const char nyi[];
+extern const char newline[];
+extern const char version_string[];
+extern const char anykey[];
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
new file mode 100644
index 0000000..e2fb450
--- /dev/null
+++ b/programs/cmd/wcmdmain.c
@@ -0,0 +1,994 @@
+/*
+ * CMD - Wine-compatible command line interface.
+ *
+ * Copyright (C) 1999 - 2001 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+/*
+ * FIXME:
+ * - Cannot handle parameters in quotes
+ * - Lots of functionality missing from builtins
+ */
+
+#include "config.h"
+#include "wcmd.h"
+
+const char * const inbuilt[] = {"ATTRIB", "CALL", "CD", "CHDIR", "CLS", "COPY", "CTTY",
+ "DATE", "DEL", "DIR", "ECHO", "ERASE", "FOR", "GOTO",
+ "HELP", "IF", "LABEL", "MD", "MKDIR", "MOVE", "PATH", "PAUSE",
+ "PROMPT", "REM", "REN", "RENAME", "RD", "RMDIR", "SET", "SHIFT",
+ "TIME", "TITLE", "TYPE", "VERIFY", "VER", "VOL",
+ "ENDLOCAL", "SETLOCAL", "EXIT" };
+
+HINSTANCE hinst;
+DWORD errorlevel;
+int echo_mode = 1, verify_mode = 0;
+static int opt_c, opt_k, opt_s;
+const char nyi[] = "Not Yet Implemented\n\n";
+const char newline[] = "\n";
+const char version_string[] = "CMD Version " PACKAGE_VERSION "\n\n";
+const char anykey[] = "Press Return key to continue: ";
+char quals[MAX_PATH], param1[MAX_PATH], param2[MAX_PATH];
+BATCH_CONTEXT *context = NULL;
+static HANDLE old_stdin = INVALID_HANDLE_VALUE, old_stdout = INVALID_HANDLE_VALUE;
+
+/*****************************************************************************
+ * Main entry point. This is a console application so we have a main() not a
+ * winmain().
+ */
+
+int main (int argc, char *argv[])
+{
+ char string[1024];
+ char* cmd=NULL;
+ DWORD count;
+ HANDLE h;
+ int opt_q;
+
+ opt_c=opt_k=opt_q=opt_s=0;
+ while (*argv!=NULL)
+ {
+ char c;
+ if ((*argv)[0]!='/' || (*argv)[1]=='\0') {
+ argv++;
+ continue;
+ }
+
+ c=(*argv)[1];
+ if (tolower(c)=='c') {
+ opt_c=1;
+ } else if (tolower(c)=='q') {
+ opt_q=1;
+ } else if (tolower(c)=='k') {
+ opt_k=1;
+ } else if (tolower(c)=='s') {
+ opt_s=1;
+ } else if (tolower(c)=='t' || tolower(c)=='x' || tolower(c)=='y') {
+ /* Ignored for compatibility with Windows */
+ }
+
+ if ((*argv)[2]==0)
+ argv++;
+ else /* handle `cmd /cnotepad.exe` and `cmd /x/c ...` */
+ *argv+=2;
+
+ if (opt_c || opt_k) /* break out of parsing immediately after c or k */
+ break;
+ }
+
+ if (opt_q) {
+ WCMD_echo("OFF");
+ }
+
+ if (opt_c || opt_k) {
+ int len,qcount;
+ char** arg;
+ char* p;
+
+ /* opt_s left unflagged if the command starts with and contains exactly
+ * one quoted string (exactly two quote characters). The quoted string
+ * must be an executable name that has whitespace and must not have the
+ * following characters: &<>()@^| */
+
+ /* Build the command to execute */
+ len = 0;
+ qcount = 0;
+ for (arg = argv; *arg; arg++)
+ {
+ int has_space,bcount;
+ char* a;
+
+ has_space=0;
+ bcount=0;
+ a=*arg;
+ if( !*a ) has_space=1;
+ while (*a!='\0') {
+ if (*a=='\\') {
+ bcount++;
+ } else {
+ if (*a==' ' || *a=='\t') {
+ has_space=1;
+ } else if (*a=='"') {
+ /* doubling of '\' preceding a '"',
+ * plus escaping of said '"'
+ */
+ len+=2*bcount+1;
+ qcount++;
+ }
+ bcount=0;
+ }
+ a++;
+ }
+ len+=(a-*arg)+1 /* for the separating space */;
+ if (has_space)
+ {
+ len+=2; /* for the quotes */
+ qcount+=2;
+ }
+ }
+
+ if (qcount!=2)
+ opt_s=1;
+
+ /* check argv[0] for a space and invalid characters */
+ if (!opt_s) {
+ opt_s=1;
+ p=*argv;
+ while (*p!='\0') {
+ if (*p=='&' || *p=='<' || *p=='>' || *p=='(' || *p==')'
+ || *p=='@' || *p=='^' || *p=='|') {
+ opt_s=1;
+ break;
+ }
+ if (*p==' ')
+ opt_s=0;
+ p++;
+ }
+ }
+
+ cmd = HeapAlloc(GetProcessHeap(), 0, len);
+ if (!cmd)
+ exit(1);
+
+ p = cmd;
+ for (arg = argv; *arg; arg++)
+ {
+ int has_space,has_quote;
+ char* a;
+
+ /* Check for quotes and spaces in this argument */
+ has_space=has_quote=0;
+ a=*arg;
+ if( !*a ) has_space=1;
+ while (*a!='\0') {
+ if (*a==' ' || *a=='\t') {
+ has_space=1;
+ if (has_quote)
+ break;
+ } else if (*a=='"') {
+ has_quote=1;
+ if (has_space)
+ break;
+ }
+ a++;
+ }
+
+ /* Now transfer it to the command line */
+ if (has_space)
+ *p++='"';
+ if (has_quote) {
+ int bcount;
+ char* a;
+
+ bcount=0;
+ a=*arg;
+ while (*a!='\0') {
+ if (*a=='\\') {
+ *p++=*a;
+ bcount++;
+ } else {
+ if (*a=='"') {
+ int i;
+
+ /* Double all the '\\' preceding this '"', plus one */
+ for (i=0;i<=bcount;i++)
+ *p++='\\';
+ *p++='"';
+ } else {
+ *p++=*a;
+ }
+ bcount=0;
+ }
+ a++;
+ }
+ } else {
+ strcpy(p,*arg);
+ p+=strlen(*arg);
+ }
+ if (has_space)
+ *p++='"';
+ *p++=' ';
+ }
+ if (p > cmd)
+ p--; /* remove last space */
+ *p = '\0';
+
+ /* strip first and last quote characters if opt_s; check for invalid
+ * executable is done later */
+ if (opt_s && *cmd=='\"')
+ WCMD_opt_s_strip_quotes(cmd);
+ }
+
+ if (opt_c) {
+ /* If we do a "wcmd /c command", we don't want to allocate a new
+ * console since the command returns immediately. Rather, we use
+ * the currently allocated input and output handles. This allows
+ * us to pipe to and read from the command interpreter.
+ */
+ if (strchr(cmd,'|') != NULL)
+ WCMD_pipe(cmd);
+ else
+ WCMD_process_command(cmd);
+ HeapFree(GetProcessHeap(), 0, cmd);
+ return 0;
+ }
+
+ SetConsoleMode(GetStdHandle(STD_INPUT_HANDLE), ENABLE_LINE_INPUT |
+ ENABLE_ECHO_INPUT | ENABLE_PROCESSED_INPUT);
+ SetConsoleTitle("Wine Command Prompt");
+
+ if (opt_k) {
+ WCMD_process_command(cmd);
+ HeapFree(GetProcessHeap(), 0, cmd);
+ }
+
+/*
+ * If there is an AUTOEXEC.BAT file, try to execute it.
+ */
+
+ GetFullPathName ("\\autoexec.bat", sizeof(string), string, NULL);
+ h = CreateFile (string, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h != INVALID_HANDLE_VALUE) {
+ CloseHandle (h);
+#if 0
+ WCMD_batch_command (string);
+#endif
+ }
+
+/*
+ * Loop forever getting commands and executing them.
+ */
+
+ WCMD_version ();
+ while (TRUE) {
+ WCMD_show_prompt ();
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string), &count, NULL);
+ if (count > 1) {
+ string[count-1] = '\0'; /* ReadFile output is not null-terminated! */
+ if (string[count-2] == '\r') string[count-2] = '\0'; /* Under Windoze we get CRLF! */
+ if (lstrlen (string) != 0) {
+ if (strchr(string,'|') != NULL) {
+ WCMD_pipe (string);
+ }
+ else {
+ WCMD_process_command (string);
+ }
+ }
+ }
+ }
+}
+
+
+/*****************************************************************************
+ * Process one command. If the command is EXIT this routine does not return.
+ * We will recurse through here executing batch files.
+ */
+
+
+void WCMD_process_command (char *command)
+{
+ char *cmd, *p;
+ int status, i, len;
+ DWORD count, creationDisposition;
+ HANDLE h;
+ char *whichcmd;
+ SECURITY_ATTRIBUTES sa;
+
+/*
+ * Expand up environment variables.
+ */
+ len = ExpandEnvironmentStrings (command, NULL, 0);
+ cmd = HeapAlloc( GetProcessHeap(), 0, len );
+ status = ExpandEnvironmentStrings (command, cmd, len);
+ if (!status) {
+ WCMD_print_error ();
+ HeapFree( GetProcessHeap(), 0, cmd );
+ return;
+ }
+
+/*
+ * Changing default drive has to be handled as a special case.
+ */
+
+ if ((cmd[1] == ':') && IsCharAlpha (cmd[0]) && (strlen(cmd) == 2)) {
+ status = SetCurrentDirectory (cmd);
+ if (!status) WCMD_print_error ();
+ HeapFree( GetProcessHeap(), 0, cmd );
+ return;
+ }
+
+ /* Don't issue newline WCMD_output (newline); @JED*/
+
+ sa.nLength = sizeof(sa);
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+/*
+ * Redirect stdin and/or stdout if required.
+ */
+
+ if ((p = strchr(cmd,'<')) != NULL) {
+ h = CreateFile (WCMD_parameter (++p, 0, NULL), GENERIC_READ, FILE_SHARE_READ, &sa, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h == INVALID_HANDLE_VALUE) {
+ WCMD_print_error ();
+ HeapFree( GetProcessHeap(), 0, cmd );
+ return;
+ }
+ old_stdin = GetStdHandle (STD_INPUT_HANDLE);
+ SetStdHandle (STD_INPUT_HANDLE, h);
+ }
+ if ((p = strchr(cmd,'>')) != NULL) {
+ *p++ = '\0';
+ if ('>' == *p) {
+ creationDisposition = OPEN_ALWAYS;
+ p++;
+ }
+ else {
+ creationDisposition = CREATE_ALWAYS;
+ }
+ h = CreateFile (WCMD_parameter (p, 0, NULL), GENERIC_WRITE, 0, &sa, creationDisposition,
+ FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h == INVALID_HANDLE_VALUE) {
+ WCMD_print_error ();
+ HeapFree( GetProcessHeap(), 0, cmd );
+ return;
+ }
+ if (SetFilePointer (h, 0, NULL, FILE_END) ==
+ INVALID_SET_FILE_POINTER) {
+ WCMD_print_error ();
+ }
+ old_stdout = GetStdHandle (STD_OUTPUT_HANDLE);
+ SetStdHandle (STD_OUTPUT_HANDLE, h);
+ }
+ if ((p = strchr(cmd,'<')) != NULL) *p = '\0';
+
+/*
+ * Strip leading whitespaces, and a '@' if supplied
+ */
+ whichcmd = WCMD_strtrim_leading_spaces(cmd);
+ if (whichcmd[0] == '@') whichcmd++;
+
+/*
+ * Check if the command entered is internal. If it is, pass the rest of the
+ * line down to the command. If not try to run a program.
+ */
+
+ count = 0;
+ while (IsCharAlphaNumeric(whichcmd[count])) {
+ count++;
+ }
+ for (i=0; i<=WCMD_EXIT; i++) {
+ if (CompareString (LOCALE_USER_DEFAULT, NORM_IGNORECASE | SORT_STRINGSORT,
+ whichcmd, count, inbuilt[i], -1) == 2) break;
+ }
+ p = WCMD_strtrim_leading_spaces (&whichcmd[count]);
+ WCMD_parse (p, quals, param1, param2);
+ switch (i) {
+
+ case WCMD_ATTRIB:
+ WCMD_setshow_attrib ();
+ break;
+ case WCMD_CALL:
+ WCMD_run_program (p, 1);
+ break;
+ case WCMD_CD:
+ case WCMD_CHDIR:
+ WCMD_setshow_default ();
+ break;
+ case WCMD_CLS:
+ WCMD_clear_screen ();
+ break;
+ case WCMD_COPY:
+ WCMD_copy ();
+ break;
+ case WCMD_CTTY:
+ WCMD_change_tty ();
+ break;
+ case WCMD_DATE:
+ WCMD_setshow_date ();
+ break;
+ case WCMD_DEL:
+ case WCMD_ERASE:
+ WCMD_delete (0);
+ break;
+ case WCMD_DIR:
+ WCMD_directory ();
+ break;
+ case WCMD_ECHO:
+ WCMD_echo(&whichcmd[count]);
+ break;
+ case WCMD_FOR:
+ WCMD_for (p);
+ break;
+ case WCMD_GOTO:
+ WCMD_goto ();
+ break;
+ case WCMD_HELP:
+ WCMD_give_help (p);
+ break;
+ case WCMD_IF:
+ WCMD_if (p);
+ break;
+ case WCMD_LABEL:
+ WCMD_volume (1, p);
+ break;
+ case WCMD_MD:
+ case WCMD_MKDIR:
+ WCMD_create_dir ();
+ break;
+ case WCMD_MOVE:
+ WCMD_move ();
+ break;
+ case WCMD_PATH:
+ WCMD_setshow_path (p);
+ break;
+ case WCMD_PAUSE:
+ WCMD_pause ();
+ break;
+ case WCMD_PROMPT:
+ WCMD_setshow_prompt ();
+ break;
+ case WCMD_REM:
+ break;
+ case WCMD_REN:
+ case WCMD_RENAME:
+ WCMD_rename ();
+ break;
+ case WCMD_RD:
+ case WCMD_RMDIR:
+ WCMD_remove_dir ();
+ break;
+ case WCMD_SETLOCAL:
+ WCMD_setlocal(p);
+ break;
+ case WCMD_ENDLOCAL:
+ WCMD_endlocal();
+ break;
+ case WCMD_SET:
+ WCMD_setshow_env (p);
+ break;
+ case WCMD_SHIFT:
+ WCMD_shift ();
+ break;
+ case WCMD_TIME:
+ WCMD_setshow_time ();
+ break;
+ case WCMD_TITLE:
+ if (strlen(&whichcmd[count]) > 0)
+ WCMD_title(&whichcmd[count+1]);
+ break;
+ case WCMD_TYPE:
+ WCMD_type ();
+ break;
+ case WCMD_VER:
+ WCMD_version ();
+ break;
+ case WCMD_VERIFY:
+ WCMD_verify (p);
+ break;
+ case WCMD_VOL:
+ WCMD_volume (0, p);
+ break;
+ case WCMD_EXIT:
+ ExitProcess (0);
+ default:
+ WCMD_run_program (whichcmd, 0);
+ }
+ HeapFree( GetProcessHeap(), 0, cmd );
+ if (old_stdin != INVALID_HANDLE_VALUE) {
+ CloseHandle (GetStdHandle (STD_INPUT_HANDLE));
+ SetStdHandle (STD_INPUT_HANDLE, old_stdin);
+ old_stdin = INVALID_HANDLE_VALUE;
+ }
+ if (old_stdout != INVALID_HANDLE_VALUE) {
+ CloseHandle (GetStdHandle (STD_OUTPUT_HANDLE));
+ SetStdHandle (STD_OUTPUT_HANDLE, old_stdout);
+ old_stdout = INVALID_HANDLE_VALUE;
+ }
+}
+
+static void init_msvcrt_io_block(STARTUPINFO* st)
+{
+ STARTUPINFO st_p;
+ /* fetch the parent MSVCRT info block if any, so that the child can use the
+ * same handles as its grand-father
+ */
+ st_p.cb = sizeof(STARTUPINFO);
+ GetStartupInfo(&st_p);
+ st->cbReserved2 = st_p.cbReserved2;
+ st->lpReserved2 = st_p.lpReserved2;
+ if (st_p.cbReserved2 && st_p.lpReserved2 &&
+ (old_stdin != INVALID_HANDLE_VALUE || old_stdout != INVALID_HANDLE_VALUE))
+ {
+ /* Override the entries for fd 0,1,2 if we happened
+ * to change those std handles (this depends on the way wcmd sets
+ * it's new input & output handles)
+ */
+ size_t sz = max(sizeof(unsigned) + (sizeof(char) + sizeof(HANDLE)) * 3, st_p.cbReserved2);
+ BYTE* ptr = HeapAlloc(GetProcessHeap(), 0, sz);
+ if (ptr)
+ {
+ unsigned num = *(unsigned*)st_p.lpReserved2;
+ char* flags = (char*)(ptr + sizeof(unsigned));
+ HANDLE* handles = (HANDLE*)(flags + num * sizeof(char));
+
+ memcpy(ptr, st_p.lpReserved2, st_p.cbReserved2);
+ st->cbReserved2 = sz;
+ st->lpReserved2 = ptr;
+
+#define WX_OPEN 0x01 /* see dlls/msvcrt/file.c */
+ if (num <= 0 || (flags[0] & WX_OPEN))
+ {
+ handles[0] = GetStdHandle(STD_INPUT_HANDLE);
+ flags[0] |= WX_OPEN;
+ }
+ if (num <= 1 || (flags[1] & WX_OPEN))
+ {
+ handles[1] = GetStdHandle(STD_OUTPUT_HANDLE);
+ flags[1] |= WX_OPEN;
+ }
+ if (num <= 2 || (flags[2] & WX_OPEN))
+ {
+ handles[2] = GetStdHandle(STD_ERROR_HANDLE);
+ flags[2] |= WX_OPEN;
+ }
+#undef WX_OPEN
+ }
+ }
+}
+
+/******************************************************************************
+ * WCMD_run_program
+ *
+ * Execute a command line as an external program. If no extension given then
+ * precedence is given to .BAT files. Must allow recursion.
+ *
+ * called is 1 if the program was invoked with a CALL command - removed
+ * from command -. It is only used for batch programs.
+ *
+ * FIXME: Case sensitivity in suffixes!
+ */
+
+void WCMD_run_program (char *command, int called) {
+
+STARTUPINFO st;
+PROCESS_INFORMATION pe;
+SHFILEINFO psfi;
+DWORD console;
+BOOL status;
+HANDLE h;
+HINSTANCE hinst;
+char filetorun[MAX_PATH];
+
+ WCMD_parse (command, quals, param1, param2); /* Quick way to get the filename */
+ if (!(*param1) && !(*param2))
+ return;
+ if (strpbrk (param1, "/\\:") == NULL) { /* No explicit path given */
+ char *ext = strrchr( param1, '.' );
+ if (!ext || !strcasecmp( ext, ".bat"))
+ {
+ if (SearchPath (NULL, param1, ".bat", sizeof(filetorun), filetorun, NULL)) {
+ WCMD_batch (filetorun, command, called);
+ return;
+ }
+ }
+ if (!ext || !strcasecmp( ext, ".cmd"))
+ {
+ if (SearchPath (NULL, param1, ".cmd", sizeof(filetorun), filetorun, NULL)) {
+ WCMD_batch (filetorun, command, called);
+ return;
+ }
+ }
+ }
+ else { /* Explicit path given */
+ char *ext = strrchr( param1, '.' );
+ if (ext && (!strcasecmp( ext, ".bat" ) || !strcasecmp( ext, ".cmd" )))
+ {
+ WCMD_batch (param1, command, called);
+ return;
+ }
+
+ if (ext && strpbrk( ext, "/\\:" )) ext = NULL;
+ if (!ext)
+ {
+ strcpy (filetorun, param1);
+ strcat (filetorun, ".bat");
+ h = CreateFile (filetorun, GENERIC_READ, FILE_SHARE_READ,
+ NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
+ if (h != INVALID_HANDLE_VALUE) {
+ CloseHandle (h);
+ WCMD_batch (param1, command, called);
+ return;
+ }
+ }
+ }
+
+ /* No batch file found, assume executable */
+
+ hinst = FindExecutable (param1, NULL, filetorun);
+ if ((INT_PTR)hinst < 32)
+ console = 0;
+ else
+ console = SHGetFileInfo (filetorun, 0, &psfi, sizeof(psfi), SHGFI_EXETYPE);
+
+ ZeroMemory (&st, sizeof(STARTUPINFO));
+ st.cb = sizeof(STARTUPINFO);
+ init_msvcrt_io_block(&st);
+
+ status = CreateProcess (NULL, command, NULL, NULL, TRUE,
+ 0, NULL, NULL, &st, &pe);
+ if ((opt_c || opt_k) && !opt_s && !status
+ && GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
+ /* strip first and last quote characters and try again */
+ WCMD_opt_s_strip_quotes(command);
+ opt_s=1;
+ WCMD_run_program(command, called);
+ return;
+ }
+ if (!status) {
+ WCMD_print_error ();
+ return;
+ }
+ if (!console) errorlevel = 0;
+ else
+ {
+ if (!HIWORD(console)) WaitForSingleObject (pe.hProcess, INFINITE);
+ GetExitCodeProcess (pe.hProcess, &errorlevel);
+ if (errorlevel == STILL_ACTIVE) errorlevel = 0;
+ }
+ CloseHandle(pe.hProcess);
+ CloseHandle(pe.hThread);
+}
+
+/******************************************************************************
+ * WCMD_show_prompt
+ *
+ * Display the prompt on STDout
+ *
+ */
+
+void WCMD_show_prompt (void) {
+
+int status;
+char out_string[MAX_PATH], curdir[MAX_PATH], prompt_string[MAX_PATH];
+char *p, *q;
+
+ status = GetEnvironmentVariable ("PROMPT", prompt_string, sizeof(prompt_string));
+ if ((status == 0) || (status > sizeof(prompt_string))) {
+ lstrcpy (prompt_string, "$P$G");
+ }
+ p = prompt_string;
+ q = out_string;
+ *q = '\0';
+ while (*p != '\0') {
+ if (*p != '$') {
+ *q++ = *p++;
+ *q = '\0';
+ }
+ else {
+ p++;
+ switch (toupper(*p)) {
+ case '$':
+ *q++ = '$';
+ break;
+ case 'B':
+ *q++ = '|';
+ break;
+ case 'D':
+ GetDateFormat (LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, q, MAX_PATH);
+ while (*q) q++;
+ break;
+ case 'E':
+ *q++ = '\E';
+ break;
+ case 'G':
+ *q++ = '>';
+ break;
+ case 'L':
+ *q++ = '<';
+ break;
+ case 'N':
+ status = GetCurrentDirectory (sizeof(curdir), curdir);
+ if (status) {
+ *q++ = curdir[0];
+ }
+ break;
+ case 'P':
+ status = GetCurrentDirectory (sizeof(curdir), curdir);
+ if (status) {
+ lstrcat (q, curdir);
+ while (*q) q++;
+ }
+ break;
+ case 'Q':
+ *q++ = '=';
+ break;
+ case 'T':
+ GetTimeFormat (LOCALE_USER_DEFAULT, 0, NULL, NULL, q, MAX_PATH);
+ while (*q) q++;
+ break;
+ case 'V':
+ lstrcat (q, version_string);
+ while (*q) q++;
+ break;
+ case '_':
+ *q++ = '\n';
+ break;
+ }
+ p++;
+ *q = '\0';
+ }
+ }
+ WCMD_output_asis (out_string);
+}
+
+/****************************************************************************
+ * WCMD_print_error
+ *
+ * Print the message for GetLastError
+ */
+
+void WCMD_print_error (void) {
+LPVOID lpMsgBuf;
+DWORD error_code;
+int status;
+
+ error_code = GetLastError ();
+ status = FormatMessage (FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, error_code, 0, (LPTSTR) &lpMsgBuf, 0, NULL);
+ if (!status) {
+ WCMD_output ("FIXME: Cannot display message for error %d, status %d\n",
+ error_code, GetLastError());
+ return;
+ }
+ WCMD_output_asis (lpMsgBuf);
+ LocalFree ((HLOCAL)lpMsgBuf);
+ WCMD_output_asis (newline);
+ return;
+}
+
+/*******************************************************************
+ * WCMD_parse - parse a command into parameters and qualifiers.
+ *
+ * On exit, all qualifiers are concatenated into q, the first string
+ * not beginning with "/" is in p1 and the
+ * second in p2. Any subsequent non-qualifier strings are lost.
+ * Parameters in quotes are handled.
+ */
+
+void WCMD_parse (char *s, char *q, char *p1, char *p2) {
+
+int p = 0;
+
+ *q = *p1 = *p2 = '\0';
+ while (TRUE) {
+ switch (*s) {
+ case '/':
+ *q++ = *s++;
+ while ((*s != '\0') && (*s != ' ') && *s != '/') {
+ *q++ = toupper (*s++);
+ }
+ *q = '\0';
+ break;
+ case ' ':
+ case '\t':
+ s++;
+ break;
+ case '"':
+ s++;
+ while ((*s != '\0') && (*s != '"')) {
+ if (p == 0) *p1++ = *s++;
+ else if (p == 1) *p2++ = *s++;
+ else s++;
+ }
+ if (p == 0) *p1 = '\0';
+ if (p == 1) *p2 = '\0';
+ p++;
+ if (*s == '"') s++;
+ break;
+ case '\0':
+ return;
+ default:
+ while ((*s != '\0') && (*s != ' ') && (*s != '\t')) {
+ if (p == 0) *p1++ = *s++;
+ else if (p == 1) *p2++ = *s++;
+ else s++;
+ }
+ if (p == 0) *p1 = '\0';
+ if (p == 1) *p2 = '\0';
+ p++;
+ }
+ }
+}
+
+/*******************************************************************
+ * WCMD_output - send output to current standard output device.
+ *
+ */
+
+void WCMD_output (const char *format, ...) {
+
+va_list ap;
+char string[1024];
+int ret;
+
+ va_start(ap,format);
+ ret = vsnprintf (string, sizeof( string), format, ap);
+ va_end(ap);
+ if( ret >= sizeof( string)) {
+ WCMD_output_asis("ERR: output truncated in WCMD_output\n" );
+ string[sizeof( string) -1] = '\0';
+ }
+ WCMD_output_asis(string);
+}
+
+
+static int line_count;
+static int max_height;
+static BOOL paged_mode;
+
+void WCMD_enter_paged_mode(void)
+{
+CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
+
+ if (GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleInfo))
+ max_height = consoleInfo.dwSize.Y;
+ else
+ max_height = 25;
+ paged_mode = TRUE;
+ line_count = 5; /* keep 5 lines from previous output */
+}
+
+void WCMD_leave_paged_mode(void)
+{
+ paged_mode = FALSE;
+}
+
+/*******************************************************************
+ * WCMD_output_asis - send output to current standard output device.
+ * without formatting eg. when message contains '%'
+ */
+
+void WCMD_output_asis (const char *message) {
+ DWORD count;
+ char* ptr;
+ char string[1024];
+
+ if (paged_mode) {
+ do {
+ if ((ptr = strchr(message, '\n')) != NULL) ptr++;
+ WriteFile (GetStdHandle(STD_OUTPUT_HANDLE), message,
+ (ptr) ? ptr - message : lstrlen(message), &count, NULL);
+ if (ptr) {
+ if (++line_count >= max_height - 1) {
+ line_count = 0;
+ WCMD_output_asis (anykey);
+ ReadFile (GetStdHandle(STD_INPUT_HANDLE), string, sizeof(string), &count, NULL);
+ }
+ }
+ } while ((message = ptr) != NULL);
+ } else {
+ WriteFile (GetStdHandle(STD_OUTPUT_HANDLE), message, lstrlen(message), &count, NULL);
+ }
+}
+
+
+/***************************************************************************
+ * WCMD_strtrim_leading_spaces
+ *
+ * Remove leading spaces from a string. Return a pointer to the first
+ * non-space character. Does not modify the input string
+ */
+
+char *WCMD_strtrim_leading_spaces (char *string) {
+
+char *ptr;
+
+ ptr = string;
+ while (*ptr == ' ') ptr++;
+ return ptr;
+}
+
+/*************************************************************************
+ * WCMD_strtrim_trailing_spaces
+ *
+ * Remove trailing spaces from a string. This routine modifies the input
+ * string by placing a null after the last non-space character
+ */
+
+void WCMD_strtrim_trailing_spaces (char *string) {
+
+char *ptr;
+
+ ptr = string + lstrlen (string) - 1;
+ while ((*ptr == ' ') && (ptr >= string)) {
+ *ptr = '\0';
+ ptr--;
+ }
+}
+
+/*************************************************************************
+ * WCMD_opt_s_strip_quotes
+ *
+ * Remove first and last quote characters, preserving all other text
+ */
+
+void WCMD_opt_s_strip_quotes(char *cmd) {
+ char *src = cmd + 1, *dest = cmd, *lastq = NULL;
+ while((*dest=*src) != '\0') {
+ if (*src=='\"')
+ lastq=dest;
+ dest++, src++;
+ }
+ if (lastq) {
+ dest=lastq++;
+ while ((*dest++=*lastq++) != 0)
+ ;
+ }
+}
+
+/*************************************************************************
+ * WCMD_pipe
+ *
+ * Handle pipes within a command - the DOS way using temporary files.
+ */
+
+void WCMD_pipe (char *command) {
+
+char *p;
+char temp_path[MAX_PATH], temp_file[MAX_PATH], temp_file2[MAX_PATH], temp_cmd[1024];
+
+ GetTempPath (sizeof(temp_path), temp_path);
+ GetTempFileName (temp_path, "CMD", 0, temp_file);
+ p = strchr(command, '|');
+ *p++ = '\0';
+ wsprintf (temp_cmd, "%s > %s", command, temp_file);
+ WCMD_process_command (temp_cmd);
+ command = p;
+ while ((p = strchr(command, '|'))) {
+ *p++ = '\0';
+ GetTempFileName (temp_path, "CMD", 0, temp_file2);
+ wsprintf (temp_cmd, "%s < %s > %s", command, temp_file, temp_file2);
+ WCMD_process_command (temp_cmd);
+ DeleteFile (temp_file);
+ lstrcpy (temp_file, temp_file2);
+ command = p;
+ }
+ wsprintf (temp_cmd, "%s < %s", command, temp_file);
+ WCMD_process_command (temp_cmd);
+ DeleteFile (temp_file);
+}
diff --git a/programs/cmd/wcmdrc.rc b/programs/cmd/wcmdrc.rc
new file mode 100644
index 0000000..c449f58
--- /dev/null
+++ b/programs/cmd/wcmdrc.rc
@@ -0,0 +1,181 @@
+/*
+ * Copyright (C) 1999 D A Pickles
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "wcmd.h"
+
+#include "Cs.rc"
+#include "De.rc"
+#include "En.rc"
+#include "Es.rc"
+#include "Fr.rc"
+#include "Ja.rc"
+#include "Ko.rc"
+#include "Nl.rc"
+#include "No.rc"
+#include "Pl.rc"
+#include "Pt.rc"
+#include "Ru.rc"
+#include "Si.rc"
+#include "Tr.rc"
+
+LANGUAGE LANG_NEUTRAL,SUBLANG_NEUTRAL
+
+/* BINRES wcmd.ico */
+IDI_ICON1 ICON wcmd.ico
+/* {
+ '00 00 01 00 01 00 20 20 00 01 00 00 00 00 A8 08'
+ '00 00 16 00 00 00 28 00 00 00 20 00 00 00 40 00'
+ '00 00 01 00 08 00 00 00 00 00 80 04 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 40 00 00 00 80 00 00 00 FF 00 00 00 00 20'
+ '00 00 40 20 00 00 80 20 00 00 FF 20 00 00 00 40'
+ '00 00 40 40 00 00 80 40 00 00 FF 40 00 00 00 60'
+ '00 00 40 60 00 00 80 60 00 00 FF 60 00 00 00 80'
+ '00 00 40 80 00 00 80 80 00 00 FF 80 00 00 00 A0'
+ '00 00 40 A0 00 00 80 A0 00 00 FF A0 00 00 00 C0'
+ '00 00 40 C0 00 00 80 C0 00 00 FF C0 00 00 00 FF'
+ '00 00 40 FF 00 00 80 FF 00 00 FF FF 00 00 00 00'
+ '20 00 40 00 20 00 80 00 20 00 FF 00 20 00 00 20'
+ '20 00 40 20 20 00 80 20 20 00 FF 20 20 00 00 40'
+ '20 00 40 40 20 00 80 40 20 00 FF 40 20 00 00 60'
+ '20 00 40 60 20 00 80 60 20 00 FF 60 20 00 00 80'
+ '20 00 40 80 20 00 80 80 20 00 FF 80 20 00 00 A0'
+ '20 00 40 A0 20 00 80 A0 20 00 FF A0 20 00 00 C0'
+ '20 00 40 C0 20 00 80 C0 20 00 FF C0 20 00 00 FF'
+ '20 00 40 FF 20 00 80 FF 20 00 FF FF 20 00 00 00'
+ '40 00 40 00 40 00 80 00 40 00 FF 00 40 00 00 20'
+ '40 00 40 20 40 00 80 20 40 00 FF 20 40 00 00 40'
+ '40 00 40 40 40 00 80 40 40 00 FF 40 40 00 00 60'
+ '40 00 40 60 40 00 80 60 40 00 FF 60 40 00 00 80'
+ '40 00 40 80 40 00 80 80 40 00 FF 80 40 00 00 A0'
+ '40 00 40 A0 40 00 80 A0 40 00 FF A0 40 00 00 C0'
+ '40 00 40 C0 40 00 80 C0 40 00 FF C0 40 00 00 FF'
+ '40 00 40 FF 40 00 80 FF 40 00 FF FF 40 00 00 00'
+ '60 00 40 00 60 00 80 00 60 00 FF 00 60 00 00 20'
+ '60 00 40 20 60 00 80 20 60 00 FF 20 60 00 00 40'
+ '60 00 40 40 60 00 80 40 60 00 FF 40 60 00 00 60'
+ '60 00 40 60 60 00 80 60 60 00 FF 60 60 00 00 80'
+ '60 00 40 80 60 00 80 80 60 00 FF 80 60 00 00 A0'
+ '60 00 40 A0 60 00 80 A0 60 00 FF A0 60 00 00 C0'
+ '60 00 40 C0 60 00 80 C0 60 00 FF C0 60 00 00 FF'
+ '60 00 40 FF 60 00 80 FF 60 00 FF FF 60 00 00 00'
+ '80 00 40 00 80 00 80 00 80 00 FF 00 80 00 00 20'
+ '80 00 40 20 80 00 80 20 80 00 FF 20 80 00 00 40'
+ '80 00 40 40 80 00 80 40 80 00 FF 40 80 00 00 60'
+ '80 00 40 60 80 00 80 60 80 00 FF 60 80 00 00 80'
+ '80 00 40 80 80 00 80 80 80 00 FF 80 80 00 00 A0'
+ '80 00 40 A0 80 00 80 A0 80 00 FF A0 80 00 00 C0'
+ '80 00 40 C0 80 00 80 C0 80 00 FF C0 80 00 00 FF'
+ '80 00 40 FF 80 00 80 FF 80 00 FF FF 80 00 00 00'
+ 'A0 00 40 00 A0 00 80 00 A0 00 FF 00 A0 00 00 20'
+ 'A0 00 40 20 A0 00 80 20 A0 00 FF 20 A0 00 00 40'
+ 'A0 00 40 40 A0 00 80 40 A0 00 FF 40 A0 00 00 60'
+ 'A0 00 40 60 A0 00 80 60 A0 00 FF 60 A0 00 00 80'
+ 'A0 00 40 80 A0 00 80 80 A0 00 FF 80 A0 00 00 A0'
+ 'A0 00 40 A0 A0 00 80 A0 A0 00 FF A0 A0 00 00 C0'
+ 'A0 00 40 C0 A0 00 80 C0 A0 00 FF C0 A0 00 00 FF'
+ 'A0 00 40 FF A0 00 80 FF A0 00 FF FF A0 00 00 00'
+ 'C0 00 40 00 C0 00 80 00 C0 00 FF 00 C0 00 00 20'
+ 'C0 00 40 20 C0 00 80 20 C0 00 FF 20 C0 00 00 40'
+ 'C0 00 40 40 C0 00 80 40 C0 00 FF 40 C0 00 00 60'
+ 'C0 00 40 60 C0 00 80 60 C0 00 FF 60 C0 00 00 80'
+ 'C0 00 40 80 C0 00 80 80 C0 00 FF 80 C0 00 00 A0'
+ 'C0 00 40 A0 C0 00 80 A0 C0 00 FF A0 C0 00 00 C0'
+ 'C0 00 40 C0 C0 00 80 C0 C0 00 FF C0 C0 00 00 FF'
+ 'C0 00 40 FF C0 00 80 FF C0 00 FF FF C0 00 00 00'
+ 'FF 00 40 00 FF 00 80 00 FF 00 FF 00 FF 00 00 20'
+ 'FF 00 40 20 FF 00 80 20 FF 00 FF 20 FF 00 00 40'
+ 'FF 00 40 40 FF 00 80 40 FF 00 FF 40 FF 00 00 60'
+ 'FF 00 40 60 FF 00 80 60 FF 00 FF 60 FF 00 00 80'
+ 'FF 00 40 80 FF 00 80 80 FF 00 FF 80 FF 00 00 A0'
+ 'FF 00 40 A0 FF 00 80 A0 FF 00 FF A0 FF 00 00 C0'
+ 'FF 00 40 C0 FF 00 80 C0 FF 00 FF C0 FF 00 00 FF'
+ 'FF 00 40 FF FF 00 80 FF FF 00 FF FF FF 00 FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF B6 24 FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF 6D 24 FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF B6 00 B6 FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF 92 00 FF FF 24 FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF 24 FF FF FF FF 92 FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF 24 FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF 92 FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF 6D FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF B6 FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF 6D FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF 92 FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF 6D FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF 6D FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 24 FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 24'
+ 'FF B6 FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 24'
+ '80 81 60 6C FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 24 81'
+ 'C1 81 80 81 20 FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF C0 C1'
+ '80 80 C1 81 C1 20 FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 81 81'
+ '81 80 81 80 80 80 24 FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF 6D 80 81'
+ '81 80 81 C1 C0 80 80 92 FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF B6 FF FF'
+ 'FF FF FF 81 C0 80 80 20 FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF 92 FF FF'
+ 'FF FF FF FF C5 C0 80 81 6D FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FB 81 81 24 FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92 FF'
+ 'FF FF FF FF FF FF FF FF 24 FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF 6D FF'
+ 'FF FF FF FF FF FF FF FF 6D FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 92'
+ 'FF FF FF FF FF FF FF 24 24 FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ '92 FF FF FF FF 24 6D FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ '92 FF FF 00 92 FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
+ 'FF 24 B6 FF FF FF FF FF FF FF FF FF FF FF 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 00 00 00 00'
+} */