pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/textproc/rtf-tools Make rtf-tools skip leading whitesp...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/21cd718d2445
branches:  trunk
changeset: 491709:21cd718d2445
user:      ben <ben%pkgsrc.org@localhost>
date:      Mon Mar 28 14:48:23 2005 +0000

description:
Make rtf-tools skip leading whitespace in stylesheet name when checking
for a Normal or Standard stylesheet.

diffstat:

 textproc/rtf-tools/distinfo         |   4 ++--
 textproc/rtf-tools/patches/patch-ae |  29 +++++++++++++++++++++++++----
 2 files changed, 27 insertions(+), 6 deletions(-)

diffs (75 lines):

diff -r 707c48aa970d -r 21cd718d2445 textproc/rtf-tools/distinfo
--- a/textproc/rtf-tools/distinfo       Mon Mar 28 14:46:55 2005 +0000
+++ b/textproc/rtf-tools/distinfo       Mon Mar 28 14:48:23 2005 +0000
@@ -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-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 -r 707c48aa970d -r 21cd718d2445 textproc/rtf-tools/patches/patch-ae
--- a/textproc/rtf-tools/patches/patch-ae       Mon Mar 28 14:46:55 2005 +0000
+++ b/textproc/rtf-tools/patches/patch-ae       Mon Mar 28 14:48:23 2005 +0000
@@ -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 @@
                }
        }
  }
-@@ -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 @@
  
        for (;;)
        {
-@@ -1311,11 +1331,30 @@ char   *fn = "ReadFontTbl";
+@@ -1311,11 +1319,30 @@ char   *fn = "ReadFontTbl";
                                RTFPanic ("%s: missing \"}\"", fn);
                }
        }
@@ -116,7 +116,28 @@
        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,



Home | Main Index | Thread Index | Old Index