See the file LICENSE for details.
Compilation and installation instructions for YAZ
- $Id: README,v 1.34 2001-03-13 18:11:38 adam Exp $
+ $Id: README,v 1.35 2001-04-06 12:26:45 adam Exp $
The primary output of the source here is the lib/libyaz.a library,
which contains support functions for implementing the server or client
Type "./configure", then "make" to build YAZ.
Note: If you are using the CVS snapshot of YAZ you must have autoconf,
-automake and libtool installed. Before running configure generate
-support files by running buildconf.sh which is part of YAZ.
+automake and libtool installed. Before running configure, create
+support files by running buildconf.sh in the top-level directory of YAZ.
Two test-programs of interest are generated when you type 'make' at the
top level: ztest/yaz-ztest and client/yaz-client. Ztest is a dummy
## Copyright (C) 1995-2000, Index Data
## All rights reserved.
-## $Id: Makefile.am,v 1.10 2001-03-21 15:02:39 adam Exp $
+## $Id: Makefile.am,v 1.11 2001-04-06 12:26:46 adam Exp $
bin_PROGRAMS=yaz-client
yaz_client_LDADD = ../lib/libyaz.la $(READLINE_LIBS)
-INCLUDES=-I$(top_srcdir)/include -DCCL2RPN=1
+INCLUDES=-I$(top_srcdir)/include
* See the file LICENSE for details.
*
* $Log: client.c,v $
- * Revision 1.119 2001-04-05 13:08:48 adam
+ * Revision 1.120 2001-04-06 12:26:46 adam
+ * Optional CCL module. Moved atoi_n to marcdisp.h from yaz-util.h.
+ *
+ * Revision 1.119 2001/04/05 13:08:48 adam
* New configure options: --enable-module.
*
* Revision 1.118 2001/03/27 14:48:06 adam
#include <yaz/ill.h>
#endif
-#if CCL2RPN
+#if YAZ_MODULE_ccl
#include <yaz/yaz-ccl.h>
#endif
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* esPackageName = 0;
static char last_cmd[100] = "?";
static FILE *marcdump = 0;
static QueryType queryType = QueryType_Prefix;
-#if CCL2RPN
+#if YAZ_MODULE_ccl
static CCL_bibset bibset; /* CCL bibset handle */
#endif
Z_SearchRequest *req = apdu->u.searchRequest;
Z_Query query;
int oid[OID_SIZE];
-#if CCL2RPN
+#if YAZ_MODULE_ccl
struct ccl_rpn_node *rpn = NULL;
int error, pos;
#endif
Z_RPNQuery *RPNquery;
Odr_oct ccl_query;
-#if CCL2RPN
+#if YAZ_MODULE_ccl
if (queryType == QueryType_CCL2RPN)
{
rpn = ccl_find_str(bibset, arg, &error, &pos);
ccl_query.buf = (unsigned char*) arg;
ccl_query.len = strlen(arg);
break;
-#if CCL2RPN
+#if YAZ_MODULE_ccl
case QueryType_CCL2RPN:
query.which = Z_Query_type_1;
RPNquery = ccl_rpn_query(out, rpn);
r->u.itemOrder->u.esRequest->notToKeep->itemRequest =
create_external_ILL_APDU(ILL_APDU_ILL_Request);
}
+ else if (!strcmp(type, "xml") || !strcmp(type, "3"))
+ {
+ const char *xml_buf =
+ "<itemorder>\n"
+ " <type>request</type>\n"
+ " <libraryNo>000200</libraryNo>\n"
+ " <borrowerTicketNo> 1212 </borrowerTicketNo>\n"
+ "</itemorder>";
+ r->u.itemOrder->u.esRequest->notToKeep->itemRequest =
+ z_ext_record (out, VAL_TEXT_XML, xml_buf, strlen(xml_buf));
+ }
else
r->u.itemOrder->u.esRequest->notToKeep->itemRequest = 0;
Z_APDU *apdu = zget_APDU(out, Z_APDU_scanRequest);
Z_ScanRequest *req = apdu->u.scanRequest;
int use_rpn = 1;
+#if YAZ_MODULE_ccl
int oid[OID_SIZE];
-#if CCL2RPN
if (queryType == QueryType_CCL2RPN)
{
oident bib1;
queryType = QueryType_CCL;
else if (!strcmp (arg, "prefix") || !strcmp(arg, "rpn"))
queryType = QueryType_Prefix;
-#if CCL2RPN
+#if YAZ_MODULE_ccl
else if (!strcmp (arg, "ccl2rpn") || !strcmp (arg, "cclrpn"))
queryType = QueryType_CCL2RPN;
#endif
printf ("Querytype must be one of:\n");
printf (" prefix - Prefix query\n");
printf (" ccl - CCL query\n");
-#if CCL2RPN
+#if YAZ_MODULE_ccl
printf (" ccl2rpn - CCL query converted to RPN\n");
#endif
return 0;
static void initialize(void)
{
-#if CCL2RPN
+#if YAZ_MODULE_ccl
FILE *inf;
#endif
nmem_init();
if (apdu_file)
odr_setprint(print, apdu_file);
-#if CCL2RPN
+#if YAZ_MODULE_ccl
bibset = ccl_qual_mk ();
inf = fopen (ccl_fields, "r");
if (inf)
dnl YAZ Toolkit, Index Data 1994-2001
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.43 2001-04-05 13:08:48 adam Exp $
+dnl $Id: configure.in,v 1.44 2001-04-06 12:26:46 adam Exp $
AC_INIT(include/yaz/yaz-version.h)
AM_INIT_AUTOMAKE(yaz, 1.7)
dnl
EXTRAMODULE=asn
HFILE=${srcdir}/asn/prt-proto.h
fi
-AC_ARG_ENABLE(module,[ --enable-module=\"mod ..\" ill],[
- EXTRAMODULE="$EXTRAMODULE $enable_module"])
+AC_ARG_ENABLE(modules,[ --enable-modules=\"mod ..\" ill],[
+if test "$enable_modules" != "no"; then
+ EXTRAMODULE="$EXTRAMODULE $enable_modules"
+fi
+],[
+EXTRAMODULE="$EXTRAMODULE ill ccl"
+])
EXTRALIB=""
+echo $EXTRAMODULE
for module in $EXTRAMODULE; do
EXTRALIB="$EXTRALIB ../$module/lib${module}.la"
if test $module = "z39.50"; then
fi
sed s%yaz_echo_source=yes%yaz_echo_source=no%g < ${srcdir}/yaz-config.in >${srcdir}/lib/yaz-config.in
dnl
-SUBDIRS_VAR="util odr $EXTRAMODULE zutil comstack ccl tab retrieval server include lib client ztest"
+SUBDIRS_VAR="util odr $EXTRAMODULE zutil comstack tab retrieval server include lib client ztest"
AC_SUBST(SUBDIRS_VAR)
dnl ------ Makefiles
dnl
/*
- * Copyright (c) 1995-2000, Index Data.
+ * Copyright (c) 1995-2001, Index Data.
*
* Permission to use, copy, modify, distribute, and sell this software and
* its documentation, in whole or in part, for any purpose, is hereby granted,
* OF THIS SOFTWARE.
*
* $Log: marcdisp.h,v $
- * Revision 1.2 2000-02-28 11:20:06 adam
+ * Revision 1.3 2001-04-06 12:26:46 adam
+ * Optional CCL module. Moved atoi_n to marcdisp.h from yaz-util.h.
+ *
+ * Revision 1.2 2000/02/28 11:20:06 adam
* Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL.
*
* Revision 1.1 1999/11/30 13:47:11 adam
YAZ_EXPORT int marc_display (const char *buf, FILE *outf);
YAZ_EXPORT int marc_display_ex (const char *buf, FILE *outf, int debug);
+YAZ_EXPORT int atoi_n (const char *buf, int len);
#define ISO2709_RS 035
#define ISO2709_FS 036
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: yaz-util.h,v $
- * Revision 1.2 2000-02-28 11:20:06 adam
+ * Revision 1.3 2001-04-06 12:26:46 adam
+ * Optional CCL module. Moved atoi_n to marcdisp.h from yaz-util.h.
+ *
+ * Revision 1.2 2000/02/28 11:20:06 adam
* Using autoconf. New definitions: YAZ_BEGIN_CDECL/YAZ_END_CDECL.
*
* Revision 1.1 1999/11/30 13:47:11 adam
#include <yaz/wrbuf.h>
#include <yaz/nmem.h>
#include <yaz/readconf.h>
+#include <yaz/marcdisp.h>
YAZ_BEGIN_CDECL
YAZ_EXPORT int yaz_matchstr(const char *s1, const char *s2);
-YAZ_EXPORT int atoi_n (const char *buf, int len);
YAZ_END_CDECL
* Chas Woodfield, Fretwell Downing Datasystems.
*
* $Log: ztest.c,v $
- * Revision 1.41 2001-04-05 13:08:48 adam
+ * Revision 1.42 2001-04-06 12:26:46 adam
+ * Optional CCL module. Moved atoi_n to marcdisp.h from yaz-util.h.
+ *
+ * Revision 1.41 2001/04/05 13:08:48 adam
* New configure options: --enable-module.
*
* Revision 1.40 2001/03/25 21:55:13 adam
oident *ent = oid_getentbyoid(r->direct_reference);
if (ent)
yaz_log(LOG_LOG, "OID %s", ent->desc);
+ if (ent && ent->value == VAL_TEXT_XML)
+ {
+ yaz_log (LOG_LOG, "ILL XML request");
+ if (r->which == Z_External_octet)
+ yaz_log (LOG_LOG, "%.*s", r->u.octet_aligned->len,
+ r->u.octet_aligned->buf);
+ }
if (ent && ent->value == VAL_ISO_ILL_1)
{
yaz_log (LOG_LOG, "Decode ItemRequest begin");