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/fio/fstrfp.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/fstrfp.x')
-rw-r--r-- | sys/fio/fstrfp.x | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/fio/fstrfp.x b/sys/fio/fstrfp.x new file mode 100644 index 00000000..851bb6b1 --- /dev/null +++ b/sys/fio/fstrfp.x @@ -0,0 +1,27 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <config.h> +include <fio.h> + +# FSTRFP -- Get a dummy file descriptor for use by STROPEN "files". +# The static part of the descriptor is returned to later be allocated +# by STROPEN. The dynamic part is permanently allocated, and is used to +# make the string look more like a regular file. + +procedure fstrfp (newfp) + +pointer newfp +pointer str_fp +int fd, fgetfd() +data str_fp /NULL/ +include <fio.com> + +begin + if (str_fp == NULL) { + fd = fgetfd ("String_File", STRING_FILE, STRING_FILE) + str_fp = fiodes[fd] + fiodes[fd] = NULL + } + + newfp = str_fp +end |