aboutsummaryrefslogtreecommitdiff
path: root/pkg/xtools/ranges/rgdump.x
blob: 97c3a89beb943aee161cb100055c51f85ee0a462 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.


include	<pkg/rg.h>

# RG_DUMP -- Dump the contents of a range structure.

procedure rg_dump (rg)

pointer	rg		# Ranges

int	i

begin
	if (rg == NULL)
	    call printf ("RG_DUMP: The range pointer is NULL\n")
	else {
	    call printf ("RG_DUMP: NPTS = %d, NRGS = %d\n")
		call pargi (RG_NPTS(rg))
		call pargi (RG_NRGS(rg))
	    do i = 1, RG_NRGS(rg) {
		call printf ("  %4d - %4d\n")
		    call pargi (RG_X1(rg, i))
		    call pargi (RG_X2(rg, i))
	    }
	}
	call flush (STDOUT)
end