summaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorDave Brolley <brolley@cygnus.com>1998-04-08 23:29:09 +0000
committerJeff Law <law@gcc.gnu.org>1998-04-08 17:29:09 -0600
commite56e519de8211b657741d6e7bd5fae0db71405c9 (patch)
tree095aa1b478270aae0c9b79838f76864799d3f0a3 /gcc/toplev.c
parent62db76ee5fc19a98d765c1954387373e3d4fee04 (diff)
downloadgcc-e56e519de8211b657741d6e7bd5fae0db71405c9.tar.gz
c-lex.c (finput): New global.
* c-lex.c (finput): New global. (init_parse): Always included. Handle !USE_CPPLIB using code originally in compile_file. (finish_parse): Update for CPPLIB. * toplev.c (init_parse, finish_parse): Declare. (finput): Delete variable. Now in front-ends. (compile_file): Remove code which is now handled by init_parse which is unconditionally called. Similarly for finish_parse. From-SVN: r19063
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index d226950dfec..90cc6f46e65 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -132,6 +132,8 @@ extern int size_directive_output;
extern tree last_assemble_variable_decl;
extern void init_lex ();
+extern void init_parse PVPROTO((char *));
+extern void finish_parse ();
extern void init_decl_processing ();
extern void init_obstacks ();
extern void init_tree_codes ();
@@ -200,11 +202,6 @@ char *input_filename;
char *main_input_filename;
-#if !USE_CPPLIB
-/* Stream for reading from the input file. */
-FILE *finput;
-#endif
-
/* Current line number in real source file. */
int lineno;
@@ -2273,33 +2270,11 @@ compile_file (name)
symout_time = 0;
dump_time = 0;
-#if !USE_CPPLIB
- /* Open input file. */
-
- if (name == 0 || !strcmp (name, "-"))
- {
- finput = stdin;
- name = "stdin";
- }
- else
- finput = fopen (name, "r");
- if (finput == 0)
- pfatal_with_name (name);
-
-#ifdef IO_BUFFER_SIZE
- setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);
-#endif
-#endif /* !USE_CPPLIB */
-
/* Initialize data in various passes. */
init_obstacks ();
init_tree_codes ();
-#if USE_CPPLIB
init_parse (name);
-#else
- init_lex ();
-#endif
init_rtl ();
init_emit_once (debug_info_level == DINFO_LEVEL_NORMAL
|| debug_info_level == DINFO_LEVEL_VERBOSE
@@ -2827,11 +2802,8 @@ compile_file (name)
whether fclose returns an error, since the pages might still be on the
buffer chain while the file is open. */
-#if USE_CPPLIB
finish_parse ();
-#else
- fclose (finput);
-#endif
+
if (ferror (asm_out_file) != 0 || fclose (asm_out_file) != 0)
fatal_io_error (asm_file_name);