-
Notifications
You must be signed in to change notification settings - Fork 1
/
READ.HM
80 lines (58 loc) · 1.5 KB
/
READ.HM
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SUBROUTINE READ.HM(HM.NAME, HM.LIST, HM.SL, HM.ALL)
$INSERT I_COMMON
$INSERT I_EQUATE
$INSERT I_F.HELPTEXT.MENU
GOSUB CHECK.IF.HM
RETURN
CHECK.IF.HM:
GOSUB INIT
HM.ERR = ''
R.HM = ''
CALL F.READ(FN.HM, HM.NAME, R.HM, F.HM, HM.ERR)
IF HM.ERR THEN
* exit recursion
END ELSE
GOSUB PROCESS
END
RETURN
INIT:
FN.HM = "F.HELPTEXT.MENU"
F.HM = ""
CALL OPF(FN.HM,F.HM)
RETURN
PROCESS:
APP.HM = R.HM<EB.MEN.APPLICATION>
LOOP
REMOVE APP.ID FROM APP.HM SETTING ID.POS
WHILE APP.ID:ID.POS
HM.ERR = ''
R.HM = ''
CALL F.READ(FN.HM, APP.ID, R.HM, F.HM, HM.ERR)
IF HM.ERR THEN
* EXIT RECURSION
GOSUB SWITCH.APP
END ELSE
HM.LIST<-1> = APP.ID
HM.SL<-1> = 'HELPTEXT.MENU>' : APP.ID
HM.ALL<-1> = 'HELPTEXT.MENU>' : APP.ID
CALL READ.HM(APP.ID, HM.LIST, HM.SL, HM.ALL)
END
REPEAT
RETURN
SWITCH.APP:
BEGIN CASE
* ENQUIRY
CASE APP.ID[1,4] = "ENQ " OR APP.ID[1,6] = "QUERY "
HM.ALL<-1> = 'ENQUIRY>' : FIELD(APP.ID, ' ', 2)
* COS
CASE APP.ID[1,4] = "COS "
HM.ALL<-1> = 'EB.COMPOSITE.SCREEN>' : FIELD(APP.ID, ' ', 2)
* ETS
CASE APP.ID[1,4] = "TAB "
HM.ALL<-1> = 'EB.TABBED.SCREEN>' : FIELD(APP.ID, ' ', 2)
* VERSION
CASE INDEX(APP.ID, ',', 1) > 0
HM.ALL<-1> = 'VERSION>' : FIELD(APP.ID, ' ', 1)
END CASE
RETURN
END