1: /*
2: char id_stat[] = "@(#)stat_.c 1.3";
3: *
4: * get file status
5: *
6: * calling sequence:
7: * integer stat, statb(11)
8: * call stat (name, statb)
9: * where:
10: * 'statb' will receive the stat structure for file 'name'.
11: */
12:
13: #include <sys/param.h>
14: #ifndef MAXPATHLEN
15: #define MAXPATHLEN 128
16: #endif
17: #include <sys/stat.h>
18: #include "../libI77/fiodefs.h"
19:
20: ftnint stat_(name, stbuf, namlen)
21: char *name; ftnint *stbuf; ftnlen namlen;
22: {
23: char buf[MAXPATHLEN];
24: struct stat statb;
25:
26: if (namlen >= sizeof buf)
27: return((ftnint)(errno=F_ERARG));
28: g_char(name, namlen, buf);
29: if (stat(buf, &statb) == 0)
30: {
31: *stbuf++ = statb.st_dev;
32: *stbuf++ = statb.st_ino;
33: *stbuf++ = statb.st_mode;
34: *stbuf++ = statb.st_nlink;
35: *stbuf++ = statb.st_uid;
36: *stbuf++ = statb.st_gid;
37: *stbuf++ = statb.st_rdev;
38: *stbuf++ = statb.st_size;
39: *stbuf++ = statb.st_atime;
40: *stbuf++ = statb.st_mtime;
41: *stbuf++ = statb.st_ctime;
42: return((ftnint) 0);
43: }
44: return ((ftnint)errno);
45: }
Defined functions
stat_
defined in line
20;
never used
Defined macros