anchor.diff:        thr(2) = 0.01d0
         thr(3) = 0.001d0
         flttyp = 1
  -      call autohalfspace(vp,vs,dens)
  +      call autohaf(vp,vs,dens)
         stdp = depth
         do 903 dir = 1,4
             lo = hylo
  
positive.code: 
  C----------------------------------------------------------------------C
  
        SUBROUTINE readhaffile(haffile,vp,vs,dens)
  C----
  C Read vp, vs, dens from half-space file, or use default values.
  C----
        IMPLICIT NONE
        CHARACTER*40 haffile
        REAL*8 vp,vs,dens
        INTEGER kffm,kflt,kmag,ksta,khaf,ktrg
        COMMON /ICHECK/ kffm,kflt,kmag,ksta,khaf,ktrg
        if (khaf.eq.0) then
            call autohalfspace(vp,vs,dens)
        elseif (khaf.eq.1) then
            open(unit=11,file=haffile,status='old')
            read(11,*) vp,vs,dens
        endif
        RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE autohalfspace(vp,vs,dens)
        IMPLICIT NONE
        REAL*8 vp,vs,dens
        vp = 6800.0d0
        vs = 3926.0d0
        dens = 2800.0d0
        RETURN
        END
  
  C----------------------------------------------------------------------C
  
        SUBROUTINE readsrc(ffmfile,fltfile,magfile,nflt,evlo,evla,evdp,
       1                   str,dip,rak,dx,dy,slip,hylo,hyla)
  C----
  C Read shear dislocation parameters from fault source files. Parameter
  C FMAX defines maximum number of shear dislocations that can be stored.
  C----
        IMPLICIT NONE
        CHARACTER*40 ffmfile,fltfile,magfile
        INTEGER nflt,FMAX
        PARAMETER (FMAX=1500)
        REAL*8 evlo(FMAX),evla(FMAX),evdp(FMAX),str(FMAX),dip(FMAX),
  
negative.code:      1                             'require target faults'
                call usage('!! Use -trg TRGFILE or -trg S/D/R/F')
            elseif (ktrg.eq.1) then
                inquire(file=trgf,EXIST=ex)
                if (.not.ex) then
                    write(*,*) '!! Error: No target fault file found'
                    call usage('!! Looked for TRGFILE: '//trgf)
                endif
                call linecount(trgf,ntrg)
            elseif (ktrg.eq.2) then
                do 911 i = 1,3
                    ptr = index(trgf,'/')
                    trgf(ptr:ptr) = ' '
    911         continue
                ntrg = 1
            endif
  