summaryrefslogtreecommitdiff
path: root/css/ruleset.c
diff options
context:
space:
mode:
Diffstat (limited to 'css/ruleset.c')
-rw-r--r--css/ruleset.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/css/ruleset.c b/css/ruleset.c
index 32bb235a3..d9c713d87 100644
--- a/css/ruleset.c
+++ b/css/ruleset.c
@@ -1,5 +1,5 @@
/**
- * $Id: ruleset.c,v 1.2 2003/04/05 15:35:55 bursa Exp $
+ * $Id: ruleset.c,v 1.3 2003/04/05 16:24:43 bursa Exp $
*/
#include <assert.h>
@@ -130,16 +130,23 @@ void css_add_ruleset(struct css_stylesheet *stylesheet,
}
/* fill in the declarations */
- for (n = declaration; n != 0; n = n->next) {
- struct property_entry *p;
- assert(n->type == NODE_DECLARATION && n->data != 0 && n->left != 0);
- p = bsearch(n->data, property_table,
- sizeof(property_table) / sizeof(property_table[0]),
- sizeof(property_table[0]), strcasecmp);
- if (p == 0)
- continue;
- p->parse(style, n->left);
- }
+ css_add_declarations(style, declaration);
+ }
+}
+
+
+void css_add_declarations(struct css_style *style, struct node *declaration)
+{
+ struct node *n;
+ for (n = declaration; n != 0; n = n->next) {
+ struct property_entry *p;
+ assert(n->type == NODE_DECLARATION && n->data != 0 && n->left != 0);
+ p = bsearch(n->data, property_table,
+ sizeof(property_table) / sizeof(property_table[0]),
+ sizeof(property_table[0]), strcasecmp);
+ if (p == 0)
+ continue;
+ p->parse(style, n->left);
}
}