mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
Don't remove newlines when parsing config, menu and XBM
Removing newlines in rc.xml and menu.xml caused parser error with following content: <!-- - - Some comments - --> ...though it is a valid XML. Let's not do that. I moved `grab_file()` to `buf.c` and renamed it to `buf_from_file()`, because it now directly touches `struct buf` and I don't like having a source file only for one function.
This commit is contained in:
parent
eebf5b3e4e
commit
7f67b9c866
8 changed files with 50 additions and 101 deletions
|
|
@ -109,4 +109,11 @@ void buf_reset(struct buf *s);
|
|||
*/
|
||||
void buf_move(struct buf *dst, struct buf *src);
|
||||
|
||||
/**
|
||||
* buf_from_file - read file into memory buffer
|
||||
* @filename: file to read
|
||||
* Free returned buffer with buf_reset().
|
||||
*/
|
||||
struct buf buf_from_file(const char *filename);
|
||||
|
||||
#endif /* LABWC_BUF_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue