blob: b2d6097883cc6257eb13b6a0ae9db304d5ed5cd3 (
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
|
include <mach.h>
include "pdm.h"
# Compare procedure for qsort.
int procedure pdm_compare (item1, item2)
int item1 # index of first phase
int item2 # index of second phase
pointer comarray
common /sortcom/ comarray
double p1, p2
begin
p1 = Memd[comarray+item1-1]
p2 = Memd[comarray+item2-1]
if (p1 > p2)
return (1)
if (p1 == p2)
return (0)
if (p1 < p2)
return (-1)
end
|