// assign cluster or record based on merge action
if (ser_md->merge == Metadata_merge_unique)
{
- struct record_metadata *mnode;
- for (mnode = *wheretoput; mnode; mnode = mnode->next)
- if (!strcmp((const char *) mnode->data.text.disp,
+ while (*wheretoput)
+ {
+ if (!strcmp((const char *) (*wheretoput)->data.text.disp,
rec_md->data.text.disp))
break;
- if (!mnode)
- {
- rec_md->next = *wheretoput;
- *wheretoput = rec_md;
+ wheretoput = &(*wheretoput)->next;
}
+ if (!*wheretoput)
+ *wheretoput = rec_md;
}
else if (ser_md->merge == Metadata_merge_longest)
{
}
else if (ser_md->merge == Metadata_merge_all)
{
- rec_md->next = *wheretoput;
+ while (*wheretoput)
+ wheretoput = &(*wheretoput)->next;
*wheretoput = rec_md;
}
else if (ser_md->merge == Metadata_merge_range)
<md-title>How to program a computer</md-title>
<md-author>Jack Collins</md-author>
-<md-lccn>11224467</md-lccn>
-<md-lccn>11224466</md-lccn><location id="z3950.indexdata.com/marc" name="Index Data MARC test server">
+<md-lccn>11224466</md-lccn>
+<md-lccn>11224467</md-lccn><location id="z3950.indexdata.com/marc" name="Index Data MARC test server">
<md-title>How to program a computer</md-title>
<md-author>Jack Collins</md-author>
<md-id>11224467</md-id>
<md-title>How to program a computer</md-title>
<md-author>Jack Collins</md-author>
-<md-lccn>11224467</md-lccn>
-<md-lccn>11224466</md-lccn><location id="z3950.indexdata.com/marc" name="Index Data MARC test server">
+<md-lccn>11224466</md-lccn>
+<md-lccn>11224467</md-lccn><location id="z3950.indexdata.com/marc" name="Index Data MARC test server">
<md-title>How to program a computer</md-title>
<md-author>Jack Collins</md-author>
<md-id>11224467</md-id>