diff --git a/pvtoolsSrc/eget.cpp b/pvtoolsSrc/eget.cpp index 8a347c3..7ae6b8a 100644 --- a/pvtoolsSrc/eget.cpp +++ b/pvtoolsSrc/eget.cpp @@ -1028,9 +1028,9 @@ string request(DEFAULT_REQUEST); void usage (void) { fprintf (stderr, "\nUsage: eget [options] [... | -s ]\n\n" - " -h: Help: Print this message\n" - " -v: Print version and exit\n" "\noptions:\n" + " -h: Help: Print this message\n" + " -V: Print version and exit\n" " -s : Service API compliant based RPC service name (accepts NTURI request argument)\n" " -a : Service argument in 'name[=value]' or 'name value' form\n" " -r : Get request string, specifies what fields to return and options, default is '%s'\n" @@ -1459,12 +1459,12 @@ int main (int argc, char *argv[]) setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */ - while ((opt = getopt(argc, argv, ":hvr:s:a:w:zNtTmxp:qdcF:f:ni")) != -1) { + while ((opt = getopt(argc, argv, ":hVr:s:a:w:zNtTmxp:qdcF:f:ni")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; - case 'v': /* Print version */ + case 'V': /* Print version */ { Version version("eget", "cpp", EPICS_PVA_MAJOR_VERSION, diff --git a/pvtoolsSrc/pvget.cpp b/pvtoolsSrc/pvget.cpp index d2cec37..2edc16a 100644 --- a/pvtoolsSrc/pvget.cpp +++ b/pvtoolsSrc/pvget.cpp @@ -53,15 +53,16 @@ char fieldSeparator = ' '; void usage (void) { fprintf (stderr, "\nUsage: pvget [options] ...\n\n" - " -h: Help: Print this message\n" - " -v: Print version and exit\n" "\noptions:\n" + " -h: Help: Print this message\n" + " -V: Print version and exit\n" " -r : Request, specifies what fields to return and options, default is '%s'\n" " -w : Wait time, specifies timeout, default is 3 seconds for get, inf. for monitor\n" " -t: Terse mode - print only value, without names\n" " -i: Do not format standard types (enum_t, time_t, ...)\n" " -m: Monitor mode\n" " -p : Set default provider name, default is '%s'\n" + " -v: Show entire structure\n" " -q: Quiet mode, print only error messages\n" " -d: Enable debug output\n" " -F : Use as an alternate output field separator\n" @@ -365,12 +366,15 @@ int main (int argc, char *argv[]) // ================ Parse Arguments - while ((opt = getopt(argc, argv, ":hvRr:w:tmp:qdcF:f:ni")) != -1) { + while ((opt = getopt(argc, argv, ":hvVRr:w:tmp:qdcF:f:ni")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; - case 'v': /* Print version */ + case 'v': + mode = StructureMode; + break; + case 'V': /* Print version */ { Version version("pvget", "cpp", EPICS_PVA_MAJOR_VERSION, diff --git a/pvtoolsSrc/pvinfo.cpp b/pvtoolsSrc/pvinfo.cpp index babef3c..3a30dde 100644 --- a/pvtoolsSrc/pvinfo.cpp +++ b/pvtoolsSrc/pvinfo.cpp @@ -34,9 +34,9 @@ const string noAddress; void usage (void) { fprintf (stderr, "\nUsage: pvinfo [options] ...\n\n" - " -h: Help: Print this message\n" - " -v: Print version and exit\n" "\noptions:\n" + " -h: Help: Print this message\n" + " -V: Print version and exit\n" " -w : Wait time, specifies timeout, default is %f second(s)\n" " -p : Set default provider name, default is '%s'\n" " -d: Enable debug output\n" @@ -70,12 +70,12 @@ int main (int argc, char *argv[]) setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */ - while ((opt = getopt(argc, argv, ":hvw:p:dc")) != -1) { + while ((opt = getopt(argc, argv, ":hVw:p:dc")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; - case 'v': /* Print version */ + case 'V': /* Print version */ { Version version("pvinfo", "cpp", EPICS_PVA_MAJOR_VERSION, diff --git a/pvtoolsSrc/pvlist.cpp b/pvtoolsSrc/pvlist.cpp index ebbc7b6..090ec1b 100644 --- a/pvtoolsSrc/pvlist.cpp +++ b/pvtoolsSrc/pvlist.cpp @@ -449,9 +449,9 @@ bool discoverServers(double timeOut) void usage (void) { fprintf (stderr, "\nUsage: pvlist [options] []...\n\n" - " -h: Help: Print this message\n" - " -v: Print version and exit\n" "\noptions:\n" + " -h: Help: Print this message\n" + " -V: Print version and exit\n" " -i Print server info (when server address list/GUID is given)\n" " -w : Wait time, specifies timeout, default is %f second(s)\n" " -q: Quiet mode, print only error messages\n" @@ -498,12 +498,12 @@ int main (int argc, char *argv[]) */ setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */ - while ((opt = getopt(argc, argv, ":hvw:qdF:f:i")) != -1) { + while ((opt = getopt(argc, argv, ":hVw:qdF:f:i")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(); return 0; - case 'v': /* Print version */ + case 'V': /* Print version */ { Version version("pvlist", "cpp", EPICS_PVA_MAJOR_VERSION, diff --git a/pvtoolsSrc/pvput.cpp b/pvtoolsSrc/pvput.cpp index 88b0b9d..8a36926 100644 --- a/pvtoolsSrc/pvput.cpp +++ b/pvtoolsSrc/pvput.cpp @@ -68,13 +68,14 @@ void usage (bool details=false) #endif fprintf (stderr, "\n" + "\noptions:\n" " -h: Help: Print this message\n" " -v: Print version and exit\n" - "\noptions:\n" " -r : Request, specifies what fields to return and options, default is '%s'\n" " -w : Wait time, specifies timeout, default is %f second(s)\n" " -t: Terse mode - print only successfully written value, without names\n" " -p : Set default provider name, default is '%s'\n" + " -v: Show entire structure\n" " -q: Quiet mode, print only error messages\n" " -d: Enable debug output\n" " -F : Use as an alternate output field separator\n" @@ -406,12 +407,15 @@ int main (int argc, char *argv[]) setvbuf(stdout,NULL,_IOLBF,BUFSIZ); /* Set stdout to line buffering */ putenv(const_cast("POSIXLY_CORRECT=")); /* Behave correct on GNU getopt systems; e.g. handle negative numbers */ - while ((opt = getopt(argc, argv, ":hvr:w:tp:qdF:f:ns")) != -1) { + while ((opt = getopt(argc, argv, ":hvVr:w:tp:qdF:f:ns")) != -1) { switch (opt) { case 'h': /* Print usage */ usage(true); return 0; - case 'v': /* Print version */ + case 'v': + mode = StructureMode; + break; + case 'V': /* Print version */ { Version version("pvput", "cpp", EPICS_PVA_MAJOR_VERSION,