interplane.Get Omega
Read in your language

interplane-forge

INTERPLANE Forge

Brought by drakestapleton

branch main Branches Tags History

interplane-forge / browse / tests / title.om

73 lines · 1099 bytes Raw Blame History
1note L1057: call the real brti at and beyond its title excerpt limit.
2note The full lookup path stays unchanged; only the title excerpt is capped.
3text bttshort "File - o/r"
4text bttpre "File: "
5text bttsuf " - o/r"
6fn bttcase n ulong to int
7want = new uchar 256 0
8for i ulong n bound 4096
9put gbp i 120
10end
11put gbpl 0 n
12put fown 0 111
13put fownl 0 1
14put frepo 0 114
15put frepol 0 1
16brti tbtblob
17w = ulong 0
18if eq n 0
19for i ulong len bttshort
20put want w get bttshort i
21w = add w 1
22end
23else
24for i ulong len bttpre
25put want w get bttpre i
26w = add w 1
27end
28count = n
29if gt count 120
30count = 120
31end
32for i ulong count bound 120
33put want w 120
34w = add w 1
35end
36for i ulong len bttsuf
37put want w get bttsuf i
38w = add w 1
39end
40end
41if ne get ftil 0 w
42ret 1
43end
44for i ulong w bound 256
45if ne get fti i get want i
46ret 2
47end
48end
49if ne get gbpl 0 n
50ret 3
51end
52for i ulong n bound 4096
53if ne get gbp i 120
54ret 4
55end
56end
57ret 0
58end
59fn main to int
60cases = new ulong 6 0
61put cases 1 1
62put cases 2 119
63put cases 3 120
64put cases 4 121
65put cases 5 4096
66for i ulong 6
67r = bttcase get cases i
68if ne r 0
69ret r
70end
71end
72ret 0
73end