home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / diff.lzh / diff / stat.h < prev    next >
Encoding:
C/C++ Source or Header  |  1986-04-24  |  1.5 KB  |  58 lines

  1. static char RCSid[]="$Id: stat.h_v 1.1 96/04/23 02:56:40 hiro Exp $";
  2. /*************************************************************************
  3. Copyright (c) 1996 ARK Systems USA
  4. All rights reserved.
  5.  
  6.     This source code is the proprietary confidential of ARK Systems USA,
  7.     and is provided to licesee for documentation and education purposes
  8.     only. Reproduction, publication, or distribution in any form to a
  9.     party other than the licensee without prior written permit from ARK
  10.     Systems USA is strictly prohibited.
  11.  
  12. Program: GNU diff
  13.    File: stat.h - Unix's stat interface
  14.  
  15. $Date: 96/04/23 02:56:40 $
  16. $Revision: 1.1 $
  17. *************************************************************************/
  18. #ifndef    _types
  19. typedef short dev_t;
  20. typedef short ino_t;
  21. typedef long off_t;
  22. #ifndef    S_IFDIR
  23. #include    <modes.h>
  24. #endif
  25. #ifndef    ctime
  26. #include    <time.h>
  27. #endif
  28.  
  29. struct  stat
  30. {
  31.     dev_t   st_dev;
  32.     ino_t   st_ino;
  33.     u_short  st_mode;
  34.     short   st_nlink;
  35.     u_short  st_uid;
  36.     u_short  st_gid;
  37.     short   st_rdev;
  38.     off_t   st_size;
  39.     time_t  st_atime, st_mtime, st_ctime;
  40. };
  41.  
  42.  
  43. #define    US_IFMT   0170000 /* type of file */
  44. #define    US_IFDIR  0040000 /* directory    */
  45. #define    US_IFCHR  0020000 /* character special */
  46. #define    US_IFBLK  0060000 /* block special     */
  47. #define    US_IFREG  0100000 /* reguler           */
  48. #define    US_IFIFO  0010000 /* fifo               */
  49.  
  50. #define    US_ISREG(m)    (((m) & US_IFMT) == US_IFREG)
  51. #define    US_ISDIR(m)    (((m) & US_IFMT) == US_IFDIR)
  52.  
  53. #ifndef O_RDONLY
  54. #define O_RDONLY  0x01
  55. #define O_WRONLY  0x02
  56. #define O_RDWR      0x03
  57. #endif
  58.