projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7673e4a
)
Implemented 'show all' command. Bug #398. Patch by Rob Styles.
author
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 22 Jul 2005 06:23:14 +0000
(06:23 +0000)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Fri, 22 Jul 2005 06:23:14 +0000
(06:23 +0000)
client/client.c
patch
|
blob
|
history
diff --git
a/client/client.c
b/client/client.c
index
f251ae2
..
09d68f5
100644
(file)
--- a/
client/client.c
+++ b/
client/client.c
@@
-2,7
+2,7
@@
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: client.c,v 1.293 2005-06-30 08:34:01 adam Exp $
+ * $Id: client.c,v 1.294 2005-07-22 06:23:14 adam Exp $
*/
#include <stdio.h>
*/
#include <stdio.h>
@@
-133,6
+133,7
@@
static int scan_stepSize = 0;
static int scan_position = 1;
static int scan_size = 20;
static char cur_host[200];
static int scan_position = 1;
static int scan_size = 20;
static char cur_host[200];
+static int last_hit_count = 0;
typedef enum {
QueryType_Prefix,
typedef enum {
QueryType_Prefix,
@@
-1668,6
+1669,7
@@
static int process_searchResponse(Z_SearchResponse *res)
else
printf("Search was a bloomin' failure.\n");
printf("Number of hits: %d", *res->resultCount);
else
printf("Search was a bloomin' failure.\n");
printf("Number of hits: %d", *res->resultCount);
+ last_hit_count = *res->resultCount;
if (setnumber >= 0)
printf (", setno %d", setnumber);
printf ("\n");
if (setnumber >= 0)
printf (", setno %d", setnumber);
printf ("\n");
@@
-2558,7
+2560,15
@@
static void parse_show_args(const char *arg_c, char *setstring,
*p = '\0';
}
if (*arg)
*p = '\0';
}
if (*arg)
- *start = atoi(arg);
+ {
+ if (!strcmp(arg, "all"))
+ {
+ *number = last_hit_count;
+ *start = 1;
+ }
+ else
+ *start = atoi(arg);
+ }
if (p && (p=strchr(p+1, '+')))
strcpy (setstring, p+1);
else if (setnumber >= 0)
if (p && (p=strchr(p+1, '+')))
strcpy (setstring, p+1);
else if (setnumber >= 0)
@@
-2666,6
+2676,7
@@
static void close_session (void)
odr_reset(out);
odr_reset(in);
odr_reset(print);
odr_reset(out);
odr_reset(in);
odr_reset(print);
+ last_hit_count = 0;
}
void process_close(Z_Close *req)
}
void process_close(Z_Close *req)