]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/exit.c
Getting stdlib.h to C11.
[pdclib] / functions / stdlib / exit.c
index 267d996098d4b33e5dad937ce85988d6c659d6e1..03bca692846887046c7c71dba7748d13b41914be 100644 (file)
 */
 #define NUMBER_OF_SLOTS 40
 
-void (*_PDCLIB_regstack[ NUMBER_OF_SLOTS ])( void ) = { _PDCLIB_closeall };
-size_t _PDCLIB_regptr = NUMBER_OF_SLOTS;
+void (*_PDCLIB_exitstack[ NUMBER_OF_SLOTS ])( void ) = { _PDCLIB_closeall };
+size_t _PDCLIB_exitptr = NUMBER_OF_SLOTS;
 
 void exit( int status )
 {
-    while ( _PDCLIB_regptr < NUMBER_OF_SLOTS )
+    while ( _PDCLIB_exitptr < NUMBER_OF_SLOTS )
     {
-        _PDCLIB_regstack[ _PDCLIB_regptr++ ]();
+        _PDCLIB_exitstack[ _PDCLIB_exitptr++ ]();
     }
     _Exit( status );
 }