source: trunk/minix/lib/ansi/atexit.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 311 bytes
Line 
1/* $Header: /cvsup/minix/src/lib/ansi/atexit.c,v 1.1.1.1 2005/04/21 14:56:04 beng Exp $ */
2
3#include <stdlib.h>
4
5#define NEXITS 32
6
7extern void (*__functab[NEXITS])(void);
8extern int __funccnt;
9
10int
11atexit(void (*func)(void))
12{
13 if (__funccnt >= NEXITS)
14 return 1;
15 __functab[__funccnt++] = func;
16 return 0;
17}
Note: See TracBrowser for help on using the repository browser.