]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/threads/tss_delete.c
dos2unix
[pdclib] / platform / win32 / functions / threads / tss_delete.c
index 90be920898f6c7593c0f7b15c54cdf11f13fce31..ce841d588022d59e3e8df99d43ef5d966e3d6325 100644 (file)
@@ -1,39 +1,39 @@
-#ifndef REGTEST\r
-#include <windows.h>\r
-#include <threads.h>\r
-#include <stdlib.h>\r
-\r
-extern struct _PDCLIB_tss * _PDCLIB_tss_first;\r
-void tss_delete( tss_t key )\r
-{\r
-    struct _PDCLIB_tss * prev = NULL;\r
-    struct _PDCLIB_tss * cur  = _PDCLIB_tss_first;\r
-    while(cur) {\r
-        if(cur == key) {\r
-            if(prev) {\r
-                prev->_Next = key->_Next;\r
-            } else {\r
-                _PDCLIB_tss_first = key->_Next;\r
-            }\r
-\r
-            TlsFree(key->_Key);\r
-            free(key);\r
-            return;\r
-        }\r
-    }\r
-\r
-    // Not actually a TSS key\r
-    abort();\r
-}\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-/* Tested in tss_get.c */\r
-int main( void )\r
-{\r
-    return TEST_RESULTS;\r
-}\r
-\r
+#ifndef REGTEST
+#include <windows.h>
+#include <threads.h>
+#include <stdlib.h>
+
+extern struct _PDCLIB_tss * _PDCLIB_tss_first;
+void tss_delete( tss_t key )
+{
+    struct _PDCLIB_tss * prev = NULL;
+    struct _PDCLIB_tss * cur  = _PDCLIB_tss_first;
+    while(cur) {
+        if(cur == key) {
+            if(prev) {
+                prev->_Next = key->_Next;
+            } else {
+                _PDCLIB_tss_first = key->_Next;
+            }
+
+            TlsFree(key->_Key);
+            free(key);
+            return;
+        }
+    }
+
+    // Not actually a TSS key
+    abort();
+}
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+/* Tested in tss_get.c */
+int main( void )
+{
+    return TEST_RESULTS;
+}
+
 #endif
\ No newline at end of file