fcntl does not return file information for fid
Michael D. Godfrey
godfrey at isl.stanford.edu
Wed Apr 9 15:05:59 CDT 2008
Using current development hg default I get the
following:
octave:1> ff1=fopen('test_tex.ps');
octave:2> [er1,msg1]=fcntl(ff1,F_GETFL,O_APPEND)
er1 = 32768
msg1 =
octave:3> stat('test_tex.ps')
ans =
{
dev = 24
ino = 36732938
mode = 33204
modestr = -rw-rw-r--
nlink = 1
uid = 2188
gid = 2188
rdev = 0
size = 41489
atime = 1.2078e+09
mtime = 1.2078e+09
ctime = 1.2078e+09
blksize = 32768
blocks = 88
}
octave:4> [er1,msg1]=fcntl('test_tex.ps',F_GETFL,O_APPEND)
er1 = 32768
msg1 =
octave:5>
octave:6> [er1,msg1]=fcntl(ff1,F_GETFD,O_APPEND)
er1 = 0
msg1 =
===========================================
However, what I really need is a version of "stat" which accepts a fid
rather than the filename. Or, a function which returns the filename for
the fid as an argument. This could be implemented by allowing an
argument (fid) in the freport function.
This is part of trying to detemine if __go_draw_axes__.m is trying
to write to a window or is outputting to a file. But, the ability to
detemine
fid properties would be a help in general.
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080409/0ad870b4/attachment.html
More information about the Bug-octave
mailing list