1: /* @(#)ndir.h	1.4	4/16/85 */
   2: #ifndef DEV_BSIZE
   3: #define DEV_BSIZE   512
   4: #endif
   5: #define DIRBLKSIZ   DEV_BSIZE
   6: #define MAXNAMLEN   255
   7: 
   8: struct  direct {
   9:     long    d_ino;          /* inode number of entry */
  10:     short   d_reclen;       /* length of this record */
  11:     short   d_namlen;       /* length of string in d_name */
  12:     char    d_name[MAXNAMLEN + 1];  /* name must be no longer than this */
  13: };
  14: 
  15: /*
  16:  * The DIRSIZ macro gives the minimum record length which will hold
  17:  * the directory entry.  This requires the amount of space in struct direct
  18:  * without the d_name field, plus enough space for the name with a terminating
  19:  * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
  20:  */
  21: 
  22: #ifdef DIRSIZ
  23: #undef DIRSIZ
  24: #endif /* DIRSIZ */
  25: #define DIRSIZ(dp) \
  26:     ((sizeof (struct direct) - (MAXNAMLEN+1)) + (((dp)->d_namlen+1 + 3) &~ 3))
  27: 
  28: /*
  29:  * Definitions for library routines operating on directories.
  30:  */
  31: typedef struct _dirdesc {
  32:     int dd_fd;
  33:     long    dd_loc;
  34:     long    dd_size;
  35:     char    dd_buf[DIRBLKSIZ];
  36: } DIR;
  37: #ifndef NULL
  38: #define NULL 0
  39: #endif
  40: extern  DIR *opendir();
  41: extern  struct direct *readdir();
  42: extern  void closedir();

Defined struct's

_dirdesc defined in line 31; never used
direct defined in line 8; used 12 times

Defined typedef's

Defined macros

DEV_BSIZE defined in line 3; used 2 times
  • in line 2-5(2)
DIRBLKSIZ defined in line 5; used 2 times
DIRSIZ defined in line 25; used 3 times
MAXNAMLEN defined in line 6; used 2 times
NULL defined in line 38; used 111 times

Usage of this include

Last modified: 1986-01-20
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 602
Valid CSS Valid XHTML 1.0 Strict