C	PRINTHEAD.FOR
C
C	PRINT_HEADING prints the heading at the top of a page and if there
C	is a title line, that is printed also.
C
	subroutine  print_heading

	implicit integer (a-z)

	include		'IODEF'

	character	heading * (40), title * (132), day*9, tme*9
	character	buffer * (20)

	common /listint/  line_count, page_number
	common /listchar/ day, tme, heading, title

130	format (t35, a, t88, a, 3x, a, t120, 'Page', i3,//)
140	format (a, /)

	buffer = ' '
	j = 21 - length (heading) / 2
	write (PRINT_CHAN, 130) buffer(1:j)//heading, day, tme, page_number

	k = length (title)
	if (k .gt. 1)  write (PRINT_CHAN, 140) title(1:k)

	return
	end
