Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lexborisov/Modest.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modest/css_real_and_default_property_to_node.c')
-rw-r--r--examples/modest/css_real_and_default_property_to_node.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/modest/css_real_and_default_property_to_node.c b/examples/modest/css_real_and_default_property_to_node.c
index 59f5ab0..35f9d68 100644
--- a/examples/modest/css_real_and_default_property_to_node.c
+++ b/examples/modest/css_real_and_default_property_to_node.c
@@ -29,15 +29,16 @@
#define DIE(msg, ...) do { fprintf(stderr, msg, ##__VA_ARGS__); exit(EXIT_FAILURE); } while(0)
#define check_status(msg, ...) do {if(status) DIE(msg, ##__VA_ARGS__);} while(0)
-void serialization_callback(const char* data, size_t len, void* ctx)
+mystatus_t serialization_callback(const char* data, size_t len, void* ctx)
{
printf("%.*s", (int)len, data);
+ return MyCORE_STATUS_OK;
}
myhtml_tree_t * parse_html(const char* data, size_t data_size, myhtml_callback_tree_node_f cai, void* cai_ctx)
{
myhtml_t* myhtml = myhtml_create();
- myhtml_status_t status = myhtml_init(myhtml, MyHTML_OPTIONS_DEFAULT, 1, 0);
+ mystatus_t status = myhtml_init(myhtml, MyHTML_OPTIONS_DEFAULT, 1, 0);
check_status("Can't init MyHTML object\n");
@@ -48,7 +49,7 @@ myhtml_tree_t * parse_html(const char* data, size_t data_size, myhtml_callback_t
myhtml_callback_tree_node_insert_set(tree, cai, cai_ctx);
- status = myhtml_parse(tree, MyHTML_ENCODING_UTF_8, data, data_size);
+ status = myhtml_parse(tree, MyENCODING_UTF_8, data, data_size);
check_status("Can't parse HTML:\n%s\n", data);
return tree;
@@ -58,7 +59,7 @@ mycss_entry_t * parse_css(const char* data, size_t data_size)
{
// base init
mycss_t *mycss = mycss_create();
- mycss_status_t status = mycss_init(mycss);
+ mystatus_t status = mycss_init(mycss);
check_status("Can't init MyCSS object\n");
@@ -68,7 +69,7 @@ mycss_entry_t * parse_css(const char* data, size_t data_size)
check_status("Can't init MyCSS Entry object\n");
- status = mycss_parse(entry, MyHTML_ENCODING_UTF_8, data, data_size);
+ status = mycss_parse(entry, MyENCODING_UTF_8, data, data_size);
check_status("Can't parse CSS:\n%s\n", data);
return entry;
@@ -108,7 +109,7 @@ int main(int argc, const char * argv[])
/* init Modest */
modest_t *modest = modest_create();
- modest_status_t status = modest_init(modest);
+ mystatus_t status = modest_init(modest);
check_status("Can't init Modest object\n");