riched20: RTFPeekToken(), RTFExpandStyle() and RTFHexToChar() are unused so remove them.
This commit is contained in:
parent
1914d256a6
commit
e5f5bd1153
|
@ -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;
|
||||
|
@ -1290,59 +1243,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 */
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
|
@ -2397,14 +2297,6 @@ int RTFCharToHex(char c)
|
|||
}
|
||||
|
||||
|
||||
int RTFHexToChar(int i)
|
||||
{
|
||||
if (i < 10)
|
||||
return (i + '0');
|
||||
return (i - 10 + 'a');
|
||||
}
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue