--- libodraw-20150105/libodraw/libodraw_cue_parser.y.orig 2015-01-05 19:01:57.000000000 +0100 +++ libodraw-20150105/libodraw/libodraw_cue_parser.y 2015-01-23 22:14:43.088287239 +0100 @@ -22,6 +22,7 @@ #include #include +#include #if defined( HAVE_STDLIB_H ) || defined( WINAPI ) #include @@ -67,8 +68,16 @@ lba += ( ( msf_string[ 3 ] - '0' ) * 10 ) + ( msf_string[ 4 ] - '0' ); \ lba *= CD_FRAMES; \ lba += ( ( msf_string[ 6 ] - '0' ) * 10 ) + ( msf_string[ 7 ] - '0' ); + %} +%code requires { +typedef struct cue_parser_state cue_parser_state_t; +} + +%lex-param { void * NULL } +%parse-param { cue_parser_state_t *parser_state } + /* %name-prefix="cue_scanner_" replaced by -p cue_scanner_ */ /* %no-lines replaced by -l */ @@ -97,8 +106,6 @@ %{ -typedef struct cue_parser_state cue_parser_state_t; - struct cue_parser_state { /* The file @@ -224,6 +231,7 @@ extern int cue_scanner_lex( void *user_data ); extern void cue_scanner_error( + cue_parser_state_t *parser_state, const char *error_string ); extern YY_BUFFER_STATE cue_scanner__scan_buffer( --- libodraw-20150105/libodraw/libodraw_cue_scanner.l.orig 2015-01-05 19:01:57.000000000 +0100 +++ libodraw-20150105/libodraw/libodraw_cue_scanner.l 2015-01-23 21:06:12.108459763 +0100 @@ -374,6 +374,7 @@ int cue_scanner_wrap( } void cue_scanner_error( + cue_parser_state_t *parser_state, const char *error_string ) { if( cue_scanner_suppress_error == 0 )