[ros-diffs] [gschneider] 44689: Sync usp10 with Wine 1.1.35, remove diff

gschneider at svn.reactos.org gschneider at svn.reactos.org
Tue Dec 22 01:27:49 CET 2009


Author: gschneider
Date: Tue Dec 22 01:27:48 2009
New Revision: 44689

URL: http://svn.reactos.org/svn/reactos?rev=44689&view=rev
Log:
Sync usp10 with Wine 1.1.35, remove diff

Removed:
    trunk/reactos/dll/win32/usp10/usp10_ros.diff
Modified:
    trunk/reactos/dll/win32/usp10/usp10.c
    trunk/reactos/dll/win32/usp10/usp10.spec

Modified: trunk/reactos/dll/win32/usp10/usp10.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.c?rev=44689&r1=44688&r2=44689&view=diff
==============================================================================
--- trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/usp10/usp10.c [iso-8859-1] Tue Dec 22 01:27:48 2009
@@ -923,7 +923,9 @@
     TRACE("(%p)\n", pssa);
 
     if (!pssa || !(analysis = *pssa)) return E_INVALIDARG;
+
     invalid = analysis->invalid;
+    ScriptFreeCache((SCRIPT_CACHE *)&analysis->sc);
 
     for (i = 0; i < analysis->numItems; i++)
     {
@@ -1298,6 +1300,7 @@
 
     *pcGlyphs = cChars;
     if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
+    if (!pwLogClust) return E_FAIL;
 
     if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
     {
@@ -1318,21 +1321,18 @@
         for (i = 0; i < cChars; i++) pwOutGlyphs[i] = pwcChars[i];
     }
 
-    if (psva)
-    {
-        /* set up a valid SCRIPT_VISATTR and LogClust for each char in this run */
-        for (i = 0; i < cChars; i++)
-        {
-            /* FIXME: set to better values */
-            psva[i].uJustification = (pwcChars[i] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER;
-            psva[i].fClusterStart  = 1;
-            psva[i].fDiacritic     = 0;
-            psva[i].fZeroWidth     = 0;
-            psva[i].fReserved      = 0;
-            psva[i].fShapeReserved = 0;
-
-            if (pwLogClust) pwLogClust[i] = i;
-        }
+    /* set up a valid SCRIPT_VISATTR and LogClust for each char in this run */
+    for (i = 0; i < cChars; i++)
+    {
+        /* FIXME: set to better values */
+        psva[i].uJustification = (pwcChars[i] == ' ') ? SCRIPT_JUSTIFY_BLANK : SCRIPT_JUSTIFY_CHARACTER;
+        psva[i].fClusterStart  = 1;
+        psva[i].fDiacritic     = 0;
+        psva[i].fZeroWidth     = 0;
+        psva[i].fReserved      = 0;
+        psva[i].fShapeReserved = 0;
+
+        pwLogClust[i] = i;
     }
     return S_OK;
 }
@@ -1369,6 +1369,7 @@
 
     if (!psva) return E_INVALIDARG;
     if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
+    if (!pGoffset) return E_FAIL;
 
     if (pABC) memset(pABC, 0, sizeof(ABC));
     for (i = 0; i < cGlyphs; i++)
@@ -1397,7 +1398,7 @@
             pABC->abcC += abc.abcC;
         }
         /* FIXME: set to more reasonable values */
-        if (pGoffset)  pGoffset[i].du = pGoffset[i].dv = 0;
+        pGoffset[i].du = pGoffset[i].dv = 0;
         if (piAdvance) piAdvance[i] = abc.abcA + abc.abcB + abc.abcC;
     }
 
@@ -1530,6 +1531,7 @@
 
     TRACE("(%p, %p, 0x%04x, %p)\n", hdc, psc, glyph, abc);
 
+    if (!abc) return E_INVALIDARG;
     if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
 
     if (!get_cache_glyph_widths(psc, glyph, abc))
@@ -1795,8 +1797,47 @@
     return S_OK;
 }
 
