aboutsummaryrefslogtreecommitdiff
path: root/sys/imio/tf/impnld.x
blob: b0f9bfd588a7d411a40277d36bc4d89bede0af8a (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
29
30
31
# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.

include	<imhdr.h>
include	<imio.h>

# IMPNL -- Put the next line to an image of any dimension or datatype.
# This is a sequential operator.  The index vector V should be initialized 
# before the first call to the first line to be written.  Each call increments 
# the leftmost subscript by one, until V equals IM_LEN, at which time EOF
# is returned.  Subsequent writes are ignored.

int procedure impnld (imdes, lineptr, v)

pointer	imdes
pointer	lineptr				# on output, points to the pixels
long	v[IM_MAXDIM]			# loop counter
int	npix
int	impnln()
extern	imflsd()
errchk	impnln

begin
	if (IM_FLUSH(imdes) == YES)
	    call zcall1 (IM_FLUSHEPA(imdes), imdes)

	npix = impnln (imdes, lineptr, v, TY_DOUBLE)
	if (IM_FLUSH(imdes) == YES)
	    call zlocpr (imflsd, IM_FLUSHEPA(imdes))

	return (npix)
end