1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- #ifndef __amiga_z_stat_h
- #define __amiga_z_stat_h
- #ifdef AZTEC_C
- # define __STAT_H
- #else
- # define _STAT_H
- # define _DIRENT_H
- # define _SYS_DIR_H
- # define _COMMIFMT_H
- # include <dos.h>
- #endif
- #include <libraries/dos.h>
- #include <time.h>
- struct stat {
- unsigned short st_mode;
- time_t st_ctime, st_atime, st_mtime;
- long st_size;
- long st_ino;
- long st_blocks;
- short st_attr, st_dev, st_nlink, st_uid, st_gid, st_rdev;
- };
- #define S_IFDIR (1<<11)
- #define S_IFREG (1<<10)
- #if 0
-
- # define S_IFLNK (1<<14)
- # define S_IFSOCK (1<<13)
- # define S_IFCHR (1<<8)
- # define S_IFIFO (1<<7)
- # define S_IFMT (S_IFDIR|S_IFREG|S_IFCHR|S_IFLNK)
- #else
- # define S_IFMT (S_IFDIR|S_IFREG)
- #endif
- #define S_IHIDDEN (1<<7)
- #define S_ISCRIPT (1<<6)
- #define S_IPURE (1<<5)
- #define S_IARCHIVE (1<<4)
- #define S_IREAD (1<<3)
- #define S_IWRITE (1<<2)
- #define S_IEXECUTE (1<<1)
- #define S_IDELETE (1<<0)
- int stat(const char *name, struct stat *buf);
- int fstat(int handle, struct stat *buf);
- typedef struct dirent {
- struct dirent *d_cleanuplink,
- **d_cleanupparent;
- BPTR d_parentlock;
- struct FileInfoBlock d_fib;
- } DIR;
- #define d_name d_fib.fib_FileName
- extern unsigned short disk_not_mounted;
- DIR *opendir(const char *);
- void closedir(DIR *);
- void close_leftover_open_dirs(void);
- struct dirent *readdir(DIR *);
- int umask(void);
- #ifdef AZTEC_C
- int rmdir(const char *);
- int chmod(const char *filename, int bits);
- #endif
- #endif
|