Listing 2 Implementation of a stack of jmp_buf

#include "jmpstack.h"

extern void terminate();

jmp_buf& JmpStack::operator++()
{
    if(++current == SIZE) terminate();
    return stack[current];
}

jmp_buf& JmpStack::operator--()
{
    if(current < 0) terminate();
    return stack[current--];
}
// End of File