- const char *line_printer_size_hostname = hostname.c_str();
- //###cerr << "opening " << hostname << ":" << portnum << "\n";
- ZOOM_connection_connect(c, line_printer_size_hostname, portnum);
- //###cerr << "opened\n";
-
- int errcode;
- const char *errmsg; // unused: carries same info as `errcode'
- const char *addinfo;
- if ((errcode = ZOOM_connection_error(c, &errmsg, &addinfo)) != 0) {
- //###cerr << "oops: no connect, errcode=" << errcode << "\n";
- throw bib1Exception(errcode, addinfo);
- }
+ const char *line_printer_size_hostname = hostname.c_str();
+ //###cerr << "opening " << hostname << ":" << portnum << "\n";
+ ZOOM_connection_connect(c, line_printer_size_hostname, portnum);
+ //###cerr << "opened\n";
+
+ int errcode;
+ const char *errmsg; // unused: carries same info as `errcode'
+ const char *addinfo;
+ if ((errcode = ZOOM_connection_error(c, &errmsg, &addinfo)) != 0) {
+ //###cerr << "oops: no connect, errcode=" << errcode << "\n";
+ throw bib1Exception(errcode, addinfo);
+ }
- ZOOM_options o = ZOOM_options_create();
- c = ZOOM_connection_create(o);
- connect(hostname, portnum);
+ ZOOM_options o = ZOOM_options_create();
+ c = ZOOM_connection_create(o);
+ connect(hostname, portnum);
- const char* val = ZOOM_connection_option_get(c, key.c_str());
- return (val) ? val : std::string();
+ const char* val = ZOOM_connection_option_get(c, key.c_str());
+ return (val) ? val : std::string();
- // No way to tell whether ZOOM_connection_option_set() accepts key
- ZOOM_connection_option_set(c, key.c_str(), val.c_str());
- return true;
+ // No way to tell whether ZOOM_connection_option_set() accepts key
+ ZOOM_connection_option_set(c, key.c_str(), val.c_str());
+ return true;