summaryrefslogtreecommitdiff
path: root/src/treebuilder/in_foreign_content.c
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:35:33 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-30 00:35:33 +0000
commit4b9735ac3a48e56985c58de4c6f0a0a360c73323 (patch)
treefcd9426d6cddc319b024e4211fd3274e7cfa0f79 /src/treebuilder/in_foreign_content.c
parent8b89c771568230fad877f86c2b13cba562137ac2 (diff)
downloadlibhubbub-4b9735ac3a48e56985c58de4c6f0a0a360c73323.tar.gz
libhubbub-4b9735ac3a48e56985c58de4c6f0a0a360c73323.tar.bz2
C89
svn path=/trunk/hubbub/; revision=5843
Diffstat (limited to 'src/treebuilder/in_foreign_content.c')
-rw-r--r--src/treebuilder/in_foreign_content.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/treebuilder/in_foreign_content.c b/src/treebuilder/in_foreign_content.c
index 4441433..8cb17d8 100644
--- a/src/treebuilder/in_foreign_content.c
+++ b/src/treebuilder/in_foreign_content.c
@@ -142,15 +142,17 @@ static const case_changes svg_tagnames[] = {
void adjust_svg_attributes(hubbub_treebuilder *treebuilder,
hubbub_tag *tag)
{
+ size_t i;
UNUSED(treebuilder);
- for (size_t i = 0; i < tag->n_attributes; i++) {
+ for (i = 0; i < tag->n_attributes; i++) {
hubbub_attribute *attr = &tag->attributes[i];
const uint8_t *name = attr->name.ptr;
size_t len = attr->name.len;
+ size_t j;
- for (size_t j = 0; j < N_ELEMENTS(svg_attributes); j++) {
+ for (j = 0; j < N_ELEMENTS(svg_attributes); j++) {
if (hubbub_string_match(name, len,
(uint8_t *)svg_attributes[j].attr,
svg_attributes[j].len)) {
@@ -172,10 +174,11 @@ void adjust_svg_tagname(hubbub_treebuilder *treebuilder,
{
const uint8_t *name = tag->name.ptr;
size_t len = tag->name.len;
+ size_t i;
UNUSED(treebuilder);
- for (size_t i = 0; i < N_ELEMENTS(svg_tagnames); i++) {
+ for (i = 0; i < N_ELEMENTS(svg_tagnames); i++) {
if (hubbub_string_match(name, len,
(uint8_t *)svg_tagnames[i].attr,
svg_tagnames[i].len)) {
@@ -198,9 +201,10 @@ void adjust_svg_tagname(hubbub_treebuilder *treebuilder,
void adjust_foreign_attributes(hubbub_treebuilder *treebuilder,
hubbub_tag *tag)
{
+ size_t i;
UNUSED(treebuilder);
- for (size_t i = 0; i < tag->n_attributes; i++) {
+ for (i = 0; i < tag->n_attributes; i++) {
hubbub_attribute *attr = &tag->attributes[i];
const uint8_t *name = attr->name.ptr;