From ca660c0cbf3ffb0e0f725ac6a44e049e56b9cac1 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Wed, 20 Mar 2013 14:38:53 +0000 Subject: [PATCH] Use uppercase characters for ScanCMDBool. Explicitly disallow Set/P Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3825 --- src/shell/shell_cmds.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index b794c64e..661c6b5c 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -742,6 +742,8 @@ void DOS_Shell::CMD_COPY(char * args) { void DOS_Shell::CMD_SET(char * args) { HELP("SET"); + if (ScanCMDBool(args,"P")) + E_Exit("Set /P is not supported. Use Choice!"); StripSpaces(args); std::string line; if (!*args) { @@ -945,7 +947,7 @@ void DOS_Shell::CMD_CALL(char * args){ void DOS_Shell::CMD_DATE(char * args) { HELP("DATE"); - if(ScanCMDBool(args,"h")) { + if(ScanCMDBool(args,"H")) { // synchronize date with host parameter time_t curtime; struct tm *loctime; @@ -983,7 +985,7 @@ void DOS_Shell::CMD_DATE(char * args) { // date string appears valid for(Bit32u i = 0; i < length; i++) day[i] = datestring[reg_al*length+1+i]; } - bool dateonly = ScanCMDBool(args,"t"); + bool dateonly = ScanCMDBool(args,"T"); if(!dateonly) WriteOut(MSG_Get("SHELL_CMD_DATE_NOW")); const char* formatstring = MSG_Get("SHELL_CMD_DATE_FORMAT"); @@ -1006,7 +1008,7 @@ void DOS_Shell::CMD_DATE(char * args) { void DOS_Shell::CMD_TIME(char * args) { HELP("TIME"); - if(ScanCMDBool(args,"h")) { + if(ScanCMDBool(args,"H")) { // synchronize time with host parameter time_t curtime; struct tm *loctime; @@ -1026,7 +1028,7 @@ void DOS_Shell::CMD_TIME(char * args) { mem_writed(BIOS_TIMER,ticks); return; } - bool timeonly = ScanCMDBool(args,"t"); + bool timeonly = ScanCMDBool(args,"T"); reg_ah=0x2c; // get system time CALLBACK_RunRealInt(0x21);