Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libf2c/libI77/rsfe.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    55#include "fmt.h"
    66
    7 xrd_SL(Void)
    8 {       int ch;
    9         if(!f__curunit->uend)
    10                 while((ch=getc(f__cf))!='\n')
    11                         if (ch == EOF) {
    12                                 f__curunit->uend = 1;
    13                                 break;
    14                                 }
    15         f__cursor=f__recpos=0;
    16         return(1);
     7int
     8xrd_SL (void)
     9{
     10  int ch;
     11  if (!f__curunit->uend)
     12    while ((ch = getc (f__cf)) != '\n')
     13      if (ch == EOF)
     14        {
     15          f__curunit->uend = 1;
     16          break;
     17        }
     18  f__cursor = f__recpos = 0;
     19  return (1);
    1720}
    18 x_getc(Void)
    19 {       int ch;
    20         if(f__curunit->uend) return(EOF);
    21         ch = getc(f__cf);
    22         if(ch!=EOF && ch!='\n')
    23         {       f__recpos++;
    24                 return(ch);
    25         }
    26         if(ch=='\n')
    27         {       (void) ungetc(ch,f__cf);
    28                 return(ch);
    29         }
    30         if(f__curunit->uend || feof(f__cf))
    31         {       errno=0;
    32                 f__curunit->uend=1;
    33                 return(-1);
    34         }
    35         return(-1);
     21
     22int
     23x_getc (void)
     24{
     25  int ch;
     26  if (f__curunit->uend)
     27    return (EOF);
     28  ch = getc (f__cf);
     29  if (ch != EOF && ch != '\n')
     30    {
     31      f__recpos++;
     32      return (ch);
     33    }
     34  if (ch == '\n')
     35    {
     36      (void) ungetc (ch, f__cf);
     37      return (ch);
     38    }
     39  if (f__curunit->uend || feof (f__cf))
     40    {
     41      errno = 0;
     42      f__curunit->uend = 1;
     43      return (-1);
     44    }
     45  return (-1);
    3646}
    37 x_endp(Void)
     47
     48int
     49x_endp (void)
    3850{
    39         xrd_SL();
    40         return f__curunit->uend == 1 ? EOF : 0;
     51();
     52return f__curunit->uend == 1 ? EOF : 0;
    4153}
    42 x_rev(Void)
     54
     55int
     56x_rev (void)
    4357{
    44         (void) xrd_SL();
    45         return(0);
     58();
     59(0);
    4660}
    47 #ifdef KR_headers
    48 integer s_rsfe(a) cilist *a; /* start */
    49 #else
    50 integer s_rsfe(cilist *a) /* start */
    51 #endif
    52 {       int n;
    53         if(f__init != 1) f_init();
    54         f__init = 3;
    55         f__reading=1;
    56         f__sequential=1;
    57         f__formatted=1;
    58         f__external=1;
    59         if(n=c_sfe(a)) return(n);
    60         f__elist=a;
    61         f__cursor=f__recpos=0;
    62         f__scale=0;
    63         f__fmtbuf=a->cifmt;
    64         f__curunit= &f__units[a->ciunit];
    65         f__cf=f__curunit->ufd;
    66         if(pars_f(f__fmtbuf)<0) err(a->cierr,100,"startio");
    67         f__getn= x_getc;
    68         f__doed= rd_ed;
    69         f__doned= rd_ned;
    70         fmt_bg();
    71         f__doend=x_endp;
    72         f__donewrec=xrd_SL;
    73         f__dorevert=x_rev;
    74         f__cblank=f__curunit->ublnk;
    75         f__cplus=0;
    76         if(f__curunit->uwrt && f__nowreading(f__curunit))
    77                 err(a->cierr,errno,"read start");
    78         if(f__curunit->uend)
    79                 err(f__elist->ciend,(EOF),"read start");
    80         return(0);
     61
     62integer
     63s_rsfe (cilist * a)             /* start */
     64{
     65  int n;
     66  if (f__init != 1)
     67    f_init ();
     68  f__init = 3;
     69  f__reading = 1;
     70  f__sequential = 1;
     71  f__formatted = 1;
     72  f__external = 1;
     73  if ((n = c_sfe (a)))
     74    return (n);
     75  f__elist = a;
     76  f__cursor = f__recpos = 0;
     77  f__scale = 0;
     78  f__fmtbuf = a->cifmt;
     79  f__curunit = &f__units[a->ciunit];
     80  f__cf = f__curunit->ufd;
     81  if (pars_f (f__fmtbuf) < 0)
     82    err (a->cierr, 100, "startio");
     83  f__getn = x_getc;
     84  f__doed = rd_ed;
     85  f__doned = rd_ned;
     86  fmt_bg ();
     87  f__doend = x_endp;
     88  f__donewrec = xrd_SL;
     89  f__dorevert = x_rev;
     90  f__cblank = f__curunit->ublnk;
     91  f__cplus = 0;
     92  if (f__curunit->uwrt && f__nowreading (f__curunit))
     93    err (a->cierr, errno, "read start");
     94  if (f__curunit->uend)
     95    err (f__elist->ciend, (EOF), "read start");
     96  return (0);
    8197}
Note: See TracChangeset for help on using the changeset viewer.