home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 387b.lha / dice_v2.02 / lib / stdlib / atexit.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-05-30  |  327 b   |  27 lines

  1.  
  2. /*
  3.  *  ATEXIT.C
  4.  *
  5.  *  (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.  */
  7.  
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10. #include <lib/atexit.h>
  11.  
  12. int
  13. atexit(func)
  14. void (*func)(void);
  15. {
  16.     AtExit *at = malloc(sizeof(AtExit));
  17.  
  18.     if (at) {
  19.     at->Next = _ExitBase;
  20.     at->Func = func;
  21.     _ExitBase = at;
  22.     }
  23.     return(-1);
  24. }
  25.  
  26.  
  27.