4.3BSD/usr/man/man3/traper.3f

.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)traper.3f	6.1 (Berkeley) 5/15/85
.\"
.TH TRAPER 3F  "May 15, 1985"
.UC 5
.SH NAME
traper \- trap arithmetic errors
.SH SYNOPSIS
.B integer function traper (mask)
.SH DESCRIPTION
\fBNOTE: This routine applies only to the \s-2VAX\s0.
It is ignored on the \s-2PDP11\s0.\fR
.PP
Integer overflow and floating point underflow are not normally
trapped during execution. This routine enables these traps by setting
status bits in the process status word. These bits are reset on
entry to a subprogram, and the previous state is restored on return.
Therefore, this routine must be called
.I inside
each subprogram in which these conditions should be trapped.
If the condition occurs and trapping is enabled,
signal SIGFPE is sent to the process. (See
.IR signal (3C))
.PP
The argument has the following meaning:
.nf

        value   meaning
          0     do not trap either condition
          1     trap integer overflow only
          2     trap floating underflow only
          3     trap both the above

.fi
The previous value of these bits is returned.
.SH FILES
.ie \nM /usr/ucb/lib/libF77.a
.el /usr/lib/libF77.a
.SH "SEE ALSO"
signal(3C), signal(3F)