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/note.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'sys/fio/note.x')
-rw-r--r-- | sys/fio/note.x | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sys/fio/note.x b/sys/fio/note.x new file mode 100644 index 00000000..d50ee01d --- /dev/null +++ b/sys/fio/note.x @@ -0,0 +1,29 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include <config.h> +include <syserr.h> +include <fio.h> + +# NOTE -- Note offset in file for a subsequent SEEK. If text file, the offset +# of the current line is returned; it is only permissible to seek to the +# beginning of a line on a text file. If binary file, the offset returned is +# the offset at which the next BUFFERED i/o transfer will occur. If file is +# being accessed unbuffered random, the concept of file position is meaningless. + +long procedure note (fd) + +int fd +errchk filerr +include <fio.com> + +begin + fp = fiodes[fd] + if (fd <= 0 || fp == NULL) + call filerr (FNAME(fp), SYS_FILENOTOPEN) + + if (FTYPE(fp) == TEXT_FILE) { + call zcall2 (ZNOTTX(fp), FCHAN(fp), boffset[fd]) + return (boffset[fd]) + } else + return (LNOTE(fd)) +end |