4 #include <simgear/props/props.hxx>
5 #include <simgear/props/props_io.hxx>
6 #include <simgear/structure/exception.hxx>
13 cerr << "Usage: propmerge [-o <outfile>] <infiles>" << endl;
17 int main(int argc, char *argv[])
24 sglog().setLogLevels(SG_ALL, SG_ALERT);
30 for (int i = 1; i < argc; i++) {
32 if (s == "-h" || s == "--help") {
37 if (s == "-o" || s == "--output") {
45 readProperties(s, &root);
47 } catch (const sg_exception &e) {
48 cerr << "Error: " << e.getFormattedMessage() << endl;
54 cerr << "Error: Nothing to merge." << endl;
60 writeProperties(cout, &root, true);
62 writeProperties(outfile, &root, true);
64 } catch (const sg_exception &e) {
65 cerr << "Error: " << e.getFormattedMessage() << endl;