C******************** START FILE UCBUFP.FOR ; GROUP UEDTS2 ******************
C---------------------------------------------------------------
C& UCBUFP  SAVE LAST 3 UREAD INPUT LINES FOR DEBUG PURPOSES
C
      SUBROUTINE UCBUFP
C
      USE USERIO
C
C  RELEVANT VARIABLES--
C   NLINDI=.TRUE. INDIRECT INPUT FILE IS OPEN, SO SAVE INPUT LINES
C   NSAVED= NUMBER SAVED SO FAR
C   NCBUFP= MAX CAPACITY TO SAVE LINES
C   CBUFF-- CURRENT INPUT LINE
C
      IF(.NOT.NLINDI) RETURN
C
      IF(NSAVED.EQ.NCBUFP) GO TO 10
      NSAVED=NSAVED+1
C
 10   CONTINUE
      IF(NSAVED.EQ.1) GO TO 30
      DO 20 I=NSAVED,2,-1
      IM1=I-1
      CBUFFP(I)=CBUFFP(IM1)
 20   CONTINUE
 30   CONTINUE
      CBUFFP(1)=CBUFF
      RETURN
      END
C******************** END FILE UCBUFP.FOR ; GROUP UEDTS2 ******************
