
/*
 *  ON_EXIT.C
 *
 *  Implement on_exit() function via exitpg() vector
 */

#include <sys/types.h>
#include "tmp/c.h"

RcsId("$Header: /private/postgres/src/port/ultrix4/RCS/on_exit.c,v 1.5 1991/08/12 17:20:08 mer Exp $");

#define EARY	struct _EARY

#define MAXOE	20

static EARY {
    void (*procp)();
    caddr_t arg;
} Ary[MAXOE];

static int AryIndex;

on_exit(procp, arg)
void (*procp)();
caddr_t arg;
{
    if (AryIndex >= MAXOE)
	return(-1);
    Ary[AryIndex].procp = procp;
    Ary[AryIndex].arg = arg;
    ++AryIndex;
    return(0);
}
