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

Defined functions

lstat_ defined in line 21; never used

Defined macros

MAXPATHLEN defined in line 16; used 2 times
Last modified: 1983-07-08
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 594
Valid CSS Valid XHTML 1.0 Strict