From: <to...@us...> - 2004-01-14 18:10:59
|
Update of /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib In directory sc8-pr-cvs1:/tmp/cvs-serv31394/!OsLib/Tools/oslib Modified Files: Tag: unix-build osfile.h Log Message: Unix Build Index: osfile.h =================================================================== RCS file: /cvsroot/ro-oslib/OSLib/!OsLib/Tools/oslib/Attic/osfile.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** osfile.h 14 Jan 2004 13:33:16 -0000 1.1.2.1 --- osfile.h 14 Jan 2004 18:10:55 -0000 1.1.2.2 *************** *** 98,104 **** --- 98,317 ---- #ifdef EXECUTE_ON_UNIX + /* ------------------------------------------------------------------------ + * Function: osfile_set_type() + * + * Description: Writes the file type for an object + * + * Input: file_name - value of R1 on entry + * file_type - value of R2 on entry + * + * Other notes: Calls SWI 0x8 with R0 = 0x12. + */ + + extern os_error *xosfile_set_type (char const *file_name, + bits file_type); + + extern void osfile_set_type (char const *file_name, + bits file_type); + + /* ------------------------------------------------------------------------ + * Function: osfile_create_dir() + * + * Description: Creates a directory + * + * Input: dir_name - value of R1 on entry + * entry_count - value of R4 on entry + * + * Other notes: Calls SWI 0x8 with R0 = 0x8. + */ + extern os_error *xosfile_create_dir(char const *, int); extern void osfile_create_dir(char const *, int); + /* ------------------------------------------------------------------------ + * Function: osfile_create() + * + * Description: Creates an empty untyped file - prefer + * OSFile_CreateStamped + * + * Input: file_name - value of R1 on entry + * load_addr - value of R2 on entry + * exec_addr - value of R3 on entry + * size - value of R5 on entry + * + * Other notes: Calls SWI 0x8 with R0 = 0x7, R4 = 0x0. + */ + + extern os_error *xosfile_create (char const *file_name, + bits load_addr, + bits exec_addr, + int size); + + extern void osfile_create (char const *file_name, + bits load_addr, + bits exec_addr, + int size); + + /* ------------------------------------------------------------------------ + * Function: osfile_read_stamped() + * + * Description: Reads catalogue information and file type for an object + * using the directory list in File$Path + * + * Input: file_name - value of R1 on entry + * + * Output: obj_type - value of R0 on exit (X version only) + * load_addr - value of R2 on exit + * exec_addr - value of R3 on exit + * size - value of R4 on exit + * attr - value of R5 on exit + * file_type - value of R6 on exit + * + * Returns: R0 (non-X version only) + * + * Other notes: Calls SWI 0x8 with R0 = 0x14. + */ + + os_error *xosfile_read_stamped (char const *file_name, + fileswitch_object_type *obj_type, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr, + bits *file_type); + + fileswitch_object_type osfile_read_stamped (char const *file_name, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr, + bits *file_type); + + /* ------------------------------------------------------------------------ + * Function: osfile_load_stamped() + * + * Description: Loads a file using the directory list in File$Path + * + * Input: file_name - value of R1 on entry + * addr - value of R2 on entry + * + * Output: obj_type - value of R0 on exit (X version only) + * load_addr - value of R2 on exit + * exec_addr - value of R3 on exit + * size - value of R4 on exit + * attr - value of R5 on exit + * + * Returns: R0 (non-X version only) + * + * Other notes: Calls SWI 0x8 with R0 = 0xFF, R3 = 0x0. + */ + + os_error *xosfile_load_stamped (char const *file_name, + byte *addr, + fileswitch_object_type *obj_type, + bits *load_addr, + bits *exec_addr, + int *size_, + fileswitch_attr *attr); + + fileswitch_object_type osfile_load_stamped (char const *file_name, + byte *addr, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr); + + /* ------------------------------------------------------------------------ + * Function: osfile_load_stamped_no_path() + * + * Description: Calls OS_File 16 to load a file + * + * Input: file_name - value of R1 on entry + * addr - value of R2 on entry + * + * Output: obj_type - value of R0 on exit (X version only) + * load_addr - value of R2 on exit + * exec_addr - value of R3 on exit + * size - value of R4 on exit + * attr - value of R5 on exit + * + * Returns: R0 (non-X version only) + * + * Other notes: Calls SWI 0x8 with R0 = 0x10, R3 = 0x0. + */ + + extern os_error *xosfile_load_stamped_no_path (char const *file_name, + byte *addr, + fileswitch_object_type *obj_type, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr); + + extern fileswitch_object_type osfile_load_stamped_no_path (char const *file_name, + byte *addr, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr); + + /* ------------------------------------------------------------------------ + * Function: osfile_delete() + * + * Description: Calls OS_File 6 to delete an object + * + * Input: file_name - value of R1 on entry + * + * Output: obj_type - value of R0 on exit (X version only) + * load_addr - value of R2 on exit + * exec_addr - value of R3 on exit + * size - value of R4 on exit + * attr - value of R5 on exit + * + * Returns: R0 (non-X version only) + * + * Other notes: Calls SWI 0x8 with R0 = 0x6. + */ + + extern os_error *xosfile_delete (char const *file_name, + fileswitch_object_type *obj_type_, + bits *load_addr_, + bits *exec_addr_, + int *size_, + fileswitch_attr *attr_); + + extern fileswitch_object_type osfile_delete (char const *file_name, + bits *load_addr, + bits *exec_addr, + int *size, + fileswitch_attr *attr); + + /* ------------------------------------------------------------------------ + * Function: osfile_save() + * + * Description: Saves a block of memory as an untyped file - prefer + * OSFile_SaveStamped + * + * Input: file_name - value of R1 on entry + * load_addr - value of R2 on entry + * exec_addr - value of R3 on entry + * data - value of R4 on entry + * end - value of R5 on entry + * + * Other notes: Calls SWI 0x8 with R0 = 0x0. + */ + + extern os_error *xosfile_save (char const *file_name, + bits load_addr, + bits exec_addr, + byte const *data, + byte const *end); + + extern void osfile_save (char const *file_name, + bits load_addr, + bits exec_addr, + byte const *data, + byte const *end); + #if 0 /* in os.h */ extern void os_generate_error(_kernel_oserror *); |