+Mon Feb 23 21:58:32 2009 +0200 Eddy Petrișor <
[email protected]>
+
+ * add --help to osm-history, too
+
Mon Feb 23 19:06:50 2009 +0200 Eddy Petrișor <
[email protected]>
* add --help as a possible option to osm-check
@@ -16,8 +16,15 @@ class OsmHistory {
static void Usage ()
{
- Console.WriteLine ("Usage: osm-history node|way|relation id");
- Environment.Exit (1);
+ Usage_r (1);
+ }
+
+ static void Usage_r (int retval)
+ {
+ Console.WriteLine ("Usage:");
+ Console.WriteLine ("\tosm-history node|way|relation id");
+ Console.WriteLine ("\tosm-history --help");
+ Environment.Exit (retval);
}
static string[] GetTags (OsmObject obj)
@@ -216,6 +223,9 @@ class OsmHistory {
int i = 0;
bool out_data = false;
+ if (args.Length > 0 && args [0] == "--help") {
+ Usage_r(0);
+ }
if (args.Length > 0 && args [0] == "--out") {
out_data = true;
i++;