1: /* Header file for all procedures in Vsh */
   2: #include "stdio.h"
   3: 
   4: #define VERSION 2.5
   5: 
   6: #define max(arg1,arg2)  ((arg1 > arg2) ? arg1 : arg2)
   7: #define min(arg1,arg2)  ((arg1 < arg2) ? arg1 : arg2)
   8: #define compe(arg1,arg2)  (strcmp (arg1, arg2) == 0)
   9: 
  10: /* Standard file numbers */
  11: #define infile      0
  12: #define outfile     1
  13: #define errorfile   2
  14: 
  15: /* The values of special keys */
  16: #define EOT     4
  17: #define RUBOUT      0177
  18: #define CR      015
  19: #define LF      012
  20: 
  21: /* Standard file names */
  22: #define LOGFILE     "/usr/grad/scheibel/vsh/log"
  23: #define DEBUGGER    "/bin/adb"
  24: 
  25: /* Other parameters */
  26: #define STRMAX  120 /* Length of string buffers */
  27: #define CNULL   ((char *) 0)    /* Null char pointer */
  28: #define ARGVMAX     20  /* Size of a readarg argv */
  29: 
  30: /* Parms loadable through .vshrc are accessed through command.h.
  31:    Alter their default values in cmdini.c	*/
  32: 
  33: /* Tty_set parameters */
  34: #define RAWMODE     0
  35: #define COOKEDMODE  1
  36: 
  37: /* Pointers to data about the environment */
  38: extern char *envshell, *envhome, *envedit, *envterm;
  39: 
  40: /* Functions called by command return the next command to execute.  */
  41: /* In addition, the following bits are returned.  */
  42: 
  43: #define CMDMASK     0x00ff  /* Bits of next command */
  44: #define REPLOT      0x0100  /* Must replot directory */
  45: #define NOOP        0x0200  /* Return for command not found */
  46: #define ENTERDIR    0x0400  /* New directory entered */
  47: 
  48: /* If no special return is necessary, use return REPLOT or NOREPLOT. */
  49: #define NOREPLOT    0x0000
  50: 
  51: /* Failure and success may be a double meaning for REPLOT/NOREPLOT.
  52:    Check individule commands.  */
  53: 
  54: #define SUCCESS     REPLOT
  55: #define FAILURE     NOREPLOT
  56: 
  57: /* When calling command, indicate type of command:  */
  58: #define DIRCMD  1
  59: #define SHOWCMD 2
  60: 
  61: /* Show operates in two modes */
  62: #define GREPMODE    0
  63: #define MAKEMODE    1
  64: 
  65: /* Parameters from .vshrc file. P_name is the parameter name, p_val is
  66:    the parameter's value.
  67: */
  68: 
  69: struct parmstruct {
  70:     char *p_name,
  71:          *p_val;
  72: };
  73: 
  74: extern struct parmstruct  parmtab[];
  75: 
  76: /* References to the various parameters */
  77: 
  78: #define EDITOR      parmtab[0].p_val
  79: #define MAKE        parmtab[1].p_val
  80: #define GREP        parmtab[2].p_val
  81: #define RMHELP      parmtab[3].p_val
  82: #define SHOWHELP    parmtab[4].p_val
  83: #define MAKERROR    parmtab[5].p_val
  84: #define GREPOUT     parmtab[6].p_val

Defined struct's

parmstruct defined in line 69; used 8 times

Defined macros

ARGVMAX defined in line 28; used 4 times
CMDMASK defined in line 43; used 1 times
CR defined in line 18; used 7 times
DEBUGGER defined in line 23; used 2 times
DIRCMD defined in line 58; used 3 times
EDITOR defined in line 78; used 6 times
ENTERDIR defined in line 46; used 3 times
EOT defined in line 16; used 4 times
GREP defined in line 80; used 1 times
GREPMODE defined in line 62; used 5 times
GREPOUT defined in line 84; used 1 times
LOGFILE defined in line 22; never used
MAKE defined in line 79; used 5 times
MAKEMODE defined in line 63; used 4 times
MAKERROR defined in line 83; used 1 times
NOOP defined in line 45; used 5 times
RAWMODE defined in line 34; used 2 times
RMHELP defined in line 81; used 1 times
RUBOUT defined in line 17; never used
SHOWCMD defined in line 59; used 1 times
SHOWHELP defined in line 82; used 1 times
VERSION defined in line 4; used 1 times
compe defined in line 8; used 10 times
errorfile defined in line 13; used 2 times
infile defined in line 11; used 6 times
max defined in line 6; used 1 times
min defined in line 7; used 2 times
outfile defined in line 12; used 7 times

Usage of this include

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