X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=1bff1d4a2ed93f7e7e22c419c30fa9338ec3c318;hp=3bd5fe4f39510efe91236c6b94ec4c3ecc52d079;hb=131f137354647cefe2e3494bdb946d77b8c2e959;hpb=6aed21d6613e5071a29885e1e1575c890adc3e0e diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 3bd5fe4..1bff1d4 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,8 +1,6 @@ -/* - * Copyright (C) 1995-2007, Index Data ApS +/* This file is part of the YAZ toolkit. + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. - * - * $Id: zoomsh.c,v 1.50 2007-09-11 15:16:20 adam Exp $ */ /** \file zoomsh.c @@ -175,7 +173,7 @@ static void cmd_close(ZOOM_connection *c, ZOOM_resultset *r, static void display_records(ZOOM_connection c, ZOOM_resultset r, - int start, int count) + int start, int count, const char *type) { int i; for (i = 0; i= 0) ZOOM_options_set(options, "start", start_str); - if (next_token_copy(args, count_str, sizeof(count_str)) >= 0) - ZOOM_options_set(options, "count", count_str); + if (next_token_copy(args, count_str, sizeof(count_str)) <= 0) + strcpy(count_str, "1"); + ZOOM_options_set(options, "count", count_str); + + if (next_token_copy(args, render_str, sizeof(render_str)) >= 0) + type = render_str; for (i = 0; i\n"); printf("search \n"); - printf("show [ []\n"); + printf("show [ [ [\n"); printf("quit\n"); printf("close \n"); @@ -675,6 +687,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab