1/* 2 <dir.h> -- definitions for 4.2BSD-compatible directory access 3 4 last edit: 09-Jul-1983 D A Gwyn 5 6 * The code here is forced by the interface, and is not subject to 7 * copyright, constituting the only possible expression of the 8 * algorithm in this format. 9 */ 10#ifdef VMS 11#ifndef FAB$C_BID 12#include <fab.h> 13#endif 14#ifndef NAM$C_BID 15#include <nam.h> 16#endif 17#ifndef RMS$_SUC 18#include <rmsdef.h> 19#endif 20#include "vmsdir.h" 21#endif /* VMS */ 22 23#define DIRBLKSIZ 512 /* size of directory block */ 24#ifdef VMS 25#define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */ 26#define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */ 27#else 28#ifdef WINDOWSNT 29#define MAXNAMLEN 255 30#else /* not WINDOWSNT */ 31#define MAXNAMLEN 15 /* maximum filename length */ 32#endif /* not WINDOWSNT */ 33#endif /* VMS */ 34 /* NOTE: MAXNAMLEN must be one less than a multiple of 4 */ 35 36struct direct /* data from readdir() */ 37 { 38 long d_ino; /* inode number of entry */ 39 unsigned short d_reclen; /* length of this record */ 40 unsigned short d_namlen; /* length of string in d_name */ 41 char d_name[MAXNAMLEN+1]; /* name of file */ 42 }; 43 44typedef struct 45 { 46 int dd_fd; /* file descriptor */ 47 int dd_loc; /* offset in block */ 48 int dd_size; /* amount of valid data */ 49 char dd_buf[DIRBLKSIZ]; /* directory block */ 50 } DIR; /* stream data from opendir() */ 51 52extern DIR *opendir(); 53extern struct direct *readdir(); 54extern long telldir(); 55extern void seekdir(); 56extern void closedir(); 57 58#define rewinddir( dirp ) seekdir( dirp, 0L ) 59 60/* arch-tag: aea50570-ffb7-43fd-b423-7743b10fbe6e 61 (do not change this comment) */ 62