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 /sys/qpoe/qppclose.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/qpoe/qppclose.x')
-rw-r--r-- | sys/qpoe/qppclose.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/qpoe/qppclose.x b/sys/qpoe/qppclose.x new file mode 100644 index 00000000..7a0bc9ab --- /dev/null +++ b/sys/qpoe/qppclose.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <fset.h> + +# QP_PCLOSE -- Close a parameter opened as a file with QP_POPEN. This +# differs from a simple call to fio.close in that the lfile used to store +# the parameter data is unlocked, as well as closing the file under FIO. + +procedure qp_pclose (fd) + +int fd #I file descriptor of QP_POPEN-ed parameter + +int lfile, type +pointer sp, lfname, fm +int fm_lfparse() + +begin + call smark (sp) + call salloc (lfname, SZ_FNAME, TY_CHAR) + + call fstats (fd, F_FILENAME, Memc[lfname], SZ_FNAME) + if (fm_lfparse (Memc[lfname], fm, lfile, type) != ERR) + call fm_unlock (fm, lfile) + + call close (fd) + call sfree (sp) +end |