: '@(#)vnmr_textedit.sh 16.1 10/25/02 Copyright (c) 1991-1996 Varian Assoc.,Inc. All Rights Reserved'
# 
# Varian Assoc.,Inc. All Rights Reserved.
# This software contains proprietary and confidential
# information of Varian Assoc., Inc. and its contributors.
# Use, disclosure and reproduction is prohibited without
# prior consent.
#

common_env() {
    ostype=`uname -s`
    osmajor=`uname -r | awk 'BEGIN { FS = "." } { print $1 }'`

    if [ $osmajor -lt  5 ]
    then
        svr4="n"
    else
        svr4="y"
        ostype="solaris"
    fi
}

nnl_echo() {
    if test x$svr4 = "x"
    then
        echo "error in echo-no-new-line: svr4 not defined"
        exit 1
    fi

    if test $svr4 = "y"
    then
        if test $# -lt 1
        then
            echo
        else
            echo "$*\c"
        fi
    else
        if test $# -lt 1
        then
            echo
        else
            echo -n $*
        fi
    fi
}

common_env
if [ x$graphics = "xsun" ]
then
    /usr/dt/bin/dtpad $*
else
    echo "textedit is only available in a GUI environment"
    nnl_echo "press Return to continue: "
    read a
fi
