add manual page
[unix-history] / usr / src / old / sh / msg.c
CommitLineData
f6227721 1#ifndef lint
ea53ee71 2static char sccsid[] = "@(#)msg.c 4.5 %G%";
f6227721 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 */
ea53ee71 74SYSTAB reserved = {
dfae1d36
KM
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
ea53ee71 93STRING sysmsg[] = {
dfae1d36
KM
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",
7bf3c17d
KM
110 "Urgent condition",
111 "Stopped",
112 "Stopped from terminal",
113 "Continued",
114 "Child terminated",
115 "Stopped on terminal input",
116 "Stopped on terminal output",
117 "Asynchronous I/O",
118 "Exceeded cpu time limit",
119 "Exceeded file size limit",
120 "Virtual time alarm",
121 "Profiling time alarm",
122 "Window changed",
123 "Signal 29",
2ec6024a
KM
124 "User defined signal 1",
125 "User defined signal 2",
7bf3c17d 126 "Signal 32",
dfae1d36 127};
7bf3c17d 128INT num_sysmsg = (sizeof sysmsg / sizeof sysmsg[0]);
dfae1d36
KM
129
130MSG export = "export";
131MSG readonly = "readonly";
ea53ee71 132SYSTAB commands = {
dfae1d36
KM
133 {"cd", SYSCD},
134 {"read", SYSREAD},
135/*
136 {"[", SYSTST},
137*/
138 {"set", SYSSET},
139 {":", SYSNULL},
140 {"trap", SYSTRAP},
141 {"login", SYSLOGIN},
142 {"wait", SYSWAIT},
143 {"eval", SYSEVAL},
144 {".", SYSDOT},
145 {readonly, SYSRDONLY},
146 {export, SYSXPORT},
147 {"chdir", SYSCD},
148 {"break", SYSBREAK},
149 {"continue", SYSCONT},
150 {"shift", SYSSHFT},
151 {"exit", SYSEXIT},
152 {"exec", SYSEXEC},
153 {"times", SYSTIMES},
154 {"umask", SYSUMASK},
155 {0, 0},
156};