X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=6aedbd06dcadcfca1501e73ec947edaaa33dea50;hb=65efc4dd0a947e1b4620d93c88d771b83bc32dac;hp=f263768ed55b652564e4751290af48246a1c5d1c;hpb=1cd88a77abb7c32e5ff938e2f4b9392d03d45ec5;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index f263768..6aedbd0 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.11 2002-06-05 21:09:20 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]; + 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,47 @@ 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_package p[MAX_CON]; + + int i; + + for (i = 0; i []\n"); printf ("quit\n"); printf ("close \n"); - printf ("set