1
0
Fork 0

Make max 50% in autoexec.bat possible.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3186
This commit is contained in:
Peter Veenstra 2008-07-27 20:12:28 +00:00
parent 87941d0883
commit 6d1979bb9d
2 changed files with 10 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.89 2008-03-02 11:13:47 qbix79 Exp $ */
/* $Id: shell.cpp,v 1.90 2008-07-27 20:12:28 qbix79 Exp $ */
#include <stdlib.h>
#include <stdarg.h>
@ -270,8 +270,8 @@ void DOS_Shell::RunInternal(void)
if (echo) {
if (input_line[0] != '@') {
ShowPrompt();
WriteOut(input_line);
WriteOut("\n");
WriteOut_NoParsing(input_line);
WriteOut_NoParsing("\n");
};
};
ParseLine(input_line);
@ -318,8 +318,8 @@ void DOS_Shell::Run(void) {
if (echo) {
if (input_line[0]!='@') {
ShowPrompt();
WriteOut(input_line);
WriteOut("\n");
WriteOut_NoParsing(input_line);
WriteOut_NoParsing("\n");
};
};
ParseLine(input_line);
@ -329,7 +329,7 @@ void DOS_Shell::Run(void) {
if (echo) ShowPrompt();
InputCommand(input_line);
ParseLine(input_line);
if (echo && !bf) WriteOut("\n");
if (echo && !bf) WriteOut_NoParsing("\n");
}
} while (!exit);
}

View file

@ -16,7 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* $Id: shell_batch.cpp,v 1.27 2008-03-10 13:43:37 qbix79 Exp $ */
/* $Id: shell_batch.cpp,v 1.28 2008-07-27 20:12:28 qbix79 Exp $ */
#include <stdlib.h>
#include <string.h>
@ -100,7 +100,9 @@ emptyline:
} else {
/* Not a command line number has to be an environment */
char * first=strchr(cmd_read,'%');
if (!first) continue; *first++=0;
/* No env afterall.Somewhat of a hack though as %% and % aren't handled consistent in dosbox. Maybe echo needs to parse % and %% as well. */
if (!first) {*cmd_write++ = '%';continue;}
*first++ = 0;
std::string env;
if (shell->GetEnvStr(cmd_read,env)) {
const char * equals=strchr(env.c_str(),'=');