* Sebastian Hammer, Adam Dickmeiss
*
* $Log: proto.c,v $
- * Revision 1.56 1998-08-19 16:10:04 adam
+ * Revision 1.57 1998-10-20 13:55:37 quinn
+ * Fixed Scan bug in asn and client
+ *
+ * Revision 1.56 1998/08/19 16:10:04 adam
* Changed som member names of DeleteResultSetRequest/Response.
*
* Revision 1.55 1998/02/11 11:53:32 adam
return opt && odr_ok(o);
}
+#ifdef BUGGY_LISTENTRIES
+
int z_Entries(ODR o, Z_Entries **p, int opt)
{
if (o->direction == ODR_DECODE)
return opt && odr_ok(o);
}
+#endif
+
+int z_ListEntries (ODR o, Z_ListEntries **p, int opt)
+{
+ if (!odr_sequence_begin (o, p, sizeof(**p)))
+ return opt && odr_ok (o);
+ return
+ odr_implicit_settag (o, ODR_CONTEXT, 1) &&
+ (odr_sequence_of(o, (Odr_fun) z_Entry, &(*p)->entries,
+ &(*p)->num_entries) || odr_ok(o)) &&
+ odr_implicit_settag (o, ODR_CONTEXT, 2) &&
+ (odr_sequence_of(o, (Odr_fun) z_DiagRec, &(*p)->nonsurrogateDiagnostics,
+ &(*p)->num_nonsurrogateDiagnostics) || odr_ok(o)) &&
+ odr_sequence_end (o);
+}
+
int z_ScanRequest(ODR o, Z_ScanRequest **p, int opt)
{
if (!odr_sequence_begin(o, p, sizeof(**p)))
odr_implicit(o, odr_integer, &(*p)->numberOfEntriesReturned,
ODR_CONTEXT, 5, 0) &&
odr_implicit(o, odr_integer, &(*p)->positionOfTerm, ODR_CONTEXT, 6, 1)&&
- odr_explicit(o, z_ListEntries, &(*p)->entries, ODR_CONTEXT, 7, 1) &&
+ odr_implicit(o, z_ListEntries, &(*p)->entries, ODR_CONTEXT, 7, 1) &&
odr_implicit(o, odr_oid, &(*p)->attributeSet, ODR_CONTEXT, 8, 1) &&
z_OtherInformation(o, &(*p)->otherInfo, 1) &&
odr_sequence_end(o);
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.72 1998-10-20 13:23:15 quinn
+ * Revision 1.73 1998-10-20 13:55:43 quinn
+ * Fixed Scan bug in asn and client
+ *
+ * Revision 1.72 1998/10/20 13:23:15 quinn
* changed preferred pos to 1
*
* Revision 1.71 1998/10/20 13:21:43 adam
printf("Scan returned code %d\n", *res->scanStatus);
if (!res->entries)
return;
-#ifdef ASN_COMPILED
if ((entries = res->entries->entries))
num_entries = res->entries->num_entries;
-#else
- if (res->entries->which == Z_ListEntries_entries)
- {
- entries = res->entries->u.entries->entries;
- num_entries = res->entries->u.entries->num_entries;
- }
-#endif
for (i = 0; i < num_entries; i++)
{
int pos_term = res->positionOfTerm ? *res->positionOfTerm : -1;
else
display_diagrecs(&entries[i]->u.surrogateDiagnostic, 1);
}
-#ifdef ASN_COMPILED
if (res->entries->nonsurrogateDiagnostics)
display_diagrecs (res->entries->nonsurrogateDiagnostics,
res->entries->num_nonsurrogateDiagnostics);
-#else
- if (res->entries->which == Z_ListEntries_nonSurrogateDiagnostics)
- display_diagrecs(&res->entries->
- u.nonSurrogateDiagnostics->diagRecs[0], 1);
-#endif
}
void process_sortResponse(Z_SortResponse *res)
}
if (*arg)
{
- if (send_scanrequest(arg, 1 20) < 0)
+ if (send_scanrequest(arg, 1, 20) < 0)
return 0;
}
else
* OF THIS SOFTWARE.
*
* $Log: proto.h,v $
- * Revision 1.45 1998-08-19 16:10:07 adam
+ * Revision 1.46 1998-10-20 13:55:44 quinn
+ * Fixed Scan bug in asn and client
+ *
+ * Revision 1.45 1998/08/19 16:10:07 adam
* Changed som member names of DeleteResultSetRequest/Response.
*
* Revision 1.44 1998/05/18 10:14:08 adam
} u;
} Z_Entry;
+#ifdef BUGGY_LISTENTRIES
+
typedef struct Z_Entries
{
int num_entries;
} u;
} Z_ListEntries;
+#endif
+
+typedef struct Z_ListEntries {
+ int num_entries;
+ Z_Entry **entries; /* OPT */
+ int num_nonsurrogateDiagnostics;
+ Z_DiagRec **nonsurrogateDiagnostics; /* OPT */
+} Z_ListEntries;
+
typedef struct Z_ScanRequest
{
Z_ReferenceId *referenceId; /* OPTIONAL */