Jeff Latimer : usp10: Implement ScriptGetProperties.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Feb 16 05:34:06 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 0ba307d25227fc36fe6476ba4ec3f8d141b449a4
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0ba307d25227fc36fe6476ba4ec3f8d141b449a4
Author: Jeff Latimer <lats at yless4u.com.au>
Date: Thu Feb 16 12:06:18 2006 +0100
usp10: Implement ScriptGetProperties.
---
dlls/usp10/tests/usp10.c | 11 +++++------
dlls/usp10/usp10.c | 37 +++++++++++++++++++++++++++++++++++--
2 files changed, 40 insertions(+), 8 deletions(-)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 683f938..83c297a 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -79,12 +79,11 @@ START_TEST(usp10)
* by checking a known value in the table */
hr = ScriptGetProperties(&ppSp, &iMaxProps);
trace("number of script properties %d\n", iMaxProps);
- todo_wine {
- ok (iMaxProps > 0, "Number of scripts returned should not be 0\n");
- if (iMaxProps > 0)
- ok( ppSp[5]->langid == 9, "Langid[5] not = to 9\n"); /* Check a known value to ensure */
- /* ptrs work */
- }
+ ok (iMaxProps > 0, "Number of scripts returned should not be 0\n");
+ if (iMaxProps > 0)
+ ok( ppSp[5]->langid == 9, "Langid[5] not = to 9\n"); /* Check a known value to ensure */
+ /* ptrs work */
+
/* This set of tests are to check that the various edits in ScriptIemize work */
cInChars = 5; /* Length of test without NULL */
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c
index 6fe2f6c..dd26867 100644
--- a/dlls/usp10/usp10.c
+++ b/dlls/usp10/usp10.c
@@ -39,6 +39,35 @@
WINE_DEFAULT_DEBUG_CHANNEL(uniscribe);
+#define MAX_SCRIPTS 8
+
+/* Set up a default for ScriptGetProperties */
+static const SCRIPT_PROPERTIES Default_Script_0 = {0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_1 = {0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_2 = {0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_3 = {9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_4 = {9, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_5 = {9, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_6 = {9, 1, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 1, 0, 0};
+static const SCRIPT_PROPERTIES Default_Script_7 = {8, 0, 0, 0, 0, 161, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0};
+static const SCRIPT_PROPERTIES *Global_Script[MAX_SCRIPTS] =
+ {&Default_Script_0,
+ &Default_Script_1,
+ &Default_Script_2,
+ &Default_Script_3,
+ &Default_Script_4,
+ &Default_Script_5,
+ &Default_Script_6,
+ &Default_Script_7};
+
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
{
switch(fdwReason) {
@@ -69,9 +98,13 @@ HRESULT WINAPI ScriptFreeCache(SCRIPT_CA
*/
HRESULT WINAPI ScriptGetProperties(const SCRIPT_PROPERTIES ***ppSp, int *piNumScripts)
{
- FIXME("%p,%p\n",ppSp,piNumScripts);
+ TRACE("%p,%p\n",ppSp, piNumScripts);
- if (piNumScripts) *piNumScripts = 0;
+/* Set up a sensible default and intialise pointers */
+ *piNumScripts = MAX_SCRIPTS;
+ *ppSp = Global_Script;
+ TRACE("ppSp:%p, *ppSp:%p, **ppSp:%p, %d\n", ppSp, *ppSp, **ppSp,
+ *piNumScripts);
return 0;
}
More information about the wine-cvs
mailing list