	subroutine dgxplt(iac, iun, ivl, idm, xpl, ypl)
c**  Purpose:	SDL -> PostScript printer interface subroutine
c**
c**  Author:	Rex Sanders, USGS Pacific Marine Geology, 2/87
	integer	iac, iun, ivl, idm
	real	xpl(idm), ypl(idm)

c**  SDL common block
	common /dgsdlp/ ipentp, ipenlt, ipenbl, xold, yold, iflbld
	integer		ipentp, ipenlt, ipenbl,             iflbld
	real					xold, yold

c**  ccps common block
	common /cqpbnf/ xdum, ydum, fac, ires
	save   /cqpbnf/
	real            xdum, ydum, fac
	integer                          ires

c**  Local variables
	integer i

c**  Switch on input value of iac - 1..5 (6 ignored)
c**  Draw regular or bold line
	if (iac .eq. 1 .or. iac .eq. 2) then
	    if (iac .eq. 1) call newpen(ipenlt)
	    if (iac .eq. 2) then
		if (ipenlt .ne. ipenbl) then
		    call newpen(ipenbl)
		else
		    call newpen(3)
		endif
	    endif

	    call plot(xpl(1), ypl(1), 3)

	    do 100 i = 2, (ivl - 1)
		call pliout(nint(xpl(i)*fac*ires))
		call plcout(32)
		call pliout(nint(ypl(i)*fac*ires))
		call plsout(" L\n")
100	    continue

	    call plot(xpl(ivl), ypl(ivl), 2)

c**  Initiate plotting
	else if (iac .eq. 3) then
	    call plots(0, 0, 8)
	
c**  New page
	else if (iac .eq. 4) then
	    call plsout("gsave showpage grestore\n")

c**  Terminate plotting
	else if (iac .eq. 5) then
	    call plot(0.0, 0.0, 999)
	end if

	return
	end
