home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / oslib / oslib_1 / OSLib / Computer / h / dosfs < prev    next >
Encoding:
Text File  |  1995-06-22  |  4.5 KB  |  141 lines

  1. #ifndef dosfs_H
  2. #define dosfs_H
  3.  
  4. /* C header file for DOSFS
  5.  * written by DefMod (Jun 20 1995) on Thu Jun 22 12:13:14 1995
  6.  * Jonathan Coxhead, Acorn Computers Ltd
  7.  */
  8.  
  9. #ifndef types_H
  10. #include "types.h"
  11. #endif
  12.  
  13. #ifndef os_H
  14. #include "os.h"
  15. #endif
  16.  
  17. #ifndef filecore_H
  18. #include "filecore.h"
  19. #endif
  20.  
  21. /**********************************
  22.  * SWI names and SWI reason codes *
  23.  **********************************/
  24. #undef  DOSFS_DiscFormat
  25. #define DOSFS_DiscFormat                        0x44B00
  26. #undef  XDOSFS_DiscFormat
  27. #define XDOSFS_DiscFormat                       0x64B00
  28. #undef  DOSFS_LayoutStructure
  29. #define DOSFS_LayoutStructure                   0x44B01
  30. #undef  XDOSFS_LayoutStructure
  31. #define XDOSFS_LayoutStructure                  0x64B01
  32. #undef  DOSFS_LayoutStructureGivenSize
  33. #define DOSFS_LayoutStructureGivenSize          0x44B01
  34. #undef  XDOSFS_LayoutStructureGivenSize
  35. #define XDOSFS_LayoutStructureGivenSize         0x64B01
  36.  
  37. /********************
  38.  * Type definitions *
  39.  ********************/
  40. typedef int dosfs_format_specifier;
  41.  
  42. /************************
  43.  * Constant definitions *
  44.  ************************/
  45. #define dosfs_FORMAT_DOSQ                       ((dosfs_format_specifier) 0x0u)
  46. #define dosfs_FORMAT_DOSM                       ((dosfs_format_specifier) 0x1u)
  47. #define dosfs_FORMAT_DOSH                       ((dosfs_format_specifier) 0x2u)
  48. #define dosfs_FORMAT_DOSN                       ((dosfs_format_specifier) 0x3u)
  49. #define dosfs_FORMAT_DOSP                       ((dosfs_format_specifier) 0x4u)
  50. #define dosfs_FORMAT_DOST                       ((dosfs_format_specifier) 0x5u)
  51. #define dosfs_FORMAT_DOSU                       ((dosfs_format_specifier) 0x6u)
  52. #define dosfs_FORMAT_ATARIM                     ((dosfs_format_specifier) 0x7u)
  53. #define dosfs_FORMAT_ATARIN                     ((dosfs_format_specifier) 0x8u)
  54. #define dosfs_FORMAT_PCMCIA                     ((dosfs_format_specifier) 0x9u)
  55.  
  56. /*************************
  57.  * Function declarations *
  58.  *************************/
  59.  
  60. #ifdef __cplusplus
  61.    extern "C" {
  62. #endif
  63.  
  64. /* ------------------------------------------------------------------------
  65.  * Function:      dosfs_disc_format()
  66.  *
  67.  * Description:   Fills in a disc format structure with parameters for the
  68.  *                specified format
  69.  *
  70.  * Input:         buffer - value of R0 on entry
  71.  *                vet_format_swi - value of R1 on entry
  72.  *                vet_format_handle - value of R2 on entry
  73.  *                format - value of R3 on entry
  74.  *
  75.  * Other notes:   Calls SWI 0x44B00.
  76.  */
  77.  
  78. extern os_error *xdosfs_disc_format (filecore_format *buffer,
  79.       int vet_format_swi,
  80.       int vet_format_handle,
  81.       dosfs_format_specifier format);
  82. __swi (0x44B00) void dosfs_disc_format (filecore_format *buffer,
  83.       int vet_format_swi,
  84.       int vet_format_handle,
  85.       dosfs_format_specifier format);
  86.  
  87. /* ------------------------------------------------------------------------
  88.  * Function:      dosfs_layout_structure()
  89.  *
  90.  * Description:   Lays out into the specified image a set of structures for
  91.  *                its format
  92.  *
  93.  * Input:         format - value of R0 on entry
  94.  *                defect_list - value of R1 on entry
  95.  *                disc_name - value of R2 on entry
  96.  *                image_file - value of R3 on entry
  97.  *
  98.  * Other notes:   Calls SWI 0x44B01.
  99.  */
  100.  
  101. extern os_error *xdosfs_layout_structure (dosfs_format_specifier format,
  102.       filecore_defect_list const *defect_list,
  103.       char const *disc_name,
  104.       os_f image_file);
  105. __swi (0x44B01) void dosfs_layout_structure (dosfs_format_specifier format,
  106.       filecore_defect_list const *defect_list,
  107.       char const *disc_name,
  108.       os_f image_file);
  109.  
  110. /* ------------------------------------------------------------------------
  111.  * Function:      dosfs_layout_structure_given_size()
  112.  *
  113.  * Description:   Lays out into the specified image a set of structures for
  114.  *                its format
  115.  *
  116.  * Input:         format - value of R0 on entry
  117.  *                defect_list - value of R1 on entry
  118.  *                disc_name - value of R2 on entry
  119.  *                image_file - value of R3 on entry
  120.  *                size - value of R4 on entry
  121.  *
  122.  * Other notes:   Calls SWI 0x44B01.
  123.  */
  124.  
  125. extern os_error *xdosfs_layout_structure_given_size (dosfs_format_specifier format,
  126.       filecore_defect_list const *defect_list,
  127.       char const *disc_name,
  128.       os_f image_file,
  129.       int size);
  130. extern void dosfs_layout_structure_given_size (dosfs_format_specifier format,
  131.       filecore_defect_list const *defect_list,
  132.       char const *disc_name,
  133.       os_f image_file,
  134.       int size);
  135.  
  136. #ifdef __cplusplus
  137.    }
  138. #endif
  139.  
  140. #endif
  141.