summaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authoragc <agc>2001-05-31 11:04:56 +0000
committeragc <agc>2001-05-31 11:04:56 +0000
commite651dc35da21935b24b4614e7fac76401427ca0c (patch)
tree6958c5d8f64b71b9e79a94dc966a6414ec15bc64 /textproc
parentc1c40416ac536ec054a69d2021f9c07f3a156285 (diff)
downloadpkgsrc-e651dc35da21935b24b4614e7fac76401427ca0c.tar.gz
Apply patches from PR 12971 from Ben Collver (collver@linuxfreemail.com)
"1) rtf-tools has its own way of switching between symbols and normal characters when converting to groff. This patch fixes rtf-tools to honor the assumption that the \plain command resets to the normal font. This unscrambles the formatting of some RTF->groff documents. http://msdn.microsoft.com/library/specs/rtfspec_16.htm#rtfspec_fontcharformat only mentions resetting font format properties, not the font itself. It also says that the default properties are application-specific. 2) rtf-tools specifies the column separation for every column. Since it is meaningless for the last column of a table, the tbl command outputs messages to stderr. This patch removes column separation from the last column of the table to keep groff quiet."
Diffstat (limited to 'textproc')
-rw-r--r--textproc/rtf-tools/Makefile4
-rw-r--r--textproc/rtf-tools/distinfo5
-rw-r--r--textproc/rtf-tools/patches/patch-ae83
-rw-r--r--textproc/rtf-tools/patches/patch-af15
4 files changed, 98 insertions, 9 deletions
diff --git a/textproc/rtf-tools/Makefile b/textproc/rtf-tools/Makefile
index 89553c07828..14021e2b26e 100644
--- a/textproc/rtf-tools/Makefile
+++ b/textproc/rtf-tools/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2001/05/30 14:38:19 agc Exp $
+# $NetBSD: Makefile,v 1.3 2001/05/31 11:04:56 agc Exp $
#
DISTNAME= RTF-1.10
-PKGNAME= rtf-tools-1.10
+PKGNAME= rtf-tools-1.10nb1
CATEGORIES= textproc
MASTER_SITES= http://www.primate.wisc.edu/software/RTF/
EXTRACT_SUFX= .tar.Z
diff --git a/textproc/rtf-tools/distinfo b/textproc/rtf-tools/distinfo
index aad3cddbbde..77f3661a7bb 100644
--- a/textproc/rtf-tools/distinfo
+++ b/textproc/rtf-tools/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $
+$NetBSD: distinfo,v 1.2 2001/05/31 11:04:56 agc Exp $
SHA1 (RTF-1.10.tar.Z) = 1fcf63e52bd2d57b2841e32667ab76bb6c2998c6
Size (RTF-1.10.tar.Z) = 312224 bytes
@@ -6,4 +6,5 @@ SHA1 (patch-aa) = 9a2863b144a8364284a92af720c365034ec4d055
SHA1 (patch-ab) = c45bc8d80a5c3a5cdf8f54c1c2a91caa81ce0f97
SHA1 (patch-ac) = ab10d20e7457c978a51288391064d7baef403304
SHA1 (patch-ad) = 5bffb2788eeba22bc8b46fd55dda25d87d22d9d6
-SHA1 (patch-ae) = c920cbce5cc854b3c825f00b933ac1be04ec4af7
+SHA1 (patch-ae) = c87e8edbe96d50e1a9f54e5890d21fd4c6168723
+SHA1 (patch-af) = 428112205e1cf6466c6f97de6102ecd52ae39781
diff --git a/textproc/rtf-tools/patches/patch-ae b/textproc/rtf-tools/patches/patch-ae
index a4929b43c8e..ff72ab083a6 100644
--- a/textproc/rtf-tools/patches/patch-ae
+++ b/textproc/rtf-tools/patches/patch-ae
@@ -1,8 +1,81 @@
-$NetBSD: patch-ae,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $
+$NetBSD: patch-ae,v 1.2 2001/05/31 11:04:56 agc Exp $
---- lib/reader.c.orig Sun Apr 8 14:53:30 2001
-+++ lib/reader.c Sun Apr 8 14:54:58 2001
-@@ -1194,6 +1194,7 @@
+--- lib/reader.c.orig Tue Apr 5 12:14:55 1994
++++ lib/reader.c Wed May 16 22:10:17 2001
+@@ -587,38 +587,45 @@
+ if (autoCharSetFlags == 0)
+ return;
+
+- if ((autoCharSetFlags & rtfReadCharSet)
+- && RTFCheckCM (rtfControl, rtfCharSet))
++ if (autoCharSetFlags & rtfReadCharSet)
+ {
+- ReadCharSetMaps ();
+- }
+- else if ((autoCharSetFlags & rtfSwitchCharSet)
+- && RTFCheckCMM (rtfControl, rtfCharAttr, rtfFontNum))
+- {
+- if ((fp = RTFGetFont (rtfParam)) != (RTFFont *) NULL)
++ if (RTFCheckCM (rtfControl, rtfCharSet))
+ {
+- if (strncmp (fp->rtfFName, "Symbol", 6) == 0)
+- curCharSet = rtfCSSymbol;
+- else
+- curCharSet = rtfCSGeneral;
+- RTFSetCharSet (curCharSet);
++ ReadCharSetMaps ();
+ }
+- }
+- else if ((autoCharSetFlags & rtfSwitchCharSet) && rtfClass == rtfGroup)
+- {
+- switch (rtfMajor)
++ else if (RTFCheckCMM (rtfControl, rtfCharAttr, rtfFontNum))
+ {
+- case rtfBeginGroup:
+- if (csTop >= maxCSStack)
+- RTFPanic ("_RTFGetToken: stack overflow");
+- csStack[csTop++] = curCharSet;
+- break;
+- case rtfEndGroup:
+- if (csTop <= 0)
+- RTFPanic ("_RTFGetToken: stack underflow");
+- curCharSet = csStack[--csTop];
++ if ((fp = RTFGetFont (rtfParam)) != (RTFFont *) NULL)
++ {
++ if (strncmp (fp->rtfFName, "Symbol", 6) == 0)
++ curCharSet = rtfCSSymbol;
++ else
++ curCharSet = rtfCSGeneral;
++ RTFSetCharSet (curCharSet);
++ }
++ }
++ /* so \plain will revert to normal character set -Ben */
++ else if (RTFCheckCMM (rtfControl, rtfCharAttr, rtfPlain))
++ {
++ curCharSet = rtfCSGeneral;
+ RTFSetCharSet (curCharSet);
+- break;
++ }
++ else if (rtfClass == rtfGroup)
++ {
++ switch (rtfMajor)
++ {
++ case rtfBeginGroup:
++ if (csTop >= maxCSStack)
++ RTFPanic ("_RTFGetToken: stack overflow");
++ csStack[csTop++] = curCharSet;
++ break;
++ case rtfEndGroup:
++ if (csTop <= 0)
++ RTFPanic ("_RTFGetToken: stack underflow");
++ curCharSet = csStack[--csTop];
++ RTFSetCharSet (curCharSet);
++ break;
++ }
+ }
+ }
+ }
+@@ -1194,6 +1201,7 @@
char buf[rtfBufSiz], *bp;
int old = -1;
char *fn = "ReadFontTbl";
@@ -10,7 +83,7 @@ $NetBSD: patch-ae,v 1.1.1.1 2001/04/27 12:18:33 agc Exp $
for (;;)
{
-@@ -1311,11 +1312,30 @@
+@@ -1311,11 +1319,30 @@
RTFPanic ("%s: missing \"}\"", fn);
}
}
diff --git a/textproc/rtf-tools/patches/patch-af b/textproc/rtf-tools/patches/patch-af
new file mode 100644
index 00000000000..a011ff19cb3
--- /dev/null
+++ b/textproc/rtf-tools/patches/patch-af
@@ -0,0 +1,15 @@
+$NetBSD: patch-af,v 1.1 2001/05/31 11:06:01 agc Exp $
+
+--- rtf2troff/trf-table.c.orig Wed May 16 18:24:58 2001
++++ rtf2troff/trf-table.c Wed May 16 18:26:07 2001
+@@ -120,7 +120,9 @@
+ if (i > 0)
+ cwid -= its->cellPos[i-1];
+ cwid -= EnWidth ();
+- fprintf (f, "l1w(%gi) ", cwid);
++ fprintf (f, "l%sw(%gi) ",
++ (i + 1 == its->nCells) ? "" : "1",
++ cwid);
+ }
+ if ((p = VCellBorderStr (VCellBorderType (its->nCells)))
+ != (char *) NULL)