X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;ds=sidebyside;f=zoom%2Fzoomsh.c;h=3890467f59e480cde1199d81939f4526749540cf;hb=67940e6310f39f7e289d48a7d1fbb577eca56686;hp=f263768ed55b652564e4751290af48246a1c5d1c;hpb=507901d1ce2fee1278cdf2e7239b3087fb459ce6;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index f263768..3890467 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* - * $Id: zoomsh.c,v 1.9 2002-05-18 09:52:37 oleg Exp $ + * $Id: zoomsh.c,v 1.10 2002-06-02 21:27:17 adam Exp $ * * ZOOM-C Shell */ @@ -76,12 +76,25 @@ static void cmd_set (ZOOM_connection *c, ZOOM_resultset *r, return ; } if (!next_token_copy (args, val, sizeof(val))) + ZOOM_options_set(options, key, 0); + else + ZOOM_options_set(options, key, val); +} + +static void cmd_get (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, + const char **args) +{ + char key[40], val[80]; + if (!next_token_copy (args, key, sizeof(key))) { - const char *val = ZOOM_options_get(options, key); - printf ("%s = %s\n", key, val ? val : ""); + printf ("missing argument for get\n"); } else - ZOOM_options_set(options, key, val); + { + const char *val = ZOOM_options_get(options, key); + printf ("%s = %s\n", key, val ? val : ""); + } } static void cmd_close (ZOOM_connection *c, ZOOM_resultset *r, @@ -173,6 +186,48 @@ static void cmd_show (ZOOM_connection *c, ZOOM_resultset *r, } } +static void cmd_ext (ZOOM_connection *c, ZOOM_resultset *r, + ZOOM_options options, + const char **args) +{ + ZOOM_query s; + ZOOM_package p[MAX_CON]; + + int i; + + for (i = 0; i []\n"); printf ("quit\n"); printf ("close \n"); - printf ("set