1: /* $Header: ndir.h,v 4.3 85/05/01 11:43:00 lwall Exp $
   2:  *
   3:  * $Log:	ndir.h,v $
   4:  * Revision 4.3  85/05/01  11:43:00  lwall
   5:  * Baseline for release with 4.3bsd.
   6:  *
   7:  */
   8: 
   9: #ifdef LIBNDIR
  10: #   include <ndir.h>
  11: #else
  12: #   ifndef USENDIR
  13: #	include <sys/dir.h>
  14: #   else
  15: 
  16: #ifndef DEV_BSIZE
  17: #define DEV_BSIZE   512
  18: #endif
  19: #define DIRBLKSIZ   DEV_BSIZE
  20: #define MAXNAMLEN   255
  21: 
  22: struct  direct {
  23:     long    d_ino;          /* inode number of entry */
  24:     short   d_reclen;       /* length of this record */
  25:     short   d_namlen;       /* length of string in d_name */
  26:     char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
  27: };
  28: 
  29: /*
  30:  * The DIRSIZ macro gives the minimum record length which will hold
  31:  * the directory entry.  This requires the amount of space in struct direct
  32:  * without the d_name field, plus enough space for the name with a terminating
  33:  * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
  34:  */
  35: #undef DIRSIZ
  36: #define DIRSIZ(dp) \
  37:     ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
  38: 
  39: /*
  40:  * Definitions for library routines operating on directories.
  41:  */
  42: typedef struct _dirdesc {
  43:     int dd_fd;
  44:     long    dd_loc;
  45:     long    dd_size;
  46:     char    dd_buf[DIRBLKSIZ];
  47: } DIR;
  48: #ifndef NULL
  49: #define NULL 0
  50: #endif
  51: extern  DIR *opendir();
  52: extern  struct direct *readdir();
  53: extern  long telldir();
  54: extern  void seekdir();
  55: #define rewinddir(dirp) seekdir((dirp), (long)0)
  56: extern  void closedir();
  57: 
  58: #   endif
  59: #endif

Defined struct's

_dirdesc defined in line 42; never used
direct defined in line 22; used 16 times

Defined typedef's

DIR defined in line 47; used 10 times

Defined macros

DEV_BSIZE defined in line 17; used 2 times
DIRBLKSIZ defined in line 19; used 2 times
DIRSIZ defined in line 36; used 2 times
MAXNAMLEN defined in line 20; used 2 times
NULL defined in line 49; used 5 times
rewinddir defined in line 55; never used

Usage of this include

Last modified: 1985-06-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 856
Valid CSS Valid XHTML 1.0 Strict