///////////////////////////////////////////////////////////////////////////// // atexit.cc // // SIMLIB version: 2.18 // Date: 2004-01-25 // // Copyright (c) 1991-2004 Petr Peringer // // This library is licensed under GNU Library GPL. See the file COPYING. // // // this module implements global objects for cleanup // #include "simlib.h" #include "internal.h" SIMLIB_IMPLEMENTATION; static const int MAX_ATEXIT = 10; // for internal use it is enough static int counter = 0; // internal module counter static SIMLIB_atexit_function_t atexit_array[MAX_ATEXIT] = { 0, }; // used in SIMLIB void SIMLIB_atexit(SIMLIB_atexit_function_t p) { DEBUG(DBG_ATEXIT,("SIMLIB_atexit(%p)", p )); int i; for(i=0; i