Module: wine
Branch: master
Commit: c0268c7840bdf3a3eb4c6a096732f616c8af756d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c0268c7840bdf3a3eb4c6a096…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Tue Dec 5 23:36:10 2006 +0100
wined3d: Create the state table.
---
dlls/wined3d/Makefile.in | 1 +
dlls/wined3d/state.c | 38 ++++++++++++++++++++++++++++++++++++++
dlls/wined3d/wined3d_private.h | 12 ++++++++++++
3 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/Makefile.in b/dlls/wined3d/Makefile.in
index 2eea53c..0cdd967 100644
--- a/dlls/wined3d/Makefile.in
+++ b/dlls/wined3d/Makefile.in
@@ -22,6 +22,7 @@ C_SRCS = \
pixelshader.c \
query.c \
resource.c \
+ state.c \
stateblock.c \
surface.c \
surface_gdi.c \
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
new file mode 100644
index 0000000..2b929b6
--- /dev/null
+++ b/dlls/wined3d/state.c
@@ -0,0 +1,38 @@
+/*
+ * Direct3D state management
+ *
+ * Copyright 2006 Stefan D�singer for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include "config.h"
+#include <stdio.h>
+#ifdef HAVE_FLOAT_H
+# include <float.h>
+#endif
+#include "wined3d_private.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(d3d);
+
+static void state_unknown(DWORD state, IWineD3DStateBlockImpl *stateblock) {
+ FIXME("Unknown state %d\n", state);
+}
+
+const struct StateEntry StateTable[] =
+{
+ /* State name representative, apply function */
+ { /* 0, Undefined */ 0, state_unknown },
+};
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 8eea594..42ecbcd 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -407,6 +407,18 @@ DWORD get_flexible_vertex_size(DWORD d3d
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
(((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
+/* Routines and structures related to state management */
+typedef void (*APPLYSTATEFUNC)(DWORD state, IWineD3DStateBlockImpl *stateblock);
+
+struct StateEntry
+{
+ DWORD representative;
+ APPLYSTATEFUNC apply;
+};
+
+/* Global state table */
+extern const struct StateEntry StateTable[];
+
/* Routine to fill gl caps for swapchains and IWineD3D */
BOOL IWineD3DImpl_FillGLCaps(IWineD3D *iface, Display* display);
Module: wine
Branch: master
Commit: 804bba8d4c806d8c89ef5612175a9d0356467e20
URL: http://source.winehq.org/git/wine.git/?a=commit;h=804bba8d4c806d8c89ef56121…
Author: Kai Blin <kai.blin(a)gmail.com>
Date: Thu Dec 7 18:35:35 2006 +0100
ws2_32: Downgrade SO_REUSEADDR fixme to a trace.
---
dlls/ws2_32/socket.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index 6d385eb..99f46bc 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -2954,7 +2954,7 @@ int WINAPI WS_setsockopt(SOCKET s, int l
* same time. There is no direct way to do that in unix. While Wineserver
* might do this, it does not seem useful for now, so just ignore it.*/
case WS_SO_REUSEADDR:
- FIXME("Ignoring SO_REUSEADDR, does not translate\n");
+ TRACE("Ignoring SO_REUSEADDR, does not translate\n");
return 0;
#ifdef SO_RCVTIMEO
Module: wine
Branch: master
Commit: 9dce96b3155ce07dffa4f5b0712fbcaad9ba3e2c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=9dce96b3155ce07dffa4f5b07…
Author: Mike McCormack <mike(a)codeweavers.com>
Date: Wed Dec 6 22:29:08 2006 +0900
msi: Comparisons with null in conditions are special.
---
dlls/msi/cond.y | 99 ++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 72 insertions(+), 27 deletions(-)
diff --git a/dlls/msi/cond.y b/dlls/msi/cond.y
index 9cfb001..d19127b 100644
--- a/dlls/msi/cond.y
+++ b/dlls/msi/cond.y
@@ -431,59 +431,104 @@ static INT compare_substring( LPCWSTR a,
case COND_ISS:
return strstriW( a, b ) ? 1 : 0;
case COND_LHS:
- return 0 == strncmpW( a, b, lstrlenW( b ) );
+ return 0 == strncmpW( a, b, lstrlenW( b ) );
case COND_RHS:
- return 0 == lstrcmpW( a + (lstrlenW( a ) - lstrlenW( b )), b );
+ return 0 == lstrcmpW( a + (lstrlenW( a ) - lstrlenW( b )), b );
case COND_ILHS:
- return 0 == strncmpiW( a, b, lstrlenW( b ) );
+ return 0 == strncmpiW( a, b, lstrlenW( b ) );
case COND_IRHS:
return 0 == lstrcmpiW( a + (lstrlenW( a ) - lstrlenW( b )), b );
default:
- ERR("invalid substring operator\n");
+ ERR("invalid substring operator\n");
return 0;
}
return 0;
}
+static BOOL is_empty( LPCWSTR p )
+{
+ return !p || !p[0];
+}
+
+static BOOL is_alphaless( LPCWSTR p )
+{
+ while (*p)
+ {
+ if (isalphaW( *p ) || (*p == '_'))
+ return FALSE;
+ p++;
+ }
+ return TRUE;
+}
+
static INT compare_string( LPCWSTR a, INT operator, LPCWSTR b )
{
+ int r;
+
if (operator >= COND_SS && operator <= COND_RHS)
return compare_substring( a, operator, b );
-
- /* null and empty string are equivalent */
- if (!a) a = szEmpty;
- if (!b) b = szEmpty;
- /* a or b may be NULL */
+ if (is_empty( a ) && is_empty( b ))
+ r = 0;
+
+ else if (is_empty( a ) && is_alphaless( b ))
+ r = 1;
+
+ else if (is_empty( b ) && is_alphaless( a ))
+ r = -1;
+
+ else
+ {
+ /* null and empty string are equivalent */
+ if (!a) a = szEmpty;
+ if (!b) b = szEmpty;
+
+ switch (operator)
+ {
+ case COND_LT:
+ case COND_GT:
+ case COND_EQ:
+ case COND_NE:
+ case COND_GE:
+ case COND_LE:
+ r = lstrcmpW( a, b );
+ break;
+ case COND_ILT:
+ case COND_IGT:
+ case COND_IEQ:
+ case COND_INE:
+ case COND_IGE:
+ case COND_ILE:
+ r = lstrcmpiW( a, b );
+ break;
+ default:
+ ERR("invalid string operator\n");
+ return 0;
+ }
+ }
+
switch (operator)
{
case COND_LT:
- return -1 == lstrcmpW( a, b );
- case COND_GT:
- return 1 == lstrcmpW( a, b );
- case COND_EQ:
- return 0 == lstrcmpW( a, b );
- case COND_NE:
- return 0 != lstrcmpW( a, b );
- case COND_GE:
- return -1 != lstrcmpW( a, b );
- case COND_LE:
- return 1 != lstrcmpW( a, b );
case COND_ILT:
- return -1 == lstrcmpiW( a, b );
+ return -1 == r;
+ case COND_GT:
case COND_IGT:
- return 1 == lstrcmpiW( a, b );
+ return 1 == r;
+ case COND_EQ:
case COND_IEQ:
- return 0 == lstrcmpiW( a, b );
+ return 0 == r;
+ case COND_NE:
case COND_INE:
- return 0 != lstrcmpiW( a, b );
+ return 0 != r;
+ case COND_GE:
case COND_IGE:
- return -1 != lstrcmpiW( a, b );
+ return -1 != r;
+ case COND_LE:
case COND_ILE:
- return 1 != lstrcmpiW( a, b );
+ return 1 != r;
default:
ERR("invalid string operator\n");
- return 0;
}
return 0;
}