* Sebastian Hammer, Adam Dickmeiss
*
* $Log: client.c,v $
- * Revision 1.33 1996-05-09 07:25:22 quinn
- * Sm
+ * Revision 1.37 1996-07-06 19:58:29 quinn
+ * System headerfiles gathered in yconfig
+ *
+ * Revision 1.36 1996/06/10 08:53:47 quinn
+ * Added Summary
+ *
+ * Revision 1.35 1996/06/03 09:45:50 quinn
+ * Added display of OIDs in the GRS routine.
+ *
+ * Revision 1.34 1996/05/09 07:26:49 quinn
+ * *** empty log message ***
+ *
+ * Revision 1.33 1996/05/09 07:25:22 quinn
+ * Small
*
* Revision 1.32 1996/03/15 11:05:33 adam
* The user can set the preferred query type (prefix, ccl, ..) with the
* to illustrate the use of the YAZ service-level API.
*/
+#include <yconfig.h>
#include <stdio.h>
#include <stdlib.h>
-#ifdef WINDOWS
#include <time.h>
-#else
-#include <sys/time.h>
-#endif
#include <assert.h>
-#ifdef _AIX
-#include <sys/select.h>
-#endif
#include <comstack.h>
#include <tcpip.h>
printf("%s\n", t->content->u.string);
else if (t->content->which == Z_ElementData_numeric)
printf("%d\n", *t->content->u.numeric);
+ else if (t->content->which == Z_ElementData_oid)
+ {
+ int *ip = t->content->u.oid;
+ oident *oent;
+
+ if ((oent = oid_getentbyoid(t->content->u.oid)))
+ printf("OID: %s\n", oent->desc);
+ else
+ {
+ printf("{");
+ while (ip && *ip >= 0)
+ printf(" %d", *(ip++));
+ printf(" }\n");
+ }
+ }
else if (t->content->which == Z_ElementData_noDataRequested)
printf("[No data requested]\n");
else if (t->content->which == Z_ElementData_elementEmpty)
assert((RPNquery = ccl_rpn_query(rpn)));
bib1.proto = protocol;
bib1.oclass = CLASS_ATTSET;
- bib1.value = VAL_BIB1;
+ bib1.value = attributeset;
RPNquery->attributeSetId = oid_getoidbyent(&bib1);
query.u.type_1 = RPNquery;
break;
sprintf(setstring, "%d", setnumber);
req->resultSetId = setstring;
}
+
+
+#if 0
+ if (1)
+ {
+ static Z_Range range;
+ static Z_Range *rangep = ⦥
+ req->num_ranges = 1;
+#endif
+
+
+
+
+
+
+
+
+
req->resultSetStartPoint = &setno;
req->numberOfRecordsRequested = &nos;
prefsyn.proto = protocol;
recordsyntax = VAL_GRS1;
return 1;
}
+ else if (!strcmp(arg, "summary"))
+ {
+ printf("Preferred format is Summary\n");
+ recordsyntax = VAL_SUMMARY;
+ return 1;
+ }
else if (!strcmp(arg, "explain"))
{
printf("Preferred format is Explain\n");