Annotation of 43BSDReno/old/vpr/rvtroff.sh, revision 1.1

1.1     ! root        1: #! /bin/csh -f
        !             2: #      @(#)vtroff.sh   1.3     7/12/81
        !             3: #
        !             4: #      $troffmachine is where the troffing will be done.
        !             5: set troffmachine = ucbdali
        !             6: #
        !             7: #      if the troff machine is not the local machine and it is up,
        !             8: #      use it otherwise troff (and sort) locally.
        !             9: if ( $troffmachine != `hostname` && `ruptime | grep -c "$remote.*up"` == 1) then
        !            10:        set troffsh = ( /usr/ucb/rsh $troffmachine )
        !            11: else
        !            12:        set troffsh = ( /bin/sh -c )
        !            13: endif
        !            14: umask 0
        !            15: set flags=() noglob length=() fonts=() fontf=()
        !            16: unset t
        !            17: set macp = (/usr/lib/tmac/tmac.vcat)
        !            18: set sort = (/usr/lib/rvsort)
        !            19: set vpr = (/usr/ucb/vpr)
        !            20: top:
        !            21:        if ($#argv > 0) then
        !            22:                switch ($argv[1])
        !            23:                case -t:
        !            24:                        set t
        !            25:                        shift argv
        !            26:                        goto top
        !            27:                case -l*:
        !            28:                        set length = $argv[1]
        !            29:                        shift argv
        !            30:                        goto top
        !            31:                case -V:
        !            32:                        set sort = (/usr/lib/rvsort)
        !            33:                        set vpr = (/usr/ucb/vpr)
        !            34:                        shift argv
        !            35:                        goto top
        !            36:                case -W:
        !            37:                        set sort = (/usr/lib/vsort -W)
        !            38:                        set vpr = (/usr/ucb/vpr -W)
        !            39:                        shift argv
        !            40:                        goto top
        !            41:                case -F:
        !            42:                        if ($#argv < 2) then
        !            43:                                echo -F takes following font name.
        !            44:                                exit(1)
        !            45:                        endif
        !            46:                        set argv=(-1 $2.r -2 $2.i -3 $2.b $argv[3-])
        !            47:                        goto top
        !            48:                case -1:
        !            49:                case -2:
        !            50:                case -3:
        !            51:                        if ($#argv < 2) then
        !            52:                                echo $1 takes following font name.
        !            53:                                exit(1)
        !            54:                        endif
        !            55:                        if (! -r /usr/lib/fontinfo/$2) then
        !            56:                                if (! -r /usr/lib/fontinfo/$2.r) then
        !            57:                                        echo ${2}: font not found.
        !            58:                                        exit(1)
        !            59:                                endif
        !            60:                                set argv[2] = $2.r
        !            61:                        endif
        !            62:                        if ($#fonts == 0) then
        !            63:                                set fontf=/usr/tmp/fnt$$
        !            64:                                cp /dev/null $fontf
        !            65:                        endif
        !            66:                        @ fnum = 0 - $1
        !            67:                        echo .nr p $fnum >> $fontf
        !            68:                        cat /usr/lib/fontinfo/$2 >> $fontf
        !            69:                        set fonts=($fonts $1 $2)
        !            70:                        shift argv
        !            71:                        shift argv
        !            72:                        goto top
        !            73:                case -x:
        !            74:                        set macp=()
        !            75:                        shift argv
        !            76:                        goto top
        !            77:                case -*:
        !            78:                        set flags = ($flags $argv[1])
        !            79:                        shift argv
        !            80:                        goto top
        !            81:                endsw
        !            82:        endif
        !            83: if ($#argv == 0) then
        !            84:        set argv=(-)
        !            85: endif
        !            86: if ($?t) then
        !            87:     /usr/ucb/soelim $macp $fontf $argv[*] \
        !            88:     | $rsh "/usr/bin/troff -t -rv1 $flags | $sort $length"
        !            89: else
        !            90:     /usr/ucb/soelim $macp $fontf $argv[*] \
        !            91:     | $rsh "/usr/bin/troff -t -rv1 $flags | $sort $length" \
        !            92:     | $vpr -t $fonts
        !            93: endif
        !            94: if ($#fontf) then
        !            95:        /bin/rm $fontf
        !            96: endif

unix.superglobalmegacorp.com

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