Module: wine Branch: master Commit: e5f5bd11538386b0d5f7b985328585f77c21fcdd URL: http://source.winehq.org/git/wine.git/?a=commit;h=e5f5bd11538386b0d5f7b98532...
Author: Francois Gouget fgouget@free.fr Date: Tue May 26 00:48:34 2009 +0200
riched20: RTFPeekToken(), RTFExpandStyle() and RTFHexToChar() are unused so remove them.
---
dlls/riched20/reader.c | 108 ------------------------------------------------ dlls/riched20/rtf.h | 3 - 2 files changed, 0 insertions(+), 111 deletions(-)
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c index 10aa19e..b6a6f44 100644 --- a/dlls/riched20/reader.c +++ b/dlls/riched20/reader.c @@ -446,14 +446,6 @@ static void RTFUngetToken(RTF_Info *info) }
-int RTFPeekToken(RTF_Info *info) -{ - _RTFGetToken (info); - RTFUngetToken (info); - return (info->rtfClass); -} - - static void _RTFGetToken(RTF_Info *info) { if (info->rtfFormat == SF_TEXT) @@ -758,29 +750,6 @@ static int GetChar(RTF_Info *info) }
-/* - * Synthesize a token by setting the global variables to the - * values supplied. Typically this is followed with a call - * to RTFRouteToken(). - * - * If a param value other than rtfNoParam is passed, it becomes - * part of the token text. - */ - -static void RTFSetToken(RTF_Info *info, int class, int major, int minor, int param, const char *text) -{ - info->rtfClass = class; - info->rtfMajor = major; - info->rtfMinor = minor; - info->rtfParam = param; - if (param == rtfNoParam) - lstrcpyA(info->rtfTextBuf, text); - else - sprintf (info->rtfTextBuf, "%s%d", text, param); - info->rtfTextLen = lstrlenA (info->rtfTextBuf); -} - - /* ---------------------------------------------------------------------- */
/* @@ -1244,22 +1213,6 @@ static void ReadObjGroup(RTF_Info *info) * References to style 0 are mapped onto the Normal style. */
- -static RTFStyle *RTFGetStyle(const RTF_Info *info, int num) -{ - RTFStyle *s; - - if (num == -1) - return (info->styleList); - for (s = info->styleList; s != NULL; s = s->rtfNextStyle) - { - if (s->rtfSNum == num) - break; - } - return (s); /* NULL if not found */ -} - - RTFFont *RTFGetFont(const RTF_Info *info, int num) { RTFFont *f; @@ -1292,59 +1245,6 @@ RTFColor *RTFGetColor(const RTF_Info *info, int num)
/* ---------------------------------------------------------------------- */
- -/* - * Expand style n, if there is such a style. - */ - -void RTFExpandStyle(RTF_Info *info, int n) -{ - RTFStyle *s; - RTFStyleElt *se; - - if (n == -1) - return; - s = RTFGetStyle (info, n); - if (s == NULL) - return; - if (s->rtfExpanding != 0) - ERR ("Style expansion loop, style %d\n", n); - s->rtfExpanding = 1; /* set expansion flag for loop detection */ - /* - * Expand "based-on" style (unless it's the same as the current - * style -- Normal style usually gives itself as its own based-on - * style). Based-on style expansion is done by synthesizing - * the token that the writer needs to see in order to trigger - * another style expansion, and feeding to token back through - * the router so the writer sees it. - */ - if (n != s->rtfSBasedOn) - { - RTFSetToken (info, rtfControl, rtfParAttr, rtfStyleNum, - s->rtfSBasedOn, "\s"); - RTFRouteToken (info); - } - /* - * Now route the tokens unique to this style. RTFSetToken() - * isn't used because it would add the param value to the end - * of the token text, which already has it in. - */ - for (se = s->rtfSSEList; se != NULL; se = se->rtfNextSE) - { - info->rtfClass = se->rtfSEClass; - info->rtfMajor = se->rtfSEMajor; - info->rtfMinor = se->rtfSEMinor; - info->rtfParam = se->rtfSEParam; - lstrcpyA (info->rtfTextBuf, se->rtfSEText); - info->rtfTextLen = lstrlenA (info->rtfTextBuf); - RTFRouteToken (info); - } - s->rtfExpanding = 0; /* done - clear expansion flag */ -} - - -/* ---------------------------------------------------------------------- */ - /* * Control symbol lookup routines */ @@ -2397,14 +2297,6 @@ int RTFCharToHex(char c) }
-int RTFHexToChar(int i) -{ - if (i < 10) - return (i + '0'); - return (i - 10 + 'a'); -} - - /* ---------------------------------------------------------------------- */
/* diff --git a/dlls/riched20/rtf.h b/dlls/riched20/rtf.h index e8cfb34..3277301 100644 --- a/dlls/riched20/rtf.h +++ b/dlls/riched20/rtf.h @@ -1191,19 +1191,16 @@ void RTFDestroy(RTF_Info *info); void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr); void RTFRead (RTF_Info *); int RTFGetToken (RTF_Info *); /* writer should rarely need this */ -int RTFPeekToken (RTF_Info *); void RTFSetReadHook (RTF_Info *, RTFFuncPtr); void RTFRouteToken (RTF_Info *); void RTFSkipGroup (RTF_Info *); void RTFReadGroup (RTF_Info *); -void RTFExpandStyle (RTF_Info *, int); int RTFCheckCM (const RTF_Info *, int, int); 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); int RTFCharToHex ( char); -int RTFHexToChar ( int );
void RTFFlushOutputBuffer( RTF_Info *info ); void RTFSetEditStream(RTF_Info *info, ME_InStream *stream);