summaryrefslogtreecommitdiff
path: root/plugins/LotusNotify/src/cnotesapi/include/pool.h
diff options
context:
space:
mode:
authorSzymon Tokarz <wsx22@o2.pl>2013-05-21 16:41:00 +0000
committerSzymon Tokarz <wsx22@o2.pl>2013-05-21 16:41:00 +0000
commit6b6e144b140f8f3ce2fa6b1de7e6a13d92030caf (patch)
tree79dd830b197c5c5638b29df6b726f413a22034c9 /plugins/LotusNotify/src/cnotesapi/include/pool.h
parentca5fa0ee002d6c18d03817053362bad866a78e90 (diff)
LotusNotify plugin by MaKaRSoFT adapted by me.
plugin from: http://maciej.wycik.pl/p_lotusnotify.php base sources from: https://code.google.com/p/makarplugins/ - Miranda NG version - unicode support - many fixes and code reworks git-svn-id: http://svn.miranda-ng.org/main/trunk@4780 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/LotusNotify/src/cnotesapi/include/pool.h')
-rw-r--r--plugins/LotusNotify/src/cnotesapi/include/pool.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/plugins/LotusNotify/src/cnotesapi/include/pool.h b/plugins/LotusNotify/src/cnotesapi/include/pool.h
new file mode 100644
index 0000000000..939017af31
--- /dev/null
+++ b/plugins/LotusNotify/src/cnotesapi/include/pool.h
@@ -0,0 +1,88 @@
+
+#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
+#pragma datamodel(P128)
+#endif
+
+/*********************************************************************/
+/* */
+/* Licensed Materials - Property of IBM */
+/* */
+/* L-GHUS-5VMPGW, L-GHUS-5S3PEE */
+/* (C) Copyright IBM Corp. 1989, 2005 All Rights Reserved */
+/* */
+/* US Government Users Restricted Rights - Use, duplication or */
+/* disclosure restricted by GSA ADP Schedule Contract with */
+/* IBM Corp. */
+/* */
+/*********************************************************************/
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef POOL_DEFS
+#define POOL_DEFS
+
+
+/* A datatype which identifies a block within a segment */
+
+typedef DWORD DBLOCK; /* dpool block handle */
+
+#define NULLBLOCK (BLOCK) 0
+#define NULLDBLOCK (DBLOCK) 0
+
+
+/* A structure containing a pool handle and block offset */
+
+typedef struct /* Pointer to any block in any pool */
+ {
+ HANDLE pool; /* pool handle */
+ BLOCK block; /* block handle */
+ } BLOCKID;
+
+typedef struct /* Pointer to any block in any pool */
+ {
+ HANDLE pool; /* pool handle */
+ DBLOCK block; /* block handle */
+ } DBLOCKID;
+
+#define ISNULLBLOCKID(x) (((x).pool==NULLHANDLE)&&((x).block==NULLBLOCK))
+
+/* Macro functions */
+
+
+#define OSLockBlock(type,blockid) \
+ ((type far *)(OSLock(char,(blockid).pool) + (blockid).block))
+
+#define OSUnlockBlock(blockid) \
+ OSUnlockObject((blockid).pool)
+
+#define OSSwitchBlock(ptr,thisid,nextid) \
+ { \
+ if ((thisid).pool != (nextid).pool) \
+ { \
+ if ((thisid).pool != NULLHANDLE) \
+ OSUnlockBlock((thisid)); \
+ ptr = OSLockBlock(void,(nextid)); \
+ } \
+ else \
+ { \
+ register char **pptr = (char **) &(ptr); \
+ *pptr = *pptr + (LONG)((nextid).block - (thisid).block); \
+ } \
+ (thisid) = (nextid); \
+ }
+
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
+#pragma datamodel(pop)
+#endif
+