X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=2c93b6e2127c374280a94c8a06358131be750af5;hp=4954a92f4b84c7a76108e86af574996be62ca9dd;hb=7dbee1f341772642df14925d639f03aec2eb3355;hpb=1d20ff81983715581b6a2cbed74878dd40895985 diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 4954a92..2c93b6e 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -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