      subroutine wlog (string)
      character*(*) string

c     This output routine is ued to replace the PRINT statement
c     for output that "goes to the terminal", or to the log file.
c     If you use a window based system, you can modify this routine
c     to handle the running output elegantly.
c     Handle carriage control in the string you pass to wlog.
c
c     The log file is also written here, hard coded here.

c     The log file is unit 11.  The log file is opened in the
c     main program, program feff.

c     make sure not to write trailing blanks


   10 format (a)

      il = istrln (string)
      if (il .eq. 0)  then
         print10
         write(11,10)
      else
         print10, string(1:il)
         write(11,10) string(1:il)
      endif
c ----------------- inserted call to flush Simon J. GEORGE 17-Feb-2000
      call flush
c ----------------- 
      return
      end
