Client - Quit when --help/-h is passed
[tpg/opendispense2.git] / src / client / main.c
index 4dd70df..ede9290 100644 (file)
@@ -149,6 +149,8 @@ void ShowUsage(void)
                        "        Show help text\n"
                        "    -G\n"
                        "        Use simple textual interface (instead of ncurses)\n"
+                       "    -D\n"
+                       "        Drinks only in user interface\n"
                        "    -n\n"
                        "        Dry run - Do not actually do dispenses\n"
                        "    -m <min balance>\n"
@@ -156,6 +158,10 @@ void ShowUsage(void)
                        "        Set the Maximum/Minimum balances shown in `dispense acct`\n"
                        "    -f <configfile>\n"
                        "        Set the config file path (default: `/etc/opendispense/client.conf'\n"
+                       "    -H <host>\n"
+                       "        Set a different dispense host\n"
+                       "    -P <port>\n"
+                       "        Set a different dispense port\n"
                        "Definitions:\n"
                        "    <itemid>\n"
                        "        Item ID of the form <type>:<num> where <type> is a non-empty string of alpha-numeric characters, and <num> is a non-negative integer\n"
@@ -849,7 +855,7 @@ int ParseArguments(int argc, char *argv[])
                        case 'h':
                        case '?':
                                ShowUsage();
-                               return 0;
+                               exit(0);
                                        
                        case 'c':
                                if( i > 2 && strcmp(argv[i-1], "type") == 0 )
@@ -944,7 +950,7 @@ int ParseArguments(int argc, char *argv[])
                        case '-':
                                if( strcmp(argv[i], "--help") == 0 ) {
                                        ShowUsage();
-                                       return 0;
+                                       exit(0);
                                }
                                else if( strcmp(argv[i], "--dry-run") == 0 ) {
                                        gbDryRun = 1;

UCC git Repository :: git.ucc.asn.au