aboutsummaryrefslogtreecommitdiff
path: root/shells/v7sh/files/patch-msg.c
blob: 9fc3eb2ad6009235eec7d2103975d04a6785e0a3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
diff -u -x CVS -x work -x core -x *.core -x #* -x *~ -x *.orig -x *.rej -I $Id.*$ -I $.+BSD.*$ msg.c.orig msg.c
--- msg.c.orig	Fri Jun  4 02:51:02 2004
+++ msg.c	Sat Jun 19 18:42:23 2004
@@ -10,64 +10,88 @@
 
 #include	"defs.h"
 #include	"sym.h"
+#include	"pathnames.h"
 
-MSG		version = "\nVERSION sys137	DATE 1978 Nov 6 14:29:22\n";
+CMSG		version = "\nVERSION sys137	DATE 1978 Nov 6 14:29:22\n";
 
 /* error messages */
-MSG	badopt		= "bad option(s)";
-MSG	mailmsg		= "you have mail\n";
-MSG	nospace		= "no space";
-MSG	synmsg		= "syntax error";
-
-MSG	badnum		= "bad number";
-MSG	badparam	= "parameter not set";
-MSG	badsub		= "bad substitution";
-MSG	badcreate	= "cannot create";
-MSG	illegal		= "illegal io";
-MSG	restricted	= "restricted";
-MSG	piperr		= "cannot make pipe";
-MSG	badopen		= "cannot open";
-MSG	coredump	= " - core dumped";
-MSG	arglist		= "arg list too long";
-MSG	txtbsy		= "text busy";
-MSG	toobig		= "too big";
-MSG	badexec		= "cannot execute";
-MSG	notfound	= "not found";
-MSG	badfile		= "bad file number";
-MSG	badshift	= "cannot shift";
-MSG	baddir		= "bad directory";
-MSG	badtrap		= "bad trap";
-MSG	wtfailed	= "is read only";
-MSG	notid		= "is not an identifier";
+CMSG	badopt		= "bad option(s)";
+CMSG	mailmsg		= "you have mail\n";
+CMSG	nospace		= "no space";
+CMSG	synmsg		= "syntax error";
+
+CMSG	badnum		= "bad number";
+#if defined(SYSIII)
+CMSG	badparam	= "parameter null or not set";
+CMSG	unset		= "parameter not set";
+#else /* V7 */
+CMSG	badparam	= "parameter not set";
+#endif
+CMSG	badsub		= "bad substitution";
+CMSG	badcreate	= "cannot create";
+CMSG	illegal		= "illegal io";
+CMSG	restricted	= "restricted";
+#if defined(SYSIII)
+CMSG	nofork		= "cannot fork: too many processes";
+CMSG	noswap		= "cannot fork: no swap space";
+#endif
+CMSG	piperr		= "cannot make pipe";
+CMSG	badopen		= "cannot open";
+CMSG	coredump	= " - core dumped";
+CMSG	arglist		= "arg list too long";
+#if defined(SYSIII)
+CMSG	argcount	= "argument count";
+#endif
+CMSG	txtbsy		= "text busy";
+CMSG	toobig		= "too big";
+CMSG	badexec		= "cannot execute";
+CMSG	notfound	= "not found";
+CMSG	badfile		= "bad file number";
+CMSG	badshift	= "cannot shift";
+CMSG	baddir		= "bad directory";
+CMSG	badtrap		= "bad trap";
+CMSG	memfault	= "cannot trap 11";
+CMSG	wtfailed	= "is read only";
+CMSG	notid		= "is not an identifier";
+CMSG	badulimit	= "bad ulimit";
+
+#if defined(SYSIII)
+/*	messages for 'builtin' functions	*/
+CMSG	btest		= "test";
+CMSG	badop		= "unknown operator";
+#endif
 
 /* built in names */
-MSG	pathname	= "PATH";
-MSG	homename	= "HOME";
-MSG	mailname	= "MAIL";
-MSG	fngname		= "FILEMATCH";
-MSG	ifsname		= "IFS";
-MSG	ps1name		= "PS1";
-MSG	ps2name		= "PS2";
+CMSG	pathname	= "PATH";
+CMSG	homename	= "HOME";
+CMSG	mailname	= "MAIL";
+CMSG	fngname		= "FILEMATCH";
+CMSG	ifsname		= "IFS";
+CMSG	ps1name		= "PS1";
+CMSG	ps2name		= "PS2";
 
 /* string constants */
