summaryrefslogtreecommitdiff
path: root/print/rtf2latex/files/patch-reader.c
blob: bf182c2f8ea7cef86052d8fb31bfebfdfa2439f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- reader.c.orig	Sun May 12 00:57:41 2002
+++ reader.c	Sun May 12 01:00:39 2002
@@ -118,7 +118,7 @@
 static RTFStyle	*styleList = (RTFStyle *) NULL;
 
 
-static FILE	*rtffp = stdin;
+static FILE	*rtffp = NULL;
 
 
 /*
@@ -135,6 +135,7 @@
 RTFStyle	*sp;
 RTFStyleElt	*eltList, *ep;
 
+	rtffp = stdin;
 	/* initialize lookup table */
 	LookupInit ();
 
@@ -584,6 +585,8 @@
 {
 int	c;
 
+	if (rtffp == NULL)
+	  rtffp = stdin;
 	if ((c = getc (rtffp)) != EOF)
 	{
 		if (c & 0x80)