]> pd.if.org Git - pdclib/blobdiff - platform/win32/functions/threads/tss_get.c
dos2unix
[pdclib] / platform / win32 / functions / threads / tss_get.c
index acb7c62e68b74becf0a925648fda881caa14d0ca..a5e5efbd4bf81817033a6a3b327925beeadae5b3 100644 (file)
@@ -1,33 +1,33 @@
-#ifndef REGTEST\r
-#include <threads.h>\r
-#include <windows.h>\r
-\r
-void *tss_get(tss_t key)\r
-{\r
-    return TlsGetValue(key->_Key);\r
-}\r
-#endif\r
-\r
-#ifdef TEST\r
-#include "_PDCLIB_test.h"\r
-\r
-#ifndef REGTEST\r
-static tss_t key;\r
-static char v;\r
-#endif\r
-\r
-// Todo: make a thread and test destruction!\r
-\r
-int main( void )\r
-{\r
-#ifndef REGTEST\r
-    TESTCASE(tss_create(&key, NULL) == thrd_success);\r
-    TESTCASE(tss_get(key) == NULL);\r
-    TESTCASE(tss_set(key, &v) == thrd_success);\r
-    TESTCASE(tss_get(key) == &v);\r
-    tss_delete(key);\r
-#endif\r
-    return TEST_RESULTS;\r
-}\r
-\r
+#ifndef REGTEST
+#include <threads.h>
+#include <windows.h>
+
+void *tss_get(tss_t key)
+{
+    return TlsGetValue(key->_Key);
+}
+#endif
+
+#ifdef TEST
+#include "_PDCLIB_test.h"
+
+#ifndef REGTEST
+static tss_t key;
+static char v;
+#endif
+
+// Todo: make a thread and test destruction!
+
+int main( void )
+{
+#ifndef REGTEST
+    TESTCASE(tss_create(&key, NULL) == thrd_success);
+    TESTCASE(tss_get(key) == NULL);
+    TESTCASE(tss_set(key, &v) == thrd_success);
+    TESTCASE(tss_get(key) == &v);
+    tss_delete(key);
+#endif
+    return TEST_RESULTS;
+}
+
 #endif
\ No newline at end of file