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

  1. /*
  2.     File        : armfile.h
  3.     Date        : 21-Feb-97
  4.     Author      : © A.Thoukydides, 1995, 1996, 1997
  5.     Description : Transfer of files between DOS and RISC OS.
  6. */
  7.  
  8. // Only include header file once
  9. #ifndef ARMFILE_H
  10. #define ARMFILE_H
  11.  
  12. // Include system header files
  13. #include <stdlib.h>
  14.  
  15. // Variable to contain any error message
  16. extern char armfile_error[256];
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22. // Should multitasking be enabled during transfers (default is FALSE)
  23. extern int armfile_mtask;
  24.  
  25. /*
  26.     Parameters  : src   - The source DOS file.
  27.                   dest  - The destination RISC OS file.
  28.     Returns     : int   - Standard C return code giving status of operation.
  29.     Description : Copy a file from DOS to RISC OS. If there is an error then
  30.                   it is stored in the variable armfile_error and a non-zero
  31.                   value is returned, otherwise zero is returned.
  32. */
  33. int armfile_copy_dos_riscos(const char *src, const char *dest);
  34.  
  35. /*
  36.     Parameters  : src   - The source RISC OS file.
  37.                   dest  - The destination DOS file.
  38.     Returns     : int   - Standard C return code giving status of operation.
  39.     Description : Copy a file from RISC OS to DOS. If there is an error then
  40.                   it is stored in the variable armfile_error and a non-zero
  41.                   value is returned, otherwise zero is returned.
  42. */
  43. int armfile_copy_riscos_dos(const char *src, const char *dest);
  44.  
  45. /*
  46.     Parameters  : src   - The source DOS filename.
  47.                   dest  - The resulting RISC OS filename.
  48.     Returns     : void
  49.     Description : Perform character translation from DOS to RISC OS
  50.                   filenames.
  51. */
  52. void armfile_translate_dos_riscos(const char *src, char *dest);
  53.  
  54. /*
  55.     Parameters  : src   - The source RISC OS filename.
  56.                   dest  - The resulting DOS filename.
  57.     Returns     : void
  58.     Description : Perform character translation from RISC OS to DOS
  59.                   filenames.
  60. */
  61. void armfile_translate_riscos_dos(const char *src, char *dest);
  62.  
  63. /*
  64.     Parameters  : buf   - Buffer to receive the filename.
  65.                   len   - Size of the buffer.
  66.     Returns     : int   - Standard C return code giving status of operation.
  67.     Description : Generate a filename for a temporary RISC OS file. The file
  68.                   is deleted before exiting.
  69. */
  70. int armfile_temporary(char *buf, size_t len);
  71.  
  72. /*
  73.     Parameters  : dir   - The name of the RISC OS directory to create.
  74.     Returns     : int   - Standard C return code giving status of operation.
  75.     Description : Create a RISC OS directory.
  76. */
  77. int armfile_create_dir(const char *dir);
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83. #endif
  84.