# HG changeset patch
# User Chris Cannam <cannam@all-day-breakfast.com>
# Date 1541081098 0
# Node ID b7eec400cd947de113e6022cc7169f4dbd1f7c62
# Parent  71b166bcbcc3f0d57ba7aaf479bae18a68b85a90
Support long options as well

diff -r 71b166bcbcc3 -r b7eec400cd94 vamp-server/simple-server.cpp
--- a/vamp-server/simple-server.cpp	Wed Oct 17 15:43:35 2018 +0100
+++ b/vamp-server/simple-server.cpp	Thu Nov 01 14:04:58 2018 +0000
@@ -91,9 +91,9 @@
         "           " << myname << " -h\n\n"
         "    where\n"
         "       <format>: the format to read and write messages in (\"json\" or \"capnp\")\n"
-        "       -d: also print debug information to stderr\n"
-        "       -v: print version number to stdout and exit\n"
-        "       -h: print this text to stderr and exit\n\n"
+        "       -d, --debug: also print debug information to stderr\n"
+        "       -v, --version: print version number to stdout and exit\n"
+        "       -h, --help: print this text to stderr and exit\n\n"
         "Expects Piper request messages in either Cap'n Proto or JSON format on stdin,\n"
         "and writes response messages in the same format to stdout.\n\n"
         "This server is intended for simple process separation. It's only suitable for\n"
@@ -639,19 +639,19 @@
     bool debug = false;
     
     string arg = argv[1];
-    if (arg == "-h") {
+    if (arg == "-h" || arg == "--help") {
         if (argc == 2) {
             usage(true);
         } else {
             usage();
         }
-    } else if (arg == "-v") {
+    } else if (arg == "-v" || arg == "--version") {
         if (argc == 2) {
             version();
         } else {
             usage();
         }
-    } else if (arg == "-d") {
+    } else if (arg == "-d" || arg == "--debug") {
         if (argc == 2) {
             usage();
         } else {