示例#1
0
int
x_rev (unit *ftnunit)
{
   int             n;
   int		   save_f90nadv = ftnunit->f90nadv;
   XINT            save_recpos = ftnunit->f77recpos;

   if (ftnunit->f90nadv) ftnunit->f90nadv = NOADVANCE_AT_REV;
   n = xrd_SL(ftnunit);
   if (save_f90nadv) {
      ftnunit->f90nadv = save_f90nadv;
      ftnunit->f77recpos = save_recpos;
   }
   return n;
}
示例#2
0
 int
x_rev(Void)
{
  (void) xrd_SL();
  return(0);
}
示例#3
0
 int
x_endp(Void)
{
  xrd_SL();
  return f__curunit->uend == 1 ? EOF : 0;
}
示例#4
0
文件: rsfe.c 项目: troore/scale
int
x_rev(void)
{
  (void) xrd_SL();
  return 0;
}
示例#5
0
文件: rsfe.c 项目: troore/scale
int
x_endp(void)
{
  xrd_SL();
  return ((f__curunit->uend == 1) ? EOF : 0);
}
示例#6
0
int s_rsfe_com (cilist *a, unit **fu)
#endif
{
   int             n;
   unit           *ftnunit;

   if (!f77init)
      f_init ();
   if (n = c_sfe (a, fu))
      return (n);
   ftnunit = *fu;

/* Fix BN 9768.
 * If user tries to read from stdout  then cause startio to abort with an
 * error. This is particularly importrant if a user is tries to read from
 * fortran unit 6 , which by default is connected to stdout. Even though
 * the standard says nothing about the way unit 5 and unit 6 should be
 * handled, I generally think that it is a good idea to distinguish 
 * between these and not allow users to read from stdout.
 * ---ravi---1/7/92
 */
   /* Fix 12308: Read error from stdout should occur for only files
    * connected to terminal. The change is taken from the 'fix'
    * section of the bug description - Bhaskar 08/14/92 */
   if (ftnunit->ufd == stdout && isatty (fileno (ftnunit->ufd)))
      errret(a->cierr, 173, "startio");
   ftnunit->f77errlist.cierr = a->cierr;
   ftnunit->f77errlist.ciend = a->ciend;
   ftnunit->f77errlist.cieor = a->cieor;
   ftnunit->f77errlist.cisize = a->cisize;
   ftnunit->f77errlist.iciunit = 0; 
   ftnunit->f77scale = 0;
   ftnunit->f77fmtbuf = a->cifmt;
   if (ftnunit->uacc == KEYED) {
      ftnunit->f77idxlist.cimatch = a->cimatch;
      ftnunit->f77idxlist.cikeytype = a->cikeytype;
      ftnunit->f77idxlist.cikeyval.cicharval = a->cikeyval.cicharval;
      ftnunit->f77idxlist.cikeyid = a->cikeyid;
      ftnunit->f77idxlist.cinml = a->cinml;
      ftnunit->f77idxlist.cikeyvallen = a->cikeyvallen;
   }
   else {
      if (ftnunit->uacc == DIRECT)
	 errret(a->cierr, 171, "sequential read");
      if (ftnunit->ualias->ucc == CC_FORTRAN &&
	  ftnunit->ualias->ucchar) {
	 putc (ftnunit->ualias->ucchar, ftnunit->ualias->ufd);
	 ftnunit->ualias->ucchar = '\0';
      } else if (ftnunit->ucc == CC_FORTRAN && ftnunit->ucchar) {
	 putc (ftnunit->ucchar, ftnunit->ufd);
	 ftnunit->ucchar = '\0';
      }
   }
#ifdef I90
   ftnunit->f90sw = 0;
   ftnunit->f90nadv = 0;
#endif
   if (pars_f (ftnunit, ftnunit->f77fmtbuf) < 0)
      errret(a->cierr, 100, "startio");
   ftnunit->f77getn = x_getc;
   ftnunit->f77gets = x_gets;
   ftnunit->f77ungetn = x_ungetc;
   ftnunit->f77doed = rd_ed;
   ftnunit->f77doned = rd_ned;
   fmt_bg (ftnunit);
   ftnunit->f77doend = x_endp;
   ftnunit->f77donewrec = xrd_SL;
   ftnunit->f77dorevert = x_rev;
   ftnunit->f77cblank = ftnunit->ublnk;
   ftnunit->f77cplus = 0;

   if (ftnunit->ufd == stdin && feof (ftnunit->ufd) && f77vms_flag_[VMS_IN])
      clearerr(ftnunit->ufd);
   (void) f77nowreading (ftnunit);
   check_buflen( ftnunit, ftnunit->url > FIO_ALLOC ? ftnunit->url : FIO_ALLOC );

#ifdef I90
   if (ftnunit->uaction == WRITEONLY ) 
       errret(ftnunit->f77errlist.cierr,180,"startread");
   ftnunit->f77recpos = 0;
   ftnunit->f77recend = 0;
#endif

   n = xrd_SL (ftnunit);
   if (n > 0) {
     errret(a->cierr, n, "s_rsfe");
   } else if (n < 0) {
     errret(a->ciend, n, "s_rsfe");
   } else 
     return(0);
}
示例#7
0
文件: rsfe.c 项目: luchik/pcc-libs
int
x_endp()
{
    xrd_SL();
    return(0);
}
示例#8
0
文件: rsfe.c 项目: luchik/pcc-libs
int
x_rev()
{
    xrd_SL();
    return(0);
}