1
0
Fork 0

add shift.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2639
This commit is contained in:
Peter Veenstra 2006-05-25 15:08:40 +00:00
parent c02188b774
commit 1303deba35
4 changed files with 18 additions and 8 deletions

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell.cpp,v 1.73 2006-04-29 10:05:55 c2woody Exp $ */
/* $Id: shell.cpp,v 1.74 2006-05-25 15:08:40 qbix79 Exp $ */
#include <stdlib.h>
#include <stdarg.h>
@ -320,7 +320,7 @@ void DOS_Shell::Run(void) {
if (echo) ShowPrompt();
InputCommand(input_line);
ParseLine(input_line);
if (echo) WriteOut("\n");
if (echo && !bf) WriteOut("\n");
}
} while (!exit);
}
@ -496,6 +496,7 @@ void SHELL_Init() {
MSG_Add("SHELL_CMD_SET_HELP","Change environment variables.\n");
MSG_Add("SHELL_CMD_IF_HELP","Performs conditional processing in batch programs.\n");
MSG_Add("SHELL_CMD_GOTO_HELP","Jump to a labeled line in a batch script.\n");
MSG_Add("SHELL_CMD_SHIFT_HELP","Leftshift commandline parameters in a batch script.\n");
MSG_Add("SHELL_CMD_TYPE_HELP","Display the contents of a text-file.\n");
MSG_Add("SHELL_CMD_REM_HELP","Add comments in a batch file.\n");
MSG_Add("SHELL_CMD_NO_WILD","This is a simple version of the command, no wildcards allowed!\n");

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_batch.cpp,v 1.20 2006-02-23 08:13:14 qbix79 Exp $ */
/* $Id: shell_batch.cpp,v 1.21 2006-05-25 15:08:40 qbix79 Exp $ */
#include <stdlib.h>
#include <string.h>
@ -149,3 +149,6 @@ again:
goto again;
return false;
};
void BatchFile::Shift(void) {
cmd->Shift(1);
}

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_cmds.cpp,v 1.66 2006-04-23 15:17:07 qbix79 Exp $ */
/* $Id: shell_cmds.cpp,v 1.67 2006-05-25 15:08:40 qbix79 Exp $ */
#include <string.h>
#include <ctype.h>
@ -46,6 +46,7 @@ static SHELL_Cmd cmd_list[]={
{ "SET", 0, &DOS_Shell::CMD_SET, "SHELL_CMD_SET_HELP"},
{ "IF", 0, &DOS_Shell::CMD_IF, "SHELL_CMD_IF_HELP"},
{ "GOTO", 0, &DOS_Shell::CMD_GOTO, "SHELL_CMD_GOTO_HELP"},
{ "SHIFT", 0, &DOS_Shell::CMD_SHIFT, "SHELL_CMD_SHIFT_HELP"},
{ "TYPE", 0, &DOS_Shell::CMD_TYPE, "SHELL_CMD_TYPE_HELP"},
{ "REM", 0, &DOS_Shell::CMD_REM, "SHELL_CMD_REM_HELP"},
{ "RENAME", 0, &DOS_Shell::CMD_RENAME, "SHELL_CMD_RENAME_HELP"},
@ -670,6 +671,9 @@ void DOS_Shell::CMD_GOTO(char * args) {
}
}
void DOS_Shell::CMD_SHIFT(char * /*args*/ ) {
if(bf) bf->Shift();
}
void DOS_Shell::CMD_TYPE(char * args) {
StripSpaces(args);