fix shift.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3439
This commit is contained in:
parent
294da23d83
commit
bc5a4d7172
2 changed files with 8 additions and 6 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: shell.h,v 1.27 2009-05-27 09:15:41 qbix79 Exp $ */
|
||||
/* $Id: shell.h,v 1.28 2009-07-03 19:36:57 qbix79 Exp $ */
|
||||
|
||||
#ifndef DOSBOX_SHELL_H
|
||||
#define DOSBOX_SHELL_H
|
||||
|
@ -55,6 +55,7 @@ public:
|
|||
DOS_Shell * shell;
|
||||
BatchFile * prev;
|
||||
CommandLine * cmd;
|
||||
std::string filename;
|
||||
};
|
||||
|
||||
class AutoexecEditor;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: shell_batch.cpp,v 1.35 2009-05-27 09:15:42 qbix79 Exp $ */
|
||||
/* $Id: shell_batch.cpp,v 1.36 2009-07-03 19:36:56 qbix79 Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -32,6 +32,7 @@ BatchFile::BatchFile(DOS_Shell * host,char const * const name, char const * cons
|
|||
char totalname[DOS_PATHLENGTH+4];
|
||||
DOS_Canonicalize(name,totalname); // Get fullname including drive specificiation
|
||||
cmd = new CommandLine(totalname,cmd_line);
|
||||
filename = totalname;
|
||||
|
||||
//Test if file is openable
|
||||
if (!DOS_OpenFile(totalname,128,&file_handle)) {
|
||||
|
@ -49,8 +50,8 @@ BatchFile::~BatchFile() {
|
|||
|
||||
bool BatchFile::ReadLine(char * line) {
|
||||
//Open the batchfile and seek to stored postion
|
||||
if (!DOS_OpenFile(cmd->GetFileName(),128,&file_handle)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("ReadLine Can't open BatchFile %s",cmd->GetFileName());
|
||||
if (!DOS_OpenFile(filename.c_str(),128,&file_handle)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("ReadLine Can't open BatchFile %s",filename.c_str());
|
||||
delete this;
|
||||
return false;
|
||||
}
|
||||
|
@ -143,8 +144,8 @@ emptyline:
|
|||
|
||||
bool BatchFile::Goto(char * where) {
|
||||
//Open bat file and search for the where string
|
||||
if (!DOS_OpenFile(cmd->GetFileName(),128,&file_handle)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("SHELL:Goto Can't open BatchFile %s",cmd->GetFileName());
|
||||
if (!DOS_OpenFile(filename.c_str(),128,&file_handle)) {
|
||||
LOG(LOG_MISC,LOG_ERROR)("SHELL:Goto Can't open BatchFile %s",filename.c_str());
|
||||
delete this;
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue