date and time created 83/01/21 11:10:18 by dlw
[unix-history] / usr / src / old / sh / msg.c
CommitLineData
dfae1d36
KM
1/* msg.c 4.1 82/05/07 */
2
3#
4/*
5 * UNIX shell
6 *
7 * S. R. Bourne
8 * Bell Telephone Laboratories
9 *
10 */
11
12
13#include "defs.h"
14#include "sym.h"
15
16MSG version = "\nVERSION sys137 DATE 1978 Nov 6 14:29:22\n";
17
18/* error messages */
19MSG badopt = "bad option(s)";
20MSG mailmsg = "you have mail\n";
21MSG nospace = "no space";
22MSG synmsg = "syntax error";
23
24MSG badnum = "bad number";
25MSG badparam = "parameter not set";
26MSG badsub = "bad substitution";
27MSG badcreate = "cannot create";
28MSG illegal = "illegal io";
29MSG restricted = "restricted";
30MSG piperr = "cannot make pipe";
31MSG badopen = "cannot open";
32MSG coredump = " - core dumped";
33MSG arglist = "arg list too long";
34MSG txtbsy = "text busy";
35MSG toobig = "too big";
36MSG badexec = "cannot execute";
37MSG notfound = "not found";
38MSG badfile = "bad file number";
39MSG badshift = "cannot shift";
40MSG baddir = "bad directory";
41MSG badtrap = "bad trap";
42MSG wtfailed = "is read only";
43MSG notid = "is not an identifier";
44
45/* built in names */
46MSG pathname = "PATH";
47MSG homename = "HOME";
48MSG mailname = "MAIL";
49MSG fngname = "FILEMATCH";
50MSG ifsname = "IFS";
51MSG ps1name = "PS1";
52MSG ps2name = "PS2";
53
54/* string constants */
55MSG nullstr = "";
56MSG sptbnl = " \t\n";
57MSG defpath = ":/bin:/usr/bin";
58MSG colon = ": ";
59MSG minus = "-";
60MSG endoffile = "end of file";
61MSG unexpected = " unexpected";
62MSG atline = " at line ";
63MSG devnull = "/dev/null";
64MSG execpmsg = "+ ";
65MSG readmsg = "> ";
66MSG stdprompt = "$ ";
67MSG supprompt = "# ";
68MSG profile = ".profile";
69
70
71/* tables */
72SYSTAB reserved {
73 {"in", INSYM},
74 {"esac", ESSYM},
75 {"case", CASYM},
76 {"for", FORSYM},
77 {"done", ODSYM},
78 {"if", IFSYM},
79 {"while", WHSYM},
80 {"do", DOSYM},
81 {"then", THSYM},
82 {"else", ELSYM},
83 {"elif", EFSYM},
84 {"fi", FISYM},
85 {"until", UNSYM},
86 { "{", BRSYM},
87 { "}", KTSYM},
88 {0, 0},
89};
90
91STRING sysmsg[] {
92 0,
93 "Hangup",
94 0, /* Interrupt */
95 "Quit",
96 "Illegal instruction",
97 "Trace/BPT trap",
98 "IOT trap",
99 "EMT trap",
100 "Floating exception",
101 "Killed",
102 "Bus error",
103 "Memory fault",
104 "Bad system call",
105 0, /* Broken pipe */
106 "Alarm call",
107 "Terminated",
108 "Signal 16",
109};
110
111MSG export = "export";
112MSG readonly = "readonly";
113SYSTAB commands {
114 {"cd", SYSCD},
115 {"read", SYSREAD},
116/*
117 {"[", SYSTST},
118*/
119 {"set", SYSSET},
120 {":", SYSNULL},
121 {"trap", SYSTRAP},
122 {"login", SYSLOGIN},
123 {"wait", SYSWAIT},
124 {"eval", SYSEVAL},
125 {".", SYSDOT},
126 {readonly, SYSRDONLY},
127 {export, SYSXPORT},
128 {"chdir", SYSCD},
129 {"break", SYSBREAK},
130 {"continue", SYSCONT},
131 {"shift", SYSSHFT},
132 {"exit", SYSEXIT},
133 {"exec", SYSEXEC},
134 {"times", SYSTIMES},
135 {"umask", SYSUMASK},
136 {0, 0},
137};