X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=f263768ed55b652564e4751290af48246a1c5d1c;hb=29b509a56dc168a85a584454cc89ad61662536b0;hp=9f9d0e4e149c6a7750a2be8bddcf59e47a55358a;hpb=bc66c2a11aa31c16f46c49100e99dc9b7e940faf;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 9f9d0e4..f263768 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* - * $Id: zoomsh.c,v 1.2 2001-10-24 12:24:43 adam Exp $ + * $Id: zoomsh.c,v 1.9 2002-05-18 09:52:37 oleg Exp $ * * ZOOM-C Shell */ @@ -64,8 +64,8 @@ static int is_command (const char *cmd_str, const char *this_str, int this_len) return 1; } -static void cmd_set (Z3950_connection *c, Z3950_resultset *r, - Z3950_options options, +static void cmd_set (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, const char **args) { char key[40], val[80]; @@ -77,15 +77,15 @@ static void cmd_set (Z3950_connection *c, Z3950_resultset *r, } if (!next_token_copy (args, val, sizeof(val))) { - const char *val = Z3950_options_get(options, key); + const char *val = ZOOM_options_get(options, key); printf ("%s = %s\n", key, val ? val : ""); } else - Z3950_options_set(options, key, val); + ZOOM_options_set(options, key, val); } -static void cmd_close (Z3950_connection *c, Z3950_resultset *r, - Z3950_options options, +static void cmd_close (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, const char **args) { char host[60]; @@ -96,58 +96,60 @@ static void cmd_close (Z3950_connection *c, Z3950_resultset *r, const char *h; if (!c[i]) continue; - if ((h = Z3950_connection_host(c[i])) && !strcmp (h, host)) + if ((h = ZOOM_connection_option_get(c[i], "host")) + && !strcmp (h, host)) { - Z3950_connection_destroy (c[i]); + ZOOM_connection_destroy (c[i]); c[i] = 0; } else if (*host == '\0') { - Z3950_connection_destroy (c[i]); + ZOOM_connection_destroy (c[i]); c[i] = 0; } } } -static void display_records (Z3950_connection c, - Z3950_resultset r, +static void display_records (ZOOM_connection c, + ZOOM_resultset r, int start, int count) { int i; for (i = 0; i\n"); @@ -250,10 +252,12 @@ static void cmd_help (Z3950_connection *c, Z3950_resultset *r, printf (" user\n"); printf (" pass\n"); printf (" implementationName\n"); + printf (" charset\n"); + printf (" lang\n"); } -static void cmd_connect (Z3950_connection *c, Z3950_resultset *r, - Z3950_options options, +static void cmd_connect (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, const char **args) { int error; @@ -268,10 +272,10 @@ static void cmd_connect (Z3950_connection *c, Z3950_resultset *r, for (j = -1, i = 0; i