mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
revert previous commit - uses APIs from glib 2.1
2002-05-19 Jacob Berkman <jacob@ximian.com> * glib/gmarkup.c (g_markup_parse_context_parse): revert previous commit - uses APIs from glib 2.1
This commit is contained in:
parent
366425b7c4
commit
3fbae004d9
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-05-19 Jacob Berkman <jacob@ximian.com>
|
||||
|
||||
* glib/gmarkup.c (g_markup_parse_context_parse): revert previous
|
||||
commit - uses APIs from glib 2.1
|
||||
|
||||
2002-05-19 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* tests/markups/fail-36.gmarkup:
|
||||
|
@ -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,24 +1498,9 @@ 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, "<?")
|
||||
&& g_str_has_suffix (context->partial_chunk->str, "?")) ||
|
||||
(g_str_has_prefix (context->partial_chunk->str, "<!--")
|
||||
&& g_str_has_suffix (context->partial_chunk->str, "--")) ||
|
||||
(g_str_has_prefix (context->partial_chunk->str, "<![CDATA[")
|
||||
&& g_str_has_suffix (context->partial_chunk->str, "]]")) ||
|
||||
(g_str_has_prefix (context->partial_chunk->str, "<!DOCTYPE")
|
||||
&& context->balance == 0))
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (advance_char (context));
|
||||
|
||||
if (context->iter == context->current_text_end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user