SilverScreen Solid Modeler

system1

system1

Previous topic Next topic  

system1

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

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:

 

Value

Meaning

ENOMEM

not enough memory exists to execute the command

E2BIG

the argument list for the command exceeds 128 bytes

ENOENT

COMMAND.COM was not found

ENOEXEC

COMMAND.COM could not be executed

 

 

See Also

spawn , system2 , system3