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/fmio/fmfopen.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
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 |