BSD 4_2 development
[unix-history] / usr / man / man3 / traper.3f
CommitLineData
53607101
C
1.TH TRAPER 3F "18 July 1983"
2.UC 4
3.SH NAME
4traper \- trap arithmetic errors
5.SH SYNOPSIS
6.B integer function traper (mask)
7.SH DESCRIPTION
8\fBNOTE: This routine applies only to the \s-2VAX\s0.
9It is ignored on the \s-2PDP11\s0.\fR
10.PP
11Integer overflow and floating point underflow are not normally
12trapped during execution. This routine enables these traps by setting
13status bits in the process status word. These bits are reset on
14entry to a subprogram, and the previous state is restored on return.
15Therefore, this routine must be called
16.I inside
17each subprogram in which these conditions should be trapped.
18If the condition occurs and trapping is enabled,
19signal SIGFPE is sent to the process. (See
20.IR signal (3C))
21.PP
22The argument has the following meaning:
23.nf
24
25 value meaning
26 0 do not trap either condition
27 1 trap integer overflow only
28 2 trap floating underflow only
29 3 trap both the above
30
31.fi
32The previous value of these bits is returned.
33.SH FILES
34.ie \nM /usr/ucb/lib/libF77.a
35.el /usr/lib/libF77.a
36.SH "SEE ALSO"
37signal(3C), signal(3F)