Commit c1a6a8dc by Sam Steingold Committed by Neil Booth

tradcpp.c (rescan): define obufp_before_macroname before RECACHE

	* tradcpp.c (rescan): define obufp_before_macroname before RECACHE
	(RECACHE): keep obufp_before_macroname up to date

From-SVN: r45082
parent b1c45ae4
2001-08-21 Sam Steingold <sds@gnu.org>
* tradcpp.c (rescan): define obufp_before_macroname before RECACHE
(RECACHE): keep obufp_before_macroname up to date
2001-08-21 Zack Weinberg <zackw@panix.com> 2001-08-21 Zack Weinberg <zackw@panix.com>
* stmt.c: Don't include insn-codes.h. * stmt.c: Don't include insn-codes.h.
......
...@@ -1220,6 +1220,9 @@ rescan (op, output_marks) ...@@ -1220,6 +1220,9 @@ rescan (op, output_marks)
/* Record position of last `real' newline. */ /* Record position of last `real' newline. */
U_CHAR *beg_of_line; U_CHAR *beg_of_line;
/* This has to be a global bacause of RECACHE. */
U_CHAR *obufp_before_macroname = NULL;
/* Pop the innermost input stack level, assuming it is a macro expansion. */ /* Pop the innermost input stack level, assuming it is a macro expansion. */
#define POPMACRO \ #define POPMACRO \
...@@ -1237,6 +1240,7 @@ do { ip = &instack[indepth]; \ ...@@ -1237,6 +1240,7 @@ do { ip = &instack[indepth]; \
op->bufp = obp; \ op->bufp = obp; \
check_expand (op, limit - ibp); \ check_expand (op, limit - ibp); \
beg_of_line = 0; \ beg_of_line = 0; \
obufp_before_macroname += op->bufp - obp; \
obp = op->bufp; } while (0) obp = op->bufp; } while (0)
if (no_output && instack[indepth].fname != 0) if (no_output && instack[indepth].fname != 0)
...@@ -1647,7 +1651,8 @@ randomchar: ...@@ -1647,7 +1651,8 @@ randomchar:
hp = hp->next) { hp = hp->next) {
if (hp->length == ident_length) { if (hp->length == ident_length) {
U_CHAR *obufp_before_macroname; /* obufp_before_macroname is used only in this block,
but it has to be global because of RECACHE. */
int op_lineno_before_macroname; int op_lineno_before_macroname;
register int i = ident_length; register int i = ident_length;
register U_CHAR *p = hp->name; register U_CHAR *p = hp->name;
......
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