#include "kerngen/pilot.h"#include <stdio.h>#include <stdlib.h>#include <sys/types.h>#include <sys/stat.h>#include "kerngen/cf_xaft.h"#include "kerngen/fortchar.h"#include "kerngen/fortranc.h"Go to the source code of this file.
Functions | |
| int type_of_call | cfstati_ (char *fname, int *info, int *lgname) |
|
||||||||||||||||
|
Definition at line 63 of file cfstati.c. References fchtak(), and type_of_call. 00084 {
00085
00086 struct stat buf;
00087 char *ptname, *fchtak();
00088 int istat=-1, stat();
00089
00090 ptname = fchtak(fname,*lgname);
00091 if (ptname == NULL) return -1;
00092
00093
00094 #if defined(CERNLIB_PROJSHIFT)
00095
00096 istat = rfio_stat(ptname, &buf);
00097
00098 #else
00099
00100 istat = stat(ptname, &buf);
00101
00102 #endif
00103
00104 if (!istat) {
00105 info[0] = (int) buf.st_dev;
00106 info[1] = (int) buf.st_ino;
00107 info[2] = (int) buf.st_mode;
00108 info[3] = (int) buf.st_nlink;
00109 info[4] = (int) buf.st_uid;
00110 info[5] = (int) buf.st_gid;
00111 info[6] = (int) buf.st_size;
00112 info[7] = (int) buf.st_atime;
00113 info[8] = (int) buf.st_mtime;
00114 info[9] = (int) buf.st_ctime;
00115 #if defined(CERNLIB_QMDOS)||defined(CERNLIB_QMVAX)||defined(CERNLIB_QMOS9) \
00116 ||defined(CERNLIB_WINNT)
00117 info[10] = 0;
00118 info[11] = 0;
00119 #else
00120 info[10] = (int) buf.st_blksize;
00121 info[11] = (int) buf.st_blocks;
00122 #endif
00123 };
00124
00125 free(ptname);
00126 return istat;
00127
00128 }
|
1.3.9.1