anchor.diff:  c
         include "implicit.inc"
   c
  +c...  parameter definitions
  +c
  +      include "ndimens.inc"
  +      include "nconsts.inc"
  +      include "rconsts.inc"
  +c
   c...  subroutine arguments
   c
  -      integer nstep,ndof,numnp,nwink,nhist,neq,numdif,lastep,iflag
  +      integer nstep,numnp,nwink,nhist,neq,numdif,lastep,iflag
         integer id(ndof,numnp),iwink(2,nwink),idhist(numnp)
         integer ibond(ndof,numnp)
         double precision b(neq),btot(neq),bond(ndof,numnp)
         double precision histry(nhist,lastep+1)
   c
  -c...  defined constants
  -c
  -      include "rconsts.inc"
  +c...  local constants
   c
         double precision cutoff
         parameter(cutoff=0.8d0)
  
positive.code: c
  c
        subroutine unlock(b,btot,id,iwink,idhist,ibond,bond,histry,
       & nstep,ndof,numnp,nwink,nhist,neq,numdif,lastep,iflag)
  c
  c       program to remove the winkler forces and leave the applied
  c       forces at a specified step.  code uses load history factors
  
negative.code: c
        do i=1,ndof
          do j=1,numnp
            if(id(i,j).ne.izero) then
              do k=1,nwink
                idk=iwink(2,k)
                if(id(i,j).eq.idk) then
                  mode=iwink(1,k)
                  if(mode.lt.izero) then
                    ihist=-mode
                    diff=histry(ihist,nstep+1)-histry(ihist,nstep)
                    if(diff.lt.-cutoff) then
                      if(iflag.eq.ione) then
                        idforc=ibond(i,j)
                        forc=bond(i,j)
                      else if(iflag.eq.itwo) then
                        idforc=idhist(j)
                        forc=zero
                        if(numdif.ne.izero) forc=bond(i,j)
                      end if
                      if(idforc.eq.izero) then
                        b(idk)=-btot(idk)+forc
                      else
                        b(idk)=-btot(idk)+forc*histry(idforc,nstep+1)
  