diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-09-25 08:20:18 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-09-25 08:20:18 +0000 |
commit | e4e3c228c0c325dabe6be94efefea08badb72496 (patch) | |
tree | 98ec998c496e8daa1bd3dabd541d5a259ee97dc2 /src/stylesheet.c | |
parent | ab2a3c493f8f6430ad96f7637c842b666c29a9f4 (diff) | |
download | libcss-e4e3c228c0c325dabe6be94efefea08badb72496.tar.gz libcss-e4e3c228c0c325dabe6be94efefea08badb72496.tar.bz2 |
Implement css_stylesheet_append_data and css_stylesheet_data_done
svn path=/trunk/libcss/; revision=5438
Diffstat (limited to 'src/stylesheet.c')
-rw-r--r-- | src/stylesheet.c | 16 |
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); } /** |