rpcproxy.h patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Log:
Ove Kaaven <ovek@transgaming.com>
"Implemented" IID_BS_* macros.

Index: include/rpcproxy.h
===================================================================
RCS file: /cvsroot/rewind/rewind/include/rpcproxy.h,v
retrieving revision 1.3
diff -u -r1.3 rpcproxy.h
--- include/rpcproxy.h	31 Oct 2002 22:31:52 -0000	1.3
+++ include/rpcproxy.h	18 Feb 2003 20:23:30 -0000
@@ -180,6 +180,20 @@
 
 #define IID_GENERIC_CHECK_IID(name,pIID,index) memcmp(pIID, name##_ProxyVtblList[index]->header.piid, sizeof(IID))
 
+/*
+ * In these macros, BS stands for Binary Search. MIDL uses these to
+ * "unroll" a binary search into the module's IID_Lookup function.
+ * However, I haven't bothered to reimplement that stuff yet;
+ * I've just implemented a linear search for now.
+ */
+#define IID_BS_LOOKUP_SETUP \
+  int c;
+#define IID_BS_LOOKUP_INITIAL_TEST(name, sz, split)
+#define IID_BS_LOOKUP_NEXT_TEST(name, split)
+#define IID_BS_LOOKUP_RETURN_RESULT(name, sz, index) \
+  for (c=0; c<sz; c++) if (!name##_CHECK_IID(c)) { (index)=c; return 1; } \
+  return 0;
+
 #if defined(__WINE__) && defined(__WINE_WINE_OBJ_OLEAUT_H)
 /* see http://msdn.microsoft.com/library/en-us/dnmsj99/html/com0199.asp?frame=true */
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux