From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- noao/onedspec/ecidentify/ecprevious.x | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 noao/onedspec/ecidentify/ecprevious.x (limited to 'noao/onedspec/ecidentify/ecprevious.x') diff --git a/noao/onedspec/ecidentify/ecprevious.x b/noao/onedspec/ecidentify/ecprevious.x new file mode 100644 index 00000000..4301b722 --- /dev/null +++ b/noao/onedspec/ecidentify/ecprevious.x @@ -0,0 +1,23 @@ +include "ecidentify.h" + +# EC_PREVIOUS -- Return the previous feature. + +int procedure ec_previous (ec, feature) + +pointer ec # ID pointer +int feature # Starting feature (input), previous feature (returned) + +int i + +begin + for (i=feature-1; i>0; i=i-1) + if (APN(ec,i) == EC_AP(ec)) + break + + if (i > 0) + feature = i + else + i = EOF + + return (i) +end -- cgit