mirror of
https://github.com/debauchee/barrier.git
synced 2024-12-23 19:12:14 +03:00
clean up --help output for barriers/barrierc at kloetzl's request. ref commit 63a7936
This commit is contained in:
parent
63a7936e9f
commit
d75bdb8ec0
@ -59,6 +59,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <sstream>
|
||||
|
||||
#define RETRY_TIME 1.0
|
||||
|
||||
@ -119,35 +120,25 @@ ClientApp::help()
|
||||
# define WINAPI_INFO
|
||||
#endif
|
||||
|
||||
char buffer[2000];
|
||||
sprintf(
|
||||
buffer,
|
||||
"Start the barrier client and connect to a remote server component.\n"
|
||||
"\n"
|
||||
"Usage: %s"
|
||||
" [--yscroll <delta>]"
|
||||
WINAPI_ARG
|
||||
HELP_SYS_ARGS
|
||||
HELP_COMMON_ARGS
|
||||
" <server-address>"
|
||||
"\n\n"
|
||||
"Options:\n"
|
||||
HELP_COMMON_INFO_1
|
||||
WINAPI_INFO
|
||||
HELP_SYS_INFO
|
||||
" --yscroll <delta> defines the vertical scrolling delta, which is\n"
|
||||
" 120 by default.\n"
|
||||
HELP_COMMON_INFO_2
|
||||
"\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"
|
||||
"default port, %d.\n",
|
||||
args().m_pname, kDefaultPort
|
||||
);
|
||||
std::ostringstream buffer;
|
||||
buffer << "Start the barrier client and connect to a remote server component." << std::endl
|
||||
<< std::endl
|
||||
<< "Usage: " << args().m_pname << " [--yscroll <delta>]" << WINAPI_ARG << HELP_SYS_ARGS
|
||||
<< HELP_COMMON_ARGS << " <server-address>" << std::endl
|
||||
<< std::endl
|
||||
<< "Options:" << std::endl
|
||||
<< HELP_COMMON_INFO_1 << WINAPI_INFO << HELP_SYS_INFO
|
||||
<< " --yscroll <delta> defines the vertical scrolling delta, which is" << std::endl
|
||||
<< " 120 by default." << std::endl
|
||||
<< HELP_COMMON_INFO_2
|
||||
<< std::endl
|
||||
<< "Default options are marked with a *" << std::endl
|
||||
<< std::endl
|
||||
<< "The server address is of the form: [<hostname>][:<port>]. The hostname" << std::endl
|
||||
<< "must be the address or hostname of the server. The port overrides the" << std::endl
|
||||
<< "default port, " << kDefaultPort << "." << std::endl;
|
||||
|
||||
LOG((CLOG_PRINT "%s", buffer));
|
||||
LOG((CLOG_PRINT "%s", buffer.str().c_str()));
|
||||
}
|
||||
|
||||
const char*
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
//
|
||||
// ServerApp
|
||||
@ -120,43 +121,31 @@ ServerApp::help()
|
||||
# define WINAPI_INFO
|
||||
#endif
|
||||
|
||||
char buffer[3000];
|
||||
sprintf(
|
||||
buffer,
|
||||
"Start the barrier server component.\n"
|
||||
"\n"
|
||||
"Usage: %s"
|
||||
" [--address <address>]"
|
||||
" [--config <pathname>]"
|
||||
WINAPI_ARGS
|
||||
HELP_SYS_ARGS
|
||||
HELP_COMMON_ARGS
|
||||
"\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
|
||||
WINAPI_INFO
|
||||
HELP_SYS_INFO
|
||||
HELP_COMMON_INFO_2
|
||||
"\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"
|
||||
"The default is to listen on all interfaces. The port overrides the\n"
|
||||
"default port, %d.\n"
|
||||
"\n"
|
||||
"If no configuration file pathname is provided then the first of the\n"
|
||||
"following to load successfully sets the configuration:\n"
|
||||
" $HOME/%s\n"
|
||||
" %s\n",
|
||||
args().m_pname, kDefaultPort,
|
||||
USR_CONFIG_NAME,
|
||||
ARCH->concatPath(ARCH->getSystemDirectory(), SYS_CONFIG_NAME).c_str()
|
||||
);
|
||||
std::ostringstream buffer;
|
||||
buffer << "Start the barrier server component." << std::endl
|
||||
<< std::endl
|
||||
<< "Usage: " << args().m_pname
|
||||
<< " [--address <address>]"
|
||||
<< " [--config <pathname>]"
|
||||
<< WINAPI_ARGS << HELP_SYS_ARGS << HELP_COMMON_ARGS << std::endl
|
||||
<< std::endl
|
||||
<< "Options:" << std::endl
|
||||
<< " -a, --address <address> listen for clients on the given address." << std::endl
|
||||
<< " -c, --config <pathname> use the named configuration file instead." << std::endl
|
||||
<< HELP_COMMON_INFO_1 << WINAPI_INFO << HELP_SYS_INFO << HELP_COMMON_INFO_2 << std::endl
|
||||
<< "Default options are marked with a *" << std::endl
|
||||
<< std::endl
|
||||
<< "The argument for --address is of the form: [<hostname>][:<port>]. The" << std::endl
|
||||
<< "hostname must be the address or hostname of an interface on the system." << std::endl
|
||||
<< "The default is to listen on all interfaces. The port overrides the" << std::endl
|
||||
<< "default port, " << kDefaultPort << "." << std::endl
|
||||
<< std::endl
|
||||
<< "If no configuration file pathname is provided then the first of the" << std::endl
|
||||
<< "following to load successfully sets the configuration:" << std::endl
|
||||
<< " $HOME/" << USR_CONFIG_NAME << std::endl
|
||||
<< " " << ARCH->concatPath(ARCH->getSystemDirectory(), SYS_CONFIG_NAME) << std::endl;
|
||||
|
||||
LOG((CLOG_PRINT "%s", buffer));
|
||||
LOG((CLOG_PRINT "%s", buffer.str().c_str()));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user