* Chas Woodfield, Fretwell Downing Datasystems.
*
* $Log: ztest.c,v $
- * Revision 1.13 1998-08-19 16:10:09 adam
+ * Revision 1.16 1998-10-15 08:26:23 adam
+ * Added type cast to make C++ happy.
+ *
+ * Revision 1.15 1998/10/13 20:05:57 adam
+ * Minor change.
+ *
+ * Revision 1.14 1998/10/13 16:12:25 adam
+ * Added support for Surrogate Diagnostics for Scan Term entries.
+ *
+ * Revision 1.13 1998/08/19 16:10:09 adam
* Changed som member names of DeleteResultSetRequest/Response.
*
* Revision 1.12 1998/07/20 12:38:44 adam
sprintf(buf, "This is dummy SUTRS record number %d\n", q->number);
r->len = strlen(buf);
- r->record = odr_malloc (q->stream, r->len+1);
+ r->record = (char *) odr_malloc (q->stream, r->len+1);
strcpy(r->record, buf);
}
else if (q->format == VAL_GRS1)
*/
bend_scanresult *bend_scan(void *handle, bend_scanrequest *q, int *fd)
{
- bend_scanresult *r = (bend_scanresult *) odr_malloc (q->stream, sizeof(*r));
+ bend_scanresult *r = (bend_scanresult *)
+ odr_malloc (q->stream, sizeof(*r));
static FILE *f = 0;
static struct scan_entry list[200];
static char entries[200][80];
po = pos - r->term_position + r->num_entries + 1; /* find pos */
if (po < 0)
po += 200;
- list[r->num_entries].term = entries[po];
- list[r->num_entries].occurrences = hits[po];
+
+ if (!strcmp (term, "SD") && r->num_entries == 2)
+ {
+ list[r->num_entries].term = entries[pos];
+ list[r->num_entries].occurrences = -1;
+ list[r->num_entries].errcode = 233;
+ list[r->num_entries].errstring = "SD for Scan Term";
+ }
+ else
+ {
+ list[r->num_entries].term = entries[po];
+ list[r->num_entries].occurrences = hits[po];
+ }
}
}
else if (r->num_entries)