home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / dosfs < prev    next >
Encoding:
Text File  |  1994-09-22  |  3.6 KB  |  118 lines

  1. #ifndef dosfs_H
  2. #define dosfs_H
  3.  
  4. /* C header file for DOSFS
  5.  * written by DefMod (Sep 16 1994) on Thu Sep 22 16:40:43 1994
  6.  * Copyright © Acorn Computers Ltd, 1994
  7.  */
  8.  
  9. /*************************************************************************
  10.  * This source file was written by Acorn Computers Limited. It is part   *
  11.  * of the OSLib library for writing applications for RISC OS. It may be  *
  12.  * used freely in the creation of programs for RISC OS.                  *
  13.  *************************************************************************/
  14.  
  15. #ifndef types_H
  16.    #include "types.h"
  17. #endif
  18.  
  19. #ifndef os_H
  20.    #include "os.h"
  21. #endif
  22.  
  23. #ifndef filecore_H
  24.    #include "filecore.h"
  25. #endif
  26.  
  27. /**********************************
  28.  * SWI names and SWI reason codes *
  29.  **********************************/
  30. #undef  DOSFS_DiscFormat
  31. #define DOSFS_DiscFormat                        0x44B00
  32. #undef  XDOSFS_DiscFormat
  33. #define XDOSFS_DiscFormat                       0x64B00
  34. #undef  DOSFS_LayoutStructure
  35. #define DOSFS_LayoutStructure                   0x44B01
  36. #undef  XDOSFS_LayoutStructure
  37. #define XDOSFS_LayoutStructure                  0x64B01
  38.  
  39. /************************
  40.  * Constant definitions *
  41.  ************************/
  42. #define dosfs_FORMAT_DOSQ                       0
  43. #define dosfs_FORMAT_DOSM                       1
  44. #define dosfs_FORMAT_DOSH                       2
  45. #define dosfs_FORMAT_DOSN                       3
  46. #define dosfs_FORMAT_DOSP                       4
  47. #define dosfs_FORMAT_DOST                       5
  48. #define dosfs_FORMAT_DOSU                       6
  49. #define dosfs_FORMAT_ATARIM                     7
  50. #define dosfs_FORMAT_ATARIN                     8
  51.  
  52. /*************************
  53.  * Function declarations *
  54.  *************************/
  55.  
  56. #ifdef __cplusplus
  57.    extern "C" {
  58. #endif
  59.  
  60. /*************************************************************
  61.  * NOTE: The following functions provide direct access to    *
  62.  *       the SWI's noted in the function description.        *
  63.  *       Please read the relevant PRM section for more       *
  64.  *       information on their input/output parameters.       *
  65.  *************************************************************/
  66.  
  67. /* ------------------------------------------------------------------------
  68.  * Function:      dosfs_disc_format()
  69.  *
  70.  * Description:   Fills in a disc format structure with parameters for the
  71.  *                specified format
  72.  *
  73.  * Input:         buffer - value of R0 on entry
  74.  *                vet_format_swi - value of R1 on entry
  75.  *                vet_format_handle - value of R2 on entry
  76.  *                format - value of R3 on entry
  77.  *
  78.  * Other notes:   Calls SWI 0x44B00.
  79.  */
  80.  
  81. extern os_error *xdosfs_disc_format (filecore_format *buffer,
  82.       int vet_format_swi,
  83.       int vet_format_handle,
  84.       int format);
  85. extern void dosfs_disc_format (filecore_format *buffer,
  86.       int vet_format_swi,
  87.       int vet_format_handle,
  88.       int format);
  89.  
  90. /* ------------------------------------------------------------------------
  91.  * Function:      dosfs_layout_structure()
  92.  *
  93.  * Description:   Lays out into the specified image a set of structures for
  94.  *                its format
  95.  *
  96.  * Input:         disc - value of R0 on entry
  97.  *                defect_list - value of R1 on entry
  98.  *                disc_name - value of R2 on entry
  99.  *                image_file - value of R3 on entry
  100.  *
  101.  * Other notes:   Calls SWI 0x44B01.
  102.  */
  103.  
  104. extern os_error *xdosfs_layout_structure (filecore_disc *disc,
  105.       filecore_defect_list *defect_list,
  106.       char *disc_name,
  107.       os_f image_file);
  108. extern void dosfs_layout_structure (filecore_disc *disc,
  109.       filecore_defect_list *defect_list,
  110.       char *disc_name,
  111.       os_f image_file);
  112.  
  113. #ifdef __cplusplus
  114.    }
  115. #endif
  116.  
  117. #endif
  118.