|
|
1.1 root 1: # LL(1)
2: #
3: # Line length
4: #
5: # Thomas R. Hicks
6: #
7: # Last modified 10/28/83
8: #
9:
10: procedure main(a)
11: local arg, inpt
12: if *a = 0 then
13: doll(&input,"standard input")
14: else
15: every arg := !a do
16: {
17: if arg == "-" then
18: {
19: inpt := &input
20: arg := "standard input"
21: }
22: else
23: if not (inpt := open(arg)) then
24: {
25: write(&errout,"Cannot open ",arg)
26: next
27: }
28: doll(inpt,arg)
29: close(inpt)
30: }
31:
32: end
33:
34: procedure doll(ifd,name)
35: local line, long, short, tab, x
36: tab := "\t"
37: long := 0
38: while line := read(ifd) do
39: {
40: x := *line
41: /short := x
42: short >:= x
43: long <:= x
44: }
45: write(right(\short,6),tab,right(\long,6),tab,\name)
46: end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.