blob: f168d25b29af434c8a7c53753e544c32f332c69b (
plain)
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
|
<<*>>=
procedure go()
local line
while line := read() do {
apply(prepass, line)
write(line)
if match("@fatal ", line) then exit(1)
apply(postpass, line)
}
end
procedure apply(pass, line)
line ? (="@" & pass(tab(upto(' ')|0), if =" " then tab(0) else &null))
end
@
[[indextext]] is a hack to introduce suitable ``[[@index nl]],'' but it
messes up the line counts!
<<*>>=
procedure writedefn(defn, locl)
static indextext
initial indextext := ""
if /defn then
*indextext > 0 & <<flush index>>
else {
if *indextext + *defn > 65 then <<flush index>>
write(if \locl then "@index localdefn " else "@index defn ", defn)
indextext ||:= " " || defn
}
return
end
<<flush index>>=
{ # write("@index nl") # don't!
indextext := ""
}
<<*>>=
procedure rcsinfo_too ()
return "$Id: defns.nw,v 1.18 2008/10/06 01:03:05 nr Exp nr $" ||
"$Name: v2_12 $"
end
@
|