# HG changeset patch # User Matti Hamalainen # Date 1416692337 -7200 # Node ID 51dd01786d25529509ebf1cda827d0b84f603cd5 # Parent 02e1307e2a622ce62bfcb474e9d963ae3d62844d Update to work with changed th_args API. diff -r 02e1307e2a62 -r 51dd01786d25 main.c --- 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] "); - 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) {