|
|
1.1 root 1: /* @(#)msg.c 1.6 */
2: /*
3: * UNIX shell
4: *
5: * Bell Telephone Laboratories
6: *
7: */
8:
9:
10: #include "defs.h"
11: #include "sym.h"
12:
13: /*
14: * error messages
15: */
16: char badopt[] = "bad option(s)";
17: char mailmsg[] = "you have mail\n";
18: char nospace[] = "no space";
19: char nostack[] = "no stack space";
20: char synmsg[] = "syntax error";
21:
22: char badnum[] = "bad number";
23: char badparam[] = "parameter null or not set";
24: char unset[] = "parameter not set";
25: char badsub[] = "bad substitution";
26: char badcreate[] = "cannot create";
27: char nofork[] = "fork failed - too many processes";
28: char noswap[] = "cannot fork: no swap space";
29: char piperr[] = "cannot make pipe";
30: char badopen[] = "cannot open";
31: char coredump[] = " - core dumped";
32: char arglist[] = "arg list too long";
33: char txtbsy[] = "text busy";
34: char toobig[] = "too big";
35: char badexec[] = "cannot execute";
36: char notfound[] = "not found";
37: char notbltin[] = "not built in";
38: char badfile[] = "bad file number";
39: char badshift[] = "cannot shift";
40: char baddir[] = "bad directory";
41: char badtrap[] = "bad trap";
42: char notid[] = "is not an identifier";
43: char badreturn[] = "cannot return when not in function";
44: char badexport[] = "cannot export functions";
45: char badunset[] = "cannot unset";
46: char nohome[] = "no home directory";
47: char badperm[] = "execute permission denied";
48: char badfname[] = "illegal function name";
49: /*
50: * built in names
51: */
52: char pathname[] = "PATH";
53: char cdpname[] = "CDPATH";
54: char homename[] = "HOME";
55: char mailname[] = "MAIL";
56: char ifsname[] = "IFS";
57: char ps1name[] = "PS1";
58: char ps2name[] = "PS2";
59: char acctname[] = "SHACCT";
60: char histname[] = "HISTORY";
61:
62: /*
63: * string constants
64: */
65: char nullstr[] = "";
66: char sptbnl[] = " \t\n";
67: char defpath[] = ":/bin:/usr/bin";
68: char colon[] = ": ";
69: char minus[] = "-";
70: char endoffile[] = "end of file";
71: char unexpected[] = " unexpected";
72: char atline[] = " at line ";
73: char devnull[] = "/dev/null";
74: char execpmsg[] = "+ ";
75: char readmsg[] = "> ";
76: char stdprompt[] = "$ ";
77: char supprompt[] = "# ";
78: char profile[] = ".profile";
79:
80: /*
81: * tables
82: */
83:
84: struct sysnod reserved[] =
85: {
86: { "case", CASYM },
87: { "do", DOSYM },
88: { "done", ODSYM },
89: { "elif", EFSYM },
90: { "else", ELSYM },
91: { "esac", ESSYM },
92: { "fi", FISYM },
93: { "for", FORSYM },
94: { "if", IFSYM },
95: { "in", INSYM },
96: { "then", THSYM },
97: { "until", UNSYM },
98: { "while", WHSYM },
99: };
100:
101: int no_reserved = 13;
102:
103: char *sysmsg[] =
104: {
105: 0,
106: "Hangup",
107: 0, /* Interrupt */
108: "Quit",
109: "Illegal instruction",
110: "Trace/BPT trap",
111: "abort",
112: "EMT trap",
113: "Floating exception",
114: "Killed",
115: "Bus error",
116: "Memory fault",
117: "Bad system call",
118: 0, /* Broken pipe */
119: "Alarm call",
120: "Terminated",
121: "Signal 16",
122: "Signal 17",
123: "Child death",
124: "Power Fail"
125: };
126:
127: char export[] = "export";
128: char duperr[] = "cannot dup";
129:
130: struct sysnod commands[] =
131: {
132: { ".", SYSDOT },
133: { ":", SYSNULL },
134: { "break", SYSBREAK },
135: { "builtin", SYSBLTIN },
136: { "cd", SYSCD },
137: { "continue", SYSCONT },
138: { "eval", SYSEVAL },
139: { "exec", SYSEXEC },
140: { "exit", SYSEXIT },
141: { "export", SYSXPORT },
142: { "newgrp", SYSNEWGRP },
143: { "read", SYSREAD },
144: { "return", SYSRETURN },
145: { "set", SYSSET },
146: { "shift", SYSSHFT },
147: { "times", SYSTIMES },
148: { "trap", SYSTRAP },
149: { "umask", SYSUMASK },
150: { "unset", SYSUNS },
151: { "wait", SYSWAIT },
152: { "whatis", SYSWHATIS }
153: };
154:
155: int no_commands = 21;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.