anchor.diff:        FMA = FLOAT(MA)
         MX = (ALOG10(FMA)/ALOG10(2.))- 1
       1 NMX = 2**(MX+1)
  -      IF (MA  .LE. NMX) GO TO 11
  +      if (MA .LE. NMX) go to 11
         MX = MX + 1
  -      GO TO 1
  +      go to 1
      11 NCARDS = (NV-1)/NPL + 1
         JL=NPL*NCARDS-NV
         NV = NV + 1
         N = 0
         LC = 0
  -      WRITE(6,2024)
  -      DO 31 I = 1,NCARDS
  +      write(6,2024)
  +      do 31 I = 1,NCARDS
         LC = LC + 1
  -      READ(8,FMAT) (XR(J), J=1,NPL)
  -      IF(I.NE.NCARDS) GO TO 6
  -      IF(JL.EQ.0) GO TO 6
  +      read(8,FMAT) (XR(J), J=1,NPL)
  +      if (I .NE. NCARDS) go to 6
  +      if (JL .EQ. 0) go to 6
         JL=NPL+1-JL
  -      DO 5  J=JL,NPL
  +      do 5  J=JL,NPL
       5 XR(J)=0.
   C---------------------------------------------------------------
   C  ONLY PRINT OUT A FEW OF THE FIRST AND THE LAST LINES of Input Motion
   C---------------------------------------------------------------
       6 ICHECK = NCARDS - I
  -      IF (I .LE. 5 .OR. ICHECK .LT. 5) WRITE(6,2008) I,(XR(J), J=1,NPL)
  -        IF (I .EQ. 10) WRITE (6,2009)
  - 2009 FORMAT(3X,'........ INPUT MOTION READ NOT ECHOED...........')
  -C     ENDIF
  +      if (I .LE. 5 .OR. ICHECK .LT. 5) write(6,2008) I,(XR(J), J=1,NPL)
  +        if (I .EQ. 10) write (6,2009)
  + 2009 format(3X,'........ INPUT MOTION READ NOT ECHOED...........')
  +C     endIF
   C
   C   FIND MAX. INPUT ACC. (XMAX)
   C
  -  311 DO 31 J = 1,NPL,2
  +  311 do 31 J = 1,NPL,2
         N = N + 1
         X(N) = CMPLX(XR(J),XR(J+1))
  -   31 CONTINUE
  -      CLOSE (8)
  +   31 continue
  +      close (8)
         N = N + 1
  -      DO 32 I = N,MFOLD
  +      do 32 I = N,MFOLD
      32 X(I) = 0.
  -      CALL XMX(X,MA,XM,NXMAX)
  -      IF (XMAX.LT. .000001) GO TO 300
  +      callXMX(X,MA,XM,NXMAX)
  +      if (XMAX.LT. .000001) go to 300
         XF = XMAX/XM
  -  300 DO 30 I = 1,N
  +  300 do 30 I = 1,N
      30 X(I) = X(I)*XF
         XMAX = XM*XF
         TMAX = FLOAT(NXMAX-1)*DT
  -      WRITE(6,2014) XM,TMAX,XF,XMAX
  -C
  -      CALL RFFT(X,MX,INV,S,IFERR,1)
  +      write(6,2014) XM,TMAX,XF,XMAX
  +C
  +      callRFFT(X,MX,INV,S,IFERR,1)
   C
   C   REMOVE FREQUENCIES ABOVE FMAX AND FIND MAX. ACC. OF NEW MOTION
   C
  
positive.code:       NS = NAA + 2*MAMAX
        NINV = NS + NAX/8 + 1
        NTOT = NINV + NAX/8 + 1
        IF (SKO .LT. .000001)   SKO = .45
        WRITE(6,2000) MAMAX, NTOT
  C
        CALL SHAKIT(X(1), X(NAX), X(NAA), X(NS), X(NINV))
  C
        STOP
  C ****************************************************
   1000 FORMAT(I5, F10.0)
   2000 FORMAT( 45H  MAX. NUMBER OF TERMS IN FOURIER TRANSFORM =   I10/
       1          45H  NECESSARY LENGTH OF BLANK COMMON X        =   I10)
        END
  C********************************************************************
        SUBROUTINE EARTHQ(X,AX,S,INV)
  C***********************************************************************
  C
  C   THIS ROUTINE  READS THE MOTION IN THE TIME DOMAIN, ADDS TRAILING
  
negative.code:      + 2X,'*             December 1991                               *'/
       + 2X,'***********************************************************')
  C
        write(*,200)
    200 format(4X,'Name of Input File =')
        read(*,10) FIN
  C
        write(*,300)
    300 format(4X,'Name of Output File #1 (input, peak values .. etc) =')
        read(*,10) FOUT
  C
        write(*,400)
    400 format(4X,'Name of Output File #2 (time histories .. etc) =')
        read(*,10) PUNCH
  C
     10 format(A32)
  C
        open(5,FILE=FIN,STATUS='OLD')
        open(6,FILE=FOUT,STATUS='NEW')
        open(7,FILE=PUNCH,STATUS='NEW')
  C
        write(6,100)
        WW = .0624
        GT = 32.2
        MAMAX=4096
  