
C **********************************************************************
C *                                                                    *
C *                         SUBROUTINE MYFLUSH                         *
C *                                                                    *
C * Emulates the SGI specific "flush" command with standard fortran    *
C * commands. Works on all machines except for HP and SUN.             *
C *                                                                    *
C * Input parameters:                                                  *
C *    channel: I/O-channel to be flushed                              *
C *                                                                    *
C * Output parameters: none                                            *
C *                                                                    *
C **********************************************************************


      subroutine myflush (channel)

      implicit none

      integer channel

C --- FLUSH THE OUTPUT BUFFER ---

      if ((channel .ne. 5) .and. (channel .ne. 6)) then
         endfile(channel)
         backspace(channel)
      endif

      return
      end
