ack/lang/cem/libcc.ansi/sys/exit/atexit.c
David Given af22b7ea85 Change stdio to use atexit() rather than the internal __clean variable; this
breaks the dependency between exit/atexit and stdio. Buffers are no longer
flushed on abort() (because it's pretty risky). Move the relevant functions
into sys/core.
2018-06-23 18:35:45 +02:00

13 lines
170 B
C

/* $Id$ */
#include <stdlib.h>
#include "atexits.h"
int atexit(void (*func)(void))
{
if (__funccnt >= NEXITS)
return 1;
__functab[__funccnt++] = func;
return 0;
}