changeset 640:51dd01786d25 dev-1_5_0

Update to work with changed th_args API.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 22 Nov 2014 23:38:57 +0200
parents 02e1307e2a62
children 4bb6557c2b44
files main.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main.c	Fri Jul 04 02:18:52 2014 +0300
+++ b/main.c	Sat Nov 22 23:38:57 2014 +0200
@@ -111,9 +111,9 @@
 
 /* Arguments
  */
-optarg_t optList[] =
+static const th_optarg_t optList[] =
 {
-    { 0, '?', "help",       "Show this help", OPT_NONE },
+    { 0, '?', "help",       "Show this help and be so very much verbose that it almost hurts you", OPT_NONE },
     { 1, 'v', "verbose",    "Be more verbose", OPT_NONE },
     { 2, 'p', "port",       "Connect to port", OPT_ARGREQ },
     { 3, 's', "server",     "Server to connect to", OPT_ARGREQ },
@@ -127,7 +127,7 @@
     {13, 'r', "room",       "Connect to room (main, pit)", OPT_ARGREQ },
 };
 
-const int optListN = (sizeof(optList) / sizeof(optList[0]));
+static const int optListN = sizeof(optList) / sizeof(optList[0]);
 
 
 void argShowHelp(void)
@@ -135,7 +135,7 @@
     int i;
     th_print_banner(stdout, th_prog_name, "[options] <username> <password>");
 
-    th_args_help(stdout, optList, optListN);
+    th_args_help(stdout, optList, optListN, 0);
 
     printf(
     "\n"
@@ -2157,7 +2157,7 @@
 
     // Parse command line arguments
     argsOK = th_args_process(argc, argv, optList, optListN,
-                             argHandleOpt, argHandleFile, FALSE);
+                             argHandleOpt, argHandleFile, 0);
 
     if (optUserNameCmd != NULL)
     {