Andrew Talbot : riched20: Declare some functions static.
Alexandre Julliard
julliard at winehq.org
Mon Jan 19 08:58:49 CST 2009
Module: wine
Branch: master
Commit: b53d7d3295225e6c902b5a4414b406c0c40132fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b53d7d3295225e6c902b5a4414b406c0c40132fb
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Sat Jan 17 16:27:08 2009 +0000
riched20: Declare some functions static.
---
dlls/riched20/editor.h | 2 -
dlls/riched20/reader.c | 94 ++++++++++++++++++++++++------------------------
dlls/riched20/rtf.h | 7 ----
dlls/riched20/string.c | 2 +-
dlls/riched20/style.c | 2 +-
5 files changed, 49 insertions(+), 58 deletions(-)
diff --git a/dlls/riched20/editor.h b/dlls/riched20/editor.h
index d052d5d..dfe67fe 100644
--- a/dlls/riched20/editor.h
+++ b/dlls/riched20/editor.h
@@ -71,7 +71,6 @@ 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);
-CHARFORMAT2W *ME_ToCFAny(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 */
@@ -89,7 +88,6 @@ void ME_DumpDocument(ME_TextBuffer *buffer);
const char *ME_GetDITypeName(ME_DIType type);
/* string.c */
-int ME_GetOptimalBuffer(int nLen);
ME_String *ME_MakeString(LPCWSTR szText);
ME_String *ME_MakeStringN(LPCWSTR szText, int nMaxChars);
ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars);
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 0e0d9a0..7fc952b 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -178,6 +178,33 @@ RTFDestroy(RTF_Info *info)
}
+
+/* ---------------------------------------------------------------------- */
+
+/*
+ * Callback table manipulation routines
+ */
+
+
+/*
+ * Install or return a writer callback for a token class
+ */
+
+static void RTFSetClassCallback(RTF_Info *info, int class, RTFFuncPtr callback)
+{
+ if (class >= 0 && class < rtfMaxClass)
+ info->ccb[class] = callback;
+}
+
+
+static RTFFuncPtr RTFGetClassCallback(const RTF_Info *info, int class)
+{
+ if (class >= 0 && class < rtfMaxClass)
+ return info->ccb[class];
+ return NULL;
+}
+
+
/*
* Initialize the reader. This may be called multiple times,
* to read multiple files. The only thing not reset is the input
@@ -281,33 +308,6 @@ char *RTFGetOutputName(const RTF_Info *info)
}
-
-/* ---------------------------------------------------------------------- */
-
-/*
- * Callback table manipulation routines
- */
-
-
-/*
- * Install or return a writer callback for a token class
- */
-
-void RTFSetClassCallback(RTF_Info *info, int class, RTFFuncPtr callback)
-{
- if (class >= 0 && class < rtfMaxClass)
- info->ccb[class] = callback;
-}
-
-
-RTFFuncPtr RTFGetClassCallback(const RTF_Info *info, int class)
-{
- if (class >= 0 && class < rtfMaxClass)
- return info->ccb[class];
- return NULL;
-}
-
-
/*
* Install or return a writer callback for a destination type
*/
@@ -319,7 +319,7 @@ void RTFSetDestinationCallback(RTF_Info *info, int dest, RTFFuncPtr callback)
}
-RTFFuncPtr RTFGetDestinationCallback(const RTF_Info *info, int dest)
+static RTFFuncPtr RTFGetDestinationCallback(const RTF_Info *info, int dest)
{
if (dest >= 0 && dest < rtfMaxDestination)
return info->dcb[dest];
@@ -416,6 +416,22 @@ void RTFReadGroup (RTF_Info *info)
/*
+ * Install or return a token reader hook.
+ */
+
+void RTFSetReadHook(RTF_Info *info, RTFFuncPtr f)
+{
+ info->readHook = f;
+}
+
+
+static RTFFuncPtr RTFGetReadHook(const RTF_Info *info)
+{
+ return (info->readHook);
+}
+
+
+/*
* Read one token. Call the read hook if there is one. The
* token class is the return value. Returns rtfEOF when there
* are no more tokens.
@@ -446,23 +462,7 @@ int RTFGetToken(RTF_Info *info)
}
-/*
- * Install or return a token reader hook.
- */
-
-void RTFSetReadHook(RTF_Info *info, RTFFuncPtr f)
-{
- info->readHook = f;
-}
-
-
-RTFFuncPtr RTFGetReadHook(const RTF_Info *info)
-{
- return (info->readHook);
-}
-
-
-void RTFUngetToken(RTF_Info *info)
+static void RTFUngetToken(RTF_Info *info)
{
if (info->pushedClass >= 0) /* there's already an ungotten token */
ERR ("cannot unget two tokens\n");
@@ -797,7 +797,7 @@ static int GetChar(RTF_Info *info)
* part of the token text.
*/
-void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, const char *text)
+static void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, const char *text)
{
info->rtfClass = class;
info->rtfMajor = major;
@@ -1269,7 +1269,7 @@ static void ReadObjGroup(RTF_Info *info)
*/
-RTFStyle *RTFGetStyle(const RTF_Info *info, int num)
+static RTFStyle *RTFGetStyle(const RTF_Info *info, int num)
{
RTFStyle *s;
diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h
index a276b7c..6de440f 100644
--- a/dlls/riched20/rtf.h
+++ b/dlls/riched20/rtf.h
@@ -1195,17 +1195,11 @@ void RTFSetInputName (RTF_Info *, const char *);
char *RTFGetInputName (const RTF_Info *);
void RTFSetOutputName (RTF_Info *, const char *);
char *RTFGetOutputName (const RTF_Info *);
-void RTFSetClassCallback (RTF_Info *, int, RTFFuncPtr);
-RTFFuncPtr RTFGetClassCallback (const RTF_Info *, int);
void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr);
-RTFFuncPtr RTFGetDestinationCallback (const RTF_Info *, int);
void RTFRead (RTF_Info *);
int RTFGetToken (RTF_Info *); /* writer should rarely need this */
-void RTFUngetToken (RTF_Info *);
int RTFPeekToken (RTF_Info *);
-void RTFSetToken (RTF_Info *, int, int, int, int, const char *);
void RTFSetReadHook (RTF_Info *, RTFFuncPtr);
-RTFFuncPtr RTFGetReadHook (const RTF_Info *);
void RTFRouteToken (RTF_Info *);
void RTFSkipGroup (RTF_Info *);
void RTFReadGroup (RTF_Info *);
@@ -1215,7 +1209,6 @@ int RTFCheckCMM (const RTF_Info *, int, int, int);
int RTFCheckMM (const RTF_Info *, int, int);
RTFFont *RTFGetFont (const RTF_Info *, int);
RTFColor *RTFGetColor (const RTF_Info *, int);
-RTFStyle *RTFGetStyle (const RTF_Info *, int);
int RTFCharToHex ( char);
int RTFHexToChar ( int );
diff --git a/dlls/riched20/string.c b/dlls/riched20/string.c
index 4a5d590..c4abc6f 100644
--- a/dlls/riched20/string.c
+++ b/dlls/riched20/string.c
@@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(richedit);
-int ME_GetOptimalBuffer(int nLen)
+static int ME_GetOptimalBuffer(int nLen)
{
return ((2*nLen+1)+128)&~63;
}
diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c
index b7dae3e..b7b909b 100644
--- a/dlls/riched20/style.c
+++ b/dlls/riched20/style.c
@@ -77,7 +77,7 @@ void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from)
*to = *from;
}
-CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
+static CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
{
assert(from->cbSize == sizeof(CHARFORMAT2W));
if (to->cbSize == sizeof(CHARFORMATA))
More information about the wine-cvs
mailing list