Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.   Copyright (c) 1990-2000 Info-ZIP.  All rights reserved.
  3.  
  4.   See the accompanying file LICENSE, version 2000-Apr-09 or later
  5.   (the contents of which are also included in unzip.h) for terms of use.
  6.   If, for some reason, all these files are missing, the Info-ZIP license
  7.   also may be found at:  ftp://ftp.info-zip.org/pub/infozip/license.html
  8. */
  9. #ifndef __vmstat_h
  10. #define __vmstat_h
  11.  
  12. /* stat.h      definitions   */
  13.  
  14. #ifndef _INO_T_DEFINED
  15. typedef unsigned short ino_t;       /* i-node number (not used on DOS) */
  16. #define _INO_T_DEFINED
  17. #endif
  18.  
  19. #ifndef _DEV_T_DEFINED
  20. typedef short dev_t;                /* device code */
  21. #define _DEV_T_DEFINED
  22. #endif
  23.  
  24. #ifndef _OFF_T_DEFINED
  25. typedef long off_t;                 /* file offset value */
  26. #define _OFF_T_DEFINED
  27. #endif
  28.  
  29. #ifndef _STAT_DEFINED
  30. struct stat {
  31.   dev_t  st_dev;
  32.   ino_t  st_ino;
  33.   short  st_mode;
  34.   short  st_nlink;
  35.   int    st_uid;
  36.   int    st_gid;
  37.   off_t  st_size;
  38.   time_t st_atime;
  39.   time_t st_mtime;
  40.   time_t st_ctime;
  41. };
  42. #define _STAT_DEFINED
  43. #endif
  44.  
  45. int stat(const char *path, struct stat *buf);
  46. int fstat(int fd, struct stat *buf);
  47.  
  48. #define S_IFMT       0xFFFF
  49. #define _FLDATA(m)   (*(fldata_t *) &m)
  50. #define S_ISDIR(m)   (_FLDATA(m).__dsorgPDSdir)
  51. #define S_ISREG(m)   (_FLDATA(m).__dsorgPO | \
  52.                       _FLDATA(m).__dsorgPDSmem | \
  53.                       _FLDATA(m).__dsorgPS)
  54. #define S_ISBLK(m)   (_FLDATA(m).__recfmBlk)
  55. #define S_ISMEM(m)   (_FLDATA(m).__dsorgMem)
  56.  
  57. #endif /* __vmstat_h */
  58.