! 07Jun1999 fgtok -impno -s r8_precision.sub r8_names.table "r8con.csh conversion"
      subroutine r8splinck(x, inx, ilinx, ztol, ier)
C...Translated by Pacific-Sierra Research VAST-90 2.06G2  10:50:51  10/ 1/01  
C...Switches: -p4 -yb
      implicit none
C-----------------------------------------------
C   D u m m y   A r g u m e n t s
C-----------------------------------------------
      integer inx, ilinx, ier
      real*8 ztol
      real*8, dimension(inx) :: x
C-----------------------------------------------
C   L o c a l   V a r i a b l e s
C-----------------------------------------------
      integer :: ix
      real*8 :: dxavg, zeps, zdiffx, zdiff
C-----------------------------------------------
C============
C idecl:  explicitize implicit INTEGER declarations:
C============
C idecl:  explicitize implicit REAL declarations:
C============
C
C
C
C
C  ier=1 is returned if x(1...inx) is NOT STRICTLY ASCENDING...
C
C-------------------------------
C
      ier = 0
      ilinx = 1
      if (inx <= 1) return 
c
      dxavg = (x(inx)-x(1))/(inx - 1)
      zeps = abs(ztol*dxavg)
c
      do ix = 2, inx
         zdiffx = x(ix) - x(ix-1)
         if (zdiffx <= 0.0D0) ier = 2
         zdiff = zdiffx - dxavg
         if (abs(zdiff) > zeps) ilinx = 2
      end do
c
      return 
      end subroutine r8splinck
