3 * (c) copyright 1983 by the Vrije Universiteit, Amsterdam, The Netherlands.
5 * This product is part of the Amsterdam Compiler Kit.
7 * Permission to use, sell, duplicate or disclose this software must be
8 * obtained in writing. Requests for such permissions may be sent to
10 * Dr. Andrew S. Tanenbaum
11 * Wiskundig Seminarium
19 /* Author: J.W. Stevenson */
31 int _extflc
; /* number of external files */
32 char *_m_lb
; /* LB of _m_a_i_n */
33 struct file
*_curfil
; /* points to file struct in case of errors */
37 int _fp_hook
= 1; /* This is for Minix, but does not harm others */
39 _ini(args
,c
,p
,mainlb
) char *args
,*mainlb
; int c
; struct file
**p
; {
43 _pargc
= *(int *)args
; args
+= sizeof (int);
44 _pargv
= *(char ***)args
;
50 if ( (f
= _extfl
[0]) != (struct file
*) 0) {
52 f
->flags
= MAGIC
|TXTBIT
;
57 f
->buflen
= PC_BUFLEN
;
59 if ( (f
= _extfl
[1]) != (struct file
*) 0) {
61 f
->flags
= MAGIC
|TXTBIT
|WRBIT
|EOFBIT
|ELNBIT
;
68 f
->count
= (_isatty(1) ? 1 : PC_BUFLEN
);