From 3fbae004d9a4d0d07a06355c36e1ffacfb7bacd4 Mon Sep 17 00:00:00 2001 From: Jacob Berkman Date: Sun, 19 May 2002 05:41:46 +0000 Subject: [PATCH] revert previous commit - uses APIs from glib 2.1 2002-05-19 Jacob Berkman * glib/gmarkup.c (g_markup_parse_context_parse): revert previous commit - uses APIs from glib 2.1 --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-12 | 5 +++++ ChangeLog.pre-2-2 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ glib/gmarkup.c | 23 +---------------------- 8 files changed, 36 insertions(+), 22 deletions(-) diff --git a/ChangeLog b/ChangeLog index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 211cd0b69..7fb5ee958 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2002-05-19 Jacob Berkman + + * glib/gmarkup.c (g_markup_parse_context_parse): revert previous + commit - uses APIs from glib 2.1 + 2002-05-19 Matthias Clasen * tests/markups/fail-36.gmarkup: diff --git a/glib/gmarkup.c b/glib/gmarkup.c index a34e477c8..8f5c6b861 100644 --- a/glib/gmarkup.c +++ b/glib/gmarkup.c @@ -97,7 +97,6 @@ struct _GMarkupParseContext guint document_empty : 1; guint parsing : 1; - gint balance; }; /** @@ -155,8 +154,6 @@ g_markup_parse_context_new (const GMarkupParser *parser, context->document_empty = TRUE; context->parsing = FALSE; - context->balance = 0; - return context; } @@ -725,10 +722,8 @@ find_current_text_end (GMarkupParseContext *context) p = context->current_text; next = g_utf8_find_next_char (p, end); - while (next && *next) + while (next) { - if (p == next) - next++; p = next; next = g_utf8_find_next_char (p, end); } @@ -968,7 +963,6 @@ g_markup_parse_context_parse (GMarkupParseContext *context, const gchar *openangle = "<"; add_to_partial (context, openangle, openangle + 1); context->start = context->iter; - context->balance = 1; context->state = STATE_INSIDE_PASSTHROUGH; } else if (*context->iter == '/') @@ -1504,23 +1498,8 @@ g_markup_parse_context_parse (GMarkupParseContext *context, /* Possible next state: AFTER_CLOSE_ANGLE */ do { - if (*context->iter == '<') - context->balance++; if (*context->iter == '>') - { - context->balance--; - add_to_partial (context, context->start, context->iter); - context->start = context->iter; - if ((g_str_has_prefix (context->partial_chunk->str, "partial_chunk->str, "?")) || - (g_str_has_prefix (context->partial_chunk->str, "