diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2002-06-01 12:38:32 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2002-06-01 12:38:32 +0000 |
commit | 407c72cb298e71da241639399ee64e65308d21a1 (patch) | |
tree | c6c7b1fe59f3ddb8b8ccf102855193850daecdfc /libf2c/libI77/rsli.c | |
parent | 113dc14387308310e28710562f69f1bd624a7aaf (diff) | |
download | gcc-407c72cb298e71da241639399ee64e65308d21a1.zip gcc-407c72cb298e71da241639399ee64e65308d21a1.tar.gz gcc-407c72cb298e71da241639399ee64e65308d21a1.tar.bz2 |
*: Fix formatting.
* libF77/*: Fix formatting.
* libI77/*: Likewise.
* libU77/*: Likewise.
From-SVN: r54145
Diffstat (limited to 'libf2c/libI77/rsli.c')
-rw-r--r-- | libf2c/libI77/rsli.c | 141 |
1 files changed, 75 insertions, 66 deletions
diff --git a/libf2c/libI77/rsli.c b/libf2c/libI77/rsli.c index 6648185..a5cd8c5 100644 --- a/libf2c/libI77/rsli.c +++ b/libf2c/libI77/rsli.c @@ -1,7 +1,7 @@ #include "f2c.h" #include "fio.h" #include "lio.h" -#include "fmt.h" /* for f__doend */ +#include "fmt.h" /* for f__doend */ extern flag f__lquit; extern int f__lcount; @@ -10,80 +10,89 @@ extern char *f__icend; extern icilist *f__svic; extern int f__icnum, f__recpos; -static int i_getc(void) +static int +i_getc (void) { - if(f__recpos >= f__svic->icirlen) { - if (f__recpos++ == f__svic->icirlen) - return '\n'; - z_rnew(); - } - f__recpos++; - if(f__icptr >= f__icend) - return EOF; - return(*f__icptr++); - } + if (f__recpos >= f__svic->icirlen) + { + if (f__recpos++ == f__svic->icirlen) + return '\n'; + z_rnew (); + } + f__recpos++; + if (f__icptr >= f__icend) + return EOF; + return (*f__icptr++); +} - static -int i_ungetc(int ch, FILE *f) +static int +i_ungetc (int ch, FILE * f) { - if (--f__recpos == f__svic->icirlen) - return '\n'; - if (f__recpos < -1) - err(f__svic->icierr,110,"recend"); - /* *--icptr == ch, and icptr may point to read-only memory */ - return *--f__icptr /* = ch */; - } + if (--f__recpos == f__svic->icirlen) + return '\n'; + if (f__recpos < -1) + err (f__svic->icierr, 110, "recend"); + /* *--icptr == ch, and icptr may point to read-only memory */ + return *--f__icptr /* = ch */ ; +} - static void -c_lir(icilist *a) +static void +c_lir (icilist * a) { - extern int l_eof; - if(f__init != 1) f_init(); - f__init = 3; - f__reading = 1; - f__external = 0; - f__formatted = 1; - f__svic = a; - L_len = a->icirlen; - f__recpos = -1; - f__icnum = f__recpos = 0; - f__cursor = 0; - l_getc = i_getc; - l_ungetc = i_ungetc; - l_eof = 0; - f__icptr = a->iciunit; - f__icend = f__icptr + a->icirlen*a->icirnum; - f__cf = 0; - f__curunit = 0; - f__elist = (cilist *)a; - } + extern int l_eof; + if (f__init != 1) + f_init (); + f__init = 3; + f__reading = 1; + f__external = 0; + f__formatted = 1; + f__svic = a; + L_len = a->icirlen; + f__recpos = -1; + f__icnum = f__recpos = 0; + f__cursor = 0; + l_getc = i_getc; + l_ungetc = i_ungetc; + l_eof = 0; + f__icptr = a->iciunit; + f__icend = f__icptr + a->icirlen * a->icirnum; + f__cf = 0; + f__curunit = 0; + f__elist = (cilist *) a; +} -integer s_rsli(icilist *a) +integer +s_rsli (icilist * a) { - f__lioproc = l_read; - f__lquit = 0; - f__lcount = 0; - c_lir(a); - f__doend = 0; - return(0); - } + f__lioproc = l_read; + f__lquit = 0; + f__lcount = 0; + c_lir (a); + f__doend = 0; + return (0); +} -integer e_rsli(void) -{ f__init = 1; return 0; } +integer +e_rsli (void) +{ + f__init = 1; + return 0; +} -extern int x_rsne(cilist*); +extern int x_rsne (cilist *); -integer s_rsni(icilist *a) +integer +s_rsni (icilist * a) { - extern int nml_read; - integer rv; - cilist ca; - ca.ciend = a->iciend; - ca.cierr = a->icierr; - ca.cifmt = a->icifmt; - c_lir(a); - rv = x_rsne(&ca); - nml_read = 0; - return rv; - } + extern int nml_read; + integer rv; + cilist ca; + ca.ciend = a->iciend; + ca.cierr = a->icierr; + ca.cifmt = a->icifmt; + c_lir (a); + rv = x_rsne (&ca); + nml_read = 0; + return rv; +} |