X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=zoom%2Fzoomsh.c;h=0d2047117e95ff3c021bfba6c489c510ede32608;hb=eceac7b7869288887b1b14212208e73ab54116db;hp=01c8e1aaefd511e13797bda5b5afb5574d9c77bc;hpb=5207f60678397943900b4e5f41d563335bf745d1;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 01c8e1a..0d20471 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -168,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, const char *type) + 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) - 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; + { + 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