ack/lang/cem/libcc.ansi/stdlib/atexit.c

18 lines
231 B
C
Raw Normal View History

1994-06-24 14:02:31 +00:00
/* $Id$ */
1989-12-18 15:14:14 +00:00
#include <stdlib.h>
#define NEXITS 32
extern void (*__functab[NEXITS])(void);
extern int __funccnt;
int
atexit(void (*func)(void))
{
if (__funccnt >= NEXITS)
return 1;
__functab[__funccnt++] = func;
return 0;
}