-MSG	nullstr		= "";
-MSG	sptbnl		= " \t\n";
-MSG	defpath		= ":/bin:/usr/bin";
-MSG	colon		= ": ";
-MSG	minus		= "-";
-MSG	endoffile	= "end of file";
-MSG	unexpected 	= " unexpected";
-MSG	atline		= " at line ";
-MSG	devnull		= "/dev/null";
-MSG	execpmsg	= "+ ";
-MSG	readmsg		= "> ";
-MSG	stdprompt	= "$ ";
-MSG	supprompt	= "# ";
-MSG	profile		= ".profile";
-
+CMSG	nullstr		= "";
+CMSG	sptbnl		= " \t\n";
+CMSG	defpath		= _PATH_DEFPATH;
+CMSG	colon		= ": ";
+CMSG	minus		= "-";
+CMSG	endoffile	= "end of file";
+CMSG	endofline	= "newline or ;";
+CMSG	unexpected 	= " unexpected";
+CMSG	atline		= " at line ";
+CMSG	devnull		= _PATH_DEVNULL;
+CMSG	execpmsg	= "+ ";
+CMSG	readmsg		= "> ";
+CMSG	stdprompt	= "$ ";
+CMSG	supprompt	= "# ";
+CMSG	profile		= _PATH_DOTPROFILE;
+#if defined(SYSIII)
+CMSG	sysprofile	= _PATH_ETCPROFILE;
+#endif
 
 /* tables */
-SYSTAB reserved {
+SYSTAB reserved={
 		{"in",		INSYM},
 		{"esac",	ESSYM},
 		{"case",	CASYM},
@@ -83,19 +107,19 @@
 		{"until",	UNSYM},
 		{ "{",		BRSYM},
 		{ "}",		KTSYM},
-		{0,	0},
+		{0,	0}
 };
 
-STRING	sysmsg[] {
+CSTRING	sysmsg[]={
 		0,
 		"Hangup",
 		0,	/* Interrupt */
 		"Quit",
 		"Illegal instruction",
 		"Trace/BPT trap",
-		"IOT trap",
+		"Abort trap",	/* IOT trap */
 		"EMT trap",
-		"Floating exception",
+		"Floating point exception",
 		"Killed",
 		"Bus error",
 		"Memory fault",
@@ -103,25 +127,49 @@
 		0,	/* Broken pipe */
 		"Alarm call",
 		"Terminated",
-		"Signal 16",
+		"Urgent I/O condition",
+		"Stopped",
+		"Stopped from terminal",
+		"Continued",
+		"Child exited",
+		"Stopped on terminal input",
+		"Stopped on terminal output",
+		"Asynchronous I/O",
+		"Cputime limit exceeded",
+		"Filesize limit exceeded",
+		"Virtual timer expired",
+		"Profiling timer expired",
+		"Window size changed",
+		"Information request",
+		"User defined signal 1",
+		"User defined signal 2",
+		"Thread interrupt"
 };
+#if defined(RENO)
+INT		num_sysmsg = (sizeof sysmsg / sizeof sysmsg[0]);
+#endif
+
+CMSG		export = "export";
+CMSG		readonly = "readonly";
 
-MSG		export = "export";
-MSG		readonly = "readonly";
-SYSTAB	commands {
+SYSTAB	commands={
 		{"cd",		SYSCD},
 		{"read",	SYSREAD},
-/*
-		{"[",		SYSTST},
-*/
 		{"set",		SYSSET},
 		{":",		SYSNULL},
 		{"trap",	SYSTRAP},
+#if defined(ULTRIX)
+		{"ulimit",	SYSULIMIT},
+#endif
 		{"login",	SYSLOGIN},
 		{"wait",	SYSWAIT},
 		{"eval",	SYSEVAL},
 		{".",		SYSDOT},
+#if defined(SYSIII)
+		{"newgrp",	SYSNEWGRP},
+#else /* V7 */
 		{"newgrp",	SYSLOGIN},
+#endif
 		{readonly,	SYSRDONLY},
 		{export,	SYSXPORT},
 		{"chdir",	SYSCD},
@@ -132,5 +180,13 @@
 		{"exec",	SYSEXEC},
 		{"times",	SYSTIMES},
 		{"umask",	SYSUMASK},
-		{0,	0},
+		{0,	0}
+};
+
+#if defined(SYSIII)
+SYSTAB	builtins={
+		{btest,		TEST},
+		{"[",		TEST},
+		{0,	0}
 };
+#endif