riched20: Constify some variables
Andrew Talbot
andrew.talbot at talbotville.com
Sat Aug 11 10:07:50 CDT 2007
Changelog:
riched20: Constify some variables.
diff -urN a/dlls/riched20/caret.c b/dlls/riched20/caret.c
--- a/dlls/riched20/caret.c 2007-06-06 13:43:15.000000000 +0100
+++ b/dlls/riched20/caret.c 2007-08-11 14:53:11.000000000 +0100
@@ -47,10 +47,10 @@
}
-int ME_GetTextLengthEx(ME_TextEditor *editor, GETTEXTLENGTHEX *how)
+int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
{
int length;
-
+
if (how->flags & GTL_PRECISE && how->flags & GTL_CLOSE)
return E_INVALIDARG;
if (how->flags & GTL_NUMCHARS && how->flags & GTL_NUMBYTES)
@@ -1148,8 +1148,8 @@
else
return 1;
}
-
-BOOL ME_UpdateSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor)
+
+BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor)
{
ME_Cursor old_anchor = editor->pCursors[1];
diff -urN a/dlls/riched20/clipboard.c b/dlls/riched20/clipboard.c
--- a/dlls/riched20/clipboard.c 2006-10-24 10:57:40.000000000 +0100
+++ b/dlls/riched20/clipboard.c 2007-08-11 14:46:39.000000000 +0100
@@ -45,7 +45,7 @@
UINT cur;
} EnumFormatImpl;
-static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc);
+static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT size, LPENUMFORMATETC *lplpformatetc);
static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFIID riid, LPVOID *ppvObj)
{
@@ -147,7 +147,7 @@
EnumFormatImpl_Clone
};
-static HRESULT EnumFormatImpl_Create(FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFORMATETC **lplpformatetc)
+static HRESULT EnumFormatImpl_Create(const FORMATETC *fmtetc, UINT fmtetc_cnt, IEnumFORMATETC **lplpformatetc)
{
EnumFormatImpl *ret;
TRACE("\n");
@@ -325,7 +325,7 @@
DataObjectImpl_EnumDAdvise
};
-static HGLOBAL get_unicode_text(ME_TextEditor *editor, CHARRANGE *lpchrg)
+static HGLOBAL get_unicode_text(ME_TextEditor *editor, const CHARRANGE *lpchrg)
{
int pars, len;
WCHAR *data;
@@ -369,7 +369,7 @@
return 0;
}
-static HGLOBAL get_rtf_text(ME_TextEditor *editor, CHARRANGE *lpchrg)
+static HGLOBAL get_rtf_text(ME_TextEditor *editor, const CHARRANGE *lpchrg)
{
EDITSTREAM es;
ME_GlobalDestStruct gds;
@@ -383,7 +383,7 @@
return gds.hData;
}
-HRESULT ME_GetDataObject(ME_TextEditor *editor, CHARRANGE *lpchrg, LPDATAOBJECT *lplpdataobj)
+HRESULT ME_GetDataObject(ME_TextEditor *editor, const CHARRANGE *lpchrg, LPDATAOBJECT *lplpdataobj)
{
DataObjectImpl *obj;
TRACE("(%p,%d,%d)\n", editor, lpchrg->cpMin, lpchrg->cpMax);
diff -urN a/dlls/riched20/editor.c b/dlls/riched20/editor.c
--- a/dlls/riched20/editor.c 2007-06-28 14:10:18.000000000 +0100
+++ b/dlls/riched20/editor.c 2007-08-11 14:46:16.000000000 +0100
@@ -782,7 +782,7 @@
static int
-ME_FindText(ME_TextEditor *editor, DWORD flags, CHARRANGE *chrg, const WCHAR *text, CHARRANGE *chrgText)
+ME_FindText(ME_TextEditor *editor, DWORD flags, const CHARRANGE *chrg, const WCHAR *text, CHARRANGE *chrgText)
{
const int nLen = lstrlenW(text);
const int nTextLen = ME_GetTextLength(editor);
diff -urN a/dlls/riched20/editor.h b/dlls/riched20/editor.h
--- a/dlls/riched20/editor.h 2007-03-22 15:12:15.000000000 +0000
+++ b/dlls/riched20/editor.h 2007-08-11 14:46:58.000000000 +0100
@@ -206,9 +206,9 @@
void ME_InsertTableCellFromCursor(ME_TextEditor *editor, int nCursor);
void ME_InternalDeleteText(ME_TextEditor *editor, int nOfs, int nChars);
int ME_GetTextLength(ME_TextEditor *editor);
-int ME_GetTextLengthEx(ME_TextEditor *editor, GETTEXTLENGTHEX *how);
+int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how);
ME_Style *ME_GetSelectionInsertStyle(ME_TextEditor *editor);
-BOOL ME_UpdateSelection(ME_TextEditor *editor, ME_Cursor *pTempCursor);
+BOOL ME_UpdateSelection(ME_TextEditor *editor, const ME_Cursor *pTempCursor);
/* wrap.c */
void ME_PrepareParagraphForWrapping(ME_Context *c, ME_DisplayItem *tp);
@@ -285,4 +285,4 @@
LRESULT ME_StreamOut(ME_TextEditor *editor, DWORD dwFormat, EDITSTREAM *stream);
/* clipboard.c */
-HRESULT ME_GetDataObject(ME_TextEditor *editor, CHARRANGE *lpchrg, LPDATAOBJECT *lplpdataobj);
+HRESULT ME_GetDataObject(ME_TextEditor *editor, const CHARRANGE *lpchrg, LPDATAOBJECT *lplpdataobj);
More information about the wine-patches
mailing list