1: /*  Global Defines  */
   2: 
   3: #include <sys/types.h>
   4: #include <sys/stat.h>
   5: #include <sys/dir.h>
   6: 
   7: /*  This data relates to the working directory and the portion of that
   8:     directory currently displayed on the screen.
   9: */
  10: 
  11: #define mfiles  200     /* Max number of files vsh can handel */
  12: extern int tfiles;      /* Number of files in this directory */
  13: 
  14: /*  The files of a directory are partitioned into pages.  Each page
  15:     represents a display on the terminal screen.  */
  16: 
  17: #define nfpp    20      /* Number of files per page */
  18: #define mpages  (mfiles/nfpp)   /* Max number of pages */
  19: 
  20: extern int tpages,      /* Total pages this directory */
  21: cpage,              /* Current page this display */
  22: pageend;            /* Index of last file on this page */
  23: 
  24: /*  File information about working dir */
  25: 
  26: extern struct stat wd_stb;      /* its inode */
  27: 
  28: /* Path name of working directory */
  29: #define MPLEN   STRMAX - 1  /* Max path len (chars) */
  30: #define LPLEN   STRMAX - 20 /* Limit path len */
  31: 
  32: extern int wdfile;      /* its file number */
  33: extern char wdname [STRMAX];    /* its full path name */
  34: 
  35: extern struct direct dirbuf [mfiles + 1];   /* its contents */
  36: #define max_dir_size    (sizeof dirbuf - sizeof dirbuf [0])
  37: 
  38: extern char *d_namep [mfiles];      /* pointers to all the file names */
  39: 
  40: /* filename returns a pointer to the file assoc. with arg on cpage */
  41: #define filename(arg)   (d_namep [arg + cpage * nfpp - nfpp])
  42: 
  43: extern int dir_status;          /* its logical status */
  44: #define loaded      0
  45: #define unloaded    1
  46: #define toobig      2
  47: #define protected   3
  48: 
  49: /*  scratch */
  50: extern struct stat scr_stb;
  51: 
  52: /* Useful macros */
  53: 
  54: #define DOT "."
  55: #define DOTDOT  ".."
  56: #define SLASH   "/"
  57: #define dirsize sizeof dirbuf[0]
  58: #define dnamesize   DIRSIZ
  59: 
  60: #define ISROOT(arg) (arg [1] == 0)

Defined macros

DOT defined in line 54; used 8 times
ISROOT defined in line 60; used 2 times
LPLEN defined in line 30; used 2 times
MPLEN defined in line 29; used 1 times
SLASH defined in line 56; used 4 times
dirsize defined in line 57; used 1 times
dnamesize defined in line 58; never used
filename defined in line 41; used 12 times
loaded defined in line 44; used 1 times
max_dir_size defined in line 36; used 1 times
mfiles defined in line 11; used 5 times
mpages defined in line 18; used 5 times
nfpp defined in line 17; used 13 times
protected defined in line 47; used 1 times
toobig defined in line 46; used 1 times
unloaded defined in line 45; used 2 times

Usage of this include

Last modified: 1980-08-21
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 908
Valid CSS Valid XHTML 1.0 Strict