NAME
del - interrupt handling package

SYNOPSIS
#include <del.h>

ENABLEDEL;
IGNOREDEL;
DISABLEDEL;

...
DELBREAK;
...
DELRETURN;
...
DELRETN(value);
...
DELCLEAR;
...

DESCRIPTION
Del is a small subroutine used as an interrupt trap routine. It is
used with the macro package <del.h> to provide a complete facility
for trapping interrupts (DEL or RUBOUT key on the terminal).

The macro file includes all the definitions listed above, and uses
an external int (_del_) as an interrupt flag. When an interrupt
occurs, the del subroutine will increment _del_ (usually from 0 to
1), signal(2) itself for further interrupts, and return. The user
may then test this variable with the macros listed above.

These macros control overall interrupt handling:

ENABLEDEL
clears _del_ and begins interrupt trapping.

IGNOREDEL
clears _del_ and ignores interrupts.

DISABLEDEL
clears _del_ and restores normal interrupt handling (kill
process on interrupt).

These macros allow you to see if an interrupt has occurred (they do
nothing if none has occurred):

DELBREAK
clears _del_ and acts like a break statement.

DELRETURN
clears _del_ and acts like a return statement.

DELRETN(value)
clears _del_ and acts like the statement return(value).

DELCLEAR
clears _del_ and prints "Break ignored".

In addition, you may perform a simpler test for interrupts like
this:
if (_del_) ...
This is useful in conjunction with the above macros when you wish,
for example, to exit from several layers of loops or procedures.

FILES
/usr/include/del.h -- macro package

SEE ALSO
signal(2)

DIAGNOSTICS
Break!
printed by DELBREAK, DELRETURN, and DELRETURN(value) if an
interrupt has occurred.

Break ignored.
printed by DELCLEAR if an interrupt has occurred.

BUGS
It is possible, in any UNIX program which traps interrupts, for an
interrupt to be missed if it immediately follows a previous
interrupt of the same kind.