     	SUBROUTINE DEFEXT( FNAME, EXT )
C
C  PROGRAMMER:  R.S. ZHOU
C		ALFRED UNIVERSITY, MAY-1987
C
C	THIS ROUTINE ATTACHES THE DEFAULT FILE EXTENSION
C	"EXT" TO A FILE "FNAME" MISSING ITS FILE EXTENSION.
C
     	CHARACTER FNAME*(*), EXT*(*)

     	IF( FNAME.EQ.' ' ) RETURN
     	N = INDEX( FNAME, ']' ) + 1
     	N = INDEX( FNAME(N:), '.' )
     	IF( N.GT.0 ) RETURN		!WITH FILE EXTENSION
     	N = INDEX( FNAME, ' ' )
     	FNAME(N:N) = '.'
     	FNAME(N+1:) = EXT
     	RETURN
     	END
