summaryrefslogtreecommitdiff
path: root/libf2c/libI77/dfe.c
diff options
context:
space:
mode:
authorfx <fx@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-19 10:52:03 +0000
committerfx <fx@138bc75d-0d04-0410-961f-82ee72b054a4>1998-05-19 10:52:03 +0000
commit3ad649e5f9e3e4dd6f1c965916b1427a7d56fdd5 (patch)
treec4e8e02849cc5a16fa5bc00db65b9b2aa8561eaf /libf2c/libI77/dfe.c
parent6e0804a53327a47eadbc1edac8c64e3aa7b1f579 (diff)
downloadgcc-3ad649e5f9e3e4dd6f1c965916b1427a7d56fdd5.tar.gz
Update to Netlib version of 1998-04-20
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@19877 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libf2c/libI77/dfe.c')
-rw-r--r--libf2c/libI77/dfe.c48
1 files changed, 16 insertions, 32 deletions
diff --git a/libf2c/libI77/dfe.c b/libf2c/libI77/dfe.c
index e229e0e3356..3a936592381 100644
--- a/libf2c/libI77/dfe.c
+++ b/libf2c/libI77/dfe.c
@@ -31,41 +31,30 @@ y_getc(Void)
}
err(f__elist->cierr,errno,"readingd");
}
-#ifdef KR_headers
-y_putc(c)
-#else
-y_putc(int c)
-#endif
-{
- f__recpos++;
- if(f__recpos <= f__curunit->url || f__curunit->url==1)
- putc(c,f__cf);
- else
- err(f__elist->cierr,110,"dout");
- return(0);
-}
+
+ static int
y_rev(Void)
-{ /*what about work done?*/
- if(f__curunit->url==1 || f__recpos==f__curunit->url)
- return(0);
- while(f__recpos<f__curunit->url)
- (*f__putn)(' ');
- f__recpos=0;
+{
+ if (f__recpos < f__hiwater)
+ f__recpos = f__hiwater;
+ if (f__curunit->url > 1)
+ while(f__recpos < f__curunit->url)
+ (*f__putn)(' ');
+ if (f__recpos)
+ f__putbuf(0);
+ f__recpos = 0;
return(0);
}
+
+ static int
y_err(Void)
{
err(f__elist->cierr, 110, "dfe");
}
+ static int
y_newrec(Void)
{
- if(f__curunit->url == 1 || f__recpos == f__curunit->url) {
- f__hiwater = f__recpos = f__cursor = 0;
- return(1);
- }
- if(f__hiwater > f__recpos)
- f__recpos = f__hiwater;
y_rev();
f__hiwater = f__cursor = 0;
return(1);
@@ -132,7 +121,7 @@ integer s_wdfe(cilist *a)
if(n=c_dfe(a)) return(n);
if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
err(a->cierr,errno,"startwrt");
- f__putn = y_putc;
+ f__putn = x_putc;
f__doed = w_ed;
f__doned= w_ned;
f__dorevert = y_err;
@@ -146,11 +135,6 @@ integer s_wdfe(cilist *a)
integer e_rdfe(Void)
{
f__init = 1;
- (void) en_fio();
+ en_fio();
return(0);
}
-integer e_wdfe(Void)
-{
- f__init = 1;
- return en_fio();
-}