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