*------------- Telecommunications & Signal Processing Lab --------------
*                          McGill University
*
*
* Module:
*     SUBROUTINE UNEND
*
*
* Purpose:
*     Terminate a Unix plot file
*
*
* Description:
*     This routine closes a standard Unix plot file.
*
*
* Parameters:
*     None
*
*
* Author / revision:
*     P. Kabal
*     $Revision: 1.4 $  $Date: 1995/03/08 15:29:51 $
*
*
*-----------------------------------------------------------------------

      SUBROUTINE UNEND


      INTEGER LUNUN
      CHARACTER*255 FNAMUN
      COMMON /UNCOM/ LUNUN,FNAMUN


* Close the Unix plot file
      IF (LUNUN.NE.6) THEN
        CLOSE (UNIT=LUNUN)
        CALL RELFUN(LUNUN)
      END IF

* Set the common area parameters to their default values
      LUNUN=-1
      FNAMUN='unplot.dat'


      RETURN

      END
