X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=af47ecd957a508a0e094bea231f951a223569986;hb=9ee70f4c22c4990e7fe62a5238caa6b4e71f6a0f;hp=c6b29ae16237e68906aae0bdceba7d069fad7e98;hpb=b0555501e434d0f71f97ea17f282db2e795ff950;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index c6b29ae..af47ecd 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,9 +1,12 @@ /* - * $Id: zoomsh.c,v 1.22 2003-07-10 11:50:32 mike Exp $ + * Copyright (c) 2002-2004, Index Data. + * See the file LICENSE for details. * - * ZOOM-C Shell + * $Id: zoomsh.c,v 1.27 2004-02-23 09:26:11 adam Exp $ */ +/* ZOOM-C Shell */ + #include #include #include @@ -153,8 +156,9 @@ static void display_records (ZOOM_connection c, int pos = i + start; ZOOM_record rec = ZOOM_resultset_record (r, pos); const char *db = ZOOM_record_get (rec, "database", 0); - int len; + int len, opac_len; const char *render = ZOOM_record_get (rec, "render", &len); + const char *opac_render = ZOOM_record_get (rec, "opac", &opac_len); const char *syntax = ZOOM_record_get (rec, "syntax", 0); /* if rec is non-null, we got a record for display */ if (rec) @@ -166,7 +170,10 @@ static void display_records (ZOOM_connection c, if (render) fwrite (render, 1, len, stdout); printf ("\n"); + if (opac_render) + fwrite (opac_render, 1, opac_len, stdout); } + } } @@ -216,15 +223,19 @@ static void cmd_ext (ZOOM_connection *c, ZOOM_resultset *r, const char **args) { ZOOM_package p[MAX_CON]; + char ext_type_str[10]; int i; + + if (next_token_copy (args, ext_type_str, sizeof(ext_type_str)) < 0) + return; for (i = 0; i