aboutsummaryrefslogtreecommitdiff
path: root/pkg/utilities/nttools/stxtools/od/odopep.x
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /pkg/utilities/nttools/stxtools/od/odopep.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/stxtools/od/odopep.x')
-rw-r--r--pkg/utilities/nttools/stxtools/od/odopep.x56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/stxtools/od/odopep.x b/pkg/utilities/nttools/stxtools/od/odopep.x
new file mode 100644
index 00000000..cd757f93
--- /dev/null
+++ b/pkg/utilities/nttools/stxtools/od/odopep.x
@@ -0,0 +1,56 @@
+include "od.h"
+
+#---------------------------------------------------------------------------
+.help od_open_group 11Jul95 source
+.ih
+NAME
+od_open_group -- Open another "group" of the file
+.ih
+USAGE
+call od_open_group (od, group)
+.fi
+.ih
+ARGUMENTS
+.ls od (pointer :input)
+The OD I/O descriptor.
+.le
+.ls group (int :input)
+The "group" to open. For tables, this means the column number to open.
+.le
+.endhelp
+#---------------------------------------------------------------------------
+procedure od_open_group (od, group)
+
+pointer od # I: The 1D descriptor.
+int group # I: The group to open.
+
+# Misc.
+real rx # Generic.
+
+errchk gf_opengr, mw_close, od_wcs_open
+
+begin
+ switch (OD_TYPE(od)) {
+ case OD_TABLE:
+ if (group > OD_NGRP(od))
+ call error (1, "Attempt to open non-existant column")
+ OD_GRP(od) = group
+
+ case OD_IMAGE:
+ if (group > OD_NGRP(od))
+ call error (1, "Attempt to open non-existant group")
+
+ call mw_close (OD_MW(od))
+
+ if (OD_OLD(od) != NULL)
+ call gf_opengr (OD_FD(od), group, rx, rx, OD_FD(OD_OLD(od)))
+ else
+ call gf_opengr (OD_FD(od), group, rx, rx, NULL)
+ OD_GRP(od) = group
+
+ call od_wcs_open (od)
+ }
+end
+#---------------------------------------------------------------------------
+# End of od_open_group
+#---------------------------------------------------------------------------