C---------------------------------------------------------------------
	SUBROUTINE INFOUT
C---------------------------------------------------------------------
C  Subroutine to "write out" new file info from the "current array"
C  into the main data arrays
C---------------------------------------------------------------------
	include 'shared$common'

C increment the current number of files
	MFILE = MFILE + 1
	FEXISTS(MFILE) = .false.
	FXTYP(MFILE) = AXTYP
	FYTYP(MFILE) = AYTYP
	OFILNAM(MFILE) = AOFNAM

	CFILNAM(MFILE) = ACFNAM
	IF (.not. PROMPT) then
	  len = lench(acfnam)
	  WRITE (LO,10) acfnam(:len)
10	  FORMAT (/' Enter name for output file:'/,'$(Default=',A,'): ')
	  READ (LI,'(a)') CFILNAM(MFILE)
	  len = lench(CFILNAM(MFILE))
	  if (len .le. 0) CFILNAM(MFILE) = ACFNAM
	ENDIF
	
	START(MFILE)=CSTR
	FINISH(MFILE)=CFIN
	DELTA(MFILE)=DELR
	MONO(MFILE)=KA12S
	WAVE(MFILE) = WVB
	WKA1(MFILE) = WV1
	WKA2(MFILE) = WV2
	TIME(MFILE) = PTIME
	REFINT(MFILE) = REFPT

	NP=NF-NS+1
	NPOINT(MFILE)=NP
	J=NS-1
	DO I=1,NP
	  J=J+1
	  B(I,MFILE)=A(J)
	  BESD(I,MFILE) = AESD(J)
	  BX(I,MFILE) = AX(J)
	ENDDO
	ATITLE(MFILE) = TITLE
C no background points
	nbkgp(mfile) = 0
C no peaks
	NPKS(MFILE)=0
	RETURN
	END
