From: mfranz Date: Wed, 12 Nov 2008 14:41:01 +0000 (+0000) Subject: positive error return values, variable name change X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7fb8c28ac62cb7e4ffe97e7dd3d605c50d221ec4;p=flightgear.git positive error return values, variable name change --- diff --git a/utils/propmerge/propmerge.cxx b/utils/propmerge/propmerge.cxx index 288e80bb6..ab4637900 100644 --- a/utils/propmerge/propmerge.cxx +++ b/utils/propmerge/propmerge.cxx @@ -18,13 +18,13 @@ int main(int argc, char *argv[]) { if (argc < 2) { usage(); - return -1; + return 1; } sglog().setLogLevels(SG_ALL, SG_ALERT); int numfiles = 0; - string out; + string outfile; SGPropertyNode root; for (int i = 1; i < argc; i++) { @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) if (s == "-o" || s == "--output") { if (i + 1 == argc) break; - out = argv[++i]; + outfile = argv[++i]; continue; } @@ -46,24 +46,24 @@ int main(int argc, char *argv[]) numfiles++; } catch (const sg_exception &e) { cerr << "Error: " << e.getFormattedMessage() << endl; - return -2; + return 2; } } if (!numfiles) { cerr << "Error: Nothing to merge." << endl; - return -3; + return 3; } try { - if (out.empty()) + if (outfile.empty()) writeProperties(cout, &root, true); else - writeProperties(out, &root, true); + writeProperties(outfile, &root, true); } catch (const sg_exception &e) { cerr << "Error: " << e.getFormattedMessage() << endl; - return -4; + return 4; } return 0;