Annotation of 43BSD/usr.bin/lorder.sh, revision 1.1.1.1

1.1       root        1: trap "rm -f $$sym?ef; exit" 0 1 2 13 15
                      2: case $# in
                      3: 0)     echo usage: lorder file ...
                      4:        exit ;;
                      5: 1)     case $1 in
                      6:        *.o)    set $1 $1
                      7:        esac
                      8: esac
                      9: nm -g $* | sed '
                     10:        /^$/d
                     11:        /:$/{
                     12:                /\.o:/!d
                     13:                s/://
                     14:                h
                     15:                s/.*/& &/
                     16:                p
                     17:                d
                     18:        }
                     19:        /[TD] /{
                     20:                s/.* //
                     21:                G
                     22:                s/\n/ /
                     23:                w '$$symdef'
                     24:                d
                     25:        }
                     26:        s/.* //
                     27:        G
                     28:        s/\n/ /
                     29:        w '$$symref'
                     30:        d
                     31: '
                     32: sort $$symdef -o $$symdef
                     33: sort $$symref -o $$symref
                     34: join $$symref $$symdef | sed 's/[^ ]* *//'

unix.superglobalmegacorp.com

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