*------------- Telecommunications & Signal Processing Lab --------------
*                          McGill University
*
*
* Module:
*     LOGICAL FUNCTION TTYFUN (LUN)
*
*
* Purpose:
*     Determine if a Fortran unit is connected to a terminal
*
*
* Description:
*     This function determines if the device connected to a given
*     Fortran unit number is a terminal.
*
*
* Parameters:
* L <-  TTYFUN - Returned logical value,
*                TRUE  - A terminal is associated with unit LUN
*                FALSE - A terminal is not associated with unit LUN
*
* I ->  LUN    - Fortran unit number
*
*
* Author / revision:
*     P. Kabal
*     $Revision: 1.4 $  $Date: 1995/03/08 15:08:19 $
*
*
*-----------------------------------------------------------------------

      LOGICAL FUNCTION TTYFUN (LUN)


      INTEGER LUN

      LOGICAL ISATTY


      TTYFUN = ISATTY(LUN)


      RETURN

      END
