diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2015-07-08 20:46:52 -0400 |
commit | fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 (patch) | |
tree | bdda434976bc09c864f2e4fa6f16ba1952b1e555 /pkg/utilities/nttools/stxtools/od/odopep.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'pkg/utilities/nttools/stxtools/od/odopep.x')
-rw-r--r-- | pkg/utilities/nttools/stxtools/od/odopep.x | 56 |
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 +#--------------------------------------------------------------------------- |