PSclLayout cur_rec_layout = &(m_layout_table[layout_id]);
parsing_layout_node(cur_node, cur_rec_layout, layout_id);
cur_rec_layout->name = (sclchar*)strdup(it->c_str());
+ add_layout_string((xmlChar*)cur_rec_layout->name);
xmlFreeDoc(doc);
}
for (int shift_loop = 0;shift_loop < SCL_SHIFT_STATE_MAX;shift_loop++) {
if ((shift_state == shift_loop || shift_state == -1)) {
xmlChar* key = xmlNodeGetContent(child_node);
+ sclboolean need_free = TRUE;
if (key) {
if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"label")) {
sclboolean upper_created = FALSE;
add_upper_string(upper);
upper_created = TRUE;
key = reinterpret_cast<xmlChar*>(upper);
+ need_free = FALSE;
}
}
if (!upper_created) {
add_key_string(key);
+ need_free = FALSE;
}
cur_rec->autopopup_key_labels[shift_loop][autopopup_state] = (sclchar*)key;
/* If current key_value is NULL, let's just consider this label is the default key_value */
} else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"value")) {
cur_rec->autopopup_key_values[shift_loop][autopopup_state] = (sclchar*)key;
add_key_string(key);
+ need_free = FALSE;
} else if (0 == xmlStrcmp(child_node->name, (const xmlChar*)"event")) {
cur_rec->autopopup_key_events[shift_loop][autopopup_state] = (sclulong)atoi((sclchar*)key);
add_key_string(key);
+ need_free = FALSE;
+ }
+ if (need_free) {
+ xmlFree(key);
}
}
}
xmlFree(m_magnifier_configure.label_type);
m_magnifier_configure.label_type = NULL;
}
+ for (int loop = 0;loop < MAX_WND_DECORATOR;loop++) {
+ if (m_magnifier_configure.decoration_image_path[loop]) {
+ xmlFree(m_magnifier_configure.decoration_image_path[loop]);
+ m_magnifier_configure.decoration_image_path[loop] = NULL;
+ }
+ }
}
int parsing_magnifier_configure(const char* input_file) {