-VOID WINAPI LpkPresent()   
-{   
-    /* FIXME */   
-    ERR("LPK: %s is unimplemented, please try again later.\n", __FUNCTION__);   
-} 
+/***********************************************************************
+ *      ScriptApplyLogicalWidth (USP10.@)
+ *
+ * Generate glyph advance widths.
+ *
+ * PARAMS
+ *  dx          [I]   Array of logical advance widths.
+ *  num_chars   [I]   Number of characters.
+ *  num_glyphs  [I]   Number of glyphs.
+ *  log_clust   [I]   Array of logical clusters.
+ *  sva         [I]   Visual attributes.
+ *  advance     [I]   Array of glyph advance widths.
+ *  sa          [I]   Script analysis.
+ *  abc         [I/O] Summed ABC widths.
+ *  justify     [O]   Array of glyph advance widths.
+ *
+ * RETURNS
+ *  Success: S_OK
+ *  Failure: a non-zero HRESULT.
+ */
+HRESULT WINAPI ScriptApplyLogicalWidth(const int *dx, int num_chars, int num_glyphs,
+                                       const WORD *log_clust, const SCRIPT_VISATTR *sva,
+                                       const int *advance, const SCRIPT_ANALYSIS *sa,
+                                       ABC *abc, int *justify)
+{
+    int i;
+
+    FIXME("(%p, %d, %d, %p, %p, %p, %p, %p, %p)\n",
+          dx, num_chars, num_glyphs, log_clust, sva, advance, sa, abc, justify);
+
+    for (i = 0; i < num_chars; i++) justify[i] = advance[i];
+    return S_OK;
+}
+
+HRESULT WINAPI ScriptJustify(const SCRIPT_VISATTR *sva, const int *advance,
+                             int num_glyphs, int dx, int min_kashida, int *justify)
+{
+    int i;
+
+    FIXME("(%p, %p, %d, %d, %d, %p)\n", sva, advance, num_glyphs, dx, min_kashida, justify);
+
+    for (i = 0; i < num_glyphs; i++) justify[i] = advance[i];
+    return S_OK;
+}

Modified: trunk/reactos/dll/win32/usp10/usp10.spec
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10.spec?rev=44689&r1=44688&r2=44689&view=diff
==============================================================================
--- trunk/reactos/dll/win32/usp10/usp10.spec [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/usp10/usp10.spec [iso-8859-1] Tue Dec 22 01:27:48 2009
@@ -1,6 +1,6 @@
-@ stdcall LpkPresent()
+@ stub LpkPresent
 @ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
-@ stub ScriptApplyLogicalWidth
+@ stdcall ScriptApplyLogicalWidth(ptr long long ptr ptr ptr ptr ptr ptr)
 @ stdcall ScriptBreak(ptr long ptr ptr)
 @ stdcall ScriptCPtoX(long long long long ptr ptr ptr ptr ptr)
 @ stdcall ScriptCacheGetHeight(ptr ptr ptr)
@@ -12,7 +12,7 @@
 @ stdcall ScriptGetProperties(ptr long)
 @ stdcall ScriptIsComplex(wstr long long)
 @ stdcall ScriptItemize(wstr long long ptr ptr ptr ptr)
-@ stub ScriptJustify
+@ stdcall ScriptJustify(ptr ptr long long long ptr)
 @ stdcall ScriptLayout(long ptr ptr ptr)
 @ stdcall ScriptPlace(ptr ptr ptr long ptr ptr ptr ptr ptr)
 @ stdcall ScriptRecordDigitSubstitution(ptr ptr)

Removed: trunk/reactos/dll/win32/usp10/usp10_ros.diff
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/usp10/usp10_ros.diff?rev=44688&view=auto
==============================================================================
--- trunk/reactos/dll/win32/usp10/usp10_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/usp10/usp10_ros.diff (removed)
@@ -1,25 +1,0 @@
-Index: usp10.c
-===================================================================
---- usp10.c	(revision 34385)
-+++ usp10.c	(working copy)
-@@ -1726,3 +1726,10 @@
-     for (i = 0; i < nbchars; i++) widths[i] = glyph_width[i];
-     return S_OK;
- }
-+
-+
-+VOID WINAPI LpkPresent()   
-+{   
-+    /* FIXME */   
-+    ERR("LPK: %s is unimplemented, please try again later.\n", __FUNCTION__);   
-+} 
-Index: usp10.spec
-===================================================================
---- usp10.spec	(revision 34385)
-+++ usp10.spec	(working copy)
-@@ -1,4 +1,4 @@
--@ stub LpkPresent
-+@ stdcall LpkPresent()
- @ stdcall ScriptApplyDigitSubstitution(ptr ptr ptr)
- @ stub ScriptApplyLogicalWidth
- @ stdcall ScriptBreak(ptr long ptr ptr)




More information about the Ros-diffs mailing list