comparison simtool/dispatch.c @ 131:7305f2e63d66

fc-simtool: '!' escape in command dispatch
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 20 Feb 2021 22:13:54 +0000
parents 7faec607500f
children d991944aa5f3
comparison
equal deleted inserted replaced
130:9c10afbb745a 131:7305f2e63d66
248 ; 248 ;
249 if (!*cp || *cp == '#') 249 if (!*cp || *cp == '#')
250 return(0); 250 return(0);
251 if (is_script) 251 if (is_script)
252 printf("Script command: %s\n", cp); 252 printf("Script command: %s\n", cp);
253 if (*cp == '!')
254 return system(cp + 1);
253 argv[0] = cp; 255 argv[0] = cp;
254 while (*cp && !isspace(*cp)) 256 while (*cp && !isspace(*cp))
255 cp++; 257 cp++;
256 if (*cp) 258 if (*cp)
257 *cp++ = '\0'; 259 *cp++ = '\0';