      SUBROUTINE MFFT(C,N,NDIM,ISN,IERR)
      DIMENSION C(2),N(1)
      IF (IABS(ISN).NE.1) GO TO 40
      IF (NDIM.LE.0) GO TO 50
      NTOT=1
      DO 10 I=1,NDIM
   10 NTOT=N(I)*NTOT
      IF (NTOT.LT.1) GO TO 30
      ISIGN=ISN+ISN
      NSPAN=1
      DO 20 I=1,NDIM
      NSPAN=N(I)*NSPAN
      CALL SFFT(C,C(2),NTOT,N(I),NSPAN,ISIGN,IERR)
      IF (IERR.NE.0) RETURN
   20 CONTINUE
      RETURN
   30 IERR=1
      RETURN
   40 IERR=4
      RETURN
   50 IERR=5
      RETURN
      END
