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
Defined macros
CNULL
defined in line
27; used 12 times
CR
defined in line
18; used 7 times
EOT
defined in line
16; used 4 times
FAILURE
defined in line
55; used 31 times
- in /usr/src/ucb/vsh/cmdload.c line
26
- in /usr/src/ucb/vsh/dir.c line
52-57(2)
- in /usr/src/ucb/vsh/dircmd.c line
18
- in /usr/src/ucb/vsh/enterf.c line
16,
39
- in /usr/src/ucb/vsh/file.c line
14(2),
26-30(3),
37-41(2),
63,
116,
122
- in /usr/src/ucb/vsh/help.c line
12,
25(2)
- in /usr/src/ucb/vsh/main.c line
37
- in /usr/src/ucb/vsh/options.c line
37,
43-47(2),
82-84(2)
- in /usr/src/ucb/vsh/readarg.c line
76,
89
- in /usr/src/ucb/vsh/remove.c line
37
- in /usr/src/ucb/vsh/show.c line
89-93(2),
272
GREP
defined in line
80; used 1 times
LF
defined in line
19; used 11 times
MAKE
defined in line
79; used 5 times
NOOP
defined in line
45; used 5 times
REPLOT
defined in line
44; used 35 times
- in line 54
- in /usr/src/ucb/vsh/cmdrun.c line
35-40(2)
- in /usr/src/ucb/vsh/dir.c line
74
- in /usr/src/ucb/vsh/dircmd.c line
8
- in /usr/src/ucb/vsh/enterf.c line
25-34(4)
- in /usr/src/ucb/vsh/file.c line
59-63(2),
89-91(2),
98
- in /usr/src/ucb/vsh/grep.c line
74
- in /usr/src/ucb/vsh/make.c line
69
- in /usr/src/ucb/vsh/misccmd.c line
19
- in /usr/src/ucb/vsh/options.c line
38-43(2),
50
- in /usr/src/ucb/vsh/process.c line
14-16(2)
- in /usr/src/ucb/vsh/remove.c line
51,
70,
82
- in /usr/src/ucb/vsh/show.c line
36-39(2),
49,
81,
102-106(2),
176,
189,
274
- in /usr/src/ucb/vsh/xeq.c line
43
STRMAX
defined in line
26; used 20 times
compe
defined in line
8; used 10 times
max
defined in line
6; used 1 times
min
defined in line
7; used 2 times
Usage of this include