c-----------------------------------
c file: icsevu.f
c
c purpose: replaces imsl routine by same name
c
c------------------------------------
      subroutine icsevu(x, y, nold, c, kjx, xnew, ynew, nnew, ier)
C...Translated by Pacific-Sierra Research VAST-90 2.06G2  10:50:51  10/ 1/01  
C...Switches: -p4 -yb
      use kind_spec

      implicit none
C-----------------------------------------------
C   D u m m y   A r g u m e n t s
C-----------------------------------------------
      integer nold, kjx, nnew, ier
      real(kind=dp), dimension(nold) :: x, y
      real(kind=dp), dimension(kjx,3) :: c
      real(kind=dp), dimension(nnew) :: xnew, ynew
C-----------------------------------------------
C   L o c a l   V a r i a b l e s
C-----------------------------------------------
      integer :: k, i, jer, ker
      real(kind=dp) :: d
C-----------------------------------------------
      do k = 1, nnew
         call bcspefnd (x, nold, xnew(k), i)
         d = xnew(k) - x(i)
         ynew(k) = ((c(i,3)*d+c(i,2))*d+c(i,1))*d + y(i)
         if (xnew(k) < x(1)) jer = 33
         if (xnew(k) > x(nold)) ker = 34
      end do
      ier = max0(jer,ker)
c     if (jer > 0) call uertst (jer, 6Hicsevu)
c     if (ker > 0) call uertst (ker, 6Hicsevu)
      return 
      end subroutine icsevu
