#   Generic .login file
#
#   We ensure that the the terminal type is set (interactively if
#   necessary) and that the standard environment variables get set.
#
#   Note that there is nothing specific to the ALIAS environment
#   in this file, and that all aliases should appear in the .cshrc file.

onintr resettty
set noglob

if ($?term == 0) then
    set term=unknown
endif

if ($term == unknown || $term == network) then
    echo -n "Terminal type? [4d=4D console, v=vt52, w=wyse30, i=iris, other ] "

    set term=$<
    if ($term == "") then
        set term = dumb
    else
        switch ($term)
        case "v":
            set term=vt52
            breaksw
        case "w":
            set term = wy30
            breaksw
        case "4d":
        case "ia":
            set term=iris-ansi
            breaksw
        case "i":
            set term=wsiris
            breaksw
        endsw
    endif
endif

setenv MORE          -c

setenv PAGER     /usr/bsd/more
if (`/bin/tty` == /dev/console) then
    xset m 5 2
endif

stty erase ^H kill ^U intr ^C echoe 

# Set environment variables (-s), suppress ouputting
# terminal initialization strings (-I) and suppress
# kill and erase character messages (-Q) when executing tset.

eval `tset -sIQ`    

unset noglob
exit 0

resettty:
unset noglob
exit 1
