Annotation of researchv10dc/cmd/mm.sh, revision 1.1

1.1     ! root        1: #      MMSID (@(#)mm.sh        1.20)
        !             2: execf=no
        !             3: if test $# = 0;                then help text3 >&2;    exit 1; fi
        !             4: trap 'trap 0; if test "$m" = 0; then mesg y; fi; exit $z' 0
        !             5: trap 'trap 0; if test "$m" = 0; then mesg y; fi; exit 1' 1 2 3 15
        !             6: if test -t;    then mesg 2>/dev/null;  m=$?;   mesg n; else m=1; fi
        !             7: PATH=/bin:/usr/bin:/usr/lbin
        !             8: TERM=${TERM-450};  t=0;  v=0;  y=0;  g="";  h="-h";  w="";     u="-mm"
        !             9: while test -n "$1" -a ! -r "$1"
        !            10: do case $1 in
        !            11:        -T*)    TERM=`echo -- $1 | sed "s/-T//"` ;;
        !            12:        -12)            y=1 ;;
        !            13:        -e)             e=neqn ;;
        !            14:        -t)             f=tbl ;;
        !            15:        -c)             c=c ;;
        !            16:        -E)             a="$a -e" ;;
        !            17:        -x)             execf=yes ;;
        !            18:        -y)             u=-mm ;;
        !            19:        -)              break ;;
        !            20:        *)              a="$a $1" ;;
        !            21:    esac
        !            22:    shift
        !            23: done
        !            24: if test -z "$1";       then echo "mm: no input file" >&2;              z=1;    exit;   fi
        !            25: case "$TERM" in
        !            26:        300|300s|450|37|300-12|300s-12|450-12|4000a|382|X)      ;;
        !            27:        4014|tek)       g="|4014" ;;
        !            28:        1620)   TERM=450 ;;
        !            29:        1620-12)        TERM=450-12 ;;
        !            30:        hp|2621|2640|2645)      v=1;    c=c;    a="-u1 $a";     g="|hp";        TERM=hp ;;
        !            31:        735|745|43|40/4|40/2)   v=1;    c=c ;;
        !            32:        2631|2631-c|2631-e)     v=3;    c=c ;;
        !            33:        *)      TERM=lp;        v=1;    c=c ;;
        !            34: esac
        !            35: if test \( "$y" = 1 \) -a \( "$TERM" = 300 -o "$TERM" = 300s -o "$TERM" = 450 \)
        !            36:        then TERM="$TERM"-12
        !            37: fi
        !            38: if test "$c" = c
        !            39: then
        !            40:        case "$TERM" in
        !            41:                300|300s|450|4014|tek)  g="|col -f|greek -T$TERM" ;;
        !            42:                300-12|300s-12|450-12)  g="|col -f|greek -T$TERM";      w="-rW72" ;;
        !            43:                37|4000a|382|X) g="|col -f" ;;
        !            44:                hp)     g="|col|hp" ;;
        !            45:                2631-c|2631-e)  g="|col -p" ;;
        !            46:                735|745)        g="|col -x" ;;
        !            47:                43)     g="|col -x";    w="-rW75" ;;
        !            48:                40/4|40/2)      g="|col -b" ;;
        !            49:                lp|2631)        g="|col" ;;
        !            50:        esac
        !            51:        h=""
        !            52:        if test "$v" = 0;       then v=2;       fi
        !            53: fi
        !            54: d="$*"
        !            55: if test "$d" = "-";    then shift;             d="";   fi
        !            56: if test -n "$f"
        !            57:        then    if test "$v" = 1 -o "$v" = 3
        !            58:                        then f="tbl -TX $*|"
        !            59:                        else f="tbl $*|"
        !            60:                fi
        !            61:                d=""
        !            62: fi
        !            63: if test -n "$e"
        !            64:        then    if test -n "$f"
        !            65:                        then e="neqn /usr/pub/eqnchar -|"
        !            66:                        else    if test -z "$*"
        !            67:                                        then e="neqn /usr/pub/eqnchar -|"
        !            68:                                        else e="neqn /usr/pub/eqnchar $*|"
        !            69:                                fi;     d=""
        !            70:                fi
        !            71: fi
        !            72: if test "$TERM" = 4014 -o "$TERM" = hp;                then v=2;       fi
        !            73: case "$v" in
        !            74:        1)      TERM=lp ;;
        !            75:        2)      TERM=37 ;;
        !            76: esac
        !            77: if test "$execf" = "yes"
        !            78:        then exec sh -c "eval \"$f $e nroff $u $w -T$TERM $h $a $d $g\""
        !            79:        else eval "$f $e nroff $u $w -T$TERM $h $a $d $g";      z=0;    exit
        !            80: fi

unix.superglobalmegacorp.com

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