X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdlib%2Fatexit.c;h=a81a8cb6ec34f06e1e8174959430c8573afdbc84;hb=393020b6e48719d27699dea6b29e53025bbd5123;hp=0d61e32a818f39c9f6645f279bd6331ab5bfdb4a;hpb=0788e1f853cae7be12203116b0d277ab1d653afb;p=pdclib diff --git a/functions/stdlib/atexit.c b/functions/stdlib/atexit.c index 0d61e32..a81a8cb 100644 --- a/functions/stdlib/atexit.c +++ b/functions/stdlib/atexit.c @@ -1,7 +1,5 @@ /* $Id$ */ -/* Release $Name$ */ - /* atexit( void (*)( void ) ) This file is part of the Public Domain C Library (PDCLib). @@ -24,7 +22,7 @@ int atexit( void (*func)( void ) ) else { _PDCLIB_regstack[ --_PDCLIB_regptr ] = func; - return 0; + return 0; } } @@ -36,14 +34,14 @@ int atexit( void (*func)( void ) ) static int flags[ 32 ]; -static void counthandler() +static void counthandler( void ) { - static int rc = 0; - flags[ rc ] = rc; - ++rc; + static int count = 0; + flags[ count ] = count; + ++count; } -static void checkhandler() +static void checkhandler( void ) { for ( int i = 0; i < 31; ++i ) { @@ -51,9 +49,8 @@ static void checkhandler() } } -int main() +int main( void ) { - BEGIN_TESTS; TESTCASE( atexit( &checkhandler ) == 0 ); for ( int i = 0; i < 31; ++i ) {