Fixed the code style in *.c files to two spaces indentation and add a linter named funstx to Fun. (0.39.0)
This commit is contained in:
parent
33001a7ad2
commit
03b2532474
237 changed files with 17550 additions and 13911 deletions
|
|
@ -12,18 +12,25 @@
|
|||
/* OP_XML_TEXT: pops node handle; pushes string (concatenate text node children) */
|
||||
case OP_XML_TEXT: {
|
||||
#ifdef FUN_WITH_XML2
|
||||
Value vh = pop_value(vm);
|
||||
int h = (vh.type == VAL_INT) ? (int)vh.i : 0;
|
||||
xmlNodePtr n = xml_node_get(h);
|
||||
free_value(vh);
|
||||
if (!n) { push_value(vm, make_string("")); break; }
|
||||
xmlChar *content = xmlNodeGetContent(n);
|
||||
if (!content) { push_value(vm, make_string("")); break; }
|
||||
push_value(vm, make_string((const char*)content));
|
||||
xmlFree(content);
|
||||
#else
|
||||
Value drop = pop_value(vm); free_value(drop);
|
||||
Value vh = pop_value(vm);
|
||||
int h = (vh.type == VAL_INT) ? (int)vh.i : 0;
|
||||
xmlNodePtr n = xml_node_get(h);
|
||||
free_value(vh);
|
||||
if (!n) {
|
||||
push_value(vm, make_string(""));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
xmlChar *content = xmlNodeGetContent(n);
|
||||
if (!content) {
|
||||
push_value(vm, make_string(""));
|
||||
break;
|
||||
}
|
||||
push_value(vm, make_string((const char *)content));
|
||||
xmlFree(content);
|
||||
#else
|
||||
Value drop = pop_value(vm);
|
||||
free_value(drop);
|
||||
push_value(vm, make_string(""));
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue