From 692445523accd2173c9f6b24339f26baa6f06bbf Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Sat, 18 Sep 2004 10:20:54 +0000 Subject: [PATCH] Some DIRCMD for XulChris Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1984 --- src/shell/shell_cmds.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 3d41a8e0..62217170 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_cmds.cpp,v 1.46 2004-09-09 18:36:50 qbix79 Exp $ */ +/* $Id: shell_cmds.cpp,v 1.47 2004-09-18 10:20:54 qbix79 Exp $ */ #include #include @@ -239,6 +239,14 @@ void DOS_Shell::CMD_DIR(char * args) { char numformat[16]; char path[DOS_PATHLENGTH]; + std::string line; + if(GetEnvStr("DIRCMD",line)){ + std::string::size_type idx = line.find('='); + std::string value=line.substr(idx +1 , std::string::npos); + line = std::string(args) + " " + value; + args=const_cast(line.c_str()); + } + bool optW=ScanCMDBool(args,"W"); bool optS=ScanCMDBool(args,"S"); bool optP=ScanCMDBool(args,"P");