[PATCH] riched20: Add more warnings for unhandled control words.
Zebediah Figura
z.figura12 at gmail.com
Tue Sep 12 09:43:10 CDT 2017
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/riched20/editor.c | 6 ++++++
dlls/riched20/reader.c | 15 +++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index a7b1bc748f..f6badb1a36 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -533,6 +533,8 @@ void ME_RTFCharAttrHook(RTF_Info *info)
if (info->rtfParam != rtfNoParam)
fmt.yHeight = info->rtfParam*10;
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
if (fmt.dwMask) {
ME_Style *style2;
@@ -866,6 +868,8 @@ void ME_RTFParAttrHook(RTF_Info *info)
info->fmt.dwMask |= PFM_RTLPARA;
info->fmt.wEffects &= ~PFE_RTLPARA;
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
@@ -940,6 +944,8 @@ void ME_RTFTblAttrHook(RTF_Info *info)
if (info->tableDef)
info->tableDef->leftEdge = info->rtfParam;
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
diff --git a/dlls/riched20/reader.c b/dlls/riched20/reader.c
index 03101090b3..3efbc5a003 100644
--- a/dlls/riched20/reader.c
+++ b/dlls/riched20/reader.c
@@ -1011,7 +1011,7 @@ static void ReadColorTbl(RTF_Info *info)
if (info->rtfClass == rtfEOF)
break;
if (!RTFCheckCM (info, rtfText, ';'))
- ERR ("malformed entry\n");
+ WARN ("unknown token \"%s\"\n", info->rtfTextBuf);
}
RTFRouteToken (info); /* feed "}" back to router */
}
@@ -1064,7 +1064,7 @@ static void ReadStyleSheet(RTF_Info *info)
{
if (RTFCheckMM (info, rtfSpecialChar, rtfOptDest)) {
RTFGetToken(info);
- ERR("skipping optional destination\n");
+ WARN("skipping optional destination\n");
RTFSkipGroup(info);
info->rtfClass = rtfGroup;
info->rtfMajor = rtfEndGroup;
@@ -2385,6 +2385,8 @@ ControlClass (RTF_Info *info)
SpecialChar (info);
ME_RTFSpecialCharHook(info);
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
@@ -2437,6 +2439,8 @@ CharSet(RTF_Info *info)
case rtfPcaCharSet:
info->ansiCodePage = 850;
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
@@ -2450,7 +2454,10 @@ static void
Destination (RTF_Info *info)
{
if (!RTFGetDestinationCallback(info, info->rtfMinor))
+ {
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
RTFSkipGroup (info);
+ }
}
@@ -2475,6 +2482,8 @@ DocAttr(RTF_Info *info)
case rtfUTF8RTF:
info->codePage = info->ansiCodePage = CP_UTF8;
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
@@ -2574,6 +2583,8 @@ static void SpecialChar (RTF_Info *info)
case rtfNoWidthNonJoiner:
RTFPutUnicodeChar (info, 0x200C);
break;
+ default:
+ WARN("unknown token \"%s\"\n", info->rtfTextBuf);
}
}
--
2.14.1
More information about the wine-patches
mailing list