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/plcompare.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/plio/plcompare.x')
-rw-r--r-- | sys/plio/plcompare.x | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sys/plio/plcompare.x b/sys/plio/plcompare.x new file mode 100644 index 00000000..59ba9d1f --- /dev/null +++ b/sys/plio/plcompare.x @@ -0,0 +1,35 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <plset.h> +include <plio.h> + +# PL_COMPARE -- Compare two masks for equality, optionally noting any +# differences on the output file. PL_EQUAL is returned if the two masks +# are equivalent. + +int procedure pl_compare (pl_1, pl_2, outfd) + +pointer pl_1, pl_2 #I masks to be compared +int outfd #I file for diagnostic output, or NULL + +int i +bool pll_equal() + +begin + if (PL_NAXES(pl_1) != PL_NAXES(pl_2) || PL_NLP(pl_1) != PL_NLP(pl_2)) { + if (outfd != NULL) + call fprintf (outfd, "the masks are not the same size\n") + return (PL_NOTEQUAL) + } + + do i = 1, PL_NLP(pl_1) + if (!pll_equal (LL(pl_1,PL_LP(pl_1,i)), LL(pl_2,PL_LP(pl_2,i)))) { + if (outfd != NULL) { + call fprintf (outfd, "masks differ at line %d\n") + call pargi (i) + } + return (PL_NOTEQUAL) + } + + return (PL_EQUAL) +end |