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 /noao/twodspec/apextract/apdelete.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/twodspec/apextract/apdelete.x')
-rw-r--r-- | noao/twodspec/apextract/apdelete.x | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/noao/twodspec/apextract/apdelete.x b/noao/twodspec/apextract/apdelete.x new file mode 100644 index 00000000..1956a331 --- /dev/null +++ b/noao/twodspec/apextract/apdelete.x @@ -0,0 +1,23 @@ +# AP_DELETE -- Delete the specified aperture and return a new current aperture. + +procedure ap_delete (current, aps, naps) + +int current # Return current aperture index +pointer aps[ARB] # Aperture data +int naps # Number of apertures + +int i + +begin + if (current < 1) + return + + call ap_free (aps[current]) + for (i = current; i < naps; i = i + 1) + aps[i] = aps[i+1] + + aps[naps] = NULL + + naps = naps - 1 + current = min (naps, current) +end |