|
@@ -284,7 +284,7 @@ struct yy_buffer_state
|
|
|
/* Number of characters read into yy_ch_buf, not including EOB
|
|
|
* characters.
|
|
|
*/
|
|
|
- int yy_n_chars;
|
|
|
+ yy_size_t yy_n_chars;
|
|
|
|
|
|
/* Whether we "own" the buffer - i.e., we know we created it,
|
|
|
* and can realloc() it to grow it, and should free() it to
|
|
@@ -368,7 +368,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
|
|
|
|
|
/* yy_hold_char holds the character lost when yytext is formed. */
|
|
|
static char yy_hold_char;
|
|
|
-static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
|
+static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
|
|
yy_size_t yyleng;
|
|
|
|
|
|
/* Points to current character in buffer. */
|
|
@@ -1793,9 +1793,9 @@ static int yy_get_next_buffer (void)
|
|
|
else
|
|
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
|
|
|
|
|
- if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
|
+ if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
|
|
/* Extend the array by 50%, plus the number we really need. */
|
|
|
- int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
|
+ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
|
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
|
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
|
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
|
@@ -2261,7 +2261,7 @@ static void yyensure_buffer_stack (void)
|
|
|
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
|
|
* immediate realloc on the next call.
|
|
|
*/
|
|
|
- num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
|
|
|
+ num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
|
|
|
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
|
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
|
|
);
|