summaryrefslogtreecommitdiff
path: root/src/treebuilder/in_caption.c
diff options
context:
space:
mode:
authorAndrew Sidwell <andy@entai.co.uk>2008-08-10 15:49:52 +0000
committerAndrew Sidwell <andy@entai.co.uk>2008-08-10 15:49:52 +0000
commit086bd1eef17d63b36a47ac954b1d90fff3d4115d (patch)
tree07a9ec2dbe0f583eca788a9da6e559c58a664ef0 /src/treebuilder/in_caption.c
parentc8aaecba0272665ba64380ec62d9fc6eba90c960 (diff)
downloadlibhubbub-086bd1eef17d63b36a47ac954b1d90fff3d4115d.tar.gz
libhubbub-086bd1eef17d63b36a47ac954b1d90fff3d4115d.tar.bz2
Switch to using hubbub_error for reprocessing state from just a bool, to allow for encoding change info to be returned more easily.
svn path=/trunk/hubbub/; revision=4989
Diffstat (limited to 'src/treebuilder/in_caption.c')
-rw-r--r--src/treebuilder/in_caption.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/treebuilder/in_caption.c b/src/treebuilder/in_caption.c
index 312a6f1..6e6eb6a 100644
--- a/src/treebuilder/in_caption.c
+++ b/src/treebuilder/in_caption.c
@@ -21,10 +21,10 @@
* \param token The token to process
* \return True to reprocess the token, false otherwise
*/
-bool handle_in_caption(hubbub_treebuilder *treebuilder,
+hubbub_error handle_in_caption(hubbub_treebuilder *treebuilder,
const hubbub_token *token)
{
- bool reprocess = false;
+ hubbub_error err = HUBBUB_OK;
bool handled = false;
switch (token->type) {
@@ -37,7 +37,7 @@ bool handle_in_caption(hubbub_treebuilder *treebuilder,
type == TBODY || type == TD || type == TFOOT ||
type == TH || type == THEAD || type == TR) {
/** \todo parse error */
- reprocess = true;
+ err = HUBBUB_REPROCESS;
} else {
/* Process as if "in body" */
handle_in_body(treebuilder, token);
@@ -53,7 +53,7 @@ bool handle_in_caption(hubbub_treebuilder *treebuilder,
handled = true;
} else if (type == TABLE) {
/** \todo parse error if type == TABLE */
- reprocess = true;
+ err = HUBBUB_REPROCESS;
} else if (type == BODY || type == COL || type == COLGROUP ||
type == HTML || type == TBODY || type == TD ||
type == TFOOT || type == TH ||
@@ -75,7 +75,7 @@ bool handle_in_caption(hubbub_treebuilder *treebuilder,
break;
}
- if (handled || reprocess) {
+ if (handled || err == HUBBUB_REPROCESS) {
hubbub_ns ns;
element_type otype = UNKNOWN;
void *node;
@@ -103,6 +103,6 @@ bool handle_in_caption(hubbub_treebuilder *treebuilder,
treebuilder->context.mode = IN_TABLE;
}
- return reprocess;
+ return err;
}