mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
src/config/rcxml.c: optionally write nodenames to buffer
This commit is contained in:
parent
bc51e0ad2f
commit
1f5d8c3812
4 changed files with 19 additions and 9 deletions
|
|
@ -3,16 +3,22 @@
|
|||
#include <unistd.h>
|
||||
|
||||
#include "rcxml.h"
|
||||
#include "buf.h"
|
||||
|
||||
struct rcxml rc = { 0 };
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
struct buf b;
|
||||
|
||||
if (argc != 2) {
|
||||
fprintf(stderr, "usage: %s <rc.xml file>\n", argv[0]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
buf_init(&b);
|
||||
rcxml_init(&rc);
|
||||
rcxml_set_verbose();
|
||||
rcxml_get_nodenames(&b);
|
||||
rcxml_read(argv[1]);
|
||||
printf("%s", b.buf);
|
||||
free(b.buf);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue