X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=c2a9381dd39ba0b7c34aa5a10fc51fe3298cd612;hp=df83cdb0340ba2427724a8c3f936ec61a8104c73;hb=16cec0c7730f9ae5ce52a12a66d139e02cb806c0;hpb=2788a4851b551e1a3efb320a2878b809f2d8a9d7 diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index df83cdb..c2a9381 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2009 Index Data + * Copyright (C) 1995-2010 Index Data * See the file LICENSE for details. */ @@ -12,8 +12,6 @@ #include #include -#include - #if HAVE_READLINE_READLINE_H #include #endif @@ -21,10 +19,7 @@ #include #endif -#include - #include -#include #include #define MAX_CON 100 @@ -173,12 +168,12 @@ static void cmd_close(ZOOM_connection *c, ZOOM_resultset *r, static void display_records(ZOOM_connection c, ZOOM_resultset r, - int start, int count) + size_t start, size_t 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); + { + char start_str[30], count_str[30]; + if (next_token_copy(args, start_str, sizeof(start_str)) > 0) + start = atoi(start_str); + + if (next_token_copy(args, count_str, sizeof(count_str)) > 0) + count = atoi(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"); @@ -496,6 +495,7 @@ static void cmd_help(ZOOM_connection *c, ZOOM_resultset *r, printf(" implementationName\n"); printf(" charset\n"); printf(" lang\n"); + printf(" timeout\n"); } static void cmd_connect(ZOOM_connection *c, ZOOM_resultset *r, @@ -682,6 +682,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