File: froot

package info (click to toggle)
tcng 10b-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,632 kB
  • ctags: 2,515
  • sloc: ansic: 19,038; pascal: 4,640; yacc: 2,619; sh: 1,908; perl: 1,546; lex: 772; makefile: 755
file content (54 lines) | stat: -rw-r--r-- 1,285 bytes parent folder | download | duplicates (5)
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
# Field roots: single field ---------------------------------------------------
tcc -xif:err 2>&1 | grep 'match [0-9]'
field foo = field_root(10);

prio {
    class if foo == 1;
}
EOF
match 10:0:8=0x01 action 1
# Field roots: local offset ---------------------------------------------------
tcc -xif:err 2>&1 >/dev/null | grep :
field foo = field_root(10);
field bar = foo[foo];

prio {
    drop if bar == 1;
}
EOF
offset 100 = 10+(10:0:8 << 3)
match 100:0:8=0x01 action 1
# Field roots: mixed offsets, index -------------------------------------------
tcc -xif:err 2>&1 >/dev/null | grep :
field foo = field_root(10);
field bar = foo[raw];

prio {
    drop if bar == 1;
}
EOF
offset 100 = 10+(0:0:8 << 3)
match 100:0:8=0x01 action 1
# Field roots: mixed offsets, base --------------------------------------------
tcc -xif:err 2>&1 >/dev/null | grep :
field foo = field_root(10);
field bar = raw[foo];

prio {
    drop if bar == 1;
}
EOF
offset 100 = 0+(10:0:8 << 3)
match 100:0:8=0x01 action 1
# Field roots: mixed offsets, base and index ----------------------------------
tcc -xif:err 2>&1 >/dev/null | grep :
field foo = field_root(10);
field bar = field_root(11);
field baz = foo[bar];

prio {
    drop if baz == 1;
}
EOF
offset 100 = 10+(11:0:8 << 3)
match 100:0:8=0x01 action 1