Annotation of 43BSD/contrib/icon/libtest/t-tablw.dat, revision 1.1.1.1

1.1       root        1: #      LL(1)
                      2: #
                      3: #      Line length
                      4: #
                      5: #      Thomas R. Hicks
                      6: #
                      7: #      Last modified 6/16/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:          }
                     30:    
                     31: end
                     32: 
                     33: procedure doll(ifd,name)
                     34:    local line, long, short, tab, x
                     35:    tab := "\t"
                     36:    long := 0
                     37:    while line := read(ifd) do
                     38:       {
                     39:       x := *line
                     40:       /short := x
                     41:       short >:=  x
                     42:       long <:= x
                     43:       }
                     44:    write(right(\short,6),tab,right(\long,6),tab,\name)
                     45: end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.