home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 1 / RISC_DISC_1.iso / pd_share / code / oslib / h / osfscontro < prev    next >
Encoding:
Text File  |  1994-09-29  |  42.9 KB  |  1,351 lines

  1. #ifndef osfscontrol_H
  2. #define osfscontrol_H
  3.  
  4. /* C header file for OSFSControl
  5.  * written by DefMod (Sep 16 1994) on Thu Sep 29 15:09:59 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. /**********************************
  24.  * SWI names and SWI reason codes *
  25.  **********************************/
  26. #undef  OS_FSControl
  27. #define OS_FSControl                            0x29
  28. #undef  XOS_FSControl
  29. #define XOS_FSControl                           0x20029
  30. #undef  OSFSControl_Dir
  31. #define OSFSControl_Dir                         0x0
  32. #undef  OSFSControl_Lib
  33. #define OSFSControl_Lib                         0x1
  34. #undef  OSFSControl_StartApplication
  35. #define OSFSControl_StartApplication            0x2
  36. #undef  OSFSControl_Run
  37. #define OSFSControl_Run                         0x4
  38. #undef  OSFSControl_Cat
  39. #define OSFSControl_Cat                         0x5
  40. #undef  OSFSControl_Ex
  41. #define OSFSControl_Ex                          0x6
  42. #undef  OSFSControl_LCat
  43. #define OSFSControl_LCat                        0x7
  44. #undef  OSFSControl_LEx
  45. #define OSFSControl_LEx                         0x8
  46. #undef  OSFSControl_Info
  47. #define OSFSControl_Info                        0x9
  48. #undef  OSFSControl_Opt
  49. #define OSFSControl_Opt                         0xA
  50. #undef  OSFSControl_SetTemporaryFS
  51. #define OSFSControl_SetTemporaryFS              0xB
  52. #undef  OSFSControl_AddFS
  53. #define OSFSControl_AddFS                       0xC
  54. #undef  OSFSControl_LookupFS
  55. #define OSFSControl_LookupFS                    0xD
  56. #undef  OSFSControl_SelectFS
  57. #define OSFSControl_SelectFS                    0xE
  58. #undef  OSFSControl_BootFromFS
  59. #define OSFSControl_BootFromFS                  0xF
  60. #undef  OSFSControl_RemoveFS
  61. #define OSFSControl_RemoveFS                    0x10
  62. #undef  OSFSControl_AddSecondaryFS
  63. #define OSFSControl_AddSecondaryFS              0x11
  64. #undef  OSFSControl_ReadFileType
  65. #define OSFSControl_ReadFileType                0x12
  66. #undef  OSFSControl_RestoreCurrent
  67. #define OSFSControl_RestoreCurrent              0x13
  68. #undef  OSFSControl_ReadModuleBase
  69. #define OSFSControl_ReadModuleBase              0x14
  70. #undef  OSFSControl_ReadFSHandle
  71. #define OSFSControl_ReadFSHandle                0x15
  72. #undef  OSFSControl_Shut
  73. #define OSFSControl_Shut                        0x16
  74. #undef  OSFSControl_Shutdown
  75. #define OSFSControl_Shutdown                    0x17
  76. #undef  OSFSControl_Access
  77. #define OSFSControl_Access                      0x18
  78. #undef  OSFSControl_Rename
  79. #define OSFSControl_Rename                      0x19
  80. #undef  OSFSControl_Copy
  81. #define OSFSControl_Copy                        0x1A
  82. #undef  OSFSControl_Wipe
  83. #define OSFSControl_Wipe                        0x1B
  84. #undef  OSFSControl_Count
  85. #define OSFSControl_Count                       0x1C
  86. #undef  OSFSControl_ReadSecondaryFS
  87. #define OSFSControl_ReadSecondaryFS             0x1E
  88. #undef  OSFSControl_FileTypeFromString
  89. #define OSFSControl_FileTypeFromString          0x1F
  90. #undef  OSFSControl_FileInfo
  91. #define OSFSControl_FileInfo                    0x20
  92. #undef  OSFSControl_ReadFSName
  93. #define OSFSControl_ReadFSName                  0x21
  94. #undef  OSFSControl_RegisterImageFS
  95. #define OSFSControl_RegisterImageFS             0x23
  96. #undef  OSFSControl_DeregisterImageFS
  97. #define OSFSControl_DeregisterImageFS           0x24
  98. #undef  OSFSControl_CanonicalisePath
  99. #define OSFSControl_CanonicalisePath            0x25
  100. #undef  OSFSControl_InfoToFileType
  101. #define OSFSControl_InfoToFileType              0x26
  102. #undef  OSFSControl_URD
  103. #define OSFSControl_URD                         0x27
  104. #undef  OSFSControl_Back
  105. #define OSFSControl_Back                        0x28
  106. #undef  OSFSControl_DefectList
  107. #define OSFSControl_DefectList                  0x29
  108. #undef  OSFSControl_AddDefect
  109. #define OSFSControl_AddDefect                   0x2A
  110. #undef  OSFSControl_NoDir
  111. #define OSFSControl_NoDir                       0x2B
  112. #undef  OSFSControl_NoURD
  113. #define OSFSControl_NoURD                       0x2C
  114. #undef  OSFSControl_NoLib
  115. #define OSFSControl_NoLib                       0x2D
  116. #undef  OSFSControl_UsedSpaceMap
  117. #define OSFSControl_UsedSpaceMap                0x2E
  118. #undef  OSFSControl_ReadBootOption
  119. #define OSFSControl_ReadBootOption              0x2F
  120. #undef  OSFSControl_WriteBootOption
  121. #define OSFSControl_WriteBootOption             0x30
  122. #undef  OSFSControl_FreeSpace
  123. #define OSFSControl_FreeSpace                   0x31
  124. #undef  OSFSControl_NameDisc
  125. #define OSFSControl_NameDisc                    0x32
  126. #undef  OSFSControl_StampImage
  127. #define OSFSControl_StampImage                  0x33
  128. #undef  OSFSControl_ObjectAtOffset
  129. #define OSFSControl_ObjectAtOffset              0x34
  130. #undef  OSFSControl_SetDir
  131. #define OSFSControl_SetDir                      0x35
  132. #undef  OSFSControl_ReadDir
  133. #define OSFSControl_ReadDir                     0x36
  134. #undef  FSCV
  135. #define FSCV                                    0xF
  136. #undef  UpCall_MediaNotPresent
  137. #define UpCall_MediaNotPresent                  0x1
  138. #undef  UpCall_MediaNotKnown
  139. #define UpCall_MediaNotKnown                    0x2
  140. #undef  UpCallFSControl_SetArgsSize
  141. #define UpCallFSControl_SetArgsSize             0x200
  142. #undef  UpCallFSControl_Rename
  143. #define UpCallFSControl_Rename                  0x208
  144. #undef  UpCallFSControl_SetAttrString
  145. #define UpCallFSControl_SetAttrString           0x209
  146. #undef  UpCall_MediaSearchEnd
  147. #define UpCall_MediaSearchEnd                   0x4
  148. #undef  UpCall_NewApplication
  149. #define UpCall_NewApplication                   0x100
  150.  
  151. /************************************
  152.  * Structure and union declarations *
  153.  ************************************/
  154. typedef struct osfscontrol_id_                  *osfscontrol_id;
  155. typedef struct osfscontrol_descriptor           osfscontrol_descriptor;
  156.  
  157. /********************
  158.  * Type definitions *
  159.  ********************/
  160. struct osfscontrol_descriptor
  161.    {  byte *addr;
  162.       int size;
  163.    };
  164.  
  165. /************************
  166.  * Constant definitions *
  167.  ************************/
  168. #define osfscontrol_FS_NUMBER                   0xFFu
  169. #define osfscontrol_FS_OPEN_FILE_LIMIT          0xFF00u
  170. #define osfscontrol_FS_READ_ONLY                0x10000u
  171. #define osfscontrol_FS_NUMBER_NONE              0
  172. #define osfscontrol_FS_NUMBER_ROMFS             3
  173. #define osfscontrol_FS_NUMBER_NETFS             5
  174. #define osfscontrol_FS_NUMBER_ADFS              8
  175. #define osfscontrol_FS_NUMBER_NETPRINT          12
  176. #define osfscontrol_FS_NUMBER_NULL              13
  177. #define osfscontrol_FS_NUMBER_PRINTER           14
  178. #define osfscontrol_FS_NUMBER_SERIAL            15
  179. #define osfscontrol_FS_NUMBER_VDU               17
  180. #define osfscontrol_FS_NUMBER_RAWVDU            18
  181. #define osfscontrol_FS_NUMBER_KBD               19
  182. #define osfscontrol_FS_NUMBER_RAWKBD            20
  183. #define osfscontrol_FS_NUMBER_DESKFS            21
  184. #define osfscontrol_FS_NUMBER_RAMFS             23
  185. #define osfscontrol_FS_NUMBER_RISCIXFS          24
  186. #define osfscontrol_FS_NUMBER_STREAMER          25
  187. #define osfscontrol_FS_NUMBER_SCSIFS            26
  188. #define osfscontrol_FS_NUMBER_DIGITISER         27
  189. #define osfscontrol_FS_NUMBER_SCANNER           28
  190. #define osfscontrol_FS_NUMBER_MULTIFS           29
  191. #define osfscontrol_FS_NUMBER_NFS               33
  192. #define osfscontrol_FS_NUMBER_CDFS              37
  193. #define osfscontrol_FS_NUMBER_DOSFS             43
  194. #define osfscontrol_FS_NUMBER_RESOURCEFS        46
  195. #define osfscontrol_FS_NUMBER_PIPEFS            47
  196. #define osfscontrol_FS_NUMBER_DEVICEFS          53
  197. #define osfscontrol_FS_NUMBER_PARALLEL          54
  198. #define osfscontrol_FS_NUMBER_SHAREFS           99
  199. #define osfscontrol_TYPE_UNTYPED                0x1000u
  200. #define osfscontrol_TYPE_DIR                    0x2000u
  201. #define osfscontrol_TYPE_APPLICATION            0xFFFFFFFFu
  202. #define osfscontrol_OPT_RESTORE_DEFAULT         0
  203. #define osfscontrol_OPT_MESSAGE_LEVEL           1
  204. #define osfscontrol_OPT_BOOT_ACTION             4
  205. #define osfscontrol_COPY_RECURSE                0x1u
  206. #define osfscontrol_COPY_FORCE                  0x2u
  207. #define osfscontrol_COPY_GIVEN_TIMES            0x4u
  208. #define osfscontrol_COPY_CONFIRM                0x8u
  209. #define osfscontrol_COPY_VERBOSE                0x10u
  210. #define osfscontrol_COPY_QUICK                  0x20u
  211. #define osfscontrol_COPY_PROMPT                 0x40u
  212. #define osfscontrol_COPY_DELETE                 0x80u
  213. #define osfscontrol_COPY_ALLOW_PRINT            0x100u
  214. #define osfscontrol_COPY_NO_ATTRIBUTES          0x200u
  215. #define osfscontrol_COPY_STAMP                  0x400u
  216. #define osfscontrol_COPY_STRUCTURE              0x800u
  217. #define osfscontrol_COPY_NEWER                  0x1000u
  218. #define osfscontrol_COPY_GIVEN_DESCRIPTOR       0x2000u
  219. #define osfscontrol_COPY_LOOK                   0x4000u
  220. #define osfscontrol_WIPE_RECURSE                0x1u
  221. #define osfscontrol_WIPE_FORCE                  0x2u
  222. #define osfscontrol_WIPE_GIVEN_TIMES            0x4u
  223. #define osfscontrol_WIPE_CONFIRM                0x8u
  224. #define osfscontrol_WIPE_VERBOSE                0x10u
  225. #define osfscontrol_WIPE_ALLOW_PRINT            0x100u
  226. #define osfscontrol_COUNT_RECURSE               0x1u
  227. #define osfscontrol_COUNT_GIVEN_TIMES           0x4u
  228. #define osfscontrol_COUNT_CONFIRM               0x8u
  229. #define osfscontrol_COUNT_VERBOSE               0x10u
  230. #define osfscontrol_COUNT_ALLOW_PRINT           0x100u
  231. #define osfscontrol_KIND_FREE                   0
  232. #define osfscontrol_KIND_ALLOCATED              1
  233. #define osfscontrol_KIND_FOUND                  2
  234. #define osfscontrol_KIND_SHARABLE               3
  235. #define osfscontrol_DIR_CSD                     0
  236. #define osfscontrol_DIR_PSD                     1
  237. #define osfscontrol_DIR_URD                     2
  238. #define osfscontrol_DIR_LIB                     3
  239.  
  240. /*************************
  241.  * Function declarations *
  242.  *************************/
  243.  
  244. #ifdef __cplusplus
  245.    extern "C" {
  246. #endif
  247.  
  248. /*************************************************************
  249.  * NOTE: The following functions provide direct access to    *
  250.  *       the SWI's noted in the function description.        *
  251.  *       Please read the relevant PRM section for more       *
  252.  *       information on their input/output parameters.       *
  253.  *************************************************************/
  254.  
  255. /* ------------------------------------------------------------------------
  256.  * Function:      osfscontrol_dir()
  257.  *
  258.  * Description:   Sets the current directory (CSD) and (optionally) filing
  259.  *                system
  260.  *
  261.  * Input:         dir_names - value of R1 on entry
  262.  *
  263.  * Other notes:   Calls SWI 0x29 with R0 = 0x0.
  264.  */
  265.  
  266. extern os_error *xosfscontrol_dir (char *dir_names);
  267. extern void osfscontrol_dir (char *dir_names);
  268.  
  269. /* ------------------------------------------------------------------------
  270.  * Function:      osfscontrol_lib()
  271.  *
  272.  * Description:   Sets the library directory (Lib)
  273.  *
  274.  * Input:         dir_names - value of R1 on entry
  275.  *
  276.  * Other notes:   Calls SWI 0x29 with R0 = 0x1.
  277.  */
  278.  
  279. extern os_error *xosfscontrol_lib (char *dir_names);
  280. extern void osfscontrol_lib (char *dir_names);
  281.  
  282. /* ------------------------------------------------------------------------
  283.  * Function:      osfscontrol_start_application()
  284.  *
  285.  * Description:   Informs RISC OS and the current application that a new
  286.  *                application is starting
  287.  *
  288.  * Input:         tail - value of R1 on entry
  289.  *                cao - value of R2 on entry
  290.  *                command - value of R3 on entry
  291.  *
  292.  * Other notes:   Calls SWI 0x29 with R0 = 0x2.
  293.  */
  294.  
  295. extern os_error *xosfscontrol_start_application (char *tail,
  296.       byte *cao,
  297.       char *command);
  298. extern void osfscontrol_start_application (char *tail,
  299.       byte *cao,
  300.       char *command);
  301.  
  302. /* ------------------------------------------------------------------------
  303.  * Function:      osfscontrol_run()
  304.  *
  305.  * Description:   Runs a file
  306.  *
  307.  * Input:         file_names - value of R1 on entry
  308.  *
  309.  * Other notes:   Calls SWI 0x29 with R0 = 0x4.
  310.  */
  311.  
  312. extern os_error *xosfscontrol_run (char *file_names);
  313. extern void osfscontrol_run (char *file_names);
  314.  
  315. /* ------------------------------------------------------------------------
  316.  * Function:      osfscontrol_cat()
  317.  *
  318.  * Description:   Catalogues a directory
  319.  *
  320.  * Input:         dir_names - value of R1 on entry
  321.  *
  322.  * Other notes:   Calls SWI 0x29 with R0 = 0x5.
  323.  */
  324.  
  325. extern os_error *xosfscontrol_cat (char *dir_names);
  326. extern void osfscontrol_cat (char *dir_names);
  327.  
  328. /* ------------------------------------------------------------------------
  329.  * Function:      osfscontrol_ex()
  330.  *
  331.  * Description:   Examines a directory
  332.  *
  333.  * Input:         dir_names - value of R1 on entry
  334.  *
  335.  * Other notes:   Calls SWI 0x29 with R0 = 0x6.
  336.  */
  337.  
  338. extern os_error *xosfscontrol_ex (char *dir_names);
  339. extern void osfscontrol_ex (char *dir_names);
  340.  
  341. /* ------------------------------------------------------------------------
  342.  * Function:      osfscontrol_lcat()
  343.  *
  344.  * Description:   Catalogues the library directory
  345.  *
  346.  * Input:         dir_names - value of R1 on entry
  347.  *
  348.  * Other notes:   Calls SWI 0x29 with R0 = 0x7.
  349.  */
  350.  
  351. extern os_error *xosfscontrol_lcat (char *dir_names);
  352. extern void osfscontrol_lcat (char *dir_names);
  353.  
  354. /* ------------------------------------------------------------------------
  355.  * Function:      osfscontrol_lex()
  356.  *
  357.  * Description:   Examines the library directory
  358.  *
  359.  * Input:         dir_names - value of R1 on entry
  360.  *
  361.  * Other notes:   Calls SWI 0x29 with R0 = 0x8.
  362.  */
  363.  
  364. extern os_error *xosfscontrol_lex (char *dir_names);
  365. extern void osfscontrol_lex (char *dir_names);
  366.  
  367. /* ------------------------------------------------------------------------
  368.  * Function:      osfscontrol_info()
  369.  *
  370.  * Description:   Examines objects
  371.  *
  372.  * Input:         file_names - value of R1 on entry
  373.  *
  374.  * Other notes:   Calls SWI 0x29 with R0 = 0x9.
  375.  */
  376.  
  377. extern os_error *xosfscontrol_info (char *file_names);
  378. extern void osfscontrol_info (char *file_names);
  379.  
  380. /* ------------------------------------------------------------------------
  381.  * Function:      osfscontrol_opt()
  382.  *
  383.  * Description:   Sets filing system options (prefer
  384.  *                OSFSControl_WriteBootOption)
  385.  *
  386.  * Input:         opt - value of R1 on entry
  387.  *                value - value of R2 on entry
  388.  *
  389.  * Other notes:   Calls SWI 0x29 with R0 = 0xA.
  390.  */
  391.  
  392. extern os_error *xosfscontrol_opt (int opt,
  393.       int value);
  394. extern void osfscontrol_opt (int opt,
  395.       int value);
  396.  
  397. /* ------------------------------------------------------------------------
  398.  * Function:      osfscontrol_set_temporary_fs()
  399.  *
  400.  * Description:   Sets the temporary filing system from a named prefix
  401.  *
  402.  * Input:         file_name - value of R1 on entry
  403.  *
  404.  * Output:        file_name_out - value of R1 on exit
  405.  *                old_fs - value of R2 on exit (X version only)
  406.  *                special - value of R3 on exit
  407.  *
  408.  * Returns:       R2 (non-X version only)
  409.  *
  410.  * Other notes:   Calls SWI 0x29 with R0 = 0xB.
  411.  */
  412.  
  413. extern os_error *xosfscontrol_set_temporary_fs (char *file_name,
  414.       char **file_name_out,
  415.       int *old_fs,
  416.       char **special);
  417. extern int osfscontrol_set_temporary_fs (char *file_name,
  418.       char **file_name_out,
  419.       char **special);
  420.  
  421. /* ------------------------------------------------------------------------
  422.  * Function:      osfscontrol_add_fs()
  423.  *
  424.  * Description:   Adds a filing system
  425.  *
  426.  * Input:         module - value of R1 on entry
  427.  *                fs_info_offset - value of R2 on entry
  428.  *                workspace - value of R3 on entry
  429.  *
  430.  * Other notes:   Calls SWI 0x29 with R0 = 0xC.
  431.  */
  432.  
  433. extern os_error *xosfscontrol_add_fs (byte *module,
  434.       int fs_info_offset,
  435.       void *workspace);
  436. extern void osfscontrol_add_fs (byte *module,
  437.       int fs_info_offset,
  438.       void *workspace);
  439.  
  440. /* ------------------------------------------------------------------------
  441.  * Function:      osfscontrol_lookup_fs()
  442.  *
  443.  * Description:   Checks for the presence of a filing system
  444.  *
  445.  * Input:         fs - value of R1 on entry
  446.  *                control_terminated - value of R2 on entry
  447.  *
  448.  * Output:        fs_out - value of R1 on exit
  449.  *                fs_found - value of R2 on exit (X version only)
  450.  *
  451.  * Returns:       R2 (non-X version only)
  452.  *
  453.  * Other notes:   Calls SWI 0x29 with R0 = 0xD.
  454.  */
  455.  
  456. extern os_error *xosfscontrol_lookup_fs (osfscontrol_id fs,
  457.       bool control_terminated,
  458.       int *fs_out,
  459.       bool *fs_found);
  460. extern bool osfscontrol_lookup_fs (osfscontrol_id fs,
  461.       bool control_terminated,
  462.       int *fs_out);
  463.  
  464. /* ------------------------------------------------------------------------
  465.  * Function:      osfscontrol_select_fs()
  466.  *
  467.  * Description:   Switches the current and temporary filing systems to the
  468.  *                one specified
  469.  *
  470.  * Input:         fs - value of R1 on entry
  471.  *
  472.  * Other notes:   Calls SWI 0x29 with R0 = 0xE.
  473.  */
  474.  
  475. extern os_error *xosfscontrol_select_fs (osfscontrol_id fs);
  476. extern void osfscontrol_select_fs (osfscontrol_id fs);
  477.  
  478. /* ------------------------------------------------------------------------
  479.  * Function:      osfscontrol_boot_from_fs()
  480.  *
  481.  * Description:   Boots off the currently selected filing system
  482.  *
  483.  * Other notes:   Calls SWI 0x29 with R0 = 0xF.
  484.  */
  485.  
  486. extern os_error *xosfscontrol_boot_from_fs (void);
  487. extern void osfscontrol_boot_from_fs (void);
  488.  
  489. /* ------------------------------------------------------------------------
  490.  * Function:      osfscontrol_remove_fs()
  491.  *
  492.  * Description:   Removes a filing system
  493.  *
  494.  * Input:         fs - value of R1 on entry
  495.  *
  496.  * Other notes:   Calls SWI 0x29 with R0 = 0x10.
  497.  */
  498.  
  499. extern os_error *xosfscontrol_remove_fs (char *fs);
  500. extern void osfscontrol_remove_fs (char *fs);
  501.  
  502. /* ------------------------------------------------------------------------
  503.  * Function:      osfscontrol_add_secondary_fs()
  504.  *
  505.  * Description:   Adds a secondary module
  506.  *
  507.  * Input:         fs - value of R1 on entry
  508.  *                secondary_name - value of R2 on entry
  509.  *                workspace - value of R3 on entry
  510.  *
  511.  * Other notes:   Calls SWI 0x29 with R0 = 0x11.
  512.  */
  513.  
  514. extern os_error *xosfscontrol_add_secondary_fs (osfscontrol_id fs,
  515.       char *secondary_name,
  516.       void *workspace);
  517. extern void osfscontrol_add_secondary_fs (osfscontrol_id fs,
  518.       char *secondary_name,
  519.       void *workspace);
  520.  
  521. /* ------------------------------------------------------------------------
  522.  * Function:      osfscontrol_read_file_type()
  523.  *
  524.  * Description:   Decodes a file type into text
  525.  *
  526.  * Input:         file_type - value of R2 on entry
  527.  *
  528.  * Output:        name1 - value of R2 on exit
  529.  *                name2 - value of R3 on exit
  530.  *
  531.  * Other notes:   Calls SWI 0x29 with R0 = 0x12.
  532.  */
  533.  
  534. extern os_error *xosfscontrol_read_file_type (bits file_type,
  535.       bits *name1,
  536.       bits *name2);
  537. extern void osfscontrol_read_file_type (bits file_type,
  538.       bits *name1,
  539.       bits *name2);
  540.  
  541. /* ------------------------------------------------------------------------
  542.  * Function:      osfscontrol_restore_current()
  543.  *
  544.  * Description:   Restore the current filing system after
  545.  *                OSFSControl_SetTemporaryFS
  546.  *
  547.  * Other notes:   Calls SWI 0x29 with R0 = 0x13.
  548.  */
  549.  
  550. extern os_error *xosfscontrol_restore_current (void);
  551. extern void osfscontrol_restore_current (void);
  552.  
  553. /* ------------------------------------------------------------------------
  554.  * Function:      osfscontrol_read_module_base()
  555.  *
  556.  * Description:   Reads location of primary module for temporary filing
  557.  *                system
  558.  *
  559.  * Output:        module - value of R1 on exit
  560.  *                workspace - value of R2 on exit
  561.  *
  562.  * Other notes:   Calls SWI 0x29 with R0 = 0x14.
  563.  */
  564.  
  565. extern os_error *xosfscontrol_read_module_base (byte **module,
  566.       void **workspace);
  567. extern void osfscontrol_read_module_base (byte **module,
  568.       void **workspace);
  569.  
  570. /* ------------------------------------------------------------------------
  571.  * Function:      osfscontrol_read_fs_handle()
  572.  *
  573.  * Description:   Returns a fiing system file handle
  574.  *
  575.  * Input:         file - value of R1 on entry
  576.  *
  577.  * Output:        fs_handle - value of R1 on exit (X version only)
  578.  *                info_word - value of R2 on exit
  579.  *
  580.  * Returns:       R1 (non-X version only)
  581.  *
  582.  * Other notes:   Calls SWI 0x29 with R0 = 0x15.
  583.  */
  584.  
  585. extern os_error *xosfscontrol_read_fs_handle (os_f file,
  586.       int *fs_handle,
  587.       int *info_word);
  588. extern int osfscontrol_read_fs_handle (os_f file,
  589.       int *info_word);
  590.  
  591. /* ------------------------------------------------------------------------
  592.  * Function:      osfscontrol_shut()
  593.  *
  594.  * Description:   Closes all open files on all filing systems
  595.  *
  596.  * Other notes:   Calls SWI 0x29 with R0 = 0x16.
  597.  */
  598.  
  599. extern os_error *xosfscontrol_shut (void);
  600. extern void osfscontrol_shut (void);
  601.  
  602. /* ------------------------------------------------------------------------
  603.  * Function:      osfscontrol_shutdown()
  604.  *
  605.  * Description:   Shuts down all filing systems
  606.  *
  607.  * Other notes:   Calls SWI 0x29 with R0 = 0x17.
  608.  */
  609.  
  610. extern os_error *xosfscontrol_shutdown (void);
  611. extern void osfscontrol_shutdown (void);
  612.  
  613. /* ------------------------------------------------------------------------
  614.  * Function:      osfscontrol_access()
  615.  *
  616.  * Description:   Sets the attributes of objects
  617.  *
  618.  * Input:         file_names - value of R1 on entry
  619.  *                access - value of R2 on entry
  620.  *
  621.  * Other notes:   Calls SWI 0x29 with R0 = 0x18.
  622.  */
  623.  
  624. extern os_error *xosfscontrol_access (char *file_names,
  625.       char *access);
  626. extern void osfscontrol_access (char *file_names,
  627.       char *access);
  628.  
  629. /* ------------------------------------------------------------------------
  630.  * Function:      osfscontrol_rename()
  631.  *
  632.  * Description:   Renames objects
  633.  *
  634.  * Input:         file_name - value of R1 on entry
  635.  *                new_file_name - value of R2 on entry
  636.  *
  637.  * Other notes:   Calls SWI 0x29 with R0 = 0x19.
  638.  */
  639.  
  640. extern os_error *xosfscontrol_rename (char *file_name,
  641.       char *new_file_name);
  642. extern void osfscontrol_rename (char *file_name,
  643.       char *new_file_name);
  644.  
  645. /* ------------------------------------------------------------------------
  646.  * Function:      osfscontrol_copy()
  647.  *
  648.  * Description:   Copies objects
  649.  *
  650.  * Input:         from - value of R1 on entry
  651.  *                to - value of R2 on entry
  652.  *                flags - value of R3 on entry
  653.  *                start_load - value of R4 on entry
  654.  *                start_exec - value of R5 on entry
  655.  *                end_load - value of R6 on entry
  656.  *                end_exec - value of R7 on entry
  657.  *                descriptor - value of R8 on entry
  658.  *
  659.  * Other notes:   Calls SWI 0x29 with R0 = 0x1A.
  660.  */
  661.  
  662. extern os_error *xosfscontrol_copy (char *from,
  663.       char *to,
  664.       bits flags,
  665.       bits start_load,
  666.       bits start_exec,
  667.       bits end_load,
  668.       bits end_exec,
  669.       osfscontrol_descriptor *descriptor);
  670. extern void osfscontrol_copy (char *from,
  671.       char *to,
  672.       bits flags,
  673.       bits start_load,
  674.       bits start_exec,
  675.       bits end_load,
  676.       bits end_exec,
  677.       osfscontrol_descriptor *descriptor);
  678.  
  679. /* ------------------------------------------------------------------------
  680.  * Function:      osfscontrol_wipe()
  681.  *
  682.  * Description:   Wipes objects
  683.  *
  684.  * Input:         file_names - value of R1 on entry
  685.  *                flags - value of R3 on entry
  686.  *                start_load - value of R4 on entry
  687.  *                start_exec - value of R5 on entry
  688.  *                end_load - value of R6 on entry
  689.  *                end_exec - value of R7 on entry
  690.  *
  691.  * Other notes:   Calls SWI 0x29 with R0 = 0x1B.
  692.  */
  693.  
  694. extern os_error *xosfscontrol_wipe (char *file_names,
  695.       bits flags,
  696.       bits start_load,
  697.       bits start_exec,
  698.       bits end_load,
  699.       bits end_exec);
  700. extern void osfscontrol_wipe (char *file_names,
  701.       bits flags,
  702.       bits start_load,
  703.       bits start_exec,
  704.       bits end_load,
  705.       bits end_exec);
  706.  
  707. /* ------------------------------------------------------------------------
  708.  * Function:      osfscontrol_count()
  709.  *
  710.  * Description:   Counts objects
  711.  *
  712.  * Input:         file_names - value of R1 on entry
  713.  *                flags - value of R3 on entry
  714.  *                start_load - value of R4 on entry
  715.  *                start_exec - value of R5 on entry
  716.  *                end_load - value of R6 on entry
  717.  *                end_exec - value of R7 on entry
  718.  *
  719.  * Other notes:   Calls SWI 0x29 with R0 = 0x1C.
  720.  */
  721.  
  722. extern os_error *xosfscontrol_count (char *file_names,
  723.       bits flags,
  724.       bits start_load,
  725.       bits start_exec,
  726.       bits end_load,
  727.       bits end_exec);
  728. extern void osfscontrol_count (char *file_names,
  729.       bits flags,
  730.       bits start_load,
  731.       bits start_exec,
  732.       bits end_load,
  733.       bits end_exec);
  734.  
  735. /* ------------------------------------------------------------------------
  736.  * Function:      osfscontrol_read_secondary_fs()
  737.  *
  738.  * Description:   Reads location of secondary module for temporary filing
  739.  *                system
  740.  *
  741.  * Output:        module - value of R1 on exit
  742.  *                workspace - value of R2 on exit
  743.  *
  744.  * Other notes:   Calls SWI 0x29 with R0 = 0x1E.
  745.  */
  746.  
  747. extern os_error *xosfscontrol_read_secondary_fs (byte **module,
  748.       void **workspace);
  749. extern void osfscontrol_read_secondary_fs (byte **module,
  750.       void **workspace);
  751.  
  752. /* ------------------------------------------------------------------------
  753.  * Function:      osfscontrol_file_type_from_string()
  754.  *
  755.  * Description:   Converts a string giving a file type to a number
  756.  *
  757.  * Input:         file_type_name - value of R1 on entry
  758.  *
  759.  * Output:        file_type - value of R2 on exit (X version only)
  760.  *
  761.  * Returns:       R2 (non-X version only)
  762.  *
  763.  * Other notes:   Calls SWI 0x29 with R0 = 0x1F.
  764.  */
  765.  
  766. extern os_error *xosfscontrol_file_type_from_string (char *file_type_name,
  767.       bits *file_type);
  768. extern bits osfscontrol_file_type_from_string (char *file_type_name);
  769.  
  770. /* ------------------------------------------------------------------------
  771.  * Function:      osfscontrol_file_info()
  772.  *
  773.  * Description:   Outputs a list of object names and information
  774.  *
  775.  * Input:         file_names - value of R1 on entry
  776.  *
  777.  * Other notes:   Calls SWI 0x29 with R0 = 0x20.
  778.  */
  779.  
  780. extern os_error *xosfscontrol_file_info (char *file_names);
  781. extern void osfscontrol_file_info (char *file_names);
  782.  
  783. /* ------------------------------------------------------------------------
  784.  * Function:      osfscontrol_read_fs_name()
  785.  *
  786.  * Description:   Converts a filing system number to a filing system name
  787.  *
  788.  * Input:         fs - value of R1 on entry
  789.  *                buffer - value of R2 on entry
  790.  *                size - value of R3 on entry
  791.  *
  792.  * Other notes:   Calls SWI 0x29 with R0 = 0x21.
  793.  */
  794.  
  795. extern os_error *xosfscontrol_read_fs_name (int fs,
  796.       char *buffer,
  797.       int size);
  798. extern void osfscontrol_read_fs_name (int fs,
  799.       char *buffer,
  800.       int size);
  801.  
  802. /* ------------------------------------------------------------------------
  803.  * Function:      osfscontrol_register_image_fs()
  804.  *
  805.  * Description:   Adds an image filing system
  806.  *
  807.  * Input:         module - value of R1 on entry
  808.  *                fs_info_offset - value of R2 on entry
  809.  *                workspace - value of R3 on entry
  810.  *
  811.  * Other notes:   Calls SWI 0x29 with R0 = 0x23.
  812.  */
  813.  
  814. extern os_error *xosfscontrol_register_image_fs (byte *module,
  815.       int fs_info_offset,
  816.       void *workspace);
  817. extern void osfscontrol_register_image_fs (byte *module,
  818.       int fs_info_offset,
  819.       void *workspace);
  820.  
  821. /* ------------------------------------------------------------------------
  822.  * Function:      osfscontrol_deregister_image_fs()
  823.  *
  824.  * Description:   Removes an image filing system
  825.  *
  826.  * Input:         file_type - value of R1 on entry
  827.  *
  828.  * Other notes:   Calls SWI 0x29 with R0 = 0x24.
  829.  */
  830.  
  831. extern os_error *xosfscontrol_deregister_image_fs (bits file_type);
  832. extern void osfscontrol_deregister_image_fs (bits file_type);
  833.  
  834. /* ------------------------------------------------------------------------
  835.  * Function:      osfscontrol_canonicalise_path()
  836.  *
  837.  * Description:   Converts a path name to a canonical form
  838.  *
  839.  * Input:         path_name - value of R1 on entry
  840.  *                buffer - value of R2 on entry
  841.  *                var - value of R3 on entry
  842.  *                path - value of R4 on entry
  843.  *                size - value of R5 on entry
  844.  *
  845.  * Output:        spare - value of R5 on exit
  846.  *
  847.  * Other notes:   Calls SWI 0x29 with R0 = 0x25.
  848.  */
  849.  
  850. extern os_error *xosfscontrol_canonicalise_path (char *path_name,
  851.       char *buffer,
  852.       char *var,
  853.       char *path,
  854.       int size,
  855.       int *spare);
  856. extern void osfscontrol_canonicalise_path (char *path_name,
  857.       char *buffer,
  858.       char *var,
  859.       char *path,
  860.       int size,
  861.       int *spare);
  862.  
  863. /* ------------------------------------------------------------------------
  864.  * Function:      osfscontrol_info_to_file_type()
  865.  *
  866.  * Description:   Converts file information to an object's file type
  867.  *
  868.  * Input:         file_name - value of R1 on entry
  869.  *                load_addr - value of R2 on entry
  870.  *                exec_addr - value of R3 on entry
  871.  *                size - value of R4 on entry
  872.  *                attr - value of R5 on entry
  873.  *                obj_type - value of R6 on entry
  874.  *
  875.  * Output:        file_type - value of R2 on exit (X version only)
  876.  *
  877.  * Returns:       R2 (non-X version only)
  878.  *
  879.  * Other notes:   Calls SWI 0x29 with R0 = 0x26.
  880.  */
  881.  
  882. extern os_error *xosfscontrol_info_to_file_type (char *file_name,
  883.       bits load_addr,
  884.       bits exec_addr,
  885.       int size,
  886.       bits attr,
  887.       int obj_type,
  888.       bits *file_type);
  889. extern bits osfscontrol_info_to_file_type (char *file_name,
  890.       bits load_addr,
  891.       bits exec_addr,
  892.       int size,
  893.       bits attr,
  894.       int obj_type);
  895.  
  896. /* ------------------------------------------------------------------------
  897.  * Function:      osfscontrol_urd()
  898.  *
  899.  * Description:   Sets the user root directory (URD)
  900.  *
  901.  * Input:         dir_name - value of R1 on entry
  902.  *
  903.  * Other notes:   Calls SWI 0x29 with R0 = 0x27.
  904.  */
  905.  
  906. extern os_error *xosfscontrol_urd (char *dir_name);
  907. extern void osfscontrol_urd (char *dir_name);
  908.  
  909. /* ------------------------------------------------------------------------
  910.  * Function:      osfscontrol_back()
  911.  *
  912.  * Description:   Exchanges the current and previous (PSD) directories
  913.  *
  914.  * Other notes:   Calls SWI 0x29 with R0 = 0x28.
  915.  */
  916.  
  917. extern os_error *xosfscontrol_back (void);
  918. extern void osfscontrol_back (void);
  919.  
  920. /* ------------------------------------------------------------------------
  921.  * Function:      osfscontrol_defect_list()
  922.  *
  923.  * Description:   Returns the defect list for an image
  924.  *
  925.  * Input:         image_name - value of R1 on entry
  926.  *                buffer - value of R2 on entry
  927.  *                size - value of R3 on entry
  928.  *
  929.  * Other notes:   Calls SWI 0x29 with R0 = 0x29.
  930.  */
  931.  
  932. extern os_error *xosfscontrol_defect_list (char *image_name,
  933.       byte *buffer,
  934.       int size);
  935. extern void osfscontrol_defect_list (char *image_name,
  936.       byte *buffer,
  937.       int size);
  938.  
  939. /* ------------------------------------------------------------------------
  940.  * Function:      osfscontrol_add_defect()
  941.  *
  942.  * Description:   Maps out a defect from an image
  943.  *
  944.  * Input:         image_name - value of R1 on entry
  945.  *                offset - value of R2 on entry
  946.  *
  947.  * Other notes:   Calls SWI 0x29 with R0 = 0x2A.
  948.  */
  949.  
  950. extern os_error *xosfscontrol_add_defect (char *image_name,
  951.       int offset);
  952. extern void osfscontrol_add_defect (char *image_name,
  953.       int offset);
  954.  
  955. /* ------------------------------------------------------------------------
  956.  * Function:      osfscontrol_no_dir()
  957.  *
  958.  * Description:   Unsets the current directory (CSD)
  959.  *
  960.  * Other notes:   Calls SWI 0x29 with R0 = 0x2B.
  961.  */
  962.  
  963. extern os_error *xosfscontrol_no_dir (void);
  964. extern void osfscontrol_no_dir (void);
  965.  
  966. /* ------------------------------------------------------------------------
  967.  * Function:      osfscontrol_no_urd()
  968.  *
  969.  * Description:   Unsets the user root directory (URD)
  970.  *
  971.  * Other notes:   Calls SWI 0x29 with R0 = 0x2C.
  972.  */
  973.  
  974. extern os_error *xosfscontrol_no_urd (void);
  975. extern void osfscontrol_no_urd (void);
  976.  
  977. /* ------------------------------------------------------------------------
  978.  * Function:      osfscontrol_no_lib()
  979.  *
  980.  * Description:   Unsets the library directory (Lib)
  981.  *
  982.  * Other notes:   Calls SWI 0x29 with R0 = 0x2D.
  983.  */
  984.  
  985. extern os_error *xosfscontrol_no_lib (void);
  986. extern void osfscontrol_no_lib (void);
  987.  
  988. /* ------------------------------------------------------------------------
  989.  * Function:      osfscontrol_used_space_map()
  990.  *
  991.  * Description:   Returns an image file's used space map
  992.  *
  993.  * Input:         image_name - value of R1 on entry
  994.  *                buffer - value of R2 on entry
  995.  *                size - value of R3 on entry
  996.  *
  997.  * Other notes:   Calls SWI 0x29 with R0 = 0x2E.
  998.  */
  999.  
  1000. extern os_error *xosfscontrol_used_space_map (char *image_name,
  1001.       byte *buffer,
  1002.       int size);
  1003. extern void osfscontrol_used_space_map (char *image_name,
  1004.       byte *buffer,
  1005.       int size);
  1006.  
  1007. /* ------------------------------------------------------------------------
  1008.  * Function:      osfscontrol_read_boot_option()
  1009.  *
  1010.  * Description:   Reads the boot option of the disc or image file that
  1011.  *                holds a specified object
  1012.  *
  1013.  * Input:         file_name - value of R1 on entry
  1014.  *
  1015.  * Output:        boot_option - value of R2 on exit (X version only)
  1016.  *
  1017.  * Returns:       R2 (non-X version only)
  1018.  *
  1019.  * Other notes:   Calls SWI 0x29 with R0 = 0x2F.
  1020.  */
  1021.  
  1022. extern os_error *xosfscontrol_read_boot_option (char *file_name,
  1023.       int *boot_option);
  1024. extern int osfscontrol_read_boot_option (char *file_name);
  1025.  
  1026. /* ------------------------------------------------------------------------
  1027.  * Function:      osfscontrol_write_boot_option()
  1028.  *
  1029.  * Description:   Writes the boot option of the disc or image file that
  1030.  *                holds a specified object
  1031.  *
  1032.  * Input:         file_name - value of R1 on entry
  1033.  *                boot_option - value of R2 on entry
  1034.  *
  1035.  * Other notes:   Calls SWI 0x29 with R0 = 0x30.
  1036.  */
  1037.  
  1038. extern os_error *xosfscontrol_write_boot_option (char *file_name,
  1039.       int boot_option);
  1040. extern void osfscontrol_write_boot_option (char *file_name,
  1041.       int boot_option);
  1042.  
  1043. /* ------------------------------------------------------------------------
  1044.  * Function:      osfscontrol_free_space()
  1045.  *
  1046.  * Description:   Reads the free space on the disc or image file that holds
  1047.  *                a specified object
  1048.  *
  1049.  * Input:         file_name - value of R1 on entry
  1050.  *
  1051.  * Output:        free - value of R0 on exit (X version only)
  1052.  *                max - value of R1 on exit
  1053.  *                size - value of R2 on exit
  1054.  *
  1055.  * Returns:       R0 (non-X version only)
  1056.  *
  1057.  * Other notes:   Calls SWI 0x29 with R0 = 0x31.
  1058.  */
  1059.  
  1060. extern os_error *xosfscontrol_free_space (char *file_name,
  1061.       int *free,
  1062.       int *max,
  1063.       int *size);
  1064. extern int osfscontrol_free_space (char *file_name,
  1065.       int *max,
  1066.       int *size);
  1067.  
  1068. /* ------------------------------------------------------------------------
  1069.  * Function:      osfscontrol_name_disc()
  1070.  *
  1071.  * Description:   Names the disc or image file that holds a specified
  1072.  *                object
  1073.  *
  1074.  * Input:         file_name - value of R1 on entry
  1075.  *                disc_name - value of R2 on entry
  1076.  *
  1077.  * Other notes:   Calls SWI 0x29 with R0 = 0x32.
  1078.  */
  1079.  
  1080. extern os_error *xosfscontrol_name_disc (char *file_name,
  1081.       char *disc_name);
  1082. extern void osfscontrol_name_disc (char *file_name,
  1083.       char *disc_name);
  1084.  
  1085. /* ------------------------------------------------------------------------
  1086.  * Function:      osfscontrol_stamp_image()
  1087.  *
  1088.  * Description:   Used by a handler of discs to request that an image stamp
  1089.  *                be updated
  1090.  *
  1091.  * Input:         file_name - value of R1 on entry
  1092.  *                stamp_now - value of R2 on entry
  1093.  *
  1094.  * Other notes:   Calls SWI 0x29 with R0 = 0x33.
  1095.  */
  1096.  
  1097. extern os_error *xosfscontrol_stamp_image (char *file_name,
  1098.       bool stamp_now);
  1099. extern void osfscontrol_stamp_image (char *file_name,
  1100.       bool stamp_now);
  1101.  
  1102. /* ------------------------------------------------------------------------
  1103.  * Function:      osfscontrol_object_at_offset()
  1104.  *
  1105.  * Description:   Finds the name and kind of an object that uses a
  1106.  *                particular offset within an image
  1107.  *
  1108.  * Input:         file_name - value of R1 on entry
  1109.  *                offset - value of R2 on entry
  1110.  *                buffer - value of R3 on entry
  1111.  *                size - value of R4 on entry
  1112.  *
  1113.  * Output:        obj_kind - value of R2 on exit (X version only)
  1114.  *
  1115.  * Returns:       R2 (non-X version only)
  1116.  *
  1117.  * Other notes:   Calls SWI 0x29 with R0 = 0x34.
  1118.  */
  1119.  
  1120. extern os_error *xosfscontrol_object_at_offset (char *file_name,
  1121.       int offset,
  1122.       char *buffer,
  1123.       int size,
  1124.       int *obj_kind);
  1125. extern int osfscontrol_object_at_offset (char *file_name,
  1126.       int offset,
  1127.       char *buffer,
  1128.       int size);
  1129.  
  1130. /* ------------------------------------------------------------------------
  1131.  * Function:      osfscontrol_set_dir()
  1132.  *
  1133.  * Description:   Sets a specified directory to a given path without
  1134.  *                verification
  1135.  *
  1136.  * Input:         path - value of R1 on entry
  1137.  *                set - value of R2 on entry
  1138.  *                fs - value of R3 on entry
  1139.  *                special - value of R6 on entry
  1140.  *
  1141.  * Other notes:   Calls SWI 0x29 with R0 = 0x35.
  1142.  */
  1143.  
  1144. extern os_error *xosfscontrol_set_dir (char *path,
  1145.       int set,
  1146.       char *fs,
  1147.       char *special);
  1148. extern void osfscontrol_set_dir (char *path,
  1149.       int set,
  1150.       char *fs,
  1151.       char *special);
  1152.  
  1153. /* ------------------------------------------------------------------------
  1154.  * Function:      osfscontrol_read_dir()
  1155.  *
  1156.  * Description:   Reads the path of a specified directory
  1157.  *
  1158.  * Input:         buffer - value of R1 on entry
  1159.  *                set - value of R2 on entry
  1160.  *                fs - value of R3 on entry
  1161.  *                size - value of R5 on entry
  1162.  *
  1163.  * Output:        spare - value of R5 on exit
  1164.  *                special - value of R6 on exit
  1165.  *
  1166.  * Other notes:   Calls SWI 0x29 with R0 = 0x36.
  1167.  */
  1168.  
  1169. extern os_error *xosfscontrol_read_dir (char *buffer,
  1170.       int set,
  1171.       char *fs,
  1172.       int size,
  1173.       int *spare,
  1174.       char **special);
  1175. extern void osfscontrol_read_dir (char *buffer,
  1176.       int set,
  1177.       char *fs,
  1178.       int size,
  1179.       int *spare,
  1180.       char **special);
  1181.  
  1182. /* ------------------------------------------------------------------------
  1183.  * Function:      upcall_media_not_present()
  1184.  *
  1185.  * Description:   Warns your program that a filing medium is not present
  1186.  *
  1187.  * Input:         fs_no - value of R1 on entry
  1188.  *                media_name - value of R2 on entry
  1189.  *                device_no - value of R3 on entry
  1190.  *                iteration_count - value of R4 on entry
  1191.  *                timeout - value of R5 on entry
  1192.  *                media_type - value of R6 on entry
  1193.  *
  1194.  * Output:        changed - value of R0 on exit (X version only)
  1195.  *
  1196.  * Returns:       R0 (non-X version only)
  1197.  *
  1198.  * Other notes:   Calls SWI 0x33 with R0 = 0x1.
  1199.  */
  1200.  
  1201. extern os_error *xupcall_media_not_present (int fs_no,
  1202.       char *media_name,
  1203.       int device_no,
  1204.       int iteration_count,
  1205.       int timeout,
  1206.       char *media_type,
  1207.       int *changed);
  1208. extern int upcall_media_not_present (int fs_no,
  1209.       char *media_name,
  1210.       int device_no,
  1211.       int iteration_count,
  1212.       int timeout,
  1213.       char *media_type);
  1214.  
  1215. /* ------------------------------------------------------------------------
  1216.  * Function:      upcall_media_not_known()
  1217.  *
  1218.  * Description:   Warns your program that a filing medium is not known
  1219.  *
  1220.  * Input:         fs_no - value of R1 on entry
  1221.  *                media_name - value of R2 on entry
  1222.  *                device_no - value of R3 on entry
  1223.  *                iteration_count - value of R4 on entry
  1224.  *                timeout - value of R5 on entry
  1225.  *                media_type - value of R6 on entry
  1226.  *
  1227.  * Output:        changed - value of R0 on exit (X version only)
  1228.  *
  1229.  * Returns:       R0 (non-X version only)
  1230.  *
  1231.  * Other notes:   Calls SWI 0x33 with R0 = 0x2.
  1232.  */
  1233.  
  1234. extern os_error *xupcall_media_not_known (int fs_no,
  1235.       char *media_name,
  1236.       int device_no,
  1237.       int iteration_count,
  1238.       int timeout,
  1239.       char *media_type,
  1240.       int *changed);
  1241. extern int upcall_media_not_known (int fs_no,
  1242.       char *media_name,
  1243.       int device_no,
  1244.       int iteration_count,
  1245.       int timeout,
  1246.       char *media_type);
  1247.  
  1248. /* ------------------------------------------------------------------------
  1249.  * Function:      upcallfscontrol_set_args_size()
  1250.  *
  1251.  * Description:   Warns your program that a file's size is being ensured
  1252.  *
  1253.  * Input:         f - value of R1 on entry
  1254.  *                size - value of R2 on entry
  1255.  *                fs_info - value of R8 on entry
  1256.  *
  1257.  * Other notes:   Calls SWI 0x33 with R0 = 0x3, R9 = 0x200.
  1258.  */
  1259.  
  1260. extern os_error *xupcallfscontrol_set_args_size (os_f f,
  1261.       int size,
  1262.       bits fs_info);
  1263. extern void upcallfscontrol_set_args_size (os_f f,
  1264.       int size,
  1265.       bits fs_info);
  1266.  
  1267. /* ------------------------------------------------------------------------
  1268.  * Function:      upcallfscontrol_rename()
  1269.  *
  1270.  * Description:   Warns your program that a file is being renamed
  1271.  *
  1272.  * Input:         file_name - value of R1 on entry
  1273.  *                new_file_name - value of R2 on entry
  1274.  *                special - value of R6 on entry
  1275.  *                new_special - value of R7 on entry
  1276.  *                fs_info - value of R8 on entry
  1277.  *
  1278.  * Other notes:   Calls SWI 0x33 with R0 = 0x3, R9 = 0x208.
  1279.  */
  1280.  
  1281. extern os_error *xupcallfscontrol_rename (char *file_name,
  1282.       char *new_file_name,
  1283.       char *special,
  1284.       char *new_special,
  1285.       bits fs_info);
  1286. extern void upcallfscontrol_rename (char *file_name,
  1287.       char *new_file_name,
  1288.       char *special,
  1289.       char *new_special,
  1290.       bits fs_info);
  1291.  
  1292. /* ------------------------------------------------------------------------
  1293.  * Function:      upcallfscontrol_set_attr_string()
  1294.  *
  1295.  * Description:   Warns your program that a file's attributes are being set
  1296.  *
  1297.  * Input:         file_name - value of R1 on entry
  1298.  *                attr - value of R2 on entry
  1299.  *                special - value of R6 on entry
  1300.  *                fs_info - value of R8 on entry
  1301.  *
  1302.  * Other notes:   Calls SWI 0x33 with R0 = 0x3, R9 = 0x209.
  1303.  */
  1304.  
  1305. extern os_error *xupcallfscontrol_set_attr_string (char *file_name,
  1306.       char *attr,
  1307.       char *special,
  1308.       bits fs_info);
  1309. extern void upcallfscontrol_set_attr_string (char *file_name,
  1310.       char *attr,
  1311.       char *special,
  1312.       bits fs_info);
  1313.  
  1314. /* ------------------------------------------------------------------------
  1315.  * Function:      upcall_media_search_end()
  1316.  *
  1317.  * Description:   Informs your program that a missing filing medium has
  1318.  *                been supplied, or that an operation involving one has
  1319.  *                been cancelled
  1320.  *
  1321.  * Other notes:   Calls SWI 0x33 with R0 = 0x4.
  1322.  */
  1323.  
  1324. extern os_error *xupcall_media_search_end (void);
  1325. extern void upcall_media_search_end (void);
  1326.  
  1327. /* ------------------------------------------------------------------------
  1328.  * Function:      upcall_new_application()
  1329.  *
  1330.  * Description:   Warns your program that a new application is going to be
  1331.  *                started
  1332.  *
  1333.  * Input:         cao - value of R2 on entry
  1334.  *
  1335.  * Output:        started - value of R0 on exit (X version only)
  1336.  *
  1337.  * Returns:       R0 (non-X version only)
  1338.  *
  1339.  * Other notes:   Calls SWI 0x33 with R0 = 0x100.
  1340.  */
  1341.  
  1342. extern os_error *xupcall_new_application (byte *cao,
  1343.       bool *started);
  1344. extern bool upcall_new_application (byte *cao);
  1345.  
  1346. #ifdef __cplusplus
  1347.    }
  1348. #endif
  1349.  
  1350. #endif
  1351.