if ( $?VERBOSE_INIT ) echo "sourcing $HOME/.cshrc..."

# 
# to make rsh work ??  Or does .ttyrc take care of it?
#
if ($?TERM == 0) then
    set term=dumb
endif


# Set up some variables myself describing the system I'm running on.
# These are set in /usr/local/lib/.tcshrc on AI, but I'm going to set them
# here to accomodate: (1) csh, (2) other systems.
if ( -x /bin/uname ) then
  setenv OS `/bin/uname -s`
  setenv ARCH `/bin/uname -m`
  if ( `uname -m | awk '/i.86/'` != "" ) then
    setenv MACHINE pc
  else if ( $OS == IRIX || $OS == IRIX64 ) then
    setenv MACHINE sgi
  else
    setenv MACHINE unknown
  endif
else
  # need to set them to nulls so I don't err below when I use them.
  setenv OS
  setenv ARCH
  setenv MACHINE
endif


###########################################################################
#
# call other startup scripts
#

if ( -f /usr/local/lib/.envrc ) then
  # this will call my .path
  source /usr/local/lib/.envrc
else
  if ( -f $HOME/.path ) then
    source $HOME/.path
  endif
endif

if ( -f $HOME/.site-specific ) then
  source $HOME/.site-specific
endif


###########################################################################
#
# Munge the SHLVL:
#
if ( $?SHLVL ) then
  #
  # If tcsh invocation, don't bother with SHLVL, since it is 
  # automatically handled.
  #
  if ( ! $?tcsh ) then
    #
    # increment shell level
    #
    @ temp = ($SHLVL + 1)
    setenv SHLVL $temp
    unset temp
  endif
else
  #
  # shell level initialization
  #
  setenv SHLVL 1
endif
set shlvl=$SHLVL

source $HOME/.aliases

set path=(`echo $PATH | tr ':' ' '`)	# explode PATH env variable


if ( $?VERBOSE_INIT ) echo "done with $HOME/.cshrc..."
