* See the file LICENSE for details.
*
* $Log: client.c,v $
- * Revision 1.112 2001-02-20 11:25:32 adam
+ * Revision 1.115 2001-03-13 18:10:58 adam
+ * Added option -c to set CCL config file.
+ *
+ * Revision 1.114 2001/02/21 13:46:53 adam
+ * C++ fixes.
+ *
+ * Revision 1.113 2001/02/21 09:41:15 adam
+ * Fixed problem with old codecs.
+ *
+ * Revision 1.112 2001/02/20 11:25:32 adam
* Added ill_get_APDU and ill_get_Cancel.
*
* Revision 1.111 2001/01/30 15:52:48 ja7
static Z_InitResponse *session = 0; /* session parameters */
static char last_scan_line[512] = "0";
static char last_scan_query[512] = "0";
+static char ccl_fields[512] = "default.bib";
char* esPackageName = 0;
static char last_cmd[100] = "?";
r->u.single_ASN1_type = (Odr_oct *)
odr_malloc (out, sizeof(*r->u.single_ASN1_type));
- r->u.single_ASN1_type->buf = odr_malloc (out, item_request_size);
+ r->u.single_ASN1_type->buf = (unsigned char *)
+ odr_malloc (out, item_request_size);
r->u.single_ASN1_type->len = item_request_size;
r->u.single_ASN1_type->size = item_request_size;
memcpy (r->u.single_ASN1_type->buf, item_request_buf,
r->u.single_ASN1_type = (Odr_oct *)
odr_malloc (out, sizeof(*r->u.single_ASN1_type));
- r->u.single_ASN1_type->buf = odr_malloc (out, ill_request_size);
+ r->u.single_ASN1_type->buf = (unsigned char *)
+ odr_malloc (out, ill_request_size);
r->u.single_ASN1_type->len = ill_request_size;
r->u.single_ASN1_type->size = ill_request_size;
memcpy (r->u.single_ASN1_type->buf, ill_request_buf, ill_request_size);
(int *) odr_malloc(out, sizeof(int));
*r->u.itemOrder->u.esRequest->notToKeep->resultSetItem->item = itemno;
+#ifdef ASN_COMPILED
if (!strcmp (type, "item") || !strcmp(type, "2"))
{
printf ("using item-request\n");
}
else
r->u.itemOrder->u.esRequest->notToKeep->itemRequest = 0;
+
+#else
+ r->u.itemOrder->u.esRequest->notToKeep->itemRequest = 0;
+#endif
return r;
}
static int send_itemorder(const char *type, int itemno)
{
- Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest );
+ Z_APDU *apdu = zget_APDU(out, Z_APDU_extendedServicesRequest);
Z_ExtendedServicesRequest *req = apdu->u.extendedServicesRequest;
oident ItemOrderRequest;
req->termListAndStartPoint->term->u.general)
{
req->termListAndStartPoint->term->u.general->buf =
- odr_strdup(out, term);
+ (unsigned char *) odr_strdup(out, term);
req->termListAndStartPoint->term->u.general->len =
req->termListAndStartPoint->term->u.general->size =
strlen(term);
#if CCL2RPN
bibset = ccl_qual_mk ();
- inf = fopen ("default.bib", "r");
+ inf = fopen (ccl_fields, "r");
if (inf)
{
ccl_qual_file (bibset, inf);
int ret;
int opened = 0;
- while ((ret = options("a:m:v:", argv, argc, &arg)) != -2)
+ while ((ret = options("c:a:m:v:", argv, argc, &arg)) != -2)
{
switch (ret)
{
exit (1);
}
break;
+ case 'c':
+ strncpy (ccl_fields, arg, sizeof(ccl_fields)-1);
+ ccl_fields[sizeof(ccl_fields)-1] = '\0';
+ break;
case 'a':
if (!strcmp(arg, "-"))
apdu_file=stderr;
break;
default:
fprintf (stderr, "Usage: %s [-m <marclog>] [ -a <apdulog>] "
- "[<server-addr>]\n",
+ "[-c cclfields] [<server-addr>]\n",
prog);
exit (1);
}