4 #include "fmt.h" /* for f__doend */
10 extern icilist
*f__svic
;
11 extern int f__icnum
, f__recpos
;
13 static int i_getc(Void
)
15 if(f__recpos
>= f__svic
->icirlen
) {
16 if (f__recpos
++ == f__svic
->icirlen
)
21 if(f__icptr
>= f__icend
)
28 int i_ungetc(ch
, f
) int ch
; FILE *f
;
30 int i_ungetc(int ch
, FILE *f
)
33 if (--f__recpos
== f__svic
->icirlen
)
36 err(f__svic
->icierr
,110,"recend");
37 /* *--icptr == ch, and icptr may point to read-only memory */
38 return *--f__icptr
/* = ch */;
49 if(f__init
!= 1) f_init();
57 f__icnum
= f__recpos
= 0;
62 f__icptr
= a
->iciunit
;
63 f__icend
= f__icptr
+ a
->icirlen
*a
->icirnum
;
66 f__elist
= (cilist
*)a
;
71 integer
s_rsli(a
) icilist
*a
;
73 integer
s_rsli(icilist
*a
)
85 { f__init
= 1; return 0; }
88 integer
s_rsni(a
) icilist
*a
;
90 extern int x_rsne(cilist
*);
92 integer
s_rsni(icilist
*a
)
100 ca
.cifmt
= a
->icifmt
;