	SUBROUTINE PRTREF (NFIRST, MAXCPL, NMIN)
C
C	   Print a reference on the "PDF Card"
C
C		NFIRST - first array location holding the reference
C		         information for this call; 2 locations (cards)
C		         always used, NFIRST and NFIRST+1
C		MAXCPL - maximum characters per screen line
C		NMIN   - minimum lines of reference that must be written
C
C	   By: Mark Holomany     Date: 15-Oct-1986
C
C
	IMPLICIT INTEGER (A-Z)

D	INCLUDE 'CURCRD.CMN'
D	INCLUDE 'IORET.CMN'

C\$INCLUDE:'CURCRD.CMN'
C\$INCLUDE:'IORET.CMN'

	CALL FSPLIT (RETCRD(NFIRST), MAXCPL-5, L, R)
	IF(L .LT. 1) THEN
	   IF(NMIN .LE. 0) GO TO 9000
	   L = 1
	ENDIF
	LREF2 = LENGTH (RETCRD(NFIRST+1))
	IF(LREF2 .LT. 1) THEN
	   LREF2 = 1
	   RETCRD(NFIRST+1)(1:1) = ' '
	ENDIF

	LREF1 = MAX0(R, LENGTH(RETCRD(NFIRST)))
	IF(R .GT. 0) THEN
	   LREF2 = MIN0(LREF2, MAXCPL-(80-R+1))
	ELSE
	   LREF2 = MIN0(LREF2, MAXCPL)
	ENDIF

	WRITE (NOUT,1201) RETCRD(NFIRST)(1:L)
	IF(R .GT. 0) THEN
	   WRITE (NOUT,1202) RETCRD(NFIRST)(R:LREF1), ' ',
	1                    RETCRD(NFIRST+1)(1:LREF2)
	ELSE IF(LREF2 .GE. 1) THEN
	   WRITE (NOUT,1202) RETCRD(NFIRST+1)(1:LREF2)
	ELSE
	   WRITE (NOUT,1203)
	ENDIF
1201	FORMAT(' Ref: ',A)
1202	FORMAT(' ',A,A,A)
1203	FORMAT(' ')

9000	RETURN
	END
