home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / armedit / Code / CLI_H < prev    next >
Text File  |  1997-02-21  |  2KB  |  53 lines

  1. /*
  2.     File        : cli.h
  3.     Date        : 21-Feb-97
  4.     Author      : © A.Thoukydides, 1996, 1997
  5.     Description : Execute RISC OS *commands.
  6. */
  7.  
  8. // Only include header file once
  9. #ifndef CLI_H
  10. #define CLI_H
  11.  
  12. // Include system header files
  13. #include <stdio.h>
  14.  
  15. // Variable to contain any error message
  16. extern char cli_error[256];
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. /*
  23.     Parameters  : cmd       - The command to execute.
  24.                   stream    - Optional stream to redirect output to. If a
  25.                               NULL pointer is passed then no redirection is
  26.                               used.
  27.     Returns     : int       - Standard C return code giving status of
  28.                               operation.
  29.     Description : Perform a *command simply. The { > file } method of
  30.                   redirection is used if required. No redirection of input
  31.                   is supported.
  32. */
  33. int cli_simple(const char *cmd, FILE *stream);
  34.  
  35. /*
  36.     Parameters  : cmd   - The command to execute.
  37.                   in    - Stream to use for input. If a NULL pointer is
  38.                           passed then the keyboard is used for input.
  39.                   out   - Stream to use for output. If a NULL pointer is
  40.                           passed then stdout is used.
  41.     Returns     : int   - Standard C return code giving status of operation.
  42.     Description : Perform a *command with full redirection. Due to the way in
  43.                   which the command may need to be suspended, the commands
  44.                   that may be executed are more restricted.
  45. */
  46. int cli_redir(const char *cmd, FILE *in, FILE *out);
  47.  
  48. #ifdef __cplusplus
  49. }
  50. #endif
  51.  
  52. #endif
  53.