rm sdb bug; more sdb left
[unix-history] / usr / src / share / man / man3f / traper.3
CommitLineData
3618a2cd
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
59513cc8 5.\" @(#)traper.3 6.1 (Berkeley) %G%
3618a2cd 6.\"
59513cc8 7.TH TRAPER 3F ""
3618a2cd
KM
8.UC 5
9.SH NAME
10traper \- trap arithmetic errors
11.SH SYNOPSIS
12.B integer function traper (mask)
13.SH DESCRIPTION
14\fBNOTE: This routine applies only to the \s-2VAX\s0.
15It is ignored on the \s-2PDP11\s0.\fR
16.PP
17Integer overflow and floating point underflow are not normally
18trapped during execution. This routine enables these traps by setting
19status bits in the process status word. These bits are reset on
20entry to a subprogram, and the previous state is restored on return.
21Therefore, this routine must be called
22.I inside
23each subprogram in which these conditions should be trapped.
24If the condition occurs and trapping is enabled,
25signal SIGFPE is sent to the process. (See
26.IR signal (3C))
27.PP
28The argument has the following meaning:
29.nf
30
31 value meaning
32 0 do not trap either condition
33 1 trap integer overflow only
34 2 trap floating underflow only
35 3 trap both the above
36
37.fi
38The previous value of these bits is returned.
39.SH FILES
40.ie \nM /usr/ucb/lib/libF77.a
41.el /usr/lib/libF77.a
42.SH "SEE ALSO"
43signal(3C), signal(3F)