include	clib.inc
ifdef __TE__
include	dobj.inc
include	tinfo.inc
include	dos.inc
include	io.inc

	public	tiftime	; AX: tinfo

_TEXT	SEGMENT

tiftime PROC
	push si
	mov si,ax
	.if func(osopen,[si.ti_file],0,M_RDONLY,A_OPEN) != -1
	    push ax
	    invoke getftime,ax
	    pop cx
	    push dx
	    push ax
	    invoke close,cx
	    pop ax ; time
	    pop dx ; date
	.else
	    or [si.ti_flag],_T_MODIFIED
	    inc ax
	    cwd
	.endif
	test ax,ax
	pop si
	ret
tiftime	ENDP

_TEXT	ENDS
endif
	END
