mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
xbm.c: refactor and load builtin icons as fallback
This commit is contained in:
parent
1330071e0c
commit
8a42bc9184
6 changed files with 86 additions and 63 deletions
|
|
@ -91,10 +91,8 @@ char *xbm_read_file(const char *filename)
|
|||
char *line = NULL;
|
||||
size_t len = 0;
|
||||
FILE *stream = fopen(filename, "r");
|
||||
if (!stream) {
|
||||
fprintf(stderr, "warn: cannot read '%s'\n", filename);
|
||||
if (!stream)
|
||||
return NULL;
|
||||
}
|
||||
struct buf buffer;
|
||||
buf_init(&buffer);
|
||||
while ((getline(&line, &len, stream) != -1)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue