C-----------------------------------------------------------------------
C  UPROMTX -- DO PROMPTING OUTPUT, WITH REVERSE VIDEO IF FLAG IS SET
C
      SUBROUTINE UPROMTX(ZBUFF,ILENP)
C
      CHARACTER*(*) ZBUFF	  ! STRING TO USE FOR PROMPTING
C
      INTEGER ILENP		  ! PASSED LENGTH (IF .GT. 0)
C
      INCLUDE 'USERIO'
C
C
      character*12 zfmt,zadvance
C--------------------------------------
C
      ILEN=LEN(ZBUFF)
      IF((ILENP.GT.0).AND.(ILENP.LT.ILEN)) ILEN=ILENP
C
C  REVERSE VIDEO OPTION
C
      ICHNG=0
      IF(NLRVID) CALL UTKSET(VIDCHS(1:NVIDCH),ICHNG)
C
CXX      if(nl1lin) then
CXX         zadvance="NO"
CXX      else
CXX         zadvance="YES"
CXX      endif
C
C  dmc: zadvance="NO" -- too many portability problems...
C
      zadvance="YES"            ! always
C
#ifdef __VMS
CXX      zadvance="YES"            ! ADVANCE="NO" doesn't work right on VMS
      zfmt = '(1x,A/1x$)'
#endif
#ifdef __UNIX
      zfmt = '(A)'
CXX  #ifndef __FUJITSU
CXX      zadvance="YES"            ! ADVANCE="NO" doesn't work on many unix either
CXX  #endif
#endif
C
      WRITE(LUNTRM,zfmt,ADVANCE=zadvance) ZBUFF(1:ILEN)
      call fort_flush(luntrm)
C
      IF(NLRVID) then
         CALL UTKSET('N',ICHNG)
CXX         if(zadvance.eq.'NO') write(luntrm,'(1x)',ADVANCE="NO")
      endif
C
      RETURN
      END
