5 * Revision 1.1.1.1 1996/02/15 17:49:31 mclareni
10 CERN PROGLIB# Z265 LSTATI .VERSION KERNIRT 1.06 930811
11 C ORIG. 24/03/91, RDM + JZ
12 Fortran interface routine to lstat
15 #include <sys/types.h>
17 #include "kerngen/fortchar.inc"
18 #if defined(CERNLIB_QX_SC)
19 int lstati_(fname, info, lgname, slate)
21 #if defined(CERNLIB_QXNO_SC)
22 int lstati(fname, info, lgname, slate)
24 #if defined(CERNLIB_QXCAPT)
25 int LSTATI(fname, info, lgname, slate)
32 char *ptname, *fchtak();
36 ptname = fchtak(fname,*lgname);
37 if (ptname == NULL) goto out1;
39 buf = (struct stat *) malloc(sizeof (struct stat));
40 if (buf == NULL) goto out2;
42 istat = lstat(ptname, buf);
45 info[0] = (int) buf->st_dev;
46 info[2] = (int) buf->st_ino;
47 info[4] = (int) buf->st_mode;
48 info[6] = (int) buf->st_nlink;
49 info[8] = (int) buf->st_uid;
50 info[10] = (int) buf->st_gid;
51 info[12] = (int) buf->st_size;
52 info[14] = (int) buf->st_atime;
53 info[16] = (int) buf->st_mtime;
54 info[18] = (int) buf->st_ctime;
55 info[20] = (int) buf->st_blksize;
56 info[22] = (int) buf->st_blocks;
57 *slate++ = (buf->st_mode & S_IFMT) ^ S_IFREG;
58 *slate++ = (buf->st_mode & S_IFMT) ^ S_IFLNK;
59 *slate++ = (buf->st_mode & S_IFMT) ^ S_IFDIR;
67 /*> END <----------------------------------------------------------*/