riched20: Declare some functions static.

This commit is contained in:
Andrew Talbot 2009-01-17 16:27:08 +00:00 committed by Alexandre Julliard
parent ebe4a9e321
commit b53d7d3295
5 changed files with 49 additions and 58 deletions

View File

@ -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);

View File

@ -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];
@ -415,6 +415,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
@ -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;

View File

@ -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 );

View File

@ -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;
}

View File

@ -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))