xref: /original-bsd/old/sh/msg.c (revision 7a4e9f34)
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 
16 MSG		version = "\nVERSION sys137	DATE 1978 Nov 6 14:29:22\n";
17 
18 /* error messages */
19 MSG	badopt		= "bad option(s)";
20 MSG	mailmsg		= "you have mail\n";
21 MSG	nospace		= "no space";
22 MSG	synmsg		= "syntax error";
23 
24 MSG	badnum		= "bad number";
25 MSG	badparam	= "parameter not set";
26 MSG	badsub		= "bad substitution";
27 MSG	badcreate	= "cannot create";
28 MSG	illegal		= "illegal io";
29 MSG	restricted	= "restricted";
30 MSG	piperr		= "cannot make pipe";
31 MSG	badopen		= "cannot open";
32 MSG	coredump	= " - core dumped";
33 MSG	arglist		= "arg list too long";
34 MSG	txtbsy		= "text busy";
35 MSG	toobig		= "too big";
36 MSG	badexec		= "cannot execute";
37 MSG	notfound	= "not found";
38 MSG	badfile		= "bad file number";
39 MSG	badshift	= "cannot shift";
40 MSG	baddir		= "bad directory";
41 MSG	badtrap		= "bad trap";
42 MSG	wtfailed	= "is read only";
43 MSG	notid		= "is not an identifier";
44 
45 /* built in names */
46 MSG	pathname	= "PATH";
47 MSG	homename	= "HOME";
48 MSG	mailname	= "MAIL";
49 MSG	fngname		= "FILEMATCH";
50 MSG	ifsname		= "IFS";
51 MSG	ps1name		= "PS1";
52 MSG	ps2name		= "PS2";
53 
54 /* string constants */
55 MSG	nullstr		= "";
56 MSG	sptbnl		= " \t\n";
57 MSG	defpath		= ":/bin:/usr/bin";
58 MSG	colon		= ": ";
59 MSG	minus		= "-";
60 MSG	endoffile	= "end of file";
61 MSG	unexpected 	= " unexpected";
62 MSG	atline		= " at line ";
63 MSG	devnull		= "/dev/null";
64 MSG	execpmsg	= "+ ";
65 MSG	readmsg		= "> ";
66 MSG	stdprompt	= "$ ";
67 MSG	supprompt	= "# ";
68 MSG	profile		= ".profile";
69 
70 
71 /* tables */
72 SYSTAB 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 
91 STRING	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 
111 MSG		export = "export";
112 MSG		readonly = "readonly";
113 SYSTAB	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 };
138