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
...@@ -898,12 +898,18 @@ void show_usage(char *cmd) ...@@ -898,12 +898,18 @@ void show_usage(char *cmd)
int command_is(char *cmdline, char *cmd) int command_is(char *cmdline, char *cmd)
{ {
char *p; char cmdexe[64];
while((p=strcasestr(cmdline,cmd))!=NULL) { SAFECOPY(cmdexe,cmd);
if(*(p+strlen(cmd))==0 || !stricmp(".EXE",p+strlen(cmd))) strcat(cmdexe,".exe");
return 1; 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); return(0);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment