Commit 276ca6ea by Dave Brolley Committed by Dave Brolley

lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.

1998-05-26  Dave Brolley  <brolley@cygnus.com>
	* lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
	(init_parse): Initialize cpplib interface.
	* Makefile.in (CXX_OBJS): Make sure dependencies nenver end with an
	empty continuation.

From-SVN: r20059
parent ad076f4e
1998-05-26 Dave Brolley <brolley@cygnus.com>
* lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
(init_parse): Initialize cpplib interface.
* Makefile.in (CXX_OBJS): Make sure dependencies nenver end with an
empty continuation.
1998-05-26 Mark Mitchell <mark@markmitchell.com> 1998-05-26 Mark Mitchell <mark@markmitchell.com>
* decl.c (pushtag): Avoid crashing on erroneous input. * decl.c (pushtag): Avoid crashing on erroneous input.
......
...@@ -176,8 +176,8 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config ...@@ -176,8 +176,8 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../config
CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \ CXX_OBJS = call.o decl.o errfn.o expr.o pt.o sig.o typeck2.o \
class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o \ class.o decl2.o error.o lex.o parse.o ptree.o rtti.o spew.o typeck.o cvt.o \
except.o friend.o init.o method.o search.o semantics.o tree.o xref.o repo.o \ except.o friend.o init.o method.o search.o semantics.o tree.o xref.o \
@extra_cxx_objs@ repo.o @extra_cxx_objs@
# Language-independent object files. # Language-independent object files.
OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o OBJS = `cat ../stamp-objlist` ../c-common.o ../c-pragma.o
......
...@@ -114,7 +114,9 @@ char *inline_text_firstobj; ...@@ -114,7 +114,9 @@ char *inline_text_firstobj;
#if USE_CPPLIB #if USE_CPPLIB
#include "cpplib.h" #include "cpplib.h"
extern cpp_reader parse_in; extern cpp_reader parse_in;
extern cpp_options parse_options;
extern unsigned char *yy_cur, *yy_lim;
#else #else
FILE *finput; FILE *finput;
#endif #endif
...@@ -471,7 +473,18 @@ init_parse (filename) ...@@ -471,7 +473,18 @@ init_parse (filename)
int i; int i;
#if !USE_CPPLIB #if USE_CPPLIB
yy_cur = "";
yy_lim = yy_cur;
cpp_reader_init (&parse_in);
parse_in.data = &parse_options;
cpp_options_init (&parse_options);
cpp_handle_options (&parse_in, 0, NULL); /* FIXME */
parse_in.show_column = 1;
if (! cpp_start_read (&parse_in, filename))
abort ();
#else
/* Open input file. */ /* Open input file. */
if (filename == 0 || !strcmp (filename, "-")) if (filename == 0 || !strcmp (filename, "-"))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment