anchor.diff:  c
   c...  subroutine arguments
   c
  -      integer nen,ngauss,maxvfamilies,nvfamilies,nprestrflag,numelv
  -      integer numnp,nstatesz,nstatesz0,npropsz,kr,kw,kp,idout,idsk,ierr
  -      integer infmatmod(6,nmatmodmax),ivflist(3,maxvfamilies)
  -      integer ivfamily(5,nvfamilies),ivftmp(nvfamilies),ien(nen,numelv)
  -      integer indxiel(numelv)
  -      character ifile*(*),ofile*(*),pfile*(*),errstrng*(*)
  +      integer nen,numelv,numnp,nvfamilies,kr,ierr
  +      integer ien(nen,numelv),mat(numelv),infin(numelv)
  +      character ifile*(*),errstrng*(*)
   c
   c...  local variables
   c
  -      character*4 head(20)
  -      data head/20*'node'/
   c
   c...  intrinsic functions
   c
  -      intrinsic mod
   c
   c...  local variables
   c
  -      integer ifam,incstate0,nstate0max,nelfamily,j,matmod,nstate
  -      integer nstate0,nprop,i,n,ietypev,imat,inf,iloc,npage,ielf,ielg
  -      integer itmp(nenmax)
  +      integer i,j,n,ietypev
   cdebug      integer idb,jdb
   c
   cdebug      write(6,*) "Hello from read_connect_f!"
  -cdebug      write(6,*) "nen,ngauss,maxvfamilies,nvfamilies,nprestrflag:"
  -cdebug      write(6,*) nen,ngauss,maxvfamilies,nvfamilies,nprestrflag
  -cdebug      write(6,*) "numelv,numnp,nstatesz,nstatesz0,npropsz,kr,kw,kp:"
  -cdebug      write(6,*) numelv,numnp,nstatesz,nstatesz0,npropsz,kr,kw,kp
  -cdebug      write(6,*) "idout,idsk,ierr:"
  -cdebug      write(6,*) idout,idsk,ierr
  +c
         call ifill(ien,izero,nen*numelv)
  -      call ifill(ivfamily,izero,5*nvfamilies)
  -      ifam=izero
  -      nstatesz=izero
  -      nstatesz0=izero
  -      npropsz=izero
  -      incstate0=izero
  -      nstate0max=izero
  -      nelfamily=izero
  -      if(nprestrflag.ne.izero) incstate0=ione
         ierr=izero
  -c
  -c...  set up element family information array (ivfamily)
  -c
  -      do j=1,maxvfamilies
  -cdebug        write(6,*) "j,ivflist:",j,ivflist(1,j),ivflist(2,j)
  -        if(ivflist(1,j).ne.izero) then
  -          ifam=ifam+ione
  -          if(ifam.eq.ione) then
  -            ivftmp(ifam)=ione
  -          else
  -            ivftmp(ifam)=ivftmp(ifam-ione)+nelfamily
  -          end if
  -          nelfamily=ivflist(1,j)
  -          matmod=ivflist(3,j)
  -          ivfamily(1,ifam)=nelfamily
  -          ivfamily(2,ifam)=matmod
  -          nstate=infmatmod(2,matmod)
  -          nstate0=infmatmod(6,matmod)
  -          nstate0max=max(nstate0max,nstate0)
  -          nprop=infmatmod(3,matmod)
  -          ivfamily(3,ifam)=nstatesz+ione
  -          ivfamily(4,ifam)=nstatesz0+ione
  -          ivfamily(5,ifam)=npropsz+ione
  -          nstatesz=nstatesz+nstate*ngauss*nelfamily
  -          nstatesz0=nstatesz0+incstate0*nstate0*ngauss*nelfamily
  -          npropsz=npropsz+nprop
  -cdebug          write(6,*) "ifam,ivftmp(ifam),nelfamily,matmod:"
  -cdebug          write(6,*) ifam,ivftmp(ifam),nelfamily,matmod
  -        end if
  -      end do
  -c
  -c...  set size of state0 array if there are no prestresses
  -c
  -      if(nprestrflag.eq.izero) nstatesz0=ngauss*nstate0max
   c
   c...  read connectivity, material number, and infinite element info
   c
         open(kr,file=ifile,status="old",err=20)
         call pskip(kr)
         do i=1,numelv
  -        read(kr,*,end=30,err=30) n,ietypev,imat,inf,(itmp(j),j=1,nen)
  -        ifam=imat
  -        matmod=ivfamily(2,ifam)
  -cdebug        write(6,*) "i,n,ietypev,imat,inf,ifam,matmod:"
  -cdebug        write(6,*) i,n,ietypev,imat,inf,ifam,matmod
  +        read(kr,*,end=30,err=30) n,ietypev,mat(i),infin(i),
  +     &   (ien(j,i),j=1,nen)
   c
   c...  check for illegal element type
   c
  
positive.code:         close(kr)
          return
  c
  c...  error opening output file
  c
   40   continue
          ierr=2
          errstrng="read_connect"
          close(kw)
          close(kp)
          return
  c
  c...  error writing to output file
  c
   50   continue
          ierr=4
          errstrng="read_connect"
          close(kw)
          close(kp)
          return
  c
  1000  format(30i7)
  2000  format(1x,///,
       x          ' e l e m e n t  d a t a ',//,5x,
       x          ' element    material  element  number  ',20(a4,i2,4x))
  2500  format(5x,'             number     type   gauss  ',/,
       x       5x,'                               points  ',/)
  3000  format(6x,i7,25(5x,i7))
  4000  format(//)
  c
        end
  c
  c version
  c $Id: read_connect.f,v 1.9 2005/04/05 22:39:56 willic3 Exp $
  c
  c Generated automatically by Fortran77Mill on Wed May 21 14:15:03 2003
  c
  
negative.code: c
  c...  check for illegal material type or material model
  c
          if(mat(i).le.izero.or.mat(i).gt.nvfamilies) then
            ierr=107
            errstrng="read_connect"
            return
          end if
        end do
        close(kr)
  c
  c......test for zero or out-of-bound entries in ien array
  c
  