Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

iio.c File Reference

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

Go to the source code of this file.


Functions

 z_getc (Void)
 z_putc (int c)
 z_rnew (Void)
int z_endp (Void)
 c_si (icilist *a)
int iw_rev (Void)
integer s_rsfi (icilist *a)
 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
int f__hiwater

Function Documentation

c_si icilist   a
 

Definition at line 48 of file iio.c.

References err, f__hiwater, f__icend, f__icnum, f__icptr, fmt_bg(), icilist::icierr, icilist::icifmt, icilist::icirlen, icilist::icirnum, icilist::iciunit, and pars_f().

Referenced by s_rsfi(), and s_wsfi().

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

integer e_rsfi Void   
 

Definition at line 126 of file iio.c.

References en_fio().

Referenced by get_token__().

00127 {       int n;
00128         n = en_fio();
00129         f__fmtbuf = NULL;
00130         return(n);
00131 }

integer e_wsfi Void   
 

Definition at line 132 of file iio.c.

References en_fio(), f__icnum, f__icptr, icilist::icirlen, and icilist::icirnum.

Referenced by get_token__(), zzaxxx_(), zzaxyy_(), and zzlabl_().

00133 {
00134         int n;
00135         n = en_fio();
00136         f__fmtbuf = NULL;
00137         if(f__icnum >= f__svic->icirnum)
00138                 return(n);
00139         while(f__recpos++ < f__svic->icirlen)
00140                 *f__icptr++ = ' ';
00141         return(n);
00142 }

int iw_rev Void   
 

Definition at line 71 of file iio.c.

References f__hiwater, and z_endp().

Referenced by s_wsfi().

00072 {
00073         if(f__workdone)
00074                 z_endp();
00075         f__hiwater = f__recpos = f__cursor = 0;
00076         return(f__workdone=0);
00077         }

integer s_rsfi icilist   a
 

Definition at line 82 of file iio.c.

References c_si(), z_endp(), z_getc(), and z_rnew().

Referenced by get_token__().

00084 {       int n;
00085         if(n=c_si(a)) return(n);
00086         f__reading=1;
00087         f__doed=rd_ed;
00088         f__doned=rd_ned;
00089         f__getn=z_getc;
00090         f__dorevert = z_endp;
00091         f__donewrec = z_rnew;
00092         f__doend = z_endp;
00093         return(0);
00094 }

integer s_wsfi icilist   a
 

Definition at line 113 of file iio.c.

References c_si(), iw_rev(), z_endp(), z_putc(), and z_wnew().

Referenced by get_token__(), zzaxxx_(), zzaxyy_(), and zzlabl_().

00115 {       int n;
00116         if(n=c_si(a)) return(n);
00117         f__reading=0;
00118         f__doed=w_ed;
00119         f__doned=w_ned;
00120         f__putn=z_putc;
00121         f__dorevert = iw_rev;
00122         f__donewrec = z_wnew;
00123         f__doend = z_endp;
00124         return(0);
00125 }

int z_endp Void    [static]
 

Definition at line 39 of file iio.c.

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

00040 {
00041         (*f__donewrec)();
00042         return 0;
00043         }

z_getc Void   
 

Definition at line 9 of file iio.c.

References err, f__icend, f__icptr, icilist::iciend, and icilist::icirlen.

Referenced by s_rsfi().

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

z_putc int    c
 

Definition at line 20 of file iio.c.

References c, err, f__icend, f__icptr, icilist::icierr, and icilist::icirlen.

Referenced by s_wsfi(), and z_wSL().

00022 {
00023         if(f__icptr >= f__icend) err(f__svic->icierr,110,"inwrite");
00024         if(f__recpos++ < f__svic->icirlen)
00025                 *f__icptr++ = c;
00026         else    err(f__svic->icierr,110,"recend");
00027         return 0;
00028 }

z_rnew Void   
 

Definition at line 29 of file iio.c.

References f__hiwater, f__icnum, f__icptr, icilist::icirlen, and icilist::iciunit.

Referenced by s_rsfi().

00030 {
00031         f__icptr = f__svic->iciunit + (++f__icnum)*f__svic->icirlen;
00032         f__recpos = 0;
00033         f__cursor = 0;
00034         f__hiwater = 0;
00035         return 1;
00036 }

z_wnew Void   
 

Definition at line 96 of file iio.c.

References f__hiwater, f__icnum, f__icptr, and icilist::icirlen.

Referenced by s_wsfi().

00097 {
00098         if (f__recpos < f__hiwater) {
00099                 f__icptr += f__hiwater - f__recpos;
00100                 f__recpos = f__hiwater;
00101                 }
00102         while(f__recpos++ < f__svic->icirlen)
00103                 *f__icptr++ = ' ';
00104         f__recpos = 0;
00105         f__cursor = 0;
00106         f__hiwater = 0;
00107         f__icnum++;
00108         return 1;
00109 }

Variable Documentation

int f__hiwater
 

Definition at line 8 of file iio.c.

Referenced by c_si(), iw_rev(), z_rnew(), and z_wnew().

char* f__icend
 

Definition at line 5 of file iio.c.

Referenced by c_lir(), c_si(), i_getc(), z_getc(), and z_putc().

int f__icnum
 

Definition at line 7 of file iio.c.

Referenced by c_lir(), c_si(), e_wsfi(), z_rnew(), and z_wnew().

char* f__icptr
 

Definition at line 4 of file iio.c.

Referenced by c_si(), e_wsfi(), z_getc(), z_putc(), z_rnew(), and z_wnew().

icilist* f__svic
 

Definition at line 6 of file iio.c.

 

Powered by Plone

This site conforms to the following standards: