summaryrefslogtreecommitdiff
path: root/src/tet3/dtet2lib/sigmap.c
blob: be2702b3e383f32cc11f631efca53a32468e4d92 (plain)
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
238
239
240
241
242
243
244
245
246
247
/*
 *      SCCS:  @(#)sigmap.c	1.6 (96/11/04) 
 *
 *	UniSoft Ltd., London, England
 *
 * (C) Copyright 1992 X/Open Company Limited
 * (C) Copyright 1994 UniSoft Limited
 *
 * All rights reserved.  No part of this source code may be reproduced,
 * stored in a retrieval system, or transmitted, in any form or by any
 * means, electronic, mechanical, photocopying, recording or otherwise,
 * except as stated in the end-user licence agreement, without the prior
 * permission of the copyright owners.
 *
 * X/Open and the 'X' symbol are trademarks of X/Open Company Limited in
 * the UK and other countries.
 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#ifndef lint
static char sccsid[] = "@(#)sigmap.c	1.6 (96/11/04) TET3 release 3.3";
#endif

/************************************************************************

SCCS:   	@(#)sigmap.c	1.6 96/11/04 TETware release 3.3
NAME:		sigmap.c
PRODUCT:	TETware
AUTHOR:		Andrew Dingwall, UniSoft Ltd.
DATE CREATED:	April 1992

DESCRIPTION:
	map of local signal numbers to DTET signal numbers

	the signal names in the map were collected from <signal.h> files
	on several machines; however, your mileage may vary

	the common signals (0 -> 15) have the same value on most systems;
	the local and DTET signal numbers are the same for these signals and
	the code in tet_mapsignal() and tet_unmapsignal() is most efficient
	when this is the case

MODIFICATIONS:
	Andrew Dingwall, UniSoft Ltd., January 1994
	only support POSIX.1 signals when _POSIX_SOURCE is defined
	(mainly for the FIFO implementation)
	this is because, on some systems, a definition of the form

		#define xx yy

	is visible when _POSIX_SOURCE is defined, where xx is a non-posix
	signal and yy is not defined

************************************************************************/

#ifndef _POSIX_SOURCE
#define INCLUDE_ALL_SIGS
#endif

#include <signal.h>
#include "dtmac.h"
#include "sigmap.h"


struct sigmap tet_sigmap[] = {

	{ 0,		0 },

#ifdef SIGHUP
	{ SIGHUP,	1 },
#endif

#ifdef SIGINT
	{ SIGINT,	2 },
#endif

#ifdef SIGQUIT
	{ SIGQUIT,	3 },
#endif

#ifdef SIGILL
	{ SIGILL,	4 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGTRAP
	{ SIGTRAP,	5 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGIOT
	{ SIGIOT,	6 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGEMT
	{ SIGEMT,	7 },
#endif
#endif

#ifdef SIGFPE
	{ SIGFPE,	8 },
#endif

#ifdef SIGKILL
	{ SIGKILL,	9 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGBUS
	{ SIGBUS,	10 },
#endif
#endif

#ifdef SIGSEGV
	{ SIGSEGV,	11 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGSYS
	{ SIGSYS,	12 },
#endif
#endif

#ifdef SIGPIPE
	{ SIGPIPE,	13 },
#endif

#ifdef SIGALRM
	{ SIGALRM,	14 },
#endif

#ifdef SIGTERM
	{ SIGTERM,	15 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGURG
	{ SIGURG,	16 },
#endif
#endif

#ifdef SIGSTOP
	{ SIGSTOP,	17 },
#endif

#ifdef SIGTSTP
	{ SIGTSTP,	18 },
#endif

#ifdef SIGCONT
	{ SIGCONT,	19 },
#endif

#ifdef SIGCHLD
	{ SIGCHLD,	20 },
#endif

#ifdef SIGTTIN
	{ SIGTTIN,	21 },
#endif

#ifdef SIGTTOU
	{ SIGTTOU,	22 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGIO
	{ SIGIO,	23 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGXCPU
	{ SIGXCPU,	24 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGXFSZ
	{ SIGXFSZ,	25 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGVTALRM
	{ SIGVTALRM,	26 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGPROF
	{ SIGPROF,	27 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGWINCH
	{ SIGWINCH,	28 },
#endif
#endif

#ifdef SIGUSR1
	{ SIGUSR1,	30 },
#endif

#ifdef SIGUSR2
	{ SIGUSR2,	31 },
#endif

#ifdef SIGABRT
	{ SIGABRT,	1001 },
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGCLD
	{ SIGCLD,	1002 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGLOST
	{ SIGLOST,	1003 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGPOLL
	{ SIGPOLL,	1004 },
#endif
#endif

#ifdef INCLUDE_ALL_SIGS
#ifdef SIGPWR
	{ SIGPWR,	1005 }
#endif
#endif

};

int tet_Nsigmap = sizeof tet_sigmap / sizeof tet_sigmap[0];