1
2
3
4
5
6
7
8
9
10
11 propagate_bit: proc(sym,number);
12
13
14
15
16
17
18 dcl ( sym ptr,
19 number fixed bin (15)) parameter;
20
21
22
23 dcl (p, r) ptr;
24
25
26
27 dcl (null, string, substr) builtin;
28
29
30
31 %include symbol;
32 %include symbol_bits;
33 %include cross_reference;
34 ^L
35
36
37 if sym->symbol.temporary then return;
38
39 p = sym;
40
41 if number = set_bit
42 then do;
43 r = p -> symbol.cross_references;
44 if r ^= null then r -> cross_reference.set_reference = "1"b;
45
46
47 r = p;
48 do while(r->symbol.father^=null);
49 r=r->symbol.father;
50 substr(string(r->symbol.attributes),number,1) = "1"b;
51 end;
52 end;
53 else if substr (string (p->symbol.attributes), number, 1)
54 then return;
55
56 substr(string(p->symbol.attributes),number,1) = "1"b;
57 if p->symbol.son^=null
58 then call propagate((p->symbol.son));
59
60 propagate: proc(p);
61
62 dcl p ptr unal,
63 q ptr;
64
65 q = p;
66
67 do while(q^=null);
68 substr(string(q->symbol.attributes),number,1) = "1"b;
69
70 if q->symbol.son^=null
71 then call propagate(q->symbol.son);
72
73 q = q->symbol.brother;
74 end;
75
76 end propagate;
77
78 end ;