Skip to content
Snippets Groups Projects
Commit e5659168 authored by deuce's avatar deuce
Browse files

Fixed error... so that command-line switching worked on Win32 systems,

I used a function (strcasestr) that is not available on Win32 systems.

:-)
parent 40db7529
No related branches found
No related tags found
No related merge requests found
......@@ -898,12 +898,18 @@ void show_usage(char *cmd)
int command_is(char *cmdline, char *cmd)
{
char *p;
char cmdexe[64];
while((p=strcasestr(cmdline,cmd))!=NULL) {
if(*(p+strlen(cmd))==0 || !stricmp(".EXE",p+strlen(cmd)))
return 1;
}
SAFECOPY(cmdexe,cmd);
strcat(cmdexe,".exe");
if(strlen(cmdline)<strlen(cmd))
return(0);
if(!stricmp(cmd,(cmdline+strlen(cmdline)-strlen(cmd))))
return(1);
if(strlen(cmdline)<strlen(cmdexe))
return(0);
if(!stricmp(cmdexe,(cmdline+strlen(cmdline)-strlen(cmdexe))))
return(1);
return(0);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment