* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* %sccs.include.redist.c%
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid
[] = "@(#)atexit.c 5.1 (Berkeley) %G%";
#endif /* LIBC_SCCS and not lint */
* Register a function to be performed at exit.
static struct atexit __atexit0
; /* one guaranteed table */
register struct atexit
*p
;
if ((p
= __atexit
) == NULL
)
__atexit
= p
= &__atexit0
;
if (p
->ind
>= ATEXIT_SIZE
) {
if ((p
= malloc(sizeof(*p
))) == NULL
)