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 /sys/fmio/fmfopen.x | |
download | iraf-linux-fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4.tar.gz |
Initial commit
Diffstat (limited to 'sys/fmio/fmfopen.x')
-rw-r--r-- | sys/fmio/fmfopen.x | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys/fmio/fmfopen.x b/sys/fmio/fmfopen.x new file mode 100644 index 00000000..6b3b897a --- /dev/null +++ b/sys/fmio/fmfopen.x @@ -0,0 +1,30 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +# FM_FOPEN -- Open an lfile as an FIO file. A FIO file descriptor is returned +# for the open file. CLOSE is used to close the opened file. + +int procedure fm_fopen (fm, lfile, mode, type) + +pointer fm #I FMIO descriptor +int lfile #I lfile to be opened +int mode #I file access mode +int type #I logical file type + +int fd +pointer sp, lfname +extern fm_lfopen(), fm_lfclose() +extern fm_lfaread(), fm_lfawrite(), fm_lfawait(), fm_lfstati() +int fopnbf() +errchk fopnbf + +begin + call smark (sp) + call salloc (lfname, SZ_FNAME, TY_CHAR) + + call fm_lfname (fm, lfile, type, Memc[lfname], SZ_FNAME) + fd = fopnbf (Memc[lfname], mode, fm_lfopen, fm_lfaread, fm_lfawrite, + fm_lfawait, fm_lfstati, fm_lfclose) + + call sfree (sp) + return (fd) +end |