summaryrefslogtreecommitdiff
path: root/src/stylesheet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r--src/stylesheet.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/stylesheet.c b/src/stylesheet.c
index ed1f870..45e6cae 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -140,13 +140,10 @@ void css_stylesheet_destroy(css_stylesheet *sheet)
css_error css_stylesheet_append_data(css_stylesheet *sheet,
const uint8_t *data, size_t len)
{
- UNUSED(sheet);
- UNUSED(data);
- UNUSED(len);
-
- /** \todo parse data */
+ if (sheet == NULL || data == NULL)
+ return CSS_BADPARM;
- return CSS_OK;
+ return css_parser_parse_chunk(sheet->parser, data, len);
}
/**
@@ -157,11 +154,10 @@ css_error css_stylesheet_append_data(css_stylesheet *sheet,
*/
css_error css_stylesheet_data_done(css_stylesheet *sheet)
{
- UNUSED(sheet);
-
- /** \todo flag completion to the parser */
+ if (sheet == NULL)
+ return CSS_BADPARM;
- return CSS_OK;
+ return css_parser_completed(sheet->parser);
}
/**