riched20: Remove unused functions

Andrew Talbot andrew.talbot at talbotville.com
Sat Feb 7 08:33:00 CST 2009


Changelog:
    riched20: Remove unused functions.

diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index 1312363..fbcfc12 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -70,7 +70,6 @@ void ME_ClearTempStyle(ME_TextEditor *editor);
 void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]);
 void ME_DumpStyle(ME_Style *s);
 CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from);
-void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from);
 void ME_CopyToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from);
 void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc); /* only works with 2W structs */
 void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */
@@ -91,11 +90,9 @@ const char *ME_GetDITypeName(ME_DIType type);
 ME_String *ME_MakeString(LPCWSTR szText);
 ME_String *ME_MakeStringN(LPCWSTR szText, int nMaxChars);
 ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars);
-ME_String *ME_MakeStringB(int nMaxChars);
 ME_String *ME_StrDup(const ME_String *s);
 void ME_DestroyString(ME_String *s);
 void ME_AppendString(ME_String *s1, const ME_String *s2);
-ME_String *ME_ConcatString(const ME_String *s1, const ME_String *s2);
 ME_String *ME_VSplitString(ME_String *orig, int nVPos);
 int ME_IsWhitespaces(const ME_String *s);
 int ME_IsSplitable(const ME_String *s);
@@ -132,7 +129,6 @@ int ME_ReverseFindNonWhitespaceV(const ME_String *s, int nVChar);
 int ME_ReverseFindWhitespaceV(const ME_String *s, int nVChar);
 
 /* row.c */
-ME_DisplayItem *ME_FindRowStart(ME_Context *c, ME_DisplayItem *run, int nRelPos);
 ME_DisplayItem *ME_RowStart(ME_DisplayItem *item);
 /* ME_DisplayItem *ME_RowEnd(ME_DisplayItem *item); */
 void ME_RenumberParagraphs(ME_DisplayItem *item); /* TODO */
diff --git a/dlls/riched20/row.c b/dlls/riched20/row.c
index d3ef3de..1bf153f 100644
--- a/dlls/riched20/row.c
+++ b/dlls/riched20/row.c
@@ -24,50 +24,6 @@
 
 #include "editor.h"
 
-ME_DisplayItem *ME_FindRowStart(ME_Context *c, ME_DisplayItem *item, 
-                                int nRelPos) {
-  ME_DisplayItem *para = ME_GetParagraph(item);
-  ME_MustBeWrapped(c, para);
-  if(nRelPos<=0) { /* if this or preceding row */
-    do {
-      ME_DisplayItem *item2 = ME_FindItemBack(item, diStartRowOrParagraph);
-      if (item2->type == diParagraph)
-      {
-        if (item2->member.para.prev_para == NULL)
-          return item;
-        /* if skipping to the preceding paragraph, ensure it's wrapped */
-        ME_MustBeWrapped(c, item2->member.para.prev_para);
-        item = item2;
-        continue;
-      }
-      else if (item2->type == diStartRow)
-      {
-        nRelPos++;
-        if (nRelPos>0)
-          return item;
-        item = item2;
-        continue;
-      }
-      assert(0 == "bug in FindItemBack(item, diStartRowOrParagraph)");
-      item = item2;
-    } while(1);
-  }
-  while(nRelPos>0) { /* if one of the next rows */
-    ME_DisplayItem *item2 = ME_FindItemFwd(item, diStartRowOrParagraph);
-    if (!item2)
-      return item;
-    if (item2->type == diParagraph)
-    {
-      if (item2->member.para.next_para == NULL)
-        return item;
-      continue;
-    }
-    item = item2;
-    nRelPos--;
-  }
-  return item;
-}
-
 /* I'm sure these functions would simplify some code in caret ops etc,
  * I just didn't remember them when I wrote that code
  */ 
diff --git a/dlls/riched20/string.c b/dlls/riched20/string.c
index 0bd751c..fdcad8d 100644
--- a/dlls/riched20/string.c
+++ b/dlls/riched20/string.c
@@ -65,17 +65,6 @@ ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars)
   return s;
 }
 
-ME_String *ME_MakeStringB(int nMaxChars)
-{ /* Create a buffer (uninitialized string) of size nMaxChars */
-  ME_String *s = ALLOC_OBJ(ME_String);
-  
-  s->nLen = nMaxChars;
-  s->nBuffer = ME_GetOptimalBuffer(s->nLen+1);
-  s->szData = ALLOC_N_OBJ(WCHAR, s->nBuffer);
-  s->szData[s->nLen] = 0;
-  return s;
-}
-
 ME_String *ME_StrDup(const ME_String *s)
 {
   return ME_MakeStringN(s->szData, s->nLen);
@@ -108,17 +97,6 @@ void ME_AppendString(ME_String *s1, const ME_String *s2)
   }
 }
 
-ME_String *ME_ConcatString(const ME_String *s1, const ME_String *s2)
-{
-  ME_String *s = ALLOC_OBJ(ME_String);
-  s->nLen = s1->nLen+s2->nLen;
-  s->nBuffer = ME_GetOptimalBuffer(s1->nLen+s2->nLen+1);
-  s->szData = ALLOC_N_OBJ(WCHAR, s->nBuffer);
-  lstrcpyW(s->szData, s1->szData);
-  lstrcpyW(s->szData+s1->nLen, s2->szData);
-  return s;  
-}
-
 ME_String *ME_VSplitString(ME_String *orig, int charidx)
 {
   ME_String *s;
diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c
index 3980400..a3b532e 100644
--- a/dlls/riched20/style.c
+++ b/dlls/riched20/style.c
@@ -71,12 +71,6 @@ CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from)
   return (from->cbSize >= sizeof(CHARFORMAT2W)) ? from : NULL;
 }
 
-void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from)
-{
-  if (ME_ToCF2W(to, from) == from)
-    *to = *from;
-}
-
 static CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
 {
   assert(from->cbSize == sizeof(CHARFORMAT2W));



More information about the wine-patches mailing list