anchor.diff:  c
    30   continue
           ierr=3
  +        errstrng="read_winkx"
           close(kr)
  +        return
  +c
  +c...  error opening output file
  +c
  + 40   continue
  +        ierr=2
  +        errstrng="read_winkx"
  +        close(kw)
  +        return
  +c
  +c...  error writing to output file
  +c
  + 50   continue
  +        ierr=4
  +        errstrng="read_winkx"
  +        close(kw)
           return
   c
    2005 format(/)
  
positive.code:             winkx(nwxtot)=wxtmp(j)
            end if
          end do
          if(idout.gt.0.and.nnz.ne.0) then
            if(mod(nlines,npage).eq.0) then
              write(kw,2000)
              write(kw,3000) (labeld(il),il=1,ndof)
              write(kw,2005)
            end if
            nlines=nlines+1
            write(kw,2020) n,(wxtmp(il),iwxtmp(il),il=1,ndof)
          end if 
        end do
        close(kr)
        if(idout.gt.0) close(kw)
  c
  c...  normal return
  c
  
negative.code: c
  c...  open output file
  c
        ierr=izero
        if(idout.gt.izero) open(kw,file=ofile,err=40,status="old",
       & access="append")
  c
  c...  open input file
  c
        if(nwinkx.eq.izero) return
        open(kr,file=wxfile,status="old",err=20)
  c
  c.......read winkler force data and output results, if desired
  c
        call pskip(kr)
        nwxtot=izero
        nlines=izero
        npage=50
        do i=1,nwinkxe
          read(kr,*,err=30,end=30) n,(iwxtmp(j),j=1,ndof),
       &   (wxtmp(j),j=1,ndof)
          nnz=izero
          do j=1,ndof
            wxtmp(j)=wxscal(j)*wxtmp(j)
            if(iwxtmp(j).ne.izero) then
              nnz=nnz+1
              nwxtot=nwxtot+1
              iwinkx(1,nwxtot)=iwxtmp(j)
  