/*
- * $Id: zoomsh.c,v 1.4 2001-11-15 08:58:29 adam Exp $
+ * $Id: zoomsh.c,v 1.5 2001-11-16 09:52:39 adam Exp $
*
* ZOOM-C Shell
*/
const char *h;
if (!c[i])
continue;
- if ((h = Z3950_connection_host(c[i])) && !strcmp (h, host))
+ if ((h = Z3950_connection_option_get(c[i], "host"))
+ && !strcmp (h, host))
{
Z3950_connection_destroy (c[i]);
c[i] = 0;
continue;
if ((error = Z3950_connection_error(c[i], &errmsg, &addinfo)))
fprintf (stderr, "%s error: %s (%d) %s\n",
- Z3950_connection_host(c[i]), errmsg,
+ Z3950_connection_option_get(c[i], "host"), errmsg,
error, addinfo);
else if (r[i])
{
continue;
if ((error = Z3950_connection_error(c[i], &errmsg, &addinfo)))
fprintf (stderr, "%s error: %s (%d) %s\n",
- Z3950_connection_host(c[i]), errmsg,
+ Z3950_connection_option_get(c[i], "host"), errmsg,
error, addinfo);
else if (r[i])
{
int start = Z3950_options_get_int (options, "start", 0);
int count = Z3950_options_get_int (options, "count", 0);
- printf ("%s: %d hits\n", Z3950_connection_host(c[i]),
+ printf ("%s: %d hits\n", Z3950_connection_option_get(c[i], "host"),
Z3950_resultset_size(r[i]));
/* and display */
display_records (c[i], r[i], start, count);
for (j = -1, i = 0; i<MAX_CON; i++)
{
const char *h;
- if (c[i] && (h = Z3950_connection_host(c[i])) &&
+ if (c[i] && (h = Z3950_connection_option_get(c[i], "host")) &&
!strcmp (h, host))
{
Z3950_connection_destroy (c[i]);
Z3950_connection_connect (c[i], host, 0);
if ((error = Z3950_connection_error(c[i], &errmsg, &addinfo)))
- printf ("%s error: %s (%d) %s\n", Z3950_connection_host(c[i]),
+ printf ("%s error: %s (%d) %s\n",
+ Z3950_connection_option_get(c[i], "host"),
errmsg, error, addinfo);
}