DUMMY_HANDLER Function (tigcc.a)

intr.h

INT_HANDLER DUMMY_HANDLER;

A dummy interrupt handler doing nothing.

DUMMY_HANDLER is an interrupt handler of type INT_HANDLER which consists only of 'rte'. The purpose of this handler is to redirect an interrupt vector to "nothing", in cases when disabling interrupts is not possible. For example, you can not disable auto-int 1 in grayscale programs, because grayscale support is based on it. Grayscale support installs its own auto-int 1 handler, which executes the previously installed handler at the end. Suppose that you don't want it to call the default auto-int 1 handler, which trashes the status line by displaying keyboard status indicators. You can redirect auto-int 1 to the dummy handler before enabling grayscale, so after the grayscale interrupt, the dummy handler (i.e. nothing) will be called instead of the default auto-int 1 handler:

INT_HANDLER save_int_1;
...
save_int_1 = GetIntVec (AUTO_INT_1);
SetIntVec (AUTO_INT_1, DUMMY_HANDLER);   // redirect auto-int 1 to "nothing"
// enable grayscale
// do whatever you want in grayscale
// disable grayscale
SetIntVec (AUTO_INT_1, save_int_1);