summaryrefslogtreecommitdiff
path: root/!NotAdopted/Skype/pthread.c
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-07-28 19:25:08 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-07-28 19:25:08 +0000
commit66526765714b08969548a414d3fa87dbe333242d (patch)
treed3fc2027140f97edfdfc5023e70ff8b4db920c11 /!NotAdopted/Skype/pthread.c
parent3ccd712341ed9e76252bd595c5a797d6c8ea8992 (diff)
"!Deprecated" folders moved from root directory to plugins
git-svn-id: http://svn.miranda-ng.org/main/trunk@1230 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to '!NotAdopted/Skype/pthread.c')
-rw-r--r--!NotAdopted/Skype/pthread.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/!NotAdopted/Skype/pthread.c b/!NotAdopted/Skype/pthread.c
deleted file mode 100644
index f9944257c2..0000000000
--- a/!NotAdopted/Skype/pthread.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * $Id: pthread.c,v 1.4 2003/12/19 12:53:36 gena01 Exp $
- *
- * Skype Miranda Plugin
- *
- * Authors: Gennady Feldman (aka Gena01)
- * Laurent Marechal (aka Peorth)
- *
- * Code borrowed for Skype plugin. Fixed to compile on Mingw by G.Feldman
- * Original Copyright (c) 2003 Robert Rainwater
- *
- * This code is under GPL and is based on AIM, MSN and Miranda source code.
- * I want to thank Robert Rainwater and George Hazan for their code and support
- * and for answering some of my questions during development of this plugin.
- */
-
-#include "skype.h"
-
-/* Gena01 - added some defined to fix compilation with mingw gcc */
-/* __try/__finally taken from abiword patch found on the web */
-#if 0
- #include <crtdbg.h>
-#else
-#define __try
-#define __except(x) if (0) /* don't execute handler */
-#define __finally
-
-#define _try __try
-#define _except __except
-#define _finally __finally
-#endif
-
-#include <excpt.h>
-
-struct pthread_arg
-{
- HANDLE hEvent;
- void (*threadcode) (void *);
- void *arg;
-};
-
-void pthread_r(struct pthread_arg *fa)
-{
- void (*callercode) (void *) = fa->threadcode;
- void *arg = fa->arg;
- CallService(MS_SYSTEM_THREAD_PUSH, 0, 0);
- SetEvent(fa->hEvent);
- __try {
- callercode(arg);
- }
- __finally {
- CallService(MS_SYSTEM_THREAD_POP, 0, 0);
- }
-}
-
-unsigned long pthread_create(pThreadFunc parFunc, void *arg)
-{
- unsigned long rc;
- struct pthread_arg fa;
- fa.hEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
- fa.threadcode = parFunc;
- fa.arg = arg;
- rc = _beginthread((pThreadFunc) pthread_r, 0, &fa);
- if ((unsigned long) -1L != rc) {
- WaitForSingleObject(fa.hEvent, INFINITE);
- }
- CloseHandle(fa.hEvent);
- return rc;
-}
-