summaryrefslogtreecommitdiff
path: root/Skype/pthread.c
diff options
context:
space:
mode:
authorwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-03-24 16:28:13 +0000
committerwatcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb>2012-03-24 16:28:13 +0000
commit4cb109d70f70195be2a1642ad52c16b982fcfd9e (patch)
treea63fbdef68ed24f6e5151c83cfab6ce3a976982a /Skype/pthread.c
parent824d1b1f75ad59a30047780ed2571e96094023db (diff)
berlios is still alive so Skype and imo2sproxy hosted there and deleted from this repo
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@283 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'Skype/pthread.c')
-rw-r--r--Skype/pthread.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/Skype/pthread.c b/Skype/pthread.c
deleted file mode 100644
index f994425..0000000
--- a/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;
-}
-