riched20: Declare some functions static
Andrew Talbot
Andrew.Talbot at talbotville.com
Tue Jan 23 15:00:27 CST 2007
Note: I left editor.c out of this patch, so as not to collide
with Matt's patches. I shall probably revisit it tomorrow.
-- Andy.
---
Changelog:
riched20: Declare some functions static.
diff -urN a/dlls/riched20/paint.c b/dlls/riched20/paint.c
--- a/dlls/riched20/paint.c 2006-11-27 17:42:32.000000000 +0000
+++ b/dlls/riched20/paint.c 2007-01-23 20:29:17.000000000 +0000
@@ -206,8 +206,8 @@
SetTextColor(hDC, color);
}
-void ME_DrawGraphics(ME_Context *c, int x, int y, ME_Run *run,
- ME_Paragraph *para, BOOL selected) {
+static void ME_DrawGraphics(ME_Context *c, int x, int y, ME_Run *run,
+ ME_Paragraph *para, BOOL selected) {
SIZE sz;
int xs, ys, xe, ye, h, ym, width, eyes;
ME_GetGraphicsSize(c->editor, run, &sz);
diff -urN a/dlls/riched20/run.c b/dlls/riched20/run.c
--- a/dlls/riched20/run.c 2006-10-20 18:08:04.000000000 +0100
+++ b/dlls/riched20/run.c 2007-01-23 20:42:18.000000000 +0000
@@ -637,8 +637,7 @@
*
* Finds a width and a height of the text using a specified style
*/
-void ME_GetTextExtent(ME_Context *c, LPCWSTR szText, int nChars, ME_Style *s,
- SIZE *size)
+static void ME_GetTextExtent(ME_Context *c, LPCWSTR szText, int nChars, ME_Style *s, SIZE *size)
{
HDC hDC = c->hDC;
HGDIOBJ hOldFont;
@@ -653,7 +652,8 @@
* Finds width, height, ascent and descent of a run, up to given character
* (nLen).
*/
-SIZE ME_GetRunSizeCommon(ME_Context *c, ME_Paragraph *para, ME_Run *run, int nLen, int *pAscent, int *pDescent)
+static SIZE ME_GetRunSizeCommon(ME_Context *c, ME_Paragraph *para, ME_Run *run, int nLen,
+ int *pAscent, int *pDescent)
{
SIZE size;
int nMaxLen = ME_StrVLen(run->strText);
@@ -865,7 +865,7 @@
/* pcf = editor->pBuffer->pDefaultStyle->fmt; */
}
-void ME_GetRunCharFormat(ME_TextEditor *editor, ME_DisplayItem *run, CHARFORMAT2W *pFmt)
+static void ME_GetRunCharFormat(ME_TextEditor *editor, ME_DisplayItem *run, CHARFORMAT2W *pFmt)
{
ME_CopyCharFormat(pFmt, &run->member.run.style->fmt);
}
diff -urN a/dlls/riched20/style.c b/dlls/riched20/style.c
--- a/dlls/riched20/style.c 2006-08-17 11:06:03.000000000 +0100
+++ b/dlls/riched20/style.c 2007-01-23 20:28:29.000000000 +0000
@@ -308,7 +308,7 @@
fmt->bCharSet = lf->lfCharSet;
}
-BOOL ME_IsFontEqual(LOGFONTW *p1, LOGFONTW *p2)
+static BOOL ME_IsFontEqual(LOGFONTW *p1, LOGFONTW *p2)
{
if (memcmp(p1, p2, sizeof(LOGFONTW)-sizeof(p1->lfFaceName)))
return FALSE;
diff -urN a/dlls/riched20/txtsrv.c b/dlls/riched20/txtsrv.c
--- a/dlls/riched20/txtsrv.c 2007-01-17 17:24:42.000000000 +0000
+++ b/dlls/riched20/txtsrv.c 2007-01-23 20:28:17.000000000 +0000
@@ -141,11 +141,11 @@
return ref;
}
-HRESULT WINAPI fnTextSrv_TxSendMessage(ITextServices *iface,
- UINT msg,
- WPARAM wparam,
- LPARAM lparam,
- LRESULT* plresult)
+static HRESULT WINAPI fnTextSrv_TxSendMessage(ITextServices *iface,
+ UINT msg,
+ WPARAM wparam,
+ LPARAM lparam,
+ LRESULT* plresult)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -153,19 +153,19 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxDraw(ITextServices *iface,
- DWORD dwDrawAspect,
- LONG lindex,
- void* pvAspect,
- DVTARGETDEVICE* ptd,
- HDC hdcDraw,
- HDC hdcTargetDev,
- LPCRECTL lprcBounds,
- LPCRECTL lprcWBounds,
- LPRECT lprcUpdate,
- BOOL (CALLBACK * pfnContinue)(DWORD),
- DWORD dwContinue,
- LONG lViewId)
+static HRESULT WINAPI fnTextSrv_TxDraw(ITextServices *iface,
+ DWORD dwDrawAspect,
+ LONG lindex,
+ void* pvAspect,
+ DVTARGETDEVICE* ptd,
+ HDC hdcDraw,
+ HDC hdcTargetDev,
+ LPCRECTL lprcBounds,
+ LPCRECTL lprcWBounds,
+ LPRECT lprcUpdate,
+ BOOL (CALLBACK * pfnContinue)(DWORD),
+ DWORD dwContinue,
+ LONG lViewId)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -173,12 +173,12 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetHScroll(ITextServices *iface,
- LONG* plMin,
- LONG* plMax,
- LONG* plPos,
- LONG* plPage,
- BOOL* pfEnabled)
+static HRESULT WINAPI fnTextSrv_TxGetHScroll(ITextServices *iface,
+ LONG* plMin,
+ LONG* plMax,
+ LONG* plPos,
+ LONG* plPage,
+ BOOL* pfEnabled)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -186,12 +186,12 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetVScroll(ITextServices *iface,
- LONG* plMin,
- LONG* plMax,
- LONG* plPos,
- LONG* plPage,
- BOOL* pfEnabled)
+static HRESULT WINAPI fnTextSrv_TxGetVScroll(ITextServices *iface,
+ LONG* plMin,
+ LONG* plMax,
+ LONG* plPos,
+ LONG* plPage,
+ BOOL* pfEnabled)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -199,15 +199,15 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxSetCursor(ITextServices *iface,
- DWORD dwDrawAspect,
- LONG lindex,
- void* pvAspect,
- DVTARGETDEVICE* ptd,
- HDC hdcDraw,
- HDC hicTargetDev,
- LPCRECT lprcClient,
- INT x, INT y)
+static HRESULT WINAPI fnTextSrv_OnTxSetCursor(ITextServices *iface,
+ DWORD dwDrawAspect,
+ LONG lindex,
+ void* pvAspect,
+ DVTARGETDEVICE* ptd,
+ HDC hdcDraw,
+ HDC hicTargetDev,
+ LPCRECT lprcClient,
+ INT x, INT y)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -215,16 +215,16 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxQueryHitPoint(ITextServices *iface,
- DWORD dwDrawAspect,
- LONG lindex,
- void* pvAspect,
- DVTARGETDEVICE* ptd,
- HDC hdcDraw,
- HDC hicTargetDev,
- LPCRECT lprcClient,
- INT x, INT y,
- DWORD* pHitResult)
+static HRESULT WINAPI fnTextSrv_TxQueryHitPoint(ITextServices *iface,
+ DWORD dwDrawAspect,
+ LONG lindex,
+ void* pvAspect,
+ DVTARGETDEVICE* ptd,
+ HDC hdcDraw,
+ HDC hicTargetDev,
+ LPCRECT lprcClient,
+ INT x, INT y,
+ DWORD* pHitResult)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -232,8 +232,8 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxInplaceActivate(ITextServices *iface,
- LPCRECT prcClient)
+static HRESULT WINAPI fnTextSrv_OnTxInplaceActivate(ITextServices *iface,
+ LPCRECT prcClient)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -241,7 +241,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxInplaceDeactivate(ITextServices *iface)
+static HRESULT WINAPI fnTextSrv_OnTxInplaceDeactivate(ITextServices *iface)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -249,7 +249,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxUIActivate(ITextServices *iface)
+static HRESULT WINAPI fnTextSrv_OnTxUIActivate(ITextServices *iface)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -257,7 +257,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxUIDeactivate(ITextServices *iface)
+static HRESULT WINAPI fnTextSrv_OnTxUIDeactivate(ITextServices *iface)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -265,7 +265,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetText(ITextServices *iface,
+static HRESULT WINAPI fnTextSrv_TxGetText(ITextServices *iface,
BSTR* pbstrText)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -274,7 +274,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxSetText(ITextServices *iface,
+static HRESULT WINAPI fnTextSrv_TxSetText(ITextServices *iface,
LPCWSTR pszText)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -283,7 +283,7 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetCurrentTargetX(ITextServices *iface,
+static HRESULT WINAPI fnTextSrv_TxGetCurrentTargetX(ITextServices *iface,
LONG* x)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -301,15 +301,15 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetNaturalSize(ITextServices *iface,
- DWORD dwAspect,
- HDC hdcDraw,
- HDC hicTargetDev,
- DVTARGETDEVICE* ptd,
- DWORD dwMode,
- const SIZEL* psizelExtent,
- LONG* pwidth,
- LONG* pheight)
+static HRESULT WINAPI fnTextSrv_TxGetNaturalSize(ITextServices *iface,
+ DWORD dwAspect,
+ HDC hdcDraw,
+ HDC hicTargetDev,
+ DVTARGETDEVICE* ptd,
+ DWORD dwMode,
+ const SIZEL* psizelExtent,
+ LONG* pwidth,
+ LONG* pheight)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -317,8 +317,8 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetDropTarget(ITextServices *iface,
- IDropTarget** ppDropTarget)
+static HRESULT WINAPI fnTextSrv_TxGetDropTarget(ITextServices *iface,
+ IDropTarget** ppDropTarget)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -326,9 +326,9 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_OnTxPropertyBitsChange(ITextServices *iface,
- DWORD dwMask,
- DWORD dwBits)
+static HRESULT WINAPI fnTextSrv_OnTxPropertyBitsChange(ITextServices *iface,
+ DWORD dwMask,
+ DWORD dwBits)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
@@ -336,9 +336,9 @@
return E_NOTIMPL;
}
-HRESULT WINAPI fnTextSrv_TxGetCachedSize(ITextServices *iface,
- DWORD* pdwWidth,
- DWORD* pdwHeight)
+static HRESULT WINAPI fnTextSrv_TxGetCachedSize(ITextServices *iface,
+ DWORD* pdwWidth,
+ DWORD* pdwHeight)
{
ICOM_THIS_MULTI(ITextServicesImpl, lpVtbl, iface);
diff -urN a/dlls/riched20/undo.c b/dlls/riched20/undo.c
--- a/dlls/riched20/undo.c 2007-01-11 15:27:49.000000000 +0000
+++ b/dlls/riched20/undo.c 2007-01-23 20:28:01.000000000 +0000
@@ -165,7 +165,7 @@
ME_SendSelChange(editor);
}
-void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem)
+static void ME_PlayUndoItem(ME_TextEditor *editor, ME_DisplayItem *pItem)
{
ME_UndoItem *pUItem = (ME_UndoItem *)pItem;
More information about the wine-patches
mailing list