update manpages and --help output. fixes #23

This commit is contained in:
walker0643
2018-03-13 16:55:07 -04:00
parent 3389a980ea
commit 63a7936e9f
8 changed files with 129 additions and 70 deletions

View File

@@ -160,7 +160,7 @@ private:
" -n, --name <screen-name> use screen-name instead the hostname to identify\n" \
" this screen in the configuration.\n" \
" -1, --no-restart do not try to restart on failure.\n" \
"* --restart restart the server automatically if it fails.\n" \
" --restart restart the server automatically if it fails. (*)\n" \
" -l --log <file> write log messages to file.\n" \
" --no-tray disable the system tray icon.\n" \
" --enable-drag-drop enable file drag & drop.\n" \
@@ -183,7 +183,7 @@ private:
" [--daemon|--no-daemon]"
# define HELP_SYS_INFO \
" -f, --no-daemon run in the foreground.\n" \
"* --daemon run as a daemon.\n"
" --daemon run as a daemon. (*)\n"
#elif SYSAPI_WIN32

View File

@@ -112,6 +112,9 @@ ArgParser::parseClientArgs(ClientArgs& args, int argc, const char* const* argv)
}
}
if (args.m_shouldExit)
return true;
// exactly one non-option argument (server-address)
if (i == argc) {
LOG((CLOG_PRINT "%s: a server address or name is required" BYE,

View File

@@ -122,6 +122,8 @@ ClientApp::help()
char buffer[2000];
sprintf(
buffer,
"Start the barrier client and connect to a remote server component.\n"
"\n"
"Usage: %s"
" [--yscroll <delta>]"
WINAPI_ARG
@@ -129,8 +131,7 @@ ClientApp::help()
HELP_COMMON_ARGS
" <server-address>"
"\n\n"
"Connect to a barrier mouse/keyboard sharing server.\n"
"\n"
"Options:\n"
HELP_COMMON_INFO_1
WINAPI_INFO
HELP_SYS_INFO
@@ -138,7 +139,7 @@ ClientApp::help()
" 120 by default.\n"
HELP_COMMON_INFO_2
"\n"
"* marks defaults.\n"
"Default options are marked with a *\n"
"\n"
"The server address is of the form: [<hostname>][:<port>]. The hostname\n"
"must be the address or hostname of the server. The port overrides the\n"

View File

@@ -123,6 +123,8 @@ ServerApp::help()
char buffer[3000];
sprintf(
buffer,
"Start the barrier server component.\n"
"\n"
"Usage: %s"
" [--address <address>]"
" [--config <pathname>]"
@@ -130,8 +132,7 @@ ServerApp::help()
HELP_SYS_ARGS
HELP_COMMON_ARGS
"\n\n"
"Start the barrier mouse/keyboard sharing server.\n"
"\n"
"Options:\n"
" -a, --address <address> listen for clients on the given address.\n"
" -c, --config <pathname> use the named configuration file instead.\n"
HELP_COMMON_INFO_1
@@ -139,7 +140,7 @@ ServerApp::help()
HELP_SYS_INFO
HELP_COMMON_INFO_2
"\n"
"* marks defaults.\n"
"Default options are marked with a *\n"
"\n"
"The argument for --address is of the form: [<hostname>][:<port>]. The\n"
"hostname must be the address or hostname of an interface on the system.\n"
@@ -148,10 +149,10 @@ ServerApp::help()
"\n"
"If no configuration file pathname is provided then the first of the\n"
"following to load successfully sets the configuration:\n"
" %s\n"
" $HOME/%s\n"
" %s\n",
args().m_pname, kDefaultPort,
ARCH->concatPath(ARCH->getUserDirectory(), USR_CONFIG_NAME).c_str(),
USR_CONFIG_NAME,
ARCH->concatPath(ARCH->getSystemDirectory(), SYS_CONFIG_NAME).c_str()
);