source: trunk/essentials/app-shells/bash/siglist.c@ 3845

Last change on this file since 3845 was 3231, checked in by bird, 19 years ago

eol style.

  • Property svn:eol-style set to native
File size: 4.6 KB
Line 
1/* siglist.c -- signal list for those machines that don't have one. */
2
3/* Copyright (C) 1989 Free Software Foundation, Inc.
4
5This file is part of GNU Bash, the Bourne Again SHell.
6
7Bash is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 2, or (at your option) any later
10version.
11
12Bash is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License along
18with Bash; see the file COPYING. If not, write to the Free Software
19Foundation, 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
20
21#include "config.h"
22
23#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL)
24
25#include <stdio.h>
26#include "bashtypes.h"
27#include <signal.h>
28
29#include "siglist.h"
30
31#if !defined (NSIG)
32# include "trap.h"
33#endif
34
35#include "xmalloc.h"
36
37char *sys_siglist[NSIG];
38
39void
40initialize_siglist ()
41{
42 register int i;
43
44 for (i = 0; i < NSIG; i++)
45 sys_siglist[i] = (char *)0x0;
46
47 sys_siglist[0] = "Bogus signal";
48
49#if defined (SIGHUP)
50 sys_siglist[SIGHUP] = "Hangup";
51#endif
52
53#if defined (SIGINT)
54 sys_siglist[SIGINT] = "Interrupt";
55#endif
56
57#if defined (SIGQUIT)
58 sys_siglist[SIGQUIT] = "Quit";
59#endif
60
61#if defined (SIGILL)
62 sys_siglist[SIGILL] = "Illegal instruction";
63#endif
64
65#if defined (SIGTRAP)
66 sys_siglist[SIGTRAP] = "BPT trace/trap";
67#endif
68
69#if defined (SIGIOT) && !defined (SIGABRT)
70#define SIGABRT SIGIOT
71#endif
72
73#if defined (SIGABRT)
74 sys_siglist[SIGABRT] = "ABORT instruction";
75#endif
76
77#if defined (SIGEMT)
78 sys_siglist[SIGEMT] = "EMT instruction";
79#endif
80
81#if defined (SIGFPE)
82 sys_siglist[SIGFPE] = "Floating point exception";
83#endif
84
85#if defined (SIGKILL)
86 sys_siglist[SIGKILL] = "Killed";
87#endif
88
89#if defined (SIGBUS)
90 sys_siglist[SIGBUS] = "Bus error";
91#endif