home *** CD-ROM | disk | FTP | other *** search
- static char RCSid[]="$Id: stat.h_v 1.1 96/04/23 02:56:40 hiro Exp $";
- /*************************************************************************
- Copyright (c) 1996 ARK Systems USA
- All rights reserved.
-
- This source code is the proprietary confidential of ARK Systems USA,
- and is provided to licesee for documentation and education purposes
- only. Reproduction, publication, or distribution in any form to a
- party other than the licensee without prior written permit from ARK
- Systems USA is strictly prohibited.
-
- Program: GNU diff
- File: stat.h - Unix's stat interface
-
- $Date: 96/04/23 02:56:40 $
- $Revision: 1.1 $
- *************************************************************************/
- #ifndef _types
- typedef short dev_t;
- typedef short ino_t;
- typedef long off_t;
- #ifndef S_IFDIR
- #include <modes.h>
- #endif
- #ifndef ctime
- #include <time.h>
- #endif
-
- struct stat
- {
- dev_t st_dev;
- ino_t st_ino;
- u_short st_mode;
- short st_nlink;
- u_short st_uid;
- u_short st_gid;
- short st_rdev;
- off_t st_size;
- time_t st_atime, st_mtime, st_ctime;
- };
-
-
- #define US_IFMT 0170000 /* type of file */
- #define US_IFDIR 0040000 /* directory */
- #define US_IFCHR 0020000 /* character special */
- #define US_IFBLK 0060000 /* block special */
- #define US_IFREG 0100000 /* reguler */
- #define US_IFIFO 0010000 /* fifo */
-
- #define US_ISREG(m) (((m) & US_IFMT) == US_IFREG)
- #define US_ISDIR(m) (((m) & US_IFMT) == US_IFDIR)
-
- #ifndef O_RDONLY
- #define O_RDONLY 0x01
- #define O_WRONLY 0x02
- #define O_RDWR 0x03
- #endif
-