]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/atexit.c
Merged PDPCLIB and Therx code.
[pdclib] / functions / stdlib / atexit.c
index ac478c94cabff262e50606b8632018b16dec2896..9792cad1846968addb78e2100d0909aebd3ae916 100644 (file)
@@ -7,3 +7,19 @@
 
 // TODO: C/C++ linkages
 int atexit( void (*func) ( void ) ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+    int x;
+    
+    for (x = 0; x < __NATEXIT; x++)
+    {
+        if (__userExit[x] == 0)
+        {
+            __userExit[x] = func;
+            return (0);
+        }
+    }
+    return (-1);
+}
+*/