1998-09-06 Dave Love <d.love@dl.ac.uk>
authorDave Love <d.love@dl.ac.uk>
Sun, 6 Sep 1998 06:15:14 +0000 (06:15 +0000)
committerDave Love <fx@gcc.gnu.org>
Sun, 6 Sep 1998 06:15:14 +0000 (06:15 +0000)
From Toon to fix spurious recursive i/o errors:
* libI77/sfe.c (e_wdfe): Set f__init.
* libI77/dfe.c (c_dfe): Check and set f__init.
(s_rdfe, s_wdfe): Don't check and set f__init.

From-SVN: r22294

libf2c/ChangeLog
libf2c/libI77/dfe.c
libf2c/libI77/sfe.c

index d31f9a654b781a96214bdf7f39437328fa71901e..f95142c02dc254282c7e1936e508267fb9365b62 100644 (file)
@@ -1,3 +1,11 @@
+1998-09-06  Dave Love  <d.love@dl.ac.uk>
+
+       From Toon to fix spurious recursive i/o errors:
+       * libI77/sfe.c (e_wdfe): Set f__init.
+
+       * libI77/dfe.c (c_dfe): Check and set f__init.
+       (s_rdfe, s_wdfe): Don't check and set f__init.
+
 Fri Sep  4 18:40:32 1998  Craig Burley  <burley@gnu.org>
 
        * libU77/sys_clock_.c (G77_system_clock_0): Fix indentation.
index f8c1fc14675134db0ec644ee36997e86702f6880..dfc23dce62bc96004a708c788d7b2b453dc81aa9 100644 (file)
@@ -66,6 +66,8 @@ c_dfe(a) cilist *a;
 c_dfe(cilist *a)
 #endif
 {
+       if(f__init != 1) f_init();
+       f__init = 3;
        f__sequential=0;
        f__formatted=f__external=1;
        f__elist=a;
@@ -92,8 +94,6 @@ integer s_rdfe(cilist *a)
 #endif
 {
        int n;
-       if(f__init != 1) f_init();
-       f__init = 3;
        f__reading=1;
        if(n=c_dfe(a))return(n);
        if(f__curunit->uwrt && f__nowreading(f__curunit))
@@ -115,8 +115,6 @@ integer s_wdfe(cilist *a)
 #endif
 {
        int n;
-       if(f__init != 1) f_init();
-       f__init = 3;
        f__reading=0;
        if(n=c_dfe(a)) return(n);
        if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
index c7d891804b394a8119d255237656c2da51abf50d..eb6260fec0872c7c9cdaaf918b1f96ff3632d04c 100644 (file)
@@ -35,5 +35,6 @@ integer e_wsfe(Void)
 
 integer e_wdfe(Void)
 {
+       f__init = 1;
        return en_fio();
 }