From 38752450093b0cca9f67a5efb540aacf94ad55cb Mon Sep 17 00:00:00 2001 From: Dodji Seketeli Date: Tue, 24 Feb 2004 22:49:47 +0000 Subject: fixed a parsing bug reported by David A Knight. This should now properly 2004-02-24 Dodji Seketeli * src/cr-parser.c: (cr_parser_parse_import): fixed a parsing bug reported by David A Knight. This should now properly parse sequences of @import rules that without media parts. * src/cr-statement.c: (cr_statement_dump_import_rule): fixed a serialisation bug here. --- ChangeLog | 9 +++++++++ src/cr-parser.c | 12 +++++------- src/cr-statement.c | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 32bf913..88cb404 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-02-24 Dodji Seketeli + + * src/cr-parser.c: + (cr_parser_parse_import): fixed a parsing bug reported + by David A Knight. This should now properly parse + sequences of @import rules that without media parts. + * src/cr-statement.c: (cr_statement_dump_import_rule): + fixed a serialisation bug here. + 2004-02-24 Dodji Seketeli * src/cr-parser.c,src/cr-tknzr.c,src/cr-token.[ch]: diff --git a/src/cr-parser.c b/src/cr-parser.c index 55bf6ea..07ab488 100644 --- a/src/cr-parser.c +++ b/src/cr-parser.c @@ -4293,15 +4293,13 @@ cr_parser_parse_import (CRParser *a_this, GList ** a_media_list, medium = NULL ; } - CHECK_PARSING_STATUS (status, FALSE) ; - - READ_NEXT_CHAR (a_this, &cur_char) ; - - ENSURE_PARSING_COND (cur_char == ';') ; - + CHECK_PARSING_STATUS (status, FALSE) ; cr_parser_try_to_skip_spaces_and_comments (a_this) ; } - + cr_parser_try_to_skip_spaces_and_comments (a_this) ; + READ_NEXT_CHAR (a_this, &cur_char) ; + ENSURE_PARSING_COND (cur_char == ';') ; + cr_parser_try_to_skip_spaces_and_comments (a_this) ; okay: cr_parser_clear_errors (a_this) ; PRIVATE (a_this)->state = IMPORT_PARSED_STATE ; diff --git a/src/cr-statement.c b/src/cr-statement.c index a857680..b675826 100644 --- a/src/cr-statement.c +++ b/src/cr-statement.c @@ -850,8 +850,8 @@ cr_statement_dump_import_rule (CRStatement *a_this, FILE *a_fp, } } } - fprintf (a_fp," ;") ; } + fprintf (a_fp," ;") ; } } -- cgit v1.2.1