/* @(#)ndir.h 1.4 4/16/85 */ /* Modified for the atari st series 5/4/87 */ #ifndef DEV_BSIZE #define DEV_BSIZE 512 #endif #define DIRBLKSIZ DEV_BSIZE #define MAXNAMLEN 255 struct direct { long d_ino; /* inode number of entry */ short d_reclen; /* length of this record */ short d_namlen; /* length of string in d_name */ char d_name[MAXNAMLEN + 1]; /* name must be no longer than this */ }; /* * The DIRSIZ macro gives the minimum record length which will hold * the directory entry. This requires the amount of space in struct direct * without the d_name field, plus enough space for the name with a terminating * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary. */ #ifdef DIRSIZ #undef DIRSIZ #endif #define DIRSIZ(dp) \ ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3)) /* * Definitions for library routines operating on directories. */ /* Structure of a directory entry under GEMDOS */ typedef struct _dirdesc { char Reserved[21]; char FileAttr; int CreateTime; int CreateDate; long FileSize; char FileName[14]; char FilePath[256]; int FileFlags; struct direct FileDirect; } DIR; #ifndef NULL #define NULL 0L #endif /* values of FileFlags */ #define D_NONE 0x00 #define D_FIRST 0x01 #ifndef DEF_NDIR extern DIR *opendir(); extern struct direct *readdir(); extern void closedir(); extern void seekdir(); extern long telldir(); extern void rewinddir(); #endif