char id_fstat[] = "@(#)fstat_.c 1.3";
* integer fstat, statb(12)
* call fstat (name, statb)
* 'statb' will receive the stat structure for file 'name'.
#include "../libI77/f_errno.h"
#include "../libI77/fiodefs.h"
long fstat_(lunit
, stbuf
)
if (*lunit
< 0 || *lunit
>= MXUNIT
)
return((long)(errno
=F_ERUNIT
));
return((long)(errno
=F_ERNOPEN
));
if (fstat(fileno(units
[*lunit
].ufd
), &statb
) == 0)
*stbuf
++ = statb
.st_mode
;
*stbuf
++ = statb
.st_nlink
;
*stbuf
++ = statb
.st_rdev
;
*stbuf
++ = statb
.st_size
;
*stbuf
++ = statb
.st_atime
;
*stbuf
++ = statb
.st_mtime
;
*stbuf
++ = statb
.st_ctime
;
*stbuf
++ = statb
.st_blksize
;