@* Data structures.

\noindent The multiple input files (master file and change
files) are treated the same way.  To organize the
simultaneous usage of several input files, we introduce the
data types |in_file_modes|.

The mode |search| indicates that \.{TIE} searches for a
match of the input line with any line of an input file in
|reading| mode.  |test| is used whenever a match is found
and it has to be tested if the next input lines do match
also.  |reading| describes that the lines can be read without
any check for equality to other lines.	|ignore| denotes
that the file cannot be used.  This may happen because an
error has been detected or because the end of the file has
been found.

\leavevmode |file_types| is used to describe whether a file
is a master file or a change file.
@d search = 1
@d test = 2
@d reading = 3
@d ignore = 4

@d master = 1
@d chf = 2

@<Types...@>=
typedef char in_file_modes;
typedef char file_types;

@ We have to add a boolean type since none is present in C.
@d true = 1
@d false = 0
@<Types...@>=
typedef char boolean;

@ The following data structures join all informations needed to use
these input files.

@d normal = 1
@d pre = 2
@d post = 3

@<Types...@>=
typedef char out_md_type;@/
typedef char *name_type;@/
typedef int buffer_index;
typedef int file_index;
typedef struct {
	name_type name_of_file;
	ascii_code buffer[buf_size+1];
	in_file_modes mode;
	int lineno;
	file_types type_of_file;
	int limit;
} input_description;



@ These data types are used in the global variable section.

@<Globals...@>=
int  actual_input, test_input;
boolean  input_has_ended;
 input_description  input_organization[max_file_index+1];
 text_file  input_files[max_file_index+1];
int  no_ch;
boolean  prod_chf;
out_md_type  out_mode;
int verbose = 0;  /* noisy if nonzero */