ack/include/_tail_cc/sys/dir.h

46 lines
843 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".
*/
1991-10-25 14:44:21 +00:00
#ifndef _DIR_H
#define _DIR_H
1987-03-10 14:50:48 +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();
1991-10-25 14:44:21 +00:00
#endif /* _DIR_H */