Add help option

* updated cli option 'help'

- all 5 apps supports cli option '-h' without error exit code
- supports long option '--help'

* fixed bad line brake
This commit is contained in:
Kim
2016-04-21 06:22:58 +08:00
committed by Max Lv
parent 4e41126015
commit dfa9e17c1b
12 changed files with 127 additions and 25 deletions
+10 -4
View File
@@ -205,7 +205,7 @@ void usage()
#endif
printf("\n");
printf(
" -s <server_host> Host name or ip address of your remote server.\n");
" -s <server_host> Host name or IP address of your remote server.\n");
printf(
" -p <server_port> Port number of your remote server.\n");
printf(
@@ -219,9 +219,13 @@ void usage()
printf(
" bf-cfb, camellia-128-cfb, camellia-192-cfb,\n");
printf(
" camellia-256-cfb, cast5-cfb, des-cfb, idea-cfb,\n");
" camellia-256-cfb, cast5-cfb, des-cfb,\n");
printf(
" rc2-cfb, seed-cfb, salsa20 and chacha20.\n");
" idea-cfb, rc2-cfb, seed-cfb, salsa20 and\n");
printf(
" chacha20.\n");
printf(
" The default cipher is tables.\n");
printf("\n");
printf(
" [-a <user>] Run as another user.\n");
@@ -289,7 +293,9 @@ void usage()
#endif
printf("\n");
printf(
" [-v] Verbose mode\n");
" [-v] Verbose mode.\n");
printf(
" [-h, --help] Print this message.\n");
printf("\n");
}