35 void dump_usage_and_exit() {
37 cout <<
"usage: ht_expand_hostspec <host-specification>" << endl;
39 cout <<
"This program expands a host specification into a" << endl;
40 cout <<
"space-separated list of host names." << endl;
42 quick_exit(EXIT_FAILURE);
50 int main(
int argc,
char **argv) {
53 dump_usage_and_exit();
56 for (
int i=1; i<argc; i++)
57 spec.append(
format(
" (%s)", argv[i]));
62 for (
auto & host : hosts) {
72 quick_exit(EXIT_FAILURE);
75 quick_exit(EXIT_SUCCESS);
Declarations for HostSpecification.
Converts host specification pattern to list of host names.
String format(const char *fmt,...)
Returns a String using printf like format facilities Vanilla snprintf is about 1.5x faster than this...
int main(int argc, char **argv)
const char * get_text(int error)
Returns a descriptive error message.
Compatibility Macros for C/C++.
This is a generic exception class for Hypertable.
A String class based on std::string.
Error codes, Exception handling, error logging.
int code() const
Returns the error code.