com.c (finput): New variable.

* com.c (finput): New variable.
        (init_parse): Handle !USE_CPPLIB.
        (finish_parse): New function.
        (lang_init): No longer declare finput.

From-SVN: r19064
This commit is contained in:
Dave Brolley 1998-04-08 17:30:08 -06:00 committed by Jeff Law
parent e56e519de8
commit 77f77701a5
1 changed files with 26 additions and 3 deletions

View File

@ -238,6 +238,9 @@ tree current_function_decl;
char *language_string = "GNU F77";
/* Stream for reading from the input file. */
FILE *finput;
/* These definitions parallel those in c-decl.c so that code from that
module can be used pretty much as is. Much of these defs aren't
otherwise used, i.e. by g77 code per se, except some of them are used
@ -14793,12 +14796,28 @@ init_decl_processing ()
}
void
init_lex ()
init_parse (filename)
char *filename;
{
#if BUILT_FOR_270
extern void (*print_error_function) (char *);
#endif
/* Open input file. */
if (filename == 0 || !strcmp (filename, "-"))
{
finput = stdin;
filename = "stdin";
}
else
finput = fopen (filename, "r");
if (finput == 0)
pfatal_with_name (filename);
#ifdef IO_BUFFER_SIZE
setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);
#endif
/* Make identifier nodes long enough for the language-specific slots. */
set_identifier_size (sizeof (struct lang_identifier));
decl_printable_name = lang_printable_name;
@ -14807,6 +14826,12 @@ init_lex ()
#endif
}
void
finish_parse ()
{
fclose (finput);
}
void
insert_block (block)
tree block;
@ -14851,8 +14876,6 @@ lang_identify ()
void
lang_init ()
{
extern FILE *finput; /* Don't pollute com.h with this. */
/* If the file is output from cpp, it should contain a first line
`# 1 "real-filename"', and the current design of gcc (toplev.c
in particular and the way it sets up information relied on by