aboutsummaryrefslogtreecommitdiff
path: root/noao/onedspec/ecidentify/ecnext.x
blob: 1028371d9e565b7eeaeda9098dcf014a1e66a088 (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
include	"ecidentify.h"

# EC_NEXT -- Return the next feature.

int procedure ec_next (ec, feature)

pointer	ec		# ID pointer
int	feature		# Starting feature (input), next feature (returned)

int	i

begin
	for (i=feature+1; i<=EC_NFEATURES(ec); i=i+1)
	    if (APN(ec,i) == EC_AP(ec))
		break

	if (i <= EC_NFEATURES(ec))
	    feature = i
	else
	   i = EOF

	return (i)
end