diff options
author | joerg <joerg@pkgsrc.org> | 2006-01-08 20:52:57 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2006-01-08 20:52:57 +0000 |
commit | 5352abb94d8d381c8e9cd97f2ee67bc8b550b9f1 (patch) | |
tree | 800c793200b5baab822a39472135c3db8a678956 /textproc/rtf-tools | |
parent | 6d94204f58b0f2a50ef3e5c94ef6dc7e546cc0d3 (diff) | |
download | pkgsrc-5352abb94d8d381c8e9cd97f2ee67bc8b550b9f1.tar.gz |
Move initialisation of FILE structures to run time, stdin and stdout
are not valid rvalues on global scope.
Diffstat (limited to 'textproc/rtf-tools')
-rw-r--r-- | textproc/rtf-tools/distinfo | 5 | ||||
-rw-r--r-- | textproc/rtf-tools/patches/patch-ae | 41 | ||||
-rw-r--r-- | textproc/rtf-tools/patches/patch-aj | 23 |
3 files changed, 56 insertions, 13 deletions
diff --git a/textproc/rtf-tools/distinfo b/textproc/rtf-tools/distinfo index 0300ba2a8a2..9e95bbefcdd 100644 --- a/textproc/rtf-tools/distinfo +++ b/textproc/rtf-tools/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.5 2005/03/28 14:48:23 ben Exp $ +$NetBSD: distinfo,v 1.6 2006/01/08 20:52:57 joerg Exp $ SHA1 (RTF-1.10.tar.Z) = 1fcf63e52bd2d57b2841e32667ab76bb6c2998c6 RMD160 (RTF-1.10.tar.Z) = 0fdacb6df5779a343d419e1e3bf007f8d8cabbda @@ -7,8 +7,9 @@ SHA1 (patch-aa) = 9a2863b144a8364284a92af720c365034ec4d055 SHA1 (patch-ab) = c45bc8d80a5c3a5cdf8f54c1c2a91caa81ce0f97 SHA1 (patch-ac) = ab10d20e7457c978a51288391064d7baef403304 SHA1 (patch-ad) = 5bffb2788eeba22bc8b46fd55dda25d87d22d9d6 -SHA1 (patch-ae) = 6bb6163020f7961484b14b57fd416538ecfdfcd0 +SHA1 (patch-ae) = 55a14a2b6911d3a4a1251f8d13c39bc1bf54559b SHA1 (patch-af) = 428112205e1cf6466c6f97de6102ecd52ae39781 SHA1 (patch-ag) = 2c5fd9db3c011bb0648b738d09e1342fb6c76003 SHA1 (patch-ah) = 6a7f28d28bd6b8058c77ae57c5a5d88e1152258e SHA1 (patch-ai) = f46a29dbdfd074ee8263b74d40f38c10646037fb +SHA1 (patch-aj) = 30ee5d5f3b8c283bca4d7959d3d3be3a241de653 diff --git a/textproc/rtf-tools/patches/patch-ae b/textproc/rtf-tools/patches/patch-ae index 0b63763c5d7..c5320d90a3d 100644 --- a/textproc/rtf-tools/patches/patch-ae +++ b/textproc/rtf-tools/patches/patch-ae @@ -1,20 +1,39 @@ -$NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ +$NetBSD: patch-ae,v 1.5 2006/01/08 20:52:57 joerg Exp $ ---- lib/reader.c.orig 1994-04-05 12:14:55.000000000 -0700 +--- lib/reader.c.orig 1994-04-05 19:14:55.000000000 +0000 +++ lib/reader.c -@@ -587,38 +587,45 @@ RTFFont *fp; +@@ -137,7 +137,7 @@ static RTFColor *colorList = (RTFColor * + static RTFStyle *styleList = (RTFStyle *) NULL; + + +-static FILE *rtffp = stdin; ++static FILE *rtffp; + + static char *inputName = (char *) NULL; + static char *outputName = (char *) NULL; +@@ -207,6 +207,9 @@ RTFFont *fp; + RTFStyle *sp; + RTFStyleElt *eltList, *ep; + ++ if (rtffp == NULL) ++ rtffp = stdin; ++ + if (rtfTextBuf == (char *) NULL) /* initialize the text buffers */ + { + rtfTextBuf = RTFAlloc (rtfBufSiz); +@@ -587,38 +590,45 @@ RTFFont *fp; if (autoCharSetFlags == 0) return; - if ((autoCharSetFlags & rtfReadCharSet) - && RTFCheckCM (rtfControl, rtfCharSet)) -+ if (autoCharSetFlags & rtfReadCharSet) - { +- { - ReadCharSetMaps (); - } - else if ((autoCharSetFlags & rtfSwitchCharSet) - && RTFCheckCMM (rtfControl, rtfCharAttr, rtfFontNum)) -- { ++ if (autoCharSetFlags & rtfReadCharSet) + { - if ((fp = RTFGetFont (rtfParam)) != (RTFFont *) NULL) + if (RTFCheckCM (rtfControl, rtfCharSet)) { @@ -75,7 +94,7 @@ $NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ } } } -@@ -1194,6 +1201,7 @@ RTFFont *fp; +@@ -1194,6 +1204,7 @@ RTFFont *fp; char buf[rtfBufSiz], *bp; int old = -1; char *fn = "ReadFontTbl"; @@ -83,7 +102,7 @@ $NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ for (;;) { -@@ -1311,11 +1319,30 @@ char *fn = "ReadFontTbl"; +@@ -1311,11 +1322,30 @@ char *fn = "ReadFontTbl"; RTFPanic ("%s: missing \"}\"", fn); } } @@ -116,7 +135,7 @@ $NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ RTFRouteToken (); /* feed "}" back to router */ } -@@ -1375,6 +1402,7 @@ ReadStyleSheet () +@@ -1375,6 +1405,7 @@ ReadStyleSheet () RTFStyle *sp; RTFStyleElt *sep, *sepLast; char buf[rtfBufSiz], *bp; @@ -124,7 +143,7 @@ $NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ char *fn = "ReadStyleSheet"; for (;;) -@@ -1507,8 +1535,10 @@ char *fn = "ReadStyleSheet"; +@@ -1507,8 +1538,10 @@ char *fn = "ReadStyleSheet"; RTFPanic ("%s: missing style name", fn); if (sp->rtfSNum < 0) { @@ -137,7 +156,7 @@ $NetBSD: patch-ae,v 1.4 2005/03/28 14:48:23 ben Exp $ RTFPanic ("%s: missing style number", fn); sp->rtfSNum = rtfNormalStyleNum; } -@@ -2260,6 +2290,7 @@ static RTFKey rtfKey[] = +@@ -2260,6 +2293,7 @@ static RTFKey rtfKey[] = rtfCharSet, rtfMacCharSet, "mac", 0, rtfCharSet, rtfAnsiCharSet, "ansi", 0, diff --git a/textproc/rtf-tools/patches/patch-aj b/textproc/rtf-tools/patches/patch-aj new file mode 100644 index 00000000000..d6b951532be --- /dev/null +++ b/textproc/rtf-tools/patches/patch-aj @@ -0,0 +1,23 @@ +$NetBSD: patch-aj,v 1.1 2006/01/08 20:52:57 joerg Exp $ + +--- rtf2text/text-writer.c.orig 2006-01-08 20:50:34.000000000 +0000 ++++ rtf2text/text-writer.c +@@ -53,7 +53,7 @@ static void PutLitStr (); + + static char *outMap[rtfSC_MaxChar]; + +-static FILE *ostream = stdout; ++static FILE *ostream; + + + /* +@@ -63,6 +63,9 @@ static FILE *ostream = stdout; + void + WriterInit () + { ++ if (ostream == NULL) ++ ostream = stdout; ++ + if (RTFReadOutputMap (outputMapName, outMap, 1) == 0) + RTFPanic ("Cannot read output map %s", outputMapName); + } |