mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Code style tweak
This commit is contained in:
parent
d2e891ab2e
commit
634c80490a
1 changed files with 13 additions and 15 deletions
|
|
@ -1501,22 +1501,20 @@ rcxml_read(const char *filename)
|
||||||
stream = fopen(rcxml, "r");
|
stream = fopen(rcxml, "r");
|
||||||
if (!stream) {
|
if (!stream) {
|
||||||
wlr_log(WLR_ERROR, "cannot read (%s)", rcxml);
|
wlr_log(WLR_ERROR, "cannot read (%s)", rcxml);
|
||||||
}
|
} else {
|
||||||
else
|
wlr_log(WLR_INFO, "read config file %s", rcxml);
|
||||||
{
|
buf_init(&b);
|
||||||
wlr_log(WLR_INFO, "read config file %s", rcxml);
|
while (getline(&line, &len, stream) != -1) {
|
||||||
buf_init(&b);
|
char *p = strrchr(line, '\n');
|
||||||
while (getline(&line, &len, stream) != -1) {
|
if (p) {
|
||||||
char *p = strrchr(line, '\n');
|
*p = '\0';
|
||||||
if (p) {
|
}
|
||||||
*p = '\0';
|
buf_add(&b, line);
|
||||||
}
|
}
|
||||||
buf_add(&b, line);
|
free(line);
|
||||||
}
|
fclose(stream);
|
||||||
free(line);
|
rcxml_parse_xml(&b);
|
||||||
fclose(stream);
|
free(b.buf);
|
||||||
rcxml_parse_xml(&b);
|
|
||||||
free(b.buf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post_processing();
|
post_processing();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue