From ba78548f07a240103f9dc32d0e37a31f4d0ffc43 Mon Sep 17 00:00:00 2001 From: Will Estes Date: Fri, 13 Apr 2007 16:32:31 +0000 Subject: [PATCH] fix skeleton for reentrant scanners --- flex.skl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flex.skl b/flex.skl index 368c5a6..c956a58 100644 --- a/flex.skl +++ b/flex.skl @@ -1647,11 +1647,11 @@ m4_ifdef( [[M4_YY_USES_REJECT]], else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) (yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((yy_size_t) (YY_G(yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yy_n_chars + number_to_move + (yy_n_chars >> 1); + yy_size_t new_size = YY_G(yy_n_chars) + number_to_move + (YY_G(yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( - (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size); + (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, new_size M4_YY_CALL_LAST_ARG ); } YY_G(yy_n_chars) += number_to_move; -- 2.40.0