iio.c File Reference

#include "f2c.h"
#include "fio.h"
#include "fmt.h"

Include dependency graph for iio.c:

Go to the source code of this file.

Functions

int z_getc (Void)
void z_putc (int c)
int z_rnew (Void)
static int z_endp (Void)
int c_si (icilist *a)
int iw_rev (Void)
integer s_rsfi (icilist *a)
int z_wnew (Void)
integer s_wsfi (icilist *a)
integer e_rsfi (Void)
integer e_wsfi (Void)

Variables

char * f__icptr
char * f__icend
icilistf__svic
int f__icnum


Function Documentation

int c_si ( icilist a  ) 

Definition at line 54 of file iio.c.

References a, err, f__cblank, f__cf, f__cplus, f__cursor, f__curunit, f__elist, f__external, f__fmtbuf, f__formatted, f__hiwater, f__recpos, f__scale, f__sequential, f__svic, fmt_bg(), and pars_f().

Referenced by s_rsfi(), and s_wsfi().

00056 {
00057         f__elist = (cilist *)a;
00058         f__fmtbuf=a->icifmt;
00059         f__curunit = 0;
00060         f__sequential=f__formatted=1;
00061         f__external=0;
00062         if(pars_f(f__fmtbuf)<0)
00063                 err(a->icierr,100,"startint");
00064         fmt_bg();
00065         f__cblank=f__cplus=f__scale=0;
00066         f__svic=a;
00067         f__icnum=f__recpos=0;
00068         f__cursor = 0;
00069         f__hiwater = 0;
00070         f__icptr = a->iciunit;
00071         f__icend = f__icptr + a->icirlen*a->icirnum;
00072         f__cf = 0;
00073         return(0);
00074 }

Here is the call graph for this function:

Here is the caller graph for this function:

integer e_rsfi ( Void   ) 

Definition at line 133 of file iio.c.

References en_fio(), f__fmtbuf, n, and NULL.

00134 {       int n = en_fio();
00135         f__fmtbuf = NULL;
00136         return(n);
00137 }

Here is the call graph for this function:

integer e_wsfi ( Void   ) 

Definition at line 138 of file iio.c.

References en_fio(), err, f__fmtbuf, f__hiwater, f__recpos, f__svic, icilist::icierr, icilist::icirlen, icilist::icirnum, n, and NULL.

00139 {
00140         int n;
00141         n = en_fio();
00142         f__fmtbuf = NULL;
00143         if(f__svic->icirnum != 1
00144          && (f__icnum >  f__svic->icirnum
00145          || (f__icnum == f__svic->icirnum && (f__recpos | f__hiwater))))
00146                 err(f__svic->icierr,110,"inwrite");
00147         if (f__recpos < f__hiwater)
00148                 f__recpos = f__hiwater;
00149         if (f__recpos >= f__svic->icirlen)
00150                 err(f__svic->icierr,110,"recend");
00151         if (!f__recpos && f__icnum)
00152                 return n;
00153         while(f__recpos++ < f__svic->icirlen)
00154                 *f__icptr++ = ' ';
00155         return n;
00156 }

Here is the call graph for this function:

int iw_rev ( Void   ) 

Definition at line 77 of file iio.c.

References f__cursor, f__hiwater, f__recpos, f__workdone, and z_endp().

Referenced by s_wsfi().

00078 {
00079         if(f__workdone)
00080                 z_endp();
00081         f__hiwater = f__recpos = f__cursor = 0;
00082         return(f__workdone=0);
00083         }

Here is the call graph for this function:

Here is the caller graph for this function:

integer s_rsfi ( icilist a  ) 

Definition at line 88 of file iio.c.

References a, c_si(), f__doed, f__doend, f__doned, f__donewrec, f__dorevert, f__getn, f__reading, n, rd_ed(), rd_ned(), z_endp(), z_getc(), and z_rnew().

00090 {       int n;
00091         if(n=c_si(a)) return(n);
00092         f__reading=1;
00093         f__doed=rd_ed;
00094         f__doned=rd_ned;
00095         f__getn=z_getc;
00096         f__dorevert = z_endp;
00097         f__donewrec = z_rnew;
00098         f__doend = z_endp;
00099         return(0);
00100 }

Here is the call graph for this function:

integer s_wsfi ( icilist a  ) 

Definition at line 120 of file iio.c.

References a, c_si(), f__doed, f__doend, f__doned, f__donewrec, f__dorevert, f__putn, f__reading, iw_rev(), n, w_ed(), w_ned(), z_endp(), z_putc(), and z_wnew().

00122 {       int n;
00123         if(n=c_si(a)) return(n);
00124         f__reading=0;
00125         f__doed=w_ed;
00126         f__doned=w_ned;
00127         f__putn=z_putc;
00128         f__dorevert = iw_rev;
00129         f__donewrec = z_wnew;
00130         f__doend = z_endp;
00131         return(0);
00132 }

Here is the call graph for this function:

static int z_endp ( Void   )  [static]

Definition at line 44 of file iio.c.

Referenced by iw_rev(), s_rsfi(), and s_wsfi().

00045 {
00046         (*f__donewrec)();
00047         return 0;
00048         }

Here is the caller graph for this function:

int z_getc ( Void   ) 

Definition at line 13 of file iio.c.

References err, f__recpos, f__svic, icilist::iciend, and icilist::icirlen.

Referenced by s_rsfi().

00014 {
00015         if(f__recpos++ < f__svic->icirlen) {
00016                 if(f__icptr >= f__icend) err(f__svic->iciend,(EOF),"endfile");
00017                 return(*(unsigned char *)f__icptr++);
00018                 }
00019         return '\n';
00020 }

Here is the caller graph for this function:

void z_putc ( int  c  ) 

Definition at line 26 of file iio.c.

References f__recpos, f__svic, and icilist::icirlen.

Referenced by c_liw(), s_wsfi(), and z_wSL().

00028 {
00029         if (f__icptr < f__icend && f__recpos++ < f__svic->icirlen)
00030                 *f__icptr++ = c;
00031 }

Here is the caller graph for this function:

int z_rnew ( Void   ) 

Definition at line 34 of file iio.c.

References f__cursor, f__hiwater, f__recpos, f__svic, icilist::icirlen, and icilist::iciunit.

00035 {
00036         f__icptr = f__svic->iciunit + (++f__icnum)*f__svic->icirlen;
00037         f__recpos = 0;
00038         f__cursor = 0;
00039         f__hiwater = 0;
00040         return 1;
00041 }

int z_wnew ( Void   ) 

Definition at line 103 of file iio.c.

References f__cursor, f__hiwater, f__recpos, f__svic, and icilist::icirlen.

Referenced by s_wsfi().

00104 {
00105         if (f__recpos < f__hiwater) {
00106                 f__icptr += f__hiwater - f__recpos;
00107                 f__recpos = f__hiwater;
00108                 }
00109         while(f__recpos++ < f__svic->icirlen)
00110                 *f__icptr++ = ' ';
00111         f__recpos = 0;
00112         f__cursor = 0;
00113         f__hiwater = 0;
00114         f__icnum++;
00115         return 1;
00116 }

Here is the caller graph for this function:


Variable Documentation

char* f__icend

Definition at line 8 of file iio.c.

int f__icnum

Definition at line 10 of file iio.c.

char* f__icptr

Definition at line 47 of file err.c.

icilist* f__svic

Definition at line 24 of file err.c.


Generated on Sun Mar 4 15:04:47 2007 for Scilab [trunk] by  doxygen 1.5.1