X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fatexit.c;h=3184fcd166cfcc081277d89381077b62105f89a2;hb=c510d64eb2b5d70547b4d36f35ebd12809aabd32;hp=558190f4b97dc89b49e019eb115fdbf06edf042d;hpb=b08f4b52b1cd1f7a9553c0f357a7c90859fa3e73;p=pdclib diff --git a/functions/stdlib/atexit.c b/functions/stdlib/atexit.c index 558190f..3184fcd 100644 --- a/functions/stdlib/atexit.c +++ b/functions/stdlib/atexit.c @@ -1,5 +1,3 @@ -/* $Id$ */ - /* atexit( void (*)( void ) ) This file is part of the Public Domain C Library (PDCLib). @@ -10,19 +8,19 @@ #ifndef REGTEST -extern void (*_PDCLIB_regstack[])( void ); -extern size_t _PDCLIB_regptr; +extern void (*_PDCLIB_exitstack[])( void ); +extern size_t _PDCLIB_exitptr; int atexit( void (*func)( void ) ) { - if ( _PDCLIB_regptr == 0 ) + if ( _PDCLIB_exitptr == 0 ) { return -1; } else { - _PDCLIB_regstack[ --_PDCLIB_regptr ] = func; - return 0; + _PDCLIB_exitstack[ --_PDCLIB_exitptr ] = func; + return 0; } }