+ // Insert individual records in cache
+ int i;
+ for (i = 0; i < npr->num_records; i++)
+ {
+ RecordCache_Entry *entry = (RecordCache_Entry *)
+ nmem_malloc(m_p->nmem, sizeof(*entry));
+ entry->m_record =
+ yaz_clone_z_NamePlusRecord(npr->records[i], m_p->nmem);
+ entry->m_comp = yaz_clone_z_RecordComposition(comp, m_p->nmem);
+ entry->m_offset = i + start;
+ entry->m_next = m_p->entries;
+ m_p->entries = entry;
+ }
+}
+
+void RecordCache::add(ODR o, Z_NamePlusRecordList *npr, int start,
+ int hits)
+{