new_buf = V3_Malloc(new_size);
if (new_buf == NULL) {
- PrintError("Cannot allocate in tmp_realloc in xml\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in tmp_realloc in xml\n");
return NULL;
}
vsnprintf(root->err, V3_XML_ERRL, fmt, ap);
va_end(ap);
- PrintError("XML Error: %s\n", root->err);
+ PrintError(VM_NONE, VCORE_NONE, "XML Error: %s\n", root->err);
// free memory
v3_xml_free(&(root->xml));
tmp = V3_Malloc((l = strlen(xml->txt)) + len);
if (!tmp) {
- PrintError("Cannot allocate in xml char content\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml char content\n");
return ;
}
struct v3_xml_root * root = (struct v3_xml_root *)V3_Malloc(sizeof(struct v3_xml_root));
if (!root) {
- PrintError("Cannot allocate in xml_new\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml_new\n");
return NULL;
}
child = (struct v3_xml *)V3_Malloc(sizeof(struct v3_xml));
if (!child) {
- PrintError("Cannot allocate in xml_add_child\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml_add_child\n");
return NULL;
}
(2 * sizeof(char *))));
if (!attr) {
- PrintError("Cannot reallocate in xml parse string\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot reallocate in xml parse string\n");
return NULL;
}
(attr_cnt + 1));
if (!attr[last_idx]) {
- PrintError("Cannot reallocate in xml parse string\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot reallocate in xml parse string\n");
return NULL;
}
} else {
attr = V3_Malloc(4 * sizeof(char *));
if (!attr) {
- PrintError("Cannot allocate in xml parse string\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml parse string\n");
return NULL;
}
attr[last_idx] = V3_Malloc(2);
if (!attr[last_idx]) {
- PrintError("Cannot alloocate in xml parse string\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot alloocate in xml parse string\n");
return NULL;
}
}
xml_buf = (char *)V3_Malloc(str_len + 1);
if (!xml_buf) {
- PrintError("Cannot allocate in xml parse\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml parse\n");
return NULL;
}
xml->attr = V3_Malloc(4 * sizeof(char *));
if (!xml->attr) {
- PrintError("Cannot allocate in xml set attr\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml set attr\n");
return NULL;
}
xml->attr[1] = strdup("");
if (!xml->attr[1]) {
- PrintError("Cannot strdup in xml set attr\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot strdup in xml set attr\n");
return NULL;
}
xml->attr = tmp_realloc(xml->attr, l * sizeof(char *), (l + 4) * sizeof(char *));
if (!xml->attr) {
- PrintError("Cannot reallocate in xml set attr\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot reallocate in xml set attr\n");
return NULL;
}
}
if (!xml->attr[l + 3]) {
- PrintError("Cannot reallocate in xml set attr\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot reallocate in xml set attr\n");
return NULL;
}
char *s = V3_Malloc(max);
if (!s) {
- PrintError("Cannot allocate in xml tostrr\n");
+ PrintError(VM_NONE, VCORE_NONE, "Cannot allocate in xml tostrr\n");
return NULL;
}