Annotation of 42BSD/ucb/vpr/vtroff.sh, revision 1.1

1.1     ! root        1: #! /bin/csh -f
        !             2: #
        !             3: #      @(#)vtroff.sh   4.2     (Berkeley)      5/26/83
        !             4: #
        !             5: umask 0
        !             6: set flags=() noglob length=() fonts=() fontf=()
        !             7: unset t
        !             8: set macp = (/usr/lib/tmac/tmac.vcat)
        !             9: set sort = (/usr/lib/rvsort)
        !            10: set lpr = (/usr/ucb/lpr -Pvarian)
        !            11: top:
        !            12:        if ($#argv > 0) then
        !            13:                switch ($argv[1])
        !            14:                case -t:
        !            15:                        set t
        !            16:                        shift argv
        !            17:                        goto top
        !            18:                case -l*:
        !            19:                        set length = $argv[1]
        !            20:                        shift argv
        !            21:                        goto top
        !            22:                case -V:
        !            23:                        set sort = (/usr/lib/rvsort)
        !            24:                        set lpr = (/usr/ucb/lpr -Pvarian)
        !            25:                        shift argv
        !            26:                        goto top
        !            27:                case -W:
        !            28:                        set sort = (/usr/lib/vsort -W)
        !            29:                        set lpr = (/usr/ucb/lpr -Pversatec)
        !            30:                        shift argv
        !            31:                        goto top
        !            32:                case -F:
        !            33:                        if ($#argv < 2) then
        !            34:                                echo -F takes following font name.
        !            35:                                exit(1)
        !            36:                        endif
        !            37:                        set argv=(-1 $2.r -2 $2.i -3 $2.b $argv[3-])
        !            38:                        goto top
        !            39:                case -1:
        !            40:                case -2:
        !            41:                case -3:
        !            42:                        if ($#argv < 2) then
        !            43:                                echo $1 takes following font name.
        !            44:                                exit(1)
        !            45:                        endif
        !            46:                        if (! -r /usr/lib/fontinfo/$2) then
        !            47:                                if (! -r /usr/lib/fontinfo/$2.r) then
        !            48:                                        echo ${2}: font not found.
        !            49:                                        exit(1)
        !            50:                                endif
        !            51:                                set argv[2] = $2.r
        !            52:                        endif
        !            53:                        if ($#fonts == 0) then
        !            54:                                set fontf=/usr/tmp/fnt$$
        !            55:                                cp /dev/null $fontf
        !            56:                        endif
        !            57:                        @ fnum = 0 - $1
        !            58:                        echo .nr p $fnum >> $fontf
        !            59:                        cat /usr/lib/fontinfo/$2 >> $fontf
        !            60:                        set fonts=($fonts $1 $2)
        !            61:                        shift argv
        !            62:                        shift argv
        !            63:                        goto top
        !            64:                case -x:
        !            65:                        set macp=()
        !            66:                        shift argv
        !            67:                        goto top
        !            68:                case -*:
        !            69:                        set flags = ($flags $argv[1])
        !            70:                        shift argv
        !            71:                        goto top
        !            72:                endsw
        !            73:        endif
        !            74: if ($#argv == 0) then
        !            75:        set argv=(-)
        !            76:        set banner=vtroff
        !            77: else
        !            78:        set banner=$argv[1]
        !            79: endif
        !            80: if ($?t) then
        !            81:     /usr/bin/troff -t -rv1 $flags $macp $fontf $* | $sort $length
        !            82: else
        !            83:     /usr/bin/troff -t -rv1 $flags $macp $fontf $* | $sort $length |\
        !            84:        $lpr -J$banner -t $fonts
        !            85: endif
        !            86: if ($#fontf) then
        !            87:     /bin/rm $fontf
        !            88: endif

unix.superglobalmegacorp.com

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