5 * Revision 1.4 1997/09/02 14:26:39 mclareni
8 * Revision 1.3 1997/02/04 17:34:45 mclareni
9 * Merge Winnt and 97a versions
11 * Revision 1.2 1996/10/11 07:49:51 cernlib
12 * Sgi now has st_blksize and st_blocks, so store and return these.
13 * Use #else instead of complicated #if
15 * Revision 1.1.1.1.2.1 1997/01/21 11:29:44 mclareni
16 * All mods for Winnt 96a on winnt branch
18 * Revision 1.1.1.1 1996/02/15 17:49:27 mclareni
22 #include "kerngen/pilot.h"
24 CERN PROGLIB# Z265 STATI .VERSION KERNFOR 4.40 940929
26 Fortran interface routine to stat
29 #if defined(CERNLIB_QMVAX)||defined(CERNLIB_QMOS9)
33 #if (!defined(CERNLIB_QMVAX))&&(!defined(CERNLIB_QMOS9))
34 #include <sys/types.h>
36 #include "kerngen/fortchar.h"
38 #include "kerngen/fortranc.h"
39 #if defined(CERNLIB_QX_SC)
40 int type_of_call stati_(fname, info, lgname)
42 #if defined(CERNLIB_QXNO_SC)
43 int type_of_call stati(fname, info, lgname)
45 #if defined(CERNLIB_QXCAPT)
46 # ifndef CERNLIB_MSSTDCALL
47 int type_of_call STATI(fname, info, lgname)
49 int type_of_call STATI(fname, lfname, info, lgname)
53 #if defined(CERNLIB_QMCRY)
56 #if !defined(CERNLIB_QMCRY)
67 char *ptname, *fchtak();
71 ptname = fchtak(fname,*lgname);
72 if (ptname == NULL) goto out1;
75 buf = (struct stat *) malloc(sizeof (struct stat));
77 buf = (struct _stat *) malloc(sizeof (struct _stat));
80 if (buf == NULL) goto out2;
82 istat = stat(ptname, buf);
85 info[0] = (int) buf->st_dev;
86 info[1] = (int) buf->st_ino;
87 info[2] = (int) buf->st_mode;
88 info[3] = (int) buf->st_nlink;
89 info[4] = (int) buf->st_uid;
90 info[5] = (int) buf->st_gid;
91 info[6] = (int) buf->st_size;
92 info[7] = (int) buf->st_atime;
93 info[8] = (int) buf->st_mtime;
94 info[9] = (int) buf->st_ctime;
95 #if defined(CERNLIB_QMDOS)||defined(CERNLIB_QMVAX)||defined(CERNLIB_QMOS9)||defined(CERNLIB_WINNT)
99 info[10] = (int) buf->st_blksize;
100 info[11] = (int) buf->st_blocks;
109 /*> END <----------------------------------------------------------*/