diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /sys/plio/plleq.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
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 |