Mail Archives: djgpp/1996/11/13/13:52:12
> Here is a part of my code :
>
> char * ext=filename[pos]->get_part2(0);
> if( !strcmp(ext,"bat") || !strcmp(ext,"BAT") || !strcmp(ext,"EXE")
> || !strcmp(ext,"COM") || !strcmp(ext,"exe") || !strcmp(ext,"EXE"))
> {
> panel1->kill();
> panel2->kill();
> int result=system(filename[pos]->get_filename());
> panel1->refresh();
> panel2->refresh();
> }
Have you gotten a response, yet?
The code LOOKS OK. I suggest that you write a simple test program to
see if everything functions as you would expect it to do. I would
guess that it is returning, but that the refresh () calls don't do
what they're told.
By the way, you may want to change the strcmp code to be more robust.
The preferred call is strcasecmp which does a case insensitive comparison.
-- Marc Singer
- Raw text -