Thomas Faber : riched20: Avoid a forward declaration.

Alexandre Julliard julliard at winehq.org
Mon Oct 24 13:43:55 CDT 2011


Module: wine
Branch: master
Commit: f3a3ce8a5129a2a46b13352d66b4d776306190f4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f3a3ce8a5129a2a46b13352d66b4d776306190f4

Author: Thomas Faber <thfabba at gmx.de>
Date:   Sat Oct 22 20:17:04 2011 +0200

riched20: Avoid a forward declaration.

---

 dlls/riched20/wrap.c |   75 ++++++++++++++++++++++++--------------------------
 1 files changed, 36 insertions(+), 39 deletions(-)

diff --git a/dlls/riched20/wrap.c b/dlls/riched20/wrap.c
index 2ec67ab..e06db72 100644
--- a/dlls/riched20/wrap.c
+++ b/dlls/riched20/wrap.c
@@ -480,7 +480,42 @@ static int ME_GetParaLineSpace(ME_Context* c, ME_Paragraph* para)
     return sp * c->editor->nZoomNumerator / c->editor->nZoomDenominator;
 }
 
-static void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp);
+static void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp) {
+  ME_DisplayItem *p, *pRow;
+
+  tp->member.para.nWidth = 0;
+  /* remove all items that will be reinserted by paragraph wrapper anyway */
+  tp->member.para.nRows = 0;
+  for (p = tp->next; p!=tp->member.para.next_para; p = p->next) {
+    switch(p->type) {
+      case diStartRow:
+        pRow = p;
+        p = p->prev;
+        ME_Remove(pRow);
+        ME_DestroyDisplayItem(pRow);
+        break;
+      default:
+        break;
+    }
+  }
+  /* join runs that can be joined, set up flags */
+  for (p = tp->next; p!=tp->member.para.next_para; p = p->next) {
+    switch(p->type) {
+      case diStartRow: assert(0); break; /* should have deleted it */
+      case diRun:
+        while (p->next->type == diRun) { /* FIXME */
+          if (ME_CanJoinRuns(&p->member.run, &p->next->member.run)) {
+            ME_JoinRuns(c->editor, p);
+          }
+          else
+            break;
+        }
+        break;
+      default:
+        break;
+    }
+  }
+}
 
 static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
   ME_DisplayItem *p;
@@ -558,44 +593,6 @@ static void ME_WrapTextParagraph(ME_Context *c, ME_DisplayItem *tp) {
   tp->member.para.nRows = wc.nRow;
 }
 
-
-static void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp) {
-  ME_DisplayItem *p, *pRow;
-
-  tp->member.para.nWidth = 0;
-  /* remove all items that will be reinserted by paragraph wrapper anyway */
-  tp->member.para.nRows = 0;
-  for (p = tp->next; p!=tp->member.para.next_para; p = p->next) {
-    switch(p->type) {
-      case diStartRow:
-        pRow = p;
-        p = p->prev;
-        ME_Remove(pRow);
-        ME_DestroyDisplayItem(pRow);
-        break;
-      default:
-        break;
-    }
-  }
-  /* join runs that can be joined, set up flags */
-  for (p = tp->next; p!=tp->member.para.next_para; p = p->next) {
-    switch(p->type) {
-      case diStartRow: assert(0); break; /* should have deleted it */
-      case diRun:
-        while (p->next->type == diRun) { /* FIXME */
-          if (ME_CanJoinRuns(&p->member.run, &p->next->member.run)) {
-            ME_JoinRuns(c->editor, p);
-          }
-          else
-            break;
-        }
-        break;
-      default:
-        break;
-    }
-  }
-}
-
 BOOL ME_WrapMarkedParagraphs(ME_TextEditor *editor)
 {
   ME_DisplayItem *item;




More information about the wine-cvs mailing list