summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@pkgsrc.org>2005-03-28 14:48:23 +0000
committerben <ben@pkgsrc.org>2005-03-28 14:48:23 +0000
commit16ed9a9dd64722b10fa9f4a2f42babe49d91bbf7 (patch)
tree010b61f94926e92d5fad828816cad093955993c1
parent9692f8ffcfab9f8ad69dfb0352597cfc673e550f (diff)
downloadpkgsrc-16ed9a9dd64722b10fa9f4a2f42babe49d91bbf7.tar.gz
Make rtf-tools skip leading whitespace in stylesheet name when checking
for a Normal or Standard stylesheet.
-rw-r--r--textproc/rtf-tools/distinfo4
-rw-r--r--textproc/rtf-tools/patches/patch-ae29
2 files changed, 27 insertions, 6 deletions
diff --git a/textproc/rtf-tools/distinfo b/textproc/rtf-tools/distinfo
index 4185062ad2c..0300ba2a8a2 100644
--- a/textproc/rtf-tools/distinfo
+++ b/textproc/rtf-tools/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2005/03/27 18:22:35 ben Exp $
+$NetBSD: distinfo,v 1.5 2005/03/28 14:48:23 ben Exp $
SHA1 (RTF-1.10.tar.Z) = 1fcf63e52bd2d57b2841e32667ab76bb6c2998c6
RMD160 (RTF-1.10.tar.Z) = 0fdacb6df5779a343d419e1e3bf007f8d8cabbda
@@ -7,7 +7,7 @@ SHA1 (patch-aa) = 9a2863b144a8364284a92af720c365034ec4d055
SHA1 (patch-ab) = c45bc8d80a5c3a5cdf8f54c1c2a91caa81ce0f97
SHA1 (patch-ac) = ab10d20e7457c978a51288391064d7baef403304
SHA1 (patch-ad) = 5bffb2788eeba22bc8b46fd55dda25d87d22d9d6
-SHA1 (patch-ae) = 352780f4a53d2746ed0a00427d701339e9947d1c
+SHA1 (patch-ae) = 6bb6163020f7961484b14b57fd416538ecfdfcd0
SHA1 (patch-af) = 428112205e1cf6466c6f97de6102ecd52ae39781
SHA1 (patch-ag) = 2c5fd9db3c011bb0648b738d09e1342fb6c76003
SHA1 (patch-ah) = 6a7f28d28bd6b8058c77ae57c5a5d88e1152258e
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,