Deleted wrongly imported bind sources from base.
[dragonfly.git] / contrib / tcsh-6 / sh.init.c
blobd1242aa1055f58efd42e8fa26285da228ee4ba1b
1 /* $Header: /p/tcsh/cvsroot/tcsh/sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $ */
2 /*
3 * sh.init.c: Function and signal tables
4 */
5 /*-
6 * Copyright (c) 1980, 1991 The Regents of the University of California.
7 * All rights reserved.
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
33 #include "sh.h"
35 RCSID("$tcsh: sh.init.c,v 3.63 2006/08/23 01:49:32 mitr Exp $")
37 #include "ed.h"
38 #include "tw.h"
41 * C shell
44 #define INF INT_MAX
46 const struct biltins bfunc[] = {
47 { ":", dozip, 0, INF },
48 { "@", dolet, 0, INF },
49 { "alias", doalias, 0, INF },
50 { "alloc", showall, 0, 1 },
51 #if defined(_CX_UX)
52 { "att", doatt, 0, INF },
53 #endif /* _CX_UX */
54 { "bg", dobg, 0, INF },
55 { "bindkey", dobindkey, 0, 8 },
56 { "break", dobreak, 0, 0 },
57 { "breaksw", doswbrk, 0, 0 },
58 #ifdef _OSD_POSIX
59 { "bs2cmd", dobs2cmd, 1, INF },
60 #endif /* OBSOLETE */
61 { "builtins", dobuiltins, 0, 0 },
62 #ifdef KAI
63 { "bye", goodbye, 0, 0 },
64 #endif /* KAI */
65 { "case", dozip, 0, 1 },
66 { "cd", dochngd, 0, INF },
67 { "chdir", dochngd, 0, INF },
68 { "complete", docomplete, 0, INF },
69 { "continue", docontin, 0, 0 },
70 { "default", dozip, 0, 0 },
71 { "dirs", dodirs, 0, INF },
72 #if defined(_CRAY) && !defined(_CRAYMPP)
73 { "dmmode", dodmmode, 0, 1 },
74 #endif /* _CRAY && !_CRAYMPP */
75 { "echo", doecho, 0, INF },
76 { "echotc", doechotc, 0, INF },
77 { "else", doelse, 0, INF },
78 { "end", doend, 0, 0 },
79 { "endif", dozip, 0, 0 },
80 { "endsw", dozip, 0, 0 },
81 { "eval", doeval, 0, INF },
82 { "exec", execash, 1, INF },
83 { "exit", doexit, 0, INF },
84 { "fg", dofg, 0, INF },
85 { "filetest", dofiletest, 2, INF },
86 { "foreach", doforeach, 3, INF },
87 #ifdef TCF
88 { "getspath", dogetspath, 0, 0 },
89 { "getxvers", dogetxvers, 0, 0 },
90 #endif /* TCF */
91 { "glob", doglob, 0, INF },
92 { "goto", dogoto, 1, 1 },
93 { "hashstat", hashstat, 0, 0 },
94 { "history", dohist, 0, 2 },
95 { "hup", dohup, 0, INF },
96 { "if", doif, 1, INF },
97 #ifdef apollo
98 { "inlib", doinlib, 1, INF },
99 #endif /* apollo */
100 { "jobs", dojobs, 0, 1 },
101 { "kill", dokill, 1, INF },
102 #ifndef HAVENOLIMIT
103 { "limit", dolimit, 0, 3 },
104 #endif /* !HAVENOLIMIT */
105 #ifdef OBSOLETE
106 { "linedit", doecho, 0, INF },
107 #endif /* OBSOLETE */
108 #if !defined(HAVENOUTMP) && !defined(KAI)
109 { "log", dolog, 0, 0 },
110 #endif /* !HAVENOUTMP && !KAI */
111 { "login", dologin, 0, 1 },
112 { "logout", dologout, 0, 0 },
113 { "ls-F", dolist, 0, INF },
114 #ifdef TCF
115 { "migrate", domigrate, 1, INF },
116 #endif /* TCF */
117 #ifdef NEWGRP
118 { "newgrp", donewgrp, 0, 2 },
119 #endif /* NEWGRP */
120 { "nice", donice, 0, INF },
121 { "nohup", donohup, 0, INF },
122 { "notify", donotify, 0, INF },
123 { "onintr", doonintr, 0, 2 },
124 { "popd", dopopd, 0, INF },
125 { "printenv", doprintenv, 0, 1 },
126 { "pushd", dopushd, 0, INF },
127 { "rehash", dohash, 0, 3 },
128 { "repeat", dorepeat, 2, INF },
129 #ifdef apollo
130 { "rootnode", dorootnode, 1, 1 },
131 #endif /* apollo */
132 { "sched", dosched, 0, INF },
133 { "set", doset, 0, INF },
134 { "setenv", dosetenv, 0, 2 },
135 #ifdef MACH
136 { "setpath", dosetpath, 0, INF },
137 #endif /* MACH */
138 #ifdef TCF
139 { "setspath", dosetspath, 1, INF },
140 #endif /* TCF */
141 { "settc", dosettc, 2, 2 },
142 { "setty", dosetty, 0, INF },
143 #ifdef TCF
144 { "setxvers", dosetxvers, 0, 1 },
145 #endif /* TCF */
146 { "shift", shift, 0, 1 },
147 { "source", dosource, 1, INF },
148 { "stop", dostop, 1, INF },
149 { "suspend", dosuspend, 0, 0 },
150 { "switch", doswitch, 1, INF },
151 { "telltc", dotelltc, 0, INF },
152 #ifndef WINNT_NATIVE
153 { "termname", dotermname, 0, 1 },
154 #endif
155 { "time", dotime, 0, INF },
156 #if defined(_CX_UX)
157 { "ucb", doucb, 0, INF },
158 #endif /* _CX_UX */
159 { "umask", doumask, 0, 1 },
160 { "unalias", unalias, 1, INF },
161 { "uncomplete", douncomplete, 1, INF },
162 { "unhash", dounhash, 0, 0 },
163 #if defined(masscomp) || defined(_CX_UX)
164 { "universe", douniverse, 0, INF },
165 #endif /* masscomp || _CX_UX */
166 #ifndef HAVENOLIMIT
167 { "unlimit", dounlimit, 0, INF },
168 #endif /* !HAVENOLIMIT */
169 { "unset", unset, 1, INF },
170 { "unsetenv", dounsetenv, 1, INF },
171 #ifdef apollo
172 { "ver", dover, 0, INF },
173 #endif /* apollo */
174 { "wait", dowait, 0, 0 },
175 #ifdef WARP
176 { "warp", dowarp, 0, 2 },
177 #endif /* WARP */
178 #if !defined(HAVENOUTMP) && defined(KAI)
179 { "watchlog", dolog, 0, 0 },
180 #endif /* !HAVENOUTMP && KAI */
181 { "where", dowhere, 1, INF },
182 { "which", dowhich, 1, INF },
183 { "while", dowhile, 1, INF }
185 int nbfunc = sizeof bfunc / sizeof *bfunc;
187 struct srch srchn[] = {
188 { "@", TC_LET },
189 { "break", TC_BREAK },
190 { "breaksw", TC_BRKSW },
191 { "case", TC_CASE },
192 { "default", TC_DEFAULT },
193 { "else", TC_ELSE },
194 { "end", TC_END },
195 { "endif", TC_ENDIF },
196 { "endsw", TC_ENDSW },
197 { "exit", TC_EXIT },
198 { "foreach", TC_FOREACH },
199 { "goto", TC_GOTO },
200 { "if", TC_IF },
201 { "label", TC_LABEL },
202 { "set", TC_SET },
203 { "switch", TC_SWITCH },
204 { "while", TC_WHILE }
206 int nsrchn = sizeof srchn / sizeof *srchn;
210 * Note: For some machines, (hpux eg.)
211 * NSIG = number of signals + 1...
212 * so we define 33 or 65 (POSIX) signals for
213 * everybody
216 /* We define NUMSIG to avoid changing NSIG or MAXSIG */
217 #if defined(POSIX) && !defined(__CYGWIN__)
218 # define NUMSIG 65
219 #else /* !POSIX */
220 # define NUMSIG 33
221 #endif /* POSIX */
223 int nsig = NUMSIG - 1; /* This should be the number of real signals */
224 /* not counting signal 0 */
225 struct mesg mesg[NUMSIG]; /* Arrays start at [0] so we initialize from */
226 /* 0 to 32 or 64, the max real signal number */
228 void
229 mesginit(void)
232 #ifdef NLS_CATALOGS
233 int i;
235 for (i = 0; i < NUMSIG; i++) {
236 xfree((char *)(intptr_t)mesg[i].pname);
237 mesg[i].pname = NULL;
239 #endif /* NLS_CATALOGS */
241 #if defined(SIGNULL) || defined(DECOSF1)
242 # ifndef SIGNULL
243 # define SIGNULL 0
244 # endif /* !SIGNULL */
245 if (mesg[SIGNULL].pname == NULL) {
246 mesg[SIGNULL].iname = "NULL";
247 mesg[SIGNULL].pname = CSAVS(2, 1, "Null signal");
249 #endif /* SIGNULL || DECOSF1 */
251 #ifdef SIGHUP
252 if (mesg[SIGHUP].pname == NULL) {
253 mesg[SIGHUP].iname = "HUP";
254 mesg[SIGHUP].pname = CSAVS(2, 2, "Hangup");
256 #endif /* SIGHUP */
258 #ifdef SIGINT
259 if (mesg[SIGINT].pname == NULL) {
260 mesg[SIGINT].iname = "INT";
261 mesg[SIGINT].pname = CSAVS(2, 3, "Interrupt");
263 #endif /* SIGINT */
265 #ifdef SIGQUIT
266 if (mesg[SIGQUIT].pname == NULL) {
267 mesg[SIGQUIT].iname = "QUIT";
268 mesg[SIGQUIT].pname = CSAVS(2, 4, "Quit");
270 #endif /* SIGQUIT */
272 #ifdef SIGILL
273 if (mesg[SIGILL].pname == NULL) {
274 mesg[SIGILL].iname = "ILL";
275 mesg[SIGILL].pname = CSAVS(2, 5, "Illegal instruction");
277 #endif /* SIGILL */
279 #ifdef SIGTRAP
280 if (mesg[SIGTRAP].pname == NULL) {
281 mesg[SIGTRAP].iname = "TRAP";
282 mesg[SIGTRAP].pname = CSAVS(2, 6, "Trace/BPT trap");
284 #endif /* SIGTRAP */
286 #ifdef SIGABRT
287 if (mesg[SIGABRT].pname == NULL) {
288 mesg[SIGABRT].iname = "ABRT";
289 mesg[SIGABRT].pname = CSAVS(2, 7, "Abort");
291 #endif /* SIGABRT */
293 #ifdef SIGIOT
294 if (mesg[SIGIOT].pname == NULL) {
295 mesg[SIGIOT].iname = "IOT";
296 mesg[SIGIOT].pname = CSAVS(2, 8, "IOT trap");
298 #endif /* SIGIOT */
300 #ifdef SIGDANGER
301 /* aiws */
302 if (mesg[SIGDANGER].pname == NULL) {
303 mesg[SIGDANGER].iname = "DANGER";
304 mesg[SIGDANGER].pname = CSAVS(2, 9, "System Crash Imminent");
306 #endif /* SIGDANGER */
308 #ifdef SIGERR
309 /* _CRAY */
310 if (mesg[SIGERR].pname == NULL) {
311 mesg[SIGERR].iname = "ERR";
312 mesg[SIGERR].pname = CSAVS(2, 10, "Error exit");
314 #endif /* SIGERR */
316 #ifdef SIGEMT
317 if (mesg[SIGEMT].pname == NULL) {
318 mesg[SIGEMT].iname = "EMT";
319 mesg[SIGEMT].pname = CSAVS(2, 11, "EMT trap");
321 #endif /* SIGEMT */
323 #ifdef SIGFPE
324 if (mesg[SIGFPE].pname == NULL) {
325 mesg[SIGFPE].iname = "FPE";
326 mesg[SIGFPE].pname = CSAVS(2, 12, "Floating exception");
328 #endif /* SIGFPE */
330 #ifdef SIGKILL
331 if (mesg[SIGKILL].pname == NULL) {
332 mesg[SIGKILL].iname = "KILL";
333 mesg[SIGKILL].pname = CSAVS(2, 13, "Killed");
335 #endif /* SIGKILL */
337 #ifdef SIGUSR1
338 if (mesg[SIGUSR1].pname == NULL) {
339 mesg[SIGUSR1].iname = "USR1";
340 mesg[SIGUSR1].pname = CSAVS(2, 14, "User signal 1");
342 #endif /* SIGUSR1 */
344 #ifdef SIGUSR2
345 if (mesg[SIGUSR2].pname == NULL) {
346 mesg[SIGUSR2].iname = "USR2";
347 mesg[SIGUSR2].pname = CSAVS(2, 15, "User signal 2");
349 #endif /* SIGUSR2 */
351 #ifdef SIGSEGV
352 if (mesg[SIGSEGV].pname == NULL) {
353 mesg[SIGSEGV].iname = "SEGV";
354 mesg[SIGSEGV].pname = CSAVS(2, 16, "Segmentation fault");
356 #endif /* SIGSEGV */
358 #ifdef SIGBUS
359 if (mesg[SIGBUS].pname == NULL) {
360 mesg[SIGBUS].iname = "BUS";
361 mesg[SIGBUS].pname = CSAVS(2, 17, "Bus error");
363 #endif /* SIGBUS */
365 #ifdef SIGPRE
366 /* _CRAY || IBMAIX */
367 if (mesg[SIGPRE].pname == NULL) {
368 mesg[SIGPRE].iname = "PRE";
369 mesg[SIGPRE].pname = CSAVS(2, 18, "Program range error");
371 #endif /* SIGPRE */
373 #ifdef SIGORE
374 /* _CRAY */
375 if (mesg[SIGORE].pname == NULL) {
376 mesg[SIGORE].iname = "ORE";
377 mesg[SIGORE].pname = CSAVS(2, 19, "Operand range error");
379 #endif /* SIGORE */
381 #ifdef SIGSYS
382 if (mesg[SIGSYS].pname == NULL) {
383 mesg[SIGSYS].iname = "SYS";
384 mesg[SIGSYS].pname = CSAVS(2, 20, "Bad system call");
386 #endif /* SIGSYS */
388 #ifdef SIGPIPE
389 if (mesg[SIGPIPE].pname == NULL) {
390 mesg[SIGPIPE].iname = "PIPE";
391 mesg[SIGPIPE].pname = CSAVS(2, 21, "Broken pipe");
393 #endif /* SIGPIPE */
395 #ifdef SIGALRM
396 if (mesg[SIGALRM].pname == NULL) {
397 mesg[SIGALRM].iname = "ALRM";
398 mesg[SIGALRM].pname = CSAVS(2, 22, "Alarm clock");
400 #endif /* SIGALRM */
402 #ifdef SIGTERM
403 if (mesg[SIGTERM].pname == NULL) {
404 mesg[SIGTERM].iname = "TERM";
405 mesg[SIGTERM].pname = CSAVS(2, 23, "Terminated");
407 #endif /* SIGTERM */
409 /* SIGCLD vs SIGCHLD */
410 #if !defined(SIGCHLD) || defined(SOLARIS2) || defined(apollo) || defined(__EMX__)
411 /* If we don't define SIGCHLD, or our OS prefers SIGCLD to SIGCHLD, */
412 /* check for SIGCLD */
413 # ifdef SIGCLD
414 if (mesg[SIGCLD].pname == NULL) {
415 mesg[SIGCLD].iname = "CLD";
416 # ifdef BSDJOBS
417 mesg[SIGCLD].pname = CSAVS(2, 24, "Child status change");
418 # else /* !BSDJOBS */
419 mesg[SIGCLD].pname = CSAVS(2, 25, "Death of child");
420 # endif /* BSDJOBS */
422 # endif /* SIGCLD */
423 #else /* !(!SIGCHLD || SOLARIS2 || apollo || __EMX__) */
424 /* We probably define SIGCHLD */
425 # ifdef SIGCHLD
426 if (mesg[SIGCHLD].pname == NULL) {
427 mesg[SIGCHLD].iname = "CHLD";
428 # ifdef BSDJOBS
429 mesg[SIGCHLD].pname = CSAVS(2, 27, "Child stopped or exited");
430 # else /* !BSDJOBS */
431 mesg[SIGCHLD].pname = CSAVS(2, 28, "Child exited");
432 # endif /* BSDJOBS */
434 # endif /* SIGCHLD */
435 #endif /* !SIGCHLD || SOLARIS2 || apollo || __EMX__ */
437 #ifdef SIGAPOLLO
438 /* apollo */
439 if (mesg[SIGAPOLLO].pname == NULL) {
440 mesg[SIGAPOLLO].iname = "APOLLO";
441 mesg[SIGAPOLLO].pname = CSAVS(2, 26, "Apollo-specific fault");
443 #endif /* SIGAPOLLO */
445 #ifdef SIGPWR
446 if (mesg[SIGPWR].pname == NULL) {
447 mesg[SIGPWR].iname = "PWR";
448 mesg[SIGPWR].pname = CSAVS(2, 29, "Power failure");
450 #endif /* SIGPWR */
452 #ifdef SIGLOST
453 if (mesg[SIGLOST].pname == NULL) {
454 mesg[SIGLOST].iname = "LOST";
455 mesg[SIGLOST].pname = CSAVS(2, 30, "Resource Lost");
457 #endif /* SIGLOST */
459 #ifdef SIGBREAK
460 /* __EMX__ */
461 if (mesg[SIGBREAK].pname == NULL) {
462 mesg[SIGBREAK].iname = "BREAK";
463 mesg[SIGBREAK].pname = CSAVS(2, 31, "Break (Ctrl-Break)");
465 #endif /* SIGBREAK */
467 #ifdef SIGIO
468 # if !defined(SIGPOLL) || SIGPOLL != SIGIO
469 if (mesg[SIGIO].pname == NULL) {
470 mesg[SIGIO].iname = "IO";
471 # ifdef cray
472 mesg[SIGIO].pname = CSAVS(2, 32, "Input/output possible signal");
473 # else /* !cray */
474 mesg[SIGIO].pname = CSAVS(2, 33, "Asynchronous I/O (select)");
475 # endif /* cray */
477 # endif /* !SIGPOLL || SIGPOLL != SIGIO */
478 #endif /* SIGIO */
480 #ifdef SIGURG
481 if (mesg[SIGURG].pname == NULL) {
482 mesg[SIGURG].iname = "URG";
483 mesg[SIGURG].pname = CSAVS(2, 34, "Urgent condition on I/O channel");
485 #endif /* SIGURG */
487 #ifdef SIGMT
488 /* cray */
489 if (mesg[SIGMT].pname == NULL) {
490 mesg[SIGMT].iname = "MT";
491 mesg[SIGMT].pname = CSAVS(2, 35, "Multitasking wake-up");
493 #endif /* SIGMT */
495 #ifdef SIGMTKILL
496 /* cray */
497 if (mesg[SIGMTKILL].pname == NULL) {
498 mesg[SIGMTKILL].iname = "MTKILL";
499 mesg[SIGMTKILL].pname = CSAVS(2, 36, "Multitasking kill");
501 #endif /* SIGMTKILL */
503 #ifdef SIGBUFIO
504 /* _CRAYCOM */
505 if (mesg[SIGBUFIO].pname == NULL) {
506 mesg[SIGBUFIO].iname = "BUFIO";
507 mesg[SIGBUFIO].pname = CSAVS(2, 37,
508 "Fortran asynchronous I/O completion");
510 #endif /* SIGBUFIO */
512 #ifdef SIGRECOVERY
513 /* _CRAYCOM */
514 if (mesg[SIGRECOVERY].pname == NULL) {
515 mesg[SIGRECOVERY].iname = "RECOVERY";
516 mesg[SIGRECOVERY].pname = CSAVS(2, 38, "Recovery");
518 #endif /* SIGRECOVERY */
520 #ifdef SIGUME
521 /* _CRAYCOM */
522 if (mesg[SIGUME].pname == NULL) {
523 mesg[SIGUME].iname = "UME";
524 mesg[SIGUME].pname = CSAVS(2, 39, "Uncorrectable memory error");
526 #endif /* SIGUME */
528 #ifdef SIGCPULIM
529 /* _CRAYCOM */
530 if (mesg[SIGCPULIM].pname == NULL) {
531 mesg[SIGCPULIM].iname = "CPULIM";
532 mesg[SIGCPULIM].pname = CSAVS(2, 40, "CPU time limit exceeded");
534 #endif /* SIGCPULIM */
536 #ifdef SIGSHUTDN
537 /* _CRAYCOM */
538 if (mesg[SIGSHUTDN].pname == NULL) {
539 mesg[SIGSHUTDN].iname = "SHUTDN";
540 mesg[SIGSHUTDN].pname = CSAVS(2, 41, "System shutdown imminent");
542 #endif /* SIGSHUTDN */
544 #ifdef SIGNOWAK
545 /* _CRAYCOM */
546 if (mesg[SIGNOWAK].pname == NULL) {
547 mesg[SIGNOWAK].iname = "NOWAK";
548 mesg[SIGNOWAK].pname = CSAVS(2, 42,
549 "Micro-tasking group-no wakeup flag set");
551 #endif /* SIGNOWAK */
553 #ifdef SIGTHERR
554 /* _CRAYCOM */
555 if (mesg[SIGTHERR].pname == NULL) {
556 mesg[SIGTHERR].iname = "THERR";
557 mesg[SIGTHERR].pname = CSAVS(2, 43,
558 "Thread error - (use cord -T for detailed info)");
560 #endif /* SIGTHERR */
562 #ifdef SIGRPE
563 /* cray */
564 if (mesg[SIGRPE].pname == NULL) {
565 mesg[SIGRPE].pname = CSAVS(2, 44, "CRAY Y-MP register parity error");
566 mesg[SIGRPE].iname = "RPE";
568 #endif /* SIGRPE */
570 #ifdef SIGINFO
571 if (mesg[SIGINFO].pname == NULL) {
572 mesg[SIGINFO].iname = "INFO";
573 mesg[SIGINFO].pname = CSAVS(2, 45, "Information request");
575 #endif /* SIGINFO */
577 #ifdef SIGSTOP
578 if (mesg[SIGSTOP].pname == NULL) {
579 mesg[SIGSTOP].iname = "STOP";
580 # ifdef SUSPENDED
581 mesg[SIGSTOP].pname = CSAVS(2, 46, "Suspended (signal)");
582 # else /* !SUSPENDED */
583 mesg[SIGSTOP].pname = CSAVS(2, 47, "Stopped (signal)");
584 # endif /* SUSPENDED */
586 #endif /* SIGSTOP */
588 #ifdef SIGTSTP
589 if (mesg[SIGTSTP].pname == NULL) {
590 mesg[SIGTSTP].iname = "TSTP";
591 # ifdef SUSPENDED
592 mesg[SIGTSTP].pname = CSAVS(2, 48, "Suspended");
593 # else /* !SUSPENDED */
594 mesg[SIGTSTP].pname = CSAVS(2, 49, "Stopped");
595 # endif /* SUSPENDED */
597 #endif /* SIGTSTP */
599 #ifdef SIGCONT
600 if (mesg[SIGCONT].pname == NULL) {
601 mesg[SIGCONT].iname = "CONT";
602 mesg[SIGCONT].pname = CSAVS(2, 50, "Continued");
604 #endif /* SIGCONT */
606 #ifdef SIGTTIN
607 if (mesg[SIGTTIN].pname == NULL) {
608 mesg[SIGTTIN].iname = "TTIN";
609 # ifdef SUSPENDED
610 mesg[SIGTTIN].pname = CSAVS(2, 51, "Suspended (tty input)");
611 # else /* !SUSPENDED */
612 mesg[SIGTTIN].pname = CSAVS(2, 52, "Stopped (tty input)");
613 # endif /* SUSPENDED */
615 #endif /* SIGTTIN */
617 #ifdef SIGTTOU
618 if (mesg[SIGTTOU].pname == NULL) {
619 mesg[SIGTTOU].iname = "TTOU";
620 # ifdef SUSPENDED
621 mesg[SIGTTOU].pname = CSAVS(2, 53, "Suspended (tty output)");
622 # else /* SUSPENDED */
623 mesg[SIGTTOU].pname = CSAVS(2, 54, "Stopped (tty output)");
624 # endif /* SUSPENDED */
626 #endif /* SIGTTOU */
628 #ifdef SIGWIND
629 /* UNIXPC */
630 if (mesg[SIGWIND].pname == NULL) {
631 mesg[SIGWIND].iname = "WIND";
632 mesg[SIGWIND].pname = CSAVS(2, 55, "Window status changed");
634 #endif /* SIGWIND */
636 #ifdef SIGWINDOW
637 if (mesg[SIGWINDOW].pname == NULL) {
638 mesg[SIGWINDOW].iname = "WINDOW";
639 mesg[SIGWINDOW].pname = CSAVS(2, 56, "Window size changed");
641 #endif /* SIGWINDOW */
643 #ifdef SIGWINCH
644 if (mesg[SIGWINCH].pname == NULL) {
645 mesg[SIGWINCH].iname = "WINCH";
646 mesg[SIGWINCH].pname = CSAVS(2, 56, "Window size changed");
648 #endif /* SIGWINCH */
650 #ifdef SIGPHONE
651 /* UNIXPC */
652 if (mesg[SIGPHONE].pname == NULL) {
653 mesg[SIGPHONE].iname = "PHONE";
654 mesg[SIGPHONE].pname = CSAVS(2, 57, "Phone status changed");
656 # endif /* SIGPHONE */
658 #ifdef SIGXCPU
659 if (mesg[SIGXCPU].pname == NULL) {
660 mesg[SIGXCPU].iname = "XCPU";
661 mesg[SIGXCPU].pname = CSAVS(2, 58, "Cputime limit exceeded");
663 #endif /* SIGXCPU */
665 #ifdef SIGXFSZ
666 if (mesg[SIGXFSZ].pname == NULL) {
667 mesg[SIGXFSZ].iname = "XFSZ";
668 mesg[SIGXFSZ].pname = CSAVS(2, 59, "Filesize limit exceeded");
670 #endif /* SIGXFSZ */
672 #ifdef SIGVTALRM
673 if (mesg[SIGVTALRM].pname == NULL) {
674 mesg[SIGVTALRM].iname = "VTALRM";
675 mesg[SIGVTALRM].pname = CSAVS(2, 60, "Virtual time alarm");
677 #endif /* SIGVTALRM */
679 #ifdef SIGPROF
680 if (mesg[SIGPROF].pname == NULL) {
681 mesg[SIGPROF].iname = "PROF";
682 mesg[SIGPROF].pname = CSAVS(2, 61, "Profiling time alarm");
684 #endif /* SIGPROF */
686 #ifdef SIGDIL
687 /* hpux */
688 if (mesg[SIGDIL].pname == NULL) {
689 mesg[SIGDIL].iname = "DIL";
690 mesg[SIGDIL].pname = CSAVS(2, 62, "DIL signal");
692 #endif /* SIGDIL */
694 #ifdef SIGPOLL
695 if (mesg[SIGPOLL].pname == NULL) {
696 mesg[SIGPOLL].iname = "POLL";
697 mesg[SIGPOLL].pname = CSAVS(2, 63, "Pollable event occured");
699 #endif /* SIGPOLL */
701 #ifdef SIGWAITING
702 /* solaris */
703 if (mesg[SIGWAITING].pname == NULL) {
704 mesg[SIGWAITING].iname = "WAITING";
705 mesg[SIGWAITING].pname = CSAVS(2, 64, "Process's lwps are blocked");
707 #endif /* SIGWAITING */
709 #ifdef SIGLWP
710 /* solaris */
711 if (mesg[SIGLWP].pname == NULL) {
712 mesg[SIGLWP].iname = "LWP";
713 mesg[SIGLWP].pname = CSAVS(2, 65, "Special LWP signal");
715 #endif /* SIGLWP */
717 #ifdef SIGFREEZE
718 /* solaris */
719 if (mesg[SIGFREEZE].pname == NULL) {
720 mesg[SIGFREEZE].iname = "FREEZE";
721 mesg[SIGFREEZE].pname = CSAVS(2, 66, "Special CPR Signal");
723 #endif /* SIGFREEZE */
725 #ifdef SIGTHAW
726 /* solaris */
727 if (mesg[SIGTHAW].pname == NULL) {
728 mesg[SIGTHAW].iname = "THAW";
729 mesg[SIGTHAW].pname = CSAVS(2, 67, "Special CPR Signal");
731 #endif /* SIGTHAW */
733 #ifdef SIGCANCEL
734 /* solaris */
735 if (mesg[SIGCANCEL].pname == NULL) {
736 mesg[SIGCANCEL].iname = "CANCEL";
737 mesg[SIGCANCEL].pname = CSAVS(2, 109,
738 "Thread cancellation signal used by libthread");
740 #endif /* SIGCANCEL */
743 * Careful, some OS's (HP/UX 10.0) define these as -1
745 #ifdef SIGRTMIN
747 * Cannot do this at compile time; Solaris2 uses _sysconf for these
749 if (SIGRTMIN > 0 && SIGRTMIN < NUMSIG) {
750 if (mesg[SIGRTMIN].pname == NULL) {
751 mesg[SIGRTMIN].iname = "RTMIN";
752 mesg[SIGRTMIN].pname = CSAVS(2, 68, "First Realtime Signal");
755 if (SIGRTMIN + 1 < SIGRTMAX && SIGRTMIN + 1 < NUMSIG &&
756 mesg[SIGRTMIN+1].pname == NULL) {
757 mesg[SIGRTMIN+1].iname = "RTMIN+1";
758 mesg[SIGRTMIN+1].pname = CSAVS(2, 69, "Second Realtime Signal");
761 if (SIGRTMIN + 2 < SIGRTMAX && SIGRTMIN + 2 < NUMSIG &&
762 mesg[SIGRTMIN+2].pname == NULL) {
763 mesg[SIGRTMIN+2].iname = "RTMIN+2";
764 mesg[SIGRTMIN+2].pname = CSAVS(2, 70, "Third Realtime Signal");
767 if (SIGRTMIN + 3 < SIGRTMAX && SIGRTMIN + 3 < NUMSIG &&
768 mesg[SIGRTMIN+3].pname == NULL) {
769 mesg[SIGRTMIN+3].iname = "RTMIN+3";
770 mesg[SIGRTMIN+3].pname = CSAVS(2, 71, "Fourth Realtime Signal");
773 #endif /* SIGRTMIN */
775 #ifdef SIGRTMAX
777 * Cannot do this at compile time; Solaris2 uses _sysconf for these
779 if (SIGRTMAX > 0 && SIGRTMAX < NUMSIG) {
780 if (SIGRTMAX - 3 > SIGRTMIN && mesg[SIGRTMAX-3].pname == NULL) {
781 mesg[SIGRTMAX-3].iname = "RTMAX-3";
782 mesg[SIGRTMAX-3].pname = CSAVS(2, 72,
783 "Fourth Last Realtime Signal");
786 if (SIGRTMAX - 2 > SIGRTMIN && mesg[SIGRTMAX-2].pname == NULL) {
787 mesg[SIGRTMAX-2].iname = "RTMAX-2";
788 mesg[SIGRTMAX-2].pname = CSAVS(2, 73,
789 "Third Last Realtime Signal");
792 if (SIGRTMAX - 1 > SIGRTMIN && mesg[SIGRTMAX-1].pname == NULL) {
793 mesg[SIGRTMAX-1].iname = "RTMAX-1";
794 mesg[SIGRTMAX-1].pname = CSAVS(2, 74,
795 "Second Last Realtime Signal");
798 if (SIGRTMAX > SIGRTMIN && mesg[SIGRTMAX].pname == NULL) {
799 mesg[SIGRTMAX].iname = "RTMAX";
800 mesg[SIGRTMAX].pname = CSAVS(2, 75,
801 "Last Realtime Signal");
804 #endif /* SIGRTMAX */
807 #ifdef SIGAIO
808 /* aiws */
809 if (mesg[SIGAIO].pname == NULL) {
810 mesg[SIGAIO].iname = "AIO";
811 mesg[SIGAIO].pname = CSAVS(2, 76, "LAN Asyncronous I/O");
813 #endif /* SIGAIO */
815 #ifdef SIGPTY
816 /* aiws */
817 if (mesg[SIGPTY].pname == NULL) {
818 mesg[SIGPTY].iname = "PTY";
819 mesg[SIGPTY].pname = CSAVS(2, 77, "PTY read/write availability");
821 #endif /* SIGPTY */
823 #ifdef SIGIOINT
824 /* aiws */
825 if (mesg[SIGIOINT].pname == NULL) {
826 mesg[SIGIOINT].iname = "IOINT";
827 mesg[SIGIOINT].pname = CSAVS(2, 78, "I/O intervention required");
829 #endif /* SIGIOINT */
831 #ifdef SIGGRANT
832 /* aiws */
833 if (mesg[SIGGRANT].pname == NULL) {
834 mesg[SIGGRANT].iname = "GRANT";
835 mesg[SIGGRANT].pname = CSAVS(2, 79, "HFT monitor mode granted");
837 #endif /* SIGGRANT */
839 #ifdef SIGRETRACT
840 /* aiws */
841 if (mesg[SIGRETRACT].pname == NULL) {
842 mesg[SIGRETRACT].iname = "RETRACT";
843 mesg[SIGRETRACT].pname = CSAVS(2, 80,
844 "HFT monitor mode should be relinguished");
846 #endif /* SIGRETRACT */
848 #ifdef SIGSOUND
849 /* aiws */
850 if (mesg[SIGSOUND].pname == NULL) {
851 mesg[SIGSOUND].iname = "SOUND";
852 mesg[SIGSOUND].pname = CSAVS(2, 81, "HFT sound control has completed");
854 #endif /* SIGSOUND */
856 #ifdef SIGSMSG
857 /* aiws */
858 if (mesg[SIGSMSG].pname == NULL) {
859 mesg[SIGSMSG].iname = "SMSG";
860 mesg[SIGSMSG].pname = CSAVS(2, 82, "Data in HFT ring buffer");
862 #endif /* SIGMSG */
864 #ifdef SIGMIGRATE
865 /* IBMAIX */
866 if (mesg[SIGMIGRATE].pname == NULL) {
867 mesg[SIGMIGRATE].iname = "MIGRATE";
868 mesg[SIGMIGRATE].pname = CSAVS(2, 83, "Migrate process");
870 #endif /* SIGMIGRATE */
872 #ifdef SIGSAK
873 /* IBMAIX */
874 if (mesg[SIGSAK].pname == NULL) {
875 mesg[SIGSAK].iname = "SAK";
876 mesg[SIGSAK].pname = CSAVS(2, 84, "Secure attention key");
878 #endif /* SIGSAK */
880 #ifdef SIGRESCHED
881 /* CX/UX */
882 if (mesg[SIGRESCHED].pname == NULL) {
883 mesg[SIGRESCHED].iname = "RESCHED";
884 mesg[SIGRESCHED].pname = CSAVS(2, 85, "Reschedule");
886 #endif /* SIGRESCHED */
888 #ifdef SIGDEBUG
889 /* VMS_POSIX */
890 if (mesg[SIGDEBUG].pname == NULL) {
891 mesg[SIGDEBUG].iname = "DEBUG";
892 mesg[SIGDEBUG].pname = CSAVS(2, 86, "Signaling SS$_DEBUG");
894 #endif /* SIGDEBUG */
896 #ifdef SIGPRIO
897 /* Lynx */
898 if (mesg[SIGPRIO].pname == NULL) {
899 mesg[SIGPRIO].iname = "PRIO";
900 mesg[SIGPRIO].pname = CSAVS(2, 87, "Priority changed");
902 #endif /* SIGPRIO */
904 #ifdef SIGDLK
905 /* cray */
906 if (mesg[SIGDLK].pname == NULL) {
907 mesg[SIGDLK].iname = "DLK";
908 mesg[SIGDLK].pname = CSAVS(2, 88, "True deadlock detected");
910 #endif /* SIGDLK */
912 #ifdef SIGTINT
913 /* masscomp */
914 if (mesg[SIGTINT].pname == NULL) {
915 mesg[SIGTINT].iname = "TINT";
916 mesg[SIGTINT].pname = CSAVS(2, 89, "New input character");
918 #endif /* SIGTINT */
920 #ifdef SIGSTKFLT
921 if (mesg[SIGSTKFLT].pname == NULL) {
922 mesg[SIGSTKFLT].iname = "STKFLT";
923 mesg[SIGSTKFLT].pname = CSAVS(2, 90, "Stack limit exceeded");
925 #endif /* SIGSTKFLT */
927 #ifdef SIGUNUSED
928 if (mesg[SIGUNUSED].pname == NULL) {
929 mesg[SIGUNUSED].iname = "UNUSED";
930 mesg[SIGUNUSED].pname = CSAVS(2, 91, "Unused signal");
932 #endif /* SIGUNUSED */
934 #ifdef SIGOVLY
935 /* SX-4 */
936 if (mesg[SIGOVLY].pname == NULL) {
937 mesg[SIGOVLY].iname = "OVLY";
938 mesg[SIGOVLY].pname = CSAVS(2, 92, "LM overlay");
940 #endif /* SIGOVLY */
942 #ifdef SIGFRZ
943 /* SX-4 */
944 if (mesg[SIGFRZ].pname == NULL) {
945 mesg[SIGFRZ].iname = "FRZ";
946 mesg[SIGFRZ].pname = CSAVS(2, 93, "system freeze");
948 #endif /* SIGFRZ */
950 #ifdef SIGDFRZ
951 /* SX-4 */
952 if (mesg[SIGDFRZ].pname == NULL) {
953 mesg[SIGDFRZ].iname = "DFRZ";
954 mesg[SIGDFRZ].pname = CSAVS(2, 94, "system defreeze");
956 #endif /* SIGDFRZ */
958 #ifdef SIGDEAD
959 /* SX-4 */
960 if (mesg[SIGDEAD].pname == NULL) {
961 mesg[SIGDEAD].iname = "DEAD";
962 mesg[SIGDEAD].pname = CSAVS(2, 95, "dead lock");
964 #endif /* SIGDEAD */
966 #ifdef SIGXMEM
967 /* SX-4 */
968 if (mesg[SIGXMEM].pname == NULL) {
969 mesg[SIGXMEM].iname = "XMEM";
970 mesg[SIGXMEM].pname = CSAVS(2, 96, "exceeded memory size limit");
972 #endif /* SIGXMEM */
974 #ifdef SIGXDSZ
975 /* SX-4 */
976 if (mesg[SIGXDSZ].pname == NULL) {
977 mesg[SIGXDSZ].iname = "XDSZ";
978 mesg[SIGXDSZ].pname = CSAVS(2, 97, "exceeded data size limit");
980 #endif /* SIGXDSZ */
982 #ifdef SIGMEM32
983 /* SX-4 */
984 if (mesg[SIGMEM32].pname == NULL) {
985 mesg[SIGMEM32].iname = "MEM32";
986 mesg[SIGMEM32].pname = CSAVS(2, 98, "exceeded memory size limit of 32KB");
988 #endif /* SIGMEM32 */
990 #ifdef SIGNMEM
991 /* SX-4 */
992 if (mesg[SIGNMEM].pname == NULL) {
993 mesg[SIGNMEM].iname = "NMEM";
994 mesg[SIGNMEM].pname = CSAVS(2, 99, "exce error for no memory");
996 #endif /* SIGNMEM */
998 #ifdef SIGCHKP
999 /* SX-4 */
1000 if (mesg[SIGCHKP].pname == NULL) {
1001 mesg[SIGCHKP].iname = "CHKP";
1002 mesg[SIGCHKP].pname = CSAVS(2, 100, "check point start");
1004 #endif /* SIGCHKP */
1006 #ifdef SIGKCHKP
1007 #if 0
1008 /* SX-4 */
1009 if (mesg[SIGKCHKP].pname == NULL) {
1010 mesg[SIGKCHKP].iname = "KCHKP";
1011 mesg[SIGKCHKP].pname = CSAVS(2, 101, "check point start of kernel");
1013 #endif
1014 #endif /* SIGKCHKP */
1016 #ifdef SIGRSTA
1017 /* SX-4 */
1018 if (mesg[SIGRSTA].pname == NULL) {
1019 mesg[SIGRSTA].iname = "RSTA";
1020 mesg[SIGRSTA].pname = CSAVS(2, 102, "restart start");
1022 #endif /* SIGRSTA */
1024 #ifdef SIGKRSTA
1025 #if 0
1026 /* SX-4 */
1027 if (mesg[SIGKRSTA].pname == NULL) {
1028 mesg[SIGKRSTA].iname = "KRSTA";
1029 mesg[SIGKRSTA].pname = CSAVS(2, 103, "restart of kernel");
1031 #endif
1032 #endif /* SIGKRSTA */
1034 #ifdef SIGXXMU
1035 /* SX-4 */
1036 if (mesg[SIGXXMU].pname == NULL) {
1037 mesg[SIGXXMU].iname = "XXMU";
1038 mesg[SIGXXMU].pname = CSAVS(2, 104, "exeeded XMU size limit");
1040 #endif /* SIGXXMU */
1042 #ifdef SIGXRLG0
1043 /* SX-4 */
1044 if (mesg[SIGXRLG0].pname == NULL) {
1045 mesg[SIGXRLG0].iname = "XRLG0";
1046 mesg[SIGXRLG0].pname = CSAVS(2, 105, "exeeded RLG0 limit");
1048 #endif /* SIGXRLG0 */
1050 #ifdef SIGXRLG1
1051 /* SX-4 */
1052 if (mesg[SIGXRLG1].pname == NULL) {
1053 mesg[SIGXRLG1].iname = "XRLG1";
1054 mesg[SIGXRLG1].pname = CSAVS(2, 106, "exeeded RLG1 limit");
1056 #endif /* SIGXRLG1 */
1058 #ifdef SIGXRLG2
1059 /* SX-4 */
1060 if (mesg[SIGXRLG2].pname == NULL) {
1061 mesg[SIGXRLG2].iname = "XRLG2";
1062 mesg[SIGXRLG2].pname = CSAVS(2, 107, "exeeded RLG2 limit");
1064 #endif /* SIGXRLG2 */
1066 #ifdef SIGXRLG3
1067 /* SX-4 */
1068 if (mesg[SIGXRLG3].pname == NULL) {
1069 mesg[SIGXRLG3].iname = "XRLG3";
1070 mesg[SIGXRLG3].pname = CSAVS(2, 108, "exeeded RLG3 limit");
1072 #endif /* SIGXRLG3 */
1074 #ifdef SIGCKPT
1075 /* DragonFly BSD */
1076 if (mesg[SIGCKPT].pname == NULL) {
1077 mesg[SIGCKPT].iname = "CKPT";
1078 mesg[SIGCKPT].pname = CSAVS(2, 109, "CheckPoint");
1080 #endif /* SIGCKPT */
1082 #ifdef SIGCKPTEXIT
1083 /* DragonFly BSD */
1084 if (mesg[SIGCKPTEXIT].pname == NULL) {
1085 mesg[SIGCKPTEXIT].iname = "CKPTEXIT";
1086 mesg[SIGCKPTEXIT].pname = CSAVS(2, 110, "CheckPointExit");
1088 #endif /* SIGCKPTEXIT */