18 /* Only use fseeko/ftello if they are both there. */
20 #if defined (HAVE_FSEEKO) && defined (HAVE_FTELLO)
21 /* The cast helps in any case where the fseeko() prototype is somehow missing
22 (perhaps because _POSIX_SOURCE is defined and the system headers try
23 to keep a clean namespace in that case) even though the autoconf test
24 found the non-standard function via its trivial link test. */
25 #define FSEEK(a,b,c) fseeko(a, (off_t) b, c)
32 #if defined (MSDOS) && !defined (GO32)
33 #ifndef NON_UNIX_STDIO
34 #define NON_UNIX_STDIO
46 { FILE *ufd; /*0=unconnected*/
48 #if !(defined (MSDOS) && !defined (GO32))
52 int url; /*0=sequential*/
53 flag useek; /*true=can backspace, use dir, ...*/
55 flag urw; /* (1 for can read) | (2 for can write) */
58 flag uwrt; /*last io was write*/
63 extern cilist *f__elist; /*active external io list*/
64 extern flag f__reading,f__external,f__sequential,f__formatted;
68 extern int (*f__getn)(); /* for formatted input */
69 extern void (*f__putn)(); /* for formatted output */
71 extern long f__inode();
72 extern VOID sig_die();
73 extern int (*f__donewrec)(), t_putc(), x_wSL();
74 extern int c_sfe(), err__fl(), xrd_SL(), f__putbuf();
80 extern int (*f__getn)(void); /* for formatted input */
81 extern void (*f__putn)(int); /* for formatted output */
82 extern void x_putc(int);
83 extern long f__inode(char*,int*);
84 extern void sig_die(char*,int);
85 extern void f__fatal(int,char*);
86 extern int t_runc(alist*);
87 extern int f__nowreading(unit*), f__nowwriting(unit*);
88 extern int fk_open(int,int,ftnint);
89 extern int en_fio(void);
90 extern void f_init(void);
91 extern int (*f__donewrec)(void), t_putc(int), x_wSL(void);
92 extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*);
93 extern int c_sfe(cilist*), z_rnew(void);
94 extern int isatty(int);
95 extern int err__fl(int,int,char*);
96 extern int xrd_SL(void);
97 extern int f__putbuf(int);
102 extern int (*f__doend)(Void);
103 extern FILE *f__cf; /*current file*/
104 extern unit *f__curunit; /*current unit*/
105 extern unit f__units[];
106 #define err(f,m,s) do {if(f) {f__init &= ~2; errno= m;} else f__fatal(m,s); return(m);} while(0)
107 #define errfl(f,m,s) do {return err__fl((int)f,m,s);} while(0)
112 extern int f__recpos; /*position in current record*/
113 extern int f__cursor; /* offset to move to */
114 extern int f__hiwater; /* so TL doesn't confuse us */
125 #define buf_end(x) (x->_flag & _IONBF ? x->_ptr : x->_base + BUFSIZ)