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/onedspec/smw/smwgapid.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/onedspec/smw/smwgapid.x')
-rw-r--r-- | noao/onedspec/smw/smwgapid.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/noao/onedspec/smw/smwgapid.x b/noao/onedspec/smw/smwgapid.x new file mode 100644 index 00000000..214be533 --- /dev/null +++ b/noao/onedspec/smw/smwgapid.x @@ -0,0 +1,30 @@ +include <smw.h> + + +# SMW_GAPID -- Get aperture id. + +procedure smw_gapid (smw, index1, index2, apid, maxchar) + +pointer smw #I SMW pointer +int index1 #I Spectrum index +int index2 #I Spectrum index +char apid[maxchar] #O Aperture id +int maxchar #I Maximum number of characters + +pointer ptr + +begin + switch (SMW_FORMAT(smw)) { + case SMW_ND: + call strcpy (Memc[SMW_APID(smw)], apid, maxchar) + case SMW_ES, SMW_MS: + if (index1 < 0 || index1 > SMW_NSPEC(smw)) + call error (1, "smw_gapid: index out of bounds") + + ptr = Memi[SMW_APIDS(smw)+index1-1] + if (index1 == 0 || ptr == NULL) + call strcpy (Memc[SMW_APID(smw)], apid, maxchar) + else + call strcpy (Memc[ptr], apid, maxchar) + } +end |