mirror of
https://github.com/labwc/labwc.git
synced 2026-03-03 01:40:37 -05:00
rcxml: simplify debugging nodenames
This commit is contained in:
parent
a5139815d6
commit
0a6eead36b
2 changed files with 3 additions and 19 deletions
|
|
@ -22,6 +22,5 @@ extern struct rcxml rc;
|
||||||
void rcxml_parse_xml(struct buf *b);
|
void rcxml_parse_xml(struct buf *b);
|
||||||
void rcxml_read(const char *filename);
|
void rcxml_read(const char *filename);
|
||||||
void rcxml_finish(void);
|
void rcxml_finish(void);
|
||||||
void rcxml_get_nodenames(struct buf *b);
|
|
||||||
|
|
||||||
#endif /* __LABWC_RCXML_H */
|
#endif /* __LABWC_RCXML_H */
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,6 @@
|
||||||
|
|
||||||
static bool in_keybind = false;
|
static bool in_keybind = false;
|
||||||
static bool is_attribute = false;
|
static bool is_attribute = false;
|
||||||
static bool write_to_nodename_buffer = false;
|
|
||||||
static struct buf *nodename_buffer;
|
|
||||||
static struct keybind *current_keybind;
|
static struct keybind *current_keybind;
|
||||||
|
|
||||||
enum font_place {
|
enum font_place {
|
||||||
|
|
@ -113,17 +111,11 @@ entry(xmlNode *node, char *nodename, char *content)
|
||||||
}
|
}
|
||||||
string_truncate_at_pattern(nodename, ".openbox_config");
|
string_truncate_at_pattern(nodename, ".openbox_config");
|
||||||
|
|
||||||
/* for debugging */
|
if (getenv("LABWC_DEBUG_CONFIG_NODENAMES")) {
|
||||||
if (write_to_nodename_buffer) {
|
|
||||||
if (is_attribute) {
|
if (is_attribute) {
|
||||||
buf_add(nodename_buffer, "@");
|
printf("@");
|
||||||
}
|
}
|
||||||
buf_add(nodename_buffer, nodename);
|
printf("%s: %s\n", nodename, content);
|
||||||
if (content) {
|
|
||||||
buf_add(nodename_buffer, ": ");
|
|
||||||
buf_add(nodename_buffer, content);
|
|
||||||
}
|
|
||||||
buf_add(nodename_buffer, "\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!content) {
|
if (!content) {
|
||||||
|
|
@ -355,10 +347,3 @@ rcxml_finish(void)
|
||||||
zfree(k);
|
zfree(k);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
rcxml_get_nodenames(struct buf *b)
|
|
||||||
{
|
|
||||||
write_to_nodename_buffer = true;
|
|
||||||
nodename_buffer = b;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue