* Sebastian Hammer, Adam Dickmeiss
*
* $Log: seshigh.c,v $
- * Revision 1.59 1996-05-14 09:26:46 quinn
+ * Revision 1.63 1996-10-11 11:57:26 quinn
+ * Smallish
+ *
+ * Revision 1.62 1996/07/06 19:58:35 quinn
+ * System headerfiles gathered in yconfig
+ *
+ * Revision 1.61 1996/06/10 08:56:16 quinn
+ * Work on Summary.
+ *
+ * Revision 1.60 1996/05/30 11:03:10 quinn
+ * Fixed NextresultSetPosition bug fixed.
+ *
+ * Revision 1.59 1996/05/14 09:26:46 quinn
* Added attribute set to scan backend
*
* Revision 1.58 1996/02/20 12:53:04 quinn
*
*/
+#include <yconfig.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <assert.h>
-#include <sys/time.h>
#include <xmalloc.h>
#include <comstack.h>
int *num, Z_RecordComposition *comp,
int *next, int *pres, oid_value format)
{
- int recno, total_length = 0, toget = *num;
+ int recno, total_length = 0, toget = *num, dumped_records = 0;
static Z_Records records;
static Z_NamePlusRecordList reclist;
static Z_NamePlusRecord *list[MAX_RECORDS];
* allocation done by the backend - this should give us a reasonable
* idea of the total size of the data so far.
*/
- total_length = odr_total(a->encode);
+ total_length = odr_total(a->encode) - dumped_records;
if (reclist.num_records == MAX_RECORDS - 1)
{
*pres = Z_PRES_PARTIAL_2;
reclist.records[reclist.num_records] =
surrogatediagrec(a->proto, fres->basename, 16, 0);
reclist.num_records++;
+ *next = fres->last_in_set ? 0 : recno + 1;
+ dumped_records += this_length;
continue;
}
}
reclist.records[reclist.num_records] =
surrogatediagrec(a->proto, fres->basename, 17, 0);
reclist.num_records++;
+ *next = fres->last_in_set ? 0 : recno + 1;
+ dumped_records += this_length;
continue;
}
}
case VAL_GRS1: thisext->which = Z_External_grs1; break;
case VAL_EXPLAIN: thisext->which = Z_External_explainRecord;
break;
+ case VAL_SUMMARY: thisext->which = Z_External_summary; break;
+ case VAL_OPAC: thisext->which = Z_External_OPAC; break;
default:
logf(LOG_FATAL, "Unknown structured format from backend.");