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 /pkg/utilities/nttools/stxtools/od/odunmp.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/stxtools/od/odunmp.x')
-rw-r--r-- | pkg/utilities/nttools/stxtools/od/odunmp.x | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/stxtools/od/odunmp.x b/pkg/utilities/nttools/stxtools/od/odunmp.x new file mode 100644 index 00000000..e776ecd7 --- /dev/null +++ b/pkg/utilities/nttools/stxtools/od/odunmp.x @@ -0,0 +1,44 @@ +include "od.h" + +#--------------------------------------------------------------------------- +.help od_unmap Feb93 source +.ih +NAME +od_unmap -- Close the 1D image. +.ih +USAGE +call od_unmap (od) +.ih +ARGUMENTS +.ls od (input/output: pointer) +The OD I/O descriptor. On return, the value will be NULL. +.le +.endhelp +#--------------------------------------------------------------------------- +procedure od_unmap (od) + +pointer od # I: The OD I/O descriptor. + +errchk tbtclo, imunmap, mfree + +begin + if (od != NULL) { + switch (OD_TYPE(od)) { + case OD_TABLE: + call tbtclo (OD_FD(od)) + call mfree (OD_CD_PTR(od), TY_POINTER) + case OD_IMAGE: + call mw_ctfree (OD_WL(od)) + call mw_ctfree (OD_LW(od)) + call mw_close (OD_MW(od)) + call imunmap (OD_FD(od)) + } + + call mfree (OD_WSYS_PTR(od), TY_CHAR) + call mfree (OD_NAME_PTR(od), TY_CHAR) + call mfree (od, TY_STRUCT) + } +end +#--------------------------------------------------------------------------- +# End of od_unmap +#--------------------------------------------------------------------------- |