Exemplo n.º 1
0
int s_rdfe64_mp(cilist64 *a, unit **fu) {

#else
int
s_rdfe_mp (cilist *a, unit **fu) {

#endif
   int             n;
   unit            *ftnunit;

   if (!f77init)
      f_init ();
   if (n = c_dfe (a, fu)) {
      if (*fu) (*fu)->lock_unit = 0;
      return (n);
   }
   ftnunit = *fu;
   if (ftnunit->uwrt & WR_OP)
      (void) f77nowreading (ftnunit);
#ifdef I90
   if (ftnunit->uaction == WRITEONLY )
	errret(ftnunit->f77errlist.cierr,180,"startread");
#endif
   ftnunit->f77getn = y_getc;
   ftnunit->f77gets = y_gets;
   ftnunit->f77ungetn = y_ungetc;
   ftnunit->f77doed = rd_ed;
   ftnunit->f77doned = rd_ned;
   ftnunit->f77donewrec = yrd_SL;
   ftnunit->f77dorevert = ftnunit->f77doend = y_rsk;
   if (pars_f (ftnunit, ftnunit->f77fmtbuf) < 0)
      errret(a->cierr, 100, "startio");
   fmt_bg (ftnunit);
   return (0);
}
Exemplo n.º 2
0
int s_wdfe64_mp (cilist64 *a, unit **fu) {

#else

int
s_wdfe_mp (cilist *a, unit **fu) {
#endif
   int             n;
   unit		*ftnunit;

   if (!f77init)
      f_init ();
   if (n = c_dfe (a, fu)) {
      if (*fu) (*fu)->lock_unit = 0;
      return (n);
   }
   ftnunit = *fu;
   if (ftnunit->uwrt != WR_READY && f77nowwriting (ftnunit))
      errret(a->cierr, 160, "startwrt");
   ftnunit->f77putn = y_putc;
   ftnunit->f77ungetn = y_ungetc;
   ftnunit->f77doed = w_ed;
   ftnunit->f77doned = w_ned;
   ftnunit->f77donewrec = y_wSL;
   ftnunit->f77dorevert = y_rev;
   ftnunit->f77doend = y_end;
   ftnunit->uirec = a->cirec;
   if (ftnunit->umaxrec && (a->cirec > ftnunit->umaxrec))
      errret(a->cierr, 159, "startwrt");
   if (pars_f (ftnunit, ftnunit->f77fmtbuf) < 0)
      errret(a->cierr, 100, "startwrt");
   fmt_bg (ftnunit);
   return (0);
}
Exemplo n.º 3
0
integer s_rdfe(cilist *a)
#endif
{
    int n;
    if(!f__init) f_init();
    f__reading=1;
    if((n=c_dfe(a))) return(n);
    if(f__curunit->uwrt && f__nowreading(f__curunit))
        err(a->cierr,errno,"read start");
    f__getn = y_getc;
    f__doed = rd_ed;
    f__doned = rd_ned;
    f__dorevert = f__donewrec = y_err;
    f__doend = y_rsk;
    if(pars_f(f__fmtbuf)<0)
        err(a->cierr,100,"read start");
    fmt_bg();
    return(0);
}
Exemplo n.º 4
0
integer s_wdfe(cilist *a)
#endif
{
    int n;
    if(!f__init) f_init();
    f__reading=0;
    if((n=c_dfe(a))) return(n);
    if(f__curunit->uwrt != 1 && f__nowwriting(f__curunit))
        err(a->cierr,errno,"startwrt");
    f__putn = x_putc;
    f__doed = w_ed;
    f__doned= w_ned;
    f__dorevert = y_err;
    f__donewrec = y_newrec;
    f__doend = y_rev;
    if(pars_f(f__fmtbuf)<0)
        err(a->cierr,100,"startwrt");
    fmt_bg();
    return(0);
}