diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /sys/plio/plleq.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/plio/plleq.x')
-rw-r--r-- | sys/plio/plleq.x | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/plio/plleq.x b/sys/plio/plleq.x new file mode 100644 index 00000000..d74ae370 --- /dev/null +++ b/sys/plio/plleq.x @@ -0,0 +1,44 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <plio.h> + +# PLL_EQUAL -- Compare two line lists for equality. + +bool procedure pll_equal (l1, l2) + +short l1[ARB] #I line list 1 +short l2[ARB] #I line list 2 + +int i, off +int l1_len, l1_first +int l2_len, l2_first + +begin + # Support old format line lists. + if (LL_OLDFORMAT(l1)) { + l1_len = OLL_LEN(l1) + l1_first = OLL_FIRST + } else { + l1_len = LL_LEN(l1) + l1_first = LL_FIRST(l1) + } + + # Support old format line lists. + if (LL_OLDFORMAT(l2)) { + l2_len = OLL_LEN(l2) + l2_first = OLL_FIRST + } else { + l2_len = LL_LEN(l2) + l2_first = LL_FIRST(l2) + } + + if (l1_len != l2_len) + return (false) + + off = l2_first - l1_first + do i = l1_first, l1_len + if (l1[i] != l2[i+off]) + return (false) + + return (true) +end |