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[])
28 for (int i = 1; i < argc; i++) {
30 if (s == "-h" || s == "--help") {
35 if (s == "-o" || s == "--output") {
43 readProperties(s, &root);
45 } catch (const sg_exception &e) {
46 cerr << "Error: " << e.getFormattedMessage() << endl;
52 cerr << "Error: Nothing to merge." << endl;
58 writeProperties(cout, &root, true);
60 writeProperties(out, &root, true);
62 } catch (const sg_exception &e) {
63 cerr << "Error: " << e.getFormattedMessage() << endl;