      logical function isrefe (reffie)
      integer*2 reffie(*)
      integer*2 dot
      integer*2 uscore
      integer ic
      integer jc
      integer kc
      integer stridx
      integer strldx
      integer strncp
      integer*2 icodes(10)
      integer*2 st0001(4)
      save
      integer iyy
      data (icodes(iyy),iyy= 1, 8) /120,121,122,118,110,111,109,117/
      data (icodes(iyy),iyy= 9,10) /119, 0/
      data st0001 /102,105,116, 0/
      data dot / 46 /
      data uscore / 95 /
         ic = strldx (dot, reffie)
         jc = 0
         if (.not.(ic .gt. 0)) goto 110
            kc = ic + 1
            if (.not.(strncp (reffie(kc), st0001, 3) .eq. 0)) goto 120
               ic = strldx (uscore, reffie)
120         continue
            if (.not.(ic .lt. kc)) goto 130
               jc = stridx (reffie(ic-1), icodes)
130         continue
110      continue
         isrefe = (jc .gt. 0)
         goto 100
100      return
      end
c     strncp  strncmp
c     reffie  reffile
c     isrefe  is_reffile
