aboutsummaryrefslogtreecommitdiff
path: root/engines/director/lingo/lingo-lex.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2019-11-25 21:03:13 +0000
committerEugene Sandulenko2019-11-26 01:12:53 +0100
commitff2367d3dab4b4058b6555135eb4bb9ac23264db (patch)
treeee69e16e2018ad067ee128ba52819160fceb7709 /engines/director/lingo/lingo-lex.cpp
parente01996dda0b4c704e5e289ddf2678f705ce2ddf1 (diff)
downloadscummvm-rg350-ff2367d3dab4b4058b6555135eb4bb9ac23264db.tar.gz
scummvm-rg350-ff2367d3dab4b4058b6555135eb4bb9ac23264db.tar.bz2
scummvm-rg350-ff2367d3dab4b4058b6555135eb4bb9ac23264db.zip
DIRECTOR: Added references as parameters to lingo built-ins
Diffstat (limited to 'engines/director/lingo/lingo-lex.cpp')
-rw-r--r--engines/director/lingo/lingo-lex.cpp49
1 files changed, 23 insertions, 26 deletions
diff --git a/engines/director/lingo/lingo-lex.cpp b/engines/director/lingo/lingo-lex.cpp
index 0458c27b84..991f9e8dad 100644
--- a/engines/director/lingo/lingo-lex.cpp
+++ b/engines/director/lingo/lingo-lex.cpp
@@ -168,7 +168,7 @@ extern FILE *yyin, *yyout;
#define EOB_ACT_LAST_MATCH 2
#define YY_LESS_LINENO(n)
-
+
/* Return all but the first "n" matched characters back to the input stream. */
#define yyless(n) \
do \
@@ -225,7 +225,7 @@ struct yy_buffer_state
int yy_bs_lineno; /**< The line count. */
int yy_bs_column; /**< The column count. */
-
+
/* Whether to try to fill the input buffer when we reach the
* end of it.
*/
@@ -333,7 +333,7 @@ void yyfree (void * );
/* Begin user sect3 */
-#define yywrap() 1
+#define yywrap(n) 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@@ -955,7 +955,7 @@ YY_DECL
register yy_state_type yy_current_state;
register char *yy_cp, *yy_bp;
register int yy_act;
-
+
#line 78 "engines/director/lingo/lingo-lex.l"
@@ -1644,14 +1644,11 @@ case YY_STATE_EOF(INITIAL):
else switch ( yy_get_next_buffer( ) )
{
- default:
- break;
-
case EOB_ACT_END_OF_FILE:
{
(yy_did_buffer_switch_on_eof) = 0;
- if ( yywrap() )
+ if ( yywrap( ) )
{
/* Note: because we've taken care in
* yy_get_next_buffer() to have set up
@@ -1851,7 +1848,7 @@ static int yy_get_next_buffer (void)
{
register yy_state_type yy_current_state;
register char *yy_cp;
-
+
yy_current_state = (yy_start);
yy_current_state += YY_AT_BOL();
@@ -1912,7 +1909,7 @@ static int yy_get_next_buffer (void)
{
int c;
-
+
*(yy_c_buf_p) = (yy_hold_char);
if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR )
@@ -1950,7 +1947,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
- if ( yywrap() )
+ if ( yywrap( ) )
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
@@ -1986,7 +1983,7 @@ static int yy_get_next_buffer (void)
*/
void yyrestart (FILE * input_file )
{
-
+
if ( ! YY_CURRENT_BUFFER ){
yyensure_buffer_stack ();
YY_CURRENT_BUFFER_LVALUE =
@@ -2003,7 +2000,7 @@ static int yy_get_next_buffer (void)
*/
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer )
{
-
+
/* TODO. We should be able to replace this entire function body
* with
* yypop_buffer_state();
@@ -2049,7 +2046,7 @@ static void yy_load_buffer_state (void)
YY_BUFFER_STATE yy_create_buffer (FILE * file, int size )
{
YY_BUFFER_STATE b;
-
+
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
if ( ! b )
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
@@ -2076,7 +2073,7 @@ static void yy_load_buffer_state (void)
*/
void yy_delete_buffer (YY_BUFFER_STATE b )
{
-
+
if ( ! b )
return;
@@ -2097,7 +2094,7 @@ static void yy_load_buffer_state (void)
{
int oerrno = errno;
-
+
yy_flush_buffer(b );
b->yy_input_file = file;
@@ -2113,7 +2110,7 @@ static void yy_load_buffer_state (void)
}
b->yy_is_interactive = 0;
-
+
errno = oerrno;
}
@@ -2202,7 +2199,7 @@ void yypop_buffer_state (void)
static void yyensure_buffer_stack (void)
{
yy_size_t num_to_alloc;
-
+
if (!(yy_buffer_stack)) {
/* First allocation is just for 2 elements, since we don't know if this
@@ -2215,9 +2212,9 @@ static void yyensure_buffer_stack (void)
);
if ( ! (yy_buffer_stack) )
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
-
+
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
-
+
(yy_buffer_stack_max) = num_to_alloc;
(yy_buffer_stack_top) = 0;
return;
@@ -2251,7 +2248,7 @@ static void yyensure_buffer_stack (void)
YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
{
YY_BUFFER_STATE b;
-
+
if ( size < 2 ||
base[size-2] != YY_END_OF_BUFFER_CHAR ||
base[size-1] != YY_END_OF_BUFFER_CHAR )
@@ -2287,7 +2284,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
*/
YY_BUFFER_STATE yy_scan_string (yyconst char * yystr )
{
-
+
return yy_scan_bytes(yystr,strlen(yystr) );
}
@@ -2303,7 +2300,7 @@ YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
YY_BUFFER_STATE b;
char *buf;
yy_size_t n, i;
-
+
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
buf = (char *) yyalloc(n );
@@ -2361,7 +2358,7 @@ static void yy_fatal_error (yyconst char* msg )
*/
int yyget_lineno (void)
{
-
+
return yylineno;
}
@@ -2404,7 +2401,7 @@ char *yyget_text (void)
*/
void yyset_lineno (int line_number )
{
-
+
yylineno = line_number;
}
@@ -2465,7 +2462,7 @@ static int yy_init_globals (void)
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
int yylex_destroy (void)
{
-
+
/* Pop the buffer stack, destroying each element. */
while(YY_CURRENT_BUFFER){
yy_delete_buffer(YY_CURRENT_BUFFER );