From a849f198b28a49d2bba72b53437ff960f0e3f04f Mon Sep 17 00:00:00 2001 From: skarg Date: Fri, 19 Jan 2007 19:18:03 +0000 Subject: [PATCH] change the help usage text. --- bacnet-stack/demo/writeprop/writeprop.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bacnet-stack/demo/writeprop/writeprop.c b/bacnet-stack/demo/writeprop/writeprop.c index afec60e0..cede3d72 100644 --- a/bacnet-stack/demo/writeprop/writeprop.c +++ b/bacnet-stack/demo/writeprop/writeprop.c @@ -29,6 +29,7 @@ #include #include #include /* for time */ +#include #include #include "bactext.h" #include "iam.h" @@ -159,9 +160,10 @@ int main(int argc, char *argv[]) if (argc < 7) { /* note: priority 16 and 0 should produce the same end results... */ printf("Usage: %s device-instance object-type object-instance " - "property tag value [priority] [index]\r\n" - "\r\n" - "device-instance:\r\n" + "property tag value [priority] [index]\r\n", + filename_remove_path(argv[0])); + if ((argc > 1) && (strcmp(argv[1],"--help") == 0)) { + printf("device-instance:\r\n" "BACnet Device Object Instance number that you are trying to\r\n" "communicate to. This number will be used to try and bind with\r\n" "the device using Who-Is and I-Am services. For example, if you were\r\n" @@ -225,8 +227,8 @@ int main(int argc, char *argv[]) "%s 123 1 0 85 4 100\r\n" "You could also send a relinquish command:\r\n" "%s 123 1 0 85 0 0\r\n", - filename_remove_path(argv[0]), filename_remove_path(argv[0]), filename_remove_path(argv[0])); + } return 0; } /* decode the command line parameters */