Mercurial > hg > nnchat
comparison main.c @ 706:4426bbf3264b
Remove silly.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 29 Feb 2020 12:23:53 +0200 |
parents | d2c7ef3c6d9c |
children | 11eb7c30889e |
comparison
equal
deleted
inserted
replaced
705:cc4478e5a8c3 | 706:4426bbf3264b |
---|---|
121 | 121 |
122 /* Arguments | 122 /* Arguments |
123 */ | 123 */ |
124 static const th_optarg optList[] = | 124 static const th_optarg optList[] = |
125 { | 125 { |
126 { 0, '?', "help", "Show this help and be so very much verbose that it almost hurts you", OPT_NONE }, | 126 { 0, '?', "help", "Show this help", OPT_NONE }, |
127 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, | 127 { 1, 'v', "verbose", "Be more verbose", OPT_NONE }, |
128 { 2, 'p', "port", "Connect to port", OPT_ARGREQ }, | 128 { 2, 'p', "port", "Connect to port", OPT_ARGREQ }, |
129 { 3, 's', "server", "Server to connect to", OPT_ARGREQ }, | 129 { 3, 's', "server", "Server to connect to", OPT_ARGREQ }, |
130 { 4, 'C', "color", "Initial color in RGB hex 000000", OPT_ARGREQ }, | 130 { 4, 'C', "color", "Initial color in RGB hex 000000", OPT_ARGREQ }, |
131 { 6, 'D', "daemon", "A pseudo-daemon mode for logging", OPT_NONE }, | 131 { 6, 'D', "daemon", "A pseudo-daemon mode for logging", OPT_NONE }, |
140 static const int optListN = sizeof(optList) / sizeof(optList[0]); | 140 static const int optListN = sizeof(optList) / sizeof(optList[0]); |
141 | 141 |
142 | 142 |
143 void argShowHelp(void) | 143 void argShowHelp(void) |
144 { | 144 { |
145 int i; | |
146 th_print_banner(stdout, th_prog_name, "[options] <username> <password>"); | 145 th_print_banner(stdout, th_prog_name, "[options] <username> <password>"); |
147 | 146 |
148 th_args_help(stdout, optList, optListN, 0, 80 - 2); | 147 th_args_help(stdout, optList, optListN, 0, 80 - 2); |
149 | 148 |
150 printf( | 149 printf( |
162 "supports user/pass authentication. Default port is %d.\n" | 161 "supports user/pass authentication. Default port is %d.\n" |
163 "\n" | 162 "\n" |
164 "Supported rooms (for option '-r'):\n", | 163 "Supported rooms (for option '-r'):\n", |
165 SET_PROXY_PORT); | 164 SET_PROXY_PORT); |
166 | 165 |
167 for (i = 0; i < nn_room_data_n; i++) | 166 for (int i = 0; i < nn_room_data_n; i++) |
168 { | 167 { |
169 const nn_room_data_t *rdata = &nn_room_data[i]; | 168 const nn_room_data_t *rdata = &nn_room_data[i]; |
170 | 169 |
171 printf(" %-8s - %s (port %d)\n", | 170 printf(" %-8s - %s (port %d)\n", |
172 rdata->name, | 171 rdata->name, |