|
|
1.1 root 1: # BOLD(2)
2: #
3: # Produce bold and underscored text for printing
4: #
5: # Ralph E. Griswold
6: #
7: # Last modified 7/24/83
8: #
9:
10: procedure bold(s)
11: local c
12: static labels, trans, max
13: initial {
14: labels := "1"
15: trans := repl("1\b",4)
16: max := *labels
17: trans := bold(string(&lcase))
18: labels := string(&lcase)
19: max := *labels
20: }
21: if *s <= max then
22: return map(left(trans,9 * *s),left(labels,*s),s)
23: else return bold(left(s,*s - max)) ||
24: map(trans,labels,right(s,max))
25: end
26:
27: procedure uscore(s)
28: static labels, trans, max
29: initial {
30: labels := "1"
31: trans := "_\b1"
32: max := *labels
33: trans := uscore(string(&lcase))
34: labels := string(&lcase)
35: max := *labels
36: }
37: if *s <= max then
38: return map(left(trans,3 * *s),left(labels,*s),s)
39: else return uscore(left(s,*s - max)) ||
40: map(trans,labels,right(s,max))
41: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.