home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
utilities
/
armedit_1
/
Code
/
CLI_H
< prev
next >
Wrap
Text File
|
1997-02-21
|
2KB
|
53 lines
/*
File : cli.h
Date : 21-Feb-97
Author : © A.Thoukydides, 1996, 1997
Description : Execute RISC OS *commands.
*/
// Only include header file once
#ifndef CLI_H
#define CLI_H
// Include system header files
#include <stdio.h>
// Variable to contain any error message
extern char cli_error[256];
#ifdef __cplusplus
extern "C" {
#endif
/*
Parameters : cmd - The command to execute.
stream - Optional stream to redirect output to. If a
NULL pointer is passed then no redirection is
used.
Returns : int - Standard C return code giving status of
operation.
Description : Perform a *command simply. The { > file } method of
redirection is used if required. No redirection of input
is supported.
*/
int cli_simple(const char *cmd, FILE *stream);
/*
Parameters : cmd - The command to execute.
in - Stream to use for input. If a NULL pointer is
passed then the keyboard is used for input.
out - Stream to use for output. If a NULL pointer is
passed then stdout is used.
Returns : int - Standard C return code giving status of operation.
Description : Perform a *command with full redirection. Due to the way in
which the command may need to be suspended, the commands
that may be executed are more restricted.
*/
int cli_redir(const char *cmd, FILE *in, FILE *out);
#ifdef __cplusplus
}
#endif
#endif