summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
22557c7)
SCCS-vsn: usr.bin/f77/libI77/dfe.c 1.3
-char id_dfe[] = "@(#)dfe.c 1.2";
+char id_dfe[] = "@(#)dfe.c 1.3";
*
* direct formatted external i/o
*/
*
* direct formatted external i/o
*/
extern int rd_ed(),rd_ned(),w_ed(),w_ned();
int y_getc(),y_putc(),y_rnew(),y_wnew(),y_tab();
extern int rd_ed(),rd_ned(),w_ed(),w_ned();
int y_getc(),y_putc(),y_rnew(),y_wnew(),y_tab();
-char *dfe = "dfe";
-char *rdfe = "read dfe";
-char *wdfe = "write dfe";
+char rdfe[] = "read dfe";
+char wdfe[] = "write dfe";
s_rdfe(a) cilist *a;
{
int n;
reading = YES;
if(n=c_dfe(a,READ)) return(n);
s_rdfe(a) cilist *a;
{
int n;
reading = YES;
if(n=c_dfe(a,READ)) return(n);
- if(curunit->uwrt) nowreading(curunit);
+ if(curunit->uwrt && ! nowreading(curunit)) err(errflag, errno, rdfe)
getn = y_getc;
doed = rd_ed;
doned = rd_ned;
getn = y_getc;
doed = rd_ed;
doned = rd_ned;
reading = NO;
if(n=c_dfe(a,WRITE)) return(n);
curunit->uend = NO;
reading = NO;
if(n=c_dfe(a,WRITE)) return(n);
curunit->uend = NO;
- if(!curunit->uwrt) nowwriting(curunit);
+ if(!curunit->uwrt && ! nowwriting(curunit)) err(errflag, errno, wdfe)
putn = y_putc;
doed = w_ed;
doned = w_ned;
putn = y_putc;
doed = w_ed;
doned = w_ned;
errflag = a->cierr;
endflag = a->ciend;
lunit = a->ciunit;
errflag = a->cierr;
endflag = a->ciend;
lunit = a->ciunit;
- if(not_legal(lunit)) err(errflag,F_ERUNIT,dfe);
+ if(not_legal(lunit)) err(errflag,F_ERUNIT,rdfe+5);
curunit = &units[lunit];
if(!curunit->ufd && (n=fk_open(flag,DIR,FMT,(ftnint)lunit)))
curunit = &units[lunit];
if(!curunit->ufd && (n=fk_open(flag,DIR,FMT,(ftnint)lunit)))
cf = curunit->ufd;
elist = YES;
lfname = curunit->ufnm;
cf = curunit->ufd;
elist = YES;
lfname = curunit->ufnm;
- if(!curunit->ufmt) err(errflag,F_ERNOFIO,dfe)
- if(!curunit->useek || !curunit->url) err(errflag,F_ERNODIO,dfe)
+ if(!curunit->ufmt) err(errflag,F_ERNOFIO,rdfe+5)
+ if(!curunit->useek || !curunit->url) err(errflag,F_ERNODIO,rdfe+5)
recnum = a->cirec - 1;
fseek(cf, (long)curunit->url * recnum, 0);
cblank = curunit->ublnk;
recnum = a->cirec - 1;
fseek(cf, (long)curunit->url * recnum, 0);
cblank = curunit->ublnk;
return(cursor=0);
}
recpos += cursor;
return(cursor=0);
}
recpos += cursor;
- if(recpos >= curunit->url) err(errflag,F_EREREC,dfe)
+ if(recpos >= curunit->url) err(errflag,F_EREREC,rdfe+5)
}
fseek(cf,(long)cursor,1);
return(cursor=0);
}
fseek(cf,(long)cursor,1);
return(cursor=0);
-/* err(errflag, F_EREREC, dfe);
+/* err(errflag, F_EREREC, rdfe+5);