source:
trunk/minix/lib/ansi/atexit.c@
18
| Last change on this file since 18 was 9, checked in by , 15 years ago | |
|---|---|
| File size: 311 bytes | |
| Rev | Line | |
|---|---|---|
| [9] | 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 | ||
| 7 | extern void (*__functab[NEXITS])(void); | |
| 8 | extern int __funccnt; | |
| 9 | ||
| 10 | int | |
| 11 | atexit(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.