aboutsummaryrefslogtreecommitdiff
path: root/noao/astutil/pdm/pdmsort.x
blob: 93c59aec1b2be92d2de190497308d2c8b312193e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
include <mach.h>
include "pdm.h"

# PDM_SORT -- Sort the phases into ascending order.

procedure pdm_sort (array, sort, numpts)

pointer	array			# array to sort
pointer	sort			# array to contain the sort indexes
int	numpts			# number of points to sort

pointer	comarray
common /sortcom/ comarray
extern	pdm_compare()

begin
	comarray = array
	if (numpts > 1)
	    call qsort (Memi[sort], numpts, pdm_compare)
end