Commits (6)
  • Robert Sprowson's avatar
    Use Rel macros for window handle manipulation · 00b0f1cc
    Robert Sprowson authored
    Munge between internal and external window handles using the same macro the Wimp does for clarity.
    00b0f1cc
  • Robert Sprowson's avatar
    Minor cleanup · 110fd564
    Robert Sprowson authored
    Don't include headers we don't need, add Hdr:HostFS so debug builds work.
    Don't pointlessly preserve low registers in finalise handler.
    Use Unix style names for LNK.
    Typos in docs fixed.
    Be consistent about wsptr/WP/wp when referring to the workspace pointer.
    110fd564
  • Robert Sprowson's avatar
    Remove signed pointer comparison · a119c768
    Robert Sprowson authored
    Linked lists end with NULL, not <= 0.
    a119c768
  • Robert Sprowson's avatar
    Fix for 26 bit pre filter exit · 848b7109
    Robert Sprowson authored
    PRM 3-305 says to return with MOVS PC,LR but in the 26 bit case we were not preserving flags.
    848b7109
  • Robert Sprowson's avatar
    [455] Don't call filters for tasks that have quit · 07fa7e20
    Robert Sprowson authored
    Filter Manager continued to call filters based on their Task ID after they had quit. Now, watch out for Service_WimpCloseDown and disable any matching filters (the filters are retained so that any subsequent legitimate deregister attempt doesn't get an unknown filter error). As only 16 bit Task IDs are stored, define a new flag in b31 to denote a disabled filter - this also means there is a free "no match" when the filter lists are scanned.
    The copy filter isn't affected because it doesn't select on Task ID.
    
    FilterMgr.s: New flag to mark a task as having quit
    ModHead.s: Listen for Service_WimpCloseDown and check the lists of Task IDs for any matches. Simplify *Filters code with advanced subroutine technology.
    SWIs.s: Knock out the "quit" flag when comparing task handles to deregister
    Tail.s: Walk a list, mark any matching tasks as having quit
    
    Version 0.29. Tagged as 'Filter-0_29'
    07fa7e20
  • Robert Sprowson's avatar
    Build fix · fc7abb71
    Robert Sprowson authored
    Ethusiastic unused header cull removed APCS.<APCS> which is used (only) in the standalone case. Replace singular FunctionEntry/Return with Entry/EXIT which is what is more generally used by the module
    
    Version 0.29. Not tagged
    fc7abb71
......@@ -33,7 +33,7 @@ Filter_RegisterPreFilter
Entry:
R0 - Pointer to 0 terminated filter name.
R1 - Addresss of filter.
R1 - Address of filter.
R2 - Value to be passed in R12.
R3 - Task handle of task to which filter is applied.
or 0 for all tasks.
......@@ -66,7 +66,7 @@ Filter_RegisterPostFilter
Entry:
R0 - Pointer to 0 terminated filter name.
R1 - Addresss of filter.
R1 - Address of filter.
R2 - Value to be passed in R12.
R3 - Task handle of task to which filter is applied.
or 0 for all tasks.
......@@ -104,7 +104,7 @@ R12 equal to the value of R2 when this SWI is called.
Entry:
R0 - Pointer to 0 terminated filter name.
R1 - Addresss of filter.
R1 - Address of filter.
R2 - Value to be passed in R12.
R3 - Task handle of task to which filter was applied.
......@@ -120,11 +120,11 @@ R12 equal to the value of R2 when this SWI is called.
Entry:
R0 - Pointer to 0 terminated filter name.
R1 - Addresss of filter.
R1 - Address of filter.
R2 - Value to be passed in R12.
R3 - Task handle of task to which filter was applied.
All must be the same as those passed to RegisterPreFilter
All must be the same as those passed to RegisterPostFilter
Exit:
Registers preserved.
Filter de-registered.
......
;
; This file is automatically maintained by srccommit, do not edit manually.
; Last processed by srccommit version: 1.1.
;
GBLS Module_MajorVersion
GBLA Module_Version
......@@ -10,14 +9,12 @@
GBLS Module_ApplicationDate
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.28"
Module_Version SETA 28
Module_MajorVersion SETS "0.29"
Module_Version SETA 29
Module_MinorVersion SETS ""
Module_Date SETS "23 Oct 2013"
Module_ApplicationDate SETS "23-Oct-13"
Module_Date SETS "19 Jan 2020"
Module_ApplicationDate SETS "19-Jan-20"
Module_ComponentName SETS "Filter"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Filter"
Module_FullVersion SETS "0.28"
Module_HelpVersion SETS "0.28 (23 Oct 2013)"
Module_FullVersion SETS "0.29"
Module_HelpVersion SETS "0.29 (19 Jan 2020)"
END
/* (0.28)
/* (0.29)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.28
#define Module_MajorVersion_CMHG 0.29
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 23 Oct 2013
#define Module_Date_CMHG 19 Jan 2020
#define Module_MajorVersion "0.28"
#define Module_Version 28
#define Module_MajorVersion "0.29"
#define Module_Version 29
#define Module_MinorVersion ""
#define Module_Date "23 Oct 2013"
#define Module_Date "19 Jan 2020"
#define Module_ApplicationDate "23-Oct-13"
#define Module_ApplicationDate "19-Jan-20"
#define Module_ComponentName "Filter"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Filter"
#define Module_FullVersion "0.28"
#define Module_HelpVersion "0.28 (23 Oct 2013)"
#define Module_LibraryVersionInfo "0:28"
#define Module_FullVersion "0.29"
#define Module_HelpVersion "0.29 (19 Jan 2020)"
#define Module_LibraryVersionInfo "0:29"
......@@ -37,7 +37,7 @@ copy_filter_handler
Push "r0-r2,r10,r11,LR"
ADD r0,r10,#1
Rel r0,r10
LDR r1,copy_filters
copy_filter_exit
......@@ -57,6 +57,7 @@ copy_filter_exit
NOP
Pull "r1"
B copy_filter_exit
LNK s.PostFilter
LNK PostFilter.s
......@@ -39,24 +39,15 @@ Module_BaseAddr
GET Hdr:Macros
GET Hdr:System
GET Hdr:ModHand
GET Hdr:Machine.<Machine>
GET Hdr:APCS.<APCS>
GET Hdr:Services
GET Hdr:VduExt
GET Hdr:FSNumbers
GET Hdr:NewErrors
GET Hdr:Variables
GET Hdr:Proc
GET Hdr:Sprite
GET Hdr:Wimp
GET Hdr:WimpSpace
GET Hdr:Messages
GET Hdr:FilerAct
GET Hdr:MsgTrans
GET Hdr:MsgMenus
GET Hdr:ResourceFS
GET Hdr:ColourTran
GET Hdr:Hourglass
GET Hdr:HostFS
GET Hdr:NdrDebug
GET Hdr:Switcher
......@@ -81,14 +72,18 @@ hostvdu SETL {TRUE} ; True to send debug to tube
debugxx SETL {FALSE} ; General debugging.
debugregister SETL {FALSE} ; Register/de-register
wsptr RN R12
MACRO
$lab Rel $to,$from,$cc ; Turn Abs window handles to Rel
$lab ADD$cc $to,$from,#1
MEND
; ----------------------------------------------------------------------------------------------------------------------
; Filter block structure
^ 0
next_ptr # 4 ; Pointer to next in chain (-1 if none)
prev_ptr # 4 ; Pointer to previous entry in chain (-1 if none)
f_task # 4 ; Task ID for which the filter is to be called.
next_ptr # 4 ; Pointer to next in chain (0 if none)
prev_ptr # 4 ; Pointer to previous entry in chain (0 if none)
f_task # 4 ; Task ID for which the filter is to be called (16 bit)
f_task_quit * 1:SHL:31 ; this Task ID was seen to have quit
f_mask # 4 ; Event mask.
f_address # 4 ; Address to call.
f_R12 # 4 ; Value in R12 when calling.
......@@ -113,6 +108,7 @@ post_icon_filters # 4
convert_buffer # 20
message_block # 16
flags # 4
f_messagesopen * (1:SHL:0)
filter_text # 4
task_text # 4
mask_text # 4
......@@ -121,10 +117,8 @@ fake_postrect # 4 ; do we want to fake the post-rectangle filter? (Wimp < 3.86)
get_handle_from_r10 # 4 ; do we get the window handle from r10 or the stack
; for get-rectangle filters? (from r10 for Wimp > 3.99)
f_messagesopen * (1:SHL:0)
max_running_work * (@-wsorigin)
LNK s.ModHead
LNK ModHead.s
......@@ -70,19 +70,10 @@ min_tab3 * 8
; ---------------------------------------------------------------------------------------------------------------------
; Handle *Filters - List all attached filters with the tasks they are attached to.
Filters_Code
Push "r7-r8,LR"
Debug xx,"*Filters called listing pre_filters"
Push "r7-r9,LR"
Debug xx,"*Filters called, listing filters"
LDR wsptr,[R12]
ADR r1, prefilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
Pull "r7-r8,PC",VS
LDR wp,[R12]
MOV r4, #0 ; r4 = how much space we are using on the stack to hold column headings.
......@@ -115,318 +106,189 @@ Filters_Code
BVS %FT05
STR sp, all_text
LDR r0, filter_text
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
; pre filters
MOV r0, #2_011
ADR r1, prefilter_token
BL writeheadings
BVS %FT05
LDR r3, pre_filters
B %FT02
B %FT08
01
LDR r9, [r3, #f_task]
TST r9, #f_task_quit
BNE %FT03 ; Mute this one, the specific task has quit
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, [r3, #f_task]
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
BVS %FT05
MOV r1, r6
BL writefield
SWI XOS_NewLine
MOV r0, r9
BL writetaskname
SWIVC XOS_NewLine
BVS %FT05
03
LDR r3, [r3, #next_ptr]
02
08
CMP r3, #0
BNE %BT01
SWI XOS_NewLine
ADRL r1, postfilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
BVS %FT05
LDR r0, mask_text
MOV r1, r7
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
BVS %FT05
LDR r0, mask_text
MOV r1, r7
BL writefield_dashed
SWIVC XOS_NewLine
; post filters
MOV r0, #2_111
ADRL r1, postfilter_token
BL writeheadings
BVS %FT05
LDR r3, post_filters
B %FT04
03
B %FT18
11
LDR r9, [r3, #f_task]
TST r9, #f_task_quit
BNE %FT13 ; Mute this one, the specific task has quit
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, [r3, #f_task]
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
MOV r0, r9
BL writetaskname
BVS %FT05
LDR r0, [r3, #f_mask]
ADR r1, convert_buffer
MOV r2, #10
MOV r2, #?convert_buffer
SWI XOS_ConvertHex8
SWIVC XOS_Write0
SWIVC XOS_NewLine
BVS %FT05
13
LDR r3, [r3, #next_ptr]
04
18
CMP r3, #0
BNE %BT03
BNE %BT11
SWI XOS_NewLine
BVS %FT05
; rect filters
MOV r0, #2_011
ADRL r1, rectfilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BL writeheadings
BVS %FT05
LDR r3, rect_filters
B %FT11
B %FT28
21
LDR r9, [r3, #f_task]
TST r9, #f_task_quit
BNE %FT23 ; Mute this one, the specific task has quit
10
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, [r3, #f_task]
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
SWIVC XOS_NewLine
MOV r0, r9
BL writetaskname
BVS %FT05
23
LDR r3, [r3, #next_ptr]
11
28
CMP r3, #0
BNE %BT10
BNE %BT21
SWI XOS_NewLine
BVS %FT05
; post rect filters
MOV r0, #2_011
ADRL r1, postrectfilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BL writeheadings
BVS %FT05
LDR r3, post_rect_filters
B %FT31
B %FT38
31
LDR r9, [r3, #f_task]
TST r9, #f_task_quit
BNE %FT33 ; Mute this one, the specific task has quit
30
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, [r3, #f_task]
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
MOV r0, r9
BL writetaskname
SWIVC XOS_NewLine
BVS %FT05
33
LDR r3, [r3, #next_ptr]
31
38
CMP r3, #0
BNE %BT30
BNE %BT31
SWI XOS_NewLine
BVS %FT05
; post icon filters
MOV r0, #2_011
ADRL r1, posticonfilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
BVS %FT05
LDR r0, task_text
MOV r1, r6
BL writefield_dashed
SWIVC XOS_NewLine
BL writeheadings
BVS %FT05
LDR r3, post_icon_filters
B %FT41
B %FT48
41
LDR r9, [r3, #f_task]
TST r9, #f_task_quit
BNE %FT43 ; Mute this one, the specific task has quit
40
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
BVS %FT05
LDR r0, [r3, #f_task]
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
MOV r0, r9
BL writetaskname
SWIVC XOS_NewLine
BVS %FT05
43
LDR r3, [r3, #next_ptr]
41
48
CMP r3, #0
BNE %BT40
BNE %BT41
SWI XOS_NewLine
BVS %FT05
ADRL r1, copyfilter_token
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r0, filter_text
MOV r1, r5
BL writefield_dashed
SWIVC XOS_NewLine
; copy filters
MOV r0, #2_001
ADR r1, copyfilter_token
BL writeheadings
BVS %FT05
LDR r3, copy_filters
B %FT13
12
B %FT58
51
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
SWIVC XOS_NewLine
BVS %FT05
53
LDR r3, [r3, #next_ptr]
13
58
CMP r3, #0
BNE %BT12
BNE %BT51
05
ADD sp, sp, r4
Pull "r7-r8,PC"
Pull "r7-r9,PC"
lookuptostack
; In: r1->token
......@@ -455,6 +317,74 @@ lookuptostack
STRB r0, [r1]
MOV pc, r8
writetaskname ROUT
; Write a task name (from ID) or "All"
; In: r0 = the Task ID
; r6 = width of heading column
; Out: r0 corrupted
Push "r1-r2,lr"
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
MOVVC r1, r6
BLVC writefield
Pull "r1-r2,pc"
writeheadings ROUT
; Write the introductory text and column headings for a filter
; In: r0 = bitfield asking for b0 = filter heading
; b1 = task heading
; b2 = mask heading
; r1 -> token for introductory text
; r5-r7 = width of heading columns
Push "r0-r4,lr"
MOV r4, r0 ; Flags for later
MOV r2, #0
BL MsgTrans_Lookup
MOVVC r0, r2
MOVVC r1, r3
SWIVC XOS_WriteN
SWIVC XOS_NewLine
Pull "r0-r4,pc",VS
TST r4,#1 ; Want filter heading
LDRNE r0, filter_text
MOVNE r1, r5
BLNE writefield
Pull "r0-r4,pc",VS
TST r4,#2 ; Want task heading
LDRNE r0, task_text
MOVNE r1, r6
BLNE writefield
Pull "r0-r4,pc",VS
TST r4,#4 ; Want mask heading
LDRNE r0, mask_text
MOVNE r1, r6
BLNE writefield
SWIVC XOS_NewLine ; Newline regardless
Pull "r0-r4,pc",VS
TST r4,#1 ; Want filter heading
LDRNE r0, filter_text
MOVNE r1, r5
BLNE writefield_dashed
Pull "r0-r4,pc",VS
TST r4,#2 ; Want task heading
LDRNE r0, task_text
MOVNE r1, r6
BLNE writefield_dashed
Pull "r0-r4,pc",VS
TST r4,#4 ; Want mask heading
LDRNE r0, mask_text
MOVNE r1, r6
BLNE writefield_dashed
SWIVC XOS_NewLine ; Newline regardless
Pull "r0-r4,pc"
writefield
; Write control-terminated string, padded with spaces to field width
; In: r0 = text to print
......@@ -549,7 +479,7 @@ Init
STR r2, [r12]
01
MOV r12, r2
MOV wp, r2
; Clear list pointers
......@@ -586,7 +516,7 @@ Init
]
ADR R0,servicecallback
MOV R1,WP ; workspace pointer
MOV R1,wp ; workspace pointer
SWI XOS_AddCallBack ; install the call back to broadcast we are here message
MOVVC R0,#-1
STRVC R0,callbackpending ; and then setup a suitable flag to indicate we have a callback pending
......@@ -614,9 +544,11 @@ servicecallback
; ----------------------------------------------------------------------------------------------------------------------
; Module service entry point
ServiceTable
ASSERT Service_WimpCloseDown < Service_ResourceFSStarting
ASSERT Service_ResourceFSStarting < Service_WimpRegisterFilters
DCD 0 ; flags word
DCD Service2 - Module_BaseAddr
DCD Service_WimpCloseDown
[ standalone
DCD Service_ResourceFSStarting
]
......@@ -627,6 +559,7 @@ ServiceTable
Service
MOV R0, R0 ; flag service table to aware kernels
TEQ R1,#Service_WimpRegisterFilters
TEQNE R1,#Service_WimpCloseDown
[ standalone
TEQNE R1,#Service_ResourceFSStarting
]
......@@ -637,10 +570,14 @@ Service2
BEQ serviceresourcefsstarting
]
LDR R12, [R12]
LDR wp, [R12]
CMP R12, #0
MOVEQ PC, LR ; Exit if no workspace
TEQ R1,#Service_WimpCloseDown
BEQ servicewimpclosedown
; else must be Service_WimpRegisterFilters
;-------------------------------------
; Register our filters with the Wimp
; In:
......@@ -777,15 +714,40 @@ serviceresourcefsstarting
RETURN
]
; Wimp says a task has quit
; In R0 = 0 if closing, +ve if new task starting killed another
; R2 = task handle
servicewimpclosedown ROUT
CMP r0,#0
RETURN NE
Push "r1-r2,LR"
MOV r2,r2,LSL #16
MOV r2,r2,LSR #16
; Mark dead any pre filters matching that Task ID
LDR r1,pre_filters
BL flag_quit_list
LDR r1,rect_filters
BL flag_quit_list
LDR r1,post_filters
BL flag_quit_list
LDR r1,post_rect_filters
BL flag_quit_list
LDR r1,post_icon_filters
BL flag_quit_list
; r1, copy_filters Copy filters don't use a Task ID
Pull "r1-r2,LR"
RETURN
; ----------------------------------------------------------------------------------------------------------------------
; RMKill'ing the module - Release filter handlers. Release linked lists of filters.
Die
;
LDR r12, [r12]
LDR wp, [r12]
CMP r12, #0
RETURN EQ
Push "r0-r11,LR"
Push "r7-r11,LR"
ADR r2, pre_filters
BL free_list ; Free list of pre filters
......@@ -833,7 +795,7 @@ Die
LDR R0,callbackpending
CMP R0,#0 ; do we have a callback pending? (clears V)
ADRNE R0,servicecallback ; yes, so remove it before its granted
MOVNE R1,WP ; as we are going to die
MOVNE R1,wp ; as we are going to die
SWINE XOS_RemoveCallBack
MOV R0,#0
......@@ -849,9 +811,9 @@ Die
BL MsgTrans_CloseFile ; Make sure Messages file is closed.
Pull "R0-R11,LR"
Pull "R7-R11,LR"
RETURNVC ; clear V - don't refuse to die
; ----------------------------------------------------------------------------------------------------------------------
LNK s.SWIs
LNK SWIs.s
......@@ -116,4 +116,4 @@ message_file_name
ALIGN
LNK s.PreFilter
LNK PreFilter.s
......@@ -41,7 +41,7 @@ post_icon_filter_handler
MOV R2,R2,ASL #16
MOV R2,R2,LSR #16
ADD r0,r10,#1 ; find the window being redrawn
Rel r0,r10 ; find the window being redrawn
LDR r1,post_icon_filters
post_icon_filter_exit
......@@ -69,6 +69,6 @@ post_icon_filter_exit
B post_icon_filter_exit
LNK s.CopyFilter
LNK CopyFilter.s
......@@ -40,7 +40,7 @@ post_rect_filter_handler
MOV R2,R2,ASL #16
MOV R2,R2,LSR #16
ADD r0,r10,#1 ; find the window being redrawn
Rel r0,r10 ; find the window being redrawn
LDR r1,post_rect_filters
post_rect_filter_exit
......@@ -136,6 +136,6 @@ fakepostrect_handler
]
LNK s.PoIcFilter
LNK PoIcFilter.s
......@@ -88,4 +88,4 @@ post_filter_exit
MOVEQ R0,R7
B %BT01
LNK s.Tail
LNK Tail.s
......@@ -43,7 +43,11 @@ pre_filter_handler
LDR r1,pre_filters
pre_filter_exit
CMP r1,#0
[ No26bitCode
Pull "r1-r2,PC",EQ ; End of list.
|
Pull "r1-r2,PC",EQ,^ ; End of list.
]
LDR r14,[r1,#next_ptr]
Push "r14"
......@@ -61,6 +65,6 @@ pre_filter_exit
Pull "r1"
B pre_filter_exit
LNK s.RectFilter
LNK RectFilter.s
......@@ -49,8 +49,8 @@ rect_filter_handler
LDR r0, get_handle_from_r10 ; find the window being redrawn
TEQ r0, #0
LDREQ r0, [sp,#16+12+0] ; BTW - you didn't see that...
ADDEQ r0, r0, #1
ADDNE r0, r10, #1 ; turn pointer into window handle
Rel r0,r0,EQ
Rel r0,r10,NE ; turn pointer into window handle
LDR r1,rect_filters
rect_filter_exit
......@@ -76,6 +76,7 @@ rect_filter_exit
NOP
Pull "r1"
B rect_filter_exit
LNK s.PoRtFilter
LNK PoRtFilter.s
......@@ -16,7 +16,7 @@
Filter_SWIdecode
Push "LR"
LDR wsptr,[R12] ; wsptr --> workspace
LDR wp,[R12] ; wsptr --> workspace
Debug xx,"SWI ",r11
......@@ -270,6 +270,7 @@ find_filter
TEQ r14,r2
BNE %BT01
LDR r14,[r4,#f_task]
BIC r14,r14,#f_task_quit
TEQ r14,r3
CMPNE r14,#0
BNE %BT01
......@@ -1040,4 +1041,4 @@ SWIFilter_DeRegisterPostIconFilter
Pull "r1-r4,LR"
RETURNVS
LNK s.MsgTrans
LNK MsgTrans.s
......@@ -28,21 +28,39 @@ free_list
01
MOV r0, #ModHandReason_Free
SUBS r2, r1, #0
MOVLE PC, R3
MOVEQ PC, R3
; Free the workspace
LDR r1, [r2,#next_ptr]
SWI XOS_Module
B %BT01
; ----------------------------------------------------------------------------
; Mark as dead any filters that match on the given Task ID
; We don't free the list entry since any subsequent call to Filter_DeRegister
; would return an unknown filter error.
; R1 -> pointer to start of list to walk
; R2 = Task ID
flag_quit_list ROUT
Push "r0,LR"
MOV r0,r1
01
CMP r0,#0 ; List end?
Pull "r0,PC",EQ
LDR r14,[r0,#f_task]
TEQ r14,r2
ORREQ r14,r14,#f_task_quit
STREQ r14,[r0,#f_task]
LDR r0,[r0,#next_ptr]
B %BT01
; ----------------------------------------------------------------------------
[ standalone
declareresourcefsfiles
FunctionEntry "r0"
Entry "r0"
ADR R0,resourcefsfiles
SWI XResourceFS_RegisterFiles ; ignore errors
Return "r0"
EXIT
resourcefsfiles
ResourceFile $MergedMsgs, Resources.FilterMgr.Messages
......