C+
C NAME:
C	iPutFileSpec
C PURPOSE:
C	Deconstruct file names into components
C CALLING SEQUENCE:
	function iPutFileSpec(nFrst,nLast,cSpec)
C INPUTS:
C OUTPUTS:
C CALLS:
C	iFileStructure, iSetFileSpec
C INCLUDE:
	include		'filparts.h'	
C PROCEDURE:
C MODIFICATION HISTORY:
C	JUN-1995, Paul Hick (UCSD/CASS; pphick@ucsd.edu)
C-
	    integer	nFrst
	    integer	nLast
	    character	cSpec*(*)

	character	FileSpec(FIL__NPARTS)*(FIL__LENGTH)
	character	SpecSave(FIL__NPARTS)*(FIL__LENGTH)

	I = iFileStructure(0,SpecSave)	! Get old structure
	I = iSetFileSpec(cSpec)		! Parse input spec
	I = iFileStructure(0,FileSpec)	! Get new structure

	iFrst = max(nFrst,1)
	iLast = min(nLast,FIL__NPARTS)
	if (iLast .le. 0) iLast = FIL__NPARTS

	do I=iFrst,iLast		! Update old structure
	    if ( (I .eq. FIL__TYPE .and. FileSpec(I) .ne. '.') .or.
     &		 (I .ne. FIL__TYPE .and. FileSpec(I) .ne. ' ') ) SpecSave(I) = FileSpec(I)
	end do

	iPutFileSpec = iFileStructure(1,SpecSave)	! Put back updated old structure

	return
	end
