diff options
author | ben <ben@pkgsrc.org> | 2005-03-28 14:48:23 +0000 |
---|---|---|
committer | ben <ben@pkgsrc.org> | 2005-03-28 14:48:23 +0000 |
commit | 16ed9a9dd64722b10fa9f4a2f42babe49d91bbf7 (patch) | |
tree | 010b61f94926e92d5fad828816cad093955993c1 /textproc/rtf-tools/patches | |
parent | 9692f8ffcfab9f8ad69dfb0352597cfc673e550f (diff) | |
download | pkgsrc-16ed9a9dd64722b10fa9f4a2f42babe49d91bbf7.tar.gz |
Make rtf-tools skip leading whitespace in stylesheet name when checking
for a Normal or Standard stylesheet.
Diffstat (limited to 'textproc/rtf-tools/patches')
-rw-r--r-- | textproc/rtf-tools/patches/patch-ae | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/textproc/rtf-tools/patches/patch-ae b/textproc/rtf-tools/patches/patch-ae index 3543714280a..0b63763c5d7 100644 --- a/textproc/rtf-tools/patches/patch-ae +++ b/textproc/rtf-tools/patches/patch-ae @@ -1,4 +1,4 @@ -$NetBSD: patch-ae,v 1.3 2005/03/27 18:22:35 ben Exp $ +$NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ --- lib/reader.c.orig 1994-04-05 12:14:55.000000000 -0700 +++ lib/reader.c @@ -75,7 +75,7 @@ $NetBSD: patch-ae,v 1.3 2005/03/27 18:22:35 ben Exp $ } } } -@@ -1194,6 +1213,7 @@ RTFFont *fp; +@@ -1194,6 +1201,7 @@ RTFFont *fp; char buf[rtfBufSiz], *bp; int old = -1; char *fn = "ReadFontTbl"; @@ -83,7 +83,7 @@ $NetBSD: patch-ae,v 1.3 2005/03/27 18:22:35 ben Exp $ for (;;) { -@@ -1311,11 +1331,30 @@ char *fn = "ReadFontTbl"; +@@ -1311,11 +1319,30 @@ char *fn = "ReadFontTbl"; RTFPanic ("%s: missing \"}\"", fn); } } @@ -116,7 +116,28 @@ $NetBSD: patch-ae,v 1.3 2005/03/27 18:22:35 ben Exp $ RTFRouteToken (); /* feed "}" back to router */ } -@@ -2260,6 +2299,7 @@ static RTFKey rtfKey[] = +@@ -1375,6 +1402,7 @@ ReadStyleSheet () + RTFStyle *sp; + RTFStyleElt *sep, *sepLast; + char buf[rtfBufSiz], *bp; ++char *bs; + char *fn = "ReadStyleSheet"; + + for (;;) +@@ -1507,8 +1535,10 @@ char *fn = "ReadStyleSheet"; + RTFPanic ("%s: missing style name", fn); + if (sp->rtfSNum < 0) + { +- if (strncmp (buf, "Normal", 6) != 0 +- && strncmp (buf, "Standard", 8) != 0) ++ /* skip leading spaces */ ++ for (bs = buf; *bs == ' '; bs++); ++ if (strncmp (bs, "Normal", 6) != 0 ++ && strncmp (bs, "Standard", 8) != 0) + RTFPanic ("%s: missing style number", fn); + sp->rtfSNum = rtfNormalStyleNum; + } +@@ -2260,6 +2290,7 @@ static RTFKey rtfKey[] = rtfCharSet, rtfMacCharSet, "mac", 0, rtfCharSet, rtfAnsiCharSet, "ansi", 0, |