ack/include/_tail_cc/sys/dir.h

41 lines
789 B
C
Raw Normal View History

1987-03-10 09:24:02 +00:00
/* $Header$ */
1987-03-09 21:20:21 +00:00
/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
1987-01-27 16:33:21 +00:00
#ifdef BSD4_2
1987-02-24 13:10:59 +00:00
#define MAXNAMLEN 255
1987-01-27 16:33:21 +00:00
#else
#define MAXNAMLEN 14
1987-02-24 13:10:59 +00:00
#endif
#define DIRBLKSIZ 512
1987-01-27 16:33:21 +00:00
#undef DIRSIZ
#define DIRSIZ(dp) \
((sizeof(struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1+3)&~3))
struct direct {
long d_ino;
short d_reclen;
short d_namlen;
char d_name[MAXNAMLEN+1];
};
struct _dirdesc {
int dd_fd;
long dd_loc;
long dd_size;
1987-02-24 13:10:59 +00:00
char *dd_buf;
int dd_bsize;
1987-01-27 16:33:21 +00:00
};
typedef struct _dirdesc DIR;
#ifndef NULL
#define NULL 0
#endif
1987-02-24 13:10:59 +00:00
extern DIR *opendir();
1987-01-27 16:33:21 +00:00
extern struct direct *readdir();
1987-02-24 13:10:59 +00:00
extern long telldir();
extern seekdir();
1987-01-27 16:33:21 +00:00
#define rewinddir(dirp) seekdir((dirp), 0L)
1987-02-24 13:10:59 +00:00
extern closedir();