X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=80970661384f7a25f519e2c8b53875f966dc9f17;hp=f263768ed55b652564e4751290af48246a1c5d1c;hb=d9d97a04b6f9597225b8440dad61790dfa39a751;hpb=1cd88a77abb7c32e5ff938e2f4b9392d03d45ec5 diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index f263768..8097066 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.14 2003-02-17 14:35:42 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, @@ -155,14 +168,14 @@ static void cmd_show (ZOOM_connection *c, ZOOM_resultset *r, for (i = 0; i []\n"); printf ("quit\n"); printf ("close \n"); - printf ("set