Commit b53d7d32 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

riched20: Declare some functions static.

parent ebe4a9e3
...@@ -71,7 +71,6 @@ void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]); ...@@ -71,7 +71,6 @@ void ME_DumpStyleToBuf(CHARFORMAT2W *pFmt, char buf[2048]);
void ME_DumpStyle(ME_Style *s); void ME_DumpStyle(ME_Style *s);
CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from); CHARFORMAT2W *ME_ToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from);
void ME_CopyToCF2W(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_CopyToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from);
void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc); /* only works with 2W structs */ void ME_CopyCharFormat(CHARFORMAT2W *pDest, const CHARFORMAT2W *pSrc); /* only works with 2W structs */
void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */ void ME_CharFormatFromLogFont(HDC hDC, const LOGFONTW *lf, CHARFORMAT2W *fmt); /* ditto */
...@@ -89,7 +88,6 @@ void ME_DumpDocument(ME_TextBuffer *buffer); ...@@ -89,7 +88,6 @@ void ME_DumpDocument(ME_TextBuffer *buffer);
const char *ME_GetDITypeName(ME_DIType type); const char *ME_GetDITypeName(ME_DIType type);
/* string.c */ /* string.c */
int ME_GetOptimalBuffer(int nLen);
ME_String *ME_MakeString(LPCWSTR szText); ME_String *ME_MakeString(LPCWSTR szText);
ME_String *ME_MakeStringN(LPCWSTR szText, int nMaxChars); ME_String *ME_MakeStringN(LPCWSTR szText, int nMaxChars);
ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars); ME_String *ME_MakeStringR(WCHAR cRepeat, int nMaxChars);
......
...@@ -178,6 +178,33 @@ RTFDestroy(RTF_Info *info) ...@@ -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, * Initialize the reader. This may be called multiple times,
* to read multiple files. The only thing not reset is the input * to read multiple files. The only thing not reset is the input
...@@ -281,33 +308,6 @@ char *RTFGetOutputName(const RTF_Info *info) ...@@ -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 * Install or return a writer callback for a destination type
*/ */
...@@ -319,7 +319,7 @@ void RTFSetDestinationCallback(RTF_Info *info, int dest, RTFFuncPtr callback) ...@@ -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) if (dest >= 0 && dest < rtfMaxDestination)
return info->dcb[dest]; return info->dcb[dest];
...@@ -416,6 +416,22 @@ void RTFReadGroup (RTF_Info *info) ...@@ -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 * Read one token. Call the read hook if there is one. The
* token class is the return value. Returns rtfEOF when there * token class is the return value. Returns rtfEOF when there
* are no more tokens. * are no more tokens.
...@@ -446,23 +462,7 @@ int RTFGetToken(RTF_Info *info) ...@@ -446,23 +462,7 @@ int RTFGetToken(RTF_Info *info)
} }
/* static void RTFUngetToken(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)
{ {
if (info->pushedClass >= 0) /* there's already an ungotten token */ if (info->pushedClass >= 0) /* there's already an ungotten token */
ERR ("cannot unget two tokens\n"); ERR ("cannot unget two tokens\n");
...@@ -797,7 +797,7 @@ static int GetChar(RTF_Info *info) ...@@ -797,7 +797,7 @@ static int GetChar(RTF_Info *info)
* part of the token text. * 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->rtfClass = class;
info->rtfMajor = major; info->rtfMajor = major;
...@@ -1269,7 +1269,7 @@ static void ReadObjGroup(RTF_Info *info) ...@@ -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; RTFStyle *s;
......
...@@ -1195,17 +1195,11 @@ void RTFSetInputName (RTF_Info *, const char *); ...@@ -1195,17 +1195,11 @@ void RTFSetInputName (RTF_Info *, const char *);
char *RTFGetInputName (const RTF_Info *); char *RTFGetInputName (const RTF_Info *);
void RTFSetOutputName (RTF_Info *, const char *); void RTFSetOutputName (RTF_Info *, const char *);
char *RTFGetOutputName (const RTF_Info *); char *RTFGetOutputName (const RTF_Info *);
void RTFSetClassCallback (RTF_Info *, int, RTFFuncPtr);
RTFFuncPtr RTFGetClassCallback (const RTF_Info *, int);
void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr); void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr);
RTFFuncPtr RTFGetDestinationCallback (const RTF_Info *, int);
void RTFRead (RTF_Info *); void RTFRead (RTF_Info *);
int RTFGetToken (RTF_Info *); /* writer should rarely need this */ int RTFGetToken (RTF_Info *); /* writer should rarely need this */
void RTFUngetToken (RTF_Info *);
int RTFPeekToken (RTF_Info *); int RTFPeekToken (RTF_Info *);
void RTFSetToken (RTF_Info *, int, int, int, int, const char *);
void RTFSetReadHook (RTF_Info *, RTFFuncPtr); void RTFSetReadHook (RTF_Info *, RTFFuncPtr);
RTFFuncPtr RTFGetReadHook (const RTF_Info *);
void RTFRouteToken (RTF_Info *); void RTFRouteToken (RTF_Info *);
void RTFSkipGroup (RTF_Info *); void RTFSkipGroup (RTF_Info *);
void RTFReadGroup (RTF_Info *); void RTFReadGroup (RTF_Info *);
...@@ -1215,7 +1209,6 @@ int RTFCheckCMM (const RTF_Info *, int, int, int); ...@@ -1215,7 +1209,6 @@ int RTFCheckCMM (const RTF_Info *, int, int, int);
int RTFCheckMM (const RTF_Info *, int, int); int RTFCheckMM (const RTF_Info *, int, int);
RTFFont *RTFGetFont (const RTF_Info *, int); RTFFont *RTFGetFont (const RTF_Info *, int);
RTFColor *RTFGetColor (const RTF_Info *, int); RTFColor *RTFGetColor (const RTF_Info *, int);
RTFStyle *RTFGetStyle (const RTF_Info *, int);
int RTFCharToHex ( char); int RTFCharToHex ( char);
int RTFHexToChar ( int ); int RTFHexToChar ( int );
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(richedit); WINE_DEFAULT_DEBUG_CHANNEL(richedit);
int ME_GetOptimalBuffer(int nLen) static int ME_GetOptimalBuffer(int nLen)
{ {
return ((2*nLen+1)+128)&~63; return ((2*nLen+1)+128)&~63;
} }
......
...@@ -77,7 +77,7 @@ void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from) ...@@ -77,7 +77,7 @@ void ME_CopyToCF2W(CHARFORMAT2W *to, CHARFORMAT2W *from)
*to = *from; *to = *from;
} }
CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from) static CHARFORMAT2W *ME_ToCFAny(CHARFORMAT2W *to, CHARFORMAT2W *from)
{ {
assert(from->cbSize == sizeof(CHARFORMAT2W)); assert(from->cbSize == sizeof(CHARFORMAT2W));
if (to->cbSize == sizeof(CHARFORMATA)) if (to->cbSize == sizeof(CHARFORMATA))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment