Refactoring. Rewrite IF to not simply delete all =. Makes stuff like if errorlevel === 0 if not errorlevel 1 set A=1 correctly possible. Linefeed stuff(beta1)
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3201
This commit is contained in:
parent
0c788c8d3a
commit
8fe4a7e67f
2 changed files with 91 additions and 74 deletions
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: shell.h,v 1.23 2008-03-02 11:13:46 qbix79 Exp $ */
|
||||
/* $Id: shell.h,v 1.24 2008-08-11 12:54:57 qbix79 Exp $ */
|
||||
|
||||
#ifndef DOSBOX_SHELL_H
|
||||
#define DOSBOX_SHELL_H
|
||||
|
@ -127,32 +127,6 @@ struct SHELL_Cmd {
|
|||
const char * help; /* String with command help */
|
||||
};
|
||||
|
||||
static inline void StripSpaces(char*&args) {
|
||||
while(args && *args && isspace(*reinterpret_cast<unsigned char*>(args)))
|
||||
args++;
|
||||
}
|
||||
|
||||
static inline char* ExpandDot(char*args, char* buffer) {
|
||||
if(*args=='.')
|
||||
{
|
||||
if(*(args+1)==0)
|
||||
{
|
||||
strcpy(buffer,"*.*");
|
||||
return buffer;
|
||||
}
|
||||
if( (*(args+1)!='.') && (*(args+1)!='\\') )
|
||||
{
|
||||
buffer[0]='*';
|
||||
buffer[1]=0;
|
||||
strcat(buffer,args);
|
||||
return buffer;
|
||||
} else
|
||||
strcpy (buffer, args);
|
||||
}
|
||||
else strcpy(buffer,args);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
/* Object to manage lines in the autoexec.bat The lines get removed from
|
||||
* the file if the object gets destroyed. The environment is updated
|
||||
* as well if the line set a a variable */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue