Commit 7d614b57 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Delete some dead code

Since PipeFS registers with FileSwitch with both dontuseload and dontusesave there's no need to implement the corresponding FSEntry_File subreasons. This might have been left around because RISC OS 2 ignored FS info word flags b23-16, but we're not worrying about RISC OS 2 compatibility now.

Version 0.24. Tagged as 'PipeFS-0_24'
parent dea9b663
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.23"
Module_Version SETA 23
Module_MajorVersion SETS "0.24"
Module_Version SETA 24
Module_MinorVersion SETS ""
Module_Date SETS "18 Aug 2016"
Module_ApplicationDate SETS "18-Aug-16"
Module_Date SETS "08 Jun 2018"
Module_ApplicationDate SETS "08-Jun-18"
Module_ComponentName SETS "PipeFS"
Module_ComponentPath SETS "castle/RiscOS/Sources/FileSys/PipeFS"
Module_FullVersion SETS "0.23"
Module_HelpVersion SETS "0.23 (18 Aug 2016)"
Module_FullVersion SETS "0.24"
Module_HelpVersion SETS "0.24 (08 Jun 2018)"
END
/* (0.23)
/* (0.24)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.23
#define Module_MajorVersion_CMHG 0.24
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 18 Aug 2016
#define Module_Date_CMHG 08 Jun 2018
#define Module_MajorVersion "0.23"
#define Module_Version 23
#define Module_MajorVersion "0.24"
#define Module_Version 24
#define Module_MinorVersion ""
#define Module_Date "18 Aug 2016"
#define Module_Date "08 Jun 2018"
#define Module_ApplicationDate "18-Aug-16"
#define Module_ApplicationDate "08-Jun-18"
#define Module_ComponentName "PipeFS"
#define Module_ComponentPath "castle/RiscOS/Sources/FileSys/PipeFS"
#define Module_FullVersion "0.23"
#define Module_HelpVersion "0.23 (18 Aug 2016)"
#define Module_LibraryVersionInfo "0:23"
#define Module_FullVersion "0.24"
#define Module_HelpVersion "0.24 (08 Jun 2018)"
#define Module_LibraryVersionInfo "0:24"
......@@ -45,16 +45,13 @@ Module_BaseAddr
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Services
GET Hdr:Machine.<Machine>
GET Hdr:CMOS
GET Hdr:OSMem
GET Hdr:Proc
GET Hdr:FSNumbers
GET Hdr:HighFSI
GET Hdr:LowFSI
GET Hdr:NewErrors
GET Hdr:FileTypes
GET Hdr:Variables
GET Hdr:Wimp
GET Hdr:UpCall
GET Hdr:MsgTrans
GET Hdr:Heap
......@@ -174,17 +171,6 @@ link_data # 4 ; points to list of files
link_next # 4
link_size # 0
; dynamic area reason codes aren't in a Hdr file currently
[ dynamicareas
^ 0
DAReason_Create # 1
DAReason_Remove # 1
DAReason_Information # 1
DAReason_Enumerate # 1
DAReason_Renumber # 1
]
; **************** Module code starts here **********************
ASSERT (.-Module_BaseAddr) = 0
......@@ -583,12 +569,6 @@ svc_fsredeclare Entry "R0-R3"
PipeFS_OSFile EntryS "R1,R7,R9"
CMP R0, #fsfile_Load ; can only load if file closed
BEQ %FT10
CMP R0, #fsfile_Save ; can only save if file closed
BEQ %FT15
CMP R0, #fsfile_ReadInfo
BEQ %FT20 ; read file info
......@@ -633,114 +613,6 @@ PipeFS_OSFile EntryS "R1,R7,R9"
EXITS
; load file
; done by opening the file and getting bytes from it
; not allowed if file is open already (length is unknown)
;
; in: r1 -> filename
; r2 -> buffer to load file to
; out: r0 corrupted
; r2-r5 contain file info
; r6 -> filename for *OPT 1,1 info
10
Push "r2-r5"
MOV r0, #fsopen_ReadOnly
BL PipeFS_Open ; only needs r0, r1
BVS %f90
CMP r1, #0
ADREQ r0, ErrorBlock_PipeFS_FileNotFound
BLEQ CopyError ; r1 is already 0 for CopyError
BVS %f90
BIC r7, r1, #pipehandle_bits
LDR r14, [r7, #PipeFile_lenblocked]
TEQ r14, #0
ADREQ r0, ErrorBlock_PipeFS_FileOpen ; error if we're blocked here
MOVEQ r1, #0
BLEQ CopyError
BVS %f80
LDR r2, [sp] ; r2 -> output buffer
LDR r3, [r7, #PipeFile_Size] ; r3 = number of bytes to transfer
11
SUBS r3, r3, #1
BLT %f80
BL PipeFS_GetByte ; can't block as file must have been written
STRVCB r0, [r2], #1
BVC %b11
80
MOV r5, r0
SavePSR r6
ASSERT PipeFile_Load = 0
ASSERT PipeFile_Exec = 4
LDMIA r7, {r2, r3} ; don't affect datestamp
BL PipeFS_Close
MOVVC r0, r5
RestPSR r6, VC
90
Pull "r2-r5"
ASSERT PipeFile_Load = 0
LDMVCIA r7, {r2-r5} ; get file info
BLVC getleafname ; for *OPT 1,1
EXIT
MakeInternatErrorBlock PipeFS_FileNotFound,,M02
; save file
; done by opening the file and putting bytes to it
; not allowed if file is open for writing already
;
; in: r1 -> filename
; r2 = new file load address
; r3 = new file exec address
; r4 -> start of buffer
; r5 -> end of buffer
; r6 -> special field, if any
;
; out: r6 -> filename for *OPT 1,1 info
15
Push "r2-r5"
MOV r0, #fsopen_CreateUpdate
BL PipeFS_Open
BVS %FT95 ; no need to close file
CMP r1, #0
ADREQ r0, ErrorBlock_PipeFS_FileOpen ; assume file was already open
BLEQ CopyError ; r1 is already 0 for CopyError
BVS %f95
SUBVC r2, r5, r4 ; new buffer size
BLVC try_ensuresize ; do this in one go
BVS %f85
BIC r7, r1, #pipehandle_bits
SUB r3, r5, r4 ; r3 = number of bytes to transfer
16
SUBS r3, r3, #1
BLT %f85
LDRB r0, [r4], #1
BL PipeFS_PutByte ; may attempt to block
BVC %b16
85
MOV r5, r0
SavePSR r6
LDMIA sp, {r2, r3} ; new load and exec addresses
BL PipeFS_Close
MOVVC r0, r5
RestPSR r6, VC
BLVC getleafname ; for *OPT 1,1
95
Pull "r2-r5"
EXIT
; read file info
; If file still open, the length will not be very useful, as it may increase
; However, if the caller does an OS_File Load afterwards, he will get an error
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment