#! /bin/csh -f
set noglob

# setenv OLD_OLWM

if ( ! -e '/devices' ) then
# set arch = 'sun4'
  echo ''
  echo ''
  echo  'This is the SOLARIS SEDIT version.'
  echo  'Please install the SUN OS 4.1.3 version on a new directory.'
  echo ''
  exit
else
  set arch = 'sparc'                  # Solaris 2
endif

if ( $?DISPLAY ) then
  if ( $?OPENWINHOME ) then
    set bin = 'xbin'                  # XVIEW version
  else
    set bin = 'mbin'                # MOTIF version
  endif
else
  set bin = 'cbin'                 # CURSES version
endif

set a = $0

#
# Test if symbolic link
#
#echo $a
#if ( -l $a ) then
#   set a = `ls -g $a | cut -d\> -f2`
#   set path = ( $path $a:h )
#endif

set b = $a:h
set c = $a:t

if ( $b == $c ) then
   set p = $cwd
else
   set p = $b
endif

source $p/set_ldpath

if ( $?DISPLAY ) then
  $p/$bin/$arch/xed  $argv  &
else
  $p/$bin/$arch/xed  $argv
endif
