2020-06-08 19:53:12 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <unistd.h>
|
|
|
|
|
|
2020-08-03 20:56:38 +01:00
|
|
|
#include "config/rcxml.h"
|
2020-07-31 21:31:03 +01:00
|
|
|
#include "common/buf.h"
|
2020-06-08 19:53:12 +01:00
|
|
|
|
|
|
|
|
struct rcxml rc = { 0 };
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
|
{
|
2020-06-09 22:01:19 +01:00
|
|
|
struct buf b;
|
|
|
|
|
|
2020-06-08 19:53:12 +01:00
|
|
|
if (argc != 2) {
|
|
|
|
|
fprintf(stderr, "usage: %s <rc.xml file>\n", argv[0]);
|
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
|
}
|
2020-06-09 22:01:19 +01:00
|
|
|
buf_init(&b);
|
|
|
|
|
rcxml_get_nodenames(&b);
|
2020-06-08 19:53:12 +01:00
|
|
|
rcxml_read(argv[1]);
|
2020-06-09 22:01:19 +01:00
|
|
|
printf("%s", b.buf);
|
|
|
|
|
free(b.buf);
|
2020-06-08 19:53:12 +01:00
|
|
|
}
|