C******************** START FILE URECHO.FOR ; GROUP UREAD5 ******************
C------------------------------------------------------
C& URECHO  ECHO LINE READ TO OUTPUT FILE AND/OR TTY
C  IF FLAGS ARE SET
C
      SUBROUTINE URECHO(INPUTL)
      USE USERIO
C
C
C  ECHO LINE TO INDIRECT OUTPUT FILE IF IT IS USER INPUT
C  AND IF WE ARE MAKING AN INDIRECT OUTPUT FILE
C
C  AND IF A LINE WAS READ IN ON THIS CALL TO UREAD
C
      ICHARC=MAX0(1,NCHARC)
C
      IF((.NOT.NLINDI).AND.(NLINDO).AND.(INPUTL.EQ.1)) THEN
        WRITE(LUNIDO,5000) CBUFF(1:ICHARC)
 5000   FORMAT(A)
        call fort_flush(lunido)
      ENDIF

C  ECHO LINE TO TERMINAL IF FLAG IS SET
      IF(NLECHO.AND.(.NOT.NLSKIP)) THEN
        WRITE(LUNTRM,5001) CBUFF(1:ICHARC)
 5001   FORMAT(1X,A)
        call fort_flush(luntrm)
      ENDIF

      RETURN
      END
C******************** END FILE URECHO.FOR ; GROUP UREAD5 ******************
