From a44cc3dd7e1b5e1c24e8176a1c571b6ad0262ec3 Mon Sep 17 00:00:00 2001 From: rlar Date: Sun, 11 Jul 2010 19:22:36 +0000 Subject: [PATCH] for c++, lex input() function is named yyinput() --- ChangeLog | 4 ++++ src/xspice/cmpp/mod_lex.l | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ab3f0f5e..c425fe766 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-07-11 Robert Larice + * src/xspice/cmpp/mod_lex.l : + for c++, lex input() function is named yyinput() + 2010-07-11 Robert Larice * src/spicelib/parser/inpptree.c : missing (void*) casts diff --git a/src/xspice/cmpp/mod_lex.l b/src/xspice/cmpp/mod_lex.l index fc947952c..40c8cf049 100755 --- a/src/xspice/cmpp/mod_lex.l +++ b/src/xspice/cmpp/mod_lex.l @@ -57,7 +57,11 @@ Z [0-9A-Za-z_] ch = '\0'; do { last_ch = ch; +#ifdef __cplusplus + ch = yyinput(); +#else ch = input(); +#endif fputc(ch,mod_yyout); } while (ch && !((last_ch == '*') && (ch == '/'))); if (!ch) {mod_yyerror ("Unterminated comment");}}