Commit c06b89dd authored by Kevin Bracey's avatar Kevin Bracey
Browse files

ARTtmp branch folded in

parent 602fe490
......@@ -63,10 +63,18 @@ clean:
${RM} ${TARGET}
@echo ${COMPONENT}: cleaned
resources:
resources: resources-${CMDHELP}
@echo ${COMPONENT}: resource files copied
resources_common:
${MKDIR} ${RESDIR}.${COMPONENT}
${CP} Resources.${LOCALE}.Messages ${RESDIR}.${COMPONENT}.Messages ${CPFLAGS}
@echo ${COMPONENT}: resource files copied
resources-None: resources_common
@
resources-: resources_common
print Resources.${LOCALE}.CmdHelp { >> ${RESDIR}.${COMPONENT}.Messages }
${TARGET}: ${SOURCE}
${AS} ${ASFLAGS} ${SOURCE}
......
No preview for this file type
......@@ -5,8 +5,8 @@
GBLS VString
GBLS Date
Version SETA 011 ; 001
VString SETS "0.11" ; "0.01"
Date SETS "28 Oct 1994" ; "16 Nov 1990"
Version SETA 017 ; 001
VString SETS "0.17" ; "0.01"
Date SETS "16 Apr 1997" ; "16 Nov 1990"
END
......@@ -34,6 +34,14 @@ SWIClass SETS FilterSWI_Name
AddSWI RegisterPostFilter
AddSWI DeRegisterPreFilter
AddSWI DeRegisterPostFilter
AddSWI RegisterRectFilter
AddSWI DeRegisterRectFilter
AddSWI RegisterCopyFilter
AddSWI DeRegisterCopyFilter
AddSWI RegisterPostRectFilter
AddSWI DeRegisterPostRectFilter
AddSWI RegisterPostIconFilter
AddSWI DeRegisterPostIconFilter
OPT OldOpt
END
......@@ -104,6 +104,10 @@ wsorigin # 0
callbackpending # 4 ; non-zero if callback is pending
pre_filters # 4
post_filters # 4
rect_filters # 4
copy_filters # 4
post_rect_filters # 4
post_icon_filters # 4
convert_buffer # 20
message_block # 16
flags # 4
......@@ -111,6 +115,8 @@ filter_text # 4
task_text # 4
mask_text # 4
all_text # 4
fake_postrect # 4 ; do we want to fake the post-rectangle
; filter?
f_messagesopen * (1:SHL:0)
......
......@@ -44,6 +44,10 @@ Helpstr DCB "Filter Manager",9,"$VString ($Date)",0
prefilter_token DCB "PreFT",0
postfilter_token DCB "PostFT",0
rectfilter_token DCB "RectFT",0
copyfilter_token DCB "CopyFT",0
postrectfilter_token DCB "PostRectFT",0
posticonfilter_token DCB "PostIconFT",0
filter_token DCB "Filter",0
task_token DCB "Task",0
mask_token DCB "Mask",0
......@@ -122,7 +126,7 @@ Filters_Code
CMP r0, #0
LDREQ r0, all_text
SWINE XTaskManager_TaskNameFromHandle
SWIVC XOS_Write0
BLVC Write32
SWIVC XOS_NewLine
BVS %FT05
......@@ -186,6 +190,182 @@ Filters_Code
04
CMP r3, #0
BNE %BT03
SWI XOS_NewLine
BVS %FT05
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, rect_filters
B %FT11
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
BVS %FT05
LDR r3, [r3, #next_ptr]
11
CMP r3, #0
BNE %BT10
SWI XOS_NewLine
BVS %FT05
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, post_rect_filters
B %FT31
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, [r3, #next_ptr]
31
CMP r3, #0
BNE %BT30
SWI XOS_NewLine
BVS %FT05
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, post_icon_filters
B %FT41
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, [r3, #next_ptr]
41
CMP r3, #0
BNE %BT40
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
SWIVC XOS_NewLine
BVS %FT05
LDR r3, copy_filters
B %FT13
12
LDR r0, [r3, #f_name]
MOV r1, r5
BL writefield
SWIVC XOS_NewLine
BVS %FT05
LDR r3, [r3, #next_ptr]
13
CMP r3, #0
BNE %BT12
05
ADD sp, sp, r4
Pull "PC"
......@@ -223,7 +403,7 @@ writefield
; Out: r0,r2 corrupted
Push "lr"
MOV r2, r0
SWI XOS_Write0
BL Write32
Pull "pc",VS
SUB r0, r0, r2
SUB r0, r1, r0
......@@ -275,8 +455,21 @@ Init
MOV r0, #0
STR r0, pre_filters
STR r0, post_filters
STR r0, rect_filters
STR r0, copy_filters
STR r0, post_rect_filters
STR r0, post_icon_filters
STR r0, flags ; Clear flags.
; If we're on a Wimp earlier than 3.86, then we need to fake post-rectangle filters
MOV r0, #7
SWI Wimp_ReadSysInfo
SUB r0, r0, #256
CMP r0, #386-256
MOVLT r0, #1
MOVGE r0, #0
STR r0, fake_postrect
ADR R0,servicecallback
MOV R1,WP ; workspace pointer
SWI XOS_AddCallBack ; install the call back to broadcast we are here message
......@@ -323,6 +516,11 @@ Service
RegisterFilters
Push "r0-r2,LR"
LDR LR,fake_postrect
MOVNE R0,#0
STRNE R0,int_get_rectangle_reentry_addr
LDR LR,pre_filters
CMP LR,#0 ; Any pre-filters?
MOVNE R0,#0 ; Pre_filter
......@@ -335,11 +533,50 @@ RegisterFilters
DebugE register,"Cant register pre-filter "
Pull "r0-r2,PC",VS
ADDVS r13,r13,#4
Pull "r1-r2,PC",VS
LDR LR,rect_filters
CMP LR,#0 ; Any rect-filters?
BNE %FT01
LDR LR,post_rect_filters
CMP LR,#0 ; how about post-rect-filters?
BEQ %FT02
LDR LR,fake_postrect
CMP LR,#0
01 MOVNE R0,#3 ; rect_filter
ADRNEL R1,rect_filter_handler
MOVNE R2,R12
Debug register,"Register rect-filter",R0,R1,R2,LR
SWINE XWimp_RegisterFilter ; Yes then register
DebugE register,"Cant register rect-filter "
ADDVS r13,r13,#4
Pull "r1-r2,PC",VS
02 LDR LR,copy_filters
CMP LR,#0 ; Any copy-filters?
MOVNE R0,#2 ; copy_filter
ADRNEL R1,copy_filter_handler
MOVNE R2,R12
Debug register,"Register copy-filter",R0,R1,R2,LR
SWINE XWimp_RegisterFilter ; Yes then register
DebugE register,"Cant register copy-filter "
ADDVS r13,r13,#4
Pull "r1-r2,PC",VS
LDR LR,post_filters
CMP LR,#0 ; Any post-filters?
MOVNE R0,#1 ; Post_filter
MOVNE R0,#WimpFilter_PostPoll
ADRNEL R1,post_filter_handler
MOVNE R2,R12
......@@ -349,6 +586,41 @@ RegisterFilters
DebugE register,"Cant register post-filter "
ADDVS r13,r13,#4
Pull "r1-r2,PC",VS
LDR LR,post_icon_filters
CMP LR,#0 ; Any post-icon-filters?
MOVNE R0,#WimpFilter_PostIconGetRectangle
ADRNEL R1,post_icon_filter_handler
MOVNE R2,R12
Debug register,"Register post-icon-filter",R0,R1,R2,LR
SWINE XWimp_RegisterFilter ; Yes then register
DebugE register,"Cant register post-icon-filter "
ADDVS r13,r13,#4
Pull "r1-r2,PC",VS
LDR LR,fake_postrect
TEQ LR,#0
Pull "r0-r2,PC",NE
LDR LR,post_rect_filters
CMP LR,#0 ; Any post-rect-filters?
MOVNE R0,#4 ; post_rect_filter
ADRNEL R1,post_rect_filter_handler
MOVNE R2,R12
Debug register,"Register post-rect-filter",R0,R1,R2,LR
SWINE XWimp_RegisterFilter
STRVS r0,[r13]
DebugE register,"Can't register post-rect-filter "
Pull "r0-r2,PC"
......@@ -360,15 +632,43 @@ svc_reset
ADR r2, pre_filters
BL free_list ; Free list of pre filters
ADR r2, rect_filters
BL free_list ; Free list of rect filters
ADR r2, post_filters
BL free_list ; Free list of post filters
ADR r2, post_rect_filters
BL free_list ; Free list of post rect filters
ADR r2, post_icon_filters
BL free_list ; Free list of post icon filters
ADR r2, copy_filters
BL free_list ; Free list of copy filters
MOV R0,#WimpFilter_PrePoll
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_GetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#0 ; Pre_filter
MOV R0,#WimpFilter_PostPoll
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#1 ; Post_filter
MOV R0,#WimpFilter_BlockCopy
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_PostGetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_PostIconGetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
......@@ -386,15 +686,43 @@ Die
ADR r2, pre_filters
BL free_list ; Free list of pre filters
ADR r2, rect_filters
BL free_list ; Free list of rect filters
ADR r2, post_filters
BL free_list ; Free list of post filters
ADR r2, post_rect_filters
BL free_list ; Free list of post rect filters
ADR r2, post_icon_filters
BL free_list ; Free list of post icon filters
ADR r2, copy_filters
BL free_list ; Free list of copy filters
MOV R0,#WimpFilter_PrePoll
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_GetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#0 ; Pre_filter
MOV R0,#WimpFilter_PostPoll
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#1 ; Post_filter
MOV R0,#WimpFilter_BlockCopy
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_PostGetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
MOV R0,#WimpFilter_PostIconGetRectangle
MOV R1,#0
MOV R2,#0
SWI XWimp_RegisterFilter ; Ignore errors.
......@@ -422,4 +750,20 @@ Die
Pull "R0-R11,PC",,^ ; don't refuse to die
; ----------------------------------------------------------------------------------------------------------------------
; Write32 - output a control character terminated string
;
; In: R0->Ctrl-terminated string
Write32
Push "R1,LR"
;
MOV R1,R0
01 LDRB R0,[R1],#1
CMPS R0,#32
MOVLO R0,R1
Pull "R1,PC",LO
SWI XOS_WriteC
BVC %BT01
Pull "R1,PC"
LNK s.SWIs
......@@ -29,9 +29,15 @@ MsgTrans_OpenFile
TST lr, #f_messagesopen
EXIT NE
ADR r1, message_file_name
ADR r1, message_file_name2
MOV r2, #0
SWI XMessageTrans_OpenFile
ADRVS r0, message_block
ADRVS r1, message_file_name
MOVVS r2, #0
SWIVS XMessageTrans_OpenFile
LDRVC lr, flags
ORRVC lr, lr, #f_messagesopen
STRVC lr, flags
......@@ -101,6 +107,8 @@ MsgTrans_Lookup
EXIT
message_file_name2
DCB "FilterManager:Messages",0
message_file_name
DCB "Resources:$.Resources.FilterMgr.Messages",0
......
......@@ -60,6 +60,7 @@ pre_filter_exit
NOP
Pull "r1"
B pre_filter_exit
LNK s.PostFilter
LNK s.RectFilter
This diff is collapsed.
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