|
||
int system1 ( char *cmd )
char *cmd; // command to execute
|
|
|||||||||||
Synopsis |
#include "silver.h"
The system1 function invokes the DOS command interpreter and passes cmd to it. The contents of the graphics screen are saved before handing control to the DOS command interpreter.
|
|
||||||||||
Parameters |
cmd is a null-terminated string containing the command to be executed.
|
|
||||||||||
Return Value |
system1 returns a value determined as follows:
if cmd is NULL , then system returns 0 if COMMAND.COM is present. If COMMAND.COM is not present, then system returns a non-zero value, and sets errno (the system error variable) to ENOENT (defined in errno.h). system1 uses the environment variables COMSPEC and PATH to locate COMMAND.COM.
If cmd is not NULL , then system passes cmd to COMMAND.COM to be executed as an MS-DOS command. If the command is executed successfully, then system returns 0. If an error occurs, then system returns -1, and sets errno to one of the following values:
|
|
||||||||||
See Also |
|
|||||||||||
|
|